ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 1 Solution to HW6 AP7.3 We are given the forward path transfer function for a unity feedback system. The forward path transfer function G(s) = 10 s(s + 1)(s + p) contains a parameter p which we are to select by sketching the root locus and determining the√value for p that results in the damping coefficient ζ of the complex roots having value 1/ 2. Solution: The first step we must take is to obtain an equation in the form 1 + pG 1 (s) = 0 for which we will determine the root locus. As described in section 7.5 of the text, we write s3 + s2 + p(s2 + s) + 10 s(s + 1)(s + p) + 10 = = 0. (1) 1 + G(s) = s(s + 1)(s + p) s(s + 1)(s + p) To make this quantity zero, we set the numerator equal to zero: s3 + s2 + p(s2 + s) + 10 = 0. This can be rewritten in the form 1 + pG 1 (s) = 0 by dividing both sides by s3 + s2 + 10 to obtain p(s2 + s) = 0. 1+ 3 s + s2 + 10 Now we proceed to sketch the root loci. We see immediately that we have zeros at 0 and −1. Because complex poles occur in pairs, we see that we must have at least one real pole. To locate the real pole we can calculate the derivative of the denominator and set it equal to zero to find local maximum and local minimum values of the denominator and knowing that a cubic polynomial has exactly one of each, we test values of s that lie to the left of the value −2/3 corresponding to the local minimum. We find that the value of the polynomial changes sign between s = −2 and s = −3. Using this we can find approximate values for the complex poles. Alternatively we can just use the roots command in Matlab, which tells us immediately that the poles are −2.5445 and 0.7723 ± j1.8258. Note that the complex poles lie in the right half-plane. In either case, we have two zeros and one pole on the real axis so the segments of the real axis between the two zeros and to the left of the real pole must be part of the root loci. There are three poles and two zeros so one locus must extend from one of the poles to infinity and the other loci must extend from the other poles to the zeros. Because symmetry is required, the locus from the real pole must be the one that extends to infinity. We do not need to determine any asymptotes or asymptote intercepts since we already know that the entire real axis to the left of the real pole is part of a locus and that only one locus goes to infinity. ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 2 We do need to determine the breakin point where the loci from the complex poles join the real axis between the zeros. We obtain this by letting a(s) = s2 + s b(s) = s3 + s2 + 10 be the numerator and denominator, respectively, of G 1 (s). The breakin point occurs where a(s)b0 (s) − a0 (s)b(s) = 0. This condition simplifies to s 4 + 2s3 + s2 − 20s − 10 = 0. We want to find a root between 0 and −1, which we could approximate by hand or, as before, just use Matlab. Only one root falls in the required range, namely the one at −0.4969, so that must be the breakin point. The next step is to calculate the angle of departure or the locus from the complex poles. We define the angles shown in Figure 1 in order to determine the departure angle θ 2 . Figure 1: Definitions of angles for departure angle calculation θ2 x x θ3 o φ2 o φ1 θ1 x Using the condition θ1 + θ 2 + θ 3 − φ 1 − φ 2 = π and noting that θ1 = π/2 θ3 = tan−1 1.8258 0.7723 + 2.5445 ECE382/ME482 Spring 2004 Homework 6 Solution φ1 φ2 March 20, 2004 3 1.8258 = tan 0.7723 1.8258 −1 = tan 0.7723 + 1 −1 we find that θ2 = 3.04 rad or 174 degrees. The angle of arrival at the breakin point is calculated similarly to be approximately π/2. The root locus generated by Matlab is shown in Figure 2. It matches the sketch I obtained using the values derived above. (The quality of the Matlab output far exceeds the quality of a scan of my sketch, so I’ve included the formter rather than the latter.) Figure 2: Root locus plot generated by Matlab Root Locus for AP7.3 2 1.5 1 Imaginary Axis 0.5 0 −0.5 −1 −1.5 −2 −5 −4 −3 −2 −1 0 1 Real Axis √ To obtain damping coefficient ζ = 1/ 2 for the complex pole pair, we note that this condition corresponds the magnitudes of the real and imaginary parts of the pole being equal. From the root locus sketch, we estimate that this will occur when s = −(1 ± j)/2. Then applying the equation from Step 12 of Table 7.2, page 348, to determine the ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 4 corresponing value of p we find np Y |s + pj | |s + 2.54||s − 0.77 − j1.83||s − 0.77 + j1.83| j=1 = 20.5. p = nz = Y |s||s + 1| s=−0.5−j0.5 |s + zi | i=1 (2) s=sp Substituting this into (1) and finding the roots we find that the resulting roots are −20.52 and −0.49 ± j0.50. Alternatively, we could use the rlocfind command as described in the solution to MP7.2 below. AP7.9 We are given four different controller transfer functions G c (s) for the feedback system shown in Figure AP7.9, page 397. We are asked to sketch the root loci for each of the four cases. Solution: The controller is in series with the plant whose transfer function has poles at 0, −2, and −5. (a) The first controller is a proportional controller with gain G c (s) = K. Accordingly, we have an open-loop system with three poles and no zeros. The segments of the real axis contained in the root loci will be the segments (−∞, −5] and [−2, 0]. There are three more poles than zeros so three loci must go from poles to infinity. The asymptotes have angles φA = 2q + 1 π, q = 0, 1, 2 3−0 which yields π/3, π, and 5π/3 = −π/3. The intercept of the asymptotes occurs at σA = 0−2−5 pj − zi 7 = =− . np − n z 3 3 P P We have one locus that consists of the segment (−∞, −5]. To determine where the other root loci cross the imaginary axis, we apply the Routh-Hurwitz method to the numerator of the left-hand side of K =0 1+ s(s + 2)(s + 5) and find that the value of K for which a zero occurs in the first column of the Routh array is K = 35. Substituting K = 35 into s 3 + 7s2 + 5s + K = 0 we find the roots to be −7 and ±j2.2361. To determine the breakaway point, we let p(s) = −K = −s 3 − 7s2 − 5s and set the derivative of p with respect to s equal to zero. The condition dp = −3s2 − 14s − 5 = 0 ds yields s = −4.277 and s = −0.3897. We need a point between 0 and −2 so we choose the latter. The usual calculations yield an angle of departure of π/2 radians at the breakaway point. The root locus is shown in Figure 3. ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 5 Figure 3: Root locus plot generated by Matlab Root Locus for AP7.9a 10 8 6 4 Imaginary Axis 2 0 −2 −4 −6 −8 −10 −14 −12 −10 −8 −6 −4 Real Axis −2 0 2 4 ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 6 (b) The second controller has Gc (s) = K(s + 1). Accordingly, we have an open-loop system with three poles and one zero. The segments of the real axis contained in the root loci will be the segments [−5, −2] and [−1, 0]. There are two more poles than zeros so two loci must go from poles to infinity. The asymptotes have angles 2q+1 φA = 3−0 π, q = 0, 1 which yields π/2 and 3π/2. The intercept of the asymptotes occurs at 0 − 2 − 5 − (−1) = −3. σA = 3−1 To determine the breakaway point, we let p(s) = −K = − s3 − 7s2 − 5s a(s) = s+1 b(s) and set the derivative of p with respect to s equal to zero. The equivalent condition a(s)b0 (s) − a0 (s)b(s) = 2s3 + 10s2 + 14s + 5 = 0 yields s = −2.85, s = −1.60, and s = −0.55. We need a point between −5 and −2 so we choose the first. The standard calculations yield an angle of departure of π/2 radians at the breakaway point. The root locus is shown in Figure 4. (c) The third controller has K(s + 1) . s + 10 Accordingly, we have an open-loop system with four poles and one zero. The segments of the real axis contained in the root loci will be the segments (−∞, −10], [−5, −2], and [−1, 0]. There are three more poles than zeros so three loci must go from poles to infinity. The asymptotes have angles π/3, π, and 5π/3 = −π/3 as in part (a). The intercept of the asymptotes occurs at Gc (s) = σA = 0 − 2 − 5 − 10 − (−1) 16 =− . 3 3 The segment (−∞, −10] constitutes one locus. To determine where the other root loci cross the imaginary axis, we apply the RouthHurwitz method to s(s + 2)(s + 5)(s + 10) + K(s + 1) = 0. (3) We find that for K = 1260 the first element of the third row becomes zero. We also find that the fourth row becomes zero at approximately K = 997.34 and K = −126.34. We are looking for a positive value (the root locus is for 0 < K < ∞) so we discard the negative value. The system becomes unstable as soon as K reaches the lower of the two positive values so we conclude that the loci cross the imaginary axis when K = 997.34. Substituting this into (3), we find the roots on the imaginary axis to be approximately ±j8. ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 7 Figure 4: Root locus plot generated by Matlab Root Locus for AP7.9b 8 6 4 Imaginary Axis 2 0 −2 −4 −6 −8 −5 −4.5 −4 −3.5 −3 −2.5 Real Axis −2 −1.5 −1 −0.5 0 ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 8 To determine the breakaway point, we let p(s) = −K = s4 + 17s3 + 80s2 + 100s a(s) s(s + 2)(s + 5)(s + 10) = = s+1 s+1 b(s) and set the derivative of p with respect to s equal to zero. The equivalent condition a(s)b0 (s) − a0 (s)b(s) = 3s4 + 38s3 + 131s2 + 160s + 100 = 0 yields s = −7.9, s = −3.2 and s = −0.76 ± j0.81. The breakaway point must be between 0 and −2 so is −3.2. The usual calculations yield an angle of departure of π/2 radians at the breakaway point. The root locus is shown in Figure 5. Figure 5: Root locus plot generated by Matlab Root Locus for AP7.9c 20 15 10 Imaginary Axis 5 0 −5 −10 −15 −20 −30 −25 −20 −15 −10 −5 0 5 10 Real Axis (d) The fourth controller consists of Gc (s) = K(s + 1)(s + 3) . s + 10 Accordingly, we have a system with four poles and two zeros. The segments of the real axis contained in the root loci will be the segments [−10, −5], [−3, −2], and [−1, 0]. ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 9 There are two more poles than zeros so two loci must go from poles to infinity. The asymptotes have angles π/2 and 3π/2 so the loci are unlikely to cross the imaginary axis. The intercept of the asymptotes occurs at σA = 13 0 − 2 − 5 − 10 − (−1 − 3) =− . 2 2 To determine the breakaway point, we let p(s) = −K = s(s + 2)(s + 5)(s + 10) s4 + 17s3 + 80s2 + 100s a(s) = = 2 (s + 1)(s + 3) s + 4s + 3 b(s) and set the derivative of p with respect to s equal to zero. The equivalent condition a(s)b0 (s) − a0 (s)b(s) = 2s5 + 29s4 + 148s3 + 373s2 + 480s + 300 = 0 yields only one real root, s = −7.296, which does lie between −10 and −5 as required, so the breakaway point is −7.296. Notice that the breakaway point is distinct from the intercept of the asymptotes so there will be some bending of the loci. The usual calculations yield an angle of departure of π/2 radians at the breakaway point. The root locus is shown in Figure 6. MP7.1 We are given four different forward path transfer functions for a unity negative feedback system. We are asked to use Matlab to plot the root loci for 0 < K < ∞. The forward path transfer functions are: (a) G(s) = s3 K + 6s + 1 + 4s2 (b) G(s) = K s2 (s + 20) + 5s + 20 (c) G(s) = K s2 + s + 1 s(s2 + 4s + 6) (d) G(s) = K s5 + 4s4 + 6s3 + 8s2 + 6s + 4 s6 + 2s5 + 2s4 + s3 + s2 + 10s + 1 Solution: The root loci generated by Matlab is given in Figure 7. In (a) the intercept for the asymptotes lies to the right of the complex poles. Notice how this affects the shape of the loci. Also look carefully at the root loci for part (c). If we were plotting the loci by hand, it would have been tempting to conclude that the loci left the complex poles and headed directly to the right toward the complex zeros rather than detouring to the real axis. This would seem reasonable with the negative real axis constituting the locus from the pole at the origin out to infinity. It is only by actually calculating the angles of departure and arrival and the breakin and breakaway points (or by using Matlab) that we find the true shape of the loci. The transcript of the commands that generated these plots is given below. ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 10 Figure 6: Root locus plot generated by Matlab Root Locus for AP7.9d 20 15 10 Imaginary Axis 5 0 −5 −10 −15 −20 −12 −10 −8 −6 Real Axis −4 −2 0 ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 11 Figure 7: Root locus plots generated by Matlab for Problem MP7.1 Root Locus for MP7.1b 20 2 10 Imaginary Axis Imaginary Axis Root Locus for MP7.1a 4 0 −2 −4 −6 0 −10 −4 −2 0 −20 −40 2 −30 Real Axis −10 0 Root Locus for MP7.1d 4 1 2 Imaginary Axis Imaginary Axis Root Locus 2 0 −1 −2 −4 −20 Real Axis 0 −2 −3 −2 Real Axis −1 0 −4 −6 −4 −2 Real Axis 0 2 ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 12 >> num = [1]; den = [1 4 6 1]; sys = tf(num,den) Transfer function: 1 --------------------s^3 + 4 s^2 + 6 s + 1 >> >> >> >> subplot(2,2,1) rlocus(sys) title(’Root Locus for MP7.1a’) num = [1 20]; den = [1 5 20]; sys = tf(num,den) Transfer function: s + 20 -------------s^2 + 5 s + 20 >> >> >> >> subplot(2,2,2) rlocus(sys) title(’Root Locus for MP7.1b’) num = [1 1 1]; den = [1 4 6 0]; sys = tf(num,den) Transfer function: s^2 + s + 1 ----------------s^3 + 4 s^2 + 6 s >> subplot(2,2,3) >> rlocus(sys) >> num = [1 4 6 8 6 4]; den = [1 2 2 1 1 10 1]; sys=tf(num,den) Transfer function: s^5 + 4 s^4 + 6 s^3 + 8 s^2 + 6 s + 4 -----------------------------------------s^6 + 2 s^5 + 2 s^4 + s^3 + s^2 + 10 s + 1 >> >> >> >> subplot(2,2,4) rlocus(sys) title(’Root Locus for MP7.1d’) print -deps mp7_1.eps MP7.2 We are given the forward path transfer function for a unity negative feedback system. The forward path transfer function is G(s) = K(s2 − 2s + 2) . s(s2 + 3s + 2) ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 13 We are asked to use Matlab to plot the root locus and show that the maximum value of K for which the closed-loop system is stable is 0.79. Solution: The root locus generated by Matlab is given in Figure 8. The rlocfind Figure 8: Plot generated by Matlab for Problem MP7.2 Root Locus for MP7.2 1 0.8 0.6 0.4 Imaginary Axis 0.2 0 −0.2 −0.4 −0.6 −0.8 −1 −3.5 −3 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 Real Axis command was used to determine the upper bound on K. The crosshairs were used to select the point where the upper locus crossed the imaginary axis. The session transcript below indicates that the upper bound on K is approximately 0.77, which is reasonably close to 0.79. We could use the Routh-Hurwitz method to determine an exact value but the problem does not request it. Note that the rlocus command must be executed prior to executing the rlocfind command. >> num = [1 -2 2]; den = [1 3 2 0]; sys = tf(num,den) Transfer function: s^2 - 2 s + 2 ----------------s^3 + 3 s^2 + 2 s ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 14 >> rlocus(sys) >> [k,poles] = rlocfind(sys) Select a point in the graphics window selected_point = 0.0030 + 0.6304i k = 0.7717 poles = -3.7595 -0.0061 + 0.6407i -0.0061 - 0.6407i MP7.4 We are given the forward path transfer function for a unity negative feedback system. The forward path transfer function is G(s) = (1 + p)s − p . s(s2 + 3s + 6) We are asked to use Matlab to plot the root locus for 0 < p < ∞ and determine the range of values of p for which the closed-loop system is stable. Solution: The first step we must take is to obtain an equation in the form 1 + pG 1 (s) = 0 for which we will determine the root locus. As described in section 7.5 of the text, we write 1 + G(s) = s2 + 3s + 6 + p(s − 1) + s s2 + (3 + 1)s + 6 + p(s − 1) = = 0. 2 s + 3s + 6 s2 + 3s + 6 (4) This quantity will be zero if the numerator equal is zero, namely if s2 + 4s + 6 + p(s − 1) = 0. This can be rewritten in the form 1 + pG 1 (s) = 0 by dividing both sides by s2 + 4s + 6 to obtain p(s − 1) 1+ 2 = 0. s + 4s + 6 The root locus generated by Matlab is given in Figure 9. We see that the loci extend from the complex poles to the real axis, the one goes one to infinity along the negative real axis and the other to the zero at s = 1. The values of p for which the system are stable are those for which the locus that extends to the pole in the right half-plane has not yet crossed the imaginary axis. Using the Matlab command rlocfind we determine ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 15 Figure 9: Plot generated by Matlab for Problem MP7.4 Root Locus for MP7.4 1.5 1 Imaginary Axis 0.5 0 −0.5 −1 −1.5 −5 −4 −3 −2 Real Axis −1 0 1 ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 16 the approximate value of p for which the locus crosses the axis. (The command has us use crosshairs to select a location on the locus. We cannot expect that that will result in an exact answer. The transcript below indicates that the point I selected was close to but not actually at the origin.) The transcript shows that the upper bound on p for stability is approximately 6 and that the corresponding closed loop poles are aproximately s = 0 and s = −10. >> num = [1 -1]; den = [1 4 6]; sys = tf(num,den) Transfer function: s - 1 ------------s^2 + 4 s + 6 >> rlocus(sys) >> [p,poles] = rlocfind(sys) Select a point in the graphics window selected_point = -0.0024 - 0.0140i p = 5.9758 poles = -9.9734 -0.0024 MP7.6 We are given a unity negative feedback system in which the controller, with transfer function Gc (s), preceeds the plant in the forward path. The plant has numerator 1 and a second order denominator having poles at s = −2 and s = −3. We are to find the root loci corresponding to three different controllers: a proportional (P) controller G c (s) = K, an integral (I) controller Gc (s) = K/s, and a proportional plus integral (PI) controller Gc (s) = K(1 + 1/s). We are asked to choose values of K to meet the design specifications Ts ≤ 10 seconds and P.O. ≤ 10% for unit step input. (The problem statement says “M p ”. Since Mp is a value not a percentage, we conclude that the authors meant percentage overshoot “P.O.”.) We are also asked to plot the step responses for the three controllers on a single set of axes and comment on the similarities and differences in achieved performance. Solution: The root loci and the step responses are shown in Figure 10. ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 17 Note that there is no single correct answer to the design part of this problem. The design specifications are fairly loose so that for each case, there is a range of values of K that will meet the specifications. For the P controller, we have a second order system so we can use equations (5.13) and (5.16) on pages 230 and 231 respectively to determine appropriate values of K. This yields a value of K = 11.4. I chose my values for K by starting with K = 40, which easily met the settling time spec for the P and PI controllers but led to instability of the system with the I controller. For each controller I then reduced the value of K until the overshoot spec was met. Finally, I checked to make sure that the settling time spec was met for each controller. The plots shown in Figure 10 are for K = 36 for the proportional controller, K = 4 for the integral controller, and K = 17 for the PI controller. Figure 10: Plots generated by Matlab for Problem MP7.6 Root Locus for I controller, MP7.6 10 1 5 Imaginary Axis Imaginary Axis Root Locus for P controller, MP7.6 2 0 0 −1 −5 −2 −4 −3 −2 −1 −10 −10 0 −5 Real Axis 0 5 Real Axis 1.4 Root Locus for PI controller, MP7.6 Step Responses 10 1.2 1 y(t) Imaginary Axis 5 0 0.8 0.6 0.4 P I PI −5 0.2 −10 −3 −2.5 −2 −1.5 Real Axis −1 −0.5 0 0 0 2 4 6 8 10 t (s) Comparing the performance of the three controllers should convince you that the PI controller is superior to the others. The P controller has a steady state error of approximately 15%, which we are not able to eliminate by changing K. The integral controller is very slow compared to the others and increasing its gain quickly leads to instability. (According to rlocfind, instability occurs when K exceeds 31.8 (see transcript below), but unacceptable ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 18 oscillations are found to occur even for much lower values of K.) The response of the PI controller is almost as fast as that of the P controller but, unlike the P controller, achieves zero steady state error. The Matlab script that generated the plots is shown below. num = [1]; den = [1 5 6]; sys1 = tf(num,den) subplot(2,2,1) rlocus(sys1) title(’Root Locus for P controller, MP7.6’) num = [1]; den = [1 5 6 0]; sys2 = tf(num,den) subplot(2,2,2) rlocus(sys2) [k,poles] = rlocfind(sys2) title(’Root Locus for I controller, MP7.6’) num = [1 1]; den = [1 5 6 0]; sys3 = tf(num,den) subplot(2,2,3) rlocus(sys3) title(’Root Locus for PI controller, MP7.6’) subplot(2,2,4) t=[0:.01:10]’; K1 = 36; K2 = 4; K3 = 17; clsys1 = feedback(K1*sys1,1) clsys2 = feedback(K2*sys2,1) clsys3 = feedback(K3*sys3,1) y1 = step(clsys1,t); y2 = step(clsys2,t); y3 = step(clsys3,t); plot(t,y1,’-’,t,y2,’-.’,t,y3,’:’) legend(’P’,’I’,’PI’,4) text(1.5,1.3,’Step Responses’) xlabel(’t (s)’) ylabel(’y(t)’) grid print -depsc mp7_6.eps The output resulting from selecting the point where the upper locus crosses the imaginary axis is given below. (This determines the value of K for which the closed-loop system with the I controller becomes unstable.) Select a point in the graphics window selected_point = 0.0439 + 2.5000i ECE382/ME482 Spring 2004 k = 31.8032 poles = -5.0571 0.0286 + 2.5076i 0.0286 - 2.5076i Homework 6 Solution March 20, 2004 19
© Copyright 2026 Paperzz