# Chapter 3: Finite horizon predictive control laws: definitions and tuning

This chapter introduces finite horizon predictive control law definitions and how these result in a fixed form control law, for the constraint free case. This is followed by a discussion of the 'so-called' tuning parameters and the impact these have on closed-loop behaviour. The initial resources summarise the GPC algorithm, but without any real discussion of what constitutes good and bad choices for the input/output horizons and control weighting. This chapter uses a large number of illustrations to help the viewer understand the role of these parameters better and consequently to make an intuitively sensible proposals about what choices are definitely bad. The insights lead to a proposal for a moderately systematic design procedure which is validated on a number of examples.

- Introduction.
- GPC performance index and control law .
- GPC loop analysis and MATLAB simulations.
- Sensitivity of GPC laws.
- The T-filter in GPC.
- State-space models in GPC.
- Dynamic Matrix Control.
- Using independent model formulations in GPC.
- Examples of the impact of different horizon choices.
- Long and short output horizons in GPC.
- Long and short input horizons in GPC.
- The impact of control weighting in GPC.
- Controlling open-loop unstable processes with GPC.
- Systematic choices of horizons in GPC.

## 1. Introduction

Looks at logical prediction structures for predictive control and the degrees of freedom within these. Also demonstrates how one can form compact representations of performance indices which enable simple matrix/vector algebra and optimisation.

- A video talk through is available here.

## 2. GPC performance index and control law

Shows how one can combine the predictions and a performance index in order to form a GPC control law. Includes an aside on optimisation of multivariable functions. The law is given in matrix/vector format and shown to be linear in the core signals (target, input and output). Shows how the GPC control law expressed in matrix/vector format can be interpreted as being equivalent to a transfer function implementation. Gives the associated closed-loop block diagram and the details required to form the control law parameters.

## 3. GPC loop analysis and MATLAB simulations

Demonstrates how the closed-loop control law parameters and associated pole polynomial can be computed for the SISO and MIMO cases. Demonstrates some simple MATLAB code for developing and implementing a GPC control law, SISO and MIMO case. Code is highly transparent but also simple so that users can edit easily, modify horizons, weights, models and overlay responses for different choices. Code available on the googlesites.

## 4. Sensitivity of GPC laws

Introduces the sensitivity functions for a simple GPC feedback loop. Demonstrates through examples that although disturbance rejection is good, noise rejection may be very poor and indeed could be considered unsatisfactory.

- A video talk through is available here.

## 5. The T-filter in GPC

Introduces the T-filter. What is it and why is it included? How is it included and how does this affect the predictions to be deployed in a GPC control law. How does the T-filter change behaviour? Derives the GPC law with predictions based on a T-filter and then looks the changes to the closed-loop transferences and sensitivity with a T-filter and shows how these compare to GPC without a T-filter. Uses MATLAB to illustrate code required to do GPC with a T-filter and compare behaviour with and without a T-filter. Considers prediction, control law formulation, simulation and sensitivity. Code is all available on the googlesites.

## 6. State-space models in GPC

Looks at how the GPC control law changes if one wants to use a state space model. For convenience, proposes a slightly different choice of performance index. Also demonstrates the equivalent state feedback and hence how once could determine closed-loop poles.

- A video is available here.

## 7. Dynamic Matrix Control

Uses the context of GPC in the earlier videos to introduce DMC and thus highlight the main conceptual similarities and differences.

- A video is available here.

## 8. Using independent model formulations in GPC

Introduces the concept of an 'independent model'. Shows how this differs from more conventional prediction models and the impact this has on the construction of the control law. Backed up with MATLAB code and demonstrations.

- A video is available here.

## 9. Examples of the impact of different horizon choices

Demonstrates through example how some 'popular' choices for the horizons can actually lead to every poor behaviour. Uses this as a motivation for the need to investigate and understand the role of the horizons and weighting more carefully.

- A video is available here.

## 10. Long and short output horizons in GPC

Gives a number of illustrations of GPC predictions with short output horizons and demonstrates how the associated predictions are often very poor which in turn suggests the GPC optimisation is ill-posed and not to be trusted. Gives a number of illustrations of GPC predictions with long output horizons and demonstrates how the associated predictions can be very good and thus lead to a GPC optimisation which is well-posed and can be be trusted. However, also shows this insight does not necessarily apply to systems with poor open-loop unstable dynamics (e.g. unstable) and moreover is dependent on an appropriate choice of input horizon.

## 11. Long and short input horizons in GPC

Looks at choices of input horizon equal to 2 and demonstrates that for many cases this is not sufficiently flexible to give good predictions and thus cannot lead to an expectation of good closed-loop behaviour. Uses overlays of predictions with many different choices of control horizon to demonstrate how this parameter affects the prediction. It is made clear that the input horizon cannot be considered in isolation from the output horizon. In general one can only have confidence in the predictions if both the input and output horizons are large.

## 12. The impact of control weighting in GPC

Demonstrates that the input weighting parameter has a limited range of efficacy which is linked to the horizons. Moreover, it is shown that the required horizons for a well-posed optimisation are strongly linked to the choice of this weighting. Also demonstrates that the parameter must be used with care with unstable open-loop systems.

- A video is available here.

## 13. Controlling open-loop unstable processes with GPC

Discusses how the basic set up of GPC is not appropriate for designing a compensator for unstable open-loop systems and that any control law that 'works' is likely to do so more by luck than good design and thus should be treated with caution. Gives a brief review of historical adaptions to cope with these scenarios.

- A video is available here.

## 14. Systematic choices of horizons in GPC.

Draws together the insights of the previous 7 videos and proposes a systematic choice for the input and output horizons to ensure that the GPC optimisation is well posed and therefore likely to give a sensible answer. Demonstrates the approach with some numerical examples.

- A video is available here.