264
DISC Course, Lecture Notes Model Predictive Control Ton J.J. van den Boom & Anton A. Stoorvogel January 16, 2010

MPC

Embed Size (px)

Citation preview

Page 1: MPC

DISC Course, Lecture Notes

Model Predictive Control

Ton J.J. van den Boom & Anton A. Stoorvogel

January 16, 2010

Page 2: MPC

2

Page 3: MPC

3

Model Predictive Control

dr.ir. Ton J.J. van den BoomDelft Center for Systems and ControlDelft University of TechnologyMekelweg 2, NL-2628 CD Delft, The NetherlandsTel. (+31) 15 2784052 Fax. (+31) 15 2786679Email: [email protected]

prof.dr. Anton A. StoorvogelDept of Electrical Engineering,Mathematics and Computer Science,Citadel H-222,University of Twente,P.O. Box 217, NL-7500 AE Enschede, The NetherlandsTel. (+31) 53 4893449 Fax. (+31) 53 4893800Email: [email protected]

Page 4: MPC

4

Page 5: MPC

Contents

1 Introduction 91.1 Model predictive control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.2 History of Model Predictive Control . . . . . . . . . . . . . . . . . . . . . . 10

2 The basics of model predictive control 132.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.2 Process model and disturbance model . . . . . . . . . . . . . . . . . . . . . 13

2.2.1 Input-output (IO) models . . . . . . . . . . . . . . . . . . . . . . . 152.2.2 Other model descriptions . . . . . . . . . . . . . . . . . . . . . . . . 20

2.3 Performance index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.4 Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.5 Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282.6 Receding horizon principle . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3 Prediction 313.1 Noiseless case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323.2 Noisy case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.3 The use of a priori knowledge in making predictions . . . . . . . . . . . . . 36

4 Standard formulation 394.1 The performance index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394.2 Handling constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

4.2.1 Equality constraints . . . . . . . . . . . . . . . . . . . . . . . . . . 464.2.2 Inequality constraints . . . . . . . . . . . . . . . . . . . . . . . . . . 48

4.3 Structuring the input with orthogonal basisfunctions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

4.4 The standard predictive control problem . . . . . . . . . . . . . . . . . . . 514.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

5 Solving the standard predictive control problem 555.1 The finite horizon SPCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

5.1.1 Unconstrained standard predictive control problem . . . . . . . . . 565.1.2 Equality constrained standard predictive control problem . . . . . . 58

5

Page 6: MPC

6 CONTENTS

5.1.3 Full standard predictive control problem . . . . . . . . . . . . . . . 625.2 Infinite horizon SPCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

5.2.1 Steady-state behavior . . . . . . . . . . . . . . . . . . . . . . . . . . 665.2.2 Structuring the input signal for infinite horizon MPC . . . . . . . . 675.2.3 Unconstrained infinite horizon SPCP . . . . . . . . . . . . . . . . . 695.2.4 The infinite Horizon Standard Predictive Control Problem with con-

trol horizon constraint . . . . . . . . . . . . . . . . . . . . . . . . . 725.2.5 The Infinite Horizon Standard Predictive Control Problem with struc-

tured input signals . . . . . . . . . . . . . . . . . . . . . . . . . . . 765.3 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

5.3.1 Implementation and computation in LTI case . . . . . . . . . . . . 895.3.2 Implementation and computation in full SPCP case . . . . . . . . . 91

5.4 Feasibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 965.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

6 Stability 1016.1 Stability for the LTI case . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1016.2 Stability for the inequality constrained case . . . . . . . . . . . . . . . . . 1056.3 Modifications for guaranteed stability . . . . . . . . . . . . . . . . . . . . . 1056.4 Relation to IMC scheme and Youla parametrization . . . . . . . . . . . . . 116

6.4.1 The IMC scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1166.4.2 The Youla parametrization . . . . . . . . . . . . . . . . . . . . . . . 121

6.5 Robustness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

7 MPC using a feedback law, based on linear matrix inequalities 1317.1 Linear matrix inequalities . . . . . . . . . . . . . . . . . . . . . . . . . . . 1327.2 Unconstrained MPC using linear matrix inequalities . . . . . . . . . . . . . 1347.3 Constrained MPC using linear matrix inequalities . . . . . . . . . . . . . . 1377.4 Robustness in LMI-based MPC . . . . . . . . . . . . . . . . . . . . . . . . 1407.5 Extensions and further research . . . . . . . . . . . . . . . . . . . . . . . . 146

8 Tuning 1518.1 Initial settings for the parameters . . . . . . . . . . . . . . . . . . . . . . . 152

8.1.1 Initial settings for the summation parameters . . . . . . . . . . . . 1528.1.2 Initial settings for the signal weighting parameters . . . . . . . . . . 154

8.2 Tuning as an optimization problem . . . . . . . . . . . . . . . . . . . . . . 1588.3 Some particular parameter settings . . . . . . . . . . . . . . . . . . . . . . 163

Appendix A: Quadratic Programming 167

Appendix B: Basic State Space Operations 177

Appendix C: Some results from linear algebra 181

Page 7: MPC

CONTENTS 7

Appendix D: Model descriptions 183D.1 Impulse and step response models . . . . . . . . . . . . . . . . . . . . . . . 183D.2 Polynomial models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191

Appendix E: Performance indices 201

Appendix F: Manual MATLAB Toolbox 205Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

Index 257

References 259

Page 8: MPC

8 CONTENTS

Abbreviations

CARIMA model controlled autoregressive integrated moving averageCARMA model controlled autoregressive moving averageDMC Dynamic Matrix ControlEPSAC Extended Prediction Self-Adaptive ControlGPC Generalized Predictive ControlIDCOM Identification CommandIIO model Increment-Input Output modelIO model Input Output modelLQ control Linear-Quadratic controlLQPC Linear-Quadratic predictive controlMAC Model Algorithmic ControlMBPC Model Based Predictive ControlMHC Moving Horizon ControlMIMO Multiple-Input Multiple-OutputMPC Model Predictive ControlPFC Predictive Functional ControlQDMC Quadratic Dynamic Matrix ControlRHC Receding Horizon ControlSISO Single-Input Single-OutputSPC Standard Predictive ControlUPC Unified Predictive Control

Page 9: MPC

Chapter 1

Introduction

1.1 Model predictive control

Process industry is characterized by product quality specifications which become moreand more tight, increasing productivity demands, new environmental regulations and fastchanges in the economical market. In the last decades Model Predictive Control (MPC),also referred to as Model Based Predictive Control (MBPC), Receding Horizon Control(RHC) and Moving Horizon Control (MHC), has shown to be able to respond in an effectiveway to these demands in many practical process control applications and is therefore widelyaccepted in process industry. MPC is more of a methodology than a single technique.The difference in the various methods is mainly the way the problem is translated intoa mathematical formulation, so that the problem becomes solvable in a limited amountof time. However, in all methods five important items are recognizable in the designprocedure:

Process and disturbance model: The process and disturbance models are mostly cho-sen linear. Extensions to nonlinear models can be made, but will not be consideredin this course. On the basis of the model a prediction of the process signals over aspecified horizon is made. A good performance in the presence of disturbances canbe obtained by using a prediction of the effect of the disturbance signal, given itscharacteristics in the form of a disturbance model.

Performance index: A quadratic (2-norm) performance-index or cost-criterion is formu-lated, reflecting the reference tracking error and the control action.

Constraints: In practical situations, there will be constraints on control, state and outputsignals, motivated by safety and environmental demands, economic requirements,such as cost, and equipment limitations.

Optimization: An optimization algorithm will be applied to compute a sequence of futurecontrol signals that minimizes the performance index subject to the given constraints.

9

Page 10: MPC

10 CHAPTER 1. Introduction

For linear models with linear constraints and a quadratic performance index thesolution can be found using quadratic programming algorithms.

Receding horizon principle: Predictive control uses the so-called receding horizon prin-ciple. This means that after computation of the optimal control sequence, only thefirst control sample will be implemented, subsequently the horizon is shifted onesample and the optimization is restarted with new information of the measurements.

1.2 History of Model Predictive Control

Since 1970 various techniques have been developed for the design of model based controlsystems for robust multivariable control of industrial processes ([10], [24], [25], [29], [43],[46]). Predictive control was pioneered simultaneously by Richalet et al. [53], [54] andCutler & Ramaker [18]. The first implemented algorithms and successful applications werereported in the referenced papers. Model Predictive Control technology has evolved froma basic multivariable process control technology to a technology that enables operationof processes within well defined operating constraints [2], [6]), [50]. The main reasons forincreasing acceptance of MPC technology by the process industry since 1985 are clear:

• MPC is a model based controller design procedure, which can easily handle processeswith large time-delays, non-minimum phase and unstable processes.

• It is an easy-to-tune method, in principle there are only three basic parameters to betuned.

• Industrial processes have their limitations in, for instance, valve capacity and othertechnological requirements and are supposed to deliver output products with somepre-specified quality specifications. MPC can handle these constraints in a systematicway during the design and implementation of the controller.

• Finally MPC can handle structural changes, such as sensor and actuator failures,changes in system parameters and system structure by adapting the control strategyon a sample-by-sample basis.

However, the main reasons for its popularity are the constraint-handling capabilities, theeasy extension to multivariable processes and most of all increased profit as discussed in thefirst section. From academic side the interest in MPC mainly came from the field of self-tuning control. The problem of Minimum Variance control (Astrom & Wittenmark [3]) wasstudied while minimizing the performance index J(u, k) = E ( r(k + d)− y(k + d) )2at time k, where y(k) is the process output signal, u(k) is the control signal, r(k) is thereference signal, E(·) stands for expectation and d is the process dead-time. To overcomestability problems with non-minimum phase plants, the performance index was modifiedby adding a penalty on the control signal u(k). Later this u(k) in the performance indexwas replaced by the increment of the control signal ∆u(k) = u(k)− u(k − 1) to guarantee

Page 11: MPC

1.2. HISTORY OF MODEL PREDICTIVE CONTROL 11

a zero steady-state error. To handle a wider class of unstable and non-minimum phasesystems and systems with poorly known delay the Generalized Predictive Control (GPC)scheme (Clarke et al. [13],[14]) was introduced with a quadratic performance index.In GPC mostly polynomial based models are used. For instance, Controlled AutoRegres-sive Moving Average (CARMA) models or Controlled AutoRegressive Integrated MovingAverage (CARIMA) models are popular. These models describe the process using a mini-mum number of parameters and therefore lead to effective and compact algorithms. MostGPC-literature in this area is based on Single-Input Single-Output (SISO) models. How-ever, the extension to Multiple-Input Multiple-Output (MIMO) systems is straightforwardas was shown by De Vries & Verbruggen [21] using a MIMO polynomial model, and byKinnaert [34] using a state-space model.This text covers state-of-the-art technologies for model predictive process control that aregood candidates for future generations of industrial model predictive control systems. Likeall other controller design methodologies, MPC also has its drawbacks:

• A detailed process model is required. This means that either one must have a goodinsight in the physical behavior of the plant or system identification methods haveto be applied to obtain a good model.

• The methodology is open, and many variations have led to a large number of MPC-methods. We mention IDCOM (Richalet et al. [54]), DMC (Cutler & Ramaker [17]),EPSAC (De Keyser and van Cauwenberghe [20]), MAC (Rouhani & Mehra [57]),QDMC (Garcıa & Morshedi [27]), GPC (Clarke et al. [14][15]), PFC (Richalet et al.[52]), UPC (Soeterboek [61]).

• Although, in practice, stability and robustness are easily obtained by accurate tuning,theoretical analysis of stability and robustness properties are difficult to derive.

Still, in industry, for supervisory optimizing control of multivariable processes MPC is oftenpreferred over other controller design methods, such as PID, LQ and H∞. A PID controlleris also easily tuned but can only be straightforwardly applied to SISO systems. LQ andH∞ can be applied to MIMO systems, but cannot handle signal constraints in an adequateway. These techniques also exhibit difficulties in realizing robust performance for varyingoperating conditions. Essential in model predictive control is the explicit use of a modelthat can simulate dynamic behavior of the process at a certain operating point. In thisrespect, model predictive control differs from most of the model based control technologiesthat have been studied in academia in the sixties, seventies and eighties. Academic researchhas been focusing on the use of models for controller design and robustness analysis ofcontrol systems for quite some time. With their initial work on internal model basedcontrol, Garcia and Morari [26] made a first step towards bridging academic research inthe area of process control and industrial developments in this area. Significant progresshas been made in understanding the behavior of model predictive control systems, and a lotof results have been obtained on stability, robustness and performance of MPC (Soeterboek[61], Camacho and Bordons [11], Maciejowski [44], Rossiter [56]).

Page 12: MPC

12 CHAPTER 1. Introduction

Since the pioneering work at the end of the seventies and early eighties, MPC has becomethe most widely applied supervisory control technique in the process industry. Many papersreport successful applications (see Richalet [52], and Qin and Badgewell [50]).

Page 13: MPC

Chapter 2

The basics of model predictivecontrol

2.1 Introduction

MPC is more of a methodology than a single technique. The difference in the variousmethods is mainly the way the problem is translated into a mathematical formulation, sothat the problem becomes solvable in the limited time interval available for calculation ofadequate process manipulations in response to external influences on the process behav-ior (Disturbances). However, in all methods five important items are part of the designprocedure:

1. Process model and disturbance model

2. Performance index

3. Constraints

4. Optimization

5. Receding horizon principle

In the following sections these five ingredients of MPC will be discussed.

2.2 Process model and disturbance model

The models applied in MPC serve two purposes:

• Prediction of the behavior of the future output of the process on the basis of inputsand known disturbances applied to the process in the past

• Calculation of the input signal to the process that minimizes the given objectivefunction

13

Page 14: MPC

14 CHAPTER 2. THE BASICS OF MODEL PREDICTIVE CONTROL

The models required for these tasks do not necessarily have to be the same. The modelapplied for prediction may differ from the model applied for calculation of the next controlaction. In practice though both models are almost always chosen to be the same.As the models play such an important role in model predictive control the models arediscussed in this section. The models applied are so called Input-Output (IO) models.These models describe the input-output behavior of the process. The MPC controllerdiscussed in the sequel explicitly assumes that the superposition theorem holds. Thisrequires that all models used in the controller design are chosen to be linear. Two typesof IO models are applied:

• Direct Input-Output models (IO models) in which the input signal is directly appliedto the model.

• Increment Input-Output models (IIO models) in which the increments of the inputsignal are applied to the model instead of the input directly.

The following assumptions are made with respect to the models that will be used:

1. Linear

2. Time invariant

3. Discrete time

4. Causal

5. Finite order

Linearity is assumed to allow the use of the superposition theorem. The second assump-tion -time invariance- enables the use of a model made on the basis of observations ofprocess behavior at a certain time for simulation of process behavior at another arbitrarytime instant. The discrete time representation of process dynamics supports the samplingmechanisms required for calculating control actions with an MPC algorithm implementedin a sequential operating system like a computer. Causality implies that the model doesnot anticipate future changes of its inputs. This aligns quite well with the behavior ofphysical, chemical, biological systems. The assumption regarding the order of the modelto be finite implies that models and model predictions can always be described by a set ofexplicit equations. Of course, these assumptions have to be validated against the actualprocess behavior as part of the process modeling or process identification phase.In this chapter only discrete time models will be considered. The control algorithm willalways be implemented on a digital computer. The design of a discrete time controller isobvious. Further a linear time-invariant continuous time model can always be transformedinto a linear time-invariant discrete time model using a zero-order hold z-transformation.The most general description of linear time invariant systems is the state space descrip-tion. Models, given in a impulse/step response or transfer function structure, can easily beconverted into state space models. Computations can be done numerically more reliable if

Page 15: MPC

2.2. PROCESS MODEL AND DISTURBANCE MODEL 15

based on (balanced) state space models instead of impulse/step response or transfer func-tion models, especially for multivariable systems (Kailath [33]). Also system identification,using the input-output data of a system, can be done using reliable and fast algorithms(Ljung [41]; Verhaegen & Dewilde [71]; Van Overschee [70]).

2.2.1 Input-output (IO) models

In this course we consider causal, discrete time, linear, finite-dimensional, time-invariantsystems given by

y(k) = Go(q) u(k) + Fo(q)do(k) +Ho(q)eo(k) (2.1)

in which Go(q) is the process model, Fo(q) is the disturbance model, Ho(q) is the noisemodel, y(k) is the output signal, u(k) is the input signal, do(k) is a known disturbancesignal, eo(k) is zero-mean white noise (ZMWN) and q is the shift-operator q−1 y(k) =y(k − 1). We assume Go(q) to be strictly proper, which means that y(k) does not dependon the present value of u(k), but only on past values u(k − j), j > 0.

Go

Fo

Ho

- - -

6

6

?

?e

u(k)

eo(k)

do(k)

y(k)

Figure 2.1: Input-Output (IO) model

A state space representation for this system can be given as

xo(k + 1) = Aoxo(k) +Koeo(k) + Lodo(k) +Bou(k) (2.2)

y(k) = Coxo(k) +DHeo(k) +DFdo(k) (2.3)

and so the transfer functions Go(q), Fo(q) and Ho(q) can be given as

Go(q) = Co ( q I − Ao )−1Bo (2.4)

Fo(q) = Co ( q I − Ao )−1Lo +DF (2.5)

Ho(q) = Co ( q I − Ao )−1Ko +DH (2.6)

Page 16: MPC

16 CHAPTER 2. THE BASICS OF MODEL PREDICTIVE CONTROL

Bo

Ao

q−1 Co

Ko

Lo

DH

DF

- - - - - -

-

6

6

6

-

?

?

?

JJ

JJ]

e eu(k) xo(k+1) xo(k) y(k)

eo(k)

do(k)

Figure 2.2: State space representation of the model

Increment-input-output (IIO) models

Sometimes it is useful not to work with the input signal u(k) itself, but with the inputincrement instead, defined as

∆u(k) = u(k)− u(k − 1) = (1− q−1)u(k) = ∆(q)u(k)

where ∆(q) = (1− q−1) is denoted as the increment operator. Using the increment of theinput signal implies that the model keeps track of the actual value of the input signal. Themodel needs to integrate the increments of the inputs to calculate the output correspondingwith the input signals actually applied to the process. We obtain an increment-input-output (IIO) model:

IIO-model: y(k) = Gi(q) ∆u(k) + Fi(q) di(k) +Hi(q) ei(k) (2.7)

where di(k) is a known disturbance signal and ei(k) is ZMWN. A state space representationfor this system is given by

xi(k + 1) = Aixi(k) +Kiei(k) + Lidi(k) +Bi∆u(k) (2.8)

y(k) = Cixi(k) +DHei(k) +DFdi(k) (2.9)

The transfer functions Gi(q) and Hi(q) become

Gi(q) = Ci ( q I − Ai )−1Bi (2.10)

Fi(q) = Ci ( q I − Ai )−1Li +DF (2.11)

Hi(q) = Ci ( q I − Ai )−1Ki +DH (2.12)

Page 17: MPC

2.2. PROCESS MODEL AND DISTURBANCE MODEL 17

Relation between IO and IIO model

Given an IO-model with state space realization

xo(k + 1) = Ao xo(k) +Ko eo(k) + Lo do(k) +Bo u(k)

y(k) = Co xo(k) +DH eo(k) +DF do(k)

Define the system matrices

Ai =

[

I Co0 Ao

]

Bi =

[

0Bo

]

Ki =

[

DH

Ko

]

Ci =[

I Co]

Li =

[

DF

Lo

]

the disturbance and noise signals

di(k) = ∆do(k) = do(k)− do(k − 1)

ei(k) = ∆eo(k) = eo(k)− eo(k − 1)

and new state

xi(k) =

[

y(k − 1)∆xo(k)

]

where ∆xo(k) = xo(k) − xo(k − 1) is the increment of the original state. Then the statespace realization, given by

xi(k + 1) = Ai xi(k) +Ki ei(k) + Li di(k) +Bi ∆u(k)

y(k) = Ci xi(k) +DH ei(k) +DF di(k)

looks like a IIO model of the original IO model. However, there is one crucial difference.In the IO model, the noise eo is ZMWN but this implies that ei as defined above will beintegrated ZMWN. However, for the IIO model it is customary to assume that ei itself isZMWN. It is common to use the above model and assume that ei is ZMWN. This changesthe model compared to the original IO model but the advantage is that the resulting IIOmodel is better able to handle drift terms in the noise.An interesting observation in comparing the IO model with the corresponding IIO modelis the increase of the number of states with the number of outputs of the system. As canbeen seen from the state matrix Ai of the IIO model this increase in the number of statescompared to the state matrix Ao of the IO model is related to the integrators required forcalculating the actual process outputs on the basis of input increments. The additionaleigenvalues of Ai are all integrators: eigenvalues λi = 1.Proof:From (2.2) we derive

∆xo(k + 1) = Ao ∆xo(k) +Ko ∆eo(k) + Lo ∆do(k) +Bo ∆u(k)

∆y(k) = Co ∆xo(k) +DH ∆eo(k) +DF ∆do(k)

Page 18: MPC

18 CHAPTER 2. THE BASICS OF MODEL PREDICTIVE CONTROL

and so for the output signal we derive

y(k) = y(k − 1) + ∆y(k) =

= y(k − 1) + Co ∆xo(k) +DH ∆eo(k) +DF ∆do(k)

so based on the above equations we get:[

y(k)∆xo(k + 1)

]

=

[

I Co0 Ao

][

y(k − 1)∆xo(k)

]

+

[

DH

Ko

]

∆eo(k) +

+

[

DF

Lo

]

∆do(k) +

[

0Bo

]

∆u(k)

y(k) =[

I Co]

[

y(k − 1)∆xo(k)

]

+DH∆eo(k) +DF∆do(k)

by substitution of the variables xi(k), di(k) and ei(k) and the matrices Ai, Bi, Li, Ki andCi the state space IIO model is found. 2 End Proof

The transfer functions of the IO-model and IIO-model are related by

Gi(q) = Go(q)∆(q)−1

Fi(q) = Fo(q)∆(q)−1

Hi(q) = Ho(q)∆(q)−1

(2.13)

where ∆(q) = (1− q−1). In appendix D, we will show how the other models, like impulseresponse models, step response models and polynomial models relate to state space models.

The advantage of using an IIO model

The main reason for using an IIO model is the good steady-state behavior of the controllerdesigned on the basis of this IIO model. As indicated above the IIO model simulatesprocess outputs on the basis of input increments. This implies that the model must haveintegrating action to describe the behavior of processes that have steady state gains unequalto zero. The integrating behavior of the model also implies that the model output can takeany value with inputs being equal to zero. This property of the IIO model appears to bevery attractive for good steady state behavior of the control system as we will see.

Steady-state behavior of an IO model: Consider a IO model Go(q) without a polein q = 1, so ‖Go(1)‖ < ∞. Further assume eo(k) = 0 and do(k) = 0 for all k. Moreover,assume that our controller stabilizes the system. In that case, if u −→ uss for k −→∞ theny −→ yss = Go(1)uss for k −→ ∞. This process is controlled by a predictive controller,minimizing the IO performance index

J(k) =

N2∑

j=1

‖y(k + j)− r(k + j)‖2 + λ2‖u(k + j − 1)‖2

Page 19: MPC

2.2. PROCESS MODEL AND DISTURBANCE MODEL 19

Let the reference be constant r(k) = rss 6= 0 for large k, and let k −→ ∞. Then u and ywill reach their steady-state and so J(k) = N2Jss for k −→ ∞, where

Jss = ‖yss − rss‖2 + λ2‖uss‖2

= ‖Go(1)uss − rss‖2 + λ2‖uss‖2

= uTss

(

GTo (1)Go(1) + λ2I

)

uss − 2uTssGTo (1)rss + rTssrss

Minimizing Jss over uss means that

∂Jss/∂uss = 2(

GTo (1)Go(1) + λ2I

)

uss − 2GTo (1)rss = 0

so

uss =(

GTo (1)Go(1) + λ2I

)−1

GTo (1)rss

The steady-state output becomes

yss = Go(1)(

GTo (1)Go(1) + λ2I

)−1

GTo (1)rss

It is clear that yss 6= rss for λ > 0 and for this IO model there will always be a steady-stateerror for rss 6= 0 and λ > 0.

Steady-state behavior of an IIO model:

Consider the above model in IIO form, so Gi(q) = ∆−1Go(q) under the same assumptionsas before, i.e. Go(1) is well-defined. Moreover, eo = 0 and do = 0 which implies that ei = 0and di = 0. Let it be controlled by a stabilizing predictive controller, minimizing the IIOperformance index

J(k) =

N2∑

j=1

‖y(k + j)− r(k + j)‖2 + λ2‖∆u(k + j − 1)‖2

In steady state the output is given by yss = Go(1)uss and the increment input becomes∆uss = 0, because the input signal u = uss has become constant. In steady-state we willreach the situation that the performance index becomes J(k) = N2Jss for k −→∞, where

Jss = ‖yss − rss‖2

The optimum Jss = 0 is obtained for yss = rss which means that no steady-state erroroccurs. It is clear that for a good steady-state behavior in the presence of a referencesignal, it is necessary to design the predictive controller on the basis of an IIO model.

Page 20: MPC

20 CHAPTER 2. THE BASICS OF MODEL PREDICTIVE CONTROL

The standard model

In this course we consider the following standard model:

x(k + 1) = Ax(k) +B1 e(k) +B2w(k) +B3 v(k) (2.14)

y(k) = C1 x(k) +D11 e(k) +D12w(k) (2.15)

where x(k) is the state, e(k) is zero-mean white noise (ZMWN), v(k) is the control signal,w(k) is a vector containing all known external signals, such as the reference signal andknown (or measurable) disturbances, and y(k) is the measurement. The control signalv(k) can be either u(k) or ∆u(k).

2.2.2 Other model descriptions

In this course we will consider state space description (2.14)-(2.15) as the model for thesystem. In literature three other model descriptions are also often used, namely the impulseresponse models, the step response models and the polynomial model. In this section wewill shortly describe their features, and discuss the choice of model description.

Impulse and step response models

MPC has part of its roots in the process industry, where the use of detailed dynamicalmodels is less common. To get reliable dynamical models of these processes on the basisof physical laws is difficult and it is therefore not surprising that the first models used inMPC were impulse and step response models (Richalet [54]), (Cutler & Ramaker [17]).The models are easily obtained by rather simple experiments and give good models forsufficiently large length of the impulse/step response.In appendix D.1 more detailed information is given on impulse and step response models.

Polynomial models

Sometimes good models of the process can be obtained on the basis of physical laws orby parametric system identification. In that case a polynomial description of the modelis preferred (Clarke et al.[14],[15]). Less parameters are used than in impulse or stepresponse models and in the case of parametric system identification, the parameters canbe estimated more reliably (Ljung [41]).In appendix D.2 more detailed information is given on polynomial models.

Choice of model description

Whatever model is used to describe the process behavior, the resulting predictive controllaw will (at least approximately) give the same performance. Differences in the use of amodel are in the effort of modeling, the model accuracy that can be obtained, and in thecomputational power that is needed to realize the predictive control algorithm.

Page 21: MPC

2.3. PERFORMANCE INDEX 21

Finite step response and finite impulse response models (non-parametric models) needmore parameters than polynomial or state space models (parametric models). The largerthe number of parameters of the model the lower the average number of data pointsper parameter that needs to be estimated during identification. As a consequence thevariance of the estimated parameters will be larger for the parameters of non-parametricmodels than for semi-parametric and parametric models. In turn, the variance of estimatedparameters of semi-parametric models will be larger than the variance of the parametersof parametric models. This does not necessarily imply that the quality of the predictionswith parametric models outperforms the predictions of non-parametric models! If the testsignals applied for process identification have excited all relevant dynamics of the processpersistently, the qualities of the predictions are generally the same despite the significantlylarger variance of the estimated model parameters. On the other hand step responsemodels are intuitive, need less a priori information for identification and the predictionsare constructed in a natural way. The models can be understood without any knowledgeof dynamical systems. Step response models are often still preferred in industry, becauseadvanced process knowledge is usually scarce and additional experiments are expensive.The polynomial description is very compact, gives good (physical) insight in the systemsproperties and the resulting controller is compact as well. However, as we will see later,making predictions may be cumbersome and the models are far from practical for multi-variable systems.State space models are especially suited for multivariable systems, still providing a compactmodel description and controller. The computations are usually well conditioned and thealgorithms easy to implement.

2.3 Performance index

A performance-index or cost-criterion is formulated, measuring the reference tracking errorand the control action. Let z1(k) be a signal, reflecting the reference tracking error and letz2(k) be a signal, reflecting the control action. The following 2-norm performance index isintroduced:

J(v, k) =

N∑

j=Nm

zT1 (k+j−1|k)z1(k+j−1|k)+N∑

j=1

zT2 (k+j−1|k)z2(k+j−1|k) (2.16)

where zi(k + j − 1|k), i = 1, 2 is the prediction of zi(k + j − 1) at time k. The variable Ndenotes the prediction horizon, the variable Nm denotes the minimum cost-horizon.In the MPC literature and in industrial application of MPC three performance indicesoften appear:

• Generalized Predictive Control (GPC) performance index.

• Linear Quadratic Predictive Control (LQPC) performance index

• Zone performance index

Page 22: MPC

22 CHAPTER 2. THE BASICS OF MODEL PREDICTIVE CONTROL

These three performance indices can all be rewritten into the standard form of (2.16).

Generalized Predictive Control (GPC)

In the Generalized Predictive Control (GPC) method (Clarke et al., [14][15]) the perfor-mance index is based on control and output signals:

J(u, k) =N∑

j=Nm

(

yp(k + j|k)− r(k + j))T(

yp(k + j|k)− r(k + j))

+

+λ2N∑

j=1

∆uT (k + j − 1|k)∆u(k + j − 1|k) (2.17)

yp(k) = P (q)y(k) is the weighted process output signalr(k) is the reference trajectoryy(k) is the process output signal

∆u(k) is the process control increment signalNm is the minimum cost-horizonN is the prediction horizonNc is the control horizonλ is the weighting on the control signal

P (q) = 1+p1q−1+. . .+pnpq

−np is a polynomial with desired closed-loop poles

where yp(k + j|k) is the prediction of yp(k + j), based on knowledge up to time k, theincrement input signal is ∆u(k) = u(k) − u(k − 1) and ∆u(k + j) = 0 for j ≥ Nc. λdetermines the trade-off between tracking accuracy (first term) and control effort (secondterm). The polynomial P (q) can be chosen by the designer and broaden the class of controlobjectives. It can be shown that np of the closed-loop poles will be placed at the locationof the roots of the polynomial P (q).Note that the GPC performance index can be translated into the form of (2.16) by choosing

z(k) =

[

z1(k)z2(k)

]

=

[

yp(k + 1)− r(k + 1)λ∆u(k)

]

Linear Quadratic Predictive Control (LQPC)

In the Linear Quadratic Predictive Control (LQPC) method (Garcıa et al., [28]) the per-formance index is based on control and state signals:

J(u, k) =N∑

j=Nm

xT (k+j|k)Qx(k+j|k) +N∑

j=1

uT (k+j−1|k)Ru(k+j−1|k) (2.18)

Page 23: MPC

2.3. PERFORMANCE INDEX 23

x(k) is the state signal vectoru(k) is the process control signalQ is the state weighting matrixR is the control weighting matrix

where x(k+j|k) is the prediction of x(k+j), based on knowledge until time k. Q and Rare positive semi-definite matrices. In some papers the control increment signal ∆u(k) isused instead of the control signal u(k). Note that the LQPC performance index can betranslated into the form of (2.16) by choosing

z(k) =

[

z1(k)z2(k)

]

=

[

Q1/2x(k + 1)R1/2∆u(k)

]

.

Zone performance index

A performance index that is popular in industry is the zone performance index:

J(u, k) =N∑

j=Nm

(

ǫ(k+j|k))T(

ǫ(k+j|k))

+ λ2N∑

j=1

uT (k+j−1|k)u(k+j−1|k) (2.19)

where ǫi (i = 1, . . . , m) contribute to the performance index only if |yi(k)− ri(k)| > δmax,i.To be more specific:

ǫi(k) =

0 for |yi(k)− ri(k)| ≤ δmax,iyi(k)− ri(k)− δmax,i for yi(k)− ri(k) ≥ δmax,iyi(k)− ri(k) + δmax,i for yi(k)− ri(k) ≤ −δmax,i

so

|ǫi(k)| = min|δi(k)|≤δmax,i

|yi(k)− ri(k) + δi(k)|

The relation between the tracking error y(k)−r(k), the zone-bounds and zone performancesignal ǫ(k) are visualized in figure 2.3. Note that the zone performance index can betranslated into the form of (2.16) by choosing

z(k) =

[

z1(k)z2(k)

]

=

[

r(k + 1)− y(k + 1) + δ(k + 1)λu(k)

]

and

v(k) =

[

u(k)δ(k + 1)

]

with an additional constraint that |δ(k+j)| ≤ δmax.

Page 24: MPC

24 CHAPTER 2. THE BASICS OF MODEL PREDICTIVE CONTROL

0 2 4 6 8 10 12 14 16 18 20−3

−2

−1

0

1

2

3

0 2 4 6 8 10 12 14 16 18 20−1.5

−1

−0.5

0

0.5

1

1.5

y(k

)−r(k

)→

ǫ(k)

k −→

−δ

Figure 2.3: Tracking error y(k)− r(k) and zone performance signal ǫ(k)

Standard performance index

Most papers on predictive control deal with either the GPC or the LQPC performanceindices which are clearly weighted squared 2-norms, which can be rewritten in the form of(2.16). Now introduce the diagonal selection matrix

Γ(j) =

[

0 00 I

]

for 0 ≤ j < Nm − 1

[

I 00 I

]

for Nm − 1 ≤ j ≤ N − 1, (2.20)

and define

z(k) =

[

z1(k)z2(k)

]

.

The performance index can be rewritten in the standard form:

J(v, k) =N−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) (2.21)

In this text, we will mainly deal with this 2-norm standard performance index (2.21). Otherperformance indices can also be used These are often based on other norms, for examplethe 1-norm or the ∞-norm (Genceli & Nikolaou [30], Zheng & Morari [80]).

Page 25: MPC

2.4. CONSTRAINTS 25

2.4 Constraints

In practice, industrial processes are subject to constraints. Specific signals must not violatespecified bounds due to safety limitations, environmental regulations, consumer specifica-tions and physical restrictions such as minimum and/or maximum temperature, pressure,level limits in reactor tanks, flows in pipes and slew rates of valves.Careful tuning of the controller parameters may keep these values away from the bounds.However, because of economical motives, the control system should drive the process to-wards the constraints as close as possible, without violating them: closer to limits in generaloften means closer to maximum profit.Therefore, predictive control employs a more direct approach by modifying the optimalunconstrained solution in such a way that constraints are not violated. This can be doneusing optimization techniques such as linear programming (LP) or quadratic programming(QP) techniques.In most cases the constraints can be translated in bounds on control, state or outputsignals:

umin ≤ u(k) ≤ umax , ∀ k ∆umin ≤ ∆u(k) ≤ ∆umax , ∀ kymin ≤ y(k) ≤ ymax , ∀ k xmin ≤ x(k) ≤ xmax , ∀ k

Under no circumstances the constraints may be violated, and the control action has to bechosen such that the constraints are satisfied. However, when we implement the controllerwe do not know the future state and replace the original constraints by constraints on thepredicted state.Besides inequality constraints we can also use equality constraints. Equality constraintsare usually motivated by the control algorithm itself. An example is the control horizon,which forces the control signal to become constant:

∆u(k+j|k) = 0 for j ≥ Nc

This makes the control signal smooth and the controller more robust. A second exampleis the state end-point constraint

x(k +N |k) = xss

which is related to stability and forces the state at the end of the prediction horizon to itssteady state value xss.To summarize, we see that there are two types of constraints (inequality and equalityconstraints). In this course we look at the two types in a generalized framework:Inequality constraints:

ψ(k) ≤ Ψ(k) ∀k (2.22)

Since we generally do not know future values of ψ, we often use in the optimization at timek, constraints of the form:

ψ(k + j|k) ≤ Ψ(k + j) (2.23)

Page 26: MPC

26 CHAPTER 2. THE BASICS OF MODEL PREDICTIVE CONTROL

for j = 1, . . . , N , where ψ(k+ j|k) is the prediction of ψ(k+ j) at time k. Note that Ψ(k)does not depend on future inputs of the system.

Equality constraints:

φ(k) = 0 ∀k (2.24)

Again we generally do not know future values of φ but we also often want to use equalityconstraints, as noted before, to force the control signal to become constant or to enforcean endpoint penalty. Hence we use:

Ajφ(k + j|k) = 0 (2.25)

for j = 1, . . . , N , where ψ(k+ j|k) is the prediction of ψ(k+ j) at time k. The matrix Aj isused to indicate that certain equality constraints are only active for specific j. For instance,in case of an endpoint penalty, we would choose AN = I and Aj = 0 for j = 0, . . . , N − 1.

In the above formulas φ(k) and ψ(k) are vectors and the equalities and inequalities aremeant element-wise. If there are multiple constraints, for example φ1(k) = 0 and φ2(k) = 0,ψ1(k) ≤ Ψ1(k), . . . , ψ4(k) ≤ Ψ4(k) we can combine them by both stacking them into oneequality constraint and one inequality constraint.

φ(k) =

[

φ1(k)φ2(k)

]

= 0 ψ(k) =

ψ1(k)...

ψ4(k)

Ψ1(k)...

Ψ4(k)

= Ψ(k)

Note that if a variable is bounded two-sided

Ψ1,min ≤ ψ1(k) ≤ Ψ1,max

we can always translate that into two one-sided constraints by setting:

ψ(k) =

[

ψ1(k)−ψ1(k)

]

≤[

Ψ1,max

−Ψ1,min

]

= Ψ(k)

which corresponds to the general form of eqaution (2.22).

The capability of predictive control to cope with signal constraints is probably the mainreason for its popularity. It allows operation of the process within well defined operatinglimits. As constraints are respected, better exploitation of the permitted operating range isfeasible. In many applications of control, signal constraints are present, caused by limitedcapacity of liquid buffers, valves, saturation of actuators and the more. By minimizingperformance index (2.21), subject to these constraints, we obtain the best possible controlsignal within the set of admissible control signals.

Page 27: MPC

2.4. CONSTRAINTS 27

Structuring the input signal

To obtain a tractable optimization problem, the input signal should be structured. Inother words, the degrees of freedom in the future input signal [u(k|k), u(k+1|k), . . . , u(k+N − 1|k)] must be reduced. This can be done in various ways. The most common andmost frequently used method is by using a control horizon, introduce input blocking orparametrize the input with (orthogonal) basis functions.

Control horizon:

When we use a control horizon, the input signal is assumed to be constant from a certainmoment in the future, denoted as control horizon Nc, i.e.

u(k+j|k) = u(k +Nc − 1|k) for j ≥ Nc

Blocking:

Instead of making the input constant beyond the control horizon, we can force the inputto remain constant during some predefined (non-uniform) intervals. In that way, there issome freedom left beyond the control horizon. Define nbl intervals with range (mℓ, mℓ+1).The first m1 control variables (u(k), . . . , u(k + m1 − 1)) are still free. The input beyondm1 is restricted by:

u(k+j|k) = u(k +mℓ − 1|k) for mℓ ≤ j < mℓ+1, ℓ = 1, . . . , nbl

Basis functions:

Parametrization of the input signal can also be done using a set of basis functions:

u(k+j|k) =M∑

i=0

Si(j)αi(k)

where Si(j) are the basis functions, M are the degrees of freedom left, and the scalarsαi(k), i = 1, . . . ,M are the parameters, to be optimized at time k.The already mentioned structuring of the input signal, with either a control horizon orblocking, can be seen as a parametrization of the input signal with a set of basis functions.For example, by introducing a control horizon, we choose M = Nc − 1 and the basisfunctions become:

Si(j) = δ(j − i) for i = 0, . . . , Nc − 2

SNc−1(j) = E(j −Nc + 1)

where δ(k − i) is the discrete-time impulse function, being 1 for j = i and zero elsewhere,and E is the step function, i.e.

E[v] =

0 v < 0

1 v ≥ 0

Page 28: MPC

28 CHAPTER 2. THE BASICS OF MODEL PREDICTIVE CONTROL

The optimization parameters are now equal to

αi(k) = u(k + i|k) for i = 0, . . . , Nc − 1

which indeed corresponds to the Nc free parameters.In the case of blocking, we choose M = m1 + nbl and the basis functions become:

Si(j) = δ(j − i) for i = 0, . . . , m1 − 1

Sm1+ℓ(j) = E(j −mℓ)−E(j −mℓ+1) for ℓ = 1, . . . , nbl

The optimization parameters are now equal to

αi(k) = u(k + i|k) for i = 0, . . . , m1 − 1

and

αm1+ℓ(k) = u(k +mℓ|k) for ℓ = 1, . . . , nbl

which corresponds to the Nc− 1+nbl free parameters. Figure 2.4 gives the basis functionsin case of a control horizon approach and a blocking approach, respectively.

0

SNc−1

SNc−2

SNc−3

SNc−4

SNc−5

S0

S1

S2

Nc−1 0

SM

SM−1

SM−2

SM−3

SM−4

S0

S1

S2

N−1

(a) control horizon (b) blocking

Figure 2.4: Basis functions in case of a control horizon approach (a) and a blocking ap-proach (b).

To obtain a tractable optimization problem, we can choose a set of basis functions Si(k)that are orthogonal. These orthogonal basis functions will be discussed in section 4.3.

2.5 Optimization

An optimization algorithm will be applied to compute a sequence of future control signalsthat minimizes the performance index subject to the given constraints. For linear models

Page 29: MPC

2.6. RECEDING HORIZON PRINCIPLE 29

with linear constraints and a quadratic (2-norm) performance index the solution can befound using quadratic programming algorithms. If a 1-norm or∞- norm performance indexis used, linear programming algorithms will provide the solution (Genceli & Nikolaou [30],Zheng & Morari [80]). Both types of algorithms are convex and show fast convergence.In some cases, the optimization problem will have an empty solution set, so the problemis not feasible. In that case we will have to relax one or more of the constraints to find asolution leading to an acceptable control signal. A prioritization among the constraints isan elegant way to tackle this problem.Procedures for different types of MPC problems will be presented in chapter 5.

2.6 Receding horizon principle

Predictive control uses the receding horizon principle. This means that after computa-tion of the optimal control sequence, only the first control sample will be implemented,subsequently the horizon is shifted one sample and the optimization is restarted with newinformation of the measurements. Figure 2.5 explains the idea of receding horizon. At

-

r

rr r r

rr

r

r

rr r r r r r r r r r

-

Nm Nc N

r(k)

y(k)

u(k)

k k+j

PAST FUTURE

Figure 2.5: The ‘Moving horizon’ in predictive control

time k the future control sequence u(k|k), . . . , u(k + Nc − 1|k) is optimized such thatthe the performance-index J(u, k) is minimized subject to constraints.At time k the first element of the optimal sequence (u(k) = u(k|k)) is applied to the realprocess. At the next time instant the horizon is shifted and a new optimization at timek + 1 is solved.The prediction yp(k+j|k) in (2.17) and x(k+j|k) in (2.18) are based on dynamical models.Common model representations in MPC are polynomial models, step response models

Page 30: MPC

30 CHAPTER 2. THE BASICS OF MODEL PREDICTIVE CONTROL

impulse response models or state space models. In this course we will consider a statespace representation of the model. In appendix D it is shown how other realizations canbe transformed in a state space model.

Page 31: MPC

Chapter 3

Prediction

In this chapter we consider the concept of prediction. We consider the following standardmodel:

x(k + 1) = Ax(k) +B1 e(k) +B2w(k) +B3 v(k)

y(k) = C1 x(k) +D11 e(k) +D12w(k) (3.1)

p(k) = Cp x(k) +Dp1 e(k) +Dp2w(k) +Dp3 v(k)

The prediction signal p(k) can be any signal which can be formulated as in expression (3.1)(so the state x(k), the output signal y(k) or tracking error r(k) − y(k) ). We will comeback on the particular choices of the signal p in Chapter 4.The control law in predictive control is, no surprise, based on prediction. At each timeinstant k, we consider all signals over the horizon N . To do so we make predictions at timek of the signal p(k + j) for j = 1, 2, . . . , N . These predictions, denoted by p(k + j|k), arebased on model (3.1), using information given at time k and future values of the controlsignal v(k+j|k). The predictions p(k+j|k) of the signal p(k+j) are based on the knowledgeat time k and the future control signals v(k|k), v(k+1|k), . . . , v(k+N−1|k).At time instant k we define the signal vector p(k) with the predicted signals p(k + j|k),the signal vector v(k) with the future control signals v(k+ j|k) and the signal vector w(k)with the future reference signals w(k + j|k) in the interval 0 ≤ j ≤ N−1 as follows

p(k) =

p(k|k)p(k+1|k)

...p(k+N−1|k)

v(k) =

v(k|k)v(k+1|k)

...v(k+N−1|k)

w(k) =

w(k|k)w(k+1|k)

...w(k+N−1|k)

(3.2)

The goal of the prediction is to find an estimate for the prediction signal p(k), composedof a free-response signal p0(k) and a matrix Dp3 such that

p(k) = p0(k) + Dp3 v(k)

where the term Dp3 v(k) is the part of p(k), which is due to the selected control signalv(k + j|k) for j ≥ 0 and p0(k) is the so called free-response. This free-response p0(k) is

31

Page 32: MPC

32 CHAPTER 3. PREDICTION

the predicted output signal when the future input signal is put to zero (v(k + j|k) = 0 forj ≥ 0) and depends on the present state x(k), the future values of the known signal w,and the characteristics of the noise signal e.

3.1 Noiseless case

The prediction mainly consists of two parts: Computation of the output signal as a resultof the selected control signal v(k+ j|k) and the known signal w(k+ j) and a prediction ofthe response due to the noise signal e(k + j). In this section we will assume the noiselesscase (so e(k + j) = 0) and we only have to concentrate on the response due to the presentand future values v(k + j|k) of the input signal and known signal w(k + j).Consider the model from (3.1) for the noiseless case (e(k) = 0):

x(k + 1) = Ax(k) +B2w(k) +B3v(k)

p(k) = Cpx(k) +Dp2w(k) +Dp3v(k)

For this state space model the prediction of the state is computed using successive substi-tution (Kinnaert [34]):

x(k + j|k) = Ax(k + j − 1|k) +B2w(k + j − 1|k) +B3 v(k + j − 1|k) =

A2x(k + j − 2|k) + AB2w(k + j − 2|k) +B2w(k + j − 1|k) +

+AB3 v(k + j − 2|k) +B3 v(k + j − 1|k)...

= Ajx(k) +

j∑

i=1

Ai−1B2w(k + j − i|k) +

j∑

i=1

Ai−1B3v(k + j − i|k)

p(k + j|k) = Cp x(k + j|k) +Dp2w(k + j|k) +Dp3v(k + j|k)

= CpAjx(k) +

j∑

i=1

CpAi−1B2w(k + j − i|k) +Dp2w(k + j|k) +

+

j∑

i=1

CpAi−1B3v(k + j − i|k) +Dp3v(k + j|k)

Now define

Cp =

CpCpACpA

2

...CpA

N−1

Dp2 =

Dp2 0 · · · 0 0

CpB2 Dp2. . .

......

CpAB2 CpB2. . . 0 0

.... . . Dp2 0

CpAN−2B2 · · · CpB2 Dp2

(3.3)

Page 33: MPC

3.2. NOISY CASE 33

Dp3 =

Dp3 0 · · · 0 0

CpB3 Dp3. . .

......

CpAB3 CpB3. . . 0 0

.... . . Dp3 0

CpAN−2B3 · · · CpB3 Dp3

(3.4)

then the vector p(k) with the predicted output values can be written as

p(k) = Cp x(k) + Dp2 w(k) + Dp3 v(k)

= p0(k) + Dp3 v(k)

In this equation p0(k) = Cp x(k) + Dp2 w(k) is the prediction of the output if v(k) ischosen equal to zero, denoted as the free-response signal, and Dp3 is the predictor matrix,describing the relation between future control vector v(k) and predicted output p(k).

The predictor matrix Dp3 is a Toeplitz matrix. The matrix relates future inputs to futureoutput signals, and contains the elements Dp3, and CpA

jB3, j ≥ 0, which are exactly equalto the impulse response parameters

gi =

Dp3 for i = 0

CpAi−1B3 for i > 0

of the transfer function Pp3(q) = Cp(qI −A)−1B3 +Dp3, which describes the input-outputrelation between the signals v(k) and p(k).

3.2 Noisy case

As was stated in the previous section, the second part of the prediction scheme is makinga prediction of the response due to the noise signal e. If we know the characteristics ofthe noise signal, this information can be used for prediction of the expected noise signalover the future horizon. In case we do not know anything about the characteristics ofthe disturbances, the best assumption we can make is the assumption that e is zero-meanwhite noise. In these lecture notes we use this assumption of zero-mean white noise e, sothe best prediction for future values of signal e(k + j), j > 0 will be zero (e(k + j) = 0 forj > 0).

Consider the model given in equation (3.1):

x(k + 1) = Ax(k) +B1 e(k) +B2w(k) +B3 v(k)

y(k) = C1 x(k) +D11 e(k) +D12w(k)

p(k) = Cp x(k) +Dp1 e(k) +Dp2w(k) +Dp3 v(k)

the prediction of the state using successive substitution of the state equation is given by

Page 34: MPC

34 CHAPTER 3. PREDICTION

(Kinnaert [34]):

x(k + j|k) = Ajx(k) +

j∑

i=1

Ai−1B1e(k + j − i|k) +

+

j∑

i=1

Ai−1B2w(k + j − i|k) +

j∑

i=1

Ai−1B3v(k + j − i|k)

p(k + j|k) = Cp x(k + j|k) +Dp1e(k + j|k) +Dp2w(k + j|k) +Dp3v(k + j|k)

The term e(k+m|k) for m > 0 is a prediction of e(k+m), based on measurements at timek. If the signal e is assumed to be zero mean white noise, the best prediction of e(k +m),made at time k, is

e(k +m|k) = 0 for m > 0

Substitution then results in (j > 0)

x(k + j|k) = Ajx(k) +

j∑

i=1

Ai−1B3v(k + j − i|k) + Aj−1B1e(k|k)

+

j∑

i=1

Ai−1B2w(k + j − i|k)

p(k + j|k) = Cp x(k + j|k) +Dp2w(k + j|k) +Dp3v(k + j|k)= CpA

jx(k) + CpAj−1B1e(k|k) +

+

j∑

i=1

CpAi−1B2w(k + j − i|k) +Dp2w(k + j|k)

+

j∑

i=1

CpAi−1B3v(k + j − i|k) +Dp23v(k + j|k)

p(k|k) = Cp x(k) +Dp1e(k|k) +Dp2w(k) +Dp3v(k)

Define

Dp1 =

Dp1

CpB1

CpAB1...CpA

N−2B1

(3.5)

then, the vector p with the predicted output values can be written as

p(k) = Cp x(k) + Dp1 e(k|k) + Dp2 w(k) + Dp3 v(k)

= p0(k) + Dp3 v(k) (3.6)

Page 35: MPC

3.2. NOISY CASE 35

In this equation the free-response signal is equal to

p0(k) = Cp x(k) + Dp1 e(k|k) + Dp2 w(k) (3.7)

Now, assuming D11 to be invertible, we derive an expression for e(k) from (3.1):

e(k|k) = D−111

(

y(k)− C1 x(k)−D12 w(k))

in which y(k) is the measured process output and x(k) is the estimate of state x(k) atprevious time instant k − 1.

p0(k) = Cp x(k) + Dp1 e(k) + Dp2 w(k) = (3.8)

= Cp x(k) + Dp1D−111

(

y(k)− C1 x(k)−D12w(k))

+ Dp2 w(k) = (3.9)

= (Cp − Dp1D−111 C1) x(k) + Dp1D

−111 y(k) + (Dp2 − Dp1D

−111 D12Ew) w(k) (3.10)

where Ew =[

I 0 · · · 0]

is a selection matrix such that

w(k) = Eww(k)

Example 1 : Prediction of the output signal of a system

In this example we consider the prediction of the output signal p(k) = y(k) of a secondorder system. We have given

xo1(k + 1) = 0.7 xo1(k) + xo2(k) + eo(k) + 0.1 do(k) + u(k)

xo2(k + 1) = −0.1 xo1(k)− 0.2 eo(k)− 0.05 do(k)

y(k) = xo1(k) + eo(k)

where y(k) is the proces output, v(k) = u(k) is the proces input, w(k) = d(k) is a knowndisturbance signal and e(k) is assumed to be ZMWN. We obtain the model of (3.1) bysetting

A =

[

0.7 1−0.1 0

]

B1 =

[

1−0.2

]

B2 =

[

0.1−0.05

]

B3 =

[

10

]

C1 = Cp =[

1 0]

D11 = Dp1 =[

1]

D12 = Dp2 =[

0]

For N = 4 we find:

C1 =

C1

C1AC1A

2

C1A3

=

1 00.7 1.00.39 0.70.203 0.39

D11 =

D11

C1B1

C1AB1

C1A2B1

=

11

0.50.25

Page 36: MPC

36 CHAPTER 3. PREDICTION

D12 =

D12 0 0 0C1B2 D12 0 0C1AB2 C1B2 D12 0C1A

2B2 C1AB2 C1B2 D12

=

0 0 0 00.1 0 0 00.02 0.1 0 00.004 0.02 0.1 0

D13 =

D13 0 0 0C1B3 D13 0 0C1AB3 C1B3 D13 0C1A

2B3 C1AB3 C1B3 D13

=

0 0 0 01 0 0 0

0.7 1 0 00.39 0.7 1 0

3.3 The use of a priori knowledge in making predic-

tions

In this chapter we have discussed the prediction of the signal p(k), based on the vector

w(k) =

w(k)w(k+1). . .

w(k+N−1)

This means that we assume future values of the reference signal or the disturbance signalsto be known at time k. In practice this is often not the case, and estimations of thesesignals have to be made.

w(k) =

w(k|k)w(k+1|k)

. . .w(k+N−1|k)

The estimation can be done in various ways. One can use heuristics to compute theestimates w(k+j|k), or one can use an extrapolation technique. With extrapolation wecan construct the estimates of w beyond the present time instant k. It is similar to theprocess of interpolation, but its results are often subject to greater uncertainty. We willdiscuss three types of extrapolation, zero-th order, first order and polynomial extrapolation.We assume the past values of w to be known, and compute the future values of w on thebasis of the past values of w.

Zero-th order extrapolation:

In an zero-th order extrapolation we assume w(k + j) to be constant for j ≥ 0, and sow(k + j) = w(k − 1) for j ≥ 0. This results in

w(k) =

w(k − 1)w(k − 1)

. . .w(k − 1)

Page 37: MPC

3.3. THE USE OF A PRIORI KNOWLEDGE IN MAKING PREDICTIONS 37

Linear (first order) extrapolation:

Linear (or first order) extrapolation means creating a tangent line at the last values of w(k)and extending it beyond that limit. Linear extrapolation will only provide good resultswhen used to extend the graph of an approximately linear function or not too far beyond theknown data. We define w(k+j) = w(k−1)+j (w(k−1)−w(k−2)) = (j+1−j q−1)w(k−1)for j ≥ 0. This results in

w(k) =

2w(k − 1)− w(k − 2)3w(k − 1)− 2w(k − 2)

. . .(N + 1)w(k − 1)−Nw(k − 2)

Polynomial extrapolation:

A polynomial curve can be created through more than one or two past values of w. For annth order extrapolation we use n + 1 past values of w. Note that high order polynomialextrapolation must be used with due care. The error estimate of the extrapolated valuewill grow with the degree of the polynomial extrapolation. Note that the zero-th and firstorder extrapolations are special cases of polynomial extrapolation.

The quality of extrapolation

Typically, the quality of a particular method of extrapolation is limited by the assump-tions about the signal w made by the method. If the method assumes the signal is smooth,then a non-smooth signal will be poorly extrapolated. Even for proper assumptions aboutthe signal, the extrapolation can diverge exponentially from the real signal. For partic-ular problems, additional information about w may be available which may improve theconvergence.In practice, the zero-th order extrapolation is mostly used, mainly because it never diverges,but also due to lack of information about the future behavior of the signal w.

Page 38: MPC

38 CHAPTER 3. PREDICTION

Page 39: MPC

Chapter 4

Standard formulation

In this chapter we will standardize the predictive control setting and formulate the stan-dard predictive control problem. First we consider the performance index, secondly theconstraints.

4.1 The performance index

In predictive control various types of performance indices are presented, in which eitherthe input signal is measured together with the state (LQPC), or the input incrementsignal is measured together with the tracking error (GPC). This leads to two differenttypes of performance indices. We will show that both can be combined into one standardperformance index:

The standard predictive control performance index:

In this course we will use the state space setting of LQPC as well as the use of a referencesignal as is done in GPC. Instead of the state x or the output y we will use a generalsignal z in the performance index. We therefore adopt the standard predictive controlperformance index:

J(v, k) =N−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) (4.1)

where z(k + j|k) is the prediction of z(k + j) at time k and Γ(j) is a diagonal selectionmatrix with ones and zeros on the diagonal. Finally, we use a generalized input signalv(k), which can either be the input signal u(k) or the input increment signal ∆u(k) and weuse a signal w(k), which contains all known external signals, such as the reference signalr(k) and the known disturbance signal d(k). In most cases, the noise signal e is ZMWNalthough in some cases we actually have integrated ZMWN. The state signal x, input signalv, output signal y, noise signal e, external signal w and performance signal z are related

39

Page 40: MPC

40 CHAPTER 4. STANDARD FORMULATION

by the following equations:

x(k + 1) = Ax(k) +B1 e(k) +B2w(k) +B3 v(k) (4.2)

y(k) = C1 x(k) +D11 e(k) +D12w(k) (4.3)

z(k) = C2 x(k) +D21 e(k) +D22w(k) +D23 v(k) (4.4)

We will show how both the LQPC and GPC performance index can be rewritten as astandard performance index.

The LQPC performance index:In the LQPC performance index (see Section 2.3) the state is measured together with theinput signal. The fact that we use the input in the performance index means that we willuse an IO-model. The LQPC performance index is now given by

J(u, k) =N∑

j=Nm

xTo (k + j|k)Qxo(k + j|k) +N∑

j=1

uT (k + j − 1|k)Ru(k + j − 1|k) (4.5)

where xo is the state of the IO-model

xo(k + 1) = Aoxo(k) +Koeo(k) + Lodo(k) +Bou(k) (4.6)

y(k) = Coxo(k) +DHeo(k) +DFdo(k) (4.7)

and N ≥ Nm ≥ 1 while Q and R are positive semi-definite.

Theorem 2 Transformation of LQPC into standard formGiven the MPC problem with LQPC performance index (4.5) for IO model (4.6),(4.7).This LQPC problem can be translated into a standard predictive control problem with per-formance index (4.1) and model (4.2),(4.3),(4.4) by the following substitutions:

x(k) = xo(k) v(k) = u(k) w(k) = d(k) e(k) = eo(k)

A = Ao B1 = Ko B2 = Lo B3 = Bo

C1 = Co D11 = DH D12 = DF

C2 =

[

Q1/2Ao0

]

D21 =

[

Q1/2Ko

0

]

D22 =

[

Q1/2Lo0

]

D23 =

[

Q1/2Bo

R1/2

]

Γ(j) =

[

Γ1(j) 00 I

]

Γ1(j) =

0 for 0 ≤ j < Nm − 1

I for Nm − 1 ≤ j ≤ N − 1

Page 41: MPC

4.1. THE PERFORMANCE INDEX 41

The proof of this theorem is in Appendix E.

The GPC performance index:In the GPC performance index (see Section 2.3) the tracking error signal is measuredtogether with the increment input signal. The fact that we use the increment input in theperformance index means that we will use an IIO-model. The GPC performance index isnow given by

J(u, k) =

N∑

j=Nm

(

yp(k + j|k)− r(k + j))T(

yp(k + j|k)− r(k + j))

+λ2N∑

j=1

∆uT (k + j − 1|k)∆u(k + j − 1|k) (4.8)

where N ≥ Nm ≥ 1 and λ ∈ R. The output y(k) and increment input ∆u(k) are relatedby the IIO model

xi(k + 1) = Aixi(k) +Kiei(k) + Lidi(k) +Bi∆u(k) (4.9)

y(k) = Cixi(k) +DHei(k) (4.10)

and the weighted output yp(k) = P (q)y(k) is given in state space representation

xp(k + 1) = Ap xp(k) +Bp y(k) (4.11)

yp(k) = Cp xp(k) +Dp y(k) (4.12)

(Note that for GPC we choose DF = 0)

Theorem 3 Transformation of GPC into standard formGiven the MPC problem with GPC performance index (4.8) for IIO model (4.9),(4.10)and the weighting filter P (q), given by (4.11),(4.12). This GPC problem can be trans-lated into a standard predictive control problem with performance index (4.1) and model(4.2),(4.3),(4.4) by the following substitutions:

x(k) =

[

xp(k)xi(k)

]

, v(k) = ∆u(k), w(k) =

[

di(k)r(k + 1)

]

e(k) = ei(k)

A =

[

Ap BpCi0 Ai

]

B1 =

[

BpDH

Ki

]

B2 =

[

0 0Li 0

]

B3 =

[

0Bi

]

C1 =[

0 Ci]

D11 = DH D12 =[

0 0]

C2 =

[

CpAp CpBpCi +DpCiAi0 0

]

D21 =

[

CpBpDH +DpCiKi

0

]

D22 =

[

DpCiLi −I0 0

]

D23 =

[

DpCiBi

λI

]

Page 42: MPC

42 CHAPTER 4. STANDARD FORMULATION

Γ(j) =

[

Γ1(j) 00 I

]

Γ1(j) =

0 for 0 ≤ j < Nm − 1

I for Nm − 1 ≤ j ≤ N − 1

The proof of this theorem is in Appendix E.

The zone performance index: The zone performance index (see Section 2.3) uses theIO-model, and is given by

J(u, k) =N∑

j=Nm

ǫT (k + j|k)ǫ(k + j|k) +N∑

j=1

λ2uT (k + j − 1|k)u(k + j − 1|k) (4.13)

where ǫi(k), i = 1, . . . , m contribute to the performance index only if |yi(k)−ri(k)| > δmax,i:

ǫi(k) =

0 for |yi(k)− ri(k)| ≤ δmax,iyi(k)− ri(k)− δmax,i for yi(k)− ri(k) ≥ δmax,iyi(k)− ri(k) + δmax,i for yi(k)− ri(k) ≤ −δmax,i

so

|ǫi(k)| = min|δi(k)|≤δmax,i

|yi(k)− ri(k) + δi(k)|

There holds N ≥ Nm ≥ 1 and λ ∈ R. The output y(k) and input u(k) are related by theIO model

xo(k + 1) = Aoxo(k) +Koeo(k) + Lodo(k) +Bou(k) (4.14)

y(k) = Coxo(k) +DHeo(k) +DFdo(k) (4.15)

Theorem 4 Transformation of zone control into standard formGiven the MPC problem with zone performance index (4.13) for IO model (4.14),(4.15).This GPC problem can be translated into a standard predictive control problem with per-formance index (4.1) and model (4.2),(4.3),(4.4) by the following substitutions:

z(k) =

[

y(k + 1|k)− r(k + 1) + δ(k + 1)λu(k)

]

v(k) =

[

u(k)δ(k + 1)

]

w(k) =

[

do(k)r(k + 1)

]

e(k) = eo(k)

A =[

Ao]

B1 =[

Ko

]

B2 =[

Lo 0]

B3 =[

Bo 0]

C1 = Co D11 = DH D12 =[

DF 0]

Page 43: MPC

4.1. THE PERFORMANCE INDEX 43

C2 =

[

CoAo0

]

D21 =

[

CoKo

0

]

D22 =

[

CoLo −I0 0

]

D23 =

[

CoBo IλI 0

]

C4 =

[

00

]

D41 =

[

00

]

D42 =

[

00

]

D43 =

[

0 I0 −I

]

Ψ =

[

δmaxδmax

]

then:

x(k + 1) = Ax(k) +B1 e(k) +B2w(k) +B3 v(k)

y(k) = C1 x(k) +D11 e(k) +D12w(k) (4.16)

z(k) = C2 x(k) +D21 e(k) +D22w(k) +D23 v(k)

ψ(k) = C4 x(k) +D41 e(k) +D42w(k) +D43 v(k)

The proof is left to the reader. Note that we need a constraint on δ. This can be incorpo-rated through the techniques presented in the next section.Both the LQPC performance index and the GPC performance index are frequently used inpractice and in literature. The LQPC performance index resembles the LQ optimal controlperformance index. The choices of the matrices Q and R can be done in a similar way asin LQ optimal control. The GPC performance index originates from the adaptive controlcommunity and is based on SISO polynomial models.

The standard predictive control performance index:We have found that the GPC, LQPC and the zone performance indices can be rewritteninto the standard form:

J(v, k) =

N−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) (4.17)

If we define the signal vector z(k) with the predicted performance signals z(k+ j|k) in theinterval 0 ≤ j ≤ N−1 and the block diagonal matrix Γ as follows

z(k) =

z(k|k)z(k+1|k)

...z(k+N−1|k)

, Γ =

Γ(0) 0 . . . 00 Γ(1) 0...

. . ....

0 0 . . . Γ(N − 1)

(4.18)

then the standard predictive control performance index (4.17) can be rewritten in thefollowing way:

J(v, k) =N−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k)

= zT (k)Γz(k)

where z(k) can be computed using the formulas from Chapter 3:

z(k) = C2x(k) + D21e(k) + D22w(k) + D23v(k) (4.19)

Page 44: MPC

44 CHAPTER 4. STANDARD FORMULATION

with

C2 =

C2

C2AC2A

2

...C2A

N−1

D22 =

D22 0 · · · 0 0

C2B2 D22. . .

......

C2AB2 C2B2. . . 0 0

.... . . D22 0

C2AN−2B2 · · · C2B2 D22

D21 =

D21

C2B1

C2AB1...C2A

N−2B1

D23 =

D23 0 · · · 0 0

C2B3 D23. . .

......

C2AB3 C2B3. . . 0 0

.... . . D23 0

C2AN−2B3 · · · C2B3 D23

4.2 Handling constraints

As was already discussed in chapter 1, in practical situations there will be signal con-straints. These constraints on control, state and output signals are motivated by safetyand environmental demands, economical perspectives and equipment limitations. Thereare two types of constraints:

Equality constraints:

In general, we impose constraints on the actual inputs and states. Clearly, for futureconstraints we often replace the actual input and state constraints by constraintson the predicted state and input. However, in particular for equality constraints itoften occurs that we actually want to impose constraints directly on the predictedand state and input. This is due to the fact, that equality constraints are usuallymotivated by the control algorithm. For example, to decrease the degrees of freedom,we introduce the control horizon Nc, and to guarantee stability we can add a stateend-point constraint to the problem.

Hence we use:

Ajφ(k + j|k) = 0

for j = 1, . . . , N , where ψ(k+j|k) is the prediction of ψ(k+j) at time k. The matrixAj is used to indicate that certain equality constraints are only active for specific j.For instance, in case of an endpoint penalty, we would choose AN = I and Aj = 0for j = 0, . . . , N − 1.

Page 45: MPC

4.2. HANDLING CONSTRAINTS 45

In this course we look at equality constraints in a generalized form. We can stack allconstraints at time k on predicted inputs or states in one vector:

φ(k) =

A1φ(k + 1|k)A2φ(k + 2|k)

...

AN φ(k +N |k)

Clearly, if some of the Ai are zero or do not have full rank we can reduce the size ofthis vector by only looking at the active constraints.

Using this framework, we can express the equality constraints in the form:

φ(k) = C3x(k) + D31e(k) + D32w(k) + D33v(k) = 0 (4.20)

where w(k) contains all known future external signals, i.e. w(k) is a vector consistingof w(k), w(k + 1), . . . , w(k +N). Similarly, v(k) contains the predicted future inputsignals, i.e. v(k) is a vector consisting of v(k), v(k + 1|k), . . . , v(k +N |k).

Inequality constraints:

Inequality constraints are due to physical, economical or safety limitations. Weactually prefer to work with constraints of a ψ(k) which consists of actual inputs andstates:

ψ(k) ≤ Ψ(k) ∀k

Since these are unknown we have to work with predictions, i.e. we have constraintsof the form:

ψ(k + j|k) ≤ Ψ(k + j)

for j = 0, . . . , N . Again, we stack all out inequality constraints:

φ(k) =

ψ(k|k)ψ(k + 1|k)

...

ψ(k +N |k)

and similarly Ψ(k) is a stacked vector consisting of Ψ(k),Ψ(k + 1), . . . ,Ψ(k +N).

In this course we then look at inequality constraints in a generalized form:

ψ(k) = C4x(k) + D41e(k) + D42w(k) + D43v(k) ≤ Ψ(k) (4.21)

where Ψ(k) does not depend on future input signals.

Page 46: MPC

46 CHAPTER 4. STANDARD FORMULATION

In the above formulas φ(k) and ψ(k) are vectors and the equalities and inequalities aremeant element-wise. If there are multiple constraints, for example φ1(k) = 0 and φ2(k) = 0,ψ1(k) ≤ Ψ1(k), . . . , ψ4(k) ≤ Ψ4(k) we can combine them by both stacking them into oneequality constraint and one inequality constraint.

φ(k) =

[

φ1(k)

φ2(k)

]

= 0 ψ(k) =

ψ1(k)...

ψ4(k)

Ψ1(k)...

Ψ4(k)

We will show how the transformation is done for some common equality and inequalityconstraints.

4.2.1 Equality constraints

Control horizon constraint for IO systems

The control horizon constraint for an IO-system (with v(k) = u(k)) is given by

v(k +Nc + j|k) = v(k +Nc − 1|k) for j = 0, . . . , N −Nc − 1

Then the control horizon constraint is equivalent with

v(k +Nc|k)− v(k +Nc − 1|k)v(k +Nc + 1|k)− v(k +Nc − 1|k)

...v(k +N − 1|k)− v(k +Nc − 1|k)

=

=

0 · · · 0 −I I 0 · · · 0

0 · · · 0 −I 0 I. . .

......

......

.... . .

. . . 00 · · · 0 −I 0 · · · 0 I

v(k|k)...

v(k +Nc − 2|k)v(k +Nc − 1|k)v(k +Nc|k)

v(k +Nc + 1|k)...

v(k +N − 1|k)

= D33v(k)

= 0

By defining C3 =0 , D31 =0 and D32 =0 , the control horizon constraint can be translatedinto the standard form of equation (4.20).

Page 47: MPC

4.2. HANDLING CONSTRAINTS 47

Control horizon constraint for IIO systems

The control horizon constraint for an IIO-system (with v(k) = ∆u(k)) is given by

v(k +Nc + j|k) = 0 for j = 0, . . . , N −Nc − 1

Then the control horizon constraint is equivalent with

v(k +Nc|k)v(k +Nc + 1|k)

...v(k +N − 1|k)

=

0 · · · 0 I 0 · · · 0

0 · · · 0 0 I. . .

......

......

. . .. . . 0

0 · · · 0 0 · · · 0 I

v(k|k)...

v(k +Nc − 1|k)v(k +Nc|k)

v(k +Nc + 1|k)...

v(k +N − 1|k)

= D33v(k)

= 0

By defining C3 =0 , D31 =0 , D32 =0 , the control horizon constraint can be translatedinto the standard form of equation (4.20).

State end-point constraint

The state end-point constraint is defined as

x(k +N |k) = xss

where xss is the steady-state. The state end-point constraint guarantees stability of theclosed loop (see chapter 6). In section 5.2.1 we will discuss steady-state behavior, and wederive that xss can be given by

xss = Dssxw(k)

where the matrix Dssx is related to the steady-state properties of the system. The stateend-point constraint now becomes

x(k +N |k)−Dssx w(k) =

= ANx(k)+AN−1B1e(k)+[

AN−1B2 AN−2B2 · · · B2

]

w(k)

+[

AN−1B3 AN−2B3 · · · B3

]

v(k)−Dssx w(k)

= 0

By defining

C3 = AN D32 =[

AN−1B2 AN−2B2 · · · B2

]

−Dssx

D31 = AN−1B1 D33 =[

AN−1B3 AN−2B3 · · · B3

]

the state end-point constraint can be translated into the standard form of equation (4.20).

Page 48: MPC

48 CHAPTER 4. STANDARD FORMULATION

4.2.2 Inequality constraints

For simplicity we only consider constraints of the form

p(k) ≤ pmax

i.e. we only consider upper bounds. Lower bounds such as a constraint p(k) ≥ pmin areeasily translated into upper bounds by considering

−p(k) ≤ −pmin

Consider a constraint

ψ(k + j) ≤ Ψ(k + j) , for j = 0, . . . , N (4.22)

where ψ(k) is given by

ψ(k) = C4x(k) +D41e(k) +D42w(k) +D43v(k) (4.23)

Linear inequality constraints on output y(k) and state x(k) can easily be translated intolinear constraints on the input vector v(k). By using the results of chapter 3, values ofψ(k + j) can be predicted and we obtain the inequality constraint:

ψ(k) = C4x(k) + D41e(k) + D42w(k) + D43v(k) ≤ Ψ(k) (4.24)

where

ψ(k) =

ψ(k)

ψ(k + 1)...

ψ(k +N−1)

Ψ(k) =

Ψ(k)Ψ(k + 1)

...Ψ(k +N−1)

C4 =

C4

C4AC4A

2

...C4A

N−1

D42 =

D42 0 · · · 0 0

C4B2 D42. . .

......

C4AB2 C4B2. . . 0 0

.... . . D42 0

C4AN−2B2 · · · C4B2 D42

D41 =

D41

C4B1

C4AB1...C4A

N−2B1

D43 =

D43 0 · · · 0 0

C4B3 D43. . .

......

C4AB3 C4B3. . . 0 0

.... . . D43 0

C4AN−2B3 · · · C4B3 D43

In this way we can formulate:

Page 49: MPC

4.2. HANDLING CONSTRAINTS 49

Inequality constraints on the output (y(k + j) ≤ ymax):

ψ(k) = y(k) = C4x(k) +D41e(k) +D42w(k) +D43v(k)

for C4 = C1, D41 = D11, D42 = D12, D43 = D13 and Ψ(k) = ymax.Inequality constraints on the input (v(k + j) ≤ vmax):

ψ(k) = v(k) = C4x(k) +D41e(k) +D42w(k) +D43v(k)

for C4 = 0, D41 = 0, D42 = 0, D43 = I and Ψ(k) = vmax .Inequality constraints on the state (x(k + j) ≤ xmax):

ψ(k) = x(k) = C4x(k) +D41e(k) +D42w(k) +D43v(k)

for C4 = I, D41 = 0, D42 = 0, D43 = 0 and Ψ(k) = xmax .Problems occur when Ψ(k) in equation (4.22) depends on past values of the input. In thatcase, prediction of Ψ(k + j) may depends on future values of the input, when we use thederived prediction formulas. Two clear cases where this happen will be discussed next:

Constraint on the increment input signal for an IO model:

∆u(k + j|k) ≤ ∆umax for j = 0, . . . , N−1

Consider the case of an IO model, so v(k) = u(k). Then by defining

Ψ(k) =

u(k − 1) + ∆umax∆umax

...∆umax

D43 =

I 0 · · · · · · 0

−I I. . .

...

0. . .

. . .. . .

......

. . .. . .

. . . 00 · · · 0 −I I

C4 = 0 D41 = 0 D42 = 0

the input increment constraint can be translated into the standard form of equation (4.21).

Constraint on the input signal for IIO model:

Assume that we have the following constraint:

u(k + j|k) ≤ umax for j = 0, . . . , N−1

Consider the case of an IIO model, so v(k) = ∆u(k). We note:

u(k + j) = u(k − 1) +

j∑

i=0

∆u(k + i)

Page 50: MPC

50 CHAPTER 4. STANDARD FORMULATION

Then by defining

Ψ(k) =

−u(k − 1) + umax−u(k − 1) + umax

...−u(k − 1) + umax

D43 =

I 0 · · · 0

I I. . .

......

. . .. . . 0

I · · · I I

the input constraint can be translated into the standard form of equation (4.21).

4.3 Structuring the input with orthogonal basis

functions

On page 27 we introduced a parametrization of the input signal using a set of basis func-tions:

v(k+j|k) =M∑

i=0

Si(j)αi(k)

where Si(j) are the basis functions. A special set of basis functions are orthogonal basisfunctions [69], which have the property:

∞∑

k=−∞

Si(k)Sj(k) =

0 for i 6= j1 for i = j

Lemma 5 [68] Let Ab, Bb, Cb and Db be matrices such that

[

Ab Bb

Cb Db

]T[Ab Bb

Cb Db

]

= I

(this means that Ab, Bb, Cb and Db are the balanced system matrices of a unitary function).Define

Av =

Ab BbCb BbDbCb · · · BbDnv−2b Cb

0 Ab BbCb · · · BbDnv−3b Cb

.... . . Ab

. . ....

.... . .

. . . BbCb0 · · · · · · 0 Ab

Cv =[

C DbCb D2bCb · · · Dnv−1

b Cb]

and let

Si(k) = CvAkvei+1

Page 51: MPC

4.4. THE STANDARD PREDICTIVE CONTROL PROBLEM 51

where

ei =[

0 · · · 0 1 0 · · · 0]T

with the 1 at the ith position. Then, the functions Si(k) i = 0, . . . ,M form an orthogonalbasis.

When we define the parameter vector α =[

α1 α2 · · · αM]T

, the input vector is givenby the expression

v(k+j|k) = Cv Ajv α (4.25)

The number of degrees of freedom in the input signal is now equal to dim(α) = M = nvn1,the dimension of parameter vector. One of the main reasons to apply orthogonal basisfunctions is to obtain a reduction of the optimization problem by reducing the degrees offreedom, so usually M will be much smaller than horizon N .Consider an input sequence of N future values:

v(k) =

v(k|k)v(k + 1|k)

...v(k +N |k)

=

CvCvAv

...CvA

Nv

α = Svα

Suppose N is such that Sv has full column-rank, and a left-complement is given by Sℓ⊥v(so Sℓ⊥v Sv = 0, see appendix C for a definition). Now we find that

Sℓ⊥v v(k) = 0 (4.26)

We observe that the orthogonal basis function can be described by equality constraint 4.26.

4.4 The standard predictive control problem

From the previous section we learned that the GPC and LQPC performance index can beformulated in a standard form (equation 4.1). In fact most common quadratic performanceindices can be given in this standard form. The same holds for many kinds of linear equalityand inequality constraints, which can be formulated as (4.21) or (4.20). Summarizing wecome to the formulation of the standard predictive control problem:

Definition 6 Standard Predictive Control Problem (SPCP) Consider a system given bythe state-space realization

x(k + 1) = Ax(k) +B1 e(k) +B2w(k) +B3 v(k) (4.27)

y(k) = C1 x(k) +D11 e(k) +D12w(k) (4.28)

z(k) = C2 x(k) +D21 e(k) +D22w(k) +D23 v(k) (4.29)

Page 52: MPC

52 CHAPTER 4. STANDARD FORMULATION

The goal is to find a controller v(k) = K(w, y, k) such that the performance index

J(v, k) =

N−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k)

= zT (k)Γz(k)

is minimized subject to the constraints

φ(k) = C3x(k) + D31e(k) + D32w(k) + D33v(k) = 0 (4.30)

ψ(k) = C4x(k) + D41e(k) + D42w(k) + D43v(k) ≤ Ψ(k) (4.31)

where

z(k) =

z(k|k)z(k+1|k)

...z(k+N−1|k)

v(k) =

v(k|k)v(k+1|k)

...v(k+N−1|k)

w(k) =

w(k|k)w(k+1|k)

...w(k+N−1|k)

How the SPCP problem is solved will be discussed in the next chapter.

4.5 Examples

Example 7 : GPC as a standard predictive control problem

Consider the GPC problem on the IIO model of example 53 in Appendix D. The purposeis to minimize the GPC performance index with

P (q) = 1− 1.4q−1 + 0.48q−2

In state space form this becomes:

Ap =

[

0 10 0

]

Bp =

[

−1.40.48

]

Cp =[

1 0]

Dp =[

1]

Further we choose N = Nc = 4 and λ = 0.001:Following the formulas in section 4.1, the GPC performance index is transformed into thestandard performance index by choosing

A =

[

Ap BpCi0 Ai

]

=

0 1 −1.4 −1.4 00 0 0.48 0.48 00 0 1 1 00 0 0 0.7 10 0 0 −0.1 0

B1 =

[

BpDH

Ki

]

=

−1.40.4811−0.2

Page 53: MPC

4.5. EXAMPLES 53

B2 =

[

0 0Li 0

]

=

0 00 00 0

0.1 0−0.05 0

B3 =

[

0Bi

]

=

00010

C1 =[

0 Ci]

=[

0 0 1 1 0]

C2 =

[

CpAp CpBpCi +DpCiAi0 0

]

=

[

0 1 −0.4 0.3 10 0 0 0 0

]

D21 =

[

CpBp +DpCiKi

0

]

=

[

0.60

]

D22 =

[

DpCiLi −I0 0

]

=

[

0.1 −10 0

]

D23 =

[

DpCiBi

λI

]

=

[

10.001

]

The prediction matrices are constructed according to chapter 3. We obtain:

C2 =

0 1 −0.4 0.3 10 0 0 0 00 0 0.08 0.19 0.30 0 0 0 00 0 0.08 0.183 0.190 0 0 0 00 0 0.08 0.1891 0.1830 0 0 0 0

D21 =

0.60

0.180

0.210

0.2250

D22 =

0.1 −1 0 0 0 0 0 00 0 0 0 0 0 0 0

−0.02 0 0.1 −1 0 0 0 00 0 0 0 0 0 0 0

0.004 0 −0.02 0 0.1 −1 0 00 0 0 0 0 0 0 0

0.0088 0 0.004 0 −0.02 0 0.1 −10 0 0 0 0 0 0 0

D23 =

1 0 0 00.001 0 0 00.3 1 0 00 0.001 0 0

0.19 0.3 1 00 0 0.001 0

0.183 0.19 0.3 1.0000 0 0 0.001

Page 54: MPC

54 CHAPTER 4. STANDARD FORMULATION

Example 8 : Constrained GPC as a standard predictive control problem

Now consider example 7 for the case where we have a constraint on the input signal:

u(k) ≤ 1

and a control horizon constraint

∆u(k +Nc + j|k) = 0 for j = 0, . . . , N −Nc − 1

We will compute the matrices C3, C4 , D31, D32, D33, D41, D42, D43 and the vector Ψ(k)for N = 4 and Nc = 2.Following the formulas of section 4.2 the vector Ψ and the matrix D43 become:

Ψ(k) =

−u(k − 1) + umax−u(k − 1) + umax−u(k − 1) + umax−u(k − 1) + umax

=

1− u(k − 1)1− u(k − 1)1− u(k − 1)1− u(k − 1)

D43 =

1 0 0 01 1 0 01 1 1 01 1 1 1

Further C4 = 0, D41 = 0 and D42 = 0.Next we compute the matrices C3, D31, D32 and D33 corresponding to the control horizonconstraint (N = 4, Nc = 2):

C3 =

[

0 0 0 0 00 0 0 0 0

]

D31 =

[

00

]

D32 =

[

0 0 0 00 0 0 0

]

D33 =

[

0 0 1 00 0 0 1

]

Page 55: MPC

Chapter 5

Solving the standard predictivecontrol problem

In this chapter we solve the standard predictive control problem as defined in section 4.4.We consider the system given by the state-space realization

x(k + 1) = Ax(k) +B1 e(k) +B2w(k) +B3 v(k) (5.1)

y(k) = C1 x(k) +D11 e(k) +D12w(k) (5.2)

z(k) = C2 x(k) +D21 e(k) +D22w(k) +D23 v(k) (5.3)

Here y contains the measurements so that at time k we have available all past inputsv(0), . . . , v(k−1) and all past and current measurements y(0), . . . , y(k). z contains variablesthat we want to control and hence appear in the performance index.The performance index and the constraints are given by

J(v, k) =

N−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) (5.4)

= zT (k)Γz(k) (5.5)

φ(k) = C3x(k|k) + D31e(k|k) + D32w(k) + D33v(k) = 0 (5.6)

ψ(k) = C4x(k|k) + D41e(k|k) + D42w(k) + D43v(k) ≤ Ψ(k) (5.7)

Note that the performance index at time k contains estimates of z(k + j) based on allinputs v(0), . . . , v(k + j) as well as past and current measurements y(0), . . . y(k). Clearlyv(k), . . . , v(k+ j) are not yet available and need to be chosen to minimize the performancecriterion subject to the constraints. As described before, φ(k) and ψ(k) are stacked vectorscontaining predicted states or future inputs on which we want to impose either inequalityor equality constraints. Predictions of future states and inputs are clearly a function of allpast measurements but it can be shown that it can be expressed in terms of predictionsx(k|k) and e(k|k) of the state x(k) and the noise e(k) respectively. Implementation issuesabout x(k|k) and e(k|k) will be discussed in Section 5.3.

55

Page 56: MPC

56 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

The standard predictive control problem is to minimize (5.5) given (5.1), (5.2), (5.3) subjectto (5.6) and (5.7).

In this chapter we consider 3 subproblems:

1. The unconstrained SPCP: Minimize (5.5).

2. The equality constrained SPCP: Minimize (5.5) subject to (5.6).

3. The (full) SPCP: Minimize (5.5) subject to (5.6) and (5.7).

Assumptions

To be able to solve the standard predictive control problem, the following assumptions aremade:

1. The matrix D33 has full row rank.

2. The matrix D23ΓDT23 has full rank, where Γ = diag(Γ(0),Γ(1), . . . ,Γ(N − 1)) ∈

RnzN×nzN .

3. The pair (A,B3) is stabilizable.

Assumption 1 basically guarantees that we have only equality constraints on the input.If the system is subject to noise it is only in rare possible to guarantee that equalityconstraints on the state are satisfied. Assumption 2 makes sure that the optimizationproblem is strictly convex which guarantees a unique solution to the optimization problem.Assumption 3 is necessary to be able to control all unstable modes of the system.

5.1 The finite horizon SPCP

5.1.1 Unconstrained standard predictive control problem

In this section we consider the problem of minimizing the performance index

J(v, k) =

N−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) (5.8)

= zT (k)Γz(k) (5.9)

for the system as given in (5.1), (5.2) and (5.3), and without equality or inequality con-straints. In this section we consider the case for finite N . The infinite case will be treatedin section 5.2.

Page 57: MPC

5.1. THE FINITE HORIZON SPCP 57

The performance index, given in (5.9), is minimized for each time instant k, and the optimalfuture control sequence v(k) is computed. We use the prediction law

z(k) = C2 x(k|k) + D21 e(k|k) + D22 w(k) + D23 v(k) (5.10)

= z0(k) + D23 v(k) (5.11)

as derived in chapter 3, where

z0(k) = C2 x(k|k) + D21 e(k|k) + D22 w(k)

is the free-response signal given in equation (3.7). Without constraints, the problem be-comes a standard least squares problem, and the solution of the predictive control problemcan be computed analytically. We assume the reference trajectory w(k + j) to be knownover the whole prediction horizon j = 0, . . . , N . Consider the performance index (5.9).Now substitute (5.11) and define matrix H , vector f(k) and scalar c(k) as

H = 2DT23ΓD23 , f(k) = 2DT

23Γz0(k) and c(k) = zT0 (k)Γz0(k)

We obtain

J(v, k) = vT (k)DT23ΓD23v(k) + 2vT (k)DT

23Γz0(k) + zT0 (k)Γz0(k) =

=1

2vT (k)Hv(k) + vT (k)f(k) + c(k)

The minimization of J(v, k) has become a linear algebra problem. It can be solved, settingthe gradient of J to zero:

∂J

∂v= Hv(k) + f(k) = 0

By assumption 2, H is invertible and hence the solution v(k) is given by

v(k) = −H−1f(k)

= −(

DT23ΓD23

)−1

DT23Γz0(k)

= −(

DT23ΓD23

)−1

DT23Γ(

C2 x(k|k) + D21e(k|k) + D22 w(k))

Because we use the receding horizon principle, only the first computed change in the controlsignal is implemented and at time k+1 the computation is repeated with the horizon movedone time interval. This means that at time k the control signal is given by

v(k|k) =[

I 0 . . . 0]

v(k) = Ev v(k)

We obtain

v(k|k) = Ev v(k)

= −Ev(

DT23ΓD23

)−1

DT23Γ(

C2 x(k|k) + D21 e(k|k) + D22w(k))

= −F x(k|k) +De e(k|k) +Dw w(k)

Page 58: MPC

58 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

where

F = Ev ( DT23ΓD23 )−1DT

23ΓC2

De = −Ev ( DT23ΓD23 )−1DT

23ΓD21

Dw = −Ev ( DT23ΓD23 )−1DT

23ΓD22

Ev =[

I 0 . . . 0]

with Ev such that v(k|k) = Evv(k).The results are summarized in the following theorem (Kinnaert [34],Lee et al. [38],Van denBoom & de Vries [67]):

Theorem 9Consider system (5.1) - (5.3) The unconstrained (finite) horizon standard predictive controlproblem of minimizing performance index

J(v, k) =N−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) (5.12)

is solved by control law

v(k) = −F x(k|k) +De e(k|k) +Dw w(k) (5.13)

where

F = Ev ( DT23ΓD23 )−1DT

23ΓC2 (5.14)

De = −Ev ( DT23ΓD23 )−1DT

23ΓD21 (5.15)

Dw = −Ev ( DT23ΓD23 )−1DT

23ΓD22 (5.16)

Ev =[

I 0 . . . 0]

(5.17)

Note that for the computation of optimal input signal v(k), an estimate x(k|k) and e(k|k),for the state x(k) and the noise signal e(k) respectively, have to be available. This caneasily be done with an observer and will be discussed in section 5.3.

5.1.2 Equality constrained standard predictive control problem

In this section we consider the problem of minimizing the performance index

J(v, k) =

N−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) (5.18)

for the system as given in (5.1), (5.2) and (5.3), and with equality constraints (but withoutinequality constraints). In this section we consider the case for finite N . In section 5.2.4we discuss the case where N =∞ and a finite control horizon as the equality constraint.

Page 59: MPC

5.1.2 EQUALITY CONSTRAINED SPCP 59

Consider the equality constrained standard problem

minvzT (k)Γz(k)

subject to the constraint:

φ(k) = C3x(k|k) + D31e(k|k) + D32w(k) + D33v(k) = 0

We will solve this problem by elimination of the equality constraint. We therefore give thefollowing lemma:

Lemma 10Consider the equality constraint

C θ = β (5.19)

for full-row rank matrix C ∈ Rm×n, β ∈ R

m×1, θ ∈ Rn×1, and m ≤ n. Choose Cr to be a

right-inverse of C and Cr⊥ to be a right-complement of C, then all θ satisfying (5.19) aregiven by

θ = Cr β + Cr⊥η

where η ∈ R(n−m)×1 is arbitrary.

2 End LemmaProof of lemma 10:From appendix C we know that for

C = U[

Σ 0]

[

V T1

V T2

]

the right-inverse Cr and right-complement Cr⊥ are defined as

Cr = V1 Σ−1 UT Cr⊥ = V2

Choose vectors ζ and η as follows:[

ζη

]

=

[

V T1

V T2

]

θ so θ =[

V1 V2

]

[

ζη

]

then there must hold

C θ = U[

Σ 0]

[

ζη

]

= U Σ ζ = β

and so we have to choose ζ = Σ−1 UT β, while η can be any vector (with the properdimension). Therefore, all θ satisfying (5.19) are given by

θ = V1 Σ−1 UTβ + V2η = Cr β + Cr⊥η

Page 60: MPC

60 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

2 End Proof

Define Dr33 and Dr⊥

33 as in the above lemma, then all v that satisfy the equality constraintφ(k) = 0 are given by:

v(k) = −Dr33

(

C3x(k|k) + D31e(k|k) + D32w(k))

+ Dr⊥33µ(k)

= vE(k) + Dr⊥33µ(k)

Note that by choosing v(k) = vE(k) + Dr⊥33µ(k) the equality constraint is always satisfied

while all remaining freedom is still in the vector µ(k), which is of lower dimension. Soby this choice the problem has reduced in order while the equality constraint is alwayssatisfied for all µ(k).

Substitution of v(k) = vE(k) + Dr⊥33µ(k) in (5.10) gives:

z(k) = C2 x(k|k) + D21 e(k|k) + D22 w(k) + D23 v(k)

= (C2−D23Dr33C3)x(k|k) + (D21−D23D

r33D31)e(k|k)

+ (D22−D23Dr33D32)w(k) + D23D

r⊥33µ(k)

= zE(k) + D23Dr⊥33µ(k)

where zE is given by:

zE(k)=(C2−D23Dr33C3)x(k|k) + (D21−D23D

r33D31)e(k|k) + (D22−D23D

r33D32)w(k)

The performance index is given by

J(k) = zT (k)Γz(k) = (5.20)

= (zE(k) + D23Dr⊥33µ(k))T Γ(zE(k) + D23D

r⊥33µ(k)) = (5.21)

= µT (k)(

(Dr⊥33)

T DT23ΓD23D

r⊥33

)

µ(k)

+2zTE(k)ΓD23Dr⊥33µ(k) + zTE(k)ΓzE(k) = (5.22)

=1

2µTHµ+ fT (k)µ(k) + c(k) (5.23)

where the matrices H , f and c are given by

H = 2 (Dr⊥33)

T DT23ΓD23D

r⊥33

f(k) = 2 (Dr⊥33)

T DT23ΓzE(k)

c(k) = zTEΓzE

Note that by assumption 2, the matrix DT23ΓD23 is invertible. By construction, the right

complement Dr⊥33 is injective and hence H is invertible.

When inequality constraints are absent, we are left with an unconstrained optimization

minµ

1

2µT H µ+ fT µ

Page 61: MPC

5.1.2 EQUALITY CONSTRAINED SPCP 61

which has an analytical solution. In the same way as in section 5.1, we derive:

∂J

∂µ= Hµ(k) + f(k) = 0

and so

µ(k) = −H−1f(k)

= −(

(Dr⊥33)

T DT23ΓD23D

r⊥33

)−1

(Dr⊥33)

T DT23ΓzE(k)

= −Ξ zE(k) (5.24)

= (ΞD23Dr33C3−ΞC2)x(k|k) + (ΞD23D

r33D31−ΞD21)e(k|k)

+(ΞD23Dr33D32−ΞD22)w(k) (5.25)

where

Ξ =(

(Dr⊥33)

T DT23ΓD23D

r⊥33

)−1

(Dr⊥33)

T DT23Γ

Substitution gives:

v(k) = −Dr33

(

C3x(k|k) + D31e(k|k) + D32w(k))

+ Dr⊥33µ(k)

= −Dr33

(

C3x(k|k) + D31e(k|k) + D32w(k))

+ Dr⊥33(ΞD23D

r33C3−ΞC2)x(k|k) +

+Dr⊥33(ΞD23D

r33D31−ΞD21)e(k|k) + Dr⊥

33(ΞD23Dr33D32−ΞD22)w(k)

= (Dr⊥33ΞD23D

r33C3−Dr⊥

33ΞC2 − Dr33C3)x(k|k)

+(Dr⊥33ΞD23D

r33D31−Dr⊥

33ΞD21 − Dr33D31)e(k|k) +

+(Dr⊥33ΞD23D

r33D32−Dr⊥

33ΞD22 − Dr33D32)w(k)

The control signal can now be written as:

v(k|k) = Evv(k)

= Ev(Dr⊥33ΞD23D

r33C3−Dr⊥

33ΞC2 − Dr33C3)x(k|k) +

+Ev(Dr⊥33ΞD23D

r33D31−Dr⊥

33ΞD21 − Dr33D31)e(k|k) +

+Ev(Dr⊥33ΞD23D

r33D32−Dr⊥

33ΞD22 − Dr33D32)w(k)

= −F x(k|k) +De e(k|k) +Dw w(k)

where

F = −Ev(Dr⊥33ΞD23D

r33C3 − Dr⊥

33ΞC2 − Dr33C3)

De = Ev(Dr⊥33ΞD23D

r33D31 − Dr⊥

33ΞD21 − Dr33D31)

Dw = Ev(Dr⊥33ΞD23D

r33D32 − Dr⊥

33ΞD22 − Dr33D32)

Page 62: MPC

62 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

This means that also for the equality constrained case, the optimal predictive controller islinear and time-invariant.The control law has the same form as for the unconstrained case in the previous section(of course for the alternative choices of F , Dw and De).The results are summarized in the following theorem:

Theorem 11Consider system (5.1)—(5.3) The equality constrained (finite) horizon standard predictivecontrol problem of minimizing performance index

J(v, k) =N−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) (5.26)

subject to equality constraint

φ(k) = C3x(k|k) + D31e(k|k) + D32w(k) + D33v(k) = 0

is solved by control law

v(k) = −F x(k|k) +De e(k|k) +Dw w(k) (5.27)

where

F = −Ev(

Dr⊥33ΞD23D

r33C3 − Dr⊥

33ΞC2 − Dr33C3

)

De = Ev

(

Dr⊥33ΞD23D

r33D31 − Dr⊥

33ΞD21 − Dr33D31

)

Dw = Ev

(

Dr⊥33ΞD23D

r33D32 − Dr⊥

33ΞD22 − Dr33D32

)

Ev =[

I 0 . . . 0]

Ξ =(

(Dr⊥33)

T DT23ΓD23D

r⊥33

)−1

(Dr⊥33)

T DT23Γ

Again, implementation issues are discussed in section 5.3.

5.1.3 Full standard predictive control problem

In this section we consider the problem of minimizing the performance index

J(v, k) =

N−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) (5.28)

for the system as given in (5.1), (5.2) and (5.3), and with equality and inequality con-straints. In this section we consider the case for finite N . The infinite horizon case istreated in the Sections 5.2.4 and 5.2.5.

Page 63: MPC

5.1.2 EQUALITY CONSTRAINED SPCP 63

Consider the constrained standard problem

minvzT (k)Γz(k)

subject to the constraints:

φ(k) = C3x(k|k) + D31e(k|k) + D32w(k) + D33v(k) = 0 (5.29)

ψ(k) = C4x(k|k) + D41e(k|k) + D42w(k) + D43v(k) ≤ Ψ(k) (5.30)

Now v(k) is chosen as in the previous section

v(k) = −Dr33

(

C3x(k|k) + D31e(k|k) + D32w(k))

+ Dr⊥33µ(k)

= vE(k) + Dr⊥33µ(k)

This results in

φ(k) = C3x(k|k) + D31e(k|k) + D32w(k) + D33v(k) =

= C3x(k|k) + D31e(k|k) + D32w(k) + D33vE(k) + D33Dr⊥33µ(k) = 0

and so the equality constraint is eliminated. The optimization vector µ(k) can now bewritten as

µ(k) = µE(k) + µI(k) (5.31)

= −H−1f(k) + µI(k) (5.32)

(5.33)

where µE(k) = −H−1f(k) is the equality constrained solution given in the previous sec-tion, and µi(k) is an additional term to take the inequality constraints into account. Nowconsider performance index (5.23) from the previous section. Substitution of µ(k) =−H−1f(k) + µI(k) gives us:

1

2µT (k)H µ(k) + fT (k)µ(k) + c(k) =

=1

2

(

−H−1f(k) + µI(k))T

H(

−H−1f(k) + µI(k))

+fT (k)(

−H−1f(k) + µI(k))

+ c(k) =

=1

2µTI (k)H µI(k)− fT (k)H−1H µI(k)

+1

2fT (k)H−1HH−1f(k)− fT (k)H−1f(k) + fT (k)µI(k) + c(k)

=1

2µTI (k)H µI(k)−

1

2fT (k)H−1f(k) + c(k)

Page 64: MPC

64 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

Using equations (5.24)-(5.25), the vector µ(k) can be written as

µ(k) = µE(k) + µI(k)

= −Ξ zE(k) + µI(k)

= (ΞD23Dr33C3−ΞC2)x(k|k) + (ΞD23D

r33D31−ΞD21)e(k|k)

+ (ΞD23Dr33D32−ΞD22)w(k) + µI(k) (5.34)

Substitution of v(k) = vE(k) + Dr⊥33µ(k) = vE(k) + Dr⊥

33µE(k) + Dr⊥33µI(k) in inequality

constraint (5.30) gives:

ψ(k) = (C4−D43Dr33C3)x(k|k) + (D41−D43D

r33D31)e(k|k)

+(D42−D43Dr33D32)w(k) + D43D

r⊥33µE(k) + D43D

r⊥33µI(k)

= (C4−D43Dr33C3 + D43D

r⊥33ΞD23D

r33C3−D43D

r⊥33ΞC2)x(k|k)

+(D41−D43Dr33D31 + D43D

r⊥33ΞD23D

r33D31−D43D

r⊥33ΞD21)e(k|k)

+(D42−D43Dr33D32 + D43D

r⊥33ΞD23D

r33D32−D43D

r⊥33ΞD22)w(k)

+D43Dr⊥33µI(k)

= ψE(k) + D43Dr⊥33µI(k)

Now let

Aψ = D43Dr⊥33

bψ(k) = ψE(k)− Ψ(k)

then we obtain the quadratic programming problem of minimizing

minµ(k)

1

2µTI (k)H µI(k)

subject to:

AψµI(k) + bψ(k) ≤ 0

where H is as in the previous section and we dropped the term −12fT (k)H−1f(k) + c(k),

because it is not dependent on µI(k) and so it has no influence on the minimization. Theabove optimization problem, which has to be solved numerically and on-line, is a quadraticprogramming problem and can be solved in a finite number of iterative steps using reliableand fast algorithms (see appendix A).The control law of the full SPCP is nonlinear, and cannot be expressed in a linear form asthe unconstrained SPCP or equality constrained SPCP.

Theorem 12Consider system (5.1) - (5.3) and the constrained (finite horizon) standard predictive con-trol problem (CSPCP) of minimizing performance index

J(v, k) =

N−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) (5.35)

Page 65: MPC

5.2. INFINITE HORIZON SPCP 65

subject to equality and inequality constraints

φ(k) = C3x(k|k) + D31e(k|k) + D32w(k) + D33v(k) = 0

ψ(k) = C4x(k|k) + D41e(k|k) + D42w(k) + D43v(k) ≤ Ψ(k)

Define:

Aψ = D43Dr⊥33

bψ(k) = ψE(k)− Ψ(k)

= (C4−D43Dr33C3 + D43D

r⊥33ΞD23D

r33C3−D43D

r⊥33ΞC2)x(k|k)

+(D41−D43Dr33D31 + D43D

r⊥33ΞD23D

r33D31−D43D

r⊥33ΞD21)e(k|k)

+(D42−D43Dr33D32 + D43D

r⊥33ΞD23D

r33D32−D43D

r⊥33ΞD22)w(k)

−Ψ(k)

H = 2 (Dr⊥33)

T DT23ΓD23D

r⊥33

F = −Ev(

Dr⊥33ΞD23D

r33C3 − Dr⊥

33ΞC2 − Dr33C3

)

De = Ev

(

Dr⊥33ΞD23D

r33D31 − Dr⊥

33ΞD21 − Dr33D31

)

Dw = Ev

(

Dr⊥33ΞD23D

r33D32 − Dr⊥

33ΞD22 − Dr33D32

)

Dµ = EvDr⊥33

Ξ =(

(Dr⊥33)

T DT23ΓD23D

r⊥33

)−1

(Dr⊥33)

T DT23Γ

Ev =[

I 0 . . . 0]

The optimal control law that optimizes this CSPCP problem is given by:

v(k) = −F x(k|k) +De e(k|k) +Dw w(k) +Dµ µI(k)

where µ is the solution for the quadratic programming problem

minµI (k)

1

2µTI (k)H µI(k)

subject to:

AψµI(k) + bψ(k) ≤ 0

5.2 Infinite horizon SPCP

In this section we consider the standard predictive control problem for the case where theprediction horizon is infinite (N =∞) [59].

Page 66: MPC

66 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

5.2.1 Steady-state behavior

In infinite horizon predictive control it is important to know how the signals behave fork −→ ∞. We therefore define the steady-state of a system in the standard predictivecontrol formulation:

Definition 13The quadruple (vss, xss, wss, zss) is called a steady state if the following equations aresatisfied:

xss = Axss +B2 wss +B3 vss (5.36)

zss = C2 xss +D22 wss +D23 vss (5.37)

To be able to solve the predictive control problem it is important that for every possible wss,the quadruple (vss, xss, wss, zss) exists. For a steady state error free control the performancesignal zss should be equal to zero for every possible wss (this is also necessary to be able tosolve the infinite horizon predictive control problem). We therefore look at the existenceof a steady state

(vss, xss, wss, zss) = (vss, xss, wss, 0)

for every possible wss.Consider the matrix

Mss =

[

I − A −B3

−C2 −D23

]

(5.38)

then (5.36) and (5.37) can be rewritten as:

Mss

[

xssvss

]

=

[

B2

D22

]

wss

Let the singular value decomposition be given by

Mss =[

UM1 UM2

]

[

ΣM 00 0

][

V TM1

V TM2

]

where ΣM = diag(σ1, . . . , σm) with σi > 0.A necessary and sufficient condition for existence of xss and vss is that

UTM2

[

B2

D22

]

= 0 (5.39)

The solution is given by:

[

xssvss

]

= VM1Σ−1M UT

M1

[

B2

D22

]

wss + VM2 αM (5.40)

Page 67: MPC

5.2. INFINITE HORIZON SPCP 67

where αM is an arbitrary vector with the apropriate dimension. Substitution of (5.40) in(5.36) and (5.37) shows that the quadruple (vss, xss, wss, zss)=(vss, xss, wss, 0) is a steadystate. The solution (xss, vss) for a given wss is unique if VM2 is empty or, equivalently ifMss has full column rank.In the section on infinite horizon MPC we will assume that zss = 0 and that xss and vssexist, are unique, and related to wss by

[

xssvss

]

= VM1Σ−1UT

M1

[

B2

D22

]

wss (5.41)

Usually, we assume a linear relation between wss and w(k):

wss = Dssww(k)

Sometimes wss is found by some extrapolation, but often we choose w to be constantbeyond the prediction horizon, so wss = w(k + j) = w(k +N − 1) for j ≥ N . The matrixDssw is then given by Dssw =

[

0 · · · 0 I]

, such that wss = w(k+N−1) = Dssw w(k).Now define the matrices

[

Dssx

Dssv

]

= VM1Σ−1M UT

M1

[

B2

D22

]

Dssw (5.42)

and

Dssy = C1Dssx +D12Dssw +D13Dssv (5.43)

then a direct relation between (xss, vss, wss, yss) and w(k) is given by

xssvsswssyss

=

Dssx

Dssv

Dssw

Dssy

w(k) (5.44)

Remark 14 : Sometimes it is interesting to consider cyclic or periodic steady-state behav-ior. This means that the signals x, w and v do not become constant for k −→ ∞, but areequal to some cyclic behavior. For a cyclic steady state we assume there is a cycle period Psuch that (vss(k + P ), xss(k + P ), wss(k + P ), zss(k + P )) = (vss(k), xss(k), wss(k), zss(k)).For infinite horizon predictive control, we again make the assumption that zss = 0. In thisway, we can isolate the steady-state behavior from the predictive control problem withoutaffecting the performance index.

5.2.2 Structuring the input signal for infinite horizon MPC

For infinite horizon predictive control we will encounter an optimization problem with aninfinite degrees of freedom, parameterized by v(k + j|k), j = 1, . . . ,∞. For the uncon-strained case this is not a problem, and we can find the optimal predictive controller using

Page 68: MPC

68 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

theory on Linear Quadratic Gaussian (LQG) controllers (Strejc, [63]). This is given insection 5.2.3.In the constrained case, we can tackle the problem by giving the input signal only a limiteddegrees of freedom. We can do that by introducing the so-called switching horizon, denotedby Ns. This Ns has to be chosen such, that all degrees of freedom are in the first Ns samplesof the input signal, i.e. in v(k + j|k), j = 0, . . . , Ns − 1. In this section we therefore adoptthe input sequence vector

v(k) =

v(k|k)v(k + 1|k)

...v(k +Ns − 1|k)

which contains all degrees of freedom at sample time k.We will consider two ways to expand the input signal beyond the switching horizon:

Control horizon: By taking Ns = Nc, we choose v(k+ j|k) = vss for j ≥ Ns. (Note thatvss = 0 for IIO models).

Basis functions: We can choose v(k + j|k) for j ≥ Ns as a finite sum of (orthogonal)basis functions. The future input v(k+ j|k) can be formulated using equation (4.25):

v(k + j|k) = Cv Ajv α(k|k) + vss

where we have taken added an extra term vss to take the steady-state value intoaccount. Following the definitions from section 4.3, we derived the relation

v(k) =

v(k|k)v(k+1|k)

...v(k+Ns−1|k)

=

CvCvAv

...CvA

Ns−1v

α(k|k) +

vssvss...vss

= Svα(k|k) + vss

Suppose Ns is such that Sv has full column-rank, and a left-complement is given bySℓ⊥v (so Sℓ⊥v Sv = 0, see appendix C for a definition). Now we find that

Sℓ⊥v (v(k)− vss) = 0 (5.45)

or, by defining

vss =

vssvss...vss

=

Dssv

Dssv...

Dssv

w(k) = Dssv w(k)

Page 69: MPC

5.2. INFINITE HORIZON SPCP 69

we obtain

Sℓ⊥v v(k)− Sℓ⊥v Dssvw(k) = 0 (5.46)

We observe that the orthogonal basis function can be described by equality constraint5.46.

By defining Bv = ANsv Sℓv (where Sℓv is the left inverse of Sv, see appendix C for adefinition), we can express α in v

ANsv α(k|k) = Bv v(k)

and the future input signals beyond Ns can be expressed in terms of v(k):

v(k + j|k) = Cv Ajv α(k|k) + vss = Cv A

j−Nsv Bv v(k) + vss (5.47)

The description with (orthogonal) basis functions gives us that, for the constrainedcase, the input signal beyond Ns can be described as follows:

v(k+ j|k) = Cv Aj−Nsv Bv v(k)+Fv(x(k+ j|k)−xss)+vss j ≥ Ns (5.48)

or

xv(k +Ns|k) = Bv v(k) (5.49)

xv(k+j+1|k) = Av xv(k + j|k) j ≥ Ns (5.50)

v(k + j|k) = Cv xv(k + j|k) + Fv(x(k + j|k)− xss) + vss j ≥ Ns (5.51)

where xv is an additional state, describing the dynamics of the (orthogonal) basisfunction beyond the switching horizon. Finally, we should note that v(k) can not bechosen arbitrarily but is constrained by the equality constraint (5.46).

5.2.3 Unconstrained infinite horizon SPCP

In this section, we consider the unconstrained infinite horizon standard predictive controlproblem. To be able to tackle this problem, we will consider a constant external signal w,a zero steady-state performance signal and the weighting matrix Γ(j) is equal to identity,so

w(k + j) = wss for all j ≥ 0

zss = 0

Γ(j) = I for all j ≥ 0

Define

x∆(k + j|k) = x(k + j|k)− xss for all j ≥ 0

v∆(k + j|k) = v(k + j|k)− vss for all j ≥ 0

Page 70: MPC

70 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

then it follows that

x∆(k+j+1|k) = x(k+j+1|k)− xss= A x(k + j|k) +B1 e(k + j|k) +B2w(k + j) +B3 v(k + j|k)− xss= A x∆(k + j|k) +B1 e(k + j|k) +B3 v∆(k + j|k)

z(k + j|k) = C2 x(k + j|k) +D21 e(k + j|k) +D22w(k + j) +D23 v(k + j|k)= C2 x∆(k + j|k) +D21 e(k + j|k) +D23 v∆(k + j|k)

where we used equations (5.36) and (5.37). Now we derive:

x∆(k+j+1|k) = A x∆(k + j|k) +B3 v∆(k + j|k)z(k + j|k) = C2 x∆(k + j|k) +D23 v∆(k + j|k)

Substitution in the performance index leads to:

J(v, k) =

∞∑

j=0

zT (k + j|k)Γ(j)z(k + j|k)

=∞∑

j=0

((

xT∆(k + j|k)CT2 + e(k + j|k)DT

21

)(

C2x∆(k + j|k) +D21 e(k|k))

+

2(

xT∆(k + j|k)CT2 + e(k + j|k)DT

21

)

D23 v∆(k + j|k)+ vT∆(k + j|k)DT

23D23 v∆(k + j|k))

Now define

v(k + j|k) = v∆(k + j|k) + (DT23D23)

−1DT23

(

C2x∆(k + j|k) +D21 e(k + j|k))

(5.52)

Then the state equation is given by:

x∆(k+j+1|k) =A x∆(k + j|k) +B1 e(k + j|k) +B3 v∆(k + j|k)=(

A− B3(DT23D23)

−1DT23C2

)

x∆(k + j|k)+(

B1 − B3(DT23D23)

−1DT23D12

)

e(k + j|k) +B3 v(k + j|k)

Now we define a new state

x(k + j|k) =

[

x∆(k + j|k)e(k + j|k)

]

and define

A =

[

A−B3(DT23D23)

−1DT23C2 B1 − B3(D

T23D23)

−1DT23D12

0 0

]

B =

[

B3

0

]

C = (I −D23(DT23D23)

−1DT23)[

C2 D21

]

D = D23

(5.53)

Page 71: MPC

5.2. INFINITE HORIZON SPCP 71

We obtain

x(k+j+1|k) = Ax(k + j|k) + B v(k + j|k)z(k+j|k) = Cx(k + j|k) + D v(k + j|k)

and the performance index becomes

J(v, k) =∞∑

j=0

zT (k+j|k)z(k+j|k)

=xT (k+j|k)CT Cx(k+j|k) + xT (k+j|k)CT D v(k+j|k) + vT (k+j|k)DT D v(k+j|k)

=

∞∑

j=0

xT (k+j|k)Qx(k+j|k) + vT (k+j|k)Rv(k+j|k)

where

Q = CT C =[

C2 D21

]T(I −D23(D

T23D23)

−1DT23)[

C2 D21

]

,

R = DT D = DT23D23.

(5.54)

and we used the fact that DT C = DT23(I − D23(D

T23D23)

−1DT23)[

C2 D21

]

= (D23 −D23)

[

C2 D21

]

= 0.Minimizing the performance index has now becomes a standard LQG problem (Strejc,[63]), and the optimal control signal v is given by

v(k) = −(BTPB + R)−1BTPA x(k|k) (5.55)

where P ≥ 0 is the smallest positive semi-definite solution of the discrete time Riccatiequation

P = ATPA− ATPB(BTPB + R)−1BTPA+ Q

which exists due to stabilizability of (A, B) and invertibility of R.The closed loop equations can now be derived by substitution of (5.52), (5.55) and (5.44)into (5.52) to obtain

v(k) =− F x(k|k) +Dw w(k) +De e(k|k)

where

F =(

(BTPB + R)−1BTP

[

A−B3(DT23D23)

−1DT23C2

0

]

+ (DT23D23)

−1DT23C2

)

Dw =(

(BTPB + R)−1BTP

[

A−B3(DT23D23)

−1DT23C2

0

]

+ (DT23D23)

−1DT23C2

)

Dssx +Dssv

De =−(

(BTPB + R)−1BTP

[

B1−B3(DT23D23)

−1DT23D12

0

]

+ (DT23D23)

−1DT23D21

)

Page 72: MPC

72 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

and wss = w(k) = w(k).Note that in the above we have used that R = DT

23D23 is invertible. This is a strengtenedversion of assumption 2 as formulated in the beginning of this chapter. With some ef-fort, the above can be derived solely based on assumptions 2 and 3 without relying oninvertibility of R.The results are summarized in the following theorem:

Theorem 15Consider system (5.1) - (5.3) with a steady-state (vss, xss, wss, zss) = (Dssvwss, Dssxwss, wss, 0).Further let w(k + j) = wss for j > 0 and let A, B, C, D, Q, and R be defined as inequations (5.53) and (5.54). The unconstrained infinite horizon standard predictive controlproblem of minimizing performance index

J(v, k) =

∞∑

j=0

zT (k + j|k)z(k + j|k) (5.56)

is solved by control law

v(k) = −F x(k|k) +Dw w(k) +De e(k) (5.57)

where

F =(

(BTPB + R)−1BTP

[

A−B3(DT23D23)

−1DT23C2

0

]

+ (DT23D23)

−1DT23C2

)

Dw =(

(BTPB + R)−1BTP

[

A−B3(DT23D23)

−1DT23C2

0

]

+ (DT23D23)

−1DT23C2

)

Dssx +Dssv

De =−(

(BTPB + R)−1BTP

[

B1−B3(DT23D23)

−1DT23D12

0

]

+ (DT23D23)

−1DT23D21

)

and P is the solution of the discrete time Riccati equation

P = ATPA− ATPB(BTPB + R)−1BTPA+ Q

5.2.4 The infinite Horizon Standard Predictive Control Problemwith control horizon constraint

The infinite Horizon Standard Predictive Control Problem with control horizon constraintis defined as follows:

Definition 16 Consider a system given by the state-space realization

x(k + 1) = Ax(k) +B1 e(k) +B2w(k) +B3 v(k) (5.58)

y(k) = C1 x(k) +D11 e(k) +D12w(k) (5.59)

z(k) = C2 x(k) +D21 e(k) +D22w(k) +D23 v(k) (5.60)

Page 73: MPC

5.2. INFINITE HORIZON SPCP 73

The goal is to find a controller v(k) = K(w, y, k) such that the performance index

J(v, k) =∞∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) (5.61)

is minimized subject to the control horizon constraint

v(k + j|k) = 0 , for j ≥ Nc (5.62)

and inequality constraints

ψ(k) = CNc,4x(k|k) + DNc,41e(k|k) + DNc,42w(k) + DNc,43v(k) ≤ Ψ(k) (5.63)

and for all j ≥ Nc:

ψ∞(k + j) = C5x(k + j) +D51e(k + j) +D52w(k + j) +D53v(k + j) ≤ Ψ∞ (5.64)

where

w(k) =

w(k|k)w(k + 1|k)

...w(k +Nc − 1|k)

v(k) =

v(k|k)v(k + 1|k)

...v(k +Nc − 1|k)

The above problem is denoted as the Infinite Horizon Standard Predictive Control Problemwith control horizon constraint.

Theorem 17Consider system (5.58) - (5.60) and let

Nc < ∞ΓNc = diag

(

Γ(0),Γ(1), . . . ,Γ(Nc − 1))

Γ(j) = Γss for j ≥ Nc

w(k + j) = wss for j ≥ Nc[

vssxss

]

=

[

Dssv

Dssx

]

w(k)

w(k) =[

I 0 · · · 0]

w(k) = Ew w(k)

Let A be partioned into a stable part As and an unstable part Au as follows:

A =[

Ts Tu]

[

As 00 Au

][

TsTu

]

(5.65)

Page 74: MPC

74 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

where

[

Ts Tu]

[

TsTu

]

=

[

I 00 I

]

.

Define the vector

ǫ = Ψ∞ − (C5Dssx +D52Ew +D53Dssv)w(k) ∈ Rnc5×1 (5.66)

diagonal matrix

E = diag(ǫ1, ǫ2, . . . , ǫnc5) > 0, (5.67)

Define, for any integer m > 0, matrix

Wm =

E−1C5TsAsE−1C5TsA

2s

...E−1C5TsA

ms

(5.68)

Let nψ be such that for any x

E−1C5TsAksx ≤ 1 for all k ≤ nψ

implies that

E−1C5TsAisx ≤ 1 for all k > nψ

Let CNc,2, DNc,21, DNc,22, DNc,23, CNc,3, DNc,31, DNc,32 and DNc,33 be given by

CNc,2 =

C2

C2A...C2A

Nc−1

DNc,21 =

D21

C2B1... C2A

Nc−2B1

(5.69)

DNc,22 =

D22 0 · · · 0C2B2 D22 0

.... . .

...C2A

Nc−2B2 C2ANc−3B2 · · · D22

(5.70)

DNc,23 =

D23 0 · · · 0C2B3 D23 0

.... . .

...C2A

Nc−2B3 C2ANc−2B3 · · · D23

(5.71)

CNc,3 =[

ANc]

DNc,31 =[

ANc−1B1

]

(5.72)

Page 75: MPC

5.2. INFINITE HORIZON SPCP 75

DNc,32 =[

[ ANc−1B2 · · · B2 ]−Dssx

]

(5.73)

DNc,33 =[

[ ANc−1B3 · · · B3 ]]

(5.74)

Let Y be given by

Y =[

TuDNc,33

]

, (5.75)

Let Y have full row-rank with a right-complement Y r⊥ and a right-inverse Y r. Further letM be the solution of the discrete-time Lyapunov equation

ATs M As − M + T Ts CT2 ΓssC2Ts = 0

Consider the infinite-horizon model predictive control problem, defined as minimizing (5.61)subject to an input signal v(k+j|k), with v(k+j|k) = 0 for j ≥ Nc and inequality constraints(5.63) and (5.64).Define:

Aψ =

[

DNc,43

WnψDNc,33

]

Y r⊥

H = 2(Y r⊥)T(

DTNc,33T

Ts MTsDNc,33 + DT

Nc,23ΓNcDNc,23

)

Y r⊥

bψ(k) =

[

CNc,4 − DNc,43F

Wnψ(CNc,3 − DNc,33F )

]

x(k|k)+[

DNc,41 + DNc,43De

Wnψ(DNc,31 + DNc,33De)

]

e(k|k)

+

[

DNc,42 + DNc,43Dw

Wnψ(DNc,32 + DNc,33Dw)

]

w(k)−[

Ψ(k)1

]

(5.76)

where

F = −Z1CNc,3 − Z2CNc,2 − Z3YrTuCNc,3

De = Z1DNc,31 + Z2DNc,21 + Z3YrTuDNc,31

Dw = Z1DNc,32 + Z2DNc,22 + Z3YrTuDNc,32

Z1 = −Y rTu − 2Y r⊥H−1(Y r⊥)T DTNc,33T

Ts MTs

Z2 = −2Y r⊥H−1(Y r⊥)T DTNc,23ΓNc

Z3 = 2Y r⊥H−1(Y r⊥)T DTNc,33T

Ts MTsDNc,33 + 2Y r⊥H−1(Y r⊥)T DT

Nc,23ΓNcDNc,23

and 1 =[

1 1 · · · 1]T

.The optimal control law that optimizes the inequality constrained infinite-horizon MPCproblem is given by:

v(k) = −F x(k|k) +De e(k|k) +Dw w(k) +DµµI(k) (5.77)

where

F = EvF , De = EvDe , Dw = EvDw, Dµ = EvYr⊥

Page 76: MPC

76 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

and where µI is the solution for the quadratic programming problem

minµI

1

2µTI H µI

subject to:

AψµI + bψ(k) ≤ 0

and Ev =[

I 0 . . . 0]

such that v(k) = Evv(k).In the absence of inequality constraints (5.63) and (5.64), the optimum µI = 0 is obtainedand so the control law is given analytically by:

v(k) = −F x(k|k) +De e(k|k) +Dw w(k) (5.78)

Theorem 17 is a special case of theorem 21 in the next subsection.

5.2.5 The Infinite Horizon Standard Predictive Control Problem

with structured input signals

The Infinite Horizon Standard Predictive Control Problem with structured input signalsis defined as follows:

Definition 18 Consider a system given by the state-space realization

x(k + 1) = Ax(k) +B1 e(k) +B2w(k) +B3 v(k) (5.79)

y(k) = C1 x(k) +D11 e(k) +D12w(k) (5.80)

z(k) = C2 x(k) +D21 e(k) +D22w(k) +D23 v(k) (5.81)

Consider the finite switching horizon Ns, then the goal is to find a controller such that theperformance index

J(v, k) =

∞∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) (5.82)

is minimized subject to the constraints

φ(k) = −Sℓ⊥v Dssvw(k) + Sℓ⊥v v(k) = 0 (5.83)

ψ(k) = CNs,4x(k|k) + DNs,41e(k|k) + DNs,42w(k) + DNs,43v(k) ≤ Ψ(k) (5.84)

where Sv is defined on page 68 and for all j ≥ Ns:

ψ∞(k + j|k) ≤ Ψ∞ (5.85)

where

ψ∞(k) = C5x(k|k) +D51e(k|k) +D52w(k) +D53v(k) ,

Page 77: MPC

5.2. INFINITE HORIZON SPCP 77

w(k) =

w(k|k)w(k + 1|k)

...w(k +Ns − 1|k)

v(k) =

v(k|k)v(k + 1|k)

...v(k +Ns − 1|k)

and v(k + j|k) beyond the switching horizon (j ≥ Ns) is given by

v(k + j|k) = Cv Aj−Nsv Bv v(k) + vss j ≥ Ns (5.86)

The above problem is denoted as the Infinite Horizon Standard Predictive Control Problemwith structured input signals.

Remark 19 : The equality constraint in the above definition is due to the constraint im-posed on the structure of the input signal in the equations (5.86) and (5.83) as discussedin section 5.2.2.

Remark 20 : Equation (5.84) covers inequality constraints up to the switching horizon,equation (5.85) covers inequality constraints beyond the switching horizon.

Theorem 21Consider system (5.79) - (5.81) and let

Ns < ∞ΓNs = diag

(

Γ(0),Γ(1), . . . ,Γ(Ns − 1))

Γ(j) = Γss for j ≥ Ns

w(k + j|k) = wss for j ≥ Ns[

vssxss

]

=

[

Dssv

Dssx

]

w(k)

w(k) =[

I 0 · · · 0]

w(k) = Ew w(k)

Let AT , CT be given by

AT =

[

A B3Cv0 Av

]

CT =[

C2 D23Cv]

(5.87)

with a partitioning of AT into a stable part As and an unstable part Au as follows:

AT =[

Ts Tu]

[

As 00 Au

][

TsTu

]

(5.88)

where

[

Ts Tu]

[

TsTu

]

=

[

I 00 I

]

Page 78: MPC

78 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

Define the vector

ǫ = Ψ∞ − (C5Dssx +D52Ew +D53Dssv)w(k) ∈ Rnc5×1 (5.89)

diagonal matrix

E = diag(ǫ1, ǫ2, . . . , ǫnc5) > 0, (5.90)

and

Cψ =[

C5 D53Cv]

(5.91)

Define, for any integer m > 0, the matrix

Wm =

E−1CψTsAsE−1CψTsA

2s

...E−1CψTsA

ms

(5.92)

Let nψ be such that for any x

E−1CψTsAksx ≤ 1 for all k ≤ nψ

implies that

E−1CψTsAisx ≤ 1 for all k > nψ

Let CNs,2, DNs,21, DNs,22, DNs,23, CNs,3, DNs,31, DNs,32, and DNs,33 be given by

CNs,2 =

C2

C2A...C2A

Ns−1

DNs,21 =

D21

C2B1...C2A

Ns−2B1

(5.93)

DNs,22 =

D22 0 · · · 0C2B2 D22 0

.... . .

...C2A

Ns−2B2 C2ANs−3B2 · · · D22

(5.94)

DNs,23 =

D23 0 · · · 0C2B3 D23 0

.... . .

...C2A

Ns−2B3 C2ANs−2B3 · · · D23

(5.95)

CNs,3 =

[

ANs

0

]

DNs,31 =

[

ANs−1B1

0

]

(5.96)

Page 79: MPC

5.2. INFINITE HORIZON SPCP 79

DNs,32 =

[

[ANs−1B2 · · · B2 ]−Dssx

0

]

(5.97)

DNs,33 =

[

[ANs−1B3 · · · B3 ]Bv

]

(5.98)

Let Y be given by

Y =

[

TuDNs,33

Sℓ⊥v

]

, (5.99)

Let Y have full row-rank with a right-complement Y r⊥ and a right-inverse Y r, partioned as

Y r =[

Y r1 Y r

2

]

(5.100)

such that TuDNs,33Yr1 = I, TuDNs,33Y

r2 = 0 Sℓ⊥v Y r

1 = 0 and Sℓ⊥v Y r2 = I. Further let M be

the solution of the discrete-time Lyapunov equation

ATs M As − M + T Ts CTT ΓssCTTs = 0

Consider the infinite-horizon model predictive control problem, defined as minimizing (5.82)subject to an input signal v(k + j|k), given by (5.46) and (5.49)-(5.51) and inequalityconstraints (5.84) and (5.85).Define:

Aψ =

[

DNs,43

WnψDNs,33

]

Y r⊥

H = 2(Y r⊥)T(

DTNs,33T

Ts MTsDNs,33 + DT

Ns,23ΓNsDNs,23

)

Y r⊥

bψ(k) =

[

CNs,4 − DNs,43F

Wnψ(CNs,3 − DNs,33F )

]

x(k|k)+[

DNs,41 + DNs,43De

Wnψ(DNs,31 + DNs,33De)

]

e(k|k)

+

[

DNs,42 + DNs,43Dw

Wnψ(DNs,32 + DNs,33Dw)

]

w(k)−[

Ψ(k)1

]

(5.101)

where

F = −Z1CNs,3 − Z2CNs,2 − Z3Yr1 TuCNs,3

De = Z1DNs,31 + Z2DNs,21 + Z3Yr1 TuDNs,31

Dw = Z1DNs,32 + Z2DNs,22 + Z3Yr1 TuDNs,32 − (Z3 − I)Y r

2 Sℓ⊥v Dssv

Z1 = −Y r1 Tu − 2Y r⊥H−1(Y r⊥)T DT

Ns,33TTs MTs

Z2 = −2Y r⊥H−1(Y r⊥)T DTNs,23ΓNs

Z3 = 2Y r⊥H−1(Y r⊥)T DTNs,33T

Ts MTsDNs,33 + 2Y r⊥H−1(Y r⊥)T DT

Ns,23ΓNsDNs,23

and 1 =[

1 1 · · · 1]T

.

Page 80: MPC

80 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

The optimal control law that optimizes the inequality constrained infinite-horizon MPCproblem is given by:

v(k) = −F x(k|k) +De e(k|k) +Dw w(k) +DµµI(k) (5.102)

where

F = EvF , De = EvDe , Dw = EvDw, Dµ = EvYr⊥

and where µI is the solution for the quadratic programming problem

minµI

1

2µTI H µI

subject to:

AψµI + bψ(k) ≤ 0

and Ev =[

I 0 . . . 0]

such that v(k) = Evv(k).

In the absence of inequality constraints (5.84) and (5.85), the optimum µI = 0 is obtainedand so the control law is given analytically by:

v(k) = −F x(k|k) +De e(k|k) +Dw w(k) (5.103)

Remark 22 : Note that if for any i = 1, . . . , nc5 there holds:

[ǫ]i ≤ 0

the i-th constraint

[ψ∞(k + j|k)]i ≤ [Ψ∞]i

cannot be satisfied for j ←∞ and the infinite horizon predictive control problem is infea-sible. A necessary condition for feasibility is therefore

E = diag(ǫ1, ǫ2, . . . , ǫnc5) > 0

Proof of theorem 21:

The performance index can be split in two parts:

J(v, k) =

∞∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) = J1(v, k) + J2(v, k)

Page 81: MPC

5.2. INFINITE HORIZON SPCP 81

where

J1(v, k) =

Ns−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k)

J2(v, k) =∞∑

j=Ns

zT (k + j|k)Γssz(k + j|k)

For technical reasons we will consider the derivation of criterion J2 before we derive crite-rion J1.

Derivation of J2:Consider system (5.79) - (5.81) with structured input signal (5.49), (5.50) and (5.51) andconstraint (5.46). Define for j ≥ Ns:

x∆(k + j|k) = x(k + j|k)− xssv∆(k + j|k) = v(k + j|k)− vss

Then, using the fact that w(k + j|k) = wss and e(k + j|k) = 0 for j ≥ Ns, it follows forj ≥ Ns:

x∆(k+j+1|k) = x(k+j+1|k)− xss= A x(k + j|k) +B1 e(k + j|k) +B2w(k + j|k) +B3 v(k + j|k)− xss= A x(k + j|k) +B1 0 +B2wss +B3 vss +B3 v∆(k + j|k)− xss= A x(k + j|k) + 0 + (I −A) xss − xss +B3Cv xv(k + j|k)= A x∆(k + j|k) +B3Cv xv(k + j|k)

z(k + j|k) = C2 x(k + j|k) +D21 e(k + j|k) +D22 w(k + j|k) +D23 v(k + j|k)= C2 x∆(k + j|k) + C2 xss +D22wss +D23 vss +D23 v∆(k + j|k)= C2 x∆(k + j|k) + 0 +D23Cv xv(k + j|k)= C2 x∆(k + j|k) +D23Cv xv(k + j|k)

Define

xT (k + j|k) =

[

x∆(k + j|k)xv(k + j|k)

]

Then, using AT and CT from (5.87), we find for j ≥ Ns:

xT (k+j+1|k) = AT xT (k + j|k)z(k + j|k) = CT xT (k + j|k)

which is an autonomous system. This means that z(k+j|k) can be computed for all j ≥ Ns

if initial state xT (k +Ns|k) is given, so if x(k +Ns) and xv(k +Ns) are known. The state

Page 82: MPC

82 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

xv(k + Ns) is given by equation (5.49), the state x(k + Ns|k) can be found by successivesubstitution:

x(k +Ns|k) = ANs x(k|k) + ANs−1B1 e(k|k) +[

ANs−1B2 · · · B2

]

w(k) +

+[

ANs−1B3 · · · B3

]

v(k)

together with xv(k +Ns|k) = Bv v(k) we obtain

xT (k +Ns|k) =

[

x(k +Ns|k)− xssxv(k +Ns)

]

= CNs,3 x(k|k) + DNs,31 e(k|k) + DNs,32 w(k) + DNs,33 v(k)

where CNs,3, DNs,31, DNs,32 and DNs,33 as defined in (5.96)-(5.98), and xss = Dssxw(k).The prediction z(k + j|k) for j ≥ Ns is obtained by successive substitution, resulting in:

z(k + j|k) = CT Aj−NsT xT (k +Ns|k) (5.104)

Now a problem occurs when the matrix AT contains unstable eigenvalues (|λi| ≥ 1). Forj −→ ∞, the matrix Aj−NsT will become unbounded, and so will z. The only way to solvethis problem is to make sure that the part of the state xT (k+Ns), related to the unstablepoles is zero (Rawlings & Muske, [51]). Make a partitioning of AT into a stable part Asand an unstable part Au as in (5.88), then (5.104) becomes:

z(k + j|k) = CT[

Ts Tu]

[

Aj−Nss 00 Aj−Nsu

][

TsTu

]

xT (k +Ns|k)

= CT TsAj−Nss TsxT (k +Ns|k) + CT TuA

j−Nsu TuxT (k +Ns|k) (5.105)

The matrix Aj−Nsu will grow unbounded for j →∞. The prediction z(k + j|k) for j →∞will only remain bounded if TuxT (k +Ns|k) = 0.In order to guarantee closed-loop stability for systems with unstable modes in AT , we needto satisfy equality constraint

TuxT (k+Ns|k) = Tu

(

CNs,3x(k|k)+DNs,31e(k|k)+DNs,32w(k)+DNs,33v(k))

= 0 (5.106)

Together with the equality constraint (5.83) we obtain the final constraint:[

TuCNs,30

]

x(k|k) +

[

TuDNs,31

0

]

e(k|k) +

[

TuDNs,32

−Sℓ⊥v Dssv

]

w(k) +

[

TuDNs,33

Sℓ⊥v

]

v(k) = 0

Consider Y as given in (5.99) with right-inverse Y r =[

Y r1 Y r

2

]

and right-complementY r⊥, then the set of all signals v(k) satisfying the equality constraints is given by

v(k) = vE(k) + Y r⊥µ(k) (5.107)

where vE is given by

vE(k) = −Y r

([

TuCNs,30

]

x(k|k) +

[

TuDNs,31

0

]

e(k|k) +

[

TuDNs,32

−Sℓ⊥v Dssv

]

w(k)

)

= −Y r1 Tu

(

CNs,3 x(k|k) + DNs,31 e(k|k) + DNs,32 w(k))

+ Y r2 TuSℓ⊥v Dssv w(k)

Page 83: MPC

5.2. INFINITE HORIZON SPCP 83

and µ(k) is a free vector with the appropriate dimensions.If the equality TuxT (k +Ns|k) = 0 is satisfied, the prediction becomes:

z(k + j|k) = CT[

Ts Tu]

[

Aj−Nss 00 Aj−Nsu

][

TsxT (k +Ns|k)0

]

= (5.108)

= CT TsAj−Nss TsxT (k +Ns|k) (5.109)

Define

M =

∞∑

j=Ns

(ATs )j−NsT Ts CTT ΓssCT Ts(As)

j−Ns (5.110)

then

J2(v, k) =

∞∑

j=Ns

zT (k + j|k)Γssz(k + j|k)

=

∞∑

j=Ns

xTT (k +Ns|k)T Ts (ATs )j−NsT Ts CTT ΓssCT Ts(As)

j−NsTsxT (k +Ns|k)

= xTT (k +Ns|k)T Ts MTsxT (k +Ns|k)

=1

2µT (k)H2µ(k) + µT (k)f2(k) + c2(k)

where

H2 = 2(Y r⊥)T DTNs,33T

Ts MTsDNs,33Y

r⊥

f2(k) = 2(Y r⊥)T DTNs,33T

Ts MTsxT,E(k+Ns|k)

c2(k) = xTT,E(k +Ns|k)T Ts MTsxT,E(k+Ns|k)xT,E(k+Ns|k) = CNs,3 x(k|k) + DNs,31 e(k|k) + DNs,32 w(k) + DNs,33 vE(k)

The matrix M can be computed as the solution of the discrete time Lyapunov equation

ATs M As − M + T Ts CTT ΓssCTTs = 0

Derivation of J1:The expression of J1(v, k) is equivalent to the expression of the performance index J(v, k)for a finite prediction horizon. The performance signal vector z(k) is defined for switchinghorizon Ns:

z(k) =

z(k|k)z(k+1|k)

...z(k+Ns − 1|k)

Page 84: MPC

84 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

Using the results of chapter 3 we derive:

z(k) = CNs,2 x(k|k) + DNs,21 e(k|k) + DNs,22 w(k) + DNs,23 v(k)

= CNs,2 x(k|k)+DNs,21 e(k|k)+DNs,22 w(k)+DNs,23

(

vE(k)+Y r⊥µ(k))

where CNs,2, DNs,21, DNs,22 and DNs,23 are given in (5.93)-(5.95). Now J1 becomes

J1(v, k) =Ns−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) =

= zT (k)ΓNs z(k) =

=1

2µT (k)H1µ(k) + µT (k)f1(k) + c1(k)

where

H1 = 2(Y r⊥)T DTNs,23ΓNsDNs,23Y

r⊥

f1(k) = 2(Y r⊥)T DTNs,23ΓNs zE(k)

c1(k) = zTE(k)ΓNs zE(k)

zE(k) = CNs,2 x(k|k) + DNs,21 e(k|k) + DNs,22 w(k) + DNs,23vE(k)

Minimization of J1 + J2:Combining the results we obtain the problem of minimizing

J1 + J2 =1

2µT (k)(H1+H2)µ(k) + µT (k)(f1(k)+f2(k)) + c1(k) + c2(k) (5.111)

=1

2µT (k)H µ(k) + µT (k) f(k) + c(k) (5.112)

Now define:

xT,0(k +Ns|k) = CNs,3 x(k|k) + DNs,31 e(k|k) + DNs,32 w(k) (5.113)

z0(k) = CNs,2 x(k|k) + DNs,21 e(k|k) + DNs,22 w(k) (5.114)

φ0(k) = −Sℓ⊥v Dssv w(k) (5.115)

or

xT,0(k +Ns|k)z0(k)

φ0(k)

=

CNs,3CNs,2

0

x(k|k)+

DNs,31

DNs,21

0

e(k|k)+

DNs,32

DNs,22

−Sℓ⊥v Dssv

w(k) (5.116)

Then:

vE(k) = −Y r1 TuxT,0(k)− Y r

2 φ0(k)

xT,E(k +Ns|k) = xT,0(k) + DNs,33vE(k)

= xT,0(k)− DNs,33Yr1 TuxT,0(k)− DNs,33Y

r2 φ0(k)

zE(k) = z0(k) + DNs,23vE(k)

= z0(k)− DNs,23Yr1 TuxT,0(k)− DNs,23Y

r2 φ0(k)

Page 85: MPC

5.2. INFINITE HORIZON SPCP 85

and thus:

vE(k)xT,E(k +Ns|k)

zE(k)

=

−Y r1 Tu 0 −Y r

2

(I − DNs,33Yr1 Tu) 0 −DNs,33Y

r2

−DNs,23Yr1 Tu I −DNs,23Y

r2

xT,0(k +Ns|k)z0(k)

φ0(k)

(5.117)

Collecting the results from equations (5.113)-(5.117) we obtain:

f(k) = f1(k) + f2(k)

= 2(Y r⊥)T DTNs,23ΓNs zE(k) + 2(Y r⊥)T DT

Ns,33TTs MTsxT,E(k +Ns|k)

=[

0 2(Y r⊥)T DTNs,33

T Ts MTs 2(Y r⊥)T DTNs,23

ΓNs]

vE(k)xT,E(k +Ns|k)

zE(k)

In the absence of inequality constraints we obtain the unconstrained minimization of(5.112). The minimum µ = µE is found for

µE(k) = −(H1 +H2)−1(f1(k) + f2(k)) = −H−1f(k)

and so

v(k) = vE(k) + Y r⊥µE(k)

= vE(k)− Y r⊥H−1f(k)

= vE(k)− 2Y r⊥H−1(Y r⊥)T DTNs,23ΓNs zE(k)− 2Y r⊥H−1(Y r⊥)T DT

Ns,33TTs MTsxT,E(k +Ns|k)

=[

I −2Y r⊥H−1(Y r⊥)T DTNs,33T

Ts MTs −2Y r⊥H−1(Y r⊥)T DT

Ns,23ΓNs]

vE(k)xT,E(k +Ns|k)

zE(k)

=[

I −2Y r⊥H−1(Y r⊥)T DTNs,33T

Ts MTs −2Y r⊥H−1(Y r⊥)T DT

Ns,23ΓNs]

·

·

−Y r1 Tu 0 −Y r

2

(I − DNs,33Yr1 Tu) 0 −DNs,33Y

r2

−DNs,23Yr1 Tu I −DNs,23Y

r2

xT,0(k +Ns|k)z0(k)

φ0(k)

=[

I −2Y r⊥H−1(Y r⊥)T DTNs,33T

Ts MTs −2Y r⊥H−1(Y r⊥)T DT

Ns,23ΓNs]

·

·

−Y r1 Tu 0 −Y r

2

(I − DNs,33Yr1 Tu) 0 −DNs,33Y

r2

−DNs,23Yr1 Tu I −DNs,23Y

r2

·

·

CNs,3CNs,2

0

x(k|k)+

DNs,31

DNs,21

0

e(k|k)+

DNs,32

DNs,22

−Sℓ⊥v Dssv

w(k)

=[

Z1 + Z3Yr1 Tu Z2 (Z3 − I)Y r

2

]

·

·

CNs,3CNs,2

0

x(k|k)+

DNs,31

DNs,21

0

e(k|k)+

DNs,32

DNs,22

−Sℓ⊥v Dssv

w(k)

=−F x(k|k) + Dee(k|k) + Dww(k)

Page 86: MPC

86 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

The optimal input becomes

v(k)=Evv(k)

=−EvF x(k|k) + EvDee(k|k) + EvDww(k)

=−Fx(k|k) +Dee(k|k) +Dww(k)

which is equal to control law (5.103).

Inequality constraints:Now we will concentrate on the inequality constraints. The following derivation is anextension of the result, given in Rawlings & Muske [51]. Consider the inequality constraints:

ψ(k)= CNs,4x(k|k)+DNs,41e(k|k)+DNs,42w(k)+DNs,43v(k) ≤ Ψ(k)

where we assume that ψ(k) has finite dimension. To allow inequality constraints beyondthe switching horizon Ns we have introduced an extra inequality constraint

ψ∞(k + j|k) ≤ Ψ∞ , j ≥ Ns

where Ψ∞ ∈ Rnc5×1 is a constant vector and ψ∞(k + j|k) is a prediction of ψ∞(k + j|k)

given by

ψ∞(k + j|k) = C5x(k + j|k) +D51e(k + j|k) +D52w(k + j|k) +D53v(k + j|k)

Define ǫ, E, Cψ and Wm according to (5.89), (5.90), (5.91) and (5.92). Further let nψ bedefined as in theorem 21 and let

ψ∞(k +Ns + j|k) ≤ Ψ∞ for j = 1, . . . , nψ (5.118)

We derive for j > 0:

ψ∞(k+Ns+j|k) = C5x(k +Ns + j|k) +D52w(k +Ns + j|k) +D53v(k +Ns + j|k)= C5xT (k +Ns + j|k) +D53Cv xv(k +Ns + j|k)) +

+C5xss +D52wss +D53vss

= C5x∆(k +Ns + j|k) +D53Cv xv(k +Ns + j) +

+(C5Dssx +D52 +D53Dssv)wss

= CψxT (k +Ns + j|k) + (C5Dssx +D52 +D53Dssv)wss

From equation (5.118) we know that for j = 1, . . . , nψ

ψ∞(k+Ns+ j|k)− (C5Dssx+D52 +D53Dssv)wss < Ψ∞− (C5Dssx+D52 +D53Dssv)wss

and so

CψxT (k +Ns + j|k) ≤ ǫ

Page 87: MPC

5.2. INFINITE HORIZON SPCP 87

Multiplied by E−1 we obtain for j = 1, . . . , nψ:

E−1ψ∞(k +Ns + j|k) = E−1CψxT (k +Ns + j|k) ≤ 1

or, equivalently,

E−1CψAjT xT (k +Ns|k) ≤ 1

We know TuxT (k +Ns|k) = 0. We find that:

E−1CψTsAjsTsxT (k +Ns|k) ≤ 1.

We know that nψ is chosen such that the above for j = 1, . . . , nψ implies that

E−1CψTsAjsTsxT (k +Ns|k) ≤ 1.

for all j > nψ. Combined with TuxT (k +Ns|k) = 0, this implies that

E−1CψAjT xT (k +Ns|k) ≤ 1.

for all j > nψ. Therefore, starting from (5.118) we derived

ψ∞(k +Ns + j|k) ≤ Ψ∞ for j = nψ + 1, . . . ,∞ (5.119)

This means that (5.118), together with the extra equality constraint (5.106) implies (5.119).Equation (5.118) can be rewritten as

Wnψ xT (k +Ns|k) ≤ 1

Together with constraint (5.84) this results in the overall inequality constraint

[

ψ(k)− Ψ(k)Wnψ xT (k +Ns|k)− 1

]

≤ 0

Consider performance index (5.112) in which the optimization vector µ(k) is written as

µ(k) = µE(k) + µI(k) (5.120)

= −(H1+H2)−1(f1(k)+f2(k)) + µI(k) (5.121)

= −H−1(f(k)) + µI(k) (5.122)

where µE(k) is the equality constrained solution given in the previous section, and µi(k) isan additional term to take the inequality constraints into account. The performance index

Page 88: MPC

88 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

now becomes

1

2µT (k)H µ(k) + fT (k)µ(k) + c(k) =

=1

2

(

−H−1f(k) + µI(k))T

H(

−H−1f(k) + µI(k))

+fT (k)(

−H−1f(k) + µI(k))

+ c(k) =

=1

2µTI (k)H µI(k)− fT (k)H−1H µI(k)

+1

2fT (k)H−1HH−1f(k)− fT (k)H−1f(k) + fT (k)µI(k) + c(k)

=1

2µTI (k)H µI(k)−

1

2fT (k)H−1f(k) + c(k)

=1

2µTI (k)H µI(k) + c′(k) (5.123)

Now consider the input signal

v(k) = vE(k) + Y r⊥µ(k)

= vE(k)− Y r⊥H−1f(k) + Y r⊥µI(k)

= vI(k) + Y r⊥µI(k)

where

vI(k) = vE(k) + Y r⊥µ(k) = −F x(k|k) + Dee(k|k) + Dww(k)

and define the signals

ψI(k) = ψ0(k)+DNs,43vI(k)

= (CNs,4 − DNs,43F )x(k|k)+(DNs,41 + DNs,43De)e(k|k)+(DNs,42 + DNs,43Dw)w(k) (5.124)

xT,I(k +Ns|k) = xT,0(k +Ns|k) + DNs,33vI(k)

= (CNs,3 − DNs,33F )x(k|k)+(DNs,31 + DNs,33De)e(k|k)+(DNs,32 + DNs,33Dw)w(k) (5.125)

then

ψ(k) = ψI(k) + DNs,43Yr⊥µI(k)

xT (k +Ns|k) = xT,I(k +Ns|k) + DNs,33Yr⊥µI(k)

and we can rewrite the constraint as:[

ψ(k)− Ψ(k)Wnψ xT (k +Ns|k)− 1

]

= AψµI(k) + bψ(k) ≤ 0 (5.126)

Page 89: MPC

5.3. IMPLEMENTATION 89

where

bψ(k) =

[

ψI(k)− Ψ(k)Wnψ xT,I(k +Ns|k)− 1

]

(5.127)

Aψ =

[

DNs,43

WnψDNs,33

]

Y r⊥ (5.128)

Substitution of (5.124) and (5.125) in (5.127) gives

bψ(k) =

[

CNs,4 − DNs,43F

Wnψ(CNs,3 − DNs,33F )

]

x(k|k)+[

DNs,41 + DNs,43De

Wnψ(DNs,31 + DNs,33De)

]

e(k|k)

+

[

DNs,42 + DNs,43Dw

Wnψ(DNs,32 + DNs,33Dw)

]

w(k)−[

Ψ(k)1

]

The constrained infinite horizon MPC problem is now equivalent to a Quadratic Program-ming problem of minimizing (5.123) subject to (5.126). Note that the term c′(k) in (5.123)does not play any role in the optimization and can therefore be skipped.

2 End Proof

5.3 Implementation

5.3.1 Implementation and computation in LTI case

In this chapter the predictive control problem was solved for various settings (uncon-strained, equality/inequality constrained, finite/infinite horizon). In the absence of in-equality constraints, the resulting controller is given by the control law:

v(k) = −F x(k|k) +De e(k|k) +Dw w(k). (5.129)

Unfortunately, the state x(k|k) of the plant and the true value of e(k|k) are unknown. Wetherefore introduce a controller state xc(k) and an estimate ec(k). By substitution of xc(k)and ec(k) in system equations (5.1)-(5.2) and control law (5.129) we obtain:

xc(k + 1) = Axc(k) +B1 ec(k) +B2w(k) +B3 v(k) (5.130)

ec(k) = D−111

(

y(k)− C1 xc(k)−D12w(k))

(5.131)

v(k) = −F xc(k) +De ec(k) +Dw w(k) (5.132)

Elimination of ec(k) and v(k) from the equations results in the closed loop form for thecontroller:

xc(k + 1) = (A−B3F −B1D−111 C1 − B3DeD

−111 C1) xc(k)

+(B1D−111 +B3DeD

−111 ) y(k)

+(B3Dw −B3DeD−111 D12Ew +B2Ew − B1D

−111 D12Ew) w(k) (5.133)

v(k) = (−F −DeD−111 C1) xc(k) +DeD

−111 y(k) +

+(Dw −DeD−111 D12Ew) w(k) (5.134)

Page 90: MPC

90 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

A

q−1I C1

B2

B3

B1

D11

D12

process

- - - - -

?

?

-

?

-

?

- -

- -

6

d

d

d

dx(k+1) x(k)

e

w

−FB1

B3

A

q−1I −C1

B2Ew

−D12EwD−1

11

DeDw

controller

- - - - -

-

-

- -

6

6

6

@@R

?

?

?

d

d

d dr

ecw

v

xc(k+1) xc(k)

y

w

Figure 5.1: Realization of the LTI SPCP controller

with Ew =[

I 0 . . . 0]

is such that w(k) = Eww(k).

Note that this is an linear time-invariant (LTI) controller.

Figure 5.1 visualizes the controller, where the upper block is the true process, satisfyingequations (5.1) and (5.2), and the lower block is the controller, satisfying equations (5.130),(5.131) and (5.132). Note that the states of the process and controller are denoted by xand xc, respectively. When the controller is stabilizing and there is no model error, thestate xc and the noise estimate ec will converge to the true state x and true noise signale respectively. After a transient the states of plant and controller will become the same.Stability of the closed loop is discussed in chapter 6.

Page 91: MPC

5.3. IMPLEMENTATION 91

Computational aspects:

Consider the expression (5.14)-(5.16). The matrices F , De and Dw can also be found bysolving

( DT23ΓD23 )

[

F De Dw

]

= DT23Γ[

C2 D21 D22

]

(5.135)

where we define F = EvF , De = EvDe and Dw = EvDw. Inversion of DT23ΓD23 may

be badly conditioned and should be avoided. As defined in chapter 4, Γ(j) is a diagonalselection matrix with ones and zeros on the diagonal. This means that Γ = Γ2. DefineM = ΓD23, then we can do a singular value decomposition of M :

M =[

U1 U2

]

[

Σ0

]

V T

and the equation 5.135 becomes:

(V Σ2 V T )[

F De Dw

]

= V ΣUT[

C2 D21 D22

]

(5.136)

and so the solution becomes:[

F De Dw

]

= (V Σ2 V T )−1V ΣUT1

[

C2 D21 D22

]

=

= V Σ−1 UT1

[

C2 D21 D22

]

and so[

F De Dw

]

= Ev V Σ−1 UT1

[

C2 D21 D22

]

For singular value decomposition robust and reliable algorithms are available. Note thatthe inversion of Σ is simple, because it is a diagonal matrix and all elements are positive(we assumes D23ΓD

T23 to have full rank).

5.3.2 Implementation and computation in full SPCP case

In this section we discuss the implementation of the full SPCP controller. For both thefinite and infinite horizon the full SPCP can be solved using an optimal control law

v(k) = v0(k) +DµµI(k) (5.137)

where µ is the solution for the quadratic programming problem

minµ

1

2µTI H µI (5.138)

subject to:

AψµI + bψ(k) ≤ 0 (5.139)

Page 92: MPC

92 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

A

q−1I C1

B2

B3

B1

D11

D12

process

- - - - -

?

?

-

?

-

?

- -

- -

6

d

d

d

dx(k+1) x(k)

e

w

−FB1

B3

A

q−1I −C1

B2Ew

−D12EwD−1

11

DeDw

Nonlinear mapping

controller

- - - - -

-

-

- -

6

6

6

@@R

?

?

?

--

6

6d

d

d dr

ec

µIw

Ψ ec

xc

v

xc(k+1) xc(k)

y

w

Figure 5.2: Realization of the FULL SPCP controller

Page 93: MPC

5.3. IMPLEMENTATION 93

This optimization problem (5.137)-(5.139) can be seen as a nonlinear mapping with inputvariables x(k|k), e(k|k) and w(k) and signal µI(k):

µI(k) = h(xc(k), ec(k), w(k), Ψ(k))

As in the LTI-case (section 5.3.1), estimations xc(k) and ec(k) from the state x(k) andnoise signal e(k), can be obtained using an observer.Figure 5.2 visualizes the nonlinear controller, where the upper block is the true process,satisfying equations (5.1) and (5.2), and the lower block is the controller, where the non-linear mapping has inputs xc(k), ec(k), w(k) and Ψ(k) and output v(k). Again, when thecontroller is stabilizing and there is no model error, the state xc and the noise estimate ecwill converge to the true state x and true noise signal e respectively. After a transient thestates of plant and controller will become the same.An advantage of predictive control is that, by writing the control law as the result of aconstrained optimization problem (5.138)-(5.139), it can effectively deal with constraints.An important disadvantage is that every time step a computationally expensive optimiza-tion problem has to be solved [78]. The time required for the optimization makes modelpredictive control not suitable for fast systems and/or complex problems.In this section we discuss the work of Bemporad et al. [5], who formulate the linearmodel predictive control problem as multi-parametric quadratic programs. The controlvariables are treated as optimization variables and the state variables as parameters. Theoptimal control action is a continuous and piecewise affine function of the state under theassumption that the active constraints are linearly independent. The key advantage of thisapproach is that the control actions are computed off-line: the on-line computation simplyreduces to a function evaluation problem.The Kuhn-Tucker conditions for the quadratic programming problem (5.138)-(5.139) aregiven by:

H µI + ATψ λ = 0 (5.140)

λT(

AψµI + bψ(k))

= 0 (5.141)

λ ≥ 0 (5.142)

AψµI + bψ(k) ≤ 0 (5.143)

Equation (5.140) leads to optimal value for µI :

µI = −H−1ATψ λ (5.144)

substitution into equation (5.141) gives condition

λT(

− AψH−1ATψ λ + bψ(k))

= 0 (5.145)

Let λa and λi denote the Lagrangian multipliers corresponding the active and inactiveconstraints respectively. For inactive constraint there holds λi = 0, for active constraint

Page 94: MPC

94 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

there holds λa > 0. Let Si and Sa be selection matrices such that[

λaλi

]

=

[

SaSi

]

λ

and[

SaSi

]T[SaSi

]

= STa Sa + STi Si = I

then

λ =

[

SaSi

]T[λaλi

]

= STa λa

Substitution in (5.144) and (5.145) gives:

µI = −H−1ATψ STa λa (5.146)

λTaSa

(

− AψH−1ATψ STa λa + bψ(k)

)

= 0 (5.147)

Because λa > 0 equation (5.147) leads to the condition:

−SaAψH−1ATψ STa λa + Sabψ(k) = 0

If SaAψ has full-row rank then λa can be written as

λa =(

SaAψH−1ATψ S

Ta

)−1

Sabψ(k) (5.148)

Substitution in (5.146) gives

µI = −H−1ATψ STa

(

SaAψH−1ATψ S

Ta

)−1

Sabψ(k) (5.149)

inequality (5.143) now becomes

AψµI + bψ(k) =

= bψ(k)− AψH−1ATψ STa

(

SaAψH−1ATψ S

Ta

)−1

Sabψ(k)

=[

I − AψH−1ATψ STa

(

SaAψH−1ATψ S

Ta

)−1

Sa

]

bψ(k)

≤ 0 (5.150)

The solution µI of (5.149) for a given choice of Sa is the optimal solution of the quadraticprogramming problem as long as (5.150) holds and λa ≥ 0. Combining (5.148) and (5.150)gives:

[

M1(Sa)M2(Sa)

]

bψ(k) ≤ 0 (5.151)

Page 95: MPC

5.3. IMPLEMENTATION 95

where

M1(Sa) = I − AψH−1ATψ STa

(

SaAψH−1ATψ S

Ta

)−1

Sa

M2(Sa) = −(

SaAψH−1ATψ S

Ta

)−1

Sa

Let

bψ(k) = N

xc(k)ec(k)w(k)

Ψ(k)

Consider the singular value decomposition

N =[

U1 U2

]

[

Σ 00 0

][

V T1

V T2

]

where Σ is square and has full-rank nN , and define

χ(k) = ΣV T1

xc(k)ec(k)w(k)

Ψ(k)

(5.152)

Condition (5.151) now becomes

[

M1(Sa)M2(Sa)

]

U1χ(k) ≤ 0 (5.153)

Inequality (5.153) describes a polyhedra P(Sa) in the RnN , and represent a set of all χ,

that leads to the set of active constraints described by matrix Sa, and thus correspondingto the solution µI , described by (5.149).For all combinations of active constraints (for all Sa) one can compute the set P(Sa) andin this way a part of the R

nN will be covered. For some values of χ (or in other words,

for some(

xc(k), ec(k), w(k), Ψ(k))

), there is no possible combination of active constraints,

and so no feasible solution to the QP-problem is found. In this case we have a feasibilityproblem, for these values of χ we have to relax the predictive control problem in some way.(this will be discussed in the next section).All sets P(Sa) can be computed off-line. The on-line optimization has now become asearch-problem. At time k we can compute χ(k) following equation (5.152), and determineto which set P(Sa) the vector χ(k) belongs. µI can be computed using the correspondingSa in equation (5.149).Resuming, the method of Bemporad et al. [5], proposes an algorithm that partitions thestate space into polyhedral sets and computes the coefficients of the affine function for

Page 96: MPC

96 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

every set. The result is a search tree that determines the set to which a state belongs. Thetree is computed off-line, and the classification and computation of the control signal fromthe state and the coefficients is done on-line. The method works very well if the number ofinequality constraints is small. However, the number of polyhedral sets grows dramaticallywith the number of inequality constraints.Another way to avoid the cumbersome optimization, is described by Van den Boom et al.[66]. The nonlinear mapping µI(k) = h(xc(k), ec(k), w(k), Ψ(k)) may be approximated bya neural network with any desired accuracy. Contrary to [5], linear independency of theactive constraints is not required, and the approach is applicable to control problems withmany constraints.

5.4 Feasibility

At the end of this chapter, a remark has to be made concerning feasibility and stability.In normal operating conditions, the optimization algorithm provides an optimal solutionwithin acceptable ranges and limits of the constraints. A drawback of using (hard) con-straints is that it may lead to infeasibility: There is no possible control action withoutviolation of the constraints. This can happen when the prediction and control horizon arechosen too small, around setpoint changes or when noise and disturbance levels are high.When there is no feasibility guarantee, stability can not be proven.If a solution does not exist within the predefined ranges and limits of the constraints, theoptimizer should have the means to recover from the infeasibility. Three algorithms tohandle infeasibility are discussed in this section:

• soft-constraint approach

• minimal time approach

• constraint prioritization

Soft-constraint algorithm

In contrast to hard constraints one can define soft constraints [55],[79], given by an ad-ditional term to the performance index and only penalizing constraint violations. Forexample, consider the problem with the hard constraint

minvJ subject to ψ ≤ Ψ (5.154)

This output constraint can be softened by considering the following problem:

minv , α

J + c α2 subject to ψ ≤ Ψ +Rα , α ≥ 0 , (5.155)

where c≫ 1 and R = diag(r1, . . . , rM) with ri > 0 for i = 1, . . . ,M . In this way, violationof the constraints is allowed, but on the cost of a higher performance index. The entriesof the matrix R may be used to tune the allowed or desired violation of the constraints.

Page 97: MPC

5.5. EXAMPLES 97

Minimal time algorithm

In the minimal time approach [51] consider the inequality constraints ψ(k + j|k) ≤ Ψ(k +j|k) for j = 1, . . . , N (see section 4.2.2). Now we disregard the constraints at the start ofthe prediction interval up to some sample number jmt and determine the minimal jmt forwhich the problem becomes feasible:

minv,jmt

jmt subject to ψ(k + j|k) ≤ Ψ(k + j) for j = jmt + 1, . . . , N (5.156)

Now we can calculate the optimal input sequence v(k) by optimizing the following problem:

minvJ subject to ψ(k + j|k) ≤ Ψ(k + j) for j = jmt + 1, . . . , N (5.157)

where jmt is the minimum value of problem (5.156). The minimal time algorithm is used ifour aim is to be back in a feasible operation as fast as possible. As a result, the magnitudeof the constraint violations is usually larger than with the soft constraint approach.

Prioritization

The feasibility recovery technique we will discuss now is based on the priorities of theconstraints. The constraints are ordered from lowest to highest priority. In the (nominal)optimization problem becomes infeasible we start by dropping the lowest constraints andsee if the resulting reduced optimization problem becomes feasible. As long as the problemis not feasible we continue by dropping more and more constraints until the optimizationis feasible again. This means we solve a sequence of quadratic programming problems inthe case of infeasibility. The algorithm minimizes the violations of the constraints whichcannot be fulfilled. Note that it may take several trials of dropping constraints and tryingto find an optimal solution, which is not desirable in any real time application.

5.5 Examples

Example 23 : computation of controller matrices (unconstrained case)

Consider the system of example 7 on page 52. When we compute the optimal predictivecontrol for the unconstrained case, with N = Nc = 4, we obtain the controller matrices:

F =[

0 1 −0.4 0.3 1]

De =[

−0.6]

Dw =[

−0.1 1 0 0 0 0 0 0]

Example 24 : computation of controller matrices (equality constrained case)

We add a control horizon for Nc = 1 and use the results for the equality constrained case

Page 98: MPC

98 CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

to obtain the controller matrices:

F =[

0 0.8624 −0.2985 0.3677 1]

De =[

−0.6339]

Dw =[

−0.0831 0.8624 −0.0232 0.2587 −0.0132 0.1639 −0.0158 0.1578]

Example 25 : MPC of an elevator

A predictive controller design problem with constraints will be illustrated using a tripleintegrator chain

...y (t) = u(t) + ǫ(t)

with constraints on y, y, y and...y. This is a model of a rigid body approximation of an

elevator for position control, subject to constraints on speed, acceleration and jerk (timederivative of accelaration).Define the state

x(t) =

x1(t)x2(t)x3(t)

=

y(t)y(t)y(t)

The noise model is given by:

ǫ(t) =...e (t) + 0.5e(t) + e(t) + 0.1e(t)

where e is given as zero-mean white noise. Then the continuous-time state space descriptionof this system can be given

x1(t) = u(t) + 0.1e(t)

x2(t) = x1(t) + e(t)

x3(t) = x2(t) + 0.5 ∗ e(t)y(t) = x3(t) + e(t)

where the noise is now acting on the states...y (t) and output y(t). In matrix form we get:

x(t) = Ac x(t) +Kc e(t) +Bc u(t)

y(t) = Cc x(t) + e(t)

where

Ac =

0 0 01 0 00 1 0

Bc =

100

Kc =

0.11

0.5

Cc =[

0 0 1]

A zero-order hold transformation with sampling-time T gives a discrete-time IO model:

xo(k + 1) = Ao xo(k) +Ko e(k) +Bo u(k)

y(k) = Co xo(k) + e(k)

Page 99: MPC

5.5. EXAMPLES 99

where

Ao =

1 0 0T 1 0

T 2/2 T 1

Bo =

TT 2/2T 3/6

Ko =

0.1 TT + T 2/20

T/2 + T 2/6 + T 3/60

Co =[

0 0 1]

The prediction model is built up as given in section 3. Note that we use u(k) ratherthan ∆u(k). This because the system already consists of a triple integrator, and anotherintegrator in the controller is not desired. The aim of this example is to direct the elevatorfrom position y = 0 at time t = 0 to position y = 1 as fast as possible. For a comfortableand safe operation, control is done subject to constraints on the jerk, acceleration, speedand overshoot, given by

|...y (t)| ≤ 0.4 (jerk)|y(t)| ≤ 0.3 (acceleration)|y(t)| ≤ 0.4 (speed)y(t) ≤ 1.01 (overshoot)

These constraints can be translated into linear constraints on the control signal u(k) andprediction of the state x(k):

u(k + j − 1) ≤ 0.4 (positive jerk)−u(k + j − 1) ≤ 0.4 (negative jerk)

x1(k + j|k) ≤ 0.3 (positive acceleration)−x1(k + j|k) ≤ 0.3 (negative acceleration)x2(k + j|k) ≤ 0.4 (positive speed)−x2(k + j|k) ≤ 0.4 (negative speed)x3(k + j|k) ≤ 1.01 (overshoot)

for all j = 1, . . . , N .We choose sampling-time T = 0.1, and prediction and control horizon N = Nc = 30, andminimum cost-horizon Nm = 1. Further we consider a constant reference signal r(k) = 1for all k, and the weightings parameters P (q) = 1, λ = 0.1. The predictive control problemis solved by minimizing the GPC performance index (for an IO model)

J(u, k) =

N∑

j=Nm

(

y(k + j|k)− r(k + j|k))T(

y(k + j|k)− r(k + j|k))

+

+λ2

Nc∑

j=1

uT (k + j − 1|k)u(k + j − 1|k)

subject to the above linear constraints.The optimal control sequence is computed and implemented. In figure 5.3 the results aregiven. It can be seen that the jerk (solid line), acceleration (dotted line), speed (dashedline) and the position (dashed-dotted line) are all bounded by the constraints.

Page 100: MPC

100CHAPTER 5. SOLVING THE STANDARD PREDICTIVE CONTROL PROBLEM

0 10 20 30 40 50 60 70 80−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

1.2

positionvelocityaccelerationjerk

k −→

y,x,u−→

Figure 5.3: Predictive control of an elevator

Page 101: MPC

Chapter 6

Stability

Predictive control design does not give an a priori guaranteed stabilizing controller. Meth-ods like LQ,H∞, ℓ1-control have built-in stability properties. In this chapter we analyze thestability of a predictive controller. We distinguish two different cases, namely the uncon-strained and constrained case. It is very important to notice that a predictive controllerthat is stable for the unconstrained case is not automatically stable for the constrainedcase.In Section 6.4 the relation between MPC, the Internal Model Control (IMC) and the Youlaparametrization is discussed.Section 6.5 finalizes this chapter by considering the concept of robustness.

6.1 Stability for the LTI case

In the case where inequality constraints are absent, the problem of stability is not toodifficult, because the controller is linear and time-invariant (LTI).

Let the process be given by:

x(k + 1) = Ax(k) +B1 e(k) +B2w(k) +B3 v(k)

y(k) = C1 x(k) +D11 e(k) +D12w(k) (6.1)

and the controller by (5.133) and (5.134):

xc(k + 1) = (A− B3F − B1D−111 C1 −B3DeD

−111 C1) xc(k)

+(B1D−111 +B3DeD

−111 ) y(k) +

+(B3Dw − B3DeD−111 D12Ew +B2Ew − B1D

−111 D12Ew) w(k)

v(k) = (−F −DeD−111 C1) xc(k) +DeD

−111 y(k) + (Dw −DeD

−111 D12Ew) w(k)

with Ew =[

I 0 . . . 0]

is such that w(k) = Eww(k). We make one closed loop state

101

Page 102: MPC

102 CHAPTER 6. STABILITY

space representation by substitution:

v(k) = −(F +DeD−111 C1) xc(k) +DeD

−111 y(k) + (Dw −DeD

−111 D12Ew) w(k)

= −(F +DeD−111 C1) xc(k) +DeD

−111 C1 x(k) +Dee(k) +Dw w(k)

x(k + 1) = Ax(k) +B1 e(k) +B2Ew w(k) +B3 v(k)

= Ax(k) +B1 e(k) +B2Eww(k)− (B3F +B3DeD−111 C1) xc(k)

+B3DeD−111 C1x(k) + B3Dee(k) +B3Dw w(k)

= (A+B3DeD−111 C1) x(k)− (B3F +B3DeD

−111 C1) xc(k)

+(B1 +B3De) e(k) + (B3Dw +B2Ew) w(k)

xc(k + 1) = (A− B3F − B1D−111 C1 −B3DeD

−111 C1) xc(k)

+(B1D−111 +B3DeD

−111 ) y(k)

+(B3Dw − B3DeD−111 D12Ew +B2Ew − B1D

−111 D12Ew)w(k)

= (A− B3F − B1D−111 C1 −B3DeD

−111 C1) xc(k)

+(B1D−111 C1 +B3DeD

−111 C1) x(k) + (B1 +B3De) e(k)

+(B3Dw +B2Ew) w(k)

or in matrix form:[

x(k + 1)xc(k + 1)

]

=

[

A+B3DeD−111 C1 −B3F−B3DeD

−111 C1

B1D−111 C1+B3DeD

−111 C1 A−B3F−B1D

−111 C1−B3DeD

−111 C1

][

x(k)xc(k)

]

+

[

B1 +B3De

B1 +B3De

]

e(k) +

[

B3Dw +B2EwB3Dw +B2Ew

]

w(k)

= Acl

[

x(k)xc(k)

]

+B1,cl e(k) +B2,cl w(k)

[

v(k)y(k)

]

=

[

DeD−111 C1 −F−DeD

−111 C1

C1 0

] [

x(k)xc(k)

]

+

[

De

D11

]

e(k) +

[

Dw

D12Ew

]

w(k)

= Ccl

[

x(k)xc(k)

]

+D1,cl e(k) +D2,cl w(k)

Next we choose a new state:[

x(k)xc(k)− x(k)

]

=

[

I 0−I I

][

x(k)xc(k)

]

= T

[

x(k)xc(k)

]

This state transformation with

T =

[

I 0−I I

]

and T−1 =

[

I 0I I

]

leads to a new realization[

x(k + 1)xc(k + 1)− x(k + 1)

]

= Acl

[

x(k)xc(k)− x(k)

]

+ B1,cl e(k) +B2,cl w(k)

[

v(k)y(k)

]

= Ccl

[

x(k)xc(k)

]

+ D1,cl e(k) + D2,cl w(k)

Page 103: MPC

6.1. STABILITY FOR THE LTI CASE 103

with system matrices (see appendix B):

Acl = T Acl T−1

=

[

I 0−I I

][

A+B3DeD−111 C1 −B3F−B3DeD

−111 C1

B1D−111 C1+B3DeD

−111 C1 A−B3F−B1D

−111 C1−B3DeD

−111 C1

][

I 0I I

]

=

[

A− B3F −B3F −B3DeD−111 C1

0 A− B1D−111 C1

]

B1,cl = T B1,cl

=

[

I 0−I I

][

B1 +B3De

B1 +B3De

]

=

[

B1 +B3De

0

]

B2,cl = T B2,cl

=

[

I 0−I I

][

B3Dw +B2EwB3Dw +B2Ew

]

=

[

B3Dw +B2Ew0

]

Ccl = CclT−1

=

[

DeD−111 C1 −F −DeD

−111 C1

C1 0

] [

I 0I I

]

=

[

−F −F −DeD−111 C1

C1 0

]

D1,cl = D1,cl

D2,cl = D2,cl

The eigenvalues of the matrix Acl are equal to eigenvalues of (A−B3F ) and the eigenvaluesof (A − B1D

−111 C1). This means that in the unconstrained case necessary and sufficient

conditions for closed-loop stability are:

1. the eigenvalues of (A−B3F ) are strictly inside the unit circle.

2. the eigenvalues of (A−B1D−111 C1) are strictly inside the unit circle.

Condition (1) can be satisfied by choosing appropriate tuning parameters such that thefeedback matrix F makes |λ(A−B3F )| < 1. We can obtain that by a careful tuning (chapter8), by introducing the end-point constraint (section 6.3) or by extending the predictionhorizon to infinity (section 6.3).

Condition (2) is related with the choice of the noise model H(q), given by the input outputrelation (compare 6.1)

x(k + 1) = Ax(k) +B1 e(k)

y(k) = C1 x(k) +D11 e(k)

Page 104: MPC

104 CHAPTER 6. STABILITY

plant

predictive

controller

- -

? ?

6

v

y

e w

w

Figure 6.1: Closed loop configuration

with transfer function:

H(q) = C1(qI − A)−1B1 +D11

From appendix B we learn that for

H(q) ≡[

A B1

C1 D11

]

we find

H−1(q) ≡[

A−B1D−111 C1 B1D

−111

−D−111 C1 D−1

11

]

so the inverse noise model is given (for v = 0 and w = 0) by the state space equations:

x(k + 1) = (A− B1D−111 C1) x(k) +B1D

−111 y(k)

e(k) = −D−111 C1 x(k) +D−1

11 y(k)

with transfer function:

H−1(q) = −D−111 C1(qI − A+B1D

−111 C1)

−1B1D−111 +D−1

11

From these equations it is clear that the eigenvalues of (A − B1D−111 C1) are exactly equal

to the poles of the system H−1(q), and thus a necessary condition for closed loop stabilityis that the inverse of the noise model is stable.

If condition (2) is not satisfied, it means that the inverse of the noise model is not stable.We will have to find a new observer-gain B1,new such that A − B1,newD

−111 C1 is stable,

Page 105: MPC

6.2. STABILITY FOR THE INEQUALITY CONSTRAINED CASE 105

without changing the stochastic properties of the noise model. This can be done by aspectral factorization

H(q)HT (q−1) = Hnew(q)HTnew(q−1)

where Hnew and H−1new are both stable. H(q) and Hnew(q) have the same stochastic prop-

erties and so replacing H by Hnew will not affect the properties of the process. The newHnew is given as follows:

Hnew(q) = C1(qI −A)−1B1,new +D11

The new observer-gain B1,new is given by:

B1,new = (AXCT1 +B1D

−111 )(I + C1XC

T1 )−1D11

where X is the positive definite solution of the discrete algebraic Riccati equation:

(A− B1D−111 C1)

TX(I + CT1 C1X)(A− B1D

−111 C1)−X = 0

6.2 Stability for the inequality constrained case

The issue of stability becomes even more complicated in the case where constraints haveto be satisfied. When there are only constraints on the control signal, a stability guaranteecan be given if the process itself is stable (Sontag [62], Balakrishnan et al. [4]).In the general case with constraints on input, output and states, the main problem isfeasibility. The existence of a stabilizing control law is not at all trivial. For stability inthe inequality constrained case we need to modify the predictive control problem (as willbe discussed in Section 6.3) or we have to solve the predictive control problem with a statefeedback law using Linear Matrix inequalities, based on the work of Kothare et al. [35].(This will be discussed in section 7.3.)

6.3 Modifications for guaranteed stability

In this section we will introduce some modifications of the MPC design method thatwill provide guaranteed stability of the closed loop. We discuss the following stabilizingmodifications ([45]):

1. Infinite prediction horizon

2. End-point constraint (or terminal constraint)

3. Terminal cost function

4. Terminal cost function with end-point constraint set

Page 106: MPC

106 CHAPTER 6. STABILITY

These modification uses the concept of monotonicity of the performance index to provestability ([12, 37]). In most modification we assume the steady-state (vss, xss, wss, zss) =(vss, xss, wss, 0) is unique, so the matrix Mss as defined in (5.38) has full column rank.Furthermore we assume that the system with input v and output z is minimum-phase, so

Assumption 26 The matrix[

zI −A −B3

−C2 −D23

]

does not drop in rank for all |z| ≥ 1.

Note that if assumption 26 is satisfied, Mss will have full rank. In most of the modifi-cations we will use the Krasovskii–LaSalle principle [72] to prove that the steady-state isasymptotically stable. If a function V (k) can be found such that

• V (k) > 0 , for all x 6= xss

• ∆V (k) = V (k)− V (k − 1) ≤ 0 for all x

and V (k) = ∆V (k) = 0 for x = xss, and if the set ∆V (k) = 0 contains no trajectory ofthe system except the trivial trajectory x(k) = xss for k ≥ 0, then the Krasovskii-LaSalleprinciple states that the the steady-state x(k) = xss is asymptotically stable.

Infinite prediction horizon

A straight forward way to guarantee stability in predictive control is to choose an infiniteprediction horizon (N = ∞). It is easy to show that the controller is stabilizing for theunconstrained case, which is formulated in the following theorem:

Theorem 27 Consider a LTI system given in the state space description

x(k + 1) = Ax(k) +B2 w(k) +B3 v(k), (6.2)

z(k) = C2 x(k) +D22 w(k) +D23 v(k), (6.3)

satisfying assumption 26. Define the set

v(k) =

v(k|k)...

v(k +Nc − 1|k)

,

where Nc ∈ ZZ+ ∪ ∞. A performance index is defined as

minv(k)

J(v, k) = minv(k)

∞∑

j=0

(

z(k + j|k))T

Γ(j)(

z(k + j|k))

,

where Γ(i) ≥ Γ(i+j) > 0 for j ≥ 0. The predictive control law minimizing this performanceindex results in a stabilizing controller.

Page 107: MPC

6.3. MODIFICATIONS FOR GUARANTEED STABILITY 107

Proof:First let us define the function

V (k) = minv(k)

J(v, k) ≥ 0, (6.4)

and let v∗(k) be the optimizer

v∗(k) = arg minv(k)

J(k),

where

v∗(k) =

v∗(k|k)v∗(k + 1|k)

...v∗(k +Nc − 1|k)

for Nc <∞,

or

v∗(k) =

v∗(k|k)v∗(k + 1|k)

...

for Nc =∞,

where v∗(k + j|k) means the optimal input value to be applied a time k + j as calculatedat time k. Let z∗(k + j|k) be the (optimal) performance signal at time k + j when theoptimal input sequence v∗(k) computed at time k is applied. Then

V (k) =∞∑

j=0

(

z∗(k + j|k))T

Γ(j)(

z∗(k + j|k))

.

Now based on v∗(k) and the chosen stabilizing modification method we construct a vectorvsub(k + 1). This vector can be seen as a suboptimal input sequence for the k + 1-thoptimization. The idea is to construct vsub(k + 1) such that

J(vsub, k + 1) ≤ V (k).

If we now compute

V (k + 1) = minv(k+1)

J(v, k + 1),

we will find that

V (k + 1) = minv(k+1)

J(v, k + 1) ≤ J(vsub, k + 1) ≤ V (k).

Page 108: MPC

108 CHAPTER 6. STABILITY

For the infinite horizon case we define the suboptimal control sequence as follows:

vsub(k + 1) =

v∗(k + 1|k)v∗(k + 2|k)

...v∗(k +Nc − 1|k)

vss

for Nc <∞,

or

vsub(k + 1) =

v∗(k + 1|k)v∗(k + 2|k)

...

for Nc =∞,

and compute

Vsub(k + 1) = J(vsub, k + 1),

then this value is equal to

Vsub(k + 1) =

∞∑

j=1

(

z∗(k + j|k))T

Γ(j)(

z∗(k + j|k))

,

and so

Vsub(k + 1) ≤ V (k)

We proceed by observing that

V (k + 1) = minv(k+1)

J(v, k + 1) ≤ J(vsub, k + 1),

which means that V (k+1) ≤ V (k). Using the fact that ∆V (k) = V (k)−V (k−1) ≤ 0 andthat, based on assumption 26, the set ∆V (k) = 0 contains no trajectory of the systemexcept the trivial trajectory x(k) = xss for k ≥ 0, the Krasovskii-LaSalle principle [72]states that the steady-state is asymptotically stable. 2 End Proof

As is shown above, for stability it is not important whether Nc =∞ or Nc <∞. For Nc =∞ the predictive controller becomes equal to the optimal LQ-solution (Bitmead, Gevers &Wertz [7], see section 5.2.3). The main reason not to choose an infinite control horizon is thefact that constraint-handling on an infinite horizon is an extremely hard problem. Rawlings& Muske ([51]) studied the case where the prediction horizon is equal to infinity (N =∞),but the control horizon is finite (Nc <∞), see the sections 5.2.4 and 5.2.5. Because of thefinite number of control actions that can be applied, the constraint-handling has becomea finite-dimensional problem instead of an infinite-dimensional problem for Nc =∞.

Page 109: MPC

6.3. MODIFICATIONS FOR GUARANTEED STABILITY 109

End-point constraint (terminal constraint)

The main idea of the end-point constraint is to force the system to its steady state at theend of the prediction interval. Since the end-point constraint is an equality constraint, itstill holds that the resulting controller is linear and time-invariant.

Theorem 28 Consider a LTI system given in the state space description

x(k + 1) = Ax(k) +B2 w(k) +B3 v(k),

z(k) = C2 x(k) +D22 w(k) +D23 v(k),

satisfying assumption 26. A performance index is defined as

minv(k)

J(v, k) = minv(k)

N−1∑

j=0

(

z(k + j|k))T

Γ(j)(

z(k + j|k))

, (6.5)

where Γ(i) ≥ Γ(i+1) > 0 is positive definite for i = 0, . . . , N−1 and an additional equalityconstraint is given by:

x(k +N) = xss. (6.6)

Finally, let w(k) = wss for k ≥ 0. Then, the predictive control law, minimizing (6.5),results in a stable closed loop.

proof:Also in this modification the performance index will be used as a Lyapunov function forthe closed loop system. First let us define the function

V (k) = minv(k)

J(v, k) ≥ 0, (6.7)

and let v∗(k) be the optimizer

v∗(k) = arg minv(k)

J(v, k)

=

v∗(k|k)...

v∗(k +Nc − 2|k)v∗(k +Nc − 1|k)

vss...vss

= arg minv(k)

J(v, k),

Page 110: MPC

110 CHAPTER 6. STABILITY

where v∗(k + j|k) means the optimal input value to be applied a time k + j as calculatedat time k. Let z∗(k + j|k) be the (optimal) performance signal at time k + j when theoptimal input sequence v∗(k) computed at time k is applied. Then

V (k) =∞∑

j=0

(

z∗(k + j|k))T

Γ(j)(

z∗(k + j|k))

.

Now based on v∗(k) and the chosen stabilizing modification method we construct the vectorvsub(k + 1) as follows:

vsub(k + 1) =

v∗(k + 1|k)...

v∗(k +Nc − 1|k)vssvss...vss

,

and we compute

Vsub(k + 1) = J(vsub, k + 1).

Applying this above input sequence vsub(k+1) to the system results in a zsub(k+j|k+1) =z∗(k + j|k) for j = 1, . . . , N and zsub(k +N + j|k + 1) = 0 for j > 0. With this we derive

Vsub(k + 1) =N∑

j=1

(

zsub(k+j+1|k + 1))T

Γ(j + 1)(

zsub(k+j+1|k + 1))

≤N∑

j=1

(

zsub(k+j+1|k + 1))T

Γ(j)(

zsub(k+j+1|k + 1))

=

N∑

j=2

(

z∗(k + j|k))T

Γ(j)(

z∗(k + j|k))

= V (k)−(

z∗(k|k)TΓ(1)z∗(k|k))

≤ V (k).

Further, because of the receding horizon strategy, we do a new optimization

V (k + 1) = minv(k+1)

J(v, k + 1) ≤ J(vsub, k + 1),

and therefore, ∆V (k + 1) = V (k + 1) − V (k) ≤ 0. Also for the end-point constraint,the set ∆V (k) = 0 contains no trajectory of the system except the trivial trajectoryx(k) = xss for k ≥ 0 and we can use the Krasovskii-LaSalle principle [72] to proof that thesteady-state is asymptotically stable. 2 End Proof

Page 111: MPC

6.3. MODIFICATIONS FOR GUARANTEED STABILITY 111

Remark 29 : The constraint

W x(k +N) = W xss,

where W is a m×n-matrix with full column-rank (so m ≥ n), is equivalent to the end-pointconstraint (6.6), because x(k+N) = xss if W x(k+N) = W xss. Therefore, the constraint

y(k +N |k)y(k +N + 1|k)

...y(k +N + n− 1|k)

yss...yss

=

C1

C1A...

C1An−1

x(k +N)−

C1

C1A...

C1An−1

xss = 0,

also results in a stable closed loop if the matrix

C1

C1A...

C1An−1

has full rank. For SISO systems with pair (C1, A) observable, we choose n = dim(A),so equal to the number of states. For MIMO systems, there may be an integer valuen < dim(A) for which W has full column-rank.The end-point constraint was first introduced by (Clarke & Scattolini [16]), (Mosca & Zhang[47]) and forces the output y(k) to match the reference signal r(k) = rss at the end of theprediction horizon:

y(k +N + j) = rss for j = 1, . . . , n.

With this additional constraint the closed-loop system is asymptotically stable.

Although stability is guaranteed, the use of an end-point constraint has some disadvantages:The end-point constraint is only a sufficient, but not a necessary condition for stability.The constraint may be too restrictive and can lead to infeasibility, especially if the horizonN is chosen too small.The tuning rules, as will discussed in the Chapter 8, change. This has to do with the factthat because of the control horizon Nc the output is already forced to its steady state attime Nc and so for a fixed Nc a prediction horizon N = Nc will give the same stable closedloop behavior as any choice of N > Nc. The choice of the prediction horizon N is overruledby the choice of control horizon Nc and we loose a degree of freedom.

Terminal cost function

One of the earliest proposals for modifying the performance index J to ensure closed-loopstability was the addition of a terminal cost [7] in the context of model predictive controlof unconstrained linear system.

Page 112: MPC

112 CHAPTER 6. STABILITY

Theorem 30 Consider a LTI system given in the state space description

x(k + 1) = Ax(k) +B2 w(k) +B3 v(k),

z(k) = C2 x(k) +D22 w(k) +D23 v(k),

satisfying assumption 26, and w(k) = wss for k ≥ 0. A performance index is defined as

minv(k)

J(v, k) = minv(k)

(

x(k +N |k)− xss)T

P0

(

x(k +N |k)− xss)

+N−1∑

j=0

(

z(k + j|k))T(

z(k + j|k))

, (6.8)

where P0 is the solution to the Riccati equation

ATP0A− ATP0B3(BT3 P0B3 + R)−1BT

3 P0A+ Q− P0 = 0, (6.9)

where

A =(

A− B3(DT23D23)

−1DT23C2

)

,

Q = CT2 (I −D23(D

T23D23)

−1DT23)C2,

R = DT23D23.

Then the predictive control law, minimizing (6.8), results in a stable closed loop.

Proof:Define the signals

x∆(k + j|k) = x(k + j|k)− xss for all j ≥ 0,

v∆(k + j|k) = v(k + j|k)− vss for all j ≥ 0,

v(k + j) = v∆(k + j) + (DT23D23)

−1DT23

(

C2x∆(k + j|k))

,

then, according to section 5.2.2, it follows that the system can be described by the statespace equation

x∆(k+j+1|k) = Ax∆(k + j|k) +B3 v(k + j),

and the performance index becomes

J(v, k) = xT∆(k +N |k)P0x∆(k +N |k)

+N−1∑

j=0

xT∆(k + j|k)Qx∆(k + j|k) + vT (k + j)Rv(k + j).

Page 113: MPC

6.3. MODIFICATIONS FOR GUARANTEED STABILITY 113

Now consider another (infinite horizon) performance index

Ja(v, k) =

∞∑

j=0

xT∆(k + j|k)Qx∆(k + j|k) + vT (k + j)Rv(k + j),

and we structure the input signal such that v(k + j) is free for j = 0, . . . , Ns − 1 andv(k + j) = F x∆(k + j|k) where

F = (BT3 P0B3 + R)−1BT

3 P0A.

The performance index can now be rewritten as

Ja(v, k) =N−1∑

j=0

xT∆(k + j|k)Qx∆(k + j|k) + vT (k + j)Rv(k + j)

+

∞∑

j=N

xT∆(k + j|k)Qx∆(k + j|k) + vT (k + j)Rv(k + j),

Then for j ≥ N :

xT∆(k + j + 1)P0x∆(k + j + 1)− xT∆(k + j)P0x∆(k + j) + xT∆(k + j)Qx∆(k + j)

+ vT (k + j)Rv(k + j) =

=

[

x∆(k + j)v(k + j)

]T[ATP0A− P0 + Q ATP0B3

BT3 P0A BT

3 P0B3 + R

][

x∆(k + j)v(k + j)

]

=

=xT∆(k + j)[

I −F T]

[

ATP0A− P0 + Q ATP0B3

BT3 P0A BT

3 P0B3 + R

][

I−F

]

x∆(k + j)

=xT∆(k + j)[

I −ATP0B3(BT3 P0B3 + R)−1

]

[

ATP0A− P0 + Q ATP0B3

BT3 P0A BT

3 P0B3 + R

]

×[

I−(BT

3 P0B3 + R)−1BT3 P0A

]

x∆(k + j)

=xT∆(k + j)[

ATP0A− P0 + Q− ATP0B3(BT3 P0B3 + R)−1BT

3 P0A]

x∆(k + j)

=0,

and so we find∞∑

j=Ns

xT∆(k + j)Qx∆(k + j) + vT (k + j)Rv(k + j) = x∆(k +N)TP0x∆(k +N),

which means that J = Ja. We already have proven that the infinite horizon performanceindex Ja is a Lyapunov function. Because the finite horizon predictive controller with aterminal cost function gives the same performance index J = Ja means that also J is aLyapunov function and so finite horizon predictive controller with a terminal cost functionstabilizes the system.

2 End Proof

Page 114: MPC

114 CHAPTER 6. STABILITY

Terminal cost function with End-point constraint set (Terminal

constraint set)

The main disadvantage of the terminal cost function is that it can only handle the uncon-strained case. The end-point constraint can handle constraints, but it is very conservativeand can easily lead to infeasibility. If we replace the end-point constraint by an end-pointconstraint set and also add the terminal cost function, we can ensure closed-loop stabilityfor the constrained case in a non-conservative way [31, 60, 64].

Theorem 31 Consider a LTI system given in the state space description

x(k + 1) = Ax(k) +B2 w(k) +B3 v(k),

z(k) = C2 x(k) +D22 w(k) +D23 v(k),

ψ(k) = C4 x(k) +D42 w(k) +D43 v(k),

satisfying assumption 26. A performance index is defined as

minv(k)

J(v, k) = minv(k)

(

x(k +N |k)− xss)T

P0

(

x(k +N |k)− xss)

+N−1∑

j=0

(

z(k + j|k))T(

z(k + j|k))

, (6.10)

where P0 is the solution to the Riccati equation

ATP0A− ATP0B3(BT3 P0B3 + R)−1BT

3 P0A+ Q− P0 = 0, (6.11)

for

A =(

A− B3(DT23D23)

−1DT23C2

)

,

Q = CT2 (I −D23(D

T23D23)

−1DT23)C2,

R = DT23D23.

The signal constraint is defined by

ψ(k) ≤ Ψ, (6.12)

where Ψ is constant vector. Let w(k) = wss for k ≥ 0, and consider the linear control law

v(k + j|k) = ((

F + (DT23D23)

−1DT23C2

)(

x(k + j|k)− xss)

+ vss, (6.13)

with F = (BT3 P0B3 + R)−1BT

3 P0A. Finally let W be the set of all states for which (6.12)holds under control law (6.13), and assume

D ⊂ D+ ⊂ W. (6.14)

Then the predictive control law, minimizing (6.8), subject to (6.12) and terminal constraint

x(k +N |k) ∈ D, (6.15)

results in a stable closed loop.

Page 115: MPC

6.3. MODIFICATIONS FOR GUARANTEED STABILITY 115

Proof:Define the signals

x∆(k + j|k) = x(k + j|k)− xss for all j ≥ 0,

v∆(k + j|k) = v(k + j|k)− vss for all j ≥ 0,

v(k + j) = v∆(k + j) + (DT23D23)

−1DT23

(

C2x∆(k + j|k))

,

then according to section 5.2.2, it follows that the system can be described by the statespace equation

x∆(k+j+1|k) = Ax∆(k + j|k) +B3 v(k + j),

and the performance index becomes

J(v, k) = xT∆(k +N |k)P0x∆(k +N |k)

+N−1∑

j=0

xT∆(k + j|k)Qx∆(k + j|k) + vT (k + j)Rv(k + j).

Note that because x(k + N |k) ∈ D and the set D ⊂ D+ where D+ is invariant underfeedback law (6.13), we can rewrite this performance index as

J∞(v, k) =N−1∑

j=0

xT∆(k + j|k)Qx∆(k + j|k) + vT (k + j)Rv(k + j)

+

∞∑

j=N

xT∆(k + j|k)Qx∆(k + j|k) + vT (k + j)Rv(k + j).

Define the function

V (k) = minv(k)

J∞(v, k),

and the optimal vector

v∗(k) = arg minv(k)

J∞(k),

where

v∗(k) =

v∗(k|k)v∗(k + 1|k)

...v∗(k +N − 1|k)F x∆(k +N |k)

F x∆(k +N + 1|k)...

,

Page 116: MPC

116 CHAPTER 6. STABILITY

where v∗(k + j|k) means the optimal input value to be applied a time k + j as calculatedat time k. Now define

vsub(k + 1) =

v∗(k + 1|k)v∗(k + 2|k)

...v∗(k +N − 1|k)F x∆(k +N |k)

F x∆(k +N + 1|k)...

.

Note that this control law is feasible, because x(k+N+j|k) ∈ D for all j ≥ 0. We compute

Vsub(k + 1) = J(vsub, k + 1),

then this value is equal to

Vsub(k + 1) =

∞∑

j=1

(

z∗(k + j|k))T(

z∗(k + j|k))

,

and we find

Vsub(k + 1) ≤ V (k).

Further

V (k + 1) = minv(k+1)

J(v, k + 1) ≤ J(vsub, k + 1),

and therefore, ∆V (k + 1) = V (k + 1)− V (k) ≤ 0. Also in this case the set ∆V (k) = 0contains no trajectory of the system except the trivial trajectory x(k) = xss for k ≥ 0and we can use so the Krasovskii-LaSalle principle [72] to proof that the steady-state isasymptotically stable. 2 End Proof

6.4 Relation to IMC scheme and Youla parametriza-

tion

6.4.1 The IMC scheme

The Internal Model Control (IMC) scheme provides a practical structure to analyze prop-erties of closed-loop behaviour of control systems and is closely related to model predictivecontrol [26], [46]. In this section we will show that for stable processes, the solution of theSPCP (as derived in chapter 5) can be rewritten in the IMC configuration.

Page 117: MPC

6.4. RELATION TO IMC SCHEME AND YOULA PARAMETRIZATION 117

Q

H−1

G

G

H

--

-

- -

-

?

? -

?

e

e−+

e

y

w

v η

e η

Figure 6.2: Internal Model Control Scheme

The IMC structure is given in figure 6.2 and consists of the process G(q), the model G(q),the (stable) inverse of the noise model H−1 and the two-degree-of-freedom controller Q.For simplicity reasons we will consider F (q) = 0 (known disturbances are not taken intoaccount), but the extension is straight forward. The blocks in the IMC scheme satisfy thefollowing relations:

Process : y(k) = G(q)v(k) +H(q)e(k) (6.16)

Processmodel : y(k) = G(q)v(k) (6.17)

Pre-filter : e(k) = H−1(q)(y(k)− y(k)) (6.18)

Controller : v(k) = Q(q)

[

w(k)e(k)

]

= Q1(q)w(k) +Q2(q) e(k) (6.19)

Proposition 32 Consider the IMC scheme, given in figure 6.2, satisfying equations (6.16)-(6.19), where G, H and H−1 are stable. If the process and noise models are perfect,so ifG(q) = G(q) and H(q) = H(q), the closed loop description is given by:

v(k) = Q1(q)w(k) +Q2(q)e(k) (6.20)

y(k) = G(q)Q1(q)w(k) +(

G(q)Q2(q) +H(q))

e(k) (6.21)

The closed loop is stable if and only if Q is stable.

Proof:The description of the closed loop system is given by substitution of (6.16)-(6.18) in (6.16)

Page 118: MPC

118 CHAPTER 6. STABILITY

and (6.19):

v(k) =(

I−Q2(q)H−1(q)(G(q)−G(q))

)−1(

Q1(q)w(k)+Q2(q)H−1(q)H(q)e(k)

)

y(k) = G(q)(

I−Q2(q)H−1(q)(G(q)−G(q))

)−1(

Q1(q)w(k)

+Q2(q)H−1(q)H(q)e(k)

)

+H(q)e(k)

For G = G and H = H this simplifies to equations (6.20) and (6.21). It is clear that fromequations (6.20) and (6.21) that if Q is stable, the closed loop system is stable. On theother hand, if the closed loop is stable, we can read from equation (6.20) that Q1 and Q2

are stable.

2 End Proof

The MPC controller in an IMC configuration

The next step is to derive the function Q for our predictive controller. To do so, we needto find the relation between the IMC controller and the common two-degree of freedomcontroller C(q), given by:

v(k) = C1(q)w(k) + C2(q)y(k) (6.22)

From equations (6.17)-(6.19) we derive:

v(k) = Q1(q)w(k) +Q2(q) e(k)

= Q1(q)w(k) +Q2(q) H−1(q)(y(k)− y(k))

= Q1(q)w(k) +Q2(q) H−1(q)y(k)−Q2(q) H

−1(q)G(q)v(k)(

I +Q2(q) H−1(q)G(q)

)

v(k) = Q1(q)w(k) +Q2(q) H−1(q)y(k)

so

v(k) =(

I +Q2 H−1(q)G(q)

)−1

Q1(q)w(k)

+(

I +Q2 H−1(q)G(q)

)−1

Q2(q) H−1(q)y(k)

This results in:

C1(q) =(

I +Q2(q) H−1(q)G(q)

)−1

Q1(q)

C2(q) =(

I +Q2(q) H−1(q)G(q)

)−1

Q2(q) H−1(q)

= Q2(q)(

H(q) + G(q)Q2(q))−1

Page 119: MPC

6.4. RELATION TO IMC SCHEME AND YOULA PARAMETRIZATION 119

with the inverse relation:

Q1(q) =(

I − C2(q)G(q))−1

C1(q)

Q2(q) =(

I − C2(q)G(q))−1

C2(q)H(q)

In state space we can describe the systems G, H−1 and Q(q) as follows:

Process model G(q):

x1(k + 1) = Ax1(k) +B3 v(k)

y(k) = C1 x1(k)

Pre-filter H−1(q):

x2(k + 1) = (A−B1 D−111 C1) x2(k) +B1D

−111 (y(k)− y(k))

e(k) = −D−111 C1 x2(k) +D−1

11 (y(k)− y(k))

Controller Q(q):

x3(k + 1) = (A−B3 F ) x3(k) +B3Dww(k) + (B1 +B3De) e(k) (6.23)

v(k) = −F x3(k) +Dw w(k) +De e(k) (6.24)

The state equations of x1 and x2 follow from chapter 2. We will now show that the abovechoice of Q(q) will indeed lead to the same control action as the controller derived inchapter 5.

Combining the three state equations in one gives:

x1(k+1)x2(k+1)x3(k+1)

=

A− B3DeD−111 C1 −B3DeD

−111 C1 −B3F

−B1D−111 C1 A− B1D

−111 C1 0

−B1D−111 C1−B3DeD

−111 C1 −B1D

−111 C1−B3DeD

−111 C1 A−B3F

x1(k)x2(k)x3(k)

+

B3DeD−111

B1D−111

B1D−111 +B3DeD

−111

y(k) +

B3Dw

0B3Dw

w(k)

v(k) =[

−DeD−111 C1 −DeD

−111 C1 −F

]

x1(k)x2(k)x3(k)

+[

DeD−111

]

y(k) +[

Dw

]

w(k)

We apply a state transformation:

x′1x′2x′3

=

x1

x1 + x2 − x3

x3

=

I 0 0I I −I0 0 I

x1

x2

x3

Page 120: MPC

120 CHAPTER 6. STABILITY

This results in

x′1(k+1)x′2(k+1)x′3(k+1)

=

A −B3DeD−111 C1 −B3F−B3DeD

−111 C1

0 A 00 −B1D

−111 C1−B3DeD

−111 C1 A−B3F−B1D

−111 C1−B3DeD

−111 C1

x′1(k)x′2(k)x′3(k)

+

B3DeD−111

0B1D

−111 +B3DeD

−111

y(k) +

B3Dw

0B3Dw

w(k)

v(k) =[

0 −DeD−111 C1 −F−DeD

−111 C1

]

x′1(k)x′2(k)x′3(k)

+[

De

]

y(k) +[

Dw

]

w(k)

It is clear that state x′1 is not observable and state x′2 is not controlable. Since A has alleigenvalues inside the unit disc, we can do model reduction by deleting these states andwe obtain the reduced controller:

x′3(k + 1) = (A−B3F−B1D−111 C1−B3DeD

−111 C1) x

′3(k)

+(B1D−111 +B3DeD

−111 ) y(k) +B3Dw w(k)

v(k) = (−F−DeD−111 C1) x3(k) +DeD

−111 y(k) +Dw w(k)

This is exactly equal to the optimal predictive controller, derived in the equations (5.133)and (5.134).

Remark 33 : Note that a condition of a stable Q is equivalent to the condition that alleigenvalues of (A−B3F ) are strictly inside the unit circle. (The condition a stable inverseH−1 is equivalent to the condition that all eigenvalues of (A−B1D

−111 C1) are strictly inside

the unit circle.)

Example 34 : computation of function Q1(q) and Q2(q) for a given MPC con-troller

Consider the system of example 7 on page 52 with the MPC controller computed in example24 on page 97. Using equations 6.23 and 6.24 we can give the functions Q1(q) and Q2(q)as follows:

Q1(q) ≡[

A− B3 F B3Dw

−F Dw

]

Q2(q) ≡[

A− B3 F (B1 +B3De)−F De

]

Note that

Q1(q) = Q1(q)Dw

Page 121: MPC

6.4. RELATION TO IMC SCHEME AND YOULA PARAMETRIZATION 121

where

Q1(q) ≡[

A− B3 F B3

−F I

]

Now we can compute Q1 and Q2 in polynomial form:

Q1(q) =(z − 1)(z − 0.5)(z − 0.2)

(z3 − 1.3323 z2 + 0.4477 z)

Q2(q) =−0.6339(z2 − 1.0534 z + 0.3265)(z − 0.2)

(z3 − 1.3323 z2 + 0.4477 z)

6.4.2 The Youla parametrization

The IMC scheme provides a nice framework for the case where the process is stable. Forthe unstable case we can use the Youla parametrization [48], [73], [65]. We consider processG(q), noise filter H(q), satisfying

y(k) = G(q) v(k) +H(q) e(k) (6.25)

For simplicity reasons we will consider F (q) = 0 (known disturbances are not taken intoaccount). The extension for F (q) 6= 0 is straight forward.

Consider square transfer matrices

Λ(q) =

[

M(q) −N(q)−X(q) Y (q)

]

Λ−1(q) = Λ =

[

Y (q) N(q)

X(q) M(q)

]

satisfying the following properties:

1. The system Λ(q) is stable.

2. The inverse system Λ−1(q) is stable.

3. M(q), M(q) Y (q) and Y (q) are square and invertible systems.

4. G(q) = M−1(q)N(q) = N(q)M−1(q).

5. H(q) = M−1(q)R(q) where R(q) and R−1(q) are both stable.

The above factorization described in items 1 to 4 is denoted as a doubly coprime factoriza-tion of G(q). The last item is necessary to be able to stabilize the process. Now consider acontroller given by the following parametrization, denoted as the Youla parametrization:

v(k) =(

Y (q) +Q2(q)N(q))−1(

X(q) +Q2(q)M(q))

y(k)

+(

Y (q) +Q2(q)N(q))−1

Q1(q)w(k) (6.26)

Page 122: MPC

122 CHAPTER 6. STABILITY

where M(q), N(q), X(q) and Y (q) are found from a doubly coprime factorization of plantmodel G(q) and Q1(q) and Q2(q) are transfer functions with the appropriate dimensions.For this controller we can make the following proposition:

Proposition 35 Consider the process (6.25) and the Youla parametrization (6.26). Theclosed loop description is then given by:

v(k) = M(q)Q1(q)w(k) +(

X(q) + M(q)Q2(q))

R(q)e(k) (6.27)

y(k) = N(q)Q1(q)w(k) +(

Y (q) + N(q)Q2(q))

R(q)e(k) (6.28)

The closed loop is stable if and only if both Q1 and Q2 are stable.

The closed loop of plant model G(q), noise model H(q) together with the Youla-basedcontroller is visualised in figure 6.3.

−NM

Q2

Y −1X

Q1

Controller Process-

?

6

6

- - -

- - e

e

G

H

e

?

?- - -

e

w

v y

Figure 6.3: Youla parametrization

The Youla parametrization (6.26) gives all controllers stabilizing G(q) for stable Q1(q) andQ2(q). For a stabilizing MPC controller we can compute the corresponding functions Q1(q)and Q2(q):

The MPC controller in a Youla configuration

The decomposition of G(q) in two stable functions M(q) and N(q) (or coprime factoriza-tion) is not unique. We will consider two possible choices for the factorization:

Factorization, based on the inverse noise model:A possible state-space realization of Λ(q) is the following

Λij(q) = CΛ,i(qI − AΛ)−1BΛ,j +DΛ,ij

Page 123: MPC

6.4. RELATION TO IMC SCHEME AND YOULA PARAMETRIZATION 123

for

Λ(q) =

[

M(q) −N(q)−X(q) Y (q)

]

=

[

H−1(q) −H−1(q)G(q)−X(q) Y (q)

]

A− B1D−111 C1 B1D

−111 B3

−D−111 C1 D−1

11 0F 0 I

and we find

R(q) = H(q)M(q) = I

And we choose

Q1 = Dw

Q2 = De

The poles of Λ(q) are equal to the eigenvalues of the matrix A−B1D−111 C1, so equal to the

poles of the inverse noise model H−1(q). For Λ−1(q) we find

Λ−1(q) = Λ =

[

Y (q) N(q)

X(q) M(q)

]

A− B3F B1 B3

C1 D11 0−F 0 I

and so the poles of Λ−1(q) are equal to the eigenvalues of A−B3F . So, if the eigenvalues of(A−B1D

−111 C1) and (A−B3F ) are inside the unit circle, the controller will be stabilizing

for any stable Q1 and Q2. In our case Q1 = Dw and Q2 = De are constant matrices andthus stable.

Factorization, based on a stable plant model:If G, H and H−1 are stable, we can also make another choice for Λ:

Λ(q) =

[

M(q) −N(q)X(q) Y (q)

]

=

[

H−1(q) −H−1(q)G(q)0 I

]

Λ(q) is stable, and so is Λ−1(q), given by:

Λ−1(q) =

[

H(q) G(q)0 I

]

By comparing Figure 6.2 and Figure 6.3 we find that for the above choices the Youlaparametrization boils down to the IMC scheme by choosing QY OULA = QIMC . We findthat the IMC scheme is a special case of the Youla parametrization.

Example 36 : computation of the functions Λ, Λ−1, Q1(q) and Q2(q)

Given a system with process model G and noise model H given by

G = 0.2q−1

1− 2 q−1

H =1− 0.4 q−1

1− 2 q−1

Page 124: MPC

124 CHAPTER 6. STABILITY

For this model we obtain the state space model[

A B1 B2

C1 D11 D12

]

=

[

2 1.6 0.21 1 0

]

Now assume that the optimal state feedback for the MPC controller is given by

F = 6, Dw = 3, and De = 2

then

AΛ BΛ,1 BΛ,2

CΛ,1 DΛ,11 DΛ,12

CΛ,2 DΛ,21 DΛ,22

=

A− B1D−111 C1 B1D

−111 B3

−D−111 C1 D−1

11 0F 0 I

=

0.4 1.6 0.2−1 1 06 0 1

and for Λ−1(q) we find

AΛ−1 BΛ−1,1 BΛ−1,2

CΛ−1,1 DΛ−1,11 DΛ−1,12

CΛ−1,2 DΛ−1,21 DΛ−1,22

=

A− B3F B1 B3

C1 D11 0−F 0 I

=

0.8 1.6 0.21 1 0−6 0 1

We see that the poles of both Λ and Λ−1 are stable (0.4 and 0.8 respectively). FinallyQ1 = Dw = 3 and Q2 = De = 2.

6.5 Robustness

In the last decades the focus of control theory is shifting more and more towards control ofuncertain systems. A disadvantage of common finite horizon predictive control techniques(as presented in the chapters 2 to 5) is their inability to deal explicitly with uncertaintyin the process model. In real life engineering problems, system parameters are uncertain,because they are difficult to estimate or because they vary in time. That means that wedon’t know the exact values of the parameters, but only a set in which the system moves.A controller is called robustly stable if a small change in the system parameters doesnot destabilize the system. It is said to give robust performance if the performance doesnot deteriorate significantly for small changes parameters in the system. The design andanalysis of linear time-invariant (LTI) robust controllers for linear systems has been studiedextensively in the last decade.In practice a predictive controller usually can be tuned quite easily to give a stable closed-loop and to be robust with respect to model mismatch. However, in order to be able toguarantee stability, feasibility and/or robustness and to obtain better and easier tuningrules by increased insight and better algorithms, the development of a general stabilityand robustness theory for predictive control has become an important research topic.One way to obtain robustness in predictive control is by careful tuning (Clarke & Mothadi[13], Soeterboek [61], Lee & Yu [39]). This method gives quite satisfactory results in theunconstrained case.

Page 125: MPC

6.5. ROBUSTNESS 125

In the constrained case robustness analysis is much more difficult, resulting in more complexand/or conservative tuning rules (Zafiriou [77], Gencelli & Nikolaou [30]). One approach toguarantee robust stability is the use of an explicit contraction constraint (Zheng & Morari[80], De Vries & van den Boom [74]). The two main disadvantages of this approach are theresulting non-linear optimization problem and the large but unclear influence of the choiceof the contraction constraint on the controlled system.An approach to guarantee robust performance is to guarantee that the criterion functionis a contraction by optimizing the maximum of the criterion function over all possiblemodels (Zheng & Morari [80]). The main disadvantages of this method are the need to usepolytopic model uncertainty descriptions, the use of less general criterion functions and,especially, the difficult min max optimization. In the mid-nineties Kothare et al. ([35])derived an LMI-based MPC method (see chapter 7), that circumvented all of these dis-advantages, however, it may become quite conservative. This method, and its extensions,will be discussed in section 7.4 and 7.5, respectively.

Robust stability for the IMC scheme

Next we will study what happens if there is a mismatch between the plant model G andthe true plant G in the Internal Model Control (IMC) scheme of Section 6.4.1. We willelaborate on the additive model error case, so the model error is given by:

Ω(q) = W−1a (q)

(

G(q)− G(q))

where Wa(q) is a given stable weighting filter with stable inverse W−1a (q), such that ‖Ω‖∞ ≤

1. Note that for SISO systems this means that

|G(ejω)− G(ejω)| ≤ |Wa(ejω)| ∀ω ∈ R

and so Wa(ejω) gives na upper bound on the magnitude of the model error.

We make the following assumptions:

1. G(q) and G(q) are stable.

2. H(q) and H(q) are stable.

3. H−1(q) and H−1(q) are stable.

4. The MPC controller for the model G(q), H(q) is stabilizing.

The first three assumptions guarantee that the nominal control problem fits in the IMCframework. The fourth assumption is necessary, because it only makes sense to studyrobust stability if the MPC controller is stabilizing for the nominal case.Now consider the IMC-scheme given in section by (6.16)-(6.19) in section 6.4.1. We assumethat the nominal MPC controller is stabilizing, so Q1(q) and Q2(q) are stable. The closed

Page 126: MPC

126 CHAPTER 6. STABILITY

loop is now given by (6.22)-(6.22):

v(k) =(

I−Q2(q)H−1(q)(G(q)−G(q))

)−1(

Q1(q)w(k)+Q2(q)H−1(q)H(q)e(k)

)

y(k) = G(q)(

I−Q2(q)H−1(q)(G(q)−G(q))

)−1(

Q1(q)w(k)

+Q2(q)H−1(q)H(q)e(k)

)

+H(q)e(k)

It is clear that the perturbed closed loop is stable if and only if

(

I−Q2(q)H−1(q)(G(q)−G(q))

)−1

is stable. A sufficient condition for stability is that for all |q| ≥ 1:

Q2(q)H−1(q)(G(q)−G(q)) 6= I

This leads to the sufficient condition for stability:

‖Q2H−1(G−G)‖∞ < 1

which can be relaxed to

‖Q2H−1Wa‖∞‖W−1

a (G−G)‖∞ < 1

We know that ‖W−1a (G−G)‖∞ < 1, and so a sufficient condition is

‖Q2H−1Wa‖∞ < 1

Define the function T = Q2H−1Wa. This function T depends on the integer design pa-

rameters N , Nc, Nm, but also on the choice of performance index matrices C2, D21, D22,and D23. A tuning procedure for robust stability can follow the next steps: Design thecontroller for some initial settings (see also chapter 8). Compute ‖T‖∞. If ‖T‖∞ < 1, wealready have robust stability and we can use the initial setting as final setting. If ‖T‖∞ ≥ 1,the controller has to be retuned to obtain robust stability:We can perform a mixed-integer optimization to find a better parameter setting and ter-minate as soon as ‖T‖∞ < 1, or proceeded to obtain a even better robustness margin(‖T‖∞ ≪ 1).

Tuning of the noise model in the IMC configuration

Until now we assumed that the noise model

H(q) = C1(qI − A)−1B1 +D11

was correct with a stable inverse (eigenvalues of A−B1D−111 C1 are all strict inside the unit

circle). In the case of model uncertainty however, the state observer B1, based on the above

Page 127: MPC

6.5. ROBUSTNESS 127

noise model may not work satisfactory and may even destabilize the uncertain system. Inmany papers, the observer matrix B1 is therefore considered as a design variable and istuned to obtain good robustness properties. By changing B1, we can change the dynamicsof T (z) and thus improve the robustness of the predictive controller.We make the following assumption:

D21 = D21,oB1

which means that matrix De is linear in B1, and so there exist a matrix De,o such thatDe = De,oB1. This will make the computations much easier.We already had the equation

‖Q2H−1Wa‖∞ < 1

Note that Q2(q) is given by

Q2(q) = −F (q I −A +B2F )−1(B1 +B3De) +De

=(

−F (q I − A+B2F )−1(I +B3De,o) +De,o

)

B1

= Q2,o(q)B1

So a sufficient condition for stability is

‖Q2,oB1 H−1Wa‖∞ < 1

where we now use B1 as a tuning variable. Note that for B1 −→ 0 we have that‖Q2,oB1 H

−1Wa‖∞ −→ 0 and so by reducing the magnitude of matrix B1 we can al-ways find a value that will robustly stabilize the closed-loop system. A disadvantage ofthis procedure is that the noise model is disturbed and noise rejection is not optimal anymore. To retain some disturbance rejection, we should detune the matrix B1 not morethan necessary to obtain robustness.

Robust stability in the case of an IIO model

In this section we will consider robust stability in the case where we use an IIO model forthe MPC design with an additive model error between the IO plant model Go and the trueplant Go. Note that we cannot use the IMC scheme in this case, because the plant is notstable. We therefore use the Youla configuration. We make the following assumptions:

1. Gi(q) = ∆−1(q)Go(q) and Gi(q) = ∆−1(q)Go(q).

2. Hi(q) = ∆−1(q)Ho(q) and Hi(q) = ∆−1(q)Ho(q).

3. Go(q), Go(q), H−1o (q) and H−1

o (q) are stable.

4. The MPC controller for the nominal model Gi(q), Hi(q) is stabilizing.

Page 128: MPC

128 CHAPTER 6. STABILITY

5. The true IIO plant is given by Gi(q) = ∆−1(q)(

Go(q) + Wa(q)Ω(q))

where the

uncertainty bound is given by ‖Ω‖∞ ≤ 1, and Wa(q) is a given stable weighting filterwith stable inverse W−1

a (q).

We introduce a coprime factorization on the plant Go(q) = M−1(q)N(q) = N(q)M−1(q)and define R(q) = M(q)Hi(q) and S(q) = ∆−1(q)M(q). Now R(q), S(q), R−1(q) andR−1(q) are all stable. (If we use the coprime factorization based on the inverse noise modelon page 122, we will obtain R(q) = I and S(q) = H−1

o (q).)The closed loop configuration is now given in Figure (6.4). The controller is given by

−GoM

Q2

Y −1X

Q1

Controller Process-

?

6

6

- - -

- - e

e

N

Wa Ω S

M−1

R

e e- -

- - -

?

?

?- - -

ǫ ξ

e

w

v y

Figure 6.4: Youla parametrization

(Y +Q2N) v(k) = (X +Q2M) y +Q1 r(k)

and the plant

M y = N v +Re(k) + S ξ

substitution and using the fact that MX = XM we obtain

(Y +Q2N) v(k) = (X +Q2M) y +Q1 r(k)

= (XM−1 +Q2) (N v +Re(k) + S ξ) +Q1 r(k)

= (M−1X +Q2) (N v +Re(k) + S ξ) +Q1 r(k)

(Y +Q2N − M−1XN −Q2N) v = (M−1X +Q2) (Re(k) + S ξ) +Q1 r(k)

(MY − XN) v = (X + MQ2) (Re(k) + S ξ) + MQ1 r(k)

Page 129: MPC

6.5. ROBUSTNESS 129

By using the fact that MY − XN = I we obtain

v = (X + MQ2) (Re(k) + S ξ) + MQ1 r(k)

ǫ = Wa(X + MQ2) (Re(k) + S ξ) +WaMQ1 r(k)

A necessary and sufficient condition for robust stability is now given by

‖Wa(X + MQ2S) ‖∞ ≤ 1

Define the function T = Wa(X + MQ2S). Similar to the IMC robust analysis case thisfunction T depends on the integer design parameters N , Nc, Nm, but also on the choice ofperformance index matrices C2, D21, D22, and D23. We can use the same tuning procedureas for the IMC case to achieve robust stability.

Page 130: MPC

130 CHAPTER 6. STABILITY

Page 131: MPC

Chapter 7

MPC using a feedback law, based onlinear matrix inequalities

In the chapters 2 to 6 the basic framework of model predictive control was elaborated.In this chapter a different approach to predictive control is presented, using linear matrixinequalities (LMIs), based on the work of Kothare et al. [35]. The control strategy isfocussed on computing an optimal feedback law in the receding horizon framework. Acontroller can be derived by solving convex optimization problems using fast and reliabletecniques. LMI problems can be solved in polynomial time, which means that they havelow computational complexity.In fact, the field of application of Linear Matrix Inequalities (LMIs) in system and controlengineering is enormous, and more and more engineering problems are solved using LMIs.Some examples of application are stability theory, model and controller reduction, robustcontrol, system identification and (last but not least) predictive control.

The main reasons for using LMIs in predictive control are the following:

• Stability is easily guaranteed.

• Feasibility results are easy to obtain.

• Extension to systems with model uncertainty can be made.

• Convex properties are preserved.

Of course there are also some drawbacks:

• Although solving LMIs can be done using convex techniques, the optimization prob-lem is more complex than a quadratic programming problem, as discussed in chap-ter 5.

• Feasibility in the noisy case still can not be guaranteed.

131

Page 132: MPC

132 CHAPTER 7. MPC BASED ON LINEAR MATRIX INEQUALITIES

In the section 7.1 we will discuss the main features of linear matrix inequalities, in section7.2 we will show how LMIs can be used to solve the unconstrained MPC problem, and insection 7.3 we will look at the inequality constrained case. Robustness issues, concerningstability in the case of model uncertainty, are discussed in section 7.4. Finally section 7.5will discuss some extensions of the work of Kothare et al. [35].

7.1 Linear matrix inequalities

Consider the linear matrix expression

F (θ) = F0 +

m∑

i=1

θiFi (7.1)

where θ ∈ Rm×1, with elements θi, is the variable and the symmetric matrices Fi = F T

i ∈Rn×n, i = 0, . . . , m are given. A strict Linear Matrix Inequality (LMI) has the form

F (θ) > 0 (7.2)

The inequality symbol in (7.2) means that F (θ) is positive definite (i.e. xTF (θ)x > 0 forall nonzero x ∈ R

n×1). A nonstrict LMI has the form

F (θ) ≥ 0

Properties of LMIs:

• Convexity:The set C = θ |F (θ) > 0 is convex in θ, which means that for each pair θ1, θ2 ∈ Cand for all λ ∈ [0, 1] the next property holds

λθ1 + (1− λ)θ2 ∈ C

• Multiple LMIs:Multiple LMIs can be expressed as a single LMI, since

F (1) > 0 , F (2) > 0 , . . . , F (p) > 0

is equaivalent to:

F (1) 0 · · · 00 F (2) 0...

. . ....

0 0 · · · F (p)

> 0

Page 133: MPC

7.1. LINEAR MATRIX INEQUALITIES 133

• Schur complements:Consider the following LMI:

[

Q(θ) S(θ)ST (θ) R(θ)

]

> 0

where Q(θ) = QT (θ), R(θ) = RT (θ) and S(θ) depend affinely on θ. This is equaiva-lent to

R(θ) > 0 , Q(θ)− S(θ)R−1(θ)ST (θ) > 0

Finally note that any symmetric matrix M ∈ Rn×n can be written as

M =

n(n+1)/2∑

i=1

Mimi

where mi are the scalar entries of the upper-right triangle part of M , and Mi are symmetricmatrices with entries 0 or 1. For example:

M =

[

m1 m2

m2 m3

]

=

[

1 00 0

]

m1 +

[

0 11 0

]

m2 +

[

0 00 1

]

m3

This means that a matrix inequality, that is linear in a symmetric matrix M , can easilybe transformed into a linear matrix inequality with a parameter vector

θ =[

m1 m2 . . . mn(n+1)/2

]T

Before we look at MPC using LMIs, we consider the more simple cases of Lyapunov stabilityof an autonomous system and the properties of a stabilizing state-feedback.

Lyapunov theory:

Probably the most elementary LMI is related to the Lyapunov theory. The difference stateequation

x(k + 1) = Ax(k)

is stable (i.e. all state trajectories x(k) go to zero) if and only if there exists a positive-definite matrix P such that

ATPA− P < 0

For this system the Lyapunov function V (k) = xT (k)Px(k) is positive definite for P > 0,and the increment ∆V (k) = V (k + 1)− V (k) is negative definite because

V (k + 1)− V (k) = xT (k + 1)Px(k + 1)− xT (k)Px(k)

= (Ax(k))TP (Ax(k))− xT (k)Px(k)

= xT (k)(ATPA− P )x(k)

< 0

for (ATPA− P ) < 0.

Page 134: MPC

134 CHAPTER 7. MPC BASED ON LINEAR MATRIX INEQUALITIES

Stabilizing state-feedback:

Consider the difference state equation:

x(k + 1) = Ax(k) +B v(k)

where x(k) is the state and v(k) is the input. When we apply a state feedback v(k) =F x(k), we obtain:

x(k + 1) = Ax(k) +B Fx(k) = (A+BF ) x(k)

and so the corresponding Lyapunov equation becomes:

(AT + F TBT )P (A+BF )− P < 0 , P > 0

Or by choosing P = S−1 this is equivalent to

(AT + F TBT )S−1(A+BF )− S−1 < 0 , S > 0

pre- and post-multiplying with S result in

S(AT + F TBT )S−1(A+BF )S − S < 0 , S > 0

By choosing F = Y S−1 we obtain the condition:

(SAT + Y TBT )S−1(AS +BY )− S < 0 , S > 0

which can be rewritten (using the Schur complement transformation) as

[

S SAT + Y TBT

AS +BY S

]

> 0 , S > 0 (7.3)

which are LMIs in S and Y . So any S and Y satisfying the above LMI result in a stabilizingstate-feedback F = Y S−1.

7.2 Unconstrained MPC using linear matrix inequal-

ities

Consider the system

x(k + 1) = Ax(k) +B2 w(k) +B3 v(k) (7.4)

y(k) = C1 x(k) +D12 w(k) (7.5)

z(k) = C2 x(k) +D22 w(k) +D23 v(k) (7.6)

Page 135: MPC

7.2. UNCONSTRAINED MPC USING LINEAR MATRIX INEQUALITIES 135

For simplicity reasons, in this chapter, we consider e(k) = 0. Like in chapter 5, we considerconstant external signal w, a zero steady-state performance signal zss and a weightingmatrix Γ(j) which is equal to identity, so

w(k + j) = wss for all j ≥ 0

zss = 0

Γ(j) = I for all j ≥ 0

Let the system have a steady-state, given by (vss, xss, wss, zss) = (Dssvwss, Dssxwss, wss, 0).We define the shifted versions of the input and state which are zero in steady-state:

v∆(k) = v(k)− vssx∆(k) = x(k)− xss

Now we consider the problem of finding at time instant k an optimal state feedback v∆(k+j|k) = F (k) x∆(k + j|k) to minimize the quadratic objective

minF

(k)J(k)

where J(k) is given by (Γ > 0):

J(k) =

∞∑

j=0

zT (k + j|k)Γz(k + j|k)

in which z(k + j|k) is the prediction of z(k + j), based on knowledge up to time k.

J(k) =

∞∑

j=0

z(k + j|k)TΓz(k + j|k)

=∞∑

j=0

(C2x(k + j|k) +D22w(k + j) +D23v(k + j|k))TΓ(C2x(k + j|k)

+D22w(k + j) +D23v(k + j|k))

=

∞∑

j=0

(C2x∆(k + j|k) +D22v∆(k + j|k))TΓ(C2x∆(k + j|k) +D22v∆(k + j|k))

=∞∑

j=0

x∆T (k + j|k)(CT

2 + F T (k)DT22)Γ(C2 +D22F (k))x∆(k + j|k)

This problem can be translated to a minimization problem with LMI-constraints. Considerthe quadratic function V (k) = x∆(k)TPx∆(k), P > 0, that satisfies

∆V (k) = V (k+1)−V (k) < −x∆T (k)(CT

2 +F T (k)DT22)Γ(C2 +D22F (k))x∆(k) (7.7)

Page 136: MPC

136 CHAPTER 7. MPC BASED ON LINEAR MATRIX INEQUALITIES

for every trajectory. Note that because ∆V (k) < 0 and V (k) > 0, it follows that ∆V (∞) =0. This implies that x∆(∞) = 0 and therefore V (∞) = 0. Now there holds:

V (k) = V (k)− V (∞)

= −∞∑

j=0

∆V (k + j)

>∞∑

j=0

x∆T (k + j|k)(CT

2 + F T (k)DT22)Γ(C2 +D22F (k))x∆(k + j|k)

= J(k)

so x∆T (k)Px∆(k) is a lyapunov function and at the same time an upper bound on J(k).

Now derive

∆V (k) = V (k + 1)− V (k) =

= x∆T (k + 1|k)Px∆(k + 1|k)− x∆

T (k)Px∆(k) =

= x∆T (k)

(

(A +B3F )TP (A+B3F ))

x∆(k)− x∆T (k)Px∆(k) =

= x∆T (k)

(

(A +B3F )TP (A+B3F )− P)

x∆(k)

And so condition (7.7) is the same as

(A+B3F )TP (A+B3F )− P + (C2 +D22F )TΓ(C2 +D22F ) < 0

By setting P = γS−1 and F = Y S−1 we obtain the following condition:

γ(AT +S−1Y TBT3 )S−1(A+B3Y S

−1)−γS−1 +(CT2 +S−1Y TDT

22)Γ(C2 +D22Y S−1) < 0

pre- and post-multiplying with S and division by γ result in

(SAT + Y TBT3 )S−1(AS +B3Y )− S + γ−1(SCT

2 + Y TDT22)Γ(C2S +D22Y ) < 0 (7.8)

or

S −[

SAT + Y TBT3 (SCT

2 + Y TDT22)Γ

1/2]

[

S−1 00 γ−1I

][

AS +B3YΓ1/2(C2S +D22Y )

]

> 0

which can be rewritten (using the Schur complement transformation) as

S SAT + Y TBT3 (SCT

2 + Y TDT22)Γ

1/2

AS +B3Y S 0Γ1/2(C2S +D22Y ) 0 γ I

> 0 , S > 0 (7.9)

So any γ, S and Y satisfying the above LMI gives an upper bound

V (k) = γ x∆(k)TS−1x∆(k) > J(k)

Page 137: MPC

7.3. CONSTRAINED MPC USING LINEAR MATRIX INEQUALITIES 137

Finally introduce an additional constraint that

x∆T (k)S−1x∆(k) ≤ 1 (7.10)

which, using the Schur complement property, is equivalent to

[

1 x∆T (k)

x∆(k) S

]

≥ 0 (7.11)

Now

γ > J (7.12)

and so a minimization of γ subject to LMI constraints (7.9) and (7.11) is equivalent to amiminization of the upper bound of the performance index.Note that the LMI constraint (7.9) looks more complicated than expression (7.8). However(7.9) is linear in S, Y and γ. A convex optimization algorithm, denoted as the interiorpoint algorithm, can solve convex optimization problems with many LMI constraints (upto a 1000 constraints) in a fast and robust way.

7.3 Constrained MPC using linear matrix inequalities

In the previous section an unconstrained predictive controller in the LMI-setting was de-rived. In this section we incorporate constraints. The most important tool we use is thenotion of invariant ellipsoid:

Invariant ellipsoid:

Lemma 37 Consider the system (7.4) and (7.6). At sampling time k, consider

x∆(k|k)TS−1x∆(k|k) ≤ 1

and let S also satisfy (7.9), then there will hold for all j > 0:

x∆(k + j|k)TS−1x∆(k + j|k) ≤ 1

Proof:From the previous section we know that when (7.9) is satisfied, there holds:

V (k + j) < V (k) for j > 0

Using V (k) = x∆T (k)Px∆(k) = γx∆

T (k)S−1x∆(k) we derive:

x∆(k + j|k)TS−1x∆(k + j|k) = γ−1V (k + j) < γ−1V (k) = x∆(k|k)TS−1x∆(k|k) ≤ 1

2 End Proof

Page 138: MPC

138 CHAPTER 7. MPC BASED ON LINEAR MATRIX INEQUALITIES

E =

η | ηTS−1η ≤ 1

=

η | ηTPη ≤ γ

is an invariant ellipsoid for the predicted statesof the system, and so

x∆(k|k) ∈ E =⇒ x∆(k + j|k) ∈ E ∀ j > 0

The condition x∆(k|k)TS−1x∆(k|k) ≤ 1 of the above lemma is equivalent to the LMI[

1 x∆T (k|k)

x∆(k|k) S

]

≥ 0 (7.13)

Signal constraints

Lemma 38 Consider the scalar signal

ψ(k) = C4x(k) +D42w(k) +D43v(k) (7.14)

and the signal constraint

|ψ(k + j|k)| ≤ ψmax ∀ j ≥ 0 (7.15)

where D43 6= 0 and ψmax > 0. Further let condition (7.11) hold and assume that |ψss| <ψmax where

ψss = C4xss +D42wss +D43vss .

Then condition (7.15) will be satisfied if[

S (C4S +D43Y )T

C4S +D43Y (ψmax − |ψss|)2

]

≥ 0 (7.16)

Proof::Note that we can write

ψ(k) = ψ∆(k) + ψss

where

ψ∆(k) = C4x∆(k)(k) +D43v∆(k)(k) .

Equation (7.16) together with lemma 37 gives that

|ψ∆(k + j|k)|2 ≤ (ψmax − |ψss|)2

or

|ψ∆(k + j|k)| ≤ ψmax − |ψss|

and so

|ψ(k)| ≤ |ψ(k)− |ψss||+ |ψss| ≤ ψmax − |ψss|+ |ψss| = ψmax

2 End Proof

Page 139: MPC

7.3. CONSTRAINED MPC USING LINEAR MATRIX INEQUALITIES 139

Remark 39 : Note that for an input constraint on the i-th input vi

|v∆i(k + j)| ≤ v∆max,i for j ≥ 0

is equivalent to condition (7.15) for ψmax,i = v∆max,i, C2 = 0, D42 = 0 and D43 = ei, whereei is a selection vector such that vi(k) = ei v(k).An output constraint on the i-th output yi

|yi(k+j+1)− yss,i| ≤ ymax,i for j ≥ 1

where yss = C1xss +D12wss = (C1Dssx +D12)wss.By deriving

yi(k+j+1) = C1x(k+j+1) +D12w(k+j+1) =

= C1x∆(k + j + 1) + yss =

= C1Ax∆(k + j) + C1B3v∆(k + j) + yss

we find that the output condition is equivalent to condition (7.15) for ψmax,i = ymax,i,C4 = C1A, D42 = 0 and D43 = Cy,iB3.

Summarizing MPC using linear matrix inequalities

Consider the system

x(k + 1) = Ax(k) +B3 v(k) (7.17)

y(k) = C1 x(k) +D12 w(k) (7.18)

z(k) = C2 x(k) +D22 w(k) +D23 v(k) (7.19)

ψ(k) = C4 x(k) +D42 w(k) +D43 v(k) (7.20)

with a steady-state (vss, xss, wss, zss) = (Dssvwss, Dssxwss, wss, 0) The LMI-MPC controlproblem is to find, at each time-instant k, a state-feedback law

v(k) = F (x(k)− xss) + vss

such that the criterion

minFJ(k) where J(k) =

∞∑

j=0

zT (k + j)Γz(k + j) (7.21)

is optimized subject to the constraint

| ψi(k + j) | ≤ ψi,max , , for i = 1, . . . , nψ , ∀j ≥ 0 (7.22)

where ψi,max > 0 for i = 1, . . . , nψ. The optimal solution is found by solving the followingLMI problem:

Page 140: MPC

140 CHAPTER 7. MPC BASED ON LINEAR MATRIX INEQUALITIES

Theorem 40 Given a system with state space description (7.17)-(7.19) and a controlproblem of minimizing (7.21) subject to constraint (7.22), and an external signal

w(k + j) = wss for j > 0

The state-feedback F = Y S−1 minimizing the worst-case J(k) can be found by solving:

minγ,S,Y

γ (7.23)

subject to

(LMI for lyapunov stability:)

S > 0 (7.24)

(LMI for ellipsoid boundary:)

[

1 x∆T (k|k)

x∆(k|k) S

]

≥ 0 (7.25)

(LMIs for worst case MPC performance index:)

S SAT+Y TBT3 (SCT

2 +Y TDT22)Γ

1/2

AS+B3Y S 0Γ1/2(C2S +D22Y ) 0 γ I

> 0 (7.26)

(LMIs for constraints on ψ:)

[

S (C4S +D43Y )TETi

Ei(C4S +D43Y ) (ψi,max − |ψi,ss|)2

]

≥ 0, i = 1, . . . , nψ (7.27)

where Ei =[

0 . . . 0 1 0 . . . 0]

with the 1 on the i-th position.

LMI (7.24) guarantees Lyapunov stability, LMI (7.25) describes an invariant ellipsoid forthe state, (7.26) gives the LMI for the MPC-criterion and (7.27) corresponds to the stateconstraint on ψi .

7.4 Robustness in LMI-based MPC

In this section we consider the problem of robust performance in LMI based MPC. Thesignals w(k) and e(k) are assumed to be zero. How these signals can be incorporated inthe design is in Kothare et al. [35].We consider both unstructured and structured model uncertainty. Given the fact that wand e are zero, we get the following model uncertainty descriptions for the LMI-based case:

Page 141: MPC

7.4. ROBUSTNESS IN LMI-BASED MPC 141

Unstructured uncertainty

The uncertainty is given in the following description:

x(k + 1) = Ax(k) +B3 v(k) +B4 δ(k) (7.28)

z(k) = C2 x(k) +D23 v(k) +D24 δ(k) (7.29)

ψ(k) = C4 x(k) +D43 v(k) +D44 δ(k) (7.30)

ǫ(k) = C5 x(k) +D53 v(k) (7.31)

δ(k) = Ω(q)ǫ(k) (7.32)

where Ω has a block diagonal structure:

Ω =

Ω1

Ω2

. . .

Ωr

(7.33)

with Ωℓ(q) : Rnℓ → R

nℓ, ℓ = 1, . . . , r is bounded in ∞-norm:

‖Ωℓ‖∞ ≤ 1 , ℓ = 1, . . . , r (7.34)

A nominal model Gnom ∈ G is given for δ(k) = 0:

x(k + 1) = Ax(k) +B3 v(k)

Structured uncertainty

The uncertainty is given in the following description:

x(k + 1) = Ax(k) +B3 v(k) (7.35)

z(k) = C2 x(k) +D23 v(k) (7.36)

ψ(k) = C4 x(k) +D43 v(k) (7.37)

where

P =

A B3

C2 D23

C4 D43

∈ Co

A1 B3,1

C2,1 D23,1

C4,1 D43,1

, . . . ,

AL B3,L

C2,L D23,L

C4,L D43,L

(7.38)

A nominal model Gnom ∈ G is given by

x(k + 1) = Anom x(k) +B3,nom v(k)

Page 142: MPC

142 CHAPTER 7. MPC BASED ON LINEAR MATRIX INEQUALITIES

Robust performance for LMI-based MPC

The robust performance MPC control problem is to find, at each time-instant k, a state-feedback law

v(k) = F x(k)

such that the criterion

minF

maxG∈G

J(k) where J(k) =

∞∑

j=0

zT (k + j)Γz(k + j) (7.39)

is optimized subject to the constraints

maxG∈G| ψi(k + j) | ≤ ψi,max , for i = 1, . . . , nψ , ∀j ≥ 0 (7.40)

In equation (7.39) input-signal v(k) is choosen such that the performance index J is min-imized for the worst-case choice of G in G, subject to constraints (7.40) for the sameworst-case G. As was introduced in the previous section, the uncertainty in G can beeither structured or unstructured, resulting in the theorems 41 and 42.

Theorem 41 Robust performance for unstructured model uncertaintyGiven a system with uncertainty description (7.28)-(7.34) and a control problem of mini-mizing (7.39) subject to constraints (7.40). The state-feedback F = Y S−1 minimizing theworst-case J(k) can be found by solving:

minγ,S,Y,T,V,Λ

γ (7.41)

subject to

(LMI for lyapunov stability:)

S > 0 (7.42)

(LMI for ellipsoid boundary:)

[

1 xT (k|k)x(k|k) S

]

≥ 0 (7.43)

(LMI for worst case MPC performance index:)

S (AS +B3Y )T (C2S +D23Y )TΓ (C5S +D53Y )T

(AS +B3Y ) S − B4ΛBT4 −B4ΛD

T24Γ 0

Γ(C2S +D23Y ) −ΓD24ΛBT4 γI − ΓD24ΛD

T24Γ 0

(C5S +D53Y ) 0 0 Λ

≥0 (7.44)

Page 143: MPC

7.4. ROBUSTNESS IN LMI-BASED MPC 143

Λ > 0 (7.45)

where Λ is partitioned as Ω:

Λ = diag(λ1In1, λ2In2

, . . . , λrInr) > 0 (7.46)

(LMIs for constraints on ψ:)

ψ2i,maxS (C5S +D53Y )T (C4S +D43Y )TET

i

C5S +D53Y V −1 0Ei(C4S +D43Y ) 0 I − EiD44V

−1DT11E

Ti

≥ 0, i = 1, . . . , nψ (7.47)

V −1 > 0 (7.48)

where V is partitioned as Ω:

V = diag(v1In1, v2In2

, . . . , vrInr) > 0 (7.49)

and Ei =[

0 . . . 0 1 0 . . . 0]

with the 1 on the i-th position.

LMI (7.42) guarantees Lyapunov stability, LMI (7.43) describes an invariant ellipsoid forthe state, (7.44), (7.45) are the LMIs for the worst-case MPC-criterion and (7.47), (7.49)and (7.48) correspond to the state constraint on ψ .

Proof of theorem 41:

The LMI’s (7.43) and (7.45) for optimizing (7.41) are given in Kothare et al.[35]. In thenotation of the same paper (7.47)-(7.48) can be derived as follows:For any admissible ∆(k) and l = 1, . . . , m we have

ψ(k) = ETi C4 x(k) + ET

i D43 v(k) + ETi D44 δ(k) (7.50)

= ETi (C4 +D43F ) x(k) + ET

i D44 δ(k) (7.51)

and so for l = 1, . . . , nψ and j ≥ 0:

maxj≥0|Ψi(k + j|k) | = max

j≥0| ET

i (C4 +D43F ) x(k + j|k) + ETi D44 δ(k + j|k) |

≤ maxzT z≤1

|ETi (C4 +D43F )S

1

2z + ETi D44 δ(k + j|k)|

Further the derivation of (7.47)-(7.48) is analoguous to the derivation of the LMI for anoutput constraint in Kothare et al.[35].

In the notation of the same paper (7.44) can be derived as follows:

V (x(k+j+1|k)) =

Page 144: MPC

144 CHAPTER 7. MPC BASED ON LINEAR MATRIX INEQUALITIES

=

[

x(k + j|k)δ(k + j|k)

]T[(A+B3F )TP (A+B3F ) (A+B3F )TPB4

BT4 P (A+B3F ) BT

4 PB4

][

x(k + j|k)δ(k + j|k)

]

V (x(k + j|k)) =

[

x(k + j|k)δ(k + j|k)

]T[P 00 0

][

x(k + j|k)δ(k + j|k)

]

∆J(k + j) =

= z(k + j)TΓz(k + j)

=(

(C2 +D23F )x(k + j) +D24δ(k + j))T

R(

(C2 +D23F )x(k + j) +D24δ(k + j))

=

[

x(k + j|k)δ(k + j|k)

]T[(C2 +D23F )TΓ(C2 +D23F ) (C2 +D23F )TΓD24

DT24Γ(C2 +D23F ) DT

24ΓD24

][

x(k + j|k)δ(k + j|k)

]

And so the condition

V (x(k+j+1|k))− V (x(k + j|k)) ≤ −∆J(k + j)

result in the inequality

[

x(k+j|k)δ(k+j|k)

]T

(A+B3F )TP (A+B3F )− P+ (A+B3F )TPB4 + (C2+D23F )TΓD24

+(C2+D23F )TΓ(C2+D23F )BT

4 P (A+B3F ) +DT24Γ(C2+D23F ) BT

4 PB4 +DT24ΓD24

·

·[

x(k+j|k)δ(k+j|k)

]

≤ 0

This condition together with condition

δℓ(k + j|k)T δℓ(k + j|k) ≤

≤ x(k + j|k)(C22,ℓ +D53,ℓF )T (C22,ℓ +D53,ℓF )x(k + j|k) , ℓ = 1, 2, . . . r

is satisfied if there exists a matrix Z ≥ 0 such that

(A+B3F )TP (A+B3F )− P+ (A+B3F )TPB4 + (C2 +D23F )TΓD24

+(C2 +D23F )TΓ(C2 +D23F )++(C5 +D53F )T (C5 +D53F )

BT4 P (A+B3F ) +DT

24Γ(C2 +D23F ) BT4 PB4 +DT

24ΓD24 − Z

≤ 0

Susbtituting P = γS−1 and F = Y S−1 we find

(AS +B3Y )TγS−1(AS +B3Y )− γS+ (AS +B3Y )TγS−1B4++(C2S +D23Y )TΓ(C2S +D23Y ) + SQS+ +(C2S +D23Y )TΓD24

+(C5S +D53Y )TΛ(C5S +D53Y )BT

4 γS−1(AS +BY ) +DT

24Γ(CS +DY ) BT4 γS

−1B4 +DT24ΓD24 − Z

≤ 0

By susbtitution of Z = γΛ−1 and by applying some matrix operations we obtain equation7.44.

2 End Proof

Page 145: MPC

7.4. ROBUSTNESS IN LMI-BASED MPC 145

Theorem 42 Robust performance for structured model uncertaintyGiven a system with uncertainty description (7.35)-(7.38) and a control problem of min-

imizing (7.39) subject to constraint (7.40). The state-feedback F = Y S−1 minimizing theworst-case J(k) can be found by solving:

minγ,S,Y

γ (7.52)

subject to

(LMI for lyapunov stability:)

S > 0 (7.53)

(LMI for ellipsoid boundary:)

[

1 xT (k|k)x(k|k) S

]

≥ 0 (7.54)

(LMIs for worst case MPC performance index:)

S SATℓ +Y T BT3,ℓ (SCT

2,ℓ+YT DT

23,ℓ)Γ1/2

AℓS+B3,ℓY S 0Γ1/2(C2,ℓS + D23,ℓY ) 0 γ I

≥ 0 , ℓ = 1, . . . , L (7.55)

(LMIs for constraints on ψ:)

[

S (C4,ℓS + D43,ℓY )TETi

Ei(C4,ℓS + D43,ℓY ) ψ2i,max

]

≥ 0, i = 1, . . . , nψ, ℓ = 1, . . . , L (7.56)

where Ei =[

0 . . . 0 1 0 . . . 0]

with the 1 on the i-th position.

LMI (7.53) guarantees Lyapunov stability, LMI (7.54) describes an invariant ellipsoid forthe state, (7.55) gives the LMIs for the worst-case MPC-criterion and (7.56) correspond tothe state constraint on ψ .

Proof of theorem 42:

The LMI (7.54) for solving (7.52) is given in Kothare et al.[35]. In the notation of the samepaper (7.56) can be derived as follows:We have, for i = 1, . . . , m:

ψi(k) = EiC4 x(k) + EiD43 v(k) (7.57)

= Ei(C4 +D43F ) x(k) (7.58)

Page 146: MPC

146 CHAPTER 7. MPC BASED ON LINEAR MATRIX INEQUALITIES

and so all possible matrices[

C4 D43

]

and l = 1, . . . , nψ there holds

maxj≥0| ψi(k + j|k) | = max

j≥0| Ei(C4 +D43F ) x(k + j|k) |

≤ maxzT z≤1

|Ei(C4 +D43F )S1

2 z| , j ≥ 0

= σ(

Ei(C4 +D43F )S1

2

)

, j ≥ 0

Further the derivation of (7.56) is analogous to the derivation of the LMI for an outputconstraint in Kothare et al.[35].

In the notation of the same paper (7.55) can be derived as follows. The equation

(A+B3F )TP (A+B3F )− P +Q+ F TRF ≤ 0

is replaced by:

(A+B3F )TP (A+B3F )− P + (C2 +D23F )TΓ(C2 +D23F ) ≤ 0

For P = γS−1 and F = Y S−1 we find

S SAT + Y TBT3 (SCT

2 + Y TDT23)Γ

1/2

AS +B3Y S 0Γ1/2(C2S +D23Y ) 0 γ I

≥ 0 (7.59)

which is affine in [A B3 C2 D23]. Hence the condition becomes equation (7.55).2 End Proof

7.5 Extensions and further research

Although the LMI based MPC method, described in the previous sections, is a useful forrobustly controlling systems with signal constraints, there are still a few disadvantages.

Computational complexity: Despite the fact that solving an LMI problem is convex,it is computationally more complex than a quadratic program. For larger systemsthe time needed to solve the problem may be too long.

Conservatism: The use of invariant sets (see Section 7.3) may lead to very conserva-tive approximations of the signal constraints. The assumption that constraints aresymmetric around the steady state value is very restrictive.

Approximation of the performance index: Equation (7.12) shows that in LMI-MPCwe do not minimize the performance index J itself, but only an upper bound γ ≤ J .This means that we may be far away from the real optimal control input.

Since Kothare et al. [35] introduced the LMI-based MPC approach, many researchers havebeen looking for ways to adapt and improve the method such that at least one of the abovedisadvantages is relaxed.

Page 147: MPC

7.5. EXTENSIONS AND FURTHER RESEARCH 147

Using LMI with Hybrid Approach

Kouvaritakis et al. ([36]) introduces a fixed feedback control law which is deployed byintroducing extra degrees of freedom, namely, an additional term c(k) in the followingform

v(k) = Fx(k) + c(k), c(k +N + i) = 0, i > 0(3− 36) (7.60)

In this way only a simple optimization is needed online to calculate the N extra controlmoves. Then the closed-loop system is derived as follow.

x(k + 1) = Ac(k)x(k) +B(k)c(k) (7.61)

where Ac(k) = A(k) + B(k)F . Equation can be expressed as the following state-spacemodel.

ξ(k + 1) = Ψ(k)ξ(k)

Ψ(k) =

[

Ac(k)[

B(k) 0 . . . 0]

0 M

]

ξ(k) =

[

x(k)f(k)

]

, f(k) =

c(k)c(k + 1)

...c(k +N − 1)

(7.62)

M =

0 IN 0 . . . 00 0 IN 0...

. . .. . .

...0 0 0 IN0 0 . . . 0 0

(7.63)

If there exists an invariant set Ex = x|xTQ−1x ≤ 1 for the control law v(k + i|k) =Fx(k + i|k), i ≥ 0, there must exist ar least one invariant set Eξ for system (7.62), where

Ex = ξ|ξTQ−1ξ ξ ≤ 1 (7.64)

Matrix Q−1ξ can be partioned as

Q−1ξ =

[

Q11 QT21

Q21 Q22

]

withQ11 = Q−1

Then the inequality of (7.64) can be written as

xT Q11 ≤ 1− 2fT Q21x− fT Q22f

Here one can see that nonzero f can be used to get an invariant ellipsoids which is largerthan Ex, such that the applicability can be widen. In other words, this extra freedom

Page 148: MPC

148 CHAPTER 7. MPC BASED ON LINEAR MATRIX INEQUALITIES

can afford highly tuned control law without the reduction of the invariant set. Hence, thecontrol law F can be designed offline, using the any of the robust control methods withoutconsidering the constraints. When the optimal F is decided, the cost function can bereplaced by Jf = fTf . One can see that the computational burden involved in the onlinetuning of F is removed that shows the main advantage of this method.Related to this method, Bloemen et al. [8] extends the hybrid approach by introducing aswitching horizon Ns. Before Ns the feedback law is designed offline, but after the Ns thecontrol law F is a variable in the online optimization problem. Here the uncertainties arenot considered. The performance index is defined as

J(k) =

∞∑

j=0

yT (k + j + 1|k)Qy(k + j + 1|k) + uT (k + j|k)Ru(k + j|k) (7.65)

where Q and R are positive-definite weighting matrices. If F is given, the infinite sumbeyond Ns in (7.65) can be replaced by quadratic terminal cost function xT (k+Ns|k)Px(k+Ns|k), the weighting matrix P can be obtained via a Lyapunov equation. Based on thisterminal cost function the upper bound of the performance index beyond Ns is given asfollow

J(k) =

Ns−1∑

j=0

yT (k + j + 1|k)Qy(k + j + 1|k) + uT (k + j|k)Ru(k + j|k)

+xT (k +Ns|k)Px(k +Ns|k)≥ J(k) (7.66)

The the entire MPC optimization problem can be given by the semi-definite programmingproblem for the optimization of J(k) subject to the additional LMIs which express theinput and output constraints. The advantage of this method is that constraints in the firstpart of the first part of the prediction horizon are taken into account in an appropriateway. sThe computational burden will increase exponentially if Ns increase, the automatictrade-off between feasibility and optimality will still be obtained. The algorithm presentedin [8] is closely related to the algorithm presented by [42].

Combining Hybrid Approach with Multi-Lyapunov Functions

In [23] min-max algorithm using LMI with hybrid approach used by [8] and min-maxalgorithm using LMI with multi-Lyapunov functions used by [19] are combined with LMItechnique mentioned by (Kothare et al. [35]). Ns free control moves are used withoutusing the static feedback control law. These Ns free control moves are optimized usingthe min-max algorithm in order to minimize the worst-case cost function over a polytopicmodel uncertainty set. Then after the switching horizon Ns, the a feedback control lawF is implemented in each step of the infinite horizon control. This feedback control iscalculated online subject to the upper bound of the terminal cost function and robuststability constraints formed in LMI form. Of course the computational burden will increase,but the numerical example show that better results are obtained compared to [19].

Page 149: MPC

7.5. EXTENSIONS AND FURTHER RESEARCH 149

Using LMI with off-line formation

In order to reduce the online computational load of the method proposed by Kothare etal. [35], Wan and Kothare [75] developed an off-line formulation of robust MPC which cancalculate a sequence of explicit control laws corresponding to a sequence of asymptoticallystable invariant ellipsoids constructed off-line. Two concepts are used in this method. Thefirst concept is an asymptotically stable invariant ellipsoid, defined as follows:

Given a discrete dynamic system x(k + 1) = f(x(k)), subset E = x ∈Rnx|xTQ−1x ≤ 1 of the state space R

nx is said to be an asymptotically stable in-variant ellipsoid, if it has the property that, whenever x(k1) ∈ E , then x(k) ∈ E forall times k > k1 and x(k)→ 0 as k →∞

The set E = x|xTQ−1x ≤ 1 calculated by the method (Kothare et al. [35]) is anasymptotically stable invariant ellipsoid according to the definition. The second concept

is the distance between the state x and the origin, defined as the weighted norm ‖x‖Q1

def=

xTQ−1x. The main idea of this off-line formulation is that off-line a sequence of Nasymptotically stable invariant ellipsoids are calculated, one inside another, by choosingN states ranging from zero to the largest feasible state that satisfies ‖x(k+ j + 1)‖Q1

< 1,j < N , for all systems belong to the uncertainty set. For each asymptotically stableinvariant ellipsoid, a state feedback law Fi is calculated by solving the optimization problemmentioned in (Kothare et al. [35]) off-line. Then, these control laws are put in a look-uptable. At last, the online calculation just concludes checking which asymptotically stableinvariant ellipsoid the state x(k) in time k belongs to. The control action u(k) is calculatedby applying the control law corresponding to the smallest ellipsoid for the state x(k). Sothe online computational burden is reduced due to the off-line calculation. In addition,when the state located between the two adjacent asymptotically stable invariant ellipsoids,αi, 0 ≤ αi ≤ 1, which is calculated by solving equation xT (k)(αiQ

−1i +(1−αi)Q−1

i+1)x(k) = 1is applied to the control law u(k) = (αiFi + (1 − αi)Fi+1)x(k) to avoid the discontinuityon the borders of the ellipsoids. This method may give a little loss of the performance,however the online computational load is reduced dramatically compared to [35].

Page 150: MPC

150 CHAPTER 7. MPC BASED ON LINEAR MATRIX INEQUALITIES

Page 151: MPC

Chapter 8

Tuning

As was already discussed in the introduction, one of the main reasons for the popularityof predictive control is the easy tuning. The purpose of tuning the parameters is to ac-quire good signal tracking, sufficient disturbance rejection and robustness against modelmismatch.

Consider the LQPC-performance index

J(u, k) =

N∑

j=Nm

xT (k + j|k)Qx(k + j|k) +

N∑

j=1

uT (k + j − 1)Ru(k + j − 1)

and GPC-performance index

J(u, k) =

N∑

j=Nm

(

yp(k + j|k)− r(k + j))T(

yp(k + j|k)− r(k + j))

+

+λ2Nc∑

j=1

∆uT (k + j − 1)∆u(k + j − 1)

The tuning parameters can easily be recognized. They are:

Nm = minimum-cost horizon

N = prediction horizon

Nc = control horizon

λ = weighting factor (GPC)

P (q) = tracking filter (GPC)

Q = state weighting matrix (LQPC)

R = control weighting matrix (LQPC)

151

Page 152: MPC

152 CHAPTER 8. TUNING

This chapter discusses the tuning of a predictive controller. In section 8.1 some rules ofthumb are given for the initial parameter settings. In section 8.2 we look at the casewhere the initial controller does not meet the desired specifications. An advanced tuningprocedure may provide some tools that lead to a better and suitable controller. The finalfine-tuning of a predictive controller is usually done on-line when the controller is alreadyrunning. Section 8.3 discusses some special settings of the tuning parameters, leading towell known controllers.

In this chapter we will assume that the model is perfect. Robustness against model mis-match was already discussed in section 6.5.

8.1 Initial settings for the parameters

For GPC the parameters N , Nc and λ are the three basic tuning parameters, and mostpapers on GPC consider the tuning of these parameters. The rules-of-thumb for the settingsof a GPC-controller were first discussed by Clarke & Mothadi ([13]) and later reformulatedfor the more extended UPC-controller in Soeterboek ([61]). In LQPC the parameters Nand Nc are present, but instead of λ and P (q), we have the weighting matrices R and Q.In Lee & Yu ([39]), the tuning of the LQPC parameters is considered.In the next sections the initial setting for the summation parameters (Nm, N , Nc) and thesignal weighting parameters (P (q), λ / Q, R) are discussed.

8.1.1 Initial settings for the summation parameters

In both the LQPC-performance index and the GPC-performance index, three summationparameters, Nm, N and Nc are recognized, which can be used to tune the predictivecontroller. Often we choose Nm = 1, which is the best choice most of the time, but maybe chosen larger in the case of a dead-time or an inverse response.The parameter N is mostly related to the length of the step response of the process, andthe prediction interval N should contain the crucial dynamics of x(k) due to the responseon u(k) (in the LQPC-case) or the crucial dynamics of y(k) due to the response on ∆u(k)(in the GPC-case).The number Nc ≤ N is called the control horizon which forces the control signal to becomeconstant

u(k + j) = constant for j ≥ Nc

or equivalently the increment input signal to become zero

∆u(k + j) = 0 for j ≥ Nc

An important effect of a small control horizon (Nc ≪ N) is the smoothing of the controlsignal (which can become very wild if Nc = N) and the control signal is forced towards

Page 153: MPC

8.1. INITIAL SETTINGS FOR THE PARAMETERS 153

its steady-state value, which is important for stability-properties. Another important con-sequence of decreasing Nc is the reduction in computational effort. Let the control signalv(k) be a p × 1 vector. Then the control vector v(k) is a pN × 1 vector, which meanswe have pN degrees of freedom in the optimization. By introducing the control horizonNc < N , these degrees of freedom decrease because of the equality constraint, as was shownin chapter 4 and 5. If the control horizon is the only equality constraint, the new opti-mization parameter is µ, which is a pNc × 1 vector. Thus the degrees of freedom reducesto pNc. This can be seen by observing that the matrix D⊥

33 is an pN × pNc matrix, and sothe matrix H = 2 (D⊥

33)T DT

23ΓD23D⊥33 becomes an pNc× pNc matrix. For the case without

further inequality constraints, this matrix H has to be inverted, which is easier to invertfor smaller Nc.

If we add inequality constraints we have to minimize

minµ

1

2µT H µ

subject to these constraints. The number of parameters in the optimization reduces frompN to pNc, which will speed up the optimization.

Consider a process where

d = the dead time of the processn = the number of poles of the model

= the dimension of the matrix Ao for an IO model= the order of polynomial ao(q) for an IO model= the dimension of the matrix Ai for an IIO model= the order of polynomial ai(q) for an IIO model

ts = the 5% settling time of the process Go(q)ωs = the sampling-frequencyωb = the bandwidth of the process Gc,o(s)

where Gc,o(s) is the original IO process model in continuous-time (corresponding to thediscrete-time IO process model Go(q)). Now the following initial setting are recommended(Soeterboek [[61]]):

Nm = 1 + dNc = nN = int(αN ts) for well-damped systemsN = int(βN ωs/ωb) for badly-damped and unstable systems

where αN ∈ [1.5, 2] and βN ∈ [4, 25]. Resuming, Nm is equal to 1 + the process dead-timeestimate and N should be chosen larger than the length of the step response of the open-loop process. When we use an IIO model, the value of N should be based on the originalIO-model (Go(q) or Gc,o(s)).

Page 154: MPC

154 CHAPTER 8. TUNING

The bandwidth ωb of a system with transfer function Gc,o(s) is the frequency at which themagnitude ratio drops to 1/

√2 of its zero-frequency level (given that the gain characteristic

is ‘flat’ at zero frequency). So:

ωb = maxω∈R

ω∣

∣|Gc,o(jω)|2/|Gc,o(0)|2 ≥ 0.5

For badly-damped and unstable systems, the above choice of N = 2 int(2ωs/ωb) is a lowerbound. Often increasing N may improve the stability and the performance of the closedloop.

In the constrained case Nc will usually be chosen bigger, to introduce extra degrees offreedom in the optimization. A reasonable choice is

n ≤ Nc ≤ N/2

If signal constraints get very tight, Nc can be even bigger than N/2. (see elevator examplein chapter 5).

Remark 43 : Alamir and Bornard [1] show there exists a finite value N for which theclosed-loop system is asymptotically stable. Unfortunately, only the existence of such afinite prediction horizon is shown, its computation remains difficult.

8.1.2 Initial settings for the signal weighting parameters

The GPC signal weighting parameters:

λ should be chosen as small as possible, 0 in most cases. In the case of non-minimumphase systems, λ = 0 will lead to stability problems and so λ should be chosen as small aspossible. The parameters pi, i = 1, . . . , np of filter

P (q) = 1 + p1q−1 + p2q

−2 + · · ·+ pnpq−np

are chosen such that the roots of the polynomial P (q) are the desired poles of the closedloop. P (q) makes y(k) to track the low-pass filtered reference signal P−1(q)r(k).

The LQPC signal weighting parameters

In the SISO case, the matrix Q is a n×n matrix and R will be a scalar. When the purposeis to get the output signal y(k) to zero as fast as possible we can choose

Q = CT1 C1 and R = λ2I

Page 155: MPC

8.1. INITIAL SETTINGS FOR THE PARAMETERS 155

which makes the LQPC performance index equivalent to the GPC index for an IO model,r(k) = 0 and P (q) = 1. This can be seen by substitution:

J(u, k) =

N∑

j=Nm

xT (k + j|k)Qx(k + j|k) +

Nc∑

j=1

uT (k + j − 1)Ru(k + j − 1)

=N∑

j=Nm

xT (k + j|k)CT1 C1x(k + j|k) + λ2

Nc∑

j=1

uT (k + j − 1)u(k + j − 1)

=N∑

j=Nm

yT (k + j|k)y(k + j|k) + λ2Nc∑

j=1

uT (k + j − 1)u(k + j − 1)

The rules for the tuning of λ are the same as for GPC. So, λ = 0 is an obvious choice forminimum phase systems, λ is small for non-minimum phase systems. By adding an termQ1 to the weighting matrix

Q = CT1 C1 +Q1

we can introduce an additional weighting xT (k+j|k)Q1x(k+j|k) on the states.In the MIMO case it is important to scale the input and output signals. To make thisclear, we take an example from the paper industry where we want to produce a paper rollwith a specific thickness (in the order of 80 µm) and width (for A1-paper in the order of 84cm), Let y1(k) represent the thickness-error (defined in meters) and y2(k) the width-error(also defined in meters). If we define an error like

J =∑

|y1(k)|2 + |y2(k)|2

it is clear that the contribution of the thickness-error to the performance index can beneglected in comparison to the contribution due to the width-error. This means that theerror in paper thickness will be neglected in the control procedure and all the effort will beput in controlling the width of the paper. We should not be surprised that using the abovecriterion could result in paper with variation in thickness from, say 0 to 200 µm. Theintroduction of scaling gives a better balance in the effort of minimizing both width-errorand thickness-error. In this example let us require a precision of 1% for both outputs, thenwe can introduce the performance index

J =∑

|y1(k)/8 · 10−7|2 + |y2(k)/8.4 · 10−3|2

Now the relative error of both thickness and width are measured in the same way.

In general, let the required precision for the i-th output be given by di, so | yi | ≤ di, fori = 1, . . . , m. Then a scaling matrix can be given by

S = diag(d1, d2, . . . , dm)

Page 156: MPC

156 CHAPTER 8. TUNING

By choosing

Q = CT1 S

−2C1

the first term of the LQPC performance index will consist of

xT (k + j|k)Qx(k + j|k) = xT (k + j|k)CT1 S

−2C1x(k + j|k) =

m∑

i=1

|yi(k + j|k)|2/d2i

We can do the same for the input, where we can choose a matrix

R = λ2 diag(r21, r

22, . . . , r

2p)

The variables r2i > 0 are a measure how much the costs should increase if the i-th input

ui(k) increases by 1.

Example 44 : Tuning of GPC controller

In this example we tune a GPC controller for the following system:

ao(q) y(k) = bo(q) u(k) + fo(q) do(k) + co(q) eo(k)

where

ao(q) = (1− 0.9q−1)bo(q) = 0.03 q−1

co(q) = (1− 0.7q−1)fo(q) = 0

For the design we consider eo(k) to be integrated ZMWN (so ei(k) = ∆eo(k) is ZMWN).First we transform the above polynomial IO model into a polynomial IIO model and weobtain the following system:

ai(q) y(k) = bi(q) ∆u(k) + fi(q) di(k) + ci(q) ei(k)

where

ai(q) = (1− q−1)ao(q) = (1− q−1)(1− 0.9q−1)bi(q) = bo(q) = 0.03 q−1

ci(q) = co(q) = (1− 0.7q−1)fi(q) = fo(q) = 0

Now we want to find the initial values of the tuning parameters following the tuning rulesin section 8.1. To start with we plot the step response of the IO-model (!!!) in Figure 8.1.We see in the figure that system is well-damped. The 5% settling time is equal to ts = 30.The order of the IIO model is n = 2 and the dead time d = 0 .

Page 157: MPC

8.1. INITIAL SETTINGS FOR THE PARAMETERS 157

0 10 20 30 40 50 600

0.05

0.1

0.15

0.2

0.25

0.3

0.35step response with 5% bounds

k −−>

s(k)

−−>

stepresponse5% boundssettling time

Figure 8.1: Step response of IO model

Now the following initial setting are recommended

Nm = 1 + d = 1Nc = n = 2N = int(αN ts) = int(αN 30)

where αN ∈ [1.5, 2]. Changing αN from 1.5 to 2 does not have much influence, and wetherefore choose for the smallest value αN = 1.5, leading to N = 45.To verify the tuning we apply a step to the system (r(k) = 1 for k ≥ 0) and evaluate theoutput signal y(k). The result is given in 8.2.

Example 45 : Tuning of LQPC controller

In this example we tune a LQPC controller for the following system:

Ao =

[

2.3000 1.0000−1.2000 0

]

Co =[

1 0]

Bo =

[

0.10.09

]

Ko =

[

11

]

Lo =

[

21

]

which is found by sampling a continuous-time system with sampling-frequency ωs = 100rad/s. Now we want to find the initial values of the tuning parameters following the tuningrules in section 8.1. To start with compute the eigenvalues of Ao and we find λ1 = 0.8

Page 158: MPC

158 CHAPTER 8. TUNING

0 10 20 30 40 50 60−1.5

−1

−0.5

0

0.5

1

1.5solid: y , dotted: r , dash−dot: eo

k −−>

y(k)

,r(k)

−−>

y(k) r(k) eo(k)

Figure 8.2: Closed loop response on a step reference signal

and λ2 = 1.5. We observe that the the system is unstable and so we have to determinethe bandwidth of the original continuous-time system. We plot the bode-diagram of thecontinuous-time model in Figure 8.3. We see in the figure that ωb = 2π2.89 = 18.15 rad/s.The order of the IO model is n = 2 and the dead time d = 0 (there is no delay in thesystem).Now the following initial setting are recommended

Nm = 1 + d = 1Nc = n = 2N = int(βN ωs/ωb) = int(βN 5.51)

where βN ∈ [4, 25]. Changing βN from 4 to 25 does not have much influence, and wetherefore choose for the smallest value βN = 4, leading to N = 22.

To verify the influence of βN , we start the system in initial state x =[

1 1]T

, andevaluate the output signal y(k). The result is given in 8.4. It is clear that for β = 10 the bestresponse is found. We therefore obtain the optimal prediction horizon N = int(βN ·5.51) =int(10 · 5.51) = 55.

8.2 Tuning as an optimization problem

In the ideal case the performance index and constraints reflect the mathematical formula-tion of the specifications from the original engineering problem. However, in practice the

Page 159: MPC

8.2. TUNING AS AN OPTIMIZATION PROBLEM 159

10−2

10−1

100

101

102

10−1

100

101

ωb

Gb

Figure 8.3: Bode plot of IO continuous-time model

0 5 10 15 20 25 30−1

−0.5

0

0.5

1

1.5

2

2.5stepresponses for unstable system with LQPC

k −−>

y(k)

,eo(k

) −−

>

y(k) for β=4y(k) for β=10y(k) for β=25e

o(k)

Figure 8.4: Closed loop response for initial state x = [1 1]T .

Page 160: MPC

160 CHAPTER 8. TUNING

desired behaviour of the closed loop system is usually expressed in performance specifica-tions, such as step-response criteria (overshoot, rise time and settling time) and responsecriteria on noise and disturbances. If the specifications are not too tight, the initial tuning,using the rules of thumb of the previous section, may result in a feasible controller. If thedesired specifications are not met, an advanced tuning is necessary. In that case the rela-tion between the performance specifications and the predictive control tuning parameters(Nm, N , Nc, for GPC: λ, P (q), and for LQPC: Q, R) should be understood.In this section we will study this relation and consider various techniques to improve oroptimize our predictive controller.

We start with the closed loop system as derived in chapter 6:

[

v(k)y(k)

]

=

[

M11(q) M12(q)M21(q) M22(q)

][

e(k)w(k)

]

where w(k) consists of the present and future values of reference and disturbance signal.Let w(k) = wr(k) represent a step reference signal and let w(k) = wd(k) represent a stepdisturbance signal. Further define the output signal on a step reference signal as

syr(k) = M22(q) wr(k)

the output signal on a step disturbance signal as

syd(k) = M22(q) wd(k)

the input signal on a step reference signal as

svr(k) = M12(q) wr(k)

We will now consider the performance specifications in more detail, and look at responsescriteria on step-reference signals (criteria 1 to 4), responses criteria on noise and distur-bances (criteria 5 to 7) and finally at the stability of the closed loop (criterion 8):

1. Overshoot of output signal on step reference signal:The overshoot on the output is defined as the peak-value of the output signal y(k)−1for r(k) is a unit step, or equivalently, w(k) = wr(k). This value is equal to:

χos = maxk

( syr(k)− 1 )

2. Rise time of output signal on step reference signal:The rise time is the time required for the output to rise to 80% of the final value.This value is equal to:

χrt = mink

k∣

∣( syr(k) > 0.8 )

Page 161: MPC

8.2. TUNING AS AN OPTIMIZATION PROBLEM 161

The rise time ko = χrt is an integer and the derivative cannot be computed directly.Therefore we introduce the interpolated rise time χrt:

χrt =0.8 + (ko − 1)syr(ko)− kosyr(ko − 1)

syr(ko)− syr(ko − 1)

The interpolated rise time is the (real-valued) time-instant where the first-order in-terpolated step-response reach the value 0.8.

3. Settling time of output signal on step reference signal:The settling time is defined as the time the output signal y(k) needs to settle within5% of its final value.

χst = minko

k ≥ ko

∣| syr(k)− 1 | < 0.05

The settling time ko = χst is an integer and the derivative cannot be computeddirectly. Therefore we introduce the interpolated settling time χst:

χst =0.05 + (ko − 1)|syr(ko)| − ko|syr(ko − 1)|

|syr(ko)| − |syr(ko − 1)|The interpolated settling time is the (real-valued) time-instant where the first-orderinterpolated tracking-error on a step reference signal is settled within its 5% region.

4. Peak value of input signal on step reference signalof the output signal v(k) for r(k) is a step, is given by

χpvr = maxk| svr(k) |

5. Peak value of output signal on step disturbance signal:The peak-value of the output signal y(k) for d(k) is a step, or equivalently w(k) =wd(k), is given by

χpyd = maxk| syd(k) |

6. RMS mistracking on zero-mean white noise signal:The RMS value of the mistracking of the output due to a noise signal with spectrumδ(k) I is given by

χrm = ‖M21(ejω) ‖2 =

(∫ π

−π

|M21(ejω) | dω

)1/2

7. Bandwidth of closed loop system:The Bandwidth is the largest frequency below which the transfer function from noiseto output signal is lower than -20 dB.

χbw = minω

ω∣

∣|M21(e

jω) | < 0.1

Page 162: MPC

162 CHAPTER 8. TUNING

8. Stability radius of closed loop system:The stability radius is maximum modulus value of the closed loop poles, which isequal to the spectral radius ρ of the closed loop system matrix Acl.

χsm = ρ(Acl) = maxi| λi(Acl) |

where λi are the eigenvalues of closed loop system matrix Acl.

(Of course many other performance specifications can be formulated.)

While tuning the predictive controller, some of the above performance specifications willbe crucial in the design.Define the tuning vectors η and θ as follows:

η =

Nm

NNc

for GPC: θ =

λvec(Ap)vec(Bp)vec(Cp)vec(Dp)

for LQPC: θ =

[

vec(Q1/2)vec(R1/2)

]

It is clear that the criteria χ depend on the chosen values of θ and η, so:

χ = χ(θ, η)

where η consists of integer values and θ consists of real values. The tuning of η andθ can be done sequentially or simultaneously. In a sequential procedure we first choosethe integer vector η and tune the parameters θ for these fixed η. In a simultaneous proce-dure the vectors η and θ are tuned at the same time, using mixed-integer search algorithms.

The tuning of the integer values η is not too difficult, if we can limit the size of the searchspace Sη. A reasonable choice for bounds on Nm, N and Nc is as follows:

1 ≤ Nm ≤ N1 ≤ N ≤ αN2,o

1 ≤ Nc ≤ N

where N2,o is the prediction horizon from the initial tuning, and α = 2 if N2,o is big andα = 3 or α = 4 for small N2,o. By varying α ∈ ZZ we can increase or decrease the searchspace Sη.For the tuning of θ it is important to know the sensitivity of the criteria χ to changes in

θ. A good measure for this sensitivity is the derivative∂χ

∂θi. Note that this derivative only

gives the local sensitivity and is only valid for small changes in θ. Furthermore, the criteriaχ are not necessarily continuous functions of θ and so the derivatives may only give a localone-sided measure for the sensitivity.

Page 163: MPC

8.3. SOME PARTICULAR PARAMETER SETTINGS 163

Parameter optimization

Tuning the parameters θ and η can be formulated in two ways:

1. Feasibility problem: Find parameters θ and η such that some selected criteriaχ1, . . . , χp satisfy specific pre-described bounds:

χ1 ≤ c1...

χp ≤ cp

For example: find parameters θ and η such that the overshoot is smaller than 1.05,the rise time is smaller than 10 samples and the bandwidth of the closed loop systemis larger than π/2 (this can be written as −χbw ≤ −π/2).

2. Optimization problem: Find parameters θ and η such that criterion χo is mini-mized, subject to some selected criteria χ1, . . . , χp satisfying specific pre-describedbounds:

χ1 ≤ c1...

χp ≤ cp

For example: find parameters θ and η such that the settling time is minimized,subject to an overshoot smaller than 1.1 and actuator effort smaller than 10.

Since η has integer values, an integer feasibility/optimization problem arises. The criteriaχi(x) are nonlinear functions of η and θ, and a general solution technique does not exist.Methods like Mixed Integer Linear Programming (MILP), dynamic programming, Con-straint Logic Propagation (CLP), genetic algorithms, randomized algorithms and heuristicsearch algorithms can yield a solution. In general, these methods require large amounts ofcalculation time, because of the high complexity and they are mathematically classified asNP-hard problems. This means that the search space (the number of potential solutions)grows exponentially as a function of the problem size.

8.3 Some particular parameter settings

Predictive control is an open method, that means that many well-known controllers canbe found by solving a specific predictive control problem with special parameter settings(Soeterboek [61]). In this section we will look at some of these special cases. We consideronly the SISO case in polynomial setting, and

y(k) =q−db(q)

a(q)∆(q)∆u(k) +

c(q)

a(q)∆(q)e(k)

Page 164: MPC

164 CHAPTER 8. TUNING

where

a(q) = 1 + a1 q−1 + . . .+ ana q

−na

b(q) = b1 q−1 + . . .+ bnb q

−nb

c(q) = 1 + c1 q−1 + . . .+ cnc q

−nc

∆(q) = 1− q−1

First we define the following parameters:

na = the degree of polynomial a(q)nb = the degree of polynomial b(q)d = time-delay of the process.

Note that d ≥ 0 is the first non-zero impulse response element h(d+1) 6= 0, or equivalentlyin a state space representation d is equal to the smallest number for which C1A

dB3 6= 0.

Minimum variance control:

In a minimum variance control (MVC) setting, the following performance index is mini-mized:

J(u, k) = |y(k + d|k)− r(k + d)|2

This means that if we use the GPC performance with setting Nm = N = d, Nc = 1,P (q) = 1 and λ = 0 we obtain the minimum variance controller. An important remark isthat a MV controller only gives a stable closed loop for minimum phase plants.

Generalized minimum variance control:

In a generalized minimum variance control (GMVC) setting, the performance index isextended with a weighting on the input:

J(u, k) = |y(k + d|k)− r(k + d)|2 + λ2|∆u(k)|2

where y(k) is the output signal of an IIO-model. This means that if we use the GPCperformance, with setting Nm = N = d, Nc = d, P (q) = 1 and some λ > 0 we obtain thegeneralized minimum variance controller. A generalized minimum variance controller alsomay give a stable closed loop for nonminimum phase plants, if λ is well tuned.

Dead-beat control:

In a dead-beat control setting, the following performance index is minimized:

J(u, k) =

na+nb+d∑

j=nb+d

|y(k + j|k)− r(k + j)|2

∆u(k + j) = 0 for j ≥ na + 1

This means that if we use the GPC performance, with setting Nm = nb + d, Nc = na + 1,P (q) = 1 and N = na + nb + d and λ = 0 we obtain the dead-beat controller.

Page 165: MPC

8.3. SOME PARTICULAR PARAMETER SETTINGS 165

Mean-level control:

In a mean-level control (MLC) setting, the following performance index is minimized:

J(u, k) =

∞∑

j=1

|y(k + j|k)− r(k + j)|2

∆u(k + j) = 0 for j ≥ 1

This means that if we use the GPC performance with setting Nm = 1, Nc = 1, P (q) = 1and N −→∞. we obtain the mean-level controller.

Pole-placement control:

In a pole-placement control setting, the following performance index is minimized:

J(u, k) =

na+nb+d∑

j=nb+d

|yp(k + j|k)− r(k + j)|2

∆u(k + j) = 0 for j ≥ na + 1

where yp(k) = P (q)y(k) is the weighted output signal. This means that if we use the GPCperformance with setting Nm = nb + d, Nc = na + 1, P (q) = Pd(q) and N = na + nb + d.In state space representation, the eigenvalues of (A−B3F ) will become equal to the rootsof polynomial Pd(q).

Page 166: MPC

166 CHAPTER 8. TUNING

Page 167: MPC

Appendix A: QuadraticProgramming

In this appendix we will consider optimization problems with a quadratic object functionand linear constraints, denoted as the quadratic programming problem.

Definition 46 The quadratic programming problem:Minimize the object function

F (θ) =1

2θT H θ + fT θ

over variable θ, where H is a semi-positive definite matrix, subject to the linear inequalityconstraint

Aθ ≤ b

2 End Definition

This is the type of quadratic programming problem we have encountered in chapter 5,where we solved the standard predictive control problem.

Remark 47 : Throughout this appendix we assume H to be a symmetric matrix. If H isa non-symmetric matrix, we can define

Hnew =1

2(H +HT )

Substitution of this Hnew for H does not change the object function.

Remark 48 : The unconstrained quadratic programming problem:If the constraints are omitted and only the quadratic object function is considered, ananalytic solution exists: An extremum of the object function

F (θ) =1

2θT H θ + fT θ

is found when the gradient ∇F is equal to zero

∇F (θ) = H θ + f = 0

167

Page 168: MPC

168 Appendices

If H is non-singular the extremum is reached for

θ = −H−1 f

Because H is a positive definite matrix, the extremum will be a minimum.

There are various algorithms to solve the quadratic programming problem.

1. The modified simplex method: For small and medium-sized quadratic program-ming problems then modified simplex method is the most efficient optimization al-gorithm. It will find the optimum in a finite number of steps.

2. The interior point method: For large-sized quadratic programming problems it isbetter to use the interior-point method. A disadvantage compared to the modifiedsimplex methods is that the optimum can only be approximated. In Nesterov andNemirovsky [49] an upper bound is derived on the number of iterations that areneeded to find the optimum with a pre-described precision.

3. Other convex optimization methods: Also other convex optimization methods, likethe cutting plane algorithm [10, 22] or the ellipsoid algorithm [10, 32] may be usedto solve the quadratic programming problem.

The modified simplex method

First we define another type of quadratic programming problem that is very common inliterature:

Definition 49 The quadratic programming problem (Type 2):Minimize the object function

F (θ) =1

2θT H θ + fT θ

over variable θ, where H is a semi-positive definite matrix, subject to the linear equalityconstraint

Aθ = b

and the non-negative constraint

θ ≥ 0

2 End Definition

Lemma 50 The quadratic programming problem of definition 46 in a quadratic program-ming problem of the form of definition 49.

Page 169: MPC

169

Proof : Define

θ = θ+ − θ− ,with θ+, θ− ≥ 0

Note that θ is now uniquely decomposed into θ+ and θ−. Further introduce a ‘slack’-variable y

such that

Aθ + y = b where y ≥ 0

We define

H =

H −H 0−H H 0

0 0 0

, f =

f

−f

0

, A =[

A −A I]

, θ =

θ+

θ−y

and obtain a quadratic programming problem of definition 49:

F (θ) =1

2θT H θ + fT θ

A θ = b

θ ≥ 0

2

Consider the quadratic programming problem of definition 49 with the object function

F (θ) =1

2θT H θ + fT θ,

the linear equality constraint

Aθ = b,

and the non-negative constraint

θ ≥ 0

for a semi-positive definite matrix H .

For an inequality/equality constrained optimization problem necessary conditions for anextremum of the function F (θ) in θ, satisfying h(θ) = 0 and g(θ) ≤ 0, are given by theKuhn-Tucker conditions:There exist vectors λ and µ, such that

∇F (θ) +∇g(θ)µ+∇h(θ)λ = 0

µT g(θ) = 0

µ ≥ 0

h(θ) = 0

g(θ) ≤ 0

Page 170: MPC

170 Appendices

The Kuhn-Tucker conditions for this quadratic programming problem are given by:

H θ + AT λ− µ = −f (8.1)

θT µ = 0 (8.2)

Aθ = b (8.3)

θ , µ ≥ 0 (8.4)

We recognize equality constraints (8.3),(8.1) and a non-negative constraint (8.4), two in-gredients of a general linear programming problem. On the other hand, we miss the objectfunction, and we have an additional nonlinear equality constraint (8.2). (Note that themultiplication θT µ is nonlinear in the new parameter vector (θ, µ, λ)T .) An object functioncan be obtained by introducing two slack variables u1 and u2, and defining the problem:

Aθ + u1 = b (8.5)

H θ + AT λ− µ+ u2 = −f (8.6)

θ , µ , u1 , u2 ≥ 0 (8.7)

θT µ = 0 (8.8)

while minimizing

minθ,µ,λ,u1,u2

u1 + u2 (8.9)

Construct the matrices

A0 =

[

A 0 0 I 0H AT −I 0 I

]

b0 =

[

b−f

]

f0 =

00011

θ0 =

θλµu1

u2

(8.10)

and the general linear programming problem can be written as:

min fT0 θ0 where A0 θ0 = b0 and θ0 ≥ 0

with the additional nonlinear constraint θT µ = 0.It may be clear from the Kuhn-Tucker conditions in (8.3-8.2) that an optimum is onlyreached when u1 and u2 in (8.5-8.7) become zero. This can be achieved by using a simplexalgorithm which is modified in the sense that there is an extra condition on finding feasiblebasic solutions namely that θT µ = 0.

Note from (8.4) and (8.2) that

θT µ = θ1 µ1 + θ2 µ2 + . . .+ θn µn = 0 where θi, µi ≥ 0 for i = 1, . . . , n

Page 171: MPC

171

means that the nonlinear constraint (8.2) can be rewritten as:

θi µi = 0 for i = 1, . . . , n

and thus either θi = 0 or µi = 0. The extra feasibility condition on a basic solution nowbecomes θi µi = 0 for i = 1, . . . , n.

Remark 51 : In the above derivations we assumed b ≥ 0 and f ≤ 0. If this is not thecase, we have to change the corresponding signs of u1 and u2 in the equations (8.5) and(8.6).

We will sketch the modified simplex algorithm on the basis of an example.

Modified simplex algorithm:Consider the following type 2 quadratic programming problem:

minθ

1

2θT H θ + fT θ

A θ = b

θ ≥ 0

where

H =

2 −1 0 0−1 1 1 00 1 4 20 0 2 4

f =

0−3−20

A =

[

2 1 0 00 2 1 2

]

b =

[

44

]

Before we start the modified simplex algorithm, we check if a simple solution can be found.If we minimize the unconstrained function

minθ

1

2θT H θ + fT θ

we obtain θ =[

7 14 −4 2]T

. This solution is not feasible, because neither the equal-ity constraint Aθ = b, nor the non-negative constraint θ ≥ 0 are satisfied.

We construct the matrix A0, the vectors b0, f0 and the parameter vector θ0 according toequation (8.10). Note that θ0 is a 16× 1-vector with the elements θ is a 4× 1-vector, λ isa 2× 1-vector, µ is a 4× 1-vector, u1 is a 2× 1-vector and u2 is a 4× 1-vector.The modified simplex method starts with finding a first feasible solution. We choose B tocontain the six most-right columns of A0. We obtain the solution

θ =

0000

λ =

[

00

]

µ =

0000

u1 =

[

44

]

u2 =

0320

Page 172: MPC

172 Appendices

The solution is feasible because θ , µ , u1 , u2 ≥ 0 and θi µi = 0 for i = 1, 2, 3, 4. However,the optimum is not found yet, because u1 , u2 > 0 .After a finite number of iterations the optimum is found by selecting columns 1, 2, 5, 6, 9and 10 of the matrix A0 for the matrix B. We find the optimal solution

θ =

1200

λ =

[

01

]

µ =

0012

u1 =

0000

u2 =

0000

and the Kuhn-Tuker conditions (8.3-8.2) are satisfied for these values.

Algorithms that use a modified version of the simplex method are Wolfe’s algorithm [76],and the pivoting algorithm of Lemke [40].

The interior-point method

In this section we discuss a popular convex optimization algorithm, namely the interior-point method from Nesterov & Nemirovsky [49]. This method solves the constrained convexoptimization problem

f ∗ = f(θ∗) = minθf(θ) subject to g(θ) ≤ 0

and is based on the barrier function method. Consider the non-empty strictly feasible set

G = θ | gi(θ) < 0, i = 1, . . . , m

and define the function:

φ(θ) =

−∑m

i=1 log(−gi(θ)) θ ∈ G∞ otherwise

Note that φ is convex on G and, as θ approaches the boundary of G, the function φ will goto infinity. Now consider the unconstrained optimization problem

minθ

(

t f(θ) + φ(θ))

for some t ≥ 0. Then the value θ∗(t) that minimizes this function is denoted by

θ∗(t) = arg minθ

(

t f(θ) + φ(θ))

.

It is clear that the curve θ∗(t), which is called the central path, is always located inside theset G. The variable weight t gives the relative weight between the objective function f andthe barrier function φ, which is a measure for the constraint violation. Intuition suggeststhat θ∗(t) will converge to the optimal value θ∗ of the original problem as t −→ ∞. Note

Page 173: MPC

173

that in a minimum θ∗(t) the gradient of ψ(θ, t) = t f(θ) + φ(θ) with respect to θ is zero,so:

∇θ ψ(θ∗, t) = t∇θ f(θ∗(t)) +m∑

i=1

1

−gi(θ∗(t))∇θ gi(θ∗(t)) = 0 .

We can rewrite this as

∇θ f(θ∗(t)) +m∑

i=1

λ∗i (t)∇θ gi(θ∗(t)) = 0

where

λ∗i (t) =1

−gi(θ∗(t)) t. (8.11)

Then from the above we can derive that at the optimum the following conditions hold:

g(θ∗(t)) ≤ 0 (8.12)

λ∗i (t) ≥ 0 (8.13)

∇θ f(θ∗(t)) +m∑

i=1

λ∗i (t)∇θ gi(θ∗(t)) = 0 (8.14)

λ∗i (t)gi(θ∗(t)) = −1/t (8.15)

which proves that for t→∞ the right-hand side of the last condition will go to zero and sothe Kuhn-Tucker conditions will be satisfied. This means that θ∗(t)→ θ∗ and λ∗(t)→ λ∗

for t→∞.

From the above we can see that the central path can be regarded as a continuous defor-mation of the Kuhn-Tucker conditions.

Now define the dual function [58, 9]:

d(λ) = minθ

(

f(θ) +

m∑

i=1

λigi(θ)

)

for λ ∈ Rm

A property of this dual function is that

d(λ) ≤ f ∗ for any λ ≥ 0

Page 174: MPC

174 Appendices

and so we have

f ∗ ≥ d(λ∗(t))

≥ minθ

(

f(θ) +

m∑

i=1

λ∗i (t)gi(θ)

)

≥ f(θ∗(t)) +m∑

i=1

λ∗i (t)gi(θ∗(t)) (since θ∗(t) also minimizes the function

F defined by F (θ) = f(θ) +

m∑

i=1

λ∗i (t)gi(θ)

since ∇θF (θ∗(t)) = 0 by (8.14))

= f(θ∗(t))−m/t (by (8.11))

and thus

f(θ∗(t)) ≥ f ∗ ≥ f(θ∗(t))−m/t

It is clear that m/t is an upper bound for the distance between the computed f(θ∗(t)) andthe optimum f ∗. If we want a desired accuracy ε > 0, defined by

| f ∗ − f(θ∗(t)) | ≤ ε

then choosing t = m/ε gives us one unconstrained minimization problem, with a solutionθ∗(m/ε) that satisfies:

| f ∗ − f(θ∗(m/ε)) | ≤ ε .

Algorithms to solve unconstrained minimization problems are discussed in [58].The approach presented above works, but can be very slow. A better way is to increaset in steps to the desired value m/ε and use each intermediate solution as a starting valuefor the next. This algorithm is called the sequential unconstrained minimization technique(SUMT) and is described by the following steps

Given: θ ∈ G, t > 0 and a tolerance ε

Step 1: Compute θ∗(t) starting from θ: θ∗(t) = arg minθ

(

t f(θ) + φ(θ))

.

Step 2: Set θ = θ∗(t).

Step 3: If m/t ≤ ε, return θ and stop.

Step 4: Increase t and goto step 1.

This algorithm generates a sequence of points on the central path and solves the constrainedoptimization problem via a sequence of unconstrained minimizations (often quasi-Newton

Page 175: MPC

175

methods). A simple update rule for t is used, so t(k + 1) = η t(k), where η is typicallybetween 10 and 100.The steps 1–4 are called the outer iteration and step 1 involves an inner iteration (e.g., theNewton steps). A trade-off has to be made: a smaller η means fewer inner iterations tocompute θk+1 from θk, but more outer iterations.In Nesterov and Nemirovsky [49] an upper bound is derived on the number of iterationsthat are needed for an optimization using the interior-point method. Also tuning rules forthe choice of η are given in their book.

Page 176: MPC

176 Appendices

Page 177: MPC

Appendix B: Basic State SpaceOperations

Cascade:

G(q) −→ G(q) = G1(q) ·G2(q)

G1 ≡[

A1 B1

C1 D1

]

G2 ≡[

A2 B2

C2 D2

]

G ≡[

A1 B1

C1 D1

]

·[

A2 B2

C2 D2

]

=

A1 B1C2 B1D2

0 A2 B2

C1 D1C2 D1D2

=

A2 0 B2

B1C2 A1 B1D2

D1C2 C1 D1D2

Parallel:

G(q) −→ G(q) = G1(q) +G2(q)

177

Page 178: MPC

178 Appendices

G1 ≡[

A1 B1

C1 D1

]

G2 ≡[

A2 B2

C2 D2

]

G ≡[

A1 B1

C1 D1

]

+

[

A2 B2

C2 D2

]

=

A1 0 B1

0 A2 B2

C1 C2 D1 +D2

Change of variables:

x −→ x = T x T is invertible

u −→ u = P u P is invertible

y −→ y = Ry

G ≡[

A BC D

]

G ≡[

A B

C D

]

=

[

TAT−1 TBP−1

RCT−1 RDP−1

]

State feedback:

u −→ u+ F x

G ≡[

A BC D

]

G ≡[

A B

C D

]

=

[

A+BF BC +DF D

]

Page 179: MPC

179

Output injection:

x(k + 1) = Ax(k) +Bu(k) −→ x(k + 1) = Ax(k) +Bu(k) +Hy(k)

G ≡[

A BC D

]

G ≡[

A B

C D

]

=

[

A+HC B +HDC D

]

Transpose:

G(q) −→ G(q) = GT (q)

G ≡[

A BC D

]

G ≡[

AT CT

BT DT

]

Left (right) Inversion:

G(q) −→ G(q) = G+(q)

G+ is a left (right) inverse of G.

G ≡[

A BC D

]

G ≡[

A−BD+C BD+

−D+C D+

]

where D+ is the left (right) inverse of D.For G(q) is square, we obtain G+(q) = G−1(q) and D+ = D−1.

Page 180: MPC

180 Appendices

Page 181: MPC

Appendix C: Some results fromlinear algebra

Left inverse and Left complement:

Consider a full-column rank matrix M ∈ Rm×n for m ≥ n. Let the singular value decom-

postion of M be given by:

M =[

U1 U2

]

[

Σ0

]

V T

The left inverse is defined as

M ℓ = V Σ−1 UT1

and the left complement is defined as

M ℓ⊥ = UT2

The left-inverse and left-complement have the following properties:

M ℓM = I

M ℓ⊥M = 0

Right inverse and Right complement:

Consider a full-row rank matrixM ∈ Rm×n form ≤ n. Let the singular value decompostion

of M be given by:

M = U[

Σ 0]

[

V T1

V T2

]

The right inverse is defined as

M r = V1 Σ−1 UT

and the right complement is defined as

M r⊥ = V2

The right-inverse and right-complement have the following properties:

MM r = I

M M r⊥ = 0

181

Page 182: MPC

182 Appendices

Singular value decomposition

If A ∈ Rm×n then there exist orthogonal matrices

U =[

u1 · · · um]

∈ Rm×m

and

V =[

v1 · · · vn]

∈ Rn×n

such that

UTAV = Σ

where

Σ =

σ1 0 · · · 0. . .

......

σm 0 · · · 0

for m ≤ n

Σ =

σ1

. . .

σn0 · · · 0...

...0 · · · 0

for m ≥ n

where σ1 ≥ σ2 ≥ . . . ≥ σp ≥ 0, p = min(m,n). This means that

A = UΣV T

This decomposition of A is known as the singular value decomposition of A. The σi areknown as the singular values of A (and are usually arranged in decending order).

Property:U contains the eigenvectors of AAT . V contains the eigenvectors of ATA. Σ is a diagonalmatrix whose entries are the nonnegative square roots of the eigenvalues ATA (for m ≥ n)or AAT (for m ≤ n).

Property:Let σmin and σmax be the smallest and largest singular value of a square matrix A. Furtherlet λi denote the eigenvalues of A. Then there holds:

σmin ≤ |λi| ≤ σmax , ∀i

Page 183: MPC

Appendix D: Model descriptions

D.1 Impulse and step response models

D.1.1. Model descriptions

Let gm and sm denote the impulse response parameters and the step response parametersof the stable system Go(q), respectively. Then

sm =m∑

j=1

gj and gm = sm − sm−1 , m ∈ 1, 2, . . .

The transfer function Go(q) is found by

Go(q) =

∞∑

m=1

gm q−m =

∞∑

m=1

sm q−m(1− q−1) (8.16)

In the same way, let fm and tm denote the impulse response parameters and the stepresponse parameters of the stable disturbance model Fo(q), respectively. Then

tm =

m∑

j=0

fj and fm = tm − tm−1 , m ∈ 0, 1, 2, . . .

The transfer function Fo(q) is found by

Fo(q) =

∞∑

m=0

fm q−m =

∞∑

m=0

tm q−m(1− q−1) (8.17)

The truncated impulse response model is defined by

y(k) =n∑

m=1

gm u(k −m) +n∑

m=0

fm do(k −m) + eo(k)

where n is an integer number such that gm ≈ 0 and fm ≈ 0 for all m ≥ n.This is an IO-model in which the disturbance do(k) is known and noise signal eo(k) ischosen as ZMWN.

183

Page 184: MPC

184 Appendices

The truncated step response model is defined by

y(k) =

n−1∑

m=1

sm ∆u(k −m) + sn u(k − n) +

n−1∑

m=0

tm di(k −m) + tn do(k − n) + eo(k)

This is a IIO-model in which di(k) = ∆do(k) = do(k) − do(k − 1) is the disturbanceincrement signal and the noise increment signal ei(k) = ∆eo(k) = eo(k) − eo(k − 1) ischosen as ZMWN to account for an offset at the process output, so

eo(k) = ∆−1(q)ei(k)

From impulse response model to state space model

(Lee et al. [38]) Let

Go(q) = g1q−1 + g2q

−2 + . . .+ gnq−n

Fo(q) = f0 + f1q−1 + f2q

−2 + . . .+ fnq−n

Ho(q) = 1

where gi are the impulse response parameters of the system, then the state space matricesare given by:

Ao =

0 I 0 . . . 00 0 I 0...

.... . .

...

0 0 0. . . I

0 0 0 . . . 0

Ko =

00...0

Lo =

f1

f2...fn

Bo =

g1

g2...gn

Co =[

I 0 0 . . . 0]

DH = I DF = f0

This IO system can be translated into an IIO model using the formulas from section 2.1:

Ai =

I I 0 . . . 0 00 0 I 0 0...

.... . .

...0 0 0 I 00 0 0 . . . 0 I0 0 0 . . . 0 0

Ki =

I0...0

Li =

f0

f1

f2...fn

Bi =

0g1

g2...gn

Ci =[

I I 0 . . . 0]

DH = I DF = f0

Page 185: MPC

185

-

gn

?

?e - q−1 -

-

fn

6

6

gn−1

?

?e-

fn−1

6

6

· · ·

· · ·

· · ·

-

g2

?

?

f2

6

6e- q−1 -

g1

?

?

f1

6

6e- q−1 -

f0

6

6e? -

u

do

xn x3 x2 x1 y

eo

Figure 8.5: IO state space representation of impulse response model-

gn

?

?

-

fn

6

6e- q−1 -

gn−1

?

?

fn−1

6

6e-

· · ·

· · ·

· · ·

-

g2

?

?

f2

6

6e- q−1 -

g1

?

?

f1

6

6e- q−1 - e

?

@@@R

f0

6

6-

q−1

∆u

di

xn+1 x4 x3 x2

x1

y

eo

Figure 8.6: IIO state space representation of impulse response model

From step response model to state space model

(Lee et al. [38]) Let

Gi(q) = s1q−1 + s2q

−2 + . . .+ sn−1q−n+1 + snq

−n + snq−n−1 + snq

−n−2 + . . .

= s1q−1 + s2q

−2 + . . .+ sn−1q−n+1 + sn

q−n

1− q−1=

= g1q−1

1− q−1+ g2

q−2

1− q−1+ . . .+ gn

q−n

1− q−1

Fi(q) = t0 + t1q−1 + t2q

−2 + . . .+ tn−1q−n+1 + tnq

−n + tnq−n−1 + tnq

−n−2 + . . .

= t0 + t1q−1 + t2q

−2 + . . .+ tn−1q−n+1 + tn

q−n

1− q−1

= f01

1− q−1+ f1

q−1

1− q−1+ f2

q−2

1− q−1+ . . .+ fn

q−n

1− q−1

Hi(q) =I

(1− q−1)

Page 186: MPC

186 Appendices

where si are the step response parameters of the system, then the state space matrices aregiven by:

Ai =

0 I 0 . . . 0 00 0 I 0 0...

.... . .

...0 0 0 I 00 0 0 . . . 0 I0 0 0 . . . 0 I

Ki =

II...I

Li =

t1t2...tn

Bi =

s1

s2...sn

Ci =[

I 0 0 . . . 0]

DH = I DF = t0 = f0

-

-

-

sn

tn

?

-6

6

e- q−1 -?

sn−1

tn−1

6

6

?

?e- q−1 -

sn−2

tn−2

6

6

?

?e-

· · ·

· · ·

· · ·

· · ·

-

s1

t1

6

6

?

?e- q−1 - e

6-

∆u

di

ei

xn xn−1 x2 x1 y(k)

Figure 8.7: State space representation of step response model

Prediction using step response models

prediction for infinite-length step response model:

The step response model has been derived in section 2.2.2 and is given by:

y(k) =∞∑

m=1

sm ∆u(k −m) +∞∑

m=0

tm di(k −m) +∞∑

m=0

ei(k −m) (8.18)

where y is the output signal, ∆u is the increment of the input signal u, di is the incrementof the (known) disturbance signal do, and ei, which is the increment of the output noisesignal eo, is assumed to be zero-mean white noise.

Note that the output signal y(k) in equation (8.18) is build up with all past values of theinput, disturbance and noise signals. We introduce a signal y0(k|k− ℓ), ℓ > 0, which gives

Page 187: MPC

187

the value of y(k) based on the inputs, disturbances and noise signals up to time k − ℓ,assuming future values to be zero, so ∆u(t) = 0, di(t) = 0 and ei(t) = 0 for t > k − ℓ:

y0(k+j|k−ℓ)=∞∑

m=0

sj+ℓ+m ∆u(k−ℓ−m)+∞∑

m=0

tj+ℓ+m di(k−ℓ−m)+∞∑

m=0

ei(k−ℓ−m) (8.19)

Based on the above definition it easy to derive a recursive expression for y0:

y0(k + j|k) =

∞∑

m=0

sj+m ∆u(k−m) +

∞∑

m=0

tj+m di(k−m) +

∞∑

m=0

ei(k−m)

=∞∑

m=1

sj+m ∆u(k−m) +∞∑

m=1

tj+m di(k−m)

+∞∑

m=1

ei(k−m) + sj ∆u(k) + tj di(k) + ei(k)

= y0(k + j|k − 1) + sj ∆u(k) + tj di(k) + ei(k)

Future values of y can be derived as follows:

y(k + j) =

∞∑

m=1

sm ∆u(k + j −m) +

∞∑

m=0

tm di(k + j −m) +

∞∑

m=0

ei(k + j −m)

=

∞∑

m=1

sj+m ∆u(k −m) +

∞∑

m=1

tj+m di(k −m) +

∞∑

m=1

ei(k −m)

+

j∑

m=1

sm ∆u(k + j −m) +

j∑

m=0

tm di(k + j −m) +

j∑

m=0

ei(k + j −m)

= y0(k + j|k − 1)

+

j∑

m=1

sm ∆u(k + j −m) +

j∑

m=0

tm di(k + j −m) +

j∑

m=0

ei(k + j −m)

Suppose we are at time k, then we only have knowlede up to time k, so ei(k + j), j > 0 isunknown. The best estimate we can make of the zero-mean white noise signal for futuretime instants is (see also previous section):

ei(k + j|k) = 0 , for j > 0

If we assume ∆u(ℓ) and di(ℓ) to be known in the interval k ≤ ℓ ≤ k + j we obtain theprediction of y(k + j), based on knowledge until time k, and denoted as y(k + j|k):

y(k + j|k) = y0(k + j|k − 1) +

j∑

m=1

sm ∆u(k + j −m) +

j∑

m=0

tm di(k + j −m) + ei(k)

Page 188: MPC

188 Appendices

prediction for truncated step response model:

So far we derived the following relations:

y0(k + j|k) = y0(k + j|k − 1) + sj ∆u(k) + tj di(k) + ei(k)

y(k) = y0(k|k − 1) + t0 di(k) + ei(k)

y(k + j|k) = y0(k + j|k − 1) +

j∑

m=1

sm ∆u(k+j−m) +

j∑

m=0

tm di(k+j−m) + ei(k)

In section 2.2.2 the truncated step response model was introduced. For a model withstep-response length n there holds:

sm = sn for m > n

Using this property we can derive from 8.19 for j ≥ 0:

y0(k+n+j|k − 1) =

∞∑

m=1

sn+m+j ∆u(k −m) +

∞∑

m=1

tn+m+j di(k−m) +

∞∑

m=1

ei(k−m)

=∞∑

m=1

sn ∆u(k−m) +∞∑

m=1

tn di(k−m) +∞∑

m=1

ei(k−m)

= y0(k+n−1|k − 1)

and so y0(k+n+j|k−1) = y0(k+n−1|k−1) for j ≥ 0. This means that for computation ofy(k+n+j|k) where j ≥ 0, so when the prediction is beyond the length of the step-responsewe can use the equation:

y(k + n + j|k) = y0(k + n− 1|k − 1) +

n+j∑

m=1

sm ∆u(k + n+ j −m)

+

n+j∑

m=0

tm di(k + n + j −m) + ei(k)

Matrix notation

From the above derivation we found that computation of y0(k+j|k−1) for j = 0, . . . , n−1is sufficient to make predictions for all j ≥ 0. We obtain the equations:

y0(k+j|k) = y0(k+j|k−!1) + sj∆u(k) + tjdi(k) + ei(k) for 0 ≤ j ≤ n−1

y0(k+j|k) = y0(k+n−1|k−1) + sn∆u(k) + tjdi(k) + ei(k) for j ≥ n

y(k|k) = y0(k|k−1) + t0di(k) + ei(k)

(8.20)

Page 189: MPC

189

In matrix form:

y0(k+1|k)y0(k+2|k)

...y0(k+n−1|k)y0(k+n|k)

=

y0(k+1|k−1)y0(k+2|k−1)

...y0(k+n−1|k−1)y0(k+n−1|k−1)

+

s1∆u(k)s2∆u(k)

...sn−1∆u(k)sn∆u(k)

+

t1di(k)t2di(k)

...tn−1di(k)tndi(k)

+

ei(k)ei(k)ei(k)

...ei(k)

y(k|k) = y0(k|k − 1) + t0di(k) + ei(k)

Define the following signal vector for j ≥ 0, ℓ ≥ 0:

y0(k + j|k − ℓ) =

y0(k + j + 1|k − ℓ)y0(k + j + 2|k − ℓ)

...y0(k + j + n− 1|k − ℓ)y0(k + j + n|k − ℓ)

and matrices

M =

0 I 0 · · · 0 00 0 I 0 0...

......

. . ....

0 0 0 I 00 0 0 0 I0 0 0 · · · 0 I

S =

s1

s2...

sn−1

sn

T =

t1t2...

tn−1

tn

C =[

I 0 · · · 0]

Then equations (8.20) can be written as:

y0(k + 1|k) = M y0(k|k − 1) + S∆u(k) + Tdi(k) + IIn ei(k) (8.21)

y(k) = C y0(k|k − 1) + todi(k) + ei(k) (8.22)

To make predictions y(k + j|k), we can extend (8.22) over the prediction horizon N . Inmatrix form:

y(k+1|k)y(k+2|k)

...y(k+n−1|k)y(k+n|k)

...y(k+N |k)

=

y0(k+1|k−1)y0(k+2|k−1)

...y0(k+n−1|k−1)y0(k+n−1|k−1)

...y0(k+n−1|k−1)

+

s1∆u(k)s2∆u(k)+s1∆u(k+1)

...sn−1∆u(k)+· · ·+s1∆u(k+n−2)sn∆u(k)+· · ·+s1∆u(k+n−1)

...sN∆u(k)+· · ·+s1∆u(k+N−1)

+

Page 190: MPC

190 Appendices

+

t1di(k)t2di(k)+t1di(k+1)

...tn−1di(k)+· · ·+t1di(k+n−2)tndi(k)+· · ·+t1di(k+n−1)

...tNdi(k)+· · ·+t1di(k+N−1)

+

ei(k)ei(k)

...ei(k)ei(k)

...ei(k)

Define the following signal vectors:

z(k) =

y(k+1|k)y(k+2|k)

...y(k+N−1|k)y(k+N |k)

u(k) =

∆u(k)∆u(k+1)

...∆u(k+N−2)∆u(k+N−1)

w(k) =

di(k)di(k+1)

...di(k+N−2)di(k+N−1)

and matrices

M =

0 I 0 · · · 0 00 0 I 0 0...

......

. . ....

0 0 0 I 00 0 0 0 I...

......

......

0 0 0 · · · 0 I

S =

s1 0... 0

s2 s1 0...

. . ....

sN sN−1 s1

T =

t1 0... 0

t2 t1 0...

. . ....

tN tN−1 t1

(Note that sm = sn and tm = tn for m > n.)Now the prediction model can be written as:

z(k) = M y0(k) + Su(k) + T w(k) + IIN e(k) (8.23)

Relation to state space model

The model derived in equations (8.21), (8.22) and (8.23) are similar to the state spacemodel derived in the previous section. By choosing

x(k) = y0(k) z(k) = y(k) e(k) = ei(k) w(k) = di(k) v(k) = ∆u(k)

A = M B1 = IIn B2 = T B3 = S

Page 191: MPC

191

C1 = C D11 = I D12 = t0

C2 = M D21 = IIN D22 = T D23 = S

we have obtain the following prediction model:

x(k + 1) = Ax(k) +B1e(k) +B2w(k) +B3v(k)

y(k) = C1 x(k) +D11 e(k) +D12w(k)

z(k) = C2 x(k) + D21e(k) + D22w(k) + D23v(k)

D.2 Polynomial models

D.2.1. Model description

Consider the SISO IO polynomial model:

Go(q) =bo(q)

ao(q)Fo(q) =

fo(q)

ao(q)Ho(q) =

co(q)

ao(q)

where ao(q), bo(q) and co(q) are polynomials in the operator q−1

ao(q) = 1 + ao,1 q−1 + . . .+ ao,na q

−na

bo(q) = bo,1 q−1 + . . .+ bo,nb q

−nb (8.24)

co(q) = 1 + co,1 q−1 + . . .+ co,nc q

−nc

fo(q) = fo,0 + fo,1 q−1 + . . .+ fo,nc q

−nf

The difference equation corresponding to the IO-model is given by the controlled autore-gressive moving average (CARMA) model:

ao(q) y(k) = bo(q) u(k) + fo(q) do(k) + co(q) eo(k)

in which eo(k) is chosen as ZMWN.

Now consider the SISO IIO polynomial model (compare eq. 2.13):

Gi(q) =bi(q)

ai(q)Fi(q) =

fi(q)

ai(q)Hi(q) =

ci(q)

ai(q)

where ai(q) = ao(q)∆(q) = ao(q)(1 − q−1), bi(q) = bo(q), ci(q) = co(q), and fi(q) = fo(q),

Page 192: MPC

192 Appendices

so

ai(q) = 1 + ai,1 q−1 + . . .+ ai,n+1 q

−n−1

= (1− q−1)(1 + ao,1 q−1 + . . .+ ao,n q

−n)

bi(q) = bi,1 q−1 + . . .+ bi,n q

−n

= bo,1 q−1 + . . .+ bo,n q

−n (8.25)

ci(q) = 1 + ci,1 q−1 + . . .+ ci,n q

−n

= 1 + co,1 q−1 + . . .+ co,n q

−n

fi(q) = fi,0 + fi,1 q−1 + . . .+ fi,n q

−n

= fo,0 + fo,1 q−1 + . . .+ fo,n q

−n

The difference equation corresponding to the IIO-model is given by the controlled autore-gressive integrated moving average (CARIMA) model:

ai(q) y(k) = bi(q) ∆u(k) + fi(q) di(k) + ci(q) ei(k)

in which di(k) = ∆(q)do(k) and ei(k) is chosen as ZMWN.

From IO polynomial model to state space model

(Kailath [33]) Let

Go(q) =bo(q)

ao(q)Fo(q) =

fo(q)

ao(q)Ho(q) =

co(q)

ao(q)

where ao(q), bo(q), fo(q) and co(q) are given in (8.24). Then the state space matrices aregiven by:

Ao =

−ao,1 1 0 . . . 0−ao,2 0 1 0

......

. . ....

−ao,n−1 0 0. . . 1

−ao,n 0 0 . . . 0

Bo =

bo,1bo,2...

bo,n−1

bo,n

(8.26)

Co =[

1 0 0 . . . 0]

DH = I DF = fo,0 (8.27)

Lo =

fo,1 − f0,oao,1fo,2 − f0,oao,2

...fo,n−1 − f0,oao,n−1

fo,n − f0,oao,n

Ko =

co,1 − ao,1co,2 − ao,2

...co,n−1 − ao,n−1

co,n − ao,n

(8.28)

Page 193: MPC

193

-

bo,n

−ao,n

co,n

fo,n

?

6

@@I

?

@@R e

6

- q−1 -

· · ·· · ·

· · ·

· · ·· · ·

-

bo,2

−ao,2

co,2

fo,2

?

6

@@I

?

@@R e

6

- q−1 -

bo,1

−ao,1

co,1

fo,1

?

6

@@I

?

@@R e

6

- q−1 - -e?

eo

do

u

xn x3 x2 x1 y

Figure 8.8: State space representation of IO polynomial model

A state space realization of a polynomial model is not unique. Any (linear nonsingular)state transformation gives a valid alternative. The above realization is called the observercanonical form (Kailath [33]).We can also translate the IO polynomial model into an IIO state space model using thetransformation formulas. We obtain the state space matrices:

Ai =

1 1 0 0 . . . 00 −ao,1 1 0 . . . 00 −ao,2 0 1 0...

......

. . ....

0 −ao,n−1 0 0. . . 1

0 −ao,n 0 0 . . . 0

Bi =

0b0,1bo,2...

bo,n−1

bo,n

(8.29)

Ci =[

1 1 0 0 . . . 0]

DH = I DF = fo,0 (8.30)

Li =

0fo,1 − f0,oao,1fo,2 − f0,oao,2

...fo,n−1 − f0,oao,n−1

fo,n − f0,oao,n

Ki =

1co,1 − ao,1co,2 − ao,2

...co,n−1 − ao,n−1

co,n − ao,n

(8.31)

Example 52 : IO State space representation of IO polynomial model

In this example we show how to find the state space realization of an IO polynomial model.Consider the second order system

y(k) = Go(q) u(k) + Fo(q) do(k) +Ho(q) eo(k)

Page 194: MPC

194 Appendices

where y(k) is the proces output, u(k) is the proces input, do(k) is a known disturbancesignal and eo(k) is assumed to be ZMWN and

Go(q) =q−1

(1− 0.5q−1)(1− 0.2q−1)Fo(q) =

0.1q−1

1− 0.2q−1Ho(q) =

1 + 0.5q−1

1− 0.5q−1

To use the derived formulas, we have to give Go(q), Ho(q) and Fo(q) the common denom-inator (1− 0.5q−1)(1− 0.2q−1) = (1− 0.7q−1 + 0.1q−2):

Fo(q) =(0.1q−1)(1− 0.5q−1)

(1− 0.2q−1)(1− 0.5q−1)=

0.1q−1 − 0.05q−2

(1− 0.7q−1 + 0.1q−2)

Ho(q) =(1 + 0.5q−1)(1− 0.2q−1)

(1− 0.5q−1)(1− 0.2q−1)=

1 + 0.3q−1 − 0.1q−2

(1− 0.7q−1 + 0.1q−2)

A state-space representation for this example is now given by (8.26)-(8.28):

Ao =

[

0.7 1−0.1 0

]

Bo =

[

10

]

Co =[

1 0]

Lo =

[

0.1−0.05

]

Ko =

[

1−0.2

]

DH = 1 DF = 0

and so

xo1(k + 1) = 0.7 xo1(k) + xo2(k) + eo(k) + 0.1 do(k) + u(k)

xo2(k + 1) = −0.1 xo1(k)− 0.2 eo(k)− 0.05 do(k)

y(k) = xo1(k) + eo(k)

Example 53 : IIO State space representation of IO polynomial model

In this example we show how to find the IIO state space realization of the IO polynomialsystem of example 52 using (8.29)-(8.31):

Ai =

1 1 00 0.7 10 −0.1 0

Bi =

010

Ci =[

1 1 0]

Li =

00.1−0.05

Ki =

11−0.2

DH = 1 DF = 0

and so

xi1(k + 1) = xi1(k) + xi2(k) + ei(k)

xi2(k + 1) = 0.7 xi2(k) + xi3(k) + ei(k) + 0.1 di(k) + ∆u(k)

xi3(k + 1) = −0.1 xi2(k)− 0.2 ei(k)− 0.05 di(k)

y(k) = xi1(k) + xi2(k) + ei(k)

Page 195: MPC

195

From IIO polynomial model to state space model

(Kailath [33]) Let

Gi(q) =bi(q)

ai(q)Fi(q) =

fi(q)

ai(q)Hi(q) =

ci(q)

ai(q)

where ai(q), bi(q) and ci(q) are given in (8.25). Then the state space matrices are givenby:

Ai =

−ai,1 1 0 . . . 0−ai,2 0 1 0

......

. . ....

−ai,n 0 0. . . 1

−ai,n+1 0 0 . . . 0

Bi =

bi,1bi,2...bi,n0

(8.32)

Ci =[

1 0 0 . . . 0]

(8.33)

Li =

fi,1fi,2...fi,n0

Ki =

ci,1 − ai,1ci,2 − ai,2

...ci,n − ai,n−ai,n+1

(8.34)

Example 54 : IIO State space representation of IIO polynomial model

In this example we show how to find the state space realization of the system of example52, rewritten as an IIO polynomial model: We consider the system:

y(k) = Gi(q) ∆u(k) + Fi(q) di(k) +Hi(q) ei(k)

where y(k) is the proces output, ∆u(k) is the proces increment input, di(k) is the incrementdisturbance signal and e(k) is assumed to be integrated ZMWN and

Gi(q) =q−1

(1− q−1)(1− 0.5q−1)(1− 0.2q−1)

=q−1

(1− 1.7q−1 + 0.8q−2 − 0.1q−3)

Fi(q) =0.1q−1(1− 0.5q−1)

(1− q−1)(1− 0.5q−1)(1− 0.2q−1)

=0.1q−1 − 0.05q−2

(1− 1.7q−1 + 0.8q−2 − 0.1q−3)

Hi(q) =(1 + 0.5q−1)(1− 0.2q−1)

(1− q−1)(1− 0.5q−1)(1− 0.2q−1)

=1 + 0.3q−1 − 0.1q−2

(1− 1.7q−1 + 0.8q−2 − 0.1q−3)

Page 196: MPC

196 Appendices

A state-space representation for this example is now given by (8.33)-(8.34):

Ai =

1.7 1 0−0.8 0 10.1 0 0

Bi =

100

Ci =[

1 0 0]

Li =

0.1−0.05

0

Ki =

2.0−0.90.1

DH = 1 DF = 0

and so

xi1(k + 1) = 1.7xi1(k) + xi2(k) + 2.0ei(k) + 0.1di(k) + ∆u(k)

xi2(k + 1) = −0.8xi1(k) + xi3(k)− 0.9ei(k)− 0.05di(k)

xi3(k + 1) = 0.1xi1(k) + 0.1ei(k)

y(k) = xi1(k) + ei(k)

Clearly, the IIO state space representation in example 3 is different from the IIO state spacerepresentation in example 2. By denoting the state space matrices of example 2 with a hat( so Ai, Bi, Ci, Li, Ki,DH ,DF ), the relation between the two state space representationsis given by:

Ai = T−1AiT Ci = CiT DH = DH DF = DF

Bi = T−1Bi Li = T−1Li Ki = T−1Ki

where state transformation matrix T is given by:

T =

1 1 0−0.7 0 10.1 0 0

Prediction using polynomial models

Diophantine equation and making predictions

Consider the polynomial model

u1(k) =c(q)

a(q)u2(k)

where

a(q) = 1 + a1 q−1 + . . .+ ana q

−na

c(q) = c0 + c1 q−1 + . . .+ cnc q

−nc

Page 197: MPC

197

Each set of polynomial functions a(q), c(q) together with a positive integer j satifies a setof Diophantine equations

c(q) = Mj(q) a(q) + q−jLj(q) (8.35)

where

Mj(q) = mj,0 +mj,1 q−1 + . . .+mj,j−1 q

−j+1

Lj(q) = ℓj,0 + ℓj,1 q−1 + . . .+ ℓj,na q

−na

Remark 55 : Diophantine equations are standard in the theory of prediction with polyno-mial models. An algorithm for solving these equations is given in appendix B of Soeterboek[61].

When making a prediction of u1(k + j) for j > 0 we are interested how u1(k + j) dependson future values of u2(k + i), 0 < i ≤ j and present and past values of u2(k − i), i ≥ 0.Using Diophantine equation (8.35) we derive (Clarke et al.[14][15], Bitmead et al.[6]):

u1(k + j) =c(q)

a(q)u2(k + j)

= Mj(q)u2(k + j) + q−jLj(q)

a(q)u2(k + j)

= Mj(q)u2(k + j) +Lj(q)

a(q)u2(k)

This means that u1(k + j) can be written as

u1(k + j) = u1,future(k + j) + u1,past(k + j)

where the factor

u1,future(k + j) = Mj(q)u2(k + j) = mj,0u2(k + j) + . . .+mj,j−1 u2(k + 1)

only consist of future values of u2(k + i), 1 ≤ i ≤ j, and the second term

u1,past(k + j) =Lj(q)

a(q)u2(k)

only present and past values of u2(k − i), i ≥ 0.

Prediction using polynomial models

Let model (3.1) be given in polynomial form as:

a(q) y(k) = c(q) e(k) + f1(q)w1(k) + f2(q)w2(k) + b(q) v(k) (8.36)

n(q) z(k) = h(q) e(k) +m1(q)w1(k) +m2(q)w2(k) + g(q) v(k) (8.37)

Page 198: MPC

198 Appendices

where w1 and w2 usually corresponds to the reference signal r(k) and the known distrubancesignal d(k), respectively. In the sequel of this section we will use

f(q)w(q) =[

f1(q) f2(q)]

[

w1(k)w2(k)

]

(8.38)

m(q)w(q) =[

m1(q) m2(q)]

[

w1(k)w2(k)

]

(8.39)

as an easier notation.

To make predictions of future output signals of CARIMA models one first needs to solvethe following Diophantine equation

h(q) = Ej(q)n(q) + q−jFj(q) (8.40)

Using (8.37) and (8.40), we derive

z(k + j) =h(q)

n(q)e(k + j) +

m(q)

n(q)w(k + j) +

g(q)

n(q)v(k + j)

= Ej(q) e(k + j) +q−jFj(q)

n(q)e(k + j) +

m(q)

n(q)w(k + j) +

g(q)

n(q)v(k + j)

= Ej(q) e(k + j) +Fj(q)

n(q)e(k) +

m(q)

n(q)w(k + j) +

g(q)

n(q)v(k + j) (8.41)

From (8.36) we derive

e(k) =a(q)

c(q)y(k)− f(q)

c(q)w(k)− b(q)

c(q)v(k)

Substitution in (8.41) yields:

z(k + j) = Ej(q) e(k + j) +Fj(q)

n(q)e(k) +

m(q)

n(q)w(k + j) +

g(q)

n(q)v(k + j)

= Ej(q) e(k + j) +Fj(q)a(q)

n(q)c(q)y(k)− Fj(q)f(q)

n(q)c(q)w(k)− Fj(q)b(q)

n(q)c(q)v(k) +

+m(q)

n(q)w(k + j) +

g(q)

n(q)v(k + j)

= Ej(q) e(k + j) +Fj(q)a(q)

n(q)c(q)y(k) +

(

m(q)

n(q)− q−jFj(q)f(q)

n(q)c(q)

)

w(k + j) +

+

(

g(q)

n(q)− q−jFj(q)b(q)

n(q)c(q)

)

v(k + j)

= Ej(q) e(k + j) +Fj(q)a(q)

n(q)c(q)y(k) +

m(q)

n(q)c(q)w(k + j) +

g(q)

n(q)c(q)v(k + j)

Page 199: MPC

199

where

m(q) = m(q)c(q)− q−jFj(q)f(q)

g(q) = g(q)c(q)− q−jFj(q)b(q)

Finally solve the Diophantine equation:

qg(q) = Φj(q)n(q) c(q) + q−jΓj(q) (8.42)

Then:

z(k + j) = Ej(q) e(k + j) +Fj(q)a(q)

n(q)c(q)y(k) +

m(q)

n(q)c(q)w(k + j) +

g(q)

n(q)c(q)v(k + j)

= Ej(q) e(k + j) +Fj(q)a(q)

n(q)c(q)y(k) +

m(q)

n(q)c(q)w(k + j) +

+q−1Γ(q)

n(q)c(q)v(k) + q−1Φj(q) v(k + j)

= Ej(q) e(k + j) +Fj(q)a(q)

n(q)c(q)y(k) +

m(q)

n(q)c(q)w(k + j) +

+Γ(q)

n(q)c(q)v(k − 1) + Φj(q) v(k + j − 1)

Using the fact that the prediction e(k + j|k) = 0 for j > 0 the first term vanishes and theoptimal prediction z(k + j) for j > 0 is given by:

z(k + j) =Fj(q)a(q)

n(q)c(q)y(k) +

(

m(q)

n(q)c(q)

)

w(k + j) +

+

(

Γ(q)

n(q)c(q)

)

v(k − 1) + Φj(q) v(k + j − 1)

= Fj(q)a(q) yf(k) + m(q)wf(k + j) + Γ(q) vf(k − 1) + Φj(q) v(k + j − 1)

where yf , wf and vf are the filtered signals

yf(k) =1

n(q)c(q)y(k)

wf(k) =1

n(q)c(q)w(k)

vf(k) =1

n(q)c(q)v(k)

The free-run response is now given by Fj(q)a(q) yf(k) + m(q)wf(k + j) + Γj(q) v

f(k − 1).which is the output response if all future input signals are taken zero. The last termΦj v(k+ j − 1) accounts for the influence of the future input signals v(k), . . . , v(k+ j− 1).

The prediction of the performance signal can now be given as:

Page 200: MPC

200 Appendices

z(k) =

F0(q) yf(k) + m0(q)w

f(k) + Γ0(q) vf(k−1) + Φ0(q) v(k)

F1(q) yf(k) + m1(q)w

f(k+1) + Γ1(q) vf(k−1) + Φ1(q) v(k+1)

...FN−1(q) y

f(k) + mN−1(q)wf(k+N−1) + ΓN−1(q) v

f(k−1) + ΦN−1(q) v(k+N−1)

= z0(k) + Dvz v(k)

The free response vector z0 and the predictor matrix Dvz will be equal to z0 and D3,respectively, in the case of a state-space model.

Relation to state-space model:

Consider the above system a(q) u1(k + j) = c(q) u2(k + j) in state-space representation,where A,B,C,D are given by the controller canonical form:

A =

−a1 −a2 · · · −an−1 −an1 0 · · · 0 00 1 0 0...

.... . .

...0 0 1 0

B =

100...0

C =[

c1 − coa1 c2 − coa2 . . . cn − coan]

D = co

Then based on the previous sections we know that the prediction of u1(k + j) is given by:

u1(k + j) = CAjx(k) +

j∑

i=1

CAi−1Bu2(k + j − i) +Du2(k + j)

For this description we will find that:

CAj =[

ℓj,0 ℓj,1 · · · ℓj,na]

CAi−1B = mj,j−i for 0 < i ≤ j

D = mj,0

and so where

CAjx(k) =Lj(q)

a(q)u2(k)

reflects the past of the system, the equation

Du2(k + j) +

j∑

i=1

CAi−1Bu2(k + j − i) = mj,0u2(k + j) + . . .+mj,j−1 u2(k + 1)

= Mj(q)u2(k + j)

gives the response of the future inputs u2(k + i), i > 0.

Page 201: MPC

Appendix E: Performance indices

In this appendix we show how the LQPC performance index, the GPC performance indexand the zone performance index can be can be translated into a standard predictive controlproblem.

proof of theorem 2:

First choose the performance signal

z(k) =

[

Q1/2xo(k + 1)R1/2u(k)

]

(8.43)

Then it easy to see that

J(v, k) =N−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k)

=

N−1∑

j=0

xT (k + 1 + j|k)Q1/2Γ1(j)Q1/2x(k + 1 + j|k) +

N−1∑

j=0

uT (k + j|k)R1/2IR1/2u(k + j|k)

=N∑

j=1

xT (k + j|k)Q1/2Γ1(j − 1)Q1/2x(k + j|k) +

N∑

j=1

uT (k + j − 1|k)Ru(k + j − 1|k)

=

N∑

j=Nm

xT (k + j|k)Qx(k + j|k) +

N∑

j=1

uT (k + j − 1|k)Ru(k + j − 1|k)

and so performance index (4.1) is equivalent to (4.5) for the above given z, N and Γ. Fromthe IO state space equation

xo(k + 1) = Ao xo(k) +Bo u(k) + Lo d(k) +Ko eo(k)

201

Page 202: MPC

202 Appendices

and using the definitions of x, e, v and w, we find:

x(k + 1) = Ax(k) +B1 e(k) +B2 d(k) +B3 v(k)

z(k) =

[

Q1/2xo(k + 1)R1/2u(k)

]

=

[

Q1/2(

Ao xo(k) +Bo u(k) + Lo d(k) +Ko eo(k))

R1/2u(k)

]

=

[

Q1/2Ao0

]

xo(k) +

[

Q1/2Ko

0

]

eo(k) +

[

Q1/2Lo0

]

do(k) +

[

Q1/2Bo

R1/2

]

u(k)

= C2 x(k) +D21 e(k) +D22 w(k) +D23 v(k)

for the given choices of A, B1, B2, B3, C1, C2, D21, D22 and D23. 2 End Proofproof of theorem 4.1:

The GPC performance index as given in (4.8) can be transformed into the standard per-formance index (4.1). First choose the performance signal

z(k) =

[

yp(k + 1|k)− r(k + 1)λ∆u(k)

]

(8.44)

Then it easy to see that

J(v, k) =N−1∑

j=0

zT (k + j|k)Γ(j)z(k + j|k) =

=

N−1∑

j=0

[

yTp (k + 1 + j|k)−rT (k + 1 + j) λ∆uT (k + j|k)]

× Γ(j)

[

yp(k + 1 + j|k)−r(k + 1 + j|k)λ∆u(k + j|k)

]

=

=

N−1∑

j=0

(

yp(k + 1 + j|k)− r(k + 1 + j))T

Γ1(j)(

yp(k + 1 + j|k)− r(k + 1 + j))

+λ2N−1∑

j=0

∆uT (k + j|k)∆u(k + j|k)

=N∑

j=Nm

(

yp(k + j|k)− r(k + j))T(

yp(k + j|k)− r(k + j))

+λ2N∑

j=1

∆uT (k + j − 1|k)∆u(k + j − 1|k)

and so performance index (4.1) is equivalent to (4.8) for the above given z(k), N and Γ(j).Substitution of the IIO-output equation

y(k) = Ci xi(k) +DHei(k)

Page 203: MPC

203

in (4.11),(4.12) results in:

xp(k + 1) = Ap xp(k) +Bp Ci xi(k) +BpDH ei(k)

yp(k) = Cp xp(k) +DpCi xi(k) +DpDH ei(k)

and so

x(k + 1) =

[

xp(k + 1)xi(k + 1)

]

=

=

[

Ap BpCi0 Ai

] [

xp(k)xi(k)

]

+

[

BpDH

Ki

]

ei(k) +

[

0 0Li 0

] [

di(k)r(k + 1)

]

+

[

0Bi

]

v(k) =

= Ax(k) +B1 e(k) +B2w(k) +B3 v(k)

y(k) = C1 x(k) +DH ei(k) +[

0 0]

[

di(k)r(k + 1)

]

= C1 x(k) +D11 ei(k) +D12 w(k)

yp(k) =[

Cp DpCi]

x(k) +DpDH ei(k) +[

0 0]

[

di(k)r(k + 1)

]

for the given choices of A, B1, B2, B3 and C1. For yp(k + 1|k) we derive:

yp(k + 1|k) =[

Cp DpCi]

x(k + 1) +DpDH ei(k + 1|k)

=[

Cp DpCi]

[

Ap BpCi0 Ai

] [

xp(k)xi(k)

]

+[

Cp DpCi]

[

BpDH

Ki

]

ei(k) +

[

Cp DpCi]

[

0 0Li 0

][

di(k)r(k + 1)

]

+[

Cp DpCi]

[

0Bi

]

v(k) +

DpDH ei(k + 1|k) =

=[

CpAp CpBpCi +DpCiAi]

[

xp(k)xi(k)

]

+[

CpBpDH +DpCiKi

]

ei(k) +

[

DpCiLi 0]

[

di(k)r(k + 1)

]

+[

DpCiBi

]

v(k)

where we used the estimate ei(k + 1|k) = 0.

Page 204: MPC

204 Appendices

For z(k) we derive:

z(k) =

[

yp(k + 1|k)− r(k + 1)λ∆u(k)

]

=

[

yp(k + 1|k)0

]

+

[

−r(k + 1)0

]

+

[

0λv(k)

]

=

[

CpAp CpBpCi +DpCiAi0 0

][

xp(k)xi(k)

]

+

[

CpBpDH +DpCiKi

0

]

ei(k) +

[

DpCiLi 00 0

][

di(k)r(k+1)

]

+

[

DpCiBi

0

]

v(k) +

[

−I0

]

r(k+1) +

[

0λI

]

v(k)

=

[

CpAp CpBpCi +DpCiAi0 0

][

xp(k)xi(k)

]

+

[

CpBpDH +DpCiKi

0

]

ei(k) +

[

DpCiLi −I0 0

]

w(k) +

[

DpCiBi

λI

]

v(k)

= C2 x(k) +D21 e(k) +D22w(k) +D23 v(k)

for the given choices of C2,D21, D22 andD23, results in a performance index (4.1) equivalentto (4.5). 2 End Proof

Page 205: MPC

Appendix F:

Standard Predictive Control ToolboxVersion 5.6

T.J.J. van den Boom

Manual MATLAB Toolbox

January 16, 2010

205

Page 206: MPC

Contents

Contents

Introduction ............................................................................................. 207

Reference ............................................................................................. 209

gpc ............................................................................................. 211

gpc ss ............................................................................................. 215

lqpc ............................................................................................. 218

tf2syst ............................................................................................. 221

imp2syst ............................................................................................. 222

ss2syst ............................................................................................. 224

syst2ss ............................................................................................. 226

io2iio ............................................................................................. 228

gpc2spc ............................................................................................. 229

lqpc2spc ............................................................................................. 231

add du ............................................................................................. 232

add u ............................................................................................. 234

add y ............................................................................................. 238

add x ............................................................................................. 240

add nc ............................................................................................. 242

add end ............................................................................................. 243

external ............................................................................................. 244

dgamma ............................................................................................. 246

pred ............................................................................................. 248

contr ............................................................................................. 250

lticll ............................................................................................. 252

lticon ............................................................................................. 253

simul ............................................................................................. 254

rhc ............................................................................................. 255

206 Standard Predictive Control Toolbox

Page 207: MPC

Introduction

Introduction

This toolbox is a collection of a few Matlab functions for the design and analysis ofpredictive controllers. This toolbox has been developed by Ton van den Boom at the DelftCenter for Systems and Control (DCSC), Delft University of Technology, the Netherlands.The Standard Predictive Control toolbox is an independent tool, which only requires thecontrol system toolbox and the signal processing toolbox.

models in SYSTEM format

The notation in the SPC toolbox is kept as close as possible to the one in the lecturenotes. To describe systems (IO model, IIO model, standard model, prediction model) weuse the SYSTEM format, where all the system matrices are stacked in a matrix G and thedimensions are given in a vector dim.

IO model in SYSTEM format:

Consider the IO-system

xo(k + 1) = Aoxo(k) +Koeo(k) + Lodo(k) +Bou(k)

y(k) = Coxo(k) +DHeo(k) +DFdo(k)

for Ao ∈ Rna×na, Ko ∈ R

na×nk, Lo ∈ Rna×nl, Bo ∈ R

na×nb and Co ∈ Rnc×na .

In SYSTEM format this will be given as:

G =

[

Ao Ko Lo Bo

Co DH DF 0

]

dim =[

na nk nl nb nc 0 0 0]

IIO model in SYSTEM format:

Consider the IIO-system

xi(k + 1) = Aixi(k) +Kiei(k) + Lidi(k) +Bi∆u(k)

y(k) = Cixi(k) +DHei(k) +DFdi(k)

for Ai ∈ Rna×na, Ki ∈ R

na×nk , Li ∈ Rna×nl, Bi ∈ R

na×nb and Ci ∈ Rnc×na .

In SYSTEM format this will be given as:

G =

[

Ai Ki Li Bi

Ci DH DF 0

]

dim =[

na nk nl nb nc 0 0 0]

Standard Predictive Control Toolbox 207

Page 208: MPC

Introduction

Standard model in SYSTEM format:

Consider the standard model of the SPCP:

x(k + 1) = Ax(k) +B1e(k) +B2w(k) +B3v(k)

y(k) = C1x(k) +D11e(k) +D12w(k)

z(k) = C2x(k) +D21e(k) +D22w(k) +D23v(k)

φ(k) = C3x(k) +D31e(k) +D32w(k) +D33v(k)

ψ(k) = C4x(k) +D41e(k) +D42w(k) +D43v(k)

for A ∈ Rna×na , Bi ∈ R

na×nbi, i = 1, 2, 3, Cj ∈ Rncj×na , j = 1, 2, 3, 4 and In SYSTEM

format this will be given as:

G =

A B1 B2 B3

C1 D11 D12 0C2 D21 D22 D23

C3 D31 D32 D33

C4 D41 D42 D43

dim =[

na nb1 nb2 nb3 nc1 nc2 nc3 nc4]

Prediction model in SYSTEM format:

Consider the prediction model of the SPCP:

x(k + 1) = Ax(k) + B1 e(k) + B2w(k) + B3v(k)

y(k) = C1x(k) + D11e(k) + D12w(k) + D13v(k)

z(k) = C2x(k) + D21e(k) + D22w(k) + D23v(k)

φ(k) = C3x(k) + D31e(k) + D32w(k) + D33v(k)

ψ(k) = C4x(k) + D41e(k) + D42w(k) + D43v(k)

where A ∈ Rna×na , Bi ∈ R

na×nbi, Cj ∈ Rncj×na , and Dji ∈ R

ncj×nbi , i = 1, 2, 3, j = 2, 3, 4.the SYSTEM format is given as:

G =

A B1 B2 B3

C1 D11 D12 D13

C2 D21 D22 D23

C3 D31 D32 D33

C4 D41 D42 D43

dim =[

na nb1 nb2 nb3 ∗ nc2 nc3 nc4]

208 Standard Predictive Control Toolbox

Page 209: MPC

Reference

Reference

Common predictive control problems

gpc solves the generalized predictive control problemgpc ss solves the state space generalized predictive control problemlqpc solves the linear quadratic predictive control problem

Construction of process model

tf2syst transforms a polynomial into a state space model in SYSTEMformat

imp2syst transforms a impulse response model into a state space model inSYSTEM format

ss2syst transforms a state space model into the SYSTEM formatsyst2ss transforms SYSTEM format into a state space modelio2iio transforms an IO system into an IIO system

Formulation of standard predictive control problem

gpc2spc transforms GPC problem into an SPC problemlqpc2spc transforms LQPC problem into an SPC problemadd du function to add increment input constraint to SPC problemadd u function to add input constraint to SPC problemadd v function to add input constraint to SPC problemadd y function to add output constraint to SPC problemadd x function to add state constraint to SPC problemadd nc function to add a control horizon to SPC problemadd end function to add a state end-point constraint to SPC problem

Standard predictive control problem

external function makes the external signal w from d and rdgamma function makes the selection matrix Γpred function makes a prediction modelcontr function computes controller matrices for predictive controllercontr function computes controller matrices for predictive controllerlticll function computes the state space matrices of the LTI closed looplticon function computes the state space matrices of the LTI optimal

predictive controllersimul function makes a closed loop simulation with predictive controllerrhc function makes a closed loop simulation in receding horizon mode

Standard Predictive Control Toolbox 209

Page 210: MPC

Reference

Demonstrations of tuning GPC and LQPC

demogpc Tuning GPC controllerdemolqpc Tuning LQPC controller

210 Standard Predictive Control Toolbox

Page 211: MPC

gpc

gpc

PurposeSolves the Generalized Predictive Control (GPC) problem

Synopsis[y,du]=gpc(ai,bi,ci,fi,P,lambda,Nm,N,Nc,lensim,...

r,di,ei,dumax,apr,rhc);

[y,du,sys,dim,vv]=gpc(ai,bi,ci,fi,P,lambda,Nm,N,Nc,lensim,...

r,di,ei,dumax,apr,rhc);

DescriptionThe function solves the GPC method (Clarke et al.,[14],[15]) for a controlledautoregressive integrated moving average (CARIMA) model, given by

ai(q) y(k) = bi(q)∆u(k) + ci(q) ei(k) + fi(q) di(k)

where the increment input signal is given by ∆u(k) = u(k)− u(k − 1).A performance index, based on control and output signals, is minimized:

min∆u(k)

J(∆u, k) = min∆u(k)

N∑

j=Nm

|yp(k+j|k)− r(k+j)|2 + λ2Nc∑

j=1

|∆u(k+j−1)|2

where

yp(k) = P (q)y(k) is the weighted process output signalr(k) is the reference trajectoryy(k) is the process output signaldi(k) is the known disturbance increment signalei(k) is the zero-mean white noise

∆u(k) is the process control increment signalNm is the minimum cost- horizonN is the prediction horizonNc is the control horizonλ is the weighting on the control signal

P (q) = 1+p1q−1+. . .+pnpq

−np

is a polynomial with desired closed-loop poles

The signal yp(k + j|k) is the prediction of yp(k + j), based on knowledge up totime k. The input signal u(k + j) is forced to become constant for j ≥ Nc, so

∆u(k + j) = 0 for j ≥ Nc

Standard Predictive Control Toolbox 211

Page 212: MPC

gpc

Further the increment input signal is assumed to be bounded:

|∆u(k + j) | ≤ ∆umax for 0 ≤ j < Nc

The parameter λ determines the trade-off between tracking accuracy (first term)and control effort (second term). The polynomial P (q) can be chosen by thedesigner and broaden the class of control objectives. np of the closed-loop poleswill be placed at the location of the roots of polynomial P (q).

The function gpc returns the output signal y and increment input signal du.The input and output variables are the following:

y the output signal y(k).du the increment input signal ∆u(k).sys the model (in standard form).dim dimensions sys.vv controller parameters.ai,bi,ci,fi polynomials of CARIMA model.P is the polynomial P (q).lambda is the trade-off parameter λ.Nm,N,Nc are the summation parameters.r is the column vector with reference signal r(k).di is the column vector disturbance increment signal di(k).ei is the column vector with ZMWN noise signal ei(k).dumax is the maximum bound ∆umax on the increment input signal.lensim is length of simulation interval.apr vector with flags for a priori knowledge on external signal.rhc flag for receding horizon mode.

Setting dumax=0 means no increment input constraint will be added.

The vector apr (with length 2) determines if the external signals di(k+ j) andr(k+ j) are a priori known or not. The disturbance di(k+ j) is a priori knownfor apr(1)=1 and unknown for apr(1)=0. The reference r(k + j) is a prioriknown for apr(2)=1 and unknown for apr(2)=0.

For rhc=0 the simulation is done in closed loop mode. For rhc=1 the simulationis done in receding horizon mode, which means that the simulation is pausedevery sample and can be continued by pressing the return-key. Past signals andprediction of future signals are given within the prediction range.

The output variables sys, dim and vv can be used as input variables for thefunctions lticll and lticon

212 Standard Predictive Control Toolbox

Page 213: MPC

gpc

Example

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%

% Example for gpc

%

randn(’state’,4); % set initial value of random generator

%%% G(q) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

ai = conv([1 -1.787 0.798],[1 -1]); % polynomial ai(q)

bi = 0.029*[0 1 0.928 0]; % polynomial bi(q)

ci = [1 -1.787 0.798 0]; % polynomial ci(q)

fi = [0 1 -1.787 0.798]; % polynomial fi(q)

%%% P(q) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

P = 1; % No pole-placement

lambda=0; % increment input is not weighted

Nm = 8; % Mimimum cost horizon

Nc = 2; % Control horizon

N = 25; % Prediction horizon

lensim = 61; % length simulation interval

dumax = 0; % dumax=0 means that no constraint is added !!

apr = [0 0]; % no apriori knowledge about w(k)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

r = [zeros(1,10) ones(1,100)]; % step on k=11

di = [zeros(1,20) 0.5 zeros(1,89)]; % step on k=21

ei = [zeros(1,30) -0.1*randn(1,31)]; % noise starting from k=31

[y,du]=gpc(ai,bi,ci,fi,P,lambda,Nm,N,Nc,lensim,r,di,ei,dumax,apr);

u = cumsum(du); % compute u(k) from du(k)

do = cumsum(di(1:61)); % compute do(k) from di(k)

eo = cumsum(ei(1:61)); % compute eo(k) from ei(k)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% plot figures %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

t=0:60;

[tt,rr]=stairs(t,r(:,1:61)’);

[tt,uu]=stairs(t,u’);

Standard Predictive Control Toolbox 213

Page 214: MPC

gpc

[tt,duu]=stairs(t,du’);

subplot(211);

plot(t,y’,’b’,tt,rr,’g’,t,do’,’r’,t,eo’,’c’);

title(’green: r , blue: y , red: do , cyan: eo’);

grid;

subplot(212);

plot(tt,duu,’b’,tt,uu’,’g’);

title(’blue: du , green: u’);

grid;

disp(’ ’);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

See Alsotf2io, io2iio, gpc2spc, external, pred, add nc, add du, add y, contr,

simul

214 Standard Predictive Control Toolbox

Page 215: MPC

gpc ss

gpc ss

PurposeSolves the Generalized Predictive Control (GPC) problem for a state space IIOmodel

Synopsis[y,du]=gpc ss(Ai,Ki,Li,Bi,Ci,DH,DF,Ap,Bp,Cp,Dp,Wy,Wu,...

Nm,N,Nc,lensim,r,di,ei,dumax,apr,rhc);

[y,du,sys,dim,vv]=gpc ss(Ai,Ki,Li,Bi,Ci,DH,DF,Ap,Bp,Cp,Dp,Wy,Wu,...

Nm,N,Nc,lensim,r,di,ei,dumax,apr,rhc);

DescriptionThe function solves the GPC method (Clarke et al., [14],[15]) for a state spaceIIO model, given by

x(k + 1) = Aix(k) +Kiei(k) + Lidi(k) +Bi∆u(k)

y(k) = Cix(k) +DHei(k) +DHdi(k)

where the increment input signal is given by ∆u(k) = u(k)− u(k − 1).A performance index, based on control and output signals, is minimized:

min∆u(k)

J(∆u, k) = min∆u(k)

N∑

j=Nm

|Wy yp(k+j|k)− r(k+j)|2 +

Nc∑

j=1

|Wu ∆u(k+j−1)|2

where |α(k)| stands for the euclidean norm of the vector α(k), and the variablesare given by:

yp(k) = P (q)y(k) is the weighted process output signalr(k) is the reference trajectoryy(k) is the process output signaldi(k) is the known disturbance increment signalei(k) is the zero-mean white noise

∆u(k) is the process control increment signalNm is the minimum cost- horizonN is the prediction horizonNc is the control horizonWy is the weighting matrix on the tracking errorWu is the weighting matrix on the control signalP (q) is the reference system

Standard Predictive Control Toolbox 215

Page 216: MPC

gpc ss

The reference system P (q) is given by the state space realization:

xp(k + 1) = Apx(k) +Bpy(k)

ψ(k) = Cpx(k) +Dpy(k)

The signal yp(k + j|k) is the prediction of yp(k + j), based on knowledge up totime k. The input signal u(k + j) is forced to become constant for j ≥ Nc, so

∆u(k + j) = 0 for j ≥ Nc

Further the increment input signal is assumed to be bounded:

|∆u(k + j) | ≤ ∆umax for 0 ≤ j < Nc

For MIMO systems ∆umax can be choosen as a scalar value or a vector value(with the same dimension as vector ∆u(k)). In the case of a scalar the bound∆umax holds for each element of ∆u(k). In the case of a vector ∆umax, thebound is taken elementwise.

The weighting matrices Wy and Wu determines the trade-off between trackingaccuracy (first term) and control effort (second term). The reference systemP (q) can be chosen by the designer and broaden the class of control objectives.

The function gpc ss returns the output signal y and increment input signal du.The input and output variables are the following:

y the output signal y(k).du the increment input signal ∆u(k).sys the model (in standard form).dim dimensions sys.vv controller parameters.Ai,Ki,Li,Bi,

Ci,DH,DF system matrices of IIO model.Ap,Bp,Cp,Dp system matrices of reference system P (q).Wy weighting matrix on tracking error.Wu weighting matrix on input increment signal.Nm,N,Nc are the summation parameters.r is the column vector with reference signal r(k).di is the column vector disturbance increment signal di(k).ei is the column vector with ZMWN noise signal ei(k).dumax is the vector with bound ∆umax.lensim is length of simulation interval.apr vector with flags for a priori knowledge on external signal.rhc flag for receding horizon mode.

216 Standard Predictive Control Toolbox

Page 217: MPC

gpc ss

Setting dumax=0 means no increment input constraint will be added.

The vector apr (with length 2) determines if the external signals di(k+ j) andr(k+ j) are a priori known or not. The disturbance di(k+ j) is a priori knownfor apr(1)=1 and unknown for apr(1)=0. The reference r(k + j) is a prioriknown for apr(2)=1 and unknown for apr(2)=0.

For rhc=0 the simulation is done in closed loop mode. For rhc=1 the simulationis done in receding horizon mode, which means that the simulation is pausedevery sample and can be continued by pressing the return-key. Past signals andprediction of future signals are given within the prediction range.

The output variables sys, dim and vv can be used as input variables for thefunctions lticll and lticon

See Alsogpc, tf2io, io2iio, gpc2spc, external, pred, add nc, add du, add y,

contr, simul

Standard Predictive Control Toolbox 217

Page 218: MPC

lqpc

lqpc

PurposeSolves the Linear Quadratic Predictive Control (LQPC) problem

Synopsis[y,u,x]=lqpc(Ao,Ko,Lo,Bo,Co,DH,DF,Q,R,Nm,N,Nc, ...

lensim,xo,do,eo,umax,apr,rhc);

[y,u,x,sys,dim,vv]=lqpc(Ao,Ko,Lo,Bo,Co,DH,DF,Q,R,Nm,N,Nc, ...

lensim,xo,do,eo,umax,apr,rhc);

DescriptionThe function solves the Linear Quadratic Predictive Control (LQPC) method(Garcıa et al., [28]) for a state space model, given by

x(k + 1) = Aox(k) +Koeo(k) + Lodo(k) +Bou(k)

y(k) = Cox(k) +DHeo(k) +DFd0(k)

A performance index, based on state and input signals, is minimized:

minu(k)

J(u, k) = minu(k)

N∑

j=Nm

x(k+j)TQx(k+j) +N∑

j=1

u(k+j−1)TRu(k+j−1)

where

x(k) is the state signal vectoru(k) is the process control signaly(k) is the process output signaldo(k) is the known disturbance signaleo(k) is the zero-mean white noiseNm is the minimum cost- horizonN is the prediction horizonNc is the control horizonQ is the state weighting matrixR is the control weighting matrix

The signal x(k+ j|k) is the prediction of state x(k+ j), based on knowledge upto time k. The input signal u(k + j) is forced to become constant for j ≥ Nc.Further the input signal is assumed to be bounded:

| u(k + j) | ≤ umax for 0 ≤ j < Nc

218 Standard Predictive Control Toolbox

Page 219: MPC

lqpc

The matrices Q and R determines the trade-off between tracking accuracy (firstterm) and control effort (second term). For MIMO systems the matrices canscale the states and inputs.

The function lqpc returns the output signal y, input signal u and the statesignal x. The input and output variables are the following:

y the output signal y(k).u the input signal u(k).x the state signal x(k).sys the model (in standard form).dim dimensions sys.vv controller parameters.Ao,Ko,Lo,Bo,Co,DH,DF system matrices of state space IO model.Q,R the weighting matrices Q and RNm,N,Nc the summation parameters.xo the column vector with initial state xo = x(0).do the disturbance signal do(k).eo the ZMWN noise signal eo(k).umax the maximum bound umax on the input signal.lensim length of simulation interval.apr flag for a priori knowledge on disturbance signal.rhc flag for receding horizon mode.

The signal eo must have as many rows as there are noise inputs. The signal domust have as many rows as there are disturbance inputs. Each column of eoand do corresponds to a new time point.

The signal y will have as many rows as there are outputs. The signal u willhave as many rows as there are inputs. The signal x must have as many rowsas there are states. Each column of y, u and x corresponds to a new time point.

Setting umax=0 means no input constraint will be added.

The (scalar) variable apr determines if the disturbance signal di(k+j) is a prioriknown or not. The signal di(k + j) is a priori known for apr=1 and unknownfor apr=0.

For rhc=0 the simulation is done in closed loop mode. For rhc=1 the simulationis done in receding horizon mode, which means that the simulation is pausedevery sample and can be continued by pressing the return-key. Past signals andprediction of future signals are given within the prediction range.

The output variables sys, dim and vv can be used as input variables for the

Standard Predictive Control Toolbox 219

Page 220: MPC

lqpc

functions lticll and lticon

See Alsolqpc2spc, pred, add nc, add u, add y, contr, simul

220 Standard Predictive Control Toolbox

Page 221: MPC

tf2syst

tf2syst

PurposeTransforms a polynomial into a state space model in SYSTEM format

Synopsis[G,dim]=tf2syst(a,b,c,f);

DescriptionThe function transforms a polynominal model into a state space model in SYS-TEM format (For SISO system only). The input system is:

a(q)y(k) = b(q)v(k) + c(q)e(k) + f(q)d(k)

The state space equations become

x(k + 1) = Ax(k) +B1e(k) +B2d(k) +B3v(k)

y(k) = C1x(k) +D11e(k) +D12d(k)

A ∈ Rna×na , B1 ∈ R

na×nb1 , B2 ∈ Rna×nb2

B3 ∈ Rna×nb3 , C1 ∈ R

nc1×na , D11 ∈ Rnc1×nb1 , D12 ∈ R

nc1×nb2

The state space representation is given in a SYSTEM format, so

G =

[

A B1 B2 B3

C1 D11 D12 0

]

with dimension vector

dim =[

na nb1 nb2 nb3 nc1 0 0 0]

The function tf2syst returns the state space model in Go and its dimensiondimo, given in SYSTEM format. The input and output variables are the following:

G The state space model in SYSTEM format.dim the dimension of the system.a,b,c,f polynomials of CARIMA model.

See Alsoio2iio, imp2syst, ss2syst

Standard Predictive Control Toolbox 221

Page 222: MPC

imp2syst

imp2syst

PurposeTransforms an impulse reponse model into a state space model in SYSTEMformat

Synopsis[G,dim]=imp2syst(g,f,nimp);

[G,dim]=imp2syst(g,f);

DescriptionThe function transforms an impulse response model into a state space modelin SYSTEM format (For SISO system only) The input system is:

y(k) =

ng∑

i=1

g(i)u(k − i) +

nf∑

i=1

f(i)d(k − i) + e(k)

where the impulse response parameters g(i) and f(i) are given in the vectors

g =[

0 g(1) g(2) . . . g(ng)]

f =[

0 f(1) f(2) . . . f(nf )]

The state space equations become

x(k + 1) = Ax(k) +B1e(k) +B2d(k) +B3v(k)

y(k) = C1x(k) + e(k)

A ∈ Rnimp×nimp , B1 ∈ R

nimp×nb1 , B2 ∈ Rnimp×nb2

B3 ∈ Rnimp×nb3 , C1 ∈ R

nc1×nimp

The state space representation is given in a SYSTEM format, so

G =

[

A B1 B2 B3

C1 I 0 0

]

with dimension vector

dim =[

nimp nb1 nb2 nb3 nc1 0 0 0]

The function imp2syst returns the state space model in Go and its dimensiondimo, given in SYSTEM format. The input and output variables are the following:

222 Standard Predictive Control Toolbox

Page 223: MPC

imp2syst

G The state space model in SYSTEM format.dim the dimension of the system.g vectors with impulse response parameters of process model.f vectors with impulse response parameters of disturbance model.nimp length of impulse response in model G

If nimp is not given, it will be set to nimp = max(ng,nf).

See Alsoio2iio, tf2syst, ss2syst

Standard Predictive Control Toolbox 223

Page 224: MPC

ss2syst

ss2syst

PurposeTransforms a state space model into the SYSTEM format

Synopsis[G,dim]=ss2syst(A,B1,B2,B3,C1,D11,D12,D13);

[G,dim]=ss2syst(A,B1,B2,B3,C1,D11,D12,D13,C2,D21,D22,D23);

[G,dim]=ss2syst(A,B1,B2,B3,C1,D11,D12,D13,C2,D21,D22,D23,...

C3,D31,D32,D33,C4,D41,D42,D43);

DescriptionThe function transforms a state space model into the SYSTEM format Thestate space equations are

x(k + 1) = Ax(k) +B1e(k) +B2w(k) +B3v(k)

y(k) = C1x(k) +D11e(k) +D12w(k) +D13v(k)

z(k) = C2x(k) +D21e(k) +D22w(k) +D23v(k)

φ(k) = C3x(k) +D31e(k) +D32w(k) +D33v(k)

ψ(k) = C4x(k) +D41e(k) +D42w(k) +D43v(k)

A ∈ Rna×na , B1 ∈ R

na×nb1 , B2 ∈ Rna×nb2 , B3 ∈ R

na×nb3

C1 ∈ Rnc1×na , C2 ∈ R

nc2×na , C3 ∈ Rnc3×na

The output system is given in the SYSTEM format, so

G =

A B1 B2 B3

C1 D11 D12 D13

C2 D21 D22 D23

C3 D31 D32 D33

C4 D41 D42 D43

with dimension vector

dim =[

na nb1 nb2 nb3 nc1 nc2 nc3 nc4]

The function ss2syst returns the state space model in G and its dimension dim,given in SYSTEM format. The input and output variables are the following:

224 Standard Predictive Control Toolbox

Page 225: MPC

ss2syst

G The state space model in SYSTEM format.dim the dimension of the system.A,B1,. . .,D43 system matrices of state space model.

See Alsoio2iio, imp2syst, tf2syst, syst2ss

Standard Predictive Control Toolbox 225

Page 226: MPC

syst2ss

syst2ss

PurposeTransforms SYSTEM format into a state space model

Synopsis[A,B1,B2,B3,C1,D11,D12,D13]=syst2ss(sys,dim);

[A,B1,B2,B3,C1,D11,D12,D13,C2,D21,D22,D23]=syst2ss(sys,dim);

[A,B1,B2,B3,C1,D11,D12,D13,C2,D21,D22,D23,C3,D31,D32,D33,...

C4,D41,D42,D43]=syst2ss(sys,dim);

DescriptionThe function transforms a model in SYSTEM format into its state space repre-sentation.

Consider a system in the SYSTEM format, so

sys =

[

A B1 B2 B3

C1 D11 D12 D13

]

with dimension vector dim. Using

[A,B1,B2,B3,C1,D11,D12,D13]=syst2ss(sys,dim);

the state space equations become:

x(k + 1) = Ax(k) +B1e(k) +B2w(k) +B3v(k)

y(k) = C1x(k) +D11e(k) +D12w(k) +D13v(k)

Consider a standard predictive control problem in the SYSTEM format, so

sys =

A B1 B2 B3

C1 D11 D12 D13

C2 D21 D22 D23

with dimension vector dim. Using

[A,B1,B2,B3,C1,D11,D12,D13,C2,D21,D22,D23]=syst2ss(sys,dim);

226 Standard Predictive Control Toolbox

Page 227: MPC

syst2ss

the state space equations become:

x(k + 1) = Ax(k) +B1e(k) +B2w(k) +B3v(k)

y(k) = C1x(k) +D11e(k) +D12w(k) +D13v(k)

z(k) = C2x(k) +D21e(k) +D22w(k) +D23v(k)

Consider a standard predictive control problem after prediction in SYSTEM for-mat, so

sysp =

A B1 B2 B3

C1 D11 D12 D13

C2 D21 D22 D23

C3 D31 D32 D33

C4 D41 D42 D43

with dimension vector dimp. Using

[A,tB1,tB2,tB3,tC1,D11,D12,D13,tC2,tD21,tD22,tD23,...

tC3,tD31,tD32,tD33,tC4,tD41,tD42,tD43]= syst2ss(sysp,dimp);

the state space equations become:

x(k + 1) = Ax(k) + B1e(k) + B2w(k) + B3v(k)

y(k) = C1x(k) + D11e(k) + D12w(k) + D13v(k)

z(k) = C2x(k) + D21e(k) + D22w(k) + D23v(k)

φ(k) = C3x(k) + D31e(k) + D32w(k) + D33v(k)

ψ(k) = C4x(k) + D41e(k) + D42w(k) + D43v(k)

See Alsoio2iio, imp2syst, tf2syst, ss2syst

Standard Predictive Control Toolbox 227

Page 228: MPC

io2iio

io2iio

PurposeTransformes a IO system (Go) into a IIO system (Gi)

Synopsis[Gi,dimi]=io2iio(Go,dimo);

DescriptionThe function transforms an IO system into an IIO system

The state space representation of the input system is:

Go =

[

Ao Ko Lo Bo

Co DH DF 0

]

and the dimension vector

dimo =[

na nk nl nb nc]

The state space representation of the output system is:

Gi =

[

Ai Ki Li Bi

Ci DH DF 0

]

and a dimension vector

dimi =[

na + nc nk nl nb nc]

The function io2iio returns the state space IIO-model Gi and its dimensiondimi, The input and output variables are the following:

Gi The increment input output(IIO) model in SYSTEM format.dimi the dimension of the IIO model.Go The Input output(IO) model in SYSTEM format.dimo the dimension of the IO model.

228 Standard Predictive Control Toolbox

Page 229: MPC

gpc2spc

gpc2spc

PurposeTransforms GPC problem into a SPC problem

Synopsis[sys,dim]=gpc2spc(Gi,dimi,P,lambda);

DescriptionThe function transforms the GPC problem into a standard predictive controlproblem. For an IIO model Gi:

xi(k + 1) = Aixi(k) +Kiei(k) + Low(k) +Bo∆u(k)

y(k) = Cixi(k) +DHei(k) +DFw(k)

The weighting P (q) is given in state space (!!) representation:

xp(k + 1) = Apxp(k) +Bpy(k)

yp(k) = Cpxp(k) +Dpy(k)

Where xp is the state of the realization describing yp(k) = P (q)y(k).

After the transformation, the system becomes

x(k + 1) = Ax(k) +B1e(k) +B2w(k) +B3v(k)

y(k) = C1x(k) +D11e(k) +D21w(k)

z(k) = C2x(k) +D21e(k) +D22w(k) +D23v(k)

z(k) =

[

yp(k + 1)− r(k + 1)λ∆u(k)

]

w(k) =

[

d(k)r(k + 1)

]

The IO model Gi, the weighting filter P and the transformed system sys aregiven in the SYSTEM format. The input and output variables are the following:

sys Standard model of SPC problem in SYSTEM format.dim The dimension in SPC problem.Gi The IIO model in SYSTEM format.P The weighting polynominal.lambda Weighting factor.

Standard Predictive Control Toolbox 229

Page 230: MPC

gpc2spc

See Alsolqpc2spc, gpc

230 Standard Predictive Control Toolbox

Page 231: MPC

lqpc2spc

lqpc2spc

PurposeTransforms LQPC problem into a SPC problem

Synopsis[sys,dim]=lqpc2spc(Go,dimo,Q,R);

DescriptionThe function transforms the LQPC problem into a standard predictive controlproblem. Consider the IO model Go:

xo(k + 1) = Aoxo(k) +Koeo(k) + Low(k) +Bou(k)

y(k) = Coxo(k) +DHeo(k) +DFw(k)

After the transformation, the system becomes

x(k + 1) = Ax(k) +B1e(k) +B2w(k) +B3v(k)

y(k) = C1x(k) +D11e(k) +D21w(k)

z(k) = C2x(k) +D21e(k) +D22w(k) +D23v(k)

z(k) =

[

Q1/2x(k + 1)R1/2u(k)

]

w(k) = d(k)

where

Q is the state weighting matrixR is the control weighting matrix

The IO model Gi and the transformed system sys are given in the SYSTEM

format. The input and output variables are the following:

sys Standard model of SPC problem in SYSTEM format.dim The dimension in SPC problem.Go The IO model in SYSTEM format.Q The state weighting matrix .R The control weighting matrix.

See Alsogpc2spc, lqpc

Standard Predictive Control Toolbox 231

Page 232: MPC

add du

add du

PurposeFunction to add increment input constraint to standard problem

Synopsis[sys,dim] = add du(sys,dim,dumax,sgn,descr);

[sysp,dimp]= add du(sysp,dimp,dumax,sgn,descr);

DescriptionThe function adds an increment input constraint to the standard problem (sys)or the prediction model (sysp). For sgn=1 , the constraint is given by:

∆u(k + j) ≤ |∆umax| for j = 0, · · · , N − 1

For sgn=-1 , the constraint is given by:

∆u(k + j) ≥ −|∆umax| for j = 0, · · · , N − 1

For sgn=0 , the constraint is given by:

−|∆umax| ≤ ∆u(k + j) ≤ |∆umax| for j = 0, · · · , N − 1

where

∆umax is the maximum bound on the increment input signal∆u(k + j) is the input increment signal

For MIMO systems ∆umax can be choosen as a scalar value or a vector value(with the same dimension as vector ∆u(k)). In the case of a scalar the bound∆umax holds for each element of ∆u(k). In the case of a vector ∆umax, thebound is taken elementwise.

The function add du returns the system, subjected to the increment input con-straint. The input and output variables are the following:

sys Standard modeldim The dimension of the standard model.sysp Prediction modeldimp The dimension of the prediction model.dumax The maximum bound on the increment input.sgn Scalar with value of +1/0/-1.descr Flag for model type (descr=’IO’ for input output model.

descr=’IIO’ for an increment input output model).

232 Standard Predictive Control Toolbox

Page 233: MPC

add du

Setting dumax=0 means no input constraint will be added.

See Alsoadd u, add v, add y, add x, gpc

Standard Predictive Control Toolbox 233

Page 234: MPC

add u

add u

PurposeFunction to add input constraint to standard problem

Synopsis[sys,dim]=add u(sys,dim,umax,sgn,descr);

[sysp,dimp]=add u(sysp,dimp,umax,sgn,descr);

DescriptionThe function adds input constraint to the standard problem (sys) or the pre-diction model (sysp). For sgn=1 , the constraint is given by:

u(k + j) ≤ |umax| for j = 0, · · · , N − 1

For sgn=-1 , the constraint is given by:

u(k + j) ≥ −|umax| for j = 0, · · · , N − 1

For sgn=0 , the constraint is given by:

−|umax| ≤ u(k + j) ≤ |umax| for j = 0, · · · , N − 1

Where

umax is the maximum bound on the input signalu(k + j) is the input signal

For MIMO systems umax can be choosen as a scalar value or a vector value(with the same dimension as vector u(k)). In the case of a scalar the boundumax holds for each element of u(k). In the case of a vector umax, the bound istaken elementwise.

The function add u returns the system, subjected to the input constraint. Theinput and output variables are the following:

234 Standard Predictive Control Toolbox

Page 235: MPC

add u

sys Standard modeldim The dimension of the standard model.sysp Prediction modeldimp The dimension of the prediction model.umax The maximum bound on the input signal.sgn Scalar with value of +1/0/-1.descr Flag for model type (descr=’IO’ for input output model.

descr=’IIO’ for an increment input output model).

Setting umax=0 means no input constraint will be added.

See Alsoadd du, add v, add y, add x, lqpc

Standard Predictive Control Toolbox 235

Page 236: MPC

add v

add v

PurposeFunction to add input constraint to standard problem

Synopsis[sys,dim] = add v(sys,dim,vmax,sgn);

[sysp,dimp]= add v(sysp,dimp,vmax,sgn);

DescriptionThe function adds an increment input constraint to the standard problem (sys)or the prediction model (sysp). For sgn=1 , the constraint is given by:

v(k + j) ≤ |vmax| for j = 0, · · · , N − 1

For sgn=-1 , the constraint is given by:

v(k + j) ≥ −|vmax| for j = 0, · · · , N − 1

For sgn=0 , the constraint is given by:

−|vmax| ≤ v(k + j) ≤ |vmax| for j = 0, · · · , N − 1

where

vmax is the maximum bound on the input signalv(k + j) is the input signal

For MIMO systems vmax can be choosen as a scalar value or a vector value(with the same dimension as vector v(k)). In the case of a scalar the boundvmax holds for each element of v(k). In the case of a vector vmax, the bound istaken elementwise.

The function add v returns the system, subjected to the increment input con-straint. The input and output variables are the following:

sys Standard modeldim The dimension of the standard model.sysp Prediction modeldimp The dimension of the prediction model.vmax The maximum bound on the input.sgn Scalar with value of +1/0/-1.

236 Standard Predictive Control Toolbox

Page 237: MPC

add v

Setting vmax=0 means no input constraint will be added.

See Alsoadd u, add du, add y, add x, gpc

Standard Predictive Control Toolbox 237

Page 238: MPC

add y

add y

PurposeFunction to add output constraint to to the standard problem (sys) or theprediction model (sysp).

Synopsis[sys,dim] =add y(sys,dim,ymax,sgn);

[sysp,dimp]=add y(sysp,dimp,ymax,sgn);

DescriptionThe function adds output constraint to the standard problem (sys) or theprediction model (sysp). For sgn=1 , the constraint is given by:

y(k + j) ≤ |ymax| for j = 0, · · · , N − 1

For sgn=-1 , the constraint is given by:

y(k + j) ≥ −|ymax| for j = 0, · · · , N − 1

For sgn=0 , the constraint is given by:

−|ymax| ≤ y(k + j) ≤ |ymax| for j = 1, · · · , N − 1

Where

ymax is the maximum bound on the output signaly(k + j) is the system output signal

For MIMO systems ymax can be choosen as a scalar value or a vector value(with the same dimension as vector y(k)). In the case of a scalar the boundymax holds for each element of y(k). In the case of a vector ymax, the bound istaken elementwise.

The function add y returns the system subjected to the output constraint. Theinput and output variables are the following:

238 Standard Predictive Control Toolbox

Page 239: MPC

add y

sys Standard modeldim The dimension of the standard model.sysp Prediction modeldimp the dimension of the prediction model.ymax The maximum bound on the output signal.sgn Scalar with value of +1/0/-1.

Setting ymax=0 means no output constraint will be added.

See Alsoadd u, add du, add v, add x

Standard Predictive Control Toolbox 239

Page 240: MPC

add x

add x

PurposeFunction to add state constraint to to the standard problem.

Synopsis[sys,dim]=add x(sys,dim,E);

[sys,dim]=add x(sys,dim,E,sgn);

DescriptionThe function adds state constraint to the standard problem.NOTE: The function add x can NOT be applied to the prediction model !!!!(i.e. add x must be used before pred).

For sgn=1 , the constraint is given by:

Ex(k + j) ≤ 1 for j = 0, · · · , N − 1

For sgn=-1 , the constraint is given by:

−Ex(k + j) ≤ 1 for j = 0, · · · , N − 1

For sgn=0 , the constraint is given by:

−1 ≤ Ex(k + j) ≤ 1 for j = 1, · · · , N − 1

Where

E is a matrixx(k + j) is the state of the system

The function add x returns the standard problem, subjected to the state con-straint. The input and output variables are the following:

sys The standard model.dim The dimension of the standard model.E Matrix to define bound on the state.sgn Scalar with value of +1/0/-1.

Setting E=0 means no state constraint will be added.

240 Standard Predictive Control Toolbox

Page 241: MPC

add x

See Alsoadd u, add du, add v, add y

Standard Predictive Control Toolbox 241

Page 242: MPC

add nc

add nc

PurposeFunction to add a control horizon to prediction problem

Synopsis[sysp,dimp]=add nc(sysp,dimp,dim,Nc);

[sysp,dimp]=add nc(sysp,dimp,dim,Nc,descr);

DescriptionThe function add nc returns the system with a control horizon sysp and thedimension dimp. The input and output variables are the following:

sysp The prediction model.dimp The dimension of the prediction model.dim The dimension of the original IO or IIO systemNc The control horizon.descr Flag for model type (descr=’IO’ for input output model,

descr=’IIO’ for an increment input output model)

The default value of descr is ’IIO’.

See Alsogpc, lqpc

242 Standard Predictive Control Toolbox

Page 243: MPC

add end

add end

PurposeFunction to add a state end-point constraint to prediction problem.

Synopsis[sysp,dimp] = add end(sys,dim,sysp,dimp,N);

DescriptionThe function adds a state end-point constraint to the standard problem:

x(k +N) = xss = Dssxw(k +N)

The function add end returns the system with a state end-point constraint insysp and the dimension dimp. The input and output variables are the following:

sys The standard model.dim The dimension of the standard model.sysp The system of prediction problem.dimp The dimension of the prediction problem.N The prediction horizon.

Standard Predictive Control Toolbox 243

Page 244: MPC

external

external

PurposeFunction makes the external signal w from d and r for simulation purpose

Synopsis[tw]=external(apr,lensim,N,w1);

[tw]=external(apr,lensim,N,w1,w2);

[tw]=external(apr,lensim,N,w1,w2,w3);

[tw]=external(apr,lensim,N,w1,w2,w3,w4);

[tw]=external(apr,lensim,N,w1,w2,w3,w4,w5);

DescriptionThe function computes the vector w with with predictions of the external signalw:

w =[

w(k) w(k + 1) · · · w(k +N − 1)]

where

w(k) =[

w1(k) · · · w5(k)]

For the lqpc controller, the external signal w(k) is given by

w(k) =[

d(k)]

and so we have to choose w1(k) = d(k). For the gpc controller, the externalsignal w(k) is given by

w(k) =[

d(k) r(k + 1)]

and so we have to choose w1(k) = d(k) and w2(k) = r(k + 1).

tw is the row vector w with predictions of the external signal w.apr vector with flags for a priori knowledge on external signal.lensim is length of simulation interval.N is the prediction horizon.w1 is the row vector with external signal w1(k).

......

w5 is the row vector with external signal w5(k).

244 Standard Predictive Control Toolbox

Page 245: MPC

external

The vector apr determine if the external signal w(k+ j) is a priori known. Fori = 1, . . . , 5 there holds:

signal wi(k) is a priori known for apr(i) = 1signal wi(k) is not a priori known for apr(i) = 0

See Alsogpc, lqpc

Standard Predictive Control Toolbox 245

Page 246: MPC

dgamma

dgamma

PurposeFunction makes the selection matrix Γ. For the infinite horizon case the funtionalso creates the steady state matrix Γss.

Synopsis[dGamma] = dgamma(Nm,N,dim);

[dGamma,Gammass] = dgamma(Nm,N,dim);

DescriptionThe selection matrix Γ is defined as

Γ = diag(Γ(0),Γ(1), . . . ,Γ(N − 1))

where

Γ(j) =

[

0 00 I

]

for 0 ≤ j ≤ Nm − 1

[

I 00 I

]

for Nm ≤ j ≤ N − 1

Where

Nm is the minimum cost- horizonN is the prediction horizon

dim is the dimension of the system

The function dgamma returns the diagonal elements of the selection matrix Γ,so dGamma = diag(Γ). The input and output variables are the following:

dGamma vector with diagonal elements of Γ.Gammass vector with diagonal elements of Γss.Nm is the minimum-cost horizon.N is the prediction horizon.Nc is the control horizon.dim the dimension of the system.

246 Standard Predictive Control Toolbox

Page 247: MPC

dgamma

See Alsogpc, lqpc, blockmat

Standard Predictive Control Toolbox 247

Page 248: MPC

pred

pred

PurposeFunction computes the prediction model from the standard model

Synopsis[sysp,dimp]=pred(sys,dim,N);

DescriptionThe function makes a prediction model for the system

x(k + 1) = Ax(k) +B1e(k) +B2w(k) +B3v(k)

y(k) = C1x(k) +D11e(k) +D12w(k)

z(k) = C2x(k) +D21e(k) +D22w(k) +D23v(k)

φ(k) = C3x(k) +D31e(k) +D32w(k) +D33v(k)

ψ(k) = C4x(k) +D41e(k) +D42w(k) +D43v(k)

for

sys =

A B1 B2 B3

C1 D11 D12 0C2 D21 D22 D23

C3 D31 D32 D33

C4 D41 D42 D43

dim =[

na nb1 nb2 nb3 nc1 nc2 nc3 nc4]

Where

x(k) is the state of the systeme(k) is zero-mean white noise (ZMWN)w(k) is known external signalv(k) is the control signalz(k) is the performance signalφ(k) is the equality constraint at time kψ(k) is the inequality constraint at time k

A,Bi, Cj, Dij the system matrices

248 Standard Predictive Control Toolbox

Page 249: MPC

pred

For the above model, the prediction model is given by

x(k + 1) = Ax(k) + B1e(k) + B2w(k) + B3v(k)

y(k) = C1x(k) + D11e(k) + D12w(k) + D13v(k)

z(k) = C2x(k) + D21e(k) + D22w(k) + D23v(k)

φ(k) = C3x(k) + D31e(k) + D32w(k) + D33v(k)

ψ(k) = C4x(k) + D41e(k) + D42w(k) + D43v(k)

where

p =

p(k|k)p(k + 1|k)

...p(k +N |k)

stands for the predicted signal for p = y, z, φ, ψ and for future values for p =v, w.

The function pred returns the prediction model sysp:

sysp =

A B1 B2 B3

C1 D11 D12 D13

C2 D21 D22 D23

C3 D31 D32 D33

C4 D41 D42 D43

dimp =[

na nb1 N · nb2 N · nb3 N · nc1 N · nc2 N · nc3 N · nc4]

The input and output variables are the following:

sysp The prediction model.dimp The dimension of the prediction model.sys The system to be controlled.dim The dimension of the system.N The prediction horizon.

See Alsogpc, lqpc, blockmat

Standard Predictive Control Toolbox 249

Page 250: MPC

contr

contr

PurposeFunction computes controller matrices for predictive controller

Synopsis[vv,HH,AA,bb]=contr(sysp,dimp,dim,dGam);

DescriptionThe function computes the matrices for predictive controller for use in thefunction simul.

sysp is the prediction model, dimp is the dimension-vector of the predictionmodel, dim is the dimension-vector of the standard model, and dGam is a row-vector with the diagonal elements of the matrix Γ.

If inequality constraints are present, the control problem is transformed into aquadratic programming problem, where the objective function is chosen as

J(µI , k) =1

2µTI (k)HµI(k)

subject to

AψµI − bψ ≤ 0

which can be solved at each time instant k in the function simul. There holdsThe variable vv is given by:

vv =[

−F De Dw Dµ

]

so that

v(k) = vv

xc(k)e(k)w(k)µI(k)

= −F xc(k) +De e(k) +Dw w(k) +DµµI(k)

Further bb is such that

bψ(k) = bb

1xc(k)e(k)w(k)

250 Standard Predictive Control Toolbox

Page 251: MPC

contr

If no inequality constraints are present, we find µI = 0 and the control problemcan be solved analytically at each time instant in the function simul, using

v(k) = −F xc(k) +De e(k) +Dw w(k)

The variable vv is now given by:

vv =[

−F De Dw

]

so that

v(k) = vv

xc(k)e(k)w(k)

The input and output variables are the following:

sysp The prediction model.dimp The dimension of the prediction model.dim the dimension of the system.dGam vector with diagonal elements of Γ.vv,HH,AA,bb controller parameters.

See Alsosimul, gpc, lqpc

Standard Predictive Control Toolbox 251

Page 252: MPC

lticll

lticll

PurposeFunction computes the state space matrices of the closed loop in the LTI case(no inequality constraints).

Synopsis[Acl,B1cl,B2cl,Ccl,D1cl,D2cl]=lticll(sys,dim,vv,N);

DescriptionFunction lticll computes the state space matrices of the LTI closed loop,given by

xcl(k + 1) = Acl xcl(k) +B1cl e(k) +B2cl w(k)[

v(k)y(k)

]

= Ccl xcl(k) +D1cl e(k) +D2cl w(k)

The input and output variables are the following:

sys the model.dim dimensions sys.N the prediction horizon.vv controller parameters.Acl,B1cl,B2cl,Ccl,D1cl,D2cl system matrices of closed loop

See Alsogpc, lqpc, gpc ss, contr, simul, lticon

252 Standard Predictive Control Toolbox

Page 253: MPC

lticon

lticon

PurposeFunction computes the state space matrices of the optimal predictive controllerin the LTI case (no inequality constraints).

Synopsis[Ac,B1c,B2c,Cc,D1c,D2c]=lticon(sys,dim,vv,N);

DescriptionFunction lticon computes the state space matrices of the optimal predictivecontroller, given by

xc(k + 1) = Ac xc(k) +B1c y(k) +B2c w(k)

v(k) = Cc xc(k) +D1c y(k) +D2c w(k)

The input and output variables are the following:

sys the model.dim dimensions sys.N the prediction horizon.vv controller parameters.Ac,B1c,B2c,Cc,D1c,D2c system matrices of LTI controller

See Alsogpc, lqpc, gpc ss, contr, simul, lticll

Standard Predictive Control Toolbox 253

Page 254: MPC

simul

simul

PurposeFunction makes a closed loop simulation with predictive controller

Synopsis[x,xc,y,v]=simul(syst,sys,dim,N,x,xc,y,v,tw,e,...

k1,k2,vv,HH,AA,bb);

DescriptionThe function makes a closed loop simulation with predictive controller, the in-put and output variables are the following:

syst the true system.sys the model.dim dimensions sys and syst.N the horizon.x state of the true system.xc state of model/controller.y the true system output.v the true system input.tw vector with predictions of the external signal.k1 begin simulation interval.k2 end simulation interval.vv,HH,AA,bb controller parameters.

See Alsocontr, gpc, lqpc

254 Standard Predictive Control Toolbox

Page 255: MPC

rhc

PurposeFunction makes a closed loop simulation in receding horizon mode

Synopsis[x,xc,y,v]=rhc(syst,sys,sysp,dim,dimp,dGam,N,x,xc,y,v,tw,e,k1,k2);

DescriptionThe function makes a closed loop simulation with predictive controller in thereceding horizon mode. Past signals and prediction of future signals are givenwithin the prediction range. The simulation is paused every sample and can becontinued by pressing the return-key. The input and output variables are thefollowing:

syst the true system.sys the model.sysp the prediction model.dim dimensions sys and syst.dimp dimensions sysp.dGamma vector with diagonal elements of Γ.N the horizon.x state of the true system.xc state of model/controller.y the true system output.v the true system input.tw vector with predictions of the external signal.k1 begin simulation interval.k2 end simulation interval.

See Alsosimul, contr, gpc, lqpc

255

Page 256: MPC

256

Page 257: MPC

Index

a priori knowledge, 36add du.m, 232add end.m, 243add nc.m, 242add u.m, 234add v.m, 236add x.m, 240add y.m, 238

basis functions, 27blocking, 27

constraints, 25, 44control horizon constraint, 46equality constraints, 25, 44, 46inequality constraints, 25, 45, 48state-end point constraint, 47

contr.m, 250control horizon, 27, 46Controlled AutoRegressive Integrated Mov-

ing Average (CARIMA), 11Controlled AutoRegressive Moving Average

(CARMA), 11coprime factorization, 121

dead-beat control, 164dgamma.m, 246Diophantine equation, 196

equality constrained SPCP, 58external.m, 244

feasibility, 96minimal time algorithm, 97soft-constraint algorithm, 96

finite horizon SPCP, 56Full infinite horizon SPCP, 76

full SPCP, 62

generalized minimum variance control, 164Generalized predictive control (GPC), 11GPC, 154gpc.m, 211gpc2spc.m, 229gpc ss.m, 215

imp2syst.m, 222implementation, 89implementation, full SPCP case, 91implementation, LTI case, 89Increment-input-output (IIO) models, 16Infinite horizon SPCP, 65infinite horizon SPCP with control horizon ,

72Input-Output (IO) models, 15internal model control (IMC) scheme, 116invariant ellipsoid, 137io2iio.m, 228

linear matrix inequalities (LMI), 131LQPC, 154lqpc.m, 218lqpc2spc.m, 231lticll.m, 252lticon.m, 253

mean-level control, 165minimum variance control, 164model, 13

disturbance model, 13, 15impulse response model, 20, 183noise model, 15polynomial model, 20, 191process model, 13, 15

257

Page 258: MPC

step response model, 20, 183MPC applications, 12MPC using LMIs, 139

optimization, 28orthogonal basis functions, 28, 50

performance index, 21, 39GPC performance index, 22, 41, 202LQPC performance index, 22, 40, 201standard predictive control, 39standard predictive control performance

index, 43zone performance index, 23, 42

pole-placement control, 165pred.m, 248prediction, 31

polynomial model, 196state space model, 31step response model, 186

receding horizon principle, 29rhc.m, 255robustness, 124

LMI-based MPC, 140

Schur complement, 133simul.m, 254ss2syst.m, 224stability, 101

end-point constraint, 109end-point constraint set, 111, 114inequality constrained case, 105infinite prediction horizon, 106internal model control (IMC) scheme, 116LTI case, 101terminal constraint, 109terminal constraint set, 114terminal cost function with end-point con-

straint set, 114Youla parametrization, 121

standard performance index, 24Standard predictive control problem, 55

standard predictive control problem (SPCP),39, 51

state space model, 15, 16steady-state behavior, 66Structuring input signal, 67structuring of input signal, 27syst2ss.m, 226

tf2syst.m, 221tuning, 151

GPC, 154initial setting, 153LQPC, 154optimization, 158

Unconstrained infinite horizon SPCP, 69unconstrained SPCP, 56

Youla parametrization, 121

258

Page 259: MPC

Bibliography

[1] M. Alamir and G. Bornard. Stability of a truncated infinite constrained recedinghorizon scheme: The general discrete nonlinear case. Automatica, 31(9):1353–1356,1995.

[2] F. Allgower, T.A. Badgwell, J.S. Qin, and J.B. Rawlings. Nonlinear predictive controland moving horizon estrimation – an introductory overview. In Advances in Control,Highlights of ECC’99, Edited by F. Frank, Springer-Verlag, London, UK, 1999.

[3] K.J. Astrom and B. Wittenmark. On self-tuning regulators. Automatica, 9:185–199,1973.

[4] V. Balakrishnan, A. Zheng, and M. Morari. Constrained stabilization of discrete-timesystems. In Advances in MBPC, Oxford University Press, 1994.

[5] A. Bemporad, M. Morari, V. Dua, and E. N. Pistikopoulos. The expicit linearquadratic regulator for constrained systems. Automatica, 38(1):3–20, 2002.

[6] B.W. Bequette. Nonlinear control of chemical processes: A review. Ind. Eng. Chem.Res., 30(7):1391–1413, 1991.

[7] R.R. Bitmead, M. Gevers, and V. Wertz. Adaptive Optimal Control. The ThinkingMan’s GPC. Prentice Hall, Upper Saddle River, New Jersey, 1990.

[8] H. H. J. Bloemen, T. J. J. van den Boom, and H. B. Verbruggen. Optimizing the endpoint state weighting in Model-based Predictive Control. Automatica, 38(6):1061–1068, June 2002.

[9] S. Boyd and Y. Nesterov. Nonlinear convex optimization: New methods and newapplications. Minicourse on the European Control Conference, Brussels, Belgium,July 1-4, 1997.

[10] S.P. Boyd and C.H. Barratt. Linear Controller Design, Limits of performance. Pren-tice Hall, Information and System Sciences Series, Englewood Cliffs, New Jersey, 1991.

[11] E.F. Camacho and C. Bordons. Model Predictive Control in the Process Industry,Advances in Industrial Control. Springer, London, 1995.

259

Page 260: MPC

[12] C.C. Chen and L. Shaw. On receding horizon feedback control. Automatica, 18:349–352, 1982.

[13] D.W. Clarke and C. Mohtadi. Properties of generalized predictive control. Automatica,25(6):859–875, 1989.

[14] D.W. Clarke, C. Mohtadi, and P.S. Tuffs. Generalized predictive control - part 1. thebasic algorithm. Automatica, 23(2):137–148, 1987.

[15] D.W. Clarke, C. Mohtadi, and P.S. Tuffs. Generalized predictive control - part 2.extensions and interpretations. Automatica, 23(2):149–160, 1987.

[16] D.W. Clarke and R. Scattolini. Constrained receding horizon predictive control. IEEProc-D, 138(4), 1991.

[17] C.R. Cutler and B.L. Ramaker. Dynamic matrix control - a computer control algo-rithm. In AIChE Nat. Mtg, 1979.

[18] C.R. Cutler and B.L. Ramaker. Dynamic matrix control - a computer control algo-rithm. In Proceeding Joint American Control Conference, San Francisco, CA, USA,1980.

[19] F.C. Cuzzola, J.C. Geromel, and M. Morari. An improved approach for constrainedrobust model predictive control. Automatica, 38(7):1183–1189, 2002.

[20] R.M.C. De Keyser and A.R. van Cauwenberghe. Typical application possibilities forself-tuning predictive control. In IFAC Symp.Ident.& Syst.Par.Est., 1982.

[21] R.A.J. De Vries and H.B Verbruggen. Multivariable process and prediction models inpredictive control – a unified approach. Int. J. Adapt. Contr.& Sign. Proc., 8:261–278,1994.

[22] V.F. Demyanov and L.V. Vasilev. Nondifferentiable Optimization, Optimization Soft-ware. Springer-Verlag, 1985.

[23] B. Ding, Y. Xi, and S. Li. A synthesis approach of on-line constraint robust modelpredictive control. Automatica, 40(1):163–167, 2004.

[24] J.C. Doyle, B.A. Francis, and A.R. Tannenbaum. Feedback control systems. MacMillanPublishing Company, New York, USA, 1992.

[25] J.C. Doyle, K. Glover, P.P. Khargonekar, and B.A. Francis. State-space solutions tostandard H2 and H∞ control problems. IEEE AC, 34:pp831–847, 1989.

[26] C.E. Garcia and M. Morari. Internal model control. 1. a unifying review and somenew results. Ind.Eng.Chem.Proc.Des.Dev., 21(2):308–323, 1982.

260

Page 261: MPC

[27] C.E. Garcia and A.M. Morshedi. Quadratic programming solution of dynamic matrixcontrol (QDMC). Chem.Eng.Comm., 46(11):73–87, 1986.

[28] C.E. Garcia, D.M. Prett, and M. Morari. Model predictive control: Theory andpractice - a survey. Automatica, 25(3):335–348, 1989.

[29] C.E. Garcia, D.M. Prett, and B.L. Ramaker. Fundamental Process Control. Butter-worths, Stoneham, MA, 1988.

[30] H. Genceli and M. Nikolaou. Robust stability analysis of constrained ℓ1-norm modelpredictive control. AIChE Journ., 39(12):1954–1965, 1993.

[31] E.G. Gilbert and K.T. Tan. Linear systems with state and control constraints: thetheory and application of maximal output admissible sets. IEEE AC, 36:1008–1020,1991.

[32] M. Grotschel, L. Lovasz, and A. Schrijver. Geometric Algorithms and CombinatorialOptimization. Springer-Verlag, Berlin, Germany, 1988.

[33] T. Kailath. Linear Systems. Prentice Hall, New York, 1980.

[34] M. Kinnaert. Adaptive generalized predictive controller for mimo systems. Int.J.Contr., 50(1):161–172, 1989.

[35] M.V. Kothare, V. Balakrishnan, and M. Morari. Robust contrained predictive controlusing linear matrix inequalities. Automatica, 32(10):1361–1379, 1996.

[36] B. Kouvaritakis, J.A. Rossiter, and J. Schuurmans. Efficient robuts predictive control.IEEE AC, 45(8):1545–1549, 2000.

[37] W.H. Kwon and A.E. Pearson. On feedback stabilization of time-varying discretesystems. IEEE AC, 23:479–481, 1979.

[38] J.H. Lee, M. Morari, and C.E. Garcia. State-space interpretation of model predictivecontrol. Automatica, 30(4):707–717, 1994.

[39] J.H. Lee and Z.H.Yu. Tuning of model predictive controllers for robust performance.Comp.Chem.Eng., 18(1):15–37, 1994.

[40] C.E. Lemke. On complementary pivot theory. In Mathematics of the Decision Sci-ences, G.B.Dantzig and A.F.Veinott (Eds.), 1968.

[41] L. Ljung. System Identification: Theory for the User. Prentice Hall, Englewood Cliffs,NJ, 1987.

[42] Y. Lu and Y. Arkun. Quasi-min-max mpc algorithms for LPV systems. Automatica,36(4):527–540, 2000.

261

Page 262: MPC

[43] J.M. Maciejowski. Multivariable Feedback Control Design. Addison-Wesley Publishers,Wokingham, UK, 1989.

[44] J.M. Maciejowski. Predictive control with constraints. Prentice Hall, Pearson Educa-tion Limited, Harlow, UK, 2002.

[45] D.Q. Mayne, J.B. Rawlings, C.V. Rao, and P.O.M. Scokaert. Constrained modelpredictive control: stability and optimality. Automatica, 36:789–814, 2000.

[46] M. Morari and E. Zafiriou. Robust Process Control. Prentice Hall, Englewood Cliffs,New Jersey, 1989.

[47] E. Mosca and J. Zhang. Stable redesign of predictive control. Automatica, 28(6):1229–1233,, 1992.

[48] A. Naganawa, G. Obinata, and H. Inooka. A design method of model predictivecontrol system using coprime factorization approach. In ASCC, 1994.

[49] Y. Nesterov and A. Nemirovskii. Interior-Point Polynomial Algorithms in ConvexProgramming. SIAM, Philadelphia, 1994.

[50] S.J. Qin and T.A. Badgewell. An overview of industrial model predictive controltechnology. In Chemical Process Control - V, AIChe Symposium Series - AmericanInstitute of Chemical Engineers, volume 93, pages 232–256, 1997.

[51] J.B. Rawlings and K.R. Muske. The stability of constrained receding horizon control.IEEE AC, 38:1512–1516, 1993.

[52] J. Richalet. Industrial applications of model based predictive control. Automatica,29(5):1251–1274, 1993.

[53] J. Richalet, A. Rault, J.L. Testud, and J. Papon. Algorithmic control of industrialprocesses. In Proceedings of the 4th IFAC Symposium on Identification and SystemParameter Estimation, Tbilisi, 1976.

[54] J. Richalet, A. Rault, J.L. Testud, and J. Papon. Model predictive heuristic control:Applications to industrial processes. Automatica, 14(1):413–428, 1978.

[55] N.L. Ricker, T. Subrahmanian, and T. Sim. Case studies of model-predictive controlin pulp and paper production. In Proc. 1988 IFAC Workshop on Model Based Pro-cess Control, T.J. McAvoy, Y. Arkun and E. Zafiriou eds., Pergamon Press, Oxford,page 13, 1988.

[56] J.A. Rossiter. Model-Based Predictive Control: A Practical Approach. CRC Press,Inc., 2003.

[57] R. Rouhani and R.K. Mehra. Model algorithmic control (mac): Basic theoreticalproperties. Automatica, 18(4):401–414, 1982.

262

Page 263: MPC

[58] L.E. Scales. Introduction to Non-Linear Optimization. MacMillan, London, UK, 1985.

[59] P.O.M. Scokaert. Infinite horizon genralized predictive control. Int. J. Control,66(1):161–175, 1997.

[60] P.O.M. Scokaert and J.B. Rawlings. Constrained linear quadratic regulation. vol-ume 43, pages 1163–1169, 1998.

[61] A.R.M. Soeterboek. Predictive control - A unified approach. Prentice Hall, EnglewoodCliffs, NJ, 1992.

[62] E.D. Sontag. An algebraic approach to bounded controllability of linear systems.Int.J.Contr., pages 181–188, 1984.

[63] V. Strejc. State Space Theory of Discrete Linear Control. Academia, Prague, 1981.

[64] M. Sznaier and M.J. Damborg. Suboptimal control of linear systems with state andcontrol inequality constraints. In Proceedings of the 26th IEEE conference on decisionand control, pages 761–762, Los Angeles, 1987.

[65] T.J.J. van den Boom. Model based predictive control, status and perspectives. In Tu-torial Paper on the CESA IMACS Conference. Symposium on Control, Optimizationand Supervision, volume 1, pages 1–12, Lille, France, 1996.

[66] T.J.J. van den Boom, M. Ayala Botto, and P. Hoekstra. Design of an analytic con-strained predictive controller using neural networks. International Journal of SystemScience, 36(10):639–650, 2005.

[67] T.J.J. van den Boom and R.A.J. de Vries. Robust predictive control using a time-varying Youla parameter. Journal of applied mathematics and computer science,9(1):101–128, 1999.

[68] E.T. van Donkelaar. Improvement of efficiency in system identification and modelpredictive control of industrial processes. PhD Thesis, Delft University of Technology,Delft, The Netherlands, 2000.

[69] E.T. van Donkelaar, O.H. Bosgra, and P.M.J. Van den Hof. Model predictive controlwith generalized input parametrization. In ECC, 1999.

[70] P. Van Overschee and B. de Moor. Subspace algorithms for the stochastic identificationproblem. Automatica, 29(3):649–660, 1993.

[71] M. Verhaegen and P. Dewilde. Subspace model identification. part i: The output-errorstate space model identification class of algorithms / part ii: Analysis of the elementaryoutput-error state space model identification algorithm. Int.J.Contr., 56(5):1187–1241, 1992.

263

Page 264: MPC

[72] M. Vidyasagar. Nonlinear Systems Analysis. SIAM Classics in Applied Mathematics,SIAM Press, 2002.

[73] R.A.J. De Vries and T.J.J. van den Boom. Constrained predictive control with guar-anteed stability and convex optimization. In American Control Conference, pages2842–2846, Baltimore, Maryland, 1994.

[74] R.A.J. De Vries and T.J.J. van den Boom. Robust stability constraints for predictivecontrol. In 4th European Control Conference, Brussels, Belgium, 1997.

[75] Z. Wan and M.V. Kothare. An efficient offline formulation of robust model predictivecontrol using linear matrix inequalities. Automatica, 39(5):837–846, 2003.

[76] P. Wolfe. The simplex method for quadratic programming. Econmetrica, 27:382–398,1959.

[77] E. Zafiriou. Robust model predictive control of processes with hard constraints.Comp.Chem.Engng., 14(4/5):359–371, 1990.

[78] A. Zheng. Reducing on-line computational demands in model predictive control byapproximating qp constraints. Journal of Process Control, 9(4):279–290, 1999.

[79] A. Zheng and M. Morari. Stability of model predictive control with mixed constraints.IEEE AC, 40:1818, 1995.

[80] Z.Q. Zheng and M. Morari. Robust stability of contrained model predictive control.In ACC, 1993.

264