Lecture 23 Introduction to Bode Plots CL-417 Process Control Prof. - - PowerPoint PPT Presentation

lecture 23 introduction to bode plots
SMART_READER_LITE
LIVE PREVIEW

Lecture 23 Introduction to Bode Plots CL-417 Process Control Prof. - - PowerPoint PPT Presentation

Lecture 23 Introduction to Bode Plots CL-417 Process Control Prof. Kannan M. Moudgalya IIT Bombay Wednesday, 25 September 2013 1/51 CL-417 Process Control Introduction to Bode Plot Outline 1. Recall frequency response, including s = j


slide-1
SLIDE 1

Lecture 23 Introduction to Bode Plots

CL-417 Process Control

  • Prof. Kannan M. Moudgalya

IIT Bombay Wednesday, 25 September 2013

1/51 CL-417 Process Control Introduction to Bode Plot

slide-2
SLIDE 2

Outline

  • 1. Recall frequency response, including

s = jω substitution

  • 2. Definition of Bode plot
  • 3. Why do we use semilog plots?
  • 4. An example

2/51 CL-417 Process Control Introduction to Bode Plot

slide-3
SLIDE 3
  • 1. Recall frequency response and s = jω

3/51 CL-417 Process Control Introduction to Bode Plot

slide-4
SLIDE 4

Recall: Frequency response

G(s) sin ω0t y(t)

◮ Excited a linear system G(s) with sin ω0t ◮ yss(t) = |G(ω0)| sin (ω0t + φ(ω0)) ◮ Input is sinusoid ⇒ output is sinusoid ◮ Frequencies of input and output are same ◮ |G(ω0)| multiplies output amplitude ◮ Output sinusoid shifts by

∠G(jω0) = φ(ω0) with respect to input

4/51 CL-417 Process Control Introduction to Bode Plot

slide-5
SLIDE 5

Relation between s and jω

G(s) sin ω0t y(t)

◮ yss(t) = |G(ω0)| sin (ω0t + φ(ω0)) ◮ How did this term |G(ω0)| come about? ◮ Recall that

|G(ω0)|

= |G(jω0)| = |G(−ω0)|

◮ So, we substitute s = jω in all frequency

related discussions

5/51 CL-417 Process Control Introduction to Bode Plot

slide-6
SLIDE 6

Example of Frequency Response: Did you try?

◮ What is the long time response of the

transfer function G(s) = 1 (s + 1)(s + 2) when excited by sin 10t?

◮ Solve it using

G(s) sin ω0t y(t)

◮ yss(t) = |G(jω0)| sin (ω0t + φ(ω0))

6/51 CL-417 Process Control Introduction to Bode Plot

slide-7
SLIDE 7

Frequency response helps define filters

We also discussed how this concept helps define filters.

7/51 CL-417 Process Control Introduction to Bode Plot

slide-8
SLIDE 8
  • 2. Definition of Bode plot

8/51 CL-417 Process Control Introduction to Bode Plot

slide-9
SLIDE 9

Result of sine testing on SBHS

◮ Fan speed is constant at 100 ◮ Oscillated at 25 heater units (40units =

100%) at an amplitude of 5 units

9/51 CL-417 Process Control Introduction to Bode Plot

slide-10
SLIDE 10

Result of sine testing on SBHS

◮ Same conditions as before, but for a lower

frequency

10/51 CL-417 Process Control Introduction to Bode Plot

slide-11
SLIDE 11

Magnitude and phase plots

◮ Make use of

G(s) sin ω0t y(t) yss(t) = |G(jω0)| sin (ω0t + φ(ω0))

◮ Repeat this for a large number of ω ◮ Evaluate |G(jω)| for every ω ◮ Note down ∠G(jω) = φ(ω) at every ω ◮ Plot these

◮ |G(jω)| vs. ω is known as the magnitude plot ◮ ∠G(jω) = φ(ω) vs. ω is known as the phase

