Lecture 24 Examples of Bode Plots - IIT Bombay

82
Lecture 24 Examples of Bode Plots Process Control Prof. Kannan M. Moudgalya IIT Bombay Thursday, 26 September 2013 1/47 Process Control Examples of Bode Plots

Transcript of Lecture 24 Examples of Bode Plots - IIT Bombay

Page 1: Lecture 24 Examples of Bode Plots - IIT Bombay

Lecture 24Examples of Bode Plots

Process ControlProf. Kannan M. Moudgalya

IIT BombayThursday, 26 September 2013

1/47 Process Control Examples of Bode Plots

Page 2: Lecture 24 Examples of Bode Plots - IIT Bombay

Outline

1. First order transfer function - recall

2. Gain, integral and derivative

3. Adding Bode plots3.1 Two first order systems in series3.2 Lead transfer function3.3 First order system with delay

2/47 Process Control Examples of Bode Plots

Page 3: Lecture 24 Examples of Bode Plots - IIT Bombay

Recall: First order transfer function

I G(s) =1

τ s + 1, G(jω) =

1

jωτ + 1

I |G(jω)| =1

√ω2τ 2 + 1

I ω � 1, |G(jω)| = 1,

M = 20 log |G(jw)| = 0

I Asymptote is M = 0

I ω � 1, |G(jω)| =1

ωτ, M = −20 logωτ

I Asymptote is M = −20 logωτI ω = ω1 ⇒ M = −20 logω1τI ω = 10ω1 ⇒ M = −20 logω1τ − 20I Slope of −20 dB per decade

3/47 Process Control Examples of Bode Plots

Page 4: Lecture 24 Examples of Bode Plots - IIT Bombay

Recall: First order transfer function

I G(s) =1

τ s + 1, G(jω) =

1

jωτ + 1

I |G(jω)| =1

√ω2τ 2 + 1

I ω � 1, |G(jω)| = 1, M = 20 log |G(jw)| = 0I Asymptote is M = 0

I ω � 1, |G(jω)| =1

ωτ, M = −20 logωτ

I Asymptote is M = −20 logωτI ω = ω1 ⇒ M = −20 logω1τI ω = 10ω1 ⇒ M = −20 logω1τ − 20I Slope of −20 dB per decade

3/47 Process Control Examples of Bode Plots

Page 5: Lecture 24 Examples of Bode Plots - IIT Bombay

Corner Frequency

I G(jω) =1

jωτ + 1

I |G(jω)| =1

√ω2τ 2 + 1

I For ω � 1, the asymptote is |G(jω)| = 1

I ω � 1, the asymptote is |G(jω)| =1

ωτI Two asymptotes intersect at ω = 1/τ

I w = 1/τ is known as the corner frequency

4/47 Process Control Examples of Bode Plots

Page 6: Lecture 24 Examples of Bode Plots - IIT Bombay

Bode plot of 110s+1

in semilog scale

2-50

Magnitude (dB)

-25

-10

-30

-0

-35

-15

-40

-5

-45

10 10 10 10 10 10-3 -2 -1 0 1

-20

Semilog

-80

-10

-50

Phase(deg)

-60

-20

-70

-0

10 10 10 10 10 10-3 -2 -1 0 1 2

-30

-90

-40

w(rad/sec)

5/47 Process Control Examples of Bode Plots

Page 7: Lecture 24 Examples of Bode Plots - IIT Bombay

Value at the corner frequency

I |G(jω)| =1

√ω2τ 2 + 1

I ω = 1/τ is known as the corner frequency

I At ω = 1/τ , what is M?

I M = −20 log√

2 = −10 log 2 ' −3 dB

6/47 Process Control Examples of Bode Plots

Page 8: Lecture 24 Examples of Bode Plots - IIT Bombay

Bode plot of 110s+1

in semilog scale

2-50

Magnitude (dB)

-25

-10

-30

-0

-35

-15

-40

-5

-45

10 10 10 10 10 10-3 -2 -1 0 1

-20

Semilog

-80

-10

-50

Phase(deg)

-60

-20

-70

-0

