Professional Documents
Culture Documents
Advanced Control Tutorial
Advanced Control Tutorial
model inaccuracy
If we have another look at the sketch of the outlay of a model predictive control
system (Figure 1), then we see that what we have discussed so far is only a subset of
a model predictive control system. We have only looked at setpoint calculations on
the basis of a steady-state model; we have not looked at system dynamics. We also
haven’t considered the fact yet that the model that we use to describe the process
isn’t a perfect model, and that there will be a difference between model output and
plant output.
Setpoint
calculations
Prediction Process
Control Process outputs y
calculations
Inputs u Model +
Model outputs
_
Residuals
We will leave systems dynamics for later, and first look at model inaccuracy. A
primary cause of model inaccuracy is the fact that often linear matrix models are
used to describe plant behaviour. Matrix models are comparatively easy to design,
build and maintain. They perform well in a lot of applications. Unfortunately, most
plants are actually not truly linear. As a result linear matrix models are generally low
fidelity models. Fortunately, in a lot of cases this is not a practical disadvantage.
Simple models that perform well are often preferable to complex ones that perform
slightly better, because the complex ones cost more to develop and maintain. Most
errors introduced by the differences between the model and the actual plant can be
overcome by introducing a feedback loop that takes care of these differences. To do
this it is essential to have feedback from every CV (for reasons which will become
clear later). In the process we looked at before we had two CVs (flow and product
purity). We already had a feedback loop for the flow; we now have to add an
analyser, AI-2, on the product line (see Figure 2).
Figure 2. The feed cleaning plant
Demo4
A spreadsheet (Demo4) is available for investigating the way model predictive control deals
with model inaccuracy. In the spreadsheet, the control model CV’s are labelled cv1 and cv2,
and the equivalent plant CV’s are cvp1 and cvp2. The equations used for the calculations
are:
The expressions for cv1, cv2 and cvp1 are linear. A more generalised expression for
linear matrix models and their initialisation is shown in Appendix 1. The expressions
cvp2 is different: the plant model is non-linear. The gains in the equations of the
control model were determined experimentally (see Appendix 2). This situation is
similar to that on a plant: the model of the plant that is used for controlling the plant
has to be determined experimentally, for example by performing step tests and then
analysing the plant response. Linear models are easiest to understand and therefore
preferred.
Since the control model and plant are very different, they generate different values of
CV2. They therefore also describe different product purity lines. If you key in an
upper purity limit of 0.263 wt% (the composition at the initial condition) the two
lines will be close (see Figure 3A)- though still not exactly the same. At any other
composition the lines will significantly diverge (See Figure 3B)
A B
This initialises the biases and aligns the model with the plant (as would occur in a
real control system at commissioning time).
The biases initialise as follows:
Bias b1 initialises to 0 because the linear model represents the plant’s mass balance
perfectly with zero bias.
After initialisation, the model and plant CV’s are perfectly aligned:
Run the simulation for a few scans until the operating point stabilises. The results
should be as follows (Figure 4):
The plant is not fully optimised. It still has a little way to go to reach the purity
constraint at 0.6 wt%. The discrepancy has appeared because all the moves the
controller made after commissioning were based entirely on model predictions –
without reference to the plant. The plant in this case remains within the real feasible
region (bounded by the dashed line), but in different systems this type of error could
just as drive the plant outside the feasible region, leading to the violation of the
constraint.
Turning on the Feedback
One way to describe the problem is that the controller used pure feedforward action
based on a (flawed) model, with no way of detecting and correcting errors. Some
feedback action is required to put this right. A common way to do this is to alter the
bias on the basis of the difference between the plant output and the control model
output. The bias update algorithm is executed at the beginning of each scan:
b2t = b2t-1 + (cf2 * (cvp2t-1 - cv2t-1))
Where:
t denotes values at time t.
t-1 denotes values from the previous scan, at time t-1.
This simple feedback mechanism acts to reduce the discrepancy between the model
and plant.
The dimensionless correction factor, cf2, is ranged from 0 to 1:
0 corresponds to no correction (pure feedforward action).
1 corresponds to full correction on each scan (maximum feedback action).
Set CV2’s bias correction factor to 0.5 and run the controller for a few more scans.
The results should be like the ones in Figure 5. We see that the CV2 discrepancy
rapidly disappears. The modelled purity line retains the same slope but the value of
b2 decreases on successive scans, and this has the effect of shifting the line down the
mv2 axis. Profit increases and the plant moves to the true optimum.
We see that the addition of a small amount of feedback greatly enhances the
performance of model-based controllers. It can make low fidelity models appear to
act like a high fidelity ones. The approach fails if models are extremely inaccurate.
Accuracy requirements are different in every application, but as a very rough guide,
errors around +/-25% begin to create problems. +/-25% might sound like very poor
accuracy, but an error of -25% means that the controller has correctly predicted 75%
of the move, leaving only 25% to be determined by feedback. The performance of
such systems can be much better than those that use no feedforward action and rely
on 100% feedback.
Appendix 1: Linear matrix models
G is a gain matrix
iv is a vector of Independent Variables, comprised of MV’s and DV’s (which are identical in
terms of modelling and may be placed in the vector in any order).
This form is good for modelling changes, i.e. predicting the changes in CV’s resulting from
given changes in MV’s and DV’s. It is not useful for predicting absolute values of CV’s.
However, it can be improved in this respect by biasing:
cv = G.iv + b …(2)
The initial values of the biases are determined when the control is being commissioned, in
order to align the modelled CV’s with the observed plant CV’s. The initialisation function is:
Although linear matrix models are extremely useful, it is important to realise that
they are not suitable for all applications.
They cannot be applied when:
o The plant is severely non-linear.
o The plant’s responses are not monotonic.
o The model is required to reflect mass and energy balance.
o The model must have high absolute accuracy.
Some extra expenditure is usually justified in this field to develop more accurate
models, using forms that are more expressive than matrices. In a lot of cases the
payback is quick. Better absolute accuracy improves performance. It also reduces
dependency on feedback - but never entirely eliminates it.
Appendix 2: Step Testing
One method of determining linear gains is to step-test the plant. This involves
making small changes to MV’s and DV’s and measuring the magnitude of the CV
responses.
The spreadsheet can be used to illustrate the process. Try verifying the gains in
equations 4 and 5 by the following method:
Reset the simulation.
Note the initial operating point:
Write down the values of the plant CV’s (cvp1 and cvp2).
Step the initial value of mv1 by a small amount, say from 1.0 to 1.1 te/h:
Reset the simulation. This has the effect of moving the plant to the new
initial condition with the higher value of mv1.
Write down the new CV values.