You are on page 1of 9

Closed-form solution for design of leadlag compensators

Amir Nassirharanda and Hassan Karimib a Farab Company, Tehran, Iran E-mail: control727@yahoo.com b Department of Mechanical Engineering, Khage Nassir-AI-Deen Toosi University of Technology, Tehran, Iran
Abstract A closed-form solution for the design of leadlag compensators based on an exact modelmatching criterion is developed. Using the developed design tool, students are able to obtain leadlag compensators in a fraction of the time that is required by traditional design methods. Keywords compensator; design; linear systems; model matching

The work presented herein should be of interest to undergraduate students and instructors in undergraduate level courses in linear control theory in a wide variety of areas, including electrical and electronics engineering, mechanical engineering, aerospace engineering, chemical engineering, and mechatronics engineering. The design approach presented will also be of interest to graduate students participating in such courses as adaptive control and nonlinear systems when designing selftuning leadlag compensators or designing a preliminary linear compensator before a fully nonlinear leadlag compensator is designed.1 The primary contribution of this work is the closed-form solution for design of leadlag compensators; the compensator parameters are determined from a set of linear simultaneous algebraic equations. The design approach is automated via a new MATLAB function, and a software listing for use by students and/or designers is presented. With this tool at hand, students who can properly translate specications into a closed-loop transfer function, properly use the MATLAB function in the paper, and properly make some judgments about the results, should be capable of nding a solution. The work presented herein contributes to the education of an engineering student in the following fashion. The work presented would generate interest in the faculty as an evaluation tool for concepts presented in class. The work presented could be used by students (or practising engineers) to verify their designs or to obtain an alternative design. Also, the compensator designed using this method could be used as a starting point to compare with other results obtained by shifting poles and zeros to make the values more realistic. There are other leadlag design techniques that complement the traditional instructional material2,3 on the subject. Unlike other approaches, the approach presented herein provides a closed-form solution. An expert system for the design of leadlag compensators is developed.4 Teixeira5 gives relations for the design of leadlag compensators for the method of Ref. 2. Yeung et al.6 present a graphical approach to the design of leadlag compensators, where the performance specicaInternational Journal of Electrical Engineering Education 41/2

Design of lead-lag compensators

173

tions must be in the frequency domain. Another graphical approach that may be used for the design of various types of conventional compensator was developed by Yeung and Lee.7 Inversion formulae for the analytic design of leadlag compensators were developed by Marro and Zanasi.8 An exact and unique solution to the design of leadlag compensation for a set of specic frequency domain performance measures is given in Wang and Huang.9 This paper presents a leadlag design technique that is complementary to the material covered in an undergraduate controls course, which may also be used in graduate level controls classes. The design technique developed in this work is based on denition of the desired transfer function. Therefore, there are no restrictions on the type of desired performance specication (the performance measures may be in either the time domain and/or in the frequency domain); the only requirement is that the user must be able to dene the corresponding desired transfer function; guidelines for dening the desired transfer function are not given here, and the reader is referred to material presented elsewhere.10 Main developments The requirement is to design a leadlag compensator for a linear plant in a unity feedback conguration (see Fig. 1) that satises a set of user-dened performance measures. The linear plant is expressed as follows: G p ( jw ) = g1 + g2 j g3 + g4 j (1)

The leadlag compensator model is given below: Gc (s) = a0 + a1s + a2 s 2 , 1 + b1s + b2 s 2 s = jw (2)

The desired closed-loop system behaviour, or the desired reference linear model, is denoted by F: F( jw ) = h1 + h2 j Y1 = h3 + h4 j Y2 (3)

The designed closed-loop system is denoted Gcl: Gcl = Gc G p Z1 = 1 + Gc G p Z2 (4)

Fig. 1

Structure of the proposed feedback system.


International Journal of Electrical Engineering Education 41/2

174

A. Nassirharand and H. Karimi

Then, the exact model matching objective function is formed as


w2

J =

w1

Z1 Y1 dw Z2 Y2

(5)

Minimizing the above function with respect to the compensator parameters results in a set of nonlinear algebraic equations that must be solved numerically. However, the goal is to develop a closed-form solution. Notice that under optimality conditions Z1 Y1 = Z1Y2 - Z2 Y1 = 0 Z2 Y2 Therefore, assuming that a solution exists, the following alternative objective function may be selected.
w2

J=

w1

Z1Y2 - Z2 Y1 dw

(6)

By substituting equations (1)(4) into equation (6), the following is obtained:


w2

J= where

(a0 A + a1 Bw - a2 Aw 2 + b1 Dw + b2 Ew 2 - E)2 + 2 dw 2 2 w1 (- a0 B + a1 Aw + a2 Bw - b1 Ew + b2 Dw - D)

(7)

A = h3 g1 - h4 g2 - h1g1 + h2 g2 B = - h3 g2 - h4 g1 + h1g2 + h2 g1 D = h1g4 + h2 g3 E = h1g3 - h2 g4

(8) (9) (10) (11)

Now by taking the derivative of the objective function with respect to the compensator parameters, and by setting the result equal to zero, a set of linear simultaneous algebraic equations is obtained as follows: T0 0 - T2 R1 S2 where
w2