10 10 10 10 10 10-3 -2 -1 0 1 2

-30

-90

-40

w(rad/sec)

7/47 Process Control Examples of Bode Plots

Page 9: Lecture 24 Examples of Bode Plots - IIT Bombay

Phase relations for a simple pole

I G(s) =1

τ s + 1, G(jω) =

1

jωτ + 1I ω � 1, G(jω) = 1, φ = ∠G(jw) = 0

I ω � 1, G(jω) =1

jωτ, φ = −90◦

I For ω = 1/τ , G(jω) =1

j1 + 1I φ = −45◦

8/47 Process Control Examples of Bode Plots

Page 10: Lecture 24 Examples of Bode Plots - IIT Bombay

Bode plot of 110s+1

in semilog scale

2-50

Magnitude (dB)

-25

-10

-30

-0

-35

-15

-40

-5

-45

10 10 10 10 10 10-3 -2 -1 0 1

-20

Semilog

-80

-10

-50

Phase(deg)

-60

-20

-70

-0

10 10 10 10 10 10-3 -2 -1 0 1 2

-30

-90

-40

w(rad/sec)

9/47 Process Control Examples of Bode Plots

Page 11: Lecture 24 Examples of Bode Plots - IIT Bombay

MCQ: First order system

Bode plot of a first order system has the followingproperties:

A Slope = -20dB/decade for large frequency

B w = 1/τ at corner frequency

C φ = −45◦ at corner frequency

D Phase reached at large frequencies = −90◦

Choose the correct answer:

1. A and B only

2. A and C only

3. A, B and C only

4. All four are correct

Answer: 410/47 Process Control Examples of Bode Plots

Page 12: Lecture 24 Examples of Bode Plots - IIT Bombay

2. Gain, integral and derivative

11/47 Process Control Examples of Bode Plots

Page 13: Lecture 24 Examples of Bode Plots - IIT Bombay

Effect of Gain on Magnitude Bode Plot

I G(s)4= 100G1(s)

I M = 20 log |G(jω)| and M1 = 20 log |G1(jω)|I Both M and M1 are plotted in the same graph,

in dB (decibel units)

M and M1 are related in the following way:

1. M is higher than M1 by 100 units

2. M is higher than M1 by 40 units

3. M is lower than M1 by 100 units

4. The slopes of M and M1 are different by 100units

Answer: 212/47 Process Control Examples of Bode Plots

Page 14: Lecture 24 Examples of Bode Plots - IIT Bombay

Effect of Gain on Phase Bode Plot

I G(s)4= 100G1(s)

I φ = ∠G(jω) and φ1 = ∠G1(jω)

I Both φ and φ1 are plotted in the same graph

φ and φ1 are related in the following way:

1. φ is higher than φ1 by 100 units

2. φ is higher than φ1 by 40 units

3. Both φ and φ1 plots are identical

4. There is no relation between φ and φ1

Answer: 3

13/47 Process Control Examples of Bode Plots

Page 15: Lecture 24 Examples of Bode Plots - IIT Bombay

Effect of gain

I G(s)4= KG1(s), K > 0

I M = 20 log |G(jω)| = 20 log |KG1(jω)|I M = 20 log K+ 20 log |G1(jω)|, K > 0

I Example: K = 100

I M = 40 + 20 log |G1(jω)|I At every frequency, add 40 dB!

I Phase plots of G1 and G are identical

14/47 Process Control Examples of Bode Plots

Page 16: Lecture 24 Examples of Bode Plots - IIT Bombay

Effect of integral mode or pole at zero

I G(s) =1

s

I G(jω) =1

jωI M = 20 log |G(jω)| = −20 logω

I Has a slope of −20 dB per decade

I φ = ∠G(jω) = −90◦

15/47 Process Control Examples of Bode Plots

Page 17: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bode-5.sce

1 exec ( ’ bodegen−1. s c i ’ ) ;2

3 s = %s ;4 num = 1 ;5 den = s ;6

7 w = 0 . 0 1 : 0 . 0 0 2 : %pi ˆ 0 ;8 LF = ” s e m i l o g ”9

10 bodegen (num , den , w, LF ) ;

