design of the closed-loop system. One of the ... it is desired to design an overall system, O(s) to match H(s), that is O(s) â¡ H(s). ..... [6] C. T. Chen and B. Seo.
Algorithm for Approximate Model Matching for Loops with Non-Negligible Feedback Dynamics Luis Antonio Aguirre Centro de Pesquisa e Desenvolvimento em Engenharia El´etrica Departamento de Engenharia Eletrˆonica Universidade Federal de Minas Gerais Av. Antˆonio Carlos 6627, 31270-901 Belo Horizonte, MG, BRAZIL April 1998
Abstract This paper develops a new algorithm to solve the model matching problem in cases where the feedback dynamics should be taken into account in the design of the closed-loop system. One of the main features of the new method is that the matching is carried out by moment matching and is therefore approximate. The new algorithm is computationally simple and it permits the designer to choose relatively simple structures for the reference model and the controller. Numerical examples are included to illustrate the new approach.
1
Introduction
The so-called model matching problem can be roughly stated as follows: Given a transfer function G(s), a certain control configuration and a reference model H(s), it is desired to design an overall system, O(s) to match H(s), that is O(s) ≡ H(s). Various aspects of this problem have recently attracted considerable attention in the literature (5; 4; 2). One of the interesting features of the model matching approach to system compensation and design is that the overall performance of the resulting system can be specified in terms of a reference model H(s). Moreover, if the structure of the reference model is simple, the dynamics can be easily quantified by parameters such as dominant time constants, time delay, damping ratio, and so forth. This helps to keep performance specification meaningful to the average engineer. If O(s) is to match H(s) exactly, the latter must satisfy some requirements in order to be implementable (6) thus the reference model must be chosen very 1
JOURNAL OF DYNAMIC SYSTEMS MEASUREMENT AND CONTROL-TRANSACTIONS OF THE ASME Volume: 120 Issue: 3 Pages: 394-398, Published: SEP 1998 DOI: 10.1115/1.2805414
carefully since it is subject to several constraints. Unfortunately, this means that in some cases H(s) will not be too simple and consequently specifying such a reference model might become more of a mathematical exercise rather than an engineeringmotivated problem. Prompted by the need to implement simple systems and use simple reference models, some authors have recently developed approximate model matching techniques (8; 2). The basic motivation is that if the matching is allowed to be approximate, then the designer has greater freedom to choose the structures of the controller and reference model (2). Thus in the approximate model matching problem (AMMP) the objective is to design a system such that O(s) ≈ H(s). Several algorithms have been proposed to solve the model matching problem both exactly and/or approximately (6; 5; 4). In the aforementioned papers, it was assumed that there were no significant dynamics in the feedback path. However, if the dynamics in the feedback path are significant, the designed system will not in general attain the desired performance. Non-negligible dynamics in the feedback path can occur in a number of real situations due to sensor dynamics or even to signal conditioning circuitry. Hence this paper addresses the problem of how to design a system to match a given reference model when the feedback path dynamics should be taken into account. In order to achieve this, an existing approximate model matching algorithm will be extended. The matching criterion used (moment matching) is able to handle the approximation of transfer functions of different orders. Consequently the structures of O(s) and H(s) in the AMMP need not be similar and simple reference models can be used in most design problems.
2
Statement of Problem
Consider the control loop shown in Figure 1. It is assumed that G(s) and I(s) �= 1 are known. Given a reference model H(s), it is desired to design C(s) in such a way that the closed-loop transfer function, O(s), matches in some approximate sense the given reference model, H(s). In most cases the structure of O(s) will be considerably more complex than that of H(s). Consequently the approximation technique employed should have the ability of handling different model structures. Pad´e approximation techniques are well suited for this purpose (9; 2). Basically, the reference model is expanded into Taylor series and the approximant is then designed in such a way that the respective Taylor series matches the original series up to a certain point which depends on the number of unknowns. In this paper, an algorithm will be developed for the case I(s) �= 1 extending the algorithm for I(s) = 1 (2). 2
+ ❧✲ ✲ − ✻
✲
C(s)
G(s)
�
✲
I(s) ✛ O(s) Figure 1: Closed-loop overall transfer function with feedback dynamics.
3
Two-point Pad´ e Approximation — A Review The transfer function1
d0 + d1 s + ... + dr¯sr¯ , r¯ ≤ t¯ e0 + e1 s + ... + et¯st¯ can be expanded into the following infinite series H(s) =
(1)
H(s) = c0 + c1 s + c2 s2 + . . .
(2)
and ¯
¯
¯
H(s) = mt¯−¯r s−(t−¯r) + mt¯−¯r+1 s−(t−¯r+1) + mt¯−¯r+2 s−(t−¯r+2) + . . . ,
(3)
where the coefficients can be computed using the following recursive equations
and
k¯ = 0 � 0 /e0 �¯ � d ¯ ¯ dk¯ − ¯kj=1 e¯j ck− ¯ ¯ ck¯ = j /e0 0 < k ≤ r �k¯ − ¯j=1 e¯j ck− r¯ < k¯ ¯ ¯ j /e0 � r¯/et¯ �¯ � d k−t¯+¯ r d − e m ¯ ¯ ¯ ¯ mk¯ = ¯ t¯−j k−j /et¯ t¯−k j=1 �k− ¯ t¯+¯ − ¯j=1 r et¯−¯j mk− ¯ ¯ j /et¯
k¯ = ν = t¯ − r¯ t¯ − r¯ < k¯ ≤ t¯
(4)
(5)
t¯ < k¯ ,
where min(·, ·) indicates the smallest of the arguments and ν¯ = t¯ − r¯, as indicated. In this paper the bar indicates an integer. For instance, t¯ is number of poles of H(s) whereas t is the time. 1
3
The coefficients {c¯i }¯∞ e coefficients and are proportional to the i=0 are known as Pad´ time moments which characterize the slow dynamics of a system. The coefficients {m¯i }¯∞ i=0 are the Markov parameters and characterize H(jω) at high frequencies. Equations (2) and (3) are the Taylor expansions of H(s) around the points s = 0 and s = ∞, respectively. Therefore matching c¯i and m¯i (known as moment matching) results in approximating both low and high frequency characteristics of H(jω).
4
The New Algorithm
The following algorithm was developed such that the overall transfer function, O(s), matches a certain number of Pad´e coefficients and/or Markov parameters of a reference model H(s). Transfer functions G(s), C(s) and I(s), shown in Figure 1, are defined as g0 + g1 s + . . . + gq¯sq¯ , q¯ ≤ n ¯ h0 + h1 s + . . . + hn¯ sn¯
(6)
a0 + a1 s + . . . + ap¯sp¯ C(s) = , p¯ ≤ m ¯ b0 + b1 s + . . . + bm¯ sm¯
(7)
n0 + n1 s + . . . + nx¯ sx¯ , x¯ ≤ y¯ u0 + u1 s + . . . + uy¯sy¯
(8)
G(s) =
and I(s) =
The closed-loop transfer function is then given by O(s) =
C(s)G(s) . 1 + C(s)G(s)I(s)
(9)
Lemma 4.1 Given G(s) and I(s), the transfer function C(s) which will make O(s) match the specified set of Pad´e coefficients and Markov parameters {c0 , c1 , . . . , cP −1 , mν¯ , mν¯+1 , . . . , mν¯+M −1 } for P + M = p¯ + m ¯ + 1 can be determined equating the first p¯ + m ¯ + 1 Pad´e coefficients and/or Markov parameters of C(s) to those of H(s) . G(s)[1 − I(s)H(s)]
(10)
The matching mentioned above is given uniquely by the solution of a set of simultaneous linear equations (see (20) in the appendix). The following steps may be taken: 4
Step 1 Choose the structure of C(s), that is, choose p¯ and m ¯ Step 2 Choose a reference model, H(s), which satisfies the overall specifications Step 3 If G(s) is of type zero and if I(0) = 1 (see discussion in section 5.2) the first equation in (20) should not be used and an extra constraint can be obtained by using the limit k¯ = P instead of k¯ = P − 1 or k¯ = ν¯ + M instead of k¯ = ν¯ +M − 1. Step 4 Using equation (4) and (5) compute P Pad´e coefficients and M + ν¯ Markov parameters of the reference model Step 5 Determine the coefficients of C(s). This corresponds to solving the set of equations (20). Step 6 If the approximation O(s) ≈ H(s) is not satisfactory, the following design parameters may be changed, i) P and M , ii) H(s), and iii) p¯ and/or m. ¯
5 5.1
Comments on the New Method Algorithm aspects
One of the greatest advantages of solving the model matching problem approximately is that some constraints in the design can be somewhat relaxed. The price paid for this is that the frequency response of the designed systems will probably match that of the reference model only over a limited frequency range. This should not be seen necessarily as a disadvantage, but rather as a real situation frequent in many engineering problems. A choice which the designer must make is how many Pad´e coefficients and Markov parameters should be matched. Two general guidelines are: i) whatever values are chosen, they must satisfy P + M = p¯ + m ¯ + 1 which guarantees that there will be the same number of constraints as unknowns, and ii) suitable combinations of Pad´e coefficients and Markov parameters should be used to give greater weight to low frequency or high frequency characteristics, respectively. However, in practice there is no definite way of doing this. In most cases, just Pad´e coefficients suffice to yield acceptable results. In other cases the matching of one or two Markov parameters may greatly improve the results. At the moment, what is known in this respect is that, in general, Markov parameters will be useful in the case of matching systems with fast dynamics. Another important observation is that the convergence characteristics of the infite series (2) and (3) depend on the pole locations of H(s) (9). Although this could also be used as a general guideline to try to choose values for P and M , it 5
seems safer to try various combinations, within a limited range of values satisfying P + M = p¯ + m ¯ + 1. As a final comment concerning moment matching, it is pointed out that the specified set of Pad´e coefficients and Markov parameters are matched exactly. The approximate character of the design is a consequence of matching a finite number of such parameters. The proper choice of the reference model is arguably the most important and difficult step in most model matching problems (11). For this reason, every attempt to simplify the structure of the reference model is well worth the effort. The present algorithm enables the designer to use reference models which would be non-implementable and therefore useless in exact model matching problems (6; 2). Guidelines which are believed to be useful in the choice of reference models can be found in the literature (10; 7; 3). The main cause for inaccurate matching seems to be the choice of reference models which are too demanding. If the reference model is sensibly chosen (guidelines for this can be found in the cited literature) good stable approximations will be usually obtained. Moreover, if the reference models satisfy robustness criteria then so will the resulting closed loop (3).
5.2
Measurement aspects
The classical control loop has unity feedback. This is well justified when two conditions are satisfied, namely i) the feedback dynamics are much faster than the process dynamics, and ii) the steady-state gain of the feedback path equals one. Whereas the second requirement is usually met after instrument calibration (more on this later), the first condition cannot be always satisfied. In many cases the dynamics of the feedback path are not negligible compared with the process dynamics. Sometimes the sensor itself has time constants of the order of magnitude of the process. In other cases the sensor dynamics might be significantly faster, but the installation of the sensor to the process significantly reduces the sensor response. For instance, a temperature sensor which has to be fitted in a jacket in order to prevent corrosion or exeedingly high temperatures has its dynamics significantly altered. Another common situation is when the signal provided by the transducer needs to be electronically manipulated. This is the case of modulating, demodulating and filtering circuits which always lag the signal being fedback. The algorithm developed in this paper aims to provide a means of taking into account such (usually neglected) dynamics whenever this seems convenient. It is important to realize that in order for the closed-loop system to be able to track step changes in the reference without steady-state errors, the closed-loop 6
system steady-state gain must equal one, that is c0 = 1. Also, I(s) should be such that n0 /u0 = 1. In other words, the instrument should be free of any bias. If the instrument is inaccurate, this will usually result in a steady state off-set. Thus in what follows it will be assumed that n0 /u0 = 1 which means that any bias in the measurement has been removed by correctly calibrating the instrument. The first Pad´e coefficient of O(s) in (9) is c0 = x0 /α0 = (u0 a0 g0 )(n0 a0 g0 + u0 b0 h0 )−1 . For a system with a pole at the origin (h0 = 0) the first Pad´e coefficient becomes c0 = u0 /n0 . Because n0 /u0 = 1, it is seen that there is no need for using the first restriction in equation (20) since this will be always matched as long as the measurement is unbiased. Consequently an additional constraint can be used as pointed out in the third step of the procedure outlined in section 4. When G(s) has Ni integrators (Ni ≥ 2), the design can be carried out using an auxiliary plant model with only one integrator and Ni−1 poles at −�, where 0 < � � 1 (2).
5.3
Control aspects
One of the obvious applications of the model matching algorithm developed in section 4 is controller design. However, when designing a controller, many aspects, not addressed in this paper, have to be borne in mind. Although it is not our intention to discuss issues such as robustness, disturbance rejection, etc. in this section, a few remarks seem called for. Asymptotic tracking. The condition for the final system to asymptotically track a given input u(t) will depend on the complexity of such an input. For instance, if the closed-loop is supposed to track step inputs then x0 = α0 which is equivalent to imposing that the closed-loop should match the first Pad´e coefficient of a reference model with steady state gain equal to one. Similarly, if the overall system is to track a ramp, then x1 = α1 should be met. This can be achieved in two different ways. The equality x1 = α1 can either be used as a constraint in the set of equations (20) or a reference model with c1 = 0 can be chosen and then require the overall system to match at least the first two Pad´e coefficients. It is reminded that the matching of Pad´e coefficients and Markov parameters is exact and therefore asymptotic tracking can be guaranteed. Disturbance rejection. The key point here is to notice that the transfer function from a disturbance, modeled as an extra signal at the plant input, to the plant output is O(s)/C(s) ≈ H(s)/C(s). As H(s) is known before the set of equations (20) is solved, constraints on H(s)/C(s) can be easily incorporated. From another point of view, the same relation can be used to design a reference model H(s) with desired disturbance rejection properties. 7
Limited energy inputs. It is simple to verify that the transfer function between the set point and the controller output is O(s)/G(s) ≈ H(s)/G(s). This can be used to choose H(s) in cases where there are constraints on the actuating signal (6; 2). Robustness. The best way of achieving robustness in model matching problems is to choose a reference model with the required robustness. Then, provided the matching is sufficiently accurate, the overall system will also be robust (3). As a final remark, it is pointed out that a loop design problem soved by model matching techniques is a two step procedure. The first step is to choose a reference model which should incorporate the desired features intended for the final system. At this point of the design, issues such as robustness, input tracking, disturbance rejection, etc. should be seriously considered. After selecting the reference model, the second and final step can be dealt with, that is, to compute unknown parameters of the overall system such that it matches the given reference model. This paper has been concerned with the second step. However, it is believed that because the second step is achieved by approximate matching, much freedom can be gained in the first.
6
Numerical Examples Consider the process and reference model transfer functions
G(s) =
e−τd s ; τs + 1
H(s) =
e−τd s ωn2 , s2 + 2ζωn + ωn2
where τd and τ are the time delay and time constant, respectively and ωn = 1 and ζ = 0.7. Also, the feedback path dynamics will be modeled by 1 . (11) 0.5s + 1 The pure delay was modeled by a second-order Pad´e approximant for desing purposes only, and the actual delay was used in the simulations. Taking τd = 1 s and τ = 0.2 s and choosing P = 4, M = 0, p¯ = 1 and m ¯ = 2, the algorithm which does not take into account the dynamics of the feedback path (modeled by equation (11)) yields a controller which results in an unstable closedloop. In this case, because the feedback dynamics are significant compared to the process dynamics, different values of P and M , or a different reference model does not avoid the instability of the final system. Taking the same parameters as above, and using (20) which does take into account I(s), results in the following controller I(s) =
8
C1 (s) =
7.8272s + 4.9981 . (20s + 14.4944)s
(12)
The step responses of H(s) and of the closed-loop system controlled by C1 (s) are shown in Figure 2. Considering τd = 0.5 s and τ = 0.4 s and taking the same values of P, M, p¯ and m ¯ as above, the original algorithm and equation (20) were used to design closed-loop systems. The respective compensators are
C2 (s) =
4.1229s + 18.8396 ; (10s + 35.7952)s
C3 (s) =
11.2310s + 11.4776 . (20s + 27.5463)s
Thus C2 (s) is the compensator derived assuming unity feedback whereas C3 (s) takes into account the dynamics in the feedback path. The step responses of the closed-loop systems obtained with C2 (s) and C3 (s) are shown in Figure 2 from which the improvement attained is clear. Finally, figures 3 and 4 illustrate the performance of the new algorithm compared to the original algorithm when the dynamics of the feedback path are varied. To produce both figures the process model G(s) was used. In order to assess the matching quality, the following time domain index was used �∞ (yd − y)2 dt Is = 100 × �0 ∞ , (13) 2 dt (1 − y) 0
where yd and y are the reference model and final closed-loop step responses, respectively. In Figure 3 the feedback dynamics were assumed to be like in equation (11). The time constant of the feedback path was then normalized with respect to the process time constant and varied within the range shown in the figure. Figure 4 was obtained in a similar way. In this case, however, a time delay was appended to the feedback path model, and the pure time delay was varied. In the figure, the time delay has been normalized with respect to the process time constant. Concerning this figure, two remarks are in order. First, it should be pointed out that the feedback dynamics included both a first order lag with a fixed time constant, see (11), and a varying time delay. Second, the discontinuity observed in the upper curve indicates that for time delays greater than 3.8, the closed-loops designed with the original algorithm become unstable, an undesirable problem readily avoided by the procedure developed in this paper.
9
7
Conclusions
This paper has presented a new algorithm for solving the approximate model matching problem in cases where the dynamics of the feedback path cannot be neglected. Numerical examples discussed in the paper have been used to show that if a compensator is designed neglecting the feedback path dynamics and if such dynamics are significant, the overall performance will not, in general, satisfy the design requirements. Moreover, the closed-loop could easily become unstable in such cases. The algorithm employs the concept of moment matching to perform model matching. This has advantages such as i) computational simplicity and ii) the models being matched need not have similar structures. Consequently both the controller and the reference model can be chosen rather freely thus simplifying the design. If the dynamics of the feedback path are taken into account in the design, the performance of the overall system can usually be significantly improved. Acknowledgments This work has been partially supported by FAPEMIG, PRPq/UFMG and CNPq. The author is indebted to J.F.N. Carvalho, G.S. Medeiros and C.A.C. Rocha for programming assistance.
References [1] L. A. Aguirre. Computer-aided analysis and design of control systems using model approximation techniques. Computer Methods in Applied Mechanics and Engineering, 114(3/4):273–294, April 1994. [2] L. A. Aguirre. Matrix formulae for open and closed-loop approximate model matching in frequency domain. Int. J. Systems Sci., 26(11):2069–2089, 1995. [3] L. A. Aguirre. Robust reference models for delayed systems. Proc. Instn. Mech. Engrs. Part I, 208(2):197–199, 1994. [4] D. M. Alter and T. C. Tsao. Two-dimensional exact model matching with application to repetitive control. ASME Journal Dynamic Systems, Measurement and Control, 116():2–9, 1994. [5] B. S. Chen and T. Y. Yang. Robust optimal model matching control design for flexible manipulators. ASME Journal Dynamic Systems, Measurement and Control, 115():173–178, 1993. 10
[6] C. T. Chen and B. Seo. The inward approach in the design of control systems. IEEE Trans. Education, 33(3):270–278, 1990. [7] B. De Moor, J. David, J. Vandewalle, M. De Moor, and D. Berckmans. Tradeoffs in linear control system design: a practical example. Optimal Control Applications & Methods, 13():121–144, 1992. [8] Y. T. Hsu, Y. T. Juang, and T. P. Tsai. Lead-lag compensator design by the Hough transform. Systems & Control Letters, 20():365–372, 1993. [9] T. N. Lucas and I. F. Beat. Model reduction by least-squares moment matching. Elect. Lett, 26(15):1213–1215, 1990. [10] R. H. Middleton. Trade-offs in linear control system design. Automatica, 27(2):281–292, 1991. [11] K. D Minto, J. H. Chow, and J. W. Bessler. An explicit model-matching approach to lateral-axis autopilot design. IEEE Control System Magazine, 10(4):22–28, 1990.
Appendix Denoting O(s) = P (s)/Q(s), where P (s) = x0 + x1 s + . . . + xp¯+¯q+¯y sp¯+¯q+¯y ,
(14)
n ¯ +m+¯ ¯ y Q(s) = α0 + α1 s + . . . + αn¯ +m+¯ , ¯ ys
(15)
and
α¯i = min(¯i,¯ y)
x¯i =
� ¯ k=0
min(¯i,¯ y)
β¯i =
� ¯ k=0
�
β¯i + γ¯i 0 ≤ ¯i ≤ p¯ + q¯ + x¯ β¯i p¯ + q¯ + x¯ < ¯i ≤ n ¯+m ¯ + y¯
uk¯
�
a¯j−k¯ g¯i−¯j , ¯i = 0, 1, . . . , p¯ + q¯ + y¯ ,
(17)
b¯j−k¯ h¯i−¯j , ¯i = 0, 1, . . . , n ¯+m ¯ + y¯ ,
(18)
¯ ¯i−¯ ¯ j=max(k, q)
uk¯
¯ min(¯i,¯ p+k)
¯ min(¯i,m+ ¯ k)
�
¯ ¯i−¯ ¯ j=max(k, n)
(16)
11
and min(¯i,¯ x)
γ¯i =
� ¯ k=0
nk¯
¯ min(¯i,¯ p+k)
�
¯ ¯i−¯ ¯ j=max(k, q)
a¯j−k¯ g¯i−¯j , ¯i = 0, 1, . . . , p¯ + q¯ + x¯ .
(19)
Model matching in the sense of Lemma 4.1 is uniquely given by the solution of the following set of simultaneous linear equations
α0 ck¯
x � �0 �min(k,¯ ¯ n+m+¯ ¯ y) x − α c ¯ ¯ ¯ ¯ = ¯ j k− k j j=1 ¯ n+m+¯ ¯ y) − �min(k,¯ α¯c¯ ¯ ¯ j=1
j k−j
k¯ = 0 0 < k¯ ≤ min(¯ p + q¯ + y¯, P − 1)
p¯ + q¯ + y¯ < k¯ ≤ P − 1, if P − 1 > p¯ + q¯ + y¯
1 = αn¯ +m+¯ ¯ y xn¯+¯ ¯ m+¯ y−k � � �min(k−¯ ¯ ν ,¯ n+m+¯ ¯ y) x − α m ¯ ¯ ¯ ¯ ¯ n ¯+¯ m+¯ y−j k−j n ¯+¯ m+¯ y−k j=1 mk¯ = �min(k−¯ ¯ ν ,¯ n+m+¯ ¯ y) − ¯j=1 αn¯+¯ ¯ ¯ m+¯ y−¯ j mk− j
12
k¯ = ν¯ ν¯ = (¯ n + m+ ¯ y¯)−(¯ q + p¯+ y¯) ¯ ν¯ < k ≤ min(¯ n + m+ ¯ y¯, ν¯ +M −1) n ¯ + m+ ¯ y¯ < k¯ ≤ ν¯ +M −1
if ν¯ + M − 1 > n ¯+m ¯ + y¯
(20)
Figures 2 to 4
1
0.5
0 0
1
2
3
4
5 time
6
7
8
9
10
Figure 2: Step responses of (—) H(s) with τd = 0.5 s and τd = 1 s, (-·-) closed-loop with C1 (s), (- -) closed-loop with C2 (s) and · · · closed-loop with C3 (s).
13
Figure 3: Logarithm of matching quality index (13) as a function of the feedback path time constant normalized with respect to the process time constant. (— bottom) closed loop designed with new algorithm, (· · · top) closed-loop designed disregarding feedback dynamics.
14
Figure 4: Logarithm of matching quality index (13) as a function of the feedback path time delay normalized with respect to the process time constant. (— bottom) closed loop designed with new algorithm, (· · · top) closed-loop designed disregarding feedback dynamics.
15