Compensator Design to Improve Transient Performance Using Root Locus

Save this PDF as:

Size: px
Start display at page:

Download "Compensator Design to Improve Transient Performance Using Root Locus"

Transcription

1 1 Compensator Design to Improve Transient Performance Using Root Locus Prof. Guy Beale Electrical and Computer Engineering Department George Mason University Fairfax, Virginia Correspondence concerning this paper should be sent to Prof. Guy Beale, MSN 1G5, Electrical and Computer Engineering Department, George Mason University, 44 University Drive, Fairfax, VA , USA. Fax:

2 Contents I INTRODUCTION 4 II DESIGN PROCEDURE 4 A. CompensatorStructure... 4 B. OutlineoftheProcedure... 6 C. System Type N... 7 D. SelectingaDominantClosed-LoopPoleLocation... 8 E. DeterminingtheCompensator sparameters Plant Phase Shift at s Compensator Phase Shift at s PlacingtheCompensatorZero PlacingtheCompensatorPole DeterminingtheCompensatorGain CompensatorPhaseShiftRevisited SimultaneousPlacementofCompensatorPoleandZero Multi-StageCompensation... 3 III Design Example 5 A. PhaseLeadExample Given System and Specifications SelectionoftheDominantClosed-LoopPole DesigningtheCompensator... 7 B. PhaseLagExample Given System and Specifications SelectionoftheDominantClosed-LoopPole DesigningtheCompensator... 3 References 35 List of Figures 1 Allowable region for s 1 in order to satisfy specifications on overshoot, settling time, and frequencyofoscillation Calculating the phase shift of G(s) at the chosen point s = s

3 3 3 Onepossiblesolutionforlocatingthecompensatorzeroandpole Comparison of closed-loop step responses for 5 compensator designs with s 1 = 4+j Rootlocusplotforfourcompensatordesigns... 6 Comparisonoflagandleadcompensationforaparticularsystem Selecting the compensator zero and pole to maximize α = z c /p c Step response of the uncompensated system for the phase lead design example Root locus of the uncompensated systemandthedesiredclosed-looppoles 1 =.5+j Leadcompensatedrootlocusandstepresponseforthedesignexample Comparisonofrootlocusplotswithtwolagcompensatordesigns Comparisonofclosed-loopstepresponsesfortwolagcompensators... 34

4 4 I. INTRODUCTION The purpose of compensator design using root locus methods generally is to establish a specified point in the s-plane, s = s 1, as a closed-loop pole. The assumption is that time-domain transient specifications, such as settling time and overshoot, will be satisfied if s 1 is a dominant closed-loop pole. In the simplest case, s 1 is already on the root locus of the uncompensated system. The compensator is then just a gain K c that is chosen to satisfy the magnitude criterion at the point s 1. More often, the point s 1 is not on the uncompensated root locus, so the compensator must add enough phase shift at the point s 1 to satisfy the phase angle criterion so that the compensated root locus does pass through s 1. This is done by choice of the compensator s poles and zeros. The compensator gain is then chosen to satisfy the magnitude criterion at the point s 1. In many cases, the speed of response and/or the damping of the uncompensated system must be increased in order to satisfy the specifications. This requires moving the dominant branches of the root locus to the left. A phase lead compensator (providing positive phase shift at s 1 ) is used for this purpose. If the branches need to be moved to the right, a phase lag compensator (providing negative phase shift at s 1 ) is used. The design techniques are identical for the two types of compensator; the roles of the compensator s poles and zeros are just reversed. Because of this similarity in the design methods, phase lead compensation will be discussed in detail here. An example of each type of compensation will be given after the general design procedure is described. Conceptually, the design procedure presented here is graphical in nature. The process of locating the compensator s poles and zeros to satisfy the phase requirements can be visualized from the trigonometric relationships that must be satisfied at the desired dominant closed-loop pole. The computations can be easily done by calculator. If data arrays representing the numerator and denominator polynomials of the open-loop system are available, then the procedure can be done using a software package such as MATLAB, and in many cases it can be automated. The examples and plots presented here are all done in MATLAB, and the various measurements that are presented in the examples are obtained from the arrays storing the appropriate variables. The primary references for the procedures described in this paper are [1] [3]. Other references that contain similar material are [4] [11]. II. DESIGN PROCEDURE A. Compensator Structure The basic phase lead or phase lag compensator consists of a gain, one real pole, and one real zero. Based on the usual electronic implementation of the compensator [3], the circuit for a lead or lag compensator is the series combination of two inverting operational amplifiers. The first amplifier has an input impedance that is the parallel combination of resistor R 1 and capacitor C 1 and a feedback impedance that is the