16/47 Process Control Examples of Bode Plots

Page 18: Lecture 24 Examples of Bode Plots - IIT Bombay

Bode plot of a pole at zero

10

0

5

10

15

20

25

30

35

40

10 10-2 -1 0

Magnitude (dB)

Semilog

-92Phase(deg)

-100

-98

-96

-94

-90

-88

-86

-84

-82

-80

10 10 10-2 -1 0

w(rad/sec)

17/47 Process Control Examples of Bode Plots

Page 19: Lecture 24 Examples of Bode Plots - IIT Bombay

Bode plot of pure derivative action

I G(s) = s

I G(jω) = jω

I M = 20 log |G(jω)| = 20 logω

I Has a slope of +20 dB per decade

I φ = ∠G(jω) = +90◦

18/47 Process Control Examples of Bode Plots

Page 20: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bode-5.sce

Exchange the values of num and den and execute

19/47 Process Control Examples of Bode Plots

Page 21: Lecture 24 Examples of Bode Plots - IIT Bombay

3. Adding Bode Plots

20/47 Process Control Examples of Bode Plots

Page 22: Lecture 24 Examples of Bode Plots - IIT Bombay

3a. Two first order systems in series

21/47 Process Control Examples of Bode Plots

Page 23: Lecture 24 Examples of Bode Plots - IIT Bombay

Product of two first order systems

G(s) =1

s + 1

1

0.01s + 1

I Plot M for each transfer function separatelyI What are the corner frequencies? For the first,I it is 1I For the second, it is 1/0.01 = 100I Add the twoI Draw φ for each transfer function separatelyI Add the twoI Scilab code and the plots are given next

22/47 Process Control Examples of Bode Plots

Page 24: Lecture 24 Examples of Bode Plots - IIT Bombay

Magnitude Bode Plot

23/47 Process Control Examples of Bode Plots

Page 25: Lecture 24 Examples of Bode Plots - IIT Bombay

Phase Bode Plot

24/47 Process Control Examples of Bode Plots

Page 26: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bode-2.sce

Scilab code:

1 exec ( ’ bodesum−2. s c i ’ ) ;2 s = %s ;3 G1 = 1/( s +1) ;4 g a i n = 1 / ( 0 . 0 1∗ s +1) ;5 d e l a y = 0 ;6 w = 0 . 0 1 : 0 . 0 0 8 ∗ %pi : 1 0 0 0∗%pi ;7 bodesum 1 (G1 , d e l a y , ga in , w) ;

25/47 Process Control Examples of Bode Plots

Page 27: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bodesum-2.sci I

Scilab code:

1 / / B o d e p l o t a s a s u m o f c o m p o n e n t s

2

3 f u n c t i o n bodesum 1 (G1 , d e l a y , ga in , w)4

5 G 1 f r e q = h o r n e r (G1 , %i∗w) ;6 G1 mag = 20∗ l o g 1 0 ( abs ( G 1 f r e q ) ) ;7 g a i n f r e q = h o r n e r ( ga in , %i∗w) ;8 gain mag = 20∗ l o g 1 0 ( abs ( g a i n f r e q ) ) ;9

10 x s e t ( ’ window ’ , 0 ) ; c l f ( ) ;11 s u b p l o t ( 3 , 1 , 1 )

26/47 Process Control Examples of Bode Plots

Page 28: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bodesum-2.sci II

12 p l o t 2 d (w, G1 mag , l o g f l a g= ’ l n ’ , s t y l e =2) ;

13 x g r i d ( ) ;14 x t i t l e ( ’ Magnitude Bode p l o t as sum

o f component p l o t s ’ , ’ ’ , ’ G1 (dB) ’ );

15 s u b p l o t ( 3 , 1 , 2 )16 p l o t 2 d (w, gain mag , l o g f l a g=” l n ” , s t y l e

= 2) ;17 x g r i d ( ) ;18 x t i t l e ( ’ ’ , ’ ’ , ’ g a i n d e l a y (dB) ’ ) ;19 s u b p l o t ( 3 , 1 , 3 )

27/47 Process Control Examples of Bode Plots

