MILITARY TAGS Sample Tags Description Sample Tags Description
Sample Model Description
-
Upload
habbythomasa -
Category
Documents
-
view
219 -
download
0
Transcript of Sample Model Description
-
8/19/2019 Sample Model Description
1/54
-
8/19/2019 Sample Model Description
2/54
1
Simulation of Cascade PID Control and Model Predictive Control
for a gas separation plant by membrane separation
1. Introduction 3
2. About Plant 5
2.1. Overall Structure of Plant and Control System 5
2.2. Gas Separator 7
2.3. About Membrane Separator 8
3. Introducing Mathematical Model 8
3.1. Introduction of Mathematical Model of Permeable Juxtamembrane 9
3.2. Introduction of Mathematical Model for Gas Separator 11
3.3. Mathematical-Based Simulink Model 14
4. System Identification 14
4.1. Introduction 14
4.2. Identification of Inner Loop 15
4.3. Identification of Outer Loop 18
5. Control System Design 28
5.1. Introduction 28
5.2. Inner Control System Design ~ PID Control 30
5.3. Upper Control System Design ~ Cascade PID Control 33
5.4. Outer Control System Design ~ Model Predictive Control 35
5.5. Computing Unit 37
-
8/19/2019 Sample Model Description
3/54
2
6. Multivariable Model Predictive Control in MATLAB[3]
38
6.1. Model Predictive Control (MPC) Toolbox and MPC Blockset 38
6.2. Control Structure of Model Predictive Control 396.3. Operation of Model Predictive Control 41
6.4. Linear Model of Plant 41
6.5. Optimization Problem 42
6.6. Cost Function of Model Predictive Control 44
7. Evaluation of Control System 46
7.1. Introduction 46
7.2. Simulation Model of Cascade PID Control 46
7.3. Simulation Model of Model Predictive Control 46
7.4. Comparison of Cascade PID Control and Model Predictive Control 47
8. Conclusion 51
9. References 52
10. Exemption from Responsibility 52
11. Author 52
-
8/19/2019 Sample Model Description
4/54
3
1. Introduction
This example demonstrates simulation of membrane separation control using
MATLAB
®
&Simulink
®
where a particular gas is extracted from mixed gas consisting of more than2 components. The process assumes oxygen enrichment, air as mixed gas, and oxygen as an
extracted gas. The controlled object (plant) is a gas separator. The gas separator has functionality
which extracts only a particular gas through permeable membrane. This process produces specific
gas as a product. It controls pressure of gas separator so that concentration level of the particular gas
tracks given set points. Plant indicates simulation model rather than actual unit in this document.
Figure 1 shows flow of the control system described in this example. This figure is a typical flow of
control system design. Plant models are modeled mathematically in a plant modeling. The main
reason why plant model is created is that parametric model is identified from plant model, and
control system is designed based on parametric model. Control system design requires either
parametric or non-parametric models. Parametric model is identified from transient response data in
system identification. In control system design, PID control is designed for inner control system, and
cascade PID control system and Model Predictive Control are designed for outer control system
based on the parametric model. Performance evaluation of the designed control system is performed
through simulations in the evaluation of the control system.
Plant Modeling
System Identification
Control Design
PID Control , Cascade PID Control
Model Predictive Control
START
END
Evaluation
Figure 1. Flowchart of Control System Design
A schematic diagram of gas separator is shown in figure 2. Gas separator separates oxygen from air
by utilizing pressure differences. Here, gas separator is assumed to be connected at tri-level. Gas
-
8/19/2019 Sample Model Description
5/54
4
extraction method is permeable membrane method utilizing pressure differences. Gas separator has
permeable membrane in the middle. Permeable membrane is assumed to be more permeable with
oxygen than other gas. The upper portion is where gas is to be flown into, and the lower portion iswhere gas is permeated through permeable membrane which separates them. By creating pressure
differences between the two, oxygen concentration level becomes higher in the lower portion. Gas in
the lower portion flows into the next gas separator. By repeating this operation, oxygen
concentration becomes higher after going through each gas separator. Gas extracted after permeation
from the third gas separator is the final product. Positive pressure differences can be created by
controlling gas inlet flow and outlet flow, which results in variance of pressures in the upper and
lower portions.
Permeation
Emission gas
Material Emission
gas
Material
Part
Agitator
Permeation
Part
Low
Pressure
Material
Part
Agitator
Flow gas
Low
Pressure
Material
Part
Agitator
High Pressure
Permeation
Part
High
Pressure
High
Pressure
(A)
(A)
(A)
(A)
(A)
(A)
(B)
(B)
(B)
(C)
(D)
(C)
(C)
(C)
(C)
(C)
(D)
(D)
(D)
(D)
(D)
Note
Pressure
sensor
Inhalation
Control
Valve
Pump Manipulated
variableswitcher (refer 5.2.)
(A) Density
sensor(B)
(C) Emission gas
Control
Valve
(D)
Material Inhalation
gas
Permeation
Inhalation gas
Low
Pressure
Selectively
permeable
membrane
Selectively
permeable
membrane
Selectively
permeable
membrane
Permeation
Part
Figure 2. Schematic Diagram of Gas Separator
Figure 3 shows structure of the control system. This plant controls concentration and pressure. The
upper control system (outer loop) deals with concentration control, while the lower control system
(inner loop) deals with pressure control. The outer and inner controls work in combination to control.
In concentration control, pressure differences are computed for targets for the material and
permeation parts so that emission gas concentration of permeation part of each gas separator tracks
-
8/19/2019 Sample Model Description
6/54
-
8/19/2019 Sample Model Description
7/54
6
from the outer control system, and allocates them to pressure set point of each PID controller.
YAQ1Oxygen
Density
Inlet Flow GasVolume F1Density XAF1
Gas
Separator1
Outer Controller type1:Cascade PIDtype2:MPC
ComputingUnit
Set point ofOxygen density
Note
Sensor
ControlValve
Pump
U
L
Control valve ofinner control
L
***_SV U
Manipulated variable switcher(Refer 5.2.)
PID
Material
Part
PtW1_ SV
PID
PtW1Pressure CV
PtQ1Pressure CV
U
L
L
L
L
L
L
YAQ2Oxygen
Density
PID
L
L
LL
L
YAQ3OxygenDensity
PID
L
L
L
L
L
L
PID
L
PID
L
PtW2 _SV
U
PtW1 _SV
UU
U
U
GasSeparator2
GasSeparator3
Permeation
Part
Controlled variable ofinner control (Pressure)
Controlled variable ofouter control (Density)
Manipulated variable ofouter control=Set point ofinner control
PtQ3Pressure CV
PtQ2Pressure CV PtW3
Pressure CV
PtW2Pressure CV
Figure 4. Overall Structure of Plant and Control System
-
8/19/2019 Sample Model Description
8/54
7
2.2. Gas Separator
Gas separator assumes as follows (Refer to figure 5).Gas separator shape is rectangular. Gas assumed to be air that flows into inlet line of gas separator.
Permeable membrane is placed in the middle of gas separator to separate gases. Oxygen in the gas
can penetrate permeable membrane, but nitrogen can not. By crating pressure differences between
material and permeation parts, membrane permeation flow of oxygen in the gas occurs from material
to permeation part. Nitrogen is assumed to be significantly less permeable than oxygen. This makes
mol fraction of oxygen of permeation part higher. Agitator makes gas concentration uniform by
agitating inside. There are pressure sensors to material and permeation parts. Control valves are
attached to each inhalation and emission line to control pressures of material and permeation parts.
Flow of inhalation and emission are controlled by control valve opening. When inhalation and
emission flows change, pressures at both material and permeation parts change. To make it simple,
assume that inhalation and emission capabilities are constant. There is a concentration sensor
attached to permeation part to measure concentration of emission gas.
area
z
Selectively
permeable
membrane
PressureSensor
h
Inlet Flow Gas
Inlet Line
area
Density Sensor
Agitator
Control
Valve
Pressure Sensor
Emission
Inhalation
Pump
Material Part
Permeation Part
Inhalation
Emission
Figure 5. Gas Separator
-
8/19/2019 Sample Model Description
9/54
8
Numerical specification of gas separator is described in table 1.
Table 1. Numerical Specification of Gas Separator
Specification Value Unit SymbolCross-section area 5 m2 Area
Permeable membrane cross-section area 5 m2 Area
Cubic volume of material and
permeation parts
25 m3 volume ( = h*area)
Height of material and permeation parts 5 m h
Mass transfer coefficient (oxygen) 0.00001 mol m-2 s-1 ㎩-1
Mass transfer coefficient (nitrogen) 0.000001 mol m-2 s-1 ㎩-1
2.3. About Membrane Separator
Permeable membrane is barrier diffusion that selectively permeates according to material type.
Concentration difference, pressure difference and difference in potential are used to drive mass
transfer (energy). Practical examples included oxygen enrichment, water purification and salt
manufacturing. [1] Among such examples, gas separation is described in table 2.
Table 2. Description of gas separation [1]
Separationmethod
Driving force Permeable material Separationmechanism
Practical exampleResidue material
Gasseparation Concentrationdifference (partial pressuredifference)
Easy-to-permeategaseous molecule Solution-diffusionmechanism,Knudsendiffusion
Oxygen enrichment,Hydrogen separation,Helium separation,Uranium concentration(gas diffusion method)
Difficult-to-permeate gaseous molecule
3. Introducing Mathematical Model
This chapter describes physical environment controlling gas separator, permeable juxtamembrane,
and entire gas separator. Although the actual unit is considered to be quite complex, for the purpose
of modeling, the following assumptions are made:
(1) Gas is ideal gas.
(2) Gas is air. Air consists of two components. Components are component A (oxygen) and
component B (nitrogen).
(3) Mol fraction of component A in the air is 0.2, and that of component B is 0.8.
(4) Ignore friction with gas and container wall and piping, and pressure loss.
(5) Gas is at normal temperature and constant (20 degrees, Celsius).
(6) Gas component distribution within gas separator is uniform.
-
8/19/2019 Sample Model Description
10/54
9
(7) Mass transfer coefficients of component A and B are constant and do not vary depending on
conditions such as temperature and pressure.
(8) No chemical change of gas.(9) Ignore diffusion term of fluid.
(10) Dynamics of gas separator is governed by mass balance equation and ideal gas equation.
(11) There is no back flow of gas between gas separator 1, 2 and 3.
(12) Ignore dynamics within piping.
(13) Gas emission and inhalation solely depend on valve opening, and pump does not have any
impact on them.
(14) Pressure in initial state at time 0 within gas separator equals to air pressure.
(15) Mol fraction in initial state at time 0 within gas separator equals to that of air.
3.1. Introduction of Mathematical Model of Permeable Juxtamembrane
The three governing rules of permeable juxtamembrane are as follows. To make it generalized, they
are formulated as component A and B.
(1) Permeable membrane flow rate of component within gas is proportionate to partial pressure
difference of components inside and outside of membrane.
(2) Positive permeable membrane flow rate occurs from higher partial pressure side to lower side.
(3) Component A is easy to penetrate the permeable membrane, whereas component B is not.
Where, permeable membrane flow rates NA of gas component A, and NB of gas component B are
described in the following formula[1] .
)()( ,, AitQ AitW mAi AQi AW mA A yP xPK PPK N
)()( ,, BitQ BitW mAi BQi BW mB B yP xPK PPK N
K mA >> K mB
-
8/19/2019 Sample Model Description
11/54
-
8/19/2019 Sample Model Description
12/54
-
8/19/2019 Sample Model Description
13/54
12
Q: Emission gas quantity from the permeation part per unit time [mol s-1]
Area: membrane area [m2]
t: time [s]P: pressure [Pa]
R: Gas constant 8.314[J mol-1 K -1]
V: Volume in the material part (permeation part) [m3]
[Meaning of subscript]
|t=0: Value at time t=0
tW: All gases in the material part
tQ: All gases in the permeation part
AW: Gas component A in the material part
AQ: Gas component A in the permeation part
(Material balance equation of all gases in the material part)
Changes in number of mol of all gases in the material part per unit time can be expressed by the
following equation.
Area N Area N W F dt
dN B A
tW **
Considering integral from time 0 to t, it can be expressed by the following equation. This is the
number of mol in the material part at time t.
00)**( t tW
t
B At t tW N dt Area N Area N W F N
(Material balance equation of gas component A in the material part)
Changes in number of mol of gas component A in the material part per unit time can be expressed by
the following equation.
Area N X W X F dt
dN A AW AF
AW
Considering integral from time 0 to t, it can be expressed by the following equation. This is the
number of mol of gas component A in the material part at time t.
00
)( t AW t
A AW AF t t AW N dt Area N X W X F N
(Pressure of all gases in the material part)
It is assumed that the ideal gas equation is approved.
P=nRT/V , instead of PV =nRT
V T R N P tW tW /
-
8/19/2019 Sample Model Description
14/54
13
(Mol fraction in the material part)
W AW AW N N X /
(Material balance equation of all gases in the permeation part)Change of mol number of all gases in the permeation part per unit time can be expressed by the
following equation.
Q Area N Area N dt
dN B A
tQ **
Considering integral from time 0 to t, it can be expressed by the following equation. This is the
number of mol in the permeation part at time t.
00)**( t tQ
t
B At t tQ N dt Q Area N Area N N
(Material balance equation of gas component A in the permeation part)
This can be expressed by the following equation in the same way:
AQ A
AQY Q Area N
dt
dN
00
)( t AQt
AQ At t AQ N dt Y Q Area N N
(Pressure of all gases in the permeation part)
It is assumed that the ideal gas equation is approved.
P=nRT/V , instead of PV =nRT
V T R N P tQtQ /
(Mol fraction in the permeation part)
W AQ AQ N N X /
-
8/19/2019 Sample Model Description
15/54
14
3.3. Mathematical-Based Simulink Model
The Simulink model in figure 8 can be obtained by expressing equation (3-1) to (3-15) in block
diagram in Simulink.
Figure 8. Gas separator model in Simulink (gas_dyn_mpc.mdl)
4. System Identification
4.1. Introduction
In designing control system, parametric model or non-parametric model of controlled object (plant)
is necessary. Then, parametric model is acquired by employing system identification method to
Simulink model. As control system design requires both outer and inner loops, system identification
is performed for outer and inner loops. Some of the purposes of model acquisition by system
identification of each loop are described in table 3 (refer to figure 3 for outer and inner loops).
Table 3. Purposes of model acquisition by system identification of the outer and inner loops
Purpose
Inner loop To construct inner loop which can track rapidly change of pressure set points that
the outer loop outputs.
Outer loop To improve precision of model used by outer loop in order to enhance control
performance of the outer loop.
-
8/19/2019 Sample Model Description
16/54
-
8/19/2019 Sample Model Description
17/54
16
Figure 10 shows model used for system identification of the inner loop and PID control parameter
tuning.
Signal Builder
Block
Gas Separator1 Gas Separator2 Gas Separator3
Permeation partPID controller1
Material Part
PID controller1
Material Part
PID controller2
Permeation part
PID controller2
Material Part
PID controller3
Permeation part
PID controller3
Data storing part Data display part
Figure 10. Model used in system identification of the inner loop and tuning of PID control parameter
(gas_dynamics3_ident.mdl)
Simulink (R) Control DesignTM is used for linearization in Simulink. It is possible to specify input and
output points and linearize input and output points in the Simulink Control Design. Although the
inner loop is closed loop structure in figure 10, linearization as a closed loop is possible without
disconnecting closed loop structure (refer to figure 11). GUI of the Simulink Control Design is
shown in figure 11. Linearization results are displayed on GUI such as step response, bode diagram,
impulse response, Nichols diagram, Nyquist diagram, pole-zero map and singular value map and so
on. Figure 11 shows step response in parallel before and after linearization.
-
8/19/2019 Sample Model Description
18/54
17
PlantPID
Controller
+
Set
Value
Input point
Simplify
It means to cut closed loop.
GUI of the Simulink Control Design
Step response of a modelwhich is applied model orderreduction by pole-zero
cancellation with linearizedtransfer function(Green)
Step response oflinearized transfer function
(Blue)
Example.
Permeation part of Gas separator2
Output point
Input point Output point
Figure 11. Simulink Control Design
Based on the linearization results from the Simulink Control Design, it is assumed that model
response between input and output points that are order reduced in all loops can be linear
approximation to the some hundredth seconds order, it is considered to be integrated system for
simplicity. Linearized transfer functions of all inner loops are summarized in table 4.
Table 4. Transfer function with input and output points linearized
Input and output points of the inner loop Transfer Function
Gas separator 1 material part pressure(y) material part valve opening (u) -0.0008/s
Gas separator 1 permeation part pressure (y) permeation part valve opening
(u)
-0.0009/s
Gas separator 2 material part pressure (y) material part valve opening (u) -0.0009/s
Gas separator 2 permeation part pressure (y) permeation part valve opening
(u)
-0.0008/s
Gas separator 3 material part pressure(y) material part valve opening (u) -0.0008/s
Gas separator 3 permeation part pressure(y) permeation part valve opening
(u)
-0.0008/s
-
8/19/2019 Sample Model Description
19/54
18
4.3. Identification of Outer Loop
System identification in the outer loop models impact that pressure differences between the material
and permeation parts of each gas separator unit 1, 2 and 3 have on oxygen concentration in the permeation part of gas separator 1, 2 and 3. Open loop response between control quantity 1, 2 and 3,
and manipulated variable 1, 2 and 3 in figure 12 are identified. Although set point of pressure
tracking control of material and permeation parts of each plant is performed for the inner loop, the
inner loop shows very high speed set point tracking compared to outer loop dynamics, therefore it is
assumed to be included in low speed dynamics of the outer loop.
Plant
(including inner loop)
Outer
control
systemGas separator 2
Set point of pressuredifference between
material part
and permeation part
Gas separator 3
Oxygen concentration
of permeation part
Gas separator 2Oxygen concentration
of permeation part
Gas separator 1
Oxygen concentrationof permeation part
MV1
MV2
MV3
DV1
DV2Inlet flow gasdensity
CV1
CV2
CV3
MV: Manipulated VariableCV: Controlled Variable
DV: Disturbance
Gas separator 1
Set point of pressuredifference betweenmaterial part
and permeation part
Gas separator 3
Set point of pressuredifference between
material partand permeation part
Inlet flow gas
quantity
Figure 12. Manipulated variable, controlled variable, and disturbance of outer loop
Simulate the model in figure 13, and log impact of changes of each manipulated variable on
responses of each controlled variable as time series data. Extract necessary parts from time series
data, and identify extracted data.
-
8/19/2019 Sample Model Description
20/54
19
Signal BuilderBlock
Gas Separator1 Gas Separator2 Gas Separator3
Permeation partPID controller1
Material PartPID controller1
Material PartPID controller2
Permeation part
PID controller2
Material PartPID controller3
Permeation part
PID controller3
Data storing part
Data display part
Figure 13. Simulink model for outer system identification (gas_dynamics3_mpc_ident.mdl)
Major parts of this model have no significant differences from the model in figure 10, except for the
contents of the Signal Builder Block which create signal for system identification. The settings of the
Signal Builder Block in figure 13 are shown in figure 14.
-
8/19/2019 Sample Model Description
21/54
20
Gas separator2
Set point of pressurein material part
Gas separator2Set point of pressure
in permeation part
Gas separator3Set point of pressurein material part
Gas separator3Set point of pressurein permeation part
Inlet flow gasquantity
Inlet flow gasdensity
Gas separator1Set point of pressurein permeation part
Gas separator1Set point of pressurein material part
MV2
MV3
DV1
DV2
MV1
NameSignal
MV1
MV2
MV3
DV1
DV2
Figure 14. Setup Signal for the Signal Builder Block
Table 5 describes what symbols used in Simulink model of this example mean, including figure 14.
-
8/19/2019 Sample Model Description
22/54
21
Table 5. Meaning of symbols in Simulink model
Name Contents Symbol
Manipulatedvariable 1 (outer)
Pressure set point in the material part of plant 1 PTW1_SVPressure set point in the permeation part of plant 1 PTQ1_SV
Manipulated
variable 2 (outer)
Pressure set point in the material part of plant 2 PTW2_SV
Pressure set point in the permeation part of plant 2 PTQ2_SV
Manipulated
variable 3 (outer)
Pressure set point in the material part of plant 3 PTW3_SV
Pressure set point in the permeation part of plant 3 PTQ3_SV
Disturbance Gas flow quantity of plant 1 F1
Oxygen concentration mol fraction of gas flow quantity
of plant 1
XAF1
Controlled
variable 1 (outer)
Oxygen concentration mol fraction in the permeation
part of plant 1
YAQ1
Controlled
variable 2 (outer)
Oxygen concentration mol fraction in the permeation
part of plant 2
YAQ2
Controlled
variable 3 (outer)
Oxygen concentration mol fraction in the permeation
part of plant 3
YAQ3
Set point (outer) Oxygen concentration mol fraction in the permeation
part of plant 1
YAQ1_SV
Oxygen concentration mol fraction in the permeation
part of plant 2
YAQ2_SV
Oxygen concentration mol fraction in the permeation
part of plant 3
YAQ3_SV
Figure 15 show each manipulated variable and open loop response of each controlled variable
obtained from simulating the model in figure 13.
-
8/19/2019 Sample Model Description
23/54
22
MV1
MV2
MV3
DV1
DV2
CV1
CV3
CV2
Oxygen
density
Pressure
difference
Impact of MV1 Impact of MV2 Impact o f MV3 Impact of DV2 Impact of DV1
Figure 15. Open loop response to each manipulated variable
Figure 16 shows system identification flow of the outer control system using this simulation data.
Items in the flow are described below.
(1) Sampling of simulation data
In this example, system identification is performed from data acquired in simulation not real plant,
the right path is relevant. When acquiring real plant data, the left path is relevant.
(2) Extraction of data
Each manipulated value is considered as step input signal. Extract data should cover proximity of
steady state so that plant transient response is adequately included.
(3) Trimming of abnormal data
Remove essentially impossible data due to noise and so on, so that model should not be impacted by
abnormal data. Abnormal data does not exist such as noise impact in this simulation.
(4) Removal of bias (direct-current component) from data
Remove low frequency disturbance such as bias (direct-current component) which is undesirable for
identification.
-
8/19/2019 Sample Model Description
24/54
23
Removal
of bias
4. Removal of bias(direct-current component)
from data
5. System Identification
START
END
Ex. Transient response by step input
Steady state
3. Trimming of
abnormal data
1.Acquiring
real plat data1.Sampling ofsimulation data
2. Extraction of data
Figure 16. System identification flow of the outer control system
(5) System Identification
System Identification Toolbox and Simulink Design Optimization are MATLAB&Simulink tools
used for system identification. It is considered that model is approximated by transfer function of
first order delay + dead time system from step input response characteristics in figure 15.
)exp(1
)( LsTs
K sG
K: gain, T: time constant, L: dead time
or
Transfer function of second order delay system
22
2
2)(
nn
n
ss
K sG
K: gain, ζ: damping ratio, ωn: eigen frequency
Model identification is possible using either tool, method using the Simulink Design Optimization is
introduced in this guide. Simulink Design Optimization estimates parameter within Simulink model
based on optimization. It is necessary to provide appropriate initial value to estimation value in the
-
8/19/2019 Sample Model Description
25/54
24
same way as general optimization in order to derive highly precise estimate with less number of
estimates.
In this simulation, non-linearity of model, that has time constant varying a few hundred times invertical direction of step input, can be observed from figure 15, and although
Upward time constant of step input < Downward time constant of step input
applies, derive upward model of step input.
For example, from simulation results, relationship between manipulated value 2 and control value 2
is shown in figure 17. From figure 17, transfer function is considered to be approximated as first
order delay + dead time system. Initial values of each parameter are gain=0.25(=magnitude of
manipulated value 2(0.1)/magnitude of manipulated value 2(0.4)), time constant=250, and dead time
L=30.
Figure 17. Step response of manipulated variable 2 and controlled variable 2
(1) and (2) in figure 18 are Simulink models used for parameter estimation. (3) in figure 19 is GUI
for the Simulink (R) Design OptimizationTM. (4) is graph of evaluation function with GUI (square sum
error). X-axis denotes number of estimation, and y-axis denotes value of evaluation function. (5) is a
graph indicating calculated values from models of estimation data and estimation parameter with
GUI. (4) and (5) are updated dynamically every time estimation is performed. Estimation finishes
when conditions set as optimization option is satisfied. Conditions include tolerance of evaluation
function, maximum estimation number, etc.
-
8/19/2019 Sample Model Description
26/54
25
(1)
first order delay
+dead time system
(2)
Second order delay
system
Figure 18. Models used for first order delay + dead time system, parameter estimation of second
order delay
-
8/19/2019 Sample Model Description
27/54
26
Cost Function
Measured
data (gray)
Simulated
data (blue)
Measured and Simulated
GUI of Simulink Parameter Estimation
Iterations
(3)
(4)
(5)
Figure 19. Simulink Design Optimization
If 0
-
8/19/2019 Sample Model Description
28/54
27
n
2
1
1
Ts
n
T
1
Second order delay system
First order delay system
Figure 20. Relationship between first order delay system and second order delay system (0 ζ 1)
(Figure in [4] is partially modified.
1.0
222
2
n
nn
n
ss
Figure 21. Graph of second order delay system (0 ζ 2)
-
8/19/2019 Sample Model Description
29/54
28
From the above, transfer function matrix of the derived model is shown in (4-3). Step response of the
model is shown in figure 22.
CV1
CV3
CV2
MV1 MV2 MV3
Figure 22. Step Response
5. Control System Design
5.1. Introduction
This example outer and inner control systems work together. As this is multi-inputs and
multi-outputs, control system is multi-variable control. Outer and inner control systems are designed
separately in control system design. Cascade PID control and multi-variable Model Predictive
)(3
)(2
)(1
1+234.2s
0.2884
10*1.23+s0.0071+s
10*3.641
10*3.4489+0.0032ss
10*9.2372
01+205.5s
0.2462
1+736.7s
0.2348
001+s313.2
0.182
)(3
)(2
)(1
)41(
5-2
6-
6-2
7-
)8.43(
)6.3(
sU
sU
sU
e
e
e
sY
sY
sY
s
s
s
-
8/19/2019 Sample Model Description
30/54
29
Control is designed and compared as multi-variable control.
Figure 23 shows why multi-variables Model Predictive Control is adopted. Model Predictive Control
is control rules that are theoretically valid for plant with long time constant and dead time. PIDcontrol design for multi-input multi-output system generally is becoming more complex. Model
Predictive Control is a control rules that optimized control is possible where stress put on plant is
treated as constraints.
The gas separators in the
back and forth influenceeach other because it
connects.
incidenceInterference
It is not an optimizingcontrol of the entire plant.
The stress given to theplant is not evaluated
enough.
There is nonorm of
control.
Optimality
Cascade
PID Control
Description
Structure of
control
A control system is closed
in a gas separator.
It only controls Set Value
tracking.
EpexegesisItem
Improvement of
tracking Set Value
Entire optimization of
multi variable
control system
Improvement itemby MPC installation
Expecting effect
by MPC installation
Running cost reductionStabilization of control
Reduction of stress to plant
Figure 23. Why multivariable Model Predictive Control is adopted
-
8/19/2019 Sample Model Description
31/54
30
Table 6 summarizes outer and inner control systems.
Table 6. Outer control system and inner control system
Control method Function Set point, controlled variable, manipulated
variable
Outer control
system
Cascade PID control
(position type)
To track set point of oxygen
concentration in the
permeation part of each gas
separator.
Set point: oxygen concentration in emission gas
in the permeation part
Controlled variable: oxygen concentration in
emission gas in the permeation part
Manipulated variable: pressure difference
between the material and permeation parts
Multivariable Model
Predictive Control
Same as above Same as above
Inner control
system
PID control (position
type)
To control inhalation and
emission control valve
opening and follow set points
of oxygen concentration in
the material and permeation
parts of each gas separator.
Set point: pressures in the material and
permeation parts of gas separator
Controlled variable: pressures in the material and
permeation parts of gas separator
Manipulated variable: inhalation (emission)
5.2. Inner Control System Design ~ PID Control
Inner control system is assumed to be loop control by PID controller. Manipulated variable switcher
switches between emission and inhalation, depending on sign of manipulated variables, W and Q
that PID controllers of loop1 and loop2 output.
The function of manipulated variable switcher is assumed as follows.
In the loop 1, total pressure, PtW of pressure sensor is treated as CV (Controlled Variable) , and W
(emission gas flow in the material part) as MV (Manipulated variable). If W is positive, emission gas
value is positive, and emission value control valve is controlled. Inhalation control valve then is fully
closed. If W is negative, emission gas value is negative, and inhalation value control valve is
controlled. Emission value control valve then is fully closed. To match sign of inhalation value and
valve opening, if W is negative, it is absolute value of W.
In the loop 2, total pressure, PtQ of pressure sensor is treated as CV (Controlled Variable), Q
(emission gas flow in the permeation part) as MV(manipulated variable). If Q is positive, emission
gas value is positive, and emission value control valve is controlled. Inhalation value control valve
then is fully closed. If Q is negative, emission gas value is negative, and inhalation value control
valve is controlled. Emission value control valve then is fully closed. Switching between emission
and inhalation is not modeled in Simulink model.
-
8/19/2019 Sample Model Description
32/54
31
In the loop 1, when W (emission gas flow in the material part) increases, total pressure, P tW
decreases, then proportional gain of PID controller is negative. In the loop 2, when Q (emission gas
flow in the permeation part) increases, total pressure, PtQ decreases, then proportional gain ofcontroller is negative. In the loop 1 and 2, set points are supplied by the outer control system.
F: Inlet gas
quantity [mol s-1]
W: Emission gasquantity of
material part [mol s-1]
Material part
Permeation part
Gas separator
Inhalation
control valve
Emissioncontrol
valve
Total Pressure
PtQ
Pressure
Sensor
Total PressurePtW
loop1
loop2
PIDcontroller Outer Control
System
Set point2
Emission
control
valve
Density
Sensor
Sign of MV
of PID Controller
0
1
Selectively
permeable membrane
Setpoint
0
1PID
controller
Absolute ABS
Manipulated
Variable
Switcher
ABS
Pressure
Sensor
Set point1
Inhalationcontrol valve
Manipulated
Variable
Switcher Sign of MVof PID Controller
Q: Emission gasquantity of
permeation part [mol s-1]
Absolute
Figure 24. PID controller attached to gas separator
In this model, structure of PID control adds rate limits, upper and lower limits to outputs
(manipulated variable) of basic position PID controller (see figure 25). Structure of PID controller is
common for both outer loop and inner loop. Upper and lower limits, and rate limits of all PID
controller are shown in table 7.
Table 7. Upper and lower limits and upper and lower rate limits of PID Controller
Parameter Name Value [%]
MV upper limit 20
MV lower limit -20
MV upper rate limit 10
MV lower rate limit -10
-
8/19/2019 Sample Model Description
33/54
32
PID Controller Plant
Inside of subsystem
ProportionalGain
Integral Time
Derivative
Time AppropriateDifferential
Operator
Integrator
Upper andlower limit
Rate
limiter
Figure 25. Structure of PID controller
PID control parameter is derived using Ziegler-Nichols Method. An example of PID control
parameter using Ziegler-Nichols Method is displayed in table 8. Additionally, results applying
tuning visually from simulation results are shown in table 9.
Table 8. Example of PID control parameters using Ziegler-Nichols Method [2]
Control law Proportional gain Kp Integral time Ti Derivative time Td
PI Control 0.45*(gain of stability limit) 0.833*(frequency of
stability limit)
Table 9. PID Control Parameter of inner loop
Input and output points Transfer
Function
Proportional
gain
Integral time Derivative
time
Gas separator 1 material part
pressure (y) material part valve
opening (u)
-0.0008/s -20 67
Gas Separator 1 permeation part
pressure (y) permeation part
valve opening (u)
-0.0009/s -17 67
Gas Separator 2 material part
pressure (y) material part valve
opening (u)
-0.0009/s -20 67
Gas Separator 2 pressure in the
permeation part (y) valve
-0.0008/s -20 67
-
8/19/2019 Sample Model Description
34/54
33
opening in the permeation part (u)
Gas Separator 3 material part (y)
material part valve opening (u)
-0.0008/s -30 67
Gas Separator 3 permeation part
pressure (y) permeation part
valve opening (u)
-0.0008/s -30 67
5.3. Upper Control System Design ~ Cascade PID Control
When designing multiple loop control using multi-variable control, it is important to determine
appropriately which manipulated variables control which controlled variables, and its combinations.
In this example, based on a basic theory that one manipulated variable controls one controlled
variable, manipulated variable 1 controlled variable 1, manipulated variable 2 controlled variable
2, manipulated variable 3 controlled variable 3.
For simplicity, where equation (4-3) of the outer system model is equation (5-1), Y2(s) is found to
be interfered by U1(s), and Y3(s) is interfered by U1(s) and U2(s). Decoupling can be used for
cancelling interferences, but in this example, each gas separator controls independently each PID
controller (outer) does not have decoupling functionality to avoid mutual interference.
Figure 26 shows structure of cascade PID control. PID controller (outer) and PID controller (inner)
are double structure. The outer loop behavior is as follows:
PID controller (outer) outputs pressure difference SV (Set point) as manipulated variable so that
emission concentration in the permeation part of each gas separator is controlled to follows SV(Set
point). Computing unit(refer 5.5.) assigns pressure difference SV(Set point) that PID controller
(outer) outputs as SV(Set point) of pressure for the material and permeation parts of gas separator.
The inner loop behavior:
The inner loop controls emission and inhalation value to control to follow pressure SV (Set point) of
pressure provided from Computing Unit.
)(3
)(2)(1
)()()(
0)((s)G00)(
)(3
)(2)(1
333231
2221
11
sU
sU sU
sGsGsG
sGsG
sY
sY sY
-
8/19/2019 Sample Model Description
35/54
34
Outer loop
plant
PID controller
(inner)+
1/2
+
1.3
+
+
1.0+ +
+1/2
+
1.3
+
+
1.0+
+
+1/2
+
1.3
+
+
1.0
Base pressure
[atm]
++
SV of pressure
difference between
material part andpermeation part
In gas separator3
SV of pressure
in permeation part of
gas separator3
Computing unit
Inner loop
Y1
Y2
Y3
U1
U2
U3
Manipulatedvariable
switcher
PID controller
(inner)
PID controller
(inner)
PID controller (inner)
PID controller
(inner)
PID controller
(inner)
PID controller (outer)
+
PID controller
(outer)
PID controller
(outer)
SV of density
in gas separator3
Manipulatedvariable
switcher
Manipulated
variable
switcher
Manipulatedvariableswitcher
Manipulated
variableswitcher
Manipulatedvariable
switcher
Base pressure
[atm]
Base pressure[atm]
Base pressure[atm]
Base pressure[atm]
Base pressure
[atm]
SV of density
in gas separator2
SV of density
in gas separator1
SV: Set point
CV: Controlled Variable
CV of density
in permeation
part of gas separator3
CV of density
in permeationpart of gas separator2
CV of density
in permeationpart of gas separator1
SV of pressure
difference betweenmaterial part and
permeation partIn gas separator2
SV of pressure
difference between
material part andpermeation part
In gas separator1
SV of pressurein permeation part ofgas separator2
SV of pressurein permeation part of
gas separator1
SV of pressurein material part of
gas separator1
SV of pressure
in material part ofgas separator2
SV of pressure
in material part ofgas separator3
Figure 26. Structure of Cascade PID Control
PID parameters of cascade PID controller are derived from CHR method.
If plant can be expressed as transfer function of first order delay + dead time system, an example of
CHR method parameters are shown in table10.
)exp(1
)( LsTs
K sG
K: gain, T time constant, L dead time
Table 10. Parameter examples of CHR method [2]
External input Overshoot Control law Proportional
gain Kp
Integral
time Ti
Derivative
time Td
Set point change None PI Control 0.35T/KL 1.17T
-
8/19/2019 Sample Model Description
36/54
35
The results obtained from applying CHR method to transfer function of the outer system are shown
in table 11.
Table 11. PID parameter of cascade PID control (host)
PID Parameter
Input and output points Transfer Function Proportional
gain
Integral
time
Derivative
time
Gas Separator
manipulated value 1 (y)
control value 1 (u)
)6.3exp(12.313
182.0s
s
167.3 366.4
Gas Separatormanipulated value 2 (y)
control value 2 (u)
)8.43exp(15.205
2462.0 ss
6.67 240.4
Gas Separator
manipulated value 3 (y)
control value 3 (u)
)41exp(12.234
2884.0s
s
6.93 274.0
Upper and lower limits, and rate limits of all cascade PID controller (outer) are shown in table 12.
Table 12. Upper and lower limits, and upper and lower rate limits
Value
MV upper limit 1
MV lower limit 0
MV upper rate limit 0.05
MV lower rate limit -0.05
5.4. Outer Control System Design ~ Model Predictive Control
Detailed structure of Model Predictive Control system is shown in figure 27. What differs from
cascade PID control is that cascade PID control is single-input single-output, and Model Predictive
Control system is multi-inputs and multi-outputs.
-
8/19/2019 Sample Model Description
37/54
36
plant
+1/2
+
1.3
+
+
1.0+ +
+1/2
+
1.3
+
+
1.0+
+
+1/2
+
1.3
+
+
1.0+
+
Y1
Y2
Y3
U1
U2
U3
SV of density
in each
gas separators
SV of pressure
in permeation part of
gas separator3
SV of pressure
in permeation part ofgas separator2
SV of pressure
in permeation part of
gas separator1
SV of pressure
in material part ofgas separator1
SV of pressure
in material part ofgas separator2
SV of pressurein material part of
gas separator3
Manipulated
variableswitcher
Manipulated
variable
switcher
Manipulatedvariable
switcher
Manipulated
variableswitcher
Manipulatedvariable
switcher
Manipulated
variable
switcher
CV of densityin permeation
part of gas s eparator3
CV of density
in permeation
part of gas separator2
CV of density
in permeationpart of gas separator1
SV of pressuredifference between
material part and
permeation partIn gas separator3
SV of pressure
difference between
material part andpermeation part
In gas separator2
SV of pressure
difference between
material part andpermeation part
In gas separator1
ModelPredictive
Controller
Base pressure
[atm]
Base pressure
[atm]
Base pressure
[atm]
Base pressure[atm]
Base pressure[atm]
Base pressure
[atm]
Computing unit
Outer loop
Inner loop
PID controller (inner)
PID controller
(inner)
PID controller
(inner)
PID controller (inner)
PID controller
(inner)
PID controller
(inner)
SV: Set point
CV: Controlled Variable
Figure 27. Control structure of Model Predictive Control (Outer system) and PID control (Inner
system)
Design parameters for Model Predictive Control system and its design basis are shown in table 13.
See chapter 6 for details of Model Predictive Control in MATLAB.
Table 13. Design parameters for Model Predictive Control system and its design basis
Time related parameter Value Design basis
Control interval 60 [seconds] As time constant of plant ranges from approximately a
few hundred to kilo seconds order, prediction horizon
is set at 1200 seconds to include generally plant s
dynamics. Control interval is set at 60 seconds as this
does not require high speed control.
Prediction horizon 20 [samples] For calculation speed-up, control horizon is set at half
of prediction horizon.Control horizon 10 [samples]
-
8/19/2019 Sample Model Description
38/54
37
Variable
type
Variable Weight Rate
Weight
Design basis
Manipul
ated
variables
U12 1 1 To make significantly bigger weight factor of
controlled variables than that of manipulated
variables. This evaluates highly set point tracking
of controlled variables within the evaluation
function. Manipulated variable can move as long
as it satisfies set point tracking. This calculates Δu
vector that places more importance on set point
tracking than manipulated variable stability.
Furthermore, place weight in set value tracking so
that set point of Y3 (gas concentration of final
product). Apply more loose constraints for
intermediate product (Y2) compared with Y3.
Intermediate product (Y1) is not required to track
setpoint.
U34 1 1
U56 1 1
Output
variables
(Controlled
Variables)
YAQ1 10
YAQ2 1000
YAQ3 10000
Variable type Variable Constraints Design basis
Manipulated
variables
U12 0
-
8/19/2019 Sample Model Description
39/54
38
manipulated variable is added to the base pressure in the material part, and half of the manipulated
variable is subtracted from the base pressure in the permeation part. The base pressure in the
material part is 1.3[atm], and 1.0[atm] in the permeation part. This is because it assumes the casewhere outer control system is stopped and control is performed only by the inner control system. For
example, they are transient state such as launching and stopping plant, and malfunction of the outer
control system and maintenance.
Functionalities of Computing Unit are the same for cascade PID control and Model Predictive
Control.
Model Predictive
Controller output
(Manipulated Value)U
Gas separator
Permeation
part
Material partBase pressure1.3[atm]
++
Base pressure
1.0[atm]+
½ U
Figure 28. Functions of Computing Unit
6. Multivariable Model Predictive Control in MATLAB[3] 6.1. Model Predictive Control (MPC) Toolbox and MPC Blockset
Model Predictive Control (MPC) Toolbox is a MATLAB product which is used for design and
simulation of Model Predictive Control system. In order to simulate the designed Model Predictive
Control system use the MPC Controller Block provide in this tool. The MPC toolbox provides
function library for command line and mpctool for dedicated GUI. Model Predictive Control
designed in mpctool is MPC object form, and can be treated on MATLAB Workspace. Simulink and
the MPC Toolbox can be seamlessly used by specifying MPC object in the MPC Controller Block.
Examples of Functionalities of mpctool are described in figure 29.
-
8/19/2019 Sample Model Description
40/54
39
(1) in figure 29 sets control structure of Model Predictive Control system to be designed. (2) sets
inequality constraints of Model Predictive Control system to be designed. There are upper and lower
limits and rate limit constraints of manipulated variables, and upper and lower limits of controlledvalriables in inequality constraints. (3) sets control interval of Model Predictive Control system to be
designed, prediction horizon, control horizon and so on. (4) sets weight factor within the cost
function of Model Predictive Control system to be designed.
Model Predictive Control system described in chapter 6 refers to Model Predictive Control (MPC)
Toolbox.
Controlled
Variables
Manipulated
Variables
MPC Structure Overview
Model and Horizons
Constraints
Weight Tuning
(1)
(2)
(3) (4)
Figure 29. Example of various GUIs for designing mpctool
6.2. Control Structure of Model Predictive Control
Control structure of Model Predictive Control is shown in Fig30. The structure is the same in SISO
(single-input single-output) and MIMO (multi-input multi output). Model Predictive Control is a
kind of feedback control.
-
8/19/2019 Sample Model Description
41/54
40
Figure 30. Block Diagram of a SISO Model Predictive Control Toolbox Application [3]
Description of symbols in Figure 30 is shown in Table14.
Table 14. Description of Model Predictive Control Toolbox Signals [3]
Symbol Description
d Unmeasured disturbance. Unknown but for its effect on the plant output. The controller
provides feedback compensation for such disturbances.
r Setpoint (or reference). The target value for the output.
u Manipulated variable (or actuator). The signal the controller adjusts in order to achieve
its objectives.
v Measured disturbance (optional). The controller provides feedforward compensation for
such disturbances as they occur to minimize their impact on the output.
y Output (or controlled variable). The signal to be held at the setpoint. This is the true
value, uncorrupted by measurement noise.
y Measured output. Used to estimate the true value, y .
z Measurement noise. Represents electrical noise, sampling errors, drifting calibration,
and other effects that impair measurement precision and accuracy.
-
8/19/2019 Sample Model Description
42/54
41
6.3. Operation of Model Predictive Control
Dynamic optimization is performed in Model Predictive Control. (1) and (2) as follows are repeated
in dynamic optimization procedure.(1) Prediction future controlled variable of the plant as many as p pieces of prediction horizon, p for
every control interval.
(2) Solving manipulated variable rate vector )k 1(),( mk uk k u K that minimizes quadratic
cost function described by manipulated variable rate vector )k 1(),( pk uk k u K ,
manipulated variable vector )k 1(),( pk uk k u K and controlled variable vector )k 1(),( pk yk k y K within the constraints. The procedures for dynamic optimization is shown
to the left in figure 31. To the right, prediction horizon and control horizon are described.
present(k)
,M
Prediction future controlled variable of the plant
as many as p pieces of prediction horizon,
p for every control interval.
Solving manipulated variable rate vector
that minimizes quadratic cost functiondescribed by manipulated variable rate vector,
manipulated variable vector and controlled
variable vector within the constraints.
Set u(k) to plant
k=k+1 Shift sample time )
Procedure of MPC
repeat
Dynamic optimization
Figure 31. Behavior overview of Model Predictive Control [3]
6.4. Linear Model of Plant
The linear model used in Model Predictive Control Toolbox for prediction and optimization is
depicted in Figure 32.Inputs of the model are manipulated variables and observable and
non-observable disturbances.
-
8/19/2019 Sample Model Description
43/54
42
Figure 32. Linear Model of a Plant used by MPC Toolbox [3]
The model of the plant is a linear time-invariant system described by the equations (6-1).
)16(
1
k u Dk d Dk v Dk xC k yk d Dk v Dk xC k y
k d Bk v Bk u Bk Axk x
uuduvuuu
dmvmmm
d vu
where x(k ) is the nx-dimensional state vector of the plant, u(k ) is the nu-dimensional vector of
manipulated variables (MV), i.e., the command inputs, v(k ) is the nv-dimensional vector of measured
disturbances (MD), d (k ) is the nd -dimensional vector of unmeasured disturbances (UD) entering the
plant, ym(k ) is the vector of measured outputs (MO), and yu(k ) is the vector of unmeasured outputs
(UO). The overall output vector y(k ) collects ym(k ) and yu(k ).
6.5. Optimization Problem
Assume that the estimates of x(k), xd(k) are available at time k. Model Predictive Control
action at time k is obtained by solving the optimization problem.
where the subscript “( )j” denotes the j-th component of a vector, “(k+i|k)” denotes the value
predicted for time k+i based on the information available at time k; r(k) is the current sample of the
output reference, subject to with respect to the sequence of input increments
{Δu(k|k),…,Δu(m-1+k|k)} and to the slack variable ε, and by setting u(k)=u(k-1)+Δu(k|k)*, where
Δu(k|k)* is the first element of the optimal sequence.
-
8/19/2019 Sample Model Description
44/54
43
2
1
2arg,
1
2,
1
0 1
2,1 11,
min1,...,
uu
y
n
j
et jt j
u
ji
n
j j
u
ji
p
i
n
j
j j
y
ji
ik uk ik uk ik u
ik r k ik yk k muk k u
(6-2)
where the subscript “( )j” denotes the j-th component of a vector, “(k+i|k)”
denotes the value predicted for time k+i based on the information available at
time k; r(k) is the current sample of the output reference, subject to
1,...,00
1,...,,0 1max
maxmin
min
maxmaxminmin
maxmaxminmin
pi
pmhk hk u
iV i yk ik yiV i y
iV iuk ik uiV iu
iV iuk ik uiV iu
j
y
j j j
y
j j
u
j j j
u
j j
u
j j j
u
j j
(6-3)
with respect to the sequence of input increments {Δu(k |k ),…,Δu(m-1+k |k )} and to the slack variable
ε, and by setting u(k )=u(k -1)+Δu(k |k )*, where Δu(k |k )* is the first element of the optimal sequence.
When the reference r is not known in advance, the current reference r (k ) is used over the whole
prediction horizon, namely r (k +i+1)=r (k ) in Equation (6-3).
ji,y
ji,u
ji,u w,w,w are nonnegative weights for the corresponding variable. The smaller w, the less
important is the behavior of the corresponding variable to the overall performance index.
max j,min j,max j,min j,max j,min j, y,y,u,u,u,u are lower/upper bounds on the corresponding
variables. In Equation (6-3), the constraints on u, Δu, and y are relaxed by introducing the slack
variable 0 . The weight on the slack variable penalizes the violation of the constraints.
The larger with respect to input and output weights, the more the constraint violation is
penalized. The Equal Concern for the Relaxation (ECR) vectors
maxminmaxu
minu
maxu
minu V,V,V,V,V,V y y have nonnegative entries which represent the
concern for relaxing the corresponding constraint; the larger V , the softer the constraint.
V =0 means that the constraint is a hard one that cannot be violated. By default, all input constraints
are hard 0VVVV maxuminumaxuminu and all output constraints are soft 1VV maxyminy . As hard output constraints may cause infeasibility of the optimization
problem (for instance, because of unpredicted disturbances, model mismatch, or just because of
numerical round off).
-
8/19/2019 Sample Model Description
45/54
44
6.6. Cost Function of Model Predictive Control
Cost Function (6-2) is shown as follows.
22
2
arg
arg
2
arg
arg
)(
)1(
)(
)1(
)(
)1(
)(
)1(
)1(
)0(
)1(
)0(
)1(
)0(
)1(
)0(
)1(
)0(
)1(
)0(
),(
pr
r
p y
y
W pr
r
p y
y
pu
u
W
pu
u
pu
u
pu
u
W
pu
u
pu
u
z J
y
T
u
T
et t
et t
u
T
et t
et t
LLLL
LL
LLLL
(6-4)
Constraint (6-3) is shown as follows.
)1()1(
)1()1(
)1()1(
)1()1(
)()(
)1()1(
)1(
)0(
)1(
)0(
)(
)1(
)1()1(
)1()1(
)1()1(
)1()1(
)()(
)1()1(
maxmax
maxmax
maxmax
maxmax
maxmax
maxmax
minmin
minmin
minmin
minmin
minmin
minmin
pV pu
V u
pV pu
V u
pV p y
V y
pu
u
pu
u
p y
y
pV pu
V u
pV pu
V u
pV p y
V y
u
u
u
u
y
y
u
u
u
u
y
y
L
L
L
L
L
L
L
L
L
(6-5)
Cost Function (6-4) is shown as follows.
2222),( Y W Y U W U U W U z J yT
uT
uT
(6-6)
Constraint (6-6) is shown as follows.
max
max
max
min
min
min
U
U
Y
U
U
Y
U
U
Y
(6-7)
Δu that minimizes J is calculated sequentially-iterated by the quadratic programming with
constraints. Symbols that used in equation (6-6) and (6-7) are shown as follows.
-
8/19/2019 Sample Model Description
46/54
45
)(
)1(
)(
)1(
)1(
)0(
)1(
)0(
)1(
)0(
arg
arg
pr
r
p y
y
Y
pu
u
U
pu
u
pu
u
U
et t
et t
LL
L
LL
(6-8)
)1()1(
)1()1(
)1()1(
)1()1(
)()(
)1()1(
)1()1(
)1()1(
)1()1(
)1()1(
)()(
)1()1(
maxmax
maxmax
min
maxmax
maxmax
max
maxmax
maxmax
max
minmin
minmin
min
minmin
minmin
min
minmin
minmin
min
pV pu
V u
U
pV pu
V u
U
pV p y
V y
Y
pV pu
V u
U
pV pu
V u
U
pV p y
V y
Y
u
u
u
u
y
y
u
u
u
u
y
y
L
L
L
L
L
L
(6-9)
-
8/19/2019 Sample Model Description
47/54
46
7. Evaluation of Control System
7.1. Introduction
This chapter evaluates control performance of cascade PID control and Model Predictive Control ofthe outer control system designed in chapter 5.
7.2. Simulation Model of Cascade PID Control
Figure 33 shows simulation model of cascade PID control.
After 0 to 25000 seconds, it is controlled in combination of cascade PID control and the inner
control system.
Cascade
PID
Controller Computing
Unit
Signal Builder
Block Gas Separator1 Gas Separator2 Gas Separator3
Permeation part
PID controller1
Material Part
PID controller1
Material Part
PID controller2
Permeation part
PID controller2
Material Part
PID controller3
Permeation part
PID controller3
Data storing part
Data display part
Cascade
PID
Controller
Cascade
PID
Controller
Figure 33. Simulation Model (gas_dynamics3_cascade_tuned.mdl)
7.3. Simulation Model of Model Predictive Control
Model that simulates Model Predictive Control is shown in figure 34. Model Predictive Control is
performed from time 2000 seconds. So, Model Predictive Controller (MPC Controller Block) is
located within Enabled Subsystem. It is controlled in the inner control system only up to 2000
seconds, and in combination of Model Predictive Control and the inner control system after 2000 to
25000 seconds.
-
8/19/2019 Sample Model Description
48/54
47
ComputingUnit
Signal Builder
Block Gas Separator1 Gas Separator2 Gas Separator3
Permeation part
PID controller1
Material Part
PID controller1
Material Part
PID controller2
Permeation partPID controller2
Material Part
PID controller3
Permeation part
PID controller3
Data display part
Model PredictiveController
Figure 34. Simulation Model ()
7.4. Comparison of Cascade PID Control and Model Predictive Control
Perform simulations for cascade PID control and Model Predictive Control. The results obtained are
shown in figure 35 to 38. (Figure 35: Set points and controlled variables, Figure 36: superimpose of
Figure 35, Figure 37: manipulated variables, Figure 38: disturbance)
In (1) in figure 35 (left side of figure 36), set point tracking control apparently stops and windup that
requires time for a while to restart set point tracking is confirmed in cascade PID control. Windup
occurs because: integrator is affected if output signal (MV) is reached to upper or lower limit in PID
calculation when error that is difference between set point and controlled variable occurs. An
appropriate integrated value is stored in integrator and normal calculation is performed if MV does
not go over the limits. If MV goes over the limits, excessive integrated values are stored in integrator.
It requires substantial time for integrated value to become 0 when this state is controlled to be
normal range. Until reaching this time, MV output does not return to normal range, and the state of
going over the limits continues. The functionality to initialize integrated value in a short time is
called anti-reset windup. This PID controller does not have anti-reset windup.
(1) of figure 35 (left side of figure 36) indicate the state which can not track set point. Each gas
separator constructs own closed cascade PID control system, and in the gas separator 3, it confirms
-
8/19/2019 Sample Model Description
49/54
48
that manipulated variable of cascade PID controller is at the upper limit in (1) of figure 37. The
cascade PID control shows that the ability to make oxygen of more than 95% concentration set here
can not be obtained.Manipulated variable of cascade PID control always stick to the upper limit within of the upper and
lower limits of manipulated variable, 0~1.5[atm].Manipulated variable of the upper and lower limits
of Model Predictive Control is 0~1[atm], and manipulated variable of Model Predictive Control
fluctuate within the range, stress put on the plant is lower in Model Predictive Control.
In Model Predictive Control, set point tracking control is achieved within the upper and lower limits
of the manipulated variables.
Weight factor of set point tracking of the gas separator 3 is weighted and set point tracking of the gas
separators 2 and 3 are lowered for Model Predictive Control in the design of cost function. Figure 35
shows that set point tracking is the best in the gas separator 3, followed by the gas separator 2 and 1,
respectively, which confirms behavior in accordance with the design concept. It also shows that the
ability to make oxygen with more than 95% concentration can be achieved in the current Model
Predictive Control performance. Weight factors for the manipulated variables 1, 2 and 3 are
minimized for large behavior range in the cost function. Each manipulated variables indicates larger
behavior range for control value set point tracking. As impact of disturbance (figure 38) is not so
significant for both cascade PID control and Model Predictive Control, it can be considered as good
for disturbance absorbability.
In conclusion, Model Predictive Control is considered to have the better control performance in this
example. However, this cascade PID control is simple and there are some possibilities for improved
control performance using feedforward and decoupling and so on.
-
8/19/2019 Sample Model Description
50/54
49
Cascade PID control Model Predictive Control
(3)(2)
Windup
Figure 35. Setpoints and manipulated variables
Windup
Figure 36. Superimpose of figure 35
-
8/19/2019 Sample Model Description
51/54
50
Cascade PID Control Model Predictive ControlManipulated Variables
(1)
Figure 37. Manipulated variables
-
8/19/2019 Sample Model Description
52/54
51
Disturbance
Figure 38. Disturbance
8. Conclusion
This example shows simulation for gas separator process control using permeable membrane in
Simulink.
The control object (plant) is gas separator. Plant model is created on a formula basis using Simulink,
and as control system for the plant, cascade PID control and Model Predictive Control are compared.
Control system for the gas separator process control consists of combination of the outer and inner
control systems (cascade control). Outputs of the outer control system is manipulated variables that
is set points to track controlled variables of inner control system.
The procedures for simulation are as follows:
(1) Plant modeling
Governing rules of the plant are assumed and modeled on a formula basis. The governing rules are
derived from mass balance equation and ideal gas equation.
(2) System identification
Identify parametric model from plant input and output response in time domain.
(3) Control system design (PID control, Model Predictive Control)
Design of PID control for the inner control system, and cascade PID control and Model Predictive
-
8/19/2019 Sample Model Description
53/54
52
Control for the outer control system. The control object is the above parametric model.
(4) Evaluation of Control System
Performance of designed control system is evaluated in some diagram. Validity of Model PredictiveControl is confirmed in this example for multi-inputs multi-outputs system.
Plant model and control system in this example can be created in MATLAB&Simulink and
simulated. Logics of MATLAB&Simulink can be changed and extended as a more detailed model,
and improved gradually, a larger system can be constructed. It is also possible to embed
experimental equation or table format if processes are difficult to equate theoretically. Efficient and
intuitive modeling is possible in Simulink’s graphical environment.
9. References
[1] Kenji Hashimoto and Fumimaru Ogino, Today’s Chemical Engineering, Sangyo-Tosho (2001)
[2] Iori Hashimoto, Shinji Hasebe and Manabu Kano, Process Control Engineering, Asakura
Publishing Co., Ltd. (2002)
[3] Model Predictive Control Toolbox User’s Guide Version 2 The Mathworks, 2004
[4] Shuichi Adachi, Control Engineering using MATLAB, Tokyo Denki University Press (1999)
10. Exemption from Responsibility
Under no circumstances will The MathWorks Inc. be liable in any way for in this content, or for
any loss or damage of any kind incurred as a result of the use of this content.
11. Author
Hiroumi Mita
Principal Application Engineer
AEG
The MathWorks Inc.
-
8/19/2019 Sample Model Description
54/54
Created in February 2005
Modified in June 2010
This model is created using MATLAB Version 7.9 ,Model Model Predictive Control Toolbox Version 3.1.1 and Simulink Version 7.4.
MATLAB&Simulink Sample Model Description― Simulation of Cascade PID Control and Model Predictive Control for a gas separation plant by
membrane separation ―
MATLAB and Simulink are registered trademarks of the MathWorks, Inc. All other names such as products are trademarks or registered trademarks of
respective owners. Reprint, copy or reproduction of the whole or any part of this material is prohibited. The contents of this material may be altered
without prior notice.