Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 80

Frequency Response

OBJECTIVE
- Bode and Nyquist plots for control analysis
- Determination of transfer function
- Gain and Phase margins

- Stability in frequency response

~.

Magnitude and Phase Angle


Transfer function is

Y (s)
G ( s)
R( s)
By replacing s j

R(s)

we can find its magnitude

G ( s)
and its phase angle

G (s )

Y(s)

Y ( s)
R(s)

Y ( j )
R ( j )

G ( s) Y ( s) R( s)

Higher order transfer function

o (s)
( s z1 ) ( s z 2 ).....( s z m )
G( s)
K
i (s)
( s p1 ) ( s p 2 ).....( s p n )

Can be presented in magnitude-phase form as

G ( j ) G ( j )

Example

i (s)

G (s )

o (s )

A system with transfer function of G(s) is subjected to a sinusoidal input.


Determine the time response of the system.
Solution
The input in phasor form (manitude-phase form) can be presented as
As the transfer function is

i ( j ) a0

o (s)
G(s)
i ( s)

Hence the output is by replacing s j

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

and phase angle


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

and phase angle

2 n

tan 1

2
1 n

2 n 2

Higher Order
Cascade form

G ( s ) G1 ( s )G2 ( s ).....Gn ( s )

Frequency response by replacing s j

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

Respective magnitude and phase angle

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

log G ( j ) log G1 ( j ) log G2 ( j ) .... log Gn ( j )


In dB.

LM 20 log G ( j ) 20 log G1 ( j ) 20 log G2 ( j ) .... 20 log Gn ( j )


Phase angle

( 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

Bode Plot for constant gain

G ( s) K
Log magnitude in dB

LM 20 log K
Its phase angle

0
Let K=200

>> bode([200],[1]);grid

Plot Bode G(s)=200

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

Bode Plot of pole on the origin

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

Slope of 20dB/decade or 6dB/octave.


Its phase angle

tan 1 0 tan 1 () 90
>>bode([1],[1 0]);grid

Plot Bode G(s)=1/s

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

Bode Plot for Real Pole

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 ( )

The corner frequency is

c 1

0 .1

For low frequency,

LM 20 log1 0
and

Can also be defined as a tenth of the corner frequency i.e.

0
For high frequency,

Can also be defined as a tenth of the corner frequency i.e. 10

LM 20 log
and

tan 1 () 90

A straight line approximation for a first order system of transfer function G ( s )

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

And the MATLAB command used is given by


nr=[1];
dr=[1 1];
sys=tf(nr,dr)
bode(sys)

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

Bode Plot for Complex poles


G( s)

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

Is the corner frequency

For low frequency ,

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

We can observe the Bode plots in MATLAB by considering

G (s)
for

1
s 2 2 n s n2

n 1

and

0.25, 0.5 and 0.75

In MATLAB

>>zeta=0.25;wn=1;num=[1];den1=[1 2*zeta*wn wn*wn];


sys1=tf(num,den1);
>>zeta=0.5;wn=1;num=[1];den2=[1 2*zeta*wn wn*wn];
sys2=tf(num,den2);
>>zeta=0.75;wn=1;num=[1];den3=[1 2*zeta*wn
wn*wn];sys3=tf(num,den3);
>> bode(sys1,sys2,sys3);grid

Example

Obtain the bode plot of the following block diagram if Go ( s )

Go (s )
_

5000( s 4)
s ( s 10)( s 200)

1/s

500

s+4

1
s 10

1
s 200

By replacing with s=j and making the open-loop transform function


into corner freqeuncy form
5000 4 1 j
1
1

.
.
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 )

The intial LM and phse at strat frequency is given by

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

The LM vs freq. plot can be determined the LM value at the corner


frequency, this can be obtained by simple trigonometry

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

Using the trigonometrys formula, we tabulate the values at the initial,


corner frequencies and final value.

As for the LM slope, we apply a trignometrys formula to obtain the


phase angle slope at the low and high frequency for each corner
frequency as in table below
(deg/decade)

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

We can obtain the actual Bode plot using MATLAB as


>>bode([5000 20000],[1 210 2000 0],{10^-1,10^4});

Determination of transfer function


Constant gain
Example:
If

K y 36

dB, determine the ransfer function.

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

1 10 rad.s-1, K y 10 dB and slope of

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

Pair of complex poles


Example:
Assume damping ratio of 0.5.

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

Nyquist plot is a plot of magnitude, G( j


0 on s-plane.

and phase angle ( j ) for frequency

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)

