You are on page 1of 25

http://nptel.iitm.ac.in/courses/Webcourse-contents/IITDelhi/Control%20system%20design%20n%20principles/ind ex.

htm MATLAB MODULE 7
Root Locus Design and SISO Design Tools

Design using MATLAB dialogues
Example M7.1 A unity feedback system has forward path transfer function

Our goal is to design a cascade PID compensator that improves the transient as well as steadystate performance of the closed-loop system (refer Nise(2004)). We want to achieve a transient response that has no more than 20% overshoot. This, as we know, can be achieved by simple gain adjustment. We therefore first evaluate the uncompensated system operating at 20% overshoot. The following MATLAB dialogue is helpful for this evaluation. s = tf('s'); G1 = (s+8)/((s+3)*(s+6)*(s+10)); zeta = 0.456; rlocus(G1); sgrid(zeta,0);

Fig.M7.1

Selecting the point of intersection of the root locus with 20% overshoot line in Fig. M7.1 using rlocfind(G) command, MATLAB yields the gain at that point, as well as all the poles that have that gain . The MATLAB session follows:

>> [K, p] = rlocfind(G1) Select a point in the graphics window selected_point = -5.4171 +10.4814i

K= 119.6589

.1716 The unit step response of the uncompensated system with K =119. M7.2 ..p= -5..4142 -10.119.7 s + 1137 >> step(M) Fig.7 s + 957..1) Transfer function: .... is given by the following dialogue: >> M = feedback(K*G1.4814i -8..4814i -5...3 ------------------------------------------s^3 + 19 s^2 + 227.6589...4142 +10.

M7. Evaluate the angle contributed by all the poles and zeros of G(s) at s d = -8. We search for compensator's zero location so that the root locus of the compensator system passes through the desired dominant pole location. we want to design a PID controller so that the closed-loop system operates with a peak time that is two-thirds that of the uncompensated system at 20% overshoot. The position error constant is Therefore Let us now fix specifications for design.2. we must first find the compensated system's desired dominant pole location. If we are using SISO Design Tool (described later in this module). the trial-and-error search for the compensator zero is straightforward.296 sec. Say. The imaginary part of the compensated dominant pole is and the real part is Next we design a PD compensator. Otherwise. the peak time t p =0. with zero steady-state error for a step input.1571 +15.1571+15.9202i Sd = -8. we may proceed as follows.1571+ j 15.The step response is shown in Fig. To compensate the system to reduce the peak time to two-thirds of the uncompensated system.9202i .9202 using the following MATLAB command: >> Sd = -8.

4967 180 = 18.6].Sd)))) angle_at_dominant_pole = -198..Sd))-(angle(polyval([1.8].4967 We find the sum of angles from uncompensated system's poles and zero to the desired compensated dominant pole to be -198..Sd)). +angle(polyval([1.10].3.Sd))+angle(polyval([1.4967o. Thus the contribution required from the compensator zero is 198. .3].7467. M7. we obtain This gives zc = 55.4967o. Assuming that compensator zero is located at as shown in Fig.angle_at_dominant_pole=(180/pi)*(angle(polyval([1.

the gain at the design point is 5. >> [K.2410 p= -8.0799 +15.6832i K= 5.0).7467.4. >> rlocus(D1*G1).6914i -8.2410. .6914i -8. Complete analysis of PD-compensated system is as follows: >> D1 = s+55.p]=rlocfind(D1*G1) Select a point in the graphics window selected_point = -8. M7.7467.Thus the PD controller is The complete root locus for the PD-compensated system is sketched in Fig. >> sgrid(zeta.1043 +15.0799 -15.-55. Using rlocfind command.0812 The zeros are at -8. The effect of third closed-loop pole is nearly cancelled by a zero.

This ensures that PI compensator will not change the transient response obtained with the PD compensator (The placement of the zero of the PI compensator is not entirely arbitrary. We now design a PI compensator to reduce the steady-state error to zero for a step input.Fig.5. Any PI compensator will work as long as the zero is placed close to the origin.178 sec. >> M=feedback(K*D1*G1.. The location of the zero influences the magnitude of the relevant error constants. Choosing . the placement of the zero influences the magnitude of Kv ).. peak time 0. M7.4 The PD-compensated system has settling time 0.M7.1).454 sec. as seen in simulation shown in Fig. and steady-state error 0. In the case of example under consideration. >> step(M) We see the reduction in peak time and improvement in steady-state error over the uncompensated system.072.

s >> D = D1*D2.p]=rlocfind(D*G1) Select a point in the graphics window . >> D2 = (s+0...5 The following session generates the root locus and simulates the PID-compensated system..0) >> [K. >> rlocus(D*G1) >> sgrid(zeta.5)/s Transfer function: s + 0.we sketch the root locus for the PID-compensated system. M7. Fig..5 ---------.

3928 p= -7.1)) The zeros are at -0.4116 +14.5.-8.7467.-55.selected_point = -7. .4116 -14.1037 -0.3004i -8.3478i K= 4.2512 +14.3004i -7. The effects of third and fourth closed-loop poles are nearly cancelled by zeros.4660 >> step(feedback(K*D*G1.

Fig. M7.6 .

7 gives settling time 2... PD compensator improved the transient response by decreasing the time required to reach the first peak as well as yielding some improvement in the steady-state error. M7. .2 Given a unity feedback position control system with forward path transfer function: The goal is to design a cascade compensator to meet the following requirements (refer Nise(2004))..184 sec. we find the dominant second-order poles to be ...3928.. Example M7. The complete PID controller further improved the steady-state error without appreciably changing the transient response designed with the PD controller.67 sec.6). peak time 0. and zero steady state error. (ii) settling time: 2 sec.. with an associated gain of 4.456 damping ratio line (Fig...Fig. M7. M7. and (iii) Kv = 20... . Simulation in Fig..(i) 25% overshoot....7 Searching the 0.

0083 .404.63/((s)*(s+1. G1 = 6. [K. rlocus(G1).p] = rlocfind(G1).404.0190i -0.6665 >> p p= 1. zeta = 0.8944i >> K K= 64. sgrid(zeta.0083 + 0. s = tf('s'). Properly redefine the axes of the root locus using Right click --> Properties --> Limits.0).0190i .71)*(s+100)).0e+002 * -1. Consider the following MATLAB session.0.0004 -0.8057 + 1.The 25% overshoot corresponds to a damping ratio of 0. Select a point in the graphics window selected_point = -0.

step(M).8) locates the system's dominant second-order poles at and the gain at the dominant poles is 64.04. M7.7. M. The simulation of the closed-loop system's step response is given by the following commands: M = feedback(K*G1. The location of the third closed-loop pole is at 100.8 The intersection of 25% overshoot line with the root locus (Fig. second-order approximation is thus valid.Fig. .1).6665.

To obtain a settling time ts of 2 secs and 25% overshoot. M7.9 Figure M7.Fig.9 shows that the design requirement of 25% overshoot is met. we want to improve the settling time by a factor of two and we want approximately eight-fold improvement in Kv .07 sec. The settling time is 4. the real part of dominant closed-loop poles should be at and the imaginary part at We now assume a lead compensator zero and find the compensator pole location so that leadcompensated root locus passes through Let us assume compensator zero at Angular contribution at the design point by open-loop poles and compensator zero is obtained as follows: . and Comparing these values with the design requirements. We first attempt lead compensator design to improve transient response.

10.8616o for the design point to be on the compensated system's root locus.1384 Compensator pole must contribute 120.0]..100]. M7. +angle(polyval([1.6291.Sd)). angle_at_dominant_pole=(180/pi)*(angle(polyval([1.Sd))+angle(polyval([1. This gives pc = 4.Sd = -2+4.1384 -180 = -59.5285i.Sd))-(angle(polyval([1. Thus the lead compensator is . From the geometry shown in Fig.71].2].1..Sd)))) angle_at_dominant_pole = -120.

Root locus plot and its analysis for the lead-compensated system is given by the following MATLAB session.0e+002 * -1.0208 >> step(feedback(K*D1*G1. >> rlocus(D1*G1).8743 p= 1.6291).0200 . >> [K. .0444i -0.0444i -0.4410i K= 372.0. >> D1 = (s+2)/(s+4.0026 -0. >> sgrid(zeta.0200 + 0.0) Properly redefine the axes of the root locus using Right click --> Properties --> Limits .9621 + 4.p] = rlocfind(D1*G1) Select a point in the graphics window selected_point = -1.1)).

Fig.11 . M7.

that is we choose the lag compensator as Root locus plot and its analysis for the complete lag-lead compensated system is given by the following session: D2 = (s+0. rlocus(D1*D2*G1).11-M7.01 and calculate zc =0. M7. Choose pc =0. M7. with gain = 372. .0032. which is 3.2 times larger than pc.12 The transient response specifications are satisfied.032)/(s+0.8743 (Figs.12).01).2462=3. the amount of improvement required over the lead-compensated system is 20/6.2. sgrid(zeta.Fig. The lead-compensated system Kv becomes Since we want Kv=20.0).

0199 .1)) .0003 >> step(feedback(K*D1*D2*G1.0208 -0.0444i -0.4410i K= 373.p] = rlocfind(D1*D2*G1) Select a point in the graphics window selected_point = -1.0199 + 0.0. >> [K.0026 -0.0e+002 * -1.Properly redefine the axes of the root locus using Right click --> Properties --> Limits.5528 p= 1.9621 + 4.0444i -0.

13 . M7.Fig.

1. The system may be redesigned to reduce the peak overshoot. G4 = 2/((0. and Table M7.1). M7.5*s+1)^2). and the gain at this point is 373.Fig.15. M7. We also see from Fig. For qualitative robustness analysis. The results obtained using the following MATLAB code. G3 = 2/((s+1)^2).5528 (Fig. M7. are summarized in Fig. A design carried on the nominal plant with K =1.1). D = (1+0.14 The design point has not moved with the addition of the lag compensator. M7. .13). M2 = feedback(G2*D.16*s)*(72.14 that peak overshoot is higher than specified.54+12/s). s = tf('s'). G1 = 1/((s+1)^2).1).3 Consider a unity feedback system with the plant The plant varies significantly: It is desired to achieve robust behaviour (refer Dorf and Bishop (1998)). M3 = feedback(G3*D. M1 = feedback(G1*D. Example M7. we have obtained step response for the four conditions: and .5*s+1)^2). gives the following cascade compensator. G2 = 1/((0.

Fig.1).M4 = feedback(G4*D. The scale has been modified using Right click --> Properties -->Limits. step(M2). step(M3). hold.1 Plant conditions Percent M1 (nominal system) 11.15 Table M7. step(M1).4 M3 8.63 .69 M4 1.9 M2 2. M7. step(M4).

overshoot Settling time (sec) 0. Example M7.16.16 A design carried out on the nominal system gives the following result. Fig. We also examine the nominal system with the third-pole added. p =3. .0351 As is seen from this robustness analysis. and worstcase parameters Km =1.551 0. G2 = 1. p =4. We examine the performance of the system with nominal parameters Km =2.5/(s*(s+3)). G1 = 2/(s*(s+4)). M7. a 50 has been omitted from the model (refer Dorf and Bishop(1998)). Furthermore. s = tf('s').155 0.5.17 and Table M7. the deviations from the nominal design performance do not take the system outside the acceptable range.4 A control system has the structure shown in Fig M7. are summarized in Fig. The parameter variations are third pole at s= and with the nominal conditions Km = 2 and p =4. so that the control plant is The robustness analysis results. obtained using the following MATLAB code. the design is therefore robust.40 0.2. M7.

2 .06*s)*(294. hold. step(M2).17 Table M7. D = (1+0. M2 = feedback(G2*D. M3 = feedback(G3*D. Fig M7.1). step(M1).G3 = 2*50/(s*(s+4)*(s+50)).69+4453/s). M1 = feedback(G1*D. The scale has been modified using Right click --> Properties -->Limits. step(M3).1).1).

6 0. The response of the system with added pole shows that again the system fails the requirement of robust performance. The interactive capability of MATLAB allows us to check the robustness by simulation.9 0. .2 0.847 The system does not offer robust performance to parameter variations.266 M2 39. Since the results are not robust.394 M3 81. it is possible to iterate on the design until an acceptable performance is achieved.Plant conditions Percent overshoot Settling time (sec) M1 (nominal system) 31.