HUNGARIAN JOURNAL OF INDUSTRIAL CHEMISTRY VESZPRÉM Vol. 33(1-2). pp. 89-96 (2005) ROBUST MODEL PREDICTIVE CONTROL WITH STATE ESTIMATION FOR AN INDUSTRIAL PRESSURIZER SYSTEM P. TAMÁS, I. VARGA, G. SZEDERKÉNYI and J. BOKOR Systems and Control Laboratory, Computer and Automation Research Institute, HAS, H-1518 Budapest, P.O. Box 63, HUNGARY Robust model predictive control of an industrial pressurizer is presented in this paper. The physical model of the system is based on first engineering principles and the model parameters have been previously identified from measured data. To satisfy the hard constraints on the state variables and the input even in the presence of disturbances, the so-called single policy robust model predictive control method is applied. The maximal admissible level set, the disturbance invariant set and the terminal sets are determined for the system. Simulation results show that the proposed controller satisfies all the requirements and shows good time- domain behavior. Keywords: process control, robust model predictive control, constrained control Introduction Recently, there has been a growing need for automation of increasingly complex plants in different branches of industry. Fortunately, the improving quantity and quality of measurements and actuators allows us to apply an increasing variety of techniques in systems and control theory developed in the last few decades. This paper presents a robust model predictive control for an industrial pressurizer system used mainly for pressure control in a nuclear power plant. In [9] an advanced dynamic inversion-based pressure controller has been designed for the systems of this type. Although this controller performs very well in practice, our aim is to further develop control performance. For this, a robust model predictive control approach is proposed in this paper that is able to handle the strict input and state constraints even if disturbance affects on the system. The dynamic model of the system System description The system discussed is a pressurized water reactor, which means that in the primary circuit high pressure ensures that the coolant is not boiling. The task of the pressurizer is to keep the pressure within a predefined range. From a modeling point of view, the pressurizer is a vertical tank and inside this tank there is hot water at a temperature of about 326°C and steam above. If the primary circuit pressure decreases, water might start to boil. In order to prevent this, electric heaters switch on automatically in the pressurizer. Due to the heating there will be intense boiling, more steam will be generated and this leads to a pressure increase. If the increasing pressure in the pressurizer reaches a certain limit, firstly the heaters are turned off and then cold water is injected into the tank (if needed) to reduce the pressure down to the predefined range [7]. The heating power of the electric heaters can be set continuously. The measured outputs of the system are the pressure in the pressurizer and the temperature of the tank wall. The 90 controlled output is the pressure in the tank. The simplified flowsheet of the pressurizer is shown in Fig. 1. YP10 s kg m s kg m .constM = 1χ 4χ3χ2χ [ ]KT I [ ]KT Figure 1: simplified flowsheet of the pressurizer The physical model of the plant Modeling of industrial systems depends heavily on the modelling goal. Most of the commercially available dynamic models are implemented in simulators (see e.g. [1]) and are used for equipment design and retrofitting purposes. The models used in this area are typically in the form of partial differential equations that are discretized in space to have a lumped version. This way a high dimensional (with 10-100 state variables) complicated dynamic model is obtained that is unnecessarily complex for control applications. Instead, a simplified lumped dynamic model is constructed for control design purposes based on first engineering principles [2] that captures the most important dynamics of the tank. For this purpose, the following assumptions were used: 1. There are two perfectly stirred balance volumes, one for the water and another for the wall. 2. There is a single component in each of the balance volumes (water and metal, respectively). 3. Constant overall mass in both balance volumes. 4. Constant physico-chemical properties. 5. Vapour-liquid equilibrium in the tank. The simplified model consists of two energy balances: one for the water and and another one for the wall of the tank as balance volumes. Water energy balance ( )= − + − +p I p W W HE dU c mT c mT K T T W dt ⋅ χ (1) Wall energy balance ( - ) - =W W W lo dU K T T W dt ss (2) The following constitutive equations, describing the relationship between the internal energies and the corresponding temperatures, complete the model. = = p W pW U c MT U C TW (3-4) The variables and parameters of the above model and their units of measure are the following T water temperature °C WT tank wall temperature °C pc specific heat of water J kg°C U internal energy of water J WU internal energy of the wall J m mass flow rate of water kg s IT inlet water temperature °C M mass of water Kg pWC heat capacity of the wall J °C HEW total heating power of one electric heater W χ portion of total heating power turned on - WK wall heat transfer coefficient W °C lossW heat loss of the system W The manipulable input to the system is the external heating, all the other input variables are regarded as disturbances. Then we can list the disturbances with physical meaning as follows. • Cold water infiltration. This effect is taken into account with the in-convection term in the water energy conservation balance (1), where the in- and outlet mass flowrate m is controlled to be equal (but might change in time) and the inlet temperature can also be time-varying. p Ic mT IT • Energy loss towards the environment. This effect is modelled as a loss term in the wall energy balance (2). lossW The pressure of saturated vapor in the gas phase of the tank depends strongly on the water temperature in an exponential (nonlinear way). The experimental measured data found in the literature [7] have been 91 used to create an approximate analytic function to describe the dependence. The function has the form ( ) 2 3 0 1 2 3 ( ) 100 ( ) = = = + + + Te p h T T c c T c T c T ϕ ϕ (5) For the parameters of ϕ , the following values were obtained 1 0 1 5 2 3 6.5358 10 4.8902 10 9.2658 10 7.6835 10 − 2 8 − − − = ⋅ = ⋅ = − ⋅ = ⋅ c c c c (6) The validity range of the model is the usual operating domain of the pressurizer, i.e. 315°C ≤ T ≤ 350°C. In pressure terms, this means 105.65 bar ≤ p ≤ 137.09 bar. State space description Based on eqs (1)-(2) and (3)-(4) we can write the system model in the following standard state-space form = + +& c c cx A x B u E d (7) where the state vector [= TWx T T ] , the manipulable input u is directly proportional to the heating power, and the disturbance input vector [ ]= TI lossd T W . Furthermore, the matrices in (7) are the following 0 , 1 00 W W p p c W W pW pW HE pc c pW K Km M c M c M A K K C C mW M c MB E C ⎡ ⎤ − −⎢ ⎥ ⎢ ⎥= ⎢ ⎥ −⎢ ⎥ ⎢⎣ ⎡ ⎤ ⎡ ⎤ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥= =⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦ ⎥⎦ (8-9) The real physical measured variable in the system is the pressure. Since (according to our assumptions) the temperature in the tank is a monotonous and invertible function of the pressure, we can write a linear output equation in the form [ ]1 0y = x (10) This means that we can express the performance requirements (bounds) for the pressure in terms of the temperature in the tank. The unknown parameters of the continuous-time model have been estimated from input-output measurement data. The model structure together with the estimated parameter values have been successfully validated. The detailed system identification procedure is described in [11]. For the controller design, it is convenient to center the state, input and disturbance variables as follows: , ,x x x u u u d d d∗ ∗ ∗= − = − = − (11) where x∗ is the required steady state to be kept by the controller, d ∗ is the nominal (mean) value of the disturbances and u∗ is the constant input necessary to keep the prescribed steady state x∗ . Using the centered coordinates, the system model (7)-(9) can be rewritten as c c cx A x B u E d= + +& (12) For the controller design, we need a discrete-time state space model of the system (12). The discretization was performed assuming zero order hold on the input with a sampling interval of 10s. The centered discrete-time model is given by the equations 1k k k kx Ax Bu w+ = + + (13) where the effect of the disturbance term is expressed in discrete-time by the state disturbance . cE d kw Robust model predictive control design Control problem formulation The aim of the control is the robust stabilization of a prescribed operating point in case of additive disturbance, while the state and the control are subject to hard constraints. To solve this problem we apply the single policy robust model predictive control proposed by Langson et al. in [5]. Since this method requires the knowledge of the entire state, in our case it has to be completed with an appropriate state estimator. The control design procedure will then consist of three steps: first, assuming that the full state is available for measurement and no disturbance affects on the system, a nominal MPC controller is designed. Then the robustification of the nominal controller comes making the nominal MPC applicable in the presence of external disturbances. The last step is the design of a state estimator and its integration into the MPC control framework. Before starting the procedure the following assumptions have to be made: • the disturbance is bounded and there exists a convex polytope W containing the origin in its interior s.t. kw W k∈ ∀ • the constraints on the state and the control input are convex, i.e. there are given convex, polytopic sets X 92 and U containing the origin in their interior s.t. , ku U∈ kx X∈ have to be hold . For simplicity we moreover assume that U is rectangular i.e. k∀ 1 1 2 2 [ , ] [ , ], [ , ] p pL L L L L L U u u u u u u= − × − × × −L . Nominal MPC Following the steps of control design procedure in [5] we have to first formulate and solve the model predictive control problem for the disturbance free case. This means the determination of an admissible receding horizon policy ( )kxµ , which steers the centered system from initial state 0x X∈ to the origin. The solution to this problem can be derived from the result of the following optimization problem: 1 0 0 1 0 1 1 0 0 arg min ( ) ( ) ( ( ), ) , [ , , ], [ , , ] , , v N N T T N N i i i i N N i i i i i k N f v V v V v V x v v x Qx v Rv v v v x x x x Ax Bv x x x X v U x X ∗ − = − − + + = = = + = = = + = ∈ ∈ ∈ ∑ K K i (14) where N is the length of the horizon and fX X⊂ is a terminal set having the following properties: there existsan admissible static state feedback control , which keeps the system trajectories in ( )u x Fκ= = x fX i.e. for all ( ) , ( )f fx X x U Ax B x Xκ κ∈ ∈ + ∈ (15) and asymptotically stabilizes the system i.e. 1 0lim 0 if ( ) and k k k k k fx x Ax B x x Xκ→∞ += = + ∈ (16) In possession of the optimal control input vector v∗ we can formulate the single policy MPC controller in the following way: nom if ( ) if i i i v i x N Fx i µ ∗⎧ ≤⎪ = ⎨ >⎪⎩ N (17) i.e by means of single policy approach we determine v∗ only in the beginning (and later only if the prescribed operating point changes), and after depleting the entire control sequence, we switch to the linear feedback Fx (dual-mode control). It can be easily proved [5], [6] that the control policy (17) asymptotically stabilizes the plant in the disturbance free case and both the state and the input will satisfy the constraints. The Lyapunov function for the closed loop dynamics can be derived from the quadratic cost . NV To implement the formulated MPC algorithm on a particular system we need to determine the feedback gain F and the associated terminal set fX . It is straightforward to choose F as an unconstrained LQ controller minimizing the infinite horizon cost function defined as: 0 1 ( ) ( , ) , , , 0 T T i i i i k k k k k V v V x v x Q x v R v v Fx x Ax Bv x x Q R ∞ ∞ ∞ ∞ ∞ = + ∞ ∞ = = + = = + > ∑ 0 0 i = k (18) The solution F and the quadratic Lyapunov function of the closed loop dynamics ( ) TW x x Px= 1 ( )kx A BF x+ = + can be obtained as a solution of a discrete algebraic Ricatti equation: (19) 1( ) ( ), ( )( )( ) T T T T T T T F B PB R B PA P A PA A PB B PB R A PB Q − ∞ ∞ ∞ = + = − + + Since the terminal set fX has to be invariant for the dynamics 1 ( )k kx A BF x+ = + it can be constructed from an appropriate level set of W(x). Let FX be the maximal level set, which satisfies the input constraints, i.e. , { | } max , { | max }T i T F T i Lx x Px X x x Px f x u iγ γ γ γ γ γ ∗ ∗ ∈Γ ≤ = ≤ = Γ = ≤ ∀ (20) where Tif is the ith row of F. Notice that is a support function of the set , ( ) max T Ti x x Pxh f f xγ≤= i { | }Tx x Px γ≤ , which can be calculated as 1( ) Ti ih f f P fγ −= i ([4],[3]). Consequently in single input case 2 1 , TL T u F f f P f γ ∗ − = = (21) Since FX may be larger than X, let f FX X X= ∩ . (The numerical calculation of the intersection can be greatly simplified if the polytopic approximation of X and FX is used.) Robust MPC The next step of the controller design is the "robustification" of the nominal control policy. This can be performed by tightening the constraints of the nominal MPC and completing the nominal control input nom ( )ixµ with an appropriate error feedback term, i.e. more precisely: 93 nom( ) ( ) ( )i i i ix x K x xµ µ= + − (22) where ix is the nominal state value – calculated by iterating 1 nom ( )k k kx Ax B xµ+ = + i, x is the true state (measured / estimated), and K is a stabilizing feedback for the disturbance-free dynamics 1k k kx Ax Bu+ = + . (It is possible to choose K F= . In order to formalize the new, tighter constraints for the robust MPC problem, we have to determine the following disturbance invariant set: 0 ( )i i Z A BK W ∞ = = +∑ (23) Because of the infinite summation the equation above can not be applied directly. There are two possibilities: we can use an approximation for Z ([8]), or we can apply (23) till the difference between two consecutive sets becomes smaller than the numerical accuracy of the computing software. The first approach is mathematically precise, but we used the second one, since it is easier to implement and the convergence of (23) is fast enough to make this procedure practically applicable. Using Z the stringent sets of constraints can be calculated as follows: , f fX X U U KZ X X= ∼ Ζ = ∼ , = ∼ Z } (24) where ~ denotes the Pontryagin difference of two sets, defined as: ~ { |A B x x B A= + ⊂ (25) At this point we can formulate the robust MPC procedure: 1 0 0 1 0 1 1 0 0 arg min ( ) ( ) ( ( ), ) , [ , , ], [ , , ] , , v N N T T N N i i i i N N i i i i i k N f v V v V v V x v v x Qx v Rv v v v x x x x Ax Bv x x x X v U x X ∗ − = − − + + = = = + = = = + = ∈ ∈ ∈ ∑ K K i (26) i.e. we follow the same procedure as (14), but – instead of , , fX U X – we use the tightened constraint sets , , fX U X . According to (22) the control policy is defined as: ( ) if ( ) ( ) if i i i i i i i v K x x i N x Fx K x x i N µ ∗⎧ + − ≤⎪ = ⎨ + − >⎪⎩ (27) State estimation As we have mentioned in the first section the state 2x of the pressurizer can not be measured directly. For this, we apply discrete-time state estimator to approximate it on-line from the input u and the measured output 1y x= . The robust MPC controller will then work with this estimated state. The estimator applied is given in the following well- known form: 1| 1 1| 1 1| 1| | ˆ ˆ ( ) ˆ ˆ k k k k e k k k k k k k k x x K y Cx x Ax Bu + + + + + + = + − = + (28) where |k kx denotes the estimated state at time instant k. Substituting (13) into (28) the following error dynamics can be derived: 1 1 1| 1 | ˆ ( )( ) ( ( ) ( ) k k k k e k k k e e k e k e x x ) kA K CA x x I K C w A K CA e I K C w + + + += − = − − + − = − + − (29) where eK is chosen so that the matrix eA K CA− will be stable. Before applying the estimator we have to examine the effect of the estimation error on the stability of the controlled system and on the prescribed constraints. We examine the system behaviour after the disappearence of the initial transients of (29), i.e. we assume that the estimation error is caused only by the disturbance , and not the initial difference between the estimated and the true states. By iterating (29) we can easily see that after some steps kw |ˆk k k ex x Z k∈ + ∀ , where eZ is a disturbance invariant set constructed in the following way: 0 ( ) (ie e e i )Z A K CA I K C W ∞ = = − −∑ (30) Since by (13) 1k k kx Ax Bu W+ ∈ + + holds and eZ is symmetric to the origin, for the estimated state a following relation can be derived: 1| 1 | | 1| 1 | ˆ ˆ ˆ ˆ ˆ , k k k k k e e k k k e k k k k k k k e x Ax Bu W AZ Z Ax Bu W x Ax Bu w w W + + + + ∈ + + + + = + + ⇓ = + + ∈ (31) Thus, if we perform the same controller synthesis as before with instead of W we get a control policy eW ˆ( )kxµ which guarantees the stability of (31) while keeping the state ˆkx and the input in the predefined range. Since the difference between the true and the 94 estimated state is considered in the real state will also satisfy these constraints. Since is generally larger than W the sets eW eW , , fX U X constructed from prescribe much tighter constraints than those which are constructed from W . eW Simulation results To demonstrate and examine the performance of the controller designed above an identified model of the pressurizer was used [10]. After discretization the following state space model was obtained: 0.6651 0. 0.1035 , 0.0355 0. 0.0024 A B ⎡ ⎤ ⎡ ⎤ = =⎢ ⎥ ⎢ ⎥ ⎣ ⎦ ⎣ ⎦ 91 21 = 3341 9645 (32) For the simulation two reference values were chosen: (33) 327.166, 326.166a br ry y= = The corresponding operating points are as follows: (34) 327.1660 , 1.71 326.7760 326.1660 , 1.71 325.7760 a a ss ss b b ss ss x u x u ⎡ ⎤ = =⎢ ⎥ ⎣ ⎦ ⎡ ⎤ = =⎢ ⎥ ⎣ ⎦ The LQ controller was designed by using the following weighting matrices: (35) 210 , 20Q I R∞ ∞= The resulted feedback gain is [ ]0.1439 0.8392F = . The following constraints for state and input were chosen by considering the physical limitations of the system: (36) 1 21.5 1.5, 3 3, 1.71 1.71x x u− ≤ ≤ − ≤ ≤ − ≤ ≤ The cause why the constraint on the control input was constructed in the form above is the following: in the true system the control input has to be between 0 and 4, which is equivalent to constraints 4ss su u u− ≤ ≤ − s for the centered model. But it is more convenient to handle constraints, which are independent from the operating point and symmetric to the origin, so we restrict the bounds to [ ]1.71 1.71− where 1.71 min( , )a bss ssu u≤ By examining the system behavior, it was seen that the difference between the nominal and the true d ∗ d disturbance is at most 15%, which means that w in the centered, discrete model is inside the rectangle defined as: [ ] [ ]0.05 0.05 0.005 0.005w W∈ = − × − (37) We used Kalman filter as a state estimator, which was designed according to the measurement noise conditions. The obtained filter gain was [ ]0.7712 0.5982eK = . Setting the stabilizing K controller equal to F the sets needed for the MPC algorithm can be calculated. Figure 4. 5. shows the results in the case when full-state measurement is assumed and Figure 3. 4. shows the obtained constraint sets in the case of state estimation. It can be seen that the constraints to be satisfied by the input and states are much more tighter if state estimator is applied. In the simulation the horizon was N=50, the system started from and the weighting matrices in the MPC optimization were chosen to be [0 327.5 327 T x = ] 0i 2 ,iQ i I R= ⋅ = s (38) The system had to track first, and this reference was changed to at time a ry b ry 24000t = . To illustrate the robustness of the controllers designed the maximal 15%± persistent disturbance was added to the original plant. Figure 6 shows the factors by which the nominal disturbance was multiplied. The simulation results in the cases of full state measurement and state estimation the can be found in Figures 7. and 9. Figure 8. shows the state estimation error. It can be seen that in all cases the output remains in the 1.5-wide neighborhood of the prescribed value while the control input also satisfies the constraints. It is also seen that from reference tracking point of view there is no significant difference between the cases of full state measurement and state estimation. although the controller using estimated states has to satisfy more stringent constraints to achieve the same result. Examining the settling performance it can be stated that the overshoot is negligible and the setting time is acceptable small. The time-consuming optimization procedure was executed only twice: first, in the beginning and later at 24000t s= , when the change of reference took place. Conclusions and further work A single policy robust model predictive control was successfully applied to a pressurizer model. It was shown that the states and the stabilizing control input designed by this approach remain in the given range even if additive disturbance is present. By using single policy approach the computation time needed for the control input has been drastically reduced. 95 Acknowledgements This research was partially supported by the grants no. OTKA T042710 and F046223. Figure 2 : Constraint sets in the case of state estimation , , ,F eX Z X X Figure 3 : Constraint sets in the case of state estimation , , ,f fZ X X U Figure 4: Constraint set in the case of full state measurement , ,FX X X Figure 5 : Constraint set in the case of full state measurement , , ,f fZ X X U 96 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 x 10 4 0 0.5 1 1.5 2 2.5 u 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 x 10 4 325.5 326 326.5 327 327.5 328 y yr Figure 9 : Reference signal (solid), system output (dashed) and control input in the case of state estimation 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 x 10 4 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2 1.25 d1 d2 Figure 6 : Disturbance scaling factors used in simulation. REFERENCES 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 x 10 4 325.5 326 326.5 327 327.5 328 y yr 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 x 10 4 0 0.5 1 1.5 2 2.5 u 1. APROS. APROS – the advanced process simulation environment, VTT industrial systems, 2005. http://www.vtt.fi/tuo/63/apros/. 2. K.M.HANGOS AND I. T. CAMERON: Process Modelling and Model Analysis. Academic Press, London, 2001. 3. I. KOLMANOVSKY AND E. G. GILBERT.: Maximal output admissible sets for discrete-time systems with disturbance inputs. American Control Conference, 1995. 4. I. KOLMANOVSKY AND E. G. GILBERT.: Theory and computation of dysturbance invariant sets for discrete-time linear systems. Mathematical Problems in Engineering, 4:317-367, 1998. 5. W. LANGSON, I CHRYSSOCHOOS, S. V. RAKOVIC AND D. Q. MAYNE: Robust model predictive control using tubes. Automatica, 40:125-133, 2004. Figure 7 : Reference signal (solid), system output (dashed) and control input in the case of full state measurement 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 x 10 4 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 x1−x1e x2−x2e 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 x 10 4 325 325.5 326 326.5 327 327.5 328 x1e x1 x2e x2 6. D. Q. MAYNE, J. B. RAWLINGS, C. V. RAO AND P. O. M. SCOAKERT: Constrained model predictive control: Stability and optimality. Automatica, 36(3):789-814, 2000. 7. R. H. PERRY AND D. W. GREEN: Perry’s Chemical Engineers’s Handbook (7th edition). Mc Graw Hill, New York, 1999. 8. S. V. RAKOVIC, E. C. KERRIGAN, K. KOURAMAS AND D. Q. MAYNE.: Approximationof the minimal robustly positively invariant set for discrete-time LTI systems with persistent state disturbances. 42th Conference on Decision and Control, 2003. 9. Z. SZABÓ, P. GÁSPÁR AND J. BOKOR: Reference tracking of Wiener systems using dynamic inversion. In 2005 International Symposium on Intelligent Control, Limassol, Cyprus, pages on CD, paper ID: WeA06.5. 2005. 10. I. VARGA, G. SZEDERKÉNYI, K. M. HANGOS AND J. BOKOR: Modelling and model identification of a pressurizer at the Paks Nuclear Power Plant. In 14th IFAC symposium on System Identification. (submitted), 2006. Figure 8 : True (solid) and estimated (dashed) states and estimation error. http://www.vtt.fi/tuo/63/apros/