Download as pdf or txt
Download as pdf or txt
You are on page 1of 57

Overview of Bode Plots

Review of transfer functions and Bode plots


Piece-wise linear approximations
First-order terms

Second-order terms (complex poles & zeros)

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

Prerequisites and New Knowledge


Prerequisite knowledge
Ability to use transfer functions for steady-state sinusoidal circuit
analysis
Ability to generate and interpret Bode plots with tool such as
Matlab
New knowledge
Knowledge of how poles and zeros affect transfer function
frequency response

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

Transfer Function Review


x(t)

H(s)

y(t)

Recall that if H(s) is known and


x(t) = A cos(t + ),
then we can find the steady-state solution for y(t):
yss (t) = A|H(j)| cos (t + + H(j))

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

Bode Plots
x(t)

H(s)

y(t)

Bode plots are standard method of plotting the magnitude and


phase of H(s)
Both plots use a logarithmic scale for the x-axis
Frequency is in units of radians/second (rad/s)

The phase is plotted on a linear scale in degrees

Magnitude is plotted on a linear scale in decibels


HdB (j) , 20 log10 |H(j)|

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

Bode Plot Approximations


Until recently (late 1980s) Bode plots were drawn by hand

There were many rules-of-thumb, tables, and template plots to


help
Today engineers primarily use MATLAB, or the equivalent

Why discuss the old method of plotting by hand?


It is still important to understand how the poles, zeros, and
gain influence the Bode plot
These ideas are used for transfer function synthesis, analog
circuit design, and control systems
We will discuss simplified methods of generating Bode plots
Based on asymptotic approximations

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

Alternate Transfer Function Expressions


There are many equivalent expressions for transfer functions.
H(s) =
=
=

N (s)
D(s)
bm sm + bm1 sm1 + + b1 s + b0
an sn + an1 sn1 + + a1 s + a0
bm (s z1 )(s z2 ) . . . (s zm )
s
an
(s p1 )(s p2 ) . . . (s pn )


 

s
s
s
1 z1
1 z2 . . . 1 zm

 

k s 
1 ps1
1 ps2 . . . 1 psn

This last expression is called standard form

The first step in making Bode plots is to convert H(s) to standard


form

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

Magnitude Components
Consider the expression for the transfer function magnitude:
|HdB (j)| = 20 log10 |H(j)|


s (1 s ) . . . (1 s )

z1
zm
= 20 log10 k

(1 ps1 ) . . . (1 psn )
= 20 log10 |k| |j|

|1

|1

s=j
j
j
|
.
.
.
|1

z1
zm |
j
j
|
.
.
.
|1

p1
pn |

= 20 log10 |k| 20 log10








j

+20 log10 1
+ + 20 log10 1

z1






j
20 log10 1
20 log10 1

p1

J. McNames

Portland State University

ECE 222

Bode Plots


j
zm

j
pn

Ver. 1.22

Magnitude Components Comments


|HdB ()| = 20 log10 |k| 20 log10






+20 log10 1 j
+

+
20
log

10 1
z1





j
20 log10 1 p1 20 log10 1


j
zm

j
pn

Thus, |HdB ()| can be written as a sum of simple functions

This is similar like using basis functions {(t),u(t),& r(t)} to write


an expression for a piecewise linear signal
We will use this approach to generate our piecewise linear
approximations of the Bode plot
Note that there are four types of components in this expression
Constant
Linear term
Zeros
Poles

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

Magnitude Components: Constant


|H(j)| (dB)

40
20
0
(rad/sec)

-20
-40

The constant term, 20 log10 |k|, is a straight line on the Bode plot.

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

Magnitude Components: Linear Term


|H(j)| (dB)

40
20
0
(rad/sec)

-20
-40

The linear term, 20 log10 ||, is a line on the magnitude plot with a
slope equal to 20 dB per decade.
The x-axis intercept occurs at = 1 rad/s.

Plot the Bode magnitude plots for H(s) = s, 1s ,s2 ,

J. McNames

Portland State University

ECE 222

1
s2 .

Bode Plots

Ver. 1.22

10

Magnitude Components: Real Zeros


Consider two limiting
conditions for a term containing a zero,


20 log10 1 j
z
First condition: |z|


lim 20 log10 1

z 0

Thus, if

|z|


1, then 20 log10 1

j
z

Second condition: |z|




j

lim 20 log10 1 z = 20 log10 |

j
z

=0

0.

