SlideShare a Scribd company logo
Assist. Prof. Dr. Khalaf S. Gaeid
Electrical Engineering Department
Tikrit University
gaeidkhalaf@gmail.com
+9647703057076
Design of sampled data
control systems
Part2
1. Nyquist criterion
2.Poles, Zeros and Bode Plots
3. Compensator Design Using Bode Plot
4.Simulink Implementation
5.Using Matlab For Frequency Response
Contents
1. Nyquist criterion
The Nyquist criterion allows us to answer two questions:
1. Does the system have closed-loop poles outside the unit
circle?
2. If the answer to the first question is yes, how many closed-
loop poles are outside the unit circle?
We begin by considering the closed-loop characteristic
polynomial
where L(z) denotes the loop gain. We rewrite the
characteristic polynomial in terms of the numerator of the
loop gain NL and its denominator DL in the form
We observe that the zeros of the rational function are the
closed-loop poles, whereas its poles are the open-loop poles
of the system. We assume that we are
given the number of open-loop poles outside the unit circle,
and we denote this number by P.
The number of closed-loop poles outside the unit circle is
denoted
by Z and is unknown.
To determine Z, we use some simple results from complex
analysis. We first give the following definition.
DEFINITION : CONTOUR
A contour is a closed directed simple (does not cross itself)
curve.
An example of a contour is shown in Figure 1. In the figure,
shaded text denotes a vector. Recall that in the complex
plane the vector connecting any point a to a point z is the
vector (z- a). We can calculate the net angle change for the
term (z-a) as the point z traverses the contour in the shown
(clockwise) direction
by determining the net number of rotations of the
corresponding vector.
From Figure 1, we observe that the net rotation is one full
turn or 3600 for the point a1, which is inside the contour. The
net rotation is zero for the point a2, which is outside the
contour. If the point in question corresponds to a zero, then
the rotation gives a numerator angle; if it is a pole, we have a
denominator angle.
The net angle change for a rational function is the change in
the angle of the numerator minus the change in the angle of
the denominator. So for Figure 1,
we have one clockwise rotation because of a1 and no rotation
as a result of a2 for a net angle change of one clockwise
rotation. Angles are typically measured in the counter
clockwise direction. We therefore count clockwise rotations
as negative.
Fig.1. Closed contours(shaded letters denotes vectors)
The preceding discussion shows how to determine the
number of zeros of a rational function in a specific region;
given the number of poles, we perform the following steps:
1. Select a closed contour surrounding the region.
2. Compute the net angle change for the function as we
traverse the contour once.
3. The net angle change or number of rotations N is equal to
the number of zeros inside the contour Z minus the angle of
poles inside the contour P. Calculate the number of zeros as
Z =N +P
To use this to determine closed-loop stability, we need to
select a contour that encircles the outside of the unit circle.
The contour is shown in Figure2. The smaller circle is the unit
circle, whereas the large circle is selected with a large radius
so as to enclose all poles and zeros of the functions of
interest.
The value of the loop gain on the unit circle is L(ejωT), which is
the frequency response of the discrete-time system for
angles ωT in the interval [2π,π].
The values obtained for negative frequencies L(e-j|ωT|) are
simply the complex conjugate of the values L(ej|ωT|) and need
not be separately calculated. Because the order of the
numerator is equal to that of the denominator or less, points
on the large circle map to zero or to a single constant value.
Because the value ε is infinitesimal, the values on the
straight-line portions close to the real axis cancel.
We can simplify the test by plotting L(ejωT) as we traverse
the contour and then counting its encirclements of the point
(-1+j 0). As Figure 3 shows, this is equivalent to plotting pcl(z)
and counting encirclements of the origin.
Fig.2. contour for stability determination
Fig.3. Nyquist plots of L and 1+L
If the system has open-loop poles on the unit circle, the
contour passes through poles and the test fails. To avoid
this, we modify the contour to avoid these open-loop poles.
The most common case is a pole at unity for which the
modified contour is shown in Figure 4. The contour includes
an additional circular arc of infinitesimal radius. Because the
portions on the positive real
Fig.4. Modified contour for stability determination
Fig.5. simplification of the modified contour for stability determination with(1,0) shown
in gray
axis cancel, the contour effectively reduces to the one shown
in Figure 5. For m poles at unity, the loop gain is given by
where NL and D have no unity roots. The value of the transfer
function on the circular arc is approximately given by
where K is equal to NL(1)/D(1) and (z-1)=εejq, with ε the radius
of the small circular arc. Therefore, the small circle maps to a
large circle, and traversing the
small circle once causes a net denominator angle change of
2mπ radians (clockwise) (i.e., m half circles). The net angle
change for the quotient on traversing the small circular arc is
thus mp radians (counter clockwise). We conclude that for a
type m system, the Nyquist contour will include m large
clockwise semicircles.
We now summarize the results obtained in Theorem 1.THEOREM 1: NYQUIST CRITERION
Let the number of counter clockwise encirclements of the
point (-1, 0) for a loop gain L(z) when traversing the stability
contour be N (i.e.,-N for clockwise encirclements), where L(z)
has P open-loop poles inside the contour. Then the system
has Z closed-loop poles outside the unit circle with Z given
by
Z =-(-N)+P
EXAMPLE 1
For the system of furnace G(s)=1/s2 +3s+1
Determine the closed-loop stability of the system with digital
control and a sampling period of 0.01.
The Nyquist plot of the system is shown in Figure6. The plot
shows that the Nyquist plot does not encircle the point (-1,
0)—that is, N=0. Because the open-loop transfer function has
no RHP poles (P=0), the system is closed-loop stable (Z=0).
Note that there is a free path to the point (-1, 0) without
crossing any lines of the plot because there are no
encirclements.
Fig.6. Nyquist plot of the furnace TF
The Nyquist plot of the system is shown in Figure6. The plot
shows that the Nyquist plot does not encircle the point (-1,
0)—that is, N=0. Because the open-loop transfer function has
no RHP poles (P=0), the system is closed-loop stable (Z=0).
Note that there is a free path to the point (-1, 0) without
crossing any lines of the plot because there are no
encirclements.
EXAMPLE 2
Determine the closed-loop stability of the digital control
system for the furnace model of Example1 with a discrete-
time first-order actuator of the form and a sampling period of
0.01. If an amplifier of gain K=5 is added to the actuator, how
does the value of the gain affect closed-loop stability?
Solution
We use MATLAB to obtain the z-transfer function of the plant
and actuator:
The Nyquist plot for the system, Figure7, is obtained with no
additional gain and then for a gain K=5. We also show the
plot in the vicinity of the point (-1, 0) in Figure8, from which
we see that the system with K=5 encircles the point twice
clockwise.
Fig.7.Nyquist plot for the furnace and actuator(k=1, black, k=5,gray)
Fig.8. Nyquist plot for the furnace and actuator in the vicinity of the point(-1,0)(k=1, black,
k=5,gray)
We count the encirclements by starting away from the point (-
1, 0) and counting the lines crossed as we approach it. We
cross the gray curve twice, and at each crossing the arrow
indicates that the line is moving from our right to our left (i.e.,
two clockwise encirclements). The system is unstable, and
the number of closed-loop poles outside the unit circle is
given by
Z =(-N)+P
=2+0
For the original gain of unity, the intercept with the real axis is
at a magnitude of approximately 0.28 and can be increased
by a factor of about 3.5 before the system becomes unstable.
At a magnitude of unity, the phase is about 38 less negative
than the
instability value of (-180). We therefore have a gain margin of
about 3.5 and a phase margin of about 38. Using MATLAB, we
find approximately the same values for the margins:
[gm,pm]=margin(gtd)
Gm=3.4817
Pm=37.5426
The Nyquist plot of a transfer function, usually the loop
transfer function GH(z), is a mapping of Nyquist contour in z-
plane onto GH(z) plane which is in polar coordinates. Thus it
is sometimes known as polar plot.
Absolute and relative stabilities can be determined from the
Nyquist plot using Nyquist stability criterion.
Given the loop transfer function GH(z)of a digital control
system, the polar plot of GH(z) is obtained by setting z = e jωT
and varying ω from 0 to ∞.
Before discussing Nyquist stability criterion for the digital
system, following steps are necessary.
1. Defining the Nyquist path in the z-plane that encloses
the exterior of the unit circle. Here the region to the left of a
closed path is considered to be enclosed by that path when
the direction of the path is taken anticlockwise.
2. Mapping the Nyquist path in z -plane onto the GH(z)
plane which results in Nyquist plot of GH(z).
3. Stability of the closed loop system is investigated by
studying the behavior of Nyquist plot with respect to the
critical point (-1, j0) in the GH(z) plane.
Now let us denote the angle traversed by the phasor drawn
from (-1, j0) point to the Nyquist plot of GH(z) as ω varies
from ωs/2 to 0 , on the unit circle of z1 excluding the small
indentations.
It can be shown that
φ= (Z_1 - P_1 - 0.5P_0 )180^0
(1)
For the closed loop digital control system to be stable, Z-1
should be equal to zero. Thus the Nyquist criterion for
stability of the closed loop digital control systems is
φ= (P_1 + 0.5P_0 )180^0
2)
Hence, we can conclude that for the closed loop digital
control system to be stable, the angle, traversed by the
phasor drawn to the GH(z) plot from (-1, j0) point as ω varies
from ωs/2 to 0, must satisfy equation (2).
Example 1: Consider a digital control system for which the
loop transfer function is given as
GH(z) = 0.095Kz/(z - 1)(z - 0.9)
where K is a gain parameter. The sampling time T = 0.1 sec.
Since GH(z) has one pole on the unit circle and does not have
any pole outside the unit circle, P-1 = 0 and P0 = 1
Nyquist path has a small indentation at z =1 on the unit circle.
The Nyquist plot is shown in Figure 9.
Figure 9: Nyquist plot for Example 1
Nyquist plot of GH(z), as shown in Figure 9, intersects the
negative real axis at -0.025K when ω= ωs /2 = 31.4rad/sec.
φ can be computed as
φ = - (0 + 0.5 * 1)180^0=-90^0
It can be seen from Figure 3 that for φ to be -90°, (-1, j 0) point
should be located at the left of -0.025K point. Thus for
stability
- 1 < - 0.025K
K < 40
If K > 40, (-1, j 0) will be at the right of -0.025Kpoint, hence
making φ =90^o.
If φ =90^o, we get from (1)
Z_1= φ /180^o+0+0.5=1
Thus for K > 40, one of the closed loop poles will be outside
the unit circle.
If K is negative we can still use the same Nyquist plot but
refer (+1, j0 ) point as the critical point. φ in this case still
equals +90° and the system is unstable. Hence the stable
range of K is 0 ≤ K < 40
HW.
Determine the closed-loop stability of the digital control
system for the position control system with analogue transfer
function
G(s)=10/s(s+1)
and with a sampling period of 0.01. If the system is stable,
determine the gain margin and the phase margin.
2.Poles, Zeros and Bode Plots
Considering the transfer function of the previous slide. We
note that we have 4 different types of terms in the previous
general form:
These are:
)1/(,
)1/(
1
,
1
, 

zs
pss
KB
Expressing in dB:
Given the transfer function:
)1/)((
)1/(
)(



pjwjw
zjwK
jwG B
|1/|log20||log20|)1/(|log20log20|(|log20  pjwjwzjwKjwG B
We have 4 distinct terms to consider:
20log KB
20log|(jw/z +1)|
-20log|jw|
-20log|(jw/p + 1)|
wlg
The gain term, 20logKB, is just so many dB and this is a
straight line on Bode paper, independent of omega (radian
frequency). The term, - 20log|jw| = - 20logw, when plotted on
semi-log paper is a straight line sloping at -20dB/decade. It
has a magnitude of 0 at w = 1.
0
20
-20 =1
-20db/dec
The term, - 20log|(jw/p + 1), is drawn with the following
approximation: If w < p we use the approximation that –
20log|(jw/p + 1 )| = 0 dB,a flat line on the Bode. If w > p we
use the approximation of –20log(w/p), which slopes at -
20dB/dec starting at w = p. Illustrated below.
It is easy to show that the plot has an error of -3dB at w = p
and – 1 dB at w = p/2 and w = 2p. One can easily make these
corrections if it is appropriate.
0
2
0
-20
-40
 = p
-20db/dec
0
20
-20
-40
 = z
+20db/dec
When we have a term of 20log|(jw/z + 1)| we approximate it
be a straight line of slop 0 dB/dec when w < z. We
approximate it as 20log(w/z) when w > z, which is a straight
line on Bode paper with a slope of + 20dB/dec. Illustrated
below.
Example 1:
50,000( 10)
( )
( 1)( 500)
jw
G jw
jw jw


 
First: Always get the poles and zeros in a form such that the
constants are associated with the jw terms. In the above
example we do this by factoring out the 10 in the numerator
and the 500 in the denominator.
50,000 10( /10 1) 100( /10 1)
( )
500( 1)( / 500 1) ( 1)( / 500 1)
x jw jw
G jw
jw jw jw jw
 
 
   
Second:
When you have neither poles nor zeros at 0, start the Bode at
20log10K =20log10100 = 40 dB in this case.
Example 1:
Third: Observe the order in which the poles and zeros
occur.
This is the secret of being able to quickly sketch the Bode.
In this example we first have a pole occurring at 1
which causes the Bode to break at 1 and slope – 20 dB/dec.
Next, we see a zero occurs at 10 and this causes a
slope of +20 dB/dec which cancels out the – 20 dB/dec,
resulting in a flat line ( 0 db/dec). Finally, we have a
pole that occurs at w = 500 which causes the Bode to slope
down at – 20 dB/dec.
1 1 1 1 1 1
 (rad/sec)
dB Mag Phase (deg)
1 1 1 1 1 1
 (rad/sec)
dB Mag Phase (deg)
BODE PLOT MAGNITUDE FOR 100(1 + JW/10)/(1 + JW/1)(1 + JW/500)
0
20
40
-20
-60
60
-60
0.1 1 10 100 1000 10000
2.Phase for Bode Plots
Generally, the phase for a Bode plot is not as easy to draw or
approximate as the magnitude. In this course we will use an
analytical method for determining the phase if we want to
make a sketch of the phase.
Consider the transfer function of the previous example. We
express the angle as follows:
)500/(tan)1/(tan)10/(tan)( 111
wwwjwG 

We are essentially taking the angle of each pole and zero.
Each of these are expressed as the tan-1(j part/real part)
Usually, about 10 to 15 calculations are sufficient to
determine a good idea of what is happening to the phase.
2.Bode Plots
Ex2: Given the transfer function. Plot the Bode magnitude.
2
)100/1(
)10/1(100
)(
ss
s
sG



Consider first only the two terms of
jw
100
Which, when expressed in dB, are; 20log100 – 20 logw. This
is plotted below.
1
0
20
40
-20
The is
a tentative line we use
until we encounter the
first pole(s) or zero(s)
not at the origin.
-20db/dec
dB
 (rad/sec)
1 1 1 1 1 1
 (rad/sec)
dB Mag Phase (deg)
0
20
40
60
-20
-40
-60
1 10 100 10000.1
2
)100/1(
)10/1(100
)(
ss
s
sG



 (rad/sec)
dB Mag Phase (deg)
0
20
40
60
-20
-40
-60
1 10 100 10000.1
2.Bode Plots
-20db/dec
-40 db/dec
2
)100/1(
)10/1(100
)(
ss
s
sG



The completed plot is shown below.
1 1 1 1 1 1
 (rad/sec)
dB Mag
Example 3:
3
3 2
80(1 )
( )
( ) (1 / 20)
jw
G s
jw jw



10.1 10 100
40
20
0
60
-20 .
20log80 = 38 dB
-60 dB/dec
-40 dB/dec
1 1 1 1 1 1
 (rad/sec)
dB Mag Phase (deg)
0
20
40
60
-20
-40
-60
1 10 100 10000.1
-40 dB/dec
+ 20 dB/dec
Sort of a low
pass filter
Example 4:
2
2
10(1 / 2)
( )
(1 0.025 )(1 / 500)
jw
G jw
j w jw


 
1 1 1 1 1 1
 (rad/sec)
dB Mag Phase (deg)
0
20
40
60
-20
-40
-60
1 10 100 10000.1
22
22
)1700/1()2/1(
)100/1()30/1(
)(
jwjw
jwjw
jwG



-40 dB/dec
+ 40 dB/dec
Sort of a low
pass filter
Example 5
)11.0()(
)101.0)(1(64
)10()(
)101.0)(1(640
)( 22






jwjw
jwjw
jwjw
jwjw
jwH
0.01 0.1 1 10 100 1000
0
20
40
-20
-40
dB mag
.
.
.
.
.
-40dB/dec
-20db/dec
-40dB/dec
-20dB/dec
Example 6
Design a G(s) that has the following Bode plot.
dB mag
 rad/sec
0
20
40
0.1 1 10 100 1000
30 900
30 dB
+40 dB/dec
-40dB/dec
? ?
Example 7
One of the advantages of the Bode plot in s-domain is that
the magnitude curve can be approximated by straight lines
which allows the sketching of the magnitude plot without
exact computation. This feature is lost when we plot Bode
diagram in z-domain.
To incorporate this feature we use bi-linear transformation to
transform unit circle of the z-plane into the imaginary axis of
another complex plane, w plane, where
From the power series expansion
domain analysis the above bi-linear transformation may be
used to convert GH(z) to GH(w) and then construct the Bode
plot.
Example 1: Let us consider a digital control system for which
the loop transfer function is given by
where sampling time T = 0.1 sec. Putting , we get the transfer
function in w plane as
where is the frequency in w plane. Corner frequencies are 1/1.0026 = 0.997
rad/sec and 1/0.05 = 20 rad/sec.
The straight line asymptotes of the Bode plot can be drawn
using the following.
• Up to ωw= 0.997 rad/sec, the magnitude plot is a straight
line with slope - 20 dB/decade.At ωw= 0.01 rad/sec,the
magnitude is
• From ωw= 0.997 rad/sec to ωw= 20 rad/sec, the
magnitude plot is a straight line with slope - 20 - 20 = - 40
dB/decade.
• Since both of the zeros will contribute same to the
magnitude plot, after ωw= 20 rad/sec, the slope of the
straight line will be - 40 + 20 + 20 = 0 dB/decade.
The asymptotic magnitude plot is shown in Figure 10.
Figure 10. Bode asymptotic magnitude plot for Example
1
One should remember that the actual plot will be slightly
different from the asymptotic plot. In the actual plot, errors
due to straight line assumptions is compensated.
Phase plot is drawn by varying the frequency from 0.01 to 100
rad/sec at regular intervals. The phase angle contributed by
one zero will be canceled by the other. Thus the phase will
vary from
- 90° (270°) to - 180° (180°).
Gain margin and Phase margin
Gain margin and phase margins are the measures of relative
stability of a system.
Similar to continuous time case, we have to first define phase
and gain cross over frequencies before defining gain margin
and phase margin.
Gain margin is the safety factor by which the open loop gain
of a system can be increased before the system becomes
unstable. It is measured as
where ωp is the phase crossover frequency which is defined
as the frequency where the phase of the loop transfer
function is 180°.
Similarly Phase margin (PM) is defined as
where ωg is the gain crossover frequency which is defined as
the frequency where the loop gain magnitude of the system
becomes one.
3. Compensator Design Using Bode Plot
In this lecture we would revisit the continuous time design
techniques using frequency domain since these can be
directly applied to design for digital control system by
transferring the loop transfer function in z-plane to w-plane.
Phase lead compensator
If we look at the frequency response of a simple PD
controller, it is evident that the magnitude of the compensator
continuously grows with the increase in frequency.
The above feature is undesirable because it amplifies high
frequency noise that is typically present in any real system.
In lead compensator, a first order pole is added to the
denominator of the PD controller at frequencies well higher
than the corner frequency of the PD controller.
A typical lead compensator has the following transfer
function.
is the ratio between the pole zero break point (corner)
frequencies.
Magnitude of the lead compensator is And the
phase contributed by the lead compensator is given by
Thus a significant amount of phase is still provided with
much less amplitude at high frequencies.
The frequency response of a typical lead compensator is
shown in Figure 11 where the magnitude varies from
to and maximum phase is always less than 90°
(around 60° in general).
Figure 11: Frequency response of a lead compensator
Example 1: Consider the following system
Design a cascade lead compensator so that the phase margin
(PM) is at least 45° and steady state error for a unit ramp
input is ≤ 0.1 . The lead compensator is
Steady state error for unit ramp input is
M of the closed loop system should be 45°. Let the gain
crossover frequency of the uncompensated system with K
be ωg .
phase angle at ωg = 3.1 is -90 - tan -1 3.1 = - 162° . Thus the PM of the
uncompensated system with K is 18°.
If it was possible to add a phase without altering the magnitude, the additional
phase lead required to maintain PM= 45° is 45° - 18° = 27° at ωg = 3.1 rad/sec.
However, maintaining same low frequency gain and adding a compensator would
increase the crossover frequency. As a result of this, the actual phase margin will
deviate from the designed one. Thus it is safe to add a safety margin of ε to the
required phase lead so that if it devaites also, still the phase requirement is met.
In general ε is chosen between 5° to 15°.
So the additional phase requirement is 27° + 10° = 37° , The lead part of the
compensator will provide this additional phase at ωmax .
the only parameter left to be designed is τ. To find τ, one
should locate the frequency at which the uncompensated
system has a logarithmic magnitude of
Select this frequency as the new gain crossover frequency
since the compensator provides a gain at ωmax.
in this case ωmax = ωg new = 4.41 . Thus
The lead compensator is thus
With this compensator actual phase margin of the system becomes 49.6° which
meets the design criteria.
Figure 12: Bode plot of the compensated system for
Example 1
Lag Compensator Design
In the previous lecture we discussed lead compensator
design. In this lecture we would see how to design a phase
lag compensator
Phase lag compensator
The essential feature of a lag compensator is to provide an
increased low frequency gain, thus decreasing the steady
state error, without changing the transient response
significantly.
For frequency response design it is convenient to use the
following transfer function of a lag compensator.
he above expression is only the lag part of the compensator.
The overall compensator is
Typical objective of lag compensator design is to provide an
additional gain of α in the low frequency region and to leave
the system with sufficient phase margin.
The frequency response of a lag compensator, with α=4 and
τ=3, is shown in Figure 13 where the magnitude varies from
dB to 0 dB.
Figure 13: Frequency response of a lag compensator
Since the lag compensator provides the maximum lag near
the two corner frequencies, to maintain the PM of the system,
zero of the compensator should be chosen such that ω = 1/ τ
is much lower than the gain crossover frequency of the
uncompensated system.
In general, τ is designed such that 1/ τ is at least one decade
below the gain crossover frequency of the uncompensated
system. Following example will be comprehensive to
understand the design procedure.
Example 1: Consider the following system
Design a lag compensator so that the phase margin (PM) is at
least 50° and steady state error to a unit step input is ≤ 0.1.
The overall compensator is
Steady state error for unit step input is
Now let us modify the system transfer function by
introducing K with the original system. Thus the modified
system becomes
PM of the closed loop system should be 50°. Let the
gain crossover frequency of the uncompensated
system with K be ωg .
Required PM is 50°. Since the PM is achieved only by
selecting K, it might be deviated from this value when the
other parameters are also designed. Thus we put a safety
margin of 5° to the PM which makes the required PM to be
55°.
To make ωg = 2.8 rad/sec, the gain crossover frequency of
the modified system, magnitude at ωg should be 1. Thus
Putting the value of ωg in the last equation, we get K = 5.1.
Thus,
The only parameter left to be designed is τ.
Since the desired PM is already achieved with gain K, We
should place ω = 1/ τ such that it does not much effect the PM
of the modified system with K. If we place 1/ τ one decade
below the gain crossover frequency, then
The overall compensator is
With this compensator actual phase margin of the system
becomes 52.7°, as shown in Figure 14, which meets the
design criteria.
Figure 14: Bode plot of the compensated system for Example
1
4. Using Matlab For Frequency Response
We can use Matlab to run the frequency response for the
previous example. We place the transfer function in the form:
]500501[
]500005000[
)500)(1(
)10(5000
2





ss
s
ss
s
The Matlab Program
num = [5000 50000];
den = [1 501 500];
Bode (num,den)
In the following slide, the resulting magnitude and phase
plots (exact) are shown in light color (blue). The approximate
plot for the magnitude (Bode) is shown in heavy lines (red).
We see the 3 dB errors at the corner frequencies.
Frequency (rad/sec)
Phase(deg);Magnitude(dB)
Bode Diagrams
-10
0
10
20
30
40
From: U(1)
10
-1
10
0
10
1
10
2
10
3
10
4
-100
-80
-60
-40
-20
0
To:Y(1)
1 10 100 500
)500/1)(1(
)10/1(100
)(
jwjw
jw
jwG


Bode for:
5. Matlab (Simulink)
Model:
Filter Output at  = 5.3 rad/sec
Produced from Matlab Simulink
Filter Output at  = 70 rad/sec
Produced from Matlab Simulink
Thanks

More Related Content

PDF
Unipolar Encoding Techniques: NRZ & RZ
PPTX
time response analysis
PPTX
Time response analysis
PPTX
Convolutional codes
PPTX
Stability of Control System
PPT
Stabiltiy & R-H Ccriterion
PDF
Modern Control - Lec07 - State Space Modeling of LTI Systems
PPTX
Tcp udp
Unipolar Encoding Techniques: NRZ & RZ
time response analysis
Time response analysis
Convolutional codes
Stability of Control System
Stabiltiy & R-H Ccriterion
Modern Control - Lec07 - State Space Modeling of LTI Systems
Tcp udp

What's hot (20)

PPTX
Satellite error detection and correction presentation
PPTX
Transient response analysis
PPSX
PPT
First & second order of the control systems
PPT
Digital Communication: Information Theory
PPTX
Digital filter structures
PPTX
Lti and z transform
PPT
decoder and encoder
PDF
solution manual of goldsmith wireless communication
PPTX
carrier synchronization
PPTX
Impulse Response ppt
PDF
quantization
PPT
Source coding
PPTX
state space representation,State Space Model Controllability and Observabilit...
PPTX
3. Concept of pole and zero.pptx
PPTX
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
PPT
Analog communication
PDF
Chapter4 - The Continuous-Time Fourier Transform
PPTX
Transformations (complex variable & numerical method)
Satellite error detection and correction presentation
Transient response analysis
First & second order of the control systems
Digital Communication: Information Theory
Digital filter structures
Lti and z transform
decoder and encoder
solution manual of goldsmith wireless communication
carrier synchronization
Impulse Response ppt
quantization
Source coding
state space representation,State Space Model Controllability and Observabilit...
3. Concept of pole and zero.pptx
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
Analog communication
Chapter4 - The Continuous-Time Fourier Transform
Transformations (complex variable & numerical method)
Ad

Similar to Design of sampled data control systems part 2. 6th lecture (20)

PPT
7-2.Nyquist Stability Criterion.ppt
PDF
Notes nyquist plot and stability criteria
PDF
NYQUIST_PLOTS.pdf
PDF
Nyquist Stability Criterion
PPTX
14b_nyquist_stability_criterion(11).pptx
PPTX
Nyquist and polar plot 118 &amp; 117
PPTX
CONTROL SYSTEM PPT ON DETERMINATION OF SABILITY OF SYSTEM USING NYQUIST PLOT ...
PPT
Nyquist Stability Criterion method of Control Systems
PPTX
lecture9-nyquist_plot.pptx
PPT
555328898-Unit-4-1-PPT-CS.ppt introduction
PDF
Nyquist plot
PPT
frequency responce.ppt
PPT
rahul.ppt
PDF
Nyquist stability criterion
PPTX
pc-lec4.1.pptx pid controller presentation
PPT
Contro system frequency response analysis
PPTX
PRoy_presentation on Nyquist stability criterion
PPTX
ANALYZE THE STABILITY OF DC SERVO MOTOR USING NYQUIST PLOT
PPTX
nyquist.pptx
PPT
1619494.ppt
7-2.Nyquist Stability Criterion.ppt
Notes nyquist plot and stability criteria
NYQUIST_PLOTS.pdf
Nyquist Stability Criterion
14b_nyquist_stability_criterion(11).pptx
Nyquist and polar plot 118 &amp; 117
CONTROL SYSTEM PPT ON DETERMINATION OF SABILITY OF SYSTEM USING NYQUIST PLOT ...
Nyquist Stability Criterion method of Control Systems
lecture9-nyquist_plot.pptx
555328898-Unit-4-1-PPT-CS.ppt introduction
Nyquist plot
frequency responce.ppt
rahul.ppt
Nyquist stability criterion
pc-lec4.1.pptx pid controller presentation
Contro system frequency response analysis
PRoy_presentation on Nyquist stability criterion
ANALYZE THE STABILITY OF DC SERVO MOTOR USING NYQUIST PLOT
nyquist.pptx
1619494.ppt
Ad

Recently uploaded (20)

PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
Digital Logic Computer Design lecture notes
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPT
Project quality management in manufacturing
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
additive manufacturing of ss316l using mig welding
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
PPT on Performance Review to get promotions
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Sustainable Sites - Green Building Construction
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Welding lecture in detail for understanding
Automation-in-Manufacturing-Chapter-Introduction.pdf
Digital Logic Computer Design lecture notes
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Lecture Notes Electrical Wiring System Components
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
CH1 Production IntroductoryConcepts.pptx
Embodied AI: Ushering in the Next Era of Intelligent Systems
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Project quality management in manufacturing
bas. eng. economics group 4 presentation 1.pptx
additive manufacturing of ss316l using mig welding
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPT on Performance Review to get promotions
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Sustainable Sites - Green Building Construction
OOP with Java - Java Introduction (Basics)
Welding lecture in detail for understanding

Design of sampled data control systems part 2. 6th lecture

  • 1. Assist. Prof. Dr. Khalaf S. Gaeid Electrical Engineering Department Tikrit University gaeidkhalaf@gmail.com +9647703057076 Design of sampled data control systems Part2
  • 2. 1. Nyquist criterion 2.Poles, Zeros and Bode Plots 3. Compensator Design Using Bode Plot 4.Simulink Implementation 5.Using Matlab For Frequency Response Contents
  • 3. 1. Nyquist criterion The Nyquist criterion allows us to answer two questions: 1. Does the system have closed-loop poles outside the unit circle? 2. If the answer to the first question is yes, how many closed- loop poles are outside the unit circle? We begin by considering the closed-loop characteristic polynomial where L(z) denotes the loop gain. We rewrite the characteristic polynomial in terms of the numerator of the loop gain NL and its denominator DL in the form
  • 4. We observe that the zeros of the rational function are the closed-loop poles, whereas its poles are the open-loop poles of the system. We assume that we are given the number of open-loop poles outside the unit circle, and we denote this number by P. The number of closed-loop poles outside the unit circle is denoted by Z and is unknown. To determine Z, we use some simple results from complex analysis. We first give the following definition. DEFINITION : CONTOUR A contour is a closed directed simple (does not cross itself) curve.
  • 5. An example of a contour is shown in Figure 1. In the figure, shaded text denotes a vector. Recall that in the complex plane the vector connecting any point a to a point z is the vector (z- a). We can calculate the net angle change for the term (z-a) as the point z traverses the contour in the shown (clockwise) direction by determining the net number of rotations of the corresponding vector. From Figure 1, we observe that the net rotation is one full turn or 3600 for the point a1, which is inside the contour. The net rotation is zero for the point a2, which is outside the contour. If the point in question corresponds to a zero, then
  • 6. the rotation gives a numerator angle; if it is a pole, we have a denominator angle. The net angle change for a rational function is the change in the angle of the numerator minus the change in the angle of the denominator. So for Figure 1, we have one clockwise rotation because of a1 and no rotation as a result of a2 for a net angle change of one clockwise rotation. Angles are typically measured in the counter clockwise direction. We therefore count clockwise rotations as negative. Fig.1. Closed contours(shaded letters denotes vectors)
  • 7. The preceding discussion shows how to determine the number of zeros of a rational function in a specific region; given the number of poles, we perform the following steps: 1. Select a closed contour surrounding the region. 2. Compute the net angle change for the function as we traverse the contour once. 3. The net angle change or number of rotations N is equal to the number of zeros inside the contour Z minus the angle of poles inside the contour P. Calculate the number of zeros as Z =N +P To use this to determine closed-loop stability, we need to select a contour that encircles the outside of the unit circle. The contour is shown in Figure2. The smaller circle is the unit circle, whereas the large circle is selected with a large radius so as to enclose all poles and zeros of the functions of interest.
  • 8. The value of the loop gain on the unit circle is L(ejωT), which is the frequency response of the discrete-time system for angles ωT in the interval [2π,π]. The values obtained for negative frequencies L(e-j|ωT|) are simply the complex conjugate of the values L(ej|ωT|) and need not be separately calculated. Because the order of the numerator is equal to that of the denominator or less, points on the large circle map to zero or to a single constant value. Because the value ε is infinitesimal, the values on the straight-line portions close to the real axis cancel. We can simplify the test by plotting L(ejωT) as we traverse the contour and then counting its encirclements of the point (-1+j 0). As Figure 3 shows, this is equivalent to plotting pcl(z) and counting encirclements of the origin.
  • 9. Fig.2. contour for stability determination Fig.3. Nyquist plots of L and 1+L
  • 10. If the system has open-loop poles on the unit circle, the contour passes through poles and the test fails. To avoid this, we modify the contour to avoid these open-loop poles. The most common case is a pole at unity for which the modified contour is shown in Figure 4. The contour includes an additional circular arc of infinitesimal radius. Because the portions on the positive real
  • 11. Fig.4. Modified contour for stability determination Fig.5. simplification of the modified contour for stability determination with(1,0) shown in gray
  • 12. axis cancel, the contour effectively reduces to the one shown in Figure 5. For m poles at unity, the loop gain is given by where NL and D have no unity roots. The value of the transfer function on the circular arc is approximately given by where K is equal to NL(1)/D(1) and (z-1)=εejq, with ε the radius of the small circular arc. Therefore, the small circle maps to a large circle, and traversing the
  • 13. small circle once causes a net denominator angle change of 2mπ radians (clockwise) (i.e., m half circles). The net angle change for the quotient on traversing the small circular arc is thus mp radians (counter clockwise). We conclude that for a type m system, the Nyquist contour will include m large clockwise semicircles. We now summarize the results obtained in Theorem 1.THEOREM 1: NYQUIST CRITERION Let the number of counter clockwise encirclements of the point (-1, 0) for a loop gain L(z) when traversing the stability contour be N (i.e.,-N for clockwise encirclements), where L(z) has P open-loop poles inside the contour. Then the system has Z closed-loop poles outside the unit circle with Z given by Z =-(-N)+P
  • 14. EXAMPLE 1 For the system of furnace G(s)=1/s2 +3s+1 Determine the closed-loop stability of the system with digital control and a sampling period of 0.01. The Nyquist plot of the system is shown in Figure6. The plot shows that the Nyquist plot does not encircle the point (-1, 0)—that is, N=0. Because the open-loop transfer function has no RHP poles (P=0), the system is closed-loop stable (Z=0). Note that there is a free path to the point (-1, 0) without crossing any lines of the plot because there are no encirclements.
  • 15. Fig.6. Nyquist plot of the furnace TF
  • 16. The Nyquist plot of the system is shown in Figure6. The plot shows that the Nyquist plot does not encircle the point (-1, 0)—that is, N=0. Because the open-loop transfer function has no RHP poles (P=0), the system is closed-loop stable (Z=0). Note that there is a free path to the point (-1, 0) without crossing any lines of the plot because there are no encirclements.
  • 17. EXAMPLE 2 Determine the closed-loop stability of the digital control system for the furnace model of Example1 with a discrete- time first-order actuator of the form and a sampling period of 0.01. If an amplifier of gain K=5 is added to the actuator, how does the value of the gain affect closed-loop stability? Solution We use MATLAB to obtain the z-transfer function of the plant and actuator: The Nyquist plot for the system, Figure7, is obtained with no additional gain and then for a gain K=5. We also show the plot in the vicinity of the point (-1, 0) in Figure8, from which we see that the system with K=5 encircles the point twice clockwise.
  • 18. Fig.7.Nyquist plot for the furnace and actuator(k=1, black, k=5,gray)
  • 19. Fig.8. Nyquist plot for the furnace and actuator in the vicinity of the point(-1,0)(k=1, black, k=5,gray)
  • 20. We count the encirclements by starting away from the point (- 1, 0) and counting the lines crossed as we approach it. We cross the gray curve twice, and at each crossing the arrow indicates that the line is moving from our right to our left (i.e., two clockwise encirclements). The system is unstable, and the number of closed-loop poles outside the unit circle is given by Z =(-N)+P =2+0
  • 21. For the original gain of unity, the intercept with the real axis is at a magnitude of approximately 0.28 and can be increased by a factor of about 3.5 before the system becomes unstable. At a magnitude of unity, the phase is about 38 less negative than the instability value of (-180). We therefore have a gain margin of about 3.5 and a phase margin of about 38. Using MATLAB, we find approximately the same values for the margins: [gm,pm]=margin(gtd) Gm=3.4817 Pm=37.5426
  • 22. The Nyquist plot of a transfer function, usually the loop transfer function GH(z), is a mapping of Nyquist contour in z- plane onto GH(z) plane which is in polar coordinates. Thus it is sometimes known as polar plot. Absolute and relative stabilities can be determined from the Nyquist plot using Nyquist stability criterion. Given the loop transfer function GH(z)of a digital control system, the polar plot of GH(z) is obtained by setting z = e jωT and varying ω from 0 to ∞.
  • 23. Before discussing Nyquist stability criterion for the digital system, following steps are necessary. 1. Defining the Nyquist path in the z-plane that encloses the exterior of the unit circle. Here the region to the left of a closed path is considered to be enclosed by that path when the direction of the path is taken anticlockwise. 2. Mapping the Nyquist path in z -plane onto the GH(z) plane which results in Nyquist plot of GH(z). 3. Stability of the closed loop system is investigated by studying the behavior of Nyquist plot with respect to the critical point (-1, j0) in the GH(z) plane.
  • 24. Now let us denote the angle traversed by the phasor drawn from (-1, j0) point to the Nyquist plot of GH(z) as ω varies from ωs/2 to 0 , on the unit circle of z1 excluding the small indentations. It can be shown that φ= (Z_1 - P_1 - 0.5P_0 )180^0 (1) For the closed loop digital control system to be stable, Z-1 should be equal to zero. Thus the Nyquist criterion for stability of the closed loop digital control systems is φ= (P_1 + 0.5P_0 )180^0 2) Hence, we can conclude that for the closed loop digital control system to be stable, the angle, traversed by the phasor drawn to the GH(z) plot from (-1, j0) point as ω varies from ωs/2 to 0, must satisfy equation (2).
  • 25. Example 1: Consider a digital control system for which the loop transfer function is given as GH(z) = 0.095Kz/(z - 1)(z - 0.9) where K is a gain parameter. The sampling time T = 0.1 sec. Since GH(z) has one pole on the unit circle and does not have any pole outside the unit circle, P-1 = 0 and P0 = 1 Nyquist path has a small indentation at z =1 on the unit circle. The Nyquist plot is shown in Figure 9.
  • 26. Figure 9: Nyquist plot for Example 1
  • 27. Nyquist plot of GH(z), as shown in Figure 9, intersects the negative real axis at -0.025K when ω= ωs /2 = 31.4rad/sec. φ can be computed as φ = - (0 + 0.5 * 1)180^0=-90^0 It can be seen from Figure 3 that for φ to be -90°, (-1, j 0) point should be located at the left of -0.025K point. Thus for stability - 1 < - 0.025K K < 40
  • 28. If K > 40, (-1, j 0) will be at the right of -0.025Kpoint, hence making φ =90^o. If φ =90^o, we get from (1) Z_1= φ /180^o+0+0.5=1 Thus for K > 40, one of the closed loop poles will be outside the unit circle. If K is negative we can still use the same Nyquist plot but refer (+1, j0 ) point as the critical point. φ in this case still equals +90° and the system is unstable. Hence the stable range of K is 0 ≤ K < 40
  • 29. HW. Determine the closed-loop stability of the digital control system for the position control system with analogue transfer function G(s)=10/s(s+1) and with a sampling period of 0.01. If the system is stable, determine the gain margin and the phase margin.
  • 30. 2.Poles, Zeros and Bode Plots Considering the transfer function of the previous slide. We note that we have 4 different types of terms in the previous general form: These are: )1/(, )1/( 1 , 1 ,   zs pss KB Expressing in dB: Given the transfer function: )1/)(( )1/( )(    pjwjw zjwK jwG B |1/|log20||log20|)1/(|log20log20|(|log20  pjwjwzjwKjwG B
  • 31. We have 4 distinct terms to consider: 20log KB 20log|(jw/z +1)| -20log|jw| -20log|(jw/p + 1)| wlg
  • 32. The gain term, 20logKB, is just so many dB and this is a straight line on Bode paper, independent of omega (radian frequency). The term, - 20log|jw| = - 20logw, when plotted on semi-log paper is a straight line sloping at -20dB/decade. It has a magnitude of 0 at w = 1. 0 20 -20 =1 -20db/dec
  • 33. The term, - 20log|(jw/p + 1), is drawn with the following approximation: If w < p we use the approximation that – 20log|(jw/p + 1 )| = 0 dB,a flat line on the Bode. If w > p we use the approximation of –20log(w/p), which slopes at - 20dB/dec starting at w = p. Illustrated below. It is easy to show that the plot has an error of -3dB at w = p and – 1 dB at w = p/2 and w = 2p. One can easily make these corrections if it is appropriate. 0 2 0 -20 -40  = p -20db/dec
  • 34. 0 20 -20 -40  = z +20db/dec When we have a term of 20log|(jw/z + 1)| we approximate it be a straight line of slop 0 dB/dec when w < z. We approximate it as 20log(w/z) when w > z, which is a straight line on Bode paper with a slope of + 20dB/dec. Illustrated below.
  • 35. Example 1: 50,000( 10) ( ) ( 1)( 500) jw G jw jw jw     First: Always get the poles and zeros in a form such that the constants are associated with the jw terms. In the above example we do this by factoring out the 10 in the numerator and the 500 in the denominator. 50,000 10( /10 1) 100( /10 1) ( ) 500( 1)( / 500 1) ( 1)( / 500 1) x jw jw G jw jw jw jw jw         Second: When you have neither poles nor zeros at 0, start the Bode at 20log10K =20log10100 = 40 dB in this case.
  • 36. Example 1: Third: Observe the order in which the poles and zeros occur. This is the secret of being able to quickly sketch the Bode. In this example we first have a pole occurring at 1 which causes the Bode to break at 1 and slope – 20 dB/dec. Next, we see a zero occurs at 10 and this causes a slope of +20 dB/dec which cancels out the – 20 dB/dec, resulting in a flat line ( 0 db/dec). Finally, we have a pole that occurs at w = 500 which causes the Bode to slope down at – 20 dB/dec.
  • 37. 1 1 1 1 1 1  (rad/sec) dB Mag Phase (deg) 1 1 1 1 1 1  (rad/sec) dB Mag Phase (deg) BODE PLOT MAGNITUDE FOR 100(1 + JW/10)/(1 + JW/1)(1 + JW/500) 0 20 40 -20 -60 60 -60 0.1 1 10 100 1000 10000
  • 38. 2.Phase for Bode Plots Generally, the phase for a Bode plot is not as easy to draw or approximate as the magnitude. In this course we will use an analytical method for determining the phase if we want to make a sketch of the phase. Consider the transfer function of the previous example. We express the angle as follows: )500/(tan)1/(tan)10/(tan)( 111 wwwjwG   We are essentially taking the angle of each pole and zero. Each of these are expressed as the tan-1(j part/real part) Usually, about 10 to 15 calculations are sufficient to determine a good idea of what is happening to the phase.
  • 39. 2.Bode Plots Ex2: Given the transfer function. Plot the Bode magnitude. 2 )100/1( )10/1(100 )( ss s sG    Consider first only the two terms of jw 100 Which, when expressed in dB, are; 20log100 – 20 logw. This is plotted below. 1 0 20 40 -20 The is a tentative line we use until we encounter the first pole(s) or zero(s) not at the origin. -20db/dec dB  (rad/sec)
  • 40. 1 1 1 1 1 1  (rad/sec) dB Mag Phase (deg) 0 20 40 60 -20 -40 -60 1 10 100 10000.1 2 )100/1( )10/1(100 )( ss s sG     (rad/sec) dB Mag Phase (deg) 0 20 40 60 -20 -40 -60 1 10 100 10000.1 2.Bode Plots -20db/dec -40 db/dec 2 )100/1( )10/1(100 )( ss s sG    The completed plot is shown below.
  • 41. 1 1 1 1 1 1  (rad/sec) dB Mag Example 3: 3 3 2 80(1 ) ( ) ( ) (1 / 20) jw G s jw jw    10.1 10 100 40 20 0 60 -20 . 20log80 = 38 dB -60 dB/dec -40 dB/dec
  • 42. 1 1 1 1 1 1  (rad/sec) dB Mag Phase (deg) 0 20 40 60 -20 -40 -60 1 10 100 10000.1 -40 dB/dec + 20 dB/dec Sort of a low pass filter Example 4: 2 2 10(1 / 2) ( ) (1 0.025 )(1 / 500) jw G jw j w jw    
  • 43. 1 1 1 1 1 1  (rad/sec) dB Mag Phase (deg) 0 20 40 60 -20 -40 -60 1 10 100 10000.1 22 22 )1700/1()2/1( )100/1()30/1( )( jwjw jwjw jwG    -40 dB/dec + 40 dB/dec Sort of a low pass filter Example 5
  • 44. )11.0()( )101.0)(1(64 )10()( )101.0)(1(640 )( 22       jwjw jwjw jwjw jwjw jwH 0.01 0.1 1 10 100 1000 0 20 40 -20 -40 dB mag . . . . . -40dB/dec -20db/dec -40dB/dec -20dB/dec Example 6
  • 45. Design a G(s) that has the following Bode plot. dB mag  rad/sec 0 20 40 0.1 1 10 100 1000 30 900 30 dB +40 dB/dec -40dB/dec ? ? Example 7
  • 46. One of the advantages of the Bode plot in s-domain is that the magnitude curve can be approximated by straight lines which allows the sketching of the magnitude plot without exact computation. This feature is lost when we plot Bode diagram in z-domain. To incorporate this feature we use bi-linear transformation to transform unit circle of the z-plane into the imaginary axis of another complex plane, w plane, where
  • 47. From the power series expansion domain analysis the above bi-linear transformation may be used to convert GH(z) to GH(w) and then construct the Bode plot.
  • 48. Example 1: Let us consider a digital control system for which the loop transfer function is given by where sampling time T = 0.1 sec. Putting , we get the transfer function in w plane as where is the frequency in w plane. Corner frequencies are 1/1.0026 = 0.997 rad/sec and 1/0.05 = 20 rad/sec.
  • 49. The straight line asymptotes of the Bode plot can be drawn using the following. • Up to ωw= 0.997 rad/sec, the magnitude plot is a straight line with slope - 20 dB/decade.At ωw= 0.01 rad/sec,the magnitude is • From ωw= 0.997 rad/sec to ωw= 20 rad/sec, the magnitude plot is a straight line with slope - 20 - 20 = - 40 dB/decade. • Since both of the zeros will contribute same to the magnitude plot, after ωw= 20 rad/sec, the slope of the straight line will be - 40 + 20 + 20 = 0 dB/decade. The asymptotic magnitude plot is shown in Figure 10.
  • 50. Figure 10. Bode asymptotic magnitude plot for Example 1
  • 51. One should remember that the actual plot will be slightly different from the asymptotic plot. In the actual plot, errors due to straight line assumptions is compensated. Phase plot is drawn by varying the frequency from 0.01 to 100 rad/sec at regular intervals. The phase angle contributed by one zero will be canceled by the other. Thus the phase will vary from - 90° (270°) to - 180° (180°).
  • 52. Gain margin and Phase margin Gain margin and phase margins are the measures of relative stability of a system. Similar to continuous time case, we have to first define phase and gain cross over frequencies before defining gain margin and phase margin. Gain margin is the safety factor by which the open loop gain of a system can be increased before the system becomes unstable. It is measured as where ωp is the phase crossover frequency which is defined as the frequency where the phase of the loop transfer function is 180°. Similarly Phase margin (PM) is defined as
  • 53. where ωg is the gain crossover frequency which is defined as the frequency where the loop gain magnitude of the system becomes one. 3. Compensator Design Using Bode Plot In this lecture we would revisit the continuous time design techniques using frequency domain since these can be directly applied to design for digital control system by transferring the loop transfer function in z-plane to w-plane. Phase lead compensator If we look at the frequency response of a simple PD controller, it is evident that the magnitude of the compensator continuously grows with the increase in frequency.
  • 54. The above feature is undesirable because it amplifies high frequency noise that is typically present in any real system. In lead compensator, a first order pole is added to the denominator of the PD controller at frequencies well higher than the corner frequency of the PD controller. A typical lead compensator has the following transfer function. is the ratio between the pole zero break point (corner) frequencies. Magnitude of the lead compensator is And the phase contributed by the lead compensator is given by
  • 55. Thus a significant amount of phase is still provided with much less amplitude at high frequencies. The frequency response of a typical lead compensator is shown in Figure 11 where the magnitude varies from to and maximum phase is always less than 90° (around 60° in general). Figure 11: Frequency response of a lead compensator
  • 56. Example 1: Consider the following system Design a cascade lead compensator so that the phase margin (PM) is at least 45° and steady state error for a unit ramp input is ≤ 0.1 . The lead compensator is Steady state error for unit ramp input is M of the closed loop system should be 45°. Let the gain crossover frequency of the uncompensated system with K be ωg .
  • 57. phase angle at ωg = 3.1 is -90 - tan -1 3.1 = - 162° . Thus the PM of the uncompensated system with K is 18°. If it was possible to add a phase without altering the magnitude, the additional phase lead required to maintain PM= 45° is 45° - 18° = 27° at ωg = 3.1 rad/sec. However, maintaining same low frequency gain and adding a compensator would increase the crossover frequency. As a result of this, the actual phase margin will deviate from the designed one. Thus it is safe to add a safety margin of ε to the required phase lead so that if it devaites also, still the phase requirement is met. In general ε is chosen between 5° to 15°. So the additional phase requirement is 27° + 10° = 37° , The lead part of the compensator will provide this additional phase at ωmax .
  • 58. the only parameter left to be designed is τ. To find τ, one should locate the frequency at which the uncompensated system has a logarithmic magnitude of Select this frequency as the new gain crossover frequency since the compensator provides a gain at ωmax.
  • 59. in this case ωmax = ωg new = 4.41 . Thus The lead compensator is thus With this compensator actual phase margin of the system becomes 49.6° which meets the design criteria. Figure 12: Bode plot of the compensated system for Example 1
  • 60. Lag Compensator Design In the previous lecture we discussed lead compensator design. In this lecture we would see how to design a phase lag compensator Phase lag compensator The essential feature of a lag compensator is to provide an increased low frequency gain, thus decreasing the steady state error, without changing the transient response significantly. For frequency response design it is convenient to use the following transfer function of a lag compensator.
  • 61. he above expression is only the lag part of the compensator. The overall compensator is Typical objective of lag compensator design is to provide an additional gain of α in the low frequency region and to leave the system with sufficient phase margin. The frequency response of a lag compensator, with α=4 and τ=3, is shown in Figure 13 where the magnitude varies from dB to 0 dB.
  • 62. Figure 13: Frequency response of a lag compensator Since the lag compensator provides the maximum lag near the two corner frequencies, to maintain the PM of the system, zero of the compensator should be chosen such that ω = 1/ τ is much lower than the gain crossover frequency of the uncompensated system.
  • 63. In general, τ is designed such that 1/ τ is at least one decade below the gain crossover frequency of the uncompensated system. Following example will be comprehensive to understand the design procedure. Example 1: Consider the following system Design a lag compensator so that the phase margin (PM) is at least 50° and steady state error to a unit step input is ≤ 0.1. The overall compensator is
  • 64. Steady state error for unit step input is Now let us modify the system transfer function by introducing K with the original system. Thus the modified system becomes PM of the closed loop system should be 50°. Let the gain crossover frequency of the uncompensated system with K be ωg .
  • 65. Required PM is 50°. Since the PM is achieved only by selecting K, it might be deviated from this value when the other parameters are also designed. Thus we put a safety margin of 5° to the PM which makes the required PM to be 55°.
  • 66. To make ωg = 2.8 rad/sec, the gain crossover frequency of the modified system, magnitude at ωg should be 1. Thus Putting the value of ωg in the last equation, we get K = 5.1. Thus, The only parameter left to be designed is τ. Since the desired PM is already achieved with gain K, We should place ω = 1/ τ such that it does not much effect the PM of the modified system with K. If we place 1/ τ one decade below the gain crossover frequency, then
  • 67. The overall compensator is With this compensator actual phase margin of the system becomes 52.7°, as shown in Figure 14, which meets the design criteria. Figure 14: Bode plot of the compensated system for Example 1
  • 68. 4. Using Matlab For Frequency Response We can use Matlab to run the frequency response for the previous example. We place the transfer function in the form: ]500501[ ]500005000[ )500)(1( )10(5000 2      ss s ss s The Matlab Program num = [5000 50000]; den = [1 501 500]; Bode (num,den) In the following slide, the resulting magnitude and phase plots (exact) are shown in light color (blue). The approximate plot for the magnitude (Bode) is shown in heavy lines (red). We see the 3 dB errors at the corner frequencies.
  • 69. Frequency (rad/sec) Phase(deg);Magnitude(dB) Bode Diagrams -10 0 10 20 30 40 From: U(1) 10 -1 10 0 10 1 10 2 10 3 10 4 -100 -80 -60 -40 -20 0 To:Y(1) 1 10 100 500 )500/1)(1( )10/1(100 )( jwjw jw jwG   Bode for:
  • 71. Filter Output at  = 5.3 rad/sec Produced from Matlab Simulink
  • 72. Filter Output at  = 70 rad/sec Produced from Matlab Simulink