Вы находитесь на странице: 1из 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

p= -5.4142 +10.4814i -5.4142 -10.4814i -8.1716 The unit step response of the uncompensated system with K =119.6589, is given by the following dialogue: >> M = feedback(K*G1,1) Transfer function: .............119.7 s + 957.3 ------------------------------------------s^3 + 19 s^2 + 227.7 s + 1137 >> step(M)

Fig. M7.2

The step response is shown in Fig. M7.2; the peak time t p =0.296 sec.

The position error constant is

Therefore

Let us now fix specifications for design. Say, 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, with zero steady-state error for a step input. To compensate the system to reduce the peak time to two-thirds of the uncompensated system, we must first find the compensated system's desired dominant pole location. The imaginary part of the compensated dominant pole is

and the real part is

Next we design a PD compensator. We search for compensator's zero location so that the root locus of the compensator system passes through the 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. Otherwise, we may proceed as follows. Evaluate the angle contributed by all the poles and zeros of G(s) at s d = -8.1571+ j 15.9202 using the following MATLAB command: >> Sd = -8.1571+15.9202i Sd = -8.1571 +15.9202i

angle_at_dominant_pole=(180/pi)*(angle(polyval([1,8],Sd))-(angle(polyval([1,3],Sd))... +angle(polyval([1,6],Sd))+angle(polyval([1,10],Sd)))) angle_at_dominant_pole = -198.4967 We find the sum of angles from uncompensated system's poles and zero to the desired compensated dominant pole to be -198.4967o. Thus the contribution required from the compensator zero is 198.4967 180 = 18.4967o. Assuming that compensator zero is located at as shown in Fig. M7.3, we obtain

This gives zc = 55.7467.

Thus the PD controller is

The complete root locus for the PD-compensated system is sketched in Fig. M7.4. Using rlocfind command, the gain at the design point is 5.2410. Complete analysis of PD-compensated system is as follows: >> D1 = s+55.7467; >> rlocus(D1*G1); >> sgrid(zeta,0); >> [K,p]=rlocfind(D1*G1) Select a point in the graphics window selected_point = -8.1043 +15.6832i

K= 5.2410

p= -8.0799 +15.6914i -8.0799 -15.6914i -8.0812 The zeros are at -8,-55.7467. The effect of third closed-loop pole is nearly cancelled by a zero.

Fig. M7.4 The PD-compensated system has settling time 0.454 sec., peak time 0.178 sec., and steady-state error 0.072, as seen in simulation shown in Fig.M7.5. >> M=feedback(K*D1*G1,1); >> step(M) We see the reduction in peak time and improvement in steady-state error over the uncompensated system. We now design a PI compensator to reduce the steady-state error to zero for a step input. Any PI compensator will work as long as the zero is placed close to the origin. 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. The location of the zero influences the magnitude of the relevant error constants. In the case of example under consideration, the placement of the zero influences the magnitude of Kv ). Choosing

we sketch the root locus for the PID-compensated system.

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

selected_point = -7.2512 +14.3478i

K= 4.3928

p= -7.4116 +14.3004i -7.4116 -14.3004i -8.1037 -0.4660 >> step(feedback(K*D*G1,1)) The zeros are at -0.5,-8,-55.7467. The effects of third and fourth closed-loop poles are nearly cancelled by zeros.

Fig. M7.6

Fig. M7.7

Searching the 0.456 damping ratio line (Fig. M7.6), we find the dominant second-order poles to be , with an associated gain of 4.3928. Simulation in Fig. M7.7 gives settling time 2.67 sec, peak time 0.184 sec, and zero steady state error. 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. The complete PID controller further improved the steady-state error without appreciably changing the transient response designed with the PD controller. Example 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)). ................(i) 25% overshoot, (ii) settling time: 2 sec, and (iii) Kv = 20.

The 25% overshoot corresponds to a damping ratio of 0.404. Consider the following MATLAB session. s = tf('s'); G1 = 6.63/((s)*(s+1.71)*(s+100)); zeta = 0.404; rlocus(G1); sgrid(zeta,0); Properly redefine the axes of the root locus using Right click --> Properties --> Limits. [K,p] = rlocfind(G1); Select a point in the graphics window selected_point = -0.8057 + 1.8944i >> K K= 64.6665 >> p p= 1.0e+002 * -1.0004 -0.0083 + 0.0190i -0.0083 - 0.0190i

Fig. M.7.8

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

Fig. M7.9 Figure M7.9 shows that the design requirement of 25% overshoot is met. The settling time is 4.07 sec. and

Comparing these values with the design requirements, we want to improve the settling time by a factor of two and we want approximately eight-fold improvement in Kv . We first attempt lead compensator design to improve transient response. To obtain a settling time ts of 2 secs and 25% overshoot, 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:

