Professional Documents
Culture Documents
5.0 Frequency Response
5.0 Frequency Response
OBJECTIVE
- Bode and Nyquist plots for control analysis
- Determination of transfer function
- Gain and Phase margins
~.
Y (s)
G ( s)
R( s)
By replacing s j
R(s)
G ( s)
and its phase angle
G (s )
Y(s)
Y ( s)
R(s)
Y ( j )
R ( j )
G ( s) Y ( s) R( s)
o (s)
( s z1 ) ( s z 2 ).....( s z m )
G( s)
K
i (s)
( s p1 ) ( s p 2 ).....( s p n )
G ( j ) G ( j )
Example
i (s)
G (s )
o (s )
i ( j ) a0
o (s)
G(s)
i ( s)
o ( j ) G ( j ) a0 a G ( j )
In time domain which give the time response of the system, the output is
o (t ) a G ( j ) sin(t )
i (t ) a sin t
First order
Transfer function
G (s)
Frequency response
K
s 1
s j
by replacing
G ( j )
1
j 1
Its magnitude
G ( j )
1
1 2 2
1
tan ( )
1
tan 1
Second order
Kn2
G ( s) 2
s 2n s n2
Frequency response by replacing s j
Transfer function
G ( j )
1 n 2 j 2 n
2 2
Its magnitude
G ( j )
1 2
2 2
2 n
tan 1
2
1 n
2 n 2
Higher Order
Cascade form
G ( s ) G1 ( s )G2 ( s ).....Gn ( s )
G ( j ) G1 ( j )G2 ( j ).....Gn ( j )
Or in phasor form
G ( j ) G1 ( j ) 1 G2 ( j ) 2 ..... Gn ( j ) n
G1 ( j ) G2 ( j ) .... Gn ( j ) (1 2 .... n )
Example:
Find the frequency response of the following transfer function
G ( s)
5
s 3 6 s 2 33s 50
G ( s ) G1 ( s )G2 ( s )
Where
G1 ( s)
0.2
0.1
25
and G2 ( s ) 2
s 2 0.5s 1
s 4s 25
G1 ( j )
0.1
1 2 0.5 2
G 2 ( j )
and
0.1
1 0.25 2
1 5
2 2
and
1 ( j ) tan 1 ( 0.5 )
1
2(0.4) 5 n
1 5
2 2
1
2(0.4) 5 n
2(0.4) 5
2 ( j ) tan 1
G ( j ) G1 ( j ) 1 ( j ). G2 ( j ) 2 ( j )
G1 ( j ) . G2 ( j ) 1 ( j ) 2 ( j )
1 5
Bode Plot
Consider higher order system
G ( j ) G1 ( j ) 1 ( j ). G2 ( j ) 2 ( j )...... Gn ( j ) n ( j )
Logarithmic form
( j ) 1 ( j ) 2 ( j )..... n ( j )
Plot Bode
M a g n itu d ( d B )
1
0.5
0
-0.5
S u d u t f a s a ( d a r ja h )
-1
1
0.5
0
-0.5
-1
-1
10
10
10
Frekuensi (rad/sec)
10
G ( s) K
Log magnitude in dB
LM 20 log K
Its phase angle
0
Let K=200
>> bode([200],[1]);grid
M a g n itu d ( d B )
47.5
47
46.5
46
45.5
S u d u t f a s a ( d a r ja h )
45
1
0.5
0
-0.5
-1
-1
10
10
10
Frekuensi (rad/sec)
10
G (s) 1 s
G ( s j ) 1 ( j )
Log magnitude in dB
LM (dB)
(rad.s 1 )
1
10
-20
102
-40
103
-60
LM 20 log1 20 log( )
(rad.s 1 )
LM (dB)
10-1
20
10-2
40
10-3
60
(rad.s 1 )
LM (dB)
-6
22
-12
23
-18
tan 1 0 tan 1 () 90
>>bode([1],[1 0]);grid
M a g n itu d ( d B )
20
10
0
-10
-20
-30
S u d u t f a s ( d a r ja h )
-40
-89
-89.5
-90
-90.5
-91
-1
10
10
10
Frekuensi (rad/sec)
10
G (s)
1
s 1
Frequency response
G ( j )
1
j 1 1 j
j 1 j 1 1 2 2
Logarithmic magnitude in dB
Phase angle
LM 20 log
1
2
20 log 1 2 2
tan 1 1 tan 1 ( )
c 1
0 .1
LM 20 log1 0
and
0
For high frequency,
LM 20 log
and
tan 1 () 90
1
s 1
The actual Bode plot can be obtained by using the exact equation for the log magnitude
and phase angle. There are small differences between the actual and approximate
as shown by the following table
Using MATLAB we can display the Bode plot of an open-loop transfer function of
G (s)
1
s 1
Actual and approximate value of log magnitude for an open-loop transfer function of
1
G(s)
s 1
for a frequency range between 0.1-20 rad/s
Actual and approximate value of phase angle for an open-loop transfer function of
1
G(s)
s 1
for a frequency range between 0.1-20 rad/s
1
LM 20 log
20 log 2 3 dB
11
tan 1 1 1 45
K n2
s 2 2 n s n2
2 2
LM 20 log G ( j ) 20 log
2 n
tan 1
1 n
2
2 n 2
LM 20 log1 0
n 1
tan 1 (0 1) 0
and
n
We define the low frequency as a tenth of the corner frequency i.e. 10
For high frequency n 1
LM 20 log n 2 40 log n
and
180
2
tan 1
While the high frequency as ten time of the corner frequency i.e. 10 n
Based on straight line approximation the Bode plots for LM and phase angle are shown
G (s)
for
1
s 2 2 n s n2
n 1
and
In MATLAB
Example
Go (s )
_
5000( s 4)
s ( s 10)( s 200)
1/s
500
s+4
1
s 10
1
s 200
.
.
1 .
.
10 200 j 4
j 1 j 1
10
200
1 j
1
1
.
10.
1 .
.
j 1 j 1
j 4
10
200
G o ( j )
LM (0.1) 20 log 10
40 dB
0.1
(0.1) 90
For the magnitude polot of the Bode plot, we build a table to tshow the contribution of
gradient/slope by the zero and poles at respective corner frequencies. The pole at origin
will provide a slope of -20db/decade for all range of frequency
- For the phase plot, we need to know the change of gradient of the phase at low and high
frequencies of respective corner frequency
- The pole at the origin does not contribute to gradient of the phase angle as its phase angle is a
constant 90o
LM 1
LM (dB/dec)
LM 2
log 1
LM 2 LM 1
LM
log 2 log 1
LM 2 LM 1 LM log 2 log 1
log 2
1
2
log 1
log 2
2 1
log 2 log 1
2 1 log 2 log 1
Bode plot for the magnitude and phase using straight line approximations
K y 36
dB
Ky
20 log K K y
K y 36 dB
36
K antilog
63.1
20
(rad.s-1)
Pole/zero at origin
Example:
If
LM 40 dB/decade.
dB
Ky
LM 40 dB/dekad
1
K
s2
K
Ky
20 log
2
We know 1 10 rad.s-1, K y 10 dB
10
K 10 2 antilog
31.6
20
(rad.s-1)
Real pole/zero
Example:
dB
LM 1 20 dB/dekad
45
LM 2 40 dB/dekad
0.01
40
250
(rad.s-1)
LM 3 20 dB/dekad
1
250
j
1
40
K
45
0
.
01
LM (0.01) 20 log
45
1.78
20
K 10 2 antilog
1.76
1
250 0.28( s 250)
s ( s 40)
s
s
1
40
dB
60
LM 1 40 dB/dekad
(rad.s-1)
0.1
50
400
LM 2 60 dB/dekad
2
1 1 50 j 2 50
400
K " K n2
LM (0.1) 20 log( K " ) 60
60
K " antilog
1000
20
K
1000
0.4
2
50
0.4 400
( s 400) s 2 2(50)(0.5) s 50 2
160
( s 400) s 2 50 s 2500
G ( s)
Nyquist Plot
G ( j )
G ( j 0)
G ( j 1 )
G ( j )
( j )
( j 0)
( j 1 )
( j )
(rad.s-1)
However we can obtain the sketch of the plot by obtaining the following vectors:
(i)
at
(ii)
at
(iii)
at 0 or 180
(iv)
First order
G(s)
K
s 1
Frequency response
G ( j )
K
1 j
K
j 1
1 2 2
Magnitude
G ( j )
K
1 2 2
Phase angle
tan 1 ( )
dan
(i) At ,
0, , G ( j )
tan 1 (0) 0
(ii) At
K
K and
1 0
, G ( j ) 0
dan
270
(iii) No crossing in the real axis as
G ( j ) 2 2 K
is a circle.
1
tan . i.e. tan 1 90 or
1
tan 1
, 90
90
Example:
Nyquist plot of G ( s )
G (s)
20
s4
5
0.25s 1
Frequency response
G ( j )
5
1 0.0625
,1
5
G
(
j
0
)
0
At
1 0
At
G ( j )
and
tan 1 (0) 0
1
0 and tan 1
tan 90
1
1
System: sys
Real: 3.64
Imag: 2.22
Freq (rad/sec): -2.45
System: sys
Real: 0.917
Imag: 1.93
Freq (rad/sec): -8.46
System: sys
Real: 0.000335
Imag: -0.0409
Freq (rad/sec): 489
0.5
0
-0.5
System: sys
Real: 5
Imag: 0
Freq (rad/sec): 0
System: sys
Real: 4.52
Imag: -1.47
Freq (rad/sec): 1.3
-1
System: sys
Real: 1.24
Imag: -2.16
Freq (rad/sec): 6.98
-1.5
-2
-2.5
-1
2
Paksi Hakiki
Nyquist Diagram
1
0.8
0.6
Imaginary Axis
0.4
0.2
0
-0.2
-0.4
-0.6
1 G ( j) H ( j)
-0.8
-1
-1
-0.8
-0.6
-0.4
-0.2
0
Real Axis
0.2
0.4
0.6
0.8
Second Order
n2
G ( s) K 2
s 2 n s n2
Frequency response
G ( j )
1 j 2
2
Rearrange
G ( j )
j 2
2
n
Magnitude
1
G ( j )
2
1
Phase angle
tan 1
2
1
(i) at
(ii) At
0,
G ( j ) 1 and 0
, G ( j ) 0
180 .
2
1
and tan 1
(iv) Crossing of the imaginary axis when 1
n
G ( j n )
1
2
and tan 2 0 90
1
0,
Example:
1
(2s 1)( s 2 s 1)
G (s)
Frequency response
G ( j )
1
1
( j 2 1)(1 2 j ) (1 3 2 ) j (3 2 3 )
(1 3 2 ) j (3 2 3 )
(1 3 2 ) 2 (3 2 3 )2
Magnitude
G ( j )
1
(1 3 2 )2 (3 2 3 )2
Phase angle
3 2 3
tan
2
1 3
0 G( j 0) 1 and 0
(ii) At , G ( j) 0 and tan 1
(i) At ,
3
270
2
1
Magnitude G ( j1.2)
1
(1 31.2 ) 0
G ( j 0.6)
3 2 3 0 ,, 0 dan
2 2
3 2 1.2
rad.s-1 or
0.3
1 3 2 0 , 1
1
0 ( 3 2 3 3)
0.7
dr1=[2 1];
dr2=[1 1 1];
dr=conv(dr1,dr2);
nr=1;
nyquist(nr,dr)
=0.6 rad.s-1
1.2
Pa ks i K h a y a li
0.4
System: sys
Real: -0.297
Imag: 0.0104
Freq (rad/sec): -1.21
0.2
0
System: sys
Real: 0.999
Imag: 0.00365
Freq (rad/sec): -0.00126
-0.2
-0.4
System: sys
Real: -0.00357
Imag: -0.74
Freq (rad/sec): 0.579
-0.6
-0.8
-1
-0.8
-0.6
-0.4
-0.2
0
Paksi Hakiki
0.2
0.4
0.6
0.8
Nyquist Path
For Nyquist path
s-plane
Contour of
1 G ( s) H ( s)
s j to become 1 G ( j ) H ( j )
till by replacing
However
G ( j ) H ( j ) 1 1 G ( j ) H ( j ) 1 F ( j )
Hence on F(j)-plane, we represent GH(j)-plane to plot
GH(j)-plane
-1+j0
G ( j ) H ( j )
1 G ( j ) H ( j )
1 G ( j ) H ( j )
Z NP
where
Z = Number of zeros
F (s)
1 j0
G ( s) H ( s)
Consider
G (s) H (s)
K ( s 2)
( s 1) 2
Hence the system has 1 closed-loop pole on the right of the imaginary axis
j0
Gain margin, GM
1
G ( j )
GM (dB) 20 log G ( j )
G ( j ) H ( j )
is 180 o
G ( j ) H ( j )
1 GM G ( j )
on the GH ( j ) -plane
180
180
180
1
G ( j p )
20 log G( j )
p
j
p
GH(j)-plane
1/GM
-1+j0
G ( j g ) 1
g
G ( j p )
GH(j)-plane
-1+j0
G ( j g ) 1
Unit circle
G ( j g ) 1 will give phase angle of G ( j g ) hence the phase margin
GH(j)-plane
-1+j0
180 negative
Example:
For
K 8
, shows the Nyquist plot and its respective gain and phase margin
+
-
5K
s 2 4s 7
1
s3
GOL ( s )
5K
( s 3)( s 2 4 s 7)
Frequency response
G ( j )
5K
5K
Magnitude
G ( j )
5K
(21 7 2 ) 2 2 (19 2 ) 2
Phase angle
(19 2 )
tan
2
(21 7 )
1
(i) At,
G ( j 0)
(ii) At,
5(8)
0
1.9 and ( j 0) tan 1 0
21
21
3
5(8)
1
270 90
G ( j)
0 and ( j) tan
2
then G ( j 19 )
5(8)
2
(21 7 19) 0
0.36
3 rad .s 1 then
G( j 3)
nr=40;
dr1=[ 1 3];
dr2=[1 4 7];
dr=conv(dr1,dr2);
nyquist(nr,dr)
5(8)
0 3(19 3)
1.44
1 GM G ( j )
G ( j )
180
180
G ( j 19 ) 0.36
GM 20 log G ( j )
180
20 log(0.36) 8.87 dB
(rad.s-1)
GM
LM p
PM
-180
GM gain margin
PM phase margin
GM
0
(rad.s-1)
-180
PM
Note that, negative gain or phase margin means that the system is not stable
Example:
If Gc ( s ) 1
+
-
Gc
K
s ( s 2)(s 40)
Frequency response
96
j
j
2 40 ( j )
1
1
2
40
1.2
j
j
( j )
1
1
2
40
G ( j )
LM ( j ) 20 log
( )
1.2
40
22 dB and ( j 0.1) 90
(0.1)
LM ( j 0.1) 20 log
0.1
40
kutub orijin
1
s
(dB/dekad)
-20
-20
-20
kutub hakiki
1
s2
(dB/dekad)
-20
-20
kutub hakiki
-20
-20
-40
-60
1
s 40
(dB/dekad)
Total slope
dB/decade
(rad.s-1)
0.1
0.2
20
400
kutub hakiki
-45
-45
-45
-45
-45
-90
-45
1
s2
kecerunan
(darjah/dekad)
kutub hakiki
1
s 40
kecerunan
(darjah/dekad)
jumlah
kecerunan
(darjah/dekad)
Table for phase angle slope from the two poles, notes that the pole at
origin does not contribute to the slope as the angle is constant -90 o
LM 2 LM 1
LM
log 2 log 1
LM (dB/dekad)
LM 2 LM 1 LM log 2 log 1
LM 2
log 1
log 2
0.1
40
400
1000
Total slope
(dB/dec)
-20
-40
-60
-60
-60
LM (dB)
22
-4
-56
-116
-140
1
2
log 1
2 1
log 2 log 1
2 1 log 2 log 1
log 2
(rad.s-1)
0.1
0.2
20
400
1000
Total slope
(deg/dec)
-45
-90
-45
-90
-90
-149
-212
-271
-271
(deg)
50
0
GM
-50
-100
-150 -1
10
10
10
10
10
-50
-100
-150
PM
-200
-250
-300 -1
10
wp
0
10
wg
10
10
10
p 8.5 rad.s 1
g 1.3 rad.s 1
PM 50
GM 30 dB
50
0
GM
-50
-100
-150
-90
-135
PM
-180
-225
-270
Wg
-1
10
10
Wp
1
10
>>[GM,PM,Wg,Wp] = margin(sys)
10
10