Controller Design of Four Tank System
Controller Design of Four Tank System
NIKHIL N
M.E. Control & Instrumentation
College of Engineering Guindy
MODELLING
12/04/2025 3
• The flow q generated by a pump is considered proportional to the
applied pump voltage u:
q=ku
Where k is a constant
• This flow rate is divided according to
• qL=γku; qU=(1- γ)ku; γ ϵ [0,1]
12/04/2025 4
12/04/2025 5
12/04/2025 6
12/04/2025 7
Final equations
12/04/2025 8
JACOBIAN CONVERSION
12/04/2025 9
12/04/2025 10
12/04/2025 11
Here we have B matrix as
12/04/2025 12
12/04/2025 13
STATE SPACE MODEL
12/04/2025 14
TRANSFER FUNCTION MODEL
12/04/2025 15
12/04/2025 16
MODEL PREDICTIVE CONTROL
Chess ….. ?
12/04/2025 17
MODEL PREDICTIVE CONTROL
• It is a regulatory control that uses a explicit dynamic
model of the response of process variables to
calculate control “moves”
• Control moves are intended to force the process
variables to follow a pre-specified trajectory from the
current operating point to the target.
12/04/2025 18
• Optimal controller based on minimizing the error from trajectory
• Corrections for unmeasured disturbances, model errors are included
12/04/2025 19
BLOCK DIAGRAM OF MPC
12/04/2025 20
Optimization formulation
• Cost Function
Cost function is also known as control objective. is scalar criterion that
helps in measuring the process behaviour over a certain prediction
horizon, L.
12/04/2025 21
Constraints
• In MPC implementation, there is good motivation in the sense that
constraints like the input amplitude constraints and input rate of
change constraints are treated more efficiently than in the
conventional PID controller.
• The input amplitude constraint is a lower and upper bound on the
actuator (pump). The constraints are to a large extent seen as a means
for limiting the resources (i.e. water flow) from the pumps in the case
of input constraint.
• the output constraints are set to limit the amount of water retained in
the tanks, as it is set by constraining the tanks height. The minimum is
zero 0[cm] and maximum is 20[cm] for the four tanks.
• The amplitude constraints on the input signal to practical control
systems is formulated as follows;
12/04/2025 22
• The amplitude constraints on the input signal to practical control
systems is formulated as follows;
12/04/2025 23
Prediction Model
12/04/2025 24
IMPLEMENTATION OF THE MPC
• The performance of an MPC controller depends on the accuracy of the
model. Although, it is possible to specify for the MPC controller to
incorporate integral action such that it can compensate for the
differences between the real plant and the model of the plant. The
creation or implementation of the MPC controller is based on a state-
space model of the plant.
STEPS
Selection of design and tuning
parameters
Sampling period and model
horizon
Control horizon
Prediction horizon
Weighting matrices, Q and R
12/04/2025 Reference trajectory 25
Sampling period and model horizon
• Sampling period t and the model horizon N , are parameters that
should be chosen such that Nt = . Where is denoted the settling time
for the open-loop response.
• This parameter selection ensures the model to reflect the complete
effect of a change in an input variable over the time it needs to attain
steady state.
• It is very typical that 30 N 120
12/04/2025 26
Control Horizon
• This is the number of samples within the prediction horizon of which
the MPC controller could affect the control action.
• If the control horizon increases, there would be increased requirement
for the computational effort.
• It is sometimes denoted as M , and conventionally selected within 5 M
20.
12/04/2025 27
Prediction horizon
• This is the number of samples into the future during which the MPC
controller would predict the plant output.
• It is denoted as P and selected by P = N +M there by making the
complete effect of the most recent input move to be accounted for.
• For implementation in LabVIEW program, it is denoted as Np. The
desired prediction and control horizon as defined in this task is shown
as below
12/04/2025 28
Weighting matrices, Q and R
• The weighting matrix Q as in the definition of the cost function, allows
output variables being weighted according to their relative
importance.
• A diagonal Q matrix will allow the output variables to be weighted
individually while the most important variables will have the largest
weights.
• For example, if the levels in the four tank laboratory process is
considered more important than the temperature in the tank, then the
tank level in that case will be assigned a larger weighting factor.
• R is a weighting matrix that allows input variables to be weighted
according to their importance.
12/04/2025 29
• It is a diagonal matrix whose elements are referred to as move
suppression factors.
• Convenient tuning is achieved as a result of increasing the values of
the elements and in turn makes the MPC controller to be conservative
by the reducing the input moves.
12/04/2025 30
Reference trajectory
• The future output behaviour in an MPC application are specified in a
number of different ways like, the set-point , reference trajectory, high
and low limits.
• But the reference trajectory has a tuning factor that is used in
adjusting the desired speed of response for each output.
• The reference trajectory can be specified by the concept of
performance ratio.
Performance ratio: Is the ratio of the desired closed-loop settling time to
that of open-loop settling time
12/04/2025 31
Creation of the MPC
• The MPC controller calculates a sequence of future control actions in
such a way that a cost function is minimized.
• The weighting matrices in the cost function is been specified in such a
way that they help in adjusting the priorities of the control action, rate
of change in the control action and the outputs of the plant.
• The requirement for setpoint specification to the MPC controller
operates by comparing the plant input and the output values to
setpoint profiles.
• The setpoint profiles contain the predicted values of the control action
and plant output setpoints at certain time instants, the profiles are
been sent to the MPC controller that calculates the error by
comparing the predicted plant inputs and outputs to the setpoint
profiles.
12/04/2025 32
• control action and plant output setpoints at certain time instants, the
profiles are been sent to the MPC controller that calculates the error
by comparing the predicted plant inputs and outputs to the setpoint
profiles. The MPC controller will then try to reduce the error by
minimizing a cost function which takes this error into account.
12/04/2025 33
RESULTS
12/04/2025 34
Referances
• Developing Advanced Control strategies for a 4-Tank Laboratory
process by Ademu Victor Okpanachi
• Model predictive control by Prof. Alberto Bemporad, University of
Trento
• www.apmonitor.com
• www.wikiepedia.com
12/04/2025 35
THANK YOU……………
12/04/2025 36