A New Closed-loop Identification Method of a ... - advantech greece

0 downloads 0 Views 351KB Size Report
Abstract — A procedure for the closed-loop identification ... closed-loop system with unity feedback is given by: ... Hammerstein-type System with a Pure Time.
7

3URFHHGLQJVRIWKHWK0HGLWHUUDQHDQ&RQIHUHQFHRQ &RQWURO $XWRPDWLRQ-XO\$WKHQV*UHHFH

A New Closed-loop Identification Method of a Hammerstein-type System with a Pure Time Delay Edin Drljevića, Branislava Peruničićb, Željko Jurićc, Member of IEEE

Abstract — A procedure for the closed-loop identification of a class of Hammerstein type nonlinear plants with a pure time delay in the linear part, based on a generalization of the well-known Ziegler-Nichols' (ZN) experiment, is proposed. It provides a simultaneous estimation of the linear plant dynamic, input-output approximate model of the non-linear part and value of the time delay. As in the ZN method, only a suitable controller is needed for experiments. Tuning of PID controller based on the obtained plant model is compared with PID tuning recommended by Ziegler-Nichols method and clear advantage of knowledge of the plant model is demonstrated. Keywords — Closed-loop, Hammerstein, identification, nonlinear, pure time delay, oscillations, PID.

T

I. INTRODUCTION

HE experimental methods for the identification of the transfer function of an unknown linear plant may be classified into two categories: open-loop methods, which require the isolation of the plant from the control loop, and closed-loop methods, which work in a closed loop with a controller or some other device. The oldest closed-loop method is well-known Ziegler-Nichols' (ZN) method [1] that is mainly a PID controller tuning method, although it allows a rough estimation of the basic dynamic parameters of a plant. Åström and Hägglund proposed a similar method replacing the P controller with a relay [2]. It has an advantage that the amplitude of the oscillations can be controlled. However, it does not provide any more information than ordinary ZN method. For a better tuning of a PID controller, or for design and tuning of more advanced controllers, more information about the plant is usually required. In order to solve this problem, new closed-loop methods are proposed in the past providing more detailed models of the plant. Among such methods are the Relay and Hysteresis method [2], the Two Channel Relay (TCR) method [4], the Auto Tune Variation (ATV) method [5],

a Faculty of Electrical Engineering, University of Sarajevo, Bosnia and Herzegovina (phone: 387 33 658540, e-mail: [email protected]). b Faculty of Electrical Engineering, University of Sarajevo, Bosnia and Herzegovina (phone: 387 33 666421, e-mail: [email protected]). c Faculty of Science, University of Sarajevo, Bosnia and Herzegovina (phone: 387 33 457789, e-mail: [email protected]).

and its improvement, known as ATV+ method [6]. All these methods are based on relays, which can cause considerable errors due to unavoidable presence of the nonlinearity in the loop. Also, non-standard additional equipment is needed to implement the method. A new method for the closed-loop identification based on enforced oscillations that requires only standard equipment in the control loop is described in [7]–[10]. It does not use nonlinear elements at all, so there are no errors introduced by their presence. One important limitation of practically all closed-loop identification methods is the assumption that the plant itself is linear. If the plant is not linear, these methods may show completely incorrect results, especially if the method is based on the frequency response of the plant. This paper describes a frequency-based closed-loop identification method that may be applied for some plants having linear dynamic without finite zeros but with pure time delay, and a non-inertial nonlinearity at the plant input. The paper gives an elaborate approach to the frequency-based closed-loop identification of such plants, and it is an extension of ideas presented in [11]. II. THE BASIC APPROACH FOR THE LINEAR CASE Although the aim of this paper is the identification of the nonlinear Hammerstein-type models with pure time delay, it is necessary to briefly recall the procedure for purely linear case first, as described in detail in [7]. Suppose that the plant controller has a transfer function GR(s, Λ) where Λ is a vector of tunable parameters. It will be assumed here that the controller is able to stabilize the plant. The plant itself may be unstable. If G(s) is the transfer function of the plant, the transfer function of the closed-loop system with unity feedback is given by: (1) W(s, Λ) = G(s) GR(s, Λ) / [1 + G(s) GR(s, Λ)] To apply the method, the boundary of the closed-loop stability region must be reachable by changing the controller parameters. Here it will be also assumed that undamped oscillations are permitted in the system. The procedure when this assumption does not apply is described in detail in [7]. If sustained undamped oscillations with a frequency ω = ω* arise for the controller setting Λ = Λ*, then W(s, Λ*) has a pole s = jω*. Therefore, we can use the following equation:

7

3URFHHGLQJVRIWKHWK0HGLWHUUDQHDQ&RQIHUHQFHRQ &RQWURO $XWRPDWLRQ-XO\$WKHQV*UHHFH

G(jω*) = –1 / GR(jω*, Λ*). (2) Since the value of the controller transfer function may be calculated, the outcome of the experiment identifies uniquely a point on the Nyquist curve G(jω*). It is easy to show that if Eq. (2) may be satisfied for one setting Λ = Λ*, then there exists an infinite set of pairs (ω*k, Λ*k) that also satisfy Eq. (2). Hence, it is possible to identify as many points on the Nyquist curve as the controller settings allow. For example, with a PI controller it is possible to identify points in the third quadrant, and another type of controllers may be used to obtain points in other quadrants. Sometimes, the knowledge of few characteristic points on the Nyquist curve is all that is needed for design for simple types of plants that do not demand a high quality tuning. But, these points may be also used for the parametric identification of the transfer function as well, assuming that a model of the transfer function is chosen in advance. Such procedures for some general models of transfer functions with various degrees of complexity are described in detail in [7]–[10]. Here, it will be recalled the procedure for a simple but still a quite general case, when an all-poles transfer function of the plant may be expressed as G(s) = 1 / PN(s, Π) assuming that PN(s, Π) is a polynomial given by PN(s, Π) = p0 + p1 s + p2 s2 + ... + pN sN. (3) Here, Π is a vector of unknown model coefficients pi, i = 0..N. Under such assumptions, Eq. (2) becomes PN(jω*, Π) = –GR(jω*, Λ*). (4) Eq. (4) is linear in all unknown coefficients that are represented by Π. In fact, after separating real and imaginary parts of Eq. (4), two independent equations are obtained. So, it is enough to collect ⎣ N/2 ⎦ + 1 experimental pairs (ω*k, Λ*k) to determine uniquely all unknown coefficients. In the next section, this approach will be extended to some nonlinear plants having the nonlinear element only at its input. One such example is a linear plant with a nonlinear actuator. III. THE EXTENSION FOR NON-LINEAR CASES WITH PURE TIME DELAY

It is known that all frequency-based methods may produce completely wrong results even in a presence of relatively weak nonlinearity. The situation is even worse if a pure time delay is introduced in the control loop. This is also true for the approach described in the previous paragraph. But, it may be extended to some non-linear plants where pure time delay is present. It will be assumed that the plant may be represented as a non-linear model of Hammerstein type, with a pure time delay i.e. by a non-inertial nonlinearity described by a input-output relation y = f(x), followed by a pure time delay block e-τs, and a linear all-poles block with transfer function G(s). The nonlinearity may be described by its describing function

N(a) =

1 aπ



∫ f (a sinu) sinudu

(5)

0

It is known that the describing function concept may be applied if the plant input is zero (i.e. when the controller set point is zero, and the plant is not astatic), else the definition of N(a) should be slightly modified, as shown in [12]. Structure of the control loop mentioned above is shown on Fig. 1. Plant

y0 Controller GR(s, Λ)

a

Nonlinear N(a)

Linear G(s)

e-τS

A

y

Fig. 1: Principal structure of the control loop