5 5 parallel combination of resistor R and capacitor C. The second amplifier has input and feedback resistors R 3 and R 4, respectively. Assuming that the op amps are ideal, the transfer function for this circuit is µ s G c (s) = V out(s) V in (s) = K K x +1 c (s z c ) z = µ c = K x (τs+1) (1) (s p c ) s (ατs +1) +1 p c = R 4R (sr 1C 1 +1) R 3 R 1 (sr C +1) = R 4R R1C 1 (s +1/R 1C 1 ) R 3 R 1 R C (s +1/R C ) = R 4C 1 (s +1/R 1C 1 ) R 3 C (s +1/R C ) The zero and pole of the compensator are located at s = z c at s = p c, respectively. Therefore, z c and p c are negative if they are located in the left-half of the s-plane and positive if they are in the right-half plane. The following relationships 1 can be obtained by inspecting Eq. (1). K x = R 4R, τ = R 1 C 1, ατ = R C, α = z c = R C () R 3 R 1 p c R 1 C 1 z c = 1/R 1 C 1, p c = 1/R C, K c = K x α = R 4C 1 R 3 C The zero z c is to the right of the pole p c for a phase lead compensator, and it is to the left of the pole for aphaselagcompensator. Thisistruewhetherthepoleandzeroareintheleft-halfplane(theusualcase) or in the right-half plane. Assuming that z c < and p c < (both in the left-half plane), then α<1 for a lead compensator, and α>1 for a lag compensator. At any point s = s 1, the compensator provides a magnitude q G c (s 1 ) = K c s 1 z c = K c [Re (s 1 ) z c ] +Im (s 1 ) q (3) s 1 p c [Re (s 1 ) p c ] +Im (s 1 ) and a phase angle G c (s 1 )= K c + (s 1 z c ) (s 1 p c )= K c +tan 1 Im (s 1 ) tan 1 Im (s 1 ) Re (s 1 ) z c Re (s 1 ) p c (4) Only positive values of compensator gain will be discussed in this paper, so with K c >, the magnitude and phase of the gain are K c = K c and K c =. In applications where K c <, thewehave K c = K c and K c = In my descriptions of the design of compensators using Bode plots (Phase Lag Compensator Design Using Bode Plots, Phase Lead Compensator Design Using Bode Plots), a slightly different definition for the compensator transfer function is used, although it refers to the same electronic circuit shown in [3].

6 6 B. Outline of the Procedure The following steps outline the procedure that will be used to design either a lead or a lag compensator using root locus methods in order to satisfy transient performance specifications, such as settling time and percent overshoot. Compensator design to satisfy steady-state error requirements is discussed in a separate paper, Compensator Design to Improve Steady-State Error Using Root Locus. 1. Determine if the System Type N needs to be increased in order to satisfy the steady-state error specification, and if necessary, augment the plant with the required number of poles at s =.This should be done at this point in the design, even though numerically satisfying the steady-state error specification is done later. If the System Type is not taken care of now, the remainder of the design procedure may be ineffective when the System Type is changed at the end of the design.. Choose a point in the s-plane to be the location for a dominant closed-loop pole. The selection of this point is based on the transient performance specifications and should produce a closed-loop system that will satisfy those specifications. 3. Design the compensator: (a) Compute the phase shift of the plant (including any additional poles at s =needed to satisfy the steady-state error specification) at the chosen point s = s 1. If the phase shift is an odd integer multiple of 18 (18 mod 36 ), then the selected point is on the uncompensated system s root locus for positive gain. If the phase shift is an even integer multiple of 18 ( mod 36 ), then the selected point is on the uncompensated system s root locus for negative gain. In either case, the only compensation needed for the transient performance specifications is the proper gain, and the procedure can jump to step 3(e). (b) Assuming that the selected point s 1 is not already on the root locus (for either positive or negative gain), compute the amount of phase shift that the compensator must provide at s = s 1 in order to make that point lie on the root locus. The compensator s phase shift (usually) will be the shortest distance from the plant s phase shift at s 1 to an odd integer multiple of 18 for positive gain (the most usual case) or to an even integer multiple of 18 for negative gain. It should be noted that having the compensator provide this amount of phase shift only guarantees that the point s 1 will lie on the compensated root locus; it does not guarantee that the closed-loop system will be stable when s 1 is a closed-loop pole. Additional factors must be taken into account for that. (c) Select the location for either the compensator zero z c or pole p c. If the compensator phase shift at s 1 computed in the previous step is positive, phase lead compensation is required. This places the compensator zero to the right of the pole. If the compensator s phase shift is negative, then phase lag compensation is needed, and the zero is to the left of the pole. One of these factors (zero or pole) can be placed with some freedom; once it is placed, the location of the other factor

7 7 is fixed. (d) Compute the horizontal distance from the point s = s 1 to the location of the compensator factor not already placed (pole or zero), and place that factor at that location. This pole/zero pair in series with the plant makes the root locus pass through the point s 1. (e) Compute the compensator gain K c. The value of the gain is chosen to satisfy the magnitude criterion at s 1 ( G c (s 1 ) G p (s 1 ) =1)in order for s 1 to be a closed-loop pole. 4. If necessary, choose appropriate resistor and capacitor values to implement the compensator design. To illustrate the design procedure, the following system model and specifications will be used: G p (s) = 8 s +4 steady-state error specification for a unit ramp input is e ss_specified =.1; step response settling time specification is T s specified =1second; step response overshoot specification PO specified 1%. (5) C. System Type N The first step in the design of the compensator will be to determine if the plant G p (s) has the correct System Type to satisfy the steady-state error specification. Defining the number of open-loop poles of a system that are located at s =to be the System Type N, and restricting the reference input signal to having Laplace transforms of the form R(s) =A/s q, the steady-state error and error constant are (assuming that the closed-loop system is bounded-input, bounded-output stable) N+1 q As e ss = lim s s N (6) + K x where K x = lim s N G(s) (7) s For N =, the steady-state error for a step input (q =1)is e ss = A/ (1 + K x ).ForN =and q>1, the steady-state error is infinitely large. For N>, the steady-state error is e ss = A/K x for the input type that has q = N +1.Ifq<N+1, the steady-state error is, and if q>n+1, the steady-state error is infinite. Therefore, for a system to have a non-zero, finite steady-state error for a specified reference input, the System Type must satisfy N = N req = q 1. This is the total number of open-loop poles at the origin needed for the compensated system to satisfy the steady-state error specification. If the System Type of the plant G p (s) is N sys, then the compensator must have (N req N sys ) poles at the origin. These poles would be included with the plant model during the design of the rest of the compensator, and then they would be implemented as part of the compensator after the design is complete. The system that will be evaluated during the rest of the design process will be G(s) = 1 s (N req N sys ) G p(s) (8)

