Bode plot from a known transfer function The above method for querying an unknown system produces a Bode plot. Then the Bode plot can be interpreted to reveal the components of the unknown system. To understand how to interpret a Bode plot, it is useful know how to generate a Bode plot from a know transfer function. The procedure for doing this is simple, only given and not proven here. One replaces s in the transfer function with j∙ω. | |, the magnitude of the resulting function and Then , the angle of the resulting function. An example illustrates this best. Example 8.1 · Find M and φ as functions of ω for the transfer function · . Solution: One replaces s with j∙ω : · · Both the numerator and denominator are complex numbers. The magnitude of a fraction of complex numbers is the magnitude of the numerator divided by the magnitude of the denominator. So 15 · 1 √4 · At small values of ω , 0. At large values of ω , · √ · . These values, converted into decibels, show where the magnitude plot of the Bode plot starts and ends. For φ, the angle of a fraction of complex numbers is the angle of the numerator minus the angle of the denominator. 15∙jω is on the imaginary axis for all values of ω , so the angle of the numerator is always 90°. In the denominator, if ω is small, the 1 dominates. It is a positive real number, so it is at an angle of 0° and φ = 90° ( ). If ω is large, 2∙jω dominates. It is also on the vertical axis, so its angle is also 90°. Thus at high ω , φ approaches 0°. Note also that at ω = 0.5 rad/sec, the angle of the denominator is 45°. So φ = 90°‐45°=45°. φ thus starts off on the left‐hand side of the phase plot at 90°. It drops and passes through 45° at ω = 0.5 rad/sec and then approaches 0° at large values of ω. One can confirm this in Matlab with the function bode([15,0],[2,1]). But to be able to interpret Bode plots, one must understand how varying ω changes the value of M and φ. Bode plots of common transfer function components Analysis similar to this can be made for common transfer function components (gain, integrator, differentiator, first‐ and second‐order lags, first‐ and second‐order leads). (A lag is a first or second order component in the denominator—e.g. · . A lead is a first or second order in the numerator—e.g. · 1 .) If this is done, Table 8.1 results. This table can then be used to interpret Bode plots of unknown systems to see what common components they contain. Some features of common components are worth emphasizing. Component Bode plot Characteristics 20 log K If K > 1, 20 log K > 0 If K < 1, 20 log K < 0 Gain has zero phase. So when it is added to a system, it simply shifts the system’s log mag curve up (K>1) or down (K<1). 0 Gain, K 0 0 cd dB/d 20 Differentiator, s If K > 1, 20 log K > 0 If K < 1, 20 log K < 0 Gain has zero phase. So when it is added to a system, it simply shifts the system’s log mag curve up (K>1) or down (K<1). 90 0 1 0 -2 0 dB / dc d If K > 1, 20 log K > 0 If K < 1, 20 log K < 0 Gain has zero phase. So when it is added to a system, it simply shifts the system’s log mag curve up (K>1) or down (K<1). Integrator, 0 -90 1 0 1st‐order lead, Ts+1 / 20 dB dcd 90 0 If K > 1, 20 log K > 0 If K < 1, 20 log K < 0 Gain has zero phase. So when it is added to a system, it simply shifts the system’s log mag curve up (K>1) or down (K<1). ωB = 1/Τ 0 -20 dB /dcd st 1 ‐order lag, 0 -90 If K > 1, 20 log K > 0 If K < 1, 20 log K < 0 Gain has zero phase. So when it is added to a system, it simply shifts the system’s log mag curve up (K>1) or down (K<1). ω = 1/Τ B Table 8.1 – Bode plots of common components (part 1) Component Bode plot 0 2nd‐order lead, 1 4 cd B/ d d 0 180 0 ω 0 Starts out with 0 log mag. Asymptote starts a 40 dB/dcd rise at break frequency, which is the natural frequency. Behavior right around break frequency depends on ζ. Phase curve starts at 0 and rises to 180 degrees. It is at 90 degrees at break frequency. n -4 0 nd 2 ‐order lag, 0 -180 Characteristics ω dB / dc d Starts out with 0 log mag. Asymptote starts a 40 dB/dcd rise at break frequency, which is the natural frequency. Behavior right around break frequency depends on ζ. Phase curve starts at 0 and rises to 180 degrees. It is at 90 degrees at break frequency. n Table 8.1 – Bode plots of common components (part 2) This table shows the asymptotes used to draw Bode plots of these components. The first‐ and second‐ order leads and lags can deviate from these asymptotes. Second order systems with low ζ deviate significantly from the asymptotes in the neighborhood of ωn. In general an s in the numerator causes a rise in the magnitude and phase plots. An s in the denominator causes a fall in the magnitude and phase curves as ω increases. Note that all leads and lags start their magnitude and phase plots at 0. At the break frequency for a first‐order lead or lag or the natural frequency for a second‐order lead of lag, the magnitude plot breaks upward (leads) or downward (lags). This rising or falling slope for a first‐order is at the rate of ±20 dB/dcd for a first‐ order and ±40 dB/dcd for a second‐order. One can tell a lot by inspecting the starting points of a Bode plot, the left‐hand sides of the plots of an unknown function. If the starting slope of the magnitude curve is 0, then there is no differentiator nor integrator present in the system. If the beginning slope of the magnitude curve is upward, then one would conclude there is a differentiator present. One could determine the beginning slope and tell how many integrators are present. If one integrator is present, the upward slope would be 20 dB/dcd. If instead the upward slope were 40 dB/dcd, then one could conclude that there are two differentiators present. One could confirm this by looking at the left‐hand side of the phase plot. A differentiator has a constant φ of 90°, even on the left‐hand side of the phase plot. So with one differentiator, the phase plot would start at 90° and the magnitude plot would have an initial upward slope of 20 dB/dcd. Now we can see why one plots M in decibels and not in normal units in a Bode plot. An unknown system is made up of a number of the components shown in Table 8.1. Take the example 16 · · 16 · 3 1 · 7 3 · 1 · 7 In the phase plot, the phase of the function G(jω) is the sum of the phase angles of the components. Thus at low ω, all the ω terms that add to real numbers drop out. The real number dominates, so for low ω, these components have a phase angle of 0. The term has a phase of ‐180°. So the phase plots starts out at ‐180°. The magnitude, however, are not added like the phase angles of the components are. They form products instead of sums. So | | 16 · √ ·√ 9 1·√ 16 · 49 1 9· · 1 1 · 1 √ √ 49 But if we take the log of both sides and multiply both sides by 20 to get decibels 20 · 20 · 20 · 20 · log 16 16 · 20 · 9· 1 · 1 · √ 1 √ 9 20 · log 1 49 1 So the product turns into a sum, and as decibels one can superimpose the magnitudes of the components to get the entire magnitude of the transfer function. Thus with both the magnitude and phase plots, one can simply superimpose the components to get the magnitude (in decibels) and the phase plots of the entire transfer function. Of course in interpreting the Bode plot of an unknown system, one is seeing the plot of the entire system, and one must pick out the components from the whole. Table 8.1 is key to this, because it details how the Bode plots of individual components. With an understanding of these systems’ behavior as ω varies, one can pick the individual components out of the Bode plot of an entire unknown system. Interpreting a Bode plot of an unknown system to get its transfer function Several examples will illustrate how one goes about analyzing the Bode plot of an unknown system to get its transfer function experimentally. Example 8.2 Analyze the following Bode plot and suggest the transfer function that produced this plot. Solution: By comparing the plot with the entries of Table 8.1, one can see almost immediately that this is an integrator. The magnitude plot drops steadily each decade by 20 dB, the beginning slope of the magnitude plot is not 0 (so it is not a first‐order lag), and the phase angle is a constant 90°. But is there a gain involved? A pure integrator’s Bode plot crosses the ω axis (0 dB) at ω = 1 rad/sec. At ω = 1 rad/sec (100), the magnitude is about 25 dB in this example. So the magnitude plot has been pushed up about 25 dB. Note that a gain has φ = 0 for all ω, so a gain has no influence on the phase curve. Thus this system is an integrator with a gain. A gain’s magnitude curve is a straight line at 20∙log(K), so the effect of a gain is to displace the magnitude curve upward (if K > 1) or downward (if K<1). Since the magnitude curve has been pushed up by 25 dB at ω = 1 rad/sec, 20 · log log 10 25 25 20 1.25 . 18 So the suggested transfer function is 18 One should always then confirm this conjecture by checking it with the Matlab bode() function—here bode([18],[1,0]). The role played by the gain is very important, since it is normal in a control loop to adjust the controller’s gain. Adding a gain simply deflects the magnitude curve up or down and has no effect on the phase curve. The ability of the gain curve to change magnitude but have no effect on phase will be exploited in designing controllers using Bode plots. Example 8.2 Analyze the Bode plot of Figure 8.3 and conjecture what transfer function produced this plot. Figure 8.3 – Bode plot made from frequency response tests Solution: The figure is reproduced here for convenience. Features to notice are: The magnitude plot starts off with an upward slope. The slope seems to be 20 dB/dcd, so this is indicative of a differentiator. A differentiator with no gain passes through 100 rad/sec at 0 dB. In the above plot the upward‐ sloping part of the curve passes through 100 at about ‐14 dB. So there is a gain here also. The phase curve starts at 90° and ends at ‐180°, so a total phase shift of 270°. Each s in the denominator (integrator, 1st‐order lag) drops the eventual phase angle by ‐90° (a 2nd‐order lag drops it by ‐180°). So it looks like there may be a differentiator and then three s’s in the denominator of the transfer function. This can be confirmed also by inspecting the final slope of the magnitude curve. It is ‐40 dB/dcd. This indicates an excess of two s’s in the denominator. Now it is somewhat difficult to ascertain where these terms with s’s in the denominator have their break frequencies (1st‐order lags) or natural frequency (2nd‐order lags). A lot seems to be happening between 1 < ω < 10. There is no evident bump in the magnitude curve, however, which would indicate the presence of an underdamped second‐order in the denominator (a 2nd‐order lag). So perhaps for a first guess it is useful to speculate that there are three 1st‐order lags in this transfer function between 1 and 10. Their proximity within this narrow range will make it hard to identify them individually. The phase plot of a 1st‐order lag shows that at the break frequency (ωB) the phase has dropped by ‐45°. If one looks for the frequency where the phase is 45° below the starting frequency, one can speculate that that ω is the break frequency for the first 1st‐order lag. In the above phase plot, this would be at about halfway between 100 and the next vertical line. 100 = 1, and 101 = 10. So the next vertical line after 100 is 2. The halfway point is not, however, 1.5, since the logarithmic scale is uneven. So the halfway point would be more like 1.3. We can speculate then that the first 1st‐order lag is at ω = 1.3. Each 1st‐order lag brings in total a ‐90° phase shift to the phase curve. If the three supposed 1st‐order lags were all widely separated on the ω‐axis, one could just look on the phase curve where φ was 45°, ‐ 45°, and ‐135° to find the three break frequencies. But apparently the three 1st‐order lags are jammed together within a narrow range of ω , so the second one becomes active before the effect of the first one has subsided. So ωB2 will occur before φ = ‐45°, and ωB3 occur before φ = ‐135°. Thus we are left with only the choice of guessing at these break frequencies, then making a Bode plot of the resulting transfer function, comparing it with the given plot, and then adjusting it through trial and error until there is a match. Try ωB1 = 1.3, ωB2 = 6, and ωB3 = 12. These give 1st‐order lags of , , and . For the gain, we need 20 · log 10 14 0.2 So the first stab at a transfer function is 0.2 · · 1 1 1.3 · 1 1 1 6 · 1 1 12 1 1 0.2 · · 1.3 · 6 · 12 1.3 6 12 The Matlab command sequence >> s = tf( ‘s’ ) >> g = 19*s/((s+1.3)*(s+6)*(s+12)) 19 · 1.3 6 12 >> bode(g) gives the Bode plot of our conjectured transfer function: A comparison of the two plots shows that they are not too far removed from one another, so as a first guess, this transfer function is a relatively good match. One could make further small adjustments to refine the fit to the required exactness.