Sd = -2+4.5285i; angle_at_dominant_pole=(180/pi)*(angle(polyval([1,2],Sd))-(angle(polyval([1,0],Sd))... +angle(polyval([1,1.71],Sd))+angle(polyval([1,100],Sd)))) angle_at_dominant_pole = -120.1384 Compensator pole must contribute 120.1384 -180 = -59.8616o for the design point to be on the compensated system's root locus. From the geometry shown in Fig. M7.10,

This gives pc = 4.6291.

Thus the lead compensator is

Root locus plot and its analysis for the lead-compensated system is given by the following MATLAB session. >> D1 = (s+2)/(s+4.6291); >> rlocus(D1*G1); >> sgrid(zeta,0) Properly redefine the axes of the root locus using Right click --> Properties --> Limits . >> [K,p] = rlocfind(D1*G1) Select a point in the graphics window selected_point = -1.9621 + 4.4410i

K= 372.8743

p= 1.0e+002 * -1.0026 -0.0200 + 0.0444i -0.0200 - 0.0444i -0.0208 >> step(feedback(K*D1*G1,1));

Fig. M7.11

Fig. M7.12

The transient response specifications are satisfied, with gain = 372.8743 (Figs. M7.11-M7.12). The lead-compensated system Kv becomes

Since we want Kv=20, the amount of improvement required over the lead-compensated system is 20/6.2462=3.2. Choose pc =0.01 and calculate zc =0.0032, which is 3.2 times larger than pc, 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.032)/(s+0.01); rlocus(D1*D2*G1); sgrid(zeta,0);

Properly redefine the axes of the root locus using Right click --> Properties --> Limits. >> [K,p] = rlocfind(D1*D2*G1) Select a point in the graphics window selected_point = -1.9621 + 4.4410i

K= 373.5528

p= 1.0e+002 * -1.0026 -0.0199 + 0.0444i -0.0199 - 0.0444i -0.0208 -0.0003

>> step(feedback(K*D1*D2*G1,1))

Fig. M7.13

Fig. M7.14 The design point has not moved with the addition of the lag compensator, and the gain at this point is 373.5528 (Fig. M7.13). We also see from Fig. M7.14 that peak overshoot is higher than specified. The system may be redesigned to reduce the peak overshoot. Example M7.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)). A design carried on the nominal plant with K =1, gives the following cascade compensator.

For qualitative robustness analysis, we have obtained step response for the four conditions: and . The results obtained using the following MATLAB code, are summarized in Fig. M7.15, and Table M7.1. s = tf('s'); G1 = 1/((s+1)^2); G2 = 1/((0.5*s+1)^2); G3 = 2/((s+1)^2); G4 = 2/((0.5*s+1)^2); D = (1+0.16*s)*(72.54+12/s); M1 = feedback(G1*D,1); M2 = feedback(G2*D,1); M3 = feedback(G3*D,1);

M4 = feedback(G4*D,1); step(M1); hold; step(M2); step(M3); step(M4); The scale has been modified using Right click --> Properties -->Limits.

Fig. M7.15

Table M7.1 Plant conditions Percent M1 (nominal system) 11.9 M2 2.4 M3 8.69 M4 1.63

overshoot Settling time (sec)

0.551

0.155

0.40

0.0351

As is seen from this robustness analysis, the deviations from the nominal design performance do not take the system outside the acceptable range; the design is therefore robust. Example M7.4 A control system has the structure shown in Fig M7.16. The parameter variations are third pole at s= and with the nominal conditions Km = 2 and p =4. Furthermore, a 50 has been omitted from the model (refer Dorf and Bishop(1998)).

Fig. M7.16

A design carried out on the nominal system gives the following result.

We examine the performance of the system with nominal parameters Km =2, p =4; and worstcase parameters Km =1.5, p =3. We also examine the nominal system with the third-pole added, so that the control plant is

The robustness analysis results, obtained using the following MATLAB code, are summarized in Fig. M7.17 and Table M7.2. s = tf('s'); G1 = 2/(s*(s+4)); G2 = 1.5/(s*(s+3));

G3 = 2*50/(s*(s+4)*(s+50)); D = (1+0.06*s)*(294.69+4453/s); M1 = feedback(G1*D,1); M2 = feedback(G2*D,1); M3 = feedback(G3*D,1); step(M1); hold; step(M2); step(M3); The scale has been modified using Right click --> Properties -->Limits.

Fig M7.17

Table M7.2

Plant conditions Percent overshoot Settling time (sec)

M1 (nominal system) 31.9 0.266

M2 39.2 0.394

M3 81.6 0.847

The system does not offer robust performance to parameter variations. The response of the system with added pole shows that again the system fails the requirement of robust performance. Since the results are not robust, it is possible to iterate on the design until an acceptable performance is achieved. The interactive capability of MATLAB allows us to check the robustness by simulation.

Вам также может понравиться