0 T2 0 - S2 R3

- T2 0 T4 - R3 - S4

R1 - S2 - R3 Q2 0

S2 a0 R3 a1 - S4 a2 = 0 b1 Q4 b2

S0 R 1 - S2 0 Q2

(12)

Tk = Rk =

w1

(A
w2 w1

+ B 2 )w k dw
k

(13) (14)

(AD + BE)w

dw

International Journal of Electrical Engineering Education 41/2

Design of lead-lag compensators


w2

175

Sk = Qk =

w1

(AE - BD)w
w2 w1

dw

(15)

(D

+ E 2 )w k dw

(16)

Therefore, by supplying the linear plant, the desired closed-loop transfer function and the frequency range of interest, one could use equation (12) and directly solve for the compensator parameters. Software The design process is automated via development of a new MATLAB function, of the following form:

[gc] = leadlag(gp, f , wl, w2)


The command inputs are (1) the linear plant transfer function gp, for which a compensator is to be designed; (2) the desired closed-loop transfer function f; (3) the lower bound of the frequency range of interest w1; and (4) the upper bound of the frequency range of interest w2. The function output is the designed leadlag compensator gc. A zipped copy of the software may be obtained from www.farab.com; alternatively, one could request the software by sending an email to the rst author at CONTROL727@YAHOO.COM. Demonstration example problems Example 1 Consider the example problem studied in Ref. 2. The linear plant is of the following form: Gp = 4 s(s + 0.5) (17)

It is desired to design a leadlag compensator that results in a closed-loop system that would have the damping ratio of the dominant closed-loop poles equal to 0.5 with an undamped natural frequency of 5 rad/s; the static velocity error constant is to be 80 s-1. The corresponding desired closed-loop transfer function is obtained as follows.10 With reference to item 3 of the Discussion section of the paper, the desired transfer function is of the following form: F=
2 xs + w n 2 s 2 + 2Vw n s + w n

(18)

where, from the problem statement, wn = 5 and V = 0.5. Based on the denition of velocity error constant kv, the following relation holds:
International Journal of Electrical Engineering Education 41/2

176
2 wn 2Vw n - - x = 0 x = 4.6875 kv

A. Nassirharand and H. Karimi

(19)

Hence, F= 4.6875s + 25 s 2 + 5s + 25 (20)

With reference to item 1 of the Discussion section of the paper, the MATLAB function developed is executed with w1 = 0 and w2 = 10 as follows (for this example use w2 = 5 when using later versions of MATLAB; i.e. versions 6.1 or higher): gc = leadlag(gp, f , 0, 10) The compensator designed is of the following form: Gc = 3.75s 2 + 21.875s + 10 3.75s 2 + 21.875s + 10 @ 2 (1.8347e - 12)s + 3.2 s + 1 3.2 s + 1 (21)

With reference to item 5 of the Discussion section of the paper, an es2(e = 0.01) term is added to the denominator of equation (21) to obtain the desired and realizable compensator. Gc = 3.75s 2 + 21.875s + 10 0.01s 2 + 3.2 s + 1 10(2 s + 1)(5s + 1) (0.1992 s + 1)(80.19s + 1) (22)

The design given using a classical technique2 is of the following form: Cogata (s) = (23)

The performance of the two compensators are compared in Fig. 2. Example 2 The purpose of this example is to explore the performance of the design procedure when applied to a linear plant of a complicated nature. Consider the plant and the desired closed-loop transfer function:11 Gp = F= -17.8(s + 0.0144)(s + 0.432)s (s + 1.12056s + 12.1104)(s 2 + 0.010404s + 0.002601)
2

(24) (25)

-4.4(s + 0.432) s 2 + 5.6s + 16

With reference to item 1 of the Discussion section of the paper, the developed MATLAB function is executed with w1 = 0 and w2 = 10. The leadlag designed is of the following form: Gc = 0.01378s 2 + 0.01544 s + 0.1669 0.05575s 2 + 0.5577s + 1 (26)

The performance of these two designs are compared in Fig. 3.


International Journal of Electrical Engineering Education 41/2

Design of lead-lag compensators

177

Fig. 2

Design comparison for Example 1.

Discussion The following remarks are made to clarify typical concerns associated with the proposed design procedure. 1 Desired frequency range: Based on the authors experience, the frequency range of interest is not of major concern. The user may determine the bandwidth of the desired closed-loop system, and select lower and upper bounds to the desired frequency range.11 Then, the developed MATLAB function may be executed; if the transient response is not satisfactory, then the upper and/or lower frequency limits may be multiplied by an arbitrary factor such as 2a (where a is a trial number) until the desired transient response is obtained. Similarly, if the steadystate response is not satisfactory, then the lower and/or upper limits may be divided by an arbitrary factor, such as 2a, until the desired steady-state response is obtained. The authors found that the procedure is not very sensitive to the selected frequency range. Based on application of the software to a number of different problems, it is recommended that w1 = 0 and w2 = 10 be used as a starting point; this recommended range may have to be modied as outlined earlier.
International Journal of Electrical Engineering Education 41/2