j
z |

= 20 log10 || 20 log10 |z|

Thus, if |z|
1, then this term is linear (on a log scale) with a slope
of 20 dB per decade and an x-axis intercept at = |z|.

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

11

Magnitude Components: Real Zeros Continued


|H(j)| (dB)

40
20
0
(rad/sec)

-20
-40

Our piecewise approximation joins these two linear asymptotic


approximations at = |z|.


j

Plot the piecewise approximation of the term 20 log10 1
.
z

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

12

Magnitude Components: Real Zeros Continued 2


50

Bode Magnitude Real Zero: z = 1 rad/s

40

Mag (dB)

30
20
10
0
10
2
10

10

10
Frequency (rad/sec)

10

10

The approximation is least accurate at = |z|. The true magnitude is


3 dB higher than the approximation at this corner frequency.

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

13

Magnitude Components: Real Poles


|H(j)| (dB)

40
20
0
(rad/sec)

-20
-40

Consider two
conditions for a term containing a pole,
limiting


20 log10 1 j
p

This is just the negative of the expression for a zero

The piecewise approximation is the mirror image of that for a zero

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

14

Magnitude Components: Real Poles Continued


10

Bode Magnitude Real Pole: p = 1 rad/s

Mag (dB)

10
20
30
40
50
2
10

10

10
Frequency (rad/sec)

10

10

The approximation is least accurate at = |p|. The true magnitude is


3 dB less than the approximation at this corner frequency.

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

15

Complex Poles & Zeros


Complex poles and zeros require special attention
Will discuss later
There are essentially 3 steps to generating piecewise linear
approximations of Bode plots
1. Convert to standard form
2. Plot the components
3. Graphically add the components together

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

16

Example 1: Magnitude Components


Draw the piecewise approximation of the Bode magnitude plot for
(s + 10)(s + 100)2
H(s) =
10s2 (s + 1000)

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

17

30 k

Example 1: Workspace
|H(j)| (dB)

60
40
20
0

10

10

10

10

10

10

(rad/sec)

-20
-40
-60

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

18

Example 1: Solution
Bode Magnitude Example 1
60

Mag (dB)

40
20
0
20
40
1

10

J. McNames

10

10

10
10
Frequency (rad/sec)

Portland State University

ECE 222

10

Bode Plots

10

Ver. 1.22

19

Magnitude Components Summary



 


s
s
s
1

.
.
.
1

z
z
z
N (s)
1
2
m

 

H(s) =
= k s 
s
s
s
D(s)
1
1
... 1
p1

p2

pn

Can consider the roots of N (s) (zeros) and D(s) (poles) as


corner frequencies (radians/second)
Each zero z causes the magnitude to increase at 20 dB/decade
for |z|
Each pole p causes the magnitude to decrease at 20 dB/decade
for |p|

The constant term k just shifts the entire response up or down on


a log (dB) scale
The linear term causes a linear offset with a slope that is
20 dB/decade

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

20

Phase Components
H(j)

= k

(j) (1
(1

j
z1 ) . . . (1

j
p1 ) . . . (1

j
zm )

j
pn )

Each of these terms can be expressed in polar form: a + jb = Aej .

Note that (j) = j = (ej 2 ) = ej 2

j 2
( e )N1 ej1

. . . Nm ejm
H(j) = |k|e
D1 ej1 . . . Dn ejn
|| N1 . . . Nm
= |k|

D 1 . . . Dn


exp j(k + 2 + 1 + + n 1 n )
jk

where

J. McNames