8 8 Example 1: The plant transfer function in (5) has no poles at the origin, so it has System Type N sys =. The steady-state error specification is for a unit ramp input which has a Laplace Transform R(s) =1/s,so for this input q =. Therefore, in order for the steady-state error specification to be satisfied, the total number of poles at the origin must be N req = q 1= 1=1. Thus, the compensator must provide N req N sys =1 =1pole at the origin. The system G(s) corresponding to Eq. (8) for this example is G(s) =8/ [s (s +4)]. Note that satisfying the numerical value of the steady-state error is not done at this point in the design. That will be done as a separate task. D. Selecting a Dominant Closed-Loop Pole Location The real engineering design takes place in this step. This is the mapping of the performance specifications that must be satisfied into the design parameter that influences the rest of the steps in the design. For other than very simple systems, sound engineering judgement is needed in order for this mapping to yield a compensator design that actually allows the specifications to be satisfied. In many cases, the dominant closed-loop poles are chosen to be a complex conjugate pair, so the design point s = s 1 is a complex number with negative real part and positive imaginary part. The starting point in choosing s 1 generally is to make use of the relationships between time-domain characteristics and closed-loop pole locations that exist for the standard second-order system, shown in (9). ω n G(s) = s (s +ζω n ), T CL(s) = s +ζω n s + ω (9) n where ζ is the dimensionless damping ratio, and ω n is the undamped natural frequency (rad/ sec). For <ζ<1, the closed-loop system is underdamped, the closed-loop poles are complex conjugates, and the step response exhibits overshoot and damped sinusoidal transient behavior. The closed-loop poles are at ω n p 1,p = ζω n ± jω n q1 ζ (1) In this case, specifications on the amount of overshoot and the settlingtimeforthestepresponseare natural specifications. These types of specifications will be used in the design procedure presented in this paper. A steady-state error specification on the ramp response is also appropriate; that will be discussed in a separate paper. Percent overshoot (PO) in the step response of the standard second-order system is only a function of the damping ratio. The value of overshoot (%) and the value of ζ are related by PO = he πζ/ 1 ζ i ln PO 1 1%, ζ = q π +ln (11) PO 1

9 9 Points in the s-plane that correspond to a constant value of ζ lie on a radial line from the origin making an angle θ with respect to the negative real axis, with θ =cos 1 (ζ). Therefore, a specification of percent overshoot establishes a fixed relationship between the imaginary part of the dominant closed-loop pole and the real part of the pole. This relationship is given by tan(θ), which is the slope of the radial line corresponding to the value of ζ, sothatim [s 1 ]= Re [s 1 ] tan cos 1 (ζ). Defining settling time T s asthetimerequiredforthestepresponsetogetwithinandstaywithinafixed percentage of the final value, the settling time for the standard second-order system is a function of the product of damping ratio and undamped natural frequency. In this paper, the band about the final value used to define T s is ±%, and the settling time is T s = 4 ζω n (1) Comparing (1) and (1) shows that settling time is related to the real part of the closed-loop poles, so asettlingtimespecification corresponds to the dominant closed-loop poles lying on a vertical line in the s-plane located at Re [s 1 ]= 4 (13) T s If the settling time specification is an upper bound, then the closed-loop poles must lie on or to the left of the vertical line given in (13). p The damped natural frequency is defined to be ω d = ω n 1 ζ, which is seen in (1) to be the imaginary part of the closed-loop poles. This parameter is also the frequency of oscillation in the transient part of the step response. Therefore, a specification on the frequency of oscillation imposes a restriction on the imaginary part of the dominant closed-loop poles, which corresponds to a horizontal line in the s-plane. If two or more specifications are imposed on the system, then there are multiple constraints on the location of the dominant closed-loop pole s 1. An acceptable location for that pole must satisfy each of the constraints. Therefore, s 1 must lie in the intersection of the regions defined by the various specifications. Example : The following specifications are to be imposed on a system s closed-loop step response: (1) 5% PO 5%, ().5 s T s s, (3) ω d 1.6 r/s. Assuming that the equations for the standard second-order system will hold for the actual system, then the following constraints are imposed on the location of s 1. From (11), the lower bound of 5% overshoot corresponds to a damping ratio ζ =.691 andanangle θ =46.4. The point s = s 1 must lie on or above this radial line. The upper bound of 5% overshoot corresponds to a damping ratio ζ =.437 and an angle θ =66.. The point s = s 1 must lie on or below this radial line. From (13), the lower bound of T s =.5 s corresponds to real part of Re [s 1 ]= 8. The point s 1 must lie on or to the right of this vertical line. The upper bound of T s =s corresponds to real

10 Imag Axis 1 Locating Closed-Loop Poles in the s-plane to Satisfy Specifications 15 PO = 5% max PO = 5% zeta min min =.437 zeta max =.691 Theta = 66. deg max Theta = 46.4 deg min w d = 1.6 r/s 1 5 T s-min =.5 s zeta*w n = 8 T s-max = s zeta*w n = Real Axis Fig. 1. Allowable region for s 1 in order to satisfy specifications on overshoot, settling time, and frequency of oscillation. part of Re [s 1 ]=. Thepoints 1 must lie on or to the left of this line. The upper bound of ω d =1.6 r/s corresponds to a horizontal line at j1.6. The closed-loop pole must lie on or below this line. The dominant closed-loop pole s 1 must lie in the intersection of these 5 constraint curves. The dotted region in Figure 1 is the set of acceptable locations for s 1 for this example. Example 3: In Example 1 the original G p (s) augmented with one pole at the origin to satisfy the steady-state error requirement is G(s) =8/[s(s +4)]. The transient specifications are T s specified =1second and PO 1%. The damping ratio associated with 1% overshoot is ζ =.591. The corresponding angle and slope of the radial line from the origin through s 1 are θ =53.76 and , respectively. From (13), the real part of s 1 is s = 4. Combining these two requirements places the dominant closed-loop pole at

