You are on page 1of 8

ME 481/581

Chapter 5 HW I Solution

March 9, 2012

Chapter 5 HW I Solution
Problem 1. These three characteristic equations were already in “root-locus” form. They can easily be restored to “polynomial” form, e.g. 1+K s+1 =0 s2 (s + 9) =⇒ s2 (s + 9) + K (s + 1) = 0 (1)

The three s-plane root locus plots as drawn by MATLAB are shown below.

8 6 0.86 4 Imaginary Axis 2 10 0 −2 0.96 −4 −6 0.86 −8 −10

5
0.74 0.6 0.46 0.34 0.22 0.1

0.76 0.86

0.64

0.5

0.34 0.16

4 3 Imaginary Axis

0.96 8 6 4 2

2 0.94 1 0.985 6 5 0 −1 0.985 −2 0.94 −3 0.86 −4

4

3

2

1

0.74 −8

0.6

0.46

0.34 0.22 0.1 −2 0

−6 −4 Real Axis

0.76 −5 −6

0.64 −4

0.5

0.34 0.16 −2 0 Real Axis 2 4

(a) Double pole at origin.

(b) Complex poles and real poles.

3 0.94

0.86

0.76

0.64

0.5

0.34 0.16

2 Imaginary Axis

1 0.985 6 0 5 4 3 2 1

−1 0.985 −2 0.94 −3 −6 0.86 −5 −4 0.76 0.64 −2 0.5 0.34 0.16 −1 0

−3 Real Axis

(c) Complex zeros and poles.

Figure 1: Root-locus diagrams for Problem 1. Although we used MATLAB for doing these, I think you should know some of the “sketching rules” such as: (1) real-axis branches, (2) asymptotes (their angles and intersection point), (3) rough approximations of the angle and magnitude conditions. Then you can recognize if the computer is giving you correct information. Remember: what you are creating are parametric plots of all possible closed-loop pole locations.

1

D(z ) = K . characteristic equation. the closed-loop transfer function. the result is G(z ) = 0.5 0 Real Axis 0.5 −1.5 0. (a) The portion of Figure 2 within the red dashed oval is what constitutes G(z ). Here we are trying to control the orientation of a pure inertia using torque as the actuating variable.5K (z + 1) = R(z ) (z − 1)2 + 0. Since the plant G(s) is preceded by a ZOH you should use the ’zoh’ method in MATLAB c2d. The branches are always outside the unit circle.5 1 1. 2012 Problem 2.5 0 Desired closed-loop pole location: 0.5 1 Imaginary Axis 0. Using proportional control.ME 481/581 Chapter 5 HW I Solution March 9. 1. Using a sample period of T = 1 second. (b) Root-locus using proportional control. R(s) + E (s) - A/D T =1 Controller D/A ZOH D(z ) τ (s) Plant G(s) Y (s) Figure 2: Block diagram of system.45+j0. (b) A block diagram of the discretized system is shown below in Figure 3(a). hence the system is always unstable. and corresponding root-locus form of the characteristic equation is: Y (z ) 0.5K (z + 1) =⇒ (z − 1)2 + 0. Proportional control is unsatisfactory.5(z + 1) = 0 (3) (z − 1)2 The root-locus diagram of (3) is shown in Figure 3(b). Variable τ (s) is the torque applied to the inertia (not needed for this problem—I just added it for illustrative purposes).5K (z + 1) = 0 =⇒ 1+K 0.5 −0.5 −1 −0. A block diagram of the system is shown in Figure 2 below. 2 .5 −1 R (z ) + E (z ) - Controller D(z ) τ (z ) Plant G(z ) Y (z ) −1. Figure 3: Discretized block diagram and root-locus using proportional control.5(z + 1) Y (z ) = (z − 1)2 τ (z ) (2) Note that this discrete plant transfer function relates samples of the output Y (z ) to samples of the torque input τ (z ).45 contour at damping ratio of 0.5 (a) Discretized block diagram.