If a controller setting Λ = Λ* producing sustained periodic and nearly sinusoidal oscillations at the plant input with a frequency of ω = ω* and amplitude a = a*, the principle of harmonic balance gives the following equation: 1 + N(a*) G(jω*) e-τjω* GR(jω*, Λ*) = 0. (6) Note, however, that Eq. (6) holds only approximately, because the principle of harmonic balance is just an approximate principle, and it works quite well only under the assumption that the plant dynamic is strongly lowpass dynamic. It is assumed that the plant satisfies this condition also. From Eq. (6) it follows G(jω*) = –1 / [N(a*) GR(jω*, Λ*) e-τjω*]. (7) If the plant nonlinearity f(x) is known in advance, e.g. when f(x) is a known input-output relation of an actuator, or when f(x) is obtained by some steady-state open-loop experiment, Eq. (7) may be used to identify a point on a Nyquist curve of the linear part of the plant. Namely, N(a*) may be calculated from known f(x) using numerical integration. Afterwards, the obtained points may be used for the parametric identification of the linear part of the plant and pure time delay. So, it is possible to perform the identification of the linear part and pure time delay of the plant without inserting additional elements in the loop to compensate the nonlinearity. Basically, this is the same approach as used in relay-based identification methods (TCR, ATV, etc.), except that here the nonlinearity is not caused by inserting an extra equipment (e.g. a relay), but it is a part of the plant itself. However, Eq. (6) may be used also for the parametric identification even when f(x) is not known in advance. In this case it is needed to choose in advance some model of the describing function N(a) = N(a, Θ) that depends of the unknown vector of parameters Θ. Under such assumptions, Eq. (6) can be written as: P(jω*, Π) + N(a*, Θ) GR(jω*, Λ*) e-τjω* = 0. (8) Using the obtained experimental data, it is possible to collect enough equations to calculate all unknown coefficients of unknown vectors Π and Θ, as well as value of pure time delay τ. Of course, these equations may be hard to solve for arbitrary models of N(a). Also,

7

3URFHHGLQJVRIWKHWK0HGLWHUUDQHDQ&RQIHUHQFHRQ &RQWURO $XWRPDWLRQ-XO\$WKHQV*UHHFH

the solving of these equations may be quite complicated due to presence of unknown time delay τ. So, suppose for a moment that the value of τ is known in advance. Under such assumptions, the obtained equations may be solved easily for some appropriate models of N(a). For example, it is very reasonably to choose the model N(a, Θ) = θ1N1(a) + θ2N2(a) + ... + θKNK(a) (9) where Nk(a), k = 1..K are some suitable pre-selected functions. Assuming that τ is known in advance, such model leads to the linear set of equations that may be solved very easily. Now, the first problem is how to find an adequate set of basis functions Nk(a), k = 1..K. If the function f(x) is continuous, it may be approximated reasonably well with a polynomial in a range of interest, especially if f(x) is a smooth function. Straightforward calculation shows that the corresponding describing function N(a) will be also a polynomial in a. Additionally, if the f(x) is an odd function, N(a) will be a polynomial of even order. So, it may be assumed that in most cases, for the purpose of parametric identification, the basis functions Nk(a) may be taken as Nk(a) = a2(k–1), k = 1..K. The polynomial approximation of N(a) in a range of interest may be suitable even if f(x) is not continuous, since N(a) is always a continuous function. Assuming the chosen polynomial model of N(a, Θ), Eq. (8) breaks into a real and an imaginary part providing in this way two independent equations. Further, it is possible to set p0 = 1 without any loss of the generality, because the overall plant gain will be incorporated in N(a). In order to identify all unknown parameters it is needed to perform several experiments so that a determined of equations can be formed. The second problem is how to find the right value of τ, as it is not known in advance. To solve this problem, the obtained set of equations has to be solved for various preselected values of τ from a range of expected values of τ in steps of a suitable size. Such range may be determined from some a priori knowledge of a plant. For example, a ZN experiment may be used to estimate an upper bound of τ. Now, the question is how to determine when a right value of τ is found. If there is just a minimal amount of experimental data that is necessary to find all unknowns uniquely, there is no chance to find a right value of τ, because for each assumed value of τ, calculated unknowns will satisfy Eq. (8) perfectly. Thus, it is necessary to collect more experimental data, and solve the obtained overdetermined system of equations in MLS sense. Then, the total mean square error (MSE) will be small only if experimental data satisfy (23) well in MLS sense, which may be true only when assumed value of τ is close to the true value of plant pure time delay. In ideal case, it would have minimum just for the exact value of τ. So, it is reasonable to choose the value of τ that gives the smallest value of MSE as the true value of τ.

