Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 21

Anatomy Of A Feedback Control System

Here is the classic block diagram of a process under PID Control.

Whats going on this diagram?


The Setpoint (SP) is the value that we want the process to be.
For example, the temperature control system in our house may have a SP of 22C. This means
that
we want the heating and cooling process in our house to achieve a steady temperature of as
close to 22C as possible
The PID controller looks at the setpoint and compares it with the actual value of the Process
Variable (PV). Back in our house, the box of electronics that is the PID controller in our Heating
and Cooling system looks at the value of the temperature sensor in the room and sees how close
it is to 22C.
If the SP and the PV are the same then the controller is a very happy little box. It doesnt have
to do anything, it will set its output to zero.
However, if there is a disparity between the SP and the PV we have an error and corrective action
is needed. In our house this will either be cooling or heating depending on whether the PV is
higher or lower than the SP respectively.
Lets imagine the temperature PV in our house is higher than the SP. It is too hot. The air-con is
switched on and the temperature drops.
The sensor picks up the lower temperature, feeds that back to the controller, the controller sees
that the temperature error is not as great because the PV (temperature) has dropped and the air
con is turned down a little.
This process is repeated until the house has cooled down to 22C and there is no error.
Then a disturbance hits the system and the controller has to kick in again.
In our house the disturbance may be the sun beating down on the roof, raising the temperature of
the air inside.
So thats a really, really basic overview of a simple feedback control system. Sounds dead simple
eh?

Understanding the controller


Unfortunately, in the real world we need a controller that is a bit more complicated than the one
described above, if we want top performance form our loops. To understand why, we will be
doing some thought experiments where we are the controller.
When we have gone through these thought experiments we will appreciate why a PID algorithm
is needed and why/how it works to control the process.
We will be using the analogy of changing lanes on a freeway on a windy day. We are the driver,
and therefore the controller of the process of changing the cars position.
Heres the Block Diagram we used before, with the labels changed to represent the car-on-
windy-freeway control loop.

Notice how important closing the feedback loop is. If we removed the feedback loop we would
be in open loop control, and would have to control the cars position with our eyes closed!
Thankfully we are under Closed loop control -using our eyes for position feedback.
As we saw in the house-temperature example the controller takes the both the PV and SP signals,
which it then puts through a black box to calculate a controller output. That controller output is
sent to an actuator which moves to actually control the process.
We are interested here in what the black box actually does, which is that it applies 1, 2 or 3
calculations to the SP and Measured PV signals. These calculations, called the Modes of
Control include:
Proportional (P)
Integral (I)
Derivative (D)

Under The Hood Of The PID Controller


Heres a simplified block diagram of what the PID controller does:

It is really very simple in operation. The PV is subtracted from the SP to create the Error. The
error is simply multiplied by one, two or all of the calculated P, I and D actions (depending
which ones are turned on). Then the resulting error x control actions are added together and
sent to the controller output.
These 3 modes are used in different combinations:
P Sometimes used
PI - Most often used
PID Sometimes used
PD rare as hens teeth but can be useful for controlling servomotors.

Derivatives
Go into the control room of a process plant and ask the operator:
Whats the derivative of reactor 4s pressure?
And the response will typically be:
Bugger off smart arse!
However go in and ask:
Whats the rate of change of reactor 4s pressure?
And the operator will examine the pressure trend and say something like:
About 5 PSI every 10 minutes
Hes just performed calculus on the pressure trend! (dont tell him though or hell want a pay
raise)
So derivative is just a mathematical term meaning rate-of-change. Thats all there is to it.

Integrals without the Math


Is it any wonder that so many people run scared from the concept of integrals and integration,
when this is a typical definition?
What the!?!?
If you understood that you are a smarter person than me.
Heres a plain English definition:
The integral of a signal is the sum of all the instantaneous values that the signal has been, from
whenever you started counting until you stop counting.
So if you are to plot your signal on a trend and your signal is sampled every second, and lets say
you are measuring temperature. If you were to superimpose the integral of the signal over the
first 5 seconds it would look like this:
The green line is your temperature, the red circles are where your control system has sampled the
temperature and the blue area is the integral of the temperature signal. It is the sum of the 5
temperature values over the time period that you are interested in. In numerical terms it is the
sum of the areas of each of the blue rectangles:
(13 x 1)+(14x1)+(13x1)+(12x1)+(11x1) = 63 C s
The curious units (degrees Celsius x seconds) are because we have to multiply a temperature by
a time but the units arent important.
As you can probably remember from school the integral turns out to be the area under the
curve. When we have real world systems, we actually get an approximation to the area under the
curve, which as you can see from the diagram gets better, the faster we sample.