angle plot

◮ Black plot in the next figure

11/51 CL-417 Process Control Introduction to Bode Plot

slide-12
SLIDE 12

Bode plot obtained using SBHS

12/51 CL-417 Process Control Introduction to Bode Plot

slide-13
SLIDE 13

Bode plot is also an analysis tool

◮ Bode plot is developed for plant

experiments

◮ Can also be used as an analysis tool ◮ Recall our mathematical experiment:

G(s) sin ω0t y(t)

◮ yss(t) = |G(jω0)| sin (ω0t + φ(ω0)) ◮ Can excite G(s) for different frequencies ◮ Obtain Bode plots of G(s) ◮ In the previous page, compared

◮ Experimentally obtained Bode plot with ◮ that obtained using fitted transfer function 13/51 CL-417 Process Control Introduction to Bode Plot

slide-14
SLIDE 14

Bode plots created through expts. & G(s)

14/51 CL-417 Process Control Introduction to Bode Plot

slide-15
SLIDE 15

Example

◮ Draw the Bode plot for G(s) =

1 10s + 1

◮ Magnitude plot: draw |G(jω)| vs. ω ◮ Phase angle plot: draw ∠G(jω) vs. ω

15/51 CL-417 Process Control Introduction to Bode Plot

slide-16
SLIDE 16

Magnitude, phase of

1 10s+1 vs. freq.

Magnitude 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 5 10 15 20 25 30 35 Normal scale Phase(deg)

  • 90
  • 80
  • 70
  • 60
  • 50
  • 40
  • 30
  • 20
  • 10

5 10 15 20 25 30 35 w(rad/sec)

Cannot see details

16/51 CL-417 Process Control Introduction to Bode Plot

slide-17
SLIDE 17

There is another difficulty

◮ G(s) = N1(s)

D1(s) N2(s) D2(s) · · · Nm(s) Dm(s)

◮ G(jω) = N1(jω)

D1(jω) N2(jω) D2(jω) · · · Nm(jω) Dm(jω)

◮ Plots of composite functions cannot be

easily obtained from those of constituent functions

17/51 CL-417 Process Control Introduction to Bode Plot

slide-18
SLIDE 18

The plot can be improved

◮ Cannot see the behaviour well at high

frequencies

◮ Solution: use log scale ◮ Log scale on the y-axis provides the

addition rule

18/51 CL-417 Process Control Introduction to Bode Plot

slide-19
SLIDE 19

We use log scale for drawing Bode plots

◮ G(s) = N1(s)

D1(s) N2(s) D2(s) · · · Nm(s) Dm(s)

◮ G(jω) = N1(jω)

D1(jω) N2(jω) D2(jω) · · · Nm(jω) Dm(jω)

◮ log |G(jω)| =

log |N1(jω)| + · · · + log |Nm(jω)| − log |D1(jω)| − · · · − log |Dm(jω)|

◮ ∠G(jω) = ∠N1(jω) + · · · + ∠Nm(jω) ◮ −∠D1(jω) − · · · − ∠Dm(jω) ◮ Large frequency range is covered ◮ Addition rule is available with log scale ◮ Can do constituent to composite plots

19/51 CL-417 Process Control Introduction to Bode Plot

slide-20
SLIDE 20

Mag., phase plot of

1 10s+1 in loglog scale

  • 2

10 10 Magnitude 10

  • 1
  • 1

10 1

  • 2

2 10 10 10 10 10 10

  • 3
  • 3

Loglog

  • 80
  • 10
  • 50

Phase(deg)

  • 60
  • 20
  • 70

10 10 10 10 10 10

  • 3
  • 2
  • 1

1 2

  • 30
  • 90
  • 40

w(rad/sec)

20/51 CL-417 Process Control Introduction to Bode Plot

slide-21
SLIDE 21

Scilab code bode-1.sce

Scilab code:

