Professional Documents
Culture Documents
Peter Grant
Chapter 1
Review of Classical Linear
Control
1.1
Introduction
Since students come with such varied control backgrounds, a brief review is
provided on control theory with particular emphasis on the tools that are
going to be needed for this course.
1.2
f(t)
Step 1. Find xc
Assume ert is a solution and substitute into the differential equation to get:
mr2 + cr + k ert = 0
|
{z
}
characteristic eqn
Find the roots of the characteristic equation (non-trival solution), in this case
there are two r1,2 ,
r1,2 =
c2 4km
2m
and if we define,
p
k/m
r
c2
=
4km
n =
(1.1)
(1.2)
p
2 1
1.2.1
F (s)
ms
| +{zcs + k}
2
characteristic eqn
and then we can solve for x(t) using the inverse Laplace transform,
F (s)
1
1
x(t) = L [X(s)] = L
ms2 + cs + k
and the inverse transform can be found using the heaviside expansion theorem
or inverse Laplace transform tables.
1.2.2
Transfer Function
We can capture the basic behavior of the system using the transfer function,
which is given by the Laplace transform of the the output divided by the
Laplace transform of the input (note: we assume quiescent initial conditions
once again)
G(s) =
X(s)
=
F (s)
1
ms
| +{zcs + k}
2
In actual fact the transfer function of a linear time invariant system is defined as the Laplace transform of the impulse response, g(t), with all initial
conditions zero. The impulse response is the output of the system when the
input is a unit-impulse function, (t). The Laplace transform of the impulse
is 1. The output of the system for any arbitrary input, u(t) can then be
found from the convolution of the input and the impulse response,
Z
y(t) =
g(t )u( )d
and for a causal system if the input u(t) = 0 for t < 0 then g(t ) = 0 for
> t since an output cannot start before an input and therefore the integral
can be simplified to:
Z
g(t )u( )d
y(t) =
0
The Laplace transform of the impulse response is then the transfer function,
G(s) = L [g(t)]
and the output for an arbitrary input is then,
Y (s) = G(s)U (s)
So a convolution in the time domain is equivalent to a simple multiplication
in the Laplace domain; this is one of the strengths of the Laplace transform.
So for the 2nd-order spring mass damper the transfer function is:
G(s) =
X(s)
1
= 2
F (s)
s + 2n s + n 2
More generally for an n-th order differential equation (we can always eliminate the coefficient in front of the highest derivative),
dn y(t)
dn1 y(t)
dm u(t)
dm1 u(t)
+
a
+
...
+
a
y(t)
=
b
+
b
... + b0 u(t)
n1
0
m
m1
dtn
dtn1
dtm
dtm1
t < 0,
t
u(t )g( )d
y(t) =
0
This equation holds for all t (including t ). Take the | | of both sides
Z t
|y(t)| = u(t )g( )d
0
Z
|y(t)| M
|g( )|d
0
Rt
0
g(t)est dt
(1.3)
taking the absolute value of both sides and using the Schwartz inequality,
Z
Z
st
|G(s)| =
g(t)e dt 6
|g(t)||est |dt
(1.4)
0
10
(1.5)
|g(t)||et |dt
0
now if the root was in the right hand plane ( = +ve) then |et | would
be bounded and there would be no way for this inequality to hold unless
R
|g(t)|dt is unbounded. But this violates our condition for stability there0
fore all must be in the left hand plane for BIBO stability.
If we factor Y(s) and U(s) we get,
G(s) =
bm (s + a1 )(s + a2 )...(s + am )
(s + b1 )(s + b2 )...(s + bn )
where:
zi = ai zero of G(s)
pi = bi pole of G(s)
For stability all the real parts of pi must be negative (hence ai must be
positive). For a minimum phase system the real parts of zi must also be
negative.
1.2.3
Frequency Response
If the input into a stable linear system is sinusoidal then the output will
approach a sinusoid (as t ) at the same frequency but generally with
11
i(t) = Rsin(t)
o(t) = Qsin(t + )
The magnitude response is given by the ratio of the amplitudes Q/R and
the phase is given by . The amplitude ratio and phase characteristics of a
linear system as a function of frequency is called the frequency response. For
a linear system the frequency response can be analytically determined from
the transfer function by replacing s by j,
12
Magnitude (dB)
10
0
10
20
30
Phase (deg)
40
0
45
90
135
180
1
10
10
Frequency (rad/sec)
10
Remember this plot only shows the steady-state response of a stable linear
system to a sinusoid, or using superposition, a sum of sinusoids. The amplitude ratio is often given in dBs which is given as 20 log10 (Q/R) and the
phase () is usually given in degrees. The frequency is usually plotted on a
log scale. When drawn in this way the transfer function of a pure integrator
(1/s) has a slope of -20db/decade and a double integrator (1/s2 ) has a slope
of -40dB/decade. This figure was created using the following MATLAB code:
%
% generate bode plot for class notes
%
13
set(0,DefaultTextFontSize,12);
set(0,DefaultAxesFontSize,12);
1.3
If we have some system (or plant), G(s), and we would like the output to
follow the input we can use feedback. So if we feedback the output and
subtract it from the input to generate an error signal, then the plant is feed
the error signal.
14
o
G(s)
H(s)
Examining the diagram we can see the following relationships between signals:
e = i oH(s)
(1.6)
o = eG(s)
(1.7)
o
G(s)
=
i
1 + G(s)H(s)
15
1
IR(s)
Power
Boost, K
Where,
R(s) = s2 + 2(v)n (v)s + n2 (v)
so we can find the ratio of the elevator angle to the column sensor,
K
(s)
=
(s)
IR(s)
Lets examine the response to a step input in column deflection 0 ,
(s) =
0
s
s0
0 K
sIR(s)
0 K
2
I(s + 2(v)n (v)s + n2 (v))
K0
In2 (v)
(1.8)
(1.9)
(1.10)
16
but since n varies with airspeed the control effectiveness varies with airspeed
as well! Now lets see what happens when we close the control loop around
the hydraulic power boost and elevator dynamics,
Column
Sensor
Power
Boost, K
1
IR(s)
K
=
IR(s) 1 +
K
IR(s)
=
K
IR(s) + K
s0
0 K
2
sI(s + 2(v)n (v)s + n2 (v)) + sK
0 K
2
In (v) +
(1.11)
(1.12)
1.3.1
17
Root Locus
The root locus is a useful technique for graphically analyzing the stability
of a closed loop system as the poles change with system parameters (usually
the feedback gain). So given the system,
o
G(s)
18
The closed-loop transfer function between the output and input is given by,
o
G(s)
=
i
1 + KG(s)
The closed loop poles (which determine the system stability) are given by,
1 + KG(s) = 0
(1.13)
G (s)
G (s)
(1.14)
19
for i = 0, 1, 2.., n m 1
where
s = + j
see the figure below,
20
Pm
p
i
i=1
i=1 zi
nm
and
i =
(2i + 1)
for i = 0, 1, 2, ...n m 1
{z
}
|
nm
n-m of these
n
X
i=1
X 1
1
=
b pi
zi
i=1 b
o
Ks
s2
s
s+1
21
1
3
i
poles: p1,2 =
2
2
(1.15)
(1.16)
Notice that the two poles are unstable (positive real parts). If we use rule 1
then we can start our diagram,
But from rule 2,since there are two open loop poles there must be two closed
loop poles,
s = 0 is one,
|s| is the other.
But how does it go to (in the s-plane this can be in any direction)? We
can use rule 4 to determine how. So the number of poles is 2 (n=2) and the
number of zeros is 1 (m=1) and from rule 4 we know,
i =
(2i + 1)
for
nm
i| =
{z 0}
n-m of these
22
Now lets find the breakaway point using rules 3 and 5 (two poles and one
zero so it is to the left of s = 0)
1
b ( 12 +
|
3
i)
2
b ( 12
{z
poles
3
i)
2
1
b
|{z}
zero
23
(1.17)
(1.18)
(1.19)
(1.20)
(1.21)
24
%
% ROOT LOCUS EXAMPLE
%
G = tf([1 0],[1 -1 1]);
rlocus(G);
axis([-2 1 -1.5 1.5]);
%grid; need to turn the grid on using Axis properties
Root Locus
1.5
Imaginary Axis
1
System: G
Gain: 0
Pole: 0.5 + 0.866i
Damping: 0.5
Overshoot (%): 613
Frequency (rad/sec): 1
0.5
0.5
System: G
Gain: 3
Pole: 0.999 0.0209i
Damping: 1
Overshoot (%): 0
Frequency (rad/sec): 1
1.5
2
1.5
0.5
Real Axis
0.5
But rlocus does not always work and you get a better understanding of what
the figure means if youve sketched a few yourself.
Nyquist Diagram
For the closed loop system shown below,
25
o
G(s)
H(s)
The closed loop system is stable if the roots of the characteristic equation
have negative real parts. Equivalently, the poles of the closed-loop transfer
function, or the zeros of the denominator,
1 + G(s)H(s)
of the closed-loop transfer function must lie in the left hand plane. The
Nyquist Stability Criterion determines the number of zeros of 1 + GH in the
right hand plane directly from a Nyquist Stability Plot of GH. Once the plot
is made the stability is determined as follows: The closed-loop control system
whose open-loop transfer function is G(s)H(s) is stable if and only if:
N = P0 0
where:
P0 number of poles of GH in RHP( 0)
(1.22)
26
So obviously we do not want any zeros in the right hand plane or the closedloop system is unstable (remember we are examining the denominator). The
traditional method of creating a Nyquist Stability Plot of GH is to plot the
contour of GH(s) as s is varied to cover the entire right hand plane. This is
done by running in a straight line along the imaginary axis from -i to i
(moving around any poles or zeros of GH on the imaginary axis since these
will cause GH to diverge) then going around an infinite semi-circle from 90
degrees to -90 degrees. This describes a closed contour that is traced in
a clockwise direction. The previously described properties of this contour
determine the closed loop stability. There is a more straightforward method
for determining the stability of minimum phase, proper systems, however.
Minimum Phase Systems A contour is plotted for the open-loop transfer function (GH) as s is varied from i0 to i (going around zeros or poles
on the imaginary axis). If the critical point (-1,0) is not enclosed then the
system is stable. Enclosed means the point is to the right of the trajectory
as we go from i0 to i.
Example:
i
o
G(s)
G(s) =
1
s(s + 2)(s + 10)
H(s) = K
(1.24)
(1.25)
27
K
s(s + 2)(s + 10)
set = 0
K
+ i(20 3 )
GH(i0) = 90 deg
GH(i0) = lim
0 12 2
(1.26)
(1.27)
set
GH(i) =
lim
12 2
K
+ i(20 3 )
(1.28)
(1.29)
GH(j) =
(1.30)
(1.31)
12K
= 0.004167K
GH(i 20) =
2880
And if we now look at the plot of the contour we get for K = 240 and K = 30,
28
Nyquist Diagram
0.5
0
0.5
K=240
Imaginary Axis
1
1.5
2
2.5
K=30
3
3.5
4
5
5
!=0
!=0
4.5
4.5
3.5
2.5
Real Axis
1.5
0.5
At K = 240 the contour passes through (-1,0) and the system is neutrally
stable. For K > 240 the point (-1,0) is enclosed and the system is unstable.
How close the contour comes to the (-1,0) point gives an indication of system
(in)stability. There are two measures for this:
Phase Margin - how much more pure phase lag could be added before the
(-1,0) point is just enclosed. This is usually expressed in degrees.
Gain Margin - how much pure gain can be added before the (-1,0) point is
just enclosed. This is often expressed in dB.
29
30
Nyquist diagrams can still be used to analyze the stability of closed loop
systems that have non-minimum phase open-loop transfer functions but the
procedure is a little different. To check for stability in a NMPS the (-1,0)
must not be enclosed and the angle traversed by the Nyquist plot around
(-1,0) as goes from 0 to must be equal to:
where:
Lets look at the elevator example again. In this case the open-loop transfer
function is,
GH(s) =
Ks
s2 s + 1
and for K = 0.9, K = 1.0, and K = 1.1 the Nyquist plot looks like,
31
Nyquist Diagram
0.8
K=0.9
K=1.0
K=1.1
0.6
Imaginary Axis
0.4
0.2
0.2
0.4
0.6
0.8
0.8
0.6
0.4
Real Axis
0.2
0.2
So when K > 1 then the circle will not enclose the critical point (-1,0). We
must also check the angle traversed,
PRH = 2
(1.32)
Pw = 0
(1.33)
= 2(180)
(1.34)
= 360
(1.35)
Examining the diagram we see that the contour traverses 360 degrees as
goes from 0 to . The following MATLAB code can be used to generate the
32
Nyquist diagram for this system. Note that the MATLAB Nyquist diagram
is generated as goes from - to by default, this is the same direction so
the enclosed area is still on the RHS. You can turn off the negative frequencies
using the Properties panel. If you plot the negative frequencies make sure
you dont include them in the angle traversed.
%
% Nyquist Non-minimum phase
%
G1 = 0.9*tf([1 0],[1 -1 1]);
G2 = 1.0*tf([1 0],[1 -1 1]);
G3 = 1.1*tf([1 0],[1 -1 1]);
Nyquist(G1,g-,G2,b-,G3,r-);
legend(K=0.9,K=1.0,K=1.1);
axis([-1.2 0.3 -0.8 0.8]);
One word of warning, MATLAB does not go around zeros and poles on
the imaginary axis. It will avoid them by picking frequencies that dont lie
right on the pole but depending on the exact nature of the problem this can
in effect make an erroneous Nyquist plot. This rarely effects the stability
analysis, however. If in doubt the way to be sure is simply to find the poles
of the closed loop system using the MATLAB function pole(G).
Magnitude and Phase Margin on Bode Plot
The Bode plot that was used to plot the frequency response of a system can
also be used to analyze the closed-loop stability of minimum phase systems.
33
The phase margin and gain margin previously determined for the Nyquist
diagram can also be determined from a Bode plot of the open-loop transfer
function. See the figure below for the measurement of Gain Margin, Phase
Margin, Gain Cross-over frequency and Phase Cross-over frequency.
20
Magnitude (dB)
10
Gain Margin
10
Gain Cross Over
20
30
0
Phase Margin
Phase (deg)
90
180
270
Phase Cross Over
360
450
1
10
10
10
Note that the Nyquist and Bode plots are plotting the same information but
in a different way. The Nyquist method allows the stability analysis of open
loop systems with zeros and poles in the RHP. If we look at the elevator
example open loop transfer function with a feedback gain of 1.1 on a Bode
plot we see,
34
Bode Diagram
5
Magnitude (dB)
0
5
10
15
20
180
Phase (deg)
225
270
315
360
405
1
10
10
Frequency (rad/sec)
10
and from this plot it looks unstable where in actual fact we know it is stable.
35
Nichols Chart
The final graphical technique we will examine is the Nichols chart. It is
essentially the magnitude phase plot with contours of closed loop gain added.
The contours of constant gain are calculated assuming a system with unity
feedback as shown below,
36
G(s)
1 + G(s)
|L(j)| = p
(1 + x)2 + y 2
If M |L(j)| then,
M
p
p
(1 + x)2 + y 2 = x2 + y 2
M
, y=0
1 M2
37
So constant closed loop gains form circles in complex plane. These could be
added directly to the Nyquist plot, by plotting the circle defined by the x
and y coordinates in the complex plane, but it is more useful to add these to
the magnitude phase plot to create the Nichols plot. The complex numbers
that describe the M-circles must be converted to magnitude and phase and
then they can be added to the magnitude and phase plot. An example is
shown below,
The smallest M contour that the system curve just touches (is tangent
to), determines the maximum closed-loop gain of the system, Mr .
38