Proportional control
Heres a diagram of the controller when we have enabled only P control:
In Proportional Only mode, the controller simply multiplies the Error by the Proportional Gain
(Kp) to get the controller output.
The Proportional Gain is the setting that we tune to get our desired performance from a P only
controller.

A match made in heaven: The P + I Controller


If we put Proportional and Integral Action together, we get the humble PI controller. The
Diagram below shows how the algorithm in a PI controller is calculated.
The tricky thing about Integral Action is that it will really screw up your process unless you
know exactly how much Integral action to apply.
A good PID Tuning technique will calculate exactly how much Integral to apply for your specific
process - but how is the Integral Action adjusted in the first place?

Adjusting the Integral Action


The way to adjust how much Integral Action you have is by adjusting a term called minutes per
repeat. Not a very intuitive name is it?
So where does this strange name come from? It is a measure of how long it will take for the
Integral Action to match the Proportional Action.
In other words, if the output of the proportional box on the diagram above is 20%, the repeat
time is the time it will take for the output of the Integral box to get to 20% too.
And the important point to note is that the bigger integral action, the quicker it will get this
20% value. That is, it will take fewer minutes to get there, so the minutes per repeat value will
be smaller.
In other words the smaller the minutes per repeat is the bigger the integral action.
To make things a bit more intuitive, a lot of controllers use an alternative unit of repeats per
minute which is obviously the inverse of minutes per repeat.
The nice thing about repeats per minute is that the bigger it is - the bigger the resulting Integral
action is.

Derivative Action predicting the future


OK, so the combination of P and I action seems to cover all the bases and do a pretty good job of
controlling our system. That is the reason that PI controllers are the most prevalent. They do the
job well enough and keep things simple. Great.
But engineers being engineers are always looking to tweak performance.
They do this in a PID loop by adding the final ingredient: Derivative Action.
So adding derivative action can allow you to have bigger P and I gains and still keep the loop
stable, giving you a faster response and better loop performance.
If you think about it, Derivative action improves the controller action because it predicts what is
yet to happen by projecting the current rate of change into the future. This means that it is not
using the current measured value, but a future measured value.
The units used for derivative action describe how far into the future you want to look. i.e. If
derivative action is 20 seconds, the derivative term will project the current rate of change 20
seconds into the future.
The big problem with D control is that if you have noise on your signal (which looks like a
bunch of spikes with steep sides) this confuses the hell out of the algorithm. It looks at the slope
of the noise-spike and thinks:
Holy crap! This process is changing quickly, lets pile on the D Action!!!
And your control output jumps all over the place, messing up your control.
Of course you can try and filter the noise out, but my advice is that, unless PI control is really
slow, dont worry about switching D on.

Another note from Jim: "Whether learning about PID and how the parameters affect
performance, or trying to tune a process, simulation is an important tool for getting PID right.
Finn Peacock has a simulation tool available that runs in Microsoft Excel. Over the years, I have
written a lot of different simulation programs while developing PID algorithms for everything
from industrial process controls to scientific research apparatus on the NASA Space Shuttle. If
this spread sheet had been available then, it would have saved me a lot of time. You can get a
copy of this simulation tool (screen shot below) as part of the Pro package available from Finn
Peacock atwww.pidtuning.net. Again, I don't make a dime off this. I just found it valuable and
wanted to pass it along."
--

eedback Control
Feedback (or closed loop) control is where control theory
really starts to get interesting. ? What do we mean by
feedback? Feedback is information fed back into the control
system providing information about the current status of what
it is trying to control. Let's clarify with an example.
You are driving a car along a straight and level road. You press
the accelerator until the speed reaches 30mph. You then ease
off on the accelerator a touch to maintain that constant speed.
You are now participating in a closed loop control system. The
objective, or target, of control here is the desired speed of the
car. The input to the control loop is the reading of speed seen
by you on the speedometer and the output is the control of the
accelerator pedal. The intelligence at work here (I use the
phrase in the most general sense !) is you, the driver. As you
drive along the road there is a dynamic interaction between
the speedometer reading and the position of the pedal. As you
detect an error in the target speed of 30mph you apply a
correcting action using the pedal. In terms of feedback, you
are feeding back the detected error in the target speed and
applying it to the pedal. (For the moment we will ignore the
mathematics that would
dictate constants of
proportionality etc and
focus on the fundamental
characteristics).

