A new software tool for design of linear compensators

A new software tool for design of linear compensators

Advances in Engineering Software 39 (2008) 132–136 www.elsevier.com/locate/advengsoft A new software tool for design of linear compensators Amir Nass...

149KB Sizes 1 Downloads 130 Views

Advances in Engineering Software 39 (2008) 132–136 www.elsevier.com/locate/advengsoft

A new software tool for design of linear compensators Amir Nassirharand Space Engineering Department, Faculty of Energy and Innovative Engineering, Shahid Beheshti University, Evin, 1983963113 Tehran, Iran Received 15 March 2006; received in revised form 15 November 2006; accepted 15 December 2006 Available online 12 March 2007

Abstract An educational software utility for designing linear compensators based on the Youla parametrization technique and an exact model matching criterion is developed. Using the developed design tool, students are able to obtain compensators in a fraction of the time that is required by the traditional methods of design. Ó 2007 Elsevier Ltd. All rights reserved. Keywords: Factorization theory; Optimization; Control systems; Controller design; Systematic design methods

1. Introduction The work presented herein is of interest to students and instructors in undergraduate level courses in linear control theory in a wide variety of areas such as electrical and electronics engineering, mechanical engineering, aerospace engineering, chemical engineering, and mechatronics engineering. The software is also of interest to graduate students participating in such courses as adaptive control and nonlinear systems when designing self-tuning compensators or designing a preliminary linear compensator before a fully nonlinear compensator is designed [1,2]. The primary contribution of this work is the developed software for designing linear compensators that are solutions to the exact model matching problem; the compensator parameters are determined from a set of linear simultaneous algebraic equations [3]. The software may be obtained by sending an email to the first author requesting a copy of the software. With this tool at hand, students who could properly translate specifications into a closed-loop transfer function and properly use the MATLAB command in the paper should be capable of finding a solution. The work presented herein contributes to the education of an engineering student in the following fashion. The presented work would generate interest in the faculty as an evaluation tool for conE-mail address: [email protected] 0965-9978/$ - see front matter Ó 2007 Elsevier Ltd. All rights reserved. doi:10.1016/j.advengsoft.2007.01.006

cepts presented in class. The presented work could be used by students (or practicing engineers) to verify their designs or to obtain an alternate design. Also, the designed compensator using this software could be used as a starting point to compare with other results obtained by shifting poles and zeros to make the values more realistic. 2. Literature survey There are other compensator design techniques that complement the traditional instructional material on the subject [4,5]. Unlike other approaches, the presented work is based on a closed-form solution. An expert system for design of compensators is developed in [6]. In [7], an enhanced computer-aided control system design program is developed by integration of an expert system in order to advance control systems education. Ref. [8] gives relations for design of lead-lag compensators for the method of Ogata [4]. In [9], a graphical approach for the design of compensators, where the performance specifications must be in the frequency domain, is developed. Another graphical approach that may be used for design of various types of conventional compensators is developed in [10]. Inversion formulas for analytic design of compensators are developed in [11]. The exact and unique solution to the design of lead-lag compensation for a set of specific frequency domain performance measures is given by [12].

A. Nassirharand / Advances in Engineering Software 39 (2008) 132–136

A set of nonlinear algebraic equations based on the concept of a frequency response analysis is presented in [13], and the corresponding interactive computer program for compensator design purposes is developed. Ref. [14] uses Genetic Algorithms for the design of linear robust decentralized fixed-structure controllers. This paper presents another design tool which is complementary to what is covered in an undergraduate controls course, and it may also be used in graduate level controls classes. The design technique developed in this work is based on the definition of a desired transfer function. Therefore, there are no restrictions on the type of the desired performance specifications (the performance measures may be in either the time domain and/or in the frequency domain); the only requirement is that user must be able to define the corresponding desired transfer function; guidelines for defining a desired transfer function are not given here, and the reader is referred to material presented in [15]. 3. Theory The problem statement is to design a linear compensator for a linear plant in a unity feedback configuration that would satisfy a set of user-defined performance measures. The class of all compensators that stabilize a linear plant G(s) may be parameterized in terms of a function parameter r(s) as follows [16]: P ðsÞ  rðsÞDðsÞ CðsÞ ¼ ; QðsÞ þ rðsÞN ðsÞ

ð1Þ