11 11 s 1 = 4+j The relationships between dominant pole locations and step response characteristics presented above are only for the standard second-order system of (9). These relationships may provide good starting points for the selection of s 1 to satisfy specifications, but they can only be used as general guidelines for more complex system models. Even if the given system G p (s) is modeled by (9), any compensation in series with G p (s), other than a pure gain, will result in a more complex model. The overshoot equation (11) generally is not a good prediction of what the actual overshoot will be in a higher-order system or in a system with zeros. The actual overshoot may be less than predicted by (11), but it will more likely be larger. In choosing a value for s 1 to satisfy a percent overshoot specification, the recommended approach is to be very conservative that is, use a significantly smaller value of overshoot than the specified value when computing the effective damping ratio from (11). The prediction of the real part of s 1 computed from (13) to satisfy a settling time specification is generally fairly accurate. This is due to the fact that the decay of the transient response is controlled by the real part of the dominant closed-loop poles. This is how the expression in (13) was derived and accounts for its accuracy in predicting the settling time of higher-order systems. In many actual design problems with specifications on overshoot, settling time, frequency of oscillation, etc., the proper choice of location for the dominant closed-loop pole (or complex conjugate pair) will be achieved only through iteration. Engineering design is an iterative process, and the selection of s 1 is a major step in the design of the compensator that will allow the specifications to be satisfied. E. Determining the Compensator s Parameters Once the point s = s 1 is chosen to be a dominant closed-loop pole, the design of the compensator is an exercise in trigonometry. The pole(s) and zero(s) of the compensator are chosen to satisfy the phase angle criterion at s 1 so that the total phase shift of the series combination of the plant and compensator at s 1 is an odd integer multiple of 18 if K>or an even integer multiple of 18 if K<. This makes the root locus pass through the point s 1. Once the pole(s) and zero(s) are placed, the gain of the compensator is selected to satisfy the magnitude criterion. This makes the point s = s 1 be a closed-loop pole. However, as previously mentioned, making s = s 1 be a closed-loop pole does not guarantee that the closed-loop system is stable. There may still be closed-loop poles in the right-half plane. Thus, there is more to choosing the locations of the compensator s pole(s) and zero(s) than just satisfying the phase angle criterion.

12 1 E.1 Plant Phase Shift at s 1 The starting point in the compensator design is to determine the phase shift of the augmented plant of Eq. (8) at the point s 1. The phase shift of G(s) at s 1 is G (s 1 ) = K + N (s 1 ) D (s 1 ) (14) = mx nx K + (s 1 z i ) (s 1 p i ) = K + i=1 mx i=1 i=1 Im tan 1 (s1 ) Im (z i ) Re (s 1 ) Re (z i ) nx i=1 Im tan 1 (s1 ) Im (p i ) Re (s 1 ) Re (p i ) where the z i and p i are the open-loop zeros and poles, respectively. We will assume that K >, so K =. Care must be used when evaluating the tan 1 function when using the normal atan function in MATLAB or on calculators. If the denominator of the tan 1 function is negative, the atan function will return the incorrect angle. To obtain the correct angle in this case, 18 (π rad) must be added to the angle returned by the atan function. The function atan returns the correct value since it takes two input arguments; its syntax is θ = atan (Im, Re). Example 4: From Example 1, the augmented plant model is G(s) =8/ [s (s +4)], so there are no zeros z i and the open-loop poles are p 1 =and p = 4. We will assume that the desired dominant closed-loop pole is at s = s 1 = 4 +j5.4575, based on Example 3. The phase angle of G(s) at s 1 is: G (s 1 )= 8 s 1 (s 1 +4)= tan 1 [( ) / ( 4 )] tan 1 [( ) / ( 4+4)]. G (s 1 )= tan 1 [5.4575/ ( 4)] tan 1 (5.4575/) = ( ) 9 = 16.4 = Both forms for the phase shift, G (s 1 )= 16.4 or G (s 1 ) = , are acceptable ways to represent the angle. Figure shows the relationships between the open-loop poles and the point s 1. The angles that are computed are the angles of the vectors drawn from the poles to the point s 1 measured counter-clockwise from the positive real axis. Note the 18 added to the phase shift returned by the atan function in the above example for the pole p 1. This will be the case when the point s 1 is to the left of the pole or zero under consideration. E. Compensator Phase Shift at s 1 If the point s 1 is on the root locus of the uncompensated system G(s) (which is G p (s) augmented with any poles at the origin that were needed to produce the correct System Type), then G (s 1 ) is an odd integer multiple of 18 (for K>). Inthiscase G c (s 1 )=, and the only (additional) compensation that is needed in order to make s = s 1 a closed-loop pole is a gain K c. That would be chosen to satisfy the magnitude criterion K c G (s 1 ) =1.

13 Imag Axis 13 6 G(s) = 8/[s(s+4)], s 1 = -4 + j s 1 4 p p Real Axis Fig.. Calculating the phase shift of G(s) at the chosen point s = s 1. Most often, s 1 will not be on the original root locus, so the compensator must also provide a phase shift at s 1 so that the total phase shift of the plant compensator combination is an odd integer multiple of 18 at that point. This is done by choice of the compensator s pole and zero. Satisfying the phase angle criterion must be done first. After that, the value of K c is computed to satisfy the magnitude criterion. Given the value G (s 1 ) from the previous step, the required compensator angle G c (s 1 ) can be easily computed. Generally, the compensator phase shift at s 1 is chosen to be the angle with the smallest absolute value such that G (s 1 )+ G c (s 1 ) is an odd integer multiple of 18.Thus,if G(s 1 ) = 15 or G (s 1 )= 1,then G c (s 1 )=+3 will place s 1 on the root locus, and the compensator is phase lead. Likewise if G (s 1 )= 15 or G (s 1 ) = 1,then G c (s 1 )= 3 will place s 1 on the root locus, and the compensator is phase lag. However, in some cases it might be necessary (or desirable) to

