Design of an Implicit Self-tuning PID controller Based on a GPC Zhe Guan
Toru Yamamoto
Department of System Cybernetics, Graduate School of Engineering, Hiroshima University, Higashihiroshima, Hiroshima, Japan Email: guan-
[email protected]
Division of Electrical, Systems and Mathematical Engineering, Institute of Engineering, Hiroshima University, Higashihiroshima, Hiroshima, Japan Email:
[email protected]
Abstract—Theoretical design on self-tuning proportionalintegral-derivative (PID) controller based on generalized predictive control (GPC) with model-free technique is presented in this study, which enables us to deal with the system both with unknown delay time and unknown or time-varying parameters. Currently, in many control design approaches, constructing the model of the plant has been usually regarded as the first step, then a controller is designed based on the identified model. On the one hand, it is difficult to construct the accurate model and the process is time consuming. On the other hand, the control performance is not always desirable with the presence of errors during the identification of model. Hence, utilizing the on-line or off-line data, to directly design controller especially under lack of accuracy of modeling the process, has been gradually received considerable attention in the recently years. And this study will give you an approach to design the control parameters based on GPC directly from the on-line data, and then converting those parameters to PID parameters from the practical point of view. The proposed method is verified by simulation, where the results demonstrate the efficiency of the proposed method.
With the development of computer technology, many industrial processes containing huge amounts of process data at every time instant are easily conducted. Utilizing those data ,namely the on-line or off-line data, to directly design the controllers, especially under the lack of accuracy of model, has been received considerable attention. Many literatures have been published in terms of focusing on the on-line or off-line data. Among them, the Virtual Reference Feedback Tuning (VRFT) was proposed in 2000 by an Italy researcher, in which designing the controller becomes possible from the input/output (I/O) data. This is the main feature of modelfree technique. Motivated by that, Wakitani et al.(2013) has proposed a tuning strategy that is designing the controller based on generalized minimum variance control (GMVC) with the off-line data. However, two main drawbacks are existed in his literature, one is the GMVC itself is sensitive to the delay time, another one is that scheme relays on the off-line data.
Keywords—Self-tuning, model-free, generalized predictive control, PID controller
This study firstly proposes a scheme that is designing the controller based on generalized predictive control (GPC) with on-line data, which solve the problems mentioned above. The GPC overcomes the problem of stabilizing the plant with unknown delay time. Therefore, the control law of this proposed scheme obtained based on the minimization of GPC criterion is considered. And together with the model free method and recursive least squares algorithm, this study makes a contribution in terms of dealing with unknown delay time and system parameters. Finally, the relationship between GPC law and PID control law is considered. PID controller as a classical control method has still dominated more than 90% process. The major reasons for their wide acceptance are that they are able to deal with a wide range of problems, well-understood control action and ease of implementation. Therefore, it is practical to convert to the PID parameters.
I.
I NTRODUCTION
Model based control(MBC)theory has been fully grown and developed since it appeared in 1960.[1] And many associated aspects such as system identification, robust control and optimal control etc. have been widely used in industrial processes. In applications of MBC theory, modeling the plant is regarded as the first step, or doing the system identification, and then designing the controller based on the plant model obtained by certainty principles.[2] Therefore, modeling or identification is the fundamental step to the MBC theory. However, in the process of modeling, the plant that is developed by utilizing the principle with measured data must have covered the true system and other unwanted elements in terms of bias and variance error. Though the model is built accurately, which means the more effort or cost must be spent. And the industrial processes like thermal process and chemical process have been becoming more complex nowadays. The high-order dynamic systems has already been the obstacle in front of MBC theory. For those reasons, the challenges have been confronted in the traditional MBC theory. Many researchers have turn their attentions to explore new approaches that can avoid those problems. 978-1-4799-7862-5/15/$31.00 © 2015 IEEE
The rest of the paper is organized as follows. In section 2, some reasonable assumptions are listed and the derivation of the control law for the GPC is reviewed. Section 3 presents that the self tuning technique is applied to design the controller based on the GPC by the recursive least square algorithm. Section 4 gives the detail information in converting to PID parameters. A numerical simulation and discussion are shown in section 5. Some remarks end this paper.
II.
R EVIEW OF DERIVATION OF GPC LAW
The control law for the generalized predictive control is reviewed in this section.
E j (z−1 ) = 1 + e1 z−1 + · · · + e j−1 z−( j−1) Fj (z−1 ) = f0j + f1j z−1 + f2j z−2 R j (z−1 ) = r0 + r1 z−1 + · · · + r j−1 z−( j−1) j S j (z−1 ) = s0j + s1j z−1 + · · · + sm−1 z−(m−1)
A. Process model and assumption The discrete-time single-input single-output system is considered. And the control object is described by the Controlled Auto-regressive Integrated Moving Average (CARIMA) model as follows: A(z−1 )y(t) = B(z−1 )u(t − 1) +
ξ (t) Δ
⎫ ⎪ ⎪ ⎬ ⎪ ⎪ ⎭
(7)
Combing the equation (1) with (5) leads to: Fj (z−1 )y(t) + E j (z−1 )ξ (t + j) +E j (z−1 )B(z−1 )Δu(t + j − 1)
y(t + j) =
(1)
(8)
Coupled this with equation (6) gives: where, u(t) and y(t) are the control input and the system output at time t, respectively. z−1 denotes the backward shift operator which indicates z−1 y(t) = y(t − 1) and Δ represents the difference operator given by Δ := 1 − z−1 . ξ (t) is expressed as white Gaussian noise with a mean of zero and a variance of σ 2 . A(z−1 ), B(z−1 ) are the operator polynomials and formulated by A(z−1 ) = 1 + a1 z−1 + a2 z−2 (2) B(z−1 ) = b0 + · · · + bm z−m where some reasonable assumption has to be illustrated for this system as follows: [Assumption] 1) 2) 3)
The integer m, the order of B(z−1 ), is as the priori knowledge and larger than 0. The system structure is fixed but the system parameters A(z−1 ), B(z−1 ) are unknown. The random sequence is input in the first few steps to construct the initial data for recursive least square algorithm.
The generalized predictive control law corresponding to the system (1) is derived based on the minimization of the criterion (3) in the following equation: J
=
{y(t + j) − w(t + j)}2
E j=1
+
N
λ ( j){Δu(t + j − 1)}
2
(3)
where [1, N] denotes the control horizon and prediction horizon. λ ( j) is a user-specified control weighting sequence. The target reference w(t + j) in (3) is as follows: w(t) = w(t + 1) = · · · = w(t + j)
where h j (t) ε (t + j)
Fj (z−1 )y(t) + S j (z−1 )Δu(t − 1) E j (z−1 )ξ (t + j).
:= :=
By rewriting the criterion (3) in vector form:
J = E {y˜ − w}T {y˜ − w} + u˜T Λu˜
(10)
where the vectors are all N × 1 and given by y˜ w u˜ Λ
[y(t + 1), . . . , y(t + N)]T [w(t + 1), . . . , w(t + N)]T [Δu(t), . . . , Δu(t + N − 1)]T diag[λ , . . . , λ ]T .
:= := := :=
(11) (12) (13) (14)
−j
−1
1 = ΔA(z )E j (z ) + z Fj (z ) E j (z−1 )B(z−1 ) = R(z−1 ) + z− j S j (z−1 ) where E j (z−1 )B j (z−1 ) is defined as G j (z−1 ).
y˜ = Ru˜ + h + ε
(15)
where
⎡
r0 ⎢ r1 R := ⎢ ⎣ ... rN
0 r0 .. . rN−1
⎤
0.
⎥ ⎥ ⎦
..
...
(16)
r0
(4)
To minimize the expression (3), the future predicted values of the system outputs y is required. Hence, the two Diophantine equations are introduced. −1
(9)
h := [h1 (t), . . . , hN (t)]T ε := [ε1 (t + j), . . . , εN (t + j)]
j=1
−1
R j (z−1 )Δu(t + j − 1) +h j (t) + ε (t + j)
Then, the equation (9) expresses j steps ahead of prediction can be described in vector form as follows:
B. The derivation of GPC law
N
y(t + j) =
(5) (6)
The minimization of J in (10) gives the control law in vector form: u˜ = [RT R + Λ]−1 RT (w − h).
(17)
Note that the first element of u˜ is Δu(t) given by: Δu(t) = [1, 0, . . . , 0][RT R + Λ]−1 RT (w − h)
(18)
III.
I MPLICIT S ELF TUNING CONTROL BASED ON GPC
According to the conventional self-tuning GPC,[7] the system parameters are first estimated, and the controller parameters are computed based on the estimates. That is, such a schem belongs to the explicit self-tuning controller. In this section, the self-tuning technique is applied to derive the control parameter, namely Fj (z−1 ) and G j (z−1 ) in this proposed method, at every sampling instant by using the recursive least square algorithm. That is , this scheme belongs to the implicit self-tuning scheme. This is a key idea in this paper. Here gives a definition on the symbol F1 (z−1 ,t) that means at sampling instant t the value of F1 (z−1 ). It still holds to extend to other symbols in the rest of the paper. The recursive least square algorithm is given as a equation set below: Γ(t − 1)ψ (k − 1) θˆ (t) = θˆ (t − 1) + ε (t) (19) T 1 + ψ (t − 1)Γ(t − 1)ψ (t − 1) Γ(t) = Γ(t − 1) −
Γ(t − 1)ψ (t − 1)ψ T (t − 1)Γ(t − 1) 1 + ψ T (t − 1)Γ(t − 1)ψ (t − 1)
ε (t) = y(t) − θˆ T (t − 1)ψ (t − 1)
(20) (21)
where θˆ (t) is the estimated control parameters and ψ (t − 1) denotes the past information of input and output, they are both in vector form shown following:
θˆ (t) := [ fˆ0 (t), fˆ1 (t), fˆ2 (t), gˆ0 (t), gˆ1 (t), · · · , gˆm (t)]T
Here, ε (t) denotes the prediction error. From the above recursive least square algorithm, the initial estimated control parameters Fˆ1 (z−1 ,t) and Gˆ1 (z−1 ,t) are available at each sampling instant t, and then the polynomial Fˆj (z−1 ) and Gˆ j (z−1 ) can be obtained by the recursive formula. In the rest of this section the detailed derivation will be shown as follows. The Diophantine equation (5) is considered in terms of both t + j[step] and t + j + 1[step] ahead: 1 =
˜ −1 ) + z− j Fj E j (z−1 )A(z ˜ −1 ) + z−( j+1) Fj+1 E j+1 (z−1 )A(z
˜ −1 ) := ΔA(z−1 ). Subtracting (24) from (25) leads Note that A(z to: 0
˜ −1 ){E j+1 (z−1 ) − E j (z−1 )} = A(z +z− j {z−1 Fj+1 − Fj (z−1 )}
(26)
where, the component E j+1 (z−1 ) − E j (z−1 ) is defined as follows: −j ˜ −1 ) + e j+1 E j+1 (z−1 ) − E j (z−1 ) = E(z j z
(27)
˜ −1 )E(z ˜ −1 ) + z− j {z−1 Fj+1 (z−1 ) = A(z ˜ −1 )e j+1 } −Fj (z−1 ) + A(z j
(30)
(28)
−1
(31)
Recall the Diophantine equation (5) for j = 1 gives: ΔA(z−1 ) = 1 − z−1 F1 (z−1 ). Hence, the equations set can be expressed as follows: ⎫ ⎪ = f0j e j+1 ⎪ j ⎪ j+1 j j ⎬ 1 f0 = f1 − f0 f0 f1j+1 = f2j − f11 f0j ⎪ ⎪ ⎪ ⎭ f2j+1 = − f21 f0j
(32)
(33)
From the equation (27) and (29), the following holds: E j+1 (z−1 ) = E j (z−1 ) + z− j e j+1 j
(34)
And then G j (z−1 ) becomes −1 G j+1 (z−1 ) = {E j (z−1 ) + z− j e j+1 j }B(z )
(35)
The identity E1 (z−1 ) = 1 holds for j = 1 from the expansion E j (z−1 ) in (7). Clearly that: G1 (z−1 ) = E1 (z−1 )B(z−1 ) = B(z−1 )
(36)
Therefore, G j+1 (z−1 ) is rewritten as follows: −1 G j+1 (z−1 ) = {E j (z−1 ) + z− j e j+1 j }G1 (z )
(37)
From (33) and (37), it can be seen that Fj (z−1 ) and G j (z−1 ) can be calculated when the initial values F1 (z−1 ) and G1 (z−1 ) are available . And subsequent parameters in control law (18) are solved, which leads to the control action is able to be obtained. IV.
C ONVERTING TO I-PD PARAMETERS
The main subject of this section is to solve the issue about the relationship between GPC law and the velocity type PID (I-PD) control law. The control action at every sampling instant is available from the above sections. Summarized from section II and section III, the equation (17) is updated in the following form: u(t) ˜ = [R(t)T R(t) + Λ]−1 R(t)T (w − h(t)) where
⎡
r0 (t) ⎢ r1 (t) R(t) := ⎢ ⎣ ...
The equation (26) becomes: 0
(29)
˜ −1 )e j+1 = 0. z Fj+1 (z ) − Fj (z ) + A(z j
−1
Thus, the recursive formulas can be obtained: ⎫ ⎪ e j+1 = f0j ⎪ j ⎪ j+1 j j ⎬ f0 = f1 − a˜1 f0 f1j+1 = f2j − a˜2 f0j ⎪ ⎪ ⎪ ⎭ f2j+1 = −a˜3 f0j
(24) (25)
˜ −1 ) = 0 E(z −1
(22)
ψˆ (t − 1) := [−y(t − 1), −y(t − 2), −y(t − 3), Δu(t − 1), (23) Δu(t − 2), · · · , Δu(u − m − 1)]T
1 =
The equations hold identical so that following relations are given clearly:
rN (t)
0 r0 (t) .. .
rN−1 (t)
0. ..
...
(38)
⎤ ⎥ ⎥ ⎦ r0 (t)
(39)
The corresponding expression of Δu is given in the form of every sampling instant as well. Δu(t) = [1, 0, . . . , 0][R(t)T R(t) + Λ]−1 R(t)T (w − h(t))
(40)
From the expression (40), the expansion shows below: N
p j (t)Fj (z−1 ,t)y(t) + {1 + z−1
j=1
N
step 1 step 2 step 3
p j (t)s0j }Δu(t)
j=1 N
The proposed scheme is summarized as following steps: [Summarization]
(41)
step 4 step 5 step 6
where p j (t) is defined as the part of the right side of the equation (40):
step 7
−
p j (t)w(t) = 0
j=1
[p1 (t), p2 (t), · · · , pN (t)]
V.
:= [1, 0, · · · , 0](R(t)T R(t) + Λ)−1 R(t)T
(42)
For simplicity, the equation (41) can be written below as well: ˜ −1 ,t)y(t) + Δu(t) − F(1)w(t) ˜ F(z =0 1 X
:=
(43)
p j (t)Fj (z−1 ,t)
y(t) = 1.835y(t − 1) − 1.088y(t − 2) + 0.211y(t − 3) −0.004y(t − 4) + 0.211u(t − 4) + 0.036u(t − 5) (52) −0.024u(t − 6) − 0.002u(t − 7) + ξ (t)/Δ
1+
:=
(44)
j=1
f˜0 (t) + f˜1 z−1 (t) + f˜2 z−2 (t)
= X
N
N
p j (t)s0j
(45) (46)
j=1
On the other hand, the velocity type PID control law is given as follows: TD kc · Ts e(t) − kc {Δ + Δ2 }y(t) (47) Δu(t) = TI Ts where e(t) denotes the control error and is defined by the following equation: e(t) := w(t) − y(t)
(48)
S IMULATION AND DISCUSSION
To illustrate the effectiveness of the proposed scheme, numerical simulation will be conducted by the following discrete-time system:
where ˜ −1 ,t) F(z
Set the use-specified weighting matrix and other necessary parameters. Estimate the initial control parameters Fˆ1 (z−1 , k) and Gˆ1 (z−1 , k) from (19)-(23). Solve the polynomial Fj (z−1 ) and G j (z−1 ) with equations (33) and (37). Calculate the vector p j (k) by equation (42). The equations set (51) gives the PID parameters. Obtain the control input with the PID parameters in the previous step. Update k to k + 1 and repeat from [step 2].
Note that ξ (t)/Δ is added as a modeling error and σ 2 is set to 1.0 × 10−4 and the sampling periods Ts = 1[s], the delay time is 3. As mentioned earlier above, in the first steps, the random sequence is input into this system. The equation (23)contained the past information, if there is the random sequence input, the estimated result will be null. Inputing the random sequence and outputting the corresponding response from this system, all the information is reasonable. The proposed scheme is employed in the above system. The predictive step is N = 10, the order of polynomial B(z−1 ) is 5, the user-specified weighting λ = 20. The simulation result are illustrated in Fig.(1)and Fig.(2),respectively.
Additionally, kc , TI and TD are the proportional gain, the integral time, and the derivative time respectively. Ts expresses the sampling time. The definition L(z−1 ) is introduced as follows: Ts TD −1 1+ + L(z ) := kc TI T s 2TD −1 TD −2 z + z (49) − 1+ Ts Ts PID control law (47) can be expressed by L(z−1 )y(t) + Δu(t) − L(1)w(t) = 0.
(50)
Compared the coefficients between (43) and (50), the selftunning I-PD control law based on the GPC law is derived approximately. ⎫ Kp (t) = −( f˜1 (t) + 2 f˜2 (t)) ⎪ ⎪ ⎬ ˜ ˜ ˜ (51) KI (t) = f0 (t) + f1 (t) + f2 (t) ⎪ ⎪ ⎭ ˜ K (t) = f (t) D
2
Fig. 1.
Control result by the proposed self-tuning PID control
In the first few steps, the reason for the oscillation is caused by the random sequence. After the proposed method functions, the performance can be reached the target reference. And the tracking property of the proposed method is desirable as well.
so that the controller can be designed based on the control parameters. Compared these two control results, the effectivess of the proposed method can be verified.
Fig. 2.
The PID parameters used in the system responses.
The trajectories of estimated initial control parameters are illustrated in Fig.(3)and Fig.(4), respectively. It can be seen that the estimated parameters converge to the certain values, which assures the stability of this proposed method.
Fig. 5.
The compared result using the off-line data.
VI.
C ONCLUSION
This paper presented self-tuning PID controller based on generalized predictive control with model-free technique. Since the GPC can enable us to deal with the system with unknown delay time, the proposed method benefited on this characteristic. And the model-free and self-tuning techniques are applied to make designing the controller with the on-line I/O data become possible. The main limitation of the proposed method is the computational complexity in the Diophantine equations at every sampling instant. However, most approaches related to GPC have to deal with this problems. The efficiency of the proposed method has been demonstrated by simulation and the analysis of convergence for the estimated parameters is conducted as well. Fig. 3.
Fig. 4.
The estimated control parameters polynomial Fj (z−1 ).
R EFERENCES
The estimated control parameters polynomial G j (z−1 ).
For the purposed of comparison, the result in the case of using the off-line data is shown as below. In the process of obtaining the off-line data, the PID gains which are computed by using the Chen-Hrones-Reswich (CHR) method are as following: kc = 1.3633,
Ti = 8.5516,
Td = 1.8702.
(53)
The off-line data is obtained firstly based on the above gains. The control parameters is estimated from the off-line data
[1] R.E.Kalman, A new approach to linear filtering and prediction problems, Journal of Basic Engineering82, pp. 34-45(1960). [2] Z.S.Hou and Z.Wang, From model-based control to data-driven control: Survey, classification and perspective, Information Sciences 235, pp. 335(2013). [3] S.Wakitani, S.Hanata and T.Yamamoto, Design and Application of a Direct GMV-Based PID Controller, Proceeding of the 2012 International Conference on Advanced Mechatronic Systems, Tokyo, Japan, pp. 541546(2012). [4] A.Patete, K.Furuta and M.Tomizuka, Self-tuning control based on generalized minimum variance criterion for auto-regressive models, Automatica44, pp. 1970-1975(2008). [5] J.Na, X.M.Ren and Y.Q.Xia, Adaptive parameter identification of liner SISO systems with unknown time-delay, Systems and Control Letters66, pp 43-50(2014). [6] S.Khadraoui, H.Nounou, M.Nounou, A.Datta and S.P.Bhattacharyya, A model-free design of reduced-order controllers and application to a DC servomotor, Automatica 50, pp. 2142-2149(2014). [7] D.W.Clarke, C.Mohtadi and P.S.Tuffs, Generalized Predictive Control - Part I,II The basis algorithm, Automatica, Vol. 23, No. 2, pp. 137160(1987). ˚ om and T.H¨agglund, The future of PID control, Control Engi[8] K.J.Astr¨ neering Practice, Vol.9, pp. 1163-1175(2001). [9] T.Yamamoto, A.Inoue, and S.L.Sharh, Generalized minimum variance self-tuning pole-assignment controller with a PID structure, Proceedings of the 1999 IEEE International Conference on Control Applications, pp. 12-130(1999).