aa er el
TCELAk Ma 2:07 FD
ries isa handy Bepacuction to te
closed-loop contro!
control a roportional system
shortcomings.
are ri comes the basic ole
‘of automatic control, including a simple
al
‘lee
system, common
> eo
Des arts ee gstee. wort
Ja closed loop configuration (also called
feedback or servo loop configuration), In this
article series, I'll discuss some basic aspects of,
automatic control also known as cybernetics.
Robotics, flight controls, manufacturing
processes, and many other applications
couldn't exist without it. Books on automation
have hundreds of pages, heavily loaded with
mathematics, Consequently, this series will
be an introduction to the fundamentals of
automatic control while keeping the math to
the minimum.
FEEDBACK CONTROL
Known for hundreds of years, feedback
control originated with clocks. Clock pendulum
suspensions, for example, were made of
materials expanding and contracting with
changing temperature to maintain accurate
pendulum oscillations. With the onset of
the Industrial Revolution, precise feedback
control became necessary for the new
machines. The first truly proportional closed
loop control system appeared in 1788 when
James Watt invented the flyball governor to
madify the amount of steam powering his
engine. As early as 1850, the integrating
term was introduced by Sir W. Siemens, and
by 1894, the derivative term was discovered.
In the absence of electronics, those systems
were mechanical, hydraulic, or pneumatic,
but even by our present-day standpoint
they were engineering wonders. Electronics
entered automation en mass fairly ate, simply
because devices were too cumbersome with
vacuum tubes. Thus, mechanical engineering
terminology, such as "K” for gain instead
of the "G” or “AY otherwise common in
electronics is used. One should mention that
a great deal of electronics, from oscillators
through amplifiers to power supplies depend
on feedback control. However, our current
focus is on automation with electronics
merely as the control element.
Figure 1 is a typical block diagram of a
simple closed-loop control system. A command
the set point) is issued to an electronic
controller. Let's say it is a desired speed in
an automobile cruise control. A sensor feeds
back the car's immediate speed whose value is
subtracted from the command. The difference
between the desired and the actual speed
of the vehicle is speed error. The electronic
controller pracesses the error signal according
to a control law and the resulting correction
signal drives the power converter, in our case
2 fuel control valve, to convert the relatively
‘weak electrical signal into the fuel flow to the
engine. The engine, or the plant, as referred to
in cybernetics, propels the car to a higher or
lower speed in the direction of the command
to reduce the speed error. Along the way,
disturbances—such as varying resistance of
the road due to slope, surface, load, wind.
and so forth—also affect the speed. The speed
sensor detects those variations and feeds
them back to the controller which causes the
power converter to modify the fuel flow and
thus bring the speed error to zera,2
COMMON CONTROL LAWS
‘The common contral laws are proportional
(), proportional-integrating (PI), and
proportional-integrating-derivative | (PID).
There are also sophisticated laws such as
Fuzzy Logic, Predictive Algorithm, and others.
The widely used P, PI, and PID laws have been
around for centuries. Its unlikely they will be
made obsolete any time soon
The proportional control means that the
error signal is amplifed to drive the power
converter managing the fuel flow to the
engine, Proportional Gain (K,) of a linear
amplifier would then be equal to the Control
Gain (Ke) of the system.
Proportional systems suffer from two
shortcomings—a steady state error and
an overshoot. Let's say our cruise control
maintains the speed on a flat road, but
becomes sluggish, not completely reaching
the commanded speed, when the car’s going
uphill. Tis is called offset or a steady state
error. Assuming the fuel flow is not already
saturated and the engine can still deliver more
power, you might increase the proportional
gain Ky, but then your system will overshoot
and might become unstable, The common
fix of the steady state error is an addition
of an integrating term K;. Tt integrates the
error with time constant 1, adding it to the
control gain Kc, which then becomes Ke = Kp
+ Kj. This increases the overall gain for the
duration of the error. Having correct values of
the two terms ky and K; is critical. Incorrect
values may slow the system down or cause it
to oscillate
Power converters, plants, feedback
sensors, and all parts of the contral loop
react with finite speed, introducing a lag into
the system, By the time the speed error has
dropped to zero, the response of the power
converter and/or the plant may stil continue
to grow due to that lag. This will cause the
ABOUT THE AUTHOR
George Novacek is a professional ergineer
with 2 degree in Cybernetics and Closed-
Loop Control, Now retired, he was most
recently president of a multinational
manufacturer for embedded contrel systems
for aerospace applications. George wrote 26
feature articles for Circuit Cellar between
1999 and 2004. Contact him at gnovacek@
nexicom.net with “Circuit Cellar*in the
subject line
speed to overshoot. The system will try to
correct it, but, for the same reason, the speed
will undershoot. In the end, the total response
may be anything from a small single overshoot
to ringing to sustained oscillations. This can
be corrected by lowering the proportional
gain ky, but then the accuracy and the speed
of response may suffer. A derivative term is
the solution
The derivative term K calculates the
rate of change of the errar signal with the
derivative time constant Tj. When properly
mixed with the proportional signal, it reduces
the correction signal (i.e., the fuel flow in our
example) by anticipating the vehicle speed
response. The big overshoot no longer occurs.
Unfortunately, the derivative term makes
systems sensitive to noise and frequently
needs to be followed by 2 low-pass filter
which adds another unwelcome phase lag,
For this reason, the derivative term Ky is in
some systems omitted. The PI control law is
probably the most popular one.
PID CONTROL
Control systems and each of their
functional blacks are characterized by their
transfer functions, which are the ratio of their
‘output to the input. The transfer function of
Power Disturbance
Command | Electronic Power Response
t controller converter [Tt Plant as
' 1 Feedback |_| |
t Controller rm ‘sensor '
: it Machine ‘ss
ens
ricuRe2
Doaeg versan of ID cartel
ciecotelbnanmycemsteral
RESOURCES
6. Ells, “Control System
Design Guide," Fourth Edition,
Butterworth-Heinemann,
2022.
Dente Gain vt
ButerSummer rT
4 Propertonal Gain x
come a x 2 on
Inept Gan
2 PID controller is mathematically expressed
by equation:
u(t) =K,e(t) +K, Jeton + =
where
e(t) ~command(t) — feedback (t)
u(t)
¢(t) = control error
correction signal
To hardware engineers, the PID control
canbe best explained’ by its analog
implementation shown in Figure 2. A.common
quad operational amplifier is all that’s needed
to make a simple PID controller. UIA subtracts
the feedback from the command signal to
generate the error signal. This is processed
by the three (.e., proportional) derivative
and integrating amplifiers—UIC, U1B, and
UID, respectively—and recombined into the
correction signal driving the power converter.
F Golnaraghi and B.C. Kuo, Automatic Contro!
Systems, Wiley, 2009,
6. Novacek, *Electro-Hydraulic Servo Velves”
Greult Cellar 253, 2011.
Figure 2 shows a parallel configuration
of a PID controller. However, the three
terms can be put in series, thus forming
2 serial controller or some other series/
parallel combination, A control law generated
by a microcontroller is typically a series
configuration. Each configuration has its
advantages and disadvantages, Many systems
contain several servo loops embedded within
each other. In Figure 2, each operational
amplifier is actually a feedback controller in
its own right.
Nowadays a microcontroller is frequently
used as the control element. Unlike nearly
instantaneous response of analog circuits,
digital circuits sample at 2 certain rate and,
consequently, introduce processing delays, i.e.
lags, which may lead to instability. In some
cases, a very fast, expensive processor might
be needed where an analog solution might be
better and more economical. An example of
the PID algorithm at constant sampling rate
is shown in Listing 1.
IMPLEMENTATION & ANALYSIS
Implementation and analysis of transfer
functions of electronic controllers is fairly
straight forward, as long as the system
‘operates within its linear range and is time
invariant (LTD). In reality, all parts of contral
systems exhibit limited linearity and when
saturated, introduce lags, and may cause
instability of the system. Our cruise control,
for example, is limited primarily by the power
of the car's engine. Transfer functions of non-
electronic components, if available at all from
their manufacturers, are not always accurate.
But they could be measured or estimated.
Therefore, the system designer needs to
plan for extensive testing and optimization./* Normally the integrating
The correction signal must be lim
of the power converter
gains are declared constants. */
error = setPoint - feedla
pTerm = Kp * error
Proportiona
sme 1
be limited to prevent roll-over
d to stay within linear response
, integrating and derivative
“calculate correction
17 proportion
Term += (Ki * error); 77 integral
dTerm = Kd # (error - previoustrror); // derivative
previousError = errors 77 venemoer for next Q
correctionsignal = prerm + iTerm + dTerm; =
That’ where digital controllers shine, as their programs (typically PSpice, UTSpice, and
gains and limits can be modified on the fly
Some digital controllers feature auto-tuning
capability, which, while convenient, might
be modifying the code upon every power
up. Certificating authorities frown on and
generally don’t permit self-modifying or dead
code in safety-critical applications,
Computer simulation programs (e.9.,
Simulink by MathWorks) are great tools, but,
similar to the electronic circuits simulation
others), their results are only as good as the
mathematical models of the components.
But they do get you pretty close to the goal.
The designer of the electronics should always
strive for a hefty design margin to satisfy LTT
requirements.
This has been an introduction to the
automatic systems in general. Next month,
ll take @ quick look at their analysis in
frequency domain.
dd
With this digital subscription, you have access
to all 1:
ues of Circuit Cellar 2016 from any
‘computer or tablet at anytime, Readers can
explore project ideas, bookmark pages, and
make annotations throughout each issue.
nels & Enclosures
uring custom Pa
+ Manutact
“pree CAD Soft
ipping
Free SPS gor Ro
“No Mini
“Tpuilt in 5 DAYS
Cri SUC Cenc