You are on page 1of 5

Model Predictive Control of A CSTR with van de

Vusse Kinetics
Project Report for Optimization
Satyajeet S. Bhonsale

1
1.1

Introduction
Van de Vusse Reacor

The Van de Vusse rector consists of a continuous stirred tank reactor in which exothermal reactions takes place. The reactions occuring are:
k

A 1 B 2 C
k

2 A 3 D

(1)

The heat generated by these reactions is removed from the reactor through an external
jacket. Operating the reactor at different conditions leads to different yields of the
products. Thus, it is necessary to operate the reactor at a constant set-point value
which will achieve the optimal yield of the desired product. The process dynamics of
the reactor are given as follows:

Figure 1: Schematic Representation of the Reactor


1

dCa
dt
dCb
dt
d
dt
dk
dt

F
(Ca0 Ca ) k1 Ca k3 Ca2
Vr
F
= (Cb ) + k1 Ca k2 Cb
Vr
F
kw Ar
1
= (0 ) +
(k )
(R1 + R2 + R3 )
Vr
Cp Vr
Cp
1
=
(Qk + kw Ar (k ))
mk Cpk
=

(2)
(3)
(4)
(5)

where Ca , Cb are the concentrations of reactant A and product B, ki are reaction


Ea
rates which depend on the temperature through the Arrhenius law (ki = Ai e R
). Ri is the heat generated by each reaction. F and Vr are the reacant flow rate
and reactor volume. F/Vr gives the dilution rate of the CSTR which along with Qk ,
the heat removal rate, are the two control variables. Ar and kw are the surface area
and the heat transfer coefficient for the jacket, mk the coolant flow rate, Cp and Cpk
denote the heat capacity of the reaction solution and the coolant. k is the coolant
temperature. The state vector of this system is thus defined as x:
x = [Ca , Cb , , k ]>
and the control vector is defined as u:


F
, Qk
u=
Vr

1.2

>

Model Predictive Control

Model Predictive Control (MPC) belongs to a class of optimization based control.


In a MPC algorithm, the control problem is formulated as solving online a finite
horizon open loop optimal control problem subject to the process dynamics and state
and input constraints. The controller uses the measurements obtained at the current
sampling time t to predict the future behaviour of the process over a finite prediction
horizon Tp . It also determines a sequence of optimal control inputs such that a
predefined objective functional is optimized. As the true process behaviour is different
from the predicted behaviour, a feedback mechanism has to be incorporated. This is
done by implementing only the first part of the obtained control inputs to the plant
till the next measurement becomes available. Using these new measurements, the
entire cycle of prediction and optimization is repeated to find new optimal control
input with the prediction window moving forward.

2
2.1

Optimization Problem
Controller

The optimization problem in this case is the optimal control problem which is solved
using the multiple shooting approach. The aim of the controller is to achieve the
steady-state operating point and stay there. This aim is translated into mathematics

by means of a least square objective function as follows:


Z Tp 
kCa Ca,ref k2S1 + kCb Cb,ref k2S2 + k ref k2S3 + kk k,ref k2S4
J=
t

2
2
(6)
+ ku1 u1,ref kS5 + ku2 u2,ref kS6 dt
where, S1 , . . . , S6 are the respective weights. For the multiple shooting approach,
the control and the state vectors are parameterized into m interval and the resulting
vector is the vector to be optimized:
w = [x0i , u0j , . . . , xm1
, um1
, xm
i ]
i
j

(7)

The controls are considered to be piece-wise constant over the interval [tk , tk+1 ] and
denoted by ukj . The states are discretized with help of a fourth order Runge-Kutta
integrator (RK4). The RK4 calculates the state xk+1
at time tk+1 from state xki and
i
control ukj .For convinience, the process defined by equations (2)(5) in its discreetized
for will be referred as:
xk+1
= f (xki , ukj ) i = 1, . . . , 4; j = 1, 2
i

2.2

(8)

Plant

The plant is simulated using the same model equations (2)(5) as for the controller.
However, a small noise is added to the equation (2) and (3) which is assumed to
be the disturbance present in the real process. In practice the plant should run for
infinite time and the controller can predict only the near future of the plant not the
entire future.

2.3

Implementation in MATLAB

Thus, the problem implemented in MATLAB is of the form:


minimize
w

m X
X
k=0

(xki |N

xi,ref ) Si

m1
XX

(ukj |N

k=0

uj,ref ) S4+j

i = 1, . . . , 4; j = 1, 2
subject to xk+1
|N f (xki |N , ukj |N ) = 0, i = 1, . . . , 4; j = 1, 2
i
(
x0i ,
if N = 1
x0i |N =
m
xi |N 1 , if N > 1 i = 1, . . . , 4

(9)

uj,min uj uj,max j = 1, 2.
where, N is the loop is the MPC, x0i are the initial conditions at time t = 0, xi is
the state value obtained by the integration of the plant. The resulting constrained
optimization problem is solved using the Sequential Quadratic Programming approach
using the BFGH update for the Hessian.

Numerical Solution & Conclusion

Although, the plant should run for infinite time, to obtained a numerical solution the
plant is simulated for 3000 time units. The controller is assumed to predict a future
upto 60 time units. In every MPC loop, the controller solves the problem given in
(9) by a sequential quadratic programming method. The states and the controls
are discreetized into 10 intervals (m = 10). Only the first part of the optimized
control sequence ukj is applied to the plant. The plant is simulated for 60 time units
(discreetized into 50 intervals) by integrating the plant model at constant control
value throughout. The final value obtained from this integration is used as the initial
condition by the controller to find the new optimal control sequence in the next MPC
loop. In all 50 MPC loops are required to simulate the process completely for 3000
time units.

Figure 2: States of the Reactor. The horizontal lines represent the steady state
reference values used

Figure 3: Control Action by the MPC


4

In Figure 2, the horizontal dotted lines represent the steady state reference point
that had to be tracked by the controller. It can be clearly seen that the controller
achieves the required steady state value maintains it quiet well. Figure 3 shows
the control actions taken by the controller in order to achieve the desired output.
The control action obtained is in line with what can be intuitively expected. To
increase the concentration of A from the initial value to the desired value, it is first
fed in at a higher rate. The feedrate is later reduced to maintain concentration of
A. The reactions are exothermic and hence proceed faster at higher temperatures.
Thus, to increase the concentration of B, there is no heat removal initially. As the
concentration achieves the desired value, heat is removed from the system in order to
reduce the reaction rate and maintain the concentration of both A and B.

References
[1] Mattia Vallerio, Jan van Impe, and Filip Logist. Tuning of NMPC-controllers via
multi-objective optimization. Computers and Chemical Engineering, 61:38 50,
2014.

You might also like