at 90 , crossing on the imaginary axis

, crossing on the real axis

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

(iv) No crossing in the imaginary axis as


2

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

and tan (0.25,)

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

>> nyquist([5],[.25 1])

Plot Nyquist G(s)=5/(0.25s+1)


2.5
2
1.5
1

Paks i Khay ali

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

(iii) No crossing on the real axis.


(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

(iv) Imaginary crossing at


Magnitude

G ( j 0.6)

3 2 3 0 ,, 0 dan

(iii) Real axis crossing at

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

Plot Nyquist G(s)=1/(2s+1)(s 2+s+1)


0.8
0.6

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)

which will give the closed loop poles for

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 )

Nyquist Stability Criterion


The criteria states that the number of closed poles of a system is equal to the number of
open-loop, G(s)H(s), zeros plus the number of encirclements in the clockwise direction by
the Nyquist plot of the open-loop, G(s)H(s).
Or, it can be represented in mathematic form as

Z NP
where
Z = Number of zeros

F (s)

on the right-half plane of j-axis, where . F ( s ) 1 G ( s) H ( s )

N = Number of clockwise encirclement of


P = Number of open-loop poles

1 j0

G ( s) H ( s)

on the right-half plane of j-axis.

Consider

G (s) H (s)

K ( s 2)
( s 1) 2

, applying the Nyquist stability criteria Z=N+P=1+0=1

Hence the system has 1 closed-loop pole on the right of the imaginary axis

Is the measure of instability from 1

j0

Phase crossover frequency, p


Frequency where the phase angle of
Gain crossover frequency,

Gain margin, GM

1
G ( j )

GM (dB) 20 log G ( j )

G ( j ) H ( j )

is 180 o

G ( j ) H ( j )

Frequency where the magnitude of

1 GM G ( j )

on the GH ( j ) -plane

180

180

180

1
G ( j p )

20 log G( j )
p

Gain margin margin in Nyquist Plot

j
p

GH(j)-plane

1/GM

-1+j0
G ( j g ) 1

g
G ( j p )

Phase margin in Nyquist Plot

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

Phase margin, 180

Negative gain and phase margins in Nyquist Plot


G ( j p )

GH(j)-plane

-1+j0

As G ( j p ) 1 , the gain margin GM (dB ) 20 log G ( j p ) negative


As 180, the phase margin

180 negative

Example:
For

K 8

, shows the Nyquist plot and its respective gain and phase margin

+
-

5K
s 2 4s 7
1
s3

Open loop transfer function

GOL ( s )

5K
( s 3)( s 2 4 s 7)

Frequency response

G ( j )

5K
5K

( j 3)(7 2 j 4) (21 7 2 ) j (19 2 )

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

(iii) Real crossing, when . (19 2 ) 0


19 rad .s

then G ( j 19 )

5(8)
2

(21 7 19) 0

0.36

(iv) Imaginary crossing, when 21 7 2 0

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

Positive gain and Phase margins in Bode plot


LM (dB)

(rad.s-1)

GM

LM p

PM

-180

GM gain margin
PM phase margin

g - Gain crossover frequency


p - Phase crossover frequency

Negative gain and Phase margins in Bode plot


LM (dB)

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

dan K=96 determine gain and phase crossover frequencies.

Consequently what is the system gain and phase margin.

+
-

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

( j ) 90 tan 1 (0.5 ) tan 1 (0.025 )


1.2

22 dB and ( j 0.1) 90

(0.1)

LM ( j 0.1) 20 log

Table of LM slope for the 3 poles


(rad.s-1)

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

To obtain the LM vs freq. plot, we determine the LM value at the corner


frequency, this can be obtained by simple trignometry
LM 1

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

Using the trignometrys formula,


(rad.s-1)

0.1

40

400

1000

Total slope
(dB/dec)

-20

-40

-60

-60

-60

LM (dB)

22

-4

-56

-116

-140

As for the LM slope, we apply a trignometrys formula to obtain the


phase angle slope at the low and high frequency for each corner
frequency as in table below
(deg/decade)

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

>> bode([96],[1 42 80 0])

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

>> num=[96];den=[1 42 80 0];


>> sys=tf(num,den);
>> [GM,PM,Wg,Wp] = margin(sys)
Gm = 35.0000
Pm = 60.5601
Wg = 8.9443
Wp = 1.0599

>> Gm_dB = 20*log10(Gm)


Gm_dB = 30.8814

You might also like