Academia.eduAcademia.edu

MPC@CB software: A solution for model predictive control

2008, Computer Aided Chemical Engineering

This paper deals with a reusable simulation computer code (MPC@CB †). The original program was developed under Matlab for single input single output (SISO) model predictive control (MPC) for any constrained optimization problem (trajectory tracking, processing time minimization…). The control structure is an adaptation of MPC with internal model control (IMC) structure. The algorithm was applied and validated for different processes. It was adapted in this work for multiple input multiple output (MIMO) constrained systems.

MPC@CB Software : A solution for Model Predictive Control Bruno Da Silva, Pascal Dufour, Nida Sheibat-Othman, Sami Othman To cite this version: Bruno Da Silva, Pascal Dufour, Nida Sheibat-Othman, Sami Othman. MPC@CB Software : A solution for Model Predictive Control. EFCE-European Symposium on Computer Aided Process Engineering (ESCAPE), Jun 2008, Lyon, France. 25, pp.659-664. <hal-00352476v2> HAL Id: hal-00352476 https://hal.archives-ouvertes.fr/hal-00352476v2 Submitted on 22 Jan 2009 HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers. L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés. ! " #$# % ' ( ( 3) 66 7 " ) # *( #% (+ ,--' ,. /.01//2 4 5 12 ,--' 6 - - /6 .8-1802/*-'+'- # % & .1- % 66 1 66 6 94 9:1 % #%31#1;0,/1,--' 1) *4 6( + 6 !"#$ % & '!( ) *( , & ( )& - .. ( & / . 0 % +, 1, 2, 30 % +, 1, 4 5677888 . 9 5:( . :; 7 4 5677888:( . "# :; 6 $ 4 5677888: + :; MPC@CB SOFTWARE: A SOLUTION FOR MODEL PREDICTIVE CONTROL Bruno da Silva, Pascal Dufour,* Nida Othman, Sami Othman, Université de Lyon, F-69000, Lyon, France ; Université Lyon 1, F-69622, Lyon, France ; CNRS, UMR 5007, LAGEP (Laboratoire d’Automatique et Génie des Procédés), 43 bd du 11 novembre, F- 69622 Villeurbanne, France. Abstract This paper deals with a reusable simulation computer code (MPC@CB†). The original program was developed under Matlab for single input single output (SISO) model predictive control (MPC) for any constrained optimization problem (trajectory tracking, processing time minimization…). The control structure is an adaptation of MPC with internal model control (IMC) structure. The algorithm was applied and validated for different processes. It was adapted in this work for multiple input multiple output (MIMO) constrained systems. Keywords: model predictive control, control software, polymerization processes. 1. Introduction Model predictive control (MPC) is employed in a wide variety of real-time control applications, including chemical engineering. MPC refers to a class of control algorithms in which an explicit model is used to predict the process dynamics. At each sample time, with the update of new process measurements, an open-loop optimization over a finite prediction horizon aims to find the sequence of manipulated variable [1]. But few MPC studies are devoted to processes involving complexity of chemical properties and equations which describe such systems. This MPC@CB software has already been used in its SISO version to control a simulated drying process of pharmaceutical vials [2], an experimental laboratory implementation of Powder Coating Curing Process [3] and to control a pasta dryer. The main objective of this work is to continue the development of the MPC@CB software for MIMO systems described by nonlinear ordinary differential equations (ODE) or/and nonlinear partial differential equations (PDE). Various user defined process models may be controlled by this software. Emulsion polymerization process control is considered in this work [4]. The study of a finite dimensional model is tackled, with the monomer flow rate and the jacket temperature as manipulated variables. The heat production and the concentration of monomer in the polymer particles are the process outputs. The process constraints, due to physical limitations such as the bath capacity of heating and cooling or the maximum possible flow rate, are taken into account. In the first part of this paper, the process control strategy is presented. Secondly, the developed control software is detailed. The polymerization model and the simulation results are finally discussed. * Corresponding author: [email protected] © University Claude Bernard Lyon 1 – EZUS. In order to use MPC@CB, please contact the author: [email protected] † 2 B. da Silva et al. 2. Process control strategy Model predictive control is an approach in which the control action is obtained by solving on-line, at each time, an optimisation problem [5]. More information about the predictive control scheme used in the present paper can be found in [6]. The control structure is an adaptation of MPC with internal model control (IMC) structure. In order to take explicitly into account magnitude and velocity constraints by the optimization argument u, a transformation method is used to get a new unconstrained argument p. For the output constraints handling the exterior penalty method is adopted [7]. Consequently, the penalized problem can be solved by any unconstrained optimization algorithm: the well-known and robust Levenberg-Marquardt's algorithm is used. Nonlinear algebraic differential equations are solved off-line (S0) and the time varying linearized system (STVL) is used on-line to decrease the time calculation during the control optimization. Given small input variations u, small state variations x and small output variations ym about S0 can be represented through the STVL. The final unconstrained penalized optimal control objective is formulated as a cost function J, considering the variation u of the manipulated variable u about a chosen trajectory u0. The control problem is a general optimization problem over a receding horizon Np where the cost function Jtot to be minimized reflects any control problem J (trajectory tracking, processing time minimization, energy consumption minimization, …), and nc constraints ci on measured (or estimated) outputs may be explicitly specified by Jext. k (resp. j) is the actual (resp. future) discrete time index, yref describes the specified constrained behavior for the process measure yp and ym is the continuous model output. Since the problem is solved numerically, a mathematical discrete time formulation is: min J tot ( p ) = J ( p ) + J ext ( p ) J ( p) = k+N p ∑ g( y ( j ), y p (k ), ym ( j ), u ( p ( j ))) ref j = k +1 j = k + N p i = nc J ext ( p ) = (1) ∑ ∑ max [0, c ( j )] 2 j = k +1 i =1 i 3. Control software : Main features of MPC@CB Based on the process control strategy described here, the codes of the MPC@CB software have been written in Matlab. The program allows realizing the MPC of a process under constraints. The codes were adapted to make them easy to implement to any SISO process or MIMO process, through the user files (where the model equations have to be specified), synchronized by few main standards files (where the user has to make few (or no) changes). The model has to be given under the form:  dx  = f ( x, u )  dt  y = g ( x) (2) MPC@CB SOFTWARE: A SOLUTION FOR MODEL PREDICTIVE CONTROL 3 In the newly developed program, the number of states in the SISO or MIMO model is not limited. The model may be linear or nonlinear, time variant or time invariant, based on ordinary differential equations (ODE) and/or partial differential equations (PDE). Another originality of the software is the simplicity for the user to solve control problems by various choices: • MPC for a custom cost function (trajectory tracking, processing time minimization…), with or without the output constraint. The user may specify any reference trajectory. • SISO, MISO, SIMO or MIMO model (a new feature introduced by this work). • In order to study the robustness of the control law, it is easy to introduce, for any model parameter, different values in the model (used in the controller) and in the simulated process. It is assumed that the simulated process and the model are described by the same equations. • Closed loop control with PID in order to compare control performances with the MPC. • Possibility to introduce a cascaded process (which input of the cascaded process is the output controlled by the software) • Possibility to specify any condition to stop the run before the final time. • A software sensor (observer) can be introduced. • Open or closed loop control. The software has been already used for a real time application. The development of this software is still in progress and it is very easy to introduce new parts in the current code. 4. Application example 4.1. Process model A simplified model of emulsion polymerization process is given by the following equations:  dNT  dt = Qm  dN  = Qm − R p  dt  dT 1 = ∆H R p + UA(Tj − T ) + Qm C p _ feed (T feed − T )  ρ dt C V m p   dV MWm  dt = ρ m  [ ] (3) Where NT (mole) is the total number of moles of monomer introduced to the reactor. Qm (mole/s) is the monomer input flow rate. N (mole) is the number of moles of residual monomer. Rp (mol/s) is the reaction rate. T, Tfeed, Tj (K) are the reactor, the feed and the jacket temperatures respectively. ρm and ρp (kg/dm3) are the monomer and polymer densities respectively. Cp and Cp_feed (J/kg/K) are the heat capacities of the reaction medium and the feed. V (dm3) is the total volume of the reaction. ∆H (J/mole) is the reaction enthalpy. A (dm2) is the heat transfer area between the jacket and the reactor. 4 B. da Silva et al. U (W/K/dm2) is the heat transfer coefficient of the reactor wall. MWm (kg/mol) is the monomer molecular weight. With Rp = µ k p0 e − EA [M ] p ( N , N T ) RT (4) Where µ (mole/dm3) is the number of moles of radicals in the polymer particle. kp0 (dm3/mol/s) is the pre-exponential factor of the propagation rate coefficient. EA (J/mole) is the activation energy of the propagation rate coefficient. [M]p (mol/dm3) is the concentration of monomer in the polymer particles. Usually, when polymer particles are saturated with monomer, only the jacket temperature can be used to control the reaction rate. The reaction rate is insensitive to the monomer flow rate during this interval. This reduced the controller to SISO system. In this work, we will be interested in showing the interest of controlling MIMO systems. Therefore, we consider the interval where polymer particles are not saturated with monomer. In this case both control variables: the monomer flow rate and the jacket temperature affect the reaction rate and can be used in the MISO controller. During this interval [M]p is given by: [M ] p ( N T , N ) = N  NT − N N   + MWm   ρ  ρ p m   (5) The heat production QR is given by: QR = ∆H R p (6) 4.2. Process measurements The nonlinear state given by equations (3) is x = (NT ; N ; T ; V) . The state x is assumed to be completely measurable each 10s by calorimetry. is also a state of the system which is not modelled and not measured but can be estimated online from the other measurements. In the presented simulations, this state is assumed to be constant, but variations of can be taken into account in the software scheme. 4.3. Control objective Due to physical limitations, the jacket temperature was constrained in the admissible range 50-90°C with a small variation rate (1°C/min). The maximal admissible flow rate is 0.001 mol/s. The control objective is to maximize the reaction rate, which implies to attain as fast as possible the allowable reaction heat. The maximum allowable heat should be calculated from the capacity of the jacket to evacuate the heat in order to ensure the process safety. It is obvious that maximizing the heat production and therefore the reaction rate leads to the process time reduction. Optimizing the heat production leads therefore to optimize the process productivity. In order not to exceed the saturation concentration of the polymer particles, a constraint is considered on [M]p which is considered by the controller as a constraint on the state N. MPC@CB SOFTWARE: A SOLUTION FOR MODEL PREDICTIVE CONTROL 5 4.4. Simulation results The parameters of styrene polymerization were used in the simulation. The objective of the first simulation was to maintain the heat production QR at its maximum admissible value fixed arbitrarily at 60W using the SISO MPC controller by manipulating the monomer flow rate (Figure 1). It can be seen that the desired heat production was reached rapidly by manipulating the monomer flow rate that was not saturated at any moment. This is due to the long horizon length used in the simulations. In the second simulation (Figure 2), the MISO control strategy was applied to obtain the desired heat. The adapted MPC@CB software for a multi-variable case was used with the four dimensional ODE’s system of the emulsion polymerization process. In this case the monomer flow rate and the jacket temperature were both manipulated in order to reach the desired heat. It can be seen that no saturation in their values was reached and the desired heat production can be attained more rapidly with the MIMO strategy than with the mono-variable SISO controller. 5. Conclusion and future works In this paper, the existing MPC@CB software was extended for a multi-variable use. From a practical point of view, the drawback of MPC is the computational time aspect. MPC@CB algorithm allows decreasing the computational burden during on-line control. The predictive control strategy used in this software is robust and is defined by few adjustable parameters. MPC@CB software offers a turnkey solution for a constrained nonlinear multi-variable predictive control. Possibilities to control the particle size distribution of a styrene emulsion polymerization with this multi-variable strategy and this software are under study. Nonlinear PDE such as the particle size distribution can easily be discretized using numerical methods, like the finite differences and can therefore be used by the software. References [1] S.J. Qin and T.A. Badgwell, A survey of industrial model predictive control technology, Control Engineering Practice, No 11 (2003) 733. [2] N. Daraoui, P. Dufour, H. Hammouri, Model Predictive Control of the Primary Drying Stage of the Drying of Solutions in Vials: an Application of the MPC@CB Software (Part 1), Proceedings of the 5th Asia-Pacific Drying Conference 2007, vol. 2, pp. 883-888, Hong Kong, China, August, 13-15 2007. [3] K. Abid, P. Dufour, I. Bombard, P. Laurent, " Model Predictive Control of a Powder Coating Curing Process: an Application of the MPC@CB© Software ", Proceedings of the 26th IEEE Chinese Control Conference (CCC) 2007, Zhangjiajie, China, vol. 2, pp. 630-634, July 27-29 2007. [4] Mazen Alamir, Nida Sheibat-Othman, Sami Othman, Constrained nonlinear receding horizon control for maximizing production in polymerization processes, IEEE Transaction on Control Systems Technology, 2006. [5] D. Q. Mayne, J. B. Rawlings, C. V. Rao, and P. O. Scokaert, Constrained model predictive control: Stability and optimality, Automatica, No 36 (2000) 789. [6] P. Dufour, Y. Touré, D. Blanc and P. Laurent, On nonlinear distributed parameter model predictive control strategy: On-line calculation time reduction and application to an experimental drying process, Computers and Chemical Engineering, Vol. 27, No. 11, 15331542, 2003. [7] R. Fletcher. Pratical Methods of Optimization. John Wiley and Sons, 1987. 6 B. da Silva et al. Figure 1: Optimization by SISO MPC of the dynamic of the output heat production. Figure 2: Optimization by MISO MPC of the dynamic of the output heat production.