Ying *et al.* [1] studied
the control of consistency (percentage pulp fibers in aqueous suspension)
and liquid level in a paper machine headbox, a schematic of which
is shown in Schematic of Paper Machine Headbox Elements.

**Schematic of Paper Machine Headbox Elements**

The process is nonlinear, and has three outputs, two manipulated inputs, and two disturbance inputs, one of which is measured for feedforward control.

The process model is a set of ordinary differential equations (ODEs) in bilinear form. The states are

$$x={\left[\begin{array}{cccc}{H}_{1}& {H}_{2}& {N}_{1}& {N}_{2}\end{array}\right]}^{T}$$

where *H _{1}* is the
liquid level in the feed tank,

$$y={\left[\begin{array}{ccc}{H}_{2}& {N}_{1}& {N}_{2}\end{array}\right]}^{T}$$

The primary control objectives are to hold *H _{2}* and

$$u={\left[\begin{array}{cc}{G}_{p}& {G}_{w}\end{array}\right]}^{T}$$

where *G _{p}* is the
flow rate of stock entering the feed tank, and

*v* = *N _{p}*

The white water consistency is an unmeasured disturbance.

*d* = *N _{w}*

Variables are normalized. All are zero at the nominal steady state and have comparable numerical ranges. Time units are minutes. The process is open-loop stable.

The `mpcdemos`

folder contains the file `mpc_pmmodel.m`

,
which implements the nonlinear model equations as a Simulink^{®} S-function.
The input sequence is *G _{p}*,

The paper machine headbox model is easy to linearize analytically, yielding the following state space matrices:

A = [-1.9300 0 0 0 0.3940 -0.4260 0 0 0 0 -0.6300 0 0.8200 -0.7840 0.4130 -0.4260]; B = [1.2740 1.2740 0 0 0 0 0 0 1.3400 -0.6500 0.2030 0.4060 0 0 0 0]; C = [0 1.0000 0 0 0 0 1.0000 0 0 0 0 1.0000]; D = zeros(3,4);

Use these to create a continuous-time LTI state-space model, as follows:

PaperMach = ss(A, B, C, D); PaperMach.InputName = {'G_p', 'G_w', 'N_p', 'N_w'}; PaperMach.OutputName = {'H_2', 'N_1', 'N_2'};

(The last two commands are optional; they improve plot labeling.)

As a quick check of model validity, plot its step responses as follows:

step(PaperMach);

The results appear in the following figure. Note the following:

The two manipulated variables affect all three outputs.

They have nearly identical effects on

*H*._{2}The

*G*→_{w}*N*_{2}pairing exhibits an inverse response.

These features make it difficult to achieve accurate, independent
control of *H _{2} *and

**Linearized Paper Machine Model's Step Responses**

Type

mpctool

to open the MPC design tool. Import your LTI Paper Mach model as described in Opening MPCTOOL and Importing a Model.

Next, define signal properties, being sure to designate *N _{p}* and

**Signal Properties for the Paper Machine Application**

If necessary, review Specifying Controller Properties.
Then click the **MPC1** node and specify
the following controller parameters, leaving others at their default
values:

**Models and Horizons**. Control interval = 2 minutes**Constraints**. For both*G*and_{p}*G*, Minimum = –10, Maximum = 10, Max down rate = –2, Max up rate = 2._{w}**Weight Tuning**. For both*G*and_{p}*G*, Weight = 0, Rate weight = 0.4._{w}

For*N*, Weight = 0. (Other outputs have Weight = 1.)_{1}

Finally, select the **Scenario1** node
and define a servo-response test:

Duration = 30

*H*setpoint = 1 (constant)_{2}

Simulate the scenario. You should obtain results like those shown in Servo Response for Unit Step in Headbox Level Setpoint and Manipulated Variable Moves.

**Servo Response for Unit Step in Headbox Level
Setpoint**

**Manipulated Variable Moves**

The response time is about 8 minutes. We could reduce this by decreasing the control interval, reducing the manipulated variable rate weights, and/or eliminating the up/down rate constraints. The present design uses a conservative control effort, which would usually improve robustness, so we will continue with the current settings.

Note the steady-state error in *N _{1} * (it's
about –0.25 units in Servo Response for Unit Step in Headbox Level
Setpoint). There are only two
manipulated variables, so it's impossible to hold three outputs at
setpoints. We don't have a setpoint for

Consistency control is more important than level control. Try
decreasing the *H _{2}* weight
from 1 to 0.2. You should find that the peak error in

To configure a test of the controller's feedforward response,
define a new scenario by clicking the **Scenarios** node,
clicking the **New** button, and renaming
the new scenario **Feedforward** (by
editing its name in the tree or the summary list).

In the **Feedforward** scenario,
define a step change in the measured disturbance, *N _{p}*,
with

If response plots from the above servo response tests are still
open, close them. Simulate the **Feedforward** scenario.
You should find that the *H _{2}* and