where C(s) is the stabilizing compensator, N(s) and D(s) are coprime transfer function factors of the plant satisfying ðsÞ GðsÞ ¼ NDðsÞ , P(s) and Q(s) are coprime transfer functions and satisfy the Bezout identity: P(s)N(s) + Q(s)D(s) = 1, and r(s) is an as yet unknown stable transfer function parameter. This transfer function parameter must be selected in such a manner that when substituted in Eq. (1), the desired compensator would be obtained. In continuation, define the needed transfer functions as follows: a0 þ b01 j N ðjxÞ ¼ 10 ; ð2Þ a2 þ b02 j c1 þ d 1 j DðjxÞ ¼ ; ð3Þ c2 þ d 2 j Pi¼m i i¼0 ai  ðjxÞ rðjxÞ ¼ ð4Þ P i¼n i; 1 þ i¼1 bi  ðjxÞ e1 þ f1 j ; ð5Þ P ðjxÞ ¼ e2 þ f2 j N 1 þ N 2j Y 1 hDy;u ¼ ¼ ; ð6Þ P 1 þ P 2j Y 2 hDy;u

where N, D, r, and P are defined as before, and is the desired reference linear model. The input–output map in terms of the coprime factors is of the following form Z1 hy;u ¼ N ðsÞDðsÞrðsÞ þ N ðsÞP ðsÞ ¼ : ð7Þ Z2

133

Then, the exact model matching objective function is formed  Z x2  Z 1 Y 1 2 0   ð8Þ J ¼ Z  Y  dx: 2 2 x1 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, we must have: ZZ 12 ¼ YY 12 ) Z 1 Y 2  Z 2 Y 1 ¼ 0. Therefore, assuming that a solution exists, the following alternate objective function may be selected Z x2 2 J¼ jZ 1 Y 2  Z 2 Y 1 j dx: ð9Þ x1

By substituting Eqs. (7) and (2)–(6) into Eq. (9), the following relation is obtained Z x2 E0 ¼ ½ðAA1 þ BA2 þ B1 C  B2 DÞ2 x1 2

þ ðAA2  BA1 þ B1 D þ B2 CÞ  dx;

ð10Þ

where A1 ¼ a0  a2 x2 þ a4 x4     ; 3

ð11Þ

5

ð12Þ

A2 ¼ a1 x  a3 x þ a5 x     ;

B1 ¼ 1  b2 x2 þ b4 x4     ; ð13Þ  0    A ¼ a1 c1  b01 d 1 ðe2 P 1  f2 P 2 Þ  a01 d 1 þ b01 c1 ðf2 P 1 þ e2 P 2 Þ;

ð14Þ     B ¼ a01 c1  b01 d 1 ðf2 P 1 þ e2 P 2 Þ þ a01 d 1 þ b01 c1 ðe2 P 1  f2 P 2 Þ;

ð15Þ C ¼ E  G;

ð16Þ

D ¼ F  H;   E ¼ a01 e1  b01 f1 ðc2 P 1  d 2 P 2 Þ    a01 f1 þ b01 e1 ðc2 P 2 þ P 1 d 2 Þ;   F ¼ a01 e1  b01 f1 ðc2 P 2 þ P 1 d 2 Þ   þ a01 f1 þ b01 e1 ðc2 P 1  d 2 P 2 Þ;   G ¼ a02 c2  b02 d 2 ðe2 N 1  f2 N 2 Þ    a02 d 2 þ b02 c2 ðe2 N 2 þ f2 N 1 Þ;   H ¼ a02 c2  b02 d 2 ðe2 N 2 þ f2 N 1 Þ   þ a02 d 2 þ b02 c2 ðc2 N 1  f2 N 2 Þ:

ð17Þ

ð18Þ

ð19Þ

and

ð20Þ

ð21Þ

By imposing the necessary optimality condition, that is $a,b = 0, a set of simultaneous linear algebraic equations is obtained as follows XY ¼ Z;

ð22Þ

134

A. Nassirharand / Advances in Engineering Software 39 (2008) 132–136

where 2

T0 6 0 6 6 6 T 2 6 6 . 6 .. 6 X ¼6 6 R1 6 6 S 6 2 6 6 R3 4 .. . Y ¼ ½ a0

a1

0 T2

T 2 0

 

R1 S 2

S2 R3

R3 S4

0 .. .

T4 .. .

 .. .

R3 .. .

S 4 .. .

R5 .. .

S 2 R3

R3 S 4

 

Q2 0

0 Q4

Q4 0

S4 .. .

R5 .. .

0 .. .

Q8 .. .

a2



   Q4 .. .. . . b1

b2

b3