Page 29: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bodesum-2.sci III

20 p l o t 2 d (w, G1 mag+gain mag , l o g f l a g=” l n” , s t y l e = 2) ;

21 x g r i d ( ) ;22 x t i t l e ( ’ ’ , ’ Phase ( deg ) ’ , ’ G1+

g a i n d e l a y ’ ) ;23

24 G1 ph = phasemag ( G 1 f r e q ) ;25 g a i n p h = phasemag ( g a i n f r e q ) −d e l a y

∗w∗180/ %pi ;26

27 x s e t ( ’ window ’ , 1 ) ; c l f ( ) ;28 s u b p l o t ( 3 , 1 , 1 )

28/47 Process Control Examples of Bode Plots

Page 30: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bodesum-2.sci IV

29 p l o t 2 d (w, G1 ph , l o g f l a g= ’ l n ’ , s t y l e =2) ;

30 x g r i d ( ) ;31 x t i t l e ( ’ Phase Bode p l o t as sum o f

component p l o t s ’ , ’ ’ , ’ G1 ( phase ) ’ );

32 s u b p l o t ( 3 , 1 , 2 )33 p l o t 2 d (w, g a i n p h , l o g f l a g=” l n ” , s t y l e

= 2) ;34 x g r i d ( ) ;35 x t i t l e ( ’ ’ , ’ ’ , ’ g a i n d e l a y ( phase ) ’ ) ;36 s u b p l o t ( 3 , 1 , 3 )

29/47 Process Control Examples of Bode Plots

Page 31: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bodesum-2.sci V

37 p l o t 2 d (w, G1 ph+g a i n p h , l o g f l a g=” l n ” ,s t y l e = 2) ;

38 x g r i d ( ) ;39 x t i t l e ( ’ ’ , ’ Phase ( deg ) ’ , ’ G1+

g a i n d e l a y ’ ) ;40 e n d f u n c t i o n ;

30/47 Process Control Examples of Bode Plots

Page 32: Lecture 24 Examples of Bode Plots - IIT Bombay

Magnitude Bode Plot

31/47 Process Control Examples of Bode Plots

Page 33: Lecture 24 Examples of Bode Plots - IIT Bombay

Phase Bode Plot

32/47 Process Control Examples of Bode Plots

Page 34: Lecture 24 Examples of Bode Plots - IIT Bombay

3b. Lead Transfer Function

33/47 Process Control Examples of Bode Plots

Page 35: Lecture 24 Examples of Bode Plots - IIT Bombay

Lead Transfer Function

I Consider the lead transfer function:

G(s) =s + 1

0.01s + 1

I Corner frequencies are 1 and 100I Magnitude plot of s + 1 has a slope of +20 dBI Phase plot of s + 1 increases, goes to 90◦

I Magnitude plot of 1/(0.01s + 1) has a slope of−20 dB

I Phase plot of 1/(0.01s + 1) decreases, goes to−90◦

I Add the twoI Scilab code is given next

34/47 Process Control Examples of Bode Plots

Page 36: Lecture 24 Examples of Bode Plots - IIT Bombay

Magnitude Bode Plot

35/47 Process Control Examples of Bode Plots

Page 37: Lecture 24 Examples of Bode Plots - IIT Bombay

Phase Bode Plot

36/47 Process Control Examples of Bode Plots

Page 38: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bode-2a.sce

1 exec ( ’ bodesum−2. s c i ’ ) ;2 s = %s ;3 G1 = 1 / ( 0 . 0 1∗ s +1) ;4 g a i n = ( s +1) ;5 d e l a y = 0 ;6 w = 0 . 0 1 : 0 . 0 0 8 ∗ %pi : 1 0 0 0∗%pi ;7 bodesum 1 (G1 , d e l a y , ga in , w) ;

37/47 Process Control Examples of Bode Plots

Page 39: Lecture 24 Examples of Bode Plots - IIT Bombay

3c. First order system with delay

38/47 Process Control Examples of Bode Plots

Page 40: Lecture 24 Examples of Bode Plots - IIT Bombay

Effect of Delay on Magnitude Bode Plot