1

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

2 3

s = %s;

4 num = 1 ; 5 den = (10∗ s +1) ; 6 7 w = 0 . 0 0 1 : 0 . 0 0 2 : 1 0 ∗ %pi ; 8 LF = ” normal ”

/ / W a r n i n g : C h a n g e t h i s a s n e c e s s a r y

9 10 bodegen (num , den ,w, LF ) ; 21/51 CL-417 Process Control Introduction to Bode Plot

slide-22
SLIDE 22

Scilab code bodegen-1.sci I

Scilab code:

1

/ / B o d e p l o t

2

/ / N u m e r a t o r a n d d e n o m i n a t o r a r e p a s s e d a s i n p u t a r g u m e n t s

3

/ / B o t h a r e p o l y n o m i a l s i n p o w e r s

  • f

s ( s a y )

4 5

f u n c t i o n bodegen (num , den ,w, l f )

6 7 G = num/den ; 8 G1 = horner (G, %i∗w) ; 9 G1p = phasemag (G1) ; 22/51 CL-417 Process Control Introduction to Bode Plot

slide-23
SLIDE 23

Scilab code bodegen-1.sci II

10 11

x g r i d ( ) ;

12

i f LF == ” normal ” then

13

x s e t ( ’ window ’ ,0) ; c l f ( ) ;

14

s u b p l o t ( 2 , 1 , 1)

15

p l o t 2 d (w, abs (G1) , l o g f l a g=”nn” , s t y l e = 2) ;

16

x t i t l e ( ’ Normal s c a l e ’ , ’ ’ , ’ Magnitude ’ ) ; x g r i d ( ) ;

17

s u b p l o t ( 2 , 1 , 2)

18

plot2d1 (w, G1p , l o g f l a g=”nn” , s t y l e = 2) ;

23/51 CL-417 Process Control Introduction to Bode Plot

slide-24
SLIDE 24

Scilab code bodegen-1.sci III

19

x g r i d ( ) ;

20

x t i t l e ( ’w( rad / sec ) ’ , ’ ’ , ’ Phase ( deg ) ’ ) ;

21

e l s e i f LF == ” s e m i l o g ” then

22

x s e t ( ’ window ’ ,1) ; c l f ( ) ;

23

s u b p l o t ( 2 , 1 , 1)

24

p l o t 2 d (w,20∗ log10 ( abs (G1) ) , l o g f l a g=” l n ” , s t y l e = 2) ;

25

x g r i d ( ) ;

26

x t i t l e ( ’ Semilog ’ , ’ ’ , ’ Magnitude (dB) ’ ) ;

27

s u b p l o t ( 2 , 1 , 2)

24/51 CL-417 Process Control Introduction to Bode Plot

slide-25
SLIDE 25

Scilab code bodegen-1.sci IV

28

plot2d1 (w, G1p , l o g f l a g=” l n ” , s t y l e = 2) ;

29

x g r i d ( ) ;

30

x t i t l e ( ’w( rad / sec ) ’ , ’ ’ , ’ Phase ( deg ) ’ ) ;

31

e l s e i f LF == ” l o g l o g ” then

32

x s e t ( ’ window ’ ,2) ; c l f ( ) ;

33

s u b p l o t ( 2 , 1 , 1)

34

p l o t 2 d (w, abs (G1) , l o g f l a g=” l l ” , s t y l e = 2) ;

35

x g r i d ( ) ;

25/51 CL-417 Process Control Introduction to Bode Plot

slide-26
SLIDE 26

Scilab code bodegen-1.sci V

36

x t i t l e ( ’ Loglog ’ , ’ ’ , ’ Magnitude ’ ) ;

37

s u b p l o t ( 2 , 1 , 2)

38

plot2d1 (w, G1p , l o g f l a g=” l n ” , s t y l e = 2) ;

39

x g r i d ( ) ;

40

