modelling, optimization, and control of a plate heat exchanger · modelling, optimization, and...
Post on 16-May-2020
10 Views
Preview:
TRANSCRIPT
-
0
Modelling, Optimization, and control
of a plate heat exchanger
JIAN FU
18/02/2009
Supervised by: Prof. Stratos Pistikopoulos
Thesis presented to Imperial College London in partial fulfilment for the degree of Master of
Science in Advanced Chemical Engineering with Process System Engineering
Department of Chemical Engineering and Chemical Technology
Imperial College London
SW7 2AZ
-
1
Abstract
This project focuses on building a precise model which describes the dynamic
behaviour of the fluid in a plate heat exchanger and simulating it in a
professional software gPROMS so that a clear temperature profile over both
time and space is obtained. Based on that, PID and MPC controllers are
designed to make sure the system will run in the expected state. The PID design
is completed in gPROMS environment and the MPC should be designed in
Matlab with the help of MPC and system identification toolboxes then tuned in
gO:Simulink environment. Finally, some conclusions and a comparison
between PID and MPC controllers will be made so that the advantages and
disadvantages of those two controllers will become clear.
-
2
Acknowledgement
I am grateful to my supervisor Prof. Stratos Pistikopoulos,Dr. Kouramas
Konstantinos and Mr. Christos Panos for their excellent supervision during
the course of this project. The research was extremely well supported and
managed by them with patience, guidance, and encouragements. Without
their help, this work would not be possible.
-
3
Nomenclature
A channel cross-section area, m2
Ap plate cross-section area, m2
Ai heat transfer area for channel i, m2
Fi mass flow rate in channel i
De equivalent diameter, m
Cp,i fluid heat capacity, J/kg K
Cp,p heat capacity of plate p, J/kg K
e internal energy of unit volume element, J
hi local heat transfer coefficient in channel j, J/m2 s K
kp the plate thermal conductivity, J/s m K
m mass flow rate in a channel, kg s-1
p pressure in axial direction
qp,i heat influx the element from plate i
Re Reynolds number
Tp,i temperature of plate p adjacent to channel j, K
Ti temperature of fluid in channel i, K
Ui overall heat transfer coefficient in channel j, W/m2 K
ui fluid velocity in channel i, m/s
ux average fluid velocity, m/s.
Greek letters
ρi fluid density in channel number j, kg/m3
-
4
ρp density of the plate, kd/m3
λ thermal conductivity of processing fluid, J/s m K
μ viscosity of processing fluid, kg/m s
θ dimensionless temperature
εp
plate thickness, m
-
5
Content Chapter 1 Introduction ..................................................................................................... 6
1.1 Motivation..................................................................................................................... 6
1.2 Project Objective and Outline ...................................................................................... 7
Chapter 2 literature Review ........................................................................................... 8
2.1 Dynamic Simulation of the Plate heat exchanger ........................................................ 8
2.2 Review on PID and MPC’s theory ............................................................................ 13
Chapter 3 Dynamic Simulation of the target PHE ............................................... 18
3. 1 Mathematical Model Construction ........................................................................... 18
3. 2 Simulation Results and Discussion .......................................................................... 25
Chapter 4 Controller Design ........................................................................................ 33
4.1 PID Control System Design ...................................................................................... 33
4.2 MPC Control System Design .................................................................................... 38
Chapter 5 Work Results Conclusion & Discussion .............................................. 48
5. 1 Simulation Results Conclusion ................................................................................. 48
5. 2 Conclusion of Controller Design ............................................................................. 52
5. 3 Future Work ............................................................................................................. 56
Appendix I Variables and Key Parameters’ Nomenclature in gPROMS
............................................................................................................................................... 59
Appendix II Dynamic Model of the Target Plate Heat Exchanger In
gPROMS .............................................................................................................................. 61
Appendix III Precious Simulation Results ............................................................ 63
Appendix IV Data Used For System Identification............................................ 64
Appendix V Estimated Black Box Model for the Target PHE ..................... 73
Appendix VI Inputs and Output of MPC Controller with Plant Model
PHE_N1, PHE_N1c, PHE_P1, PHE_P1c ................................................................. 74
-
6
Chapter 1 Introduction
1.1 Motivation
As one of the most common equipment in modern industry, the plate heat exchanger has been
popular for many decades. Its significant advantages, e.g. high heat exchange efficiency, low
fouling coefficient, easy to clean, make it be widely applied in food, petroleum, polymer,
hydrocarbon, vegetable oil and so on. Among all types of plate heat exchangers, the plate-
frame heat exchanger (PHE) is the most common one. Searching a way to run the PHE
efficiently and steadily could be meaningful in this energy-shortage world.
Figure 1.1 PHE Structure (from internet)
The instability of a PHE could be caused by many factors. Besides the disturbance, even
some normal plant operation (e.g. start-up system or reset the desirable output) could make
the system unstable. Thus, controllers are introduced to eliminate the “error” and make the
system stable again. Usually, PID is a good choice for such works. After several decades of
development, the PID has become a proven technology and been used in quite many fields,
especially process industry. It has been developed into packed unit in many kinds of popular
professional software which make it easy to be simulated and test. However, PID always
needs to be re-tuned when desirable working condition changed or emergencies happen. And
sometimes this could be dangerous when the PID controller used for safety management is
not re-tuned in time. Searching for a valid method to improve this weakness is meaningful.
With the development of mathematical technology, Model Predictive Control (MPC) has
shown a strong momentum to replace the traditional controllers. Unlike PID, MPC is mainly
-
7
based on process modelling and optimization so that on- line control is easily realised. Its new
design concept makes MPC more sensitive and efficient, but, unfortunately more expensive
and time-consuming. A comparison between PID’s and MPC’s effectiveness on the target
PHE appears necessary.
1.2 Project Objectives and Thesis Outline
The key goals of this project are summarized as follows:
1. Develop a dynamic and distributed model for the target PHE and perform a dynamic
simulation to investigate its heat-exchanging behaviour under desirable conditions.
2. Design suitable PID and MPC controller for the PHE respectively, find out their own
characteristics and how they improve the system operation.
3. Compare the PID and MPC controllers and make a conclusion on their advantages
and disadvantages.
This thesis consists of 5 parts.
Chapter 1 give a general introduction for the whole project;
Chapter 2 reviews the relevant existing work on modelling and dynamic simulation of the
plate heat exchanger and the theory of PID and MPC;
Chapter 3 is concerned with the whole process of the mathematical derivation for the PHE
model, and the model is run in gPROMS to perform a dynamic simulation. Finally, the results
obtained are compared with some existing work to justify its correctness;
Chapter 4 has two contents:
1. PID tuning procedures and results: Optimal tuning method is applied on the system with
the help of gPROMS.
2. MPC design. Firstly, the existing non- linear process model is approximate to a linear
state-space model in matlab; secondly, MPC is developed with mpc design toolbox;
Chapter 5 conclude the advantages and disadvantages of the two control method and show
the future work.
Besides, there are some Appendices in the last part to supply additional information about the
project research work.
-
8
Chapter 2 Literature Review
This chapter summarizes the previous works on dynamic simulation of the plate heat and
MPC theory. Their limitations are highlighted to motivate improvements processing on.
2.1 Dynamic Simulation of the Plate heat exchanger
Since the plate heat exchanger is popular for many decades, a lot of work has been done to
study its properties of heat exchange. With different purpose, the research works or studies
always have different types of model and focus. In general, most previous works can be
summarized into three types below:
1. Dynamic simulation of lumped PHE system. This type of work focuses on the output
of the system and only tries to obtain the temperature profile co response to time.
2. Steady state simulation of distributed PHE system. In contrast with the previous one,
such works try to clearly describe the temperature distribution along channel under
steady state.
3. Dynamic simulation of distributed PHE system. Focusing on temperature profile in
both time and spatial axis, giving out the most precise simulation results.
Now, we’ll discuss some typical works in details
2.1.1 Dynamic simulation of lumped PHE system.
A method to model and simulate a heat exchanger in the software “Dymola” is developed by
Pierre Kauhanen in 2004. Although used on a shell-tube heat exchanger in his paper, the
algorithm is also available for a plate heat exchanger.
Figure 2.1.1 Dymola model algorithm (Pierre Kauhanen, 2004)
-
9
As the figure shows above, Pierre’s method can be summarized as the key points below:
Ignoring other factors, the model is only concerned with heat convection and conduction
The heat flux cross streams and the wall is considered as a single quantity but not
quantities from many different points along the channel.
A mean value is used to represent the temperature of the entire volume element
These three points above are always the typical properties of dynamic simulation of lumped
heat exchanger system. On the other hand, the simulation result of Pierre’s work also gives
out a standard form of this type of simulation:
Figure 2.1.2 A Dynamic Simulation Result of Heat Exchanger ((Pierre Kauhanen, 2004)
Both the advantages and limitations of this algorithm are significant. It is easy to build the
model and perform the simulation, results are also clear. However, one cannot judge whether
the model has reflected the actual situation of the system unless the results are compared with
the measured data. Even worse, when disturbance exists, finding out the source of the
disturbance could be nearly impossible. Thus, a distributed model is usually necessary.
2.1.2 Steady state simulation of distributed PHE system
C.P. Ribeiro Jr. and M.H. Ca~no Andrade developed a method for steady-state simulation
of plate heat exchangers in 2001. In contrast with Pierre’s work, they tried to clarify mass and
temperature distribution of the streams in PHE channels. Their results are showed in Figure
2.1.3.
-
10
Figure 2.1.3 Steady state simulation result of a PHE (C.P. Ribeiro Jr. and M.H. Cano
Andrade’s, 2001)
The figure clearly describes how the temperatures of different channels change along the
flow direction. It has become a quite standard form to validate the distributed models of PHE
system. However, the change of overall heat transfer coefficient is not taken into account here.
Jorge A.W. Gut, Jose M. Pinto improved the work.
Figure 2.1.4 Heat Transfer Coefficient Computation (Jorge and Jose, 2003)
-
11
As Figure 2.1.4 shows, the overall heat transfer coefficient U of a plate relates with the local
heat transfer coefficients of the streams on the plate’s both side. Usually, the local heat
transfer coefficient h is a function of the fluid physical properties Cp (heat capacity), μ
(viscosity) and λ (heat conductivity), which all changes with the temperature. Thus, there
should also be a profile of the overall heat transfer coefficient U corresponds to the
temperature distribution. Gut and Pinto did such a job in their research and their result is
shown below
Figure 2.1.5 Overall Heat Transfer Coefficient Distribution Profile (Jorge and Jose, 2003)
Although precisely derided the PHE system, distributed modelling under steady state can’t
predict how the system will go on in the future time. Its limitation is just the dynamic
simulation’s advantage. Thus a method combining these two algorithms comes out.
2.1.3 Dynamic simulation of distributed PHE system
The method used in Michael C. Georgiadis and Sandro Macchietto ( 2001)’s research work in
which focuses on dynamic simulation of a PHE under milk fouling condition is a standard
algorithm to model a PHE as both distributed and dynamic system. Compared with Pierre ’s
work, the fluid in a channel is no longer considered as an integral whole. Instead, a
differential volume element is taken out of the stream and dynamic modelling is performed.
As the volume of the tiny element approach to zero, a distributed dynamic system is
constructed.
Michael and Sandro used some same assumptions with C.P. Ribeiro Jr. and M.H. Cano
Andrade’s. The heat fluxes of the fluids in axial direction in these two works are both ignored.
-
12
They got a very similar result on temperature distribution. On the other hand, they tested the
overall heat transfer coefficient’s change over time. The result is shown below. It can be
easily seen that, as the heat exchange goes on, the overall heat transfer coefficient keeps
decreasing.
Figure 2.1.6 Unit volume element (Michael C. Georgiadis and Sandro Macchietto’s, 2001)
Figure 2.1.7 Overall heat transfer coefficient’s change over time (Michael and Sandro, 2001)
In summary of the three types of work above, we see that it is more complex to build a
distributed system than a lumped system. At least the two points below need to be considered
seriously:
1. How to deal with the heat conductivities of both fluids and plates in the axial direction?
-
13
2. How should the overall heat transfer coefficients be calculated?
All these questions will be discussed in details in Chapter 3.
2.2 Review on PID and MPC’s theory
As mentioned above, controllers are playing more and more important roles in modern
process industry these days. For PID, due to its nearly perfect theoretical basis, most research
works are on the tuning method development. Instead, there are still many s tudies are on
MPC mathematical formulation.
2.2.1 General PID formulation and tuning method
As implied by the name, a PID (proportional-integral-derivative) controller consists of three parts:
proportional part, Integral part and Derivative part. The weighted sum of these three parts is used
Figure 2.2.1 PID control system (form Wikipedia)
to adjust the process via a control element such as the position of a control valve or the power
supply of a heating element. Usually, a PID is formulated as below:
oytoutout DIPtMV )(
Where )(teKP pout
deKIt
iout )(0
dt
deKD dout
-
14
Here, Kp, Ki, and Kd are called proportional gain, integral gain and derivative gain. They are
the key parameters of a PID controller. The so-called “tuning” is to adjust all or part of these
three parameters. Any incorrect choice of the gains could lead to process instability,
oscillation or insensitivity. To solve these problems, firstly, one should decide which of the
three parts are necessary according to the actual operation condition; secondly, the control
parameters must be tuned so that desired control responses can be obtained. Usually, for
different applications there are different optimal behaviours of the process. For some
processes, overshoot can cause the system to become unsafe and must be kept off; for others,
oscillation may be the serious problem. For most heat exchangers, both stability of response
and optimality are required, and an effective tuning method is always necessary when
performing simulation of a PHE system.
Ziegler-Nichols closed loop tuning method is a simple way to tune PID controllers and can
be refined to give better approximations of the controller (Wikipedia, 2008). Its main idea is to
use the ultimate gain value Ku and the ultimate period of oscillation ρu(the time required to
complete one full oscillation while the system is at steady state) to calculate the “critical gain”
Kc. Ku can be found by setting the gains from I and D controller to zero, which totally reflect
the proportional influence on the system, and adjust the proportional gain until the control
loop oscillates indefinitely at steady state. This tests the robustness of the Kc value so that it is
optimized for the controller.
Although Ziegler-Nichols method is easy to operate, it is not the best because it only focuses
on the system’s stability and doesn’t perform any optimization to meet higher demand.
Nowadays, it has already been possible for any given arbitrary process model to use standard
computer programs to find out the optimal tuning parameters Kp, τI, τD for any mathematical
objective.
The most common optimal tuning method is Integral Performance Criteria. M. Zhang and
D. P. Atherton (1993) formulated this criterion as:
0
2
,,
)}({
.min
deJ
J
n
KdkiKp
It is believed that minimization of J always gives minimisation of the integral of time
absolute error. But, the tuning result using this criterion seems not accurate enough and a
further improvement may be needed.
-
15
2.2.2 MPC controller
Model predictive control (MPC) is a form of controller whose current control action is
obtained by solving a finite horizon open- loop optimal control problem at each sampling
instant on- line( as Figure 2.2.2 shows) . The optimal control problem is initialized with
current state of the plant, and yields an optimal control sequence, from which only the first
control is applied to the plant. This is the main difference between MPC and conventional
controllers which use a pre-computed control law. An important advantage of this type of
controller is that it is able to cope with hard constraints on controls and states and therefore it
has been wildly used in chemical and process industries where satisfaction of constraints is
particularly important because efficiency demands operating points on or close to the
boundary of the set of admissible states and controls. Besides, due to its special method to
calculate the manipulated variables, no tuning is needed during the whole process.
Figure 2.2.2 MPC control system (Kouramas Konstantinos’ Lecture material)
1. Mathematical formulation
Generally, an MPC model consists of three parts :
Objective function: this part determines how the controller meets the specification by
optimizing the manipulated variables. Usually, there is another term after the objective
function which is called terminal cost function. It is used to ensure the system’s stability
because the objective function could make the plant unstable when it leads the system
approaching to a optimal point. In another word, the terminal cost function can inhibit
the terminal state from going too far (James B. Rawlings, 2000).
Process model: the process model here is always no longer the original one. It should be
modified (linearization or approximation, etc.) according to the MPC types. This will be
discussed in details later.
Constraints: no matter what kind of the problem is, constraints always exist in actual
process system. Constraints describe how the actual operational, physical and safety
-
16
conditions restrict the system running. Meanwhile, constraints could appear in any part
of the system. There could be input constraints, state constrain, and also output
constraints.
In conclusion, the MPC is formulated as the form below:
Nj
jtNttjttjttjt
uxuuxLujxJ
0
)(),,(min),,(
)(
1,......,0),,(
1,......,0),,(.1
txx
uuu
uuu
yyy
Njuxgy
Njuxfxts
tt
tjt
tjt
tjt
tjttjttjt
tjttjttjt
Where L: objective function
φ: terminal cost
N: prediction horizon
t: initial time
yt+j|t, ut+j|t: output and input j times
△u: Limit actuator spead
2. MPC with linear process model
As mentioned above, the process model used for MPC controller may not be in the original
form. According to the type of the process model, James B. Rawlings (2000) defined two
kinds of MPC controller: MPC with linear model and MPC with nonlinear model. And the
former is more common than the later.
1) MPC with State-space model
James made very detailed discussion on MPC with state-space model in his paper” Tutorial:
Model Predictive Control Technology” in 1999. He highlighted that state-space is very
applicable to MPC controller because its significant advantages including easy generation
and analysis for multivariable system and online computation made the operation more
convenient. Even further, James also thought using state-space model is a good way to make
use of a series of linear system theory tools (e.g. the linear quadratic regulator theory and
-
17
Kalman filtering theory). In spite of this, James opposed to formulate all control problems in
such easy methods because it would lead one neglecting other possibilities, which could be
very important sometimes
As showed below (from James B. Rawlings, 2000), there are two common types of linear
state-space model. The left set of equations describes continues system and the right set is
used for discrete system. However, actually there is not that a clear line between these two
kinds of model. It is common to approximate continues system into a discrete one, all
depending on the actual situation.
hHxhHx
dDudDu
CxyCxy
BuAxxBuAxdt
dx
j
j
jj
jjj
1
2) MPC with Linear quadratic model
Based on the state-space model mentioned in last section, an MPC controller can also be
formulated with a feedback control law uj=u (xj) as below:
jTjjT
j
j
j
T
i uSuuuRuuyyQyyL
02
1
Where 1 jjj uuu ;
y desired output
u desired input
Q, R, and S parameter matrices which are assumed to be
symmetric positive definite;
(From Kouramas Konstantinos’ Lecture material)
Here, the vector y and u are always calculated from a steady-state economic optimization and
assumed to be time invariant. But, usually it is not possible to reach the idea steady a state (xs,
ys, us) for the actual constrained system. Instead, a value very closed to the idea steady state is
chosen as long as it can satisfy the condition. More details about this will be discussed in
Chapter 4.
-
18
Chapter 3 Dynamic Simulation of the target PHE
This chapter is concerned with modeling of the target PHE system and dynamic simulation
result analysis. Firstly, detailed model procedures will be showed and then, the model is to be
performed in gPROMS. Some tests will be done to validate the model and comparisons
between the simulation results and some existing work will be made.
3. 1 Mathematical model construction
3. 1. 1 Problem description
The PHE system has a structure of 3 passes which contains 36 channels each. A simplified
pass arrangement is showed below:
1 1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
1 2 3 4 5 6 7 8 9 10 1112 13 14 15 16 17 18
1 1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
1 2 3 4 5 6 7 8 9 10 1112 13 14 15 16 17 18
1 1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
1 2 3 4 5 6 7 8 9 10 1112 13 14 15 16 17 18
1
2
3
Cold
stream
hot
stream
Figure 3.1 Flow structure of the PHE in this research
In Figure 3.1, hot streams and cold streams are denoted by red and blue arrows respectively.
The hot stream flows through the PHE in the order of pass 3, 2 and 1 and the cold stream
flows right in the opposite direction. This kind of arrangement can improve the efficiency of
heat transfer between hot and cold streams.
-
19
Besides, some necessary parameters of the plant and operation conditions are listed in the
table below:
Channel length / m 0.71856
Channel height/ m 0.025
Gap width /m 0.033
Plate thickness / m 0.005
Plate thermal conductivity / W/m2s 16
Plate density/ kg/m3 7800
Plate heat capacity / W/kgK 502
Operation Pressure/bar 6
Table 3.1 technical details of the target plate heat exchanger
3. 1. 2 Mathematical Model Derivations
1. Assumptions
Many physical properties of the fluids and plates can affect the heat transfer result. Some of
them could be always very effective, some may not, and some may only remarkably
influence the result under certain special condition. Generally, we can ignore those
ineffective factors and especially point out the special cases.
To model a PHE system, the most important factors which mostly determine the results are:
Mass transport, Energy transport, and momentum transport in plug flow and the heat
transport between plates and fluid. These processes can be described and linked with each
other by conservation law equations. Any change in one of them could influence the output,
e.g. decrease in the inlet flow rate of hot fluid will cause the outlet temperature of cold fluid
to drop. These equations form the main body of the model.
However, for specific system, some of the factors mentioned above might be not that
important. In this project, we can ignore some of them:
Mass Transport: For the target system, we focus on the energy transport between cold
and hot streams. On the other hand, in gPROMS’s physical property database IPPFO,
the density of water doesn’t change significantly with temperature. Thus we can
assume the streams as incompressible fluids.
Momentum Transport: here we assume the constant pressure, thus there is no need to
consider the momentum equation.
Phase change: quite limited phase change in the channels.
-
20
Fouling, transports in boundary layer: These phenomena are ignored in this modelling
because the composition is simply water.
In conclusion, the assumptions used for this project are as follows:
(1) One-dimension flow;
(2) Non-fouling condition;
(3) No phase change in the channel;
(4) Constant pressure
(5) Incompressible fluid
(6) Ignore the heat transport in axial direction
2. Mathematical Derivation
To analyze the distributed fluid in a channel, we need to take a differential volume element
with the length of δx at position x first (as figure 3.2 shows).
Figure 3.2 Analysis on a differential fluid element in a channel
1) Mass balance
Since the fluid is assumed to be incompressible, there is no need to use continuous equation
here. So the mass balance in a channel is simply in the form below:
ixi uAF
2) Energy balance
x=0 x=L x
Pi-1
Pi
qp,i
x+δx
qp,i-1
Fluid in Fluid out
-
21
To describe the temperature profile, we need to consider the energy balance on the
differential element. In doing this, we should consider both internal and kinetic energy
contributions:
)(|)2
1([
|)2
1([)
2
1(
1,,
2
22
ipipxxi
iii
xi
iiiiii
qqx
TAuhAu
x
TAuhAuxuAxeA
t
Here, heat diffusion caused by temperature gradient along the axial direction x
TA i
is
considered, and the heat Q from plates will be discussed separately.
Dividing through by Aδx and taking the limit as δx→0, we obtain:
)()()(2
1)()(
2
1)( 1,,
22
ipip
iiiiiiiii qq
x
T
xuu
xhu
xu
te
t
Now, we can use the thermal dynamic relation:
/peh
We get :
)()]ln
ln()()()
)/1(( 1,,,
ipip
i
iiii
iiiipi qq
Dt
Dp
Tx
T
xA
Cufu
x
u
Dt
Dp
Dt
DTC
However, this is not the final version. As mentioned above, we should ignore some factors.
According to the assumptions, we can ignore all terms on the right hand side except the last
one, which gives out:
1,,, ipipipi qqDt
DTC
Introducing )( ,, iiPP
iip TTUq , we can have the final version of the energy balance equations
of the fluids:
1,...,3,2
)()( 111
ni
TTAUTTAUx
Tun
t
TCpA Piii
P
i
P
iii
P
ii
iii
iix
)( 21221
111
11
PP
x TTAUx
Tun
t
TCpA
-
22
)( PnnnP
n
n
nn
n
nnx TTAUx
Tun
t
TCpA
Similarly, the energy balance of the plate is formulated as:
nj
x
TTTTTAU
t
TCpA
P
jP
jj
P
ijj
P
j
P
jPPP
x
,...,3,2
)]()[(2
2
1
Note: since the thermal conductivity of the metal is very high, we should not neglect the heat
transport inside the plate.
3) Heat transfer coefficient
In this project, Jorge and Jose’s method is use. The heat transfer coefficient is treated as a
distributed variable.
ni
khhU P
P
ii
P
i
,...,3,2
111
1
ni
Deu
Cp
Nu
DehNu
i
iii
i
iii
ii
i
ii
,...,2,1
Re
Pr
Pr)2.3(Re214.0 4.0662.0
In all, the one-pass model is formulated as Table 3.2 shows.
4) Model modification
The model is modified as explained in the following, in order to make its implementation in gPROMS easier.
The basic idea is that all variables should be re-named according to hot and cold streams and
the set of the equations should be rearranged. For example, the hot temperature of the hot
stream in channel i is named as T_hoti, and for the cold stream is T_coldi. A completed
modified model is available in Appendix 1 and 2.
-
23
Equations No. New Variables No
ni
nFF
uAF
i
ixi
,...,2,1
/
n iu n
1,...,3,2
)()( 111
ni
TTAUTTAUx
Tun
t
TCpA Piii
P
i
P
iii
P
ii
iii
iix
n-2 Pi
P
iii UTCpT ,,, 4n-6
nj
TTTTAUt
TCpA Pjj
P
ijj
P
j
P
jPPP
x
,...,3,2
)]()[( 1
n-1
nTT ,1 2
)( 21221
111
11
PP
x TTAUx
Tun
t
TCpA
1
1Cp 1
)( PnnnP
n
n
nn
n
nnx TTAUx
Tun
t
TCpA
1
nCp 1
ni
khhU P
P
ii
P
i
,...,3,2
111
1
n-1 ih n
ni
Deu
Cp
Nu
DehNu
i
iii
i
iii
ii
i
ii
,...,2,1
Re
Pr
Pr)2.3(Re214.0 4.0662.0
4n ii
iii Nu
,Pr
,Re,, 5n
)( iii TCpCp
)( iii T
)( iii T
ni ,...,2,1
3n 0
Totally 11n-2 11n-
2
D.O.F=0
Table 3.2 Completed one-pass model for the target PHE
-
24
(5) Boundary conditions and initial conditions
Initial conditions:
It is assumed that all steams in the three passes start at the inlet temperature which is given as:
18...3,2,1__
18...3,2,1__
18...3,2,1__
0
3
0
3
0
2
0
2
0
1
0
1
iTcoldTThotT
iTcoldTThotT
iTcoldTThotT
cold
int
pass
i
hot
int
pass
i
cold
int
pass
i
hot
int
pass
i
cold
int
pass
i
hot
int
pass
i
For the plate, it can be considered to start from steady state:
;35...3,2,10_
;35...3,2,10_
;35...3,2,10_
3
2
1
jt
plateT
jt
plateT
jt
plateT
Pass
j
Pass
j
Pass
j
Boundary conditions:
Based on the modified model and the pass arrangement, the boundary conditions are listed
below:
Pass I:
coldF
coldFcoldT
coldT
ix
coldTTcoldT
ix
hotThotThotT
i
pass
ix
pass
i
Pass
out
x
pass
iin
coldx
pass
i
x
pass
iPass
outx
pass
i
_
__
_
;18...3,2,10_
_
;18...3,2,10_
__
18
1
1
0
1
1
0
1
1
1
1
1
2
0
1
Pass II:
coldF
coldFcoldT
coldT
hotF
hotFhotT
hotT
ix
coldTcoldTcoldT
ix
hotThotThotT
i
pass
ix
pass
i
Pass
out
i
pass
ix
pass
i
Pass
out
x
pass
ipass
outx
pass
j
x
pass
iPass
outx
pass
i
_
__
_
_
__
_
;18...3,2,10_
__
;18...3,2,10_
__
18
1
2
0
2
2
18
1
2
1
2
2
0
2
1
1
2
1
2
3
0
2
-
25
Pass III:
hotF
hotFhotT
hotT
ix
coldTcoldTcoldT
ix
hotTThotT
i
pass
ix
pass
i
Pass
out
x
pass
ipass
outx
pass
i
x
pass
iin
hotx
pass
i
_
__
_
;18...3,2,10_
__
;18...3,2,10_
_
18
1
3
1
3
3
0
3
2
1
3
1
3
0
3
3.2 Simulation results and discussion
Based on the constructed model, a dynamic simulation is performed in gPROMS. Here the
solver chosen to solve the PDAE system is BFDM, and the whole length is discrete into 15
points.
1) Topology arrangements
Figure 3.2 shows how the whole process is connected. In the picture, the blue and red lines
represent cold and hot streams respectively. We see that before going into the heat exchanger,
the hot stream firstly flow through a valve which is used to manipulated the flow rate. Then it
goes into the plant and exchange heat with the cold stream. Finally, all the output data we
need can be collected from the port_cold and port_hot.
Figure 3.2 Topology of the whole process
-
26
2) Outlet temperature analysis
Figure 3.3(a) and 3.3(b) shows the outlet temperature of hot and cold streams from port_hot
and cold_port in 100 hrs. We see that the temperature of cold stream keeps increasing and
approached to 335K. In contrast, the hot stream’s outlet temperature sharply decreases to
around 335K in the first 10 hrs and then gradually rises back to original level. Compare them
with the previous works did before (see Appendix III), we found that those two models shows
very similar dynamic behaviour, which prove that the profile we obtain is relatively normal.
Figure 3.3(a) Outlet temperature of the cold stream
Figure 3.3(b) Outlet temperature of the hot stream
-
27
3) Temperature distribution along the axial direction
Temperature distribution of hot streams
Figure 3.4(a) Temperature distributions of hot streams at 20.0th second
Figure 3.4(b) Temperature distributions of hot streams at 3.0th second
336
337
338
339
340
341
342
343
344
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
PH
E.P
ass_3001.T
_hot
Axial
PHE.Pass_3001.T_hot(20,3,) PHE.Pass_2001.T_hot(20,3,) PHE.Pass_1001.T_hot(20,3,)
339
340
341
342
343
344
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
PH
E.P
ass_3001.T
_hot
Axial
PHE.Pass_3001.T_hot(3,3,) PHE.Pass_2001.T_hot(3,3,) PHE.Pass_1001.T_hot(3,3,) PHE.Pass_1001.T_hot(3,6,)
-
28
Figure 3.4 shows how the temperature changes when the hot stream flow through the 3 passes.
In the picture, the black, red and blue lines denote the temperature profiles of the third
channels of Pass1, Pass 2 and Pass 3 at the twentieth hour respectively. It is obviously that
the temperature is lowed pass by pass and keeps decreasing all along the axial direction.
However, this could not be that clear at some time:
Compared with last picture, we found that the temperature drops in pass 1 and Pass 2 are not
as clear as the one in Pass three. However, Figure 3.3(b) showed there is a very significant
temperature drop in the first 10 hours. Therefore we can make a conclusion that, for Pass 1,
the hot stream’s temperature doesn’t change gradually at the beginning time (first 10 hours
more or less), instead, sudden changes make it drop fast, which reflects that the system is
very unstable during the beginning period.
On the other hand, hot streams in same pass have very similar temperature profiles. Take
Pass 3 as an example. As figure 3.5 shows, the fluids in channel 1 to channel 17 almost have
a same behaviour on temperature changes. Only the fluid in the last channel’s performance is
somewhat different. This could because there is only one plate exchanging heat with it so that
less heat is lost than other fluids.
Figure 3.5 Temperature Distributions of hot streams in Pass 3
-
29
Temperature distributions of cold streams
In contrast with hot streams, cold streams’ temperatures do not change significantly along the
axial direction. Instead, the temperature gradient is very subtle and even worse sometimes it
could be zero (see figure 3.6). This result is quite different from the previous work we
mentioned in Chapter 2. The main cause such differences will be discussed in the next section.
Similarly, the cold streams are heated by hot streams pass by pass. This kind of behaviour is
relatively clear in Figure 3.6(a). In the graph, the black, red and blue lines separately denote
the temperature of the fluids in Pass 1, Pass 2 and Pass 3. It is obvious that the first pass plays
the most important role in raising the temperature level. This is especially clear at the
beginning period (see Figure 3.6(b)).
This phenomenon also appears on hot streams (see Figure 3.4(b)). It can be easily explained:
when a hot or cold stream flows into the heat exchanger, the temperature difference between
the fluids and plates are very significant. As the heat exchange goes on, it gets smaller and
smaller. However, finally the fluids in different passes will stay in temperature levels which
are much closed to each other, and the temperature difference will then become uniform,
which leads the different passes approaching to same effectiveness.
Figure 3.6(a) Temperature distributions of cold streams at 20.0th second
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
PH
E.P
ass_1001.T
_cold
Axial
PHE.Pass_1001.T_cold(20,3,) PHE.Pass_2001.T_cold(20,3,) PHE.Pass_3001.T_cold(20,3,)
-
30
Figure 3.6(b) Temperature distributions of cold streams at 5.0th second
Figure 3.7 Temperature distributions of cold streams in first channel and second channel of
Pass 2 at 5.0th second
Another interesting situation appears in cold stream temperature profile in Pass 2 and Pass 3.
Figure 3.7 shows the phenomenon. It can be clearly seen that at the fifth hour, the
278
279
280
281
282
283
284
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
PH
E.P
ass_1001.T
_cold
Axial
PHE.Pass_1001.T_cold(5,3,) PHE.Pass_2001.T_cold(5,3,) PHE.Pass_3001.T_cold(5,3,)
283
284
285
286
287
288
289
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
PH
E.P
ass_2001.T
_cold
Axial
PHE.Pass_2001.T_cold(10,1,) PHE.Pass_2001.T_cold(10,2,)
-
31
temperature of the fluid in Pass 2’s first channel is lower than entrance temperature so that it
looks like the temperature is “decreasing” along the channel. However, the truth is not like
what we see and his is due to the following reasons:
For the first channel, there is only one plate exchanging heat with the fluid in it, therefore
much less heat is transported to it than other fluids. Besides, the initial temperature is also
much lower than the entrance temperature. Thus the fluid in that channel could not approach
to the same temperature level in short time, and this leads to the phenomenon we see.
Analysis on the overall heat transfer coefficient
As mentioned before, the cold stream temperature distributions are very different from the
results of previous work showed in Figure 2.1.3. The reason could be found in the overall
heat transfer coefficients. Figure 3.8(a) show how some plates of Pass 1’s overall heat
transfer coefficients change over time. The black line denotes Plate 1 and the lines of other
colours denote plates at some other positions. We can see, as time goes on, the values of
those coefficients are getting smaller. And the first one decrease a bit slowly. This is same as
Sandro and Michael’s conclusion in 2000; however, the drop is not as significant as their
result. Similarly, the axial distributions of those coefficients are very stable, too. The values
of the differences between positions are very small, which makes the curve almost a
horizontal (see figure 3.8(b)).
Figure 3.8(a) overall heat transfer coefficient changes over time
3530
3540
3550
3560
3570
3580
0 10 20 30 40 50 60 70 80 90 100
PH
E.P
ass_2001.U
Time
PHE.Pass_2001.U(,1,0.466667) PHE.Pass_2001.U(,2,0.466667) PHE.Pass_2001.U(,35,0.466667) PHE.Pass_2001.U(,18,0.466667)
-
32
The reason why these heat transfer coefficients are so different is, the platform we chose to
perform the simulation is gPROMS, of which the data base IPPFO is very different with the
normal physical property data. The IPPFO has simplified those data and make the physical
properties very insensitive to temperature. Sometimes the change of temperature even
couldn’t cause those parameters to change. Therefore, the heat transfer coefficients we
obtained become so stable, and even further we got very different results of cold streams
from previous work.
Figure 3.8(b) overall heat transfer coefficients of Pass 1 at 50.0th second
-
33
Chapter 4 Controller Design
4.1 PID Control System Design
With the help of gPROMS, we can now design the PID controller more easily. A completed
PID unit model is inserted into the PML (process model library) and can be added on the
plant simply by topology function. What we need to do is just to tune and determine its gains.
The tuning method is chosen to be Integral Performance Criteria which is a kind of
optimization tuning method. Thus the PID design work becomes an optimization problem.
Firstly, the PID and a valve are connected to the plant as the figure shows below:
Figure 4.1 topology of PID control system
It is clearly seen that, the output of the plant is first detected by a sensor and transformed into
electrical signal then sent to PID controller. After calculation based on the current “error”, a
control action is sent to the valve which is manipulated by the control signal so that the inlet
flow rate of hot water is changed. By this means, the output is led approaching to the set point.
-
34
Since differential operation is much easier to realise than integral operation in gPROMS, here
we formulate the objective function in differential form as below:
2
.min
edt
dJ
J
Where e is the error
Note: the error here is not calculated as the difference between measured value and reference
signal. More details about it can be found in Appendix II.
Figure 4.2 (a) PID controller output with proportional gain of 1
Figure 4.2 (b) PID controller output with proportional gain of 5
-
35
Figure 4.2 (c) PID controller output with proportional gain of 10
As mentioned before, a too large proportional gain could lead the system unstable. But, there
is not a very strict rule to follow for a particular system. The normal way is to use manual
tuning method firstly so that a general range of the gain is obtained. Figure 4.2 (a), 4.2 (b)
and 4.2(c) show the controller outputs with proportional gain of 1, 5 and 10 respectively.
It is obvious that a relatively big proportional gain makes a sudden change happen. When the
gain increases to 10, the change is even more shape. Thus, we can preliminary estimate that
the value of proportional gain should be no more 10. With such estimation, we perform the
optimization with an initial setting as Figure 4.3 shows.
Figure 4.3 PID initial settings
-
36
The time horizon is set to 500 seconds but not 100 seconds so that the optimization results
will more suitable for the system when running long period. On the other hand, since the
physical and operation limitations have already been taken into account in the process model,
none extra constrains is needed to be included in the optimization problem. Therefore, we
obtain the optimal control action as the figures and tables show below:
Figure 4.4 (a) First PID optimization tuning results
With the parameters above, the system simulation result of 100 sconds is showed below:
Figure 4.4 (b) simulation results of the system with tuned PID
Bias 0.01642078
Gain 5.4744306
Rate 10
Rate limit 100
Reset time 95.75582
-
37
However, if we narrow down the scope of the proportional gain to (0, 5), will the
optimization certainly give out a very different set of results and how is the simulation results
to change? The answer is easy to find from figure 4.5. Compare Figure 4.5 with Figure 4.4,
we find that, those two set of results don’t vary a lot from one to another. However, the
output curve in figure 4.5 (b) shows a more obvious decreasing trend just after the output
value reaching the peak which means the system become less stable with the later set of key
parameters. Even further, the proportional gain’s value in this optimization hits its upper
bound which indicates an active bound. In sum of all these factors, we can conclude that the
first set of optimization results is the best choice for this system
Figure 4.5(a) Second PID optimization tuning result
Figure 4.5 (b) simulation results of the system with tuned PID
Bias 0.014700688
Gain 5
Rate 10
Rate limit 91.99628
Reset time 96.28032
-
38
4.2 MPC Control System Design
As the latest control system in the world, model predictive control (MPC) has a series of
advantages compared with the traditional controllers. By now, the application of MPC in
many different regions has shown its advancement and robustness. However, due to its high
cost, it has not been wildly used. That’s why there is not such completed model unit in
gPROMS. To design an MPC controller, we need the help of MATLAB.
4. 2. 1 Model export from gPROMS to MATLAB
No matter what we what to do with the controller, we must connect it with our target system
together to simulate and tune the whole process. Since the MPC must be programmed in
MATLAB environment, the only way to add the controller on the system is to export one part
to another so that they will run in same platform. Fortunately, gPROMS offered us a tool to
do this, and the tool is gO:Simulink.
Figure 4.6 topology of the composite model
gO:simulink is a software included in standard gPROMS installation. It allows complex non-
linear gPROMS process models to be incorporated directly into The MathWorks MATLAB
& Simulink environment. The gPROMS model is run from a gO:Simulink block that can be
added to any Simulink model[10]. gO:Simulink offers us two methods for exchanging data
between gPROMS and Simulink. One is exporting simulink blocks into gPROMS as a
-
39
foreign objective; the other is exporting a gPROMS unit into simulink as an simulink block.
Here, we choose the later one because the former method needs Visual C++ as accessory
appliance.
The first step to export a unit is to pack all units you want into one gPROMS unit. The reason
to do so is gOSimulink can only export one gPROMS unit a time. In another word, all the
component models (three passes and liquid source) must be put together to form a composite
model “PHE” which include a topology. The topology is showed in Figure 4.6 below.
(Note: here we delete the valve because in MPC controller design the inlet flow rate of hot
water is chose to be input directly)
Figure 4.7 Flow sheet in simulink
From the original topology we know that all the inputs for the system are supplied from the
unit named “liquid source”. But, this function must be distributed to other four independent
units. The reason to do so is that, the model export is carried out with the help of
“gOSimulink library”. The input data we need must be generated in a gOSimulink library
model so that they can be transferred to Simulink with the composite model together. In this
case, the “liquid source” unit only works as a channel which combining all the inputs.
-
40
Finishing all the preparatory work, the composite model is transferred into Simulink and the
whole process is represented as the figure shows below:
4. 2. 2 MPC controller design
1. System identification
Because of the MPC controller’s specific characteristics, the non- linear process model
constructed in gPROMS cannot be used for controller design directly. In all, the PHE model
includes more than 600 equations and a series of complex connection. It is quite obvious such
a detailed high-fidelity PDAE system is impossible to be used with the current MPC methods.
Therefore linearization and approximation are necessary to obtain a reduced order model.
Since the PHE in this project is a relatively easy SISO system, it is convenient to finish the
design work in MPC tool box. Thus, the process model can be only LTI (linear-time- invariant)
model which is the only form available for MPC tool box. Three formats of model can be
specified as LTI model: transfer function model (TF), Zero-pole-gain models (ZPK) and
state-space model (SS) (From MATLAB Product introduction). Here we choose the state-
space model as the plant model we want to estimate from the developed nonlinear model.
State space model is a mathematical model of a physical system as a set of input, output and
state variables related by first-order differential equations (From Wikipedia). For a state space
model, all the process inputs, outputs and states are all expressed as vectors and the all the
equations are written in matrix form. That is why it is convenient to use a state space model
for MPC controller design. With the help of MATLAB’s system identification tool box, we
can transform the PHE model we have construct into a state space model easily. And the
detailed procedures are state in following:
The first step is preparing the data. Since a dynamic simulation is successfully run in
gPROMS, we can collect any data easily as required. S ince for a plate heat exchanger, the
system input (inlet flow rate of hot water) keeps constant for the whole simulation process,
we need to collect more than one set of data with different inputs. Then we should use one of
them to estimate model (working data) and others to validate it (validation data) so that the
model will be confirmed to be suitable for different inputs.
After exported into matlab, the set which is chosen to be working data is pre-processed
(remove means) and stored in an M-file. Using the tool box’s plot function we can easily see
the pre-processed working data Figure 4.8 shows:
-
41
Figure 4.8 input and output data used for estimation time-plot
Finishing data preparation, the model estimation can be preceded now. There are two
common algorithms for state-space model estimation: N4SID and PEM. It is hard to say
which method will give us a better result unless try them both.
N4SID method
The numerical algorithms for subspace state space system identification is usually
known as N4SID. They are always convergent (non- iterative) and numerically stable
since they only make use of QR and singular value decompositions [10]. The N4SID
methods have very significant advantages as follows:
Firstly, with N4SID algorithms, since the parameter matrices for the state space model
are not calculated in their canonical forms but as full state space matrices in an
optimal conditioned basis, a priori parameterization can always be avoid [11]. The only
thing needs to be determined is the model’s order (the number of states), which is
easy to obtained by computation.
Secondly, because N4SID algorithms are non- iterative, there is no non- linear
optimization computation involved in the identification so that they are numerically
0 50 100 150 200 250 300 350 400 450 500-100
-50
0
50
y1
Input and output signals
0 50 100 150 200 250 300 350 400 450 500-1
-0.5
0
0.5
1
Time
u1
-
42
stable and do not suffer some typically problem of iterative algorithms (e.g. no
guaranteed convergence, sensitive to initial estimates, etc.)
Best fit: PHE_N1 80.14% & PHE_N2 76.9%
Figure 4.9 (a) simulated N4SID model outputs Vs data_V1
Best fit: PHE_N1 88.67% & PHE_N2 88.45%
Figure 4.9 (b) simulated N4SID model outputs Vs validation data 2
0 50 100 150 200 250 300 350 400 450 500260
270
280
290
300
310
320
330
340
350
360
Time
Measured and simulated model output
0 50 100 150 200 250 300 350 400 450 500260
270
280
290
300
310
320
330
340
350
360
Time
Measured and simulated model output
-
43
Finally, as mentioned above, the N4SID algorithms are not sensitive to initial state so
that no extra parameterization is needed.
The first step of estimating state-space model with N4SID is to fix the model’s order.
The toolbox set the order to 4 as default value. But, using the “order selection”
function, we are recommended to set the order to 2. Estimated the model with both
orders of 2 and 4, we get two different model plots as Figure 4.9 shows.
(The deep blue line denotes model PHE_N14 which is a model of order 2; The yellow
line denotes model PHE_N2 which is a model of order 4)
PEM method
Iterative prediction-error minimization method is known as PEM in matlab
environment. Unlike N4SID algorithms, PEM is a typically iterative method thus it
may not grantee the convergence of the model (as Figure 4.10 (a) and (b) show).
When using PEM to estimate a state space model, an initial estimation is proceeded in
advance with a N4SID algorithm.
With PEM, an order selector cannot be use. According to experience of last estimate,
we set 2 and 4 as the model order, estimate the model focus on prediction and obtain
the model plots as below:
(The blue line denotes model PHE_P2 which is a model of order 4; the red line
denotes model PHE_P1 which is a model of order 2)
Best fit: PHE_P1 79.03% & PHE_P2 -671.8%
Figure 4.10 (a) Simulated PEM model outputs Vs validation data 1
0 50 100 150 200 250 300 350 400 450 5000
50
100
150
200
250
300
350
400
450
500
Time
Measured and simulated model output
-
44
Best fit: PHE_N1 88.69% & PHE_N2c -137.9%
Figure 4.10 (b) Simulated PEM model outputs Vs validation data 2
From all the four figures above, we can tell that, all the models estimated have good fit with
the measured data except model PHE_P2 which is not convergent. Among all the models,
Figure 4.11 Refined models PHE_N1c and PHE_P1_c
0 50 100 150 200 250 300 350 400 450 500200
220
240
260
280
300
320
340
360
380
400
Time
Measured and simulated model output
0 50 100 150 200 250 300 350 400 450 500260
270
280
290
300
310
320
330
340
350
360
Time
Measured and simulated model output
-
45
PHE_N1 has the best fit of all. Even further, PHE_P1 and PHE_N1 can be refined to better
models PHE_P1c and PHE_N1c which are both with best fits of 88.69% (showed in Figure
4.11 above). Instead, the iterative refine process makes PHE_N2 lose convergence. Thus,
there are five models which can be used for MPC controller design (PHE_N1, PHE_N1c,
PHE_P1, PHE_P1c and PHE_P2). However, the fitness of those five models doesn’t actually
vary a lot from each other. Although one of them is the best, the others are not too much
worse than it. On the other hand, whether a model can be suitable for a MPC controller
doesn’t depend on its fitness, only practise can tell which one should be chosen.
2. MPC Preliminary Design
Because the plant model is a relatively simple SISO system, there is no need to formulate
complex MPC controller. The MPC library in simulink can totally satisfy the demands of the
work. What we need to do is simply to determine some key parameters of it with the help of
MPC tool box and MPC block.
Figure 4.12 MPC output
Once defined a MPC block by simply copying a MPC library block to a new utility, a new
MPC controller is defined in matlab work space. Import all the estimated plant model and the
defined controller into the MPC design tool box and run the simulation of 5 different
collocations, we find that except the model PHE_N2, all the other four plant model cannot
0 50 100 150 200 250 300 350 400 450 5000
50
100
150
200
250
300
350
Plant Output: y1
Time (sec)
-
46
work well with the MPC controller and give out very bad behaviour (see Appendix VI) .
Thus, we can fix the plant model as PHE_N2 which is present as below:
1.0564)0(x5.4399)0(089104.0)0(x 0.25819- = (0)x
)()(0060106.0)(00011983.0)(4272.1)(66.222)(
)(77886.0)(103433.1)(63944.0)(7702.0)(0027408.0)(0010531.0)1(
)(049.66)(103349.6)(72636.0)(21513.0)(0049731.0)(0057565.0)1(
)(19687.0)(100366.600057857.000818969.0)(99771.0)(0029473.0)1(
)(0033865.0107138.3102409.8)(012403.0)(98494.0)1(
4321
4321
15
43214
13
43213
12
43212
4
5
3
6
211
x
tetxtxtxtxty
tetutxtxtxtxtx
tetutxtxtxtxtx
tetuxxtxtxtx
texxtxtxtx
With the plant model above and after a series tuning (see Chapter 5), we obtain the MPC
controller output as 4.12, which can prove the MPC now can be added in to the system.
(Note: since the MPC controller is created by defined new MPC simulink block, the exactly
formulation is impossible to obtained)
Figure 4.1.3 MPC control system flowsheet arangement
3. MPC control system in Simulink
After setting up the controller, we should run the simulation so that we can know the exact
performance of the whole control system.
-
47
For the first step, the MPC controller is added into the simulink flowsheet as Figure Figure
4.1.3 shows: the outlet temperature is firstly sent to the MPC block, and then the MPC will
compute an optimal conrol action and sent it out. Timed by a scaling factor in the Gain block,
the control action is finally sent to th pant to make it approach to the set point. At the
beginging, the flowrate is set to be 5 kg/s and the referece signal is left blank for the set point
has already been fixed as 300K in the design tool box.
Unfortunately, due to some unknown reason, gOSimulink cannot run crecotly. This
simulation part is left for the future work and will be discussed in next Chapter.
-
48
Chapter 5 Work Results Conclusion & Discussion
5. 1 Simulation Results Conclusion
As mentioned before, due to the widely use of the PHE, so many works have been done to
research their behaviour under different conditions. Many of the ideas have been taken and
used in this project and played effective roles to obtain some key results. Meanwhile, because
every project has its own properties, there are also some special methods and ideas which
have shown significant effectiveness.
1. Assumptions and model construction
We have generally summarized how to choose adapted assumptions in Chapter 3. Here, a
more classic and systemic conclusion is made to show how consumptions effect the model
construction and simulation results in this project. Obviously, since assumptions are the bases
of the models, assumptions can great affect a model’s form, solvability, accuracy and so on.
Suitable assumptions can make the work both easy and precise; instead, bad assumptions
always bring unnecessary troubles or lead the work going in a wrong direction.
Assumptions determining a model’s form
A certain model’s form is usually determined by the objective of the project work,
operation conditions and some other key factors. In this work, since we want to know the
system’s both over time and space, the model is constructed in a dynamic and distributed
form.
It is easy to judge whether a model should be dynamic or in steady-state form. However,
it is another thing to determine whether the system should be distributed or lumped.
Usually, a heat exchanger is formulated as a lumped system for we only care about the
outlet temperature profile over time. However, when a precise control system is needed,
clear energy and mass distribution become more important and a distributed model is
necessary. Even further, we should determine the dimensions of the model because any
unnecessary increase in dimensions of the model can significantly enlarge its scale and
made it more difficult to solve or sometimes unsolvable.
For the project we have done, since the model is going to be used for the controller and
one of our objectives is to obtain clear temperature profile inside every channel, we
determine the model as 1-D distributed model(x-direction only) and the total number of
the equations is more than 200. According to the simulation results we got, the 1-D
model has done very good work to show us all the data and profiles we need. If the plant
-
49
is formulated as 3-D model (in x, y, z three direction), the number of equation could be
more than 700 and the difficulty to solve the system will be highly increased or maybe
the system could not be solved. Even the model can be well solved, the simulation results
will not be greatly improved for the flow behaviour in the other two directions are too
negligible.
Assumption of constant pressure and density
It is well known that pressure is one the key parameters of fluid and is reflected by
momentum equation in a model. The momentum balance formulated for this project is:
x
p
x
uu
t
u
This equation gives out the relationship between velocity and pressure (since gravity is
neglected in this project there is no term describes the body force). It is obvious that if
this balance is added into the system, the model will become much more complex.
However, in practical applications of a PHE, the velocity of fluid in the channels doesn’t
vary a lot from point to point. On the other hand, for any fixed valve position, the flow
rate is constant so that the average velocity u doesn’t change over time, either. Thus, we
have:
0
x
p
x
uu
t
u
Which means the pressure can be assumed to be constant.
Similarly with the pressure, the density can also be assumed to be constant because in
gPROMS, the water density doesn’t change a lot over temperature. Thus a continue
equation is not necessary anymore and the model is more simplified.
Domain of applicability of the PDAEs
Another thing worth to be discussed is the domain of applicability of the model. In this
project, all the equations are applicable on the whole axial domain only except energy
balance equations. These equations are not available at both the entrances and the exits of
the channels because at such positions, sudden changes of flow rate happen and make the
fluid no more continuous so that the heat exchange doesn’t work as the model.
2. Simulation conclusion
Solver choice
Actually, the basic idea to solve a PDAE (partial differential-algebraic equation) system
is to define a grid on the spatial domain so that the PDAE system is discrete into a set of
DAEs. Then, the initial conditions are approximated and the DAEs are solved so that an
-
50
approximated solution of the original PDAE system is obtained. Based on this idea, there
are three numerical methods for the PDAE system solution in gPROMS: BFDM
(backward finite difference method), CFDM (centered finite difference method), and FFDM
(Forward finite difference method) A finite difference is defined as a mathematical
expression of the form: f(x + b) − f(x + a). There are three kinds of finite differences:
Forward, backward, and central differences, which are expressed as follows:
A forward difference is an expression of the form:
)()()]([ xfhxfxfh .
A backward difference uses the function values at x and x − h, instead of the values at x +
h and x :
)()()]([ hxfxfxfh
A central difference is given by
)2
1()
2
1()]([ hxfxfxfh
Besides, there is also another solver OCFEM (orthogonal collection on the finite elements method) which is based on the idea of polynomial approximation method. It is not
introduced here for it is not suitable for the model we built.
Figure 5.1 Grid on spatial domain (Imperial College lecture material)
We can obtain very different results by using different solver to solve the systems. Figure 5.2 (a)
and (b) show the outlet temperature profile over time of a same channel with different solvers.
Figure 5.2 (a) Outlet temperature of a certain channel solved with BFDM solver
-
51
Figure 5.2 (b) Outlet temperature of a certain channel solved with CFDM solver
According to the previous works, it is quite obvious that the simulation result showed by
Figure 5.2 (b) is definitely wrong. Even worse, gPROMS cannot give out any result
when using the FFDM solver. That is why we finally choose the BFDM. Therefore we
can summarize that, for any constructed model, the solution can be affected great by the
solver and one cannot decide which the best is unless trying all of them.
Simulation results summarization
According to the simulation results and the previous work, the following points of PHE
dynamic simulation can be concluded:
1) When a PHE is used for heating cold fluid, if the inlet flow rate of hot stream keeps
constant, the outlet temperature of the cold stream will keep increasing until it reach a
steady state that has very limited temperature gap with the temperature of the hot
stream. Instead, the outlet temperature decreases very fast at the first time, and very
soon, it starts to pick up in a even higher speed until it reach the steady state. These
two distinct behaviours can be seen from the Figure 3.3 (a) and (b).
2) In each channel, the stream’s temperature should keep decreasing along the axial
direction no matter it is a cold or hot stream. Meanwhile, the heat transfer coefficient
should also show a similar distribution with the temperature. This has been proved by
some previous work mentioned in Chapter 2. However, when physical properties of
the fluid are not sensitive to the temperature or in other words they keep almost
constant, the change of heat transfer coefficient will become inconspicuous and
further leads the cold stream temperature showing constant distribution along the
-
52
axial direction. These phenomena can be seen in Figure 3.6 (a) and Figure 3.8 (b) of
Chapter 3.
3) These behaviours can be explained with the theory of energy balance. At the
beginning time, the temperature gap between hot and cold streams is at its biggest
value. Due to the high heat transfer coefficient, the hot stream gives out big amount
of heat to cold stream and leads its temperature decrease very sharply. As the
temperature of cold stream raises, to keep the gap of temperature, hot stream
temperature must raise up again. Because the physical properties of water in
gPROMS are note very sensitive to temperature, the heat transfer coefficient keeps in
high level and the temperature of both hot and cold streams are forced to rise very
fast. This is one reason that explains why the heat transfers so fast in this project
compared with Michael and Sandro’s work (It takes 25000 seconds for them to cold
the milk from 370K to 367K with their PHE).
5.2 Conclusion of Controller Design
1. PID design conclusion
With decades of years’ accumulated experience, PID controllers have already been very well
known by people and packed in many kinds of professional software as completed units.
Model construction is no longer a part of the so-called “PID design“, the only work left is
PID tuning. Usually, the parameters need to be tuned are: proportional gain, integral gain and
derivative gain. But, for gPROMS special formulations of PID, there are 5 parameters need to
be adjusted in this project (see Chapter 4). The most important parameter is the proportional
gain K (named gain in gPROMS). The proportional gain directly determine the how fast the
system can approach to steady state. This point has already been proved by the simulation
results showed in Figure 4.2 (a), (b) and (c).
However, an excessive proportional gain could also bring instability into the system. F igure
4.2 (c) has not only shown a big proportional gain make the system reach the set point fast,
but also shown sudden decrease happens to the output signal under such a big gain. Therefore,
we need to adjust the other four parameters to balance the effectiveness of proportional gain.
With the Integral Performance Criteria, we found the best set of parameters below:
Bias 0.01642078 Rate limit 100
Gain 5.4744306 Reset time 95.75582
Rate 10
-
53
2. MPC control conclusion
Unlike PID controller, MPC is a type of controller which focuses more on the characteristics
of the controlled system itself. Always, the system model is included in the MPC controller
mathematical model as an integral part. Therefore it is hard to make a standard “MPC unit”
like what has been done to PID in gPROMS. Even so, there are still some tools we can use to
simplify the design work. As the work done in Chapter 4, the system identification tool box
and mpc tool box can help us complete the work much more easily.
For our PHE system, it is not an easy work to formulate it as a state-space model or other
forms that MPC can accept. Thus the non- linear continues model we have constructed should
be transferred into state-space model for the use of MPC controller design. That is why we
need system identification tool box. According to the work done in Chapter 4, the key points
in state-space model re-estimation are estimation method and model order. With different
estimation method and order, we got very different re-estimated process model. It is very
obvious that some of them lose convergence (PHE_P2 and PHE_N2c in Figure 4.10). For all
the other models, no judgement can be made until they have been put into mpc design work.
Most of the MPC controller design work is completed in MPC tool box. The design
procedure can be summarized as follows:
1) Define new mpc controller model by introduce new mpc simulink block.
2) Import both controller model and plant model to the mpc design tool box
3) Set up mpc controller correctly and run the simulation until good controller is obtained
And all the key settings are as below:
Horizon setting
Control interval (time units) 1
Prediction horizon (intervals) 30
Control horizon (intervals) 5
Weight tuning
overall 0.8
Input weight (u1)
Weight 1
Rate weight 0.1
Output weight (y1)
Weight 1×108
-
54
When tuning the MPC controller, weight tuning is a key step. It is very common that the
output doesn’t approach to the set level even if the simulation time is already very long. This
happens especially when the coefficient of the input variable is especially small (like the
plant model for this project). To deal this kind of problem, we need to enlarge the output
weight so that the output will become much more sensitive to the input change. That is we
have a relatively large output weight in the table above.
5.3 Comparison between PID and MPC controller
By now, based on the design work of those two distinct controllers, we can compare them in
some aspects as follows.
1. Control flow sheet
PID MPC
Figure 5.3 PID & MPC control process comparison
Figure 5.3 shows the basic flow sheet of PID and MPC’s control action. From the figure, we
can see that the improvement made by a PID controller is definitely based on the measured
system output or the “error”. For the whole process, the control action has nothing to do with
the pant model. Therefore, it is much easier for it to make the system instable o r overflow.
Instead, for a MPC controller, since the control action is calculated from the current state by
solving the optimization problem in which the plant model is included as constraints, it will
grantee the system run within permitted boundary and keep the system stable. Even further,
the MPC controller can generate control action which also makes the system approach to
Collect system output
Set point- Measured data = error
Send the error to controller to
calculate the control action
Send the control action to the plant to
generate new output approaching to
set point closer
Collect system state
Send the state vector to
controller to calculate the
control action sequence by
solving constrained
optimization problem
Take the first of the control sequence as
the control action and send it to the
plant to generate optimal output
-
55
certain optimal state very easily. The only thing need to do is reformulate the objective
function. But for a PID controller, this kind of mission means an extra work on re-computing
the set point which could be very time-consuming.
2. Work results comparison
Manipulated variable
Figure 5.4 (a) MPC control system input
Figure 5.4 (b) PID control system input
-5
0
5
10
15
20x 10
9
u1
0 50 100 150 200 250 300 350 400 450 500-1
-0.5
0
0.5
1
v@y1
Plant Inputs
Time (sec)
-
56
In this system, the only one manipulated variable (or system input) is the hot stream flow
rate. Figure 5.4 shows the input of the system with PID and MPC controllers
respectively. For the system with PID, we can see that the input signal keeps a decreasing
trend for most of the time. But for the MPC controller, the input variable shows very
significant fluctuation even under the non-disturbance condition. This means that when
the controller is added to the plant, every reset on the system could bring very significant
instability. On the other hand, the wave amplitude reaches a magnitude order of 1012
therefore an extra scaling in needed to eliminate its effect. Thus, for the moment we can
conclude that PID controller did a better job than MPC on adjusting the input signal.
System Output
Figure 4.12 and 4.4(b) gives out the simulation results of system with MPC and PID
controllers respectively. Those simulation results show, for the same PHE plant, it takes
about 37 seconds with PID controller and 400 seconds with MPC controller to make the
system reach the expected steady state. And similarly with manipulated variable, the
output signal of the system with MPC oscillated to a certain extend before the system
settle down, but not very serious. Thus it seems that PID again shows a better behaviour.
Since the MPC has not been added into the system yet, all the comparison are just
preliminary judging. Further comparison work on the system work results will not be
performed until the PHE-MPC system simulation is successfully run in simulink.
Time price comparison
As mentioned before, due to different properties, PID and MPC have different
complexities and the time required for the design work also varied a lot from each other.
For this research work has been done, with the help of gPROMS, PID design work only
costs around one week time and the time is spent mainly on the non- linear optimization
computation. Instead, the MPC control work needs more than three weeks to complete
all the design work, including system identification, MPC tuning and Simulink data
preparation.
In all, we can summarize that at this stage, PID has done a better job than MPC controller in
all aspects. However, since the completed MPC control system (PHE system with MPC
controller flow sheet in Simulink) has not been simulated, a final judgement is impossible to
make and this will be discussed in future work later.
5. 3 Future Work
-
57
5. 3. 1 MPC control system simulation in Simulink environment
Due to some unknown reason, gOSimulink failed to run correctly which leads the MPC
control system cannot be simulated in Simulink. Even worse, the completed work results of
the MPC controller fail to be obtained. Therefore, finding out the causes that has disabled
gOSimulink and going on the simulation are necessary in the future.
1. Simulation under non-disturbance condition
The MPC’s performance under non-disturbance condition is the controller’s basic prosperity
which mainly affects the system’s work results. Set both measured and unmeasured
disturbance to zero, the test can be easily done by simply running the simulink simulation.
Firstly, we should observe the system output and input behaviour without enforced
constraints. By doing this, the controller’s most actual behaviour is lay before us. According
to the performance of single MPC tuning showed in Figure 4.12, both the system input and
output signal could oscillate greatly. What can be done then to stabilize the plant is reset the
controller weight and enlarge the input scaling. Instead, if the system is very insensitivity,
lowering the scaling level of the input signal should be taken into account. Otherwise, we
should replace the plant model with other better ones.
Secondly, the constraints should be added to the controller. This is very likely to cause the
controller stop working for the strict optimal solution cannot found in the feasible region. To
solve this problem, the co
top related