Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate...

32
Review Copy 1 Explicit model predictive control of gas-liquid separation plant via orthogonal search tree partitioning Alexandra Grancharova *, 1, 2 , Tor A. Johansen *, 3 , Juš Kocijan †, ‡, 4 * Department of Engineering Cybernetics, Norwegian University of Science and Technology 7491 Trondheim, Norway Department of Systems and Control, Jozef Stefan Institute, Jamova 39 1000 Ljubljana, Slovenia Nova Gorica Polytechnic, Vipavska 13, 5000 Nova Gorica, Slovenia 1 Present address: Institute of Control and System Research, Bulgarian Academy of Sciences, Acad. G. Bonchev str., Bl.2, P.O.Box 79, Sofia 1113, Bulgaria 2 Corresponding author: [email protected] 3 [email protected] 4 [email protected] 1 of 32 Monday , May 03, 2004 Elsevier

Transcript of Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate...

Page 1: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

1

Explicit model predictive control of gas-liquid

separation plant via orthogonal search tree

partitioning

Alexandra Grancharova*, 1, 2, Tor A. Johansen*, 3, Juš Kocijan†, ‡, 4

* Department of Engineering Cybernetics, Norwegian University of Science and Technology

7491 Trondheim, Norway

† Department of Systems and Control, Jozef Stefan Institute, Jamova 39

1000 Ljubljana, Slovenia

‡ Nova Gorica Polytechnic, Vipavska 13, 5000 Nova Gorica, Slovenia

1 Present address: Institute of Control and System Research, Bulgarian Academy of Sciences, Acad. G. Bonchev str., Bl.2, P.O.Box 79, Sofia 1113, Bulgaria 2 Corresponding author: [email protected] 3 [email protected] 4 [email protected]

1 of 32

Monday , May 03, 2004

Elsevier

Page 2: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

2

Abstract

Solutions to constrained linear model predictive control (MPC) problems can be pre-computed

off-line in an explicit form as a piecewise linear (PWL) state feedback defined on a polyhedral partition

of the state space. This admits implementation at high sampling frequencies in real-time systems with

high reliability and low software complexity. Recently, algorithms that determine an approximate

explicit PWL state feedback solution by imposing an orthogonal search tree structure on the partition,

have been developed, and it has been shown that they may offer computational advantages. This paper

considers the application of an approximate approach to the design of an explicit model predictive

controller for a two-input two-output laboratory gas-liquid separation plant, including experimental

evaluation. The approximate explicit MPC controller achieves performance close to that of the

conventional MPC, but requires only a fraction of the real-time computational machinery, thus leading to

fast and reliable computations.

Keywords: Constrained linear model predictive control; Multi-parametric quadratic programming; Gas-

liquid separator

2 of 32

Monday , May 03, 2004

Elsevier

Page 3: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

3

1. Introduction.

Model predictive control (MPC) has become the accepted methodology to solve complex control

problems related to process industries (Garcia et al., 1987; Biegler & Rawlings, 1991; Mayne et al.,

2000). It allows the design of multi-input multi-output (MIMO) control systems that minimize a

quadratic performance index in the presence of input and output constraints imposed on the system.

Recently, several methods for explicit solution of MPC problems have been developed. The main

motivation behind explicit MPC is that an explicit state feedback law avoids the need for real-time

optimization, and is therefore potentially useful for applications where MPC has not traditionally been

used. In addition to embedded system applications, this technology is also suitable for certain small-scale

process control applications. In particular, low-level control of fairly simple unit processes is typically

implemented using conventional PI/PID control rather than MPC. Some reasons are the need for high

reliability, fast processing and low software complexity, as these are typically executed in a highly

reliable computer environment. On the other hand, explicit MPC is ideally suited for such problems as it

offers the benefits of constrained MIMO control with low complexity and high reliability for such small-

scale problems.

In (Bemporad et al., 2000; Pistikopoulos et al., 2000) it was recognized that the constrained

linear MPC problem can be posed as a multi-parametric quadratic program (mp-QP), when the state is

viewed as a parameter to the problem. It was shown that the solution (the control input) has an explicit

representation as a piecewise linear (PWL) state feedback on a polyhedral partition of the state space, see

also (Bemporad et al., 2002; Johansen et al., 2002; Seron et al., 2000; Tøndel et al., 2003), and they

develop an mp-QP algorithm to compute this function.

Recently, in (Johansen & Grancharova, 2002; Johansen & Grancharova, 2003; Grancharova &

Johansen, 2002), algorithms that determine an approximate explicit PWL state feedback solution by

imposing an orthogonal search tree structure on the partition, have been developed. It has been shown

that they may lead to more efficient real-time computations. The present paper considers the application

of these algorithms to the design of an explicit model predictive controller for a laboratory gas-liquid

separation plant, including experimental evaluation. A preliminary version of this paper is given in

(Grancharova et al., 2003).

3 of 32

Monday , May 03, 2004

Elsevier

Page 4: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

4

2. Approximate approach to explicit MPC.

2.1. Explicit MPC and exact mp-QP.