x t i t l e ( ’w( rad / sec ) ’ , ’ ’ , ’ Phase ( deg ) ’ ) ;

41 end 42 43

e n d f u n c t i o n ;

26/51 CL-417 Process Control Introduction to Bode Plot

slide-27
SLIDE 27

MCQ: Best Magnitude Plot

The best way to draw magnitude (y-axis) vs frequency (x-axis) plot is

  • 1. Both axis in normal scale
  • 2. x-axis in normal and y-axis in logarithmic

scale

  • 3. x-axis in logarithmic scale and y-axis in

normal scale

  • 4. Both axis in logarithmic scale

Answer: 4

27/51 CL-417 Process Control Introduction to Bode Plot

slide-28
SLIDE 28

Bode Plot refers to Logarithmic Scale

◮ Bode plots mean the following:

◮ Magnitude and phase vs. frequency plots ◮ x axis (frequency): should be in log scale ◮ Magnitude plot should be in logarithmic scale

◮ The phrase Bode Plot implies logarithmic

scale

28/51 CL-417 Process Control Introduction to Bode Plot

slide-29
SLIDE 29
  • 3. Why do we use semilog plots?

29/51 CL-417 Process Control Introduction to Bode Plot

slide-30
SLIDE 30

Recall Bode plot of

1 10s+1

  • 2

10 10 Magnitude 10

  • 1
  • 1

10 1

  • 2

2 10 10 10 10 10 10

  • 3
  • 3

Loglog

  • 80
  • 10
  • 50

Phase(deg)

  • 60
  • 20
  • 70

10 10 10 10 10 10

  • 3
  • 2
  • 1

1 2

  • 30
  • 90
  • 40

w(rad/sec)

30/51 CL-417 Process Control Introduction to Bode Plot

slide-31
SLIDE 31

Shortcomings of loglog scale for paper based work

◮ Gives information on low frequencies also ◮ Covers a large range of frequencies ◮ Requires a log-log scale for magnitude ◮ Requires a semilog scale for phase angle ◮ Normally plot both magnitude and phase

  • vs. frequency in a single sheet

◮ Convenient for computer (e.g. Scilab)

calculations

◮ This approach is followed in Franklin and

Powell

◮ Inconvenient to do in a single graph paper

31/51 CL-417 Process Control Introduction to Bode Plot

slide-32
SLIDE 32

Magnitude is drawn in decibels

◮ G(jω) = N1(jω)

D1(jω) N2(jω) D2(jω) · · · Nm(jω) Dm(jω)

◮ log |G(jω)| =

log |N1(jω)| + · · · + log |Nm(jω)| − log |D1(jω)| − · · · − log |Dm(jω)|

◮ 20 log |G(jω)| =

20(log |N1(jω)| + · · · + log |Nm(jω)| − log |D1(jω)| − · · · − log |Dm(jω)|)

◮ log is to the base 10 ◮ Unit is decibel - some people call it

deciBel

32/51 CL-417 Process Control Introduction to Bode Plot

slide-33
SLIDE 33

bode-1.sce Executed with One Change

Change LF to “semilog”

33/51 CL-417 Process Control Introduction to Bode Plot

slide-34
SLIDE 34

Bode plot of

1 10s+1 in semilog scale

2

  • 50

Magnitude (dB)

  • 25
  • 10
  • 30
  • 35
  • 15
  • 40
  • 5
  • 45

10 10 10 10 10 10

  • 3
  • 2
  • 1

1

  • 20

Semilog

  • 80
  • 10
  • 50

Phase(deg)

  • 60
  • 20
  • 70

10 10 10 10 10 10

  • 3
  • 2
  • 1

1 2

  • 30
  • 90
  • 40

w(rad/sec)

34/51 CL-417 Process Control Introduction to Bode Plot

slide-35
SLIDE 35

Scilab code bodegen-1.sci I

Scilab code:

1

/ / B o d e p l o t

