Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Design of An Adaptive Predictive Controller For A Continuous Stirred Tank Reactor

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Design of an Adaptive Predictive Controller for a

Continuous Stirred Tank Reactor


H.BOLANDI M.KHODABANDEH S.BAHMANPOUR
Electrical Department Electrical Department Electrical Department
Iran University of Iran University of Iran University of
Science & Technology Science & Technology Science & Technology
Narmak,Tehran,Iran Narmak,Tehran,Iran Narmak,Tehran,Iran

http://www.iust.ac.ir http://www.iust.ac.ir http://www.iust.ac.ir

Abstract: -An adaptive predictive controller has been designed in this paper. The model
predictive controller design is based on the linear model and by employing adaptation
mechanism; it can be applied to the nonlinear systems. Identification of the linear model
parameters in each sample time from a recursive least square method is the suggested
technique for adaptation. This method is applied to a CSTR1 as a nonlinear MIMO system with
considering measurable disturbances. Simulations are performed for normal operating
condition and a case in which system is caused with disturbance.

Key-words:-Model Predictive Control, Adaptive, CSTR

1 Introduction a vendor's perspective on industrial MPC


Process Industries for instance chemical technology and summarizes likely future
and petrochemical plants have special developments.
specifications that application of simple Weakness of linear models in
control algorithms couldn't cover the total considering the nonlinearity of systems
aspects of the control and economic caused studying the application of
demands. Some of these specifications are nonlinear models in MPC' considered to
nonlinearity, interaction, numerous be started from 1990's. Until now many
variables and presence of disturbances. implementations of MPC & NMPC
Whereas application of Advance Process (Nonlinear MPC) methods have been
Control in an automated hierarchical reported. [2,4] present an overview of
structure for these systems besides of commercially available MPC & NMPC
obtaining the control and product technologies.
requirements, has involved greatly Adaptation of linear models with
economic benefits. occurrence of new conditions according to
Backbone of any APC (Advance variety of operating points in nonlinear
Process Control) method is Model systems is a solution for extending linear
Predictive Control [1]. MPC (Model methods in design of controllers for
Predictive Control) refers to a class of nonlinear systems.
algorithms that compute a sequence of In this paper we concentrate on a CSTR as
manipulated variable adjustments in order a highly nonlinear system. Our model
to optimize the future behavior of a plant. predictive controller is based on an
Originally developed to meet the ARMAX (Auto Regressive Moving
specialized control needs of power plants Average with external Input) model when
and petroleum refineries, MPC technology its parameters are changed properly
can now be found in a wide variety of according to the new operating conditions.
application areas including chemicals & Measurable disturbances are considered in
petrochemical, food processing, design of the controller. The adaptation
automotive, aerospace, metallurgy, and mechanism is based on identification of
pulp and paper [2,3,4]. Several authors the parameters of the linear model
have published excellent reviews about according to the inputs, outputs and
MPC theoretical issues [5, 6]. [7] Provides
measurable disturbances values with A ( z −1 ) y(t ) = B ( z −1 )u (t − 1) + D( z −1 ) w(t ) (2)
recursive least squares (RLS). + Dd( z −1 ) I (t ) + C( z −1 )ξ (t )
In section 2 the mentioned adaptive model Where
predictive controller is proposed. A review A ( z −1 ) = I l ×l + A1 z−1 + ... + Ana z − na
of model predictive control with
considering measurable disturbances is B( z−1 ) = B0 + B1 z−1 + ... + Bnb z− nb
presented in section 2.1. Adaptation D( z−1 ) = D0 + D1 z−1 + ... + Dnd z− nd
mechanism is explained in 2.2. In section Dd( z−1 ) = Dd 0 + Dd1 z−1 + ... + Ddn Dd z− n Dd
3 model of the selected Continuous Stirred
Tank Reactor is introduced. Simulation C( z−1 ) = I l ×l + C1 z−1 + ... + Cnc z − nc
results are presented in section 4 which
shows the validity of the designed (C is assumed identity matrix i.e. white
algorithm and discussions on the noise).
application of the mentioned scheme on In the following analysis we assume that
CSTR. Finally Section 5 draws some prediction equations derived to the free
concluding remarks. and forced response after solving a
Diophantine equation. The following
2 Adaptive Model Predictive method is very similar to the Generalized
Control Predictive Control (GPC). These equations
are obtained after some extensions of the
equations from [3].
2.1 Model Predictive Control
yˆ (t + 1) = G j ( z −1 )u (t ) + H j ( z −1 ) w(t + 1) + f1
The concept of model predictive control
involves the repeated optimization of a yˆ (t + 2) = G j ( z −1 )u (t + 1) + H j ( z −1 ) w(t + 2) + f 2
performance objective such as (1) over a 
finite horizon extending from a future time yˆ (t + N 2 ) = G j ( z −1 )u (t + N2 − 1) + H j ( z −1 ) w(t + N 2 ) + f N2
N1 up to a prediction horizon N2. Given set (3)
points r(k+j), a reference ω(k+j) which is
produced by pre-filtering and is used Equation (3) can be represented in a
within the optimization of the MPC cost compressed form as (4):
function. The control variable u(k+j), over
the control horizon Nu , is obtained from ˆ = GU + HW + f
Y
solving the cost function. (4)
Ν2 Νυ
J = ∑ yˆ (t + i) − ω(t + i) + ∑ Δu(t + j − 1 ) R All terms of the (4) aren’t used in (1) but a
2 2
Q
i = Ν1 j =1 portion of them, based on prediction and
(1) control horizons as (5) can be used.
ŷ(t + i) is the predicted outputs vector and
∆u is the increment of input vectors. R ˆ =G U + H W +f
Y (5)
N12 N12 u Nu N12 N12 N12