I G(s)4= G1(s)e−Ds

I M = 20 log |G(jω)| and M1 = 20 log |G1(jω)|I Both M and M1 are plotted in the same graph,

in dB (decibel units)

M and M1 are related in the following way:

1. M is lower than M1 by D units

2. M is lower than M1 by 1 unit

3. M and M1 are identical

4. There is no relation between M and M1

Answer: 3

39/47 Process Control Examples of Bode Plots

Page 41: Lecture 24 Examples of Bode Plots - IIT Bombay

Effect of Delay on Phase Bode Plot

I G(s)4= G1(s)e−Ds

I φ = ∠G(jω) and φ1 = ∠G1(jω)

I Both φ and φ1 are plotted in the same graph

φ and φ1 are related in the following way:

1. φ is lower than φ1 by D units

2. φ is obtained from φ1 by subtracting Dω atevery ω

3. Both φ and φ1 plots are identical

4. There is no relation between φ and φ1

Answer: 2

40/47 Process Control Examples of Bode Plots

Page 42: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code for delay

I G(s) = e−Ds

I G(jω) = e−jDω

I G(jω) = cos Dω − j sin Dω

I φ = ∠G(jω) = tan−1

[−

sin Dω

cos Dω

]I φ = −Dω

I What about magnitude plot?

I M = 1 for all ω

41/47 Process Control Examples of Bode Plots

Page 43: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bode-3.sce

Bode plot of G(s) =1

s + 1e−0.01s

1 exec ( ’ bodesum−2. s c i ’ ) ;2 s = %s ;3 G1 = 1/( s +1) ;4 g a i n = 1 ;5 d e l a y = 0 . 0 1 ;6 w = 0 . 0 1 : 0 . 0 0 8 ∗ %pi : 1 0∗%pi ;7 bodesum 1 (G1 , d e l a y , ga in , w) ;

42/47 Process Control Examples of Bode Plots

Page 44: Lecture 24 Examples of Bode Plots - IIT Bombay

Magnitude Bode Plot

43/47 Process Control Examples of Bode Plots

Page 45: Lecture 24 Examples of Bode Plots - IIT Bombay

Phase Bode Plot

44/47 Process Control Examples of Bode Plots

Page 46: Lecture 24 Examples of Bode Plots - IIT Bombay

Guidelines for drawing Bode plots

I Axes: log axis for abscissa and normal axis forordinate

I For each component transfer function,I Draw the asymptotesI Locate the value at corner frequencyI Connect approximately and complete the plots

I Add the component values

45/47 Process Control Examples of Bode Plots

Page 47: Lecture 24 Examples of Bode Plots - IIT Bombay

Lecture 25Stability Analysis through

Bode Plots

Process ControlProf. Kannan M. Moudgalya

IIT BombayMonday, 30 September 2013

1/36 Process Control Stability Analysis through Bode Plots

Page 48: Lecture 24 Examples of Bode Plots - IIT Bombay

Outline

1. Self study of a second order underdampedsystem

2. Stability analysis

3. Gain margin and phase crossoverfrequency

4. Phase margin and gain crossoverfrequency

2/36 Process Control Stability Analysis through Bode Plots

Page 49: Lecture 24 Examples of Bode Plots - IIT Bombay

1. Second order underdamped system

3/36 Process Control Stability Analysis through Bode Plots

Page 50: Lecture 24 Examples of Bode Plots - IIT Bombay

Homework: Bode plot of asecond order underdamped system

4/36 Process Control Stability Analysis through Bode Plots

Page 51: Lecture 24 Examples of Bode Plots - IIT Bombay

Tutorial problem

Draw the bode plot of

G(s) =1

s2 + 8s + 64

I ωn = 8, ζ = 0.5

5/36 Process Control Stability Analysis through Bode Plots

Page 52: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bode-6.sce

1 exec ( ’ bodegen−1. s c i ’ ) ;2

3 s = %s ;4 num = 1 ;5 den = s ˆ2+8∗ s +64;6

7 w = 0 . 1 : 0 . 0 2 : 1 0 0 ∗ %pi ;8 LF = ” s e m i l o g ”9

