Вы находитесь на странице: 1из 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 1
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 aect transfer function
frequency response
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 2
Transfer Function Review
H (s )
x ( t ) y ( t )
Recall that if H(s) is known and
x(t) = Acos(t + ),
then we can nd the steady-state solution for y(t):
y
ss
(t) = A|H(j)| cos (t + +H(j))
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 3
Bode Plots
H (s )
x ( t ) 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
H
dB
(j) 20 log
10
|H(j)|
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 4
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 inuence the Bode plot
These ideas are used for transfer function synthesis, analog
circuit design, and control systems
We will discuss simplied methods of generating Bode plots
Based on asymptotic approximations
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 5
Alternate Transfer Function Expressions
There are many equivalent expressions for transfer functions.
H(s) =
N(s)
D(s)
=
b
m
s
m
+ b
m1
s
m1
+ + b
1
s + b
0
a
n
s
n
+ a
n1
s
n1
+ + a
1
s + a
0
=
b
m
a
n
s

(s z
1
)(s z
2
) . . . (s z
m
)
(s p
1
)(s p
2
) . . . (s p
n
)
= k s

_
1
s
z
1
__
1
s
z
2
_
. . .
_
1
s
z
m
_
_
1
s
p
1
__
1
s
p
2
_
. . .
_
1
s
p
n
_
This last expression is called standard form
The rst 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 6
Magnitude Components
Consider the expression for the transfer function magnitude:
|H
dB
(j)| = 20 log
10
|H(j)|
= 20 log
10

k
s

(1
s
z
1
) . . . (1
s
z
m
)
(1
s
p
1
) . . . (1
s
p
n
)

s=j
= 20 log
10
|k| |j|

|1
j
z
1
| . . . |1
j
z
m
|
|1
j
p
1
| . . . |1
j
p
n
|
= 20 log
10
|k| 20 log
10

+20 log
10

1
j
z
1

+ + 20 log
10

1
j
z
m

20 log
10

1
j
p
1

20 log
10

1
j
p
n

J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 7
Magnitude Components Comments
|H
dB
()| = 20 log
10
|k| 20 log
10

+20 log
10

1
j
z
1

+ + 20 log
10

1
j
z
m

20 log
10

1
j
p
1

20 log
10

1
j
p
n

Thus, |H
dB
()| 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 8
Magnitude Components: Constant
20
0
-20
-40
(dB)
(rad/sec)
40
|H(j)|

The constant term, 20 log


10
|k|, is a straight line on the Bode plot.
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 9
Magnitude Components: Linear Term
20
0
-20
-40
(dB)
(rad/sec)
40
|H(j)|

The linear term, 20 log


10
||, 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,
1
s
,s
2
,
1
s
2
.
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 10
Magnitude Components: Real Zeros
Consider two limiting conditions for a term containing a zero,
20 log
10

1
j
z

First condition: |z|


lim

z
0
20 log
10

1
j
z

= 0
Thus, if

|z|
1, then 20 log
10

1
j
z

0.
Second condition: |z|
lim

20 log
10

1
j
z

= 20 log
10
|
j
z
| = 20 log
10
|| 20 log
10
|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
20
0
-20
-40
(dB)
(rad/sec)
40
|H(j)|

Our piecewise approximation joins these two linear asymptotic


approximations at = |z|.
Plot the piecewise approximation of the term 20 log
10

1
j
z

.
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 12
Magnitude Components: Real Zeros Continued 2
10
2
10
1
10
0
10
1
10
2
10
0
10
20
30
40
50
Bode Magnitude Real Zero: z = 1 rad/s
M
a
g

(
d
B
)
Frequency (rad/sec)
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
20
0
-20
-40
(dB)
(rad/sec)
40
|H(j)|

Consider two limiting conditions for a term containing a pole,


20 log
10

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
2
10
1
10
0
10
1
10
2
50
40
30
20
10
0
10
Bode Magnitude Real Pole: p = 1 rad/s
M
a
g

(
d
B
)
Frequency (rad/sec)
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
H(s) =
(s + 10)(s + 100)
2
10s
2
(s + 1000)
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 17
Example 1: Workspace
20
0
-20
-40
(dB)
(rad/sec)
40
60
-60
10
1
10
2
10
3
10
0
10
4
10
5
30 k
|H(j)|

J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 18
Example 1: Solution
10
1
10
0
10
1
10
2
10
3
10
4
10
5
40
20
0
20
40
60
Bode Magnitude Example 1
M
a
g

(
d
B
)
Frequency (rad/sec)
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 19
Magnitude Components Summary
H(s) =
N(s)
D(s)
= k s