Z ¼ ½ R1 S 2 R3    0 Q2 Z x2 Tl ¼ xl ðA2 þ B2 Þ dx; x1 Z x2 Rl ¼ xl ðAD  BCÞ dx; x1 Z x2 Sl ¼ xl ðAC þ BDÞ dx; and x1 Z x2 Ql ¼ xl ðC 2 þ D2 Þ dx:

3  7 7 7 7 7 .. 7 . 7 7 7; 7 7 7 7 7 7 5 .. .

T

 ; T

0  ; Fig. 1. Design comparison for demonstration example problem.

ð23Þ ð24Þ

6000 ; and þ 40s þ 300Þ 4:35s þ 12:674 : ¼ 2 s þ 4:984s þ 12:674

Gp ¼ ð25Þ hDy;u ð26Þ

x1

Therefore, by supplying the linear plant, the desired closedloop transfer function, and the frequency range of interest, one could use Eq. (22) and directly solve for the unknown function parameter, r(s). 4. Software The developed design software is in terms of a new MATLAB function. The MATLAB function is of the following form ½r; c ¼ getrcsðm; n; w1; w2; h; g; hdÞ: The function inputs are (1) m, the numerator polynomial degree of the transfer function parameter r(s), (2) n, the denominator polynomial degree of the transfer function parameter r(s), (3) w1, the lower limit of the desired frequency range of interest, (4) w2, the upper limit of the desired frequency range of interest, (5) h, the integration step size for evaluating the integrals given by Eqs. (23)– (26), (6) g, the given plant transfer function, and (7) hd, the desired reference linear model. The function outputs are the function parameter r(s) and the desired compensator, c(s). A copy of the software may be obtained by sending an email to the first author requesting the software listing.

sðs2

With reference to item 3 of the Section 6 of the paper the desired closed-loop transfer function requires enhancement. The open-loop transfer function corresponding to the defined desired transfer function is (4.35s + 12.674)/ [s(s + 0.634)]; high order dynamic terms with poles at 300 and 400 are added and the gain is adjusted so the steady-state value of the open loop transfer function is unaltered. Then, the enhanced desired transfer function, Fe, would be of the following form Fe ¼

s4

þ

700:634s3

522 000s þ 1 520 880 : þ 120443:8s2 þ 598080s þ 1 520 880

The developed MATLAB function with the enhanced desired transfer function and w1 = 0 and w2 = 10 is executed and the following compensator is obtained Gc ¼

87s3 þ 3733s2 þ 3:624e4s þ 7:604e4 : s3 þ 700:6s2 þ 1:204e5 þ 7:608e4

In [15], a different feedback structure for the same problem is designed. The performance of a model matching compensator with that of the two other designs is compared in Fig. 1. From examination of this figure, it may be concluded that the developed MATLAB function has determined the desired model matching compensator. 6. Discussion The following remarks are made to clarify typical concerns associated with the developed design procedure.

5. Demonstration example problem Consider the plant and the desired closed loop transfer function given by [15]

1. ‘‘Desired frequency range’’ – based on the experience of the authors, the frequency range of interest is not of major concern. The user may determine the bandwidth

A. Nassirharand / Advances in Engineering Software 39 (2008) 132–136

2.

3.

4.

5.

of the desired closed-loop system, and select the lower and upper bounds of the desired frequency range [17]. Then, the developed MATLAB function may be executed; if the transient response is not satisfactory, then the upper and/or the 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 steady-state response is not satisfactory, then the lower and/or the upper limits may be divided by an arbitrary factor such as 2a until the desired steady state response is obtained. The authors have found the procedure is not very sensitive to the selected frequency range. Based on application of the software to a number of different problems, the authors recommend w1 = 0 and w2 = 10 to be used as a starting point; this recommended range may have to be modified as outlined earlier. ‘‘Bad frequency range’’ – if a bad frequency range is used, the developed procedure will not find the desired solution. The question is when the user can tell if a bad frequency range is used? The user may be assured that a bad frequency range is not used if he has gone through the exercise of item 1 above without any useful results. In this case, the desired performance measures may have to be modified or a different feedback structure may have to be selected. ‘‘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 satisfies the desired steady state 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 specification equations noted by Rowland [5]; then the steady state error specifications determine if a zero is also required. The zero may be determined from the relations for definition of a steady state error. A procedure is also outlined by Chen and Shieh [15] for synthesis of the desired closed loop transfer functions with mixed (time and frequency) performance measures. ‘‘Meaningless designs’’ – if the designed parameters of the 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 or a different feedback structure may have to be assumed. ‘‘Improper designs’’ – it is possible that the modelmatching 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 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