14 14 use a particular type of compensator, such as phase lead, in order to satisfy other objectives. In a situation like this, if G (s 1 )= 6 for example, then the compensator phase shift at s 1 wouldbechosentobe 18 ( 6 ) = 4 (phase lead) rather than 18 ( 6 )= 1 (phase lag). A more detailed example illustrating this situation is given in Section II-E.6. The necessary compensator phase shift to make s 1 lie on the root locus is given by G c (s 1 ) = 18 (l +1) G (s 1 ) (15) = K c + N c (s 1 ) D c (s 1 ) = Xm c Xn c K c + (s 1 z ci ) (s 1 p ci ) i=1 i=1 Assuming that K c >, then G c (s 1 )= N c (s 1 ) D c (s 1 ). Example 5: From Example 4, the phase shift of G(s) at s 1 = 4+j is G (s 1 )= 16.4 = The phase angle of the compensator needed to place s = s 1 on the root locus (using the smallest absolute value for the compensator phase angle) is G c (s 1 )= 18 ( 16.4 ) = =36.4. Since this angle is positive, the compensator is phase lead. The pole and zero of the compensator will be placed on the real axis such that (s 1 z c ) (s 1 p c )=36.4. Methods of choosing appropriate locations are presented in the next section. One possible solution is to place the compensator zero at s = 5, which provides 79.6 of phase shift at s 1, and to place the compensator pole at s = 9.78, whichprovides at s 1.Thedifference between those angles is the required value of Figure 3 illustrates this solution. E.3 Placing the Compensator Zero There is some flexibility in choosing the location of the compensator zero, but not complete freedom. Assuming that a single stage of compensation is desired, the left-most location of the zero is governed by the compensator s phase shift requirement at s 1. Because G c (s 1 )= (s 1 z c ) (s 1 p c ),the compensator zero must provide more phase shift at s 1 than the total compensator. Therefore, the left-most allowed position of the compensator zero is constrained by G c (s 1 ). The right-most location of the zero is generally constrained by transient performance specifications, and ultimately by the requirement for closed-loop stability. Moving the compensator zero to the right also moves a closed-loop pole to the right. For some choices for the location of the zero, there may be a closed-loop pole closer to the jω axis than the selected point s 1. When this happens, s 1 may no longer be the dominant pole in terms of settling time. If the compensator zero is in the right-half plane, then the closed-loop system may be unstable.

15 Imag Axis 15 6 Providing 36.4 degrees at s 1 = -4 + j s 1 4 p c z c Real Axis Fig. 3. One possible solution for locating the compensator zero and pole. Unfortunately, there is not a rule for placing the compensator zero. The amount of overshoot can vary widely depending on its location. For systems with one open-loop pole at the origin and with one or more additional poles on the negative real axis, a rule of thumb is to place the compensator zero at or to the left of the second real-axis open-loop pole. This rule of thumb is intended to ensure that s = s 1 is the dominant closed-loop pole, but it does not guarantee that overshoot specifications will be satisfied. Example 6: For the system G(s) defined in the previous examples and the point s 1 = 4+j5.4575, therequired phase shift of the compensator was found to be G c (s 1 )=36.4. Thus, the compensator zero must providemorethan36.4 at s 1. In order to use a single stage of compensation, the left-most point for the zero is s =Re[s 1 ] [Im [s 1 ] / tan (36.4 )] = The right-most point for the compensator zero

16 16 is just to the left of the origin. The zero cannot be placed at s =since that would cancel the open-loop pole there, and internal stability would be lost. Placing the compensator zero in the right-half plane would also result in an unstable closed-loop system. Some possibilities for the location of the zero are z c = 9 [ (s 1 z c )=47.51 ], z c = 7 [ (s 1 z c )=61. ], z c = 5 [ (s 1 z c )=79.6 ], z c = 3 [ (s 1 z c ) = 1.4 ], z c = 1 [ (s 1 z c ) = ].Theeffects of these different choices for z c will be shown in the following examples. The first three locations for the zero in the above example (z c = 9, z c = 7, z c = 5) satisfy the rule of thumb mentioned earlier. For these choices, the closed-loop poles at s = s 1 and its complex conjugate will be closer to the jω axis than the third pole. Therefore, the settling time of the step response will be governed by the choice of s 1, as desired. The remaining two choices for the compensator zero (z c = 3, z c = 1) do not satisfy the rule of thumb. The poles at s 1 will no longer be closest to the jω axis, and so will not be controlling the settling time. This does not mean that the settling time specification will be violated if the rule of thumb is not satisfied, but as the zero is moved farther and farther to the right, at some point, the settling time specification will be violated. E.4 Placing the Compensator Pole Once the location for the compensator zero has been selected, there is no more freedom in the design; the compensator pole and gain are now fixed. The location of the pole is constrained by the phase angle requirement on the compensator at the point s 1, and once the pole location is determined, the gain is constrained by the magnitude criterion at s 1. Since the total phase shift of the compensator at s = s 1 is the angle produced by the zero minus the angle produced by the pole, the phase shift of the compensator pole at s 1 is (s 1 p c )= (s 1 z c ) G c (s 1 ) (16) The value of this angle can be computed once the location of the zero is chosen. There is only one location for the compensator pole that will produce the angle (s 1 p c ) at s = s 1. The distance d pc from the real-axis projection of s 1 to the compensator pole can be computed easily from Im [s 1 ] d pc = tan [ (s 1 p c )] (17) The compensator pole is located to the left of s 1 if d pc > and to the right of s 1 if d pc <. The location of the compensator pole at s = p c is given by p c =Re[s 1 ] d pc (18)

