Sunteți pe pagina 1din 5

Efficient Nonlinear Optimal Control for Dynamic Processes Using An

Adaptive Discretization Strategy


Pham Duc Dai1, Nguyen Thanh Binh1, Bui Van Dai1
daipd@tlu.edu.vn 1Department of Control Engineering and Automation -Thuyloi University

Abstract
In process control, many control issues are formulated by infinite dimensional- optimal control problems
(OCPs). We use indirect optimization approach to solve OCPs. First, OCPs are discretized into a finite
dimensional-nonlinear optimization problem (NLP). Then, the NLP can be efficiently solved by nonlinear
programming solvers. The discretization strategy is of important to the accuracy as well as quality of NLP
solution. This paper proposes to apply an adaptive discretization strategy for improving quality of the NLP
solution. The performance of our solution approach is demonstrated with two optimal control problems.

Keywords
Nonlinear optimization, orthogonal collocation, discretization, simultaneous optimization, multiple shooting.

1. INTRODUCTION
In areas of control engineering, controls of having a large number of optimization variables. This
dynamic processes were formulated as nonlinear formulation is also called collocation simultaneous
optimal control problems (OCPs). The optimization approach. In the second discretization approach, only
methods for solving OCPs can be classified into the start points of elements are optimization variables in
indirect and direct optimization approaches. In the the formulation of NLPs [1]. In addition, to guarantee
first approach, so called the direct or variation the continuity of state profiles at end points of
approach, optimal condition of an OCP leads to a two- consecutive elements, equality constraints (for each
boundary point value problem which can be only element) are introduced to ensure the value of an end
solved for OCPs where there are no inequality point of an element equal to the value of a start point
constraints. Whereas, in the direct approach, a finite of the next element [1,3]. Also, in each element (time
OCP (i.e., with equality and inequality constraints) is interval), a differential algebraic equation solver
numerically discretized into an infinite nonlinear (DAE solver) was employed to calculate the value of
optimization problem (NLP) which can be efficiently end point and the sensitivity information based on the
solved by optimization programming solvers (NLP values of start points and parameterized control
solvers). It is due to the fact that NLP solvers are variables [1,3,5]. As compared with the CFE method,
capable of treating large- scale and complex NLPs, the multiple shooting formulation results in
the direct approach has been more and more applied formulated NLPs with less number of optimization
to solve nonlinear optimal control problems. variables. The formulated NLPs resulted from both
It is well known that quality of NLP solutions is discretization methods can be efficiently solved by
essential in many industrial applications where interior point (IP) or sequential quadratic
nonlinear model predictive control (NMPC) is programming algorithms (SQP).
employed to calculate optimal control variables along In this paper, we propose to use an adaptive
a receding horizon. This is because, in the discretization strategy so as to enhance the accuracy
computation framework of NMPC, solving successive and quality of NLP solutions. The collocation
NLPs requires long computation time. The discretization method and simultaneous optimization
performance of NMPC will be more efficient if we approach are employed to carry out discretization and
can reduce the computation time for solving NLPs formulation of NLP, respectively. In addition, we use
while, at the same time, improving quality of NLP interior point algorithm (IP) in a NLP solver-called
solutions [5]. In general, the computation time and IPOPT [9] integrated in GAMS [8] to solve the NLP.
quality of NLP solutions rely on many factors such as: The accuracy and computation time of NLP solutions
the gradient and jacobian calculation (i.e., accuracy due to discretization methods are demonstrated with
and speed of calculation), number of time intervals two optimal control problems.
(i.e., number of optimization variables) required for
fine discretization of NLPs, and optimization 2. Collocation Finite Element for
algorithms. Discretization of OCPs
There are two discretization methods commonly 2.1 Collocation on Finite Element (CFE)
used to transfer infinite OCPs into finite NLPs which We consider an OCP governed by Differential
are: Collocation Finite Element method (CFE) [2] and Algebraic Equations (DAEs) in (1). Moreover, control
multiple shooting method [1]. In the first and state variables are constrained by lower and upper
discretization method, collocation points elements (or bounds.
sub-time intervals) are optimization variables in the
formulation of NLP. This leads to the formulated NLP
min z t , y t ,u t ,t f Control variables are parameterized as piece-wise
u t ,z t ,y t , t f constants in each element (i.e., constant in each
dz t element). We denote U n as a vector of discrete values
s.t. = F z t , y t ,u t ,t ; z t0 = z 0
dt of control variables at nth element.
In order to deal with elements with different
G z t , y t ,u t ,t =0 (1)
values of tn . We introduce a normalized time
u t min u t u t max
z t min z t z t max
variable 0 1 for each element (i.e., tn tn+1 )
m
dz n dz m
y t min y t y t max with relation t = t n + tn , we have = tn n .
d dt
Collocation equation (5) becomes
According to the CFE method, both state and control
j n,i m
NC d
variables are discretized on finite elements, i.e., the .zn, j tn Fm Zn,i , Yn,i , Un , t n,i
time horizon, from t0 to tf , is divided into NL finite j=0 d (8)
elements [2,7] as tn = tn+1 - tn ; n =1,...,NL i =1,...,NC; m=1,...,ND; n=1,...,NL
Where tn+1 and tn are end and start time of the nth In this paper, we consider three collocation points (
element. For any element, polynomial approximations n,i ) which are roots of Gauss- Legendre polynomial:
of state variables are accomplished by the linear n,1 0.112702 , n,2 0.500000 , n,3 0.887298 .
combination of the Lagrange polynomials as Using Gauss- Legendre collocation points, the
NC
z nm t = j t .z n,m j ; m =1,...,ND;n =1,...,NL (2) truncation of DAE solution will be O h 2 NC [6].
j=0
2.3 Simultaneous Collocation Formulation of NLP
NC t - t n,i
j t (3) Simultaneous collocation formulation of NLP
i0 t n, j - t n,i comprises of constraints in (8) and (6). It can be
i j
generally described as bellows:
In (2), znm t is the polynomial approximation of the
min Z, Y, U
u t , z t , y t ,t f
mth state variable and in nth element while z mn, j
s.t.
stands for the values of mth state variable at jth
collocation point in nth element. tn,i is the location of
NC d j n,i
.z mn, j tn Fm Z n,i , Yn,i , U n , t n,i
ith collocation point at nth element. In addition, z m j 0 d
n ,0
m
z1,0 z m t 0 ; z n-1,NC
m m
z n,0 (9)
and t n ,0 are the start value of the mth state variable
and the start time of nth element, respectively. G n Z n,i , Yn,i , U n , t 0
U min U U max
The polynomial approximations of state variables will
satisfy values at collocation points as follows [2] Z min Z Z max
NC
Ymin Y Ymax
z mn t n,i j t n,i .z nm, j z nm,i
j 0 (4) Z Z1,1 ,..., Z NL,NC NC*NL*ND
m 1,..., ND; n 1,..., NL; i 1,..., NC
Y Y1,1 ,..., YNL,NC NC*NL*NA
From equation (1), (2), and (3), we have U U1 ,..., U NL NU*NL
dznm tn,i NC d j tn,i In the NLP in (9), time lengths of elements
= .zn,mj (5) tn = tn+1 - tn , instead of being fixed values, can be
dt j=0 dt
optimized so as to attain more efficient control
To ensure the continuity of state variable profiles strategy.
between two successive elements, equality constraints
are introduced to equalize the value of the last 2.4 Optimized time lengths of elements
collocation point of an element with the value of the In order to improve the control strategy (i.e., lower
start point of the next element [2,7], hence objective function value) time lengths of elements (or
z nm-1,N C = z n,0
m
(6) time interval tn ) should be optimized. This is
Similarly, the algebraic variable profiles can be reasonable because when the system operates in a
approximated by polynomials with transient region (i.e., due to change of a set-point), a
NC
ynm tn,i j tn,i .zn,m j zn,i
m fine discretization (i.e., tn is small) is required while,
j 1 (7) in the steady state region, discretization with large
m 1,..., NA; n 1,..., NL; i 1,..., NC value of tn is sufficient. The adaptive time length (
tn ) will result lower objective function value (for r 0.219 m
minimization problem), but require more computation k0 7.2 1010 1/min
time. When considering tn as optimization variables, E/R 8750 K
the following constraints are introduced [6] U 54936 J/(min m2 K)
NL 1000 kg/m3
t
n 1
n t f t0 (10)
Cp 239 J/(kg K)
In order to reduce computation effort, the lower and H -50000 J/mol
upper bounds of time length should be [6]
t 1 tn t 1 ; 0 1/ 2 In addition, the set-point of molar concentration ( c0 )
(11) is considered as disturbance and it is increased from
where t t f t0 / NL 1000 to 1050 mol/m3 at t=9 minutes. Our task is to
find an optimal control strategy which, on one hand,
To the end, the NLP problem needs to be solved
include the problem defined in (9) with additional keeps state variables ( x1 and x 2 ) around x1s and xs2 ,
constraints in (10) and (11). We use IPOPT solver [9] and satisfies bound and ODE constraints on other
in GAMS [8] software to solve the formulated NLP. hands.
3. Case study
3.1 Continuous stirred tank reactor (CSTR) To demonstrate the advantage of adaptive time length,
The CSTR accomplishes the reaction of exothermic we solve one NLP with which adaptive time length is
[5]. The system contains three state variables which applied and one NLP with which time length is fixed.
are reactant concentration ( x 2 ), fluid level ( x1 ), and
temperature ( x 3 ). These states are controlled by the
feed reactant concentration at inlet tank u1 (mol/m3)
and temperature of the cooling system u 2 (K).
50
2 2
min [w1 x1 t - x1s + w2 x2 t - x2s
x ,u
0
2 2
+ w3 u1 t - u1s + w4 u2 t - u2s ]dt
s.t.
dx1 t 1
dt
=
r2
F 0 - u1 t

