You are on page 1of 53

A First Course in Predictive Control,

Second Edition Rossiter


Visit to download the full and correct content document:
https://textbookfull.com/product/a-first-course-in-predictive-control-second-edition-ros
siter/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

A first course in machine learning Second Edition Mark


Girolami

https://textbookfull.com/product/a-first-course-in-machine-
learning-second-edition-mark-girolami/

Renewable Energy, Second Edition: A First Course Robert


Ehrlich

https://textbookfull.com/product/renewable-energy-second-edition-
a-first-course-robert-ehrlich/

Biota Grow 2C gather 2C cook Loucas

https://textbookfull.com/product/biota-grow-2c-gather-2c-cook-
loucas/

A Course In Error Correcting Codes Second Edition Jørn


Justesen

https://textbookfull.com/product/a-course-in-error-correcting-
codes-second-edition-jorn-justesen/
A course in categorical data analysis First Edition
Leonard

https://textbookfull.com/product/a-course-in-categorical-data-
analysis-first-edition-leonard/

A First Course in Sobolev Spaces Giovanni Leoni

https://textbookfull.com/product/a-first-course-in-sobolev-
spaces-giovanni-leoni/

A First Course in Statistics for Signal Analysis Wojbor


A. Woyczy■ski

https://textbookfull.com/product/a-first-course-in-statistics-
for-signal-analysis-wojbor-a-woyczynski/

A Second Course in Topos Quantum Theory 1st Edition


Cecilia Flori (Auth.)

https://textbookfull.com/product/a-second-course-in-topos-
quantum-theory-1st-edition-cecilia-flori-auth/

A First Course in Functional Analysis 1st Edition Orr


Moshe Shalit

https://textbookfull.com/product/a-first-course-in-functional-
analysis-1st-edition-orr-moshe-shalit/
A First Course in
Predictive Control
Second Edition
A First Course in
Predictive Control
Second Edition