17 17 Example 7: From Example 5, the compensator must provide 36.4 of phase shift at s 1.InExample6,five possible choices for the compensator zero were presented, namely, z c = { 9, 7, 5, 3, 1}. For each of these choices, the compensator pole can be located by using Eqs. (16) (18). The angles, distances, and locations of the compensator pole are shown in the following table for the various choices of compensator zero. z c (s 1 p c ) d pc p c The table shows that as the compensator zero moves to the right, the required phase shift of the pole increases, and the pole also moves to the right. E.5 Determining the Compensator Gain Now that the pole and zero of the compensator have been selected, the root locus plot will pass through the point s = s 1. Therefore, s 1 is a potential closed-loop pole. In order for that point to actually be a closed-loop pole, the magnitude criterion must be satisfied at s 1 by the series combination of plant and compensator. The compensator gain is used for this purpose. The magnitude criterion states that K c s 1 z c G(s 1 ) =1 (19) s 1 p c if s = s 1 is a closed-loop pole, with G(s) defined in (8). The compensator gain is the only parameter that is undetermined at this point. Therefore, to make s = s 1 be a closed-loop pole, the compensator gain must be s 1 p c K c = s 1 z c G (s 1 ) Note that () only provides the magnitude (absolute value) of the compensator gain. requires that the gain be negative, then K c = K c. () If the system Example 8: For each of the combinations of compensator zero and pole from Examples 6 and 7, there is a unique value for the gain K c. The value of gain that places one of the closed-loop poles at s 1 is computed from (). The magnitude of the augmented plant at s 1 is G (s 1 ) =8/ ( s 1 s 1 +4 ) =.166. Using the

18 18 values for z c and p c from the table in Example 7, the corresponding gain values are given in the following table. z c s 1 p c s 1 z c K c For each of these combinations, the compensator transfer function, including the pole at s =needed for the steady-state error specification, is G c (s) =K c (s z c ) / [s (s p c )]. With the values used here, the closed-loop system is stable, and two of the closed-loop poles are at the specified location of s 1 = 4 + j and its complex conjugate. The location of the third closed-loop pole varies with the choice of compensator parameters. For the values used in these examples, the third pole is at s = { 7.4, 11.7, 5.78,.64,.713}. Note that for the particular structure of G c (s)g p (s) in these examples, the absolute value of the third closed-loop pole is equal to the distance between the real-axis projection of s 1 and the compensator s open-loop pole. The closed-loop step responses for these five compensator designs are shown in Fig. 4. The settling times for the first four compensator designs are all approximately the same, slightly less than 1 second. The settling time for the fifth compensator design is significantly longer and does not satisfy the specifications. Of the compensator designs that do satisfy the settling time requirement, only the fourth design (z c = 3) also satisfies the overshoot specification. The dashed lines in the figure show the ±% interval for the settling time specification and the 1% overshoot specification. Figure 5 shows the root locus plots for four of the compensator designs. The triangles shown in the plots represent the closed-loop poles. The point s 1 is a closed-loop pole in each case. It is easily seen in the figure that the third closed-loop pole moves to the right as z c does, and when z c = 1 the third pole is far to the right of s 1. This causes the much longer settling time evident in Fig. 4. These examples have illustrated the procedure for mapping a set of transient response specifications into a desired location s = s 1 for the dominant closed-loop pole and for designing a compensator to make that desired location actually be a closed-loop pole. The examples have shown that not every compensator design that places a closed-loop pole at s 1 will satisfy all of the specifications. Closed-loop stability is not even guaranteed if the compensated system is third-order or higher. Therefore, the design of the compensator will generally be an iterative process. Although there are general guidelines that can be followed, a design needs to be validated through simulation to determine whether or not it is an acceptable design.

19 Amplitude Closed-Loop Step Responses Curve 1: z = -9 c Curve : z = -7 c Curve 3: z = -5 c Curve 4: z = -3 c Curve 5: z = -1 c Time (s) Fig. 4. Comparison of closed-loop step responses for 5 compensator designs with s 1 = 4+j E.6 Compensator Phase Shift Revisited It was mentioned in Section II-E. that the compensator phase shift at s 1 is generally taken to be the smallest absolute value that will yield an odd integer multiple of 18 for the plant compensator combination. It was also mentioned that there are instances when such a choice would be inappropriate. The following example illustrates when closed-loop stability requirements force a change to this general procedure. Example 9: Consider the system G(s) =5(s+)/[s (s+.4)(s+6)] and the desired closed-loop pole s 1 = 1+j.8. The phase shift of G(s) at s 1 is G (s 1 )= A compensator phase G c1 (s 1 )= 16. would place s 1 on the root locus for K c >. This would require a phase lag compensator. On the other hand, a compensator phase G c (s 1 ) = would also place s 1 on the root locus for K c >. This would

20 Imag Axis Imag Axis Imag Axis Imag Axis z c = z c = Real Axis Real Axis z c = z c = Real Axis Real Axis Fig. 5. Root locus plot for four compensator designs.