1 F0 c0 - x2 t
E 1
dx2 t -
Figure 1. Optimal control strategy u1
- k0 x2 t e 3
Rx t
= 2
dt r x1 t
1 F0 T0 - x3 t H
E 1
dx3 t -
R x3 t
= - k0 2
x t e
dt r2 x1 t rC p
2U
+
r C p
u2 t - x3 t
x1 0 x1s 0.659, x2 0 x2s 877
, x3 0 324.5K
0.5m x1 t 2.5m
800mol/m3 x2 t 1000mol/m 3
0.085m3 /min u1 t 0.115m3 /min
299K u2 t 310K Figure 2. Optimal control strategy u2
The units of parameters are given in Table 1.
Using GAMS to solve the two formulated NLPs.
Table 1: Unit and Parameter values of CSTR model We observe that solution of NLP with adaptive
Symbols Value Unit time length results an objective function value of
F0 0.1 m3/min 0.905235 while it is 0.909646 by the solution of
the NLP with fixed time length. Therefore, the
T0 350 K adaptation of time length is more advantageous.
c0 1000 mol/m3 In Fig.1 and 2, it can be seen that the optimized
control variables with adaption of time length The time-varying of the objective function is shown in
(red line) are closer to the expected values (u1s Fig.6 (i.e., the red line is for the case with time length
and u2s) than ones with fixed time length. It is adaptation, and the blue line for the case with fixed
also true for optimal states x1 and x2 time length). One again, although the discrepancy
between two objective function values are small, the
blue line is always above the red one