and Q are the weighting matrix and N1,N2


and Nu must be tuned as controller YN12 [
ˆ = yˆ (t + N ) T
1 yˆ (t + N + 1)  yˆ (t + N ) ]
1
T
2
T T

= [u (t ) u (t + 1)  u (t + N − 1) ]
parameters. T T T T
U Nu
Suppose an ARMAX model in the form of 3

(2). Which is given in this equation y,u,w,ξ WN12 = [w(t + N ) w(t + N + 1)  w(t + N ) ]
1
T
1
T
2
T T

are the output vector, input vector, [


f N12 = f NT1 f TN1 +1  f TN2 ]
T

measurable disturbance and noise vectors


With considering (5) in the index of
respectively. A,B,D,C are the
performance as in (1) and solving it,
corresponding matrix polynomials. I(t) is
increment of the control input is achieved
an assumed constant disturbance and Dd is
as (6):
its matrix polynomial. I(t) and Dd are used
( )
for modeling the constant terms that are
generated by linearization of the nonlinear
−1
(
∆U Nu = G TN12 u QG N12 u + R G TN12 u Q r − H N12 WN12 − f N12 )
system. (6)
At the same time (6) can be solved by y(t ) = θ Tϕ + e(t )
Quadratic Programming while constraints (7)
on system variables exist.
Where e(t) is a white noise vector.
2.2 Adaptation Mechanism for
Nonlinear Systems ϕ (t ) = [− y(t − 1)T , − y(t − 2)T ,,− y(t − na )T ,
For using the equations in section 2.1 for
u (t − 1)T , u (t − 2)T ,, u(t − nb − 1)T
nonlinear systems we must linearize the
, w(t )T , w(t − 1)T ,, w(t − nd )T ,1 ,1]T
,
,1
nonlinear describing equations of the (8)
n Dd
system in each step time. This scheme is
[
θ = A1 A2  An a B0 B1  Bnb D0 D1  D nd Dd 0 Dd 1  Dd n Dd ]
T

very efficient. In order to increase the


