# Chapter 5: INTRODUCING CONSTRAINTS INTO PREDICTIVE CONTROL

The earlier chapters developed predictive control algorithms which ignored constraints. In practice, the main sellinig point of MPC is the ability to take systematic account of system constraints when proposing a control strategy. This chapter intrduces constraints, demonstrates the importance of considering them explicitly and then gives a systematic presentation of how they are incorporated into several MPC algorithms. Elementary MATLAB code is provided so that viewers can try out the concepts for themselves on low dimensional systems. The latter few videos make use of the mpt toolbox from ETH for producing figures to illustrate sets, but this is not needed for the MPC code itself.

- Introduction.
- Quadratic programming optimisations.
- Including constraints in GPC.
- Constrained GPC simulations with MATLAB.
- Constrained GPC with a T-filter.
- Constraint handling in DMC.
- Constraint handling with independent model GPC.
- Invariant sets.
- Dual-mode approaches: the regulation case.
- Dual-mode approaches: the tracking case.
- Dual-mode MATLAB implementation with tracking.
- Reachable targets with dual-mode approaches.
- Dependence of MCAS on time varying targets.
- Efficient admissible set algorithms with time varying targets.
- MATLAB comparison of dual-mode approaches with time varying targets.

## 1. Introduction

Gives an overview of what constraints might be and a simple heuristic explanation of their importance. Gives several examples of how a failure to take systematic account of constraints can cause nominal control strategies either to fail entirely or, at best, give rise to very poor behaviour, despite being supposedly well tuned for the unconstrained case

- A video talk through is available here.

## 2. Quadratic programming optimisations

Gives a brief overview of a quadratic programming optimisation, explaining in pictorial terms what the problem looks like and hence how linear constraints give rise to different solutions. Emphasises how the unconstrained optimal could be far away from the constrained optimal and more importantly, gives an example of where the unconstrained optimal can even be very misleading thus motivating the need not to deploy a simple saturation solution.

## 3. Including constraints in GPC

Introduces the common constraints of input rates, input limits and output limits. Shows how these can be applied to the predictions within a simple GPC control law and in particular, how all the constraints from each sample can be concatenated into a simple set of matrix/vector inequalities suitable for use in a QP optimisation. Emphasises the fact that the inequalities change every sample and thus must be updated every sample.

- Video talk throughs are available here.

## 4. Constrained GPC simulations with MATLAB

Defines the constrained GPC algorithm and then introduces and demonstrates code for implementing a constrained GPC algorithm. Provides numerous examples to illustrate how deploying systematic constraint handling affects performance. Code available on the googlesites.

- A video talk through is available here.

## 5. Constrained GPC with a T-filter

Shows how constraint handling differs when a T-filter is deployed. Uses MATLAB demonstrations to illustrate the impact and in particular shows that the changes to sensitivity noted in the earlier chapters seem to carry across. Code available on the googlesites.

- Videos are available here.

## 6. Constraint handling in DMC

A brief discussion of how constraint handling is deployed within a DMC algorithm. This video does not include MATLAB code as the required coding is so similar to GPC.

- A video is available here.

## 7. Constraint handling with independent model GPC

Using an independent model for prediction gives rise to different prediction equations which thus affects the performance index and constraint inequalities. This video gives the details for a a transfer function based GPC algorithm and also demonstrates some MATLAB code for implementation. Finishes with a brief discussion of state space independent models. Code available on the googlesites.

- A video is available here.

## 8. Invariant sets

Introduces the concept of an admissible set as a tractable means of testing constraint satisfaction for predictions which evolve over an infinite horizon. Demonstrates elementary, albeit inefficient, code for determining these sets. Shows that an admissible set is often much smaller than sample constraints would indicate.

- A video is available here

## 9. Dual-mode approaches: the regulation case

Shows how admissible set algorithms can be applied to the OMPC/SOMPC algorithms in order to ensure the predictions satsify constraints using a finite number of inequalities. Focus is on the regulation case. MATLAB code is included to demonstrate the sets being used within an OMPC context to give optimum constrained performance while retaining guarantees of convergence.

- Videos are available here

## 10. Dual-mode approaches: the tracking case

Shows how the computation of admissible sets for ensuring predictions meet constraints can be extended to the non-zero target for scenario. This video deploys deviation variables and thus reduces the problem to an equivalent regulation problem. MATLAB code and examples are provided but it is clear that the approach is somewhat inflexible.

- Videos are available here.

## 11. Dual-mode MATLAB implementation with tracking

This video shows that constraint handling can utilise an equivalent technique to GPC, that is, simply compute the predictions explicitly and compare them to constraints over a long enough horizon. This approach is easy to code, easily allows time varying targets//disturbances but is somewhat inefficient and raises the issue of what horizon is long enough. MATLAB examples provided.

- A video is available here.

## 12. Reachable targets with dual-mode approaches

This video is somewhat of an aside. Dual-mode approaches assume the predictions converge to a specified steady-state which is linked to the target and disturbance. Therefore, it is necessary that the steady-state is reachable within the constraints specified and this implies conditions or restrictions are required for the allowable choices of target.

- A video is available here.

## 13. Dependence of MCAS on time varying targets

This video shows how one can construct an admissible set for dual-mode algorithms which have time varying targets (notionally admissible sets assume a constant target). This video is more conceptual and hence uses an inefficient solver, but MATLAB code demonstrates the principle that suitable sets which include the d.o.f., target and system state as set 'state' variables are computable with a finite number of inequalities.

- A video is available here.

## 14. Efficient admissible set algorithms with time varying targets

This chapter finishes by introducing more efficient admissible set approaches. This video shows how one can use a slightly different iteration within the admissible set algorithm and this enables much faster convergence and also a sensible procedure for eliminating redundant inequalities. The code is applied to a dual-mode algorithm within MATLAB.

- A video is available here

## 15. MATLAB comparison of dual-mode approaches with time varying targets.

A summary of the procedure for handling constraints in a dual-mode algorithm along with a few elementary comparisons of the three different methods discussed.

- A video is available here.