Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and...

30
Systems Analysis and Control Matthew M. Peet Arizona State University Lecture 19: Drawing Bode Plots, Part 1

Transcript of Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and...

Page 1: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Systems Analysis and Control

Matthew M. PeetArizona State University

Lecture 19: Drawing Bode Plots, Part 1

Page 2: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Overview

In this Lecture, you will learn:

Drawing Bode Plots

• Drawing Rules

Simple Plots

• Constants

• Real Zeros

M. Peet Lecture 19: Control Systems 2 / 30

Page 3: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Review

Recall from last lecture: Frequency Response

Input:

u(t) =M sin(ωt+ φ)

Output: Magnitude and Phase Shift

y(t) = |G(ıω)|M sin(ωt+ φ+ ∠G(ıω))

0 2 4 6 8 10 12 14 16 18 20−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

2.5

Linear Simulation Results

Time (sec)A

mpl

itude

Frequency Response to sinωt is given by G(ıω)

M. Peet Lecture 19: Control Systems 3 / 30

Page 4: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode Plots

We know G(ıω) determines the frequency response.How to plot this information?

• 1 independent Variable: ω• 2 Dependent Variables: Re(G(ıω)) and Im(G(ıω))

Im G(iω)

Re G(iω)

ω

Figure : The Obvious Choice

Really 2 plots put together.M. Peet Lecture 19: Control Systems 4 / 30

Page 5: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode Plots

An Alternative is to plot Polar Variables• 1 independent Variable: ω• 2 Dependent Variables: ∠G(ıω) and |G(ıω)|

|G(iω)|

< G(iω)

ω

• Advantage: All Information corresponds to physical data.I Can be found directly using a frequency sweep.

M. Peet Lecture 19: Control Systems 5 / 30

Page 6: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode Plots

If we only want a single plot we can use ω as a parameter.

−0.6 −0.4 −0.2 0 0.2 0.4 0.6

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

Nyquist Diagram

Real Axis

Imag

inar

y A

xis

A plot of Re(G(ıω)) vs. Im(G(ıω)) as a function of ω.

• Advantage: All Information in a single plot.• AKA: Nyquist Plot

M. Peet Lecture 19: Control Systems 6 / 30

Page 7: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode Plots

We focus on Option 2.

Definition 1.

The Bode Plot is a pair of log-log and semi-log plots:

1. Magnitude Plot: 20 log10 |G(ıω)| vs. log10 ω

2. Phase Plot: ∠G(ıω) vs. log10 ω

20 log10 |G(ıω)| is units of Decibels (dB)

• Used in Power and Circuits.

• 10 log10 | · | in other fields.

Note that by log, we mean log base 10 (log10)

• In Matlab, log means natural logarithm.

M. Peet Lecture 19: Control Systems 7 / 30

Page 8: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode PlotsExample

Lets do a simple pole

G(s) =1

s+ 1

We need

• Magnitude of G(ıω)

• Phase of G(ıω)

Im(s)

Re(s)

ω

1

} } ____

√1+ω2

Recall that

|G(s)| = |s− z1| · · · |s− zm||s− p1| · · · |s− pn|

So that

|G(ıω)| = 1

|ıω + 1|=

1√1 + ω2

M. Peet Lecture 19: Control Systems 8 / 30

Page 9: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode PlotsExample

How to Plot |G(ıω)| = 1√1+ω2

?

We actually want to plot it in dB, so ...

20 log |G(ıω)| = 20 log1√

1 + ω2= 20 log(1 + ω2)−

12 = −10 log(1 + ω2)

Three Cases:

Case 1: ω << 1

• Approximate 1 + ω2 ∼= 1

20 log |G(ıω)| = −10 log(1 + ω2)∼= −10 log 1 = 0

Case 2: ω = 1

20 log |G(ıω)| = −10 log(1 + ω2)

= −10 log(1 + ω2)

= −3.01

-35

-30

-25

-20

-15

-10

-5

0

5

10

Ma

gn

itu

de

(d

B)

Bode Diagram

M. Peet Lecture 19: Control Systems 9 / 30

Page 10: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode PlotsExample

Case 3: ω >> 1

• Approximate: 1 + ω2 ∼= ω2