speed of the controller, linearization could (9)
be performed in greater time scales but in
this case accuracy of the linear model may In each step time new parameters of the
be reduced according to the selected time linear transfer function is calculated by
scales. After linearization and RLS with considering the previous inputs,
discretization of the linear state space outputs and measurable disturbances. (10),
model, it is converted to the transfer (11) represent the RLS equations for
function representation as an ARMAX estimating the parameters. In these
model form. In this case we have a model equations, θˆ is the estimated parameters
as form as (2) with measurable matrix, p is the error covariance matrix
disturbances and a constant term as and λ is forgetting factor.
transfer function of the assumed constant θˆ(t ) = θˆ(t −1) +
disturbance that be generated from (λ + ϕ (t − 1)T p(t − 2)ϕ (t − 1))−1 p(t − 2)ϕ (t −1)[ y(t) − θˆ(t −1)T ϕ (t − 1)]T
linearization. Now equations (1-6) can be (10)
used for calculation of the control input 1
p (t − 1) = p(t − 2) −
and this procedure is repeated in each time λ
1
step [8]. This approach is time consuming (λ + ϕ (t − 1)T p(t − 2)ϕ (t − 1))−1 p (t − 2)ϕ (t − 1)ϕ (t − 1)T p (t − 2)
λ
and if an accurate model of system is not (11)
available or system parameters are time These parameters are used in the MPC
varying, this approach can not work block. Linearization in first steps is
properly. Furthermore equations (1-6) can performed to obtain the appropriate initial
be used in an adaptive model predictive values in identification algorithm. If
controller. number of model parameters is many,
Measurable
Disturbances Immeasurable
parameter identification causes bad
Parameters
Disturbances modeling and therefore this approach can
θ not work properly.
Reference Output
Input
MPC CSTR

3 A Continuous Stirred Tank


Reactor
Adaptation
Mechanism
(Parameter Estimation) The CSTR system is a highly nonlinear
process and has several interesting features
Fig. (1); Block diagram of the controller and CSTR
for process control engineers. In the
jacketed chemical reactor (CSTR) shown
Therefore, identification of the system in Fig. (2), a second-order exothermic
transfer function parameters could be done reaction (2A → B) takes place, in which 2
by an adaptation mechanism. In this case components A react irreversibly and at
parameters of the system are identified specific reaction rate k to form a product B
with well known recursive least squares [10]. The reaction rate constant k follows
method [9]. the Arrhenius (12). According to this
equation, the effect of temperature, Tr(t),
on the specific reaction rate k is usually
exponential. This exponential temperature
dependence represents one of the most In this system, we consider the following
severe nonlinearities in chemical variables will change over time:
engineering systems. Control Input variables:
−a W (t): Feed mass flow rate (lb/min)
(Tr + 460 )
k = k0 e (12) Wj(t): Water cooling rate at jacket
The mathematical model for this CSTR (lb/min)
involves a mass balance on A, in which Outputs:
the flow of moles of component A into the CA(t): Concentration of reactant A in
system, minus the flow of moles of A out reactor and exit stream (lb/ft3)
of the system, plus the rate of formation of Tr(t) : Reactor temperature (o F)
moles of A component form chemical Tjo (t): Outlet jacket temperature (oF)
reactions is equal to time rate of change of Measurable disturbances:
moles of A component inside system. This CAi(t): Concentration of reactant A in
concept is expressed by (13). The first law feed (lb/ft3)
of thermodynamics puts forward the Tji(t) : Inlet jacket temperature (oF)
principle of conservation of energy. The Tri(t) : Input reactants temperature
mathematical model must include an (oF)
enthalpy balance on reacting mass, and an Tracking the desired set points of
enthalpy balance on jacket (water is concentration of reactant A and outlet
flowing through the jacket). In this case, jacket reactor temperature is the goal of
the flow of internal energy into the system, design of predictive controllers. Since
minus the flow of internal energy out of reactor temperature must be in the safe
the system, plus the heat added to the region, it is considered in design of the
system by reaction is equal to the rate of controllers.
change of internal energy inside the The model given by (12-15) can be
system. The balance on reacting mass is expressed as (16).
given by (14) and the balance on the jacket
by (15). For more details about the model ∂x( t )
= f ( x( t ),u( t ), w( t )) (16)
and its parameters you can refer to [10]. ∂t
Mass Balance on A:
∂C A W (13) Where:
= ( C Ai − C A ) − kC A2
∂t Vρ
Enthalpy Balance on reacting mass: C A( t ) C Ai 
   