10 bodegen (num , den , w, LF ) ;

6/36 Process Control Stability Analysis through Bode Plots

Page 53: Lecture 24 Examples of Bode Plots - IIT Bombay

Bode plot of an underdamped pole

10

-60

2

-70

Magnitude (dB)

-80

-30

-90

-1 3-100

-40

0

-50

10 10 10 101

Semilog

Phase(deg)

10 10 10 10 10-1 0 1 2 3

-180

-160

-140

-120

-100

-80

-60

-40

-20

-0

w(rad/sec)

7/36 Process Control Stability Analysis through Bode Plots

Page 54: Lecture 24 Examples of Bode Plots - IIT Bombay

2. Stability analysis using Bode plots

8/36 Process Control Stability Analysis through Bode Plots

Page 55: Lecture 24 Examples of Bode Plots - IIT Bombay

Instability Problem Statement

I G(s) is open loop transfer function

I Does not have poles and zeros on RHP

I Put in a closed loop with a proportionalcontroller Kc

I As Kc increases, closed loop systembecomes unstable

I We will first see the root locus plotconditions

9/36 Process Control Stability Analysis through Bode Plots

Page 56: Lecture 24 Examples of Bode Plots - IIT Bombay

Root locus stability conditions

I Root locus is the locus of roots of1 + KcG(s) = 0, as Kc goes from 0 to ∞

I 1 + KcG(s) = 0 or KcG(s) = −1

I Magnitude and phase relations:

I |KcG(s)| = 1∠KcG(s) = −180◦, +180◦, ±540◦, etc.

I We will now see the conditions usingBode plot

10/36 Process Control Stability Analysis through Bode Plots

Page 57: Lecture 24 Examples of Bode Plots - IIT Bombay

Stability conditions for Bode plots

I To obtain Bode plots, substitute s = jωI This corresponds to the imaginary axis of

s planeI Root locus conditions become,|KuG(jω)| = 1,∠KuG(jω) = −180◦,±540, etc.

I Because it is the boundary of instability,we have used Ku

I Kc > Ku ⇒ closed loop system unstableI Can analyse stability using Bode plotI Can check by how much we can move

I magnitude plot by adding gainI phase plot by adding delay

11/36 Process Control Stability Analysis through Bode Plots

Page 58: Lecture 24 Examples of Bode Plots - IIT Bombay

Restrict focus to class of systems

I Restrict Bode plot analysis to a class ofsystems

I For Kc < Ku, system is stable

I For Kc ≥ Ku, system is unstable

12/36 Process Control Stability Analysis through Bode Plots

Page 59: Lecture 24 Examples of Bode Plots - IIT Bombay

Example

Find a proportional controller Kc that willmake

G(s) =15

(s + 1)(s + 2)(s + 3)

unstable, when put in a feedback loop.

13/36 Process Control Stability Analysis through Bode Plots

Page 60: Lecture 24 Examples of Bode Plots - IIT Bombay

Stability condition for example

I 1 + KcG(s) = 0

I 1 +15Kc

(s + 1)(s + 2)(s + 3)= 0

I (s + 1)(s + 2)(s + 3) + 15Kc = 0

I s3 + 6s2 + 11s + (15Kc + 6) = 0

I Cuts imaginary axis at Kc = 4

I Ku = 4

I Stable for Kc < 4

14/36 Process Control Stability Analysis through Bode Plots

Page 61: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bode-10.sce

1 exec ( ’ b o d e d e l . s c i ’ ) ;2

3 s = %s ;4 K = 1 ;5 D = 0 . 1 ;6 num = 1 5 ;7 den = ( s +1) ∗ ( s +2) ∗ ( s +3) ;8 G = num/ den ;9

10 w = 0 . 0 1 : 0 . 0 2 : 5 ;11

12 b o d e d e l (G , D, K, w) ;

15/36 Process Control Stability Analysis through Bode Plots

Page 62: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bodedel.sci I

1 / / B o d e p l o t w i t h d e l a y a n d g a i n

2

3 f u n c t i o n b o d e d e l (G1 , d e l a y , ga in , w)

