Constructed Bode Professor Walter W. Olson Department of Mechanical, Industrial and Manufacturing Engineering Actual Bode University of Toledo Bode Magnitude Plots Outline of Today’s Lecture Review Poles and Zeros Plotting Functions with Complex Numbers Root Locus Plotting the Transfer Function Effects of Pole Placement Root Locus Factor Responses Frequency Response Reading the Bode Plot Computing Logarithms of |G(s)| Bode Magnitude Plot Construction Root Locus The root locus plot for a system is based on solving the system characteristic equation The transfer function of a linear, time invariant, system can be factored as a fraction of two polynomials When the system is placed in a negative feedback loop the transfer function of the closed loop system is of the form K O utput ( s ) Input ( s ) KG (s) 1 KG (s) The characteristic equation is N G (s) KN G (s) DG ( s) N (s) DG ( s) KN G (s) 1 K G DG ( s ) 1 KG ( s ) 0 D G ( s ) KN G ( s ) The root locus is a plot of this solution for positive real values of K Because the solutions are the system modes, this is a powerful design tool Root Locus The root locus plot for a system is based on solving the system characteristic equation The transfer function of a linear, time invariant, system can be factored as a fraction of two polynomials When the system is placed in a negative feedback loop the transfer function of the closed loop system is of the form K O utput ( s ) Input ( s ) KG (s) 1 KG (s) The characteristic equation is N G (s) KN G (s) DG ( s) N (s) DG ( s) KN G (s) 1 K G DG ( s ) 1 KG ( s ) 0 D G ( s ) KN G ( s ) The root locus is a plot of this solution for positive real values of K Because the solutions are the system modes, this is a powerful design tool The effect of placement on the root locus jw Imaginary axis jwd Real Axis s -zwn s • The magnitude of the vector to pole location is the natural frequency of the response, wn The vertical component (the imaginary part) is the damped frequency, wd The angle away from the vertical is the inverse sine of the damping ratio, z The effect of placement on the root locus jw Imaginary axis jwd Real Axis s -zwn s • The magnitude of the vector to pole location is the natural frequency of the response, wn The vertical component (the imaginary part) is the damped frequency, wd The angle away from the vertical is the inverse sine of the damping ratio, z Frequency Response General form of linear time invariant (LTI) system was previously expressed as n -1 (n) n-2 m m -1 m -2 y a 1 y a 2 y ... a n - 2 y a n -1 y a n y b0 u b1 u b 2 u ... b n - 2 u b n -1u b n u s n a1 s n -1 a2s n-2 ... a n - 2 s a n -1 2 a n y 0 e 2 b s b s s a s m y ( t ) y (0) e st 0 m -1 1 n -1 n 1 st b0 s b1 s m b2 s a2s m -1 b2 s m -2 ... b n - 2 s b n -1 s b n e .. . bn - 2 s b n -1 s b n m -2 2 ... a n - 2 s a n -1 2 a n n-2 2 2 e st T he transfer function form is then b0 s b1 s m y (t ) G ( s )u (t ) G ( s ) s a1 s n m -1 n -1 b2 s a2s m -2 n-2 ... b n - 2 s b n -1 s b n 2 ... a n - 2 s a n -1 2 a n 2 b(s) a(s) We now want to examine the case where the input is sinusoidal. The response of the system is termed its frequency response. s iw u ( t ) e iw t cos iw i sin iw y ( t ) G ( iw ) e iw t Me iw t w here M G ( iw ) is the m agnitude or gain of G iw a nd tan -1 Im G iw is the phase angle or argum ent of G iw R e G iw st Frequency Response The response to the input is amplified by M and time shifted by the phase angle. To represent this response we need two curves: one for the magnitude at any frequency and one for phase shift These curves when plotted are called the Bode Plot of the system Reading the Bode Plot Amplifies Attenuates Input Response The magnitude is in decibels decade also, cycle Note: The scale for w is logarithmic What is a decibel? The decibel (dB) is a logarithmic unit that indicates the ratio of a physical quantity relative to a specified or implied reference level. A ratio in decibels is ten times the logarithm to base 10 of the ratio of two power quantities. (IEEE Standard 100 Dictionary of IEEE Standards Terms, Seventh Edition, The Institute of Electrical and Electronics Engineering, New York, 2000; ISBN 0-7381-2601-2; page 288) Because decibels is traditionally used measure of power, the decibel value of a magnitude, M, is expressed as 20 Log10(M) 20 Log10(1)=0 … implies there is neither amplification or attenuation 20 Log10(100)= 40 decibels … implies that the signal has been amplified 100 times from its original value 20 Log10(0.01)= -40 decibels … implies that the signal has been attenuated to 1/100 of its original value Note The book does not plot the Magnitude of the Bode Plot in decibels. Therefore, you will get different results than the book where decibels are required. Matlab uses decibels. Sketching Semilog Paper First, determine how many cycles you will need: Ideally, you will need at least one cycle below the smallest zero or pole and At least one cycle above the largest pole or zero Example G (s) s 20 s s .2 s 5 you w ant to plot from 0.02 to 200 the cycles needed w ill start w ith 0.01, 0.1, 1, 10, 100 or 5 cycles Knowing how many cycles needed, divide the sketch area into these regions Sketching Semilog Paper For this example assume 0.1 G (s) 1 ( s 1)( s 2) 3 cycles 1.0 10 Frequency w rps 100 Sketching Semilog Paper For each cycle, Estimate the 1/3 point and label this 2 x the starting point for the cycle Estimate the midway point and label this 3 * the starting point for the cycle At the 2/3 point, label this 5 x * the starting point for the cycle Half way between 3 and 5 place a tic representing 4 Halfway between 5 and 10 place a tic and label this 7 Halfway between 5 and 7, place a tic for 6 Divide the space between 7 and 10 into thirds and label these 8 and 9 These are not exact but useful for sketching purposes 0.1 0.2 0.3 0.5 0.7 1.0 2 3 5 7 10 Frequency w rps 20 30 50 70 100 Computing Logarithms of |G(s)| s iw u ( t ) e iw t cos iw i sin iw y ( t ) G ( iw ) e iw t Me iw t w here M G ( iw ) is the m agnitude or gain of G iw G (s) b(s) K a(s) s b1 s b2 ... s b m p s s a 1 s a 2 ... s a q w here p q n C om plex num bers w ill only occur as pair( s) o f com plex conjugates If the roots are com plex conjugates, w e should recom bine these in the form s s i s s - i s 2 s s s 2 2 s 2 zw n s w n 2 2 2 B ecause w e w ill com pute the L og M agnitud e of G ( iw ) in dB , w e m ust co m pute 20 L og 10 G ( iw ) T hen 20 L og 10 G ( iw ) 20 L og 10 K 20 L og 10 iw b1 20 L og 10 iw b 2 ... 20 L og 10 iw b m - 20 pL og 10 iw - 20 L og 10 iw a 1 - 20 L og 10 iw b 2 - 20 L og 10 iw a q 20 L og 10 iw 2 z 2 w n 2 iw w n 2 20 L og 10 iw 2 z 2 w n 2 iw w n 2 ... 2 2 2 2 Therefore, in plotting the magnitude portion of the Bode plot, we can compute each term separately and then add them up for the result Computing Logarithms of G(s) 20 Log 10 G ( iw ) 20 Log 10 K 20 Log 10 i w b1 20 Log 10 i w b 2 ... 20 Log 10 i w b m - 20 pLog 10 iw - 20 Log 10 iw a 1 - 20 Log 10 i w b2 - 20 Log 10 i w a q 20 Log 10 s 2 z 1w n 1 s w n 1 20 Log 10 iw 2 z 2 w n 2 iw w n 2 2 2 2 2 ... T here are four possible factors to com pu te: 20 L og 10 K from the gain K , 20 pL og 10 iw from the s p factor of G ( s ), 20 L og 10 iw c from the ( s a ) and ( s b ) factors of G ( s ), 20 L og 10 iw 2 zw n iw w n 2 2 and from the recom bined quadratic factors o f G ( s ) T he sign w ill be + if the term is in the num erator and - if in the denom inator o f G (s)= K s b1 s b2 ... s bm s 2 2 z 1w nz 1 s w nz 1 2 s 2 2 z z 2w nz 2 s w nz 2 2 ... s p s a 1 s a 2 . .. s a q s 2 2 z 1w n 1 s w n 1 2 s 2 2 z 2w n 2 s w n 2 2 ... Computing Logarithms of G(s) 20 Log 10 K constant Since this does not vary with the frequency it a constant that will be added to all of the other factors when combined and has the effect of moving the complete plot up or down 20 pL og 10 iw 20 pL og 10w When this is plotted on a semilog graph (w the abscissa) this is a straight line with a slope of 20p (p is negative if the sp term is in the denominator of G(s)) … without out any other terms it would pass through the point (w,MdB) = (1,0) p is often called the “type” of the system Static Error Constants If the system is of type 0 at low frequencies will be level. A type 0 system, (that is, a system without a pole at the origin,) will have a static position error, Kp, equal to lim G ( jw ) K p w0 If the system is of type 1 (a single pole at the origin) it will have a slope of -20 dB/dec at low frequencies A type 1 system will have a static velocity error, Kv, equal to the value of the -20 dB/dec line where it crosses 1 radian per second If the system is of type 2 ( a double pole at the origin) it will have a slope of -40 dB/dec at low frequencies A type 2 system has a static acceleration error,Ka, equal to the value of the -40 dB/dec line where it crosses 1 radian per second Computing Logarithms of G(s) 20 Log 10 iw a 20 Log 10 w a 2 w w 2 a 20 Log 10 w a 2 a 20 Log 10 w a 2 2 2 20 Log 10 a constant 20 Log 10w a is called the break frequency for this factor For frequencies of less than a rad/sec, this is plotted as a horizontal line at the level of 20Log10 a, For frequencies greater than a rad/sec, this is plotted as a line with a slope of ± 20 dB/decade, the sign determined by position in G(s) Example Assume we have the transfer function G s 14 s4 To compute the magnitude part of the Bode plot K 14 20 Log 10 (14 ) 22.92 s 4 4 rad/sec is the break frequency 20 Log 10(4 ) - 12.04 P lot the line w ith a neg ative slope since it is in the denom inator + Example Bode plot of G s 14 s4 Constructed Plot Actual Bode Magnitude Plot Our plotting technique produces an “asymptotic Bode Plot” Computing Logarithms of G(s) 20 Log 10 iw 2 zw n iw w n 2 w wn w wn 20 Log 10 2 20 Log 10 w n - w 2 20 Log 10 w 2 2 2 n -w w n - w 2 2 2 4z w n w 2 2 2 2 4z w n w 2 20 Log 10w n 40 Log 10w n constant 2 4z w n w 2 20 Log 10w 40 Log 10w 2 2 2 2 2 2 wn is called the break frequency for this factor For frequencies of less than wn rad/sec, this is plotted as a horizontal line at the level of 40Log10 wn, For frequencies greater than wn rad/sec, this is plotted as a line with a slope of ± 40 dB/decade, the sign determined by position in G(s) Example Construct a Bode magnitude plot of 14 G (s) s 2 s 2 s 9 K 14 20 Log 10 (14 ) 22.92 s indicates a line w ith a slope of -40 (in the denom inator) passing through (1,0) 2 s 2 s 9 break frequency is at w n 9 3 radians/second the level part is at -40 Log 10 3 - 19.08 then the line w ill break dow n (negative slope) at -40 d B /decade + Note: there are two lines here! Example Actual Bode Magnitude Asymptotic Bode Magnitude Corrections You seen on the asymptotic Bode magnitude plots, there were deviations at the break frequencies. Note that these could be either positive of negative corrections depending on whether or not the term is in the numerator or denominator For (s+a) type terms For quadratic terms pertains to a phase correction which will be discussed next class Bode Plot Construction When constructing Bode plots, there is no need to draw the curves for each factor: this was done to show you where the parts came from. The best way to construct a Bode plot is to first make a table of the critical frequencies and record that action to be taken at that frequency. You want to start at least one decade below the smallest break frequency and end at least one decade above the last break frequency. This will determine how semilog cycles you will need for the graph paper. This will be shown by the following example. Example Plot the Bode magnitude plot of G s 10 ( s 0.2 )( s 2 s 25) 2 s ( s 3)( s 4 s 16) 2 Break Frequency Factor Effect Gain Cum value Cum Slope dB/dec 0.01 K=10 20Log10(10)=20 20 … 0.01 s Line -20db/dec Thru (1,0) 20-slope for two decades (40) =60 -20 0.2 s+0.2 +20Log10(.2)= -13.98 60+6.02=46.02 0 3 s+3 -20Log10(3)= -9.54 46.02-9.54= 36.48 -20 4 s2+4s+16 -40Log10(4)= - 24.08 36.48- 24.08= 12.4 -60 5 s2+2s+25 +40Log10(5)= 27.96 32.4+27.96= 40.36 -20 Example Constructed Bode Actual Bode Note: G (s) b(s) M G ( iw ) is the m agnitude or gain of G iw s b1 s b 2 ... s b m s 2 2 z z 1w n z 1 s w n z 1 2 s 2 2 z z 2w n z 2 s w n z 2 2 ... K a(s) s p s a 1 s a 2 ... s a q s 2 2 z p 1w n p 1 s w n 2 s 2 2 z p 2w n p 2 s w n p 2 2 .. T he transfer function is often put in the tim e response form of K a 1 a 2 ... a q w n p 1 w n p 2 2 G (s) b b ...b 1 2 w nz1 w nz 2 2 m 2 ... 2 s2 s2 s s s 2z z1s 2z 2 s 1 1 ... 1 1 1 ... 2 2 b b b w w w w nz1 nz 2 1 2 m nz1 nz 2 s2 s2 2z p1s 2z p 2 s s s p s s 1 1 ... 1 1 1 ... a w 2 w 2 a a w w np1 np 2 1 2 q np1 np 2 s2 s2 2z z1s 2z 2 s 1 1 z 1 s 1 z 2 s 1 ... zm s 1 ... 2 2 w w w w nz1 nz 2 nz1 nz 2 =K 2 2 s s 2z p1s 2z p 2 s p s p 1 s 1 p 1 s 1 ... p 1 s 1 1 1 ... w 2 w 2 w w np1 np 2 np1 np 2 This form has certain advantages: 1) the time constants of the 1st order terms can be directly read 2) When constructing Bode plots the part of the curves up to the break frequencies are 0 (20Log101=0). The level parts have been taken up in the constant gain, Kt Summary Frequency Response G (s)= K s b1 s b2 ... s bm s 2 2 z 1w nz 1 s w nz 1 2 s 2 2 z z 2w nz 2 s w nz 2 2 ... s s a1 s a 2 ... s a q s 2 2 z 1w n 1 s w n 1 2 s 2 2 z 2w n 2 s w n 2 2 ... p for s iw Reading the Bode Plot Computing Logarithms of |G(s)| 20 Log 10 K constant 20 pL og 10 iw 20 pL og 10w 20 Log 10 iw a 20 Log 10 w a 2 w w 2 a 20 Log 10 w a 2 a 20 Log 10 w a 2 20 Log 10 iw 2 zw n iw w n 2 20 Log 10 2 w wn 20 Log 10 w n - w 2 w wn 20 Log 10 w 2 2 2 n -w 2 2 20 Log 10 a constant 20 Log 10w w n - w 2 2 2 4z w n w 2 2 2 2 4z w n w 2 20 Log 10w n 40 Log 10w n constant 2 4z w n w 2 20 Log 10w 40 Log 10w 2 2 2 2 2 Bode Magnitude Plot Construction 2 Next: Bode Phase Plots