∂Tr W UA ( −∆H ) 2 x(t) =  Tr ( t )  , w( t ) =  Tri 
= ( Tri − Tr ) − ( Tr − Tjo ) + kC A
∂t Vρ VρC p ρC p Tjo ( t )  Tji 
   
(14) C A   W( t ) 
Enthalpy Balance on Jacket: y( t ) =   , u( t ) =  
T
 jo  Wj ( t )
∂Tjo UA W (15)
= ( Tr − Tjo ) − j ( Tjo − Tji )
∂t M j C pj Mj After linearizing equation (16) by Taylor
series expansion around the operating
point (17) is obtained. In this situation we
have a linear state space model:

x(t + 1) = Ax (t ) + Bu(t ) + Nw (t ) + N 0 (17)

A,B,N are the system matrix, control


input matrix and measurable disturbance
input matrix respectively. N0 is a constant
n × 1 matrix (n is number of state variable)
which will be generated from linearization
around the operating point because of
nonzero initial values.
Fig (2); Continuous Stirred Tank Reactor
4 Simulation Results
In this section, the designed algorithm is
applied to the CSTR. The values of CSTR
parameters are from [10].
The CSTR system has 2 outputs, 3
measurable disturbances and 2 inputs. For
utilizing the identification method in
adaptation mechanism, we want to use (7)
in the RLS algorithm and vectors in φ must
have same dimension. Here we add a zero
input as third input and consider Tr as third
output.

The assumptions for simulations are:

- The process noise is random and applied


to the input of system with variance 1, Fig. (3) Responses of the CSTR after application of
zero expectation value and amplitude of the adaptive predictive controller. Dashed line is for
adaptive predictive controller of the nonlinear
10% of the input control signal. system and dotted line for reference
(Signal/Noise ratio is constant and equal to
90%). Fig. (3) illustrates responses of the controller
- The measurable disturbances have the that be applied to the CSTR.
nominal expectation values and a random
noise with variance 1, zero expectation
value and amplitude of 10% of the
nominal value are added to them. .
(Disturbance per disturbance noise is also
constant and equal to 90%).
- Reference trajectories are exponential
functions that follow the set points
smoothly as (18):

w (t ) = SP + (y 0 − SP )e −αt , α = 0.005( 1 ) (18)


sec
Fig. (4); third state (Tr)
SP is the set points vector and y0 is the
output initial value vector. Fig.(4) shows Tr as the third state of the
- Set points of this CSTR are: system. Fig.(5) represents control input
CA= 3.5955 lb/ft3 signals.
Tjo=120.0222 ° F In this case, the controller works properly.
- The Inputs are limited to the [0-1400] Outputs are tracking the set points with less
(lb/min). than 1% steady state error and Tr also is good.
With respect to the system dynamic and If the model of CSTR is affected by
with a trial and error operation, the disturbance or parameters of the system are
parameters of the controller are achieved time varying, identification of the model
as follows: parameter is a good solution in consideration
with linearization but choosing initial values
N1 = N u = 1 , N2 = 3 , Ts = 1 sec for identification of the model parameters are
important. At hence we obtained initial values
5 0  4000000 0 
R= , Q= from linearization for first steps in
 0 2  0 4000 identification.
assumptions and controller parameters are
as same before. After a transient time and
with a little variation, the controller can
generate control input signals that cause
good tracking of the references. The
controller has good responses in two cases.

Fig. (5); Control Input signals

Now we consider the system that its


