Modelling and Controlling of The Laboratory Distillation Column
Modelling and Controlling of The Laboratory Distillation Column
Diploma thesis
FCHPT-5414-58728
Diploma thesis
FCHPT-5414-58728
Study program: Automation and information engineering in chemical and food technologies
Study field: 5.2.14 Automation
Workplace: Faculty of Chemical and Food Technology
Supervisor: Prof. Ing. Miroslav Fikar, DrSc.
Consultant: Ing. MSc. Martin Klaučo
Separation of binary mixture methanol-water is performed in laboratory column UOP3CC. The aim of the
work is to design control of temperature at column head with manipulated variable either reflux ration of
reboiler heat. Control will be implemented in MATLAB/Simulink.
Tasks:
1 – modelling of the column
2 – identification of the column and estimation of parameters
3 – selection of manipulated variable
4 – design and optimisation of PID controller parameters
5 – design of model predictive control
6 – implementation and verification on the laboratory process
Length of thesis: 40
Selected bibliography:
1. Mikleš, J. – Fikar, M. Process Modelling, Identification, and Control. Berlin Heidelberg: Springer Berlin
Heidelberg New York, 2007. 480 s. ISBN 978-3-540-71969-4.
2. Skogestad, S. – Postlethwaite, I. Multivariable Feedback Control : Analysis and Design. Chichester: John
Wiley & Sons, 2005. 574 s. ISBN 0-470-01168-8.
4
Abstrakt
Abstract
The project deals with modelling and controlling of the laboratory distillation column. Using
recursive least squares method for identification was identified parameters of transfer function
between temperature on the top of the column and reflux rate and parameters of transfer function
of disturbance, which is temperature of the feed on the feed tray. Model verification was been
performed on laboratory device. Using Kalman filter as a optimal state observer have been
estimated all of the state variables of the device. Identified models have been used to design PI
and MPC controllers.
6
Matej Štefánik
Contents
1 Introduction 9
3 Identification 17
4.1 MPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6 Conclusions 49
7 Resumé 51
Bibliography 52
8 CONTENTS
Chapter 1
Introduction
Distillation is one of the most important industrial processes for separating the different compo-
nents of liquid mixture.
Distillation is defined as a process in which a liquid or vapour mixture of two or more substances
is separated into its component fractions of desired purity, by the application and removal of
heat.
Distillation is based on the fact that the vapour of a boiling mixture will be richer in the
components that have lower boiling points.
Distillation is possible for a methanol-water mixture because their vapour and liquid concen-
trations vary with temperature, as shown in a T-x-y diagram is shown in Fig. 1.2. Using this
property of the methanol-water mixture, it is possible produce high purity methanol. X-Y
diagram of the methanol-water mixture is shown in Fig. 1.1.
Therefore, when this vapour is cooled and condensed, the condensate will contain more volatile
components. At the same time, the original mixture will contain more of the less volatile material.
• it consumes enormous amounts of energy, both in terms of cooling and heating requirements
The best way to reduce operating costs of existing units, is to improve their efficiency and
operation via process optimisation and control. To achieve this improvement, a thorough
understanding of distillation principles and how distillation systems are designed is essential.
(Tham, 1997)
Distillation columns becomes a favourite subject in the process systems engineering field, including
the areas of process synthesis, process dynamics and process control. The reason is that distillation
columns are themselves a system; a distillation columns may be viewed as a set of integrated,
10 Introduction
0.9
0.8
0.7
0.6
y [−]
0.5
0.4
0.3
0.2
0.1
0
0 0.2 0.4 0.6 0.8 1
x [−]
105
vapour phase
100 liquid phase
95
90
85
t [°C]
80
75
70
65
60
0 0.2 0.4 0.6 0.8 1
x−y [−]
mostly cascaded, flash tanks. However, this integration gives rise to a complex and non-intuitive
behaviour, and it is difficult to understand the system (the column) based on the knowledge
about the behaviour of the individual pieces (the flash tanks). (Skogestad, 1997)
Predictive control is now one of the most widely used advanced control methods in industry,
especially in the control of processes that are constrained, multivariable and uncertain. The
cornerstone of MPC is the model. MPC uses models in 2 ways: using a reliable model to predict
effect of current control input on future outputs, and using the same model to compute the
optimal control action. (Ahmad and Wahid, 2007)
12 Introduction
Chapter 2
Schema of distillation column is shown in Fig. 2.2 and the laboratory device of distillation
column is in Fig. 2.1.
Distillation Column
The 50mm diameter sieve plate column is made up of two glass sections each containing four
sieve plates. The columns are separated by a central feed section and arranged vertically for
counter-current vapour/liquid flow. The column is insulated to minimise heat loss.
The glass column incorporates a total of eight sieve plates in two sections each containing four
plates. Each plate is located by the central support rod and incorporates a weir and downcomer
to create a liquid seal between successive states. The liquid seal on the final plate in each section
is achieved by U-tube.
Reboiler
The reboiler is situated at the base of the column. In continuous operation, valve is open and
bottom product flows from the reboiler through the bottom product cooler to the bottom product
tank. It is possible to preheat the feed to the column by directing the feed through a spiral coin
in the bottom product cooler where the heat is transferred from product leaving the reboiler at
the boiling point.
Condenser
Vapour from the top of the column passes to a water-cooled, coil-in-shell condenser, which may
be fitted with an insulating jacket to allow heat balances to be carried out. The shell of the
14 Description of the Laboratory Device
condenser
distillate
accumulator
reflux valve
distillate
pre-heater
feed
manual
valve
reboiler
condenser incorporates a pressure relief valve to protect system in the event of a blocked vent
and cooling water failure. Cooling water enters the condenser at a regulated rate through a
variable area flow meter and the flow rate is controlled by diaphragm valve.
Decanter
Condensate is located in a glass decanter (phase separator) which is bypassed for normal
distillation experiments by operating valve which is 3-way solenoid operated valve. Depending
on the setting of the reflux timers, condensate is directed by the reflux valve either back to the
top of the column or to the top product collecting vessel. When directed to the column, the
reflux passes through a U-seal where a valve can be used for measuring boil-up rate.
Thermocouples
Temperatures within the system are monitored by fourteen thermocouple sensors located at the
strategic positions in the system. T1 to T8 except T6 are located in the column and measure
the temperature of the liquid on each plate. T10 measures the temperature of the vapour on the
top of the column. T9 measures the temperature of the mixture in the reboiler. T6 measures
the temperature of the feed on exit of the reboiler cooler. T12 measures the temperature of the
water on exit of condenser.
16 Description of the Laboratory Device
Chapter 3
Identification
Model predictive control considered in this project, is based on state space model. For this
purpose, state space model of distillation column can be derived. In order to obtain mathematical
model, first several assumptions must be made (Minh and Rani, 2009):
• Binary mixture is separated and it has ideal properties, so it means, that compounds of
binary mixture are ideally mixed.
where yi is actual concentration of vapour phase on i-th tray and yi∗ is ideal concentration
of vapour phase on i-th tray, it can be enumerated from t-xy diagram 1.2.
• xi (0) is initial condition of concentration of methanol in liquid phase on i-th tray at time
t=0
• ṅD is molar flow of distillate and ṅW is molar flow of bottom product from reboiler
Formulation of nonlinear state-space model was taken from (Fikar and Mikleš, 2007) Mass
balance of reboiler (index = 9):
d(Z9 x9 (t))
(ṅL (t) + ṅF (t))x8 (t) = ṅG (t)y9 (t) + ṅW (t)x9 (t) + (3.2)
dt
d(Z8 x8 (t))
(ṅL (t) + ṅF (t))x7 (t) + ṅG (t)y9 (t) = (ṅL (t) + ṅF (t))x8 (t) + ṅG (t)y8 (t) + (3.3)
dt
d(Z7 x7 (t))
(ṅL (t) + ṅF (t))x6 (t) + ṅG (t)y8 (t) = (ṅL (t) + ṅF (t))x7 (t) + ṅG (t)y7 (t) + (3.4)
dt
d(Z6 x6 (t))
(ṅL (t) + ṅF (t))x5 (t) + ṅG (t)y7 (t) = (ṅL (t) + ṅF (t))x6 (t) + ṅG (t)y6 (t) + (3.5)
dt
d(Z5 x5 (t))
ṅF (t))xF (t) + ṅL (t)x4 (t) + ṅG (t)y6 (t) = (ṅL (t) + ṅF (t))x5 (t) + ṅG (t)y5 (t) + (3.6)
dt
d(Z4 x4 (t))
ṅL (t)x3 + ṅG (t)y5 (t) = ṅL (t)x4 (t) + ṅG (t)y4 (t) + (3.7)
dt
d(Z3 x3 (t))
ṅL (t)x2 + ṅG (t)y4 (t) = ṅL (t)x3 (t) + ṅG (t)y3 (t) + (3.8)
dt
d(Z2 x2 (t))
ṅL (t)x1 + ṅG (t)y3 (t) = ṅL (t)x2 (t) + ṅG (t)y2 (t) + (3.9)
dt
d(Z1 x1 (t))
ṅL (t)x1 0 + ṅG (t)y2 (t) = ṅL (t)x1 (t) + ṅG (t)y1 (t) + (3.10)
dt
Base form of state-space model looks like as in (3.25) and in (3.26). To create matrices A, B, C,
D is needed Taylor’s linearisation of non-linear equations (3.14)-(3.23). Relation between y(t)
and y ∗ (t) is in (3.1). Relation between x(t) and y ∗ (t) is in 1.1 and relation between temperature
of boiling mixture and composition is in 1.2.
where z(t) are state variables of the model , p(t) are output variables from the model and u(t)
are input variables to the model.
This subsection of identification was about introducing state-space model matrices using mass
balances of more volatile component. This is only one way, how to get analytical model of
distillation column. The another way is identification of step responses to identify process transfer
function and then from transfer function we can get state-space matrices A, B, C, D of our
process. In this project was used identification using recursive least squares which is described in
separate subsection of identification.
20 Identification
The Recursive least squares (RLS) adaptive filter is an algorithm which recursively finds the
filter coefficients that minimizes a weighted linear least square cost function relating to the input
signals. This is in contrast to other algorithms such as the least mean squares (LMS) that aim
to reduce the mean square error. In the derivation of the RLS, the input signals are considered
deterministic, while for the LMS and similar algorithm they are considered stochastic. Compared
to most of its competitors, the RLS exhibits extremely fast convergence. However, this benefit
comes at the cost of high computational complexity Hayes (1996)
y = θ1 x1 + θ2 x2 + . . . + θs xs + v = xT θ + v = ỹ + v (3.27)
The identification aim is to determine the parameter vector θ based on information of measured
process output y(n), the data vector x(n) and v(n) represents additive noise.
y1 xT1 v1
. .
. = . θ + ..
. . . (3.29)
yn xTn vn
| {z } | {z } | {z }
Y X V
We will look for such an estimate θ̂ that minimises sum of squares of errors between measured
and modelled outputs We have to minimize cost function with respect to θ
If matrix X is invertible and gradient of this function with respect to θ is equal to zero:
∂J ∗
= 2X T X θ̂∗ − 2X T Y = 0 ⇒ θ̂∗ = (X T X)−1 X T Y (3.32)
∂θ
where θ̂∗ is vector of estimated parameters. The matrix P is called the covariance matrix if the
stochastic part has unit variance.
Transfer function in s-domain can be transform into z-domain using following equation:
G(s) Y (z −1 )
G(z −1 ) = (1 − z −1 )Z(L−1 )= (3.34)
s X(z −1 )
The function G(z −1 ) is referred to as discrete-time transfer function of the system with continuous-
time transfer function G(s).
b1 z −1 + b2 z −2 + . . . + bnb z −nb
G(z −1 ) = (3.35)
1 + a1 z −1 + a2 z −2 + . . . + ana z −na
A general discrete-time linear model can be written in time domain as
where y are outputs from system, u are inputs to the system and e is error variable.
Z T (k) = −y(k − 1), . . . , −y(k − na ), u(k − 1), . . . , u(k − nb ) (3.38)
T
θ̂ = a1 . . . ana b1 . . . bnb (3.39)
y(1) uT (1)
y(0) uT (0)
.. ..
Y (k) = Z(k) = (3.42)
. .
T
y(k − 1) u (k − 1)
y(k) uT (k)
covariance matrix:
cov(θ̂) = σ 2 (Z T (k)Z(k))−1 (3.43)
−1
If we consider C = 1, B = zk , D = z T andA = Pk−1 then the matrix inversion lemma yields
(3.47), where the term that has to be inverted is only a scalar.
!
Z
k−1
Pk−1 = ZkT Zk T ,z
= Zk−1 k
T
= Zk−1 Zk−1 +zk zkT (3.46)
zkT | {z }
−1
Pk−1
−1
Pk = (Pk−1 + zk zkT )−1 = Pk−1 − Pk−1 zk (zkT Pk−1 zk + 1)−1 zkT Pk−1 (3.47)
| {z }
γ(k)
Lk = γk Pk−1 zk (3.49)
initial values:
θ̂0 , P0 (3.51)
minimize:
k
J = (θ̂ − θ̂0 )T P0−1 (θ̂ − θ̂0 ) = ˆ2
X
min (y − ziT θ) (3.52a)
θ̂ i=1
s.t. P0 = cI (3.52b)
Step changes on reflux ratio were performed in order to obtain model relating control input
(reflux ratio) and controlled variable (T10 temperature). Model of the disturbance was obtain
using same identification method.
We made 2 step changes Fig. 3.1(a) of reflux rate on whole working interval. The first step of
our identification was filtering the data. As we can see in Fig. 3.1(a) our signal was with a large
noise. This noise can be caused by the thermocouples, because the temperature is measured
on sharp ending of metal wire which is also part of the thermocouple. Around this ending is
bubbling liquid and vapour at the same time, but their temperatures are different. Using the
right parameters of a filter we filtered data as is shown in Fig. 3.1(b). We needed to normalize
measured data. Normalization was performed by subtracting steady state and then by dividing
this values by steady state. So our normalized data had values between -1 and 1. These filtered
and normalized data could be used for identification.
T 6S = 25◦ C (3.53)
T 10S = 85◦ C (3.54)
S
u =1 (3.55)
where value of reflux rate uS = 1 represents fully opened three-way valve and everything from the
top of the column flows to the product tank as a distillate and doesn’t flow back to the column.
TS = 5s (3.56)
B(s)
G(s) = (3.57)
A(s)
or in z −1 -domain
B(z −1 )
G(z −1 ) = (3.58)
A(z −1 )
We choose degree of denumerator of our transfer function will be 2 and degree of numerator will
be 1. Identified transfer function will be look like
b1 s + b0
G(s) = (3.59)
s2 + a1 s + a0
in s-domain, or in z −1 -domain:
b1 z −1 + b0 z −2
G(z −1 ) = (3.60)
1 + a1 z −1 + a0 z −2
Identification was running in continuous time and identified models were transform into z-domain
using function c2d in MATLAB. If we put values of identified parameters into transfer function
we get identified model of reflux rate, which look like in s-domain:
1.156.10−6 s + 0.0003393
G(s) = (3.61)
s2 + 0.006301s + 1.381.10−5
or in z −1 -domain:
0.004203z −1 + 0.004148z −2
G(z −1 ) = (3.62)
1 − 1.969z −1 + 0.969z −2
Using function tf2ss in MATLAB we get state-space matrices from transfer function of reflux
rate, which looks as follows:
24 Identification
" # " #
1.9686 −0.9690 0.1250
Aref = Bref = (3.63)
1 0 0
h i h i
Cref = 0.0336 0.0332 Dref = 0 (3.64)
We had to compare our model with real data. So we created schema which compare step response
of our model with real temperature on the top of the column as is shown in Fig. 3.1(c)
Using function compare in MATLAB we obtain fit of our model as 81.25%. As is shown in Fig.
3.1(c) our model behaves like real system and the dynamics of our model and real system are
very similar. This procedure was also applied for identification of disturbance T6. This variable
wasn’t filtered, because the noise of temperature was lower compare with noise on variable T10.
7.749.10−6 s + 5.948.10−6
G(s) = (3.65)
s2 + 0.04057s + 0.0002287
or in z −1 -domain:
0.0001046z −1 − 2.995.10−5 z −2
G(z −1 ) = (3.66)
1 − 1.811z −1 + 0.8164z −2
with sample time TS = 5 seconds. Fit of our model of disturbance is 81.98% as we can see on
Fig. 3.2(c).
After transformation of transfer function into state-space matrices we obtain matrices of distur-
bance model:
" # " #
1.8112 −0.8164 1
Adist = Bdist = (3.67)
1 0 0
h i h i
Cdist = 0.0083 0.0024 Ddist = 0 (3.68)
Matrices of model of reflux rate (3.63)-(3.64) and matrices of model of disturbance (3.67)-(3.68)
we put together to create state-space model of column. Matrices of model with disturbance now
looks like as follows:
" # 1.9686 −0.9690 0 0
Aref 0 1.0000 0 0 0
A= =
(3.69)
0 Adist 0 0 1.8112 −0.8164
0 0 1.0000 0
3.3 Identification of the models using RLS 25
1.5
1
Reflux [−]
0.5
−0.5
0 500 1000 1500 2000 2500 3000
Time[s]
95
measured
filtered
90
85
Temperature T10 [°C]
80
75
70
65
60
0 500 1000 1500 2000 2500 3000
Time[s]
90
identified
measured
85
Temperature T10 [°C]
80
75
70
65
60
0 500 1000 1500 2000 2500 3000
Time [s]
80
70
60
Temperature T6 [°C]
50
40
30
20
10
0 100 200 300 400 500 600 700 800 900 1000
Time[s]
90
88
86
T10 temperature [°C]
84
82
80
78
measured
filtered
76
0 100 200 300 400 500 600 700 800 900 1000
time[s]
85
84
Temperature T10 [°C]
83
82
81
80
Identified
Measured
79
0 100 200 300 400 500 600 700 800 900 1000
Time [s]
0.125
0
Bref =
(3.70)
0
0
0
0
Bdist =
1 (3.71)
0
h i h i
C = Cref Cdist = 0.0336 0.0332 0.0083 0.0024 (3.72)
Identified second order of state space model for design control on laboratory distillation column.
28 Identification
Chapter 4
Model predictive control (MPC) is an advanced method of process control that has been in use in
the process industries in chemical plants and oil refineries since the 1980s. In recent years it has
also been used in power system balancing models. Model predictive controllers rely on dynamic
models of the process, most often linear empirical models obtained by system identification.
Main advantage of MPC is the fact, that based on state space model and initial condition x0
we predict future evolution of states, which is incorporated in optimization. This allows us to
calculate optimal control inputs, which leads to optimal performance of the plant. MPC has the
ability to anticipate future events and can take control actions accordingly. PID controllers do
not have this predictive ability. MPC is a digital control.
The principle of MPC lies in solving quadratic objective function with linear constraints.
Quadratic problem in standard form can be expressed as, (Boyd and Vandenberghe, 2009):
1 T
min v Hv + g T v + r (4.1a)
2
s.t. Cv d (4.1b)
Av = b (4.1c)
where H is positive definite matrix C ∈ Rm×n , A ∈ Rp×n and variables g, d, b are one column
vectors, number of rows depends on problem which is solved.
Deriving cost function with the linear constraints is main part of the MPC implementation.
Output regulation with constraints is considered and the optimizing variable will be the difference
of control input. Formulation of MPC was taken from (Klauco, 2012).
General formulation of standard MPC problem with linear constraints can be expressed in
30 Model Predictive Control
following form:
N
X N
X −1
Φ = min xT Qx + uT Ru (4.2a)
k=1 k=1
s.t xk+1 = Ax + Buk (4.2b)
x∈X u∈U (4.2c)
where N is prediction horizon, Q ∈ Rnx ×nx , R ∈ Rnu ×nu are weighting matrices.
By solving QP problem we calculate the optimal control inputs over prediction horizon. Once
these inputs are applied to the plant, states of the plant are moved to different values, such
application resembles open-loop implementation. In closed-loop application the optimization is
performed at each sample, with new initial condition (x0 = xk ).(Maciejowski, 2002)
Output regulation problem together with disturbance modelling can be formulated as follows:
N −1
1X 2 1 NX
Φ= krk − yk kQ + k∆uk k2R (4.3)
2 k=0 2 k=0
where rk is the reference value for the output and yk is the measurement of the output. This
objective function will suppress the changes in the control signal ∆uk .
4.1 MPC
In order to solve optimization problem expressed in (4.3), this objective function has to be
rewritten into form presented in (4.5). For the purpose of rewriting the MPC cost function into
standard QP problem, we have to know relations between outputs yk and inputs uk . State space
model can be described in following form:
QP problem can be expressed as a weighted least square quadratic optimization problem with
optimal solution U ∗ .
1 1
U ∗ = min kY − Rk2Q + k∆U k2R (4.5)
2 2
This cost function can be then translated into standard QP problem by exploiting the evolution
of the outputs over the prediction horizon base on state space model. First is considered model
without disturbances d.
1
U ∗ = U T HU + g T U + r (4.6)
2
4.1 MPC 31
Y = Ψxk + ΓU (4.20)
in which:
uk yk C
uk+1
yk+1
CA
CA2
uk+2 yk+2
U = Y = y Ψ= (4.21)
uk+3
k+3
CA3
.. .. ..
. . .
uk+N −1 yk+N −1 CAN −1
32 Model Predictive Control
D 0 0 0 ··· 0
CB D 0 0 ··· 0
CAB CB D 0 ··· 0
Γ= (4.22)
CA2 B CAB CB D ··· 0
.. .. .. .. ..
. . . . . 0
CAN −2 B CAN −3 B CAN −4 B · · · CAB D
Control moves are defined as ∆uk = uk − uk−1 . Using this definition, vector form of control
moves over the control horizon is written:
∆uk uk − uk−1
∆uk+1 uk+1 − uk
∆uk+2 =
uk+2 − uk+1
(4.23)
.. ..
.
.
∆uk+N −1 uk+N −1 − uk+N −2
∆uk Iu 0 0 0 ··· 0 uk Iu
∆uk+1 −Iu Iu 0 0 ··· 0 uk+1 0
∆uk+2 0
= −Iu Iu 0 ··· 0
uk+2 0
− uk−1 (4.24)
.. .
. .. .. .. .. .. .
.
. . . . . . 0
. .
∆uk+N −1 0 0 0 · · · −Iu Iu uk+N −1 0
By determining all matrices and vector, standard QP problem simplifying notation is formulated,
(Muske and Rawlings, 1993)
U ∗ = min 1
2 kR − Y k2Q + 21 k∆U k2R = min (ΦY + ΦU ) (4.26)
1
ΦY = kY − Rk2Q (4.28)
2
1
= kΓU − ck2Q (4.29)
2
1
= (ΓU − c)T Q(ΓU − c) (4.30)
2
1 1
= U T ΓT QΓU − (ΓT Qc)T U + cT Qc (4.31)
2 2
1
ΦU = k∆U k2R (4.32)
2
1
= kΛU − I1,u uk−1 k2R (4.33)
2
1
= (ΛU − I1,u uk−1 )T R(ΛU − I1,u uk−1 ) (4.34)
2
1
= U T ΛT RΛU − (ΛT RI1,u uk−1 )T U (4.35)
2
H = ΓT QΓ + ΛT RΛ (4.36)
H is curvature matrix and g is first order coefficient vector. In order to achieve offset of control,
disturbances must be taken into account. In order to this, relation between outputs y and
disturbances d is found. This equation shows the matrix form of prediction equation, in which
are included states, control inputs and disturbances.
Ey 0 0 0 ··· 0
CEx Ey 0 0 ··· 0
CAEx CEx Ey 0 ··· 0
ΓD = (4.40)
CA2 Ex CAEx CEx Ey ··· 0
.. .. .. .. ..
. . . .
0 .
CAN −2 Ex CAN −3 Ex CAN −4 Ex · · · CAEx Ey
Y = Ψxk + ΓU + ΓD D (4.41)
This equation is then inserted into equation (4.27), yielding equation (4.42). By continuing
derivation like it was presented in equation (4.32) through (4.37). The curvature matrix H will
remain unchanged, but vector g will be changed as follows:
34 Model Predictive Control
g = MR R + Mx xk + Mu uk−1 + MD D (4.44)
Final formulation presented in (4.45) can be solved by numerous algorithms e.g. active-set
algorithms, (Nocedal and Wright, 1999). The tools solving QP problems used in this project
were namely quadprog() in MATLAB.
1 T
U ∗ = min U HU + g T U (4.45)
2
The main advantage of MPC is to handle constraints. These constraints have form of linear
inequality equations (4.46). Since we are dealing with stable system, constraints on system states
may not be considered, so we are considering only hard constraints on control inputs u, control
moves ∆u and outputs y.
Constraints presented in (4.46) have to be rewritten into matrix form. The bounds on control
signal are just stacked like in (4.49). Using definition of Λ matrix from (4.25), matrix form of
inequality constraints for control moves are expressed in (4.50) yielding (4.51).
umin umax
umin umax
Umin = .
Umax = .
(4.49)
.. ..
umin umax
∆umin + uk−1 ∆umax + uk−1
∆umin
∆umax
.. ≤ ΛU ≤ .. (4.50)
. .
∆umin ∆umax
4.3 State Observer 35
Relation between matrix form of output and control input is used (4.41). Bounds on outputs
Ymin and Ymax are created similarly as bound on inputs (4.49)
Constraints defined in(4.51) and (4.53) can be put together resulting in (4.54).
Most of solvers require formulation like presented in (4.1a), so (4.54) must be reformulated as
shown in (4.55).
Λ ∆Umax + I1,u uk−1
U ≤ Ymax − (Ψxk + ΓD D)
Γ
−Λ −(∆U (4.55)
max + I1,u uk−1 )
−Γ −(Ymax − (Ψxk + ΓD D))
The Kalman filter, also known as linear quadratic estimation (LQE), is an algorithm that uses
a series of measurements observed over time, containing noise (random variations) and other
inaccuracies, and produces estimates of unknown variables that tend to be more precise than
those based on a single measurement alone. More formally, the Kalman filter operates recursively
on streams of noisy input data to produce a statistically optimal estimate of the underlying
system state. The filter is named for Rudolf E. Kálmán, one of the primary developers of its
theory.
The algorithm works in a two-step process. In the prediction step, the Kalman filter produces
estimates of the current state variables, along with their uncertainties. Once the outcome of the
next measurement (necessarily corrupted with some amount of error, including random noise) is
observed, these estimates are updated using a weighted average, with more weight being given
to estimates with higher certainty. Because of the algorithm’s recursive nature, it can run in
real time using only the present input measurements and the previously calculated state and its
uncertainty matrix; no additional past information is required.
" # " #
x̂ x̂
= + L (ym,k − ŷk−1 ) (4.56)
dˆ k
dˆ k−1
36 Model Predictive Control
" #
h i x̂
ŷk = C Ey + Duk (4.58)
dˆ k
Adding of integrator to (4.57) causes that our new matrices will have one row more. This
integrator can reject noise in signal from column. Matrices E and F was chosen as follows:
h i h i
Ex = 0 Ey = 1 (4.59)
Matrices Q and R, which are used for calculation of Kalman gain L, we choose as follows:
1 0 0 0 0
0 1 0 0 0
QKalman =
0 0 1 0 0
(4.60)
0 0 0 1 0
0 0 0 0 1
h i
RKalman = 1.10−5 (4.61)
1.0098
0.0424
−0.0548
L= (4.62)
−0.0942
0.9653
Simulations Fig. (4.1(a), 4.1(b), 4.1(c)) tests our kalman filter and estimated variables are
correct. State variables shown in Fig. 4.1(c) are very close together with its values, it is caused
by dynamics of the system and state-space matrices have its values very similar.
4.3 State Observer 37
0.9
0.8
0.7
0.6
0.5
Reflux [−]
0.4
0.3
0.2
0.1
−0.1
0 50 100 150 200 250 300 350 400 450 500
Time [s]
90
85
80
T10 [°C]
75
70
65
T10
T10 − estimated
60
0 50 100 150 200 250 300 350 400 450 500
Time [s]
350
300
250
200
x1 x2 [−]
150
100
50
x1
x2
0 x1 − estimated
x2 − estimated
−50
0 50 100 150 200 250 300 350 400 450 500
Time [s]
PID control is by far the dominating control structure in industrial practice. The textbook PID
controller has following basic structure (Åström and Hägglund, 1995):
U (s) KI
= KP + + KD s (5.1)
E(s) s
U (z) KI TS z KD (z − 1)
= KP + + (5.2)
E(z) z−1 TS z
We are using to control distillation column only PI controller in discrete time, so the (5.2) has
simpler form:
U (z) KI TS z
= KP + (5.3)
E(z) z−1
Filtered data of control are shown in Fig. 5.1. In the Fig. 5.2(b) and 5.3(b) is shown control
effort of PI controller. Controller is very aggressive and this control looks like bang-bang control.
Such performance of controller causes oscillations around the setpoint of controlled temperature
40 Control of Distillation Column
85
75
70
65
measured
filtered
60
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Time[s]
85
80
Temperature T10 [°C]
75
70
65
60
0 500 1000 1500 2000 2500
Time [s]
0.8
0.6
Reflux [−]
0.4
0.2
85
80
70
65
60
2500 3000 3500 4000 4500 5000
Time [s]
0.8
0.6
Reflux [−]
0.4
0.2
on the top of the column T10. Delta area represents satisfactory control and its value is δ = ±1
degree of Celsius.
Whole control sequence is shown in Fig. 5.4(a) and in 5.4(b). Concentration of methanol in
distillate was obtained from t-xy diagram, which is shown in 1.2.
PI controller was suitable for control of distillation column, but sometimes values of controlled
variable leaved delta-area and this scenario couldn’t be accepted on all of devices of this type in
industry.
42 Control of Distillation Column
82
80
78
Temperature T10 [°C]
76
74
72
70
68
66
64
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Time [s]
100
95
90
85
y_D [%]
80
75
70
65
60
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Time [s]
To design functional predictive controller the weighting matrices have to be properly chosen. Our
weighting matrices from (4.5) are Q which represents penalty on reference tracking and R which
represents penalty on control effort. Since we are controlling SISO system, weighting factors are
scalar values.
Matrices of model (3.69)-(3.72) and matrices of disturbance (4.59) was substitute into (4.4a)
Our system has some constraints, that have to be satisfied. Constraint Our system has constraints,
that have to be satisfied. Constraint on reflux rate should be only between zero and one and
mathematical equation looks as follows:
0 ≤ u(t) ≤ 1 (5.6)
From t-xy diagram 1.2 we can see, that exist some limitation of concentration of methanol in
vapour phase and on the top of the distillation column is only vapour phase which condensates
in condenser. This fact creates another constraints on outputs from our system. This constraint
can be mathematically written as follows:
0% ≤ yc ≤ 100% (5.8)
As we can see from Fig. 5.5(c) control effort of MPC controller is less aggressive as control effort
of PI controller, which makes system stable and amplitudes of oscillations around reference value
in Fig. 5.5(b) are smaller.
If we separate control sequence 5.5(b) into three different parts of control. First part shown in
Fig. 5.6 represents negative step change of reference on temperature on the top of the column
and we can see, that performance could be faster, but if we increase value of weighting matrix Q
the system might goe unstable. Controlled variable T10 doesn’t leaving delta-area, so this part
of performance has satisfactory results.
Second part of performance is positive set-point change of temperature T10 and is shown in Fig.
5.7. Result of this performance is satisfactory with respect to delta-area.
44 Control of Distillation Column
100
90
80
70
T10 [°C]
60
50
40
T10 − measured
T10 − filtered
30
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500
Time [s]
80
78
76
74
72
T10 [°C]
70
68
66
64
62
60
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500
Time [s]
0.8
0.6
Reflux [−]
0.4
0.2
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Time [s]
75
74
73
72
Temperature T10 [°C]
71
70
69
68
67
66
65
0 500 1000 1500
Time [s]
98
96
94
92
90
y_D [%]
88
86
84
82
80
78
0 500 1000 1500
Time [s]
0.8
0.6
Reflux [−]
0.4
0.2
74
73
72
71
Temperature T10 [°C]
70
69
68
67
66
65
64
0 200 400 600 800 1000 1200 1400 1600 1800 2000
Time [s]
100
98
96
94
92
y_D [%]
90
88
86
84
82
80
0 200 400 600 800 1000 1200 1400 1600 1800 2000
Time [s]
0.8
0.6
Reflux [−]
0.4
0.2
0 200 400 600 800 1000 1200 1400 1600 1800 2000
Time [s]
90
80
T6 [°C] 70
60
50
40
30
0 500 1000 1500 2000 2500
Time [s]
(a) Disturbance T6
69
68.5
68
67.5
T10 [°C]
67
66.5
66
65.5
65
0 500 1000 1500 2000 2500
Time [s]
0.8
0.6
Reflux [−]
0.4
0.2
Third part deals with eliminating measured disturbance. As we can see in Fig. 5.8(a) the value of
temperature of feed increased two times and MPC controller slightly increased reflux rate (5.8(c)),
this change start eliminating the disturbance influence on T10 measurement, and measurement
of temperature goes back to delta-area.
Chapter 6
Conclusions
In this diploma project we made step changes on reflux rate on laboratory distillation column in
order to identify transfer function of model of reflux rate using recursive least squares. Then we
made change on disturbance variable, which represents temperature of feed, to identify transfer
function between temperature on the top of the column and temperature of feed. We had to
normalized data to unit step change and because measured data had noise, so we had to filtered
measured data using Buttersworth filter.
To identification we used recursive least squares method. The first step was derivation of vector
of parameters θ̃ and then we created simulink schemes which including s-function block RLS
to enumerating values of parameters of our identified model. This model was compared with
measured data. Using identification toolbox we found that fit of our model is 81.25% and fit of
our model of disturbance is 81.98%.
To design MPC controller, state observer was needed. Optimal state observer also known as
kalman filter was created and than tested on simulations. Estimated variables were the same as
process variables, that was the proof, that our kalman filter is correct.
To control of distillation column was used PI controller. This controller had satisfactory results,
but its oscillations sometimes goes out of delta area and the system was on the bound of the
stability. Designed MPC had to be first tested via simulations and then was implicated on our
laboratory distillation column. Oscillations around the setpoint were smaller than using PI
controller. Controller effort was slower, but it was caused by values of penalty matrices Q and R
in (5.5). Decreasing value of matrix S could caused instability, but the controller will be faster.
50 Conclusions
Chapter 7
Resumé
Diplomová práca s názvom Modelling and Controlling Laboratory Distillation Column sa zaoberá
identifikáciou modelov laboratórnej rektifikačnej kolóny, následnou verifikáciou identifikovaných
modelov na reálnom zariadení. Po získaní prenosových funkcií medzi teplotou na hlave kolóny
a refluxným pomerom a medzi teplotou na hlave kolóny a teplotou suroviny na nástrekovej
etáži, ktorá reprezentuje merateľnú poruchu, sme vytvorili stavové matice modelu systému aj
s poruchou. Po verifikácii získaného modelu sme pristúpili k návrhu optimálneho pozorovača,
ktorým bol kalmanov filter. Simulačne sme overili správnosť kalmanovho filtra a odhadnuté
stavové veličiny mohli byť použité na návrh prediktívneho riadenia rektifikačnej kolóny. Aby
sme mohli porovnať výsledky prediktívneho regulátora, bol na kolónu navrhnutý PI regulátor.
Jednotlivé priebehy riadenia týchto regulátov boli následne porovnané za účelom vyzdvihnutia
určitých výhod prediktívneho riadenia, ktoré aj priemyseľ v poslednom čase rozoznáva.
Na identifikáciu bola použitá rukurzívna metóda najmenších štvorcov, ktorá identifikuje vektor
parametrov prenosovej funkcie modelu. Zvolené identifikované prenosy boli druhého rádu, ktoré
majú za úlohu zachytiť dynamiku systému. Ukázalo sa, že zvolený rád je postačujúci a po
diskretizácii mohli byť tieto modely použité na vytvorenie stavových matíc, ktoré sú nevyhnutné
pre návrh prediktívneho riadenia.
Kalmanov filter bol navrhnutý pomocou príkazu dlqe v softwareovom prostredí MATLAB.
Simulačné overenie pozorovača ukázalo, že všetky odhadnuté veličiny sú totožné s veličinami
identifikovaného modelu prenosu. Stavový pozorovač bol ďalšou nevyhnutnosťou na návrh
prediktívneho riadenia, nakoľko MPC potrebuje poznať všetky hodnoty stavových veličín v
každej perióde vzorkovania.
Na základe identifikovaného modelu refluxného pomeru, sme navrhli PI regulátor, ktorý bol
následne použitý na riadenia laboratórnej rektifikačnej kolóny. Riadenie pomocou PI regulátora
poskytlo uspokojivé výsledky, no riadená veličina oscilovala okolo žiadanej hodnoty s väčšou
hodnotou amplitúdy ako pri použití prediktívneho riadenia. Niektoré oscilácie dokonca opustili
prípustné delta okolie. Táto vlastnosť môže byť v priemysle nežiadúca a preto sa nedá jednoznačne
prehlásiť, že PI regulátor vyhovoval požiadavkam na riadenie.
Prediktívne regulátory majú dve nevýhody. Potrebujeme poznať presné matematické modely
procesov a druhou nevýhodou môže byť, za určitých okolností, výpočtová náročnosť. Navrhnutý
prediktívny regulátor bol následne použitý na riadenie laboratórnej rektifikačnej kolóny a priebeh
riadenia ukázal, že riadená veličina oscilovala menej okolo žiadanej hodnoty a tieto oscilácie už
neopúšťali prípustné delta okolie, čo je vlastnosť, ktorú PI regulátor nevedel zabezpečiť.
Riadením zariadenia pomocou prediktívneho regulátora sme dokázali, že táto forma zabezpečí
dodržanie ohraničení a je vhodná na riadenie takýchto typov zariadení.
Bibliography
Ahmad, A. and Wahid, A. (2007). Application of model predictive control (mpc) tuning strategy
in multivariable control of distillation column. JURNAL REAKTOR, 11(2):66–70.
Boyd, S. and Vandenberghe, L. (2009). Convex Optimization. Cambridge University Press, New
York, USA, 7th edition.
Fikar, M. and Mikleš, J. (2007). Process Modelling, Identification and Control. Springer-Verlag
Berlin Heidelberg.
Klauco, M. (2012). Model Predictive Control of a Wind Turbine. Master’s thesis, Denmark
University of Technology.
Muske, K. R. and Rawlings, J. (1993). Model predictive control with linear models. AIChE
Journal, 39(2).
Åström, K. J. and Hägglund, T. (1995). PID Controllers:Theory, Design, and Tuning, second
edition. Instrument.