J.A. Rossiter
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2018 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business
No claim to original U.S. Government works
Printed on acid-free paper
Version Date: 20180322
International Standard Book Number-13: 978-1-138-09934-0 (Hardback)
This book contains information obtained from authentic and highly regarded sources. Reasonable
efforts have been made to publish reliable data and information, but the author and publisher cannot
assume responsibility for the validity of all materials or the consequences of their use. The authors and
publishers have attempted to trace the copyright holders of all material reproduced in this publication
and apologize to copyright holders if permission to publish in this form has not been obtained. If any
copyright material has not been acknowledged please write and let us know so we may rectify in any
future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information
storage or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access
www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc.
(CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization
that provides licenses and registration for a variety of users. For organizations that have been granted
a photocopy license by the CCC, a separate system of payment has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and
are used only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
In the hope that students and lecturing staff will
find this easy to learn from and in the spirit of sharing,
creating a world that accepts and supports each other.
Contents

Overview and guidance for use xix

Book organisation xxi

Acknowledgements xxiii

1 Introduction and the industrial need for predictive control 1


1.1 Guidance for the lecturer/reader . . . . . . . . . . . . . . . . . . . 2
1.2 Motivation and introduction . . . . . . . . . . . . . . . . . . . . . 2
1.3 Classical control assumptions . . . . . . . . . . . . . . . . . . . . 3
1.3.1 PID compensation . . . . . . . . . . . . . . . . . . . . . . 3
1.3.2 Lead and Lag compensation . . . . . . . . . . . . . . . . . 4
1.3.3 Using PID and lead/lag for SISO control . . . . . . . . . . 4
1.3.4 Classical control analysis . . . . . . . . . . . . . . . . . . 4
1.4 Examples of systems hard to control effectively with classical
methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4.1 Controlling systems with non-minimum phase zeros . . . . 5
1.4.2 Controlling systems with significant delays . . . . . . . . . 7
1.4.3 ILLUSTRATION: Impact of delay on margins and closed-
loop behaviour . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4.4 Controlling systems with constraints . . . . . . . . . . . . 10
1.4.5 Controlling multivariable systems . . . . . . . . . . . . . . 12
1.4.6 Controlling open-loop unstable systems . . . . . . . . . . . 16
1.5 The potential value of prediction . . . . . . . . . . . . . . . . . . 17
1.5.1 Why is predictive control logical? . . . . . . . . . . . . . . 18
1.5.2 Potential advantages of prediction . . . . . . . . . . . . . . 19
1.6 The main components of MPC . . . . . . . . . . . . . . . . . . . 19
1.6.1 Prediction and prediction horizon . . . . . . . . . . . . . . 20
1.6.2 Why is prediction important? . . . . . . . . . . . . . . . . . 20
1.6.3 Receding horizon . . . . . . . . . . . . . . . . . . . . . . 22
1.6.4 Predictions are based on a model . . . . . . . . . . . . . . 23
1.6.5 Performance indices . . . . . . . . . . . . . . . . . . . . . 25
1.6.6 Degrees of freedom in the predictions or prediction class . . 27
1.6.7 Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.6.8 Constraint handling . . . . . . . . . . . . . . . . . . . . . 28
1.6.9 Multivariable and interactive systems . . . . . . . . . . . . 30

vii
viii Contents

1.6.10 Systematic use of future demands . . . . . . . . . . . . . . 31


1.7 MPC philosophy in summary . . . . . . . . . . . . . . . . . . . . 31
1.8 MATLAB files from this chapter . . . . . . . . . . . . . . . . . . . 33
1.9 Reminder of book organisation . . . . . . . . . . . . . . . . . . . 33

2 Prediction in model predictive control 35


2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.2 Guidance for the lecturer/reader . . . . . . . . . . . . . . . . . . . 36
2.2.1 Typical learning outcomes for an examination assessment . 37
2.2.2 Typical learning outcomes for an assignment/coursework . . 37
2.3 General format of prediction modelling . . . . . . . . . . . . . . . 37
2.3.1 Notation for vectors of past and future values . . . . . . . . 38
2.3.2 Format of general prediction equation . . . . . . . . . . . . 38
2.3.3 Double subscript notation for predictions . . . . . . . . . . 38
2.4 Prediction with state space models . . . . . . . . . . . . . . . . . 39
2.4.1 Prediction by iterating the system model . . . . . . . . . . 39
2.4.2 Predictions in matrix notation . . . . . . . . . . . . . . . . 40
2.4.3 Unbiased prediction with state space models . . . . . . . . 43
2.4.4 The importance of unbiased prediction and deviation
variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.4.5 State space predictions with deviation variables . . . . . . . 46
2.4.6 Predictions with state space models and input increments . 48
2.5 Prediction with transfer function models – matrix methods . . . . . 49
2.5.1 Ensuring unbiased prediction with transfer function models 50
2.5.2 Prediction for a CARIMA model with T (z) = 1: the SISO
case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
2.5.3 Prediction with a CARIMA model and T = 1: the MIMO
case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.5.4 Prediction equations with T (z) 6= 1: the SISO case . . . . . 57
2.5.4.1 Summary of the key steps in computing prediction
equations with a T-filter . . . . . . . . . . . . . . 57
2.5.4.2 Forming the prediction equations with a T-filter
beginning from predictions (2.59) . . . . . . . . 58
2.6 Using recursion to find prediction matrices for CARIMA models . 60
2.7 Prediction with independent models . . . . . . . . . . . . . . . . . 63
2.7.1 Structure of an independent model and predictions . . . . . 64
2.7.2 Removing prediction bias with an independent model . . . 65
2.7.3 Independent model prediction via partial fractions for SISO
systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
2.7.3.1 Prediction for SISO systems with one pole . . . . 66
2.7.3.2 PFC for higher-order models having real roots . . 67
2.8 Prediction with FIR models . . . . . . . . . . . . . . . . . . . . . 68
2.8.1 Impulse response models and predictions . . . . . . . . . . 69
2.8.2 Prediction with step response models . . . . . . . . . . . . 71
2.9 Closed-loop prediction . . . . . . . . . . . . . . . . . . . . . . . . 73
Contents ix

2.9.1
The need for numerically robust prediction with open-loop
unstable plant . . . . . . . . . . . . . . . . . . . . . . . . 73
2.9.2 Pseudo-closed-loop prediction . . . . . . . . . . . . . . . . 74
2.9.3 Illustration of prediction structures with the OLP and CLP . 76
2.9.4 Basic CLP predictions for state space models . . . . . . . . 77
2.9.5 Unbiased closed-loop prediction with autonomous models . 78
2.9.6 CLP predictions with transfer function models . . . . . . . 79
2.10 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 81
2.11 Summary of MATLAB code supporting prediction . . . . . . . . . 82

3 Predictive functional control 83


3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
3.2 Guidance for the lecturer/reader . . . . . . . . . . . . . . . . . . . 85
3.3 Basic concepts in PFC . . . . . . . . . . . . . . . . . . . . . . . . 86
3.3.1 PFC philosophy . . . . . . . . . . . . . . . . . . . . . . . . 86
3.3.2 Desired responses . . . . . . . . . . . . . . . . . . . . . . 87
3.3.3 Combining predicted behaviour with desired behaviour: the
coincidence point . . . . . . . . . . . . . . . . . . . . . . . 88
3.3.4 Basic mathematical definition of a simple PFC law . . . . . 89
3.3.5 Alternative PFC formulation using independent models . . . 89
3.3.6 Integral action within PFC . . . . . . . . . . . . . . . . . . 91
3.3.7 Coping with large dead-times in PFC . . . . . . . . . . . . 91
3.3.8 Coping with constraints in PFC . . . . . . . . . . . . . . . 93
3.3.9 Open-loop unstable systems . . . . . . . . . . . . . . . . . 94
3.4 PFC with first-order models . . . . . . . . . . . . . . . . . . . . . 95
3.4.1 Analysis of PFC for a first-order system . . . . . . . . . . . 95
3.4.2 Numerical examples of PFC on first-order systems . . . . . 97
3.4.2.1 Dependence on choice of desired closed-loop pole
λ with ny = 1 . . . . . . . . . . . . . . . . . . . 97
3.4.2.2 Dependence on choice of coincidence horizon ny
with fixed λ . . . . . . . . . . . . . . . . . . . . 97
3.4.2.3 Effectiveness at handling plants with delays . . . 98
3.4.2.4 Effectiveness at handling plants with uncertainty
and delays . . . . . . . . . . . . . . . . . . . . . 98
3.4.2.5 Effectiveness at handling plants with uncertainty,
constraints and delays . . . . . . . . . . . . . . . 99
3.5 PFC with higher-order models . . . . . . . . . . . . . . . . . . . . 100
3.5.1 Is a coincidence horizon of 1 a good choice in general? . . 101
3.5.1.1 Nominal performance analysis with ny = 1 . . . . 102
3.5.1.2 Stability analysis with ny = 1 . . . . . . . . . . . 102
3.5.2 The efficacy of λ as a tuning parameter . . . . . . . . . . . 103
3.5.2.1 Closed-loop poles/behaviour for G1 with various
choices of ny . . . . . . . . . . . . . . . . . . . . 104
3.5.2.2 Closed-loop poles/behaviour for G3 with various
choices of ny . . . . . . . . . . . . . . . . . . . . 104
x Contents

3.5.2.3 Closed-loop poles/behaviour for G2 with various


choices of ny . . . . . . . . . . . . . . . . . . . . 105
3.5.2.4 Closed-loop poles/behaviour for G4 with various
choices of ny . . . . . . . . . . . . . . . . . . . . 105
3.5.3 Practical tuning guidance . . . . . . . . . . . . . . . . . . 106
3.5.3.1 Closed-loop poles/behaviour for G5 with various
choices of ny . . . . . . . . . . . . . . . . . . . . 106
3.5.3.2 Mean-level approach to tuning . . . . . . . . . . 106
3.5.3.3 Intuitive choices of coincidence horizon to ensure
good behaviour . . . . . . . . . . . . . . . . . . 107
3.5.3.4 Coincidence horizon of ny = 1 will not work in
general . . . . . . . . . . . . . . . . . . . . . . . 108
3.5.3.5 Small coincidence horizons often imply over-
actuation . . . . . . . . . . . . . . . . . . . . . . 109
3.5.3.6 Example 1 of intuitive choice of coincidence
horizon . . . . . . . . . . . . . . . . . . . . . . . 109
3.5.3.7 Example 6 of intuitive choice of coincidence
horizon . . . . . . . . . . . . . . . . . . . . . . . 110
3.6 Stability results for PFC . . . . . . . . . . . . . . . . . . . . . . . 111
3.7 PFC with ramp targets . . . . . . . . . . . . . . . . . . . . . . . . 112
3.8 Chapter summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
3.9 MATLAB code available for readers . . . . . . . . . . . . . . . . 115

4 Predictive control – the basic algorithm 117


4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
4.2 Guidance for the lecturer/reader . . . . . . . . . . . . . . . . . . . 119
4.3 Summary of main results . . . . . . . . . . . . . . . . . . . . . . 119
4.3.1 GPC control structure . . . . . . . . . . . . . . . . . . . . 120
4.3.2 Main components of an MPC law . . . . . . . . . . . . . . 120
4.4 The GPC performance index . . . . . . . . . . . . . . . . . . . . 120
4.4.1 Concepts of good and bad performance . . . . . . . . . . . 121
4.4.2 Properties of a convenient performance index . . . . . . . . 121
4.4.3 Possible components to include in a performance index . . . 122
4.4.4 Concepts of biased and unbiased performance indices . . . . 125
4.4.5 The dangers of making the performance index too simple . . 127
4.4.6 Integral action in predictive control . . . . . . . . . . . . . 128
4.4.7 Compact representation of the performance index and choice
of weights . . . . . . . . . . . . . . . . . . . . . . . . . . 129
4.5 GPC algorithm formulation for transfer function models . . . . . . 130
4.5.1 Selecting the degrees of freedom for GPC . . . . . . . . . . 130
4.5.2 Performance index for a GPC control law . . . . . . . . . . 131
4.5.3 Optimising the GPC performance index . . . . . . . . . . . 132
4.5.4 Transfer function representation of the control law . . . . . 133
4.5.5 Numerical examples for GPC with transfer function models
and MATLAB code . . . . . . . . . . . . . . . . . . . . . 134
Contents xi

4.5.6
Closed-loop transfer functions . . . . . . . . . . . . . . . . 136
4.5.7
GPC based on MFD models with a T-filter (GPCT) . . . . . 137
4.5.7.1 Why use a T-filter and conceptual thinking? . . . 137
4.5.7.2 Algebraic procedures with a T-filter . . . . . . . . 138
4.5.8 Sensitivity of GPC . . . . . . . . . . . . . . . . . . . . . . 141
4.5.8.1 Complementary sensitivity . . . . . . . . . . . . 142
4.5.8.2 Sensitivity to multiplicative uncertainty . . . . . . 142
4.5.8.3 Disturbance and noise rejection . . . . . . . . . . 143
4.5.8.4 Impact of a T-filter on sensitivity . . . . . . . . . 144
4.5.9 Analogies between PFC and GPC . . . . . . . . . . . . . . 145
4.6 GPC formulation for finite impulse response models and
Dynamic Matrix Control . . . . . . . . . . . . . . . . . . . . . . . 146
4.7 Formulation of GPC with an independent prediction model . . . . . 148
4.7.1 GPC algorithm with independent transfer function model . . 148
4.7.2 Closed-loop poles in the IM case with an MFD model . . . 151
4.8 GPC with a state space model . . . . . . . . . . . . . . . . . . . . 153
4.8.1 Simple state augmentation . . . . . . . . . . . . . . . . . . 153
4.8.1.1 Computing the predictive control law with an
augmented state space model . . . . . . . . . . . 154
4.8.1.2 Closed-loop equations and integral action . . . . 156
4.8.2 GPC using state space models with deviation variables . . . 156
4.8.2.1 GPC algorithm based on deviation variables . . . 157
4.8.2.2 Using an observer to estimate steady-state values
for the state and input . . . . . . . . . . . . . . . 160
4.8.3 Independent model GPC using a state space model . . . . . 161
4.9 Chapter summary and general comments on stability and tuning of
GPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
4.10 Summary of MATLAB code supporting GPC simulation . . . . . . 163
4.10.1 MATLAB code to support GPC with a state space model and
a performance index based on deviation variables . . . . . . 163
4.10.2 MATLAB code to support GPC with an MFD or CARIMA
model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
4.10.3 MATLAB code to support GPC using an independent model
in MFD format. . . . . . . . . . . . . . . . . . . . . . . . . 165
4.10.4 MATLAB code to support GPC with an augmented state
space model. . . . . . . . . . . . . . . . . . . . . . . . . . 165

5 Tuning GPC: good and bad choices of the horizons 167


5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
5.2 Guidance for the lecturer/reader . . . . . . . . . . . . . . . . . . . 168
5.3 Poor choices lead to poor behaviour . . . . . . . . . . . . . . . . . 169
5.4 Concepts of well-posed and ill-posed optimisations . . . . . . . . . 171
5.4.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
5.4.2 What is an ill-posed objective/optimisation? . . . . . . . . . 174
5.4.2.1 Parameterisation of degrees of freedom . . . . . . 174
xii Contents

5.4.2.2 Choices of performance index . . . . . . . . . . . 175


5.4.2.3 Consistency between predictions and eventual
behaviour . . . . . . . . . . . . . . . . . . . . . 176
5.4.2.4 Summary of how to avoid ill-posed optimisations 178
5.5 Illustrative simulations to show impact of different
parameter choices on GPC behaviour . . . . . . . . . . . . . . . . 179
5.5.1 Numerical examples for studies on GPC tuning . . . . . . . 179
5.5.2 The impact of low output horizons on GPC performance . . 179
5.5.3 The impact of high output horizons on GPC performance . . 182
5.5.3.1 GPC illustrations with ny large and nu = 1 . . . . 182
5.5.3.2 When would a designer use large ny and nu = 1? . 185
5.5.3.3 Remarks on the efficacy of DMC . . . . . . . . . 187
5.5.4 Effect on GPC performance of changing nu and prediction
consistency . . . . . . . . . . . . . . . . . . . . . . . . . . 187
5.5.5 The impact of the input weight λ on the ideal horizons and
prediction consistency . . . . . . . . . . . . . . . . . . . . 191
5.5.6 Summary insights on choices of horizons and weights for
GPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
5.6 Systematic guidance for “tuning” GPC . . . . . . . . . . . . . . . 195
5.6.1 Proposed offline tuning method . . . . . . . . . . . . . . . 196
5.6.2 Illustrations of efficacy of tuning guidance . . . . . . . . . . 196
5.7 MIMO examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
5.8 Dealing with open-loop unstable systems . . . . . . . . . . . . . . 201
5.8.1 Illustration of the effects of increasing the output horizon
with open-loop unstable systems . . . . . . . . . . . . . . . 202
5.8.2 Further comments on open-loop unstable systems . . . . . . 203
5.8.3 Recommendations for open-loop unstable processes . . . . 204
5.9 Chapter summary: guidelines for tuning GPC . . . . . . . . . . . . 205
5.10 Useful MATLAB code . . . . . . . . . . . . . . . . . . . . . . . . 206

6 Dual-mode MPC (OMPC and SOMPC) and stability guarantees 207


6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
6.2 Guidance for the lecturer . . . . . . . . . . . . . . . . . . . . . . . 209
6.3 Foundation of a well-posed MPC algorithm . . . . . . . . . . . . . 209
6.3.1 Definition of the tail and recursive consistency . . . . . . . 210
6.3.2 Infinite horizons and the tail imply closed-loop stability . . 212
6.3.3 Only the output horizon needs to be infinite . . . . . . . . . 213
6.3.4 Stability proofs with constraints . . . . . . . . . . . . . . . 214
6.3.5 Are infinite horizons impractical? . . . . . . . . . . . . . . 215
6.4 Dual-mode MPC – an overview . . . . . . . . . . . . . . . . . . . 216
6.4.1 What is dual-mode control in the context of MPC? . . . . . 216
6.4.2 The structure/parameterisation of dual-mode predictions . . 217
6.4.3 Overview of MPC dual-mode algorithms: Suboptimal MPC
(SOMPC) . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
6.4.4 Is SOMPC guaranteed stabilising? . . . . . . . . . . . . . . 219
Contents xiii

6.4.5 Why is SOMPC suboptimal? . . . . . . . . . . . . . . . . . 220


6.4.6 Improving optimality of SOMPC, the OMPC algorithm . . . 221
6.5 Algebraic derivations for dual-mode MPC . . . . . . . . . . . . . . 222
6.5.1 The cost function for linear predictions over infinite horizons 223
6.5.2 Forming the cost function for dual-mode predictions . . . . 224
6.5.3 Computing the SOMPC control law . . . . . . . . . . . . . 225
6.5.4 Definition of terminal mode control law via optimal control 225
6.5.5 SOMPC reduces to optimal control in the unconstrained case 226
6.5.6 Remarks on stability and performance of SOMPC/OMPC . 227
6.6 Closed-loop paradigm implementations of OMPC . . . . . . . . . 228
6.6.1 Overview of the CLP concept . . . . . . . . . . . . . . . . 229
6.6.2 The SOMPC/OMPC law with the closed-loop paradigm . . 231
6.6.3 Properties of OMPC/SOMPC solved using the CLP . . . . . 233
6.6.3.1 Open-loop unstable systems . . . . . . . . . . . . 233
6.6.3.2 Conditioning and structure of performance index J 233
6.6.4 Using autonomous models in OMPC . . . . . . . . . . . . 234
6.6.4.1 Forming the predicted cost with an autonomous
model . . . . . . . . . . . . . . . . . . . . . . . 235
6.6.4.2 Using autonomous models to support the
definition of constraint matrices . . . . . . . . . . 236
6.6.4.3 Forming the predicted cost with an expanded
autonomous model . . . . . . . . . . . . . . . . . 236
6.6.5 Advantages and disadvantages of the CLP over the open-
loop predictions . . . . . . . . . . . . . . . . . . . . . . . . 237
6.7 Numerical illustrations of OMPC and SOMPC . . . . . . . . . . . 238
6.7.1 Illustrations of the impact of Q, R on OMPC . . . . . . . . . 238
6.7.2 Structure of cost function matrices for OMPC . . . . . . . . 239
6.7.3 Structure of cost function matrices for SOMPC . . . . . . . 240
6.7.4 Demonstration that the parameters of KSOMPC vary with nc . 241
6.7.5 Demonstration that Jk is a Lyapunov function with OMPC
and SOMPC . . . . . . . . . . . . . . . . . . . . . . . . . 241
6.7.6 Demonstration that with SOMPC the optimum decision
changes each sample . . . . . . . . . . . . . . . . . . . . . 243
6.7.7 List of available illustrations . . . . . . . . . . . . . . . . . 244
6.8 Motivation for SOMPC: Different choices for mode 2 of dual-mode
control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
6.8.1 Dead-beat terminal conditions . . . . . . . . . . . . . . . . 247
6.8.2 A zero terminal control law . . . . . . . . . . . . . . . . . 248
6.8.3 Input parameterisations to eliminate unstable modes in the
prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
6.8.4 Reflections and comparison of GPC and OMPC . . . . . . . 249
6.8.4.1 DMC/GPC is practically effective . . . . . . . . . 250
6.8.4.2 The potential role of dual-mode algorithms . . . . 250
6.9 Chapter summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
6.10 MATLAB files in support of this chapter . . . . . . . . . . . . . . 251
xiv Contents

6.10.1 Files in support of OMPC/SOMPC simulations . . . . . . . 251


6.10.2 MATLAB files producing numerical illustrations from
Section 6.7 . . . . . . . . . . . . . . . . . . . . . . . . . . 252

7 Constraint handling in GPC/finite horizon predictive control 253


7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
7.2 Guidance for the lecturer . . . . . . . . . . . . . . . . . . . . . . . 254
7.3 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
7.3.1 Definition of a saturation policy and limitations . . . . . . . 255
7.3.2 Limitations of a saturation policy . . . . . . . . . . . . . . 255
7.3.3 Summary of constraint handling needs . . . . . . . . . . . . 258
7.4 Description of typical constraints and linking to GPC . . . . . . . . 259
7.4.1 Input rate constraints with a finite horizon (GPC predictions) 260
7.4.2 Input constraints with a finite horizon (GPC predictions) . . 261
7.4.3 Output constraints with a finite horizon (GPC predictions) . 262
7.4.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
7.4.5 Using MATLAB to build constraint inequalities . . . . . . . 264
7.5 Constrained GPC . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
7.5.1 Quadratic programming in GPC . . . . . . . . . . . . . . . 267
7.5.2 Implementing constrained GPC in practice . . . . . . . . . 268
7.5.3 Stability of constrained GPC . . . . . . . . . . . . . . . . . 268
7.5.4 Illustrations of constrained GPC with MATLAB . . . . . . 269
7.5.4.1 ILLUSTRATION: Constrained GPC with only
input constraints . . . . . . . . . . . . . . . . . . 269
7.5.4.2 ILLUSTRATION: Constrained GPC with output
constraints . . . . . . . . . . . . . . . . . . . . . 270
7.5.4.3 ILLUSTRATION: Constrained GPC with a
T-filter . . . . . . . . . . . . . . . . . . . . . . . 272
7.5.4.4 ILLUSTRATION: Constrained GPC with an
independent model . . . . . . . . . . . . . . . . . 272
7.6 Understanding a quadratic programming optimisation . . . . . . . 273
7.6.1 Generic quadratic function optimisation . . . . . . . . . . . 273
7.6.2 Impact of linear constraints on minimum of a quadratic
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
7.6.2.1 ILLUSTRATION: Contour curves, constraints
and minima for a quadratic function (7.32) . . . . 274
7.6.2.2 ILLUSTRATION: Impact of change of linear term
in quadratic function (7.34) on constrained mini-
mum . . . . . . . . . . . . . . . . . . . . . . . . 276
7.6.3 Illustrations of MATLAB for solving QP optimisations . . . 277
7.6.4 Constrained optimals may be counter-intuitive: saturation
control can be poor . . . . . . . . . . . . . . . . . . . . . . 278
7.7 Chapter summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
7.8 MATLAB code supporting constrained MPC simulation . . . . . . 280
7.8.1 Miscellaneous MATLAB files used in illustrations . . . . . 280
Contents xv

7.8.2 MATLAB code for supporting GPC based on an MFD model 281
7.8.3 MATLAB code for supporting GPC based on an independent
model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

8 Constraint handling in dual-mode predictive control 283


8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
8.2 Guidance for the lecturer/reader and introduction . . . . . . . . . . 285
8.3 Background and assumptions . . . . . . . . . . . . . . . . . . . . 285
8.4 Description of simple or finite horizon constraint handling approach
for dual-mode algorithms . . . . . . . . . . . . . . . . . . . . . . 287
8.4.1 Simple illustration of using finite horizon inequalities or
constraint handling with dual-mode predictions . . . . . . . 287
8.4.2 Using finite horizon inequalities or constraint handling with
unbiased dual-mode predictions . . . . . . . . . . . . . . . 288
8.4.3 MATLAB code for constraint inequalities with dual-mode
predictions and SOMPC/OMPC simulation examples . . . . 290
8.4.3.1 ILLUSTRATION: Constraint handling in SISO
OMPC . . . . . . . . . . . . . . . . . . . . . . . 290
8.4.3.2 ILLUSTRATION: Constraint handling in MIMO
OMPC . . . . . . . . . . . . . . . . . . . . . . . 291
8.4.4 Remarks on using finite horizon inequalities in dual-mode
MPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
8.4.5 Block diagram representation of constraint handling in dual-
mode predictive control . . . . . . . . . . . . . . . . . . . 292
8.5 Concepts of redundancy, recursive feasibility, admissible sets and
autonomous models . . . . . . . . . . . . . . . . . . . . . . . . . 293
8.5.1 Identifying redundant constraints in a set of inequalities . . 294
8.5.2 The need for recursive feasibility . . . . . . . . . . . . . . . 294
8.5.3 Links between recursive feasibility and closed-loop stability 296
8.5.4 Terminal regions and impacts . . . . . . . . . . . . . . . . 297
8.5.5 Autonomous model formulations for dual-mode predictions 297
8.5.5.1 Unbiased prediction and constraints with
autonomous models . . . . . . . . . . . . . . . . 298
8.5.5.2 Constraint inequalities and autonomous models
with deviation variables . . . . . . . . . . . . . . 299
8.5.5.3 Core insights with dual-mode predictions and
constraint handling . . . . . . . . . . . . . . . . 300
8.5.6 Constraint handling with maximal admissible sets and
invariance . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
8.5.6.1 Maximal admissible set . . . . . . . . . . . . . . 301
8.5.6.2 Concepts of invariance and links to the MAS . . . 306
8.5.6.3 Efficient definition of terminal sets using a MAS . 307
8.5.6.4 Maximal controlled admissible set . . . . . . . . 308
8.5.6.5 Properties of invariant sets . . . . . . . . . . . . . 310
xvi Contents

8.6 The OMPC/SOMPC algorithm using an MCAS to represent


constraint handling . . . . . . . . . . . . . . . . . . . . . . . . . . 311
8.6.1 Constraint inequalities for OMPC using an MCAS . . . . . 311
8.6.2 The proposed OMPC/SOMPC algorithm . . . . . . . . . . 313
8.6.3 Illustrations of the dual-mode prediction structure in OMPC/
SOMPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
8.7 Numerical examples of the SOMPC/OMPMC approach with
constraint handling . . . . . . . . . . . . . . . . . . . . . . . . . . 314
8.7.1 Constructing invariant constraint sets/MCAS using
MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
8.7.2 Closed-loop simulations of constrained OMPC/SOMPC
using ompc_simulate_constraints.m: the regulation case . . 315
8.7.2.1 ILLUSTRATION: ompc_constraints_
example1.m . . . . . . . . . . . . . . . . . . . . 315
8.7.2.2 ILLUSTRATION: ompc_constraints_
example2.m . . . . . . . . . . . . . . . . . . . . 316
8.7.2.3 ILLUSTRATION: ompc_constraints_
example3.m . . . . . . . . . . . . . . . . . . . . 316
8.7.2.4 ILLUSTRATION: For OMPC, the optimal choice
of input perturbation ck does not change . . . . . 317
8.7.3 Closed-loop simulations of constrained OMPC/SOMPC
using ompc_simulate_constraintsb.m: the tracking case . . . 318
8.7.3.1 ILLUSTRATION: ompc_constraints_
example4.m . . . . . . . . . . . . . . . . . . . . 318
8.7.3.2 ILLUSTRATION: ompc_constraints_
example5.m . . . . . . . . . . . . . . . . . . . . 319
8.7.4 More efficient code for the tracking case and disturbance
uncertainty . . . . . . . . . . . . . . . . . . . . . . . . . . 319
8.8 Discussion on the impact of cost function and algorithm selection on
feasibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
8.9 Chapter summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
8.10 Summary of MATLAB code supporting constrained OMPC
simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
8.10.1 Code for supporting SOMPC/OMPC with constraint
handling over a pre-specified finite horizon . . . . . . . . . 325
8.10.2 Code for supporting SOMPC/OMPC with constraint
handling using maximal admissible sets . . . . . . . . . . . 326

9 Conclusions 329
9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
9.2 Design choices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
9.2.1 Scenario and funding . . . . . . . . . . . . . . . . . . . . . 330
9.2.2 Effective tuning . . . . . . . . . . . . . . . . . . . . . . . . 330
9.2.3 Constraint handling and feasibility . . . . . . . . . . . . . . 331
9.2.4 Coding complexity . . . . . . . . . . . . . . . . . . . . . . 332
Contents xvii

9.2.5 Sensitivity to uncertainty . . . . . . . . . . . . . . . . . . . 333


9.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334

A Tutorial and exam questions and case studies 335


A.1 Typical exam and tutorial questions with minimal computation . . . 336
A.2 Generic questions . . . . . . . . . . . . . . . . . . . . . . . . . . 342
A.3 Case study based questions for use with assignments . . . . . . . . 343
A.3.1 SISO example case studies . . . . . . . . . . . . . . . . . . 344
A.3.2 MIMO example case studies . . . . . . . . . . . . . . . . . 346

B Further reading 349


B.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
B.2 Guidance for the lecturer/reader . . . . . . . . . . . . . . . . . . . 350
B.3 Simple variations on the basic algorithm . . . . . . . . . . . . . . . 350
B.3.1 Alternatives to the 2-norm in the performance index . . . . 350
B.3.2 Alternative parameterisations of the degrees of freedom . . 351
B.4 Parametric approaches to solving quadratic programming . . . . . 352
B.4.1 Strengths and weaknesses of parametric solutions in brief . 352
B.4.2 Outline of a typical parametric solution . . . . . . . . . . . 353
B.5 Prediction mismatch and the link to feedforward design in MPC . . 355
B.5.1 Feedforward definition in MPC . . . . . . . . . . . . . . . 356
B.5.2 Mismatch between predictions and actual behaviour . . . . 356
B.6 Robust MPC: ensuring feasibility in the presence of uncertainty . . 358
B.6.1 Constraint softening: hard and soft constraints . . . . . . . . 360
B.6.2 Back off and borders . . . . . . . . . . . . . . . . . . . . . 361
B.7 Invariant sets and predictive control . . . . . . . . . . . . . . . . . 363
B.7.1 Link between invariance and stability . . . . . . . . . . . . 363
B.7.2 Ellipsoidal invariant sets . . . . . . . . . . . . . . . . . . . 364
B.7.3 Maximal volume ellipsoidal sets for constraint satisfaction . 365
B.7.4 Invariance in the presence of uncertainty . . . . . . . . . . . 366
B.7.4.1 Disturbance uncertainty and tube MPC . . . . . . 367
B.7.4.2 Parameter uncertainty and ellipsoidal methods . . 368
B.8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370

C Notation, models and useful background 371


C.1 Guidance for the lecturer/reader . . . . . . . . . . . . . . . . . . . 371
C.2 Notation for linear models . . . . . . . . . . . . . . . . . . . . . . 372
C.2.1 State space models . . . . . . . . . . . . . . . . . . . . . . 372
C.2.2 Transfer function models single-input-single-output and
multi-input-multi-output . . . . . . . . . . . . . . . . . . . 373
C.2.3 Author’s MATLAB notation for SISO transfer function and
MFD models . . . . . . . . . . . . . . . . . . . . . . . . . 374
C.2.4 Equivalence between difference equation format and vector
format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
C.2.5 Step response models . . . . . . . . . . . . . . . . . . . . 376
xviii Contents

C.2.6 Sample rates . . . . . . . . . . . . . . . . . . . . . . . . . 376


C.2.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
C.3 Minimisation of functions of many variables . . . . . . . . . . . . 378
C.3.1 Gradient operation and quadratic functions . . . . . . . . . 378
C.3.2 Finding the minimum of quadratic functions of many
variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
C.4 Common notation . . . . . . . . . . . . . . . . . . . . . . . . . . 380

References 383

Index 397
Overview and guidance for use

The main aim is to create a focussed and affordable textbook which is suitable for a
single or beginners course on model predictive control (MPC). As a consequence:
1. In the early parts of each chapter, an attempt is made not to dwell too
much on the mathematical details and proofs of interest to researchers
but not to a typical student and instead focus as much as possible on the
concepts and understanding needed to apply the method effectively.
2. Many books and resources on MPC cover the basic concepts far too
briefly and focus on more advanced issues. This book does the opposite
and explains the basics slowly and with numerous examples.
3. Numerous illustrative examples are included throughout and also prob-
lems which encourage readers to engage with and understand the con-
cepts.
4. The topic coverage is deliberately limited to a range considered sufficient
for taught modules.
5. Chapters are supported by MATLAB R files which are available on the
open web (or with the book) so that readers can implement basic designs
on-linear models. Numerous student problems encourage readers to learn
by doing/designing.
6. In some cases short videos are available which support key parts of this
book. [http://controleducation.group.shef.ac.uk/indexwebbook.html]
7. Chapters include guidance for the lecturer to help highlight which sec-
tions can be used for a taught module and which could be considered
broadening but non-essential.
Insight is given in a non-theoretical way and there are a number of summary
boxes to give a quick picture of the key results without the need to read through the
detailed explanation. There is a strong focus on the philosophy of predictive control
answering the questions, ‘why?’ and ‘does it help me?’ The basic concepts are in-
troduced and then these are developed to fit different purposes: for instance, how to
model, to predict, to tune, to handle constraints, to ensure feasibility, to guarantee
stability and to consider what options there are with regard to models, algorithms,
complexity versus performance, and so forth.
Research students who want to study predictive control in more depth are advised
to make use of the research literature which is very extensive, but even for them I
hope they find the focus on concepts in this book will be an invaluable foundation.

xix
xx Overview and guidance for use

About the author


Dr. Rossiter has been researching predictive control since the late 1980s and he has
published over 300 articles in journals and conferences on the topic. His particular
contributions have focused on stability, feasibility and computational simplicity. He
also has a parallel interest in developing good practice in university education. He
has a Bachelor’s degree and a Doctorate from the University of Oxford. He spent
nine years as a lecturer at Loughborough University and is currently a reader at:

The University of Sheffield


Department of Automatic Control and Systems Engineering
Mappin Street
Sheffield, S1 3JD
UK
email: J.A.Rossiter@sheffield.ac.uk

Websites:
http://controleducation.group.shef.ac.uk/indexwebbook.html
https://www.sheffield.ac.uk/acse/staff/jar
https://www.youtube.com/channel/UCMBXZxd-j6VqrynykO1dURw

Assumptions about the reader


It is assumed that readers have taken at least a first course in control and thus are
familiar with concepts such as system behaviours, Laplace transforms, z-transforms,
state space models and simple closed-loop analysis. The motivation aspects of Chap-
ter 1 in particular are premised on a reader’s ability to reflect on the efficacy of basic
control design techniques. Otherwise, most material is introduced as required.

MATLAB R is a registered trademark of The Mathworks Inc. For product informa-


tion please contact; The Mathworks Inc., 3 Apple Hill Drive, Natick, MA, 01760
2098, USA. web: www.mathworks.com
Book organisation

Chapter 1: Gives basic motivation and background. This chapter explores, fairly
concisely, control problems where classical approaches are difficult to apply or
obviously suboptimal. It then gives some insight into how prediction forms a
logical foundation with which to solve many such problems and the key compo-
nents required to form a systematic control law.
Chapter 2: Considers how predictions are formed for a number of different model
types. Predictions are a main building block of MPC and thus this is a core skill
users will need. Also explains the concept of unbiased prediction and why this
is important.
Chapter 3: Introduces a very simple to implement and widely applied MPC law,
that is predictive functional control (PFC). Gives numerous illustrative examples
to help readers understand tuning, where PFC is a plausible solution and where
a more expensive MPC approach is more appropriate.
Chapter 4: Introduces the most common MPC performance index/optimisation
used in industrial applications and shows how these are combined with a pre-
diction model to form an effective control law.
Chapter 5: Gives insights and guidance on tuning finite horizon MPC laws. How
do I ensure that I get sensible answers and well-posed decision making? What
is the impact of uncertainty?
Chapter 6: Considers the stability of MPC and shows how a more systematic anal-
ysis of MPC suggests the use of so-called dual-mode predictions and infinite
horizons as these give much stronger performance and stability assurances. In-
troduces the algebra behind these types of MPC approaches.
Chapter 7: Considers constraint handling and why this is an important part of prac-
tical MPC algorithms. Shows how constraints are embedded systematically into
finite horizon MPC algorithms.
Chapter 8: Considers constraint handling with infinite horizon algorithms. It is
noted that while such approaches have more rigour, they are also more compli-
cated to implement and moreover are more likely to encounter feasibility chal-
lenges.
Chapter 9: Gives a concise conclusion and some indication of how a user might
both choose from and design with the variety of MPC approaches available.

xxi
xxii Book organisation

Appendix A: Provides extensive examples and guidance on tutorial questions, ex-


amination questions and assignments. Also includes some case studies that can
be used as a basis for assignments. Outline solutions are available from the pub-
lisher to staff adopting the book.
Appendix B: Gives a brief taster for a number of issues deserving further study.
Parametric methods are a tool for moving the online optimisation computa-
tions to offline calculations, thus improving transparency of the control law.
It is demonstrated that feedforward information can easily be misused with a
careless MPC design. There is also some discussion of common methods for
handling uncertainty.
Appendix C: Summarises basic notation and common background used throughout
the book.
MATLAB: Examples are supported throughout by MATLAB simulations; all the
MATLAB files for this are available to the reader so they can reproduce and
modify the scenarios for themselves. Sections at the end of each chapter sum-
marise the MATLAB code available on an open website; also available from the
publisher’s website.
http://controleducation.group.shef.ac.uk/htmlformpc/introtoMPCbook.html
STUDENT PROBLEMS: Problems for readers to test their understanding and to
direct useful private study/investigations are embedded throughout the book in
the relevant sections rather than at chapter endings. In the main these are open-
ended.
Not included: It is not the purpose of this book to write history but rather to state
what is now understood and how to use this. Other books and many journal
articles (e.g., [5, 16, 41, 94, 100, 177]) already give good historical accounts.
Also, it is not the intention to be comprehensive but rather to cover the basics
well, so many topics are excluded, a notable one being non-linear systems.
Acknowledgements

Enormous thanks to my wife Diane Rossiter who has per-


formed an incredibly diligent and careful proof reading and
editing as well as provided a number of useful critical com-
ments.

Also thanks to all the people I have collaborated with


over the years from whom I have learnt a lot which is
now embedded within this work and with apologies to the
many not listed here: Basil Kouvaritakis, Jesse Gossner,
Scott Trimboli, Luigi Chisci, Liuping Wang, Sirish Shah,
Mark Cannon, Colin Jones, Ravi Gondalaker, Jan Schur-
rmans, Lars Imsland, Jacques Richalet, Robert Haber, Bilal
Khan, Guillermo Valencia Palomo, Il Seop Choi, Wai Hou
Lio, Adham Al Sharkawi, Evans Ejegi, Shukri Dughman,
Yahya Al-Naumani, Muhammad Abdullah, Bryn Jones and
many more.

xxiii
1
Introduction and the industrial need for
predictive control

CONTENTS
1.1 Guidance for the lecturer/reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Motivation and introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Classical control assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3.1 PID compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3.2 Lead and Lag compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.3 Using PID and lead/lag for SISO control . . . . . . . . . . . . . . . . . . . 4
1.3.4 Classical control analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Examples of systems hard to control effectively with classical
methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4.1 Controlling systems with non-minimum phase zeros . . . . . . . 5
1.4.2 Controlling systems with significant delays . . . . . . . . . . . . . . . . 7
1.4.3 ILLUSTRATION: Impact of delay on margins and
closed-loop behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4.4 Controlling systems with constraints . . . . . . . . . . . . . . . . . . . . . . . 10
1.4.5 Controlling multivariable systems . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.6 Controlling open-loop unstable systems . . . . . . . . . . . . . . . . . . . 16
1.5 The potential value of prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.5.1 Why is predictive control logical? . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.5.2 Potential advantages of prediction . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.6 The main components of MPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.6.1 Prediction and prediction horizon . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.6.2 Why is prediction important? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.6.3 Receding horizon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.6.4 Predictions are based on a model . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.6.5 Performance indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.6.6 Degrees of freedom in the predictions or prediction class . . . 27
1.6.7 Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.6.8 Constraint handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.6.9 Multivariable and interactive systems . . . . . . . . . . . . . . . . . . . . . . 30
1.6.10 Systematic use of future demands . . . . . . . . . . . . . . . . . . . . . . . . . 31
1.7 MPC philosophy in summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
1.8 MATLAB files from this chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

1
2 A first course in predictive control: 2nd Edition

1.9 Reminder of book organisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

1.1 Guidance for the lecturer/reader


This chapter is intended primarily as motivational and background material which
need not be part of the assessment of a typical module on predictive control. As
such, it is largely non-mathematical and readers should not struggle with reading any
parts of it.
Nevertheless, this content could be assessed through an essay/bookwork type
question within an exam, or if desired, aspects of this content could be included
through case studies within an assignment.

1.2 Motivation and introduction


A useful starting point for any book is to motivate the reader: why do I need this book
or topic? Consequently this chapter will begin by demonstrating the numerous sce-
narios where classical control approaches are inadequate. Not too much time is spent
on this as this is motivational, but hopefully enough for the reader to be convinced
that there are a significant number of real control problems where better approaches
are required.
Having given some motivation, next this chapter gives some insight into how
humans deal with such challenging control problems and demonstrates the underly-
ing concepts, often prediction, which ultimately form the main building blocks of
predictive control.
Predictive control is very widely implemented in industry and hence a key ques-
tion to ask is why? In fact, more specifically, readers will want to know when predic-
tive control is a logical choice from the many control approaches available to them.
A key point to note is that predictive control is an approach, not a specific algorithm.
The user needs to tailor the approach to their specific needs in order to produce an
effective control law.
It is more important that readers understand key concepts than specific algo-
rithms.
1. Why is it done this way?
2. What is the impact of uncertainty?
3. How does this change with constraints?
4. What are the tuning parameters and how can I use them? Which
choices are poor and why?
5. Etc.
Introduction and the industrial need for predictive control 3

Consequently, although this book includes technical details, the underlying fo-
cus is on readers understanding the concepts and thus how to ensure the algorithm
and tuning they choose is likely to lead to an effective control law for their specific
context.
Section 1.3 will give a concise review of some classical control approaches be-
fore Section 1.4 demonstrates a number of scenarios where such approaches are dif-
ficult to tune effectively, or suboptimal. Section 1.5 then introduces arguments for a
predictive control approach, followed by Section 1.6 which uses analysis of human
behaviour to set out solid principles before we move into mathematical detail. The
overall MPC philosophy is summarised in Section 1.7 followed by Section 1.9 which
gives a concise summary of the structure of the book.

1.3 Classical control assumptions


It is not the purpose of this book to teach classical control or to give a comprehensive
view of the control techniques used in industry. Nevertheless, it is useful to begin
from a brief summary of the sorts of techniques which are commonly used (e.g.,
[32, 108]). For convenience and clarity, these will be presented in the simplest forms.

1.3.1 PID compensation


PID or proportional, integral and derivative control laws are the most commonly
adopted structure in industry. Their ubiquity and success is linked to the three pa-
rameters being intuitive feedback parameters and simple to tune for many cases.
KI
K(s) = K p + + Kd s (1.1)
s
1. Proportional or K p : The magnitude of the control action is proportional to
the size of the error. As the proportional is increased, the response to error
becomes more aggressive leading to faster responses. If the proportional
is too small, the response to error is very slow. Usually, at least for systems
with simple dynamics, a proportional exists which gives the right balance
between speed of response and input activity.
2. Integral or KI : Proportional alone cannot enable output tracking as, in
steady-state, the output of the proportional is only non-zero if the track-
ing error is non-zero. Integration of the error is an obvious (also human
based strategy) and simple mechanism to enable a non-zero steady-state
controller output, even when the steady-state error is zero. As with pro-
portional, KI must not be too large or it will induce oscillation and not too
small or one will get very slow convergence.
3. Derivative or Kd : An obvious component to detect the rate at which the er-
ror is reducing and change the input accordingly - if the error is reducing
4 A first course in predictive control: 2nd Edition

too fast it is highly likely that the control is too aggressive and a reduction
in input is needed to avoid overshoot and oscillation. However, the deriva-
tive is often selected to be zero as it has a high gain at high frequency and
thus can accentuate noise and lead to input chatter. Such discussions are
beyond the remit of this book.
Several tuning rules for PID are given in the literature but actually, for a typical
system, one could arrive at close to optimum values with very little trial and error
using a simulation package.

1.3.2 Lead and Lag compensation


To some extent Lead and Lag (e.g., Equation (1.2)) discussions can be subsumed
into PID compensation. A lead Klead acts a little like a derivative, but with lower
sensitivity to high frequency noise and thus can be used to reduce oscillation and
overshoot. A Lag Klag acts a little like an integral in that it increases low frequency
gain, but this can be at the expense of bandwidth (speed of response). No more will
be said here.
s+w s + w/α
Klag = K ; Klead = K ; α >1 (1.2)
s + w/α s+w

1.3.3 Using PID and lead/lag for SISO control


Many real systems have relatively simple dynamics and there is one very important
observation that is used by control practitioners and theoreticians alike.
For single input single output (SISO) systems, if the system dynamic can be well
approximated by a second-order system which is not noticeably under-damped, then
the control you can achieve from a PID compensator is usually quite close to the best
you can get from optimal control or any other advanced strategy. In other words, you
need a good reason not to use a PID type of approach!
Of course this begs the question, when would you deviate from advocating PID
and hence the next few sections give some examples.

1.3.4 Classical control analysis


Some parts of this chapter assume that readers are familiar with analysis techniques
such as root-loci, Nyquist diagrams and the like. We will not use these to any great
depth but readers will find it useful to undertake a quick revision of those topics
if necessary. Suitable materials are well covered in all mainstream classical control
textbooks and also there are some videos and summary resources on the author’s
website [http://controleducation.group.shef.ac.uk/indexwebbook.html].
Another random document with
no related content on Scribd:
que lo que su padre Fileno había
dicho era verdad, y cuanto más
imaginó en ello, más lo tuvo por
cierto. Tanto que bravo y
desesperado, ansí por el engaño
que de Silveria había recebido
como por el que sospechaba que
yo le había hecho, se fué de la
aldea y nunca más ha parescido.
Yo que supe de su partida y la
causa della por relación de
algunos pastores amigos suyos, á
quien él había dado larga cuenta
de todo, me salí del aldea por
buscarle, y mientras viva no
pararé hasta hallar mi dulce
esposo, para darle mi disculpa,
aunque sepa después morir á sus
manos. Mucho ha que ando
peregrinando en esta demanda, y
por más que en todas las
principales aldeas y cabañas de
pastores he buscado, jamás la
fortuna me ha dado noticia de mi
Montano. La mayor ventura que
en este viaje he tenido fué, que
dos días después que partí de mi
aldea hallé en un valle la traidora
Silveria, que sabiendo el
voluntario destierro de Montano,
iba siguiéndole, por descubrirle la
traición que le había hecho y
pedirle perdón por ella,
arrepentida de haber cometido
tan horrenda alevosía. Pero hasta
entonces no le había hallado, y
como á mí me vido, me contó
abiertamente cómo había
passado el negocio, y fué para mí
gran descanso saber la manera
con que se nos había hecho la
traición. Quise dalle la muerte con
mis manos, aunque flaca mujer,
pero dejé de hacerlo, porque sólo
ella podía remediar mi mal
declarando su misma maldad.
Roguéle con gran priessa fuesse
á buscar á mi amado Montano
para dalle noticia de todo el
hecho, y despedíme della para
buscarle yo por otro camino.
Llegué hoy á este bosque, donde
convidada de la amenidad y
frescura del lugar, hice assiento
para tener la siesta; y pues la
fortuna acá por mi consuelo os ha
guiado, yo le agradezco mucho
este favor, y á vosotros os ruego,
que pues es ya casi medio día, si
possible es, me hagáis parte de
vuestra graciosa compañía,
mientras durare el ardor del sol,
que en semejante tiempo se
muestra riguroso. Diana y
Marcelio holgaron en extremo de
escuchar la historia de Ismenia y
saber la causa de su pena.
Agradesciéronle mucho la cuenta
que les había dado de su vida, y
diéronle algunas razones para
consuelo de su mal,
prometiéndole el possible favor
para su remedio. Rogáronle
también que fuesse con ellos á la
casa de la sabia Felicia, porque
allí sería possible hallar alguna
suerte de consolación. Fueron
assí mesmo de parescer de
reposar allí, en tanto que durarían
los calores de la siesta, como
Ismenia había dicho. Pero como
Diana era muy plática en aquella
tierra, y sabía los bosques,
fuentes, florestas, lugares
amenos y sombríos della, les dijo
que otro lugar había más ameno y
deleitoso que aquel, que no
estaba muy lejos, y que fuessen
allá, pues aún no era llegado el
medio día. De manera que
levantándose todos, caminaron
un poco espacio, y luego llegaron
á una floresta donde Diana los
guió; y era la más deleitosa, la
más sombría y agradable que en
los más celebrados montes y
campañas de la pastoral Arcadia
puede haber. Había en ella muy
hermosos alisos, sauces y otros
árboles, que por las orillas de las
cristalinas fuentes, y por todas
partes con el fresco y suave
airecillo blandamente movidas,
deleitosamente murmuraban. Allí
de la concertada harmonía de las
aves, que por los verdes ramos
bulliciosamente saltaban, el aire,
tan dulcemente resonaba, que los
ánimos, con un suave regalo,
enternescia. Estaba sembrada
toda de una verde y menuda
hierba, entre la cual se
levantaban hermosas y variadas
flores, que con diversos matices
el campo dibujando, con suave
olor el más congojado espíritu
recreaban. Allí solían los
cazadores hallar manadas
enteras de temerosos ciervos, de
cabras montesinas y de otros
animales, con cuya prisión y
muerte se toma alegre
pasatiempo. Entraron en esta
floresta siguiendo todos á Diana,
que iba primera y se adelantó un
poco para buscar una espessura
de árboles, que ella para su
esposo en aquel lugar tenía
señalada, donde muchas veces
solía recrearse. No habían
andado mucho, cuando Diana
llegando cerca del lugar que ella
tenía por el más ameno de todos,
y donde quería que tuviessen la
siesta, puesto el dedo sobre los
labios, señaló á Marcelio y á
Ismenia que viniessen á espacio y
sin hacer ruido. La causa era,
porque había oído dentro aquella
espessura cantos de pastores. En
la voz le parescieron Tauriso y
Berardo, que por ella entrambos
penados andaban, como está
dicho. Pero por sabello más
cierto, llegándose más cerca un
poco por entre unos acebos y
lantiscos, estuvo acechando por
conoscellos, y vido que eran ellos
y que tenían allí en su compañía
una muy hermosa dama, y un
preciado caballero, los cuales,
aunque parescían estar algo
congojados y mal tratados del
camino, pero todavía en el gesto
y disposición descubrían su valor.
Después de haber visto los que
allí estaban, se apartó, por no ser
vista. En esto llegaron Marcelio é
Ismenia, y todos juntos se
sentaron tras unos jarales, donde
no podían ser vistos y podían oir
distincta y claramente el cantar de
los pastores, cuyas voces, por
toda la floresta resonando,
movían concertada melodía,
como oiréis en el siguiente libro.

Fin del libro segundo.


LIBRO TERCERO
DE DIANA ENAMORADA

La traición y maldad de una


ofendida y maliciosa mujer suele
emprender cosas tan crueles y
abominables, que no hay ánimo
del más bravo y arriscado varón
que no dudasse de hacerlas y no
temblase de solo pensarlas. Y lo
peor es que la Fortuna es tan
amiga de mudar los buenos
estados, que les da á ellas
cumplido favor en sus empresas;
pues sabe que todas se
encaminan á mover extrañas
novedades y revueltas, y vienen á
ser causa de mil tristezas y
tormentos. Gran crueldad fue la
de Felisarda en ser causa que un
padre con tan justa, aunque
engañosa causa, aborresciesse
su propio hijo, y que un marido
con tan vana y aparente
sospecha desechasse su querida
mujer, pero mayor fue la ventura
que tuvo en salir con su fiero y
malicioso intento. No sirva esto
para que nadie tenga de las
mujeres mal parescer, si no para
que viva cada cual recatado,
guardándose de las semejantes á
Felisarda, que serán muy pocas;
pues muchas dellas son dechado
del mundo y luz de vida, cuya fe,
discreción y honestidad meresce
ser con los más celebrados
uersos alabada. De lo cual da
claríssima prueba Diana y
Ismenia, pastoras de señalada
hermosura y discreción, cuya
historia publica manifiestamente
sus alabanzas. Pues prosiguiendo
en el discurso della, sabréis que
cuando Marcelio y ellas
estuvieron tras los jarales
assentadas, oyeron que Tauriso y
Berardo cantaban desta manera:

Terços esdruccioles.

BERARDO
Tauriso, el fresco viento, que
alegrándonos
murmura entre los árboles
altíssimos,
la vista y los oídos
deleitándonos;
Las chozas y sombríos
ameníssimos;
las cristalinas fuentes, que
abundancia
derraman de licores
sabrosíssimos;
La colorada flor, cuya
fragrancia
á despedir bastara la
tristicia,
que hace al corazón más
fiera instancia:
No vencen la braveza y la
malicia
del crudo rey, tan áspero y
mortífero,
cuyo castigo es pura sin
justicia.
Ningún remedio ha sido
salutífero
á mi dolor, pues siempre
enbraveciéndose
está el veneno y tóxico
pestífero.

TAURISO
Al que en amores anda
consumiéndose,
nada le alegrará: porque
fatígale
tal mal, que en el dolor vive
muriéndose.
Amor le da más penas, y
castígale,
cuando en deleites anda
recreándose,
porque él á suspirar contino
oblígale.
Las veces que está un ánima
alegrándose,
le ofresce allí un dolor, cuya
memoria
hace que luego vuelva á
estar quejándose.
Amor quiere gozar de su
victoria,
y al hombre que venció,
mátale ó préndele,
pensando en ello haber
famosa gloria.
El preso á la fortuna entrega, y
véndele
al gran dolor, que siempre
está matándole,
y al que arde en más
ardiente llama enciéndele.

BERARDO
El sano vuelve enfermo,
maltratándole,
y el corazón alegre hace
tristíssimo,
matando el vivo, el libre
captivándole.
Pues, alma, ya que sabes
cuán bravíssimo
es este niño Amor, sufre y
conténtate
con verte puesta en un lugar
altíssimo.
Rescibe los dolores, y
preséntate
al daño que estuviere
amenazándote,
goza del mal y en el dolor
susténtate.
Porque cuanto más fueres
procurándote
medio para salir de tu
miseria,
irás más en los lazos
enredándote.

TAURISO
En mí halla Cupido más
materia
para su honor, que en
cuantos lamentándose
guardan ganado en una y
otra Hesperia.
Siempre mis males andan
aumentándose,
de lágrimas derramo mayor
copia
que Biblis cuando en fuente
iba tornándose.
Extraño me es el bien, la pena
propia,
Diana, quiero ver, y en vella
muérome,
junto al tesoro estó, y muero
de inopia.
Si estoy delante della, peno y
quiérome
morir de sobresalto y de
cuidado,
y cuando estoy ausente,
desespérome.

BERARDO
Murmura el bosque y ríe el
verde prado,
y cantan los parleros
ruiseñores;
mas yo en dos mil tristezas
sepultado.

TAURISO
Espiran suave olor las tiernas
flores,
la hierba reverdesce al
campo ameno;
mas yo viviendo en ásperos
dolores.

BERARDO
El grave mal de mí me tiene
ajeno,
tanto que no soy bueno
para tener diez versos de
cabeza.

TAURISO
Mi lengua en el cantar siempre
tropieza,
por esso, amigo, empieza,
algún cantar de aquellos
escogidos,
los cuales estorbados con
gemidos,
con lloro entrerompidos,
te hicieron de pastores
alabado.
BERARDO
En el cantar contigo
acompañado,
iré muy descansado;
respóndeme. Mas no sé qué
me cante.

TAURISO
Di la que dice: Estrella
radiante,
ó la de: O triste amante,
ó aquella: No sé como se
decía,
que la cantaste un día
bailando con Diana en el
aldea.

BERARDO
No hay tigre ni leona que no
sea
á compassión movida
de mi fatiga extraña y
peligrosa;
mas no la fiera hermosa,
fiera devoradora de mi vida.

TAURISO
Fiera devoradora de mi vida,
¿quién si no tú estuviera
con la dureza igual á la
hermosura?
y en tanta desventura
¿cómo es possible, ay triste,
que no muera?

BERARDO
¿Cómo es possible, ay triste,
que no muera?
dos mil veces muriendo;
¿mas cómo he de morir
viendo á Diana?
El alma tengo insana:
cuanto más trato Amor,
menos le entiendo.

TAURISO
Cuanto más trato Amor,
menos le entiendo,
que al que le sirve mata,
y al que huyendo va de su
cadena,
con redoblada pena
las míseras entrañas le
maltrata.

BERARDO
Pastora, á quien el alto cielo
ha dado
beldad más que á las rosas
coloradas,
más linda que en Abril el
verde prado,
do están las florecidas
matizadas,
ansí prospere el cielo tu
ganado,
y tus ovejas crezcan á
manadas,
que á mí, que á causa tuya
gimo y muero,
no me muestres el gesto
airado y fiero.

TAURISO
Pastora soberana, que
mirando
los campos y florestas
asserenas,
la nieve en la blancura
aventajando
y en la beldad las frescas
azucenas,
ansí tus campos vayan
mejorando,
y dellos cojan fruto á manos
llenas,
que mires á un pastor, que
en solo verte
piensa alcanzar muy
venturosa suerte.

A este tiempo el caballero y la


dama, que los cantares de los
pastores escuchaban, con gran
cortesía atajaron su canto, y les
hicieron muchas gracias por el
deleite y recreación que con tan
suave y deleitoso música les
habían dado. Y después desto el
caballero vuelto á la dama le dijo:
¿Oiste jamás, hermana, en las
soberbias ciudades música que
tanto contente al oído y tanto
deleite el ánimo como la destos
pastores? Verdaderamente, dijo
ella, más me satisfacen esos
rústicos y pastoriles cantos de
una simple llaneza acompañados,
que en los palacios de reyes y
señores las delicadas voces con
arte curiosa compuestas y con
nuevas invenciones y variedades
requebradas. Y cuando yo tengo
por mejor esta melodía que
aquélla, se puede creer que lo es,
porque tengo el oido hecho á las
mejores músicas que en ciudad
del mundo ni corte de rey
pudiessen hacerse. Que en aquel
buen tiempo que Marcelio servía
á nuestra hermana Alcida,
cantaba algunas noches en la
calle al son de una vihuela tan
dulcemente, que si Orpheo hacía
tan apacible música, no me
espanto que las fieras
conmoviesse, y que la cara
Eurydice de averno escurissimo
sacasse. ¡Ay! Marcelio, ¿dónde
estás agora? ¡Ay! ¿dónde estás,
Alcida? Ay desdichada de mí, que
siempre la fortuna me trae á la
memoria cosas de dolor, en el
tiempo que me ve gozar de un
simple passatiempo! Oyó
Marcelio, que con las dos
pastoras tras las matas estaba,
las razones del caballero y de la
dama, y como entendió que le
nombraron á él y á Alcida, se
alteró. No se fió de sus mesmos
oídos, y estuvo imaginando si era
quizá otro Marcelio y Alcida los
que nombraban. Levantóse presto
de donde assentado estaba, y por
salir de duda, llegándose más, y
acechando por entre las matas,
conosció que el caballero y la
dama eran Polydoro y Clenarda,
hermanos de Alcida. Corrió
súbitamente á ellos, y con los
brazos abiertos y lágrimas en los
ojos, agora á Polydoro, agora á
Clenarda abrazando, estuvo gran
rato, que el interno dolor no le
dejaba hablar palabra. Los dos
hermanos, espantados desta
novedad, no sabían qué les había
acontescido. Y como Marcelio
iba en hábito de pastor, nunca le
conoscieron, hasta que, dándole
lugar los sollozos, y habida
licencia de las lágrimas, les dijo:
¡Oh, hermanos de mi corazón, no
tengo en nada mi desventura,
pues he sido dichoso en veros!
¿Cómo Alcida no está en vuestra
compañía? ¿Está por ventura
escondida en alguna espesura
deste bosque? Sepa yo nuevas
della, si vosotros las sabéis;
remediad por Dios esta mi pena, y
satisfaced á mi deseo. En esto lo
dos hermanos conoscieron á
Marcelio, y abrazados con él,
llorando de placer y dolor, le
decían: ¡Oh venturoso día! ¡oh
bien nunca pensado! ¡oh hermano
de nuestra alma! ¿qué desastre
tan bravo ha sido causa que tú no
goces de la compañía de Alcida ni
nosotros de su vista? ¿por qué
con tan nuevo traje te dissimulas?
¡Ay áspera fortuna! en fin no hay
en ningún bien cumplido
contentamiento. Por otra parte,
Diana é Ismenia, visto que tan
arrebatadamente Marcelio había
entrado donde cantaban los
pastores, fueron allá tras él, y
halláronle passando con Polydoro
y Clenarda la plática que habeis
oído. Cuando Tauriso y Berardo
vieron á Diana, no se puede
encarescer el gozo que recibieron
de tan improvisa vista. Y ansi
Tauriso, señalando con el gesto
y palabras la alegría del corazón,
le dijo: Grande favor es este de la
Fortuna, hermosa Diana, que la
que huye siempre de nuestra
compañía, por casos y succesos
nunca imaginados venga tantas
veces donde nosotros estamos.
No es causa dello la Fortuna,
señalados pastores, dijo Diana,
sino ser vosotros en el cantar y
tañer tan ejercitados, que no hay
lugar de recreación donde no os
hagáis sentir vuestras canciones.
Pero pues aquí llegué sin saber
de vosotros, y el sol toca ya la
raya del medio día, me holgaré de
tener en este deleitoso lugar la
siesta en vuestra compañía, que
aunque me importa llegar con
tiempo á la casa de Felicia, tendré
por bien de detenerme aquí con
vosotros, por gozar de la fresca
vereda y escuchar vuestra
deleitosa música. Por esso
aparejaos á cantar y tañer, y á
toda suerte de regocijo, que no
será bien que falte semejante
placer en tan principal
ajuntamiento. Y vosotros,
generosos caballeros y dama,
poned fin por agora á vuestras
lágrimas, que tiempo ternéis para
contaros las vidas los unos á los
otros y para doleros ó alegraros
de los malos ó buenos sucessos
de fortuna. A todos paresció muy
bien lo dicho por Diana, y ansí en
torno de una clara fuente sobre la
menuda hierba se assentaron.
Era el lugar el más apacible de
aquel bosque y aun de cuantos
en el famoso Parthenio, celebrado
con la clara zampoña del
Neapolitano Syncero pueden
hallarse. Había en él un espacio
casi que cuadrado, que tuviera
como hasta cuarenta passos por
cada parte, rodeado de
muchedumbre de espessíssimos
árboles, tanto que, á la manera de
un cercado castillo, á los que allá
iban á recrearse no se les
concedía la entrada sino por sola
una parte. Estaba sembrado este
lugar de verdes hierbas y
olorosas flores, de los pies de
ganados no pisadas ni con sus
dientes descomedidamente
tocadas. En medio estaba una
limpia y claríssima fuente, que del
pie de un antiquíssimo roble
saliendo, en un lugar hondo y
cuadrado, no con maestra mano
fabricado, mas por la provida
naturaleza allí para tal efecto
puesto, se recogía: haciendo allí
la abundancia de las aguas un
gracioso ajuntamiento, que los
pastores le nombraban la fuente
bella. Eran las orillas desta fuente
de una piedra blanca tan igual,
que no creyera nadie que con
artificiosa mano no estuviesse
fabricada, si no desengañaran la
vista las naturales piedras allí
nascidas, y tan fijas en el suelo
como en los ásperos montes de
fragosas peñas y duríssimos
pedernales. El agua que de
aquella abundantíssima fuente
sobresalía, por dos estrechas
canales derramándose, las
hierbas vecinas y árboles
cercanos regaba, dándoles
continua fertilidad y vida y
sosteniéndolas en muy apacible y
graciosíssima verdura. Por estas
lindezas que tenía esta hermosa
fuente, era de los pastores y
pastoras tan visitada, que nunca
en ella faltaban pastoriles
regocijos. Pero teníanla los
pastores en tanta veneración y
cuenta, que viniendo á ella
dejaban fuera sus ganados, por
no consentir que las claras y
sabrosas aguas fuessen
enturbiadas, ni el ameno
pradecillo de las mal miradas
ovejas hollado ni apascentado. En
torno desta fuente, como dije,
todos se asentaron, y sacando de
los zurrones la necessaria
provissión, comieron con más
sabor que los grandes señores la
muchedumbre y variedad de
curiosos manjares. Al fin de la
cual comida, como Marcelio por
una parte y Polydoro por otra
deseaban por extremo darse y
tomarse cuenta de sus vidas,
Marcelio fue primero á hablar, y
dijo: Razón será, hermanos, que
yo sepa algo de lo que os ha
sucedido después que no me
vistes, que como os veo del padre
Eugerio y de la hermana Alcida
desacompañados, tengo el
corazón alterado, por no saber la
causa dello. A lo cual respondió
Polydoro:
Porque me parece que este lugar
queda muy perjudicado con que
se traten en él cosas de dolor, y
no es razón que estos pastores
con oir nuestras desdichas
queden ofendidos, te contaré con

You might also like