An integral controller has one very good quality. An integral controller
will normally ensure zero SSE in a control system - for step (constant)
inputs.
An integral controller
is not particularly difficult to implement.
In an analog system, an
integral control system integrates the error signal to generate the control
signal. If the error signal is a voltage, and the control signal
is also a voltage, then a proportional controller is just an analog integrator.
In a digital control system,
an integral control system computes the error from measured output and
user input to a program, and integrates the error using some standard integration
algorithm, then generates an output/control signal from that integration.
Goals
For This Lesson
Here's what you need to work toward in this lesson.
Given a system in which you want to use integral control,
Be
able to predict the effect of integral control on SSE.
Be
able to predict the effect of integral control on stability.
Be
able to predict the effect of integral control on speed of response.
Properties
Of Integral Controllers
Integral controllers have these properties.
The controller integrates
the error as shown in the block diagram of an example system below.
The integral controller
has a transfer function of K_{i}/s
So, the actuating signal
(the input to the system being controlled) is proportional to the integral
of the error.
We can examine some of the features of integral control using an integral
controller.
In an integral controller,
steady state error should be zero.
The system would have
to have a zero at the origin to make this claim false.
Of course, the closed
loop system has to be stable.
Integral control has a
tendency to make a system slower. We'll talk about why that happens
shortly.
If
we think about the root locus for a system with integral control we can
note the following.
The integral gain, K_{i},
is either the root locus gain, or the root locus gain is proportional to
K_{i}.
Integral
control has a tendency to make a system slower. Consider a typical
situation as shown below.
There's a pole at s =
0 from the integral controller.
There may be a real pole
from the system.
The root locus moves to
the left from the pole at the origin.
Click the green button
on the plot to see that.
You may want to do a complete
analysis of your system before you decide that integral control does give
you the response you want.
Finally,
we should note that integral control changes the order of the system, so
a second order system becomes a third order system when you use an integral
controller. An proportional controller, on the other hand, does not
increase the order of the system.
You also need to know how to implement an integral controller if you can
achieve system performance specifications with an integral controller.
Let's examine a few examples of systems with integral control. We'll
use these same example systems we used when we discussed proportional control.
We're going to make some standard assumptions about our systems.
First of all, in the prototype system configuration, we'll assume H(s)
= 1. In other words, we'll always have unity feedback. Here
is the system we will use.
The first example is a system with a single
pole. We assume that pole to be at s = -1. Here's the root
locus for that system after adding an integral controller.
There are now two closed
loop poles.
The closed loop poles
move together and coalesce at s = -0.5, then become complex, with a damping
ratio that becomes smaller for larger gain.
The system never goes
unstable - not for any gain.
We can also take a look at the frequency response
for this system.
As we increase the gain
(The plot is for Ki = 1) the phase margin gets smaller because the phase
for the entire system, including controller, starts at -90^{o},
and approaches -180^{o}, for high frequencies.
No matter how high the
gain gets, the phase margin is always positive.
The system never goes
unstable - not for any gain.
The
second example we will discuss is a system with two open loop poles.
Here's the root locus.
This is the root locus for the original system and is really the root locus
you would have using proportional control.
Open loop poles are at
-1 and -4. But, we need to add the pole due to the integral controller
at s = 0. Here is the root locus of the system with integral control
- adding a pole at s = 0.
As the gain increases,
the closed loop poles become imaginary, and eventually move into the RHP.
This
second example illustrates something that happens often with integral control.
Here's the root locus
again for the system with proportional control. There's a root locus
branch between the poles that splits for higher gains.
With integral control,
a pole is added at s = 0, and there is now a branch of the root locus between
the pole at s = 0 and the rightmost system pole.
There is now a pole constrained
between those two poles, and when those poles do break off the axis, they
tend to move toward the RHP.
The pole constrained between
0 and -1 is slower than any pole you would get using proportional control
for the original system. Using proportional control all poles lie
to the left of -1. Using integral control there is always a pole
to the right of -1, sometimes poles that are unstable.
It
is tempting to draw a conclusion, and that conclusion is often right.
Here it is.
Adding integral control
to a system may sacrifice speed of response, and even stability, for the
sake of zero SSE.
Integral control produces
a slower system because of the pole(s) constrained to the right of the
rightmost pole in the system.
It is up to the designer
to decide if that is an acceptable tradeoff.
It is not an acceptable
tradeoff to trade zero SSE for instability.
Now,
examine the Bode' plot for this system.
At high frequencies, the
phase approaches -270^{o}, when the phase of the integral
controller is included.
As the gain is increased,
the phase margin gets smaller and eventually becomes negative as the system
goes unstable.
From the examples, there are some interesting things to note.
Integral control is not
a cure-all.
It's best to look at the
situation in detail before drawing any conclusion.
You will need to examine
every other aspect of the system if you use integral control because stability,
speed of response and other performance measures will all be affected by
using integral control.
Implementing
Integral Control
Integral control in an analog system is often implemented with operational
amplifier circuits. The circuit below is an operational amplilfier
integrator that can be used to integrate a signal.
The integrating circuit produces an output
voltage given by this expression.
Clearly, this circuit can generate an output
voltage that is proportional to an error signal, V_{1} -
V_{2}, and used as a proportional controller, so that gives
us a way to implement integral control analog-fashion.
Integral control in a digital system is often implemented in code in some
programming language like C. That's the digital
version of integral control. To implement integral control you use
an approximation to the integral. An approximation that is widely
used and easy to implement approximates the integral using rectangular
areas as shown in the figure.
The integral computation is updated by adding
an area equal to the latest measurement multiplied by the sampling period
between measurements (the width of the rectangle in the plot above).
Here's a pseudo-code segment
that could implement an integral controller.
MeasuredOutput = MeasureVolts(instrument);
/Measure the output/
OutputVoltage(VoltsOut);
/Output the control signal/
This code assumes that
you have a function - MeasuredOutput - that will measure voltage using
an instrument connected to the computer, and can output a voltage with
a function - OutputVoltage - that uses another instrument connected to
the computer.
The
pseudo-code segment implements a particular integration algorithm - the
Euler Integration Algorithm - and other integration algorithms would have
different code and different Z-domain transfer functions.
If you want to predict the effect of an integrator on system performance,
you will need to have the transfer function for the intgrator. For
that, consider the difference equation that the integrator satisfies.
This
equation assumes that the error is measured/computed, and that the computation
for the integral of the error takes place quickly so that the D/A in the
system can produce the output quickly.
Take the transform of this difference equation to get:
ErrorInt[z]
= [1/z] ErrorInt[z] + DT*Error[z]
so:
ErrorInt[z]/Error[z]
= DT/(1 - 1/z) = (z DT)/(z - 1)
and, this system has a pole added at z = 1,
and a zero added at the origin of the z plane.
Let's reflect on the analog and digital implementations of integral controllers.
The analog controller
would have an integrator transfer function of 1/s.
The digital controller
would have an integrator transfer function of (z DT)/(z - 1).
There is a strong temptation
to consider s, in the analog/continuous domain, to be the equivalent of
(z - 1)/(z DT) in the digital/sampled domain.That conclusion would only
be true if the Euler integration algorithm were the integration algorithm.
We would get a different sampled transfer function if we used a different
integration algorithm (like trapezoidal integration, for example), but
we would probably still get one pole at z = 1.
Example
Problem
This
problem concerns the control of an internal combustion engine that is used
to rotate a load. That load is shown in the diagram below as the
plant. It's really a rotating load that is connected to the engine.
That engine is controlled by a controller, and the speed of rotation is
measured with a sensor.
When the motor starts to turn the load, it gradually increases in speed
and asymptotically approaches a steady state speed. We're going to
model the plant as a first order system to show that. The transfer
function model for the load is shown above.
The controller also is modelled with a single time constant. When
an error is applied to the controller, the engine torque does not change
instantaneously. We're going to model the controller with a similar
transfer function. That's next. However, the controller for
the motor needs a control signal computed by a PID unit. That's shown
in the block diagram above.
The transfer function model for the controller is shown below. Now
we have to model the sensor. We're going to use the same kind of
model again. When the speed changes, the sensor measurement doesn't
change instantaneously but rather approaches the steady state measurement
asymptotically with time-constant behavior. The transfer function
model for the sensor is incorporated in the block diagram below.
It is the same kind of model again. When the speed changes, the sensor
measurement doesn't change instantaneously but rather approaches the steady
state measurement asymptotically with time-constant behavior.
That completes our model of the system,
but now we need some numbers.
Here's the numbers we are going to use for this problem.
For the engine + load:
G_{L} =
1, t_{L}
= 2 sec.
For the controller:
G_{C} =
K_{I} (variable), t_{C}
= 1 sec.
For the sensor:
G_{S} =
1, t_{S}
= .2 sec.
We
have some questions.
Can the system operate
with 5% SSE for a constant input?
How quickly will the system
respond when we have 5% SSE?
How much overshoot does
the system exhibit when set for 5% SSE?
How sensitive is the system
to changes in the gain at 5% SSE?
We'll
try to go through these questions one-by-one to get some feel for what
we can make the system do.
You should find that there are difficulties controlling this system and
meeting the SSE specifications using proportional control. (Click
here to go to that solution.) Integral control should be able to
solve that problem by ensuring 0% SSE. However, to design the system
- particularly to choose a gain value for the integral control - will take
some analysis.
You have two options.
Do the analysis in the
time domain using root locus methods.
Do the analysis in the
frequency domain using Nyquist/Bode methods.
We'll
start by getting a root locus for the system with integral control.
That's shown below. There are a few points to note in the locus.
The two branches that
start at 0 and -0.5 come together and head toward the right half plane.
However, those two branches
stay in the left half plane for a while, giving pole locations that would
produce very stable responses.
The points noted above are the good points. There could be one problem
here.
The two branches that
start at 0 and -0.5 come together and head toward the right half plane
never go very far into the left half plane.
That might imply a slow
response. It looks as though all of the real parts are to the right
of s = -0.2 roughly.
That's a five second or
longer time constant in the response.
We need to examine the response of this system
in the time domain. What we can do is pick a gain and compute the
response for the system with the given gain. Here's a blow-up of
the root locus that shows some of the detail near the origin.
It looks like there is
a point on the negative real axis at s = -0.2 that gives poles that are
furthest into the left half plane.
At that point, the root
locus gain can be calculated from the product of pole distances, and is
given by:
K_{RL}
= .2x.3x.8x4.8 = .2304
In
order to do a simulation to calculate time response for this system, we
need to relate the root locus gain to the gain in the system.
for K_{RL}
= 0.23, 2.5K_{i} = 0.23, and K_{i}
= 0.23/2.5 = .092
Here
is the unit step response for the system with an integral controller (Ki
= .092). The response is just about what you expect.
There's no overshoot.
The response seems to
be within 5% in about 20 sec. With two poles at -0.2 that seems about
right.
There's no SSE.
For a unit step input, the output gets to exactly 1.
Is
there any thing wrong with this response?
The only visible problem
is that it is slow. It would be better if it were faster.
(On the other hand, maybe
you can always say that!)
We haven't looked at how
the response changes when the system changes,
Can we improve the system we have designed?
We ought to look at the system response for
other gain values. That could have an influence on system performance,
and it will give use some inkling of how sensitive the system is to changes
in parameters.
Here's the system response for a gain that is
twice as large as the gain (in blue) we used previously, shown with the
original gain.
This system has some overshoot,
and has a somewhat shorter settling time, so this is possibly an improvement
if the overshoot can be tolerated.
Here is the response of our system with a gain
half of the original gain shown with the original system.
This system takes considerably
longer to respond.
Clearly this system is
inferior to the original design.
Now, let's examine the system from a frequency domain viewpoint.
We'll start by getting a Bode' plot for the system with integral control.
That's shown below, drawn for K_{i} = 1. There are
a few points to note on this plot.
The -180^{o}
crossing occurs at a frequency a little below f = 0.1 Hz.
At f = 0.1 Hz, the magnitude
is just a few db below zero.
It's a stable system,
but just barely stable for this gain.
Earlier, in our root locus
analysis we used a particular value for the gain of the integral controller:
K_{i} =
.092
We
can adjust the gain of the system to get a better phase margin. Here
is a video that permits you to vary the gain and see the resulting phase
margin as well as the magnitude and phase plots.
Note the following in that plot.
The decibel scale is adjusted
so that phase and magnitude can apprear on the same plot. 200 on
the vertical scale is really 20 db!
Play the video to see how changing the gain
changes the phase margin. Now, let us adjust the gain so that we
get a reasonable system.
We will pick a phase margin arbitrarily, and
we will choose 60^{o}. We can design to that phase
margin and then check performance.
Now, select the gain to give the phase margin
of 60^{o}.
Now,
select the gain to give the phase margin of 60^{o}.
Before you continue, mark the gain.
Here is the computed step response for Ki
= 0.18
This response was with a sixty degree
phase margin. We could relax that somewhat. A higher gain would
give a lower phase margin, but we might expect a little faster response.
Still this compares reasonably favorably with the response obtained using
root locus methods.
We aren't going to pursue integral control beyond this point for this particular
system.
We have a clear idea of
what can be done with integral control.
We see the limits of what
we can do.
We have some sense of
what happens if the gain within the system changes - either the gain we
add, or a gain in the system.
If we need this accuracy
and we have to have faster response, we're going to have to do something
else.
The
End
That's it for this lesson. You're ready to apply what you know
in an integral control system.