So, all is well. We have the car under control, with our personal feedback loop and are
wondering what all the fuss is about feedback control is easy. Before we get too confident
let's make some changes to this control system, and see where it takes us. Some of the
changes may seem a little strange but stay with me, because they will lead to a better
understanding further down the line.
Let's replace the accelerator pedal with a switch. "On" gives maximum acceleration and
"off" gives none at all. Crazy?, of course it is but imagine your attempts at trying to maintain
a steady speed. You would probably find that your speed would oscillate above and below
your target of 30mph, probably quite significantly. You could perhaps achieve a better control
with higher speed shorter pulses of the switch but you would then be facing the problem of
speed of response of the engine. The engine will not deliver power instantly (well at least not
the cars I drive). Without a significant duration of switch-on time you
may not see any change in speed.

This scenario is called "Bang-Bang" control and the oscillations about


the target speed are called "Hunting". Bang-bang control is the most basic
form of feedback control. In its favour we have to say that it is normally
the least expensive to implement but against it is the quality and
accuracy of achieving the target. Generally we can say that it is more
suitable for control systems with slow changing targets. Choosing the
switching points more carefully can make some improvements. In the case
of the car, the accelerator could be switched on when the speed drops to
28 mph and switched off when 32mph. This allows time for the engine to
respond and reduces the amount of switching but sacrifices the accuracy
of control. i.e. the range of hunting is, at best, 28 - 32 mph. Another
common example of bang-bang control is the central heating thermostat.
If you set 20 degrees on the dial, it will normally switch on when the
temperature falls to 18 and off when at 22. This gap between on and off is
called "Hysterisis".
Now ask yourself this question; why was it easier to control the speed
using the accelerator pedal rather than the switch
? (read on).

Proportional Control
Without realizing it you were applying proportional control to
the car speed. In other words the corrective action you took in
response to an incorrect speed was in proportion to the
amount of error. A large drop in speed caused you to floor the
accelerator and, as your speed came up, you gradually eased
off the pedal until achieving the target of 30mph. So much
easier than the switch, but more complex control. With the
switch control, your input (reading the speedometer), only had
to decide above or below the target. Now you have to know
how much above or below. Your output was a simple on-off,
now its a pedal position. Is it worth it for controlling the car?
Of course it is. Would you use it for central heating control?
Probably not. Knowing where it is appropriate to apply specific
control techniques is as important as knowing how to apply
them.

Lets adjust our car control environment a little more to examine a


limitation in proportional control. We are driving along a flat road with our
proportional control of the pedal responding to changes in the
speedometer reading when suddenly we start to climb a steep hill. The
speed drops very quickly and we match the drop by a carefully
proportioned depression of the accelerator. The net result is that
eventually we get back up to 30mph but only after we have dropped right
down to about 10. We could see the speed dropping quickly but we
constrained ourselves to only apply a fixed proportion of accelerator based
on the difference between actual speed and target speed. What we feel
we needed to do is produce a lot more accelerator power than we actually
needed for a short duration to counteract the sudden decrease in speed
followed by a more proportioned response. How do we relate this gut
feeling to control theory? The answer is derivative
control.

erivative Control
Derivative control quantifies this need to apply more
correction by linking the amount of accelerator pedal to the
rate of change of speed. In other words the faster the speed
is dropping the more acceleration we apply. A sudden drop in
speed requires a large and equally quick depression of the
accelerator pedal. Do not confuse this with the amount of
speed drop. It is quite independent. It is also important to
realize that on its own derivative control is not sufficient to
restore the speed to 30mph. Consider if the change in speed is
very slow. For example the speed may be dropping at a rate of
1mph per minute. This would produce an insignificant amount
of accelerator pedal depression and even if (after 25 minutes)
the speed dropped to 5mph the amount of pedal depression
would still be insignificant. We conclude that we need
proportions of both elements to properly control the speed;
derivative control to cope with sudden fluctuations and
proportional to bring it back from large errors.

