SOFTWARE FOR USE WITH THE BOOK:

PREDICTIVE CONTROL WITH CONSTRAINTS

by J.M.Maciejowski


 
Many of the examples and exercises in this book assume the use of MATLAB,
 together with its Control System Toolbox and Model Predictive Control Toolbox.

The versions of software used for the preparation of this book were:

MATLAB 5.3.1
Control System Toolbox 4.2.1
Model Predictive Control Toolbox 1.0.4
Optimization Toolbox 2.0

Note that all the .m files available from this page are in plain text and they are all very small  (max 35 kbytes).


Basic software, using MATLAB and Control Toolbox only, as described in Chapter 1.

  basicmpc.m   Basic predictive control of SISO system without constraints.

  (This file is printed in full in Appendix B of the book.)
  trackmpc.m   Basic predictive control with offset-free tracking.
  unstampc.m   Re-aligned model forced by unstable plant.
  noisympc.m   Offset-free tracking with disturbances and noisy output measurements.

After Chapter 1, the  Model Predictive Control Toolbox  is needed (or comparable software). Some description of this Toolbox is given in Appendix C of the book, but there is also a complete  tutorial available. Some of the Toolbox  functions have been modified slightly to enhance the functionality, as described in Appendix C. These modified functions need the  Optimization Toolbox  as well as the Model Predictive  Control Toolbox.
These are available here:

 
qpsoft.m             Solves quadratic programming (QP) problem with soft constraints. (Needed to run scmpcnl2).

scmpc2.m         Allows simulation of MPC with linear  state-space model as the plant.  (Needs function qpsoft.m)
                           The function scmpc.m has been modified to add the following functionality:

      • Soft constraints
      • Allows  simulation to be resumed from previous final state. (This allows the internal model to be updated during a run.)
      • Initial conditions of plant and model can be set independently. (Useful if non-default estimator gains are used.)
      • Breaks gracefully if infeasibility encountered during run. (Saves data obtained up to that point.)
      Thanks to Eric Kerrigan for implementing most of the modifications.

scmpc3.m       As scmpc2, but allows definition of Reference Trajectory without anticipation of future set-point trajectory. (See Figure 7.17 in book.) Thanks to Simon Redhead for implementing this modification.

scmpc4.m       As scmpc2, but allows definition of Reference Trajectory with anticipation of future set-point trajectory. (See Figure 7.18 in book.) Thanks to Simon Redhead for implementing this modification.

scmpcnl2.m       Allows simulation of MPC with nonlinear Simulink model as the plant.  (Needs function qpsoft.m)

The function scmpcnl.m has been modified to add the same functionality as described above for scmpc2.m.
Thanks to Eric Kerrigan  again for implementing most of the modifications.

Here is a collection of Matlab software  related to examples and problems which appear in the book. Most of these use the modified MPC Toolbox functions listed above.

c2dd.m                      Example solution to Exercise 2.9.  Builds discrete-time  model, accounting for computational delay.

disturb.m                  Pulse disturbance on Citation aircraft, with constraint on climb rate.   See  section  2.7.

disturb2.m                Pulse disturbance on Citation aircraft, with set-point for climb rate.   See  section 2.7 and Exercise 3.11.

            evaporator.mdl    Simulink model of Newell and Lee evaporator (see Section 9.2).

            gpc2mod.m         Builds a state-space model, from a GPC model, in the MOD format used by the MPC Toolbox. Uses function gpc2ss.

  gpc2ss.m             Builds a state-space model and observer gain matrix, from a GPC model. (Follows section 4.2.5 of the book.)
  makecita.m          Builds linearised model of Citation aircraft for Problem 10 of Chapter 2.
  mismatch.m         Simulates effect of  plant-model mismatch, using the MPC Toolbox and the Citation aircraft model.
   mismatch2.m       Simulates effect of  plant-model mismatch, using the MPC Toolbox and the Citation aircraft model with soft output constraints.
  mkdelta.m           Builds transfer function matrix W(z) for additive uncertainty of Shell oil fractionator model, equation (9.15), after   conversion  to disrete time.
  mkoilfr.m            Builds models of the Shell heavy oil fractionator example. See Section 9.1.
  oilfr20.mat          Matlab data file (.mat format) to create 20-state approximate model of Shell heavy oil fractionator. See Section 9.1.3.
   simevap.m          Matlab file which runs simulation of the Newell and Lee evaporator, allowing experimentation with re-linearisation, as in Section 9.2 and Exercise 9.4.
   swimpool.m        Matlab function which simulates the swimming pool example, with disturbance model and observer. See Section 7.4 and Exercise 7.6.
           


Back to  `Predictive Control with Constraints' Home Page

This page last updated: 16 September 2002.