4

5 G 1 f r e q = h o r n e r (G1 , %i∗w) ;6 G1 mag = 20∗ l o g 1 0 ( abs ( G 1 f r e q ) ) ;7 g a i n f r e q = h o r n e r ( ga in , %i∗w) ;8 gain mag = 20∗ l o g 1 0 ( abs (

g a i n f r e q ) ) ;9

10 / / x s e t ( ’ w i n d o w ’ , 0 ) ; c l f ( ) ;

16/36 Process Control Stability Analysis through Bode Plots

Page 63: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bodedel.sci II

11

12 s u b p l o t ( 2 , 1 , 1 )13 x g r i d ( ) ;14 x t i t l e ( ’ Bode p l o t ’ , ’ ’ , ’ G1 (dB) ’ )

;15 p l o t 2 d (w, G1 mag+gain mag , l o g f l a g

=” l n ” , s t y l e = 1) ;16

17 G1 ph = phasemag ( G 1 f r e q ) ;18 g a i n p h = phasemag ( g a i n f r e q ) −

d e l a y ∗w∗180/ %pi ;19

17/36 Process Control Stability Analysis through Bode Plots

Page 64: Lecture 24 Examples of Bode Plots - IIT Bombay

Scilab code bodedel.sci III

20 s u b p l o t ( 2 , 1 , 2 )21 x t i t l e ( ’ ’ , ’w i n r a d ’ , ’ Phase ’ ) ;22 p l o t 2 d (w, G1 ph+g a i n p h , l o g f l a g=”

l n ” , s t y l e = 1) ;23 x g r i d ( ) ;24 e n d f u n c t i o n ;

18/36 Process Control Stability Analysis through Bode Plots

Page 65: Lecture 24 Examples of Bode Plots - IIT Bombay

3. Gain margin andphase crossover frequency

19/36 Process Control Stability Analysis through Bode Plots

Page 66: Lecture 24 Examples of Bode Plots - IIT Bombay

Increasing the gainG1 (dB)

-2 -1 0 1

10

15

10

5

10

0

-5

-10

-15

-20

-25

10 10

Bode plot

-0

-250

-200

-150

-100

-50

10 10 10 10-2 -1 0 1

Phase

When K is increased,Magnitude plot goes up

20/36 Process Control Stability Analysis through Bode Plots

Page 67: Lecture 24 Examples of Bode Plots - IIT Bombay

Increasing the gain furtherG1 (dB)

-1 0 1

10 10

20

15

10

5

0

-5

-10

-15

-20

-25

10 10-2

Bode plot

-0

-250

-200

-150

-100

-50

10 10 10 10-2 -1 0 1

Phase

mag. plot goes through 0dBWhen Kc is increased to 4

ωpc

Gain Margin= 4 = 12dB

21/36 Process Control Stability Analysis through Bode Plots

Page 68: Lecture 24 Examples of Bode Plots - IIT Bombay

Phase Crossover Frequency

I The frequency ω at which∠G(jω) = −180◦

I is called Phase Crossover Frequency

I It is denoted by ωpc

I That is, ∠G(jωpc) = −180◦

I Some people call it as simply crossoverfrequency, and denote it as ωc

22/36 Process Control Stability Analysis through Bode Plots

Page 69: Lecture 24 Examples of Bode Plots - IIT Bombay

Gain Margin

I Locate ωc, where ∠G(jωc) = −180◦

I Find |G(jωc)| at that point

I Can increase gain of the system by Kc

until Kc|G(jωc)| = 1

I Can verify that we can increase Kc until 4

I Gain margin = 4 or 12 dB

I Draw the Bode plot and verify

23/36 Process Control Stability Analysis through Bode Plots

Page 70: Lecture 24 Examples of Bode Plots - IIT Bombay

3. Phase margin andgain crossover frequency

24/36 Process Control Stability Analysis through Bode Plots

Page 71: Lecture 24 Examples of Bode Plots - IIT Bombay

Gain Crossover Frequency10

-25

-20

-15

-10

-5

0

5

10 10 10 10-2 -1 0 1

G1 (dB)