Experiment with the "look ahead" feature. First,
observe that in the simulation just completed the manipulated variables
didn't begin to move until the disturbance occurred at *t* =
10 minutes. Return to the **Feedforward** scenario,
select the **Look ahead** option for
the measured disturbance, and repeat the simulation.

Notice that the manipulated variables begin changing *in
advance* of the disturbance. This happens because the look
ahead option uses known future values of the disturbance when computing
its control action. For example, at time *t *=
0 the controller is using a prediction horizon of 10 control intervals
(20 time units), so it "sees" the impending disturbance
at *t* = 10 and begins to prepare for it. The output
setpoint tracking improves slightly, but it was already so good that
the improvement is insignificant. Also, it's unlikely that there would
be advanced knowledge of a consistency disturbance, so clear the **Look ahead** check box for subsequent simulations.

To test the response to unmeasured disturbances, define another
new scenario called **Feedback**. Configure
it as for **Feedforward**, but set the
measured disturbance, *N _{p}*,
to zero (constant), and the unmeasured disturbance,

Running the simulation should yield results like those in Feedback Scenario: Unmeasured Disturbance
Rejection.
The two controlled outputs (*H _{2}* and

**Feedback Scenario: Unmeasured Disturbance
Rejection**

One factor limiting performance is the chosen control interval
of 2 time units. The controller can't respond to the disturbance until
it first appears in the outputs, i.e., at *t* =
2. If you wish, experiment with larger and smaller intervals (modify
the specification on the controller's **Model
and Horizons **tab).

Another factor influencing the response to unmeasured disturbances (and model prediction error) is the estimator configuration. The results shown in Feedback Scenario: Unmeasured Disturbance Rejection are for the default configuration.

To view the default assumptions, select the controller node
(**MPC1**), and click its **Estimation** tab. The resulting view should be
as shown in Default Estimator Assumptions: Output Disturbances. The status message (bottom of figure) indicates
that Model Predictive Control Toolbox™ default assumptions are being
used.

**Default Estimator Assumptions: Output Disturbances**

Now consider the upper part of the figure. The **Output Disturbances** tab is active, and its **Signal-by-signal** option is selected. According
to the tabular data, the controller is assuming independent, step-like
disturbances (i.e., integrated white noise) in the first two outputs.

Click the **Input Disturbances** tab.
Verify that the controller is also assuming independent step-like
disturbances in the unmeasured disturbance input.

Thus, there are a total of three independent, sustained (step-like) disturbances. This allows the controller to eliminate offset in all three measured outputs.

The disturbance magnitudes are unity by default. Making one larger than the rest would signify a more important disturbance at that location.

Click the **Measurement Noise** tab.
Verify that white noise (unit magnitude) is being added to each output.
The noise magnitude governs how much influence each measurement has
on the controller's decisions. For example, if a particular measurement
is relatively noisy, the controller will give it less weight, relying
instead upon the model predictions of that output. This provides a
noise filtering capability.

In the paper machine application, the default disturbance assumptions are reasonable. It is difficult to improve disturbance rejection significantly by modifying them.

It's good practice to run initial tests using the linear plant model as described in Servo Response and Unmeasured Input Disturbance. Such tests don't introduce prediction error, and are a useful benchmark for more demanding tests with a nonlinear plant model. The controller's prediction model is linear, so such tests introduce prediction error.

Open the paper machine headbox control Simulink model by typing:

mpc_papermachine

**Paper Machine Headbox Control Using MPC Tools
in Simulink**

Paper Machine Headbox Control Using MPC Tools
in Simulink is a Simulink model in which the Model Predictive Control Toolbox controller
is being used to regulate the nonlinear paper machine headbox model.
The block labeled S-Function embodies the nonlinear model, which is
coded in a file called `mpc_pmmodel.m`

.

As shown in the following dialog box, the MPC block references
a controller design called `MPC1`

, which was exported
to the MATLAB^{®} workspace from the design tool. Note also that
the measured disturbance inport is enabled, allowing the measured
disturbance to be connected as shown in Paper Machine Headbox Control Using MPC Tools
in Simulink.

Test, Output Variables shows the scope display from the "Outputs"
block for the setup of Paper Machine Headbox Control Using MPC Tools
in Simulink, i.e., an unmeasured disturbance. The yellow curve
is *H _{2}*, the magenta is

As disturbance size increases, nonlinear effects begin to appear. For a disturbance size of 4, the results are still essentially the same as shown in Test, Output Variables and Simulink Test, Manipulated Variables (scaled by a factor of 4), but for a disturbance size of 6, the setpoint deviations are relatively larger, and the curve shapes differ (not shown). There are marked qualitative and quantitative differences when the disturbance size is 8. When it is 9, deviations become very large, and the MVs saturate. If such disturbances were likely, the controller would have to be retuned to accommodate them.

**Test, Output Variables**

**Simulink Test, Manipulated Variables**

[1] Ying, Y., M. Rao, and Y. Sun "Bilinear
control strategy for paper making process," *Chemical
Engineering Communications* (1992), Vol. 111, pp. 13–28.

Was this topic helpful?