_
1
s
z
1
__
1
s
z
2
_
. . .
_
1
s
z
m
_
_
1
s
p
1
__
1
s
p
2
_
. . .
_
1
s
p
n
_
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 oset 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
j
z
1
) . . . (1
j
z
m
)
(1
j
p
1
) . . . (1
j
p
n
)
Each of these terms can be expressed in polar form: a + jb = Ae
j
.
Note that (j)

(e
j

2
)

e
j

H(j) = |k|e
j
k

e
j

2
)N
1
e
j
1
. . . N
m
e
j
m
D
1
e
j
1
. . . D
n
e
j
n
= |k|
||

N
1
. . . N
m
D
1
. . . D
n

exp
_
j(
k
+

2
+
1
+ +
n

1

n
)
_
where

k
=
_
0 k > 0
1 k < 0
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 21
Phase Components: Comments
H(j) =
k
+

2
+
1
+ +
n

1

n
=
k
+

2
+
_
1
j
z
1
_
+ +
_
1
j
z
m
_

_
1
j
p
1
_

_
1
j
p
n
_
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
0
(deg)
(rad/sec)
H(j)

180

90

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
0
(deg)
(rad/sec)
H(j)

180

90

90

180

The linear term, (j)

= j

= 90

, is a constant multiple of 90

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


1
s
,s
2
,
1
s
2
.
J. McNames Portland State University ECE 222 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

z
0

_
1
j
z
_
= 0

Thus, if

|z|
1, then
_
1
j
z
_
0

.
Second condition: = |z|

_
1
j
z
_

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

where
z
= sign(z)
Third condition: |z|
lim

_
1
j
z
_
=
_

j
z
_
=
z
90

Thus, if

|z|
1, then
_
1
j
z
_

z
90

.
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 25
Phase Components: Real Zeros Continued
0
(deg)
(rad/sec)
H(j)

180

90

90

180

Our piecewise approximation joins these three linear asymptotic


approximations at = 10
1
|z| and = 10|z|.
Plot the piecewise approximation of the term
_
1
j
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
10
2
10
1
10
0
10
1
10
2
0
20
40
60
80
100
P
h
a
s
e

(
d
e
g
)
Frequency (rad/sec)
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
0
(deg)
(rad/sec)
H(j)

180

90

90

180

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

asymptotically.
Plot the piecewise approximation of the term
_
1
j
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
10
2
10
1
10
0
10
1
10
2
100
80
60
40
20
0
P
h
a
s
e

(
d
e
g
)
Frequency (rad/sec)
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

p
0

_
1
j
p
_
= 0

Second condition: = |p|

_
1
j
p
_

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

Third condition: |p|


lim

_
1
j
p
_
=
_

j
p
_
= j = 90

J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 30
Phase Components: Real Poles
0
(deg)
(rad/sec)
H(j)

180

90

90

180

Plot the piecewise approximation of the term


_
1
j
p
_
. Assume
that p is in the left-hand plane (i.e. Re{p} < 0)
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 31
Phase Components: Real Poles in Left Plane
10
2
10
1
10
0
10
1
10
2
100
80
60
40
20
0
P
h
a
s
e

(
d
e
g
)
Frequency (rad/sec)
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
Example 2: Phase Components
0
(deg)
(rad/sec)
10
1
10
2
10
3
10
0
10
4
10
5
270
-270
60 k
H(j)
180

90

90

180

Draw the piecewise approximation of the Bode phase plot for


H(s) =
(s + 10)(s + 100)
2
10s
2
(s + 1000)
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 33
Example 2: Solution
10
1
10
0
10
1
10
2
10
3
10
4
10
5
150
100
50
0
50
P
h
a
s
e

(
d
e
g
)
Frequency (rad/sec)
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 34
Phase Components Summary
H(j) =
k
+

2
+
_
1
j
z
1
_
+ +
_
1
j
z
m
_

_
1
j
p
1
_

_
1
j
p
n
_
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:
C(s) =

2
n
s
2
+ 2
n
s +
2
n
=
1
1 + 2
s

n
+
_
s

n
_
2

n
is called the undamped natural frequency
(zeta) is called the damping ratio
The poles are p
1,2
= (
_

2
1)
n
If 1, the poles are real
If 0 < < 1, the poles are complex
If = 0, the poles are imaginary: p
1,2
= j
n
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
s

n
+
_
s

n
_
2
=
1
1 +
s
Q
n
+
_
s

n
_
2
where
Q
1
2
Note that if
1
2
< Q < , the poles are complex.
The meaning of Q, the Quality factor, will become clear in the
following slides.
C(j) =
1
1
_

n
_
2
+
j
Q
n
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 37
Complex Poles Magnitude
20 log
10
|C(j)| = 20 log
10

1
_

n
_
2
+
j
Q
n

1
= 20 log
10

_
1

2

2
n
_
2
+
_

Q
n
_
2
For
n
,
20 log
10
|C(j)| 20 log
10
|1| = 0 dB
For
n
,
20 log
10
|C(j)| 20 log
10