2

/ / N u m e r a t o r a n d d e n o m i n a t o r a r e p a s s e d a s i n p u t a r g u m e n t s

3

/ / B o t h a r e p o l y n o m i a l s i n p o w e r s

  • f

s ( s a y )

4 5

f u n c t i o n bodegen (num , den ,w, l f )

6 7 G = num/den ; 8 G1 = horner (G, %i∗w) ; 9 G1p = phasemag (G1) ; 35/51 CL-417 Process Control Introduction to Bode Plot

slide-36
SLIDE 36

Scilab code bodegen-1.sci II

10 11

x g r i d ( ) ;

12

i f LF == ” normal ” then

13

x s e t ( ’ window ’ ,0) ; c l f ( ) ;

14

s u b p l o t ( 2 , 1 , 1)

15

p l o t 2 d (w, abs (G1) , l o g f l a g=”nn” , s t y l e = 2) ;

16

x t i t l e ( ’ Normal s c a l e ’ , ’ ’ , ’ Magnitude ’ ) ; x g r i d ( ) ;

17

s u b p l o t ( 2 , 1 , 2)

18

plot2d1 (w, G1p , l o g f l a g=”nn” , s t y l e = 2) ;

36/51 CL-417 Process Control Introduction to Bode Plot

slide-37
SLIDE 37

Scilab code bodegen-1.sci III

19

x g r i d ( ) ;

20

x t i t l e ( ’w( rad / sec ) ’ , ’ ’ , ’ Phase ( deg ) ’ ) ;

21

e l s e i f LF == ” s e m i l o g ” then

22

x s e t ( ’ window ’ ,1) ; c l f ( ) ;

23

s u b p l o t ( 2 , 1 , 1)

24

p l o t 2 d (w,20∗ log10 ( abs (G1) ) , l o g f l a g=” l n ” , s t y l e = 2) ;

25

x g r i d ( ) ;

26

x t i t l e ( ’ Semilog ’ , ’ ’ , ’ Magnitude (dB) ’ ) ;

27

s u b p l o t ( 2 , 1 , 2)

37/51 CL-417 Process Control Introduction to Bode Plot

slide-38
SLIDE 38

Scilab code bodegen-1.sci IV

28

plot2d1 (w, G1p , l o g f l a g=” l n ” , s t y l e = 2) ;

29

x g r i d ( ) ;

30

x t i t l e ( ’w( rad / sec ) ’ , ’ ’ , ’ Phase ( deg ) ’ ) ;

31

e l s e i f LF == ” l o g l o g ” then

32

x s e t ( ’ window ’ ,2) ; c l f ( ) ;

33

s u b p l o t ( 2 , 1 , 1)

34

p l o t 2 d (w, abs (G1) , l o g f l a g=” l l ” , s t y l e = 2) ;

35

x g r i d ( ) ;

38/51 CL-417 Process Control Introduction to Bode Plot

slide-39
SLIDE 39

Scilab code bodegen-1.sci V

36

x t i t l e ( ’ Loglog ’ , ’ ’ , ’ Magnitude ’ ) ;

37

s u b p l o t ( 2 , 1 , 2)

38

plot2d1 (w, G1p , l o g f l a g=” l n ” , s t y l e = 2) ;

39

x g r i d ( ) ;

40

x t i t l e ( ’w( rad / sec ) ’ , ’ ’ , ’ Phase ( deg ) ’ ) ;

41 end 42 43

e n d f u n c t i o n ;

39/51 CL-417 Process Control Introduction to Bode Plot

slide-40
SLIDE 40

Observations on semilog scale

◮ Gives information on low frequencies also ◮ Covers a large range of frequencies ◮ Requires a semilog paper for magnitude

and phase angle

◮ Convenient to do in a single graph paper ◮ This approach is followed in B. C. Kuo,

Nagrath and Gopal