21 1 require a phase lead compensator. Which one should be used? In answering this question, it should be remembered that open-loop poles tend to repel branches of the root locus, and open-loop zeros tend to attract them. The system G(s) has two open-loop poles at the origin, the boundary of stability. Using a phase lag compensator, with the pole to the right of the zero (closer to the jω axis assuming they are in the left-half plane) would tend to move the branches of the root locus that begin at s =into the right-half plane, resulting in an unstable closed-loop system. A lead compensator, on the other hand, would tend to draw those branches into the left-half plane. Figure 6 illustrates this. The top two plots are the root loci for the system with phase lag and phase lead compensation. The compensator transfer functions are G c lag (s) =.39 (s +5.54) / (s +1) and G c lead (s) =71.9(s +.75) / (s +7.19). It is clearly seen that the lag compensator produces an unstable system for all K>. The lead compensator is able to stabilize the system. It should be noted that s = s 1 is a closed-loop pole in both designs. The bottom two plots are the closed-loop step responses. The instability of the design with the lag compensator is clearly indicated. E.7 Simultaneous Placement of Compensator Pole and Zero As we discussed in the previous sections, there is some freedom in placing the compensator zero and pole, as long as the total phase angle of the compensator has the correct value. That freedom can be utilized to vary the amount of overshoot or the value of the settling time. Unfortunately, there is generally not a clear decision procedure for selecting the location of the pole or zero. There is a procedure that places both the pole and zero at the same time. There is no freedom of choice with this procedure, but it does have the advantage of maximizing the value of α = z c /p c for a lead compensator or minimizing α for a lag compensator. This is advantageous because it minimizes the range of resistor and capacitor values used to implement the compensator. We will define the phase shift of the desired closed-loop pole at s 1 to be the angle of the radial line drawn from the origin to s 1, measured in the counter-clockwise direction from the positive real axis, and denote it by s 1.Withthatdefinition, the phase shifts of the compensator zero and pole at s 1 are (s 1 z c )= s 1 + G c (s 1 ), (s 1 p c )= s 1 G c (s 1 ) Therefore, the distances from the real-axis projection of s 1 to the zero and pole are Im [s 1 ] d zc = tan [ (s 1 z c )], d Im [s 1 ] p c = tan [ (s 1 p c )] and the compensator zero and pole are located at (1) () z c =Re[s 1 ] d zc, p c =Re[s 1 ] d pc (3)

22 Amplitude Amplitude Imag Axis Imag Axis 4 Lag Compensated 1 Lead Compensated s 1 s Real Axis Real Axis 1 Lag Compensated 1.4 Lead Compensated Time (s) Time (s) Fig. 6. Comparison of lag and lead compensation for a particular system.

23 3 Examination of (1) shows that (s 1 z c ) (s 1 p c )= G c (s 1 ) as it must. Since G c (s 1 ) is computed to provide the proper phase shift at s 1 to make the root locus pass through that point, the compensator parameters in (3) provide a valid solution to the design problem. This solution is not necessarily any better than any other solution other than the fact that it optimizes the ratio z c /p c. Example 1: From Example 5, the compensator must provide 36.4 at the point s 1 = 4+j The phase shift of s 1 itself is s 1 = From (1), the angles of the compensator zero and pole are 81.4 and 45, respectively. The horizontal distances from s 1 to the zero and pole are d zc =.8411 and d pc = This places the zero z c at s = and the pole p c at s = Thevalueofα for this pole zero combination is α = z c /p c = Figure 7 shows the geometry of this solution. E.8 Multi-Stage Compensation In the examples and discussion thus far, it has been assumed the compensator had one pole and one zero. In some cases it may be desirable or necessary to use multiple stages of compensation. If the required compensator phase shift G c (s 1 ) is very large, then the left-most allowed location for the compensator zeromaybeclosetothejω axis or even in the right-half plane. Moving the zero to the left of this point means that one zero will not provide enough positive phase shift, so that two or more zeros will be required. Even with moderate values of G c (s 1 ) it may be desirable to use multiple stages of compensation. This would allow the zero and pole to be moved farther to the left, away from the dominant pole location. In this way, the equations that apply to second-order systems might be more applicable to the higher-order system. The easiest way to design a multi-stage compensator is to assume that each stage provides the same amount of phase shift at s 1. Since the phase shift of a product of complex numbers is the sum of the individual phase shifts, using this approach means that the phase shift of each stage of the compensator is the total compensator phase shift divided by the number of stages. The most usual case would probably be two stages; therefore, each stage would provide one-half of the total required phase shift. Once the total phase shift is divided by the number of stages, the design of each stage follows the procedure discussed in the previous sections. The location of the compensator zero is selected to provide a phase shift larger than the phase shift required by an individual stage. The compensator pole is computed to provide the correct phase shift for an individual stage. The total compensator numerator then has the form Q num_stages i 1 (s z ci ), and similarly for the compensator denominator. The gain K c is then computed to satisfy the magnitude criterion. In implementation, the gain can be assigned equally to each stage by letting K c stage = num_ stages K c.

24 Imag Axis 4 8 Alternative Placement of Compensator Pole and Zero 6 s 1 4 p c z c Real Axis Fig. 7. Selecting the compensator zero and pole to maximize α = z c /p c. Example 11: The compensator phase shift computed in the previous examples is G c (s 1 )=36.4. Although this compensator can be designed with a single stage of compensation, it was shown in Example 8 that there was a restricted range of locations for the compensator zero that allowed both the overshoot and settling time specifications to be satisfied. To use a single stage of compensation, the zero must provide more than 36.4 at s 1. In order to move the additional closed-loop poles far to the left of s 1, a two-stage compensator will be designed. This means that each stage of compensation must provide 36.4 /=18.1 at s 1. The phase angle for the zero of each stage will be chosen as (s 1 z c )=19. Therefore, the angle of each pole must be (s 1 p c )=.88. The horizontal distances from s 1 to the compensator zero and pole are and