2
n
= 40 log
10

n
dB
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
20 log
10
|C(j)| = 20 log
10

_
1

2

2
n
_
2
+
_

Q
n
_
2
For =
n
,
20 log
10
|C(j
n
)| = 20 log
10
1
Q
= 20 log
10
Q = Q
dB
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 39
Complex Poles Magnitude
10
1
10
0
10
1
60
40
20
0
20
40
Frequency (rad/sec)
M
a
g

(
d
B
)
Complex Poles


Q = 0.1
Q = 0.5
Q = 0.707
Q = 1
Q = 2
Q = 10
Q = 100
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 40
Complex Poles Phase
C(j) =
1
1
_

n
_
2
+
j
Q
n
For
n
,
C(j) 1 = 0

For
n
,
C(j)
1


Q
n
=
Q
n

= 1 = 180

For =
n
,
C(j)
1
Qj
=
1
j
= j = 90

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
10
2
10
1
10
0
10
1
10
2
180
160
140
120
100
80
60
40
20
0
Frequency (rad/sec)
P
h
a
s
e

(
d
e
g
)
Complex Poles


Q = 0.1
Q = 0.5
Q = 0.707
Q = 1
Q = 2
Q = 10
Q = 100
J. McNames Portland State University ECE 222 Bode Plots 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
10
1
10
0
10
1
40
20
0
20
40
60
80
Frequency (rad/sec)
M
a
g

(
d
B
)
Complex Zeros


Q = 0.1
Q = 0.5
Q = 0.707
Q = 1
Q = 2
Q = 10
Q = 100
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 44
Complex Zeros Phase
10
2
10
1
10
0
10
1
10
2
0
20
40
60
80
100
120
140
160
180
Frequency (rad/sec)
P
h
a
s
e

(
d
e
g
)
Complex Zeros


Q = 0.1
Q = 0.5
Q = 0.707
Q = 1
Q = 2
Q = 10
Q = 100
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 45
Complex Poles Maximum
What is the frequency at which |C(j)| is maximized?
C(j) =
1
1 +
_
j
Q
n
_
+
_
j

n
_
2
|C(j)| =
1
_
_
1

2

2
n
_
2
+
_

Q
n
_
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 at
This is also called a Butterworth response
In this case, |C(j
n
)| = 3 dB and
n
is the cuto 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
=
n
_
1
1
2Q
2
|C(j
r
)| =
Q
1
1
4Q
2

r
is called the resonant frequency or the damped natural
frequency
As Q ,
r

n
For suciently large Q (say Q > 5)

r

n
|C(j
r
)| Q
Peaked responses are useful in the synthesis of high-order lters
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
v
s
( t ) v
o
( t )
-
+
50 mH R
200 nF
Generate the Bode plot for the circuit shown above.
H(s) =
1
LC
s
2
+
R
L
s +
1
LC
=

2
n
s
2
+ 2
n
s +
2
n
=

2
n
s
2
+

n
Q
s +
2
n
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 48
Example 3: Complex Poles Continued

n
=
_
1
LC
= 10 k rad/s
=
R
2L

LC =
R
2

CL = R 0.001
Q =
1

LC
L
R
=
_
L
C
1
R
=
500
R
R = 5 = 0.005 Q = 100 Very Light Damping
R = 50 = 0.05 Q = 10 Light Damping
R = 707 = 1.41 Q = 0.707 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)
10
2
10
3
10
4
10
5
10
6
120
100
80
60
40
20
0
20
40
Frequency (rad/sec)
M
a
g

(
d
B
)
Resonance Example


R = 5
R = 50
R = 707
R = 1 k
R = 5 k
R = 50 k
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 50
Example 3: Phase Response
10
2
10
3
10
4
10
5
10
6
180
160
140
120
100
80
60
40
20
0
Frequency (rad/sec)
P
h
a
s
e

(
d
e
g
)
Resonance Example


R = 5
R = 50
R = 707
R = 1 k
R = 5 k
R = 50 k
J. McNames Portland State University ECE 222 Bode Plots Ver. 1.22 51
Example 3: Step Response
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
Time (sec)
O
u
t
p
u
t

(
V
)
Resonance Example


R = 5
R = 50
R = 707
R = 1 k
R = 5 k
R = 50 k
J. McNames Portland State University ECE 222 Bode Plots 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 = 200e-9; % Capacitance
R = [5 50 707 1e3 5e3 50e3]; % 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
fileIdentifier = 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 Response (dB)}\n);
fprintf(fileIdentifier ,%%==============================================================================\n
fprintf(fileIdentifier ,\\ includegraphics[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 ,\\ includegraphics[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 ,\\ includegraphics[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(fileIdentifier);
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 eect
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 eect
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

Вам также может понравиться