The method described above is illustrated using MATLAB SIMULINK simulation examples.

two

IV. EXAMPLES The presented theory will be demonstrated by finding the system models that include all-poles linear transfer function, the value of the pure time delay and the polynomial approximation of the nonlinearity. To demonstrate the usefulness of a knowledge of a valid plant model, a PID controller will be preliminary tuned at first using the Ziegler-Nichols recommendation. Afterwards, more advanced tuning based on Haalman method will be used, based on identified linear part of the plant, ignoring the nonlinearity. Finally, the additional fine tuning is performed based on the simulation of the identified plant, including the non-linear part. In all cases, the obtained responses will be compared to show the obvious advantage of acquired knowledge of the plant model. Note also that when the plant model is known, it is possible to use many other known techniques for PID loop optimization, so that the result of advanced controller tuning mentioned above represents only one of many possible cases. In the first example, the dynamic of the plant is described by a second-order all-poles zero-type linear block with pure time delay G(s) = e–0.5 s / (8 s2 + 4 s + 1) (10) preceded by a non-inertial nonlinear block having the following input-output relation: y =1.2 x – 0.01 x3. (11) This input-output relation, illustrated on Fig. 2, is intended to model a saturation caused by an actuator. y x

Fig. 2: The quasi-saturation nonlinearity

Strictly speaking, this is not a true saturation-type characteristic, because the gain dy/dx becomes negative for |x| > 6.3246 and, in this region, the output falls when the input rises. Such behavior is not realistic in practice, so it will be assumed here that the value of the plant input will never allow such values of x. Under such an assumption, the used input-output relation may model the saturation behavior reasonably well. In this example, it is assumed that no information about plant behavior is available in advance, i.e. linear part of plant as well as nonlinearity and plant pure time delay are all the aims of the identification.

7

3URFHHGLQJVRIWKHWK0HGLWHUUDQHDQ&RQIHUHQFHRQ &RQWURO $XWRPDWLRQ-XO\$WKHQV*UHHFH

The experiments are performed using an ideal PI controller with the transfer function GR(s, Λ) = λ1 + λ2/s, Λ = {λ1, λ2}. All four experiments are performed using zero set point of the controller, and the disturbance in the loop is introduced by making a short pulse change in the controller set point. The obtained data are given in Table 1. TABLE 1.

Experiment I II III IV

λ1* 2 3 4 8

λ2* 1.329 1.64 1.871 1.64

T* 11.25 9.688 8.664 6.24

function x = f –1( y) of the identified model of the nonlinear part of the plant. This makes the overall system linear as much as the identification on the nonlinearity in the system is precise. The step response of the system with the compensator is presented by third curve on Fig. 3. The compensator additionally improves the system response, and thus advantage of the plant identification is clearly shown again.

A* 1.612 2.291 2.923 2.765

The parameter T* is determined by inspecting a plant output and then ω* is calculated as ω* = 2π/T*, while a* is determined by inspection from the graph of the plant input. Assuming that the plant order is N = 2 and that the describing function of unknown nonlinearity is assumed in form N(a) = θ1 + θ2 a2 + θ3 a4 (12) the following equations are obtained from Eq. (8) after separating its real and imaginary parts: (ω* )3 p1 = CR N(a* ) (13) * 4 (ω ) p2 – (ω* )2 p0 = CI N(a* ) (14) where CR and CI are given in the following form: CR = λ2 cos ω*τ + λ1 ω* sin ω*τ (15) * * * CI = λ1 ω cos ω τ – λ2 sin ω τ (16) Using the obtained results from four experiments, it is possible to form an over-determined set of equations. Solving this system of equations by MLS method gives the following results: p2 = 8.0091, p1 = 6.0088 and p0 = 1 for the linear part of plant; θ1 = 1.2014, θ2 = –0.0073 and θ3 = 0 for the coefficients of the describing function of the nonlinearity modeled by Eq. (12) and τ = 0.5 as the value of the pure time delay. The actual nonlinearity that corresponds to the obtained model of N(a) may be calculated as y = 1.2014 x – 0.00973 x3 using a simple numerical calculation. The power of the proposed identification method is apparent from the results presented above. Namely, both linear and nonlinear parts of plant are identified with high precision, while the pure time delay is identified exactly. The system response to the step function using three different tuning are compared on Fig. 3. First, an ideal PID controller is tuned using Ziegler-Nichols rules based on induced sustained oscillations with the P control. Next, the initial tuning is performed using the Haalman method, ignoring the nonlinear part of the system. The initial tuning is followed by a fine tuning using the obtained plant model. It is possible to do this due to fact that simulation model can be created using obtained results so the real plant is not involved in the process of the fine tuning. Finally, an additional nonlinear element (compensator) is added after the controller to compensate the nonlinearity, as shown on Fig. 4. The compensator is based on a piece-wise linear approximation of the inverse