We have a very reasonable control system now which can maintain the
target speed 30mph within certain limits regardless of flat or hilly roads.
What we now need to examine is how close to the target are we capable
of controlling the speed. Using the car example in this case is probably a
little unfair in that the accuracy of the speedometer and a requirement to
travel at an almost exact speed of 30mph are just not sensible. However,
lets assume that is exactly what we are trying to achieve. So, what is
wrong with our current accuracy? If I were to estimate what were possible
within the current control system I would say that we could hold the speed
within the limits of 28 32 mph. So how can we improve that.. Before I
answer that lets examine the nature of the speed error.
If we have a large difference in target and actual speed our proportional
control applies a correction. If we have a sudden change in speed the
derivative control helps out. However, if we only have a small fixed error
the proportional element is so small that it is ineffective and because
there is no change in speed the derivative contribution is zero. So the
small error persists indefinitely. What we need here is something that
increases in its contribution the longer the error , however small, exists.
This is called Integral Control.

Integral Control
Consider integral control as a constant summation function. That is, it is
constantly adding up the error from the target speed and providing feedback
proportional to the total rather than the error. So in our example, the constant error
of even a fraction of a mph will accumulate until at some point the total will be
enough to cause effective corrective action. Once again I have to emphasize that
integral control on its own will not be enough to control speed within the example
already described. Proportional and derivative are still essential ingredients in the
mix.
PID Control

In the previous sections we have seen how something like


