Chuong6 DLHDK
Chuong6 DLHDK
1
The Concept of Frequency Response
In the steady state:
• Sinusoidal inputs to a linear system generate sinusoidal responses of
the same frequency.
• Even though these responses are of the same frequency as the input,
they differ in amplitude and phase angle from the input. These
differences are functions of frequency.
2
Consider the mechanical system in the figure shown below
M o ( )
M ( ) ;
M i ( )
( ) o ( ) i ( )
We now solve for the forced response portion (1) in polar form,
of C(s),
M i i; M i A2 B 2 ;
As B
C ( s ) R ( s )G ( s ) G( s) i tan 1 ( B / A)
s2 2
As B
C ( s) G( s) (2) in rectangular form,
( s j )( s j )
K1 K2
A jB
Partial fraction terms from G(s)
( s j ) ( s j ) (3) using Euler’s formula,
M i e ji
4
K1 K2
C ( s) Partial fraction terms from G(s)
( s j ) ( s j )
As B As B 1 1 1
K1 lim G( s) G( s) [ A B ]G ( j ) [ A jB ]G ( j )
s j ( s j ) ( s j ) s j
2 2j 2
1 MM
M i e ji M G e jG i G e j (i G )
2 2
As B As B 1 1 1
K 2 lim G( s) G( s) [ A B ]G ( j ) [ A jB ]G ( j )
s j ( s j ) ( s j ) 2 2j 2
s j
1 MM
M i e ji M G e jG i G e j (i G ) K1
*
2 2
in which,
M G G ( j ) ; G angle of G(j )
5
The steady-state response is that portion of the partial-fraction expansion that
comes from the input waveform’s poles, or just the first two terms, the
sinusoidal steady-state output, Css(s), is
K1 K2
Css ( s )
( s j ) ( s j )
M i M G j (i G ) M i M G j (i G )
e e
2 2
( s j ) ( s j )
M i M G j (i G ) jt M i M G j (i G ) jt
css (t ) e e e e
2 2
MM
css (t ) i G [e j (t i G ) e j (t i G ) ]
2
css (t ) M i M G cos(t i G )
M oo ( M i i )( M G G )
which can be represented in phasor form as M G G G ( j )
css (t ) M i M G cos(t i G ) G ( j ) G ( s ) s j
7
Frequency Response from The Transfer Function
Find the analytical expression for the magnitude frequency
response and the phase frequency response for a system
G(s) =1/(s+ 2̃). Also, plot both the separate magnitude and
phase diagrams and the polar plot (Nyquist plot).
1 2 j 2 j
G ( j )
2 j 4 2 4 2 4 2
2 2 2 1
G ( j ) [ ] [ ]
4 2
4 2
4 2
1
20 log( G ( j ) ) 20 log 20 log 4 2
4 2
1 4 1
2
G ( j ) tan [ ] tan [ ]
2 2
4 2
8
w=0.1:0.1:100; logw=log10(w); m_G=-20*log10(sqrt(4+w.^2));
p_G=-atand(w/2); plot(w,m_G); figure; plot(w,p_G);
-10
-15
G=1/(s+2);
20 log M
-20
-25 bode(G);
-30
-35
-40
-1 0 1 2
10 10 10 10
Frequency (rad/s)
-20
Phase (degrees)
-40
-60
-80
-100
-1 0 1 2
10 10 10 10
Frequency (rad/s) 9
1 2 j 2 j G=1/(s+2);w=0:0.1:100; >> nyquist(G,w)
polar plot G ( j )
2 j 4 2 4 2 4 2 Nyquist Diagram
0.25
Re_G=2./(4+w.^2); 0.2
Im_G= -w./(4+w.^2); 0.15
plot(Re_G,Im_G); 0.1
for i=1:1:10
Imaginary Axis
0.05
x = Re_G(i); 0
y = Im_G(i);
-0.05
txt1 = strcat('\leftarrow w = ', …
-0.1
num2str(w(i)));
-0.15
txt= strcat(txt1,' r/s');
-0.2
text(x,y,txt)
-0.25
end -0.1 0 0.1 0.2 0.3 0.4 0.5
Real Axis
Re G
0 0.1 0.2 0.3 0.4 0.5
0
w =0.1 r/s
w =0.3 r/s
w =0.6 r/s
-0.15 w =0.7 r/s
w =0.8 r/s
w =0.9 r/s
-0.2 w =1 r/s
-0.25
10
Asymptotic Approximations: Bode Plots
Sketching Bode plots can be simplified because they can be approximated as a
sequence of straight lines
K ( s z1 )( s z2 )...( s zk )
Consider the following transfer function: G( s)
s m ( s p1 )( s p2 )...( s pn )
K ( s z1 ) ( s z2 ) ... ( s zk )
The magnitude frequency response G( s)
s m ( s p1 ) ( s p2 ) ... ( s pn )
s j
Converting the magnitude response into dB
Thus, if we knew the response of each term, the algebraic sum would yield the total
response in dB.
The phase frequency response is the sum of the phase frequency response curves of the
zero terms minus the sum of the phase frequency response curves of the pole terms. 11
Bode Plots for G(s) = (s + a)
Consider a function, G(s) = (s+a). Letting s = j,
j
G ( j ) ( j a ) a (
1) where y = 20 log M; and x = log . The line has
a
when approaches zero, a slope of 20 when plotted as dB vs. log .
G ( j ) a; 20 log G ( j ) 20 log a
j
where a G(j ) a ( ) 90o
a
The magnitude response in dB is
20log G ( j ) 20 log a 20 log( ) 20 log (*)
a
13
It is often convenient to normalize the magnitude and scale the
frequency so that the log-magnitude plot will be 0 dB at a break frequency of
unity. Normalizing and scaling helps in the following applications:
1. When comparing different first- or second-order frequency response plots, each
plot will have the same low-frequency asymptote after normalization and the
same break frequency after scaling.
2. When sketching the frequency response of a function such as
K ( s z1 )( s z2 )...( s zk )
G( s)
s m ( s p1 )( s p2 )...( s pn )
Each factor in the numerator and denominator will have the same low-frequency
asymptote after normalization. This common low-frequency asymptote makes it
easier to add components to obtain the Bode plot.
To normalize (s + a), we factor out the quantity a and form a(s/a +1). The frequency is
scaled by defining a new frequency variable, s1 = s/a. Then the magnitude is divided by
the quantity a to yield 0 dB at the break frequency. Hence, the normalized and scaled
function is (s1 + 1̃). To obtain the original frequency response, the
magnitude and frequency are multiplied by the quantity a. 14
Asymptotic and actual normalized and scaled frequency response data for s+a
15
Asymptotic and actual normalized
and scaled magnitude response of
(s+a)
16
1 1
G( s)
( s a ) a ( s 1)
a
Bode Plots for G(s) =1/(s+a)
1 The Bode log magnitude diagram will decrease
G ( j )
j
a( 1) at a rate of -20 dB/decade after the break
a
frequency.
when approaches zero,
1 1 The Bode normalized and scaled log-magnitude
G ( j ) ; 20 log G ( j ) 20 log
a a and phase plot
1 1
where a G(j ) 90o
j
a( )
a
The magnitude response in dB is
1
20log G ( j ) 20 log 20 log( ) 20 log
a a
1
G ( j )
j
a( 1)
a
1
when approaches zero, G ( j ) ; G ( j ) 0o
a
a G ( j ) 45o
1
where a G(j ) 90o
j
a( )
a 17
Bode Plots for G(s) = s
G(j)= j, has only a high-frequency asymptote. The magnitude is 20 log .
Hence, the Bode magnitude plot is a straight line drawn with a +20 dB/decade
slope passing through zero dB when = 1. The phase plot, which is a constant
90o
18
Bode Plots for G(s)=1/s
The frequency response of function, G(s)= 1/s is a straight line with a
-20 dB/decade slope passing through zero dB at = 1. The Bode phase
plot is equal to a constant -90o.
19
Bode plot and Nyquist plot were proposed
to determine the closed-loop stability by
examining G(s)H(s) instead of 1+G(s)H(s)
20
Bode Plots for Ratio of First-Order Factors
where :
Draw the Bode plots for the system K ( s 3)
G( s)
s s( s 1)( s 2)
( 1)
K ( s 3) 3 3
G( s) K The break frequencies are at 1, 2, and 3. The
s( s 1)( s 2) 2 s( s 1)( s 1) magnitude plot should begin a decade below
2
the lowest break frequency and extend a
3K
0.1; G ( j 0.1) 15K decade above the highest break frequency.
2 0 .1
20 log G ( j 0.1) 20 log 15 20 log K If we choose K = 1, the magnitude plot can be
20 log G ( j 0.1) 23.52dB 20 log K denormalized later for any value of K that is
calculated or known
21
K ( s 3)
G( s)
s( s 1)( s 2)
22
components
Bode
phase
plot
composite
23
Bode Plots for G(s) = s2 + 2ns + n2
s2 s
G ( s ) s 2n s n n ( 2 1)
2 2 2
n 2 n
when approaches zero, n is the break frequency for
2 (*) the second order Polynomial
G ( j ) n ; 20 log G ( j ) 20 log n
2
(*)&(**)
( j ) 2
where n G(j ) n ( ) 2 2180o
2
n 2
24
s2 s
G ( s ) s 2n s n n ( 2 1)
2 2 2
n 2
n
when approaches zero,
G ( j ) n ; G ( j ) 0o
2
The phase plot increases at a rate
( j ) 2
where n G(j ) n (
2
) 2 2180o of 90o/decade from 0.1 to 10 and
n 2
G ( j ) 2nn j; G ( j ) 900
n n
25
Corrections to Second-Order Bode Plots
Whereas the first-order polynomial has a disparity of no more than 3.01 dB
magnitude and 5.71 phase, the second-order function may have a greater
disparity, which depends upon the value of .
G ( j ) s 2 2n s n (n 2 ) 2nj; M G ( j ) (n 2 ) 2 ( 2n ) 2 ;
2 2 2
s j
2n
G ( j ) tan 1 ( )
(n 2 )
2
Normalized and scaled log-magnitude response
26
Corrections to Second-Order Bode Plots
Whereas the first-order polynomial has a disparity of no more than 3.01 dB
magnitude and 5.71 phase, the second-order function may have a greater
disparity, which depends upon the value of .
G ( j ) s 2 2n s n (n 2 ) 2nj; M G ( j ) (n 2 ) 2 ( 2n ) 2 ;
2 2 2
s j
2n
G ( j ) tan 1 ( )
(n 2 )
2
Scaled phase response
27
Bode Plots for G(s) =1/( s2 + 2ns + n2)
The magnitude curve breaks at the natural frequency and decreases at a rate
of -40dB/decade.
The phase plot is 0 at low frequencies. At 0.1n it begins a decrease of
-90o/decade and continues until = 10 n, where it levels off at -180o.
1
G( s)
s 2 2 n s n
2
28
1
G( s)
s 2 2n s n
2
Scaled phase response for ̃
29
Bode Plots for Ratio of First- and Second-Order Factors
Draw the Bode log-magnitude and phase plots of G(s) for the unity feedback system
K ( s 3)
G( s)
( s 2)( s 2 2 s 25)
K ( s 3)
s
3 K ( 1)
G( s) 3
( s 2)( s 2 2 s 25) 50 ( 2s 1)( 25
s2 2 s
1)
25
30
K ( s 3)
s
3 K ( 1)
G( s) 3
( s 2)( s 2 s 25) 50 ( 2 1)( 25 251)
2 s s2 2 s
3
20 log( ) 24.44
50
31
O
composite
32
Nyquist: Introduction
G(j) WHAT IS A NYQUIST DIAGRAM?
33
Nyquist Diagram
0.5
Imaginary Axis
System: Fs System: Fs
Real: 0.0111 Real: 0.99
Imag: -0.105 Imag: -0.0985
0
You can check your answers using the Nyquist Frequency (rad/s): 10 Frequency (rad/s): 0.0995
System: Fs System: Fs
command in MATLAB Real: 0.196 Real: 0.804
Imag: -0.397 Imag: -0.397
Frequency (rad/s): 1.99 Frequency (rad/s)
>> nyquist(G)
>>[re,im]=nyquist(G,[0.1,0.5,1,2,10]); -0.5
-1 -0.5 System:0 Fs 0.5 1
Real: 0.468
Real Axis
Imag: -0.499
Frequency (rad/s): 1
SUMMARY:
The tabulation method is tedious so
a more efficient method is needed. 34
Nyquist: Using gain and phase
REMARKS:
1. On easy way to sketch a Nyquist diagram is to transcribe gain and phase
information.
2. Students may realize that gain/phase is already available in the Bode diagram!
From hereon, assume the Bode diagram is already known.
6
G( s)
( s 1)( s 3)
6
G ( j )
( 2 1)(( 2 9)
G ( j ) tan 1 ( ) tan 1 ( )
3 35
36
Introduction to the Nyquist Criterion
• Knowledge of the open loop system’s frequency response yields information
about the stability of the closed-loop system.
• Frequency response techniques are an alternate approach to the root locus.
Letting
NG N Consider the system
G(s) ; H ( s) H
DG DH
NG N H
G(s) H ( s ) ;
( DG DH )
Four important concepts:
N N [D D NG N H ]
1 G(s) H ( s ) 1 G H G H (1) the relationship between the poles of 1 + G(s)H(s)
DG DH (DG DH )
and the poles of G(s)H(s);
NG
(2) the relationship between the zeros of 1 + G(s)H(s)
G( s) DG
T ( s) and the poles of the closed-loop transfer
1 G ( s ) H ( s ) [ DG DH N G N H ]
(DG DH ) function, T(s);
N G DH (3) The concept of mapping points;
T ( s)
[ DG DH N G N H ] (4) and the concept of mapping contours.
• (1) the poles of 1 + G(s)H(s) are the same as the poles of G(s)H(s), the open-
loop system,
• and (2) the zeros of 1 + G(s)H(s) ̃are the same as the poles of T(s), the
37
closed-loop system.
(3) mapping. If we take a complex number on the s-plane and substitute it into a
function, F(s), another complex number results. This process is called mapping.
• For example, substituting s = 4 + j3 into the function (s2 + 2s + 1̃) yields 16 + j30. We
say that 4 + j3 maps into 16 + j30 through the function (s2 + 2s + 1̃).
(4) Consider the collection of points, called a contour, shown in the figure as
contour A. Also, assume that:
( s z1 )( s z2 )...
F ( s) Contour A can be mapped through F(s) into contour B by
( s p1 )( s p2 )... substituting each point of contour A into the function
F(s) and plotting the resulting complex numbers.
• For example, point Q maps into point Q’ through the
function F(s).
38
Mapping contour A through function F(s) to contour B
Assume a clockwise direction for mapping the points on contour A,
• then contour B maps in a clockwise direction if F(s) in the figure has just zeros
or has just poles that are not encircled by the contour. Fig. (a)
Contour A
y=[1:-0.1:-1]'; 2
x=[-1:0.1:1]';
sAB = 1 + y*i; 1.5
Contour B
sBC = y - i; 1
sCD = -1 + x*i;
sDA = x + i; 0.5
FsAB = sAB - 2; 0
FsBC = sBC - 2;
FsCD = sCD - 2; -0.5
FsDA = sDA - 2; -1
plot(real(FsAB),imag(FsAB),'g');
hold on -1.5
plot(real(FsBC),imag(FsBC),'b--o'); -2
plot(real(FsCD),imag(FsCD),'c*'); -4 -3 -2 -1 0 1 2
plot(real(FsDA),imag(FsDA),'r');
y=[1:-0.1:-1]'; 1
x=[-1:0.1:1]'; 0.8
sAB = 1 + y*i;
0.6
sBC = y - i;
sCD = -1 + x*i; 0.4
sDA = x + i; 0.2
FsAB = 1./(sAB - 2); 0
FsBC = 1./(sBC - 2);
-0.2
FsCD = 1./(sCD - 2);
FsDA = 1./(sDA - 2); -0.4
plot(real(FsAB),imag(FsAB),'g'); -0.6
hold on
-0.8
plot(real(FsBC),imag(FsBC),'b--o');
plot(real(FsCD),imag(FsCD),'c*'); -1
-1.5 -1 -0.5 0 0.5
plot(real(FsDA),imag(FsDA),'r');
Examples of contour mapping 40
Assume a clockwise direction for mapping the points on contour A,
• If the pole or zero of F(s) is enclosed by contour A, the mapping encircles the
origin. Fig. (c)
y=[1:-0.1:-1]'; 2
x=[-1:0.1:1]';
1.5
sAB = 1 + y*i;
sBC = y - i; 1
sCD = -1 + x*i;
sDA = x + i; 0.5
plot(real(FsCD),imag(FsCD),'c*');
-2
plot(real(FsDA),imag(FsDA),'r'); -2 -1.5 -1 -0.5 0 0.5 1 1.5 2
41
Assume a clockwise direction for mapping the points on contour A,
• The contour B maps in a counterclockwise direction if F(s) has just poles that
are encircled by the contour. Fig. (d)
• If the pole or zero of F(s) is enclosed by contour A, the mapping encircles the
origin. Fig. (d)
2
y=[1:-0.1:-1]'; x=[-1:0.1:1]';
sAB = 1 + y*i; sBC = y - i; 1.5
sCD = -1 + x*i;
1
sDA = x + i;
FsAB = 1./(sAB - 0.5); 0.5
plot(real(FsAB),imag(FsAB),'g');
-1
hold on
plot(real(FsBC),imag(FsBC),'b--o'); -1.5
plot(real(FsCD),imag(FsCD),'c*');
-2
plot(real(FsDA),imag(FsDA),'r'); -2 -1.5 -1 -0.5 0 0.5 1 1.5
42
2
Assume a clockwise direction for mapping the points on contour A,
• The pole and zero rotation cancel, and the mapping does not encircle the origin.
Fig. (e)
y=[1:-0.1:-1]'; 0.4
x=[-1:0.1:1]';
sAB = 1 + y*i; 0.3
sBC = y - i; 0.2
sCD = -1 + x*i;
sDA = x + i; 0.1
FsAB = (sAB-0.2)./(sAB - 0.5);
0
FsBC = (sBC-0.2)./(sBC - 0.5);
FsCD = (sCD-0.2)./(sCD - 0.5); -0.1
FsDA = (sDA-0.2)./(sDA - 0.5);
plot(real(FsAB),imag(FsAB),'g'); -0.2
hold on
-0.3
plot(real(FsBC),imag(FsBC),'b--o');
plot(real(FsCD),imag(FsCD),'c*'); -0.4
-0.5 0 0.5 1 1.5
plot(real(FsDA),imag(FsDA),'r');
43
1
F ( s)
( s 0.2)( s 0.3)
y=[1:-0.1:-1]'; 1.5
x=[-1:0.1:1]';
sAB = 1 + y*i;
1
sBC = y - i;
sCD = -1 + x*i;
sDA = x + i; 0.5
FsAB = 1./((sAB - 0.2).*(sAB - 0.3));
FsBC = 1./((sBC - 0.2).*(sBC - 0.3));
0
FsCD = 1./((sCD - 0.2).*(sCD - 0.3));
FsDA = 1./((sDA - 0.2).*(sDA - 0.3));
plot(real(FsAB),imag(FsAB),'g'); -0.5
hold on
plot(real(FsBC),imag(FsBC),'b--o');
-1
plot(real(FsCD),imag(FsCD),'c*');
plot(real(FsDA),imag(FsDA),'r');
-1.5
-1 -0.5 0 0.5 1 1.5 2
44
• A unique relationship exists between the number of poles of
F(s) contained inside contour A, the number of zeros of F(s)
contained inside contour A, and the number of
counterclockwise encirclements of the origin for the
mapping of contour B.
• This interrelationship can be used to determine the stability
of closed-loop systems. This method of determining stability
is called the Nyquist criterion
45
Vector representation of mapping
( s z1 )( s z2 )...
F ( s)
( s p1 )( s p2 )...
Assuming that
F(s)=1+G(s)H(s) has two
zeros and three poles
• Each vector drawn from the poles and zeros of 1+G(s)H(s) that exist outside
contour A will appear to oscillate and return to its previous position, undergoing a
net angular change of 0.
• Each zero inside contour A yields a rotation in the clockwise direction
• Each pole inside contour A yields a rotation in the counterclockwise
direction
N PZ
Where:
• N equals the number of counterclockwise rotations of contour B about the origin;
• P equals the number of poles of 1+G(s)H(s) inside contour A.
• Z equals the number of zeros of 1+G(s)H(s) inside contour A.
46
• (1) the poles of 1 + G(s)H(s) are the same as the poles of G(s)H(s), the open-
loop system,
• and (2) the zeros of 1 + G(s)H(s) ̃are the same as the poles of T(s), the
closed-loop system.
N PZ
Thus, P equals the number of enclosed open-loop poles, and Z equals the
Z PN
number of enclosed closed loop poles.
48
Applying the Nyquist Criterion to Determine Stability
Z = P – N = 0. Since
Z is the number of closed-loop
poles inside contour A, which
encircles the right half-plane,
this system has no right–half-
plane poles and is stable.
500
G( s)
( s 1)( s 3)( s 10)
50
500 500
G ( j ) 3
( s 1)( s 3)( s 10) s j ( s 14 s 2 43s 30) s j
500 500
( j 3 14 2 43 j 30) (14 2 30) j (43 3 )
(14 2 30) j (43 3 )
G ( j ) 500
(14 2 30) 2 (43 3 ) 2
(30) 50
ACA’C’ when 0 G ( j ) 500
(30) 2
3
As increases the real part remains positive,
and the imaginary part remains negative.
500 j
8.36 j
30 30 30
( 43 )
14 14 14
51
At 43
( 14 2 30) j ( 43 3 )
G( s) 500
43
( 14 2 30) 2 ( 43 3 ) 2 43
500
2
0.8741; (Q ' )
( 14 43 30)
Continuing toward , the real part is
negative, and the imaginary part is positive. At
infinite frequency C
500 j
G ( j ) 3 090o (C ' )
ACA’C’
CDC’D’
Nyquist Diagram
500 15
G (s) 0 ( 1 3 10 )
( 1 3 10 ) 10
Imaginary Axis
0
The resultant undergoes a counterclockwise rotation of 3x 180o,
starting at point C’ and ending at point D’ -5
53
Nyquist Diagram for Open-Loop Function with Poles on Contour
Sketch the Nyquist diagram of the unity feedback system, where G(s)=(s + 2̃)/s2
sys = (s + 2)/(s^2);
nyquist(sys)
nyquist1(sys) lnyquist(sys)
54
Stability via the Nyquist Diagram
For what range of gain is the system stable?
The general approach is to set the loop gain equal to unity and draw the Nyquist
diagram.
For this system, since P = 2, the critical
point must be encircled by the
Nyquist diagram to yield N = 2 and a
stable system
G=zpk([-3,-5],[2, 4],1)
In summary, then, if the open-loop system nyquist(G)
contains a variable gain, K, set K = 1 and sketch
the Nyquist diagram. Consider the critical point
to be at -1/K rather than at -1. Adjust the value
of K to yield stability, based upon the Nyquist
criterion.
numg=500* [1 -2];
deng=conv([1 2],[1 7]); Nyquist Diagram
1.5
deng=conv(deng,[1 50]); 2 dB 0 dB -2 dB
G=tf(numg,deng); 1
4 dB -4 dB
nyquist(G); 6 dB -6 dB
20 dB -20 dB
0
We have P = 0 (open loop stable
system), but N = −1, so System (iii) is -0.5
0.06
This system is stable for the range of loop gain, K, that ensures that the open-loop
magnitude is less than unity at that frequency where the phase angle is 180o (or,
equivalently, -180o).
The system is stable if the open-loop
magnitude is greater than unity at
that frequency where the phase angle
is 180o (or, equivalently, -180o).
First determine stability from the Nyquist criterion
and the Nyquist diagram. Next interpret the Nyquist
criterion and determine whether the mapping of
just the positive imaginary axis should have a gain of
less than or greater than unity at 180. If the Nyquist
diagram crosses 180 at multiple frequencies,
determine the interpretation from the Nyquist
criterion. 58
Stability Design via Mapping Positive j-Axis
Find the range of gain for stability and instability, and the gain for marginal stability, for
the unity feedback system, where G(s)= K/[(s2 + 2s +2̃)(s + 2̃)]. For marginal stability find
the radian frequency of oscillation. Use the Nyquist criterion and the mapping of only
the positive imaginary axis.
P=0, we want no encirclements of -1 for stability. Hence, a gain less than unity at
180 o is required. Begin by letting K = 1 and draw the portion of the contour along
the positive imaginary axis as shown in Figure (a).
4(1 2 ) j (6 2 )
G ( j )
16(1 2 ) 2 2 (6 2 ) 2
(6 2 ) 6
4(1 2 ) 4
0.05
16(1 2 ) 2 6
16 5
K 0.05 1; K 20
• The phase margin is found by using the magnitude curve to find the frequency,
M, where the gain is 0 dB. On the phase curve at that frequency, the phase
margin, M, is the difference between the phase value and 180o.
62
Gain and Phase Margins from Bode Plots
If K = 200 in the system of previous example, find the gain margin and the phase margin.
The magnitude plot is 13.98 dB lower than the actual plot, the 0 dB crossing (-13.98
dB for the normalized plot ) occurs at 5.5 rad/s. At this frequency the phase angle is
165o. Thus, the phase margin is -165o – (-180o) = 15o.
63
Previous example:
• The gain margin is 6.02 dB MATLAB
• The phase margin is 15o G(s)= 200/[(s+2)(s+4)(s+5).
G=zpk([],[-2,-4,-5],200) 20
Bode Diagram
bode(G)
0
grid on
Magnitude (dB)
System: G
-20 Gain Margin (dB): 5.53
At frequency (rad/s): 6.16
1. Right-click in the graph area. -40 Closed loop stable? Yes
Phase (deg)
-90
-180 System: G
Phase Margin (deg): 23.5
Delay Margin (sec): 0.091
-270 At frequency (rad/s): 4.51
Closed loop stable? Yes
>> [Gm,Pm,Wgm,Wpm] = margin(G) 10
-2
10
-1
10
0
10
1
10
2
Frequency (rad/s)
Gm = 1.8900;
%20*log10(1.89)=5.5292
Pm = 23.4905
Wgm = 6.1644
Wpm = 4.5068
64
Relation Between Closed-Loop Transient and
Closed-Loop Frequency Responses
Damping Ratio and Closed-Loop
Frequency Response
n4
M 2
2 n2 (1 2 2 ) (n2 n2 (1 2 2 )) 2 4 2n2 [n2 (1 2 2 )]
n4 1 1
M 2
2 n2 (1 2 2 ) ( 2n2 2 ) 2 4 2n4 8 4n4 4 2 4 4 4 2 (1 2 )
1
Mm ; at a frequency m n 1 2 2
2 1 2
65
1
Mm ; at a frequency m n 1 2 2
2 1 2
66
T=1/(s^2+0.2*s+1) Representative log-magnitude plot
bode(T)
grid on
Bode Diagram Mm
20
10
Magnitude (dB)
-10
-20
-30
-40
0
-45
Phase (deg)
-90
m
-135
-180
10
-1
10
0
10
1
BW: bandwidth of the closed-loop frequency response.
Frequency (rad/s)
Notice that:
• The resonant frequency, m, is not the natural frequency n.
• There will not be a peak at frequencies above zero if > 0.707.
This limiting value of for peaking on the magnitude response
curve should not be confused with overshoot Mp on the step
response, where there is overshoot for 0 < < 1. 67
1
Mm ; at a frequency m n 1 2 2 p_o_shoot=1:1:80;
2 1 2 Mm=-1./(2.*(log(p_o_shoot./100)./ …
sqrt(3.1416^2+log(p_o_shoot./100).^2)).* …
ln(% M p / 100%) (sqrt(3.1416^2./(3.1416^2+log(p_o_shoot./…
2 ln 2 (% M p / 100%) 100).^2))));
plot( p_o_shoot,Mm);
1
Mm
ln(% M p / 100%) ln(% M p / 100%)
2( ) 1[ ]2
2 ln 2 (% M p / 100%) 2 ln 2 (% M p / 100%)
Mp 5
Mm
4
1
Polar plots of G( jω) for different damping 0 10 20 30 40 50 60 70 80
68
ratios for the system Percent overshoot
Response Speed and Closed-Loop Frequency Response
Bandwidth of the closed-loop frequency response is defined as the frequency, BW,
at which the magnitude response curve is 3 dB down from its value at zero frequency
The -3dB, come from 20 Log (0.707) to determine the bandwidth of signal, when
decrease the voltage from maximum to 0.707Max or decreasing the power from
max to half power.
1 V2
20 log(0.707) 20 log( ) 3dB; P ; assume R 1
2 R
1 1 1
Pi Vi ; Vo 0.707Vi Vi ; Po [ Vi ]2 Pi
2
2 2 2
Vi 6V; Pi 36W
1 1 1
Vo 0.707Vi Vi ; Po [ Vi ]2 Pi 18W
2 2 2
Another relationship between the speed of the time response (as measured by
settling time, peak time, and rise time) and the bandwidth of the closed-loop
frequency response.
69
The bandwidth of a two-pole system BW n (1 2 2 ) 4 4 4 2 2
n2
M T ( j )
(n2 2 ) 2 4 2n2 2
n2 1
M
( ) 4 BW
2
BW 2 2 2 2 2 2
n BW n
n4 1
; BW 2n [1 2 ]BW n4 0
2
4 2 2
( ) 4 BW
2
2 2 2 2 2
n BW n
2
' n4 [1 2 2 ]2 n4 n4 (1 4 2 4 4 ) n4 n4 ( 4 4 4 2 2)
' n2 ( 4 4 4 2 2)
BW n2 [1 2 2 ] n2 ( 4 4 4 2 2) n2 [(1 2 2 ) ( 4 4 4 2 2) ]
2
BW n (1 2 2 ) ( 4 4 4 2 2)
70
Relate to settling time Ts
BW
zeta=0:0.05:1;
wbw_ts=(4./zeta).*sqrt(1- BW n (1 2 2 ) ( 4 4 4 2 2)
2*zeta.^2+sqrt(4*zeta.^4-4*zeta.^2+2));
plot (zeta,wbw_ts); 4 4
Ts ; n
n Ts
4
BW (1 2 2 ) ( 4 4 4 2 2)
Ts
140
120
100
80
BWTs
60
40
20
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Damping ratio 71
BW n (1 2 2 ) ( 4 4 4 2 2) Relate to BW
settling time Tp
Tp ; n ;
d Tp 1 2
BW (1 2 2 ) ( 4 4 4 2 2)
Tp 1 2
zeta=0:0.05:1;
6.5
wbw_tp=(3.1416./…
sqrt(1-zeta.^2)).*…
6
sqrt(1-2*zeta.^2+…
wBWTp
5.5 sqrt(4*zeta.^4-4*zeta.^2+2));
plot (zeta,wbw_tp);
5
4.5
4
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Damping ratio 72
BW n (1 2 2 ) ( 4 4 4 2 2)
nTr 1.76 3 0.417 2 1.039 1
BW Tr (1.76 3 0.417 2 1.039 1) * (1 2 2 ) ( 4 4 4 2 2)
2.3
2.2
2.1
wBWTr
1.9
1.8
1.7
1.6
1.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Damping ratio
zeta=0:0.05:1;
wbw_tr=(1.76*zeta.^3-0.417*zeta.^2+1.039*zeta+1).*…
sqrt(1-2*zeta.^2+sqrt(4*zeta.^4-4*zeta.^2+2));
plot (zeta, wbw_tr);
73
Relation Between Closed- and Open-Loop Frequency Responses
The frequency at which the maximum value of C( jω)/R( jω) occurs is referred to as the (peak) resonant
frequency ωm. The maximum value is labeled Mm. compensation to improve system performance is based
upon knowledge of ωm and Mm.
M2 M2 M4 M2 2 M2
[ 2 ] ; [ P ( ) 2 ] Q ( )
2
;
M 1 ( M 2 1) 2 ( M 2 1) 2 M 1 ( M 2 1) 2
-3
-6 -4 -2 0 2 4 6
78
Constant Phase Loci (N circles)
C ( j ) P ( ) jQ ( )
T ( j )
R ( j ) 1 P ( ) jQ ( )
• The phase angle of closed loop transfer function is
j P ( ) jQ ( )
e
1 P ( ) jQ ( )
• The phase angle α is
Q ( ) Q ( )
tan ( 1 1
) tan ( )
P ( ) 1 P ( )
79
Q ( ) Q ( )
tan (1 1
) tan ( )
P ( ) 1 P ( )
• If we define
tan N
• then
1 Q ( ) 1 Q ( )
N tan tan ( ) tan ( )
P ( ) 1 P ( )
• We obtain Q Q
N P 1 P
Q Q
1
P 1 P 80
Q Q
N P 1 P 2
Q Q
; N ( P 2
P Q 2
) Q ; P 2
P Q 2
0
1
Q Q P P Q 2
N
P 1 P
1 1
Adding 2 to both sides
4 4N
1 1 1 1 1
P P Q Q
2 2
2
4 N 4N 4 4N 2
2 2
1 1 1 1
P Q
2
2 2 N 4 4 N
This is an equation of circle with
1 1
( xq , y q ) ,
2 2N
1 1
rq
4 4N 2 81
tan N The constant α contour is only an arc of the circle.
As an example, the αq+ = −310° and αq- =−130° arcs are part
1 1
( xq , y q ) , of the same circle. (tan αq+= tan αq-=N)
2 2 N
1 1
rq
4 4N 2 For all points on the αq arc, yields the same phase angle αq, that is,
A( j ) B( j ) q
82
Arcs of constant α. (a) Arcs for α = –310° and –130°. (b) Constant α contours.
3
-1
-2
-3
-2 -1.5 -1 -0.5 0 0.5 1
-1
-2
-3
-4
-5 -4 -3 -2 -1 0 1 2 3 84
The closed-loop magnitude
frequency response can now be
obtained by finding the intersection
of each point of the Nyquist plot
with the M circles.
While the closed-loop phase
response can be obtained by finding
the intersection of each point of the
Nyquist plot with the N circles.
The result is shown in the Figure.
1.5
numg=50; 0.5
Imaginary Axis
deng=poly([0 -3 -6]); 0
System: T
Real: 1.04
Imag: -0.44
G=tf(numg,deng); Frequency (rad/s): 1.01
-0.5
T=feedback(G,1); System: T
System: T
Real: 0.711
-1
nyquist(T); Real: -0.345
Imag: -1.63
Imag: -1.43
Frequency (rad/s): 2
Frequency (rad/s): 2.5
-1.5
-2
-1 -0.5 0 0.5 1 1.5 85
Real Axis
Tangents to the M Circles
M2 M
( xo , yo ) 2 ,0 ; ro 2
M 1 M 1
ob xo ; bc ro ;
oa 2 oc 2 ac 2 oc 2 (oc sin ) 2 oc 2 (1 sin 2 )
M
bc M 2 1 1
sin
ob M2 M
M 2 1
M4 M2 M2
oc ob bc
2 2 2
2
( M 1) ( M 1)
2 2 2 2
M 1
M2 1 M 2 M 2 1
oa oc (1 sin ) 2 [1 2 ] 2 [
2 2 2
] 1
M 1 M M 1 M 2
86
CONSTANT 1/M AND α CONTOURS (UNITY FEEDBACK) IN THE INVERSE POLAR PLANE
87
Contour for a particular magnitude Typical M and α contours on the inverse
R( jω)/C( jω) = 1/Mq. polar plane for unity feedback
1
ab M 1
sin
ob 1 M
88
GAIN ADJUSTMENT OF A UNITY-FEEDBACK SYSTEM FOR A DESIRED Mm: DIRECT POLAR PLOT
89
It is possible to determine the required gain to achieve a desired Mm for a given system by
the following graphical procedure:
Step 1. If the original system has a transfer function
K x (1 jT1 )(1 jT2 )...
Gx ( j ) K x x ( j )
G '
with an original gain Kx, only the frequency-sensitive portion G’x ( j) is plotted.
Step 2. Draw the straight line at the angle ψ = sin−1 (1/Mm), measured from the negative
real axis.
Step 3. By trial and error, find a circle whose center lies on the negative real axis and is
simultaneously tangent to both the G’x ( j) plot and the line drawn at the angle ψ.
Step 4. Having found this circle, locate the point of tangency on the ψ-angle line. Draw a
line from the point of the tangency perpendicular to the real axis. Label the point where
this line intersects the real axis as a′.
Step 5. For this circle to be an M circle representing Mm, the point a′ must be the −1 + j0
point. Thus, the x′, y′ coordinates must be multiplied by a gain factor Km in order to
convert this plot into a plot of G( jω). From the graphical construction the value Km is
1/oa′.
1 1
K1 2.94
oa ' 0.34
The additional gain required is
K1 2.94
A 2 .0
K x 1.47
91
w=0:0.1:100;
G=(1)./(j*w.*(1+0.25*j*w).*(1+0.1*j*w));
plot(real(G),imag(G));
for r = [0.2 0.4 0.6 0.8 1]
my_circle(0,0,r);
end
hold on;
psi=asind(1/1.3);
x=-1:0.1:0;
plot(x,x*tand(psi));
M=1.3; 1
xc=-M.^2/(M.^2-1); 0.8
yc=0;
r=M./(M.^2-1); 0.6
my_circle(xc,yc,r); 0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
92
w=0:0.1:100;
G=(1)./(j*w.*(1+0.25*j*w).*(1+0.1*j*w));
plot(real(G),imag(G));
for r = [0.2 0.4 0.6 0.8 1]
my_circle(0,0,r);
end
hold on; psi=asind(1/1.3);
x=-1:0.1:0; plot(x,x*tand(psi));
M=1.3; xc=(-M.^2/(M.^2-1))/(1.47*2);
yc=0; r=M./(M.^2-1)/(1.47*2);
my_circle(xc,yc,r);
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
93
w=0:0.1:100;
G=(1.47*2)./(j*w.*(1+0.25*j*w).*(1+0.1*j*w));
plot(real(G),imag(G));
for r = [0.2 0.4 0.6 0.8 1]
my_circle(0,0,r);
end
hold on;
psi=asind(1/1.3);
x=-1:0.1:0; 1
plot(x,x*tand(psi));
M=1.3; 0.8
xc=-M.^2/(M.^2-1);
yc=0;
r=M./(M.^2-1); 0.6
my_circle(xc,yc,r);
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
94
CONSTANT M AND α CURVES ON THE LOG MAGNITUDE–ANGLE DIAGRAM (NICHOLS CHART)
A constant M circle is shown in the Figure on the inverse polar plot. The magnitude ρ and
angle λ drawn to any point on this circle are shown. The equation for this M circle is
1
y 2 (1 x ) 2
M2
x cos ; y sin
M 2 2 2 M 2 cos M 2 1 0
M 2
1
cos cos2
M2
1 1 M M
2 2 2
cos ( )
2 M 2
These equations are derived from the inverse polar plot 1/G( jω), a change in the
equations must be made by substituting
1
r ;
95
Consider a unity feedback system with open- 10
loop transfer function G( s)
s( s 5)
Nichols Chart
20 20
10 10
0 0
Open-Loop Gain (dB)
-10 -10
-20 -20
-30 -30
-40 -40
-50 -50
-180 -150 -120 -90 -180 -170 -160 -150 -140 -130 -120 -110 -100 -90
Open-Loop Phase (deg)
s = tf('s'); w=0.5:0.1:50;
G = 10/(s*(s+5)); G=10./((j*w).*(j*w+5));
w = 0.5:0.1:50; lm_mag=20*log10(abs(G));
nichols(G,w); phase_deg=angle(G)*180/pi;
figure
plot(phase_deg,lm_mag);
96
ngrid;
Nichols Chart
40 40
0 dB
30 0.25 dB 30
0.5 dB
20 1 dB 20
-1 dB
10 3 dB 10
Open-Loop Gain (dB)
6 dB -3 dB
0 -6 dB 0
-20 -20 dB
-20
-30
-30
-40 -40 dB
-40
-50
-50
-60 dB
-60
-360 -315 -270 -225 -180 -135 -90 -45 0 -60
-350 -300 -250 -200 -150 -100 -50 0
Open-Loop Phase (deg)
lamda=0:1:360;
w=0.5:0.1:50; G=10./((j*w).*(j*w+5)); for M=[0.891 0.708 0.501 0.251 0.100 0.010 0.001]
lm_mag=20*log10(abs(G)); phase_deg=angle(G)*180/pi; rho_t=-cosd(lamda)+sqrt((cosd(lamda)).^2-((M^2-1)/M^2));
Figure; plot(phase_deg,lm_mag); rho=abs(rho_t); rho=20*log10(rho); hold on; plot(-lamda,-rho);
lamda=90:1:270; %M=2 lmM=6dB end
for M=[2 1.41 1.122 1.059 1.029 1] for alpha=[0 -20 -40 -60 -80 -100 -120 -140 -160] ;
rho_t=-cosd(lamda)+sqrt((cosd(lamda)).^2-((M^2-1)/M^2)); lamda=180:-1:-alpha;
rho=abs(rho_t); rho=20*log10(rho); rho=-tand(alpha)./(sind(lamda)+cosd(lamda)*tand(alpha));
hold on; plot(-lamda,-rho); rho=20*log10(abs(rho)); hold on; plot(-lamda,-rho);
rho_t=-cosd(lamda)-sqrt((cosd(lamda)).^2-((M^2-1)/M^2)); end
rho=abs(rho_t); rho=20*log10(rho); for alpha=[-180 -200 -220 -240 -260 -280 -300 -320 -340] ;
plot(-lamda,-rho); lamda=180:1:-alpha;
end rho=-tand(alpha)./(sind(lamda)+cosd(lamda)*tand(alpha));
rho=20*log10(abs(rho)); hold on; plot(-lamda,-rho);
end 97
Nichols chart with frequency response for G= K/s(s=1)(s+2)
superimposed. Values for K = 1 and K = 3:16 are shown
If the gain is increased by 10 dB, simply raise the curve for K = 1 by 10 dB and obtain
the curve for K = 3.16(10 dB).
98
G=1/(s*(s+1)*(s+2));
ltiview
99
G=3.16/(s*(s+1)*(s+2));
ltiview
100