25 , respectively. Therefore, the zero and pole are z c = and p c = Using two poles and zeros at these locations, the gain is K c = 71.9, so the compensator is 71.9(s ) 45.5 (s ) G c = (s ) = (4) (s ) Using this compensator with the system G(s) =8/ [s (s +4)]produces an overshoot of 11.6%, which is less than three of the single-stage compensators. Thesettlingtimeisapproximatelythesameasthefirst four designs presented in Example 8. With the two-stage compensator, there are now four closed-loop poles, rather than three as before. Two of them are at s 1 and its complex conjugate. The remaining two closed-loop poles are at s = ± j13. Although the overshoot is still a bit higher than specified, it is smaller than the other designs that placed the compensator zero to the left of s 1, and the additional closed-loop poles are much farther to the left of s 1 than in any of the single-stage designs. III. Design Example Both phase lead and phase lag examples will be presented in this section. The lead example will be presented first since that is the compensator type most often used because it increases the system damping. After that, the lag compensator example will be given. It will be seen that the design procedures for the two types of compensators are identical; just the role of the pole and zero are reversed. A. Phase Lead Example A.1 Given System and Specifications The open-loop transfer function for the system to be controlled is.375(s +.8) G p (s) = (5) s(s +.)(s +1)(s +1.5) The system is Type 1, so it will have zero steady-state error for a step input and a non-zero, finite steadystate error for a ramp input. If unity feedback is placed around G p (s), the closed-loop poles are located at s = {.54 ± j.445,.94, }. Therefore, the original system is closed-loop stable with unity feedback and G c (s) =1. However, the damping ratio of the complex conjugate pair of closed-loop poles is ζ =.1, which corresponds to 68% overshoot for the standard second-order system. The settling time is dominated by those complex conjugate poles since they are the closest to the jω axis, and the predicted settling time is 74 seconds. The uncompensated (plant with unity feedback) step response is shown in Fig. 8, and it is clear that the predictions on overshoot and settling time are accurate for this system. The specifications that are imposed on the system are: overshoot in the response to a step input: PO %; settling time for the response to a step input: T s 16 seconds.

26 Amplitude Uncompensated Step Response Time (s) Fig. 8. Step response of the uncompensated system for the phase lead design example. Thus, the compensator needs to reduce the overshoot and the settling time significantly. This requires that the effective damping of the system be increased, which requires a phase lead compensator. A. Selection of the Dominant Closed-Loop Pole Using the equations for the standard second-order system, the damping ratio that corresponds to an overshoot of % can be computed from (11), and is ζ = The angle and slope of the radial line associated with this value of ζ are θ =6.87 and 1.95, respectively. The settling time specification requires the dominant closed-loop poles to have a real part computed from (13) of Re [s 1 ]= 4/16 =.5. Combining these requirements places the desired closed-loop pole at s = s 1 =.5 + j.488. The uncompensated root locus is shown in Fig. 9, along with the point s 1. It is clear from the plot that the dominant branches of the root locus need to be moved to the left in order to pass through s 1, again indicating the need for a lead compensator.

27 Imag Axis 7 Uncompensated Root Locus s Real Axis Fig. 9. Root locus of the uncompensated system and the desired closed-loop pole s 1 =.5 + j.488. A.3 Designing the Compensator The first step in designing the compensator is to determine the phase shift of G p (s) at s = s 1. This angle is G p (s 1 )=tan 1 [.488/.55] tan 1 [.488/.5] tan 1 [.488/.5] tan 1 [.488/.75] tan 1 [.488/1.5], so G p (s 1 ) = ( ) ( ) = 5.77 = Therefore, in order for s 1 to be on the root locus, the compensator must provide a phase shift of G c (s 1 )=45.77 at s = s 1. This can be done with a single pole zero pair. In order to use a single stage of compensation, the compensator zero must provide more than G c (s 1 )= at s 1, so the left-most location for the zero is s =.75. Followingtheruleofthumbthatthezero should be at or to the left of the second real-axis open-loop pole, the compensator zero will be placed at the second pole, namely at s =.. This location produces an angle of at s 1, so the compensator pole must have an angle at s 1 of (s 1 p c )= =5.8. The distance from the real-axis projection of s 1 to the compensator pole needed to provide this angle is

28 8 equal to d pc =Im[s 1 ] / tan [5.8 ]=.483. Therefore, the compensator pole is located at s = At this stage in the design, the compensator is G c (s) =K c (s +.) / (s ). The compensator gain is determined from the magnitude criterion G c (s 1 ) G p (s 1 ) =1. The gain calculation is K c = s 1 s 1 +1 s s =1.519 (6).375 s Note that the plant pole and compensator zero at s =. have been omitted from the calculation since they would cancel out exactly. The final lead compensator for this example is (s +.) G c (s) = (7) (s ) The compensated root locus and step response are shown in Fig. 1. The overshoot is 19.4%, and the settling time is 16.3 seconds, so the specifications have been satisfied. For the particular G p (s) in this example, the dominant closed-loop pole location s 1 is sufficiently farther to the right than the other closed-loop poles to make the second-order equation for overshoot hold for this higher-order system. The following table summarizes the performances of the original system and the final compensated system. It is seen that the compensator defined in (7) allows both of the transient performance specifications to be satisfied. Uncompensated Compensated Specification PO 67.6% 19.4% % T s 74.7 sec 16.3 sec 16 sec T r.63 sec.98 sec None e ss ramp 1.17 None closed-loop poles.54 ± j ± j.488 s 1 =.5 + j None None None Note that one of the compensated closed-loop poles is at s =., the location of one of the plant s open-loop poles. The reason for this is the fact that the compensator zero was placed at that same location. A compensator zero and a plant pole (or vice versa) at the same location always results in a closed-loop pole at that location also. That pole does not affect the settling time since there is a closed-loop zero at that point also. Two of the closed-loop pole for the compensated system are at s = s 1 and its complex conjugate as desired. The lead-compensated system has larger steady-state error for a ramp input than the uncompensated system, but since that characteristic was not specified, thisdoesnotcauseaproblem. If there was a specification on steady-state error, it would be considered at this point in the design process, using the technique described in my paper Compensator Design for Steady-State Error Using Root Locus.