the speed of a car can be controlled by making adjustments
to the control (accelerator) based on an observed error in the
required speed. We have considered simple bang bang
control where the accelerator is used like a switch which is
either fully applied or fully off. We have seen that applying
the accelerator in proportion to the speed difference helps
increase accuracy of achieving the required speed
(proportional control) and that adding up all of the small
errors over time to adjust the accelerator helps reduce
gradual drift in the speed. It was also noted how effective
applying a quick jolt of power during sharp slowdown
periods helped smooth out fluctuations (derivative control).
Each of these techniques are important in their own way in a
control system of error analysis and adjustment for achieving
the objective of accurate control of the target, which, in our
example case was the speed of a car.
Having seen the benefits and limitations of each technique,
which do you choose for your own control system ? Do you
use just one, or perhaps two, or perhaps all ?? While it is true
that there are a great many control systems that use one or
two of these techniques and function perfectly well within
their scope of requirements, the most useful way to use these
techniques is within the scope of a three term controller i.e.
proportional, integral and derivative control. This is more
commonly known as PID control. We will now examine how
a single control system can make use of all three techniques
to achieve the required control of the target (eg speed).
This topic is notoriously mathematical in most of the
rigorous explanations of the subject which can exclude a
great many practical engineers who were not born again
mathematicians. We feel that this can be avoided, especially
initially, in favour of a feel for what is going on. If maths is
your forte then perhaps later sections will be of more interest.
For the purposes of simplicity we will stay with the car speed
control system example where the accelerator pedal is the
control input and the car speed is the target output.
When we say PID controller we are in fact saying that
there is a single controlled quantity (eg speed) which can be
adjusted in such a way as to minimise the observed error
between required and measured values, using feedback
proportional to each of the three PID elements.
The above statement contains a lot of concepts !!. By
feedback we are saying that some function of the output
(speed) error is used to correct the input (accelerator) control.
i.e. a part of the output is fed back to the input. Because this
feedback is intended to reduce the error in the output we call it negative feedback. This should
be obvious when you consider what would happed if positive feedback was used. i.e. to correct
a slight increase in speed, you pressed the accelerator further..in no time you would be going
rather fast. In fact we will see later that the accidental occurrence of positive feedback
constitutes a loss of control, or instability, of the system. In the above statement we also note
that there are proportional elements of each of the P,I and D elements. Put simply there are
three constants that determine how much of each type are added together to give a resulting
correction to the accelerator pedal. The bigger the constant , the more the control pedal reacts
to a change of that nature in the speed. For example a large number multiplying the derivative
part of the feedback will make the car speed very responsive to sudden changes in speed. This
may help control the speed but you might find the ride a bit jumpy. A small number for this
will mean that other elements, like proportional feedback, may become more needed to correct
speed fluctuations. Sudden drops in speed may take a bit longer to correct in this case, but the
ride should be a bit smoother ! What we need is an optimum choice for these constants in order
for the speed to be controlled accurately enough for our purposes without other aspects of the
system being adversely affected. This process of choosing the numbers is referred to as tuning
the PID control system.
Within this process of tuning you can see that the three term control we have chosen to
focus on, can be reduced to two ,or even one, term simply by making the appropriate constants
zero (or just very small). So, what happens if we get these constants wrong. At best you will
have poor control of speed. The difference between target and actual speed may be quite
significant for long periods of time and there may be large delays between recognising a speed
difference and it being corrected. At worst you may suffer instability. Instability can create
wildly varying accelerator positions and speeds, quite capable of wrecking any car. Lets focus
on the more dangerous case of instability. What is it and how is it caused ?
In an ideal control system, any observed changes in the output will result in an instantaneous
adjustment to the control input using the calculated proportions of P,I and D. In the real world
there are always finite delays between observation and corrective action. If these delays
become significant then they alone can cause instability. Consider a garden swing. When
it comes towards you, you give it a push at the top of its travel in order to make it swing
higher. To slow down you apply your force somewhere nearer the lower point of the travel. In
other words, timing is crucial. In a control system applying the corrective response at the
wrong time can turn negative feedback into positive This in turn would reinforce the observed
variations making them bigger and bigger. Although timing is the most obvious and easy to
comprehend way in which a control system can end up having positive feedback and
instability ,it is by no means the only way. In general, it is possible for any feedback control
system to exhibit instability due to a particular combination of control constants, feedback
timing and input stimuli (changes in accelerator pedal).
So, where do you start in deciding the constants to apply ?. One empirical approach is to
start with just proportional control (i.e. I and D constants zero) and increase the P constant
until the system just starts to oscillate (i.e. continuously overshooting and undershooting the
target speed) then turn up the Integral constant until the oscillations stop. This should provide
smooth but relatively slow control of speed. Now turn up the derivative control until the
response is just fast enough to be acceptable for the given application. Using this technique
your control system will be fairly well tuned. About 90% of control systems in operation
around the world are fairly well tuned. The rigorous way accurate tuning is tackled is to
delve into the mathematics of transfer functions that describe the relationship of output to input
and find the poles of instability in these functions. For the moment this is beyond our current
scope. We can leave the topic of instability here with the following warnings..
1. Be aware that your control system can suddenly become unstable due to a particular
choice of PID constants
2. A stable control system with one set of input stimuli
may be unstable with others. (i.e. input range and
fluctuations)
Understanding: On/Off, Floating, Modulating/Proportional
Control
MARCH 2, 2010 BY BILL

First, to understand these types of control you must have the elements of control. The
elements of control are the sensor (senses the medium being controlled), the controller
(device either preset or programmed to react to the sensor), and the final controlled
device such as a damper or a control valve (receives input signals from controller to
affect change in controlled medium). These elements are considered the control loop.

On/Off control is the basic type of control in a control loop. With On/Off control, the
sensor senses the controlled medium and sends a signal back to the controller, which
processes the signal. For ease of understanding, our example will be a heating
application. The set point (the desired control point) in this case is 68 degrees with a
temperature differential of 2 degrees for the controller. When the sensors signal to the
controller reports a temperature of less than the controllers set point, the controller
sends a signal to the final control device (hot water valve) to position to fully open until
set point is achieved. When the controller receives a signal from the sensor that the set
point has been achieved, the controller then sends a signal to the valve to position to
fully closed. The problem with On/Off control is over-shoot temperature of the desired
system set point because of reaction time between sensor, controller, and final control
device. Review: With On/Off, the controller asks Is there an error? The controller
compares the actual value of the controlled medium to the set point through the sensor.
As the controlled medium deviates from set point, the controllers output cycles the final
controlled device on, and when the set point is reached the controllers output cycles the
final control device off.