20 log |G(ıω)| = −10 log(1 + ω2)

∼= −10 logω2

= −20 logω

-35

-30

-25

-20

-15

-10

-5

0

5

10

Ma

gn

itu

de

(d

B)

Bode Diagram

But we use a log− log plot.

• x-axis is x = logω

• y-axis is y = 20 log |G(ıω)| = −20 logω = −20x

Conclusion: On the log-log plot, when ω >> 1,

• Plot is Linear

• Slope is -20 dB/Decade!

M. Peet Lecture 19: Control Systems 10 / 30

Page 11: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode PlotsExample

Of course, we need to connect the dots.

-35

-30

-25

-20

-15

-10

-5

0

5

10

Ma

gn

itu

de

(d

B)

Bode Diagram

Compare to the Real Thing:

-35

-30

-25

-20

-15

-10

-5

0

Ma

gn

itu

de

(d

B)

Bode Diagram

M. Peet Lecture 19: Control Systems 11 / 30

Page 12: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode PlotsExample: Phase

Now lets do the phase. Recall:

∠G(s) =m∑i=1

∠(s− zi)−n∑i=1

∠(s− pi)

In this case,

∠G(ıω) = −∠(ıω + 1)

= − tan−1(ω)

Again, 3 cases:Case 1: ω << 1

• tan(∠G(ıω)) ∼= 0

• tan(∠G(ıω)) ∼= ∠G(ıω) ∼= 0

Im(s)

Re(s)

ω

1

} }<(iω +1)

10-2

10-1

100

101

102

-225

-180

-135

-90

-45

0

45

90

135

180

225

Ph

ase

(d

eg

)

Frequency (rad/sec)

M. Peet Lecture 19: Control Systems 12 / 30

Page 13: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode PlotsExample: Phase

Case 2: ω = 1

• tan(∠G(ıω)) = 1

• ∠G(ıω) ∼= 45◦

Between ω = .1 and ω = 10:

• Approximate Slope:I −45◦/Decade

Case 3: ω >> 1

• tan(∠G(ıω)) ∼= 10

• ∠G(ıω) ∼= −90◦

• Fixed at −90◦ for large ω!

Im(s)

Re(s)

ω

1

} }<(iω +1)

10-2

10-1

100

101

102

-90

-45

0

ω<<1P

ha

se (

de

g)

Frequency (rad/sec)

ω>>1

ω=1

M. Peet Lecture 19: Control Systems 13 / 30

Page 14: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode PlotsExample

We need to connect the dots somehow.

10-2

10-1

100

101

102

-90

-45

0

ω<<1

Ph

ase

(d

eg

)

Frequency (rad/sec)

ω>>1

ω=1

Compare to the real thing:

10-2

10-1

100

101

102

-90

-45

0

Ph

ase

(d

eg

)

Frequency (rad/sec)

M. Peet Lecture 19: Control Systems 14 / 30

Page 15: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode PlotsMethodology

So far, drawing Bode Plots seems pretty intimidating.

• Solving tan−1

• dB and log-plots

• Lots of trig

The process can be Greatly Simplified:

• Use a few simple rules.

Example: Suppose we have

G(s) = G1(s)G2(s)

Then|G(ıω)| = |G1(ıω)||G2(ıω)|

andlog |G(ıω)| = log |G1(ıω)|+ log |G2(ıω)|

M. Peet Lecture 19: Control Systems 15 / 30

Page 16: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode PlotsRule # 1

Rule # 1: Magnitude Plots Add in log-space.For G(s) = G1(s)G2(s),

20 log |G(ıω)| = 20 log |G1(ıω)|+ 20 log |G2(ıω)|

Decompose G into bite-size chunks:

G(s) =1

s+ 3(s+ 1)

1

s2 + 3s+ 1= G1(s)G2(s)G3(s)

M. Peet Lecture 19: Control Systems 16 / 30

Page 17: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode PlotsRule #2

Rule # 2: Phase Plots Add.For G(s) = G1(s)G2(s),

∠G(ıω) = ∠G1(ıω) + ∠G2(ıω)

M. Peet Lecture 19: Control Systems 17 / 30

Page 18: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode PlotsApproach

Our Approach is to Decompose G(s) into simpler pieces.• Plot the phase and magnitude of each component.• Add up the plots.