40/51 CL-417 Process Control Introduction to Bode Plot

slide-41
SLIDE 41
  • 4. An Example

41/51 CL-417 Process Control Introduction to Bode Plot

slide-42
SLIDE 42

Generalisation for a simple pole

◮ Drew Bode plots for G(s) =

1 10s + 1

◮ Let us generalise for

1 τs + 1

42/51 CL-417 Process Control Introduction to Bode Plot

slide-43
SLIDE 43

Magnitude relations for a simple pole

◮ G(s) =

1 τs + 1, G(jω) = 1 jωτ + 1

◮ |G(jω)| =

1 √ ω2τ 2 + 1

◮ ω ≪ 1, |G(jω)| = 1, M = 20 log |G(jw)| = 0 ◮ Asymptote is M = 0 ◮ ω ≫ 1, |G(jω)| =

1 ωτ , M = −20 log ωτ

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

43/51 CL-417 Process Control Introduction to Bode Plot

slide-44
SLIDE 44

Corner Frequency

◮ G(jω) =

1 jωτ + 1

◮ |G(jω)| =

1 √ ω2τ 2 + 1

◮ For ω ≪ 1, the asymptote is |G(jω)| = 1 ◮ ω ≫ 1, the asymptote is |G(jω)| =

1 ωτ

◮ Two asymptotes intersect at ω = 1/τ ◮ w = 1/τ is known as the corner frequency

44/51 CL-417 Process Control Introduction to Bode Plot

slide-45
SLIDE 45

Value at the corner frequency

◮ |G(jω)| =

1 √ ω2τ 2 + 1

◮ ω = 1/τ is known as the corner frequency ◮ At ω = 1/τ, what is M? ◮ M = −20 log

√ 2 = −10 log 2 ≃ −3 dB

45/51 CL-417 Process Control Introduction to Bode Plot

slide-46
SLIDE 46

Bode plot of

1 10s+1 in semilog scale

2

  • 50

Magnitude (dB)

  • 25
  • 10
  • 30
  • 35
  • 15
  • 40
  • 5
  • 45

10 10 10 10 10 10

  • 3
  • 2
  • 1

1

  • 20

Semilog

  • 80
  • 10
  • 50

Phase(deg)

  • 60
  • 20
  • 70

10 10 10 10 10 10

  • 3
  • 2
  • 1

1 2

  • 30
  • 90
  • 40

w(rad/sec)

46/51 CL-417 Process Control Introduction to Bode Plot

slide-47
SLIDE 47

Phase relations for a simple pole

◮ G(s) =

1 τs + 1, G(jω) = 1 jωτ + 1

◮ ω ≪ 1, G(jω) = 1, φ = ∠G(jw) = 0 ◮ ω ≫ 1, G(jω) =

1 jωτ , φ = −90◦

◮ For ω = τ, G(jω) =

1 j1 + 1

◮ φ = −45◦

47/51 CL-417 Process Control Introduction to Bode Plot

slide-48
SLIDE 48

MCQ: First order system

Bode plot of a first order system has the following properties: A Slope = -20dB/decade for large frequency B w = 1/τ at corner frequency C φ = 45◦ at corner frequency D Maximum phase reached = −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: 4

48/51 CL-417 Process Control Introduction to Bode Plot

slide-49
SLIDE 49

Homework

◮ Draw the Bode plot for G(s) =

10 s + 1

◮ Draw the Bode plot for G(s) =

10 s + 1e−s

◮ Do this manually ◮ Also repeat using Scilab

49/51 CL-417 Process Control Introduction to Bode Plot

slide-50
SLIDE 50

What we learnt today

◮ Introduction to Bode plots ◮ Reason to use logarithmic and

semi-logarithmic scales

◮ A first order example

50/51 CL-417 Process Control Introduction to Bode Plot

slide-51
SLIDE 51

Thank you

51/51 CL-417 Process Control Introduction to Bode Plot