Fig. 3: System response on step function (Ex. 1)

It is evident from Fig. 3 that the response obtained by usage of ZN rules has an overshot of 60%. Note that in this case even the claim of ZN experiment, i.e. 25% overshot condition is not fulfilled. y0 y Controller GR(s, Λ)

Compensator

Plant

Fig. 4: Structure of control loop with compensator

Even more noticeable results of the comparison are gained if we compare the response of the same system to the short disturbance in the controller set point. This is shown on Fig. 5.

Fig. 5: System response to the disturbance in set point (Ex. 1)

7

3URFHHGLQJVRIWKHWK0HGLWHUUDQHDQ&RQIHUHQFHRQ &RQWURO $XWRPDWLRQ-XO\$WKHQV*UHHFH

In the first example, the advantage of the compensator is not very significant, since the nonlinearity is of the saturation type. In the second example, another nonlinearity is studied, having an increasing marginal gain. The plant dynamic is again described by a secondorder zero-type all-poles linear block with a pure time delay G(s) = e–0.35 s / (1.2 s2 + 2.3 s + 1) (17) preceded by an unknown non-inertial nonlinear block with the following input-output relation: y =x + 0.02 x3 (18) This input-output relation is shown on Fig. 6.

is obviously inferior in comparison with other two responses.

y

x

Fig.6: The nonlinearity with an increasing marginal gain

The experiments are again performed with an ideal PI controller, with the zero set point. The disturbance in the loop is introduced by making a short pulse change in the controller set point. The obtained experimental data are summarized in Table 2. TABLE 2.

Experiment I II III IV

λ1* 1 2 3 4

λ2* 2.0497 2.6143 2.7576 2.3686

T* 6.1625 4.8548 4.0264 3.454

a* 1.8166 2.6614 3.3629 3.8439

It will be assumed again that the plant order is N = 2 and that describing function of unknown nonlinearity is modeled by Eq. (12). Using a MLS method to solve equations based on the data from these four experiments gives p2 = 1.1902, p1 = 2.301 and p0 = 1 for the linear part of plant; θ1 = 1.0014, θ2 = 0.0147 and θ3 = 0 for the coefficients of the model of the describing function and τ = 0.354 as the value of the pure time delay. The actual nonlinearity that corresponds to the obtained model of N(a) may be expressed as y = 1.0014 x + 0.0196 x3. Again, if we compare the system response to the step function with the PID controller tuned using ZN rules and then using Haalman method for PID tuning after linear part and pure time delay of plant is identified, with and without the compensation of the nonlinear part, the superiority of the proposed method is quite clear. Such comparison is shown on Figure 7. In this case compensator does not affect significantly the overshoot, but the settling time is improved. The response of the closed loop when the controller is tuned by ZN rules in this case is not bad as much as in previous example but it

Fig. 7: System response on step function (Ex. 2)

To summarize the comparison of the system responses on different PID tuning techniques, the system response to the short disturbance at the controller set point is shown on Fig. 8. It is evident that PID controller tuned by ZN rules continues to oscillate long after the disturbance is gone, while both compensated and non-compensated case of PID tuning using the proposed method is able to stabilize system as soon as the disturbance is eliminated. Also, it is noticeable that the response of the system when the nonlinearity compensation is introduced gives smaller error in amplitude of the controller set point in comparison with the non-compensated case. Similarly, the settling time in the compensated case is better too.