178

A. Nassirharand and H. Karimi

Fig. 3

Design comparison for Example 2.

Desired transfer function: For problems that are posed in undergraduate classes, the desired closed-loop transfer function would be a second-order transfer function that possesses the desired dominant poles, and satises the desired steadystate error conditions. The student may translate the time and/or frequency performance measures to the desired natural frequency and the desired damping ratio by considering the performance specication equations noted in Ref. 3; then the steady-state error specications determine if a zero is also required. The zero may be determined from the relations for denition of steady-state error. A procedure has been outlined10 for synthesis of the desired closed-loop transfer functions with mixed (time and frequency) performance measures. 3 Meaningless designs: If the designed parameters of the leadlag compensator are such that this results in an unstable closed-loop feedback system, then the designer must explore the possibility of modifying the required performance measures, designing higher-order compensators,12 or a different feedback structure may have to be assumed. 4 Improper designs: It is possible that the model-matching solution is an improper transfer function; as is known, improper transfer functions are not realizable. In such cases, one approach to accommodate such designs is to include adequate
International Journal of Electrical Engineering Education 41/2

Design of lead-lag compensators

179

high order dynamic terms until the order of the denominator polynomial equals that of the numerator. Alternatively, one could add esn terms (n = 1,2) to the denominator until the order of the denominator equals that of the numerator. This is a standard practice in realizing such improper transfer functions as a pure derivative.1 The numerical value of e must be selected such that this does not require an unreasonably small integration step size, and it also must not be so large that it alters the behaviour of the original transfer function. 5 Polezero shifting: It should be noted that as the order of the plant increases, the traditional techniques, which give insight into how the polezero locations of the compensator affect the response, lose effectiveness. As was mentioned earlier, the proposed approach complements traditional techniques (such as polezero shifting) for the design of leadlag compensators. For simple plants, the proposed tool may be used to verify results, and for complicated plant (see Example 2), where application of the polezero shifting approach becomes difcult, the tool may be used to arrive at a solution, which may then be analysed in order to determine where the poles and zeros of the compensator ought to be placed for optimum results. Summary and conclusions The goal of this paper was to develop an alternative technique for the design of leadlag compensators; this goal was met. The design equation, equation (12), is the closed-form solution to the model-matching problem via a leadlag compensator, assuming that a solution exists. This paper adds another tool to the control systems designers toolbox. Software written in the MATLAB environment is developed and presented. The MATLAB function requires the plant transfer function, the desired closed-loop reference linear model, and the frequency range of interest. By studying the results of the example problems, it may be concluded that, unlike with classical methods, optimal solutions are easier to obtain by application of the proposed design approach. Acknowledgements The kind assistance of Professor 1. Walker (Department of Electrical and Computer Engineering at Clemson University) in providing technical critique and proofreading the manuscript, is much appreciated. The assistance of Mr M. Dadfarnia (Department of Mechanical Engineering at Clemson University) in completing the Reference section of the paper as well as providing copies of the required references, is much appreciated. References
1 J. H. Taylor, and K. L. Strobel, Nonlinear control system design based on quasilinear system models, in Proceedings of American Control Conference, Boston, MA, 1985, pp. 12421247. 2 K. Ogata, Modern Control Engineering, 2nd edn (Prentice Hall, Englewood Cliffs, NJ, 1990) p. 583.
International Journal of Electrical Engineering Education 41/2

180

A. Nassirharand and H. Karimi

3 J. R. Rowland, Linear control systems (John Wiley, New York 1986). 4 J. R. James, Considerations concerning the construction of an expert system for control system design, PhD dissertation, Renselaer Polytechnique Institute, 1986. 5 M. C. M. Teixeira, Direct expressions for Ogatas leadlag design method using root locus, IEEE Trans. Educ. 37 (1994), 6364. 6 K. S. Yeung, K. W. Wong and K. L. Chen, A non-trial-and-error method for laglead compensator design, IEEE Trans. Educ., 41 (1998), 7680. 7 K. S. Yeung and K. H. Lee, Universal design chart for linear time-invariant continuous-time and discrete-time compensators, IEEE Trans. Educ., 43 (2000), 309315. 8 G. Marro and R. Zanasi, New formulae and graphics for compensator design, in Proc. IEEE International Conference on Control Applications, Trieste, Italy, 1 (1998), 129133. 9 F.-Y. Wang and Y. H. Huang, A non-trial-and-error method for phase-lead and phase-lag compensator design, in Proc. IEEE International Conference on Systems, Man and Cybernetics, Tucson, AZ, 3 (2001), 16541660. 10 C. F. Chen and L. S. Shieh, An algebraic method for control systems design, Int. J. Control, 11 (1970), 717739. 11 L. R. Pujara, Computer-aided control systems design technique with applications to aircraft ying qualities, AIAA J. Guidance, Control, Dynam., 11 (1988), 250255. 12 A. Nassirharand, Factorization approach to control system synthesis, AIAA J. Guidance, Control, Dynam. 16 (1992), 402405.

International Journal of Electrical Engineering Education 41/2

You might also like