135

functions as a pure derivative [2]. The numerical value of e must be selected such that this does not require unreasonably small integration step size, and it also must not be so large that it alters the behavior of the original transfer function. 6. ‘‘Pole-zero shifting’’ – it should be noted that as the order of the plant increases, the traditional techniques, which give insight into how the pole-zero locations of the compensator affect the response, lose effectiveness. As was mentioned earlier, the presented approach complements the traditional techniques (such as pole-zero shifting) for design of classical compensators; for simple plants, the developed tool may be used to verify results, and for complicated plants, where application of the pole-zero shifting approach becomes difficult, the tool may be used to arrive at a solution which may then be analyzed in order to determine where the poles and zeros of the compensator ought to be placed for optimum results.

7. Summary and conclusions The goal of this research was to develop alternative software for the design of linear compensators; this goal was met. The design equation, Eq. (22), is the closed-form solution to the model-matching problem assuming that a solution exists. This paper adds another tool to the control systems designer’s 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 the case with classical methods, optimal solutions are easier to obtain with the application of the presented design tool. It is emphasized that a solution may not be found if the specified performance measures are not consistent; i.e., if there does not exist a transfer function that would possess the desired performance measures. This is simply because the user would not be able to synthesize a linear model that would exhibit the specified performance measures. Once a transfer function is synthesized that desired performance measures are satisfied, the developed MATLAB function may be utilized to find a solution; i.e., assuming that a solution exists. The following projects may be considered as future work. 1. Automation of identification of the desired frequency range of interest. 2. Automation of synthesis of a desired transfer function from an arbitrarily chosen set of user defined performance measures or a desired time and/or frequency response curve. 3. Development of the software that automates design of nonlinear compensators.

136

A. Nassirharand / Advances in Engineering Software 39 (2008) 132–136

4. Development of a procedure and software that automates design of a linear multivariable compensator. 5. Extension of item 3 above in order to automate design of nonlinear and multivariable compensators. References [1] Taylor JH. A systematic nonlinear controller design approach based on quasilinear system models. In: American control conference, San Francisco (CA); 1983. p. 141–5. [2] Taylor JH, Strobel KL. Nonlinear control system design based on quasilinear system models. In: American control conference, Boston (MA); 1985. p. 1242–7. [3] Nassirharand A. Factorization approach to control system synthesis. AIAA J Guidance Contr Dynam 1993;16(2):402–5. [4] Ogata K. Modern control engineering. 2nd ed. Englewood Cliffs: Prentice-Hall; 1990. [5] Rowland JR. Linear control systems. New York: John Wiley; 1986. [6] James JR. Considerations concerning the construction of an expert system for control system design. Ph.D. diss., Renselaer Polytechnique Institute; 1986. [7] Lamont GB. Pedagogical computer-aided design expert system for compensator development. Comput Edu Div ASEE 1989;9(4):17–28.

[8] Teixeira MCM. Direct expressions for Ogata’s lead-lag design method using root locus. IEEE Trans Educ 1994;37(1):63–4. [9] Yeung KS, Wong KW, Chen KL. A non-trial-and-error method for lag-lead compensator design. IEEE Trans Educ 1998;41(1):76–80. [10] Yeung KS, Lee KH. Universal design chart for linear time-invariant continuous-time and discrete-time compensators. IEEE Trans Educ 2000;43(3):309–15. [11] Marro G, Zanasi R. New formulae and graphics for compensator design. In: IEEE international conference on control applications, vol. 1, Trieste, Italy; 1998. p. 129–33. [12] Wang FY, Huang YH. A non-trial-and-error method for phase-lead and phase-lag compensator design. In: IEEE international conference on systems, man and cybernetics, vol. 3, Tucson (AZ); 2001. p. 1654–60. [13] Tsao FL, Lee CB. Computer-aided design of an optimal compensator for linear control systems. J Chin Soc Mech Eng 1991;12(2):221–5. [14] Taranto GN, Falcao DM. Genetic-based control design for damping power system inter-area oscillations. In: IEEE conference on decision and control, Kobe, Japan; 1996. p. 4389–94. [15] Chen CF, Shieh LS. An algebraic method for control systems design. Int J Control 1970;11(5):717–39. [16] Vidyasagar M. Control system synthesis. Cambridge (MA): MIT Press; 1985. [17] Pujara LR. Computer-aided control systems design technique with applications to aircraft flying qualities. AIAA J Guidance Control Dynam 1988;11(5):250–5.