86 z − 0. and the compensator pole is at 0. The angle condition requires that the sum of the angles from poles to the desired pole minus the sum of the angles from zeros to the desired pole must equal ±180◦ . For the situation in Figure 4 we have 2(141◦ ) + θ − 132◦ − 17◦ = ±180◦ (6) where angle θ is the angle of the vector from the lead compensator pole to the desired closed-loop pole.5 desired pole at z = 0.5 0. Hence the z -plane pole location is of the form z = σ + jσ .86 -0.45.45.45 132◦ 141◦ Re 17◦ pole θ 0. This requires converting our desired z -plane pole location to the s-plane: z = 0.5 and ωn = anything (note that zgrid often doesn’t draw the z -plane with equal scaling.785. 2012 (c) We have a specification of ζ = 0. To find the desired z -plane pole location you can draw a radial line at 45◦ from the origin and see where it intersects the ζ = 0.452 + j 0. Thus we find that θ = 47◦ .5 line in Figure 5. this location is shown as the red circle in Figure 3(b). but since s = 1 ln z we have s = −0.03. The angle of θ = 45◦ means the poles are along a radial line emanating outward from the z -plane origin at an angle of 45◦ .45 + j 0. and place the lead zero at about 1/3 of the distance from the origin as the real part of the desired closed-loop pole location. or use the MATLAB zgrid function with ζ = 0. T (5) Thus I will place the lead zero at s = −0.5 and θ = 45◦ for the dominant closed-loop poles.ME 481/581 Chapter 5 HW I Solution March 9. As in class the form of the lead compensator used for D(z ) is D(z ) = K z+b .5 Figure 4: Angle condition applied to this compensated system.03 (7) 3 . Im 0. I found the desired z -plane pole location to be around z = 0. Therefore D(z ) = K z − 0.45 + j0.45 + j 0.150 =⇒ z = 0. you can execute an axis equal command to fix that (I think I do this in class sometimes).6 in the notes. the vectors are all drawn from the poles and zeros to this desired pole location. However you do it.86. Figure 4 shows the root-locus angle condition applied to the desired pole location. b<a z+a (4) My approach with the lead compensator is to consider the s-plane.

2π/T 0.86) = R (z ) (z − 0.8 1 1.2 0.4π/T 0.1π/T 0. and we see that the locus goes through the desired points! The closed-loop pole locations are shown by red crosses.6 0.04741z − 0. 4 . Note that there is a closed-loop pole quite near the “+1” point.6 0.5K (z − 0.03) + 0.4370 ± j 0.86)(z + 1) = 0 which has a root-locus form 1+K 0.4 Figure 5: Root locus of compensated system.fdbk TF) function to find the closed-loop transfer function. but it is also near a zero.9π/T π/T 0 π/T −0.8 0.691z 2 + 1.6π/T 0.5(z − 0.5π/T 0.3 0.2 1. So the complex poles may still be dominant.677.4 0. we get 0.5K (z − 0. The new form of the closed-loop transfer function is Y (z ) 0.86)(z + 1) and the new characteristic equation is (z − 1)2 (z − 0.8π/T −0.86)(z + 1) =0 (z − 1)2 (z − 0.2π/T 0.8173) (12) (11) So after all this.5π/T 0.9π/T 0.ME 481/581 Chapter 5 HW I Solution March 9.5 0.03) (10) (9) (8) The root locus diagram of (9) is shown in Figure 5.2 0.2 0. Root Locus 1.7π/T Imaginary Axis 0.4 0. which is conveniently done using the MATLAB function rlocfind. which tends to reduce its effect.1 0.86).2913 Y (z ) = 3 R(z ) z − 1. This is done using the root-locus magnitude condition.3387z 2 + 0.03) + 0.4π/T 0.9 0. Also note that the zero of D(z ) does show up as a closed-loop zeros (the one at z = 0.4 Real Axis 0.3π/T 0.3213 which can be factored to yield Y (z ) 0. and the value of K that places the dominant closed-loop poles where we want them is K = 0.2 0.6 0.3π/T 0 0. 2012 and the final step is to find K .4495)(z − 0.7 0.2 0. This will give the system ability to respond quickly to time-varying inputs.8π/T 0.107z − 0. Using the MATLAB sys = feedback(frwrd TF.5K (z − 0. the dominant poles are pretty much where we want them.86)(z + 1) = R(z ) (z − 1)2 (z − 0.4 −0.1π/T 0.7π/T0.6π/T 0.2 1 0.33866(z + 1)(z − 0. The unit step response is on the next page.8 0.

which tends to speed up the response (it’s a “pseudodifferentiator”). Probably the most surprising thing about Figure 6 is the large overshoot (41%).8173 (see equation (12)). Recall that the response between samples is the plant’s (G(s)) step response (which is parabolic). Many systems will never be subjected to a step input. I used the [y.1 Hz. note that the response of Figure 6 doesn’t immediately go to its final value of 1.2017| This relatively slow time constant is responsible for the slow asymptotic final “approach” of the step response.2017 =⇒ τ = ≈ 5 sec T | − 0. the closed-loop bandwidth should be a little higher than this—we’ll see in Figure 8. The open-loop gain crossover frequency is about 0.00. The resonant peak of Figure 7(b) (about 3 dB at 0.5. 2012 The unit step response is shown below.5 0 0 5 10 Time (sec) 15 20 Figure 6: Unit step response of compensated system. and the bandwidth (frequency where the closed-loop magnitude is 0 dB) is something above 0.5. 5 . This is actually a good thing. but asymptotically approaches it over a period of 10-15 seconds. which you will see when we confront the project. then plotted it myself.5. But a straight line is close enough.and closed-loop transfer functions. (d) It is illustrative to look at the Bode plots (vs Hz) of both the open. which can be quite harsh. which shows the closed-loop Bode magnitude plot. Figure 7(a) shows the open-loop KD(z )G(z ): The phase margin is nearly 40◦ which implies pretty good stability.45 (where fn = 0. it’s consistent with the desired z -plane pole locations of 0. 1.45 ± j 0.86.t] = step(sys) function to get the step response. This is the effect of the third closed-loop pole at z = 0. and the sampling frequency of 1 Hz.11 Hz) is consistent with ζ = 0. we will use such an input during the projects. This large overshoot is due to the closed-loop zero at z = 0. The fast response shown in Figure 6 is just what is needed to track a time-varying reference input. While this bandwidth may seem low.1 Hz. which is not expected of a system with a damping ratio ζ = 0. The gain margin is around 9 dB. although bandwidth was not specified. also good. The time constant τ of this pole can be found by mapping it back to the z -plane: s= 1 1 ln(z ) = −0. Finally. especially at large amplitudes. Normally we would expect around 16% overshoot when ζ = 0.ME 481/581 Chapter 5 HW I Solution March 9. A better input to use to illustrate the behavior of this system would be some kind of smoothly-varying reference input.5 Satellite Angle (rad) 1 0.1013 Hz).

but did it on scratch paper (see Figure 9(a) on next page). (14) Thus I will place the lead zero at s = −0.e. b<a s+a (13) one branch goes up imag axis That is. Don’t need to map it to z -plane like in Problem 2. I’ll use the same design strategy: place the lead zero at about 1/3 of the distance from the origin as the real part of the desired closed-loop pole location. 2012 100 Magnitude (dB) 50 0 Magnitude (dB) −2 −1 0 5 0 −50 −100 −90 −5 −10 Phase (deg) −135 −180 −225 −270 −3 10 −15 10 10 Frequency (Hz) 10 −20 −3 10 10 −2 10 Frequency (Hz) −1 10 0 (a) Open-loop Bode plots.785.09 (16) 6 . The angle condition is 2(119. except to design the compensator in the continuous domain. Now you have to find the lead compensator pole location: this requires doing a root-locus angle criterion analysis just like in Figure 4.9◦ ) + θ3 − 111◦ = ±180◦ (15) double pole at origin one branch goes down imag axis Figure 8: Root locus of uncompensated plant.and closed-loop system. Turns out that the lead compensator pole must contribute an angle of θ3 = 51◦ . This adds positive phase angle. This effectively ignores the issue of sampling. and helps stabilize the system.452 ± j 0. So the compensator is D(s) = K s + 0. (b) Closed-loop Bode magnitude plot. with proportional control) vs parameter K (proportional gain) in the s-plane is shown in Figure 8. Recall that the desired s-plane closed-loop pole locations found in Problem 2 were s = −0. the zero is closer to the s-plane origin than the pole. (b) A root-locus of the uncompensated system (i.150. Problem 3. Figure 7: Bode plots of open. I didn’t take time to generate a fancy plot like Figure 4. then implement it as a discrete-time compensator using the trapezoidal discretization method.09. which places it at s = −1. This problem is the same as Problem 2. (c) A lead network in the s-plane is a D(s) of the form D(s) = K s+b .150 s + 1.ME 481/581 Chapter 5 HW I Solution March 9.

150 s + 1. Figure 10: Bode plots of open.09 (17) Note that the “third” closed-loop pole in Figure 10 is VERY close to the zero at -0.ME 481/581 Chapter 5 HW I Solution March 9. They are quite similar to those of Problem 2. which is most easily doen using MATLAB. My root-locus plot is shown in Figure 9(b). One can see the reshaped root locus bends to the left. (b) Closed-loop Bode magnitude plot. the lead compensator is D(s) = 0.96 s + 0. To find the value of gain K one must use the root-locus magnitude condition. instead of going straight up (and down) the jω axes.and closed-loop Bode plots for the continuous system are shown in Figure 10. Figure 9: Root loci for Problem 3. 100 Magnitude (dB) 50 0 ï50 ï100 ï3 10 5 0 ï5 10 ï2 10 ï1 10 0 Frequency (Hz) ï10 ï15 ï90 ï135 ï20 Phase (deg) ï25 ï180 ï225 ï270 ï3 10 ï30 10 ï2 10 Frequency (Hz) ï1 10 0 ï35 ï3 10 10 ï2 10 Magnitude (dB) ï1 10 0 (a) Open-loop Bode plots.and closed-loop continuous system. With the value of K shown.150. hence we would not expect it to have much weight in the response. 7 . The closed-loop poles may still be dominant. 2012 closed-loop poles when K = 0.96 (a) Using angle condition with D(s) (b) MATLAB root locus to find K . (d) The open.

2012 (e) The discretization of D(s) using the trapezoidal method (T = 1) yields D (z ) = 0.62e-01 .6 1.2 1 0.62e-01 + 6.8605 = 0.78e-01 8.69579 z − 0.8 0.4 0. (rad/s) 1. (f) The closed-loop transfer function using this D(z ). compare with Figure 6. Although not required.2876 --------------------------------z^3 .2945 z − 0. and the K is: >> W = feedback(K*Dd*Gd. 8 .13e-01 Equiv. The low damping is because we didn’t consider the effect of sampling. the precision is ridiculous but I left it.ME 481/581 Chapter 5 HW I Solution March 9.13e-01 2.5821 (g) A convenient way to find the poles and their characteristics is using damp: >> damp(W) Eigenvalue 8.96 z^2 + 1.213) is MUCH lower than the desired 0.3342 z^2 + 0.16e-01i 5.45.04664 z . G(z ). and their damping ratio (0. 1..6958z − 0. Freq. Damping 1.2945 (18) This is straight from MATLAB. the STEP RESPONSE is shown below for this system.5.00e+00 2.52e-01 The complex poles are NOT as z = −0.1) Transfer function: 0.2 0 0 5 10 Time (sec) 15 20 Figure 11: Step response of discrete-time system with continuousdomain lead compensator.34e-01 Equiv.0.4 1.6.8 1.also note that I did not include K with the D(z ) (maybe I should have like in (17)).636 z .45 ± j 0.34e-01 8.0.52e-01 8.6 0.5987 z − 0.37e-01 8.1.37e-01 5..16e-01i Magnitude 8.