Floating control is a variation of On/Off control that requires a fast responding sensor
and a slow-moving actuator connected to the final controlled device (valve or damper).
Using the same example as the On/Off example above, when the sensed temperature
drops below the set point of 68 degrees by the controlled mediums sensor, the
controller sends a signal to activate the actuator on the final control device. The actuator
starts to slowly drive open the hot water valve, increasing the heat in the controlled
medium. When set point is reached the actuator stops opening the final control device
(hot water valve) and tries to hold at set point. If set point starts to be over-shot, the
controller sends a signal to the actuator to start to drive close the valve. Review: Set
point control is achieved when the sensor signal (from the controlled medium) starts to
deviate from the controller set point. The controller sends a signal to the actuator of the
final control device (valve or damper) to slowly drive open. As the set point is
approached the controller sends a signal to the actuator, then the actuator stops and
tries to maintain set point. If set point is passed the controller sends signal to the
actuator to drive the final control device to a closed position.

Modulating/Proportional represents the higher end of control positioning. In


modulating/proportional control the output varies continuously and is not limited to being
fully open or fully closed. Proportional means that the size of the output is related to the
size of the error detected by the controller. The key phrase for modulating/proportional
control is Continuous Control Action. The sensor, controller, and final control device act
as one unit to maintain constant precise control over the controlled medium.
Continuing with the previous example, when a modulating system senses a deviation
from the set point of 68 degrees, the controller calculates the amount of the error (1
degree less than set point) and sends a signal to the actuator, which will drive open the
final control device (valve or damper) by a certain percentage of the controlled
mediums set point deviation (1/2 degree) to maintain set point without over-shoot. The
controller calculates how much the final control device needs to open without over-shoot
and will start reversing the actuator to close the final control device to a percentage of
the closed position to maintain set point.
Popular modulating control signals include 4-20 ma and 0-10 volts. If you were to look
into a control panel like a Hoffman Enclosure you might see controls like a Honeywell
UDC3200 that could be taking a 4-20 ma signal from a device like a Hawkeye 908
current transmitter and based on the control input signal from the Hawkeye 908 ( which
would most likely be a 4-20 ma signal) the UDC 3200 controller would respond with a 4-
20 ma output signal to a device like a Honeywell Variable Frequency Drive which would
control either a fan or a pump. This is an example of how a proportional signal like a 4-
20ma signal is used in modern HVAC controls.
If you are in Georgia or Florida,the control pros at Stromquist & Company can answer
your control questions.

--

==
Understand Control Signal Jargon
Posted on Mon,Oct 24, 2011 @ 10:00 AM

Tweet

"On/Off", "Open/closed", "3 Point", "Tri-state", 'proportional modulation", phase cut", "PWM" or "MFT" - what it
all means.

On/Off or Open-Close: The actuator is able to drive either to its full open position, or to its full closed
position. The same indication is used for spring return type actuators. Where the actuator will drive to its full
open position and spring return to its zero position. This can also be reversed.

3-point, Tri-State, Floating Point: The actuator has both clockwise (CW) and counter-clockwise (CCW)
control inputs. One drives the actuator to its open, the other to its close position. If there is no signal (Null point)
on either input the actuator simply stays in its last position.

Proportional Control: The actuator drives proportional to its control input and modulates throughout its angle
of rotation. This control type is usually a variation of VDC. Common values are:

0-10 VDC 2-10 VDC

It is common to also have a 0-20/4-20 mA output from a controller. This can be very easily converted to 0-10
VDC or 2-10 VDC with a 500 resistor.

Pulse Width Modulation (PWM): The actuator drives to a specified position according to a pulse duration, the
length of signal. The pulse can originate from a dry contact closure or a triac sink or source controller. An
example of PWM control:

Time base: 0 to 10 seconds


Output pulse: 5 seconds
Actuator position: 50%

Phasecut: An actuator drives depending on the power result of a remaining wave. This signal type cuts the
amplitude of the wave and the actuator recognizes this signal as a proportional movement.
Multi-Functional Technology (MFT): This technology was developed by Belimo for incorporation into our
damper and valve actuator. MFT provides the ability to program characteristics of the actuator. Some of the
key characteristics to change are:

CONTROL INPUT
selectable On/Off, VDC, PWM or Floating point

MOTION VALVES
selectable Running time adjustment

FEEDBACK
selectable feedback values

Belimo actuators are compatible with many control inputs and all direct digital control (DDC) systems. There
are many signals to select from with todays controllers.

You might also like