Figure 5. Optimal state strategy x3

Figure 3. Optimal state trajectory x1 Figure 6. Objective function

As seen in the 2nd ODE of CSRT, the change in c0


3.2. Optimization of Batch Reactor
will lead state x 2 to be strongly deviated from x s2
We consider this case study to demonstrate clearly the
However, the optimized controls u1 and u 2 reduce advantage of using time length adaptation. This
this deviation after t =10 minutes as seen in Fig.4 example is a chemical reactor taken from [5] to
maximize the yield of x2 t f after one hour of
reaction by manipulating the reaction temperature
u t . The OCP is formulated as bellows
min J -x2 t f
x,u

s.t.
dx1 t
= - u t +0.5u 2 t x1 t
dt
dx2 t
= u t x1 t
dt
x1 0 = 1, x2 0 = 0
0 x1 t , 0 1 x2 t
Figure 4. Optimal state trajectory x2 t0 0, t f 1
The objective function values are compared with
those taken from [3], given in Table 2. It can be seen
that optimized control strategy with adaptive time
length results objective function values which are a bit
lower than those taken from [3] and those obtained by
solving the NLP with fixed time length.

Table 2. Comparisons of objective function values


NL Objective OBJ with OBJ with
function value adaptive fixed time
(OBJ) from [3] time length length
20 -0.573298 -0.573431 -0.573290
160 -0.573541 -0.573543 -0.573540
320 -0.573544 -0.573544 -0.573544
Figure 5. Optimal state trajectory x3 The optimal control and state trajectories are
demonstrated in Fig.7, 8, and 9 respectively.
References
[1] Bock, Hans Georg, and Karl-Josef Plitt. "A multiple shooting
algorithm for direct solution of optimal control problems."
Proceeding of the IFAC world congress, 1984.
[2] Biegler, Lorenz T., Arturo M. Cervantes, and Andreas
Wchter. "Advances in simultaneous strategies for dynamic
process optimization." Chemical Engineering Science 57.4
(2002): 575-593.
[3] Kirches, C., Wirsching, L., Bock, H. G., & Schlder, J. P.
(2012). Efficient direct multiple shooting for nonlinear model
predictive control on long horizons. Journal of Process
Control, 22(3), 540-550.
[4] Biegler, Lorenz T. "An overview of simultaneous strategies
for dynamic optimization." Chemical Engineering and
Processing: Process Intensification 46.11 (2007): 1043-1053.
[5] Tamimi, Jasem, and Pu Li. "A combined approach to
nonlinear model predictive control of fast systems." Journal of
Figure 7. Optimal control strategy u Process Control 20.9 (2010): 1092-1102.
[6] Biegler, Lorenz T. Nonlinear programming: concepts,
algorithms, and applications to chemical processes. Society
for industrial and applied mathematics, 2010.
[7] Bartl, Martin, Pu Li, and Lorenz T. Biegler. "Improvement of
state profile accuracy in nonlinear dynamic optimization with
the quasisequential approach." AIChE Journal 57.8 (2011):
2185-2197.
[8] Brook, Anthony, David Kendrick, and Alexander Meeraus.
"GAMS, a user's guide." ACM Signum Newsletter 23.3-4
(1988): 10-11.
[9] Wchter, Andreas, and Lorenz T. Biegler. "On the
implementation of an interior-point filter line-search
algorithm for large-scale nonlinear programming."
Mathematical programming 106.1 (2006): 25-57.

Figure 8. Optimal state trajectory x1

Figure 9. Optimal state trajectory x2


4. Conclusions and future works
An efficient nonlinear optimization approach with an
adaptive discretization strategy for optimal control of
dynamic processes has been presented aiming to
improve accuracy of NLP solutions. Two optimal
control problems are taken. The results have
demonstrated that using CFE combined with an
adaptive discretization, we can improve the optimal
control strategy. In future works, we will concentrate
on developing a fast-nonlinear model predictive
control for solving optimal control problems.

S-ar putea să vă placă și