Step 1: Decompose G into all its poles and zeros

G(s) =(s− z1) · · · (s− zm)

(s− p1) · · · (s− pn)Then for magnitude

20 log |G(ıω)| =∑i

20 log |ıω − zi|+∑i

20 log1

|ıω − pi|

=∑i

20 log |ıω − zi| −∑i

20 log |ıω − pi|

And for phase:∠G(ıω) =

∑i

∠(ıω − zi)−∑i

∠(ıω − pi)

But how to plot ∠(ıω − zi) and 20 log |ıω − zi|?M. Peet Lecture 19: Control Systems 18 / 30

Page 19: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Plotting Simple TermsThe Constant

Before rushing in, lets make sure we don’t forget the constant term. If

G(s) = c(s− z1) · · · (s− zm)

(s− p1) · · · (s− pn)Magnitude: G1(s) = c

• |G1(ıω)| = |c|• 20 log |G1(ıω)| = 20 log |c|

-35

-30

-25

-20

-15

-10

-5

0

5

10

Ma

gn

itu

de

(d

B)

Bode Diagram

Frequency (log ω)

20 log |c|

Conclusion: Magnitude is Constant for all ωM. Peet Lecture 19: Control Systems 19 / 30

Page 20: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Plotting Simple TermsThe Constant

Phase: G1(s) = c

∠G1(ıω) = ∠c =

{0◦ c > 0

180◦ c < 0

10-2

10-1

100

101

102

-225

-180

-135

-90

-45

0

45

90

135

180

225

Ph

ase

(d

eg

)

Frequency (rad/sec)

c > 0

c < 0

Conclusion: phase is 0◦ if c > 0, otherwise 180◦.

M. Peet Lecture 19: Control Systems 20 / 30

Page 21: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Plotting Simple TermsA “Pure” Zero

Lets start with a zero at the origin: G1(s) = s.

Magnitude: G1(s) = s

• |G1(ıω)| = |ıω| = |ω|• 20 log |G1(ıω)| = 20 log |ω|

Our x-axis is logω.

• Plot is Linear for all ω

• Slope is +20 dB/Decade!

• Need a point: ω = 1

20 log |G1(ıω)||ω=1 = 20 log 1 = 0

• Passes through 0dB at ω = 1

-35

-30

-25

-20

-15

-10

-5

0

5

10

Ma

gn

itu

de

(d

B)

Bode Diagram

ω=1

High Gain at High Frequency

• A pure zero means u′(t)

• The faster the input, The largerthe output

M. Peet Lecture 19: Control Systems 21 / 30

Page 22: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Plotting Simple TermsA “Pure” Zero: Phase

Phase: G1(s) = s

• ∠G1(ıω) = ∠ıω = 90◦

• Always 90◦!

10-2

10-1

100

101

102

-225

-180

-135

-90

-45

0

45

90

135

180

225

Ph

ase

(d

eg

)

Frequency (rad/sec)

Always 90◦ out of phase. Why?

M. Peet Lecture 19: Control Systems 22 / 30

Page 23: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Plotting Simple TermsA “Pure” Zero: Multiple Zeros

What happens if there are multiple pure zeros

• Just what you would expect.

Magnitude: G1(s) = sk

• |G1(ıω)| = |ıω|k = |ω|k

20 log |G1(ıω)| = 20 log |ω|k

= 20k log |ω|

• Slope is +20k dB/Decade!

Need a Point

• At ω = 1:

20 log |G1(ıω)||ω=1 = 20k log 1 = 0

• Still Passes through 0dB at ω = 1

-35

-30

-25

-20

-15

-10

-5

0

5

10

Ma

gn

itu

de

(d

B)

Bode Diagram

ω=1

k = 2

k = 1

k = 3

k = 4

k pure zeros added together.

M. Peet Lecture 19: Control Systems 23 / 30

Page 24: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Plotting Simple TermsA “Pure” Zero: Multiple Zeros

And phase for multiple pure zeros?Phase: G1(s) = sk

• ∠G1(ıω) = ∠(ıω)k = k∠ıω = 90◦k

• Always 90◦k

10-2

10-1

100

101

102

-45

0

45

90

135

180

225

270

315

360

405

Ph

ase

(d

eg

)

Frequency (rad/sec)

k = 2

k = 1

k = 3

k = 4

k pure zeros added together.

M. Peet Lecture 19: Control Systems 24 / 30

Page 25: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Plotting Simple TermsPlotting Normal Zeros

A zero at the origin is a line with slope +20◦/Decade.• What if the zero is not at the origin?

I We did one example already ( 1s+1

).

Change of Format: to simplify steady-state response, we use

G1(s) = (τs+ 1)• Pole is at s = − 1

τ• Also put poles in this form

Rewrite G(s): (s+ p)→ p( 1ps+ 1).

G(s) = k(s+ z1) · · · (s+ zm)

(s+ p1) · · · (s+ pn)

= kz1 · · · zmp1 · · · pn

( 1z1s+ 1) · · · ( 1

zms+ 1)

( 1p1s+ 1) · · · ( 1

pns+ 1)

= c(τz1s+ 1) · · · (τzms+ 1)

(τp1s+ 1) · · · (τpns+ 1)

Where

• τzi =1zi

• τpi =1pi

• c = k z1···zmp1···pn

Assume zi and pi are Real.

M. Peet Lecture 19: Control Systems 25 / 30

Page 26: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Plotting Simple TermsPlotting Normal Zeros

G(s) = c(τz1s+ 1) · · · (τzms+ 1)

(τp1s+ 1) · · · (τpns+ 1)

The advantage of this form is that steady-state response to a step is

yss = lims→0

G(s) = G(0) = c

10-2

10-1

100

101

102

-90

-45

0

Ph

ase

(d

eg

)

Frequency (rad/sec)

Low Frequency Response is given by the constant term, c.

M. Peet Lecture 19: Control Systems 26 / 30

Page 27: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Plotting Simple TermsPlotting Normal Zeros

G1(s) = (τs+ 1)

|G1(ıω)| = |ıωτ + 1| =√1 + τ2ω2

Magnitude:

20 log |G1(ıω)| = 20 log(1+ω2τ2)12 = 10 log(1+ω2τ2)

Im(s)

Re(s)

ωτ

1

} } ______

