联系我们: 手动添加方式: 微信>添加朋友>企业微信联系人>13262280223 或者 QQ: 1483266981
EEEN40441/60441
Model Predictive Control Assignment
SUBMISSION DEADLINE: 12/12/2023 @ 13:00 (1pm)
1. Objective
The key objective of this assignment is familiarisation with the Model Predictive Control
technology using both simulated SISO system and simulated benchmark chemical
process, which is “Continuous Stirred Tank Reactor” (CSTR).
2. Assessment Criteria
Assessment of the report will be based solely on the quality of students’ observations and
conclusions from the experiments in the cases of both SISO system and CSTR. Students
are not expected to include any of the figures but should instead focus on the provision of
appropriate explanations with as much detail as possible in order to demonstrate their
understanding of MPC.
PART A: Application of MPC to SISO System
3. MPC Control Problem Formulation for SISO System
This part of the assignment is concerned with the application of MPC to simple simulated
SISO system using MATLAB/SIMULINK software package. Nominal SISO system is
given by the following transfer function:
2
1
G s( )
0.1 1 s s
Assuming sampling time is equal to
S 0.5 T s , discrete-time state-space representation
of this SISO system is given as follows:
(1)
1
(2)
2
(1)
(2)
0.8328 0.4676 0.4676
0.4676 0.8796 0.1204
0 1 0
k k
k
k k
k
k k
k
x x
u
x x
x
y u
x
MPC control problem is formulated using the following cost function:
N
i
k i k k i k k
S u Q y r J
1
2 2
| |
Input is assumed to be constrained as follows:
0.2 1.5 uk
Output is unconstrained:
yk
Reference is equal to:
r 1
In addition to reference tracking, system is subjected to output step disturbance that
occurs at time
20 t s .
4. Running SISO System Simulation
Firstly, place all of the following files into the appropriate folder (of your choice) and
ensure that this is referenced as the “Current Folder” within your MATLAB system:
– User_Interface_SISO.m
– Simulation_Initialisation.m
– MPC_Controller.m
– Plot_MPC.m
– MPC_SISO_System_Disturbance.slx
User interacts with the simulation by modifying, saving and then executing MATLAB
file aptly named “User_Interface_SISO.m”. Within this file the user can modify any of
the following parameters:
– N: Prediction horizon length,
N
;
– u_weight: Cost function weighting factor associated with control input,
S
;
– y_weight: Cost function weighting factor associated with controlled output, Q
;
– model_mismatch: Option of introducing plant-model mismatch.
– u_min: Lower constraint on control input, which is nominally set to
u
0.2
;
– u_max: Upper constraint on control input, which is nominally set to
u
1.5
;
– ref: Set-point value, which is nominally set to
r 1.
– T_sim: Simulation time, which is nominally set to
Tsim
40
User may wish to modify any of these parameters and then to execute
“User_Interface_SISO.m” file, which will automatically also initialise MPC controller
and then run simulation of the closed-loop system using SIMULINK file titled
“MPC_SISO_System_Disturbance.slx”.
Note that initialisation of MPC controller as well as the associated observer is contained
within MATLAB file “Simulation_Initialisation.m”. Also, online computation associated
with MPC controller is contained within MATLAB file “MPC_Controller.m”.
Finally, once the simulation is completed several graphs are provided for the user to
inspect and these are executed according to commands contained within MATLAB file
“Plot_MPC.m”. These are:
– Figure 1: plot of controlled variable (blue trend) against its respective set-point
(red trend) as well as open-loop response (black trend) obtained by applying
uk 1
;
– Figure 2: Plot of manipulated variable (blue trend) contained within its limits (red
trends).
– Figure 3: Plot of observer prediction
| 1 | 1 | 1
k k k k k k y x d
(red trend) against actual
measured output
yk
(blue trend).
If for some reason simulation executes and the plots are not shown then please run
Plot_MPC file by typing in MATLAB Command Window: >> Plot_MPC
5. Assessed Tasks for Part A
There are 8 assessed tasks associated with Part A of this assignment. For each of the tasks
please ensure that:
– Lower constraint on control input is set to
u
0.2
;
– Upper constraint on control input is set to
u
1.5
;
– Set-point value is set to
r 1.
– Simulation time is set to
Tsim
40
5.1 Task A1.1
Make sure initial settings of the cost function are given as follows:
– N = 1
– u_weight = 1
– y_weight = 10;
– model_mismatch = 0
Run the simulation by executing MATLAB file User_Interface_SISO.m.
Now observe the responses of the closed-loop system and comment on the ability of the
MPC controller to (a) track the set-point and (b) reject the output step disturbance. Also,
comment on the trend of the manipulated variable.
[5 marks]
Make an attempt to improve the performance of the MPC controller by modifying the
cost function weights but do NOT change prediction horizon length at this stage.
Comment on the change in performance and state what cost function weights you found
to be appropriate.
[5 marks]
5.2 Task A1.2
Re-set the weights to:
– u_weight = 1
– y_weight = 10;
Now change the prediction horizon and observe the performance of the closed-loop
system in terms of both controlled variable and manipulated variable. For what value of
prediction horizon length its further increase does not change closed-loop system
performance
Comment on how performance is affected by the prediction horizon length.
[5 marks]
5.3 Task A1.3
Set prediction horizon length to N = 10.
Determine the ranges of controlled output weighting factor and control input weighting
factor such that the control input does not saturate.
[5 marks]
5.4 Task A1.4
Set prediction horizon length to N = 10.
Modify controlled output weighting factor and control input weighting factor such that
+/-2% settling time of set-point tracking response is approximately equal to 10 seconds.
Specify the values of controlled output weighting factor and control input weighting
factor that achieve this settling time.
[5 marks]
5.5 Task A1.5
Set prediction horizon length to N = 10.
Modify controlled output weighting factor and control input weighting factor to minimise
+/-2% settling time of set-point tracking response.
Specify the values of controlled output weighting factor and control input weighting
factor that minimise set-point tracking settling time and specify this settling time that is
achieved.
[5 marks]
5.6 Task A2.1
Do not change the cost function weights you determined in Task A1.5 that minimise the
settling time.
Keep prediction horizon length set to N = 10.
Now introduce plant-model mismatch by setting: model_mismatch = 1.
Comment on how performance is affected by the introduction of plant-model mismatch.
Note that setting: model_mismatch = 1 introduces additional 2 poles to the simulated
system but the prediction model used by MPC controller remains the same.
[5 marks]
5.7 Task A2.2
Maintain plant-model mismatch by setting: model_mismatch = 1.
Maintain prediction horizon length at N = 10.
Modify cost function weights to improve the performance.
Specify the values of controlled output weighting factor and control input weighting
factor that improve the performance.
[5 marks]
PART B: Application of MPC to CSTR
6. MPC Control Problem Formulation for SISO System
6.1 Continuous Stirred Tank Reactor
This part of the assignment deals with the control of the benchmark process, which is
“Continuous Stirred Tank Reactor” (CSTR) shown in Figure 1.
Figure 1: Continuous Stirred Tank Reactor
The following variables are considered to be unmeasured disturbances affecting the
reactor:
Reactant (raw material)
A
is fed into the reactor at the nominal constant rate of
FIN
1l /s .
Concentration of the reactant (raw material) in the feed is nominally equal to
CA,IN
10 g / l .
Temperature of the feed is nominally equal to
TIN
323K .
Exothermic irreversible reaction takes place inside the reactor converting reactant
A
into
the product
B
. The excess heat generated by this exothermic reaction is removed from
the reactor by means of the reactor jacket through which the cooling water is circulated.
Temperature of the cooling water entering the reactor jacket is nominally equal to
TJ ,IN
293 K .
Manipulated variables are assumed to be the following:
Flowrate of the cooling water through the jacket,
FJ
, that is nominally equal to
FJ
1l /s.
The rate at which reactor contents is removed from the reactor (outflow rate) that
is nominally equal to
FOUT 1l /s.
Process model is defined in terms of 5 state variables, some of which will be used as
controlled variables. These variables, along with their nominal (steady-state) values, are
given as follows:
Concentration of the reactant inside the reactor, CA
, which is nominally equal to
C g l A,0
1 / .
Concentration of the product inside the reactor,
CB
, which is nominally equal to
C g l B,0
9 / .
Temperature inside the reactor,
TR
, which is nominally equal to
T K R,0
360 .
Temperature inside the reactor jacket,
TJ
, which is nominally equal to
T K J ,0
330 .
Volume of the reactor contents,
V
, which is nominally equal to
V l 0
900 .
6.2 Model Predictive Controller Formulation
6.2.1 Control System Structure
Manipulated variables are the outflow rate and the cooling water flowrate inside the
reactor jacket:
u1 FOUT
u2 FJ
where:
FOUT,k FOUT,k FOUT,k 1
FJ ,k FJ ,k FJ ,k 1
Output variables are concentration of the product inside the reactor, reactor temperature
and volume of the reactor contents:
y1 CB
y2 TR
y3 V
6.2.2 Constraints
Hard constraints are imposed on the absolute values of the outflow rate and the cooling
water flowrate inside the reactor jacket:
0l / min FOUT 2l /s
0l /s FJ 2l /s
Both reactor temperature and volume of the reactor contents are kept within certain ‘soft’
constraints, given as follows:
355K TR 365K
800l V 1000l
These constraints are called ‘soft’ constraints because they can be violated although such
violations are heavily penalised in the cost function to reflect the fact that violation of the
constraints should be avoided if at all possible.
6.2.3 Set-Points
Concentration of the product inside the reactor is controlled to the set-point that is equal
to its nominal value, i.e.
g/l CB
*
9 .
Also, temperature inside the reactor jacket is controlled to the set-point that is equal to its
nominal value, TR
*
360 K .
Finally, volume of the reactor contents is also controlled to the set-point that is equal to
its nominal value, V
*
900 l .
6.2.4 Cost Function
MPC cost function, used in this assignment, is defined as follows:
N
i
J k i F OUT k i F k i V R R k i T B k i B C F S F S V V Q T T Q C C Q J
J OUT R B
1
2
,
2
,
2 *
2 *
,
2 *
,
where:
k
is the current sampling instant in time.
N
is the prediction horizon
QCB
is the cost function weight of the product concentration
QTR
is the cost function weight of the reactor temperature
S FOUT
is the cost function weight of the incremental outflow rate
S FJ
is the cost function weight of the incremental flowrate in the reactor jacket
Also, incremental values of the manipulated variables, rather than their absolute values,
are considered in the cost function:
u1 FOUT
u2 FJ
where:
FOUT,k FOUT,k FOUT,k 1
FJ ,k FJ ,k FJ ,k 1
6.2.5 Sampling Time
MPC re-solves the corresponding Quadratic Program every
1
0 seconds.
7. Description of the Operating Scenario
In this assignment one particular operating scenario of the CSTR process is considered.
Namely, we consider particular case of two changes in disturbances affecting CSTR
process. Firstly, at time t = 10 seconds concentration of the reactant in the feed changes
from
CA,IN
10g /l
to
CA,IN
9.8g /l
. Secondly, at time t = 600 seconds temperature of
the cooling water entering the reactor jacket changes from
TJ ,IN
293K
to
TJ ,IN
298K
. This scenario is depicted in Figure 2.
Figure 2: Disturbance Scenario
Resulting responses of the three controlled variables in open-loop mode (i.e. without
MPC controller in operation) are provided in Figures 3-5.
0 200 400 600 800 1000 1200
800
820
840
860
880
900
920
940
960
980
1000
Volume
Time in Seconds
Figure 3: Open-Loop Response of Reactor Volume
0 200 400 600 800 1000 1200
8.7
8.75
8.8
8.85
8.9
8.95
9
9.05
Product Concentration
Time in Seconds
Figure 4: Open-Loop Response of Product Concentration
0 200 400 600 800 1000 1200
354
356
358
360
362
364
366
Reactor Temperature
Time in Seconds
Figure 5: Open-Loop Response of Reactor Temperature
8. Assessed Tasks for Part B
This part of the assignment consists of 5 tasks that are briefly described below.
Detailed information is provided for each task in Blackboard in:
EEEN60441&40441 Course Content >> MPC Assignment >> CSTR folder.
Task B0
You are provided with open-loop responses of CSTR process to step changes in the two
manipulated variables. Please note that all the disturbances are kept at their nominal
values, detailed in Section 6.1, throughout the duration of these tests, i.e. disturbance
scenario shown in Figure 2 was NOT implemented. Estimate dynamic relationship
between each of 2 manipulated variables and each of 3 controlled variables. You may
assume that each of these input-output relationships is given by first-order dynamic
model that you should express in continuous-time domain, i.e. you should provide six
first-order transfer functions defined in s-domain (one transfer function for each input_xfffe_output pair).
[6 marks]
Task B1
You are provided with the trends of controlled variables and manipulated variables but
not with the values of cost function weights associated with controlled variables. Provide
observations from the trends of both controlled and manipulated variables that are given
to you. State whether these cost function weights are very large or large or small or equal
to zero for each of the controlled variables and justify your answers.
[6 marks]
Task B2
Cost function weights associated with each of the three controlled variables are changed
and for three different choices of these weights’ values you are provided with the
corresponding trends of controlled variables and manipulated variables. Provide
observations from these trends that arise from three different choices of controlled
variables’ cost function weights’ values and compare these three scenarios.
[24 marks]
Task B3
Cost function is modified so that only product concentration and reactor temperature are
controlled to their set-points whilst the reactor volume is controlled to lie within its
constraints. Suggest how the cost function would need to modified from that given in
Task B2 to reflect the modification in the control objective. Comment on the provided
trends of controlled variables and manipulated variables.
[12 marks]
Task B4
Since the only key quality-related process variable that needs to be tightly controlled to
set-point is the product concentration, suggest how cost function used in Task B2 needs
to be modified in order to reflect this modification in the control objective. Comment on
the provided trends of controlled variables and manipulated variables.
[12 marks]
6. Assignment Submission Details
You are required to submit the report that contains observations and conclusions
related to the tasks associated with Part A and tasks associated with Part B by
13:00 (1pm) on Tuesday 13
th of December 2023 via Blackboard System.
You are provided with the template of the report in Blackboard on the main
course content page. This report must be either submitted in Microsoft Word
document format or pdf document format.
There is no expected length of the report but it is anticipated that report will not
be more than 10 pages long (including the front page).


发表回复