Harvard University Division of Engineering and Applied Sciences ES 145/215 - INTRODUCTION TO SYSTEMS ANALYSIS WITH PHYSIOLOGICAL APPLICATIONS Fall Lecture 14: The Bode Plot Response to a pure sinusoid We previously stated that if an input to a linear system is sinusoidal (u(t) =Asin(ω t)), then the output would be a sine wave at the same frequency shifted in phase and changed in magnitude. If we have: Y (s) U (s) = G(s) then the output is: y(t) = jg( jω )jasin(ω t + φ) where: jg( jω )j = q [Re(G( jω ))] 2 +[Im(G( jω ))] 2 and: φ = tan 1 Im(G( jω )) Re(G( jω )) Note that the magnitude and phase shift depend on the frequency at which you are driving the system. Example. Consider the following system: s 2 + 2s + 1 with an input u(t) =5sint. We then can write: y(t) = jg( j)j5sin(t + φ) The transfer function G(s) evaluated at s = jω = j is: G( j) = j 2 + 2 j + 1 = 1 + 2 j 1 = 2 j 2 j 2 j = 5 j
ES145/215 - Lecture 14 2 Figure 1: The Complex Plane Imag -9 o Real -5j The quantity 5 j has magnitude 5 and angle 9 ffi. To find the magnitude, we can write: jg( j)j = p 2 + 5 2 = 5 The angle of a negative purely real number is 9 ffi or π 2 rad/sec. We can easily see this in the complex plane, as shown in Figure 1. The solution then takes the form: y(t) = 5 5sin t π = 25sin t π 2 2 It is easy to see the effect of the system on this pure sinusoidal input graphically, as shown in Figure 2. Figure 2: System Input and Output 3 Input (solid) and output (dashed) signals 3 5 15 25 3 Time (seconds) Note that if u(t) =5sint, then ω = 1 rad/sec, so the frequency in cycles/sec is f = ω =2π = 1=2π cycles/sec. This gives a period of T = 2π ß 6 sec. The General Case In general, the above discussion is useful not because we typically experience purely sinusoidal inputs in real life. The utility lies in the linearity of the relationship. From Fourier analysis, we
ES145/215 - Lecture 14 3 know that any signal can be written as a linear combination of sine waves at different frequencies, magnitudes, and phases: u(t) = A sin(ω t + ψ )+A 1 sin(ω 1 t + ψ 1 )+::: Because the system is linear, the output is equal to the sum of the outputs as if you had applied each one of these sine waves individually. The output of the system to an input of this type is: y(t) = jg( jω )jsin(ω t + ψ + φ )+jg( jω 1 )jsin(ω 1 t + ψ 1 + φ 1 )+::: So by knowing jg( jω)j and G( jω) 8ω, we can completely describe the output to any arbitrary input. For any transfer function, we can do this by simply evaluating the magnitude and phase over the entire frequency range. It s a very straight-forward thing to do using a computer, but we will find out that some very simple tools are pretty useful in sketching these relationships out by hand and will give you some insight as to the dynamics of the system. The type of plot that we will be generating is called a Bode plot, which will now be described. The Bode Plot The Bode plot is a plot of the magnitude and phase of a transfer function, as a function of frequency. We can write any transfer function in the following form: N(s) K(s D(s) = + z 1)(s + z 2 ) :::(s + z m ) (s + p 1 )(s + p 2 ) :::(s + p n ) e T ds = G 1 (s)g 2 (s) :::G N (s) where each of the G i (s) is of a very simple form. Taking a look at the magnitude, we have: jg( jω)j = jg 1 ( jω)g 2 ( jω) :::G N ( jω)j = jg 1 ( jω)jjg 2 ( jω)j :::jg N ( jω)j We often look at the log of the magnitude in decibels, which is defined as: jg( jω)j db = log jg( jω)j = [log jg 1 ( jω)j + log jg 2 ( jω)j + :::+ log jg N ( jω)j] = log jg 1 ( jω)j + log jg 2 ( jω)j + :::+ log jg N ( jω)j = jg 1 ( jω)j db + jg 2 ( jω)j db + :::+ jg N ( jω)j db So the utility is that the product turned into a sum. We ll see why this is handy shortly. Similarly, with the phase we have: G( jω) = G 1 ( jω)+ G 2 ( jω)+:::+ G N ( jω) So with both the magnitude and the phase angle, the different components sum. We can therefore look at each component, draw the magnitude and phase as a function of the frequency ω, and add.
ES145/215 - Lecture 14 4 Example. Consider the following system: (s + z 1 )(s + z 2 ) s(s + p 1 )(s 2 + 2ζ s + ω 2 n )e T ds We can easily rearrange this: K(1 + s z 1 )(1 + s z 2 ) s(1 + s p 1 )(1 + 2ζ s + s2 ω 2 ) n e T ds where K;z 1 ;z 2 ; p 1 ;ζ; ;T d 2 R. The magnitude is: jg( jω)j db = log jg( jω)j The phase angle can be computed as: = log jkj + log fi 1 + jω z 1 fi + log fi 1 + jω z 2 fi log j jωj G( jω) = K + log fi 1 jω + p 1 fi log 2ζ jω fi1 + 2ζ jω 1 + 1 + jω z 1 + + ( jω) 2 ωt d + ( jω) 2 ω fi 2 + n 1 jω + ( jω) 1 jω + z 2 p 1 Bode Plot Elements So in general, we can break things down into these simple types of components no matter how complicated the transfer function is. The types of elements break down into the following: ffl Constant gain K 2 R ffl Poles/zeros at the origin: s or 1 s ffl Poles/zeros real at p i or z i : 1 + s z i or 1 1+ s p i ffl Complex conjugate pair of poles/zeros: 1 + 2ζ s + s2 or ω 2 n ffl Pure time delay: e T ds 1 1+ 2ζ ωn s+ s2 ω 2 n Let s look at the properties of each type.
ES145/215 - Lecture 14 5 Constant K. Suppose we have a constant K 2 R. The magnitude can be written: The phase angle depends on the sign of K: jkj db = log jkj = constant 8ω K = if k> = 18 ffi else As an example, consider 1. Let the input u(t) =Asin(ω t). The output can then be written as: y(t) = jg( jω )jasin(ω t + φ) = Asin(ω t π) So the input and the output are completely out of phase with each other. Figure 3 shows the Bode plot for a constant gain of K =. Figure 3: Constant Gain Element K = Constant Gain 21.5 19.5 19 1.5.5 1.1 1 Pole/Zero at the Origin. Suppose that we have a pole at the origin: The magnitude is: 1 s jg( jω)j db = log fi 1 jωfi = log j jωj = log ω This means that jg( jω)j db vs. log ω is a straight line with a slope of db/log unit, which is often called db/decade. The magnitude is db at frequency ω = 1. The phase angle is just the angle associated with jω, which is 9 ffi : < G( jω) = 9 ffi The same argument can be made for a zero at the origin s, except that the magnitude will be jg( jω)j db =+log ω, having a positive slope of db/decade and passing through db at ω = 1. Figure 4 shows the Bode plot for a pole and a zero at the origin.
ES145/215 - Lecture 14 6 Figure 4: Pole/Zero at Origin s (solid), 1/s (dashed) 4 4 5 5.1 1 Real Pole/Zero. Suppose we have a zero at z i 2 R: Evaluating at s = jω gives us: The magnitude is: 1 + s z i G( jω) = 1 + jω z i jg( jω)j db = log jg( jω)j = log s1 2 + ω z i 2 Of course we could plot this on the computer very easily, but to get a handle on it first, let s look at the asymptotic properties. For small ω (ω=z i fi 1) we have: For large ω (ω=z i fl 1) we have: jg( jω)j db ß log p1 2 + 2 = db jg( jω)j db ß log s ω 2 z 2 i = log ω z i = log ω log z i This is a straight line, with slope +db/decade, and is db at ω = z i. The straight-line approximation starts with an initial magnitude of db, constant until ω = z i, at which point it breaks upward at +db/decade. The phase angle can be expressed as: G( jω) = 1 jω + = tan 1 ω=zi z i 1
ES145/215 - Lecture 14 7 Again using the asymptotic properties, we have for small ω (ω=z i fi 1): and for large ω (ω=z i fl 1) we have: G( jω) ß π G( jω) ß 9 ffi or 2 The straight-line approximation of the phase has an initial phase of ffi, breaks upward one decade before z i (or at :1z i ) at a slope of 45 ffi /decade, and levels off at one decade after z i (or at z i ). Similar arguments can be made for a pole at p i, except that the magnitude plot for large ω asymptotes to a straight line with a db/decade slope, and the phase angle for large ω asymptotes to 9 ffi or π 2. Figure 5 shows the Bode plot for a real pole (p = 3) and a real zero (z = 3). Figure 5: Real Pole/Zero (1+s/z) (solid), 1/(1 + s/p) (dashed) 3 3 5 5.1 1 Complex Poles/Zeros. Suppose that we cannot factor an element down to first order terms with real roots. We can at least factor to the corresponding quadratic, and the result is a complex conjugate pair of roots. Suppose we have the following: 1 1 +(2ζ= )s +(1=ω 2 n )s2 Evaluating at s = jω we have: G( jω) = = 1 1 +(2ζ= ) jω +(1=ω 2 n )( jω)2 1 [1 ω 2 =ω 2 n ]+[2ζω=] j We can again look at the asymptotic properties. For small ω, we have: jg( jω)j db ß log q(1 ) 2 + 2 = log 1 =
ES145/215 - Lecture 14 8 For large ω, wehave: jg( jω)j db ß log s ω 4 = log ω 2 ω 2 n ω 4 n = 4log ω The resulting Bode plot for a system with = 5 and different ζ s is shown in Figure 6. Figure 6: Complex Poles 1/(1+(2*ζ/ )s + (1/ 2 )s 2 ), ζ = 1.5 (solid) and ζ =.1 (dashed) 4 4 5 15.1.1 1 Pure Time Delay. Suppose we have a pure time delay as one of our elements. In this Laplace domain, this shows up as: e T ds where T d is the pure delay in seconds. Evaluating at s = jω we obtain: The corresponding magnitude is: and the corresponding phase angle is: G( jω) = e T d jω jg( jω)j db = log 1 = G( jω) = T d ω So the magnitude plot is a constant for all frequencies, and the phase is a straight line with slope T d, which passes through T d degrees at ω = 1. Putting it all together So we have learned a bit about the individual components, but how do we put it all together. This is best illustrated with an example. Suppose we have the following system: (s + ) s(s + 2)(s + 5)
ES145/215 - Lecture 14 9 The first step is to put it in the following form: = (1 + s=) s(1 + s=2)(1 + s=5) 2 5 (1 + s=) s(1 + s=2)(1 + s=5) Evaluating at s = jω we have: G( jω) = (1 + jω=) jω(1 + jω=2)(1 + jω=5) Each of the elements of the transfer function are in a form that we recognize. We simply plot each one on the same graph. Let s first consider the magnitude plot. The gain of has a constant magnitude at db. The zero at has zero magnitude until rad/sec, where it breaks upwards at +db/decade. The pole at the origin has a slope of db/decade, passing through db at 1rad/sec. The pole at 2 has a magnitude of db until 2rad/sec, at which point it breaks downward at db/decade. The pole at 5 has a magnitude of db until 5rad/sec, at which point it breaks downward at db/decade. We can simply add up all of these components to get the total magnitude in decibels. For the phase, we do exactly the same thing. The gain of contributes nothing to the phase. The zero at initially has a phase of ffi, breaks upward at 45 ffi /decade at 1rad/sec, and flattens back out at rad/sec at 9 ffi. The pole at the origin contributes a constant 9 ffi over all frequencies. The pole at 2 initially has a phase of ffi, breaks downward at 45 ffi /decade at :2rad/sec, and flattens back out at rad/sec at 9 ffi. The pole at 5 initially has a phase of ffi, breaks downward at 45 ffi /decade at :5rad/sec, and flattens back out at 5rad/sec at 9 ffi. As with the magnitude plot, we simply add these up to get the total phase profile. The resulting Bode plots of the components are shown in Figure 7. Figure 7: Components of the Bode Example Bode Diagrams constant pole at origin zero at pole at 5 3 4 5 pole at 2 zero at 5 pole at origin pole at 2 pole at 5 constant.1 1 If we combine all of the components, the resulting Bode plot is shown in Figure 8.
ES145/215 - Lecture 14 Figure 8: Composite of the Bode Example Composite Diagram from Elements 6 4 4 6 1 14 16 18.1.1 1