measurable disturbances are changed. In
this case we suppose concentration of
reactant A in feed is increased 50% (i.e. Fig. (7); Third state (Tr) after application of adaptive
CAi =16.2 lb/ft3) at time t=1500 sec. predictive controller in cases that measurable
disturbance is changed.
Two cases are discussed:
Case 1: the value of this measurable Fig. (7) represents Tr for two mentioned
disturbance is changed but the measured cases. Fig. (8) also represents control input
value of CAi that be send to the controller
is as same as before. signals for the controllers in these cases.
Case 2: the value of this measurable As can be seen in Fig. (6), if measurable
disturbance is changed but in this case the disturbances are measured well and its
measured value of CAi is as same as the violations are reported to the controller,
actual value which is applied to the CSTR. the responses will be better and the
reference can be tracked faster. It's
because of considering the measurable
disturbances in design of the controller.

Fig. (8); Control Input signals (measurable


Fig. (6); CA & Tjo after application of the adaptive disturbance is changed.-cases 1 & 2)
predictive controller to the CSTR which its
measurable disturbance is changed (case 1 & 2). 5 Conclusion
Dashed line is for adaptive predictive controller of
the nonlinear system and dotted line for reference In this paper a linear model predictive
controller with an adaptation mechanism is
Fig.(6) illustrates responses of the CSTR, extended to deal with nonlinear systems.
after applying the controller while The adaptation mechanism is based on
concentration of reactant A in feed is identification of the model parameters in a
increased 50% in two cases. The recursive manner. In this way, the
controller adapts itself with nonlinear
model. Furthermore measurable A tutorial and survey, ADCHEM '94
disturbances are considered in derivation Proceedings, Kyoto, Japan.1994.
of the model predictive controller. If an [7].Froisy, J. B. Model predictive control:
accurate model of a system is available, Past, present and future, ISA Trans,
linearization is an efficient solution but it vol(33), 1994, , pp235-243.
is time consuming. When parameters of [8]. Astrom, K.J., Wittenmark, B.
the system are unknown, then "Adaptive Control", 2nd edition. Addison-
identification of linear system could be Wesley Publ Co, 1995.
extended to nonlinear system. This method [9]. Goodwin, G.C., Sin, K.S., "Adaptive
is faster but its efficiency is reduced by Filtering Prediction and Control".
increasing the number of parameters. Also Prentice-Hall, Englewood Cliffs, NJ,
selection of initial value for identification 1984.
of model parameters is important. For [10]. R.M. Menendez, "Real-time
identification of model parameters we Monitoring and Diagnosis in Dynamic
obtained initial values of parameters by Systems Using Particle Filtering
linearization the nonlinear model in first Methods", PhD thesis, Instituto
steps and then we employ adaptation Technologico Y DE Estudios Superiores
mechanism. De Monterrey. Monterrey, Nuevo Leon,
The adaptive predictive controller is Mexico, May 2003.
applied to a CSTR as a nonlinear MIMO
system and the results are discussed in
normal case and two cases that measurable
disturbances are changed. In case 1 this
change isn't reported to the controller but
in case 2 is reported. In these cases
controller is working properly. In case 2,
controller works better than case 1.

References
[1]. Sourande, M., Hammarstrom, L.,
Erkkila, J., Meskanen A., “Experience on
Advanced Process Control in Chemical
Industry”. IFA Technical Committee
Meeting, Thessaloniki, Greece, 10-12
October, 2001.
[2]. Qin, S.J., Badegwell, T.A. “An
Overview of Industrial Model Predictive
Control Technology”.5th International
Conference on Chemical Process Control
AIChE & CACHE. Kantor, J.C., Garcia,
C.E., Camahan, B. (Editors), 1997,
pp.232-256.
[3]. Camacho, E.F., Bordons, C. “Model
Predictive Control”. Springer, 1999.
[4]. Qin, S.J, Badgwell, T.A., “An
Overview of Nonlinear Model Predictive
Applications”. International Symposium
on Nonlinear Model Predictive Control,
Ascona, Switzerland, 1998.
[5].Garcia,C. E., Prett, D. M. Morari, M.
Model predictive control: Theory and
practice--a survey, Automatica 25(3):
1984, pp: 335-348.
[6].Rawlings, J. B., Meadows, E. S. Muske,
K. R.. Nonlinear model predictive control:

You might also like