2015 European Control Conference (ECC) July 15-17, 2015. Linz, Austria
Robust Model Predictive Control Using Iterative Learning 1
S. Hassan HosseinNia1,2 Department of Precision and Microsystem Engineering, Delft University of Technology, Delft, The Netherlands 2 ABB Corporate Research, V¨ aster˚as, Sweden e-mail:
[email protected]
Abstract—In this paper we use Iterative Learning Control (ILC) to improve the performance of the Model Predictive Control (MPC) in presence of model mismatch and repetitive disturbances. An MPC is designed for the nominal system using a prediction model including a Kalman estimator. The ILC will be activated when an mismatch happen in the identified model and the real system and/or a disturbance occurs. In this case the repetitive strategy will reduce the error by learning form previous execution. Indeed, it is a design of master and salve control, where the uncertain system is a slave which tries to follow the master dynamics and improve it in each iteration. A model of the inverted dynamics of master system in open loop is used to design the ILC. Finally, the performance of the designed controller is verified using injection molding process. Index Terms—Model Predictive Control, Feedforward control, Iterative learning control.
I. I NTRODUCTION Model Predictive Control (MPC), also referred to as Receding Horizon Control and Moving Horizon Optimal Control, has been widely adopted in industry for advanced process control [1], [2], [3], [4], [5], [6], [7], [8], [9]. MPC is a control technology which utilizes a model of the system to predict the process output over some future horizon and solve a quadratic optimization problem with the control signal as decision variables. The ideas of MPC can be traced back to the 1960s [10], but interest in this field started to surge only in late 1970s introducing IDCOM [11], Dynamic Matrix Control (DMC) [12], and Generalized Predictive Control (GPC) [13], [14]. These algorithms were based on step or impulse response models. Since the state-space approach provides a unified framework for discussion of the various predictive control algorithms and is well suited for stability analysis, interest in MPC implementations based on state-space models were created in [15], [16]. Design of the MPC, essentially, includes the development of an effective plant model that can be used for predicting the future output of the plant with good accuracy. Therefore, MPCs rely on dynamic models of the process, most often linear empirical models obtained by system identification. Although, the major part of industrial MPC is generation of data and identification of models, system identification and model predictive control have largely developed as two separate disciplines. In [17], [18], [19], [20], [21], MPC is designed for state-space models. In this paper, we use the 978-3-9524269-4-4 © EUCA
same strategy as in [20], [21], to design an MPC and then improve the performance robustness using Iterative Learning Control. Iterative learning control (ILC) is an open-loop control strategy that aims at improving the tracking performance of a system executing the same task repeatedly under the same operating conditions. The system input is updated iteratively, i.e., from trial to trial, to improve the accuracy of the desired motion [22], [23]. Using this technique, accurate tracking can be obtained even when the system dynamics is uncertain. Reported applications of ILC include machine tool axes [24] and wafer stage motion systems [25], which involve linear motor systems that typically suffer from cogging disturbances [26], [27]. Besides motion control, ILC was also successfully applied in other domains, such as active noise control [28], [29] and chemical process control [30]. A review of reported strategies and applications can be found e.g. in [31], [32], [33], [22]. There has been some works reported in the iterative learning MPC [34], [35], [36], [37] in which the algorithm utilizes model prediction errors from previous runs to compensate system model disturbance, reduces the effects of unknown disturbances with prediction model and improves the control performance of repeatable process, within the framework of MPC. Given context, the main objective of this paper is to continue the investigation on robust structures which allows MPC to track the desired output in presence of repetitive disturbance and/or in the case of model mismatch, in this case using ILC. Particularly, the MPC is designed for the nominal system in which the incremental prediction model is considered including a Kalman estimator and it helps the designed controller faster against the model mismatch and measured disturbances. Even though, using the designed MPC may guarantee the robustness of the system but the regarding the uncertainty the output can be different form the nominal response. Therefore, considering nominal system as master and real system as slave the ILC will synchronize the real system to the nominal one as the iteration exceeds. The rest of the paper is organized as follows. In the next section, we design an MPC based on prediction model including the Kalman estimator. In Section II the robustness of the designed MPC will be studied using an ILC. To show the performance of the proposed controller, control of a injection
3519
molding process is studied in Section IV. And, finally this paper is concluded in Section V by some remarks and future works. II. MPC D ESIGN FOR S TATE -S PACE F ORM M ODEL In this section, the prediction model is obtained in the state-space and the MPC will be designed for the state-space prediction model. A. Prediction Model Consider following state-space model: xm (k + 1) = Axm (k) + Bu(k) + Bd d(k) + w(k), y(k) = Cxm (k) + v(k)
(1)
Defining ∆u(k) = u(k) − u(k − 1), ∆d(k) = d(k) − d(k − 1), ∆w(k) = w(k) − w(k − 1) and ∆xm (k) = xm (k) − xm (k − 1), equation (1) can be rewritten as: ∆xm (k + 1) = A∆xm (k) + B∆u(k) + Bd ∆d(k) + ∆w(k), (2) y(k + 1) = C∆xm (k + 1) + y(k) + ∆v(k) T Defining new state variable x(k) = ∆xm (k) y(k) , an augmented model can be obtained as follows: x(k + 1) = A x(k) + B∆u(k) + Bd ∆d(k) + Bw ∆w(k) (3) y(k) = C x(k) + ∆v(k) A 0 B Bd where, A = , B= , Bd = and Bw = CA I CB CBd I . C Using (3) as the prediction model rejects any disturbances with constant value since there is an integrator controller. The estimation and the prediction model may for the state space model (3) be represented as: x(k + j + 1|k) = A x(k + j|k − 1) + B∆u(k + j|k)+ Bd ∆d(k + j|k) + K (γ)e(k + j|k) (4) y(k ˆ + j) = C x(k + j|k), j = 0, · · · , N p − 1 K(γ), j=0 where K (γ) = and x(k) = 0, j = 1, · ·· ,Np−1 ∆xˆm (k) y(k) ˆ is states and output estimation, e(k) = y(k) − y(k|k ˆ − 1) is the observer error, N p is the prediction horizon and K(γ) is the Kalman filter gain matrix obtained in which the observer poles of the system are reside inside the circle of radios 0 < γ ≤ 1. Therefore, the observer gain matrix be obtained as: T !−1 T C C C A P R2 + P , (5) K(γ) = γ γ γ γ where, ! T −1 C P = Aγ P − P Cγ R2 + Cγ P Cγ γ P (6) T A + R1 , γ
in which, R1 = E{w(k)w(k)T } and R2 = E{v(k)v(k)T } are covariance of the w(k) and v(k), respectively. It should be
noted that there is no cross correlation between w(k) and v(k). B. Design framework The future control trajectory, and future output are respectively denoted by: ∆u(k) ∆u(k + 1) · ·· ∆u(k + Nc − 1) , and Y = ∆U = y(k + 1|k) · · · y(k + N p |k) where, Nc is control horizon. Based on the state-space model (A , B, C ), the predicted output calculated sequentially using the set of future control parameters: y(k ˆ + 1) = C x(k + 1|k) = C A x(k) + C Bd ∆d(k)+ C B∆u(k) + C K(γ)e(k) y(k ˆ + 2) = C x(k + 2|k) = C A 2 x(k) + C A Bd ∆d(k)+ C A B∆u(k) + C B∆u(k + 1) + C A K(γ)e(k) .. . y(k ˆ + N p ) = C x(k + N p |k) = C A Np x(k) + C A Np −1 Bd ∆d(k)+ C A Np −1 B∆u(k) + · · · + C A Np −Nc B∆u(k + Nc − 1)+ C A Np −1 K(γ)e(k)
(7)
We collect (7) together in a compact matrix form as: Y = Fx(k) + Ee(k) + φd ∆d(k) + φ ∆U (8) CA C K(γ) CA 2 C A K(γ) where, F = . , E = , .. .. . N −1 N p p CA K(γ) CA C Bd C A Bd φd = , and, .. . N −1 p Bd CA CB CA B 2 φ = CA B .. . C A Np −1 B
0 CB CA B .. . C A Np −2 B
0 0 CB .. . C A Np −3 B
Let the objective of MPC be:
··· ··· ··· .. . ···
0 0 0 .. .
C A Np −Nc B
J = (Rs −Y )T Qy (Rs −Y ) + ∆U T R∆U
.
(9)
Np
z }| { where Rs = 1 1 · · · 1 r(k) = R¯ s r(k) and r(k) is set-point signal at time k. In the case of MIMO system (ni input and no output with n states) the matrix φ T φ has dimension ni Nc × no Nc and φ T F has dimension ni Nc × n, and φ T R¯ s equals the last no columns of φ T F. The weight matrices R and Qy are a block matrices with ni and no blocks and has their dimensions T T equal to the dimension of φ φ and φ φ , respectively. T The set-point signal is r(k) = r1 (k) r2 (k) · · · rno (k) as the no set-point signals to the multi-output system. To find the optimal ∆U that will minimize J, by using (8), J is expressed as: J= (Rs − Fx(k) − Ee(k) − φd ∆d(k))T Qy (Rs − Fx(k) − Ee(k) − φd ∆d(k)) −2∆U T φ T Qy (Rs − Fx(k) − Ee(k) −φd ∆d(k)) + ∆U T φ T Qy φ + R ∆U (10)
3520
From the first derivative of the cost function J: ∂J ∂ ∆U
= −2φ T Qy (Rs − Fx(k) − Ee(k) − φd ∆d(k)) + 2 φ T Qy φ + R ∆U, (11)
the necessary condition of the minimum J is obtained as ∂J ∂ ∆U = 0, from which we find the optimal solution for the control signal as: −1 T ∆U = φ T Qy φ + R φ Qy (Rs − Fx(k) − Ee(k) − φd ∆d(k)), −1 T (12) It is obvious from (12), the φ T Qy φ + R φ Qy Rs , −1 T −1 T T T φ Qy φ + R φ Qy E and, φ Qy φ + R φ Qy φd correspond to the set-point change, error of tracking, −1 T and disturbance, respectively, while, φ T Qy φ + R φ Qy F corresponds to the state feedback control within the framework of predictive control. All depend on the system parameters, hence are constant matrices for a time-invariant system. Because of the receding horizon control principle, we only take the first element of ∆U at time k as the incremental control, thus Nc
}| { z ∆u(k) = I O · · · O −1 T φ T Qy φ + R φ Qy (R¯ s − Fx(k) − Ee(k) − φd ∆d(k)), = Kr r(k) − Ke e(k) − K f f ∆d(k) − Kmpc x(k)
(13)
where I and O are Identity and zeros matrices with dimension ni × ni , Kr , Ke and K f f are the first ele−1 T −1 T ment of φ T Qy φ + R φ Qy Rs , φ T Qy φ + R φ Qy E and, −1 T φ T Qy φ + R φ Qy φd , respectively, while, Kmpc is the first −1 T row of φ T Qy φ + R φ Qy F. It must be emphasized that many available expressions for linear-quadratic controllers misses the term Ke and K f f that arise due to observer gain matrix K(γ) and disturbance gain matrix Bd in (4), respectively. III. ROBUST MPC U SING I TERATIVE L EARNING This section is devoted to the design an ILC in order to guarantee the robustness of the MPC controlled system. A feedback controller reacts to inputs and disturbances and, therefore, always has a lag in transient tracking. It can accommodate variations or uncertainties in the system model but robustness and stability problems can occur since system model/dynamics have to be known to some extend. In addition, ”good” performance can be achieved at the first trial, but no improvement after that. On the other hand, feedforward control can eliminate this lag, but only for known or measurable signals, such as the reference, and typically not for disturbances. This controller performs well only to the extent that the system is accurately known. ILC generates a feedforward control that tracks a specific reference or rejects a repeating disturbance. It is anticipatory and can compensate for exogenous signals, such as repeating disturbances, in advance by learning from previous iterations and does not require that the exogenous signals (references or disturbances) be known or measured. ILC learns feedforward through practice and is highly robust to system uncertainties.
Therefore, we can overcome to the limit cycle problem by adding ILC to general reset controller presented in the previous section. In this paper, we use the advantage of ILC to improve the time response of the system controlled with MPC and reduce the effect of repetitive disturbance. Figure 1 shows the block diagram of the proposed control scheme. As it can be seen the proposed controller is similar to master and slave control where the master system is the nominal system controlled by MPC whereas the slave can be uncertain system with disturbance. It should be noted that the master system can be any desired response considered by operator. In absence of the any uncertainty and disturbance the error between master and slave response is zero then the ILC is not active. But, in the case of uncertain system and/or in presence of disturbance, the error between master and slave will be transferred to ILC control then it will be feedforwarded to the input of the system. Let us now rewrite the dynamics of the system as follows: ( j xmj (k + 1) = Axmj (k) + B umpc (k) + uILC (k) + Bd d(k) + w(k), y j (k) = Cxmj (k) + v(k)
(14) j is where y j is the output, urj is the reset control input, uILC the ILC input, and d is an exogenous disturbance signal that repeats each iteration j, and α1 ∈ R+ is the (fractional) order of the system. It should be mentioned that the open loop transfer function of the system is asymptotically stable. In order to find the open loop transfer function of the system let us define Kmpc = Kx Kr , Kx ∈ Rni ×n , Kr ∈ Rni ×no and recall x(k) = T x(k) ˆ y(k) ˆ , then, rewrite the controller (13) as: ∆u(k) = −Kmpc x(k) − Ke e(k) − K f f ∆d(k) + Kr r(k) = −Kmpc x(k) − Ke (y(k) − y(k)) ˆ − K f f ∆d(k) + Kr r(k) = −Kmpc x(k) − Ke (y(k) − C x(k)) − K f f ∆d(k) + Kr r(k) = (−Kmpc + Ke C ) x(k) − Ke y(k) − K f f ∆d(k) + Kr r(k).
(15)
Recalling (4), equation (15) can be represented in state-space form: x(k + 1) = Ac x(k) + Bcy y(k) + Bcr r(k) + B f f ∆d(k), (16) ∆u(k) = Cc x(k) + Dcy y(k) + Dcr r(k) + D f f ∆d(k),
where, Ac = A − K(γ)C + B (−Kmpc + Ke C ), Bcy = K(γ) − ´ BKe , Bcr = BKr , B f f = −BK f f , Cc = −Kmpc + KeC, Dcy = −Ke , Dcr = Kr , D f f = −K f f . Therefore, the open loop transfer function is G(z)K(z) where, K(z) = (I − z−1 )−1 Cc (zI − Ac )−1 Bcy + Dcy and, G(z) = C(zI − A)−1 B denote the z-transfer function of system and controller, respectively. Next, consider the T-sample sequence of inputs, outputs, and desired output: j uILC (k), k ∈ {0, 1, · · · , T − 1}, j y (k), k ∈ {∆, ∆ + 1, · · · , ∆ + T − 1},
d(k), k ∈ {∆, ∆ + 1, · · · , ∆ + T − 1}, yd (k), k ∈ {∆, ∆ + 1, · · · , ∆ + T − 1},
where, ∆ = 1 sample is system delay assumed in most of
3521
⇢
y(k) = C x(k) + Dv(k) Dx (k + 1) = ADx (k) + BDu(k) + B Dd(k) + Dw( y(k + 1) = CDx (k + 1) + y(k) A 0 B B + Dv(k) where, A = , B= ,B = and B ⇥ ⇤ CA I CB CB Dx (k) y(k) Defining new state variable x(k) = , I . model can be obtained as follows: C mented ⇢ x(k + 1) = A x(k) + BDu(k) + B Dd(k) + B Dw(k Using (??) as the y(k)prediction = C x(k) +model Dv(k) rejects any di turbances with constant co value since there is an integrator 0 known disturbance B B troller.where, In the A case=of A having , B= , B =a feedforwa and CA I CB CB controller i.e. u = B B B B d(k) can improve th I performance . of the controller specially in processes with larg C delay. And the control input is u(k) = u (k) + u (k) whe u (k) denotesUsing the MPC control input. Themodel Blockrejects diagra (??) as the prediction of theturbances closed loop system shown in Fig. withcontrol constant valueissince there is an??. integra Thetroller. estimation and the prediction model may for sta In the case of having known disturbance the a feed space model (??) be represented as: 8 controller i.e. u = B B B B d(k) can impr + j + 1|k) =ofAthe x(kcontroller + j|k) + specially BDu (kin+processes j|k)+ w performance