Full text
Copyright @) IFAC Adaptation and Learning in Control and Signal Processing. Cemobbio-Como. Italy. 200] NEURAL NETWORK BASED MIN-MAX PREDICTIVE CONTROL. APPLICATION TO A HEAT EXCHANGER D.R. Ramirez M.R. Arahal E.F. Camacho Departamento de Ingenieria de Sistemas y Automatica, Universidad de Se villa Escuela Superior de Ingenieros Gamino de los Descubrimientos sin 41092 Sevilla Phone: +34 954487357 Fax: +34 954487340 email: {danirr.arahal.eduardo}@cartuja.us.es Abstract: Min-max model predictive controllers (MMMPC) have been proposed for the control of linear plants subject to bounded uncertainties. The implementation of MMMPC suffers a large computational burden due to the numerical optimization problem that has to be solved at every sampling time. This fact severely limits the class of processes in which this control is suitable. In this paper the use of a Neural Network (NN) to approximate the solution of the min-max problem is proposed. The number of inputs of the NN is determined by the order and time delay of the model together with the control horizon. For large time delays the number of inputs can be prohibitive. A modification to the basic formulation is proposed in order to avoid this later problem. Simulation and experimental results are given using a heat exchanger. Copyright@ 200] ]FAC Keywords: Predictive control, Minimax techniques, Neural networks, Uncertain linear systems, Process control. 1. INTRODUCTION Mathematical models and specially control models, which have to be kept simple, can only describe the dynamics of the process in an approximately way. Most of the approaches used for modeling uncertainties assume that there is a family of models and that the plant can be described exactly by one of the models belonging to the family. The approach considered here is global uncertainties. In this way, uncertainties will be considered to affect the I-step ahead prediction equation, i.e. the uncertainties will affect the prediction capability of the model. The global uncertainties approach can be found in (Camacho and Bordons, 1999). A robust adaptive Min-Max MPC controller has been applied to a solar power plant in (Camacho and Berenguel, 1997). 115 Min-Max control techniques have in common a great computational burden which limits the range of process to which can be applied to those with slow dynamics. Neural Networks have been used with success in Model Predictive Control (Arahal et al., 1998). In this paper we present a way to implement Min-Max Predictive Controllers for linear plants using a Neural min-max solver. Another difficult arises when the plant has a large dead time. In this case we have to take into account the effect of past values of the control signal in the min-max optimization. We show here how to overcome this problem without loosing the robustness properties of Min-Max MPC and with only a gain of conservativeness in the control law. The paper is organized as follows: section 2 presents the basic Min-Max MPC with bounded
global uncertainties algorithm. Next the I\' e ural min-max solver for plants without large delays is introduced. Section 3 is devot ed to the Minl'vlax lVIPC with bounded global uncertainties algorithm for plants with larg e delays. Section 5 shows the application of the NN based M:V11\1PC to a heat exchang er and section 6 presents the conclusions. 2. MI:\-MAX :\1PC 'VITH GLOBAL 'CN CERTAINTIES The objective of MPC control is to compute the future control sequence u(t) , u(t+ 1), .. . , u(t+ N - 1) in such a way that the optimal j-step ahead predictions yet + jlt) are driven close to the set point sequence wet), wet + 1), .. . , wet + N -1) for the prediction horizon . The way in which the system will approach the desired trajectories will be indicated by a cost function J which depends on the presents and future control signals and uncertainties. When bounded uncertainties are considered explicitly, it would seem that a more robust control would be obtained if the controller tri ed to minimize the objective function J for the worst situation . That is, by solving the following minmax problem: minmaxJ(O,u)=minJ*(u) (1) uEU ()E8 u EU where 0 represents the sequence of future uncertainties and : J* (u) = max J (0 , u) () E0 (2) being e = {O/~ ~ 0 ~ B} . The function to be minimized J* (u) is the maximum of the objective function J(O , u) which measures how well the process output follows the reference trajectories . Min-Max MPC can be formulated either in state space or using input-output description. The latter is used here since process with large dead time are easy to describe using transfer function representations . The most usual form of J(O , u) is a quadratic criterion: N2 J(O.u) = L (Yk + jlk - Wk+j)2 j=N\ Nu +). L(~Uk+j-d2 j = 1 (3) where: ~ = 1 - Z-I ,NI and N2 define the beginning and end of the cost horizon, Nu is the control horizon and Yk+j lk is the prediction output. Oth er 116 types of objectiv e functions have been used in literature . In (Campo and lvlorari, 1987) a 00 - 00 norm is used while in (Allwright, 1994) a 1 - 00 norm is proposed . When a global uncertainties approach is used the way of modeling the uncertainties is to assume that all modeling errors are globalized in a vector of parameters, such that the plant can be desc ribed by the following family of models: y(t + 1) = J(y(t),u(t)) + O(t) (4) In (Camacho and Bordons, 1999) is shown that global uncertainties can be related to other types of uncertainties . When the model considered in (4) is linear it is common to choose a CARIMA model as prediction model (Camacho and Bordons, 1999). The error concept present in a CARIMA model can be extended to consider explicitly the disturbances in the prediction model yielding: where A(Z-I) = ~A( Z- I) and O(t) E e. This prediction model will be referred as an integrated uncertainties prediction model (( Camacho and Bordons, 1999)). It is easy to see that the prediction model is an affine function of O(t) , which in turn leads to a function J(O, u) that is convex in the hypercube of O( t). That implies that the maximum of J (0 , u) is reached on one of the vertices of e. Also the ma.ximum is unique and it can be easily seen that function J* (u) is a piecewise quadratic function of u (Camacho and Bordons , 1999). Using an integrated uncertainties prediction model allows to reject step disturbances but produces a continuos grow of the uncertainty band (Camacho and Bordons, 1999) and (Ramirez and Camacho, 2000). To have stable uncertainty bands while keeping the step response rejection the following constraints to optimization have to be added (Ramirez and Camacho , 2000): [.fl ... f)f ~ T [O(t + 1) ... O(t + N2 )( S [0 ... e( where T is a lower triangular matrix of appropriate dimension . 3. 'VORST CASE PREDICTION OF DELAYED OUTPUTS i\lIN-?\1AX MPC The strategy used here to apply the Min-Max :vIPC to process with large dead time splits the problem in two stages:
• Estimation of process output after the dead time. This is a prediction problem. • Min-Max :\iPC control law calculation for the process after the dead time, taking into account the uncertainty in the estimation of the process output up to the dead time. This is a control design problem . This strategy applied for a first order CARIMA prediction model can be formulated as the following steps: • First, compute the bounds for y(k + d) and y(k+d-1): -I ()k+d - l = max(Yk+d-l - Yk+d-l) () fl~+d-l = min(Yk+dl - Yk+dd () -I ()k +d = max(Yk+d -Yk+d) () ()~+d = min(Yk+d -Yk+d) - () where Yk+d-l y Yk+d are nominal values for Yk+d-l and Yk+d' • Second, obtain the control law solving the min-max problem for the nominal plant without dead time using the following functional: !(Yk+d , Yk+d-l) = min max J(~U'()~+d'()) 6 .. (}~+d ' O taking into account the uncertainties in the plant output for y(k + d) and y(k + d - 1), which have to be reflected in the future output predictions. Thus, the future output predicted will be: Yk+d+l = (1 + a)(Yk+d + ()~+d) - a(Yk+d-l +()~+d-l) + {}k+d+l (1 + a)Yk +d+l - a(Yk+d + ()~+d) It can be seen that the prediction model is an affine function of ()~+d-l '{}~+d as well of () . This implies that the maximum of J for ()~+d-l' ()~+d will be reach in one of the vertexes of the hypercube {()~+d-l' ()~+d} ' The computational burden increment is the the same to an increment of two in the prediction horizon. This strategy is more conservative than a traditional Min-Max MPC in the sense that only the maximum and minimum values for y(k + d) and y(k + d - 1) are considered as starting points to the min-max optimization. To illustrate this point consider a process with a dead time of d = 6. In a traditional ~1in-Max MPC there is 32 different possible values for Yk+d-l and 64 for Yk+d, which will be used as starting point for the rest of the optimization . With the strategy 117 presented here only two possible values for each of them are considered, which yields 4 combinations of the most extreme values of Yk+d-l and Yk+d· In addition two of the combinations are unrealistic, because there is no way to get the plant outputs equal to the nominal values of Yk+dl and Yk+d plus {fl~+d-l ' e~ + d} or {e~+d-l ' fl~+d}' Finally, two sources of uncertainty are considered in the prediction of the Yk+d+ 1 and Yk+d+2, i.e. the global uncertainty {}(t) and the bounds for Yk+dl and Yk+d. To avoid this excess of conservatism only the combinations {fl~+d - l' fl~+d} and {e~+d-l' e~+d} are considered in the optimization which has the added benefit of halving the amount of vertexes to be considered to compute the max part of the min-max problem. The amount of time required to compute the control sequence can be further reduced by considering that for linear prediction models the superposition principle holds, hence the part of the output prediction due to the uncertainty ()(t) can be separated from the part due to control actions. It can be easily seen that the bounds values {fl~+d-l , fl~+d} and {e~+d-l' e~+d} are independent of the values of {Yk-l , Yk} and are also independent of the past and future control actions. This considerations imply that the bounds for y(k+d) and y(k+d-1) have only to be computed once. Figure 1 illustrate the behaviour of a Min-Max MPC controller using this strategy compared with a traditional Min-Max MPC controller and a conventional MPC controller, using the same values for control and prediction horizons and control ef - fort weighting. For the Min-Max MPC controllers the bounds for the uncertainty were fl = .e. = -0.5 and e = 0' = 0.5. The faster response over the traditional Min-Max MPC is due to the greater conservativeness of considering only the maximum and minimum values of Yk+d-l and Yk+d· Finally, it is noteworthy that this scheme is suitable for other implementations of Min-Max MPC even for the numerical one, with the benefit a reduced time of computation of the min-max solution. 4. NEURAL MIN-MAX SOLVER Artificial Neural Networks have been used with success in predictive control and identification (Arahal et al. , 1998), especially when non linear systems are considered. When linear systems \vithout taking into account uncertainties are considered there is no need to use a non linear estimation method like Neural Networks because
37 31 MPC. MI(I-Ma.'l MPC and M(xhhed Mtn-Max MPC lor Hoa.l Exchangor Model (d=6j , , samples -MII"I-MallMPC - - Modified 'Jhn_Max MPC Fig. 1. Output of a l\lPC, l\Iin-:"lax I\IPC and fvIin-:\o lax MPC modified controllers applied to the plant Yk+l = 0. 9048Yk + 0.0128uk_6. efficient solutions exist in the form of closed formulae (for the unconstrained case) or mathematical programming (constrained case, see (Camacho and Bordons, 1999)). However if uncertainties are taking into account there is no efficient numerical methods to handle problems like (1). In this case !'eural l'\etworks can be a good choice to apply this strategy to process with reasonably fast dynamics. The solution of the min-max problem can be precomputed for a number useful situations. A NN can be used to approximate function J* in (2) with mild assumptions about the smoothness of the approximated mapping. If this is done properly, then solving the min-max problem would only amount to just query the Nl\ for an output u = NN(x) to current input x where x is the process state and set point. This allows the :Vlin- :"lax l\lPC use in real time in a larger class of process. Here we concentrate in a neural min-max solver for a first order plant using an integrated uncertainties prediction model: Yk+l = (1 + a)Yk - aYk - l + bD.uk + e (5) The function min-max to be approximated . which will take the set point and the actual and past \'alues of process output as arguments, depends on the parameters of the plant as well of the parameters of the controller. Figure 2 shows the approximation error using a :'Iulti Layer Perceptron (:"lLP) with 10 neurons in the hidden layer when plant model parameters are a = b = 0. 25 and controller parameters are Nu = 4, N2 = 8A = 0.5, (J = 0.1, (i = -0 .1 and the set point is 0.25. A set of patterns distributed on an uniform grid with a spacing of 0.05, making a total of 1681 patterns, was built. The :"ILP was 118 AbsohH Eno! USlrg a M LP 04 10 neutons 1(1 hidden Laye, 003 002 0· 0; •.. 001 -001 -<l02 -003 05 05 -05 -1 _1 Fig. 2. Approximation error using a MLP with 10 neurons in hidden layer for a controller with Nu = 4, N:l = 8). = 0.5, (J = 0.1,(i = -0.1 . Q, of:' . I, y _V_4 Hot wa~ )-/ -,- DI<r _ _ _ _ I F? ~ 9 V ~ CoM w''''---Vi Y ~ KI 1 H,""~"",,, Q ' ~ I I ~ ' i / I I j I .Q Tank Fig. 3. Diagram of the Pilot Plant Heater trained using the Levenberg-:"hrquardt method and a final sum of squared errors of 0.105 was obtained . The trained :\ILP was used with a different set of patterns built with a spacing of 0.08, and the errors obtained are shown in figure 2. The magnitude of errors is small enough to allov,' its real time use as shown for the heat exchanger in section 5. 5. APPLICATIOl\ TO A HEAT EXCHA?\GER The controller presented in sections 4 and 3 has been applied to a heat exchanger which is part of a pilot plant. A diagram of the pilot plant which shows its main elements as \\'ell as the localization of the various instruments is given in Figure 3. The main elements are:
• Feed circuit. The plant has two input pipes, a cold water one (which temperature is regulated by a cooling plant) and a hot water one (at about 70 QC) . The temperatures and th e flows of the inputs are measured with thermo couples and orifice plates respectively, with controlled pneumatic valves for regulating the input flows. • Tank. It has a height of 1 m and an interior diameter of 20 cm, it is thermically insulated, and with an approximate volume of 31 l. In its interior th ere is a 15 kW electric resistor for heating, also an overflow pipe, an output pipe and another one for recirculating the water through the exchanger. • Recirculation circuit. The hot water in the tank can be cooled by entering cold water through the cooling circuit. This circuit is composed of a centrifugal pump that circulates the hot water from the bottom of the tank through a tube bundle heat exchanger returning at a lower temperature at its top. The plant control elements are connected to a PMCIO unit operated under the ORSI Automazione CUBE control software. The PMCIO ar chitec ture allows to implement control algorithms programmed in a PC using CUBE's ITER 11 language. However th e execution time is restricted to 100 milliseconds and taking into account that PMCIO CPU is an old Intel 8086 it is clear that the min-max problem cannot be solved numerically in the PMCIO . So it is a suitable scenario to the neural network implementation described in this paper. Several predictive c ontrol strategi es has been applied to the control loop V8 - TT4 . In (Camacho and Bordons, 1999) a precomputed linear GPC is applied. On the other hand nonlinear predictive control has been applied to this control loop in (Ramfrez et al ., 1999) (in this work control actions were calculated in a PC, rather than the PMCI0 unit). A first order lineal model for the transfer function from V8 to TT4 has been obtained by step response. The initial conditions were V8 = 50%, TT4 = 31.73° C, TT5 controlled with a PID around 50 °C , constant tank level of 76.8% and the set point for the cooling plant to get TT2 around 23. 3°C . A step in the aperture of valve V8 from 50% to 70% yields the following model: G(s) = 0.135 e-6s 65 + 1 (6) A CARPvlA model is obtained sampling model 6 with a sampling time of 1 second (giving a delay d of 6) and the controllers parameters have been chosen to be Nu = 3,NJ = 7,N2 = No = 12 ,.\ = 3.0,8 = 0.2, ft = -0 .2. To train the NN a set 119 of pattern s were generated for set point values of 32°C , 35°C and 37°C . A total of 36963 patterns were gene rated for the training set and 6627 for th e test set. A MLP with 10 neurons in the hidden layer was train ed using the Levenberg-Ylarquardt rule until the average error in both se ts were under 1.5 %. The resulting controller was applied to the heat exchanger and some of the experimental results are depicted in figures 4 to 5. Figure 4 shows a set point tracking experiment. It is noteworthy that the set point is higher than th e operating point considered for modeling the heat exchanger dynamics. Th e noisy output is due to the variations in the tank temperatur e (TT5) which is regulated by a local PI. Also it is noteworthy that the V8 aperture is not affected by fast TT5 changes, on the other hand V8 aperture follows TT2 changes and TT5 slow changes. Disturbance rejection is illustrated in figure 5. In this case the manual valve of cold water was closed for 15 and 20 seconds, causing the temperature to greatly deviate from the set point. The controller reacts by closing the re circulation valve V8 to low the temperatur e by having less hot water to be cooled. Opening again the valve is another disturban ce and th e controller has to open again the V8 valve to bring the temperature TT4 to the desired value. Finally a third experiment depicting a slow variation of plant dynamics is shown in figure 5. In this case, the tank temperature (TT5) was raised from the nominal point (50°C) to a point around 70°C. It is clear that the controller is able to keep the output close to the set point as soon as the tank temperature reaches the new oper - ating point. Meanwhile a small offset is observed as expected, because the uncertainty grows as a ramp and the integrated uncertainties MMMPC is formulated to reject step disturbances. 6. CONCLUSIONS A Neural Min-Max MPC controller has been proposed and applied to a pilot plant. Problems related to process delay have been tackled and discussed taking into account real time implementation requirements. The suitability of a NN approach has been discussed and brought to practice. Further investigations will be needed to include constraints and adaptive skills in the control strategy . 7. REFERENCES Allwright, J.C. (1994). Advances in Model- Based Predictive Control. Chap. On min-max
37 " 33 I I I I I I I I : I W (a) (b) Fig. 4. Set point tracking experiment: a) set point and heat exchanger output temperature b) Valve V8 aperture, tank temperature TT5 and cold water temperature TT2 Model-Based Predictiv e Control. Oxford University Press . Arahal , M.R., M. Berenguel and E.F . Camacho (1998). Neural identification applied to predictive control of a solar plant. Control Engineering Practice 6, 333-344. Camacho, E. F. and Manuel Berenguel (1997). Robust adaptive mod el predictive control of a solar plant with bounded uncertainties. International Journal of Adaptive and Signal Processing 11 , 311-325. Camacho, E.F . and C. Bordons (1999). Model Predictive Control. Springer-Verlag. Campo, P. J. and !'vi. Morari (1987). Robust model predictive control. In : Proc. American Control Conferen ce. pp. 1021-1026. Ramirez, D.R. and E.F. Camacho (2000). Properties of min-max mp c with global uncertainties. Internal Report, Dept. Ingenieria de Sistemas y Automatica , Universidad de Sevilla. Ramirez, D.R., D. Lim6n-;\Iarruedo, J. G6mez- Ortega and E.F . Camacho (1999). YIodel based predictive control using genetic algorithms. Application to a pilot plant . In: Proc. European Control Conference, ECC ' 99. 120 "'i '" '" '" 39' le, ", "" 33' 32' (a) ~~~ 46 0 zoo 400 600 800 1000 1200 (~ 200 '00 "'" aoo 1000 , 200 (b) Fig . 5. Disturbance rejection experiment: a) set point and heat exchanger output temperature b) Valve V8 aperture, tank temperature TT5 and cold water te mperature TT2 l:~ 340 1 00 200 300 ~ 500 600 100 900 900 1000 --" (a) (b) Fig. 6. Slow variation of plant dynamics experiment: a) set point and heat exchanger output temperature b) Valve V8 aperture, tank temperature TT5 and co ld water temperature TT2