Formulating a linear MPC problem as an mp-QP is briefly described below, see (Bemporad et al., 2000;

Pistikopoulos et al., 2000) for further details. Consider the linear system:

)()()()()1(

ttttt

CxyBuAxx

=+=+

(1)

where nt ℜ∈)(x , mt ℜ∈)(u , and pt ℜ∈)(y are the state, input and output variable. Also, nn×ℜ∈A ,

mn×ℜ∈B , np×ℜ∈C and (A, B) is a controllable pair. It is assumed that a full measurement of the state

)(tx is available at the current time t. Then, for the current )(tx , MPC solves the optimization problem:

{ }))(,(min))((

1,...,

* tJtVNtt

xUxuuU −+≡

= (2)

subject to:

0,

0,)(

1,...,1,0,

,...,1,

||

||1

|

maxmin

max|min

≥=

≥+=

=−=≤≤

=≤≤

++

++++

+

+

kk

tNk

Nk

tkttkt

kttkttkt

tt

kt

tkt

CxyBuAxx

xxuuuyyy

(3)

with the cost function given by:

[ ] tNttNtN

kktkttkttkttJ ||

T1

0

T||

T))(,( ++−

=++++ ++= ∑ PxxRuuQxxxU (4)

and symmetric 0>R , 0≥Q , 0>P . The column vector sNtt ℜ∈≡ −+

TT1

T ),...,( uuU , mNs = , is the

optimization vector and the final cost matrix P may be taken as the solution of the discrete-time algebraic

Riccati equation (Ogata, 1995):

QPBARPBBPBAPAAP ++−= − TT1TTT )()( (5)

With the assumption that no constraints are active for Nk ≥ this corresponds to an infinite horizon LQ

criterion, and the MPC is stabilizing (Chmielewski & Manousiouthakis, 1996).

It is shown in (Bemporad et al., 2000) that by substituting:

∑−

=−−++ +=

1

01| )(

k

jjkt

jktkt t BuAxAx (6)

in the optimization problem defined by (2), (3) and (4), this can be rewritten in the form:

4 of 32

Monday , May 03, 2004

Elsevier

Page 5: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

5

)(tosubject

)(21min)()(

21))(( TTT*

t

ttttV

ExWGU

FUxHUUYxxxU

+≤

++=

(7)

Here, 0T >= HH , and H, F, Y, G, W, E are easily obtained from Q, R, and (2) – (6) (since only the

optimizer U is needed, the term involving Y is usually removed from (7)). Further, by defining

)(T1 txFHUz −+≡ , sℜ∈z , the optimization problem (7) is transformed into the following equivalent

problem (Bemporad et al., 2000):

SxWGz

Hzzxz

+≤

=

tosubject21min)( T*

zV(8)

where ( )xFFHYxxx T1T**

21)()( −−−= VVz and T1FGHES −+≡ . The vector x is the current state,

which can be treated as a vector of parameters. The number of inequalities is denoted q and the number

of free variables is mNs = . Then ss×ℜ∈H , sq×ℜ∈G , 1×ℜ∈ qW , nq×ℜ∈S . It has been shown in

(Bemporad et al., 2000; Pistikopoulos et al., 2000) that the optimization problem (8) is a multi-

parametric quadratic program (mp-QP) and its solution can be found in an explicit form )(xzz ** = as a

PWL function of x defined over a polyhedral partition of the parameter space. Algorithms for iteratively

constructing a polyhedral partition of the state space and computing the PWL solution are given in

(Bemporad et al., 2000; Pistikopoulos et al., 2000; Bemporad et al., 2002; Johansen et al., 2002; Seron et

al., 2000; Tøndel et al., 2003).

2.2. Approximate mp-QP algorithm.

In (Johansen & Grancharova, 2002; Johansen & Grancharova, 2003), an algorithm that determines an

approximate explicit PWL state feedback solution of possible lower complexity is developed. The idea is

to require that the state space partition is represented as a binary search tree (quad-tree (Bentley, 1975),

cf. Fig. 1), i.e. to consist of orthogonal hypercubes organized in a hierarchical data-structure. This allows

extremely fast real-time search. When searching the tree, only n scalar comparisons are required at each

level.

In this paper, an improved version of the approximate mp-QP algorithm (Johansen &

Grancharova, 2002; Johansen & Grancharova, 2003) is used which is based on a k - d tree partition of the

5 of 32

Monday , May 03, 2004

Elsevier

Page 6: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

6

state space (Fig. 2) as a more flexible and powerful alternative to the generalized quad-tree (Fig. 1). With

the k - d tree (Bentley, 1975), a hyper-rectangle is split into two equal parts and thus only one scalar

comparison is required at each level when searching the tree. Also, the k - d tree allows the incorporation

of heuristic rules that split the hyper-rectangle at the axis along which the change of error is maximal

(before splitting).

The approximate mp-QP algorithm is based on the cost function approximation error defined as:

)()(ˆ)( * xxx zz VV −=ε (9)

where )(ˆ)(ˆ21)(ˆ T xzHxzx 00=zV and )()(

21)( T* xHzxzx **=zV are respectively the sub-optimal and the

optimal costs, and )(ˆ xz0 and )(xz* are the sub-optimal and the optimal PWL solutions. The main idea

of the algorithm is to compute the solution of the problem (8) at the n2 vertices of a considered hyper-

rectangle 0X by solving up to n2 QPs. Based on these solutions, a feasible local linear approximation

)(ˆ xz0 to the PWL optimal solution )(xz* , valid in the whole hyper-rectangle 0X , is computed by using

the following result (Bemporad & Filippi, 2001):

Lemma 1. Consider the bounded polyhedron fXX ⊆0 with vertices { }M21 vvv ,...,, (here fX is the

feasible set: })3(satisfying)({ Ux ∃ℜ∈= nf tX ). If 0K and 0g solve the QP:

( ) ( )∑=

−−−−M

i 1

T

,)()(min 0i0i

*0i0i

*

gKgvKvzHgvKvz

00

(10)

subject to:

( ) { }Mi ,...,2,1, ∈+≤+ WSvgvKG i0i0 (11)

then the least squares approximation 000 gxKxz +=)(ˆ is feasible for the mp-QP (8) for all 0X∈x .

If the maximal approximation error 0ε in the hyper-rectangle 0X is smaller than some

prescribed tolerance 0>ε , no further refinement of 0X is needed. Otherwise, 0X is partitioned into two

hyper-rectangles and the procedure described above is repeated for each of these. The upper bound 0ε of

the approximation error is determined by using the method proposed in (Johansen & Grancharova, 2003).

In order to reduce the complexity of the partition, the heuristic rule described in (Grancharova &

Johansen, 2002) is applied when splitting the hyper-rectangle 0X . The rule attempts to split the hyper-

6 of 32

Monday , May 03, 2004

Elsevier

Page 7: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

7

rectangle at the axis along which the change of the approximation error is maximal (before splitting),

because it is reasonable to hope this is how the largest reduction of the error can be made. It has been

shown in (Grancharova & Johansen, 2002) that the use of such heuristics reduces the complexity of the

partition significantly.

The complexity is further reduced by implementing control input trajectory parameterization

with less degrees of freedom in order to reduce the dimension of the optimization problem (Tøndel &

Johansen, 2002). The most common approach is to pre-determine the time-instants at which the control

input iu is allowed to change (input blocking).

The following approximate mp-QP algorithm is taken from (Johansen & Grancharova, 2003):

Algorithm 1 (approximate mp-QP)

Step 1. Initialize the partition to the whole hyper-rectangle, i.e. { }XP = . Mark the hyper-rectangle X as

unexplored.

Step 2. Select any unexplored hyper-rectangle PX ∈0 . If no such hyper-rectangle exists, go to step 8.

Step 3. Compute the solution to the QP (8) for x fixed to each of the n2 vertices of the hyper-rectangle

0X . If all QPs have a feasible solution, go to step 5. Otherwise, go to step 4.

Step 4. Compute the size of 0X using some metric. If it is smaller than some given tolerance, mark 0X

infeasible and explored. Go to step 2. Otherwise, go to step 7.

Step 5. Compute an affine state feedback 0z using Lemma 1, as an approximation to be used in 0X . If

no feasible solution was found, go to step 7.

Step 6. Compute the error bound 0ε in 0X . If εε ≤0 , mark 0X as explored and feasible and go to step

2.

Step 7. Split the hyper-rectangle 0X into two hyper-rectangles 1X and 2X by applying the heuristic

splitting rule from (Grancharova & Johansen, 2002). Mark them unexplored, remove 0X from P, add

1X and 2X to P, and go to step 2.

Step 8. If necessary, split the hyper-rectangles containing the origin such that 0)( =xz* is optimal

everywhere in these hyper-rectangles. Terminate.

7 of 32

Monday , May 03, 2004

Elsevier

Page 8: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

8

This algorithm will terminate with a PWL function that is an approximation to the PWL exact

solution and is defined on an inner approximation fX of the set fXX ∩ . The set fX is represented as

a union of hyper-rectangles.

3. Model of the gas-liquid separation plant.

We consider a sub-process within a semi-industrial installation which is used for reduction of NOx in

effluent gases and technological waste water treatment by means of neutralisation with CO2 contained in

flue gases (Vrančić et al., 1995). The role of the separation unit is to capture flue gases under low

pressure from effluent channels by means of water flow and to carry them over under high enough

pressure to the downstream (neutralisation) stage. The separation unit is shown in Fig. 3 (Vrančić et al.,

1995). The flue gases coming from the effluent channels are “pooled” by the water flow into the water

circulation pipe through the injector I1. The water flow is generated by the pump P1 (water ring). The

speed of the pump is kept constant. The pump feeds the mixture of water and gas into the separator R1

where gas is separated from water. Hence the accumulated gas in R1 forms a sort of “gas cushion” with

increased internal pressure. Owing to this pressure, flue gas is blown out from R1 into the next

neutralisation unit. On the other side the “cushion” forces water to circulate back to the reservoir R2. The

quantity of water in the circuit is constant. If for some reason additional water is needed, the water supply

path through the valve V5 is utilised.

The complete process model can be described by the following expressions (Vrančić et al., 1995)

(the meaning of the variables is given in the Appendix):

Valve 1V : )]bar/(s[1.461.75 111011

11 lRKK vvV

−− ⋅=⋅= (12)

<>

=otherwise

0011

1

1

1

1

rrifrif

v (13)

Valve 2V : ])bar/(s[66.75742.0 112022

22 lRKK vvV

−− ⋅=⋅= (14)

<>

=otherwise

00

2

2

max22max2

2

rrif

rrifrv (15)

8625.0max2 =r (16)

8 of 32

Monday , May 03, 2004

Elsevier

Page 9: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

9

The speed limit of valves positions:

<>

=otherwise

minmin

maxmax

rvrifvvrifv

v�

������

� (17)

]s[66.0 1max

−=v� (18)

]s[33.0 1min

−−=v� (19)

Air flow through valve 1V : ]/s[111 lpK=Φ (20)

Water flow through valve 2V : ( ) ]/s[21122 lhhKpK RW −+=Φ (21)

Water flow to the separator R1: ]/s[1644.0 lw =Φ (22)

Air flow to the separator R1: ]/s[615.146.6 1110 lppairairair ⋅−=⋅+= ΦΦΦ (23)

The change of water level in R1 is:

( ) ]m/s[12

1

1Fw K

Sdtdh

ΦΦ −= (24)

The change of water level in R2 is:

( ) ]m/s[12

2

2Fw K

Sdtdh

ΦΦ −= (25)

The change of air pressure inside R1 is:

( ) ( )( )[ ] ]bar/s[121010

1FwFair KppKp

Vdtdp

ΦΦΦΦ −++−= (26)

The air volume inside R1 is:

( ) ( ) ]m[25.2 311111 hShhSV R −=−= (27)

A linearized model (Vrančić et al., 1995) can be obtained from the existing non-linear model:

∆∆

+

∆∆

=

∆∆

2

1

1

1

1

1

vv

hp

hp

cc BA��

(28)

where 1p∆ and 1h∆ denote the deviations of separator gas pressure 1p and liquid level 1h from the

steady-state values ( sppp 111 −=∆ , shhh 111 −=∆ ), and 1v∆ and 2v∆ are respectively the deviations of

the two valves positions 1v and 2v ( svvv 111 −=∆ , svvv 222 −=∆ ). The elements of matrices cA and cB

are computed as follows (Vrančić et al., 1995):

9 of 32

Monday , May 03, 2004

Elsevier

Page 10: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

10

( )

+−

−=

sV

ss

s

sair

s

F

pK

ppp

Kp

VKa

2

210

1

11011 22

Φ (29)

( )

+−=

sV

wss

s

F

pKK

ppVK

a2

21012

2(30)

−=

sV

sF

pK

SK

a2

2

121

2(31)

−=

sV

wsF

pKK

SK

a2

2

122

2(32)

( )111011 ln Vsss

F RpKpVKb −= (33)

( ) ( )2221012 ln VsVsss

F RpKppVKb +−= (34)

021 =b (35)

( )2221

22 ln VsVsF RpK

SKb −= (36)

where sK1 , sK2 and sV denote the steady-state values of 1K , 2K and V , respectively. The steady-state

pressure on the valve 2V is marked as sVp 2 and is equal to:

( ) ]bar[2112 RwsV hhKpp −+= (37)

By using the above equations, a linear continuous-time model is obtained that corresponds to the

following steady state:

7462.0,4152.0,]m[4.1,]bar[5.0 2111 ==== ssss vvhp (38)

From the continuous-time model, a linear discrete-time model corresponding to sampling interval

s1=sT is obtained by applying the exact discretization using zero-order hold (the control inputs are

assumed piecewise constant over the sampling period) (Ogata, 1995). The state and control matrices of

the discrete-time model are:

=

0.99990.0006-0.0001-0.9719

A ,

=

0.0023-00.0041-0.0832-

B (39)

10 of 32

Monday , May 03, 2004

Elsevier

Page 11: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

11

The state variables are ]bar[11 px ∆= and ]m[12 hx ∆= , and the control variables are 11 vu ∆= and

22 vu ∆= . The following input and rate constraints are imposed on the valve positions 1v and 2v :

10 1 ≤≤ v , 8625.00 2 ≤≤ v (40)

66.033.0 1 ≤≤− v� , 66.033.0 2 ≤≤− v� (41)

which by taking into account the steady state values (38) are represented as the following constraints on

the control inputs 1u and 2u :

0.5848)(0.4152- 1 ≤+≤ ktu , 1-N0,1,...,k,0.1163)(0.7462- 2 =≤+≤ ktu (42)

1-N,1,...,0k,2,1,66.0)1()(33.0 ==≤−+−+≤− iTktuktuT siis (43)

In order to avoid the steady state offset of the MPC controller, two more states are added to the model

(39), which take into account the integral error:

)()()1( 133 txTtxtx s+=+ , )()()1( 244 txTtxtx s+=+ (44)

Thus, the linear discrete-time model of the gas-liquid separation unit becomes:

=

100010000.99990.0006-000.0001-0.9719

s

s

TT

A ,

=

0000

0.0023-00.0041-0.0832-

B (45)

4. Real-time performance of explicit MPC controller for the gas-liquid

separation plant.

4.1. Design of approximate explicit MPC controller for the gas-liquid separation

plant.

The approximate mp-QP approach described in section 2 is applied to design an explicit MPC controller

for the gas-liquid separation plant. The controller minimizes the cost function (4) subject to the system

equation (45) and the input constraints (42). In (4), P is chosen as the solution of the discrete-time

algebraic Riccati equation and the cost matrices are:

}0001.0,005.0,100,05.0{diag=Q , }1,1{diag=R (46)

The horizon is 500=N and the time instants at which the input variables can change are:

11 of 32

Monday , May 03, 2004

Elsevier

Page 12: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

12

]310308306304302300

11010810610410210050454035302520151051[1

=uN(47)

]30010050454035302520151051[2

=uN (48)

which makes totally 36 optimization variables. With this MPC problem, numerous tests showed that the

rate constraints (43) almost never become active and there are no practical benefits of including them in

the problem formulation. Also, in order to limit the complexity of the explicit MPC by keeping the

dimension of the state space low, the rate constraints were only ensured via rate limiters rather than

directly included in the optimization problem.

The state space to be partitioned is 4-dimensional and is defined by

]60,10[]3,3[]2.0,2.0[]5.0,5.0[ −×−×−×−=X . The size of the regions on each of the state variables is

restricted to be larger than 01.0∆ 1 =x , 004.0∆ 2 =x , 06.0∆ 3 =x and 7.0∆ 4 =x . The approximation

tolerance 0>ε is chosen according to the approach in (Johansen & Grancharova, 2003) and it depends

on 0X such that 2

5.0 T00Σxx+

=ε , where Σxxxx0

T

0

minargX∈

= . The MPC controller has 2693 regions in

its state space partition and 24 levels of search. With one scalar comparison required at each level of the

k-d tree, 24 arithmetic operations are required in the worst case to determine which region the state

belongs to. Totally, 40 arithmetic operations are needed in real-time to compute the two control inputs

(24 comparisons, 8 multiplications and 8 additions). For comparison, the average computation time with

the conventional MPC approach is 0.02 sec for 2.8 GHz Pentium 4 computer, which indicates that

millions of arithmetic operations are required in real-time to solve the QP problem (8).

4.2. Environment for the real-time experiments.

The real-time experiments were pursued in the environment schematically shown in Fig. 4. This

environment encompasses supervisory control on two levels: upper level with Factory Link SCADA

system and lower procedural and basic control levels implemented in two PLCs. This is one of the

possible configurations of control, which can be found in industry. User-friendly experimentation with

the process plant is enabled through interface with Matlab/Simulink environment. This interface enables

PLC access with Matlab/Simulink using DDE protocol via Serial Communication Link RS232 or

TCP/IPv4 over Ethernet IEEE802.3.

12 of 32

Monday , May 03, 2004

Elsevier

Page 13: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

13

Control algorithms for experimentation can be prepared in Matlab code or as Simulink blocks

and extended with functions/blocks, which access PLC. This interface also enables user-friendly data

acquisition for Matlab users. In our case the control schemes were put together as Simulink blocks and

tested at the plant operating points as described in the previous section.

4.3. Real-time performance of the explicit MPC controller.

In Fig. 5 to 8, the real-time performance of the approximate explicit MPC controller, in closed-loop with

the plant is shown. The initial condition is ]bar[3.0)0(1 =p , ]m[5.1)0(1 =h and the set point is

]bar[5.01*1 == spp , ]m[4.11

*1 == shh . The experimental results (the solid line) are compared with the

exact MPC trajectory (the dotted line) computed by solving the optimization problem at each time

instant, based on the process model and with the simulated approximate trajectory (the dashed line). The

latter two curves (the dotted curve and the dashed curve) are difficult to distinguish since they are almost

matching. It can be seen from the figures that the explicit MPC controller brings the plant to the desired

set-point despite of the error in the steady state process model and the transient performance is close to

that of the optimal trajectory. The set point changes are handled by using the new set-point values *1p

and *1h when determining the values of the state variables *

111 ppx −= and *112 hhx −= , where 1p and

1h are the measured variables.

It can be seen from Fig. 6 that there is a slight chattering of the signal for the second valve. This

can be explained as follows. The signal we depict has come out of analog digital converter which has 10

bit A/D converter resolution that means approximately 0.1 % of quantisation noise on the range 0 to 1

which was used in our case. Afterwards this signal has gone through the controller with gain of about 10

which amplified the quantisation noise to about 1% (as it can be seen in the figure). This is not a problem

for the valve and actually even helps beating the small dead zone contained in valve and makes it react

faster when the change of control signal occurs.

In Fig. 9 and Fig. 10, the computed approximate PWL feedback laws for valve positions 1v and

2v are shown, together with the exact control laws computed by solving the QP problem (8) on a grid.

The corresponding sub-optimal and optimal cost functions are given in Fig. 11. It can be noticed from

Fig.11 that for ]m[5.11 =h the cost function makes a jump. This artifact is due to the implementation of

13 of 32

Monday , May 03, 2004

Elsevier

Page 14: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

14

the anti-windup strategy. The cost function is computed by taking into account also the integral error (cf.

equation (44)), which is reset by applying the anti-windup strategy in (Åström & Wittenmark, 1997).

Table 1 shows statistics about the performance decrease Jε as well as the errors 1uε and

2uε in

the two control inputs with the approximate explicit MPC controller, based on simulations for 3600

combinations of initial and target states. The errors Jε ,1uε and

2uε are computed as the relative

deviations (measured in %) of the sub-optimal cost function and control input values (respectively )(ˆ xJ

and 2,1,)(ˆ =ixui ) from the optimal ones (respectively )(* xJ and 2,1,)(* =ixui ):

%100)(

)()(ˆ)( *

*

⋅−=

xJxJxJxJε (49)

2,1,%100)()(ˆ

min,max,

*

=⋅−

−= i

uuxuxu

ii

iiui

ε (50)

In (50), iumin, and iumax, , 2,1=i are the lower and upper bounds in the control input constraints (42). It

can be seen from Table 1 and from Fig. 5 to 11 that the performance decrease with the approximate

explicit MPC is not prohibitive, and the experimental results for initial condition ]bar[3.0)0(1 =p ,

]m[5.1)0(1 =h and set point ]bar[5.01*1 == spp , ]m[4.11

*1 == shh correspond to a typical amount of

sub-optimality.

Another approximate explicit MPC controller for the gas-liquid separation plant has been

designed by applying the method based on the control input approximation error (Grancharova &

Johansen, 2002). The experiments showed that this controller has performance very similar to that of the

approximate explicit MPC controller which minimizes the cost function approximation error (described

above).

5. Conclusions.

An approximate explicit MPC approach has been experimentally tested on a two-input two-output

laboratory gas-liquid separation plant. The approach achieves performance close to that of conventional

MPC, but requires only a fraction of the real-time computational machinery, leading to fast and reliable

computations. The main limitation of the approach is that the complexity of state space partition tends to

14 of 32

Monday , May 03, 2004

Elsevier

Page 15: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

15

increase rapidly with the state space dimension, which makes the approach unsuitable for larger

problems. A convex nonlinear extension of the approximate explicit MPC approach has recently been

reported by Johansen (2004).

Appendix

List of the constants and variables related to the gas-liquid separation unit (Vrančić et al., 1995):

Constant Value Unit Description

1S 0.312 m2 Cross-section area of R1

2S 0.32 m2 Cross-section area of R2

0p 1.033 bar Normal atmospheric pressure

1Rh 2.25 m Height of the separator R1

2Rh 2 m Height of the reservoir R2

01K 75.1 )bar/(sl Flow coefficient of valve 1V

1VR 46.1 - The open-close flow ratio of valve 1V

02K 0.742 )bar/(sl Flow coefficient of valve 2V

2VR 75.66 - The open-close flow ratio of valve 2V

wK 0.0981 bar/m The proportional factor between the water level in [m] and

pressure in [bar]

FK 1e-3 m3/l Proportional factor between the flow in m3/s and l/s

wΦ 0.1644 l/s Water flow to the R1

0airΦ 6.46 l/s Air flow to R1 (at the atmospheric pressure)

1airΦ -1.615 l/(s⋅bar) The proportional factor between air flow and pressure

inside R1

max2r 0.8625 - The maximum value of the variable 2v (the position of 2V )

maxv� 0.66 s-1 Maximum speed of valves opening

minv� -0.33 s-1 Maximum speed of valves closing

15 of 32

Monday , May 03, 2004

Elsevier

Page 16: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

16

Variable Unit Description

airΦ l/s Air flow to the separator R1

1Φ l/s Air flow from the separator R1

2Φ l/s Water flow from the separator R1

1p bar Excess of gas pressure above the normal atmospheric pressure inside R1

p bar Absolute air pressure inside R1 : )( 10 ppp +=

sp1 bar Steady-state value of pressure 1p used for linearization

sVp 2 bar Steady-state pressure on the valve 2V

1h m Water level inside R1

sh1 m Steady-state value of water level 1h used for linearization

2h m Water level inside R2

V m3 Gas volume inside R1

sV m3 Steady-state value of gas volume V

m kg Mass of the gas inside R1

1K )bar/(sl Flow coefficient of valve 1V

sK1 )bar/(sl Steady-state value of the flow coefficient 1K

2K )bar/(sl Flow coefficient of valve 2V

sK2 )bar/(sl Steady-state value of the flow coefficient 2K

1v - Actual position of the valve 1V

1v∆ - Deviations from the steady-state svvv 111 −=∆

1r - Valve command signal (desired position of 1V )

2v - Actual position of valve 2V

2v∆ - Deviations from the steady-state svvv 222 −=∆

2r - Valve command signal (desired position of 2V )

16 of 32

Monday , May 03, 2004

Elsevier

Page 17: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

17

Acknowledgements

We would like to thank to Boštjan Čečko for his assistance when performing the experiments on the gas-

liquid separation plant and to Dr. Damir Vrančić for his useful advices.

This work was sponsored by the European Commission through the Research Training Network MAC

(“Multi-Agent Control: Probabilistic reasoning, optimal coordination, stability analysis and controller

design for intelligent hybrid systems”, HPRN-CT-1999-00107).

References

Åström, K., & Wittenmark, B. (1997). Computer-controlled systems. Theory and design. Prentice-Hall,

Inc., Upper Saddle River, New Jersey.

Bemporad, A., Morari, M., Dua, V., & Pistikopoulos, E. N. (2000). The explicit solution of model

predictive control via multiparametric quadratic programming. Proc. of American Control

Conference, Chicago, 872–876.

Bemporad, A., Morari, M., Dua, V., & Pistikopoulos, E. N. (2002). The explicit linear quadratic

regulator for constrained systems. Automatica, 38, 3-20.

Bemporad, A., & Filippi, C. (2001). Suboptimal explicit MPC via approximate quadratic programming.

Proc. of IEEE Conf. Decision and Control, Orlando, 4851-4856.

Bentley, J. L. (1975). Multidimensional binary search trees used for associative searching.

Communications of the ACM, 18, 509–517.

Biegler, L. T., & Rawlings, J. B. (1991). Optimization approaches to nonlinear model predictive control.

Proc. of Chemical Process Control IV, 543–571.

Chmielewski, D., & Manousiouthakis, V. (1996). On constrained infinite-time linear quadratic optimal

control. Systems and Control Letters, 29, 121–129.

Garcia, C. E., Prett, D. M., & Morari, M. (1987). Model predictive control: Theory and practice, A

survey. Automatica, 25, 335-348.

Grancharova, A., & Johansen, T. A. (2002). Approximate explicit model predictive control incorporating

heuristics. Proc. of IEEE International Symposium on Computer Aided Control System Design,

Glasgow, Scotland, U.K., 92-97.

17 of 32

Monday , May 03, 2004

Elsevier

Page 18: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

18

Grancharova, A., Johansen, T. A., & Kocijan, J. (2003). Explicit model predictive control of gas-liquid

separation plant. Proc. of European Control Conference, Cambridge, U.K.

Johansen, T. A., Petersen, I., & Slupphaug, O. (2002). Explicit sub-optimal linear quadratic regulation

with state and input constraints. Automatica, 38, 1099-1111.

Johansen, T. A., & Grancharova, A. (2002). Approximate explicit model predictive control implemented

via orthogonal search tree partitioning. Proc. of 15-th IFAC World Congress, Barcelona, Spain,

session T-We-M17.

Johansen, T. A., & Grancharova, A. (2003). Approximate explicit constrained linear model predictive

control via orthogonal search tree. IEEE Trans. Automatic Control, 48, 810-815.

Johansen, T. A. (2004). Approximate explicit receding horizon control of constrained nonlinear systems.

Automatica, 40, 293-300.

Mayne, D. Q., Rawlings, J. B., Rao, C. V., & Scokaert, P. O. M. (2000). Constrained model predictive

control: Stability and optimality. Automatica, 36, 789-814.

Ogata, K. (1995). Discrete-time control systems. Prentice-Hall, Inc., Englewood Cliffs, New Jersey.

Pistikopoulos, E. N., Dua, V., Bozinis, N. A., Bemporad, A. & Morari, M. (2000). On-line optimization

via off-line parametric optimization tools. Computers & Chemical Engineering, 24, 183-188.

Seron, M., De Dona, J. A., & Goodwin, G. C. (2000). Global analytical model predictive control with

input constraints. Proc. of IEEE Conf. Decision and Control, Sydney, TuA05–2.

Tøndel, P., Johansen, T. A., & Bemporad, A. (2003). An algorithm for multi-parametric quadratic

programming and explicit MPC solutions. Automatica, 39, 489-497.

Tøndel, P., & Johansen, T. A. (2002). Complexity reduction in explicit linear model predictive control.

Proc. of 15-th IFAC World Congress, Barcelona, Spain, session T-We-M17.

Vrančić, D., Juričić, D., & Petrovčič, J. (1995). Measurements and mathematical modelling of a semi-

industrial liquid-gas separator for the purpose of fault diagnosis. Report DP-7260, University of

Ljubljana, J. Stefan Institute, Ljubljana.

18 of 32

Monday , May 03, 2004

Elsevier

Page 19: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

19

List of Tables

Table 1. The average and the maximal approximation errors in the cost function and in the two

control inputs for the approximate explicit MPC controller.

19 of 32

Monday , May 03, 2004

Elsevier

Page 20: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

20

List of Figures

Fig. 1. Quad-tree partition.

Fig. 2. k – d tree partition.

Fig. 3. Process scheme of the separation unit.

Fig. 4. Scheme showing environment for control and experimentation.

Fig. 5. Trajectory of 1v (position of valve 1).

Fig. 6. Trajectory of 2v (position of valve 2).

Fig. 7. Trajectory of 1p (pressure in the separator).

Fig. 8. Trajectory of 1h (liquid level in the separator).

Fig. 9. Piecewise linear approximate feedback control law (top) and the exact feedback control

law (bottom) for valve position 1v .

Fig. 10. Piecewise linear approximate feedback control law (top) and the exact feedback control

law (bottom) for valve position 2v .

Fig. 11. Sub-optimal cost function (top) and optimal cost function (bottom).

20 of 32

Monday , May 03, 2004

Elsevier

Page 21: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

21

Table 1.

Error in cost function

Jε [%]

Error in 1u

1uε [%]

Error in 2u

2uε [%]

Average 0.2491 0.5660 0.3652

Maximal 4.3625 7.3928 7.1224

21 of 32

Monday , May 03, 2004

Elsevier

Page 22: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

22

��#$��� ��� ��� �� ����������� �� � �����#���� �$������ '�� )�������� � �������( ��� 2��$�� ��! 4555��( ���# �#�� �#� �����# ������ �" ��$�� �#� � � �# ������� � �#� ������ � ��$ ��%*#� ��#$��� �����# ���� � � # �����# ��� ������������� �#��� � #"������� ��� �� # �����# ����"���� � ��� �� ������� #"�������� ���� �$ �#����� ������ � � �� �������( ��% : $��� 4% �#�������# �$ �#� ����( ��" � ������ ����� ��� �����)� ��� �� ���# �����%

: $% 4% 6������� ���� � � � � ������$���� ��$ � � � 4�� ���� ��� �����������%

,� � ���" �#� ��$� �#� � �� ��� ��� �#� �#����$ �� B � % *#� �� � ��� � �#� ����� �������6� ��$� �#� � � ������ �#� ���� � � �#������� �<���=� �� �#� 4� ���� ��� � �#� #"��������( �" ��� �$ �� � 4� 6��% 2���� � �#������� �� �+D�( �� ���� � �#� ������ ���� �

� ��� B& �A ' �4D�

�� ������ � ���� ����� ��� � J���� � �#���� �� ��� ���� � �����( ����� ���� � �#�#"������� �% �� ����� ��� ����( �#� � �������� � �4D� � ����� � ��� ��"#����� �� � �����$ � ���� � �$ �#� ������ % � � ���� ������ ��� � � �#� � ���� ����� ��� �

J���� B&�A ' �4E�

�� �$ �����$�� $� � ���� ���

& B+

4�

��

��

& � ' B

+

4�

��

��

'

2���� � �# � ������ � �� ��� ���� � �������#� ���� ����

%B�����%�� %� �4<�

��� �4+� ��� �44�% ,� ��� � � �� ���� � ���� ��� � ��� � � �#� ������ ��� �� �������� �"�#� ����� I��� ��!��� �"

I��� B(���&�A '��� � ��� �4=�

�#��� ( � � � �$��� ���� �$ ���� � � �# ��� � �� ��������% *#� ��� ��� � ��� � � ���#������ �� � �# � � ��"#���� � � ��������" ��� �$ �#� ��� � ���

� B �������

I���� �4G�

�� ) B +� 4� ���� �% -�( � �#� ��� ����� � ����% � ������� �#�� ��� ������ ��� �������� % ����#� ������ �� � ��� �� � ��� ������� �#�� ���

������ ��� �������� � ( � ����#�� ��!������ ��#� ��$ � � � ������% /�#��� ��( �� ���� � �� �� 4

� �)����� '�� #"��������( ��� ������ �#��������� ����� ��� ���� �� ���# � �#���% *# ���$� �#� ��� �� ������ '�� �� �����%

��%��&'� ! (�""���& �'� ")*�+

+% ,� � �� '� �#� ���� � � � �#� �#�� #"�������( %�% � B ��% ��� �#� #"������� � �� ����������%

4% ����� ��" ��������� #"������� � � � % ,� ����# #"������� �� ���( �#� ��$� �#� ���� ������ �# �#� ���� � � � %

D% ������ �#� ���� � � �#� 6� �<���=� �� �!��� � ���# � �#� 4� ���� ��� � �#� #"�������� ��� �� ������ � �� ���� � �#��� 6����" #��� ���� ����� � ���� �� ������% :�� �#��� ��� ��� �� ��� �� ���# ���� �( ������ �#����� � ���� �� ��� ���� � �+D�%

E% :�� �#� ���� � ���� �� ��� ���� �� �� �#����� ��� � �#� #"�������( ������ � ��� �������� � ���� ����� ������� �4E� �� �� ����� ���� � � �� ���� � �#� #"������� �%

<% 0����� �� � �#� #"������� ����� � �� ��� � ����� � ������ �#� ��� ����� � ����� ��� ����� ���� % � �#� ������ �� � ��� �� ����Æ% ,� �( $ � ���� =% /�#��� ��( ��� � ���������� $ � ���� 4%

=% �� � �#� #"������� � �� #"�������� ��(�( %%%( �� % ��� �#�� ��� ���������( ������ ��� � ( ��� ��( �( %%%( �� � � ��� $ ����� 4%

*# � ��$� �#� � �� ���� ���� � �# � � ���� ����� ���� ��� ��� ����� � �#�� � �� ������ ��� � � �#� ��� ���� ��� ����� ���� �%

������ ,� ��� ��� �#� ���6� ������ �<���=� ��!��� � � #"������� � % ����� ( � 5

��� %� Æ � 5 ��� $ ��� ��� �� ��)� �� � ��� < ���$� �#� + �#�� % � % ��� Æ � Æ ��������� ���%*#�� ��$� �#� + ���� ����� ����� � !� �� ������� ����� � �# �� ����� ���� ���� � J���� ���

���� ���� ��� J� ��� �#�� ��� �!��

������

J� ��� � � ���� � % �4>�

��� ������ ��� ��� ��" �$

������

��J���� �� � ����

*���� �%%%

*���� �

� � �43�

Fig. 1.

22 of 32

Monday , May 03, 2004

Elsevier

Page 23: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

23

Fig. 2.

23 of 32

Monday , May 03, 2004

Elsevier

Page 24: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

24

Fig. 3.

24 of 32

Monday , May 03, 2004

Elsevier

Page 25: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

25

Personal computer 1

Personal computer 2

FactoryLink

Matlab-Simulink

SCADAfor proc.control

SCADAfor basiccontrol

DDE

MelDDE server

Procedural control

Basic control

Batchprocesscontrol

Continuous process control

Equipment + Supervisionand control

PLC Mitsubishi Q2AS-S1

PLC Mitsubishi A2SH-S1

R 232Et

hern

et

Mits

ubis

hi N

etB

ProcessOS IS

S

Fig. 4.

25 of 32

Monday , May 03, 2004

Elsevier

Page 26: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

26

0 500 1000 15000

0.1

0.2

0.3

0.4

0.5

0.6

0.7

v1

time [s]

experimentssimulated exact MPC

simulated approximate explicit MPC

Fig. 5.

26 of 32

Monday , May 03, 2004

Elsevier

Page 27: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

27

0 500 1000 15000.72

0.74

0.76

0.78

0.8

0.82

0.84

0.86

0.88

v2

time [s]

experiments

simulated exact MPC

simulated approximate explicit MPC

Fig. 6.

27 of 32

Monday , May 03, 2004

Elsevier

Page 28: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

28

0 500 1000 15000.2

0.3

0.4

0.5

0.6

0.7

0.8p1 [bar]

time [s]

experimentssimulated exact MPC

simulated approximate explicit MPC

Fig. 7.

28 of 32

Monday , May 03, 2004

Elsevier

Page 29: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

29

0 500 1000 15001.38

1.4

1.42

1.44

1.46

1.48

1.5

h1 [m]

time [s]

experimentssimulated exact MPC

simulated approximate explicit MPC

Fig. 8.

29 of 32

Monday , May 03, 2004

Elsevier

Page 30: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

30

00.2

0.40.6

0.81

1.2

1.3

1.4

1.5

1.6

0

0.5

1

h1

p1

v1(p1,h1)

00.2

0.40.6

0.81

1.2

1.3

1.4

1.5

1.6

0

0.5

1

h1

p1

v1* (p1,h1)

Fig. 9.

30 of 32

Monday , May 03, 2004

Elsevier

Page 31: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

31

0

0.2

0.4

0.6

0.8

1 1.2

1.3

1.4

1.5

1.6

0

0.2

0.4

0.6

0.8

h1

p1

v2(p1,h1)

0

0.2

0.4

0.6

0.8

1 1.2

1.3

1.4

1.5

1.6

0

0.2

0.4

0.6

0.8

h1

p1

v2* (p1,h1)

Fig. 10.

31 of 32

Monday , May 03, 2004

Elsevier

Page 32: Explicit model predictive control of gas-liquid separation ... · evaluation. The approximate explicit MPC controller achieves performance close to that of the conventional MPC, but

Revie

w C

opy

32

0

0.2

0.4

0.6

0.8

1 1.2

1.3

1.4

1.5

1.6

0

500

1000

1500

h1

p1

J(p1,h1)

0

0.2

0.4

0.6

0.8

1 1.2

1.3

1.4

1.5

1.6

0

500

1000

1500

h1

p1

J*(p1,h1)

Fig. 11.

32 of 32

Monday , May 03, 2004

Elsevier