Copyright @ IF AC Advanced Control of Chemical Processes, Pisa, Italy, 2000
TRACKING OF NONLINEAR SYSTEMS VIA MODEL BASED PREDICTIVE CONTROL G. De Nicolao, L. Magni and R. Scattolini 1
• Dipartimento di Informatica e Sistemistica University of Pavia, Via Ferrata 1, 27100 Pavia, Italy e-mail:{denicolao.magni.scatto}@conpro.unipv.it URL: http://conpro. unipv. it/lab
Abstract: This paper presents a new Model Predictive Control (M PC) algorithm for nonlinear systems which solves the output tracking problem for asymptotically constant references. Closed-loop stability of the equilibrium and asymptotic zeroerror regulation are guaranteed. The method is based on the solution of a finitehorizon optimization problem where the future error and control deviation norms are minimized. In the optimization it is assumed that a stabilizing linear dynamic regulator is used at the end of the control horizon, although it is never applied in practice. State and control constraints can be included in the problem and preprogrammed reference signals can be considered. The performances of the method are discussed on the classical Continuous Stirred Tank Reactor (C ST R) control application. Copyright @2000 IFAC Keywords: Model Predictive Control, Tracking, Discrete-time Nonlinear Systems
1. INTRODUCTION
troller to a locally stabilizing control law , and the method proposed in (Parisini and Zoppoli, 1995) and (Chen and Allgower, 1998) where stability is achieved by means of the proper selection of the terminal state penalty in the optimization problem. In another recent algorithm (De Nicolao et al., 1998), the RH control law is computed through the solution of a finite horizon (FH) optimization problem with a terminal state penalty equal to the cost that would be incurred by applying a locally stabilizing linear control law thereafter.
The widespread industrial success of Model Predictive Control (M PC) based on linear plant models (Clarke, 1994), (Camacho and Bordons, 1995), (Richalet et al., 1978), (Richalet, 1993), (Cutler and Ramaker, 1980), (Garcia et al., 1989) has recently motivated the development of M PC algorithms also for nonlinear systems. Since M PC relies on the concept of Receding Horizon (RH) optimization, the first step has been the development of stabilizing state-feedback RH controllers for nonlinear systems subject to input and state constraints. At present, many methods are available which guarantee stability in the state feedback case. Among them, the "dual mode" controller (Michalska and Mayne, 1993), which involves a switch from the non linear optimal con-
However, for a practical use of nonlinear M PC in industrial applications, some issues are still to be faced . First, output feedback algorithms have to be designed for the solution of the tracking problem, at least ih the case of piecewise constant references. Second, many features of linear M PC have to be extended to the nonlinear case, such as the possibility of using pre-programmed reference signals.
1 The authors acknowledge the partial financial support by MURST Project" Algorithms and architectures for the identification and control of industrial systems"
791
Concerning the problem of output feedback and tracking with guaranteed stability, an algorithm has been proposed for the tracking of constant references in the case of systems described by an input/output Nonlinear AutoRegressive eXogenous (N ARX) model (De Nicolao et al., 1997) . Since N ARX models are typically obtained by means of black-box identification procedures, such an algorithm is not suitable when the model of the system is known from physical considerations. In order to consider dynamic systems described by nonlinear difference equations derived from physical laws, the discrete-time non linear separation principle in (Magni et al., 1998) can been exploited. This allows one to develop stabilizing output feedback controllers by simply combining any stabilizing state feedback nonlinear RH control law with a stable nonlinear observer, for example the classical extended Kalman filter . In the context of output feedback (without tracking), it is also worth recalling the algorithm presented in (Michalska and Mayne, 1995) based on a previous state feedback control law (Michalska and Mayne, 1993) and a new moving horizon observer. Starting from the results in (Magni et al., 1998) and relying on some recent developments of nonlinear control theory (Isidori, 1995), a new output feedback M PC algorithm has been presented in (Magni et al., 1999) for the tracking of exogenous signals (not necessarily constant) and for the asymptotic rejection of disturbances generated by a properly defined exosystem. Although this method formally solves the tracking and disturbance rejection problems, its applicability can be limited by the computational load. The aim of this paper is to present a new M PC algorithm for non linear dynamic systems which guarantees stability and asymptotic tracking of asymptotic constant references. Following the rationale introduced in (De Nicolao et al., 1998), the method is based on the solution of a finite-horizon optimization problem where the future errors and control deviations are minimized with respect to the future control actions (possibly subject to constraints). At the end of this finite horizon, it is assumed that a stabilizing linear dynamic regulator is used. Notably, according to the RH approach, this regulator is never applied in practice, but is only required to compute a (conceptually) infinite horizon performance index. The main features of the method are the following: (a) it does not call for the computation of the steady state value of the input and state variables, (b) it allows for the use of pre-programmed references, (c) it takes advantage of a locally stabilizing linear regulator, which can be the one already used in the plant as the result of a linear design procedure.
2. PROBLEM FORMULATION Consider a nonlinear dynamic system ~(k
+ 1) =
j(~(k), u(k))
(1)
y(k) = h(~(k)) where k is the discrete time index, ~ E lR n represents the system state, u E lRm is the input vector, y E lRm is the output vector, j(., .) and hO are Cl functions of their arguments. Assume now that, for a given vector fl E lRm, there exists an equilibrium ({(yo), u(ytJ)) such that
{(:i/) = f({u/) ,u(Y°)) yo = h({Ul)) The problem is to design a control algorithm such that for any constant reference signal yo Er, where r is an open neighborhood of yO, the resulting closed-loop system reaches an asymptotically stable equilibrium point ({(yO), u(yO)) such that yO = h({(YO)). Assuming that such an equilibrium exists, let A(yO) = af/a~I~(yo},fj,(yO}' B(y) =
-
-
- °
8 f / aulE,(yo},fj,(YO} ' C(yO) = ah/8ulE,(yo} ,fj,(Yo)" In order to give conditions ensuring the solvability of the problem, the following assumption is introduced. Assumption AI: The linear system (A(yO), B(jj°), C(jj°)) is reachable, observable and does not possess transmission zeros equal to one. The proof of the following theorem is based on the application of the implicit function theorem.
Theorem 1. Consider yO E lRm and the associated equilibrium ({(:if) , u(yO)) of (1) with h({(YO)) = yO . If Assumption Al holds, there exists one and only one pair of functions {(yO), u(yO), continuous in an open neighborhood t ~ IR m of yo, such that, Vyo Et, {(yO) = f({(yo), u(yO» yO = h({(yO)) As usual in both linear and nonlinear control theory, asymptotic tracking and disturbance rejection problems can be solved provided that the regulator includes an internal model of the exosystem generating the exogenous signals. In this case, since only asymptotic constant exogenous signals are considered, an integrator is plugged in front of the system. Then, the control variable u(k) is given by z(k + 1) = z(k) + 8u(k) u(k) = z(k)
792
(2)
and the overall system composed by (1) and (2) is described by
x(k
+ 1) = f(x(k),c5u(k)), k:::: t, x(t)
= x (3)
IR n + m + r of the closed-loop system (3)-(7) which are steered to Xcl(YO), that is (under Assumption A2)
y(k)=h(x(k))
(4)
X(LDR,yO) = {XclEIRn+m+r/lim IIe(k) 11 =0
=yO -
(5)
subject to (3) - (7) with Xcl(t)
e(k)
y(k)
k-+oo
= xcd
where f( ',') is defined in an obvious way and Finite-Horizon Optimal Control Problem (FHOCP) Letting c5Ut,t+N-l = [c5u(t) , c5u(t + 1), .. . , c5u(t + N -1)], minimize with respect to [c5Ut,t+N-b w(t+ N)] the finite-horizon cost functional
For the augmented system (3)-(4) the following well known result holds. Lemma 2. Consider if E IR m and the associated equilibrium (~(yO) , il(yO)) of (1) with ii(~(yO)) = yO. Then under Assumption AI , for system 13)(5) there exist an open neighbourhood r' ~ r of if and a Linear Dynamic Regulator (LDR) :
+ 1) = Arw(k) + Bre(k), c5u(k) = Crw(k) + Dre(k)
w(k
k:::: t
(6)
J(x, [c5Ut,t+N-l, w(t + N)J, yO) t+N-l = {e(i)'Qee(i) + c5u(i)'Ruc5u(i)}
L
i=t
+ V,(x(t
= [~(yO)]
+ N), w(t + N) , LDR)
subject to (3) and
(7)
X(t + N) ] E X(LDR yO) [ w(t+N) ,
with w E IR r , w(t) = w , such that Vyo Er',
Xci (yO)
(8)
is a stable equilibrium point
(9)
In (8) the weighting matrices Qe , Ru, are positive definite, while the terminal penalty is
of the closed-loop system (3)-(7).
(10)
V,(x,w , LDR)
Assumption A2: With reference to system (3)(4) , with c5u(k) = 0, if y(k) = yO , Vk :::: t , then x(t) = x(yO) .
00
= w(t)' Rww(t)
+ L {e(i)'Qee(i) + w(i)'Qww(i)} i=t
Remark 1. Under Assumption AI, from standard continuity arguments it follows that there exist finite neighborhoods of yO and of the equilibrium point x(yO) where Assumption A2 is satisfied. In fact, A2 is implied by the observability of the linearization of (3)-(4) around (x(yO), 0).
subject to (3)-(7) with w(t)
= w.
Moreover
Qe
= [Qe + D~RuDr + B~RwBr]
Qw
= [Qw + C;RuCr + A~RwAr]
(11)
where Qw and Rw are positive definite matrices. 3. NONLINEAR PREDICTIVE CONTROL ALGORITHM
In the sequel, a sequence [c5Ut ,t+N-l,W(t + N)] is termed admissible with respect to x if, when applied to (3) with x(t) = x, it follows that X(t+N)] ° [ w(t+N) EX(LDR,y) .
In view of Lemma 2, it is possible to assume that a LDR is available such that for any constant reference yO E r' the closed-loop system (3)-(7) has a unique and stable equilibrium with y = yO. However, due to plant nonlinearities, the performance of the closed-loop system may be poor and the stability region of the equilibrium may be unacceptably small. Then, in order to enlarge the stability region and improve dynamic performance, one might consider replacing the linear control law with a properly designed nonlinear controller. This is done in this section by properly resorting to an RH control strategy.
Remark 2. In order to simplify the presentation, state and control constraints have not been included in the problem formulation. However, these constraints, which are of great practical interest, can be easily considered without modifying the stability results presented in the sequel. The only main modification concerns X(LDR, yO), which must be defined as the set of states Xci = [x' wT E IR n +m + r of the closed-loop system (3)(7) which are steered to Xcl(YO) by the linear regulator without violating the state and control constraints.
To this end, for any yO E r', denote by X(LDR,yO) the set of states Xci = [x' wT E
793
In order to derive the main stability result, it is assumed that the plant state x is known . If this is not the case than the state-feedback control law can be combined with a suitable observer as it is shown in (Magni et al., 1998). Then, given a constant reference signal yo and a LDR, at every time instant t define x = x(t), find the optimal control sequence [8Ur,t+N_1' w(t + N)O] solving the FHOCP, and according to the RH strategy, apply only the first control 8u(t) = 8uO(x) , where 8uO(x) is the first column of the optimal sequence 8Ur,t+N_l' In other words , the predictive RH control law is defined by the function ",RH (x) := 8uO(x) . Correspondingly, x RH (x) is the state movement of the closed-loop system
4. ILLUSTRATIVE EXAMPLE In this section, the nonlinear M PC algorithm of the previous section is applied to the highly nonlinear model of a chemical reactor (Seborg et al., 1989) , pag.5. Assuming constant liquid volume, the Continuous Stirred Tank Reactor (C ST R) for an exothermic, irreversible reaction, A -+ B, is described by the following dynamic model based on a component balance for reactant A and an energy balance:
CA .
T
= ~ (CA! = Vq
- CA) - koexp (- :T) CA (13)
(T! - T)
+
(-t)..H) pCp ko exp
(ERT )CA -
UA
+ V pCp Denoting by Xo(N, yO) the set of states x for which an admissible solution to the FHOCP exists, the following result guarantees closed-loop stability and asymptotic zero error regulation. Theorem 3. Consider a constant reference signal yO E r', and suppose that Assumptions AlA2 hold. Then Xo(N, yO) is non-empty and the closed-loop system (12) admits the state x(yO) as an asymptotically stable equilibrium point with region of attraction Xo(N, yO) .
y=T where CA is the concentration of A in the reactor, T is the reactor temperature, and Tc is the temperature of the coolant stream. The objective is to control T by manipulating Tc . Variable q CA! Tf V p
Cp (-LlH)
The proof hinges on showing that the function V(x) := J(x, [8ur,t+N-l ' w(t + N)o], yO) is a Lyapunov function for the closed-loop system (12).
(Tc - T)
Value 100 L/min 1 mol/ L 350 K 100 L 1000 g/L 0.239 J / gK 5 x 10' J / mol
Variable
~ ko UA Tc CA T
Value 8750K 7.2 x lOlU min ., 5 x 10 4 J / minK 300K 0.5 mol / L 350 K
..
Table 1. Nommal Operatmg CondltlOns for the CSTR
Remark 3. For simplicity, in the statement of Theorem 3, only constant references yO have been considered. However, it is easy to extend the problem definition and the proof of Theorem 3 to the case of a varying reference signal, provided that it becomes constant from a given future time instant onward. This possibility allows one to use preprogrammed set-points with an asymptotically constant behavior. The benefits related to the use of pre-programmed set-points are shown in Section 4. Remark 4. The evaluation of the terminal penalty (10) is conceptually performed by computing the closed-loop state movement of system (3)-(4) subject to the linear regulator (6)-(7) over an infinite horizon. From a practical point of view, the computational burden can be reduced by iterating the integration until the norm of the error vector goes below a prescribed threshold and the norm of the state is roughly constant. In (De Nicolao et al., 2000) it is shown, for the regulation problem, that stability of the closed-loop system can still be guaranteed with a finite (computable) number of integration steps.
Table 1 contains the nominal operating conditions, which correspond to an unstable steady state. The open-loop responses for ± 5 K changes in Te , reported in Fig. 1, demonstrate that the reactor exhibits highly nonlinear behavior in this operating regime. The nonlinear discrete-time state-space model (1) of system (13) can be obtained by defining the state vector ~ = [CA TJ' , the manipulated input u = Tc, the controlled output y = T and by discretizing equations (13) with sampling period ilt = 0.05 min. 4.1 Linear regulator According to the procedure outlined in Section 3, the linearization of model (13) around the nominal operating point in Table 1 was computed and discretized. The resulting discrete-time linear model is characterized by the matrices A
794
[0.895 -0.002] = 11.113 1.234 '
- = [-9.7XlO- S ]
B
0.117
'
o.7 , - - - - - - - - - - - - , 0 .•
~tf
0.8
0.5
'~\,~,'_ l
o~t-~, -~, -~-~,~-~-~--~,-~,-~,~~,~~,-~j
iD' ;;..0.3
o
0.2
D.'
•
•
10
TIfN (min)
-,,----------,
320L~====::::J o .. 6 10
315
Time (min) (a)
0."
0.8
0.8
1
1.2
1.4
1.8
~~t ;'\"""':'"" o
-O~~--.-~.-~~'O·
0.2
0.2
0 .4
0.8
0.8
:j: '\'/, o
0.2
0.4
0.6
rime (min)
0.8
1
1.2
' .4
1.2
1.4
~
1 TWN (min)
1.8
1.8
1.8
6= [01] With reference to the discrete-time linearized system the stabilizing dynamic regulator
+ 1) = -0.98w(k) + 4e(k) c5u(k) = -5.734w(k) + 12.2e(k)
w(t
was determined with a classical root-locus design technique.
4.2 Output feedback nonlinear MPC
1.6
1.8
Fig. 2. Tracking with a pre-programmed step reference for T from 350 to 375 K: linear regulator (dotted line) , N RH regulator (continuous line) even with a small control horizon (N = 4) , the control performance is significantly improved by the proposed nonlinear MPC method. This can also be verified by examining the Mean Square Errors, computed in the intervals [0,2] and [0,4] for the step response and for the truncated-ramp response experiments, respectively (see Table 2). Note also that the anticipated output change in the MPC response due to the use of the preprogrammed reference signal. Step t E [0 , 2) 478 8 .35
Linear MPC
In order to improve the control performance, the N RH control algorithm of Section 3 was used to compute the nonlinear control law together with a standard Extended Kalman Filter (Anderson and Moore, 1979). Specifically, in the FHOCP an optimization horizon N = 4 was used together with Qe = 10, Qw = Rw = Ru = 1.
Truncated ramp t E [0,4) 1.39 0.14
Table 2. Mean Square Errors
4.3.2. Experiment 2
In order to investigate the performance robustness of the proposed output feedback MPC method, starting from nominal operating conditions, a ramp-type change was imposed on the system parameter as shown in Fig. 4a. Correspondingly, the transients of the state and control variables reported in Figs. 4.b-c-d were computed. These results clearly show that the MPC algorithm can reject plant parameter perturbations without the need of explicit estimation of the plant parameters or the use of other techniques often applied in MPC, such as the estimation of fictitious disturbances on the plant output.
The filter was designed assuming that two Gaussian and mutually independent white noises
i,
4.3 Simulation results 4.3.1. Experiment 1
Starting from the nominal operating conditions, a pre-programmed step reference signal and a reference signal with a truncated ramp-type behavior were used in order to obtain a steadystate value of the temperature set-point T equal to 375 K. In Figures 2 and 3 the linear (dashed line) and nonlinear (continuous line) closed-loop responses are reported together with the considered reference signals. As the figures clearly show,
5. CONCLUSIONS In this paper a novel output-feedback M PC algorithm for non linear systems that ensures closed-
795
1 2
: ,l
(b)
Fig. 1. Open-loop response for +5 K (a) and -5 K (b) changes in Tc
2
2
~i~f '=:;;-.-1 ~~z:1 ~ 1 ~~--~O.~5--~'----~'5~--~2--~2~ .'5--~----3~.5--~'
o
u
320
q300
-
--
;:..
,
'
,.
'-
"
\
/',
I
'_.1-
280
:
2
U
-
',I'
",_,-
260
o
U.
I
.
•
O.S
,
1.5
2
2.5
35
Trne (mfl)
Fig. 3. Tracking with a pre-programmed truncated ramp-type behavior reference for T from 350 to 375 K: linear regulator (dotted line), N RH regulator (continuous line) o.S2'r---------------,
• •
TIr'rM(min) (0)
•
'0
~r---------------
•
'0
Time (mln) Ib)
~;r--------------
35'.' / ~
351
3SO.5
3S00~--~~---.-=~.~--~,0 nme(minl
Ic)
• •
'0
Time (mln) Id)
Fig. 4. Closed-loop response for a change in ~ loop stability and zero-error regulation in the face of asymptotically constant reference signals has been presented. Although the stability results are local in nature, they rely on very mild assumptions on the linearized plant model. Indeed, the basic requirement is the availability of a (dynamic) output feedback linear regulator stabilizing the ensemble plant+integrator in the considered operating conditions. It is believed that the possibility of resorting to a classical idea of linear M PC, such as the use of pre-programmed set-points makes this method particularly attractive for industrial control problems.
6. REFERENCES Anderson, B. D. O. and J.B . Moore (1979). Optimal Filtering. Prentice-Hall Electronical Engineering Series.
796
Camacho, E. and C. Bordons (1995). Model Predictive Control in The Process Industry. Springer. Chen, H. and F . Allgower (1998). A quasi-infinite horizon nonlinear model predictive control scheme with guaranteed stability. Automatica 34, 1205-1217. Clarke, D. W. (1994) . Advances in Model-Based predictive Control. Oxford University Press. Cutler, C. R. and B. C. Ramaker (1980) . Dynamic matrix control-a computer control algorithm. In: Automatic Control Conference. De Nicolao, G., L. Magnani, 1. Magni and R. Scattolini (2000). A stabilizing receding horizon controller for nonlinear discrete time systems. In: 2000 A CC, Chicago, Illinois, USA, June 28-30. De Nicolao, G., 1. Magni and R. Scattolini (1997). Stabilizing predictive control of nonlinear ARX models. Automatica 33, 1691-1697. De Nicolao, G., 1. Magni and R. Scattolini (1998). Stabilizing receding-horizon control of nonlinear time-varying systems. IEEE Trans. on Automatic Control AC-43 , 1030-1036. Garcia, C. E., D. M. Prett and M. Morari (1989). Model predictive control: Theory and practice - a survey. Automatica 25,335-348. Isidori, A. (1995). Nonlinear Control Systems. 3rd ed .. Springer-Verlang London Limited. Magni, L., G. De Nicolao and R. Scattolini (1998). Output feedback receding-horizon control of discrete-time nonlinear systems. In: IFAC NOLCOS '98. Enschede, The Netherlands. Magni, 1., G. De Nicolao and R. Scattolini (1999). Predictive control of nonlinear systems: output feedback and tracking. In: ECC '99, Karlsruhe, Germany. Michalska, H. and D. Q. Mayne (1993). Robust receding horizon control of constrained nonlinear systems. IEEE Trans on Automatic Control38, 1512-1516. Michalska, H. and D. Q. Mayne (1995). Moving horizon observers and observer-based control. IEEE Transaction on Automatic Control 40, 995-1006. Parisini, T. and R. Zoppoli (1995). A recedinghorizon regulator for nonlinear systems and a neural approximation. Automatica 31, 14431451. Richalet, J. (1993). Industrial applications of model based predictive control. A utomatica 29,1251-1274. Richalet, J., A. Rault, J. 1. Testud and J. Papon (1978). Model predictive heuristic control: applications to industrial processes. Automatica 14, 413-428. Seborg, D. E., T. F . Edgar and D. A. Mellichamp (1989) . Process Dynamics and Control. Wiley, New York, NY.