Bode plot

-150

-300

-250

-200

-100

-50

-0

10 10 10 10-2 -1 0 1

Phase

ωg

The frequency where |G(jω)| = 0 dB is calledgain crossover frequency

25/36 Process Control Stability Analysis through Bode Plots

Page 72: Lecture 24 Examples of Bode Plots - IIT Bombay

Increasing the delay

10

-25

-20

-15

-10

-5

0

5

10 10 10 10-2 -1 0 1

G1 (dB)

Bode plot

-150

-300

-250

-200

-100

-50

-0

10 10 10 10-2 -1 0 1

Phase

When D increasesPhase lag increases

26/36 Process Control Stability Analysis through Bode Plots

Page 73: Lecture 24 Examples of Bode Plots - IIT Bombay

Increasing the delay further

10

G1 (dB)

-25

-20

-15

-10

-5

0

5

10 10 10 10-2 -1 0 1

Bode plot

10

-100

10

-150

10

-200

Phase

10

-250

-0

-300

-2

-350

-1-400

0 1

-50

Phase becomes −180 deg

When D is increased to 0.63

27/36 Process Control Stability Analysis through Bode Plots

Page 74: Lecture 24 Examples of Bode Plots - IIT Bombay

Bode plot by changing delay

I Suppose G(s) changes toG1(s) = G(s)e−Ds

I What is D such that when |G1(jω)| = 1,∠G1(jω) = −180◦?

I Call this ω as ωg, orgain crossover frequency

28/36 Process Control Stability Analysis through Bode Plots

Page 75: Lecture 24 Examples of Bode Plots - IIT Bombay

Calculation of Delay

I |G(jωg)| = 1

I G(s) =15

(s + 1)(s + 2)(s + 3)I (ω2

g + 1)(ω2g + 4)(ω2

g + 9) = 225I ωg ' 1.57I φ(jωg) =− tan−1(ωg)− tan−1(ωg/2)− tan−1(ωg/3)

I = −123.2◦

I If delay contributes −56.8◦

(= 180− 123.2◦), instability

I Dωg =56.8

180× π ⇒ D = 0.63

29/36 Process Control Stability Analysis through Bode Plots

Page 76: Lecture 24 Examples of Bode Plots - IIT Bombay

Application to example

I Can find ωg = 1.57, approximately

I Can increase D to D = 0.63

30/36 Process Control Stability Analysis through Bode Plots

Page 77: Lecture 24 Examples of Bode Plots - IIT Bombay

Restrictions

This analysis is valid only for systems thathave

I stable systems, with at most one pole onimaginary axis

I only one ωc

I only one ωg

31/36 Process Control Stability Analysis through Bode Plots

Page 78: Lecture 24 Examples of Bode Plots - IIT Bombay

Gain marginG1 (dB)

-1 0 1

10 10

20

15

10

5

0

-5

-10

-15

-20

-25

10 10-2

Bode plot

Phase

-2 -1 0 1

10

-0

-50

-100

10

-150

-200

-250

-300

-350

-400

10 10

Gain Margin = 12 dB

32/36 Process Control Stability Analysis through Bode Plots

Page 79: Lecture 24 Examples of Bode Plots - IIT Bombay

Phase marginG1 (dB)

-1 0 1

10 10

20

15

10

5

0

-5

-10

-15

-20

-25

10 10-2

Bode plot

Phase

-2 -1 0 1

10

-0

-50

-100

10

-150

-200

-250

-300

-350

-400

10 10

Phase Margin = 56.8 deg

ωgc

33/36 Process Control Stability Analysis through Bode Plots

Page 80: Lecture 24 Examples of Bode Plots - IIT Bombay

Stabilising through derivative mode

34/36 Process Control Stability Analysis through Bode Plots

Page 81: Lecture 24 Examples of Bode Plots - IIT Bombay

What we learnt today

I Stability conditions using Bode plot

I Stability margins

35/36 Process Control Stability Analysis through Bode Plots

Page 82: Lecture 24 Examples of Bode Plots - IIT Bombay

Thank you

36/36 Process Control Stability Analysis through Bode Plots