Fig. 8: System response on disturbance in controller set point (Ex. 2)

V. CONCLUSION A new method for the closed-loop identification of both the linear and the nonlinear part of a Hammersteintype nonlinear model with a pure time delay is proposed. As presented before, the method assumes the following conditions: The linear part of the plant contains only poles and a delay, and it behaves as a low-pass filter. The nonlinearity has a describing function in a form of a linear combination of some pre-selected basis functions.

7

3URFHHGLQJVRIWKHWK0HGLWHUUDQHDQ&RQIHUHQFHRQ &RQWURO $XWRPDWLRQ-XO\$WKHQV*UHHFH

The proposed method has some advantages in comparison to other closed-loop methods. It takes into the consideration unknown non-inertial nonlinearities in the plant, which usually cause severe errors in the most of the other frequency based methods. Its application usually requires only PI or PID controller, without any additional equipment. Also, the method itself uses only linear blocks, so there are no unavoidable errors introduced by presence of non-linear elements, which exist in all closed-loop relay methods. However, the method requires more experimental runs than other methods to obtain reliable results. Due to the lack of space, this paper shows only how to identify a plant whose dynamic may be described using a simple model without finite zeros, and where the noninertial nonlinearity, if not known in advance, may be described well using the polynomial describing function (in a range of interest). The described procedure may possibly be generalized for more complex models with finite zeros. Such generalizations will be the topic of the follow-up papers. REFERENCES [1] [2]

J. G. Ziegler, N. B. Nichols, “Optimal Settings for Automatic Controllers”, Trans ASME, vol. 64, pp. 759–768, 1942. J. K. Åström, T. Hägglund, “Automatic Tuning of Simple Regulators with Specifications on Phase and Amplitude Margins“, Automatica 20, pp. 645–651, 1984.

K. J. Åström, T. Hägglund, “PID controllers“, 2nd ed., Instrument Society of America, 1995. [4] M. Friman, K. V. Waller, “A Two-Channel Relay for Autotuning“, Ind. Eng. Chem. Res. 36(7), pp. 2662-2671, 1997. [5] W. Li, E. Eskinat, W. Luyben, “An Improved Autotune Identification Method”, Ind. Eng. Chem. Res. 30(7), pp. 1530-1541, 1991. [6] C. Scali, G. Marchetti, D. Semino, “Relay with Additional Delay for Identification and Autotuning of Completely Unknown Processes”, Ind. Eng. Chem. Res. 38(5), pp. 1987–1997, 1999. [7] Ž. Jurić, B. and Peruničić, “A new method for the closed-loop identification based on the enforced oscillations”, IASTED MIC proceedings, pp. 85–91, Grindelwald, Switzerland, 2004. [8] Ž. Jurić, B. Peruničić, “An Extension of the Ziegler-Nichols' method for Parametric Identification of Stanard Plants”. IEEE MELECON 2004 proceedings, Dubrovnik, Croatia, 2004. [9] Ž. Jurić, B. Peruničić, “A method for Parametric Closed-loop Identification of Plants with Finite Zeros”,.IEEE MED'04 proceedings, Kuşadasi, Turkey, 2004. [10] Ž. Jurić, B. Peruničić, “A method for Closed-loop Identification of Plants with Unknown Delay“, IFAC TDS'04 proceedings, Leuven, Belgium, 2004. [11] Ž. Jurić, B. Peruničić, B. Lačević, “Closed-loop Identification of Some Linear Plants with a Static Nonlinearity”, REDISCOVER 2004 proceedings, pp. 1-65 –1-68, Cavtat, Croatia, 2004. [12] Ž. Jurić, B. Peruničić, “Simultaneous Closed-loop Identification of Nonlinear and Linear part of a Hammerstein-type Nonlinear Model”, EUROCON 2005 proceedings, Belgrade, Serbia & Montenegro, 2005. [3]