√1+ω2 τ2

Case 1: ωτ << 1

• Approximate 1 + ω2τ2 ∼= 1

20 log |G(ıω)| = 20 log(1 + ω2τ2)∼= 20 log 1 = 0

Case 2: ωτ = 1

20 log |G(ıω)| = 10 log(1 + ω2τ2)

= 10 log 2 = 3.01 0

5

10

15

20

25

30

35

40

Ma

gn

itu

de

(d

B)

Bode Diagram

ω = τ -1

10-2

10-1

100

101

102

Frequency (rad/sec)

M. Peet Lecture 19: Control Systems 27 / 30

Page 28: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Bode PlotsExample

Case 3: ωτ >> 1

• Approximate 1 + ω2τ2 ∼= ω2τ2

20 log |G(ıω)| = 20 log√1 + ω2τ2

∼= 10 logω2τ2

= 20 logωτ

= 20 logω + 20 log τ

0

5

10

15

20

25

30

35

40

Ma

gn

itu

de

(d

B)

Bode Diagram

ω = τ -1

+20 dB / decade

10-2

10-1

100

101

102

Frequency (rad/sec)

Conclusion: When ω >> 1,

• Plot is Linear

• Slope is +20 dB/Decade!

• inflection at ω = 1τ

M. Peet Lecture 19: Control Systems 28 / 30

Page 29: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Plotting Simple TermsPlotting Normal Zeros

Compare this to the magnitude plot of

G1(s) = s+ a

ω << τ -1 ω >> τ -1

This is why we use the format G1(s) = τs+ 1

• We want 0dB (no gain) at low frequency.

M. Peet Lecture 19: Control Systems 29 / 30

Page 30: Systems Analysis and Controlcontrol.asu.edu/Classes/MAE318/318Lecture19.pdf · Systems Analysis and Control Matthew M. Peet ... The Bode Plot is a pair of log-log and semi-log ...

Summary

What have we learned today?

Drawing Bode Plots

• Drawing Rules

Simple Plots

• Constants

• Real Zeros

Next Lecture: More Bode Plotting

M. Peet Lecture 19: Control Systems 30 / 30