(
0
k =
1

Portland State University

k>0
k<0

ECE 222

Bode Plots

Ver. 1.22

21

Phase Components: Comments


H(j)

= k + 2 + 1 + + n 1 n




j
j
= k + 2 + 1
+ + 1
z1
zm




j
j
1
1
p1
pn

Thus the phase of H(j) is also a linear sum of the phases due to
each component
We will consider each of the four components in turn
Constant
Linear term
Zeros
Poles

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

22

Phase Components: Constant


H(j) (deg)
180
90

0
(rad/sec)
90

180

The complex angle of the constant term, k, is either 0 if k > 0 or


180 if k < 0.

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

23

Phase Components: Linear Term


H(j) (deg)
180
90

0
(rad/sec)
90

180

The linear term, (j) = j = 90 , is a constant multiple of 90


Plot the Bode phase plots for H(s) = s, 1s ,s2 ,

J. McNames

Portland State University

ECE 222

1
s2 .

Bode Plots

Ver. 1.22

24

Phase Components: Real Zeros


Consider three limiting conditions for a term containing a zero,
1 j
z

First condition: |z|

lim 1

Thus, if

|z|

1, then 1

j
z

j
z

= 0

0 .

Second condition: = |z|



j
1 z =|z| = (1 jz ) = z 45

where z = sign(z)

Third condition: |z|


lim 1

Thus, if
J. McNames

|z|

j
z

1, then 1

j
z

Portland State University

=


j
z

= z 90

z 90 .
ECE 222

Bode Plots

Ver. 1.22

25

Phase Components: Real Zeros Continued


H(j) (deg)
180
90

0
(rad/sec)
90

180

Our piecewise approximation joins these three linear asymptotic


approximations at = 101 |z| and = 10|z|.

j
Plot the piecewise approximation of the term 1 z . Assume
that z is in the left-hand plane (i.e. Re{z} < 0)

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

26

Phase Components: Real Zeros in Left Plane


100

Phase (deg)

80

60

40

20

0
2

10

10

10
Frequency (rad/sec)

10

10

The approximation is least accurate at = 0.1|z| and = 10|z|.

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

27

Phase Components: Real Zeros Continued 2


H(j) (deg)
180
90

0
(rad/sec)
90

180

If the zero is in the right half plane (i.e. Re{z} > 0), then the phase
approaches 90 asymptotically.

j
Plot the piecewise approximation of the term 1 z . Assume
that z is in the right half plane.

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

28

Phase Components: Real Zeros in Right Plane


0

Phase (deg)

20

40

60

80

100
2
10

10

10
Frequency (rad/sec)

10

10

The approximation is least accurate at = 0.1|z| and = 10|z|.

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

29

Phase Components: Real Poles


Real poles in the left half plane have the same phase as real zeros in
the right half plane. We will only discuss poles in the left half plane
because only these systems are stable.
First condition: |p|


lim 1

j
p

= 0

Second condition: = |p|




j
= (1 sign(p) j) = (1 + j) = 45
1 p
=|p|

Third condition: |p|






j
j

lim

=
j
=
90
p
p

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

30

Phase Components: Real Poles


H(j) (deg)
180
90

0
(rad/sec)
90

180

Plot the piecewise approximation of the term 1


that p is in the left-hand plane (i.e. Re{p} < 0)

J. McNames

Portland State University

ECE 222

j
p

Bode Plots

. Assume

Ver. 1.22

31

Phase Components: Real Poles in Left Plane


0

Phase (deg)

20

40

60

80

100
2
10

10

10
Frequency (rad/sec)

10

10

The approximation is least accurate at = 0.1|p| and = 10|p|.

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

32

60 k

Example 2: Phase Components


H(j) (deg)

270
180
90

10

10

10

10

10

10

(rad/sec)

90
180

-270

Draw the piecewise approximation of the Bode phase plot for


(s + 10)(s + 100)2
H(s) =
10s2 (s + 1000)

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

33

Example 2: Solution
50

Phase (deg)

50

100

150

10

J. McNames

10

10

10
10
Frequency (rad/sec)

Portland State University

ECE 222

Bode Plots

10

10

Ver. 1.22

34

Phase Components Summary


H(j)



j
j

= k + 2 + 1
+ + 1
z1
zm




j
j
1
1
p1
pn

Each zero z causes a phase shift of 90


Spans from one decade before to one decade after the zero
Zeros in the left half plane cause a 90 increase
Zeros in the right half plane cause a 90 decrease (like poles)
Each zero z causes a phase shift of 90
Spans from one decade before to one decade after the pole
The constant k causes a phase shift of 0 (k > 0) or 180 (k < 0)

The linear term causes a phase shift of 90

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

35

Complex Poles
Complex poles can be expressed in the following form:
n2
C(s) = 2
=
2
s + 2n s + n

1
1+

2 sn

n is called the undamped natural frequency

s
n

2

(zeta) is called the damping ratio


p
The poles are p1,2 = ( 2 1) n
If 1, the poles are real

If 0 < < 1, the poles are complex

If = 0, the poles are imaginary: p1,2 = jn

If < 0, the poles are in the right half plane (Re{p} > 0) and the
system is unstable

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

36

Complex Poles Continued


The transfer function C(s) can also be expressed in the following form
C(s) =

1
1 + 2 sn +

where

s
n

2 =

Q,
Note that if

1
2

1
1+

s
Qn

s
n

2

1
2

< Q < , the poles are complex.

The meaning of Q, the Quality factor, will become clear in the


following slides.
1
C(j) =
 2
j
1 n + Q
n

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

37

Complex Poles Magnitude


1

 2

j

+
20 log10 |C(j)| = 20 log10 1


n
Qn
s
2 
2

2
= 20 log10
+
1 2
n
Qn
For n ,
20 log10 |C(j)| 20 log10 |1| = 0 dB
For n ,
20 log10 |C(j)| 20 log10

2
= 40 log10
dB
n2
n

At these extremes, the behavior is identical to two real poles.

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

38

Complex Poles Magnitude Continued


s
2 
2

2
20 log10 |C(j)| = 20 log10
1 2
+
n
Qn
For = n ,
20 log10 |C(jn )| = 20 log10

J. McNames

Portland State University

1
= 20 log10 Q = QdB
Q

ECE 222

Bode Plots

Ver. 1.22

39

Complex Poles Magnitude


Complex Poles
40

Q = 0.1
Q = 0.5
Q = 0.707
Q=1
Q=2
Q = 10
Q = 100

Mag (dB)

20

20

40

60

10

J. McNames

10
Frequency (rad/sec)

Portland State University

ECE 222

10

Bode Plots

Ver. 1.22

40

Complex Poles Phase


C(j)

=
1

For n ,

1
2

j
Qn

C(j) 1 = 0

For n ,
C(j)

Q
n

Qn
= 1 = 180

For = n ,
C(j)

1
1
= = j = 90
Qj
j

At the extremes, the behavior is identical to two real poles. At other


values of near n , the behavior is more complicated.

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

41

Complex Poles Phase


Complex Poles
0

Q = 0.1
Q = 0.5
Q = 0.707
Q=1
Q=2
Q = 10
Q = 100

20

Phase (deg)

40
60
80
100
120
140
160
180
10

J. McNames

10

10
Frequency (rad/sec)

Portland State University

ECE 222

10

Bode Plots

10

Ver. 1.22

42

Complex Zeros
Left half plane:
Inverted magnitude of complex poles
Inverted phase of complex poles
Right half plane:
Inverted magnitude of complex poles
Same phase of complex poles
This is the same relationship real zeros had to real poles

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

43

Complex Zeros Magnitude


Complex Zeros

80
60

Mag (dB)

40
20
Q = 0.1
Q = 0.5
Q = 0.707
Q=1
Q=2
Q = 10
Q = 100

0
20
40
1

10

J. McNames

10
Frequency (rad/sec)

Portland State University

ECE 222

10

Bode Plots

Ver. 1.22

44

Complex Zeros Phase


Complex Zeros
180
160

Phase (deg)

140
120
100
80

Q = 0.1
Q = 0.5
Q = 0.707
Q=1
Q=2
Q = 10
Q = 100

60
40
20
0
2

10

J. McNames

10

10
Frequency (rad/sec)

Portland State University

ECE 222

10

Bode Plots

10

Ver. 1.22

45

Complex Poles Maximum


What is the frequency at which |C(j)| is maximized?
C(j)

1+
|C(j)|

r

j
Qn

1


2
2
n

1
2


+

j
n

2

Qn

2

For high values of Q, the maximum of |C(j)| > 1

This is called peaking

The largest Q before the onset of peaking is Q =

1
2

0.707

This curve is said to be maximally flat

This is also called a Butterworth response

In this case, |C(jn )| = 3 dB and n is the cutoff frequency


J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

46

Complex Poles Maximum Continued


If Q > 0.707, the maximum magnitude and frequency are as follows:
r
Q
1
r = n 1
|C(j
)|
=
r
1
2Q2
1 4Q
2
r is called the resonant frequency or the damped natural
frequency
As Q , r n

For sufficiently large Q (say Q > 5)


r n
|C(jr )| Q

Peaked responses are useful in the synthesis of high-order filters

Complex zeros (in the left half plane) have the inverted magnitude
and phase of complex poles

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

47

Example 3: Complex Poles


50 mH

R
+

vs(t)

200 nF

vo(t)
-

Generate the Bode plot for the circuit shown above.

H(s) =

J. McNames

s2 +

1
LC
R
1
L s + LC

n2
n2
= 2 n
= 2
s + 2n s + n2
s + Q s + n2

Portland State University

ECE 222

Bode Plots

Ver. 1.22

48

Example 3: Complex Poles Continued


n

Q =

1
= 10 k rad/s
LC
R
R
LC =
CL = R 0.001
2L
2
r
1 L
L 1
500

=
=
CR
R
LC R

R=5

= 0.005

Q = 100

Very Light Damping

R = 50
R = 707

= 0.05
= 1.41

Q = 10
Q = 0.707

Light Damping
Strong Damping

R = 1 k

=1

Q = 0.5

Critical Damping

R = 5 k

=5

Q = 0.1

Over Damping

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

49

Example 3: Magnitude Response (dB)


Resonance Example
40
20

Mag (dB)

0
20
40
60
80
100
120
2
10

J. McNames

R=5
R = 50
R = 707
R = 1 k
R = 5 k
R = 50 k
10

10
Frequency (rad/sec)

Portland State University

ECE 222

10

Bode Plots

10

Ver. 1.22

50

Example 3: Phase Response


Resonance Example
0
20

Phase (deg)

40
60
80
R=5
R = 50
R = 707
R = 1 k
R = 5 k
R = 50 k

100
120
140
160
180
2

10

J. McNames

10

10
Frequency (rad/sec)

Portland State University

ECE 222

10

Bode Plots

10

Ver. 1.22

51

Example 3: Step Response


Resonance Example

R=5
R = 50
R = 707
R = 1 k
R = 5 k
R = 50 k

1.8
1.6

Output (V)

1.4
1.2
1
0.8
0.6
0.4
0.2
0

J. McNames

0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009


Time (sec)

Portland State University

ECE 222

Bode Plots

0.01

Ver. 1.22

52

Example 3: MATLAB Code


function [] = Resonance ();
close all ;
% = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = == = = = == = = = = = = == = = = == = = == = = == = = = == = = == =
% User - Specified Parameters
% = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = == = = = == = = = = = = == = = = == = = == = = == = = = == = = == =
wn = 1;
% Undamped natural frequency
L = 50e -3;
% Inductance
C = 200 e -9;
% Capacitance
R = [5 50 707 1 e3 5 e3 50 e3 ];
% Resistances
N = 1000;
% Number of frequencies to evaluate plot at
PL = 2;
% Lower frequency decade ( w = 10^ PL )
PH = 6;
% Upper frequency decade ( w = 10^ PH )
% = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = == = = = == = = = = = = == = = = == = = == = = == = = = == = = == =
% Preprocessing
% = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = == = = = == = = = = = = == = = = == = = == = = == = = = == = = == =
functionName = sprintf ( % s , mfilename );
% Get the function name
f i l e I d e n tif ier = fopen ([ functionName .tex ] , w );
% = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = == = = = == = = = = = = == = = = == = = == = = == = = = == = = == =
% Calculate the Responses
% = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = == = = = == = = = = = = == = = = == = = == = = == = = = == = = == =
mag = [];
phs = [];
t = 0:0 .00001 :0 .01 ;
stp = zeros ( length (t ) , length ( R ));

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

53

st = {};
w = logspace ( PL , PH ,N );
for cnt = 1: length (R ) ,
sys = tf ([1/( L *C )] ,[1 R( cnt )/ L 1/( L * C )]);
[m , p ] = bode ( sys , w );
mag = [ mag reshape (m ,N ,1)];
phs = [ phs reshape (p ,N ,1)];
stp (: , cnt ) = step ( sys , t );
end

% = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = == = = = == = = = = = = == = = = == = = == = = == = = = == = = == =
% Plot the Figures
% = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = == = = = == = = = = = = == = = = == = = == = = == = = = == = = == =
figure (1);
FigureSet (1 , Slides );
h = semilogx (w ,20* log10 ( mag ));
set (h , LineWidth ,1 .5 );
grid on ;
xlabel ( Frequency ( rad / sec ) );
ylabel ( Mag ( dB ) );
title ( Resonance Example );
box off ;
xlim ([ w (1) w ( end )]);
ylim ([ -120 45]);
AxisSet (8);
legend ( R = 5 \ Omega , R = 50 \ Omega , R = 707 \ Omega , R = 1 k\ Omega , R = 5 k \ Omega , R = 50 k\ Omega

fileName = sprintf ( %s - Magnitude , functionName );


print ( fileName , - depsc );
fprintf ( fileIdentifier , % % = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = = == = = == = = = == = = == = = = == = = == = = == = = = == = = == \n

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

54

fprintf ( fileIdentifier , \\ newslide \ n );


fprintf ( fileIdentifier , \\ slideheading { Example \\ arabic { exc }: Magnitude Respo nse ( dB )}\ n );
fprintf ( fileIdentifier , % % = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = = == = = == = = = == = = == = = = == = = == = = == = = = == = = == \n
fprintf ( fileIdentifier , \\ i n c l u d e g ra phi cs[ scale =1]{ Matlab /% s }\ n , fileName );

figure (2);
FigureSet (2 , Slides );
h = semilogx (w , phs );
set (h , LineWidth ,1 .5 );
grid on ;
xlabel ( Frequency ( rad / sec ) );
ylabel ( Phase ( deg ) );
title ( Resonance Example );
box off ;
axis ([10^ PL 10^ PH -190 10]);
AxisSet (8);
legend ( R = 5 \ Omega , R = 50 \ Omega , R = 707 \ Omega , R = 1 k\ Omega , R = 5 k \ Omega , R = 50 k\ Omega

fileName = sprintf ( %s - Phase , functionName );


print ( fileName , - depsc );
fprintf ( fileIdentifier , % % = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = = == = = == = = = == = = == = = = == = = == = = == = = = == = = == \n
fprintf ( fileIdentifier , \\ newslide \ n );
fprintf ( fileIdentifier , \\ slideheading { Example \\ arabic { exc }: Phase Response }\ n );
fprintf ( fileIdentifier , % % = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = = == = = == = = = == = = == = = = == = = == = = == = = = == = = == \n
fprintf ( fileIdentifier , \\ i n c l u d e g ra phi cs[ scale =1]{ Matlab /% s }\ n , fileName );
figure (3);
FigureSet (2 , Slides );
h = plot (t , stp );
set (h , LineWidth ,1 .5 );
grid on ;

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

55

xlabel ( Time ( sec ) );


ylabel ( Output ( V ) );
title ( Resonance Example );
AxisSet (8);
legend ( R = 5 \ Omega , R = 50 \ Omega , R = 707 \ Omega , R = 1 k\ Omega , R = 5 k \ Omega , R = 50 k\ Omega

fileName = sprintf ( %s - StepResponse , functionName );


print ( fileName , - depsc );
fprintf ( fileIdentifier , % % = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = = == = = == = = = == = = == = = = == = = == = = == = = = == = = == \n
fprintf ( fileIdentifier , \\ newslide \ n );
fprintf ( fileIdentifier , \\ slideheading { Example \\ arabic { exc }: Step Response }\ n );
fprintf ( fileIdentifier , % % = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = = == = = == = = = == = = == = = = == = = == = = == = = = == = = == \n
fprintf ( fileIdentifier , \\ i n c l u d e g ra phi cs[ scale =1]{ Matlab /% s }\ n , fileName );

% = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = == = = = == = = = = = = == = = = == = = == = = == = = = == = = == =
% Post Processing
% = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = == = = = == = = = = = = == = = = == = = == = = == = = = == = = == =
fprintf ( fileIdentifier , % % = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = = == = = == = = = == = = == = = = == = = == = = == = = = == = = == \n
fprintf ( fileIdentifier , \\ newslide \ n );
fprintf ( fileIdentifier , \\ slideheading { Example \\ arabic { exc }: MATLAB Code }\ n );
fprintf ( fileIdentifier , % % = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = = == = = == = = = == = = == = = = == = = == = = == = = = == = = == \n
fprintf ( fileIdentifier , \ t \\ matlabcode { Matlab /% s.m }\ n , functionName );
fclose ( f i l e I d e n tif ier );

J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

56

Bode Plots Summary


Magnitude and phase are just made up of simple components
Constant gains shift the entire magnitude plot up or down

Linear terms cause a linear attenuation or gain in the magnitude

Poles
At low frequencies ( p) have no effect
At high frequencies ( p) cause a magnitude decrease
(attenuation) of 20 dB per frequency decade and a phase shift
of 90

Zeros
At low frequencies ( p) have no effect
At high frequencies ( p) cause a magnitude increase (gain)
of 20 dB per frequency decade and a phase shift of 90
Complex poles and zeros can cause peaking or resonance

We can think of the poles and zeros as corner frequencies


J. McNames

Portland State University

ECE 222

Bode Plots

Ver. 1.22

57

You might also like