Predictive Control: For Linear and Hybrid Systems
Predictive Control: For Linear and Hybrid Systems
     Preface
     Dynamic optimization has become a standard tool for decision making in a wide
     range of areas. The search for the most fuel-efficient strategy to send a rocket into
     orbit or the most economical way to start up a chemical production facility can
     be expressed as dynamic optimization problems that are solved almost routinely
     nowadays.
        The basis for these dynamic optimization problems is a dynamic model, for
     example,
                            x(k + 1) = g(x(k), u(k)), x(0) = x0
     that describes the evolution of the state x(k) with time, starting from the initial
     condition x(0), as it is affected by the manipulated input u(k). Here g(x, u) is
     some nonlinear function. Throughout the book we are assuming that this discrete-
     time description, i.e., the model of the underlying system, is available. The goal
     of the dynamic optimization procedure is to find the vector of manipulated inputs
     UN = [u(0)′ , ..., u(N − 1)′ ]′ such that the objective function is optimized over some
     time horizon N , typically
                                      N
                                      X −1
                              minUN          q(x(k), u(k)) + p(x(N ))
                                      k=0
     The terms q(x, u) and and p(x) are referred to as the stage cost and terminal cost,
     respectively. Many practical problems can be put into this form and many algo-
     rithms and software packages are available to determine the optimal solution vector
       ∗
     UN  , the optimizer. The various algorithms exploit the structure of the particular
     problem, e.g., linearity and convexity, so that even large problems described by
     complex models and involving many degrees of freedom can be solved efficiently
     and reliably.
         One difficulty with this idea is that, in practice, the sequence of u(0), u(1), ...,
     which is obtained by this procedure cannot be simply applied. The model of the
     system predicting its evolution is usually inaccurate and the system may be affected
     by external disturbances that may cause its path to deviate significantly from the
     one that is predicted. Therefore, it is common practice to measure the state after
     some time period, say one time step, and to solve the dynamic optimization problem
     again, starting from the measured state x(1) as the new initial condition. This
     feedback of the measurement information to the optimization endows the whole
     procedure with a robustness typical for closed-loop systems.
         What we have described above is usually referred to as Model Predictive Control
     (MPC), but other names like Open Loop Optimal Feedback and Reactive Schedul-
     ing have been used as well. Over the last 25 years MPC has evolved to dominate
     the process industry, where it has been employed for thousands of problems [241].
         The popularity of MPC stems from the fact that the resulting operating strategy
     respects all the system and problem details, including interactions and constraints,
     something that would be very hard to accomplish in any other way.
         Indeed, often MPC is used for the regulatory control of large multivariable
     linear systems with constraints, where the objective function is not related to an
     economical objective, but is simply chosen in a mathematically convenient way,
                                                                                         iii
namely quadratic in the states and inputs, to yield a “good” closed-loop response.
Again, there is no other controller design method available today for such systems,
that provides constraint satisfaction and stability guarantees.
    One limitation of MPC is that running the optimization algorithm on-line at
each time step requires substantial time and computational resources. Today, fast
computational platforms together with advances in the field of operation research
and optimal control have enlarged in a very significant way the scope of appli-
cability of MPC to fast-sampled applications. One approach is to use tailored
optimization routines which exploit both the structure of the MPC problem and
the architecture of the embedded computing platform to implement MPC in the
order of milliseconds.
    The second approach is to have the result of the optimization pre-computed
and stored for each x in the form of a look-up table or as an algebraic function
u(k) = f (x(k)) which can be easily evaluated. In other words, we want to determine
the (generally nonlinear) feedback control law f (x) that generates the optimal
u(k) = f (x(k)) explicitly and not just implicitly as the result of an optimization
problem. It requires the solution of the Bellman equation and has been a long
standing problem in optimal control. A clean simple solution exists only in the case
of linear systems with a quadratic objective function, where the optimal controller
turns out to be a linear function of the state (Linear Quadratic Regulator, LQR).
For all other cases a solution of the Bellman equation was considered prohibitive
except for systems of low dimension (2 or 3), where a look-up table can be generated
by gridding the state space and solving the optimization problem off-line for each
grid point.
    The major contribution of this book is to show how the nonlinear optimal feed-
back controller can be calculated efficiently for some important classes of systems,
namely linear systems with constraints and switched linear systems or, more gen-
erally, hybrid systems. Traditionally, the design of feedback controllers for linear
systems with constraints, for example anti-windup techniques, was ad hoc requiring
both much experience and trial and error. Though significant progress has been
achieved on anti-windup schemes over the last decade, these techniques deal with
input constraints only and cannot be extended easily.
    The classes of constrained linear systems and linear hybrid systems treated in
this book cover many, if not most, practical problems. The new design techniques
hold the promise to lead to better performance and a dramatic reduction in the
required engineering effort.
    The book is structured in five parts. Chapters marked with a star (∗) are
considered “advanced” material and can be skipped without compromising the
understanding of the fundamental concepts presented in the book.
   • In the first part of the book (Part I) we recall the main concepts and results of
     convex and discrete optimization. Our intent is to provide only the necessary
     background for the understanding of the rest of the book. The material of
     this part follows closely the presentation from the following books and lecture
     notes: “Convex optimization” by Boyd and Vandenberghe [65], “Nonlinear
     Programming Theory and Algorithms” by Bazaraa, Sherali and Shetty [27],
     “LMIs in Control” by Scherer and Weiland [258] and “Lectures on Polytopes”
     by Ziegler [296].
iv
     • In the third part of the book (Part III) we introduce the general class of
       optimal control problems studied in the book. Chapter 7 contains the basic
       definitions and essential concepts. Chapter 8 presents standard results on
       Linear Quadratic Optimal Control while in Chapter 9 unconstrained optimal
       control problems for linear systems with cost functions based on 1 and ∞
       norms are analyzed.
     • In the fourth part of the book (Part IV) we focus on linear systems with
       polyhedral constraints on inputs and states. We start with a self-contained
       introduction to controllability, reachability and invariant set theory in Chap-
       ter 10. The chapter focuses on computational algorithms for constrained
       linear systems and constrained linear systems subject to additive and para-
       metric uncertainty.
       In Chapter 11 we study finite time and infinite time constrained optimal
       control problems with cost functions based on 2, 1 and ∞ norms. We first
       show how to transform them into LP or QP optimization problems for a fixed
                                                                                         v
     initial condition. Then we show that the solution to all these optimal control
     problems can be expressed as a piecewise affine state feedback law. Moreover,
     the optimal control law is continuous and the value function is convex and
     continuous. The results form a natural extension of the theory of the Linear
     Quadratic Regulator to constrained linear systems.
     Chapter 12 presents the concept of Model Predictive Control. Classical feasi-
     bility and stability issues are shown through simple examples and explained
     by using invariant set methods. Finally we show how they can be addressed
     with a proper choice of the terminal constraints and the cost function.
     The result in Chapter 11 and Chapter 12 have important consequences for
     the implementation of MPC laws. Precomputing off-line the explicit piece-
     wise affine feedback policy reduces the on-line computation for the receding
     horizon control law to a function evaluation, therefore avoiding the on-line
     solution of a mathematical program. However, the number of polyhedral re-
     gions of the explicit optimal control laws could grow exponentially with the
     number of constraints in the optimal control problem. Chapter 13 discusses
     approaches to define approximate explicit control laws of desired complexity
     that provide certificates of recursive feasibility and stability.
     Chapter 14 focuses on efficient on-line methods for the computation of RHC
     control laws. If the state-feedback solution is available explicitly, we present
     efficient on-line methods for the evaluation of explicit piecewise affine control
     laws. In particular, we present algorithms to reduce its storage demands and
     computational complexity. If the on-line solution of a quadratic or linear
     program is preferred, we briefly discuss how to improve the efficiency of a
     mathematical programming solver by exploiting the structure of the RHC
     control problem.
     Part IV closes with Chapter 15 where we address the robustness of the opti-
     mal control laws. We discuss min-max control problems for uncertain linear
     systems with polyhedral constraints on inputs and states and present an ap-
     proach to compute their state feedback solutions. Robustness is achieved
     against additive norm-bounded input disturbances and/or polyhedral para-
     metric uncertainties in the state space matrices.
   • In the fifth part of the book (Part V) we focus on linear hybrid systems. We
     give an introduction to the different formalisms used to model hybrid systems
     focusing on computation-oriented models (Chapter 16). In Chapter 17 we
     study finite time optimal control problems with cost functions based on 2, 1
     and ∞ norms. The optimal control law is shown to be, in general, piecewise
     affine over non-convex and disconnected sets. Along with the analysis of the
     solution properties we present algorithms that compute the optimal control
     law for all the considered cases.
     Acknowledgements
      • Large parts of the material presented in this book are extracted from the work
        of the authors Francesco Borrelli, Alberto Bemporad and Manfred Morari.
      • Several sections contain the results of the PhD theses of Miroslav Baric, Mato
        Baotic, Fabio Torrisi, Domenico Mignone, Pascal Grieder, Eric Kerrigan,
        Tobias Geyer and Frank J. Christophersen.
      • We are extremely grateful to Martin Herceg for his meticulous work on the
        Matlab
R
                 examples and all the book figures.
      • A special thanks goes to Michal Kvasnica, Stefan Richter, Valerio Turri,
        Thomas Besselmann and Rick Meyer for their help on the construction of the
        examples.
      • Our gratitude also goes to the colleagues who have carefully read preliminary
        versions of the book and gave us suggestions on how to improve them. They
        include Dimitri Bertsekas, Miroslav Fikar, Paul Goulart, Per Olof Gutman,
        Diethard Klatte, Bill Levine, David Mayne and all the students of our classes
        on Model Predictive Control.
      • The authors of the LaTex book style files and macros are Stephen Boyd
        and Lieven Vandenberghe. We are most grateful to Stephen and Lieven for
        sharing them with us.
      • Over many years ABB provided generous financial support making possible
        the fundamental research reported in this book.
      • The authors of Chapter 3 are Dr. Alexander Domahidi and Dr. Stefan Richter
        (domahidi@embotech.com, richters@alumni.ethz.ch).
      • The author of Chapter 13 is Prof. Colin N. Jones (colin.jones@epfl.ch).
Contents
I   Basics of Optimization                                                                        1
1 Main Concepts                                                                                    3
  1.1 Optimization Problems . . . . . . . . . . . . . . . . . . . .       .   .   .   .   .   .    3
      1.1.1 Continuous Problems . . . . . . . . . . . . . . . .           .   .   .   .   .   .    4
            Active, Inactive and Redundant Constraints . . . .            .   .   .   .   .   .    5
            Problems in Standard Forms . . . . . . . . . . . .            .   .   .   .   .   .    5
            Eliminating Equality Constraints . . . . . . . . . .          .   .   .   .   .   .    5
            Problem Description . . . . . . . . . . . . . . . . .         .   .   .   .   .   .    6
      1.1.2 Integer and Mixed-Integer Problems . . . . . . . .            .   .   .   .   .   .    6
  1.2 Convexity . . . . . . . . . . . . . . . . . . . . . . . . . . .     .   .   .   .   .   .    6
            Operations preserving convexity . . . . . . . . . .           .   .   .   .   .   .    7
            Linear and quadratic convex functions . . . . . . .           .   .   .   .   .   .    8
            Convex optimization problems . . . . . . . . . . .            .   .   .   .   .   .    8
  1.3 Optimality Conditions . . . . . . . . . . . . . . . . . . . .       .   .   .   .   .   .    9
      1.3.1 Optimality Conditions for Unconstrained Problems              .   .   .   .   .   .    9
  1.4 Lagrange Duality Theory . . . . . . . . . . . . . . . . . .         .   .   .   .   .   .   10
      1.4.1 Strong Duality and Constraint Qualifications . . .            .   .   .   .   .   .   12
      1.4.2 Certificate of Optimality . . . . . . . . . . . . . . .       .   .   .   .   .   .   13
  1.5 Complementary Slackness . . . . . . . . . . . . . . . . . .         .   .   .   .   .   .   13
  1.6 Karush-Kuhn-Tucker Conditions . . . . . . . . . . . . . .           .   .   .   .   .   .   14
      1.6.1 Geometric Interpretation of KKT Conditions . . .              .   .   .   .   .   .   17
        4.5.1   Set-Difference . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
        4.5.2   Polytope Covering . . . . . . . . . . . . . . . . . . . . . . . . 91
        4.5.3   Union of P-collections . . . . . . . . . . . . . . . . . . . . . . 92
II    Multiparametric Programming                                                     93
5 Multiparametric Nonlinear Programming                                      95
  5.1 Introduction to Multiparametric Programs . . . . . . . . . . . . . . . 95
  5.2 General Results for Multiparametric Nonlinear Programs . . . . . . 98
Bibliography                                                                      419
xiv                                                                                Contents
Sets
       A′                          Transpose of matrix A
       A−1                         Inverse of matrix A
       A†                          Generalized Inverse of A, A† = (A′ A)−1 A′
       det(A)                      Determinant of matrix A
       A ≻ ()0                    A symmetric positive (semi)definite matrix, x′ Ax > (≥)0, ∀x 6= 0
       A ≺ ()0                    A symmetric negative (semi)definite matrix, x′ Ax < (≤)0, ∀x 6= 0.
       Ai                          i-th row of matrix A
       xi                          i-th element of vector x, or vector x at time-step i depending on the context
       x ∈ Rn , x > 0 (x ≥ 0)      True iff xi > 0 (xi ≥ 0) ∀ i = 1, . . . , n
       x ∈ Rn , x < 0 (x ≤ 0)      True iff xi < 0 (xi ≤ 0) ∀ i = 1, . . . , n
       |x|, x ∈ R                  Absolute value of x
       kxk                         Any vector norm of x                        pPn
       kxk2                        Euclidian norm of vector x ∈ Rn , kxk2 =        i=1 |xP
                                                                                         i|
                                                                                            2
                                                                                              n
       kxk1                        Sum of absolute elements of vector x ∈ Rn , kxk1 = i=1 |xi |
       kxk∞                        Largest absolute value of the vector x ∈ Rn , kxk∞ = maxi∈{1,...,n}
                                                                                                 P            |xi |
       kSk∞                        Matrix ∞-norm of S ∈ Cm×n , i.e., kSk∞ = maxi∈{1,...,m} nj=1 |si,j |
                                                                                                P
       kSk1                        Matrix 1-norm of S ∈ Cm×n , i.e., kSk1 = maxj∈{1,...,n} m      i=1 |si,j |
       I                           Identity matrix
       1                           Vector of ones, 1 = [1 1 . . . 1]′
       0                           Vector of zeros, 0 = [0 0 . . . 0]′
Contents                                                                                 xv
      Acronyms
      ARE        Algebraic Riccati Equation
      CLQR       Constrained Linear Quadratic Regulator
      CFTOC      Constrained Finite Time Optimal Control
      CITOC      Constrained Infinite Time Optimal Control
      DP         Dynamic Program(ming)
      LMI        Linear Matrix Inequality
      LP         Linear Program(ming)
      LQR        Linear Quadratic Regulator
      LTI        Linear Time Invariant
      MILP       Mixed Integer Linear Program
      MIQP       Mixed Integer Quadratic Program
      MPC        Model Predictive Control
      mp-LP      multi-parametric Linear Program
      mp-QP      multi-parametric Quadratic Program
      PWA        Piecewise Affine
      PPWA       Piecewise Affine on Polyhedra
      PWP        Piecewise Polynomial
      PWQ        Piecewise Quadratic
      QP         Quadratic Program(ming)
      RHC        Receding Horizon Control
      rhs        right-hand side
      SDP        Semi Definite Program(ming)
        Part I
Basics of Optimization
      Chapter 1
Main Concepts
      In this chapter we recall the main concepts and definitions of continuous and dis-
      crete optimization. Our intent is to provide only the necessary background for
      the understanding of the rest of the book. The notions of feasibility, optimality,
      convexity and active constraints introduced in this chapter will be widely used in
      this book.
                                      inf z       f (z)
                                                                                       (1.1)
                                      subj. to    z ∈ S ⊆ Z,
      where the vector z collects the decision variables, Z is the optimization problem
      domain, S ⊆ Z is the set of feasible or admissible decisions. The function f : Z → R
      assigns to each decision z a cost f (z) ∈ R. We will often use the following shorter
      form of problem (1.1)
                                              inf f (z).                               (1.2)
                                           z∈S⊆Z
                                          f ∗ = inf f (z).
                                                 z∈S
f (z) ≥ f (z ∗ ) = f ∗ ∀z ∈ S, with z ∗ ∈ S,
        A problem of determining whether the set of feasible decisions is empty and, if not,
        to find a point which is feasible, is called a feasibility problem.
   A feasible point z̄ is locally optimal for problem (1.4) if there exists an R > 0
such that
                 f (z̄) = inf z        f (z)
                            subj. to gi (z) ≤ 0 for i = 1, . . . , m
                                       hi (z) = 0 for i = 1, . . . , p          (1.7)
                                       kz − z̄k ≤ R
                                       z ∈ Z.
Roughly speaking, this means that z̄ is the minimizer of f (z) in a feasible neigh-
borhood of z̄ defined by kz − z̄k ≤ R. The point z̄ is called a local optimizer or
local minimizer.
                        inf z       f (z)
                                                                                       (1.8)
                        subj. to    gi (z) ≤ 0   for i = 1, . . . , m.
The simplest way to remove equality constraints is to replace them with two in-
equalities for each equality, i.e., hi (z) = 0 is replaced by hi (z) ≤ 0 and −hi (z) ≤ 0.
Such a method, however, can lead to poor numerical conditioning and may ruin
the efficiency and accuracy of a numerical solver.
    If one can explicitly parameterize the solution of the equality constraint hi (z) =
0, then the equality constraint can be eliminated from the problem. This process
can be described in a simple way for linear equality constraints. Assume the equal-
ity constraints to be linear, Az − b = 0, with A ∈ Rp×s . If Az = b is inconsistent
then the problem is infeasible. The general solution of the equation Az = b can be
expressed as z = F x + z0 where F is a matrix of full rank whose spanned space
coincides with the null space of the A matrix, i.e., R(F ) = N (A), F ∈ Rs×k ,
6                                                                                     1   Main Concepts
          where k is the dimension of the null space of A. The variable x ∈ Rk is the new
          optimization variable and the original problem becomes
                             inf x       f (F x + z0 )
                                                                                                   (1.9)
                             subj. to    gi (F x + z0 ) ≤ 0      for i = 1, . . . , m.
              We want to point out that in some cases the elimination of equality constraints
          can make the problem harder to analyze and understand and can make a solver
          less efficient. In large problems it can destroy useful structural properties of the
          problem such as sparsity. Some advanced numerical solvers perform elimination
          automatically.
          Problem Description
          The functions f, gi and hi can be available in analytical form or can be described
          through an oracle model (also called “black box” or “subroutine” model). In an
          oracle model f, gi and hi are not known explicitly but can be evaluated by querying
          the oracle. Often the oracle consists of subroutines which, called with the argument
          z, return f (z), gi (z) and hi (z) and their gradients ∇f (z), ∇gi (z), ∇hi (z). In
          the rest of the book we assume that analytical expressions of the cost and the
          constraints of the optimization problem are available.
          If the decision set Z in the optimization problem (1.2) is finite, then the optimiza-
          tion problem is called combinatorial or discrete. If Z ⊆ {0, 1}s , then the problem
          is said to be integer.
              If Z is a subset of the Cartesian product of an integer set and a real Euclidian
          space, i.e., Z ⊆ {[zc , zb ] : zc ∈ Rsc , zb ∈ {0, 1}sb }, then the problem is said to be
          mixed-integer. The standard formulation of a mixed-integer nonlinear program is
    1.2   Convexity
          A set S ∈ Rs is convex if
                                                     PN
  3. If f1 , . . . , fN are convex functions, then    i=1   αi fi is a convex function for all
     αi ≥ 0, i = 1, . . . , N .
f1 (z), . . . , fk (z) convex functions ⇒ f (z) = max{f1 (z), . . . , fk (z)} is a convex function.
    Theorem 1.1 Consider a convex optimization problem and let z̄ be a local opti-
    mizer. Then, z̄ is a global optimizer.
        to determine its global minimum. Convexity also plays a major role in most non-
        convex optimization problems which are solved by iterating between the solutions
        of convex sub-problems.
            It is difficult to determine whether the feasible set S of the optimization prob-
        lem (1.4) is convex or not except in special cases. For example, if the functions
        g1 (z), . . . , gm (z) are convex and all the hi (z) (if any) are affine in z, then the feasible
        set S in (1.6) is an intersection of convex sets and therefore convex. Moreover there
        are non-convex problems which can be transformed into convex problems through
        a change of variables and manipulations of cost and constraints. The discussion of
        this topic goes beyond the scope of this overview on optimization. The interested
        reader is referred to [65].
              Remark 1.1 With the exception of trivial cases, integer and mixed-integer optimiza-
              tion problems are always non-convex problems because {0, 1} is not a convex set.
                                 inf z       f (z)
                                 subj. to    gi (z) ≤ 0    for i = 1, . . . , m
                                                                                                 (1.12)
                                             hj (z) = 0     for j = 1, . . . , p
                                             z ∈ Z.
        Solutions are usually computed by iterative algorithms which start from an initial
        guess z0 and at step k generate a point zk such that the sequence {f (zk )}k=0,1,2,...
        converges to f ∗ as k increases. These algorithms iteratively use and/or solve condi-
        tions for optimality, i.e., analytical conditions that a point z must satisfy in order
        to be an optimizer. For instance, for convex, unconstrained optimization prob-
        lems with a smooth cost function the most commonly used optimality criterion
        requires the gradient to vanish at the optimizer, i.e., z is an optimizer if and only
        if ∇f (z) = 0. In this chapter we summarize necessary and sufficient optimality
        conditions for unconstrained and constrained optimization problems.
        The proofs of the theorems presented next can be found in Chapter 4 and Section
        8.6.1 of [27].
            Necessary conditions
       Sufficient condition
            Theorem 1.3 Suppose that f : Rs → R is twice differentiable at z̄. If
            ∇f (z̄) = 0 and the Hessian of f (z) at z̄ is positive definite, then z̄ is a
            local minimizer.
       Necessary and sufficient condition
            Theorem 1.4 Suppose that f : Rs → R is differentiable at z̄. If f is convex,
            then z̄ is a global minimizer if and only if ∇f (z̄) = 0.
          When the optimization is constrained and the cost function is not sufficiently
       smooth, the conditions for optimality become more complicated. The intent of this
       chapter is to give an overview of some important optimality criteria for constrained
       nonlinear optimization. The optimality conditions derived here will be the main
       building blocks for the theory developed later in this book.
in order to reconstruct the original problem on the right-hand side of the expression.
Since for arbitrary u ≥ 0 and v
we obtain
                         inf L(z, u, v) ≤              inf                 f (z).           (1.18)
                         z∈Z                z∈Z, g(z)≤0, h(z)=0
provides us with a lower bound to the original problem. The “best” lower bound
is obtained by maximizing problem (1.19) over the dual variables
and its optimal solution, if it exists, is denoted by (u∗ , v ∗ ). The dual cost d(u, v)
is the optimal value of an unconstrained optimization problem. Problem (1.20)
is called the Lagrange dual subproblem. Only points (u, v) with d(u, v) > −∞
are interesting for the Lagrange dual problem. A point (u, v) will be called dual
feasible if u ≥ 0 and d(u, v) > −∞. d(u, v) is always a concave function since
it is the pointwise infimum of a family of affine functions of (u, v). This implies
12                                                                                       1   Main Concepts
        that the dual problem is a convex optimization problem (max of a concave function
        over a convex set) even if the original problem is not convex. Therefore, it is easier
        in principle to solve the dual problem than the primal (which is in general non-
        convex). However, in general, the solution to the dual problem is only a lower
        bound of the primal problem:
        Such a property is called weak duality. In a simpler form, let f ∗ and d∗ be the
        primal and dual optimal value, respectively,
            Remark 1.2 We have shown that the dual problem is a convex optimization problem
            even if the original problem is non-convex. As stated in this section, for non-convex
            optimization problems it is “easier” to solve the dual problem than the primal prob-
            lem. However the evaluation of d(ū, v̄) at a point (ū, v̄) requires the solution of the
            non-convex unconstrained optimization problem (1.20), which, in general, is “not
            easy”.
        This means that the best lower bound obtained by solving the dual problem coin-
        cides with the optimal cost of the primal problem. In general, strong duality does
        not hold, even for convex primal problems. Constraint qualifications are condi-
        tions on the constraint functions which imply strong duality for convex problems.
        A detailed discussion on constraint qualifications can be found in Chapter 5 of [27].
            A well known simple constraint qualification is “Slater’s condition”:
        (g(ẑ) ≤ 0, h(ẑ) = 0) and for which gj (ẑ) < 0 for all j for which gj is not an affine
        function.
              Remark 1.3 Note that Slater’s condition reduces to feasibility when all inequality
              constraints are linear and Z = Rn .
        Theorem 1.5 (Slater’s theorem) Consider the primal problem (1.22a) and its
        dual problem (1.22b). If the primal problem is convex, Slater’s condition holds and
        f ∗ is bounded then d∗ = f ∗ .
Therefore
                                           f (z ∗ ) ≤ f (z ∗ ) + u∗ ′ g(z ∗ ) ≤ f (z ∗ ).                          (1.26)
                                                                                            Pm
       From the last equation we can conclude that u∗ ′ g(z ∗ ) =                            i=1    u∗i gi (z ∗ ) = 0 and
       since u∗i ≥ 0 and gi (z ∗ ) ≤ 0, we have
u∗i gi (z ∗ ) = 0, i = 1, . . . , m. (1.27)
where equations (1.29d)-(1.29e) are the primal feasibility conditions, equation (1.29c)
is the dual feasibility condition and equation (1.29b) are the complementary slack-
ness conditions.
    Conditions (1.29a)-(1.29e) are called the Karush-Kuhn-Tucker (KKT) condi-
tions. We have shown that the KKT conditions are necessary conditions for any
primal-dual optimal pair if strong duality holds and the cost and constraints are
differentiable, i.e., any primal and dual optimal points z ∗ , (u∗ , v ∗ ) must satisfy
the KKT conditions (1.29). If the primal problem is also convex then the KKT
conditions are sufficient, i.e., a primal dual pair z ∗ , (u∗ , v ∗ ) which satisfies condi-
tions (1.29a)-(1.29e) is a primal dual optimal pair with zero duality gap.
    There are several theorems which characterize primal and dual optimal points
z ∗ and (u∗ , v ∗ ) by using KKT conditions. They mainly differ on the type of
constraint qualification chosen for characterizing strong duality. Next we report
just two examples.
    If a convex optimization problem with differentiable objective and constraint
functions satisfies Slater’s condition, then the KKT conditions provide necessary
and sufficient conditions for optimality.
Theorem 1.6 [27, p. 244] Consider problem (1.12) and let Z be a nonempty set
of Rs . Suppose that problem (1.12) is convex and that cost and constraints f , gi and
hi are differentiable at a feasible z ∗ . If problem (1.12) satisfies Slater’s condition
then z ∗ is optimal if and only if there are (u∗ , v ∗ ) that, together with z ∗ , satisfy
the KKT conditions (1.29).
If a convex optimization problem with differentiable objective and constraint func-
tions has a linearly independent set of active constraints gradients, then the KKT
conditions provide necessary and sufficient conditions for optimality.
Theorem 1.7 (Section 4.3.7 in [27]) Consider problem (1.12) and let Z be a
nonempty open set of Rs . Let z ∗ be a feasible solution and A = {i : gi (z ∗ ) =
0} be the set of active constraints at z ∗ . Suppose cost and constraints f , gi are
differentiable at z ∗ for all i and that hj are continuously differentiable at z ∗ for
all j. Further, suppose that ∇gi (z ∗ ) for i ∈ A and ∇hj (z ∗ ) for j = 1, . . . , p, are
linearly independent. If z ∗ , (u∗ , v ∗ ) are primal and dual optimal points, then they
satisfy the KKT conditions (1.29). In addition, if problem (1.12) is convex, then
z ∗ is optimal if and only if there are (u∗ , v ∗ ) that, together with z ∗ , satisfy the
KKT conditions (1.29).
16                                                                             1   Main Concepts
z2
(1, 1)
∇g2 (1, 0)
∇f (1, 0)
z1
∇g1 (1, 0)
(1, −1)
           Figure 1.1 Example 1.1. Constraints, feasible set and gradients. The fea-
           sible set is the point (1, 0) that satisfies neither Slater’s condition nor the
           constraint qualification condition in Theorem 1.7.
     The KKT conditions play an important role in optimization. In a few special cases
     it is possible to solve the KKT conditions (and therefore, the optimization problem)
     analytically. Many algorithms for convex optimization are conceived as, or can be
     interpreted as, methods for solving the KKT conditions as Boyd and Vandenberghe
     observe in [65].
        The following example [27] shows a convex problem where the KKT conditions
     are not fulfilled at the optimum. In particular, both the constraint qualifications
     of Theorem 1.7 and Slater’s condition in Theorem 1.6 are violated.
                                         min    z1
                                                                                             (1.30)
                                     subj. to   (z1 − 1)2 + (z2 − 1)2 ≤ 1
                                                (z1 − 1)2 + (z2 + 1)2 ≤ 1
         From the graphical interpretation in Figure 1.1 it is immediate that the feasible set is a
         single point z̄ = [1, 0]′ . The optimization problem does not satisfy Slater’s conditions
         and moreover z̄ does not satisfy the constraint qualifications in Theorem 1.7. At
         the optimum z̄ equation (1.29a) cannot be satisfied for any pair of nonnegative real
         numbers u1 and u2 .
        1.6   Karush-Kuhn-Tucker Conditions                                                     17
                                                 g2
                                 0
                                                   (z
                               )≤
                                                    ≤ )
                             g1 (z
                                                          0
                                                                     −∇f (z2 )
                                            g(z) ≤ 0                       ∇g2 (z2 )
                                                                          z2   ∇g3 (z2 )
                                                                         0
                                                                 )   ≤
                                                              (z
                                                          g3
                     Figure 1.2 Geometric interpretation of KKT conditions [27].
        where A = {1, 2} at z1 and A = {2, 3} at z2 . This means that the negative gradient
        of the cost at the optimum −∇f (z ∗ ) (which represents the direction of steepest
        descent) has to belong to the cone spanned by the gradients of the active constraints
        ∇gi , (since inactive constraints have the corresponding Lagrange multipliers equal
        to zero). In Figure 1.2, condition (1.31) is not satisfied at z2 . In fact, one can
        move within the set of feasible points g(z) ≤ 0 and decrease f , which implies that
        z2 is not optimal. At point z1 , on the other hand, the cost f can only decrease
        if some constraint is violated. Any movement in a feasible direction increases the
        cost. Conditions (1.31) are fulfilled and hence z1 is optimal.
18   1   Main Concepts
      Chapter 2
      This chapter focuses on two widely known and used subclasses of convex optimiza-
      tion problems: linear and quadratic programs. They are popular because many
      important practical problems can be formulated as linear or quadratic programs
      and because they can be solved efficiently. Also, they are the basic building blocks
      of many other optimization algorithms. This chapter presents their formulation
      together with their main properties and some fundamental results.
F = P ∩ {z ∈ Rs : c′ z = c0 }, (2.2)
                                                      a3′
                                                         x≤
                                                  4
                                                                b3
                                            ≤b
                                          a4′ x
                                                                     b2
                                                                ≤
                                            a1′ x ≤
                                                               2x
                                                               a′
                                                      b1
                                           inf z           c′ z
                                           subj. to        Az = b                              (2.5)
                                                           z ≥ 0.
        Let P be the feasible set (1.6) of problem (2.3). As Z = Rs , this implies that P
        is a polyhedron defined by the inequality constraints in (2.3). If P is empty, then
2.2    Linear Programming                                                                             21
                                P
                                                                                                  P
z∗
                                     k1                                                      k1
                                k2                                                      k2
                           k3                                                      k3
                      k4                                                      k4
Z∗
                                          k4
                                               k3
                                                    k2
                                                         k1
                                     (c) Case 3. Multiple optimizers Z ∗ .
the problem is infeasible. We will assume for the following discussion that P is
not empty. Denote by f ∗ the optimal value and by Z ∗ the set of optimizers of
problem (2.3)
                             Z ∗ = argminz∈P c′ z.
Three cases can occur.
Case 2. The LP solution is bounded, i.e., f ∗ > −∞ and the optimizer is unique.
    z ∗ = Z ∗ is a singleton.
             The level curves of the cost function c′ z are represented by the parallel lines.
        All points z belonging both to the line c′ z = ki and to the polyhedron P are feasible
        points with an associated cost ki , with ki < ki−1 . Solving (2.3) amounts to finding
        a feasible z which belongs to the level curve with the smallest cost ki . Since the
        gradient of the cost is c, the direction of steepest descent is −c/kck.
             Case 1 is depicted in Figure 2.2(a). The feasible set P is unbounded. One can
        move in the direction of steepest descent −c and be always feasible, thus decreasing
        the cost to −∞. Case 2 is depicted in Figure 2.2(b). The optimizer is unique and
        it coincides with one of the vertices of the feasible polyhedron. Case 3 is depicted
        in Figure 2.2(c). The whole facet of the feasible polyhedron P is optimal, i.e., the
        cost for any point z belonging to the facet equals the optimal value f ∗ . In general,
        the optimal facet will be a facet of the polyhedron P parallel to the hyperplane
        c′ z = 0.
             From the analysis above we can conclude that the optimizers of any bounded
        LP always lie on the boundary of the feasible polyhedron P.
2.2.2 Dual of LP
        Since we are interested only in cases where d is finite, from the relation above we
        conclude that the dual problem is
                                         supu       −u′ w
                                         subj. to   −G′ u = c                                 (2.7)
                                                    u ≥ 0,
                                         inf u      w′ u
                                         subj. to   G′ u = −c                                 (2.8)
                                                    u ≥ 0.
        Note that for LPs feasibility implies strong duality (Remark 1.3).
        2.2   Linear Programming                                                                  23
                                      G′ u + c    =    0,                               (2.9a)
                                 ui (Gi z − wi ) =     0, i = 1, . . . , m              (2.9b)
                                            u ≥        0,                               (2.9c)
                                       Gz − w ≤        0.                               (2.9d)
        Consider the LP (2.3). Let I = {1, . . . , m} be the set of constraint indices. For any
        A ⊆ I, let GA and wA be the submatrices of G and w, respectively, comprising
        the rows indexed by A and denote with Gj and wj the j-th row of G and w,
        respectively. Let z be a feasible point and consider the set of active and inactive
        constraints at z:
                                    A(z) = {i ∈ I : Gi z = wi }
                                                                                         (2.10)
                                  N A(z) = {i ∈ I : Gi z < wi }.
        From (2.10) we have
                                       GA(z∗ ) z ∗ = wA(z∗ )
                                                                                        (2.11)
                                       GN A(z∗ ) z ∗ < wN A(z∗ ) .
        Lemma 2.1 Assume that the feasible set P of problem (2.3) is bounded. If the
        LICQ is violated at z1∗ ∈ Z ∗ then there exists z2∗ ∈ Z ∗ such that |A(z2∗ )| > s.
        Consider z1∗ ∈ Z ∗ on an optimal facet. Lemma 2.1 states the simple fact that if
        LICQ is violated at z1∗ , then there is a vertex z2∗ ∈ Z ∗ on the same facet where
        |A(z2∗ )| > s. Thus, violation of LICQ is equivalent to having more than s constraints
        active at an optimal vertex.
        Figure 2.3 depicts a case of primal degeneracy with four constraints active at the
        optimal vertex, i.e., more than the minimum number two.
24                                              2       Linear and Quadratic Optimization
                                                    3
                                     5
P 2
z∗
                                                                    1
                                                          4
     Definition 2.3 The LP (2.3) is said to be dual degenerate if its dual problem is
     primal degenerate.
         The LICQ condition is invoked so that the optimization problem is well behaved
     in a way we will explain next. Let us look at the equality constraints of the
     dual problem (2.8) at the optimum G′ u∗ = −c or equivalently G′A u∗A = −c since
     u∗N A = 0. If LICQ is satisfied then the equality constraints will allow only a unique
     optimizer u∗ . If LICQ is not satisfied, then the dual may have multiple optimizers.
     Thus we have the following Lemma.
     Lemma 2.2 If the primal problem (2.3) is not degenerate then the dual problem
     has a unique optimizer. If the dual problem (2.8) is not degenerate, then the primal
     problem has a unique optimizer.
     Multiple dual optimizers imply primal degeneracy and multiple primal optimizers
     imply dual degeneracy but the reverse is not true as we will illustrate next. In
     other words LICQ is only a sufficient condition for uniqueness of the dual.
                                     Primal
                                     inf [−1 − 1]x
                                                             
                                         0   1                1                      (2.12)
                                      1     1              1 
                                               x ≤           
                                      −1    0              0 
                                         0  −1                0
     2.2    Linear Programming                                                                             25
                                      Dual
                                      inf [1 1 0 0]u
                                                              
                                         0 1 −1      0         1                            (2.13)
                                                          u=
                                         1 1     0   −1        1
                                      u≥0
           Substituting for u3 and u4 from the equality constraints in (2.13) we can rewrite the
           dual as
                                        Dual          
                                                    u1
                                        inf [1 1]
                                                 u2           
                                           1 0               0                          (2.14)
                                         0 1  u1           1 
                                                              
                                         1 1  u2 ≥  1 
                                           0 1                 0
x2 u2
 2
              primal solution                                            dual solution
max
min
                                 1        x1                                                          u1
               (a) Primal LP.                                                (b) Dual LP.
             Figure 2.4 Example 2.1. LP with Primal and Dual Degeneracy. The vectors
             max and min point in the direction for which the objective improves. The
             feasible sets are shaded.
           Consider the two solutions for the primal LP denoted with 1 and 2 in Figure 2.4(a)
           and referred to as “basic” solutions. Basic solution 1 is primal non-degenerate, since
           it is defined by exactly as many active constraints as there are variables. Basic solu-
           tion 2 is primal degenerate, since it is defined by three active constraints, i.e., more
           than two. Any convex combination of optimal solutions 1 and 2 is also optimal. This
           continuum of optimal solutions in the primal problem corresponds to a degenerate
           solution in the dual space, that is, the dual problem is primal-degenerate. Hence
           the primal problem is dual-degenerate. In conclusion, Figures 2.4(a) and 2.4(b) show
           an example of a primal problem with multiple optima and the corresponding dual
26                                                       2      Linear and Quadratic Optimization
            Next we want to show that the statement “if the dual problem is primal degenerate
            then the primal problem has multiple optima” is, in general, not true. Switch dual
            and primal problems, i.e., call the “dual problem” primal problem and the “primal
            problem” dual problem (this can be done since the dual of the dual problem is the
            primal problem). Then, we have a dual problem which is primal degenerate in solution
            2 while the primal problem does not present multiple optimizers.
        or [65]:
                             f (z) =    minε     ε
                                                 c′i z + di ≤ ε, i = 1, . . . , k          (2.17)
                                                 z ∈ R.
        See Figure 2.5 for an illustration of the idea.
           Consider the following optimization problem
                                       f ∗ = minz                f (z)
                                             subj. to            Gz ≤ w                    (2.18)
                                                                 z ∈ R,
where the cost function has the form (2.15). Substituting (2.17) this becomes
                            f∗ =    minz,ε       ε
                                    subj. to     Gz ≤ w
                                                                                           (2.19)
                                                 c′i z + di ≤ ε, i = 1, . . . , k
                                                 z ∈ R.
           The previous result can be extended to the sum of continuous and convex
        piecewise affine functions. Let f : R ⊆ Rs → R be defined as:
                                                        r
                                                        X
                                            f (z) =           f j (z),                     (2.20)
                                                        j=1
        with
                                                          ′
                                f j (z) = max {cji z + dji }, z ∈ R.                       (2.21)
                                           i=1,...,kj
      2.3    Quadratic Programming                                                                                  27
c′4 z + d4
c′1 z + d1 c′3 z + d3
                                f (z)
                                                      c′2 z   + d2
R1 R2 R3 R4
Figure 2.5 Convex PWA function described as the max of affine functions.
                                         f ∗ = minz                    f (z)
                                               subj. to                Gz ≤ w                              (2.22)
                                                                       z ∈ R,
      where the cost function has the form (2.20), can be solved by the following linear
      program:
                      f ∗ = minz,ε1 ,...,εr ε1 + · · · + εr
                             subj. to       Gz ≤ w
                                               ′
                                            c1i z + d1i ≤ ε1 , i = 1, . . . , k 1
                                               ′
                                            c2i z + d2i ≤ ε2 , i = 1, . . . , k 2 (2.23)
                                            ..
                                             .
                                                       cri ′ z + dri ≤ εr , i = 1, . . . , k r
                                                       z ∈ R.
            Remark 2.1 Note that the results of this section can be immediately applied to the
            minimization of one or infinity norms. For any y ∈ R, |y| = max {y, −y}. Therefore
            for any Q ∈ Rk×s and p ∈ Rk :
            and
                                        k
                                        X                        k
                                                                 X
                      kQz − pk1 =             |Qi ′ z + pi | =         max{Qi ′ z + pi , −Qi ′ z − pi }.
                                        i=1                      i=1
                                                                                      z∗
                                z∗
P P
         Let P be the feasible set (1.6) of problem (2.24). As Z = Rs , this implies that P is
         a polyhedron defined by the inequality constraints in (2.24). The two dimensional
         geometric interpretation is depicted in Figure 2.6. The level curves of the cost
         function 12 z ′ Hz+q ′ z+r are represented by the ellipsoids. All the points z belonging
         both to the ellipsoid 12 z ′ Hz + q ′ z + r = ki and to the polyhedron P are feasible
         points with an associated cost ki . The smaller the ellipsoid, the smaller is its cost
         ki . Solving (2.24) amounts to finding a feasible z which belongs to the level curve
         with the smallest cost ki . Since H is strictly positive definite, the QP (2.24) cannot
         have multiple optima nor unbounded solutions. If P is not empty the optimizer is
         unique. Two cases can occur if P is not empty:
Case 1. The optimizer lies strictly inside the feasible polyhedron (Figure 2.6(a)).
         Case 2. The optimizer lies on the boundary of the feasible polyhedron (Fig-
             ure 2.6(b)).
        2.3   Quadratic Programming                                                                  29
2.3.2   Dual of QP
        Consider the QP (2.24)
                                                       1 ′
                                           minz        2 z Hz+ q′ z
                                           subj. to    Gz ≤ w.
        The Lagrange function as defined in (1.14) is
                                               1 ′
                                 L(z, u) =       z Hz + q ′ z + u′ (Gz − w).
                                               2
        The dual cost is
                                                 1 ′
                                 d(u) = min        z Hz + q ′ z + u′ (Gz − w)               (2.27)
                                           z     2
        and the dual problem is
                                         1
                                  max min z ′ Hz + q ′ z + u′ (Gz − w).                     (2.28)
                                  u≥0 z 2
        Consider the definition of active set A(z) in (2.10). Note that A(z ∗ ) may be empty
        in the case of a QP. We define primal and dual degeneracy as in the LP case.
        Definition 2.5 The QP (2.24) is said to be dual degenerate if its dual problem is
        primal degenerate.
           We note from (2.30) that all the constraints are independent. Therefore LICQ
        always holds for dual QPs and dual degeneracy can never occur for QPs with
        H ≻ 0.
        is an (unconstrained) QP. It arises in many fields and has many names, e.g., linear
        regression or least-squares approximation. From (2.26) we find the minimizer
z ∗ = (A′ A)−1 A′ b = A† b,
        which is a QP. In Chapter 6.3.1 we will show how to compute an analytical solu-
        tion to the constrained least-squares problem. In particular we will show how to
        compute the solution z ∗ as a function of b, ui and li .
Therefore the most obvious way to interpret and solve an MIQP is to enumerate
all the 2sb integer values of the variable zb and solve the corresponding QPs. By
comparing the 2sb optimal costs one can derive the optimizer and the optimal cost
of the MIQP (2.34). Although this approach is not used in practice, it gives a
simple way for proving what is stated next. Let Pz̄b be the feasible set (1.6) of
problem (2.35) for a fixed zb = z̄b . The cost is a quadratic function defined over
Rsc and Pz̄b is a polyhedron defined by the inequality constraints
Gc zc ≤ w − Gb z̄b . (2.37)
Denote by f ∗ the optimal value and by Z ∗ the set of optimizers of problem (2.34)
If Pz̄b is empty for all z̄b , then the problem (2.35) is infeasible. Five cases can occur
if Pz̄b is not empty for at last one z̄b ∈ {0, 1}sb :
Case 1. The MIQP solution is unbounded, i.e., f ∗ = −∞. This cannot happen if
    Hc ≻ 0.
32                                           2   Linear and Quadratic Optimization
     Case 2. The MIQP solution is bounded, i.e., f ∗ > −∞ and the optimizer is
         unique. Z ∗ is a singleton.
     Case 3. The MIQP solution is bounded and there are infinitely many optimizers
         corresponding to the same integer value. Z ∗ is the Cartesian product of an
         infinite dimensional subset of Rs and an integer number zb∗ . This cannot
         happen if Hc ≻ 0.
     Case 4. The MIQP solution is bounded and there are finitely many optimizers
         corresponding to different integer values. Z ∗ is a finite set of optimizers
             ∗     ∗                ∗      ∗
         {(z1,c , z1,b ), . . . , (zN,c , zN,b )}.
     Case 5. The union of Case 3 and Case 4.
      Chapter 3
                                        minz       f (z)
                                                                                       (3.1)
                                        subj. to   z ∈ S,
      where both the objective function f : Rs → R and the feasible set S are convex,
      hence (3.1) is a convex program. We will assume that if the problem is feasible, an
      optimizer z ∗ ∈ S exists, i.e., f ∗ = f (z ∗ ).
3.1   Convergence
      Many model predictive control problems for linear systems have the form of prob-
      lem (3.1) with a linear or convex quadratic objective function and a polyhedral
      feasible set S defined by linear equalities and inequalities. In all but the simplest
      cases, analytically finding a minimizer z ∗ is impossible. Hence, one has to resort
      to numerical methods, which compute an approximate minimizer that is ‘good
      enough’ (we give a precise definition of this term below). Any such method pro-
      ceeds in an iterative manner, i.e., starting from an initial guess z 0 , it computes a
34                                                 3    Numerical Methods for Optimization
     sequence {z k }k=k
                    k=1
                        max
                            , where
                                                           
                                       z k+1 = Ψ z k , f, S ,
     with Ψ being an update rule depending on the method. For a method to be useful,
     it should terminate after kmax iterations and return an approximate minimizer
     z kmax that satisfies
                               
                      |f z kmax − f (z ∗ ) | ≤ ǫ       and dist(z kmax , S) ≤ δ,
     where
                                      dist(z, S) = min ky − zk
                                                       y∈S
     is the shortest distance between a point and a set in Rs measured by the norm k · k.
     The parameters ǫ, δ > 0 define the required accuracy of the approximate minimizer.
         There exist mainly two classes of optimization methods for solving (3.1): first-
     order methods that make use of first-order information of the objective function
     (subgradients or gradients) and second-order methods using in addition second-
     order information (Hessians). Note that either method may also use zero-order
     information, i.e., the objective value itself, for instance, to compute step sizes.
         In the following list, key aspects that are important for any optimization method
     are summarized. Some of these aspects are discussed in detail for the corresponding
     optimization methods later in this chapter.
         The speed or rate of convergence relates to the second point in the list above
     and is an important distinctive feature between various methods. We present a
     definition of convergence rates next.
      3.2   Unconstrained Optimization                                                          35
      Definition 3.1 (Convergence Rates (cf. [223, Section 2.2])) Let {ek } be a
      sequence of positive reals that converges to 0. The convergence rate of this sequence
      is called linear if there exists a constant q ∈ (0, 1) such that
                                                  ek+1
                                        lim sup        ≤ q.
                                         k→∞       ek
      If q = 1, the convergence rate is said to be sublinear, whereas if q = 0, the sequence
      has a superlinear convergence rate. A superlinearly converging sequence converges
      with order p if
                                                  ek+1
                                        lim sup       p ≤ C,
                                         k→∞       ek
      where C is a positive constant, not necessarily less than 1. In particular, superlinear
      convergence with order p = 2 is called quadratic convergence.
          For an optimization method, the sequence {ek } in the definition above can be
      any sequence of errors associated with the particular method, e.g. ek can be defined
      as the absolute error in the objective value
                                                
                                     ek = |f z k − f (z ∗ ) |
                                        z k+1 = z k + hk dk                             (3.3)
36                                                 3   Numerical Methods for Optimization
         Particular methods differ in the way dk and hk are chosen. In general, dk has to
        be a descent direction, i.e., for all z k 6= z ∗ it must satisfy
                                            ∇f (z k )′ dk < 0.                             (3.4)
        The step sizes hk have to be chosen carefully in order to ensure a sufficiently large
        decrease in the function value, which is crucial for convergence of descent methods.
        Since solving for the optimal step size,
                                     hk,∗ ∈ arg min f (z k + hdk ),
                                                 h≥0
        is generally too expensive, inexact line search methods are used instead. They
        compute hk cheaply and achieve a reasonably good decrement in the function
        value ensuring convergence of the algorithm. We discuss line search methods in
        Section 3.2.3.
            In the following, we present two of the most important instances of descent
        methods: the classic gradient method in Section 3.2.1 and Newton’s method in
        Section 3.2.2. We include Nesterov’s fast gradient method in the discussion along
        with gradient methods, although it is not a descent method. We shall see that
        gradient methods, under certain assumptions on the gradient of f , allow for a
        constant step size, which results in an extremely simple and efficient algorithm in
        practice. Newton’s method, on the contrary, requires a line search to ensure global
        convergence, but it has a better (local) convergence rate than gradient methods.
                                                                                  f (z)
                        f (y) + ∇f (y)′ (z − y) +   L
                                                    2
                                                      kz   − yk2
                  2
1 f (y)
                  0
                   -1            -0.5           0      0.25        0.5        1
                                                 z
        Figure 3.1 Upper and lower bounds on functions: The quadratic upper
        bound stems from L-smoothness of f (Definition 3.2), while the quadratic
        lower bound is obtained from strong convexity of f (Theorem 3.1). In this
        example, f (z) = z 2 + 12 z + 1 and we have chosen L = 3 and µ = 1 for
        illustration.
Lemma 3.2 (Descent Lemma) Let f be L-smooth on Rs . Then for any pair
(z, y) ∈ Rs × Rs we have
                                                                    L        2
                         f (z) ≤ f (y) + ∇f (y)′ (z − y) +            kz − yk .           (3.5)
                                                                    2
38                                                   3       Numerical Methods for Optimization
        We now return to the choice of step sizes hk in (3.3). Notice that interpreting the
     next iterate z k+1 as the result of minimizing a quadratic at the previous iterate z k ,
     where we define
                                                                      1
                     f¯(z, z k ) = f (z k ) + ∇f (z k )′ (z − z k ) + k kz − z k k2 ,         (3.7)
                                                                     2h
     yields after some standard calculus the classic gradient update rule
z k+1 = z k − hk ∇f (z k ).
     where the first and second inequality are due to (3.5) and (3.6) respectively. In
     fact, the second inequality is strict for z k 6= z ∗ .
         The gradient method with constant step size summarized in Algorithm 3.1 can
     be shown to converge sublinearly with the number of iterations growing propor-
     tionally to L/ǫ · kz 0 − z ∗ k2 [220, Corollary 2.1.2]. The required level of suboptimal-
                                                                                       
     ity ǫ > 0 is hereby defined in terms of the error in the objective value f z k − f ∗ .
     Note that in case of a constant step size, the gradient method is an extremely sim-
     ple, division-free algorithm (given that the gradient ∇f can be computed without
     divisions).
                       αk (1−αk )
                βk ←   αk 2 +αk+1
              y k+1 ← z    k+1
                            + β k (z k+1 − z k )
           Until stopping criterion is satisfied
y k = z k + β k−1 (z k − z k−1 )
for some carefully chosen β k−1 ∈ (0, 1). This two-step method can be shown
to
p converge    sublinearly with the number of iterations growing proportionally to
   L/ǫ · kz 0 − z ∗ k [220, Theorem 2.2.2]. This is the best convergence rate for
L-smooth problems using only first-order information (see [220, Section 2.1] for
details). The mathematical reasoning behind the improved convergence rate and
optimality of the fast gradient method amongst all first-order methods is quite
involved and beyond the scope of this book.
      Example 3.1 Gradient method vs. fast gradient method for quadratic functions
      Consider the optimization problem given by
                                               1
                                            min z ′ Hz + q ′ z,
                                               2
      where the Hessian and the linear cost vector are given by
                                                              
                                   0.2 0.2                 −0.1
                            H=                  and q =            .
                                   0.2    2                  0.1
      For quadratic functions, a tight Lipschitz constant L of the gradient can be deter-
      mined by computing the largest eigenvalue of the Hessian (Lemma 3.1), i.e.
      here L = 2.022. The upper left plot in Figure 3.2 shows the first 10 iterations of
      the gradient method with constant step size 1/L (Algorithm 3.1). The upper right
      and lower left plot show the first 10 iterations using larger (but constant) step sizes,
      which correspond to underestimating the tight Lipschitz constant L. It can be shown
      that if L is underestimated by a factor of 2 or more, convergence is lost (cf. lower left
      plot). The lower right plot shows the iterates of the fast gradient method using the
      tight Lipschitz constant (Algorithm 3.2). Contrary to the gradient method, the fast
      gradient method generates a non-monotonically decreasing error sequence.
           3                                        3
           2 0                                      2 0
           1   123                                  1    2
     z2
           0                                        0   1 3
                                              z2
          -1                                       -1
          -2                                       -2
          -3                                       -3
            -5           0              5            -5            0                  5
                         z1                                        z1
                                  1                                          4
              (a) GM. Step size   L
                                    .                   (b) GM. Step size   3L
                                                                               .
           3                                         3
           2 0 2                                     2 0
           1                                         1   1        3         2
           0                                         0
     z2
                                               z2
          -1   1 3                                  -1
          -2                                        -2
          -3                                        -3
            -5           0              5             -5           0                  5
                         z1                                        z1
                                  2                                             1
              (c) GM. Step size   L
                                    .                   (d) FGM. Step size      L
                                                                                  .
            Figure 3.2 Example 3.1. First 10 iterations of the gradient method (GM)
            with constant step size 1/L using the tight, a slightly underestimated and a
            strongly underestimated Lipschitz constant L. Also shown are the iterates
            of the fast gradient method (FGM) using the tight Lipschitz constant. The
            contour lines indicate the function value of each iterate. Note that the
            gradients are orthogonal to the contour lines.
     gradient method. The following theorems from [151, Section B] characterize strong
     convexity whenever the function is once or twice continuously differentiable. For
     an illustration of this property see Figure 3.1.
∇2 f (z) µIs .
          Algorithm 3.3 Fast gradient method for smooth strongly convex optimization
3.2    Unconstrained Optimization                                                                      41
                                                              p
      Input: Initial iterates z 0 ∈ Rs , y 0 = z 0 ; 0 <          µ/L ≤ α0 < 1, Lipschitz constant L
      of ∇f , strong convexity parameter µ of f
      Output: Point close to z ∗
            Repeat
               z k+1 ← y k −   1
                               L
                                     ∇f (y k )
                             k+1                        2                 2   µαk+1
                 Compute α           ∈ (0, 1): αk+1 = (1 − αk+1 )αk +           L
                         k     k
                        α (1−α )
                 βk ←   αk 2 +αk+1
               y k+1 ← z    k+1
                             + β k (z k+1 − z k )
            Until stopping criterion is satisfied
   From Theorem 3.1 it follows that a differentiable strongly convex function can
be lower-bounded by a quadratic. Relating this to the quadratic upper bound in
Lemma 3.2, the inequality
                                                        L
                                                 κf =     ≥1
                                                        µ
follows intuitively. The constant κf is the so-called condition number of the L-
smooth and strongly convex function f .
    With the additional assumption of strong convexity, it can be shown that the
gradient method in Algorithm 3.1 converges linearly with the number of iterations
growing proportionally to κf · ln(1/ǫ) [220, Theorem 2.1.15] with ǫ > 0 being the
required level of suboptimality in terms of the error in the objective. In order
for the fast gradient method in Algorithm 3.2 to achieve linear convergence rate,
it either needs to be modified or restarted after a number of steps that depends
on the condition number κf . In both cases it can be shown that the number
                                        √
of iterations grows proportionally to κf · ln(1/ǫ) [220, Theorem 2.2.2]. This is
the best convergence rate for L-smooth and strongly convex problems using only
first-order information (see [220, Section 2.1] for details). A modified fast gradient
method that takes strong convexity into account explicitly and thus does not need
restarting is given in Algorithm 3.3.
µ = λmin (H).
      For the Hessian given in Example 3.1 we therefore have µ = 0.178, and the condition
      number is κf = 11.36. From the convergence results for the gradient method and the
      fast gradient method for the strongly convex case it follows that condition numbers
      close to 1 lead to fast convergence. So, for this example, fast convergence can be
      guaranteed for both methods.
42                                                 3    Numerical Methods for Optimization
     Preconditioning
     In the previous section we have seen that for gradient methods the number of ite-
     rations to find an approximate minimizer depends on the condition number κf .
     In practice, a high condition number usually indicates that many iterations of Al-
     gorithm 3.1 and Algorithm 3.3 are needed to achieve the specified accuracy. To
     improve the conditioning of the problem and thus to lower the amount of computa-
     tion needed to obtain an approximate minimizer, one can transform problem (3.2)
     into an equivalent problem by a variable transformation
y = Pz
     with P invertible. The aim is to choose the preconditioner P such that the new
     objective function h(y) = f (P −1 y) has a smaller condition number, i.e., κh < κf .
     Intuitively, the best choice for P is one that achieves a circular shape of the level
     sets of the objective function or at least comes close to it. Mathematically speak-
     ing, the preconditioner matrix P should be such that κh ≈ 1. Finding optimal
     preconditioners for which κh = 1 is impossible for all but the simplest cases. We
     give one such example in the following.
     Stopping Criteria
     Stopping criteria test whether the current iterate z k is optimal or, more practically,
     has attained an acceptable level of suboptimality. In optimization, the most natural
     stopping criterion is
f (z k ) − f ∗ ≤ ǫ, (3.10)
     where ǫ > 0 is an accuracy measure specified by the user. However, since the
     optimal value f ∗ is rarely known, we look for a computable lower bound f k,∗
     (≤ f ∗ ), so that we arrive at the evaluable sufficient condition for (3.10)
f (z k ) − f k,∗ ≤ ǫ.
     The latter stopping criterion works for any ǫ > 0 if the lower bounds f k,∗ converge
     to the optimal value f ∗ for an increasing iteration counter k.
         For differentiable convex functions such lower bounds can be constructed right
     from the definition of convexity, i.e.
                                f ∗ ≥ f (z k ) + ∇f (z k )′ (z ∗ − z k )
                                   ≥ f (z k ) − k∇f (z k )kkz ∗ − z k k,
        3.2   Unconstrained Optimization                                                        43
        where the last inequality is due to Cauchy-Schwarz. Observe that for any conver-
        ging method, this lower bound converges to f ∗ from below since the gradient at
        the minimizer z ∗ vanishes in unconstrained optimization.
           For many problems, the distance between an iterate and the minimizer can be
        upper-bounded, i.e., kz ∗ − z k k ≤ R for all iterations k. Consequently, we end up
        with the evaluable stopping criterion
k∇f (z k )k R ≤ ǫ,
        Summary
        In this section, we have discussed the concept of descent methods and presented
        one of the most important instances, the classic gradient method for smooth con-
        vex optimization. Although not a descent method in its basic form, Nesterov’s fast
        gradient method was included due to its simplicity and improved speed of conver-
        gence. Both methods are particularly useful in the strongly convex case, where
        they converge linearly, with the fast gradient method attaining the best theoretical
        convergence rate possible for first-order methods. Despite a slower theoretical (and
        most of the time also practical) convergence, the classic gradient method is well-
        suited for processors with fixed-point arithmetic, for instance field-programmable
        gate arrays (FPGAs), because of its numerical robustness against inaccurate com-
        putations. For the fast gradient method, recent research, e.g. [97], indicates that
        care has to be taken if inexact gradients are used. When using gradient methods
        in practice, preconditioning should be applied to decrease the condition number of
        the problem in order to decrease the number of iterations needed. The latter can
        also be achieved by warm-starting, i.e., starting the methods from a point z 0 close
        to a minimizer z ∗ . This follows immediately from the dependence of the number of
        iterations on the distance kz 0 − z ∗ k. More information and links to the literature
        can be found in [250].
                 z k+1 ← z k + hk dk
              Until stopping criterion is satisfied
    The quadratic convergence property makes Newton’s method one of the most
powerful algorithms for unconstrained optimization of twice continuously differen-
tiable functions. (The method is also widely employed for solving nonlinear equa-
tions.) As a result, it is used in interior point methods for constrained optimization
to solve the (unconstrained or equality constrained) subproblems in barrier meth-
ods or to generate primal-dual search directions. We discuss these in detail in
Section 3.3.2.
    A disadvantage of Newton’s method is the need to form the Hessian ∇2 f (z k ),
which can be numerically ill-conditioned, and to solve the linear system
                                  ∇2 f (z k )dN = −∇f (z k )                   (3.15)
for the Newton direction dN , which costs O(s3 ) floating point operations in general.
Each iteration is therefore significantly more expensive than one iteration of any
of the gradient methods.
with A ∈ Rp×s (assuming full rank p) and b ∈ Rp . As discussed above, the Newton
direction is given by the minimization of the quadratic model θ(d) at the current
feasible iterate z k (i.e., Az k = b) with an additional equality constraint:
                                 1 ′ 2
                  dN = arg min     d ∇ f (z k )d + ∇f (z k )′ d + f (z k )
                              d  2                                             (3.18)
                        subj. to Ad = 0
Since d is restricted to lie in the nullspace of A, we ensure that any iterate gener-
ated by Newton’s method will satisfy Az k+1 = A(z k + hk dN (z k )) = b. From the
optimality conditions of (3.18), it follows that dN is obtained from the solution to
the linear system of dimension s + p:
                            2                        
                             ∇ f (z) A′ d         −∇f (z)
                                               =            ,                  (3.19)
                                A      0 y           0
where y ∈ Rp are the Lagrange multipliers associated with the equality constraint
Ad = 0.
46                                                      3   Numerical Methods for Optimization
        A line search determines the step length hk that is taken from the current iterate
        z k ∈ Rs along a search direction ∆z k ∈ Rs to the next iterate,
z k+1 = z k + hk ∆z k . (3.20)
        minimizing the merit function along the ray {z k + h∆z k } for h ≥ 0. It is often too
        expensive to solve this problem exactly, and therefore usually inexact line search
        methods are employed in practice that return a step size hk that approximates
        the optimal step size h∗ from (3.21) sufficiently well. In the following, we give a
        brief overview on practical inexact line search methods; see [224] for a thorough
        treatment of the subject.
        Wolfe Conditions
        In order to ensure convergence of descent methods for unconstrained optimization,
        for example Newton’s method presented in Section 3.2, certain conditions on the
        selected step size hk must be fulfilled. Popular conditions for inexact line searches
        are the so-called Wolfe conditions [223]
                                  f (z k + hk ∆z k ) ≤ f (z k ) + c1 hk ∇f (z k )′ ∆z k   (3.22a)
                              k       k    k ′     k             k ′    k
                         ∇f (z + h ∆z ) ∆z ≥ c2 ∇f (z ) ∆z                                (3.22b)
        with 0 < c1 < c2 < 1. The first condition (3.22a) is called Armijo’s condition [9],
        and ensures that a sufficient decrease in the objective is achieved. The second
        condition, the curvature condition (3.22b), ensures that the step length is not too
        small [223].
           One of the most popular inexact line search methods that fulfills the Wolfe
        conditions is the backtracking line search as discussed in the following.
              Algorithm 3.5 Backtracking Line Search for Newton’s Method (Algorithm 3.4) [223,
              Algorithm 3.1]
              Input: Current iterate z k , descent direction ∆z k , constants c ∈ (0, 1) and t ∈ (0, 1)
              Output: Step size hk ensuring Wolfe conditions (3.22)
                   hk ← 1
                   Repeat
                       hk ← thk
                   Until Armijo’s condition (3.22a) holds, i.e., f (z k +hk ∆z k ) ≤ f (z k )+chk ∇f (z k )′ ∆z k
         Algorithm 3.7 Fast gradient method for constrained smooth strongly convex opti-
         mization                                        p
         Input: Initial iterates z 0 ∈ S, y 0 = z 0 ; 0 < µ/L ≤ α0 < 1, Lipschitz constant L
         of ∇f , strong convexity parameter µ of f
         Output: Point close to z ∗
              Repeat
                                                       
                 z k+1 ← πS y k −      1
                                       L
                                           ∇f (y k )
                                                           2              2   µαk+1
                  Compute αk+1 ∈ (0, 1): αk+1 = (1 − αk+1 )αk +                 L
                           k     k
                         α (1−α )
                  βk ←   αk 2 +αk+1
                 y k+1 ← z   k+1
                               + β k (z k+1 − z k )
              Until stopping criterion is satisfied
         The expressions (3.24) and (3.25) for z k+1 can be shown to be equivalent by
     deriving the optimality conditions and noting that they coincide. Thus, for con-
     strained optimization, Algorithms 3.1, 3.2 and 3.3 remain unchanged, except that
     the right hand side of the assignment in the first line of these algorithms is pro-
     jected onto set S. The resulting algorithmic schemes are stated in Algorithm 3.6
     (gradient method) and Algorithm 3.7 (fast gradient method for the strongly convex
     case) and illustrated in Figure 3.3. It can be shown that for both Algorithm 3.6
     and Algorithm 3.7 the same convergence results hold as in the unconstrained case
     ([220, Section 2.2.4]).
         Whenever the projection operator for set S can be evaluated efficiently, as for
     the convex sets listed in Table 3.1, gradient projection methods have been shown
     to work very well in practice. Such sets, which are also referred to as ‘simple’
     sets in the literature, can be translated, uniformly scaled and/or rotated without
     complicating the projection as stated in the next lemma.
                               Sb = {z ∈ Rs | z = γW y + c, y ∈ S}
3.3   Constrained Optimization                                                                   49
                                  1
                           zk −          k
                                  L ∇f (z )                                   1
                                                                       yk −          k
                                                                              L ∇f (y )
                                                         yk
                       z   k+1                                    z k+1
zk zk
S z k−1 S
      Figure 3.3 Classic gradient method (left) and fast gradient method (right)
      for the constrained case. After computing the standard update rule from
      the unconstrained case, a projection onto the feasible set is applied.
    If the feasible set S is polyhedral and does not have a computationally efficient
projection operator, it can alternatively be pre-computed by means of multipara-
metric programming (see Chapter 6) with the point to project as the parameter.
Another possibility is to solve the original problem in the dual domain instead as
discussed next.
S = {z ∈ Rs | Az = b, z ∈ K} , (3.27)
where K is a convex subset of Rs that allows for an efficient projection and the
pair (A, b) is from Rp×s × Rp . Many practically relevant sets can be represented in
terms of (3.27), i.e., as the intersection of a ‘simple’ convex set and an affine set,
e.g. polyhedra. We can now rewrite the original problem (3.23) as
                                          min f (z)
                                              z
                                       subj. to Az = b
                                                z ∈ K.
50                                                 3    Numerical Methods for Optimization
                 affine set                        (
          S = {z ∈ Rs | Az = b}                     z + A′ (AA′ )−1 (b − Az)               if rank A = p,
                                        πS (z) =            ′†          
                                                    z + A′ A A† b − z                      otherwise
         with (A, b) ∈ Rp×s × Rp
                                                                 (
           nonnegative orthant                                       zi       if zi ≥ 0,
                                              (πS (z))i =                                  i = 1, . . . , s
           S = {z ∈ Rs | z ≥ 0}                                      0        otherwise
                                                       
                 rectangle                             
                                                       li if zi < li ,
         S = {z ∈ Rs | l ≤ z ≤ u}           (πS (z))i = zi if li ≤ zi ≤ ui ,                  i = 1, . . . , s
                                                       
                                                       
           with (l, u) ∈ Rs × Rs                        ui if zi > ui
                                                                     (
               2-norm ball                                                   z
                                                                          r kzk    if kzk > r,
                  s                                    πS (z) =
      S = {z ∈ R | kzk ≤ r} , r ≥ 0                                       z        otherwise
     Using a technique called partial Lagrange relaxation [52, Section 4.2.2] we eliminate
     the complicating equality constraints and define the (concave) dual function as
                                   d(v) = min f (z) + v ′ (Az − b),                                           (3.28)
                                           z∈K
as stated in [221, Theorem 1]. This upper bound is sufficient for the step size
computation for any gradient method (note that the step size is given by 1/Ld ).
However, the less conservative the Lipschitz constant is, the larger the step size
and the smaller the number of iterations. In [251, Theorem 7] it is shown that for
the case of quadratic objective functions f (z) = 12 z ′ Hz + q ′ z, H ≻ 0, and under
mild assumptions, the tight Lipschitz constant of the dual gradient is
                                                   1
                                   L∗d = kAH − 2 k2 .
    So, strong convexity of the objective function f is key for using the gradient
methods in Section 3.2.1 for the solution of the dual problem (3.29). If f is not
strongly convex, there are different approaches available in the literature, e.g. a
smoothing approach for the dual function [221].
    Note that the (unique) primal minimizer z ∗ can be recovered from the maxi-
mizer of the dual problem v ∗ , assuming it exists, by
z ∗ = z ∗ (v ∗ ).
    It is also important to notice that, in general, the dual function d(v) lacks strong
concavity, so only sublinear convergence rates (instead of linear rates for the primal
problem) can be guaranteed for the solution of the dual problem. This and the
fact that each evaluation of the dual gradient requires solving the inner problem
can make the dual approach, as presented in this section, slow in practice. More
advanced first-order methods can significantly speed up convergence of the dual
approach, e.g. the alternating direction method of multipliers (ADMM). For more
details on ADMM, the interested reader is referred to the survey paper [64].
Summary
This section has introduced the generalization of gradient methods to the con-
strained case, the so-called gradient projection methods. As the name suggests, the
generalization comes from having to compute the projection of a gradient step onto
the feasible set. Apart from this additional operation, these methods are identical
to the ones introduced for the unconstrained case.
    There exist many important convex sets for which the projection operator can
be evaluated in an efficient way, some of which are stated in Table 3.1. More sets
can be found, e.g. in [250, Section 5.4], which also contains further literature links.
One important consequence of having a set constraint is that a full preconditioner
matrix P (Section 3.2.1 and Example 3.3) is not admissible anymore since in the
new basis the set can lose its favorable projection properties. For instance, consider
a box constraint with its projection operator given in Table 3.1. Only for a diagonal
preconditioner the set remains a box in the new basis and thus easy to project.
For quadratic objective functions, finding the best preconditioner under set-related
structure constraints turns out to be a convex semi-definite program and hence can
be solved efficiently [250, Section 8.4].
    Finally, we point the reader to the recent proximity gradient methods, which
can be understood as a natural generalization of gradient projection methods. An
introduction to these methods and literature links can be found in [250, Chapter
5] and [228].
52                                                 3    Numerical Methods for Optimization
        Today interior point methods are among the most widely used numerical methods
        for solving convex optimization problems. This is the result of 25 years of intensive
        research that has been initiated by Karmarkar’s seminal paper in 1984 on solving
        LPs [166]. In 1994, Nesterov and Nemirovskii generalized interior point methods
        to nonlinear convex problems, including second-order cone and semi-definite pro-
        gramming [222]. Issues like numerical ill-conditioning, efficient and stable solution
        of linear systems etc. are now well understood, and numerous free and commer-
        cial codes are available that can solve linear and quadratic programs with high
        reliability.
            We first discuss barrier methods, which were the first polynomial-time algo-
        rithms for linear programming of practical relevance. Then we present modern
        primal-dual method. This powerful class of interior point methods forms the basis
        of almost all implementations today.
            Throughout this section, we consider the primal P-IPM problem
                                          minz         f (z)
                                          subj. to     Az = b                             (3.30)
                                                       g(z) ≤ 0
        where µ > 0 is called barrier parameter. The purpose of the barrier function Φg is
        to “trap” an optimal solution of problem P (µ) (3.32), which we denote by z ∗ (µ), in
        the set S. Thus, Φg (z) must take on the value +∞ whenever gi (z) > 0 for some i,
        and a finite value otherwise. As a result, z ∗ (µ) is feasible with respect to S, but it
        differs from z ∗ since we have perturbed the objective function by the barrier term.
            With the above idea in mind, we are now ready to outline the (primal) barrier
        method summarized in Algorithm 3.8. Starting from (a possibly large) µ0 , a solu-
        tion z ∗ (µ0 ) to problem P (µ0 ) is computed, for example by any of the methods for
        unconstrained optimization presented in Section 3.2. For this reason, Φg should be
3.3    Constrained Optimization                                                             53
Logarithmic barrier
So far, we have not specified which function to use as a barrier. For example, the
indicator function                   (
                                       0   if g(z) ≤ 0
                            Ig (z) =                   ,                    (3.33)
                                       +∞ otherwise
trivially achieves the purpose of a barrier, but it is not useful since methods for
smooth convex optimization as discussed in Section 3.2 require the barrier function
to be convex and continuously differentiable. A twice continuously differentiable
convex barrier function that approximates Ig well is the logarithmic barrier function
                                              m
                                              X
                                Φg (z) = −          ln (−gi (z)) ,                 (3.34)
                                              i=1
which makes it possible to use Newton’s method for solving the barrier subprob-
lems. The logarithmic barrier function is used in almost all implementations of
barrier methods. In fact, the existence of polynomial-time algorithms for convex
optimization is closely related to the existence of barrier functions for the under-
lying feasible sets [222].
     Input: Strictly feasible initial iterate z 0 w.r.t. g(z) ≤ 0, µ0 , κ > 1, tolerance ǫ > 0
     Output: Point close to z ∗
           Repeat
              Compute z ∗ (µk ) by minimizing f (z) + µk Φg (z) subject to Az = b start-
              ing from the previous solution z k−1 (usually by Newton’s method, Algo-
              rithm 3.4). This is called ‘centering step’.
              Update: z k ← z ∗ (µk )
              Stopping criterion: Stop if mµk < ǫ
              Decrease barrier parameter: µk+1 ← µk /κ
           Until stopping criterion is satisfied
     The solutions of P (µ) (3.32) for this Quadratic Program for different values of µ are
     depicted in Fig. 3.4. For large µ, the level sets are almost identical to the level sets of
     Φg (z), i.e., z ∗ (5) is very close to the analytic center z a = arg min Φg (z) of the feasible
     set. As µ decreases, z ∗ (µ) approaches z ∗ , by following the central path.
     where Gi denotes the i-th row of G and wi the i-th element of w. Hence problem
     P (µ) (3.32) takes the form
                                                              Xm
                                           1 ′
                                 min         z Hz + q ′ z − µ     ln(wi − Gi z)
                                   z       2                  i=1                                 (3.40)
                            subj. to Az = b,
     which we solve by Newton’s method. Using the formula for the Newton direction dN
     with equality constraints (3.19), we arrive at the following linear system of size s + p,
3.3     Constrained Optimization                                                    55
z2
                                       z2
                     •
                                                   •
                     z1                                     z1
      (a) Level curves of f (z) +           (b) Level curves of f (z) +
      µΦg (z) for µ = 5                     µΦg (z) for µ = 0.25
                                       z2
z2
                                                            •
                                                   •
        •                                      •
                     z1                                      z1
      (c) Level curves of f (z) +           (d) Central path starting at an-
      µΦg (z) for µ = 0.0125                alytic center and moving to-
                                            ward solution of (3.37) as µ de-
                                            creases
        Figure 3.4 Example 3.4. Illustration of interior point method for example
        problem (3.37). Black dots are the solutions z ∗ (µ).
56                                               3   Numerical Methods for Optimization
         We conclude this section with a few remarks on the barrier method. The main
     computational burden is the computation of the Newton directions by solving linear
     systems of type (3.41). This is usually done using direct methods (matrix factor-
     izations), but iterative linear solvers can be used as well. In most applications the
     matrices involved have a special sparsity pattern, which can be exploited to signif-
     icantly speed up the computation of the Newton direction. We discuss structure
     exploitation for solving (3.41) arising from MPC problems in Section 14.3.
         If the barrier parameter µ is decreased too quickly, many inner iterations are
     needed, but only a few outer iterations. The situation is reversed if µ is decreased
     only slowly, which leads to a quick convergence of the inner problems (usually in
     one or two Newton steps), but more outer iterations are needed. This tradeoff is
     not much of an issue in practice. Usually, the total number of Newton steps is in
     the range of 20 − 40, essentially independent of the conditioning of the problem.
     The barrier method can be shown to converge linearly; more details can be found
     in [65, Section 11.3].
         Finally, we would like to point out that the barrier method is a feasible method,
     which means that it starts with a feasible point and all iterates remain feasible.
     This complicates the implementation in practice, as a line search must be employed
     that maintains feasibility, and a strictly feasible initial iterate z 0 has to be supplied
3.3   Constrained Optimization                                                                57
by the user or computed first by what is called a Phase I method. See [65] for
more details.
    Computational experience has shown that modern primal-dual methods are sig-
nificantly more effective with only little additional computational cost when com-
pared to the barrier method. Therefore, primal-dual methods are now predominant
in commercial codes. They also allow infeasible iterates, that is, the equality and
inequality constraints on the primal variables are satisfied only at convergence,
which alleviates the necessity for finding a feasible initial point. We discuss this
class of methods next.
Primal-dual methods
The general idea of primal-dual interior point methods is to solve the Karush-
Kuhn-Tucker (KKT) conditions by a modified version of Newton’s method. The
nonlinear KKT equations represent necessary and sufficient conditions for optimal-
ity for convex problems under the assumptions discussed in Section 1.6. For the
P-IPM problem (3.30), the KKT conditions are
where the vector s ∈ Rm  + denotes slack variables for the inequality constraints
g(z) ≤ 0, and u ∈ Rm + is the vector of the associated Lagrange multipliers. The
vector v ∈ Rp denotes the Lagrange multipliers for the equality constraints Az = b,
and the matrix G(z) ∈ Rm×s is the Jacobian of g evaluated at z. The variables z
and s are from the primal, the variables v and u from the dual space.
    If a primal-dual pair of variables (z ∗ , v ∗ , u∗ , s∗ ) is found that satisfies these
conditions, the corresponding primal variables (z ∗ , s∗ ) are optimal for (3.30) (and
the dual variables (v ∗ , u∗ ) are optimal for the dual of (3.30)). Since Newton’s
method is a powerful tool for solving nonlinear equations, the idea of applying it to
the system of nonlinear KKT equations is apparent. However, certain modifications
to a pure Newton method are necessary to obtain a useful method for constrained
optimization. The name primal-dual indicates that the algorithm operates in both
the primal and dual space.
    There are many variants of primal-dual interior point methods. For a thorough
treatment of the theory we refer the reader to the book by Wright [290], which
gives a comprehensive overview of the different approaches. In this section, after
introducing the general framework of primal-dual methods, we restrict ourselves
to the presentation of a variant of Mehrotra’s predictor-corrector method [206],
because it forms the basis of most existing implementations of primal-dual interior
point methods for convex optimization and has proven particularly effective in
practice. The method we present here allows infeasible starting points.
58                                              3   Numerical Methods for Optimization
     Central Path
     We start by outlining the basic idea. Most methods track the central path, which we
     have encountered already in barrier methods, to the solution set. These methods
     are called path-following methods. In the primal-dual space, the central path
     is defined as the set of points (z, v, u, s), for which the following relaxed KKT
     conditions hold:
     Measure of Progress
     Similar to primal barrier methods, the subproblem (3.43) is usually solved only
     approximately, here by applying only one Newton step. As a result, the generated
     iterates are not exactly on the central path, i.e., si ui 6= τ for some i. Hence a more
     useful measure than the path parameter τ for the progress of the algorithm is the
     average value of the complementarity condition (3.43d),
u1
                Newton direction
                 (predictor)
                ∆(z, v, u, s)(0)                 central path C
                                   resulting
                                 search direction
                                 ∆(z, v, u, s)(σµ)                optimal point
                                                                           s1
and the vector ν ∈ Rm allows a modification of the right-hand side, thereby gen-
erating different search directions that depend on the particular choice of ν. For
brevity, we denote the solution to (3.45) by ∆[z, v, u, s](ν).
   The vector ν can take a value between the following two extremes:
      • If ν = 0, the right hand side in (3.45) corresponds to the residual of the KKT
        conditions (3.42), i.e., ∆[z, v, u, s](0) is the pure Newton direction that aims
        at satisfying the KKT conditions (3.42) in one step based on a linearization.
        This direction is called affine-scaling direction. However, pure Newton steps
        usually decrease some products si ui prematurely towards zero, i.e., the gen-
        erated iterate is close to the boundary of the feasible set (if si ui ≈ 0, either
        si or ui must be small). This is disadvantageous since from such points only
        very small steps can be taken, and convergence is prohibitively slow. Hence
        the iterates must be centered by bringing them closer to the central path.
A tradeoff between the two goals of progressing towards the solution and centering
is achieved by computing search directions ∆[z, v, u, s](ν) by solving (3.45) for
                                         ν = σµ1                                      (3.47)
60                                                     3    Numerical Methods for Optimization
     where σ ∈ (0, 1) is called the centering parameter. This is the key difference
     from pure Newton steps, and the main ingredient (together with tracking the
     central path) in making Newton’s method work efficiently for solving the non-
     linear KKT system (3.42). Figure 3.5 depicts this combination of search directions
     schematically, and a principle framework for primal-dual methods is given in Al-
     gorithm (3.10). We will instantiate it with Mehrotra’s method below.
         In the discussion above, we have excluded almost all theoretical aspects con-
     cerned with the convergence of primal-dual methods. For example, the terms
     “sufficiently close to the central path” and “sufficient reduction in µ” have precise
     mathematical counterparts that allow one to analyze the convergence properties.
     The book by Wright [290] is a good starting point for the interested reader.
         Algorithm 3.10 Primal-dual interior point methods for the P-IPM problem (3.30)
         Input: Initial iterates z 0 , v 0 , u0 > 0, s0 > 0, Centering parameter σ ∈ (0, 1)
         Output: Point close to z ∗
              Repeat
                                                ′
                 Duality measure: µk ← sk uk /m
                 Search direction: compute ∆[z k , v k , uk , sk ](σµk 1) by solving (3.45) at the
                 current iterate
                 Choose step length hk such that sk+1 > 0 and uk+1 > 0
                 Update: (z k+1 , v k+1 , uk+1 , sk+1 ) ← (z k , v k , uk , sk )+hk ∆[z k , v k , uk , sk ](σ k µk 1)
              Until stopping criterion
     Predictor-Corrector Methods∗
     Modern methods use the full Newton step ∆[z, v, u, s](0) merely as a predictor to
     estimate the error made by using a linear model of the central path. If a full step
     along the affine-scaling direction were taken, the complementarity condition would
     evaluate to
            (S + ∆S aff )(u + ∆uaff ) = Su + ∆S aff u + S∆uaff +∆S aff ∆uaff                            (3.48)
                                        |        {z         }
                                                            =0
     where capital letters denote diagonal matrices constructed from the correspond-
     ing vectors. The first three terms sum up to zero by the last equality of (3.45).
     Hence the full Newton step produces an error of ∆S aff ∆uaff in the complemen-
     tarity condition. In order to compensate for this error, a corrector direction
     ∆[z, v, u, s](−∆S aff ∆uaff ) can be added to the Newton direction. This compen-
     sation is not perfect as the predictor direction is only an approximation; neverthe-
     less, predictor-corrector methods work usually better than single-direction meth-
     ods. The principle of predictor-corrector methods is depicted in Fig. 3.6.
         An important contribution of Mehrotra [206] was to define an adaptive rule for
     choosing the centering parameter σ based on the information from the predictor
     step. His rule
                                          σ = (µaff /µ)3                           (3.49)
     increases the centering if the progress would be poor, that is, if the predicted value
     of the duality measure, µaff , is not significantly smaller than µ. If good progress
3.3    Constrained Optimization                                                                                      61
u1
can be made, then σ ≪ 1, and the direction along which the iterate is moved is
closer to the pure Newton direction. The corrector and centering direction can be
calculated in one step because ∆[z, v, u, s](ν) is linear in ν; the final search direction
is therefore given by ∆[z, v, u, s](σµ1 − ∆S aff ∆uaff ).
    A variant of Mehrotra’s predictor-corrector method that works well in practice
is given in Algorithm 3.11. The parameter γ is a safeguard against numerical errors,
keeping the iterates away from the boundary. Because of the predictor-corrector
scheme, two linear systems have to be solved in each iteration. Since the coefficient
matrix is the same for both solves, direct methods are preferred to solve the linear
systems in Steps 3 and 7 of the algorithm, as the computational bottleneck of the
method is the factorization of the coefficient matrix. Once it has been factored in
Step 3, the computational cost of the additional solve in Step 7 is negligible, and
is more than compensated by the savings in the number of iterations.
        where g(z) ≤ 0 has been added for the barrier function Φg to be well defined. If
        one now defines
                                   u = µ diag(−g(z))−1 1 ,                        (3.51)
        the conditions (3.50) become
                                               m
                                               X
                                  ∇f (z) +           ui ∇gi (z) + A′ v = 0            (3.52a)
                                               i=1
                                                                    Az = b            (3.52b)
                                                            g(z) + s = 0              (3.52c)
                                                               Su = µ1                (3.52d)
                                                               (s, u) ≥ 0             (3.52e)
        where we have introduced slack variables s and used the expression for the gradient
        of the barrier function Φg and the relations s = −g(z), S = diag(s). Using
                                        m
                                        X
                                              ui ∇gi (z) = G(z)′ u ,                   (3.53)
                                        i=1
        where G(z) is the Jacobian of g evaluated at the point z, yields the same relaxed
        optimality conditions as (3.43).
            Hence if subproblems P (µ) (3.32) and (3.43) were solved exactly assuming (3.51),
        the primal iterates of the primal-barrier method and the primal-dual method would
        coincide (provided that the path parameters coincide, i.e., τ = µ). However, primal-
        dual methods are in practice more efficient than primal barrier methods, since they
        generate search directions using information from the dual space, and therefore the
        iterates generated by the two algorithms do not coincide in general.
                                              minz         f (z)
                                              subj. to     z ∈ S,
3.3   Constrained Optimization                                                            63
where the feasible set S ⊂ Rs is a polyhedron, i.e., a set defined by linear equali-
ties and inequalities, and the objective f is a linear function (linear programming
(LP)) or a convex quadratic function (quadratic programming (QP)). As the name
indicates, active set methods aim to identify the set of active constraints at the
solution. Once this set is known, a solution to the problem can be easily compted.
Since the number of potentially visited active sets depends combinatorially on the
number of decision variables and constraints, these methods have a worst case com-
plexity that is exponential in the problem size (as opposed to first-order and interior
point methods presented in Sections 3.3.1 and 3.3.2, which both have polynomial
complexity). However, active set methods work quite well in practice showing the
worst case number of iterations only on pathological problem instances. Also, their
underlying concepts are important ingredients in multi-parametric programming
discussed in Chapter 6.
                                 minz       c′ z
                                                                                (3.54)
                                 subj. to   Gz ≤ w
where for the sake of simplicity we assume that this LP has a solution, i.e., it is
neither unbounded below nor infeasible. Although we consider the case where the
feasible set is described by linear inequalities only, the same method can be used
to solve problems of type
                                maxu        −w′ u
                                subj. to    G′ u = −c                           (3.55)
                                            u ≥ 0,
                                   G′ u + c    =     0,                             (3.56a)
                             ui (Gi z − wi ) =       0, i = 1, . . . , m,           (3.56b)
                                          u ≥        0,                             (3.56c)
                                   Gz − w      ≤     0.                             (3.56d)
     These conditions are composed of primal feasibility (3.56d), dual feasibility (3.56a),
     (3.56c) and complementarity conditions (3.56b). In the simplex method, primal
     feasibility and the complementarity conditions are maintained throughout the it-
     erations whereas dual feasibility is sacrificed and will only be satisfied whenever a
     solution is found. Consequently, the method not only returns a primal minimizer z ∗
     but also a certificate for optimality u∗ which at the same time is a solution to the
     dual problem (3.55).
     Initialization
           Assume that a vertex z of the feasible set is given. At every vertex, at least s
           inequalities are active. For the initial active set A we select exactly s indices
           of active inequalities such that the associated submatrix GA is invertible.
           The remaining ones are put into the set N A, i.e., A ∪ N A = {1, 2, . . . , m}
           and A ∩ N A = ∅. Hence, the vertex z is characterized by
                                              GA z   =     wA ,                     (3.57a)
                                          GN A z     ≤     wN A ,                   (3.57b)
                                          G′A uA      =     −c,
                                           uN A       =     0.
           Thus, the vertex z and the dual multiplier u fulfill the primal feasibility and
           complementarity conditions of the KKT conditions (3.56) but not necessarily
           dual feasibility as uA = −G′−1
                                      A c is nonnegative only when a solution is found.
     Main Loop
           If uA ≥ 0 (Optimal solution found)
                The pair (z, u) satisfies the KKT conditions (3.56) and thus is an optimal
                primal/dual pair.
           Else (Pivoting)
               A leaving index l ∈ A is selected such that the related dual variable is
               negative, i.e., ul < 0. It can be shown that in this case an entering index
               e ∈ N A can be found such that after interchanging these indices, i.e.
                                          A =         A \ {l} ∪ {e},
                                        NA =          N A \ {e} ∪ {l},
3.3     Constrained Optimization                                                                 65
             the next vertex has a cost that is never worse than the cost at the
             previous vertex. In fact, if the previous vertex z is non-degenerate,
             i.e., all inequalities in (3.57b) are strict, then the cost improves strictly.
             The systematic interchange of indices between sets A and N A is called
             pivoting. Pivoting maintains primal feasibility and the complementarity
             conditions.
                               miny,z+ ,z−   y
                               subj. to      Gz+ − Gz− − 1y ≤ w,                       (3.60)
                                             z+ , z− , y ≥ 0.
for the initialization of the simplex method for solving the Phase 2 problem
                                miny,z+ ,z−   c′ z + − c′ z −
                                subj. to      Gz+ − Gz− − 1y ≤ w,
                                                                                    (3.61)
                                              z+ , z− , y ≥ 0
                                              y ≤ 0,
                                                                              ∗∗ ∗∗
          which is equivalent to the original LP (3.54): Every solution (0, z+   , z− )
                                        ∗∗   ∗∗
          to (3.61) implies a solution z+ − z− to the original problem and vice versa.
        • Linear algebra Efficiency of the simplex method depends not only on the
          number of visited vertices, which is unknown in advance and can be expo-
          nential in the problem size in the worst case, but to a great extent on efficient
          linear algebra routines for the computation of new vertices when doing pivo-
          ting steps. Since in the simplex method only a single index is removed and
          added to the active set A in every iteration, specific linear algebra routines
          can be used to update the factorization of the constraint submatrix GA .
We restrict the discussion to the case when the Hessian H is positive definite and
the feasible set determined by the linear inequality constraints is non-empty. These
assumptions imply that both a unique solution z ∗ to (3.62) and unique solutions
to all the subproblems encountered in the active set method exist (this will become
clear later in this section). Another consequence of positive definiteness of the
Hessian is that the presented active set method can be shown to never cycle, i.e.,
it can be guaranteed that the solution is found in a finite number of iterations
without any safeguard against cycling, in contrast to the LP case. Note that we do
not consider explicit linear equality constraints in order to facilitate a streamlined
presentation of the main concepts.
    Active set methods for QP share many features of active set methods for LP.
They too identify the set of active inequality constraints at the optimal solution
and return a certificate of optimality u∗ which is a solution to the dual problem
                    maxu       − 21 (q + G′ u)′ H −1 (q + G′ u) − w′ u
                    subj. to   u ≥ 0.
The dual problem is also a QP. If, however, the constraint matrix G has more rows
than columns (this is the usual case) then the Hessian of the concave objective is
negative semi-definite and thus the dual solution might not be unique.
     The principal feature that distinguishes the QP from the LP is that the search
for a solution cannot be restricted to the vertices of the polyhedral feasible set.
The solution can also be attained on an edge, a face or even in the interior. These
possibilities, in the non-degenerate case, correspond to differently sized active sets,
i.e., the size is s (solution on a vertex), s − 1 (solution on an edge), s − j where
j ∈ {2, 3, . . . , s − 1} (solution on a face) or the active set might even be empty
(solution in the interior). So, there is a combinatorial number of potential active
sets A, each corresponding to a QP with equality constraints
                                           1 ′       ′
                               minz        2 z Hz + q z                         (3.63)
                               subj. to    GA z = wA ,
                             Hz + q + G′ u      = 0,                               (3.64a)
                              ui (Gi z − wi )   = 0, i = 1, . . . , m,             (3.64b)
                                           u    ≥ 0,                               (3.64c)
                                    Gz − w      ≤ 0.                               (3.64d)
     The active set method maintains primal feasibility (3.64d) as well as stationa-
     rity (3.64a) and the complementarity conditions (3.64b). The dual variable u is
     feasible (3.64c) only when the active set at the optimal solution is identified. Note,
     however, that no dual iterates are maintained, in contrast to the LP case, since they
     are not required in every iteration. Only at times when the termination criterion
     needs to be verified or an index removed from the current active set, dual variables
     are computed.
     Initialization
           Assume that a primal feasible point z is given. Define the initial active set A
           as a non-empty subset of all indices of active inequalities at z such that the
           associated submatrix GA has full row rank. In fact, it suffices to choose only
           a single index corresponding to any active inequality. The remaining indices
           are put into set N A, i.e., N A = {1, 2, . . . , m}\A.
     Main Loop
         Minimize the quadratic cost over the affine set determined by the active set A,
         i.e., solve (3.63). For the sake of convenience, we substitute the decision
         variable in (3.63) by z + δ, i.e., the sum of the current iterate and an offset,
         and obtain the optimal offset δ ∗ from
                                                1 ′
                                   minδ         2 δ Hδ + (q   + Hz)′ δ
                                                                                    (3.65)
                                   subj. to     GA δ = 0.
          If δ ∗ = 0
                Compute the Lagrange multipliers uA for the equality constraints in (3.65).
                If uA ≥ 0 (Optimal solution found)
                    The pair (z, u), where u is partitioned into uA and uN A = 0, satis-
                    fies the KKT conditions (3.64) and thus is an optimal primal/dual
                    pair. This follows from the fact that the pair (z, uA ) is an opti-
                    mal primal/dual solution for (3.65) and so satisfies the stationarity
                    condition
                                           Hz + q + G′A uA = 0.
                    By definition of uN A as the zero vector, this implies that the sta-
                    tionarity condition for the original QP (3.64a) is satisfied as well.
3.3     Constrained Optimization                                                              69
                                              A =      A \ {l},
                                          NA =         N A ∪ {l},
                                           z =         z.
z = z + α∗ δ ∗ .
                                               A =         A
                                              NA =         NA
                                              A =      A ∪ {e},
                                           NA =        N A \ {e}.
   In the following, we shortly describe how to initialize the active set method and
how to obtain a solution to the equality-constrained QP (3.65). Note that this
part, same as the described active set method, is based on [223, Chapter 16].
      • Initialization and detection of infeasibility Initialization of the active set
        method for QP is less restrictive than for LP since only a feasible point of
        the polyhedral feasible set, as opposed to a vertex, is required. Such a point
70                                         3    Numerical Methods for Optimization
       can be obtained either from practical insight or from solving the Phase 1 LP
       in (3.60). An alternative approach is to solve
                                      1 ′
                           minz,ǫ     2 z Hz + q ′ z + ρ1 ǫ ′ ǫ + ρ2 1 ′ ǫ
                           subj. to   Gz ≤ w + ǫ
                                      ǫ ≥ 0,
       for which a feasible point can be spotted easily and which can be shown to
       have the same solution as (3.62) if ρ1 ≥ 0 and ρ2 > ku∗ k∞ , where u∗ is a
       Lagrange multiplier for the inequality constraint in (3.62). This follows from
       the theory of exact penalty functions (Section 12.6, page 265).
       Since the Lagrange multiplier is usually unknown, one starts with a guess for
       the weight ρ2 and solves the problem. The value was chosen big enough if
       at the solution ǫ∗ = 0, otherwise, the weight needs to be increased and the
       problem solved again. If no big enough weight can be found such that ǫ∗ = 0,
       the problem is infeasible.
       It turns out that the so-called KKT matrix in (3.71) is invertible if the Hes-
       sian H is positive definite and the submatrix GA has full row rank. Both
       conditions are fulfilled in our case. In particular, whenever the method is ini-
       tialized with an active set that leads to full row rank of GA , this property can
       be shown to be maintained throughout all iterations without requiring extra
       checks. In this case, a good way for solving (3.71) is the Schur complement
       method. Since H can be inverted, we can express the primal solution as
                                                              
                                 δ ∗ = −H −1 G′A uA + q + Hz ,
      Polyhedra are the fundamental geometric objects used in this book. There is a
      vast body of literature related to polyhedra because they are important for a wide
      range of applications. In this chapter we introduce the main definitions and the
      algorithms which describe some operations on polyhedra. Our intent is to provide
      only the necessary elements for the readers interested in reproducing the control
      algorithms reported in this book. Most definitions given here are standard. For
      additional details the reader is referred to [296, 135, 112].
      The affine hull of K is the smallest affine set that contains K in the following sense:
      if S is any affine set with K ⊆ S, then aff(K)⊆ S.
          The dimension of an affine set, affine combination or affine hull is the dimen-
      sion of the largest ball of radius ρ > 0 included in the set.
72                                                                4     Polyhedra and P-collections
     The convex hull of K is the smallest convex set that contains K in the following
     sense: if S is any convex set with K ⊆ S, then conv(K)⊆ S.
         Example 4.2 Consider three points x1 = [1, 1]′ , x2 = [1, 0]′ , x3 = [0, 1]′ in R2 . The
         point x̄ = λ1 x1 +λ2 x2 +λ3 x3 with λ1 = 0.2, λ2 = 0.2, λ3 = 0.6 is x̄ = [0.4, 0.8]′ and it
         is a convex combination of the points {x1 , x2 , x3 }. The convex hull of {x1 , x2 , x3 }
         is the triangle plotted in Figure 4.1. Note that any set in R2 strictly contained in the
         triangle and containing {x1 , x2 , x3 } is non-convex. This illustrates that the convex
         hull is the smallest set that contains these three points.
                                    2
                                 1.5
                                    1
                                                    x̄
                               x2
                                 0.5
                                    0
                                -0.5       0      0.5             1.5
                                  -0.5                        1           2
                                                         x1
           Figure 4.1 Example 4.2. Illustration of the convex hull of three points x1 =
           [1, 1]′ , x1 = [1, 0]′ , x3 = [0, 1]′ .
            Example 4.3 Consider three points x1 = [1, 1, 1]′ , x2 = [1, 2, 1]′ , x3 = [1, 1, 2]′ in R3 .
            The cone spanned by {x1 , x2 , x3 } is an unbounded set. It is depicted in Figure 4.2.
                                        4
                                        2
                                   x3
                                        0
                                            4
                                                 2
                                                     0            2     4
                                                x2       0
                                                             x1
              Figure 4.2 Example 4.3. Illustration of a cone spanned by the three points
              x1 = [1, 1, 1]′ , x2 = [1, 2, 1]′ , x3 = [1, 1, 2]′ .
                                                    a3′
                                                       x≤
                                                            b3
                                                                 b2
                                                             ≤
                                                        2x
                                        a1′ x ≤
                                                        a′
                                                   b1
           Figure 4.3 H-polyhedron. The planes (here lines) defining the boundary of
           the halfspaces are a′i x − bi = 0.
                                                    a′
                                                    3x
                                                       ≤
                                               4
                                                            b3
                                         ≤b
                                       a4′ x
                                                                 b2
                                                            ≤
                                         a1′ x ≤
                                                        2x
                                                        a′
b1
           Figure 4.4 H-polytope. The planes (here lines) defining the halfspaces are
           a′i x − bi = 0.
                                                                             ′
     for some V = [V1 , . . . , Vk ] ∈ Rn×k , Y = [y1 , . . . , yk′ ] ∈ Rn×k . The main theorem
     for polyhedra states that any H-polyhedron can be converted into a V-polyhedron
     and vice-versa [296, p.30].
         An H-polytope is a bounded H-polyhedron (in the sense that it does not contain
     any ray {x + ty : t ≥ 0}). In Figure 4.4 a two-dimensional H-polytope is plotted.
         A V-polytope is a bounded V-polyhedron
P = conv(V ) = {V λ | λ ≥ 0, 1′ λ = 1 } . (4.8)
     In Section 4.4.4 we show how to convert any H-polytope into a V-polytope and
     vice versa.
4.2     Polyhedra and Representations                                                     75
or, equivalently,
F = P ∩ {z ∈ Rs : c′ z = c0 }, (4.12)
Theorem 4.1 Let P be a polytope, V the set of all its vertices and F a face.
  1. P is the convex hull of its vertices: P=conv(V ).
  2. F is a polytope.
  3. Every intersection of faces of P is a face of P.
  4. The faces of F are exactly the faces of P that are contained in F .
  5. The vertices of F are exactly the vertices of P that are contained in F .
A d-simplex is a polytope of Rd with d + 1 vertices.
   In this book we will work mostly with H-polyhedra and H-polytopes. This
choice has important consequences for algorithm implementations and their com-
plexity. As a simple example, a unit cube in Rd can be described through 2d
equalities as an H-polytope, but requires 2d points in order to be described as
a V-polytope. We want to mention here that many efficient algorithms that
work on polyhedra require both H and V representations. In Figure 4.5 the H-
representation and the V-representation of the same polytope in two dimensions
are plotted.
76                                                         4    Polyhedra and P-collections
x2
                                                      x2
                               x1                                        x1
            (a) Example of V-representation.            (b) Example of H-representation.
            The vertices V1P , . . . , V7P are de-      The hyperplanes Pix x = Pic , i =
            picted as dots.                             1, . . . , 7 are depicted as lines.
           Consider Figure 4.5(b) and notice that no inequality can be removed without
       changing the polyhedron. Inequalities which can be removed without changing the
       polyhedron described by the original set are called redundant. The representation
       of an H-polyhedron is minimal if it does not contain redundant inequalities. De-
       tecting whether an inequality is redundant for an H-polyhedron requires solving a
       linear program, as described in Section 4.4.1.
           By definition a polyhedron is a closed set. In this book we will also work with
       sets which are not closed but whose closure is a polyhedron. For this reason the
       two following non-standard definitions will be useful.
                                                C = {Ci }N
                                                         i=1 ,
                                                           C
                                                                                               (4.13)
                                   C=     P=      Ci .                          (4.14)
                                                 P∈C       i=1
              Example 4.4 A collection C = {[−2, −1], [0, 2], [2, 4]} is a P-collection in R1 with the
              underlying set C = [−2, −1] ∪ [0, 4]. As another example, C = {[−2, 0], [−1, 1], [0, 2]}
              is a P-collection in R1 with underlying set C = [−2, 2]. Clearly, polytopes that define
              a P-collection can overlap, the underlying set can be disconnected and non-convex.
            Usually it is clear from the context if we are talking about the P-collection or
        referring to the underlying set of a P-collection. Therefore for simplicity, we use
        the same notation for both.
                             ¯                                   ¯
        partition of C and Ci is a polyhedron for all i, where Ci denotes the closure of the
        set Ci .
        and Ci is a polyhedron for all i. The set ∂Cj is the boundary of the set Cj .
            Note that in a strict polyhedral partition of a polyhedron some of the sets Ci
        must be open or neither open nor closed. In a partition all the sets may be closed
        and points on the closure of a particular set may also belong to one or several other
        sets. Also, note that a polyhedral partition is a special class of a P-collection.
when comparing them and very often speed-up other polytope manipulations.
        as
                                                       NV
                                                       X                    NV
                                                                            X
                                            n                 i   i   i
                        conv(V ) = {x ∈ R       :x=          α V , α ≥ 0,         αi = 1}.   (4.15)
                                                       i=1                  i=1
4.4.3   Envelope
        The envelope of two H-polyhedra P = {x ∈ Rn : P x x ≤ P c } and Q = {x ∈ Rn :
        Qx x ≤ Qc } is an H-polyhedron
            The computation of the envelope is relatively cheap since it only requires the
        solution of one LP for each facet of P and Q. In particular, if a facet of Q (and P)
        is found to be “non redundant” for the polytope P (for the polytope Q ) then it is
        not part of the envelope. A version of Algorithm 4.1 can be used. Note that the
        envelope of two (or more) polytopes is not necessarily a bounded set (e.g., when
        P ∪ Q is shaped like a star).
                       R1                    R2                        conv(R)
             x2
                                                       x2
                                   x1                                     x1
                               S
                     (a) R =       i∈{1,2}   Ri .              (b) Convex hull of R.
                       R1                    R2                       env(R)
             x2
x2
                                   x1                                     x1
                               S
                     (a) R =       i∈{1,2}   Ri .             (b) Envelope env(R).
        to move from one base to another base through pivoting in the simplex algorithm.
        The reverse search [11] approach belongs to this class. Incremental algorithms start
        from a subset of the polyhedron halfspaces and its associated vertices and itera-
        tively intersect the remaining halfspaces to compute a new set of vertices. The
        double description method [114] belongs to this class. An efficient implementa-
        tion of the double description method is available in [111] and is used in the MPT
        toolbox [149].
            Converting a V-polytope into an H-polytope corresponds to the convex hull
        computation. It can also be done via vertex enumeration. This procedure is based
        upon the polar dual [296, p. 61].
            Alternatively, using the polar dual, an H-polytope can be converted into a V-
        polytope by a convex hull computation. Because of this “symmetry” we say that
        vertex enumeration and convex hull computation are dual to each other.
                              max R                                                      (4.18a)
                               xc ,R
        where Pix denotes the i-th row of P x . This can be proven as follows. Any point x
        of the ball can be written as x = xc + v where v is a vector of length less or equal to
        R. Therefore the center and radius of the Chebychev ball can be found by solving
        the following optimization problem
               max R                                                                     (4.19a)
                xc ,R
x2
                                                    x1
               Figure 4.8 Illustration of the Chebychev ball contained in a polytope P.
4.4.6   Projection
        Given a polytope P = {[x′ y ′ ]′ ∈ Rn+m : P x x+ P y y ≤ P c } ⊂ Rn+m the projection
        onto the x-space Rn is defined as
                       projx (P) = {x ∈ Rn : ∃y ∈ Rm : P x x + P y y ≤ P c }.                (4.21)
        An illustration of a projection operation is given in Figure 4.9. Current projection
                                 x3
                                          x2              x1
              Figure 4.9 Illustration of the projection of a 3-dimensional polytope P onto
              the plane x3 = 0.
        methods that can operate in general dimensions can be grouped into four classes:
        4.4   Basic Operations on Polytopes                                                      83
        Fourier elimination [82, 169], block elimination [15], vertex based approaches [113]
        and wrapping-based techniques [161]. For a good introduction to projection, we
        refer the reader to [161] and the references therein.
4.4.7   Set-Difference
        The set-difference of two polytopes Y and R0
                            R = Y \ R0 = {x ∈ Rn : x ∈ Y, x ∈
                                                            / R0 },                    (4.22)
           As an illustration for the procedure proposed in Theorem 4.2 consider the two-
        dimensional case depicted in Figure 4.10(a). Here Y is defined by the inequalities
        {x−               +   −            +
          1 ≤ x1 ≤ x1 , x2 ≤ x2 ≤ x2 }, and R0 by the inequalities {g1 ≤ 0, . . . , g5 ≤ 0}
        where g1 , . . ., g5 are linear in x. The procedure consists of considering one by one
        the inequalities which define R0 . Considering, for example, the inequality g1 ≤ 0,
        the first set of the rest of the region Y\R0 is given by R1 = {g1 ≥ 0, x1 ≥ x−     −
                                                                                      1 , x2 ≤
                 +
        x2 ≤ x2 }, which is obtained by reversing the sign of the inequality g1 ≤ 0 and
        removing redundant constraints in Y (see Figure 4.10(b)). Thus, by considering
84                                                                 4   Polyhedra and P-collections
          the rest of
                   S5the inequalities we get the partition of the rest of the parameter space
          Y\R0 = i=1 Ri , as reported in Figure 4.10(d).
             x2                                                           x2
          x+                                  Y                        x+                                     Y
           2                                                            2
g1 ≥ 0 g1 ≤ 0
                            R0                                                           R0
                                                                                 R1
          x−
           2                                                           x−
                                                                        2
                                                  x1                                                              x1
               x−
                1                            x+
                                              1                             x−
                                                                             1                               x+
                                                                                                              1
(a) Set of parameters Y and initial set R0 . (b) Partition of Y\R0 - Step 1.
             x2                                                          x2
          x+                                  Y                        x+                                     Y
           2                                                            2
                                    R2                                                             R2
                          g1 ≤ 0
                                   g2 ≥ 0
                            R0                                                           R0
                    R1                                                           R1                     R3
                                                                                         R5
                                                                                              R4
          x−
           2                                                           x−
                                                                        2
                                                  x1                                                              x1
               x−
                1                            x+
                                              1                             x−
                                                                             1                               x+
                                                                                                              1
               Remark 4.1 The set difference of two intersecting polytopes P and Q (or any closed
               sets) is not a closed set. This means that some borders of polytopes Ri from a P-
               collection R = P \ Q are open, while other borders are closed. Even though it is
               possible to keep track of the origin of particular borders of Ri , thus specifying if they
               are open or closed, we are not doing so in the algorithms described in this book nor
               in MPT [149]. In computations, we will henceforth only consider the closure of the
               sets Ri .
P ⊖ Q = {x ∈ Rn : x + q ∈ P, ∀q ∈ Q}. (4.23)
P = {y ∈ Rn : P y y ≤ P b }, Q = {z ∈ Rn : Qz z ≤ Qb }, (4.24)
then
                                 W =P ⊖Q                                                              (4.25a)
                                                n      y          b           y
                                     = {x ∈ R       : P x ≤ P − H(P , Q)},                            (4.25b)
        and Piy is the i-th row of the matrix P y . Note that for special cases (e.g., when Q
        is a hypercube), more efficient computational methods exist [175]. An illustration
        of the Pontryagin difference is given in Figure 4.11a.
                                                                 8      P ⊕Q
                    6        P                                   6        P
                    4            P ⊖Q
                    2                                            2
                                     Q                                                 Q
               x2
x2
                    -2                                           -2
                    -4
                    -6                                           -6
                                                                 -8
                          -6 -4 -2          2 4 6                     -8 -6       -2        2   6 8
                                     x1                                                x1
                    (a) Illustration of the Pontrya-             (b)  Illustration  of          the
                    gin difference P ⊖ Q.                        Minkowski sum P ⊕ Q.
         Both the projection and vertex enumeration based methods are implemented in
         the MPT toolbox [149]. An illustration of the Minkowski sum is given in Figure
         4.11b.
             Remark 4.2 The Minkowski sum is not the complement of the Pontryagin difference.
             For two polytopes P and Q, it holds that (P ⊖ Q) ⊕ Q ⊆ P. This is illustrated in
             Figure 4.12.
     3                                               3                                           3
                P                                           P                                            (P ⊖ Q) ⊕ Q
                                                     2                                           2
     1
                             Q                                      P ⊖Q                                      P ⊖Q
x2
x2
                                                                                          x2
     -1
                                                     -2                                        -2
     -3                                              -3                                        -3
           -3         -1           1        3             -3 -2                 2    3               -3 -2                2   3
                            x1                                       x1                                         x1
          (a) Two polytopes P and Q.                  (b) Polytope P and Pontryagin              (c) Polytope P ⊖ Q and the set
                                                      difference P ⊖ Q.                          (P ⊖ Q) ⊕ Q.
                             Figure 4.12 Illustration that the Minkowski sum is not the complement of
                             the Pontryagin difference. (P ⊖ Q) ⊕ Q ⊆ P.
                                                             ǫ∗ =   max(x,ǫ)   ǫ
                                                                    subj. to   Ãi x ≥ α̃i + ǫ
                                                                               B̃j x ≥ β̃j + ǫ
                                                                               Cx ≤ γ
                    Note that if ǫ∗ = 0 for each i, j, then the union is convex and equals env(P, Q).
                    On the other hand, ǫ∗ > 0 indicates the existence of a point x ∈ env(P, Q) outside
                    P ∪ Q.
                       For recognizing convexity and computing the union of k polyhedra, the test
                    can be modified by checking each k-tuple of removed constraints. Let m̃1 , . . ., m̃k
88                                                           4   Polyhedra and P-collections
             Remark 4.3 Often in the literature the symbol “◦” is omitted for linear maps f = Az.
             Therefore, AP refers to the operation A ◦ P and PA refers to the operation P ◦ A.
        example, one can subdivide any polytope P into a number of smaller polytopes
        whose union is a P-collection which covers P. Note that the complexity of all
        subsequent computations depends strongly on the number of polytopes representing
        a P-collection. The smaller the cardinality of a P-collection, the more efficient the
        computations. The reader is referred to [243, 242] for proofs and comments on
        computational efficiency.
4.5.1 Set-Difference
        The first two results given here show how the set difference of a P-collection and a
        P-collection (or polyhedron) may be computed.
                              S
        Lemma 4.1 Let C = j∈{1,...,J} Cj be a P-collection, where all the Cj , j ∈ {1, . . . , J},
                                                                            S
        are nonempty polyhedra. If D is a nonempty polyhedron, then C\D = j∈{1,...,J} (Cj \
        D) is a P-collection.
                                            S                          S
        Lemma 4.2 Let the sets C = j∈{1,...,J} Cj and D = y=1,...,Y Dy be P-collections,
        where all the Cj , j ∈ {1, . . . , J}, and Dy , y ∈ {1, . . . , Y }, are nonempty polyhedra.
        If E0 = C and Ey = Ey−1 \ Dy , y ∈ {1, . . . , Y } then C \ D = EY is a P-collection.
C = D ⇔ (C \ D = ∅ and D \ C = ∅).
              Remark 4.4 Note that H in Algorithm 4.3 can be any convex set containing the
              P-collection C. The computation of H is generally more efficient if the envelope
              operation is used instead of convex hull.
90                                                            4    Polyhedra and P-collections
                                                    S                       S
          Remark 4.5 It is important to note that ( j∈{1,...,J } Cj ) ⊖ B =
                                                                          6   j∈{1,...,J } (Cj ⊖ B),
          where B and Cj are polyhedra; hence, the relatively high computational effort of
          computing the Pontryagin difference of a P-collection and a polytope.
C2 C1
                                B
     x2
                                                  x2
                                x1                                    x1
                   S
             (a)       j∈{1,...,J }   Cj and B.               (b) H = conv(C).
                                                          E
                        H
                            D
     x2
x2
                                x1                                    x1
                    (c) D = H ⊖ B.                             (d) E = H \ C.
                       F                                 F                  D
     x2
x2
                                x1                                    x1
                   (e) F = E ⊕ (−B).                           (f) G = D \ F .
                           D = H ⊖ B = {x : x + w ∈ H, ∀w ∈ B},
                           E = H \ C = {x : x ∈ H and x ∈
                                                        / C}.
              F = E ⊕ (−B) = {x : x = z + w, z ∈ E, w ∈ (−B)}
                           = {x : ∃w ∈ (−B), subj. to x − w ∈ E}.
                       D \ F = {x : x ∈ D and x ∈
                                                / F}
                              = {x ∈ D : ∄ w ∈ B s.t. x + w ∈ E}
                              = {x ∈ D : x + w ∈
                                               / E, ∀w ∈ B}.
                       D \ F = {x : x + w ∈ H and x + w ∈
                                                        / E, ∀w ∈ B}
                       D \ F = {x : x + w ∈ H and (x + w ∈
                                                         / H or x + w ∈ C) ∀w ∈ B}
                              = {x : x + w ∈ C, ∀w ∈ B}
                              = C ⊖ B.
                                                                                               
              Algorithm 4.3 is illustrated on a sample P-collection in Figures 4.13(a) to 4.13(f).
              Remark 4.6 It should be noted that Algorithm 4.3 for computation of the Pontrya-
              gin difference is conceptually similar to the algorithm proposed in [263, 172]. The
              envelope operation H = env(C) employed in Algorithm 4.3 might reduce the number
              of sets obtained when computing H \ C, which in turn results in fewer Minkowski set
              additions. Since the computation of a Minkowski set addition is expensive, a runtime
              improvement can be expected.
Multiparametric Programming
      Chapter 5
      Multiparametric Nonlinear
      Programming
The Lagrangian is
                                              1 2
                              L(z, x, u) =      z + 2xz + 2x2 + u(z − x − 1)
                                              2
         and the KKT conditions are (see Section 2.3.3 for KKT conditions for quadratic
5.1    Introduction to Multiparametric Programs                                              97
programs)
                                            z + 2x + u    =0                        (5.1a)
                                        u(z − x − 1)      =0                        (5.1b)
                                                      u   ≥0                        (5.1c)
                                              z−x−1       ≤ 0.                      (5.1d)
                             2
                                  J ∗ (x)
                             1
                             0
                                    z ∗ (x)
                            -1
                            -2
                             -2         -1        0         1    2
                                                  x
        Figure 5.1 Example 5.1. Optimizer z ∗ (x) and value function J ∗ (x) as a
        function of the parameter x.
The above simple procedure, which required nothing but the solution of the KKT
conditions, yielded the optimizer z ∗ (x) and the value function J ∗ (x) for all values
of the parameter x. The set of admissible parameter values was divided into two
critical regions, defined by x ≤ − 13 and x > − 31 . In the region x ≤ − 31 the
inequality constraint is active and the Lagrange multiplier is greater or equal than
zero, in the other region x > − 13 the inequality constraint is not active and the
Lagrange multiplier is equal to zero.
     In general, when there are more than one inequality constraints a critical region
is defined by the set of inequalities that are active in the region. Throughout a
critical region the conditions for optimality derived from the KKT conditions do
not change. For our example, in each critical region the optimizer z ∗ (x) is affine and
the value function J ∗ (x) is quadratic. Thus, considering all x, z ∗ (x) is piecewise
affine and J ∗ (x) is piecewise quadratic. Both z ∗ (x) and J ∗ (x) are continuous, but
z ∗ (x) is not continuously differentiable.
98                                               5       Multiparametric Nonlinear Programming
           In much of this book we will be interested in two questions: how to find the value
       function J ∗ (x) and the optimizer z ∗ (x) and what are their structural properties,
       e.g., continuity, differentiability and convexity. Such questions have been addressed
       for general nonlinear multiparametric programming by several authors in the past
       (see [18] and references therein), by making use of quite involved mathematical
       theory based on the continuity of point-to-set maps. The concept of point-to-set
       maps will not be much used in this book. However, it represents a key element for a
       rigorous mathematical description of the properties of a nonlinear multiparametric
       program and hence a few key theoretical results for nonlinear multiparametric
       programs based on the point-to-set map formalism will be discussed in this chapter.
       by J ∗ (x) the real-valued function that expresses the dependence of the minimum
       value of the objective function over K∗ on x
       and by Z ∗ (x) the point-to-set map which assigns the (possibly empty) set of opti-
       mizers z ∗ ∈ 2Z to a parameter x ∈ X
       J ∗ (x) will be referred to as optimal value function or simply value function, Z ∗ (x)
       will be referred to as the optimal set. If Z ∗ (x) is a singleton for all x, then z ∗ (x) =
       Z ∗ (x) will be called optimizer function. We remark that R and Z ∗ are set-valued
5.2    General Results for Multiparametric Nonlinear Programs                                          99
functions. As discussed in the notation section, with abuse of notation J ∗ (x) and
Z ∗ (x) will denote both the functions and the value of the functions at the point x.
The context will make clear which notation is being used.
     The book by Bank and coauthors [18] and Chapter 2 of [107] describe conditions
under which the solution of the nonlinear multiparametric program (5.3) is locally
well behaved and establish properties of the optimal value function and of the
optimal set. The description of such conditions requires the definition of continuity
of point-to-set maps. Before introducing this concept we will show through two
simple examples that continuity of the constraints gi (z, x) with respect to z and
x is not enough to imply any “regularity” of the value function and the optimizer
function.
      Cost and constraints are continuous and continuously differentiable. For 0 < x ≤ 1
      the optimizer function is z ∗ = (1 − x)/x and the value function is J ∗ (x) = −(1 − x)2 .
      For x = 0, the value function is J ∗ (x) = 0 while the optimal set is Z ∗ = {z ∈ R : z ≥
      0}. Thus, the value function is discontinuous at 0 and the optimal set is single-valued
      for all 0 < x ≤ 1 and set-valued for x = 0.
                                     J ∗ (x) = inf     z
                                                  z
                                         subj. to      zx ≥ 0                                 (5.9)
                                                       −10 ≤ z ≤ 10
                                                       −10 ≤ x ≤ 10,
      where z ∈ R and x ∈ R. For each fixed x the set of feasible z is a segment. The
      point-to-set map R(x) is plotted in Figure 5.2(a). The function g1 : (z, x) 7→ zx is
      continuous. Nevertheless, the value function J ∗ (x) = z ∗ (x) has a discontinuity at the
      origin as can be seen in Figure 5.2(b).
      where examples of the functions g1 (z1 , z2 ) and g2 (z1 , z2 ) are plotted in Figures 5.3(a)–
      5.3(c). Figures 5.3(a)–5.3(c) also depict the point-to-set map R(x) = {[z1 , z2 ] ∈
      R2 |g1 (z1 , z2 ) + x ≤ 0, g2 (z1 , z2 ) + x ≤ 0} for three fixed x. Starting from x = x̄1 ,
      as x increases, the domain of feasibility in the space z1 , z2 shrinks; at the beginning
      it is connected (Figure 5.3(a)), then it becomes disconnected (Figure 5.3(b)) and
      eventually connected again (Figure 5.3(c)). No matter how smooth one chooses the
100                                                    5   Multiparametric Nonlinear Programming
10 10
5 5
                                                              J ∗ (x)
         R(x)
                0                                                       0
-5 -5
           -10                                                    -10
                     -10      -5    0      5      10                         -10    -5      0      5       10
                                    x                                                       x
                     (a) Point-to-set map R(x).                              (b) Value function J ∗ (x).
          functions g1 and g2 , the value function J ∗ (x) = −z1∗ (x) will have a discontinuity at
          x = x̄3 .
      Examples 5.2, 5.3, 5.4 show the case of simple and smooth constraints which lead
      to a discontinuous behavior of value function and in Examples 5.3, 5.4 we also
      observe discontinuity of the optimizer function. The main causes are:
         • in Example 5.2 the feasible vector space Z is unbounded (z ≥ 0),
         • in Examples 5.3 and 5.4 the feasible point-to-set map R(x) (defined in (5.4))
           is discontinuous, as defined precisely below.
      In the next sections we discuss both cases in detail.
      Definition 5.1 The point-to-set map R(x) is open at a point x̄ ∈ K∗ if for all
      sequences {xk } ⊂ K∗ with xk → x̄ and for all z̄ ∈ R(x̄) there exists an integer m
      and a sequence {z k } ∈ Z such that z k ∈ R(xk ) for k ≥ m and z k → z̄.
      Definition 5.2 The point-to-set map R(x) is closed at a point x̄ ∈ K∗ if for each
      pair of sequences {xk } ⊂ K∗ , and z k ∈ R(xk ) with the properties
xk → x̄, z k → z̄.
z2 z2
  g1 (z1 , z2 ) = x̄1
                                                               g1 (z1 , z2 ) = x̄2
z1 z1
                                                               g2 (z1 , z2 ) = x̄2
  g2 (z1 , z2 ) = x̄1
(a) Set R(x̄1 ) shaded in gray. (b) Set R(x̄2 ) shaded in gray.
z2 J ∗ (x)
g1 (z1 , z2 ) = x̄3
z1 x̄1 x̄3 x
g2 (z1 , z2 ) = x̄3
        Figure 5.3 Example 5.4. Problem (5.10). (a)-(c) Projections of the point-to-
        set map R(x) for three values of the parameter x: x̄1 < x̄2 < x̄3 ; (d) Value
        function J ∗ (x).
          x̄ = 1 from the left and extracts the sequence {z k } plotted in Figure 5.4 converging
          to z̄ = 0.75, then z̄ ∈
                                / R(x̄) since R(1) = [0, 0.5].
                              z
                              1
                                          {zk }
0.5
                                          {xk }
                                                    1                         x
Figure 5.4 Example 5.5. Open and not closed point-to-set map R(x).
          The point-to-set map R(x) is plotted in Figure 5.5. It is easy to verify that R(x) is
          closed but not open. Choose z̄ = 0.75 ∈ R(x̄). Then, for any sequence {xk } that
          converges to x̄ = 1 from the right, one is not able to construct a sequence {z k } ∈ Z
          such that z k ∈ R(xk ) and z k → z̄. In fact, such sequence z k will always be bounded
          between 0 and 0.5.
                              z
                              1
                             0.5
                                                         {zk }
                                                         {xk }
                                                    1                         x
Figure 5.5 Example 5.6. Closed and not open point-to-set map R(x).
      Remark 5.2 Note that convexity in z for each x is not enough to imply the continuity
      of R(x) everywhere in K∗ . In [18, Example 3.3.1 on p. 53] an example illustrating
      this is presented. We remark that in Example 5.3 the origin does not satisfy the last
      hypothesis of Theorem 5.1.
      Remark 5.3 If the assumptions of Theorem 5.1 hold at each x̄ ∈ X then one can
      extract a continuous single-valued function (often called a “continuous selection”) r :
      X 7→ R such that r(x) ∈ R(x), ∀x ∈ X , provided that Z is finite-dimensional. Note
      that convexity of R(x) is a critical assumption [18, Corollary 2.3.1]. The following
      example shows a point-to-set map R(x) not convex for a fixed x which is continuous
      but has no continuous selection [18, p. 29]. Let Λ be the unit disk in R2 , define R(x)
      as
                                                                      1
                             x ∈ Λ 7→ R(x) = {z ∈ Λ : kz − xk2 ≥ }.                        (5.11)
                                                                      2
      It can be shown that the point-to-set map R(x) in (5.11) is continuous according to
      Definition 5.3. In fact, for a fixed x̄ ∈ Λ the set R(x̄) is the set of points in the unit
      disk outside the disk centered in x̄ and of radius 0.5 (next called the half disk ); small
      perturbations of x̄ yield small translations of the half disk inside the unit disk for
      all x̄ ∈ Λ. However R(x) has no continuous selection. Assume that there exists a
      continuous selection r : x ∈ Λ 7→ r(x) ∈ Λ. Then, there exists a point x∗ such that
      x∗ = r(x∗ ). Since r(x) ∈ R(x), ∀x ∈ Λ, there exists a point x∗ such that x∗ ∈ R(x∗ ).
      This is not possible since for all x∗ ∈ Λ, x∗ ∈
                                                    / R(x∗ ) (recall that R(x∗ ) is set of points
      in the unit disk outside the disk centered in x∗ and of radius 0.5).
      Remark 5.5 Based on [18, Theorem 3.2.1-(I) and Theorem 3.3.3], the hypotheses of
      Theorem 5.1 can be relaxed for affine gi (z, x). In fact, affine functions are weakly
      analytic functions according to [18, p. 47]. Therefore, we can state that if Z is convex,
      if each component gi (z, x) of g(z, x) is an affine function, then R(x) is continuous at
      x̄ for all x̄ ∈ K∗ .
          Remark 5.6 Equivalent results of Theorems 5.2 and 5.3 can be found in [47, p. 116]
          and [18, Chapter 4.2].
                                       J ∗ (x) = inf   z
                                                  z
                                           subj. to    zx ≥ −ε                              (5.14)
                                                       −10 ≤ z ≤ 10
                                                       −10 ≤ x ≤ 10,
          where ε > 0. The value function and the optimal set are depicted in Figure 5.6 for
          ε = 1. No matter how small we choose ε, the value function and the optimal set are
          continuous for all x ∈ [−10, 10]
5.2          General Results for Multiparametric Nonlinear Programs                                                  105
10 10
5 5
                                                              J ∗ (x)
      R(x)
0 0
-5 -5
        -10                                                       -10
                  -10      -5    0       5       10                          -10       -5   0      5       10
                                 x                                                          x
                  (a) Point-to-set map R(x).                                 (b) Value function J ∗ (x).
Corollary 5.1 (mp-LP) Consider the special case of the multiparametric pro-
gram (5.3). where the objective and the constraints are linear
                                        J ∗ (x) = min c′ z
                                                          z                                                 (5.15)
                                             subj. to Gz ≤ w + Sx,
and assume that there exists an x̄ and z ∗ (x̄) with a bounded cost J ∗ (x̄). Then, K∗
is a nonempty polyhedron, J ∗ (x) is a continuous and convex function on K∗ and
the optimal set Z ∗ (x) is a continuous point-to-set map on K∗ .
        Proof: See Theorem 5.5.1 in [18] and the bottom of page 138 in [18].                                    
Corollary 5.2 (mp-QP) Consider the special case of the multiparametric pro-
gram (5.3). where the objective is quadratic and the constraints are linear
                                                              1 ′
                                     J ∗ (x) =   min          2 z Hz          + z ′F
                                                      z                                                     (5.16)
                                                 subj. to Gz ≤ w + Sx,
and assume that H ≻ 0 and that there exists (z̄, x̄) such that Gz̄ ≤ w + S x̄. Then,
K∗ is a nonempty polyhedron, J ∗ (x) is a continuous and convex function on K∗
and the optimizer function z ∗ (x) is continuous in K∗ .
        Proof: See Theorem 5.5.1 in [18] and the bottom of page 138 in [18].                                    
       Remark 5.7 We remark that Corollary 5.1 requires the existence of optimizer z ∗ (x̄)
       with a bounded cost. This is implicitly guaranteed in the mp-QP case since in
       Corollary 5.2 the matrix H is assumed to be strictly positive definite. Moreover, the
       existence of an optimizer z ∗ (x̄) with a bounded cost guarantees that J ∗ (x) is bounded
       for all x in K∗ . This has been proven in [115, p. 178, Theorem 1] for the mp-LP case
       and it is immediate to prove for the mp-QP case.
106                                      5   Multiparametric Nonlinear Programming
      Remark 5.8 Both Corollary 5.1 (mp-LP) and Corollary 5.2 (mp-QP) could be formu-
      lated stronger: J ∗ and Z ∗ are even Lipschitz-continuous. J ∗ is also piecewise affine
      (mp-LP) or piecewise quadratic (mp-QP), and for the mp-QP z ∗ (x) is piecewise
      affine. For the linear case, Lipschitz continuity is known from Walkup-Wets [283] as
      a consequence of Hoffman’s theorem. For the quadratic case, Lipschitz continuity fol-
      lows from Robinson [253], as e.g., shown by Klatte and Thiere [178]. The “piecewise”
      properties are consequences of local stability analysis of parametric optimization,
      e.g. [107, 18, 200] and are the main focus of the next chapter.
        Chapter 6
        Multiparametric Programming:
        a Geometric Approach
        Theorem 6.1 Consider the multiparametric problem (6.1). If the domain of J(z, x)
        is Rs+n then K∗ is a polytope.
              Proof: K∗ is the projection of the set Gz − Sx ≤ w on the x space intersected
        with the polytope K.                                                                     
            For any given x̄ ∈ K∗ , J ∗ (x̄) denotes the minimum value of the objective func-
        tion in problem (6.1) for x = x̄. The function J ∗ : K∗ → R expresses the depen-
        dence of the minimum value of the objective function on x, J ∗ (x) is called the value
                                                           s           s
        function. The set-valued function Z ∗ : K∗ → 2R , where 2R is the set of subsets of
        Rs , describes for any fixed x ∈ K∗ the set Z ∗ (x) of optimizers z ∗ (x) yielding J ∗ (x).
            We aim to determine the feasible set K∗ ⊆ K of parameters, the expression of
        the value function J ∗ (x) and the expression of one of the optimizers z ∗ (x) ∈ Z ∗ (x).
It is clear that A(x) and N A(x) are disjoint and their union is I.
        Definition 6.2 Consider a set A ⊆ I. The critical region associated with the set
        of active constraints A is defined as
                                     CRA = {x ∈ K∗ : A(x) = A}.                              (6.4)
        The set CRA is the set of all parameters x such that the constraints indexed by A
        are active at the optimum of problem (6.1). Our first objective is to work with full-
        dimensional critical regions. For this reason, we discuss next how the dimension of
        the parameter space can be reduced in case it is not full-dimensional.
        6.1    Multiparametric Programs with Linear Constraints                                            109
        It may happen that the set of inequality constraints in (6.1) contains some “hidden”
        or “implicit” equality constraints as the following example shows.
              Example 6.1
                                      minz     J(z,
                                                x)
                                                z1 + z2
                                                           ≤   9 − x1 − x2
                                               
                                               
                                               
                                                 z1 − z2   ≤   1 − x1 − x2
                                               
                                               
                                                z1 + z2    ≤   7 + x1 + x2
                                                                                                   (6.5)
                                   subj. to       z1 − z2   ≤   −1 + x1 + x2
                                               
                                               
                                               
                                                    −z1    ≤   −4
                                               
                                               
                                               
                                                    −z 2   ≤   −4
                                               
                                                       z1   ≤   20 − x2 ,
              where K = {[x1 , x2 ]′ ∈ R2 : −100 ≤ x1 ≤ 100, −100 ≤ x2 ≤ 100}. The reader can
              check that all feasible values of x1 , x2 , z1 , z2 satisfy
                                              z1 + z2 = 9 − x 1 − x 2
                                              z1 − z2 = 1 − x 1 − x 2
                                              z1 + z2 = 7 + x 1 + x 2
                                              z1 − z2 = −1 + x1 + x2                               (6.6)
                                              z1 = 4
                                              z2 = 4
                                              z1 ≤ 20 − x2 ,
              where we have identified many of the inequalities to be hidden equalities. This can
              be simplified to
                                                 x1 + x2 = 1
                                                                                             (6.7)
                                                 x2 ≤ 16.
              Thus                                                      
                                                          x1 + x2 = 1   
                                 K∗ = [x1 , x2 ]′ ∈ R2 : −100 ≤ x1 ≤ 100   .                       (6.8)
                                                                        
                                                         −100 ≤ x2 ≤ 16
              The example shows that the polytope K∗ is contained in a lower dimensional subspace
              of K, namely a line segment in R2 .
           Our goal is to identify the hidden equality constraints (as in (6.6)) and use
        them to reduce the dimension of the parameter space (as in (6.7)) for which the
        multiparametric program needs to be solved.
                                              vi∗ = min Bi ξ
                                                subj. to Bξ ≤ v,
        Consider the special case of the multiparametric program (6.1) where the objective
        is linear
                                    J ∗ (x) = min c′ z
                                                z                                        (6.11)
                                          subj. to Gz ≤ w + Sx.
        All the variables were defined in Section 6.1.1. Our goal is to find the value function
        J ∗ (x) and an optimizer function z ∗ (x) for x ∈ K∗ . Note that K∗ can be determined
        as discussed in Theorem 6.1. As suggested through Example 5.1 our search for
        these functions proceeds by partitioning the set of feasible parameters into critical
        regions. This is shown through a simple example next.
The Lagrangian is
      and the KKT conditions are (see Section 2.2.3 for KKT conditions for linear pro-
      grams)
                                            −u1 − u2       = −1                      (6.12a)
                                    u1 (−z + x + 1)            =0                    (6.12b)
                                               u2 (−z)         =0                    (6.12c)
                                                      u1       ≥0                    (6.12d)
                                                      u2       ≥0                    (6.12e)
                                           −z + x + 1          ≤0                     (6.12f)
                                                      −z   ≤ 0.                      (6.12g)
                      u1 + u2 = 1       ∗
                                       
                                        z =1+x
                      −z + x + 1 = 0    ∗
                                         u1 = 1, u∗2 = 0
                   A. −z < 0         ⇒
                                       
                                        J∗ = 2 + x
                      u1 > 0           
                                         x > −1
                      u2 = 0
                      u1 + u2 = 1       ∗
                                       
                                        z =0
                      −z + x + 1 < 0    ∗
                                         u1 = 0, u∗2 = 1
                   B. −z = 0         ⇒                                                (6.13)
                                       
                                        J∗ = 1
                      u1 = 0           
                                         x < −1
                      u2 > 0
                      u1 + u2 = 1       ∗
                                       
                                        z =0
                      −z + x + 1 = 0    ∗
                                         u1 ≥ 0, u2 ≥ 0, u∗1 + u∗2 = 1
                   C. −z = 0         ⇒
                                        J∗ = 1
                                       
                      u1 ≥ 0           
                                         x = −1
                      u2 ≥ 0
                                            J ∗ (x)
                                    1
                                    0
                                            z ∗ (x)
                                                  -1
                                                        x
              Figure 6.1 Example 6.2. Optimizer z ∗ (x) and value function J ∗ (x) as a
              function of the parameter x.
            for optimality derived from the KKT conditions do not change. For our example, in
            each critical region the optimizer z ∗ (x) is affine and the value function J ∗ (x) is also
            affine.
                                 z ∗ = G−1
                                        A (SA x + wA ),                            (6.17)
and substituting in (6.16b) we obtain the set of inequalities that defines the critical
region CRA of parameters x for which the optimizer is (6.17):
                                                                   	
               CRA = x : GN A G−1  A (SA x + wA ) − SN A x < wN A .             (6.18)
    The following derivation deals with the general case when the optimizer z ∗ (x)
is not necessarily unique and GA is not invertible. We know from (6.16a) that for
x ∈ CRA
                               GA z ∗ − SA x = wA .
For another x̄ ∈ CRA we require
GA z̄ − SA x̄ = wA ,
GA z̃ − SA x̃ = 0.
This equation will have a solution z̃ for arbitrary values of x̃, i.e., a full dimensional
CRA if
                             rank[GA ] = rank[GA SA ].
Otherwise the dimension over which x̃ can vary will be restricted to
where:
         Px    =    {x : Dx = r} ,                                              (6.24)
                                                                                
                      z2
       Pz2 x   =          : (F − EU1−1 U2 )z2 + (SN A − EU1−1 P )x < wN A − EU1−1 q .
                       x
                                                                                           (6.25)
      In other words:
                                     CRA = Px ∩ projx (Pz2 x ).                            (6.26)
                                             ∗
           In summary, if the optimizer z (x) is not unique then it can be expressed as
      z1∗ (x) (6.21), where the set of optimizers is characterized by z2∗ (x), which is allowed
      to vary within the set Pz2 x (6.25). We have also constructed the critical region
      CRA (6.26), where z1∗ (x) remains optimal. If GA is not invertible and the matrix
      D is not empty then the critical region is not full dimensional.
           We can now state some fundamental properties of the critical regions, value
      function and optimizer inside a critical region.
               Since the intersection of Px and projx (Pz2 x ) is nonempty (it contains at least
               the point x∗ ) we can conclude that
                                                                   
                                  dim CRA = n − rank GA           SA + rank GA .
               Since we assumed that the set K in (6.2) is bounded, CRA is bounded. This
               implies that CRA is an open polytope since it is the intersection of an open
               polytope and the subspace Dx = r. In general, if we allow K in (6.2) to be
               unbounded, then the critical region CRA can be unbounded.
          ii) Consider (6.21) and recall that l = rank GA . If l = s, then the primal
              optimizer is unique, U2 is an empty matrix and
         iii) If the primal optimizer is not unique in CRA then Z ∗ (x) in CRA is the
              following point-to-set map: Z ∗ (x) = {[z1 , z2 ] : z2 ∈ Pz2 x , U1 z1 +U2 z2 +P x =
              q)}. Z ∗ (x) is an open polyhedron since Pz2 x is open.
         iv) Consider the dual problem (6.14) and one of its optimizer u∗0 for x = x∗ . By
             definition of a critical region u∗0 remains optimal for all x ∈ CRA . Therefore
             the value function in CRA is
              Remark 6.1 If the optimizer is unique then the computation of CRA in (6.26) does
              not require the projection of the set Pz2 x in (6.25). In fact, U2 and F are empty
              matrices and
                                                                             	
                   CRA = Pz2 x = x : Dx = r, (SNA − EU −1 P )x < wNA − EU −1 q .            (6.29)
        The objective of this section is to briefly describe the propagation of the set of active
        constraints when moving from one full-dimensional critical region to a neighboring
        full-dimensional critical region. We will use a simple example in order to illustrate
        the main points.
116                         6     Multiparametric Programming: a Geometric Approach
          where K is given by
                                               −2.5 ≤ x1 ≤ 2.5
                                                                                        (6.31)
                                               −2.5 ≤ x2 ≤ 2.5.
          A solution to the mp-LP problem is shown in Figure 6.2 and the constraints which
          are active in each associated critical region are reported in Table 6.1. Clearly, as
          z ∈ R4 , CR1 = CR{1,4,5,6,7,8} and CR2 = CR{2,3,5,6,7,8} are primal degenerate
          full-dimensional critical regions.
Table 6.1 Example 6.3. Critical regions and corresponding value function.
          By observing Figure 6.2 and Table 6.1 we notice the following. Under no primal
      and dual degeneracy, (i) full critical regions are described by a set of active con-
      straints of dimension n, (ii) two neighboring full-dimensional critical regions CRAi
      and CRAj have Ai and Aj differing only in one constraint, (iii) CRAi and CRAj
      will share a facet which is a primal degenerate critical region CRAp of dimension
      n − 1 with Ap = Ai ∪ Aj . In Example 6.3, CR7 ad CR12 are two full-dimensional
      and neighboring critical regions and the corresponding active set differs only in one
        6.2   Multiparametric Linear Programming                                                   117
                       2.5
                                        10
                                                                         12
                                             4
                                    5
                                                 1                 7
                 x2
2 8
9 3
                                                                          6
                                                                    11
                      -2.5
                             -2.5                                                  2.5
                                                       x1
        If rank[GA ] < s then Z ∗ (x) is not a singleton and the projection of the set Pz2 x
        in (6.25) is required in order to compute the critical region CRA(x∗ ) , which is “ex-
        pensive” (see Section 6.1.1 for a discussion of polyhedra projection). It is preferable
        to move on the optimal facet to a vertex and to construct the critical region starting
        with this optimizer. This is explained next.
            If one needs to determine one possible optimizer z ∗ (·) in the dual degenerate
        region CRA(x∗ ) the following simple method can be used. Choose a particular
                                                                                  b ∗ ) ⊃ A(x∗ )
        optimizer which lies on a vertex of the feasible set, i.e., determine set A(x
        of active constraints for which rank(GA(x                                     d b ∗ of
                                                 b ∗ ) ) = s, and compute a subset CRA(x    )
        the dual degenerate critical region (namely, the subset of parameters x such that
118                           6        Multiparametric Programming: a Geometric Approach
x2
CR{2}
                                                               CR{1,5}
                                                 CR{1,3}
x1
            Figure 6.3 Example 6.4. Polyhedral partition of the parameter space corre-
            sponding to the solution.
                                        min   −2z1 − z2
                                              
                                              
                                               z1 + 3z2   ≤   9 − 2x1 + x2
                                              
                                              
                                               2z1 + z2   ≤   8 + x1 − 2x2
                                                                                              (6.32)
                                  subj. to            z1   ≤   4 + x1 + x2
                                              
                                              
                                              
                                                   −z1    ≤   0
                                              
                                                    −z2    ≤   0,
The solution is represented in Figure 6.3 and the critical regions are listed in Table 6.2.
         The critical region CR{2} is related to a dual degenerate solution with non-
      unique optimizers. The analytical expression of CR{2} is obtained by projecting
        6.2   Multiparametric Linear Programming                                                    119
Table 6.2 Example 6.4. Critical regions and corresponding optimal value.
        the H-polyhedron
                                    z1 + 3z2 + 2x1 − x2    <    9
                                    2z1 + z2 − x1 + 2x2    =    8
                                    z1 − x1 − x2           <    4                          (6.34)
                                    −z1                    <    0
                                    −z2                    <    0
        on the parameter space to obtain:
                                                                            
                                  
                                                 2.5x1 − 2x2       ≤    5   
                                                                             
                                                                            
                                                  −0.5x1 + x2       ≤    4
                         CR{2} = [x1 , x2 ] :                                    ,         (6.35)
                                  
                                                 −12x2             ≤    5   
                                                                             
                                                                            
                                                  −x1 − x2          ≤    4
        which is effectively the result of (6.26). For all x ∈ CR{2} , only one constraint is
        active at the optimum, which makes the optimizer not unique.
            Figures 6.4, 6.5 and 6.6 show two possible ways of covering CR{2} without using
        projection. The generation of overlapping regions is avoided by intersecting each
        new region with the current partition computed so far, as shown in Figure 6.7 where
        g {2,4} and CR
        CR            g {2,1} represent the intersected critical regions. In Figures 6.4, 6.5
        the regions are overlapping, and in Figure 6.7 artificial cuts are introduced at
        the boundaries inside the degenerate critical region CR{2} . No artificial cuts are
        introduced in Figure 6.6 because the CR   g {2,3} and CRg {2,5} happen to be non-
        overlapping.
        Theorem 6.3 Assume that for a fixed x0 ∈ K there exists a finite optimal solution
        z ∗ (x0 ) of (6.11). Then, for all x ∈ K, (6.11) has either a finite optimum or no
        feasible solution.
             Proof: Consider the mp-LP (6.11) and assume by contradiction that there
        exist x0 ∈ K and x̄ ∈ K with a finite optimal solution z ∗ (x0 ) and an unbounded
        solution z ∗ (x̄). Then the dual problem (6.14) for x = x̄ is infeasible. This implies
        that the dual problem will be infeasible for all real vectors x since x enters only in
        the cost function. This contradicts the hypothesis since the dual problem (6.14)
        for x = x0 has a finite optimal solution.                                           
120                         6     Multiparametric Programming: a Geometric Approach
                                             x2
                                                     d {2,5}
                                                     CR
x̄1
                             z2       c′ x = const
                                                                          x1
                                        1
                                  4                  2
                                        5
                                                           z1
                                            d {2,5} ⊂ CR{2} , and below
                           (a) First region CR
                           the feasible set in the z-space corresponding
                                    d {2,5} .
                           to x̄1 ∈ CR
                                             x2           d {2,4}
                                                          CR
x̄2
                             z2
                                      c′ x = const
                                                                          x1
                                        2
                                  4            3
                                        5
                                                           z1
                                             d {2,4} ⊂ CR{2} , and be-
                           (b) Second region CR
                           low the feasible set in the z-space correspond-
                                        d {2,4} .
                           ing to x̄2 ∈ CR
      Theorem 6.4 The set of all parameters x such that the LP (6.11) has a finite
      optimal solution z ∗ (x) equals K∗ .
6.2   Multiparametric Linear Programming                                                 121
x2
                                                                  d {2,1}
                                                                  CR
                                                        x̄3
                        z2
                                 1       c′ x = const
                                                                  x1
                             4           2
                                             3
                                     5
                                                   z1
                                       d {2,1} ⊂ CR{2} , and below
                      (a) Third region CR
                      the feasible set in the z-space corresponding
                               d {2,1} .
                      to x̄3 ∈ CR
                        x2                                    d {2,5}
                                                              CR
                                         d {2,4}
                                         CR
                                                                d {2,1}
                                                                CR
                                                                 x1
                      (b) Final partition of CR{2} . Note that the
                             d {2,5} is hidden by region CR
                      region CR                          d {2,4}
                                 d {2,1} .
                      and region CR
    Proof: It follows directly from from Theorem 6.1 and Theorem 6.3.           
   Note that from Definition 6.3 K∗ is the set of feasible parameters. However the
LP (6.11) might be unbounded for some x ∈ K∗ . Theorem 6.4 excludes this case.
   The following Theorem 6.5 summarizes the properties enjoyed by the multi-
parametric solution.
122                          6        Multiparametric Programming: a Geometric Approach
                                 x2                   d {2,5}
                                                      CR
                                                                           x1
                                                       d {2,5} ⊂ CR{2} .
                                      (a) First region CR
x2
                                             d {2,3}
                                             CR
                                                                           x1
                                                    d {2,3} ⊂ CR{2} .
                                  (b) Second region CR
                                                                          d {2,5} and
            Figure 6.6 Example 6.4. A possible solution where the regions CR
            d
            CR{2,3} are non-overlapping
      Theorem 6.5 The function J ∗ (·) is convex and piecewise affine over K∗ . If the
      optimizer z ∗ (x) is unique for all x ∈ K∗ , then the optimizer function z ∗ : K∗ → Rs
      is continuous and piecewise affine. Otherwise it is always possible to define a
      continuous and piecewise affine optimizer function z ∗ such that z ∗ (x) ∈ Z ∗ (x) for
      all x ∈ K∗ .
          Remark 6.2 In Theorem 6.5, the piecewise affine property of optimizer and value
          function follows immediately from Theorem 6.2 and from the enumeration of all
          possible combinations of active constraint sets. Convexity of J ∗ (·) and continuity of
          Z ∗ (x) follows from standard results on multiparametric programs (see Corollary 5.1).
          In the presence of multiple optimizers, the proof of existence of a continuous and
          piecewise affine optimizer function z ∗ such that z ∗ (x) ∈ Z ∗ (x) for all z ∈ K∗ is more
        6.2    Multiparametric Linear Programming                                                   123
                                  x2                  d {2,5}
                                                      CR
                                          g {2,4}
                                          CR
                                                         g {2,1}
                                                         CR
x1
                              maxx,z,ǫ    ǫ
                              subj. to    Ti x + ǫkTi k2 ≤ Ni , i = 1, . . . , nT          (6.36)
                                          Gz − Sx ≤ w,
        where nT is the number of rows Ti of the matrix T defining the set K in (6.2).
124                          6   Multiparametric Programming: a Geometric Approach
                             A(x0 ) = {j ∈ I : Gj z0∗ − Sj x0 − wj = 0}
                                                                                         (6.37)
                            NA(x0 ) = {j ∈ I : Gj z0∗ − Sj x0 − wj < 0}
      and consequently the critical region CRA(x0 ) . Once the critical region CRA(x0 )
      has been defined, the rest of the space Rrest = K\CRA(x0 ) has to be explored and
      new critical regions generated. An approach for generating a polyhedral parti-
      tion {R1 , . . . , Rnr est } of the rest of the space Rrest is described in Theorem 4.2 in
      Section 4.4.7. The procedure proposed in Theorem 4.2 for partitioning the set of
      parameters allows one to recursively explore the parameter space. Such an iterative
      procedure terminates after a finite time, as the number of possible combinations of
      active constraints decreases with each iteration. The following two issues need to
      be considered:
          Based on the above discussion, the mp-LP solver can be summarized in the
      following recursive Algorithm 6.1. Note that the algorithm generates a partition
6.2    Multiparametric Linear Programming                                                      125
                            x2         CR{3,7}
                           x+
                            2
                                                 R2
                                            CR{6,7}
                                       R1
                            x−
                             2
                                  x−
                                   1                          x+
                                                               1    x1
of the state space which is not strict. The algorithm could be modified to store
the critical regions as defined in (6.4) which are open sets, instead of storing their
closure. In this case the algorithm would have to explore and store all the crit-
ical regions that are not full-dimensional in order to generate a strict polyhedral
partition of the set of feasible parameters. From a practical point of view such a
procedure is not necessary since the value function and the optimizer are continuous
functions of x.
      Remark 6.3 In the degenerate case z ∗ (x) and CRA(x0 ) are given by (6.21) and (6.26),
      respectively. As remarked in Section 6.2.2, if rank(D) > 0 the region CRA(x0 ) is not
      full-dimensional and therefore not of interest. To use Algorithm 6.1 after computing
      U, P, D if D 6= 0 one should compute a random vector ǫ ∈ Rn smaller than the
      Chebychev radius of Y and such that the LP (6.11) is feasible for x0 + ǫ and then
      repeat step where A(x0 ) is computed with x0 ← x0 + ǫ.
126                            6   Multiparametric Programming: a Geometric Approach
            Remark 6.4 The algorithm determines the partition of K recursively. After the first
            critical region is found, the rest of the region in K is partitioned into polyhedral sets
            {Ri } as in Theorem 4.2. By using the same method, each set Ri is further partitioned,
            and so on.
      and the KKT conditions are (see Section 2.3.3 for KKT conditions for quadratic
      programs)
                                                  z+u      =0                          (6.39a)
                                        u(z − 3x − 1)      =0                          (6.39b)
                                                       u   ≥0                          (6.39c)
                                              z − 3x − 1   ≤ 0.                        (6.39d)
      This solution is depicted in Figure 6.9. The above simple procedure, which required
      nothing but the solution of the KKT conditions, yielded the optimizer z ∗ (x) and
      the value function J ∗ (x) for all values of the parameter x. The set of admissible
      parameters values was divided into two critical regions, defined by x ≤ − 13 and
      x > − 31 . In the region x ≤ − 31 the inequality constraint is active and the Lagrange
      multiplier is greater or equal than zero, in the other region x > − 31 the inequality
      constraint is not active and the Lagrange multiplier is equal to zero. Note that for
      x = − 31 the inequality constraint z − 3x − 1 ≤ 0 is active at z ∗ and the Lagrange
      multiplier is equal to zero.
      Throughout a critical region the conditions for optimality derived from the KKT
      conditions do not change. In each critical region the optimizer z ∗ (x) is affine and the
      value function J ∗ (x) is quadratic. Both z ∗ (x) and J ∗ (x) are continuous.
                              2
                                   J ∗ (x)
                              1
                              0
                                     z ∗ (x)
                             -1
                             -2
                              -2         -1        0        1     2
                                                   x
        Figure 6.9 Example 6.5. Optimizer z ∗ (x) and value function J ∗ (x) as a
        function of the parameter x.
128                            6   Multiparametric Programming: a Geometric Approach
        Consider the definition of a critical region given in Section 6.1.2. We show next that
        critical regions of mp-QP are polyhedra. We use the KKT conditions (Section 1.6)
        to derive the H-polyhedral representation of the critical regions and to compute the
        optimizer function z ∗ (x) and the value function J ∗ (x) inside each critical region.
            The following theorem introduces fundamental properties of critical regions, the
        value function and the optimizer inside a critical region.
         iii) J ∗ (x) is a quadratic function of the state inside CRA , i.e., J ∗ (x) = x′ Mi x +
              c′i x + di for all x ∈ CRA .
                                           Hz ∗ + G′ u∗   =   0, u ∈ Rm                    (6.41a)
                             u∗i (Gi z ∗   − wi − Si x) =     0, i = 1, . . . , m          (6.41b)
                                                    u∗ ≥      0                            (6.41c)
                                     Gz ∗ − w − Sx ≤          0.                           (6.41d)
                                           GA z ∗ − SA x = wA                              (6.42a)
                                                  ∗
                                           GN A z − SN A x < wN A .                        (6.42b)
and note that z ∗ is also an affine function of x. J ∗ (x) = 12 z ∗ (x)′ Hz ∗ (x) and
therefore it is a quadratic function of x. The critical region CRA is computed by
substituting z ∗ from (6.48) in the primal feasibility conditions (6.42b)
and the Lagrange multipliers from (6.47) in the dual feasibility conditions (6.41c)
      Case 2: LICQ does not hold, the rows of GA are not linearly independent. For
instance, this happens when more than s constraints are active at the optimizer
z ∗ (x̄) ∈ Rs , i.e., in a case of primal degeneracy. In this case the vector of Lagrange
multipliers u∗ might not be uniquely defined, as the dual problem of (6.38) is not
strictly convex. Note that dual degeneracy and nonuniqueness of z ∗ (x̄) cannot
occur, as H ≻ 0.
      Using the same arguments as in Section 6.2.2, equation (6.45) will allow a
full-dimensional critical region only if rank[(GA H −1 GA ′ ) SA ] = rank[GA H −1 GA ′ ].
Indeed the dimension of the critical region will be
and the Lagrange multipliers from (6.53) in the dual feasibility conditions (6.41c)
The critical region CRA is the intersection of the sets Dx = r, Pp and projx (Pu∗A,2 ,x ):
          Remark 6.5 In general, the critical region polyhedron (6.49)-(6.51) is open on facets
          arising from primal feasibility and closed on facets arising from dual feasibility.
          Remark 6.6 If D in (6.52) is nonzero, then from (6.58), CRA is a lower dimensional
          region, which, in general, corresponds to a common boundary between two or more
          full-dimensional regions.
        6.3    Multiparametric Quadratic Programming                                                      131
        The objective of this section is to briefly describe the propagation of the set of active
        constraints when moving from one full-dimensional critical region to a neighboring
        full-dimensional critical region. We will use a simple example in order to illustrate
        the main points.
                                       J ∗ (x) =    min             1 ′
                                                                    2
                                                                      z Hz    + x′ F z
                                                       z                                        (6.59)
                                                    subj. to        Gz ≤ w + Sx,
              with                                                     1      
                                                                           1
                                               H = [ 10 01 ] , F =      1 −1                    (6.60)
              and                         1   0                 0   0
                                                                                   1
                                          −1   0                   0   0                 1
                                    G=    0
                                           0   1 
                                               −1  ,       S=    00   0
                                                                       0  ,    w =  11  ,     (6.61)
                                           1   −1                  1   1                 0
                                          −1   1                 −2    1                 0
              where K is given by
                                                     −1 ≤ x1 ≤ 1
                                                                                                (6.62)
                                                     −1 ≤ x2 ≤ 1.
              A solution to the mp-QP problem is shown in Figure 6.10 and the constraints which
              are active in each associated full-dimensional critical region are reported in Table 6.3.
                Table 6.3 Example 6.6. Critical regions and corresponding set of active
                constraints.
            Since A3 is empty in CR3 we can conclude from (6.46) that the facets of CR3
        are facets of primal feasibility and therefore do not belong to CR3. In general,
        as discussed in Remark 6.5 critical regions are open on facets arising from primal
        feasibility and closed on facets arising from dual feasibility. Next we focus on the
        closure of the critical regions.
            By observing Figure 6.10 and Table 6.3 we notice that as we move away from
        region CR3 (corresponding to no active constraints), the number of active con-
        straints increases. In particular, for any two neighboring full-dimensional critical
        regions CRAi and CRAj we have Ai ⊂ Aj and |Ai | = |Aj | − 1 or Aj ⊂ Ai and
        |Ai | = |Aj | + 1. This means that as one moves from one full-dimensional region
132                           6   Multiparametric Programming: a Geometric Approach
1 6
                                       4
                                                            5              7
                                               3
                 x2
                                           1
                                   2
-1
                             -1                                                 1
                                                       x1
        The convexity of the value function J ∗ (x) and the continuity of the solution z ∗ (x)
        follow from the general results on multiparametric programming (Corollary 5.2).
        In the following we present an alternate simple proof.
        Theorem 6.7 Consider the multiparametric quadratic program (6.38) and let H ≻
        0. Then the optimizer z ∗ (x) : K∗ → Rs is continuous and piecewise affine on
        polyhedra, in particular it is affine in each critical region, and the optimal solution
        J ∗ (x) : K∗ → R is continuous, convex and piecewise quadratic on polyhedra.
Theorem 6.9 Assume that the mp-QP problem (6.38) is not degenerate, then the
value function J ∗ (x) in (6.38) is continuously differentiable (C (1) ).
      Proof: The dual of (6.38) is
                                    1
                      d∗ (x) = max − u′ (GH −1 G′ )u − u′ (w + Sx).                    (6.64)
                               u≥0  2
By strong duality we have
                             1
         J ∗ (x) = d∗ (x) = − u∗ (x)′ (GH −1 G′ )u∗ (x) − u∗ (x)′ (w + Sx).            (6.65)
                             2
134                          6   Multiparametric Programming: a Geometric Approach
      For the moment let us restrict our attention to the interior of a critical region.
      From (6.47) we know that u∗ (x) is continuously differentiable. Therefore
                         ∗ ′                       ∗ ′
                         ∂u            −1 ′ ∗        ∂u
        ∇x J(x) = −          (x) GH G u (x) −             (x) (w + Sx) − S ′ u∗ (x) =
                          ∂x                          ∂x
                       ∗ ′
                       ∂u
                   =       (x) (−GH −1 G′ u∗ (x) − w − Sx) − S ′ u∗ (x).
                       ∂x
                                                                                  (6.66)
      Using (6.43)
                                     z ∗ = −H −1 G′ u∗ ,                          (6.67)
      we get
                                                  ′
                                           ∂u∗
               ∇x J(x)   =    −S ′ u∗ (x) +    (x) (Gz ∗ − w − Sx) =
                                           ∂x         ′
                                          P    ∂u∗i
                         =       ′ ∗
                              −S u (x) +            (x) (Gi z ∗ − wi − Si x) +
                                         i∈A ∂x           |      {z        }
                                      ∗ ′                       0                        (6.68)
                                 P ∂ui
                              +           (x) (Gi z ∗ − wi − Si x) =
                                i∈N A ∂x
                                     | {z }
                                              0
                         =    −S ′ u∗ (x).
          Example 6.7
          Consider the mp-QP (6.38) with
                                                 
                               3     3 −1
                        H= 3       11 23         
                            −1 23 75                                          
                               1     1    1                   1                0
                            1       3    5                 0              1   
                                                                                     (6.69)
                            −1 −1 −1                      −1              0   
                                                                              
                        G= −1 −3 −5
                                                  
                                                     w=
                                                             0   
                                                                     S=
                                                                             −1   
                                                                                   
                            −1      0   0                  0              0   
                                                                              
                            0     −1    0                  0              0   
                              0      0   −1                   0                0
              Table 6.4 Critical regions and value function corresponding to the solution
              of Example 6.7
                             maxx,z̄,ǫ   ǫ
                             subj. to    Ti x + ǫkTi k2 ≤ Ni , i = 1, . . . , nT             (6.70)
                                         Gz̄ − Sx ≤ w
        where nT is the number of rows Ti of the matrix T defining the set K in (6.2).
        If ǫ ≤ 0, then the QP problem (6.38) is infeasible for all x in the interior of K.
        Otherwise, we set x = x0 and solve the QP problem (6.38), in order to obtain the
        corresponding optimal solution z0∗ . Such a solution is unique, because H ≻ 0. The
        value of z0∗ defines the following optimal partition
                              A(x0 ) = {j ∈ J : Gj z0∗ − Sj x0 − wj = 0}
                                                                                             (6.71)
                              NA(x0 ) = {j ∈ J : Gj z0∗ − Sj x0 − wj < 0}
        and consequently the critical region CRA(x0 ) . Once the critical region CRA(x0 )
        has been defined, the rest of the space Rrest = K\CRA(x0 ) has to be explored and
        new critical regions generated. An approach for generating a polyhedral partition
        {R1 , . . . , Rnrest } of the rest of the space Rrest is described in Theorem 4.2. Theo-
        rem 4.2 provides a way of partitioning the non-convex set K \ CR0 into polyhedral
136                         6   Multiparametric Programming: a Geometric Approach
        1. As for the mp-LP algorithm, the partitioning in Theorem 4.2 defines new
           polyhedral regions Rk to be explored that are not related to the critical
           regions which still need to be determined. This may split some of the critical
           regions, due to the artificial cuts induced by Theorem 4.2. Post-processing
           can be used to join cut critical regions [44]. As an example, in Figure 6.8 the
           critical region CR{3,7} is discovered twice, one part during the exploration of
           R1 and the second part during the exploration of R2 .
           Although algorithms exist for convexity recognition and computation of the
           union of polyhedra, the post-processing operation is computationally expen-
           sive. Therefore, it is more efficient not to intersect the critical region obtained
           by (6.29) with halfspaces generated by Theorem 4.2, which is only used to
           drive the exploration of the parameter space. Then, no post processing is
           needed to join subpartitioned critical regions. On the other hand, some criti-
           cal regions may appear more than once. Duplicates can be uniquely identified
           by the set of active constraints A(x) and can be easily eliminated. To this
           aim, in the implementation of the algorithm we keep a list of all the critical
           regions which have already been generated in order to avoid duplicates. In
           Figure 6.8 the critical region CR{3,7} is discovered twice but stored only once.
         Based on the discussion and results above, the main steps of the mp-QP solver
      are outlined in the following algorithm.
               Function partition(Y )
                  Let x0 ∈ Y and ǫ be the solution to the LP (6.70);
                  If ǫ ≤ 0 Then exit (no full-dimensional CR is in Y )
                  Solve the QP (6.38) for x = x0 to obtain (z0∗ , u∗0 )
        6.4    Multiparametric Mixed-Integer Linear Programming                                          137
              Remark 6.7 If rank(D) > 0 in Algorithm 6.2, the region CRA(x0 ) is not full-
              dimensional. To avoid further recursion in the algorithm which does not produce
              any full-dimensional critical region, one should compute a random vector ǫ ∈ Rn
              smaller than the Chebychev radius of Y and such that the QP (6.38) is feasible for
              x0 + ǫ and then repeat step where A(x0 ) is computed with x0 ← x0 + ǫ.
              Remark 6.8 The algorithm solves the mp-QP problem by partitioning the given
              parameter set K into Nr closed polyhedral regions. Note that the algorithm generates
              a partition of the state space which is not strict. The algorithm could be modified
              to store the critical regions as defined in Section 6.1.2. (which are neither closed nor
              open as proven in Theorem 6.6) instead of storing their closure. This can be done by
              keeping track of which facet belongs to a certain critical region and which not. From
              a practical point of view, such a procedure is not necessary since the value function
              and the optimizer are continuous functions of x.
              Remark 6.9 The proposed algorithm does not apply to the case when H  0 and when
              the optimizer may not be unique. In this case one may resort to “regularization”,
              i.e., adding an appropriate “small” quadratic term, or follow the ideas of [231].
        Consider the mp-MILP (6.72). Given a closed and bounded polyhedral set K ⊂ Rn
        of parameters,
                                  K = {x ∈ Rn : T x ≤ N },                      (6.73)
        we denote by K∗ ⊆ K the region of parameters x ∈ K such that the MILP (6.72)
        is feasible and the optimum J ∗ (x) is finite. For any given x̄ ∈ K∗ , J ∗ (x̄) denotes
        the minimum value of the objective function in problem (6.72) for x = x̄. The
        function J ∗ : K∗ → R will denote the function which expresses the dependence on
        x of the minimum value of the objective function over K∗ , J ∗ will be called the
                                                                 sc       s
        value function. The set-valued function Z ∗ : K∗ → 2R × 2{0,1} d will describe for
                           ∗                       ∗                ∗
        any fixed x ∈ K the set of optimizers z (x) related to J (x).
             We aim to determine the region K∗ ⊆ K of feasible parameters x and to find the
        expression of the value function J ∗ (x) and the expression of an optimizer function
        z ∗ (x) ∈ Z ∗ (x).
             Two main approaches have been proposed for solving mp-MILP problems. In
        [1], the authors develop an algorithm based on branch and bound (B&B) methods.
        At each node of the B&B tree an mp-LP is solved. The solution at the root
        node where all the binary variables are relaxed to the interval [0,1] represents a
        valid lower bound, while the solution at a node where all the integer variables
        have been fixed represents a valid upper bound. As in standard B&B methods,
        the complete enumeration of combinations of 0-1 integer variables is avoided by
        comparing the multiparametric solutions, and by fathoming the nodes where there
        is no improvement of the value function.
             In [101] an alternative algorithm was proposed, which will be detailed in this
        section. Problem (6.72) is alternatively decomposed into an mp-LP and an MILP
        subproblem. In one step the values of the binary variable are fixed for a region
        and an mp-LP is solved. Its solution provides a parametric upper bound to the
        value function J ∗ (x) in the region. In the other step, the parameters x are treated
        as additional free variables and an MILP is solved. In this way a parameter x is
        found and an associated new integer vector which improves the value function at
        this point.
             The algorithm is composed of an initialization step, and a recursion between
        the solution of an mp-LP subproblem and an MILP subproblem.
        Initialization
        Solve the following MILP problem
                                       min       c′ z
                                      {z,x}
                                      subj. to   Gz − Sx ≤ w                            (6.74)
                                                 x ∈ K,
6.4   Multiparametric Mixed-Integer Linear Programming                                           139
mp-LP subproblem
For each CRi we solve the following mp-LP problem
By Theorem 6.5, the solution of mp-LP (6.75) provides a partition of CRi into
polyhedral regions Rik , k = 1, . . . , NRi and a PWA value function
                          ˜ k (x) = ck ′ x + pk ) if x ∈ Rk , k = 1, . . . , NRi
              J˜i (x) = (JR                                                            (6.76)
                            i        i        i           i
The three cases above can be distinguished by using a simple linear program. We
add the constraint JR   ˜ ki (x) ≤ J¯i (x) to the constraints defining Rk and tests its
                                                                               i
redundancy (Section 4.4.1). If it is redundant we have case 1, if it is infeasible
we have case 2. Otherwise JR     ˜ ki (x) = J¯i (x) defines the facet separating (Rk )1 and
                                                                                      i
(Rik )2 . In the third case, the region Rik is partitioned into two regions (Rik )1 and
(Rik )2 which are convex polyhedra since JR       ˜ ki (x) and J¯i (x) are affine functions of
x.
    After the mp-LP (6.75) has been solved for all i = 1, . . . , Nj (the subindex
j denotes that we are at step j of the recursion) and the value function has been
updated, each initial region CRi has been subdivided into at most 2NRi polyhedral
regions Rik and possibly (Rik )1 and (Rik )2 with a corresponding updated parametric
bound on the value function J¯i (x). For each Rik , (RSik )1 and (Rik )2 we define the
set of integer variables already explored as Zi = Zi z̄dNi bi +1 , N bi = N bi + 1. In
the sequel the polyhedra of the new partition will be referred to as CRi .
140                          6     Multiparametric Programming: a Geometric Approach
      MILP subproblem
      At step j for each critical region CRi (note that these CRi are the output of the
      previous phase) we solve the following MILP problem
                                    min      c′ z                                            (6.77)
                                    {z,x}
                                 subj. to    Gz − Sx ≤ w                                     (6.78)
                                             c′ z ≤ J¯i (x)                                  (6.79)
                                             zd 6= z̄dki , k = 1, . . . , N bi               (6.80)
                                             x ∈ CRi ,                                       (6.81)
      where constraints (6.80) prohibit integer solutions that have been already analyzed
      in CRi from appearing again and constraint (6.79) excludes integer solutions with
      higher values than the current upper bound. If problem (6.81) is infeasible then
      the region CRi is excluded from further recursion and the current upper bound
      represents the final solution. If problem (6.81) is feasible, then the discrete optimal
      component zd∗i is stored and represents a feasible integer variable that is optimal
      at least in one point of CRi .
      Recursion
      At step j we have stored
        2. For each CRi a set of integer variables Zi = z̄d0i , . . . , z̄dNi bi , that have already
           been explored in the region CRi .
           That is, z̄dNi bi +1 is an integer variable that improves the current bound for at
           least one point of the current polyhedron.
          For all the regions CRi not excluded from the MILP’s subproblem (6.77)-(6.81)
      the algorithm continues to iterate between the mp-LP (6.75) with z̄dNi bi +1 = zd∗i
      and the MILP (6.77)-(6.81). The algorithm terminates when all the MILPs (6.77)-
      (6.81) are infeasible.
          Note that the algorithm generates a partition of the state space. Some param-
      eter x could belong to the boundary of several regions. Differently from the LP
      and QP case, the value function may be discontinuous and therefore such a case
      has to be treated carefully. If a point x belongs to different critical regions, the
      expressions of the value function associated with such regions have to be compared
      in order to assign to x the right optimizer. Such a procedure can be avoided by
      keeping track of which facet belongs to a certain critical region and which not.
      Moreover, if the value functions associated with the regions containing the same
      parameter x coincide this may imply the presence of multiple optimizers.
        6.5   Multiparametric Mixed-Integer Quadratic Programming                                  141
        The following properties of J ∗ (x) and Z ∗ (x) follow easily from the algorithm de-
        scribed above.
        Theorem 6.10 Consider the mp-MILP (6.72). The set K∗ is the union of a finite
        number of (possibly open) polyhedra and the value function J ∗ is piecewise affine
        on polyhedra. If the optimizer z ∗ (x) is unique for all x ∈ K∗ , then the optimizer
        functions zc∗ : K∗ → Rsc and zd∗ : K∗ → {0, 1}sd are piecewise affine and piecewise
        constant, respectively, on polyhedra. Otherwise, it is always possible to define a
        piecewise affine optimizer function z ∗ (x) ∈ Z ∗ (x) for all x ∈ K∗ .
           Note that, differently from the mp-LP case, the set K∗ can be non-convex and
        even disconnected.
Example 6.8 Suppose z1 , z2 , x1 , x2 ∈ R and δ ∈ {0, 1}, then the following mp-MIQP
          The first method for solving parametric linear programs was proposed by Gass
       and Saaty [120], and since then extensive research has been devoted to sensitivity
6.6        Literature Review                                                           143
                                                J ∗ (x)
                         CR1
      x2
CR2
                          x1                              x2                x1
               (a) Critical Regions.                      (b) Value function.
         In [1, 101] two approaches were proposed for solving mp-MILP problems. In
      both methods the authors use an mp-LP algorithm and a branch and bound strat-
      egy that avoids the complete enumeration of combinations of 0-1 integer variables
      by comparing the available bounds on the multiparametric solutions.
    Part III
Optimal Control
      Chapter 7
      difficult to derive “good” discrete time models from nonlinear continuous time
      models, and especially so when the nonlinear system has discontinuities as would
      be the case for switched systems. We also note that continuous time switched
      systems can exhibit behavioral characteristics not found in discrete-time systems,
      for example, an ever increasing number of switches in an ever decreasing time
      interval (Zeno behavior [127]).
          We define the following performance objective or cost function from time instant
      0 to time instant N
                                                             N
                                                             X −1
                              J0→N (x0 , U0→N ) = p(xN ) +          q(xk , uk ),            (7.3)
                                                             k=0
      where N is the time horizon and xk denotes the state vector at time k obtained by
      starting from the measured state x0 = x(0) and applying to the system model
                                          xk+1 = g(xk , uk ),                               (7.4)
      the input sequence u0 , . . . , uk−1 . From this sequence we define the vector of future
      inputs U0→N = [u′0 , . . . , u′N −1 ]′ ∈ Rs , s = mN . The terms q(xk , uk ) and p(xN )
      are referred to as stage cost and terminal cost, respectively, and are assumed to be
      positive definite (q ≻ 0, p ≻ 0):
                               p(x, u) > 0 ∀x 6= 0, u 6= 0, p(0, 0) = 0
                               q(x, u) > 0 ∀x =
                                              6 0, u =6 0, q(0, 0) = 0.
      The form of the cost function (7.3) is very general. If a practical control objective
      can be expressed as a scalar function then this function usually takes the indicated
      form. Specifically, we consider the following constrained finite time optimal control
      (CFTOC) problem.
                  ∗
                 J0→N (x0 ) =      minU0→N    J0→N (x0 , U0→N )
                                   subj. to   xk+1 = g(xk , uk ), k = 0, . . . , N − 1
                                              h(xk , uk ) ≤ 0, k = 0, . . . , N − 1         (7.5)
                                              xN ∈ Xf
                                              x0 = x(0).
      Here Xf ⊆ Rn is a terminal region that we want the system states to reach at the
      end of the horizon. The terminal region could be the origin, for example. We define
      X0→N ⊆ Rn to be the set of initial conditions x(0) for which there exists an input
      vector U0→N so that the inputs u0 , . . . , uN −1 and the states x0 , . . . , xN satisfy the
      model xk+1 = g(xk , uk ) and the constraints h(xk , uk ) ≤ 0 and that the state xN
      lies in the terminal set Xf .
          We can determine this set of feasible initial conditions in a recursive manner.
      Let us denote with Xj→N the set of states xj at time j which can be steered into
      Xf at time N , i.e., for which the model xk+1 = g(xk , uk ) and the constraints
      h(xk , uk ) ≤ 0 are feasible for k = j, . . . , N − 1 and xN ∈ Xf . This set can be
      defined recursively by
         Xj→N      =   {x ∈ Rn : ∃u such that (h(x, u) ≤ 0, and g(x, u) ∈ Xj+1→N )},
                       j = 0, . . . , N − 1                                       (7.6)
        XN →N      =   Xf .                                                                 (7.7)
      7.2     Solution via Batch Approach                                                           149
      The set X0→N is the final result of these iterations starting with Xf .
                               ∗
          The optimal cost J0→N    (x0 ) is also called value function. In general, the problem
      (7.3)–(7.5) may not have a minimum. We will assume that there exists a minimum.
      This is the case, for example, when the set of feasible input vectors U0→N (defined
      by h and Xf ) is compact and when the functions g, p and q are continuous. Also,
                                                  ∗                                  ∗
      there might be several input vectors U0→N        which yield the minimum (J0→N     (x0 ) =
                   ∗                                                                       ∗
      J0→N (x0 , U0→N )). In this case we will define one of them as the minimizer U0→N         .
          Note that throughout the book we will distinguish between the current state
      x(k) of system (7.1) at time k and the variable xk in the optimization problem (7.5),
      that is the predicted state of system (7.1) at time k obtained by starting from the
      state x0 and applying to system (7.4) the input sequence u0 , . . . , uk−1 . Analogously,
      u(k) is the input applied to system (7.1) at time k while uk is the k-th optimization
      variable of the optimization problem (7.5). Clearly, x(k) = xk for any k if u(k) = uk
      for all k (under the assumption that our model is perfect).
          In the rest of this chapter we will be interested in the following questions related
      to the general optimal control problem (7.3)–(7.5).
            • Solution. We will show that the problem can be expressed and solved either
              as one general nonlinear programming problem, or in a recursive manner by
              invoking Bellman’s Principle of Optimality.
                                       x1 = g(x(0), u0 )
                                       x2 = g(x1 , u1 )
                                       ..                                                  (7.8)
                                        .
                                       xN = g(xN −1 , uN −1 ),
                      ∗
                                                        PN −1
                     J0→N (x0 ) = minU0→N       p(xN ) + k=0 q(xk , uk )
                                  subj. to      x1 = g(x0 , u0 )
                                                x2 = g(x1 , u1 )
                                                ..
                                                 .                                         (7.9)
                                                xN = g(xN −1 , uN −1 )
                                                h(xk , uk ) ≤ 0, k = 0, . . . , N − 1
                                                xN ∈ Xf
                                                x0 = x(0)
150                                                     7   General Formulation and Discussion
                                          x2 = g(x1 , u1 )
                                                                                                 (7.10)
                                          x2 = g(g(x(0), u0 ), u1 ).
       Except when the state equations are linear this successive substitution may become
       complex. Even when they are linear it may be bad from a numerical point of view.
          Either with or without successive substitution the solution of the nonlinear pro-
                                                                                 ′             ′
                                                                      ∗
       gramming problem is a sequence of present and future inputs U0→N    = [u∗0 , . . . , u∗N −1 ]′
       determined for the particular initial state x(0).
                                                                           N
                                                                           X −1
                       Jj→N (xj , uj , uj+1 , . . . , uN −1 ) = p(xN ) +          q(xk , uk ),   (7.11)
                                                                           k=j
                                                                ∗
       also called the cost-to-go. Then the optimal cost-to-go Jj→N is
            ∗
           Jj→N (xj ) =     minuj ,uj+1 ,...,uN −1   Jj→N (xj , uj , uj+1 , . . . , uN −1 )
                            subj. to                 xk+1 = g(xk , uk ), k = j, . . . , N − 1
                                                                                                 (7.12)
                                                     h(xk , uk ) ≤ 0, k = j, . . . , N − 1
                                                     xN ∈ Xf .
                                          ∗
        Note that the optimal cost-to-go Jj→N (xj ) depends only on the initial state xj .
                                                                             ∗
          The principle of optimality implies that the optimal cost-to-go Jj−1→N     from
       time j − 1 to the final time N can be found by minimizing the sum of the stage
7.3    Solution via Recursive Approach                                                         151
                                                 ∗
cost q(xj−1 , uj−1 ) and the optimal cost-to-go Jj→N (xj ) from time j onwards:
                 ∗                                                   ∗
                Jj−1→N (xj−1 ) =        min       q(xj−1 , uj−1 ) + Jj→N (xj )
                                        uj−1
                                       subj. to   xj = g(xj−1 , uj−1 )                (7.13)
                                                  h(xj−1 , uj−1 ) ≤ 0
                                                  xj ∈ Xj→N .
Here the only decision variable left for the optimization is uj−1 , the input at time
j − 1. All the other inputs u∗j , . . . , u∗N −1 have already been selected optimally to
                              ∗
yield the optimal cost-to-go Jj→N      (xj ). We can rewrite (7.13) as
       ∗                                                   ∗
      Jj−1→N (xj−1 ) =       min        q(xj−1 , uj−1 ) + Jj→N (g(xj−1 , uj−1 ))
                             uj−1
                          subj. to      h(xj−1 , uj−1 ) ≤ 0                           (7.14)
                                        g(xj−1 , uj−1 ) ∈ Xj→N ,
       For a fixed xj this nonlinear programming problem can be solved quite easily in
       order to find u∗j (xj ). Because the optimal cost-to-go function Jj→N
                                                                         ∗
                                                                             (xj ) changes
       with time j, the nonlinear feedback control law is time-varying.
We define the set of initial conditions for which this problem has a solution.
                                            lim q(xk , uk ) = 0,
                                            k→∞
                                                 lim xk = 0
                                                 k→∞
        7.4   Optimal Control Problem with Infinite Horizon                                        153
        and
                                              lim uk = 0.
                                             k→∞
        Thus the sequence of control actions generated by the solution of the infinite horizon
        problem drives the system to the origin. For this solution to exists the system must
        be, loosely speaking, stabilizable.
            Using the recursive dynamic programming approach we can seek the solution
        of the infinite horizon optimal control problem by increasing N until we observe
        convergence. If the dynamic programming algorithm converges as N → ∞ then
        (7.14) becomes the Bellman equation
        Once the value function J ∗ (x) is known, the nonlinear feedback control law u∗ (x)
        is defined implicitly by (7.21)
        It is time invariant and guarantees convergence to the origin for all states in X0→∞ .
        For a given x ∈ X0→∞ , u∗ (x) can be found from (7.21) by solving a standard
        nonlinear programming problem.
             In order to find the value function J ∗ (x) we need to solve (7.21). We can start
        with some initial guess J˜0∗ (x) for the value function and an initial guess X˜0 for the
        region in the state space where we expect the infinite horizon problem to converge
        and iterate. Then at iteration i + 1 solve
                             J˜i+1
                               ∗
                                   (x) = minu        q(x, u) + J˜i∗ (g(x, u))
                                         subj. to    h(x, u) ≤ 0                         (7.23)
                                                     g(x, u) ∈ X̃i
        assume that at iteration step i we gridded the set X̃i and that J˜i∗ (x) is known
        at each grind point from the previous iteration. We can approximate J˜i∗ (x) at
        intermediate points via interpolation. For a fixed point x̄ the optimization prob-
        lem (7.23) is a nonlinear programming problem yielding J˜i∗ (x̄). In this manner the
        approximate value function J˜i∗ (x) can be constructed at all grid points and we can
        proceed to the next iteration step i + 1.
        Receding Horizon Control will be covered in detail in Chapter 12. Here we illustrate
        the main idea and discuss the fundamental properties.
            Assume that at time t = 0 we determine the control action u0 by solving
                                                                            ∗
        the finite horizon optimal control problem (7.3)-(7.5). If J0→N         (x0 ) converges to
          ∗
        J0→∞ (x0 ) as N → ∞ then the effect of increasing N on the value of u0 should
        diminish as N → ∞. Thus, intuitively, instead of making the horizon infinite we
        can get a similar behavior when we use a long, but finite horizon N, and repeat
        this optimization at each time step, in effect moving the horizon forward (mov-
        ing horizon or receding horizon control). We can use the batch or the dynamic
        programming approach.
            Batch approach. We solve an optimal control problem with horizon N yielding a
        sequence of optimal inputs u∗0 , . . . , u∗N −1 , but we would implement only the first one
        of these inputs u∗0 . At the next time step we would measure the current state and
        then again solve the N -step problem with the current state as new initial condition
        x0 . If the horizon N is long enough then we expect that this approximation of the
        infinite horizon problem should not matter and the implemented sequence should
        drive the states to the origin.
            Dynamic programming approach. We always implement the control u0 obtained
        from the optimization problem
                        ∗                                          ∗
                       J0→N (x0 ) =       min       q(x0 , u0 ) + J1→N (g(x0 , u0 ))
                                           u0
                                         subj. to   h(x0 , u0 ) ≤ 0,                        (7.25)
                                                    g(x0 , u0 ) ∈ X1→N ,
                                                    x0 = x(0)
                 ∗
        where J1→N    (g(x0 , u0 )) is the optimal cost-to-go from the state x1 = g(x0 , u0 ) at
        time 1 to the end of the horizon N .
            If the dynamic programming iterations converge as N → ∞, then for a long,
        but finite horizon N we expect that this receding horizon approximation of the
        infinite horizon problem should not matter and the resulting controller will drive
        the system asymptotically to the origin.
            In both the batch and the recursive approach, however, it is not obvious how
        long N must be for the receding horizon controller to inherit these desirable con-
        vergence characteristics. Indeed, for computational simplicity we would like to
        keep N small. We will argue next that the proposed control scheme guarantees
        convergence just like the infinite horizon variety if we impose a specific terminal
        constraint, for example, if we require the terminal region to be the origin Xf = 0.
7.4     Optimal Control Problem with Infinite Horizon                                                   155
Assume that we are at x(0) at time 0 and implement the optimal u∗0 that takes us
to the next state x1 = g(x(0), u∗0 ). At this state at time 1 we postulate to use over
the next N steps the sequence of optimal moves determined at the previous step
followed by zero: u∗1 , . . . , u∗N −1 , 0. This sequence is not optimal but the associated
cost over the shifted horizon from 1 to N + 1 can be easily determined. It consists
                                             ∗
of three parts: 1) the optimal cost J0→N          (x0 ) from time 0 to N computed at time 0,
minus 2) the stage cost q(x0 , u0 ) at time 0 plus 3) the cost at time N + 1. But this
last cost is zero because we imposed the terminal constraint xN = 0 and assumed
uN = 0. Thus the cost over the shifted horizon for the assumed sequence of control
moves is
                                         ∗
                                      J0→N   (x0 ) − q(x0 , u0 ).
Because this postulated sequence of inputs is not optimal at time 1
                            ∗               ∗
                           J1→N +1 (x1 ) ≤ J0→N (x0 ) − q(x0 , u0 ).
                                                              ∗             ∗
Because the system and the objective are time invariant J1→N    +1 (x1 ) = J0→N (x1 )
so that
                       ∗             ∗
                      J0→N  (x1 ) ≤ J0→N (x0 ) − q(x0 , u0 ).
                                                                        ∗            ∗
As q ≻ 0 for all (x, u) 6= (0, 0), the sequence of optimal costs J0→N        (x0 ), J0→N (x1 ), . . .
                                                                         ∗
is strictly decreasing for all (x, u) 6= (0, 0). Because the cost J0→N ≥ 0 the sequence
  ∗            ∗
J0→N   (x0 ), J0→N (x1 ), . . . (and thus the sequence x0 , x1 ,. . .) is converging. Thus we
have established the following important theorem.
            Thus we have established that a receding horizon controller with terminal con-
        straint xN = 0 has the same desirable convergence characteristics as the infinite
        horizon controller. At first sight the theorem appears very general and power-
        ful. It is based on the implicit assumption, however, that at every time step the
        CFTOC problem has a solution. Infeasibility would occur, for example, if the un-
        derlying system is not stabilizable. It could also happen that the constraints on
        the inputs which restrict the control action prevent the system from reaching the
        terminal state in N steps. In Chapter 12 we will present special formulations of
        problem (7.28) such that feasibility at the initial time guarantees feasibility for
        all future times. Furthermore in addition to asymptotic convergence to the ori-
        gin we will establish stability for the closed-loop system with the receding horizon
        controller.
            Remark 7.1 For the sake of simplicity in the rest of the book we will use the following
            shorter notation
                                    Jj∗ (xj ) = Jj→N
                                                 ∗
                                                     (xj ), j = 0, . . . , N
                                      ∗           ∗
                                    J∞ (x0 ) = J0→∞   (x0 )
                                    Xj = Xj→N , j = 0, . . . , N                              (7.29)
                                    X∞ = X0→∞
                                    U0 = U0→N
            and use the original notation only if needed.
with g(0) = 0.
      Remark 7.2 If in place of system (7.30), we consider the time-varying system xk+1 =
      g(xk , k), then δ in Definition 7.1 is a function of ε and k, i.e., δ = δ(ε, k) > 0. In this
      case, we introduce the concept of “uniform stability”. The equilibrium point x = 0
      is uniformly stable if, for each ε > 0, there is δ = δ(ε) > 0 (independent from k) such
      that
                                    kx0 k < δ ⇒ kxk k < ε, ∀k ≥ 0.                          (7.34)
   The following example shows that Lyapunov stability and convergence are, in
general, different properties.
      The state x = 0 is an equilibrium for the system. For any state x ∈ [−1, 1] we have
      (x − 1) ≤ 0 and the system dynamics (7.35) become
      System (7.36) generates oscillating and diverging trajectories for any x0 ∈ (−1, 1)\{0}.
      Any such trajectory will enter in finite time T the region with x ≥ 1. In this region
      the system dynamics (7.35) become
xk+1 = 0, ∀ k ≥ T. (7.37)
      Therefore the origin is not Lyapunov stable, however the system converges to the
      origin for all x0 ∈ (−∞, +∞).
    Usually to show Lyapunov stability of the origin for a particular system one
constructs a so called Lyapunov function, i.e., a function satisfying the conditions
of the following theorem.
158                                              7   General Formulation and Discussion
Note that it was not enough just to restate Theorem 7.2 with Ω = Rn but we
also have to require V (x) to be radially unbounded to guarantee global asymptotic
stability. To motivate this condition consider the candidate Lyapunov function for
a system in R2 [176]
                                           x21
                                V (x) =          + x22 ,                    (7.41)
                                         1 + x21
                                                        1
   V (x)
x2
                                                       -1-4                 0
                                                                   -2               2      4
                x2              x1                                         x1
            (a) Lyapunov function V (x).                      (b) Level curves of V (x).
which is depicted in Fig. 7.1, where x1 and x2 denote the first and second compo-
nents of the state vector x, respectively. V (x) in (7.41) is not radially unbounded
as for x2 = 0
                                   lim V (x) = 1.
                                       x1 →∞
For this Lyapunov function even if condition (7.40c) is satisfied, the state x may
escape to infinity. Condition (7.40c) of Theorem 7.3 guarantees that the level sets
Ωc of V (x) (Ωc = {x ∈ Rn : V (x) ≤ c}) are closed.
   The construction of suitable Lyapunov functions is a challenge except for linear
systems. First of all one can quite easily show that for linear systems Lyapunov
stability agrees with the notion of stability based on eigenvalue location.
Theorem 7.4 A linear system xk+1 = Axk is globally asymptotically stable in the
sense of Lyapunov if and only if all its eigenvalues are strictly inside the unit circle.
V (x) = x′ P x, P ≻ 0 (7.42)
        V (xk+1 )−V (xk ) = x′k+1 P xk+1 −x′k P xk = x′k A′ P Axk −x′k P xk = x′k (A′ P A−P )xk .
                                                                                          (7.43)
        Therefore condition (7.40c) is satisfied if P ≻ 0 can be found such that
A′ P A − P = −Q, Q ≻ 0. (7.44)
        Theorem 7.5 Consider the linear system xk+1 = Axk . Equation (7.44) has a
        unique solution P ≻ 0 for any Q ≻ 0 if and only if A has all eigenvalues strictly
        inside the unit circle.
            Thus, a quadratic form x′ P x is always a suitable Lyapunov function for linear
        systems and an appropriate P can be found by solving (7.44) for a chosen Q ≻
        0 iff the system’s eigenvalues lie inside the unit circle. For nonlinear systems,
        determining a suitable form for V (x) is generally difficult.
            For a stable linear system xk+1 = Axk , P turns out to be the infinite time cost
        matrix                                 ∞
                                               X
                                    J∞ (x0 ) =   x′k Qxk = x′0 P x0                   (7.45)
                                                k=0
J∞ (x1 ) − J∞ (x0 ) = x′1 P x1 − x′0 P x0 = x′0 A′ P Ax0 − x′0 P x0 = −x′0 Qx0 (7.46)
        Theorem 7.6 Consider the linear system xk+1 = Axk . Equation (7.44) has a
        unique solution P ≻ 0 for any Q = C ′ C  0 if and only if A has all eigenvalues
        inside the unit circle and (C, A) is observable.
        We can prove Theorem 7.6 in the same way as Callier and Desoer [75, p. 211]
        proved Theorem 7.5. In Theorem 7.6 we do not require that the Lyapunov function
        decreases at every time step, i.e., we allow Q to be positive semidefinite. To
        understand this, let us assume that for a particular system state x̄, V does not
        decrease, i.e., x̄′ Qx̄ = (C x̄)′ (C x̄) = 0. Then at the next time steps we have the rate
        7.5   Lyapunov Stability                                                                    161
        of decrease (CAx̄)′ (CAx̄), (CA2 x̄)′ (CA2 x̄), . . .. If the system (C, A) is observable
        then for all x̄ 6= 0
                                                                     
                              x̄′ C (CA)′ (CA2 )′ · · · (CAn−1 )′ 6= 0,                    (7.47)
        which implies that after at most (n − 1) steps the rate of decrease will become
        nonzero. This is a special case of the Barbashin-Krasovski-LaSalle principle. Note
        that for C square and nonsingular Theorem 7.6 reduces to Theorem 7.5.
           Similarly we can analyze the controlled system xk+1 = Axk + Buk with uk =
        F xk and the infinite time cost
                                                 ∞
                                                 X
                                    J∞ (x0 ) =         x′k Qxk + u′k Ruk                  (7.48)
                                                 k=0
        for the controlled system xk+1 = (A + BF )xk . The infinite time cost matrix P can
        now be found from the Lyapunov equation
                                                           ′
                                 ′                      C                
                        (A + BF ) P (A + BF ) − P =              C DF .              (7.50)
                                                       DF
        According to Theorem
                              7.6 the solution
                                              P is unique and positive definite iff (A+BF )
                           C
        is stable and             , (A + BF ) is observable. This follows directly from the
                          DF
        observability of (C, A). If (C, A) is observable, then so is (C, A + BF ) because
        feedback does not affect observability. Observability is also not affected by adding
        the observed outputs DF x.
            From (7.44) it follows that for stable systems and for a chosen Q ≻ 0 one can
        always find P ≻ 0 solving
                                         A′ P A − P + Q  0.                            (7.51)
        This Lyapunov inequality shows that for a stable system we can always find a P
        such that V (x) = x′ P x decreases at a desired “rate” indicated by Q. We will need
        this result later to prove stability of receding horizon control schemes.
Theorem 7.7 Let P ∈ Rl×n with rank(P ) = n and p ∈ {1, ∞}. The function
                                          P A = HP,                             (7.54a)
                                          kHkp < 1.                             (7.54b)
      Note that the inequality (7.55) is equivalent to the Lyapunov inequality (7.51)
      when the squared two-norm is replaced by the 1− or ∞−norm. Once we have
      constructed a P and H to fulfill the conditions of Theorem 7.7 we can easily find
      P̃ to satisfy (7.55) according to the following lemma.
      Lemma 7.1 Let P and H be matrices satisfying conditions (7.54), with P full
      column rank. Let σ = 1 − kHk∞ , ρ = kQP # k∞ , where P # = (P ′ P )−1 P ′ is the
      left pseudoinverse of P . Then, the square matrix
                                                   ρ
                                            P̃ =     P                            (7.56)
                                                   σ
      satisfies condition (7.55).
           Proof: Since P̃ satisfies P̃ A = H P̃ , we obtain −kP̃ xk∞ +kP̃ Axk∞ +kQxk∞ =
      −kP̃ xk∞ + kH P̃ xk∞ + kQxk∞ ≤ (kHk∞ − 1)kP̃ xk∞ + kQxk∞ ≤ (kHk∞ −
      1)kP̃ xk∞ + kQP #k∞ kP xk∞ = 0. Therefore, (7.55) is satisfied.                  
      Chapter 8
      In this chapter we study the finite time and infinite time optimal control problem
      for unconstrained linear systems with quadratic objective functions. We derive the
      structure of the optimal control law by using two approaches: the batch approach
      and the dynamic programming approach. For problems with quadratic objective
      functions we obtain the well known Algebraic Riccati Equations.
      Again, x(t) ∈ Rn and u(t) ∈ Rm are the state and input vectors respectively.
        We define the following quadratic cost function over a finite horizon of N steps
                                                         N
                                                         X −1
                            J0 (x0 , U0 ) = x′N P xN +          x′k Qxk + u′k Ruk ,    (8.2)
                                                         k=0
      where xk denotes the state vector at time k obtained by starting from the state
      x0 = x(0) and applying to the system model
the input sequence u0 , . . . , uk−1 . Consider the finite time optimal control problem
       Here all future states are explicit functions of the present state x(0) and the future
       inputs u0 , u1 , u2 , . . . only. By defining the appropriate quantities we can rewrite
       this expression compactly as
X = S x x(0) + S u U0 . (8.6)
      According to the principle of optimality the optimal one step cost-to-go can be
      obtained from
                 ∗
                JN −1 (xN −1 ) =           min x′N PN xN + x′N −1 QxN −1 + u′N −1 RuN −1           (8.12)
                                           uN −1
                                                         xN     =      AxN −1 + BuN −1
                                           subj. to                                                (8.13)
                                                         PN     =      P.
       At the next stage, consider the two-step problem from time N − 2 forward:
            ∗                    ′                   ′              ′
           JN −2 (xN −2 ) = min xN −1 PN −1 xN −1 + xN −2 QxN −2 + uN −2 RuN −2          (8.18)
                             uN −2
           Remark 8.1 According to Section 7.4.2, the receding horizon control policy is ob-
           tained by solving problem (8.4) at each time step t with x0 = x(t). Consider the
           state feedback solution u∗ (k) in (8.23) to problem (8.4). Then, the receding horizon
           control policy is:
                                            u∗ (t) = F0 x(t), t ≥ 0                       (8.26)
   Most importantly we observe that the results obtained by the two methods are
fundamentally different. The batch approach yields a formula for the sequence of
inputs as a function of the initial state.
                                              −1 u′
                      U0∗ = − S u′ Q̄S u + R̄    S Q̄S x x(0).            (8.27)
The recursive dynamic programming approach yields a feedback policy, i.e., a se-
quence of feedback laws expressing at each time step the control action as a function
of the state at that time.
where we note that the horizon length is shrinking at each time step.
    As seen from (8.27) the solution to (8.29) relates the sequence of inputs u∗j , u∗j+1 , . . .
to the state x(j) through a linear expression. The first part of this expression yields
again the optimal feedback law (8.28) at time j, u∗ (j) = Fj x(j).
    Here the dynamic programming approach is clearly a more efficient way to gen-
erate the feedback policy because it only uses a simple matrix recursion (8.24).
Repeated application of the batch approach, on the other hand, requires the re-
peated inversion of a potentially large matrix in (8.27). For such inversion, however,
one can take advantage of the fact that only a small part of the matrix H changes
at every time step.
    What makes dynamic programming so effective here is that in this special case,
where the system is linear and the objective is quadratic, the optimal cost-to-go,
the value function Jj∗ (x(j)) has a very simple form: it is quadratic. If we make the
problem only slightly more complicated, e.g., if we add constraints on the inputs or
states, the value function can still be constructed, but it is much more complex. In
general, the value function can only be approximated as discussed in the previous
chapter. Then a repeated application of the batch policy, where we resolve the
optimization problem at each time step is an attractive alternative.
168                                                     8      Linear Quadratic Optimal Control
       Since the prediction must be carried out to infinity, application of the batch method
       becomes impossible. On the other hand, derivation of the optimal feedback law via
       dynamic programming remains viable. We can initialize the RDE (8.24)
       with the terminal cost matrix P0 = Q and solve it backwards for k → −∞. Let
       us assume for the moment that the iterations converge to a solution P∞ . Such P∞
       would then satisfy the Algebraic Riccati Equation (ARE)
       Theorem 8.1 [190, Theorem 2.4-2] If (A, B) is a stabilizable pair and (Q1/2 , A) is
       an observable pair, then the Riccati difference equation (8.31) with P0  0 converges
       to the unique positive definite solution P∞ of the ARE (8.32) and all the eigenvalues
       of (A + BF∞ ) lie strictly inside the unit circle.
                                                         ∗
           The first condition is clearly necessary for J∞  (and P∞ ) to be finite. To un-
       derstand the second condition, we write the state dependent term in the objective
       function as x′ Qx = (x′ Q1/2 )(Q1/2 x). Thus not the state but the “output” (Q1/2 x)
       is penalized in the objective. Therefore the second condition ((Q1/2 , A) observable)
       requires that this output captures all system modes. In this manner convergence
       of the output (Q1/2 x) implies convergence of the state to zero.
8.5   Infinite Horizon Problem                                                     169
   From Section 7.5.2 we know that the optimal infinite horizon cost (8.34) is a
Lyapunov function for the system xk+1 = Axk + Buk with uk = F∞ xk and satisfies
               (A + BF∞ )′ P∞ (A + BF∞ ) − P∞ = Q + F∞
                                                     ′
                                                       RF∞ .
The reader can verify that substituting F∞ from (8.33) we recover the Riccati
equation (8.32).
170   8   Linear Quadratic Optimal Control
      Chapter 9
      In this chapter we study the finite time and infinite time optimal control problem
      for unconstrained linear systems with convex piecewise linear objective functions.
      We derive the structure of the optimal control law by using two approaches: the
      Batch approach and the Dynamic Programming approach.
       First we write the equality constraints (9.4) explicitly to express all future states
       x1 , x2 , . . . as a function of the future inputs u1 , u2 , . . . and then we eliminate all
       intermediate states by using
                                                          Pk−1
                                      xk =     Ak x0 +       j=0   Aj Buk−1−j                                 (9.5)
       so that all future states are explicit functions of the present state x(0) and the
       future inputs u0 , u1 , u2 , . . . only.
          The optimal control problem (9.4) with p = ∞ can be rewritten as a linear
       program by using the following standard approach (see e.g. [79]). The sum of
       components of any vector {εx0 , . . . , εxN , εu0 , . . . , εuN −1 } that satisfies
LP problem
where constraints (9.7b)–(9.7d) are componentwise, and ± means that the con-
straint appears once with each sign, as in (9.6).
      Remark 9.1 The cost function (9.2) with p = ∞ can be interpreted as a special case
      of a cost function with 1-norm over time and ∞-norm over space. For instance, the
      dual choice (∞-norm over time and 1-norm over space) leads to the following cost
      function
      The results of this chapter hold for any combination of 1- and ∞-norms over time
      and space. Clearly the LP formulation will differ from the one in (9.7). For instance,
      the 1−norm in space requires the introduction of nN slack variables for the terms
      kQxk k1 , εk,i ≥ ±Qi xk k = 0, 2, . . . , N − 1, i = 1, 2, . . . , n, plus r slack variables for
      the terminal penalty kP xN k1 , εN,i ≥ ±Pi xN i = 1, 2, . . . , r, plus mN slack variables
      for the input terms kRuk k1 , εuk,i ≥ ±Ri uk k = 0, 1, . . . , N − 1, i = 1, 2, . . . , m. Here
      we have used the notation Mi to denote the i-th row of matrix M .
                                min          c′0 z0
                                 z0
                                                                                                (9.9)
                                subj. to     Gε z0 ≤ wε + Sε x(0),
174                                                                 9     Linear 1/∞ Norm Optimal Control
          Theorem 6.5 states that there exists a continuous and PPWA solution z0∗ (x)
      of the mp-LP problem (9.9). Clearly the same properties are inherited by the
      controller. The following Corollaries of Theorem 6.5 summarize the analytical
      properties of the optimal control law and the value function.
      Corollary 9.1 There exists a control law U0∗ = f¯0 (x(0)), f¯0 : Rn → Rm , obtained
      as a solution of the optimal control problem (9.2)-(9.4) with p = 1 or p = ∞, which
      is continuous and PPWA
      where the polyhedral sets CR0i = {H0i x ≤ 0}, i = 1, . . . , N0r , are a partition of Rn .
      Note that in Corollary 9.1 the control law is linear (not affine) and the critical
      regions have a conic shape (CR0i = {H0i x ≤ 0}). This can be proven immediately
      9.3    Solution via Recursive Approach                                                            175
      from the results in Section 6.2 by observing that the constant term wǫ at the
      right-hand side on the mp-LP problem (9.9) is zero.
      Corollary 9.2 The value function J ∗ (x) obtained as a solution of the optimal
      control problem (9.2)-(9.4) is convex and PPWA.
            Remark 9.2 Note that if the optimizer of problem (9.4) is unique for all x(0) ∈ Rn ,
            then Corollary 9.1 reads: “ The control law U ∗ (0) = f¯0 (x(0)), f¯0 : Rn → Rm ,
            obtained as a solution of the optimal control problem (9.2)-(9.4) with p = 1 or
            p = ∞, is continuous and PPWA,. . .”. From the results of Section 6.2 we know that
            in case of multiple optimizers for some x(0) ∈ Rn , a control law of the form (9.12)
            can always be computed.
      According to the principle of optimality the optimal one step cost-to-go can be
      obtained from
                 ∗
                JN −1 (xN −1 ) = min kPN xN k∞ + kQxN −1 k∞ + kRuN −1 k∞
                                    uN −1
                                                                                               (9.13)
                                          xN        = AxN −1 + BuN −1
                                                                                               (9.14)
                                          PN        = P.
      Substituting (9.14) into the objective function (9.13), we have
        ∗
       JN −1 (xN −1 ) = min kPN (AxN −1 +BuN −1 )k∞ +kQxN −1 k∞ +kRuN −1 k∞ . (9.15)
                         uN −1
                                                                               ∗
      where rN is the number of rows of the matrix PN . By Theorem 6.5, JN       −1 is a
      convex and piecewise affine function of xN −1 , the corresponding optimizer u∗N −1
176                                                       9   Linear 1/∞ Norm Optimal Control
      is piecewise affine and continuous, and the feasible set XN −1 is Rn . We use the
      equivalence of representation between convex and PPWA functions and infinity
      norm (see Section 2.2.5) to write the one-step optimal cost-to-go as
                                      ∗
                                     JN −1 (xN −1 ) = kPN −1 xN −1 k∞                      (9.17)
      with PN −1 defined appropriately. At the next stage, consider the two-step problem
      from time N − 2 forward:
             ∗
            JN −2 (xN −2 ) = min kPN −1 xN −1 k∞ + kQxN −2 k∞ + kRuN −2 k∞                 (9.18)
                                uN −2
         We recognize that (9.18), (9.19) has the same form as (9.13), (9.14). Therefore
      we can compute the optimal solution again by solving the mp-LP
Continuing in this manner, at some arbitrary time k the optimal control action is
      where the polyhedral sets {Hki x ≤ 0}, i = 1, . . . , Nkr , are a partition of Rn . The
      optimal cost-to-go starting from the measured state x(k) is
      Here we have introduced the notation Pk to express the optimal cost-to-go Jk∗ (x(k)) =
      kPk x(k)k∞ from time k to the end of the horizon N . We also remark that the rows
      of Pk correspond to the different affine functions constituting Jk∗ and thus their
      number varies with the time index k. Clearly, we do not have a closed form as
      for the 2-norm with the Riccati Difference Equation (8.24) linking cost and control
      law at time k given their value at time k − 1.
      9.4     Comparison Of The Two Approaches                                                             177
      The recursive dynamic programming approach yields a feedback policy, i.e., a se-
      quence of feedback laws expressing at each time step the control action as a function
      of the state at that time.
                                                              PN −1
             Jj∗ (x(j)) = minuj ,··· ,uN −1    kP xN k∞ +        k=j   kQxk k∞ + kRuk k∞
                                                                                                  (9.27)
                          subj. to             xj = x(j),
      where we note that the horizon length is shrinking at each time step.
          As seen from (9.25) the solution to (9.27) relates the sequence of inputs u∗j , u∗j+1 , . . .
      to the state x(j) through a linear expression. The first part of this expression yields
      again the optimal feedback law (9.26) at time j, u∗ (j) = fj (x(j)).
         Here the dynamic programming approach is clearly a more efficient way to
      generate the feedback policy because it requires the solution of a small mp-LP
      problem (9.7) for each time step. Repeated application of the batch approach, on
      the other hand, requires repeatedly the solution of a larger mp-LP for each time
      step.
178                                                      9     Linear 1/∞ Norm Optimal Control
                                                         ∞
                                                         X
                          ∗
                         J∞ (x(0)) =        min                kQxk k∞ + kRuk k∞ .                 (9.28)
                                         u(0),u(1),...
                                                         k=0
       Since the prediction must be carried out to infinity, application of the batch method
       becomes impossible. On the other hand, derivation of the optimal feedback law
       via dynamic programming remains viable. We can use the dynamic programming
       formulation
       with the terminal cost matrix P0 = Q and solve it backwards for k → −∞. Let
       us assume for the moment that the iterations converge to a solution P∞ in a finite
       number of iterations. Then the optimal feedback control law is time-invariant and
       piecewise linear
                                      ∗
                                     J∞ (x(0)) = kP∞ x(0)k∞ .                                      (9.32)
                                                     ∗
       In general, the infinite time optimal cost J∞   (x(0)) and the optimal feedback con-
       trol law are not necessarily piecewise linear (with a finite number of regions). Con-
       vergence of the recursive scheme (9.29) has been studied in detail in [87]. If this
       recursive scheme converges and Q and R are of full column rank, then the resulting
       control law (9.31) stabilizes the system (see Section 7.4).
                                                                                    
                                                         1     1                    0
                                 x(t + 1)     =                        x(t) +               u(t)   (9.33)
                                                         0     1                    1
           The dynamic programming iteration (9.29) converges after 18 iterations to the fol-
9.5    Infinite Horizon Problem                                                                      179
                                                 −0.10 −1.00 
                   
                      [ 9.44 29.44 ] x     if       −0.71 −0.71         x ≤ [ 00 ]   (Region #1)
                   
                   
                   
                                                                   
                   
                      [ 9.00 25.00 ] x     if       0.10 1.00
                                                                         x ≤ [ 00 ]   (Region #2)
                   
                                                    −0.11 −0.99
                   
                   
                   
                   
                   
                      [ −1.00 19.00 ] x    if   [ −0.45   −0.89
                                                                          ≤ [ 00 ]
                   
                                                  0.71    0.71 ] x                   (Region #3)
                   
                   
                   
                                                                   
                   
                                                    0.11 0.99                  0
                   
                      [ 8.00 16.00 ] x     if       −0.12 −0.99         x≤[    0 ]   (Region #4)
                   
                   
                   
                   
                   
                   
                   
                      [ −2.00 17.00 ] x    if   [ −0.32
                                                   0.45
                                                           −0.95
                                                           0.89 ] x       ≤ [ 00 ]    (Region #5)
                   
                   
                   
                                                                   
                   
                                                    0.12 0.99
                   
                      [ 7.00 8.00 ] x      if       −0.14 −0.99         x ≤ [ 00 ]   (Region #6)
                   
                   
                   
                                                                   
                   
                                                    0.32 0.95
                   
                      [ −3.00 14.00 ] x    if       −0.24 −0.97         x ≤ [ 00 ]   (Region #7)
                   
                   
                   
                   
                   
                                                   0.14 0.99
                                                                     
                   
                      [ 6.00 1.00 ] x      if                           x ≤ [ 00 ]   (Region #8)
                   
                   
                                                     −0.16 −0.99
                   
                   
                   
                                                                   
                   
                      [ −4.00 10.00 ] x    if       0.24 0.97
                                                                         x ≤ [ 00 ]   (Region #9)
                   
                                                    −0.20 −0.98
                   
                   
                   
                                                                   
                   
                      [ 5.00 −5.00 ] x     if       0.16 0.99
                                                                         x ≤ [ 00 ]   (Region #10)
                   
                                                    −0.20 −0.98
              u=                                    0.20 0.98
                                                                     
                   
                      [ −5.00 5.00 ] x     if       −0.16 −0.99         x ≤ [ 00 ]   (Region #11)
                   
                   
                   
                                                                   
                   
                                                    0.20 0.98
                   
                      [ 4.00 −10.00 ] x    if       −0.24 −0.97         x ≤ [ 00 ]   (Region #12)
                   
                   
                   
                                                                   
                   
                                                    0.16 0.99
                   
                      [ −6.00 −1.00 ] x    if       −0.14 −0.99         x ≤ [ 00 ]   (Region #13)
                   
                   
                   
                                                                   
                   
                                                    0.24 0.97
                   
                      [ 3.00 −14.00 ] x    if       −0.32 −0.95         x ≤ [ 00 ]   (Region #14)
                   
                   
                   
                   
                   
                                                                   
                   
                      [ −7.00 −8.00 ] x    if       0.14 0.99
                                                                         x ≤ [ 00 ]   (Region #15)
                   
                   
                                                     −0.12 −0.99
                   
                   
                   
                                                                   
                   
                      [ 2.00 −17.00 ] x    if       0.32 0.95
                                                                         x ≤ [ 00 ]   (Region #16)
                   
                                                    −0.45 −0.89
                   
                   
                   
                                                                   
                   
                      [ −8.00 −16.00 ] x   if       0.12 0.99
                                                                         x ≤ [ 00 ]   (Region #17)
                   
                                                    −0.11 −0.99
                   
                   
                   
                                                                   
                   
                      [ 1.00 −19.00 ] x    if       0.45 0.89
                                                                         x ≤ [ 00 ]   (Region #18)
                   
                                                    −0.71 −0.71
                   
                   
                   
                                                                   
                   
                      [ −9.00 −25.00 ] x   if       0.11 0.99
                                                                         x ≤ [ 00 ]   (Region #19)
                   
                                                    −0.10 −1.00
                   
                   
                   
                   
                   
                      [ −9.44 −29.44 ] x   if   [ 0.10   1.00
                                                                     ≤ [ 00 ]
                   
                                                  0.71   0.71 ] x                    (Region #20)
180                                           9   Linear 1/∞ Norm Optimal Control
      with P∞ equal to
                                                         
                                            9.44    29.44
                                           9.00    25.00 
                                                         
                                          −1.00    19.00 
                                                         
                                           8.00    16.00 
                                                         
                                          −2.00    17.00 
                                                         
                                           7.00     8.00 
                                                         
                                          −3.00    14.00 
                                                         
                                           6.00     1.00 
                                                         
                                          −4.00    10.00 
                                                         
                                           5.00    −5.00 
                                    P∞   =
                                          −5.00
                                                                                     (9.34)
                                                    5.00 
                                                          
                                           4.00    −10.00
                                                         
                                          −6.00    −1.00 
                                                         
                                           3.00    −14.00
                                                         
                                          −7.00    −8.00 
                                                         
                                           2.00    −17.00
                                                         
                                          −8.00    −16.00
                                                         
                                           1.00    −19.00
                                                         
                                          −9.00    −25.00
                                           −9.44    −29.44
      Note that P∞ in (9.34) has 20 rows corresponding to the 20 linear terms (or pieces)
                                               ∗
      of the piecewise linear value function J∞  (x) = kP∞ xk∞ for x ∈ R2 . For instance,
        ∗                     ∗
      J∞ (x) in region 1 is J∞ (x) = 9.44x1 + 29.44x2 , where x1 and x2 denote the first
      and second component of the state vector x, respectively. Note that each linear term
                                                                   ∗
      appears twice, with positive and negative sign. Therefore J∞   (x) can be written in
      minimal form as the infinity norm of a matrix kP̃∞ xk∞ with P̃∞ being a matrix with
                                      ∗
      ten rows. The value function J∞   (x) = kP∞ xk∞ is plotted in Figure 9.1.
                          J ∗ (x)
                                    x2              x1
        Figure 9.1 Example 9.1. ∞-norm objective function, ∞-horizon controller.
        Piecewise linear optimal cost (value function) and corresponding polyhedral
        partition.
            Part IV
       Controllability, Reachability
       and Invariance
      Definition 10.1 For the autonomous system (10.1) we denote the precursor set
      to the set S as
Pre(S) is the set of states which evolve into the target set S in one time step.
      Definition 10.2 For the system (10.2) we denote the precursor set to the set S
      as
                      Pre(S) = {x ∈ Rn : ∃u ∈ U s.t. g(x, u) ∈ S}.            (10.5)
      For a system with inputs, Pre(S) is the set of states which can be driven into the
      target set S in one time step while satisfying input and state constraints.
      Definition 10.3 For the autonomous system (10.1) we denote the successor set
      from the set S as
      Definition 10.4 For the system (10.2) with inputs we will denote the successor
      set from the set S as
      Therefore, all the states contained in S are mapped into the set Suc(S) under the
      map ga or under the map g for some input u ∈ U.
          Remark 10.1 The sets Pre(S) and Suc(S) are also denoted as ‘one-step backward-
          reachable set’ and ‘one-step forward-reachable set’, respectively, in the literature.
         N -step controllable and reachable sets are defined by iterating Pre(·) and Suc(·)
      computations, respectively.
      Definition 10.5 (N -Step Controllable Set KN (S)) For a given target set S ⊆
      X , the N -step controllable set KN (S) of the system (10.1) or (10.2) subject to the
      constraints (10.3) is defined recursively as:
      From Definition 10.5, all states x0 of the system (10.1) belonging to the N -Step
      Controllable Set KN (S) will evolve to the target set S in N steps, while satisfying
      state constraints.
          Also, all states x0 of the system (10.2) belonging to the N -Step Controllable
      Set KN (S) can be driven, by a suitable control sequence, to the target set S in N
      steps, while satisfying input and state constraints.
         10.1    Controllable and Reachable Sets                                                       185
         Definition 10.6 (N -Step Reachable Set RN (X0 )) For a given initial set X0 ⊆
         X , the N -step reachable set RN (X0 ) of the system (10.1) or (10.2) subject to the
         constraints (10.3) is defined as:
         From Definition 10.6, all states x0 belonging to X0 will evolve to the N -step reach-
         able set RN (X0 ) in N steps.
         Next we will show through simple examples the main steps involved in the com-
         putation of controllable and reachable sets for constrained linear systems. Later in
         this section we will provide compact formulas based on polyhedral operations.
             The set Pre(X ) can be obtained as follows: Since the set X is a polytope, it can be
             represented as a H-polytope (Section 4.2)
X = {x : Hx ≤ h}, (10.10)
             where                                               
                                           1          0            10
                                         0           1          10
                                       H=
                                         −1
                                                         and h =   .
                                                      0          10
                                           0         −1            10
             By using this H-presentation and the system equation (10.8), the set Pre(X ) can be
             derived:
             The set (10.12) may contain redundant inequalities which can be removed by using
             Algorithm 4.1 in Section 4.4.1 to obtain its minimal representation. Note that by
             using the notation in Section 4.4.11, the set Pre(X ) in (10.12) is simply X ◦ A.
             The set Pre(X ) is
                                                                     
                                           
                                                      1      0         20 
                                                                           
                                                    1                10
                                                            −0.5x ≤   .
                                  Pre(X ) = x :      −1
                                           
                                                             0       20
                                                                           
                                                                          
                                                       −1    −0.5       10
186                                       10        Controllability, Reachability and Invariance
10
                             x2       5
                                      0             Pre(X ) ∩ X
                                   -5
                                                                             X
                                  -10
                                          -10       -5        0          5       10
                                                             x1
        Figure 10.1 Example 10.1. One-step controllable set Pre(X ) ∩ X for system
        (10.8) under constraints (10.9).
      The set Suc(X ) is obtained by applying the map A to the set X . Let us write X in
      V-representation (see Section 4.1)
X = conv(V ), (10.13)
      and let us map the set of vertices V through the transformation A. Because the
      transformation is linear, the successor set is simply the convex hull of the transformed
      vertices
                                   Suc(X ) = A ◦ X = conv(AV ).                         (10.14)
      We refer the reader to Section 4.4.11 for a detailed discussion on linear transforma-
      tions of polyhedra.
      The set Suc(X ) in H-representation is
                                                                      
                                    
                                                      1        0         5 
                                                    −1                 5 
                                                               0 x ≤  
                           Suc(X ) = x :             1
                                    
                                                              −0.5    2.5
                                                                             
                                                                            
                                                      −1       0.5       2.5
                                  10
                                    5
                                                       )
                            x2
                                    0
                                                   c(X
                                   -5
                                                 Su
                                                             X
                                 -10
                                             -10 -5    0   5 10
                                                      x1
                u(t) ∈ U = {u : − 5 ≤ u ≤ 5} , ∀t ≥ 0                            (10.16a)
                                                  
                                   −10             10
                x(t) ∈ X = x :            ≤x≤            , ∀t ≥ 0.               (10.16b)
                                   −10             10
   For the non-autonomous system (10.15), the set Pre(X ) can be computed using the
   H-representation of X and U,
X = {x : Hx ≤ h}, U = {u : Hu u ≤ hu }, (10.17)
   to obtain
                                                               	
            Pre(X )     =    x ∈ R2 : ∃u ∈ U s.t. g(x, u) ∈ X ,              (10.18)
                                                                  
                                                     HA HB         x   h
                        =     x ∈ R2 : ∃u ∈ R s.t.                   ≤     . (10.19)
                                                      0    Hu      u   hu
   The half-spaces in (10.19) define a polytope in the state-input space, and a projection
   operation (see Section 4.4.6) is used to derive the half-spaces which define Pre(X ) in
   the state space. The one-step controllable set Pre(X ) ∩ X
                                                    
                                      1     0          10
                                   0       1       10
                                                    
                                   −1      0        
                                               x ≤ 10
                                   0      −1       10
                                                    
                                   1     −1.5      10
                                     −1    1.5         10
   is depicted in Fig. 10.3.
   Note that by using the definition of the Minkowski sum given in Section 4.4.9 and
   the affine operation on polyhedra in Section 4.4.11 we can write the operations in
   (10.19) compactly as follows:
                      Pre(X ) =     {x   :   ∃u ∈ U s.t. Ax + Bu ∈ X }
                                    {x   :   y = Ax + Bu, y ∈ X , u ∈ U}
                                    {x   :   Ax = y + (−Bu), y ∈ X , u ∈ U}
                                                                                  (10.20)
                                    {x   :   Ax ∈ C, C = X ⊕ (−B) ◦ U}
                                    {x   :   x ∈ C ◦ A, C = X ⊕ (−B) ◦ U}
                                    {x   :   x ∈ (X ⊕ (−B) ◦ U) ◦ A} .
188                                         10    Controllability, Reachability and Invariance
                                       10
                                        5
                                        0
                                 x2
                                                  Pre(X ) ∩ X
                                       -5
                                                                    X
                                      -10
                                            -10   -5     0      5       10
                                                        x1
            Figure 10.3 Example 10.2. One-step controllable set Pre(X ) ∩ X for system
            (10.15) under constraints (10.16).
         In summary, the sets Pre(X ) and Suc(X ) are the results of linear operations
      on the polyhedra X and U and therefore are polyhedra. By using the definition of
      the Minkowski sum given in Section 4.4.9 and of affine operation on polyhedra in
      Section 4.4.11 we can compactly summarize the Pre and Suc operations on linear
      systems in Table 10.1.
         The N -step controllable set KN (S) and the N -step reachable set RN (X0 ) can
      be computed by using their recursive formulas (10.6), (10.7) and computing the
      Pre and Suc operations as in Table 10.1.
          Example 10.3 Consider the second order unstable system (10.15) subject to the input
          and state constraints (10.16). Consider the target set
                                                               
                                                −1               1
                                   S= x :             ≤x≤             .
                                                −1               1
10.1   Controllable and Reachable Sets                                                            189
                                  30
                                  20
                                  10
                                             Suc(X )
                            x2
                                   0
                                 -10
                                 -20
                                 -30
                                   -30 -20 -10 0 10 20 30
                                               x1
       Figure 10.4 Example 10.2. Successor set for system (10.15) under constraints
       (10.16).
       Table 10.1 Pre and Suc operations for linear systems subject to polyhedral
       state and input constraints x(t) ∈ X , u(t) ∈ U
   The N -step controllable set KN (S) of the system (10.15) subject to the constraints (10.16)
   can be computed by using the recursive formula (10.6)
                   Kj (S) = Pre(Kj−1 (S)) ∩ X , K0 (S) = S,        j = 1, . . . , N
   and the steps described in Example 10.2 to compute the Pre(·) set.
   The sets Kj (S) for j = 1, 2, 3, 4 are depicted in Fig. 10.5.
       Figure 10.5 Example 10.3. Controllable sets Kj (S) for system (10.15) under
       constraints (10.16) for j = 1, 2, 3, 4. Note that the sets are shifted along the
       x-axis for a clearer visualization.
   Example 10.4 Consider the second order unstable system (10.15) subject to the input
   and state constraints (10.16). Consider the initial set
                                                         
                                          −1               1
                           X0 = x :             ≤x≤             .
                                          −1               1
190                                         10    Controllability, Reachability and Invariance
           The N -step reachable set RN (X0 ) of the system (10.15) subject to the constraints (10.16)
           can be computed by using the recursively formula (10.7)
           and the steps described in Example 10.2 to compute the Suc(·) set.
           The sets Rj (X0 )) for j = 1, 2, 3, 4 are depicted in Fig. 10.6. The sets are shifted along
           the x-axis for a clearer visualization.
             Figure 10.6 Example 10.3. Reachable sets Rj (X0 )) for system (10.15) under
             constraints (10.16) for j = 1, 2, 3, 4.
       Invariant sets are used for characterizing the behavior of autonomous systems.
       These types of sets are useful to answer questions such as: “For a given feedback
       controller u = f (x), find the set of initial states whose trajectory will never violate
       the system constraints”. The following definitions, derived from [172, 58, 54, 49,
       179, 137, 139, 140], introduce the different types of invariant sets.
    Remark 10.2 The maximal invariant sets defined here are often referred to as ‘maxi-
    mal admissible sets’ or ‘maximal output admissible sets’ in the literature (e.g., [124]),
    depending on whether the system state or output is constrained.
    Remark 10.3 Note that, in general, the nonlinear system (10.1) may have multi-
    ple equilibrium points, and thus O∞ might be the union of disconnected sets each
    containing an equilibrium point.
      Proof: We prove both the necessary and sufficient parts by contradiction. (⇐:)
If O * Pre(O) then ∃x̄ ∈ O such that x̄ ∈  / Pre(O). From the definition of Pre(O),
ga (x̄) ∈
        / O and thus O is not positive invariant. (⇒:) If O is not a positive invariant
set then ∃x̄ ∈ O such that ga (x̄) ∈/ O. This implies that x̄ ∈ O and x̄ ∈   / Pre(O)
and thus O * Pre(O)                                                                  
     It is immediate to prove that condition (10.22) of Theorem 10.1 is equivalent
to the following condition
                                  Pre(O) ∩ O = O.                               (10.23)
Based on condition (10.23), the following algorithm provides a procedure for com-
puting the maximal positive invariant subset O∞ for system (10.1),(10.3) [10, 49,
172, 124].
Algorithm 10.1 generates the set sequence {Ωk } satisfying Ωk+1 ⊆ Ωk , ∀k ∈ N and
it terminates when Ωk+1 = Ωk . If it terminates, then Ωk is the maximal positive
invariant set O∞ for the system (10.1)-(10.3). If Ωk = ∅ for some integer k then
the simple conclusion is that O∞ = ∅.
192                                              10    Controllability, Reachability and Invariance
         In general, Algorithm 10.1 may never terminate. If the algorithm does not
      terminate in a finite number of iterations, it can be proven that [179]
                                                 O∞ = lim Ωk .
                                                           k→+∞
         Conditions for finite time termination of Algorithm 10.1 can be found in [124].
      A simple sufficient condition for finite time termination of Algorithm 10.1 requires
      the system ga (x) to be linear and stable, and the constraint set X to be bounded
      and to contain the origin.
          Example 10.5 Consider the second order stable system in Example 10.1. The maxi-
          mal positive invariant set of system (10.8) subject to constraints (10.9)
                                                               
                                           1     0            10
                                        0       1         10 
                                                               
                                        −1      0              
                                                     x ≤  10 
                                        0      −1             
                                                           10 
                                        1     −0.5        10 
                                          −1    0.5           10
10
                                      5
                                x2
0 O∞
                                      -5
                                                                      X
                                  -10
                                           -10        -5     0    5       10
                                                            x1
            Figure 10.7 Example 10.5. Maximal Positive Invariant Set of system (10.8)
            under constraints (10.9).
          Note from the previous discussion of the example and from Figure 10.1 that
      here the maximal positive invariant set O∞ is obtained after a single step of Algo-
      rithm 10.1, i.e.
                                  O∞ = Ω1 = Pre(X ) ∩ X .
The following definitions, adopted from [172, 58, 54, 49, 179], introduce the different
types of control invariant sets.
    Remark 10.4 The geometric conditions for invariance (10.22), (10.23) hold for control
    invariant sets.
    The following algorithm provides a procedure for computing the maximal con-
trol invariant set C∞ for system (10.2),(10.3) [10, 49, 172, 124].
Algorithm 10.2 generates the set sequence {Ωk } satisfying Ωk+1 ⊆ Ωk , ∀k ∈ N. Al-
gorithm 10.2 terminates when Ωk+1 = Ωk . If it terminates, then Ωk is the maximal
control invariant set C∞ for the system (10.2)-(10.3). In general, Algorithm 10.2
may never terminate [10, 49, 172, 164]. If the algorithm does not terminate in a fi-
nite number of iterations, in general, convergence to the maximal control invariant
set is not guaranteed
                                  C∞ 6= lim Ωk .                            (10.24)
                                          k→+∞
The work in [50] reports examples of nonlinear systems where (10.24) can be ob-
served. A sufficient condition for the convergence of Ωk to C∞ as k → +∞ requires
the polyhedral sets X and U to be bounded and the system g(x, u) to be continu-
ous [50].
    Example 10.6 Consider the second order unstable system in Example 10.2. Algo-
    rithm 10.2 is used to compute the maximal control invariant set of system (10.15)
194                                            10    Controllability, Reachability and Invariance
          subject to constraints (10.16). Algorithm 10.2 terminates after 45 iterations and the
          maximal control invariant set C∞ is:
                                                                
                                         0       1             4
                                        0      −1         4 
                                                                
                                    0.55     −0.83              
                                                     x ≤  2.22  .
                                    −0.55     0.83        2.22 
                                                                
                                        1       0         10 
                                       −1        0            10
10
                                    5
                               x2
0 C∞
                                    -5
                                                                    X
                                 -10
                                         -10        -5    0     5       10
                                                         x1
            Figure 10.8 Example 10.6. Maximal Control Invariant Set of system (10.15)
            subject to constraints (10.16).
          Remark 10.5 From the results in Section 10.1.1, for linear system with linear con-
          straints the sets O∞ and C∞ are polyhedra if they are finitely determined.
         For all states contained in the maximal control invariant set C∞ there exists
      a control law such that the system constraints are never violated. This does not
      imply that there exists a control law which can drive the state into a user-specified
      target set. This issue is addressed in the following by introducing the concepts of
      maximal controllable sets and stabilizable sets.
      Definition 10.12 (Maximal Controllable Set K∞ (O)) For a given target set
      O ⊆ X , the maximal controllable set K∞ (O) for system (10.2) subject to the con-
      straints in (10.3) is the union of all N -step controllable sets KN (O) contained in
      X (N ∈ N).
      We will often deal with controllable sets KN (O) where the target O is a control
      invariant set. They are special sets, since in addition to guaranteeing that from
10.2     Invariant Sets                                                                       195
KN (O) we reach O in N steps, one can ensure that once it has reached O, the
system can stay there at all future time instants.
    Remark 10.6 In general, the maximal stabilizable set K∞ (O) is not equal to the
    maximal control invariant set C∞ , even for linear systems. K∞ (O) ⊆ C∞ for all
    control invariant sets O. The set C∞ \ K∞ (O) includes all initial states from which
    it is not possible to steer the system to the stabilizable region K∞ (O) and hence O.
Both systems are subject to the disturbance w(k) and to the constraints
       Definition 10.14 For the autonomous system (10.27) we will denote the robust
       precursor set to the set S as
       Pre(S, W) defines the set of states of system (10.27) which evolve into the target
       set S in one time step for all possible disturbance w ∈ W.
       Definition 10.15 For the system (10.28) we will denote the robust precursor set
       to the set S as
       For a system with inputs, Pre(S, W) is the set of states which can be robustly
       driven into the target set S in one time step for all admissible disturbances.
       Definition 10.16 For the autonomous system (10.27) we will denote the robust
       successor set from the set S as
       Definition 10.17 For the system (10.28) with inputs we will denote the robust
       successor set from the set S as
       Thus, all the states contained in S are mapped into the set Suc(S, W) under the
       map ga for all disturbances w ∈ W, and under the map g for all inputs u ∈ U and
       for all disturbances w ∈ W.
           Remark 10.7 The sets Pre(S, W) and Suc(S, W) are also denoted as ‘one-step robust
           backward-reachable set’ and ‘one-step robust forward-reachable set’, respectively, in
           the literature.
         10.3   Robust Controllable and Reachable Sets                                                197
            N -step robust controllable and robust reachable sets are defined by iterating
         Pre(·, ·) and Suc(·, ·) computations, respectively.
         Definition 10.18 (N -Step Robust Controllable Set KN (S, W)) For a given
         target set S ⊆ X , the N -step robust controllable set KN (S, W) of the system (10.27)
         or (10.28) subject to the constraints (10.29) is defined recursively as:
         From Definition 10.18, all states x0 belonging to the N -Step Robust Controllable
         Set KN (S, W) can be robustly driven, through a time-varying control law, to the
         target set S in N steps, while satisfying input and state constraints for all possible
         disturbances.
             N -step robust reachable sets are defined analogously to N -step robust control-
         lable set.
         Definition 10.19 (N -Step Robust Reachable Set RN (X0 , W)) For a given ini-
         tial set X0 ⊆ X , the N -step robust reachable set RN (X0 , W) of the system (10.27)
         or (10.28) subject to the constraints (10.29) is defined recursively as:
             The set Pre(X , W) can be obtained as described next. Since the set X is a polytope,
             it can be represented as an H-polytope (Section 4.2)
                                             X = {x : Hx ≤ h},                             (10.37)
198                                   10      Controllability, Reachability and Invariance
      where                                                
                                    1           0            10
                                  0            1          10
                                H=
                                  −1
                                                   and h =   .
                                                0          10
                                    0           −1           10
      By using this H-presentation and the system equation (10.34), the set Pre(X , W) can
      be rewritten as
      with
                                          h̃i = min (hi − Hi w).                    (10.40)
                                               w∈W
       Pre(X , W)    = {x ∈ Rn : Ax + w ∈ X , ∀w ∈ W} = {x ∈ Rn : Ax ∈ X ⊖ W} =
                     = (X ⊖ W) ◦ A.
The set
                                        10
                                          5
                                   x2
                                          0         Pre(X , W) ∩ X
                                         -5
                                                                         X
                                        -10
                                              -10     -5    0        5       10
                                                           x1
            is obtained by applying the map A to the set X and then considering the effect of
            the disturbance w ∈ W. Let us write X in V-representation (see Section 4.1)
                                                     X = conv(V ),                       (10.42)
            and let us map the set of vertices V through the transformation A. Because the
            transformation is linear, the composition of the map A with the set X , denoted as
            A ◦ X , is simply the convex hull of the transformed vertices
                                                A ◦ X = conv(AV ).                       (10.43)
            We refer the reader to Section 4.4.11 for a detailed discussion on linear transforma-
            tions of polyhedra. Rewrite (10.41) as
                    Suc(X , W) = {y ∈ Rn : ∃ z ∈ A ◦ X , ∃w ∈ W such that y = z + w}.
            We can use the definition of the Minkowski sum given in Section 4.4.9 and rewrite
            the Suc set as
                                        Suc(X , W) = (A ◦ X ) ⊕ W.
            We can compute the Minkowski sum via projection or vertex enumeration as ex-
            plained in Section 4.4.9. The set Suc(X , W) in H-representation is
                                                                   
                                             
                                                     1    −0.5        4  
                                             
                                                  0                16
                                             
                                                          −1        
                                                                           
                                                                           
                                                  −1               6 
                                                            0         
                               Suc(X , W) = x :                  x≤  ,
                                             
                                                  −1      0.5 
                                                                     4 
                                             
                                                                  16 
                                             
                                                     0      1             
                                                                           
                                                                          
                                                      1      0         6
            and is depicted in Fig. 10.10.
10
                                                       )
                                                     ,W
                             x2
                                    0
                                                     c(X
                                                   Su
                                                           X
                                  -10
                                             -10      0      10
                                                     x1
        Figure 10.10 Example 10.8. Robust successor set for system (10.34) under
        constraints (10.36).
                   u(t) ∈ U = {u : − 5 ≤ u ≤ 5} , ∀t ≥ 0                           (10.45a)
                                                     
                                      −10             10
                   x(t) ∈ X = x :            ≤x≤            , ∀t ≥ 0,              (10.45b)
                                      −10             10
      where
                            w(t) ∈ W = {w : − 1 ≤ w ≤ 1} , ∀t ≥ 0.                  (10.46)
      For the non-autonomous system (10.44), the set Pre(X , W) can be computed using
      the H-presentation of X and U,
X = {x : Hx ≤ h}, U = {u : Hu u ≤ hu }, (10.47)
      to obtain
                                                                       	
      Pre(X , W)    =    x ∈ R2 : ∃u ∈ U s.t. Ax + Bu + w ∈ X , ∀ w ∈ W         (10.48a)
                                                                              
                                                 HA HB     x      h − Hw
                    =     x ∈ R2 : ∃u ∈ R s.t.                 ≤            , ∀w∈W .
                                                  0  Hu    u         hu
                                                                                      (10.48b)
    in the state space. The set Pre(X , W) ∩ X is depicted in Fig. 10.11 and reported
    below:                                       
                                   1     0         9.3
                                −1      0       9.3
                                                 
                                1      −1.5      
                                           x ≤  9 .
                                −1     1.5      9
                                                 
                                0       1        10 
                                   0     −1         10
                                10
                                  5
                           x2
                                  0         Pre(X , W) ∩ X
                                 -5
                                                             X
                                -10
                                      -10     -5    0    5       10
                                                   x1
   Note that by using the definition of a Minkowski sum given in Section 4.4.9
and the affine operation on polyhedra in Section 4.4.11 we can compactly write the
operations in (10.48) as follows:
  Pre(X , W) =     {x :   ∃u ∈ U s.t. Ax + Bu + w ∈ X , ∀ w ∈ W}
                   = {x   : ∃y ∈ X , ∃u ∈ U s.t. y = Ax + Bu + w, ∀ w ∈ W}
                   = {x   : ∃y ∈ X , ∃u ∈ U s.t. Ax = y + (−Bu) − w, ∀ w ∈ W}
                   = {x   : Ax ∈ C and C = X ⊕ (−B) ◦ U ⊖ W}
                   = {x   : x ∈ C ◦ A, C = X ⊕ (−B) ◦ U ⊖ W}
                   = {x   : x ∈ ((X ⊖ W) ⊕ (−B ◦ U)) ◦ A} .
                                                                          (10.51)
    Remark 10.8 Note that in (10.51) we have used the fact that if a set S is described
    as S = {v : ∃z ∈ Z, s.t. v = z − w, ∀ w ∈ W}, then S = {v : ∃z ∈ Z, s.t. z =
    v + w, ∀ w ∈ W} or S = {v : v + w ∈ Z, ∀ w ∈ W} = Z ⊖ W. Also, to derive
    the last equation of (10.51) we have used the associative property of the Pontryagin
    difference.
                        Suc(X , W) = (A ◦ X ) ⊕ (B ◦ U) ⊕ W.
202                                       10   Controllability, Reachability and Invariance
                                        30
                                        20
                                        10
                                  x2
                                         0      Suc(X , W)
                                       -10
                                       -20
                                       -30
                                         -30 -20 -10 0 10 20 30
                                                     x1
               Figure 10.12 Example 10.9. Robust successor set for system (10.44) under
               constraints (10.45)-(10.46).
               Table 10.2 Pre and Suc operations for uncertain linear systems subject to
               polyhedral input and state constraints x(t) ∈ X , u(t) ∈ U with additive
               polyhedral disturbances w(t) ∈ W
             The N -step robust controllable set KN (S, W) and the N -step robust reachable
         set RN (X0 , W) can be computed by using their recursive formulas (10.32), (10.33)
         and computing the Pre and Suc operations as described in Table 10.2.
         The next Lemma 10.1 will help us computing Pre and Suc sets for linear systems
         with parametric uncertainty.
     Proof: Easily follows from the fact that the maximum of a convex function
over a compact convex set is attained at an extreme point of the set.        
   Lemma 10.2 shows how to reduce the number of constraints in (10.53) for a
specific class of constraint functions.
Lemma 10.2 Assume g(z, x, w) = g 1 (z, x) + g 2 (w). Then the constraint (10.52)
                                                                 ′
can be replaced by g 1 (z, x) ≤ −ḡ, where ḡ = ḡ1 , . . . , ḡng is a vector whose i-th
component is
                                  ḡi = max gi2 (w),                              (10.54)
                                             w∈W
X = {x : Hx ≤ h}, (10.57)
      where                                                
                                     1          0            10
                                   0           1           
                                   
                                 H=               and h = 10 .
                                     −1         0          10
                                     0         −1            10
      By using this H-presentation and the system equation (10.55), the set Pre(X , W) can
      be rewritten as
                                                               	
            Pre(X , W) =       x : Hga (x, w) ≤ h, ∀w ∈ W                           (10.58)
                           =   {x : HA(wp )x ≤ h − Hwa , ∀wa ∈ W a , wp ∈ W p } .
                                                                                    (10.59)
      By using Lemmas 10.1 and 10.2, the set (10.59) can be rewritten as a the polytope
                                                                  
                                                     HA(0)          h̃
                    x ∈ Pre(X , W) = {x ∈ Rn :                 x≤      }         (10.60)
                                                     HA(0.5)        h̃
204                                        10    Controllability, Reachability and Invariance
      with
                              h̃i = amin a (hi − Hi wa ), i = 1, . . . , 4.                 (10.61)
                                       w ∈W
                                    10
                                       5
                              x2
                                       0         Pre(X , W) ∩ X
                                    -5
                                                                      X
                                   -10
                                           -10   -5        0      5       10
                                                          x1
        Figure 10.13 Example 10.10. One-step robust controllable set Pre(X , W)∩X
        for system (10.55) under constraints (10.56).
      Let w = [wp ] and W = W p . The set Suc(X , W) can be written as infinite union of
      reachable sets
                                              [
                                Suc(X , W) =      Suc(X , w̄)                    (10.64)
                                                          w̄∈W
      where Suc(X , w̄) is computed as described in Example 10.1 for the system A(w̄). In
      general, the union in equation (10.64) generates a non-convex set, as can be seen
      in Fig. 10.14. Non convexity of successor sets for parametric linear systems is also
      discussed in [59][Sec. 6.1.2].
       10.4   Robust Invariant Sets                                                            205
10
                                                        )
                                                       ,W
                                x2
                                       0
                                                     c(X
                                                   Su
                                     -10
                                             -10        0    10
                                                       x1
              Figure 10.14 Example 10.11. Robust successor set Suc(X , W) for system
              (10.62) under constraints (10.63).
       Robust invariant sets are computed for autonomous systems. These types of sets
       are useful to answer questions such as: “For a given feedback controller u = f (x),
       find the set of states whose trajectory will never violate the system constraints for
       all possible disturbances”. The following definitions introduce the different types
       of robust invariant sets.
       The proof of Theorem 10.2 follows the same lines of the proof of Theorem 10.1. 
206                                        10       Controllability, Reachability and Invariance
      Algorithm 10.4 generates the set sequence {Ωk } satisfying Ωk+1 ⊆ Ωk , ∀k ∈ N and
      it terminates when Ωk+1 = Ωk . If it terminates, then Ωk is the maximal robust
      positive invariant set O∞ for system (10.27)-(10.29). If Ωk = ∅ for some integer k
      then the simple conclusion is that O∞ = ∅.
          In general, Algorithm 10.4 may never terminate. If the algorithm does not
      terminate in a finite number of iterations, it can be proven that [179]
                                           O∞ = lim Ωk .
                                                     k→+∞
      Conditions for finite time termination of Algorithm 10.4 can be found in [124]. A
      simple sufficient condition for finite time termination of Algorithm 10.1 requires the
      system ga (x, w) to be linear and stable, and the constraint set X and disturbance
      set W to be bounded and to contain the origin.
          Example 10.12 Consider the second order stable system in Example 10.8
                                                            
                                                 0.5     0
                   x(t + 1) = Ax(t) + w(t) =                   x(t) + w(t)               (10.67)
                                                   1   −0.5
          subject to the constraints
                                                                  
                                          −10                      10
                          x(t) ∈ X = x :        ≤x≤                       , ∀t ≥ 0
                                        −10                    10 
                                                                                         (10.68)
                                           −1                       1
                          w(t) ∈ W = w :        ≤w≤                      , ∀t ≥ 0.
                                           −1                       1
          The maximal robust positive invariant set of system (10.67) subject to constraints (10.68)
          is depicted in Fig. 10.15 and reported below:
                                                                 
                                       0.89   −0.44            8.04
                                     −0.89    0.44         8.04 
                                                                 
                                     −1         0                
                                                     x ≤  10  .
                                        0      −1          10 
                                                                 
                                        1       0          10 
                                         0       1              10
10.4   Robust Invariant Sets                                                               207
                               10
                                 5
                          x2
                                 0              O∞
                                -5
                                                         X
                               -10
                                     -10   -5    0   5       10
                                                x1
    Remark 10.9 The geometric conditions for invariance (10.65)-(10.66) hold for control
    invariant sets.
   The following algorithm provides a procedure for computing the maximal robust
control invariant set C∞ for system (10.28)-(10.29).
               Ω0 ← X , k ← −1
               Repeat
                   k ←k+1
                   Ωk+1 ← Pre(Ωk , W) ∩ Ωk
               Until Ωk+1 = Ωk
               C∞ ← Ωk+1
      The work in [50] reports examples of nonlinear systems where (10.69) can be ob-
      served. A sufficient condition for the convergence of Ωk to C∞ as k → +∞ requires
      the polyhedral sets X , U and W to be bounded and the system g(x, u, w) to be
      continuous [50].
          Example 10.13 Consider the second order unstable system in Example 10.9. The
          maximal robust control invariant set of system (10.44) subject to constraints (10.45)-
          (10.46) is an empty set. If the uncertain set (10.46) is replaced with
                              w(t) ∈ W = {w : − 0.1 ≤ w ≤ 0.1} , ∀t ≥ 0
          the maximal robust control invariant set is
                                                                 
                                       0        1              3.72
                                      0       −1            3.72 
                                                     x ≤         
                                  0.55      −0.83           2.0 
                                     −0.55    0.83             2.0
          which is depicted in Fig. 10.16.
      Definition 10.25 (Maximal Robust Controllable Set K∞ (O, W)) For a given
      target set O ⊆ X , the maximal robust controllable set K∞ (O, W) for the system
      (10.28) subject to the constraints (10.29) is the union of all N -step robust control-
      lable sets contained in X for N ∈ N.
10.4   Robust Invariant Sets                                                            209
                              10
                                5
                         x2
                                0              C∞
                               -5
                                                        X
                              -10
                                    -10   -5    0   5       10
                                               x1
Robust controllable sets KN (O, W) where the target O is a robust control invariant
set are special sets, since in addition to guaranteeing that from KN (O, W) we
robustly reach O in N steps, one can ensure that once reached O, the system can
stay there at all future time instants and for all possible disturbance realizations.
   The set K∞ (O, W) contains all states which can be robustly steered into the
robust control invariant set O and hence K∞ (O, W) ⊆ C∞ . The set K∞ (O, W) ⊆
C∞ can be computed as follows:
       In this chapter we study the finite time and infinite time optimal control problem for
       linear systems with linear constraints on inputs and state variables. We establish
       the structure of the optimal control law and derive algorithms for its computation.
       For finite time problems with linear and quadratic objective functions we show that
       the time varying feedback law is piecewise affine and continuous. The value function
       is a convex piecewise linear for linear objective functions and convex piecewise
       quadratic for quadratic objective functions.
           We describe how the optimal control action for a given initial state can be
       computed by means of linear or quadratic programming. We also describe how
       the optimal control law can be computed by means of multiparametric linear or
       quadratic programming. Finally we show how to compute the infinite time optimal
       controller for linear and quadratic objective functions and prove that, when it
       exists, the infinite time controller inherits all the structural properties of the finite
       time optimal controller.
       where x(t) ∈ Rn , u(t) ∈ Rm are the state and input vectors, respectively, subject
       to the constraints
                                 x(t) ∈ X , u(t) ∈ U, ∀t ≥ 0.                      (11.2)
       The sets X ⊆ Rn and U ⊆ Rm are polyhedra.
           Remark 11.1 The results of this chapter also hold for more general forms of linear
           constraints such as mixed input and state constraints
          where Px,u is a polyhedron in Rn+m of mixed input and state constraints over a finite
          time, or, even more general, constraints of the type:
                          [x(0)′ , . . . , x(N − 1)′ , u(0)′ , . . . , u(N − 1)′ ] ∈ Px,u,N ,   (11.4)
          where Px,u,N is a polyhedron in RN(n+m) . Note that constraints of the type (11.4)
          can arise, for example, from constraints on the input rate ∆u(t) = u(t) − u(t − 1). In
          this chapter, for the sake of simplicity, we will use the less general form (11.2).
      where xk denotes the state vector at time k obtained by starting from the state
      x0 = x(0) and applying to the system model
                                           xk+1 = Axk + Buk                                     (11.6)
      the input sequence u0 , . . . , uk−1 .
         If the 1-norm or ∞-norm is used in the cost function (11.5), then we set p(xN ) =
      kP xN kp and q(xk , uk ) = kQxk kp + kRuk kp with p = 1 or p = ∞ and P , Q, R full
      column rank matrices. Cost (11.5) is rewritten as
                                                          N
                                                          X −1
                        J0 (x(0), U0 ) = kP xN kp +              kQxk kp + kRuk kp .            (11.7)
                                                           k=0
         If the squared Euclidian norm is used in the cost function (11.5), then we set
      p(xN ) = x′N P xN and q(xk , uk ) = x′k Qxk + u′k Ruk with P  0, Q  0 and R ≻ 0.
      Cost (11.5) is rewritten as
                                                           N
                                                           X −1
                         J0 (x(0), U0 ) = x′N P xN +              x′k Qxk + u′k Ruk .           (11.8)
                                                            k=0
    Remark 11.2 Note that we distinguish between the current state x(k) of system (11.1)
    at time k and the variable xk in the optimization problem (11.9), that is the predicted
    state of system (11.1) at time k obtained by starting from the state x0 = x(0) and
    applying to system (11.6) the input sequence u0 , . . . , uk−1 . Analogously, u(k) is the
    input applied to system (11.1) at time k while uk is the k-th optimization variable of
    the optimization problem (11.9).
If we use cost (11.8) with the squared Euclidian norm and set
problem (11.9) becomes the standard unconstrained finite time optimal control
problem (Chapter 8) whose solution (under standard assumptions on A, B, P , Q
and R) can be expressed through the time varying state feedback control law (8.28)
    In the following chapters we will show that the solution to problem (11.9) can
again be expressed in feedback form where now u∗ (k) is a continuous piecewise
affine function on polyhedra of the state x(k), i.e., u∗ (k) = fk (x(k)) where
Matrices Hkj and Kkj in equation (11.15) describe the j-th polyhedron CRkj = {x ∈
Rn : Hkj x ≤ Kkj } inside which the feedback optimal control law u∗ (k) at time
k has the affine form Fkj x + gkj . The set of polyhedra CRkj , j = 1, . . . , Nkr is a
polyhedral partition of the set of feasible states Xk of problem (11.9) at time k. The
sets Xk are discussed in detail in the next section. Since the functions fk (x(k)) are
continuous, the use of polyhedral partitions rather than strict polyhedral partitions
(Definition 4.5) will not cause any problem, indeed it will simplify the exposition.
    In the rest of this chapter we will characterize the structure of the value function
and describe how the optimal control law can be efficiently computed by means of
multiparametric linear and quadratic programming. We will distinguish the cases
1- or ∞-norm and squared 2-norm.
214                                                       11      Constrained Optimal Control
       The definition of Xi in (11.19) is recursive and requires that for any feasible initial
       state xi ∈ Xi there exists a feasible input ui which keeps the next state Axi + Bui
       in the feasible set Xi+1 . It can be compactly written as
                                          Xi = Pre(Xi+1 ) ∩ X .                          (11.20)
11.2    Feasible Solutions                                                                      215
Initializing XN to Xf and solving (11.19) backward in time yields the same sets Xi
as the batch approach. This recursive formulation, however, leads to an alternative
approach for computing the sets Xi . Let Xi be the H-polyhedra AXi x ≤ bXi . Then
the set Xi−1 is the projection of the following polyhedron
                                                        
                         Au                 0            bu
                         0  ui +  Ax  xi ≤  bx                        (11.21)
                        AXi B             AXi A          bXi
on the xi space.
    Consider problem (11.9). The set X0 is the set of all initial states x0 for
which (11.9) is feasible. The sets Xi with i = 1, . . . , N − 1 are hidden. A
given Ū0 = [ū0 , . . . , ūN −1 ] is feasible for problem (11.9) if and only if at all time
instants i, the state xi obtained by applying ū0 , . . . , ūi−1 to the system model
xk+1 = Axk + Buk with initial state x0 ∈ X0 belongs to Xi . Also, Xi is the set of
feasible initial states for problem
                                                  PN −1
        Ji∗ (x(0)) = minUi               p(xN ) + k=i q(xk , uk )
                           subj. to xk+1 = Axk + Buk , k = i, . . . , N − 1
                                                                                      (11.22)
                                         xk ∈ X , uk ∈ U, k = i, . . . , N − 1
                                         xN ∈ Xf .
    Next, we provide more insights into the set Xi by using the invariant set theory
of Section 10.2. We consider two cases: (1) Xf = X which corresponds to effectively
“removing” the terminal constraint set and (2) Xf chosen to be a control invariant
set.
Theorem 11.1 [172, Theorem 5.3]. Let the terminal constraint set Xf be equal
to X . Then,
   1. The feasible set Xi , i = 0, . . . , N − 1 is equal to the (N − i)-step controllable
      set:
                                           Xi = KN −i (X ).
   2. The feasible set Xi , i = 0, . . . , N − 1 contains the maximal control invariant
      set:
                                             C∞ ⊆ Xi .
   3. The feasible set Xi is control invariant if and only if the maximal control
      invariant set is finitely determined and N − i is equal to or greater than its
      determinedness index N̄ , i.e.
                   Xi ⊆ P re(Xi ) ⇔ C∞ = KN −i (X ) for all i ≤ N − N̄ .
      Theorem 11.2 [172, Theorem 5.4]. Let the terminal constraint set Xf be a control
      invariant subset of X . Then,
        1. The feasible set Xi , i = 0, . . . , N − 1 is equal to the (N − i)-step stabilizable
           set:
                                               Xi = KN −i (Xf ).
Xi ⊆ C∞ .
           Furthermore,
                                          Xi = K∞ (Xf ) if i ≤ N − N̄ .
          Remark 11.3 Theorems 11.1 and 11.2 help us understand how the feasible sets Xi
          propagate backward in time as a function of the terminal set Xf . In particular,
          when Xf = X the set Xi shrinks as i becomes smaller and stops shrinking when it
          becomes the maximal control invariant set. Also, depending on i, either it is not a
          control invariant set or it is the maximal control invariant set. We have the opposite
          if a control invariant set is chosen as terminal constraint Xf . The set Xi grows as
          i becomes smaller and stops growing when it becomes the maximal stabilizable set.
          Both cases are shown in the Example 11.1 below.
          We compute the feasible sets Xi and plot them in Figure 11.1 in two cases.
 11.2      Feasible Solutions                                                                             217
                                                                       
                                     −0.32132     −0.94697         0.3806
                                    0.32132      0.94697               
                                                           x ≤  0.3806  .                   (11.26)
                                       1            0           2.5 
                                       −1            0               2.5
                                                                                
                                       −0.44721   −0.89443                2.6833
                                      −0.24254   −0.97014              2.6679   
                                                                                
                                      −0.31623   −0.94868              2.5298   
                                                                                
                                      0.24254    0.97014               2.6679   
                                                                                
                                      0.31623    0.94868               2.5298   
                                                              x ≤               .           (11.27)
                                      0.44721    0.89443               2.6833   
                                                                                
                                          1         0                     5     
                                                                                
                                         −1         0                     5     
                                                                                
                                       0.70711   0.70711               3.5355   
                                       −0.70711   −0.70711                3.5355
Note that in this case C∞ = K∞ (Xf ) and the determinedness index is six.
           6                                                  6
           4                                                  4
          2                                                  2
     x2
x2
           0                                                  0
          -2                                                 -2
          -4                                                 -4
          -6-6          -2         2          6              -6-6         -2            2        6
                   -4         0          4                          -4         0            4
                              x1                                               x1
        (a) Case 1: Xf = control invariant                          (b) Case 2: Xf = X .
        set in (11.26).
                                                                           N
                                                                           X −1
           J0∗ (x(0)) =   minU0        J0 (x(0), U0 ) = x′N P xN +                x′k Qxk + u′k Ruk
                                                                           k=0
                          subj. to     xk+1 = Axk + Buk , k = 0, . . . , N − 1                         (11.28)
                                       xk ∈ X , uk ∈ U, k = 0, . . . , N − 1
                                       xN ∈ Xf
                                       x0 = x(0).
             J0∗ (x(0))   =   min          J0 (x(0), U0 ) = U0′ HU0 + 2x′ (0)F U0 + x′ (0)Y x(0)
                              U0                                              
                          =   min          J0 (x(0), U0 ) = [U0′ x′ (0)] H  F ′ [U ′ x(0)′ ]′
                                                                          F Y     0
                              U0
                              subj. to     G0 U0 ≤ w0 + E0 x(0),
                                                                                           (11.29)
         with G0 , w0 and E0 defined in (11.18) for i = 0 and     H, F ,  Y defined in (8.8). As
         J0 (x(0), U0 ) ≥ 0 by definition it follows that H    F ′  0.
                                                            F Y
             For a given vector x(0) the optimal input sequence U0∗ solving problem (11.29)
         can be computed by using a Quadratic Program (QP) solver (see Section 2.3 for
         QP definition and properties and Chapter 3 for fast numerical methods for solving
         QPs).
             To obtain the problem (11.29) we have eliminated the state variables and equal-
         ity constraints xk+1 = Axk + Buk by successive substitution so that we are left
         with u0 , . . . , uN −1 as the only decision variables and x(0) as a parameter vector.
         In general, it might be more efficient to solve a QP problem with equality and
         inequality constraints so that sparsity can be exploited. To this aim we can define
         the variable z̃ as
                                                                          ′
                                   z̃ = x′1 . . . x′N u′0 . . . u′N −1
         For a given vector x(0) the optimal input sequence U0∗ solving problem (11.30) can
         be computed by using a Quadratic Program (QP) solver.
            To obtain problem (11.30) we have rewritten the equalities from system dy-
         11.3   2-Norm Case Solution                                                                             219
         and rewritten state and input constraints as G0,in z̃ ≤ w0,in + E0,in x(0) where
                                                                       
                    0                         0                                                        
                  Ax 0                                                                bx
                                             0                                      bx               
                        Ax                        0                                                  
                                                                                    ..               
                             . ..                     . ..                          .                
                                                                                                     
                                                                                    bx               
                                  Ax                           0                                     
                                                                                    bf               
                 
         G0,in =                       Af                              
                                                                     0  , w0,in =                     ,
                                                                                      bu               
                  0                         Au                                                       
                                                                                    bu               
                         0                       Au                                                  
                                                                                    .                
                             ..                       ..                            ..               
                                .                        .                                           
                                                                                    bu               
                                   0                          Au       
                                                                                        bu
                                         0                         Au
                                                                          ′
                                     E0,in =       −A′x   0 ···    0            ,
         and constructed the cost matrix H̄ as
                                                                                   
                                     Q
                                        ..                                         
                                           .                                       
                                                                                   
                                              Q                                    
                                                                                   
                              H̄ = 
                                                         P                         .
                                                                                    
                                                             R                     
                                                                                   
                                                                 ..                
                                                                      .            
                                                                                R
         We view x(0) as a vector of parameters and our goal is to solve (11.31) for all
      values of x(0) ∈ X0 and to make this dependence explicit. The computation of
      the set X0 of initial states for which problem (11.31) is feasible was discussed in
      Section 11.2.
         Before proceeding further, it is convenient to define
                                        z = U0 + H −1 F ′ x(0),                         (11.32)
      z ∈ Rs , remove x(0)′ Y x(0) and to transform (11.31) to obtain the equivalent
      problem
                       Jˆ∗ (x(0)) = min        z ′ Hz
                                      z                                      (11.33)
                                     subj. to G0 z ≤ w0 + S0 x(0),
      where S0 = E0 + G0 H −1 F ′ , and Jˆ∗ (x(0)) = J0∗ (x(0))− x(0)′ (Y − F H −1 F ′ )x(0). In
      the transformed problem the parameter vector x(0) appears only on the right-hand
      side of the constraints.
          Problem (11.33) is a multiparametric quadratic program that can be solved by
      using the algorithm described in Section 6.3.1. Once the multiparametric prob-
      lem (11.33) has been solved, the solution U0∗ = U0∗ (x(0)) of CFTOC (11.28) and
      therefore u∗ (0) = u∗ (x(0)) is available explicitly as a function of the initial state
      x(0) for all x(0) ∈ X0 .
          Theorem 6.7 states that the solution z ∗ (x(0)) of the mp-QP problem (11.33) is
      a continuous and piecewise affine function on polyhedra of x(0). Clearly the same
      properties are inherited by the controller. The following corollaries of Theorem 6.7
      establish the analytical properties of the optimal control law and of the value
      function.
          Remark 11.5 Note that, as discussed in Remark 6.8, the critical regions defined
          in (6.4) are in general sets that are neither closed nor open. In Corollary 11.1 the
          polyhedron CR0i describes the closure of a critical region. The function f0 (x) is
          continuous and therefore it is simpler to use a polyhedral partition rather than a
          strict polyhedral partition.
      Corollary 11.2 The value function J0∗ (x(0)) obtained as solution of the CFTOC (11.28)
      is convex and piecewise quadratic on polyhedra. Moreover, if the mp-QP prob-
      lem (11.33) is not degenerate, then the value function J0∗ (x(0)) is C (1) .
11.3      2-Norm Case Solution                                                               221
                                                                                
     Proof: By Theorem 6.7 Jˆ∗ (x(0)) is a convex function of x(0). As H      F ′  0,
                                                                            F Y
its Schur complement1 Y − F H −1 F ′  0, and therefore J0∗ (x(0)) = Jˆ∗ (x(0)) +
x(0)′ (Y − F H −1 F ′ )x(0) is a convex function, because it is the sum of convex
functions. If the mp-QP problem (11.33) is not degenerate, then Theorem 6.9
implies that Jˆ∗ (x(0)) is a C (1) function of x(0) and therefore J0∗ (x(0)) is a C (1)
function of x(0). The results of Corollary 11.1 imply that J0∗ (x(0)) is piecewise
quadratic.                                                                           
    Remark 11.6 The relation between the design parameters of the optimal control
    problem (11.28) and the degeneracy of the mp-QP problem (11.33) is complex, in
    general.
    The solution of the multiparametric problem (11.33) provides the state feed-
back solution u∗ (k) = fk (x(k)) of CFTOC (11.28) for k = 0 and it also provides
the open-loop optimal control u∗ (k) as function of the initial state, i.e., u∗ (k) =
u∗ (k, x(0)). The state feedback PPWA optimal controllers u∗ (k) = fk (x(k)) with
fk : Xk 7→ U for k = 1, . . . , N are computed in the following way. Consider the
same CFTOC (11.28) over the shortened time-horizon [i, N ]
                                              N
                                              X −1
                    minUi        x′N P xN +          x′k Qxk + u′k Ruk
                                              k=i
                    subj. to     xk+1 = Axk + Buk , k = i, . . . , N − 1          (11.35)
                                 xk ∈ X , uk ∈ U, k = i, . . . , N − 1
                                 xN ∈ Xf
                                 xi = x(i),
                    B′
                        
  1 Let        A
          X =                and A ≻ 0. Then X  0 if and only if the Schur complement S =
               B    C
C − BA−1 B ′  0.
222                                                                 11    Constrained Optimal Control
         Assume Q ≻ 0, R ≻ 0 and that the constraint sets X and U contain the origin
         in their interior2 Consider the following infinite-horizon linear quadratic regulation
         problem with constraints (CLQR)
                                                   ∞
                                                   X
                  ∗
                 J∞ (x(0)) =      minu0 ,u1 ,...          x′k Qxk + u′k Ruk
                                                   k=0
                                  subj. to         xk+1 = Axk + Buk , k = 0, . . . , ∞              (11.43)
                                                   xk ∈ X , uk ∈ U, k = 0, . . . , ∞
                                                   x0 = x(0)
             2 As in the unconstrained case, the assumption Q ≻ 0 can be relaxed by requiring that (Q1/2 , A)
where u(k) = F∞ x(k) is the unconstrained LQR control law (8.33) obtained from
the solution of the ARE (8.32).
    Therefore, from the previous discussion, there is some finite time N̄ (x0 ), de-
                                                             LQR
pending on the initial state x0 , at which the state enters O∞   and after which the
                                                 ∗         ∗
system evolves in an unconstrained manner (xk ∈ X , uk ∈ U, ∀k > N̄ ). This con-
sideration allows us to split problem (11.43) into two parts by using the dynamic
programming principle, one up to time k = N̄ where the constraints may be active
and one for longer times k > N̄ where there are no constraints.
                                       N̄
                                       X  −1
         ∗
        J∞ (x(0)) =   minu0 ,u1 ,...            x′k Qxk + u′k Ruk + JN̄
                                                                     ∗
                                                                        →∞ (xN̄ )
                                       k=0
                      subj. to         xk ∈ X , uk ∈ U, k = 0, . . . , N̄ − 1       (11.45)
                                       xk+1 = Axk + Buk , k ≥ 0
                                       x0 = x(0),
where
                                                  ∞
                                                  X
          ∗
         JN̄→∞ (xN̄ ) =   minuN̄ ,uN̄ +1 ,...            x′k Qxk + u′k Ruk
                                                  k=N̄
                          subj. to                xk+1 = Axk + Buk , k ≥ N̄         (11.46)
= x′N̄ P∞ xN̄ .
This key insight due to Sznaier and Damborg [272] is formulated precisely in the
following.
224                                                         11   Constrained Optimal Control
         Theorem 11.3 (Equality of Finite and Infinite Optimal Control, [260]) For
         any given initial state x(0), the solution to (11.45, 11.46) is equal to the infinite
         time solution of (11.43), if the terminal state xN̄ of (11.45) lies in the positive
                          LQR
         invariant set O∞      and no terminal set constraint is applied in (11.45), i.e., the
                                             LQR
         state ‘voluntarily’ enters the set O∞    after N̄ steps.
         Theorem 11.3 suggests that we can obtain the infinite horizon constrained linear
         quadratic regulator CLQR by solving the finite horizon problem for a horizon of N̄
         with a terminal weight of P = P∞ and no terminal constraint. The critical question
         of how to determine N̄ (x0 ) or at least an upper bound was studied by several
         researchers. Chmielewski and Manousiouthakis [85] presented an approach that
         provides a conservative estimate Nest of the finite horizon N̄ (x0 ) for all x0 belonging
         to a compact set of initial conditions S ⊆ X∞ = K∞ (0) (Nest ≥ N̄S (x0 ), ∀x0 ∈ S).
         They solve a single, finite dimensional, convex program to obtain Nest . Their
         estimate can be used to compute the PWA solution of (11.45) for a particular set
         S.
             Alternatively, the quadratic program with horizon Nest can be solved to deter-
         mine u∗0 , u∗1 , . . . , u∗Nest for a particular x(0) ∈ S. For a given initial state x(0),
         rather then a set S, Scokaert and Rawlings [260] presented an algorithm that at-
         tempts to identify N̄ (x(0)) iteratively. In summary we can state the following
         Theorem.
         In this section we will sketch an efficient algorithm to compute the PWA solution
         to the CLQR problem in (11.43) for a given set S of initial conditions. Details
         are available in [132, 133]. As a side product, the algorithm also computes N̄S ,
         the shortest horizon N̄ for which the problem (11.45), (11.46) is equivalent to the
         infinite horizon problem (11.43).
             The idea is as follows. For the CFTOC problem (11.28) with a horizon N with
         no terminal constraint (Xf = Rn ) and terminal cost P = P∞ , where P∞ is the
11.3     2-Norm Case Solution                                                                                     225
solution to the ARE (8.32), we solve an mp-QP and obtain the PWA control law.
From Theorem 11.3 we can conclude that for all states which enter the invariant set
  LQR
O∞      introduced in Definition 11.1 with the computed control law in N steps, the
infinite-horizon problem has been solved. For these states, which we can identify
via a reachability analysis, the computed feedback law is infinite-horizon optimal.
    In more detail, we start the procedure by computing the Maximal LQR Invari-
            LQR                                                        LQR
ant Set O∞      introduced in Definition 11.1, the polyhedron P0 = O∞       = {x ∈
  n                                          LQR
R : H0 x ≤ K0 }. Figure 11.2(a) depicts O∞ . Then, the algorithm finds a point
         3                                                             3
         2                                                             2
                         Step ε over facet                                                          P1
        1                                                             1
   x2
                                                                 x2
         0                LQR
                         O∞                                            0                        LQR
                                                                                               O∞
        -1                                                            -1
        -2                                                            -2
        -3-3        -1          1                  3                  -3-3                -1          1       3
               -2         0               2                                      -2            0          2
                          x1                                                                   x1
       (a) Compute positive invariant                             (b) Solve QP for new point with
                LQR                                               horizon N = 1 to create the first
       region O∞     and step over facet
       with step-size ǫ.                                          constrained region P1 .
                                    3
                                    2                   Reachability subset IT P 11
                                    1
                               x2
                                    0                        LQR
                                                            O∞
                                    -1
                                    -2
                                    -3
                                     -3       -2       -1   0      1         2        3
                                                            x1
                                (c) Compute reachability subset
                                of P1 to obtain IT P 11 .
                                 LQR
x̄ by stepping over a facet of O∞      with a small step ǫ, as described in [19]. If
(11.28) is feasible for horizon N = 1 (terminal set constraint Xf = Rn , terminal
cost P = P∞ and x(0) = x̄), the active constraints will define the neighboring
polyhedron P1 = {x ∈ Rn : H1 x ≤ K1 } (x̄ ∈ P1 , see Figure 11.2(b)) [44]. By
Theorem 11.3, the finite time optimal solution computed above equals the infinite
                                LQR
time optimal solution if x1 ∈ O∞    . Therefore we extract from P1 the set of points
                  LQR
that will enter O∞ in N = 1 time-steps, provided that the optimal control law as-
226                                                           11     Constrained Optimal Control
         sociated with P1 (i.e., U1∗ = F1 x(0) + g1 ) is applied. The Infinite Time Polyhedron
         (IT P 11 ) is therefore defined by the intersection of the following two polyhedra:
                                           LQR
                                     x1 ∈ O∞   , x1 = Ax0 + BU1∗ ,                         (11.48a)
                                     x0 ∈ P1 .                                             (11.48b)
         Equation (11.48a) is the reachability constraint and (11.48b) defines the set of
         states for which the computed feedback law is feasible and optimal over N = 1
         steps (see [44] for details). The intersection is the set of points for which the
         control law is infinite time optimal.
             A general step r of the algorithm involves stepping over a facet to a new point x̄
                                                                                 ∗
         and determining the polyhedron Pr and the associated control law (UN      = Fr x(0)+
         gr ) from (11.28) with horizon N. Then we extract from Pr the set of points that
                     LQR
         will enter O∞     in N time-steps, provided that the optimal control law associated
         with Pr is applied. The Infinite Time Polyhedron (IT P N  r ) is therefore defined by
         the intersection of the following two polyhedra:
                                                      LQR
                                                xN ∈ O∞                                    (11.49a)
                                                x0 ∈ Pr .                                  (11.49b)
         This intersection is the set of points for which the control law is infinite time
         optimal. Note that, as for x1 in the one-step case, xN in (11.49a) can be described
                                                                              ∗
         as a linear function of x0 by substituting the feedback sequence UN    = Fr x0 + gr
         into the LTI system dynamics (11.1).
             We continue exploring the facets increasing N when necessary. The algorithm
         terminates when we have covered S or when we can no longer find a new feasible
         polyhedron Pr . The following theorem shows that the algorithm also provides the
         horizon N̄S for compact sets. Exact knowledge of N̄S can serve to improve the
         performance of a wide array of algorithms presented in the literature.
         Theorem 11.5 (Exact Computation of N̄S , [132, 133]) If we explore any given
         compact set S with the proposed algorithm, the largest resulting horizon is equal to
         N̄S , i.e.,
                                     N̄S =       max       N.
                                                IT P N
                                                     r   r=0,...,R
11.3.6 Examples
             Example 11.2 Consider the double integrator (11.23). We want to compute the
             state feedback optimal controller that solves problem (11.28) with N = 6, Q = [ 10 01 ],
11.3    2-Norm Case Solution                                                                                                      227
   This task is addressed as shown in Section (11.3.2). The feedback optimal solution
   u∗ (0), . . . , u∗ (5) is computed by solving six mp-QP problems and the corresponding
   polyhedral partitions of the state space are depicted in Fig. 11.3. Only the last two
   optimal control moves are reported below:
                                                    −0.35   −0.94
                                                                                          0.61
                                                                                                    
                  
                   [ −0.58   −1.55 ] x(5)   if          0.35 0.94
                                                                            x(5) ≤          0.61
                                                                                                            (Region #1)
                  
                                                        1.00 0.00                          10.00
                  
                                                       −1.00 0.00                          10.00
                  
                  
                  
                                                   "
                  
                                                        0.35    0.94 #                 " −0.61 #
                  
                                                        0.00   −1.00                       10.00
                   1.00                     if         −0.71   −0.71 x(5)         ≤         7.07           (Region #2)
       u∗ (5) =                                          1.00
                                                        −1.00
                                                                 0.00
                                                                 0.00
                                                                                            10.00
                                                                                            10.00
                  
                  
                  
                                                   " −0.35 −0.94 #                     " −0.61 #
                  
                  
                  
                                                        1.00    0.00                       10.00
                  
                   − 1.00                   if         0.00     1.00       x(5) ≤                          (Region #3)
                  
                  
                                                                                            10.00
                  
                  
                                                        −1.00    0.00                       10.00
                                                       0.71     0.71                        7.07
                                                             −0.35   −0.94
                                                                                                0.61 
           
            [ −0.58      −1.55 ] x(4)                  if        0.35 0.94
                                                                                       x(4) ≤       0.61
                                                                                                                    (Region #1)
           
                                                                −0.77 −0.64                        2.43
           
                                                                 0.77 0.64                         2.43
           
           
           
                                                            
           
                                                               0.29     0.96                       −0.98 
           
                                                               0.00    −1.00                           10.00
           
                                                             −0.71    −0.71 
           
             1.00                                      if     −0.45    −0.89   x(4)          ≤        7.07
                                                                                                        4.92
                                                                                                                   (Region #2)
           
                                                               1.00     0.00                           10.00
           
                                                              −1.00     0.00                           10.00
           
           
           
           
           
                                                              0.29     0.96                       −0.37 
           
                                                               0.35     0.94
           
           
                                                                                                        −0.61
           
                                                             −0.71
                                                                0.00    −1.00                   10.00 
           
             1.00                                      if    −0.45    −0.71  x(4)          ≤  7.07             (Region #3)
           
                                                                       −0.89                           4.92
           
                                                               1.00     0.00                           10.00
           
                                                              −1.00     0.00                           10.00
           
           
           
                                                             −0.29 −0.96                          −0.98 
           
                                                               1.00        0.00                        10.00
    ∗
   u (4) =   − 1.00                                     if    −1.00
                                                               0.00         1.00    x(4) ≤  10.00                (Region #4)
           
           
                                                                            0.00                        10.00
           
                                                              0.71         0.71                        7.07
           
                                                              0.45         0.89                        4.92
           
           
           
                                                             −0.29 −0.96                          −0.37 
           
           
           
           
                                                              −0.35     −0.94                           −0.61
           
                                                             1.00      0.00                   10.00 
           
            − 1.00                                     if    0.00     1.00  x(4)           ≤  10.00            (Region #5)
           
                                                             −1.00      0.00                           10.00
           
                                                              0.71     0.71                            7.07
           
                                                              0.45     0.89                            4.92
           
           
           
                                                             −0.29                                          
           
                                                                      −0.96                         0.98
           
            [ −0.44      −1.43 ] x(4)   −   0.46       if        0.29 0.96
                                                                                       x(4) ≤        0.37
                                                                                                                    (Region #6)
           
                                                                −0.77 −0.64                        −2.43
           
                                                                 1.00 0.00                         10.00
           
           
           
                                                             −0.29                                          
           
                                                                      −0.96                         0.37
           
            [ −0.44      −1.43 ] x(4)   +   0.46       if        0.29 0.96
                                                                                       x(4) ≤        0.98
                                                                                                                    (Region #7)
           
                                                                 0.77 0.64                         −2.43
           
                                                                −1.00 0.00                         10.00
228                                                        11       Constrained Optimal Control
10 10
               5                                               5
      x2 (0)
                                                      x2 (1)
               0                                               0
-5 -5
         -10                                             -10
           -10         -5      0      5      10            -10         -5      0     5    10
                            x1 (0)                                          x1 (1)
          (a) Partition of the state space                (b) Partition of the state space
          for the affine control law u∗ (0)               for the affine control law u∗ (1)
          (N0r = 13).                                     (N1r = 13).
10 10
               5                                               5
      x2 (2)
0 x2 (3) 0
-5 -5
         -10
           -10                 0             10          -10
                                                           -10                 0          10
                       -5             5                                -5            5
                            x1 (2)                                          x1 (3)
          (c) Partition of the state space                (d) Partition of the state space
          for the affine control law u∗ (2)               for the affine control law u∗ (3)
          (N2r = 13).                                     (N3r = 11).
10 10
               5                                               5
      x2 (4)
x2 (5)
0 0
-5 -5
         -10
           -10                 0             10          -10
                                                           -10                 0          10
                       -5             5                                -5            5
                            x1 (4)                                          x1 (5)
          (e) Partition of the state space                (f) Partition of the state space
          for the affine control law u∗ (4)               for the affine control law u∗ (5)
          (N4r = 7).                                      (N5r = 3).
           Note that by increasing the horizon N , the control law changes only far away from the
           origin, the larger N the more in the periphery. This must be expected from the results
           of Section 11.3.5. The control law does not change anymore with increasing N in the
           set where the CFTOC law becomes equal to the constrained infinite-horizon linear
           quadratic regulator (CLQR) problem. This set gets larger as N increases [85, 260].
           Example 11.3 The infinite time CLQR (11.43) was determined for Example 11.2
           by using the approach presented in Section 11.3.4. The resulting N̄S is 12. The
           state space is divided into 117 polyhedral regions and is depicted in Fig. 11.4(a). In
           Fig. 11.4(b) the same control law is represented where polyhedra with the same affine
           control law were merged.
10 10
               5                                            5
          x2
x2
0 0
-5 -5
           -10         -5              5                -10        -5              5
             -10               0              10          -10              0                10
                              x1                                          x1
              (a) Partition   before   merging           (b) Partition     after   merging
                r                                          r
              (N∞ = 117).                                (N∞ = 13).
                                                                                 N
                                                                                 X −1
               J0∗ (x(0)) = minU0               J0 (x(0), U0 ) = kP xN kp +             kQxk kp + kRuk kp
                                                                                  k=0
                                subj. to        xk+1 = Axk + Buk , k = 0, . . . , N − 1
                                                xk ∈ X , uk ∈ U, k = 0, . . . , N − 1
                                                xN ∈ Xf
                                                x0 = x(0).
                                                                                                         (11.52)
                                         min           c′0 z0
                                           z0                                                            (11.54)
                                         subj. to      Ḡ0 z0 ≤ w̄0 + S̄0 x(0),
         where [Gxε , Guε , Gcε ] is the block partition of the matrix Gε into the three parts
         corresponding to the variables εxi , εui and ui , respectively. The vector c0 and the
         submatrices Gǫ , wǫ , Sǫ associated with the constraints (11.53b)-(11.53d) are defined
         in (9.10). The matrices G0 , w0 and E0 are defined in (11.18) for i = 0.
             For a given vector x(0) the optimal input sequence U0∗ solving problem (11.54)
         can be computed by using a Linear Program (LP) solver (see Section 2.2 for LP
         definition and properties and Chapter 3 for fast numerical methods for solving
         LPs).
             To obtain the problem (11.54) we have eliminated the state variables and equal-
         ity constraints xk+1 = Axk + Buk by successive substitution so that we are left
         with u0 , . . . , uN −1 and the slack variables ǫ as the only decision variables, and x(0)
         as a parameter vector. As in the 2-norm case, it might be more efficient to solve
         an LP problem with equality and inequality constraints so that sparsity can be
         exploited. We omit the details and refer the reader to the construction of the QP
         problem without substitution in section 11.3.1.
         As shown in the previous section, problem (11.52) can be rewritten in the compact
         form
                                  min        c′0 z0
                                   z0                                               (11.56)
                                  subj. to Ḡ0 z0 ≤ w̄0 + S̄0 x(0),
         where z0 = {εx0 , . . . , εxN , εu0 , . . . , εuN −1 , u′0 , . . . , u′N −1 } ∈ Rs , s = (m + 1)N + N + 1.
         As in the 2-norm case, by treating x(0) as a vector of parameters, problem (11.56)
         becomes a multiparametric linear program (mp-LP) that can be solved as described
         in Section 6.2. Once the multiparametric problem (11.56) has been solved, the
         explicit solution z0∗ (x(0)) of (11.56) is available as a piecewise affine function of
         x(0), and the optimal control law u∗ (0) is also available explicitly, as the optimal
         input u∗ (0) consists simply of m components of z0∗ (x(0))
             Theorem 6.5 states that there always exists a continuous PPWA solution z0∗ (x)
         of the mp-LP problem (11.56). Clearly the same properties are inherited by the
         controller. The following Corollaries of Theorem 6.5 summarize the analytical
         properties of the optimal control law and of the value function.
         where the polyhedral sets CR0j = {H0j x ≤ k0j }, j = 1, . . . , N0r , are a partition of the
         feasible set X0 .
232                                                                    11     Constrained Optimal Control
      Corollary 11.5 The value function J ∗ (x) obtained as a solution of the CFTOC (11.52)
      is convex and PPWA.
           Remark 11.7 Note that if the optimizer of problem (11.52) is unique for all x(0) ∈ X0 ,
           then Corollary 11.4 reads: “The control law u∗ (0) = f0 (x(0)), f0 : Rn → Rm ,
           obtained as a solution of the CFTOC (11.52) with p = 1 or p = ∞, is continuous
           and PPWA,. . .”. From the results of Section 6.2 we know that in case of multiple
           optimizers for some x(0) ∈ X0 , a continuous control law of the form (11.58) can
           always be computed.
                                          min            c′i zi
                                            zi                                                                 (11.60)
                                          subj. to       Ḡi zi ≤ w̄i + S̄i x(i),
      where zi = {εxi , . . . , εxN , εui , . . . , εuN −1 , u′i , . . . , u′N −1 } and ci , Ḡi , S̄i , w̄i , are appro-
      priately defined for each i. The component u∗i of the multiparametric solution
      of (11.60) has the form
         Corollary 11.6 There exists a state feedback control law u∗ (k) = fk (x(k)), fk :
         Xk ⊆ Rn → U ⊆ Rm , solution of the CFTOC (11.52) for p = 1 or p = ∞
         and k = 0, . . . , N − 1 which is time-varying, continuous and piecewise affine on
         polyhedra
                            fk (x) = Fkj x + gkj if x ∈ CRkj , j = 1, . . . , Nkr , (11.63)
         Consider the dynamic programming formulation of (11.52) with J0 (·) defined by (11.7)
         with p = 1 or p = ∞
         Unlike for the 2-norm case the dynamic program (11.64)-(11.66) can be solved as
         explained in the next theorem.
         Theorem 11.6 The state feedback piecewise affine solution (11.63) of the CFTOC (11.52)
         for p = 1 or p = ∞ is obtained by solving the optimization problem (11.64)-(11.66)
         via N mp-LPs.
           ∗
          JN −1 (xN −1 ) =     minµ,uN −1   µ
                               subj. to     µ ≥ kQxN −1 kp + kRuN −1kp + kP (AxN −1 + BuN −1 )kp
                                            xN −1 ∈ X , uN −1 ∈ U
                                            AxN −1 + BuN −1 ∈ Xf .
                                                                                        (11.68)
         The constraint µ ≥ kQxN −1 kp + kRuN −1 kp + kP (AxN −1 + BuN −1 )kp in (11.68) is
         converted into a set of linear constraints as discussed in Remark 2.1 of Section 2.2.5.
234                                                      11   Constrained Optimal Control
      For instance, if p = ∞ we follow the approach of Section 9.3 and rewrite the
      constraint as
                                    µ ≥ εxN −1 + εuN −1 + εxN
                                x
                           −1n εN −1 ≤ ±QxN −1
                                                                           (11.69)
                           −1m εuN −1 ≤ ±RuN −1
                                   x
                            −1rN εN ≤ ±PN [AxN −1 + BuN −1 ]
                           ∗
      By Theorem 6.5, JN     −1 is a convex and piecewise affine function of xN −1 , the
      corresponding optimizer u∗N −1 is piecewise affine and continuous, and the feasible
                                                                                     ∗
      set XN −1 is a polyhedron. Without any loss of generality we assume JN           −1 to be
                              ∗                                 ′
      described as follows: JN −1 (xN −1 ) = maxi=1,...,nN −1 {ci xN −1 +di } (see Section 2.2.5
      for convex PPWA functions representation) where nN −1 is the number of affine
                                                      ∗
      components comprising the value function JN       −1 . At step j = N − 2 of dynamic
      programming (11.64)-(11.66) we have
        ∗                                                          ∗
       JN −2 (xN −2 ) =    minuN −2  kQxN −2 kp + kRuN −2 kp + JN    −1 (AxN −2 + BuN −2 )
                           subj. to  xN −2 ∈ X , uN −2 ∈ U
                                     AxN −2 + BuN −2 ∈ XN −1 .
                                                                                   (11.70)
             ∗
      Since JN −1 (x) is a convex and piecewise affine function of x, the  problem (11.70)
      can be recast as the following mp-LP (see Section 2.2.5 for details)
        ∗
       JN −2 (xN −2 ) =    minµ,uN −2        µ
                           subj. to          µ ≥ kQxN −2 kp + kRuN −2 kp + ci (AxN −2 + BuN −2 ) + di
                                             i = 1, . . . , nN −1
                                             xN −2 ∈ X , uN −2 ∈ U
                                             AxN −2 + BuN −2 ∈ XN −1 .
                                                                                         (11.71)
        ∗                ∗
      JN  −2 (xN −2 ), u N −2 (x N −2 ) and X N −2 are    computed by solving the mp-LP (11.71).
                               ∗
      By Theorem 6.5, JN         −2 is a convex and piecewise affine function of xN −2 , the
      corresponding optimizer u∗N −2 is piecewise affine and continuous, and the feasible
      set XN −2 is a convex polyhedron.
          The convexity and piecewise linearity of Jj∗ and the polyhedra representation
      of Xj still hold for j = N − 3, . . . , 0 and the procedure can be iterated backwards
      in time, proving the theorem.                                                           
          Consider the state feedback piecewise affine solution (11.63) of the CFTOC (11.52)
      for p = 1 or p = ∞ and assume we are interested only in the optimal controller at
      time 0. In this case, by using duality arguments we can solve the equations (11.64)-
      (11.66) by using vertex enumerations and one mp-LP. This is proven in the next
      theorem.
      Theorem 11.7 The state feedback piecewise affine solution (11.63) at time k = 0
      of the CFTOC (11.52) for p = 1 or p = ∞ is obtained by solving the optimization
      problem (11.64)-(11.66) via one mp-LP.
11.4    1-Norm and ∞-Norm Case Solution                                                             235
                      min          c′N −1 zN −1
                      zN −1                                                             (11.74)
                      subj. to     ḠN −1 zN −1 ≤ w̄N −1 + S̄N −1 xN −1 ,
i.e.,
                  ∗                        ′                  ′
                 JN −1 (xN −1 ) = max {−(Vi S̄N −1 )xN −1 − w̄N −1 Vi }.
                                    i=1,...,k
Recall that if the dual of a mp-LP is unbounded, then the primal is infeasible
(Theorem 6.3). For this reason the feasible set XN −1 is obtained by requiring that
the cost of (11.75) does not increase in the direction of the rays:
11.4.4 Example
           Example 11.4 Consider the double integrator system (11.23). We want to compute
           the
            state feedback      controller that solves (11.52) with p = ∞, N = 6, P =
                           optimal
             1 0            1 0
                   ,Q=            , R = 0.8, subject to the input constraints
             0 1            0 1
U = {u ∈ R : − 1 ≤ u ≤ 1} (11.76)
           and Xf = X . The optimal feedback solution u∗ (0), . . . , u∗ (5) was computed by solving
           six mp-LP problems and the corresponding polyhedral partitions of the state space
           are depicted in Fig. 11.5, where polyhedra with the same control law were merged.
           Only the last optimal control move is reported below:
                                                          0.45   0.89
                                                                                          0.00
                                                                                                    
                       
                          0                      if        1.00   0.00
                                                                               x(5) ≤       0.00
                                                                                                        (Region #1)
                       
                                                          −0.71   −0.71                    7.07
                       
                                                          −1.00   −0.00                    10.00
                       
                       
                       
                                                       −0.45                                    
                       
                                                               −0.89                       0.00
                       
                                                          −1.00 0.00                       0.00
                       
                          0                      if       0.71 0.71           x(5) ≤       7.07        (Region #2)
                       
                                                          1.00 −0.00                       10.00
                       
                       
                       
                                                       −0.45                                    
                       
                                                                −0.89                      0.00
                       
                                                           0.45 0.89                       0.45
                       
                          [ −1.00 −2.00 ] x(5)   if        0.71 0.71          x(5) ≤       0.00        (Region #3)
                       
                                                          −1.00 −0.00
                       
                       
                                                                                            10.00
                       
                       
                       
                                                       −0.45   −0.89
                                                                                                  
                       
                       
                                                                                            0.45
                       
                          [ −1.00 −2.00 ] x(5)   if        0.45 0.89
                                                                               x(5) ≤       0.00
                                                                                                        (Region #4)
                       
                       
                                                           −0.71 −0.71                      0.00
                       
                                                           1.00 −0.00                      10.00
                                                                                          (11.78)
           Note that the controller (11.78) is piecewise linear around the origin. In fact, the
           origin belongs to multiple regions (1 to 6). Note that the number Nir of regions is not
           always increasing with decreasing i (N5r = 8, N4r = 12, N3r = 12, N2r = 26, N1r = 28,
           N0r = 26). This is due to the merging procedure, before merging we have N5r = 12,
           N4r = 22, N3r = 40, N2r = 72, N1r = 108, N0r = 152.
         11.4   1-Norm and ∞-Norm Case Solution                                                        237
         Assume that Q and R have full column rank and that the constraint sets X and U
         contain the origin in their interior. Consider the following infinite-horizon problem
         with constraints
                                              ∞
                                              X
                 ∗
                J∞ (x(0)) = minu0 ,u1 ,...          kQxk kp + kRuk kp
                                              k=0
                                subj. to      xk+1 = Axk + Buk , k = 0, . . . , ∞           (11.79)
                                              xk ∈ X , uk ∈ U, k = 0, . . . , ∞
                                              x0 = x(0)
         Because Q and R have full column rank, any optimizer u∗k of problem (11.43) must
         converge to the origin (u∗k → 0) and so must the state trajectory resulting from the
         application of u∗k (x∗k → 0). Thus the origin x = 0, u = 0 must lie in the interior
         of the constraint set (X , U). (If the origin were not contained in the constraint
                     ∗
         set then J∞   (x(0)) would be infinite.) Furthermore, if the initial state x0 = x(0)
         is sufficiently close to the origin, then the state and input constraints will never
         become active and the solution of problem (11.43) will yield the unconstrained
         optimal controller (9.31).
             The discussion for the solution of the infinite horizon constrained linear quadratic
         regulator (Section 11.3.4) by means of the batch approach can be repeated here
         with one precaution. Since the unconstrained optimal controller (if it exists) is
         PPWA the computation of the Maximal Invariant Set for the autonomous con-
         strained piecewise linear system is more involved and requires algorithms which
         will be presented later in Chapter 17.
             Differently from the 2-norm case, here the use of dynamic programming for
         computing the infinite horizon solution is a viable alternative to the batch approach.
         Convergence conditions for the dynamic programming strategy and convergence
         guarantees for the resulting possibly discontinuous closed-loop system are given
         in [87]. A computationally efficient algorithm to obtain the infinite time optimal
         solution, based on a dynamic programming exploration strategy with a multi-
         parametric linear programming solver and basic polyhedral manipulations, is also
         presented in [87].
             Example 11.5 We consider the double integrator system (11.23) from Example 11.4
             with N = ∞.
             The partition of the state space for the time invariant optimal control law is shown in
             Fig. 11.6(a) and consists of 202 polyhedral regions. In Fig. 11.6(b) the same control
             law is represented where polyhedra with the same affine control law were merged.
238                                                            11   Constrained Optimal Control
       where c(x0 , u0 ) is any convex quadratic function. Let us assume that the solution of
                                                                    1
       the multiparametric program generates R1 regions {Pr1 }R   r=1 with the affine control
                   1        1
       law u0 = Fr x + gr in each region r. By construction we have
X0 = K1 (Xf ).
X0 = Kj (Xf ).
       Note that the region identification for this type of controller partition is much
       more efficient than simply checking all the regions. The two steps of “finding a
       controller partition” and “finding a controller region” in Algorithm 11.1 correspond
       to two levels of a search tree, where the search is first performed over the feasible
                                                                       c
       sets Kc (Xf ) and then over the controller partition {Prc }R   r=1 . Furthermore, one
                                  i
       may discard all regions
                           i
                              S Pr which are completely covered by previously computed
       controllers (i.e., Pr ⊆ j∈{1,...,i−1} Kj (Xf )) since they are not time optimal.
           Example 11.6 Consider again the double integrator from Example 11.2. The Minimum-
           Time Controller is computed that steers the system to the Maximal LQR Invariant
                 LQR
           Set O∞      in the minimum number of time steps N . The Algorithm terminated af-
                                                                              LQR
           ter 11 iterations, covering the Maximal Controllable Set K∞ (O∞        ). The resulting
           controller is defined over 33 regions. The regions are depicted in Fig. 11.7(a). The
                                           LQR
           Maximal LQR Invariant Set O∞         is the central shaded region.
           The control law on this partition is depicted in Fig. 11.7(b). Note that, in general,
           the minimum-time control law is not continuous as can be seen in Fig. 11.7(b).
          As we let the horizon N go to infinity, the number of regions stays finite for the
      2-norm objective, for the 1- and ∞-norm nothing can be said in general. In the
      examples we have usually observed a finite number, but cases can be constructed,
      where the number can be proven to be infinite.
          As we will argue in the following chapter, infinite horizon controllers based on
      the 2-norm render the closed-loop system exponentially stable, while controllers
      based on the 1- or ∞-norm render the closed-loop system stable, only.
          Among the controllers proposed in this chapter, the minimum-time controller
      is usually the least complex involving the smallest number of regions. Minimum
      time controllers are often considered to be too aggressive for practical use. The
      controller here is different, however. It is minimum time only until it reaches the
      terminal set Xf . Inside the terminal set a different unconstrained control law can
      be used. Overall the operation of the minimum-time controller is observed to be
      very similar to that of the other infinite time controllers in this chapter.
11.6        Comparison of the Design Approaches and Controllers                            241
10 10
           5                                               5
  x2 (0)
                                                  x2 (1)
           0                                               0
-5 -5
     -10                                             -10
       -10         -5      0       5      10           -10      -5      0      5      10
                        x1 (0)                                       x1 (1)
       (a) Partition of the state space for           (b) Partition of the state space
       the affine control law u∗ (0)(N0r =            for the affine control law u∗ (1)
       26).                                           (N1r = 28).
10 10
           5                                               5
  x2 (2)
x2 (3)
0 0
-5 -5
     -10
       -10                 0              10         -10
                                                       -10              0             10
                   -5              5                            -5             5
                        x1 (2)                                       x1 (3)
       (c) Partition of the state space               (d) Partition of the state space
       for the affine control law u∗ (2)              for the affine control law u∗ (3)
       (N2r = 26).                                    (N3r = 12)
10 10
           5                                               5
  x2 (4)
x2 (5)
0 0
-5 -5
     -10
       -10                 0              10         -10
                                                       -10              0             10
                   -5              5                            -5             5
                        x1 (4)                                       x1 (5)
       (e) Partition of the state space               (f) Partition of the state space
       for the affine control law u∗ (4)              for the affine control law u∗ (5)
       (N4r = 12).                                    (N5r = 8).
10 10
           5                                            5
      x2
                                                   x2
           0                                            0
-5 -5
       -10         -5              5                -10          -5                5
         -10               0              10          -10                0                  10
                          x1                                            x1
       (a) Partition      before   merging           (b) Partition       after   merging
         r                                             r
       (N∞ = 202).                                   (N∞ = 26).
10
           5
                                                        1
      x2
           0
                                                        0
                                                   u
           -5                                                                               -5
                                                       -1                              0
                                                        10   5
       -10                                                        0     -5 -10 5
         -10       -5      0       5      10                                           x2
                          x1                                          x1
       (a) Minimum-Time State Space                  (b) Minimum-Time Control Law
       Partition (N r =33).                          (discontinuous).
       In this chapter we review the basics of Receding Horizon Control (RHC). In the first
       part we discuss the stability and the feasibility of RHC and we provide guidelines
       for choosing the terminal weight so that closed-loop stability is achieved.
           The second part of the chapter focuses on the RHC implementation. Since
       RHC requires at each sampling time to solve an open-loop constrained finite time
       optimal control problem as a function of the current state, the results of the previous
       chapters imply two possible approaches for RHC implementation.
           In the first approach a mathematical program is solved at each time step for
       the current initial state. In the second approach the explicit piecewise affine feed-
       back policy (that provides the optimal control for all states) is precomputed off-line.
       This reduces the on-line computation of the RHC law to a function evaluation, thus
       avoiding the on-line solution of a quadratic or linear program. This technique is
       attractive for a wide range of practical problems where the computational complex-
       ity of on-line optimization is prohibitive. It also provides insight into the structure
       underlying optimization-based controllers, describing the behaviour of the RHC
       controller in different regions of the state space. Moreover, for applications where
       safety is crucial, the correctness of a piecewise affine control law is easier to verify
       than that of a mathematical program solver.
past future
t t+1 t+N
predicted outputs
t + 1t + 2 t+1+N
       where x(t) ∈ Rn , u(t) ∈ Rm are the state and input vectors, respectively, subject
       to the constraints
      If the squared Euclidian norm is used in (12.6), then we set p(xN ) = x′N P xN and
      q(xk , uk ) = x′k Qxk + u′k Ruk with P  0, Q  0 and R ≻ 0. The cost function is
      rewritten as
                                                      N
                                                      X −1
                          J0 (x(0), U0 ) = x′N P xN +      x′k Qxk + u′k Ruk .     (12.8)
                                                      k=0
   Example 12.1 Consider the double integrator system (11.23) rewritten below:
                                                    
                                    1 1              0
                       x(t + 1) =           x(t) +       u(t)                (12.11)
                                    0 1              1
   The aim is to compute the receding horizon controller that solves the optimization
                                 ′                       ′        ′
   problem
         (12.6) with p(xN ) = xN P xN , q(xk , uk ) = xk Qxk + uk Ruk N = 3, P = Q =
     1 0
          , R = 10, Xf = R2 subject to the input constraints
     0 1
   The QP problem associated with the RHC has the form (11.31) with
          h 13.50 −10.00 −0.50 i                         
      H = −10.00 22.00 −10.00 , F = −10.50    10.00 −0.50
                                       −20.50 10.00 9.50    , Y = [ 14.50 23.50
                                                                    23.50 54.50 ]            (12.14)
                −0.50 −10.00 31.50
   and
                     0.50   −1.00    0.50               0.50    0.50           0.50 
                     −0.50    1.00   −0.50                −0.50   −0.50             0.50
                    −0.50
                     −0.50    0.00    0.50              −0.50
                                                           0.50    0.50 
                                                                                   5.00 
                             0.00   −0.50                      −0.50 
                                                                                   5.00 
                    0.50     0.00   −0.50              −0.50   −0.50 
                                                                                   5.00 
                    0.50     0.00    0.50              0.50     0.50           5.00 
                    −1.00    0.00    0.00              0.00     0.00           5.00 
                                                                                    5.00
                    0.00    −1.00    0.00              0.00     0.00           5.00 
                    1.00    0.00     0.00              0.00     0.00           5.00 
                    0.00    1.00     0.00              0.00     0.00                
                    0.00            −1.00  ,           0.00     0.00 
            G0 =    0.00    0.00
                                      1.00 
                                                 E0 =    0.00    0.00  ,   w0 =  0.50 
                                                                                   0.50    (12.15)
                    0.00    0.00                       1.00    1.00            5.00 
                    −0.50   0.00     0.00              −0.50   −0.50           5.00 
                    0.00    0.00     0.50              −1.00   −1.00           5.00 
                    0.50    0.00     0.00              0.50                    5.00 
                            0.00    −0.50              −0.50    0.50 
                                                                                   0.50 
                    −0.50   0.00     0.50              0.50    −1.50 
                                                                                   0.50 
                    0.50    0.00    −0.50                       1.50 
                                                                                   5.00 
                    0.00    0.00     0.00              0.00
                                                           1.00    0.00 
                                                                   1.00             5.00
                     0.00    0.00    0.00                                           5.00
                     0.00    0.00    0.00                 −1.00    0.00
                     0.00    0.00    0.00                  0.00   −1.00             5.00
   The RHC (12.6)-(12.9) algorithm becomes Algorithm 12.2. We refer to the solution
   U0∗ of the QP (11.31) as [U0∗ , Flag] = QP(H, 2F ′ x(0), G0 , w0 + E0 x(0)) where “Flag”
   indicates if the QP was found to be feasible or not.
   Fig. 12.2 shows two closed-loop trajectories starting at state x(0) = [−4.5, 2] and
   x(0) = [−4.5, 3]. The trajectory starting from x(0) = [−4.5, 2] converges to the
   origin and satisfies input and state constraints. The trajectory starting from x(0) =
248                                                       12    Receding Horizon Control
                            x2
                                 1
                                 0
                                 -5 -4 -3 -2 -1 0 1 2 3 4 5
                                               x1
        Figure 12.2 Example 12.1. Closed-loop trajectories realized (solid) and pre-
        dicted (dashed) for two initial states x(0)=[-4.5,2] (boxes) and x(0)=[-4.5,3]
        (circles).
      [−4.5, 3] stops at x(2) = [1, 2] because of infeasibility. At each time step, the open-
      loop predictions are depicted with dashed lines. This shows that the closed-loop
      trajectories are different from the open-loop predicted trajectories because of the
      receding horizon nature of the controller.
      In Fig. 12.3(a) the feasible state space was gridded and each point of the grid was
      marked with a square if the RHC law (12.6)-(12.9) generates feasible closed-loop tra-
      jectories and with a circle if it does not. The set of all initial conditions generating
      feasible closed-loop trajectories is the maximal positive invariant set O∞ of the au-
      tonomous system (12.10). We remark that this set is different from the set X0 of
      feasible initial conditions for the QP problem (11.31) with matrices (12.15). Both
      sets O∞ and X0 are depicted in figure 12.3(b). The computation of f0 is discussed
      later in this chapter. Because of the nonlinear nature of f0 , the computation of O∞
      for the system (12.10) is not an easy task. Therefore we will show how to choose a
      terminal invariant set Xf such that O∞ = X0 is guaranteed automatically.
      Note that a feasible closed-loop trajectory does not necessarily converge to the origin.
      Feasibility, convergence and stability of RHC are discussed in detail in the next
      sections. Before that we want to illustrate these issues through another example.
− 1 ≤ u(k) ≤ 1, k = 0, . . . , N − 1 (12.17)
      In the following, we study the receding horizon control problem (12.6) with p(xN ) =
      x′N P xN , q(xk , uk ) = x′k Qxk + u′k Ruk for different horizons N and weights R. We
replacemen
                   5                                             5
                   4                                             4
                   3                                             3
                   2                                             2
                   1                                             1
                                                           x2
             x2
                   0                                             0
                  -1                                            -1
                  -2                                            -2
                  -3                                            -3
                  -4                                            -4
                  -5                                            -5
                   -5 -4 -3 -2 -1 0 1 2 3 4 5                    -5 -4 -3 -2 -1 0 1 2 3 4 5
                                 x1                                            x1
              (a) Boxes (Circles) are initial                  (b) Maximal positive invariant set
              points leading (not leading) to                  O∞ (gray) and set of initial fea-
              feasible closed-loop trajectories.               sible states X0 (white and gray).
             set Q = I and omit both the terminal set constraint and the terminal weight, i.e.,
             Xf = R2 , P = 0.
             Fig. 12.4 shows closed-loop trajectories for receding horizon control loops that were
             obtained with the following parameter settings
                   • Setting 1: N = 2, R = 10
                   • Setting 2: N = 3, R = 2
                   • Setting 3: N = 4, R = 1
             For Setting 1 (Fig. 12.4(a)) there is evidently no initial state that can be steered to
             the origin. Indeed, it turns out, that all non-zero initial states x(0) ∈ R2 diverge
             from the origin and eventually become infeasible. In contrast, Setting 2 leads to a
             receding horizon controller, that manages to get some of the initial states converge
             to the origin, as seen in Fig. 12.4(b). Finally, Fig. 12.4(c) shows that Setting 3 can
             expand the set of those initial states that can be brought to the origin.
             These results illustrate that the choice of parameters for receding horizon control
             influences the behavior of the resulting closed-loop trajectories in a complex manner.
             A better understanding of the effect of parameter changes can be gained from an
             inspection of maximal positive invariant sets O∞ for the different settings, and the
             maximal control invariant set C∞ as depicted in Fig. 12.5.
             The maximal positive invariant set stemming from Setting 1 only contains the origin
             (O∞ = {0}) which explains why all non-zero initial states diverge from the origin.
250                                                                 12   Receding Horizon Control
10 10
                5                                               5
          x2
                                                          x2
                0                                              0
-5 -5
           -10                                              -10
              -8        -4      0      4        8              -8        -4        0   4        8
                               x1                                                 x1
               (a) Setting 1 : N = 2, R = 10.                   (b) Setting 2 : N = 3, R = 2.
10
                                           5
                                     x2
-5
                                       -10
                                          -8        -4     0         4        8
                                                          x1
                                           (c) Setting 3 : N = 4, R = 1.
           For Setting 2 the maximal positive invariant set has grown considerably, but does
           not contain the initial state x(0) = [−4, 7], thus leading to infeasibility eventually.
           Setting 3 leads to a maximal positive invariant set that contains this state and thus
           keeps the closed-loop trajectory inside this set for all future time steps.
           From Fig. 12.5 we also see that a trajectory starting at x(0) = [−4, 8.5] cannot be
           kept inside any bounded set by any setting (indeed, by any controller) since it is
           outside the maximal control invariant set C∞ .
                                        10
                                                    x(0) = [−4, 8.5]
                                                    x(0) = [−4, 7]
                                         5
                                   x2
                                         0
-5
                                    -10
                                               -4        0       4
                                                        x1
                Figure 12.5 Example 12.2. Maximal positive invariant sets O∞ for different
                parameter settings: Setting 1 (origin), Setting 2 (dark-gray) and Setting 3
                (gray and dark-gray). Also depicted is the maximal control invariant set C∞
                (white and gray and dark-gray).
         the open-loop predicted and the actual closed-loop trajectories observed in Exam-
         ple 12.1 disappear. As a consequence, if the optimization problem is feasible, then
         the closed-loop trajectories will be feasible for all times. If the optimization prob-
         lem has a finite solution, then in closed-loop the states and inputs will converge to
         the origin asymptotically.
             In RHC, when we solve the optimization problem over a finite horizon repeat-
         edly at each time step, we hope that the controller resulting from this “short-
         sighted” strategy will lead to a closed-loop behavior that mimics that of the infi-
         nite horizon controller. The examples in the last section indicated that at least two
         problems may occur. First of all, the controller may lead us into a situation where
         after a few steps the finite horizon optimal control problem that we need to solve
         at each time step is infeasible, i.e., that there does not exist a sequence of control
         inputs for which the constraints are obeyed. Second, even if the feasibility prob-
         lem does not occur, the generated control inputs may not lead to trajectories that
         converge to the origin, i.e., that the closed-loop system is asymptotically stable.
             In general, stability and feasibility are not ensured by the RHC law (12.6)-
         (12.9). In principle, we could analyze the RHC law for feasibility, stability and
         convergence but this is difficult as the examples in the last section illustrated.
         Therefore, conditions will be derived on how the terminal weight P and the terminal
         constraint set Xf should be chosen such that closed-loop stability and feasibility
         are ensured.
         The examples in the last section illustrate that feasibility at the initial time x(0) ∈
         X0 does not necessarily imply feasibility for all future times. It is desirable to
         design a RHC such that feasibility for all future times is guaranteed, a property we
         refer to as persistent feasibility.
             We would like to gain some insight when persistent feasibility occurs and how it
         is affected by the formulation of the control problem and the choice of the controller
252                                                           12   Receding Horizon Control
      parameters. Let us first recall the various sets introduced in Section 10.2 and
      Section 11.2 and how they are influenced.
      C∞ :     The maximal control invariant set C∞ is only affected by the sets X and U,
              the constraints on states and inputs. It is the largest set over which we can
              expect any controller to work.
       X0 :     A control input U0 can only be found, i.e., the control problem is feasible,
              if x(0) ∈ X0 . The set X0 depends on X and U, on the controller horizon N
              and on the controller terminal set Xf . It does not depend on the objective
              function and it has generally no relation with C∞ (it can be larger, smaller,
              etc.).
      O∞ :      The maximal positive invariant set for the closed-loop system depends on
              the controller and as such on all parameters affecting the controller, i.e., X , U,
              N , Xf and the objective function with its parameters P , Q and R. Clearly
              O∞ ⊆ X0 because if it were not there would be points in O∞ for which
              the control problem is not feasible. Because of invariance, the closed-loop is
              persistently feasible for all states x(0) ∈ O∞ . Clearly, O∞ ⊆ C∞ .
      We can now state necessary and sufficient conditions guaranteeing persistent fea-
      sibility by means of invariant set theory.
      Lemma 12.1 Let O∞ be the maximal positive invariant set for the closed-loop
      system x(k + 1) = fcl (x(k)) in (12.10) with constraints (12.2). The RHC problem
      is persistently feasible if and only if X0 = O∞ .
            Proof: For the RHC problem to be persistently feasible X0 must be positive
      invariant for the closed-loop system. We argued above that O∞ ⊆ X0 . As the
      positive invariant set X0 cannot be larger than the maximal positive invariant set
      O∞ , it follows that X0 = O∞ .                                                   
          As X0 does not depend on the controller parameters P , Q and R but O∞ does,
      the requirement X0 = O∞ for persistent feasibility shows that, in general, only
      some P , Q and R are allowed. The parameters P , Q and R affect the performance.
      The complex effect they have on persistent feasibility makes their choice extremely
      difficult for the design engineer. In the following we will remedy this undesirable
      situation. We will make use of the following important sufficient condition for
      persistent feasibility.
Note that in the proof of Lemma 12.2, persistent feasibility does not depend on the
input u as long as it is feasible. For this reason, sometimes in the literature this
property is referred to “persistently feasible for all feasible u”.
   We can use Lemma 12.2 in the following manner. For N = 1, X1 = Xf . If we
choose the terminal set to be control invariant then X0 = O∞ and RHC will be
persistently feasible independent of chosen control objectives and parameters. Thus
the designer can choose the parameters to affect performance without affecting
persistent feasibility. A control horizon of N = 1 is often too restrictive, but we
can easily extend Lemma 12.2.
Corollary 12.1 Consider the RHC law (12.6)-(12.9) with N ≥ 1. If there exists
i ∈ [1, N ] such that Xi is a control invariant set for system (12.1)-(12.2), then the
RHC is persistently feasible for all cost functions.
         In this section we will derive the main stability result for RHC. Our objective is
         to find a Lyapunov function for the closed-loop system. We will show next that if
         the terminal cost and constraint are appropriately chosen, then the value function
         J0∗ (·) is a Lyapunov function.
         Theorem 12.2 Consider system (12.1)-(12.2), the RHC law (12.6)-(12.9) and
         the closed-loop system (12.10). Assume that
         (A0)      The stage cost q(x, u) and terminal cost p(x) are continuous and positive
                definite functions.
(A1) The sets X , Xf and U contain the origin in their interior and are closed.
         Then, the origin of the closed-loop system (12.10) is asymptotically stable with
         domain of attraction X0 .
               Proof: From hypothesis (A2), Theorem 12.1 and Lemma 12.1, we conclude
         that X0 = O∞ is a positive invariant set for the closed-loop system (12.10) for
         any choice of the cost function. Thus persistent feasibility for any feasible input is
         guaranteed in X0 .
             Next we prove convergence and stability. We establish that the function J0∗ (·)
         in (12.6) is a Lyapunov function for the closed-loop system. Because the cost J0 ,
         the system and the constraints are time-invariant we can study the properties of
         J0∗ between step k = 0 and step k + 1 = 1.
             Consider problem (12.6) at time t = 0. Let x(0) ∈ X0 and let U0∗ = {u∗0 , . . . , u∗N −1 }
         be the optimizer of problem (12.6) and x0 = {x(0), x1 , . . . , xN } be the corre-
         sponding optimal state trajectory. After the implementation of u∗0 we obtain
         x(1) = x1 = Ax(0) + Bu∗0 . Consider now problem (12.6) for t = 1. We will con-
         struct an upper bound on J0∗ (x(1)). Consider the sequence Ũ1 = {u∗1 , . . . , u∗N −1 , v}
         and the corresponding state trajectory resulting from the initial state x(1), x̃1 =
         {x1 , . . . , xN , AxN + Bv}. Because xN ∈ Xf and (A2) there exists a feasible v such
         that xN +1 = AxN + Bv ∈ Xf and with this v the sequence Ũ1 = {u∗1 , . . . , u∗N −1 , v}
         is feasible. Because Ũ1 is not optimal J0 (x(1), Ũ1 ) is an upper bound on J0∗ (x(1)).
             Since the trajectories generated by U0∗ and Ũ1 overlap, except for the first and
         last sampling intervals, it is immediate to show that
Let x = x0 = x(0) and u = u∗0 . Under assumption (A3) equation (12.19) becomes
Equation (12.20) and the hypothesis (A0) on the stage cost q(·) ensure that J0∗ (x)
strictly decreases along the state trajectories of the closed-loop system (12.10)
for any x ∈ X0 , x 6= 0. In addition to the fact that J0∗ (x) decreases, J0∗ (x) is
lower-bounded by zero and since the state trajectories generated by the closed-loop
system (12.10) starting from any x(0) ∈ X0 lie in X0 for all k ≥ 0, equation (12.20)
is sufficient to ensure that the state of the closed-loop system converges to zero as
k → 0 if the initial state lies in X0 . We have proven (i).
    In order to prove stability via Theorem 7.2 we have to establish that J0∗ (x)
is a Lyapunov function. Positivity holds by the hypothesis (A0), decrease follows
from (12.20). For continuity at the origin we will show that J0∗ (x) ≤ p(x), ∀x ∈ Xf
and as p(x) is continuous at the origin (by hypothesis (A0)) J0∗ (x) must be con-
tinuous as well. From assumption (A2), Xf is control invariant and thus for any
x ∈ Xf there exists a feasible input sequence {u0 , . . . , uN −1 } for problem (12.6)
starting from the initial state x0 = x whose corresponding state trajectory is
{x0 , x1 , . . . , xN } stays in Xf , i.e., xi ∈ Xf ∀ i = 0, . . . , N . Among all the afore-
mentioned input sequences {u0 , . . . , uN −1 } we focus on the one where ui satisfies
assumption (A3) for all i = 0, . . . , N − 1. Such a sequence provides an upper bound
on the function J0∗ :
                           N −1
                                           !
                           X
               ∗
            J0 (x0 ) ≤          q(xi , ui ) + p(xN ), xi ∈ Xf , i = 0, . . . , N,     (12.21)
                       i=0
    Remark 12.1 The assumption on the positive definiteness of the stage cost q(·) in
    Theorem 12.2 can be relaxed as in standard optimal control. For instance for the
                                                                  1
    2-norm based cost function (12.8) one can allow Q  0 with (Q 2 , A) observable.
    Remark 12.2 The procedure outlined in Theorem 12.2 is, in general, conservative
    because it requires the introduction of an artificial terminal set Xf to guarantee
    persistent feasibility and a terminal cost to guarantee stability. Requiring xN ∈ Xf
    usually decreases the size of the region of attraction X0 = O∞ . Also the performance
    may be negatively affected.
    Remark 12.3 A function p(x) satisfying assumption (A3) of Theorem 12.2 is often
    called control Lyapunov function.
256                                                             12    Receding Horizon Control
      Consider system (12.1)-(12.2), the RHC law (12.6)-(12.9), the cost function (12.8)
      and the closed-loop system (12.10). A simple choice for Xf is the maximal positive
      invariant set (see Section 10.1) for the closed-loop system x(k+1) = (A+BF∞ )x(k)
      where F∞ is the associated unconstrained infinite time optimal controller (8.33).
      With this choice the assumption (A3) in Theorem 12.2 becomes
− P + (Q + F ′ RF ) + (A + BF )′ P (A + BF ) ≤ 0. (12.25)
          For any of the discussed choices for F and Xf stability implies exponential
       stability. The argument is simple. As the system is closed-loop stable it enters
       the terminal region in finite time. If Xf is chosen as suggested, the closed-loop
       system is unconstrained after entering Xf . For an unconstrained linear system the
       convergence to the origin is exponential.
       Consider system (12.1)-(12.2), the RHC law (12.6)-(12.9), the cost function (12.7)
       and the closed-loop system (12.10). Let p = 1 or p = ∞. If system (12.1) is
       asymptotically stable, then Xf can be chosen as the positively invariant set of the
       autonomous system x(k + 1) = Ax(k) subject to the state constraints x ∈ X .
       Therefore in Xf the input 0 is feasible and the assumption (A3) in Theorem 12.2
       becomes
                          − kP xkp + kP Axkp + kQxkp ≤ 0, ∀x ∈ Xf ,               (12.27)
       which is the corresponding Lyapunov inequality for the 1, ∞-norm case (7.55)
       whose solution has been discussed in Section 7.5.3.
           In general, if the unconstrained optimal controller (9.31) exists it is PPWA. In
       this case the computation of the maximal invariant set Xf for the closed-loop PWA
       system
                      x(k + 1) = (A + F i )x(k) if H i x ≤ 0, i = 1, . . . , N r     (12.28)
       is more involved. However if such Xf can be computed it can be used as terminal
       constraint in Theorem 12.2. With this choice the assumption (A3) in Theorem 12.2
       is satisfied by the infinite time unconstrained optimal cost matrix P∞ in (9.32).
           Example 12.3 Consider the double integrator system (12.11) subject to the input
           constraints
                                         − 1 ≤ u(k) ≤ 1                            (12.30)
258                                                                        12     Receding Horizon Control
      We want to regulate the system to the origin by using the RHC problem (12.6)–(12.9)
      with cost (12.8), Q = [ 10 01 ], R = 0.01, and P = P∞ where P∞ solves the algebraic
      Riccati equation (8.32). We consider three cases:
      Case 1. N = 2, Xf = 0,
      Case 2. N = 2, Xf is the positively invariant set of the closed-loop system x(k + 1) =
      (A + BF∞ ) where F∞ is the infinite time unconstrained optimal controller (8.33).
      Case 3. No terminal state constraints: Xf = R2 and N = 6 = determinedness in-
      dex+1.
      From the results presented in this chapter, all three cases guarantee persistent fea-
      sibility for all cost functions and asymptotic stability of the origin with region of
      attraction X0 (with X0 different for each case). Next we will detail the matrices of
      the quadratic program for the on-line solution as well as the explicit solution for the
      three cases.
      Case 1: Xf = 0. The mp-QP problem associated with the RHC has the form (11.31)
      with
                                                        h                  i
                             19.08  8.55
                                                           −10.57 −5.29                10.31 9.33
                                                                                                        
                      H=        8.55 5.31       , F =       −10.59 −5.29       , Y =     9.33 10.37         (12.32)
and
                             0.00    −1.00 
                                                               0.00    0.00 
                                                                0.00    0.00
                                                                                                1.00   
                              0.00     1.00                                                      1.00
                              0.00     0.00                   1.00    1.00 
                             −1.00    0.00                   −1.00   −1.00            10.00
                                                                                          10.00 
                                                                                                 
                            
                             0.00     0.00                   −1.00   −1.00 
                             1.00     0.00 
                                                               1.00     1.00            10.00 
                             −1.00    0.00 
                                                               0.00     0.00            10.00 
                             −1.00                            −1.00   −1.00 
                                                                                         10.00 
                                      −1.00                                             10.00 
                             1.00     0.00 
                                                              0.00     0.00            10.00 
                            
                             1.00     1.00                   1.00     1.00            10.00 
                             0.00     0.00                   1.00     1.00            5.00 
                             −1.00    0.00 
                                                               −1.00   −1.00            5.00 
                             0.00                             −1.00   −1.00            5.00 
                                       0.00                   1.00     1.00             5.00 
                             1.00                                                             
                     G0 =              0.00  ,     E0 =                            w0 =                   (12.33)
                                                               −1.00   −2.00  ,
                                                              
                             −1.00    0.00                                              1.00 
                             1.00     0.00 
                                                              1.00     2.00            1.00 
                            
                             0.00     0.00                   1.00     0.00            10.00 
                             0.00     0.00                   0.00     1.00            10.00 
                             0.00     0.00 
                                                               −1.00    0.00            10.00 
                             0.00     0.00 
                                                               0.00    −1.00 
                                                                                         10.00 
                             0.00                                                       5.00 
                                       0.00                   1.00     0.00            5.00 
                             0.00     0.00                   0.00     1.00            5.00 
                             0.00     0.00                   −1.00    0.00                  
                             0.00     0.00 
                                                              0.00    −1.00            5.00 
                             1.00     0.00                   0.00     0.00 
                                                                                         0.00 
                             1.00     1.00                    1.00                             0.00
                                                                         1.00                    0.00
                              −1.00    0.00                      0.00    0.00
                              −1.00   −1.00                                                      0.00
                                                                −1.00   −1.00
      The corresponding polyhedral partition of the state space is depicted in Fig. 12.6(a).
12.4    State Feedback Solution of RHC, 2-Norm Case                                                       259
x2
                                                         x2
                       x1                                                                  x1
       (a) Polyhedral partition of X0 ,                       (b) Polyhedral partition of X0 ,
       Case 1. N = 2, Xf = 0, N0r = 7.                                             LQR
                                                              Case 2. N = 2, Xf = O∞   ,
                                                               r
                                                              N0 = 9.
                              x2
                                                         x1
                                (c) Polyhedral partition of X0 ,
                                Case 3. N = 6, Xf = R2 , N0r =
                                13.
        Figure 12.6 Example 12.3. Double integrator. RHC with 2-norm. Region
        of attraction X0 for different horizons N and terminal regions Xf .
           The union of the regions depicted in Fig. 12.6(a) is X0 . From Theorem 12.2, X0 is
           also the domain of attraction of the RHC law.
           Case 2: Xf positively invariant set. The set Xf is
                                             −0.35617 −0.93442      0.58043 
                          Xf = {x ∈ R2 :      0.35617 0.93442
                                              0.71286 0.70131     x ≤ 0.58043
                                                                        1.9049 }.             (12.34)
                                                −0.71286 −0.70131         1.9049
           The corresponding polyhedral partition of the state space is depicted in Fig. 12.6(b).
           The union of the regions depicted in Fig. 12.6(b) is X0 . Note that from Theorem 12.2
           the set X0 is also the domain of attraction of the RHC law.
           Case 3: Xf = Rn , N = 6. The corresponding polyhedral partition of the state space
           is depicted in Fig. 12.6(c).
           Comparing the feasibility regions X0 in Figure 12.6 we notice that in Case 2 we obtain
           a larger region than in Case 1 and that in Case 3 we obtain a feasibility region larger
           than Case 1 and Case 2. This can be easily explained from the theory presented in
           this and the previous chapter. In particular we have seen that if a control invariant
           set is chosen as terminal constraint Xf , the size of the feasibility region increases
           with the number of control moves (increase from Case 2 to Case 3) (Remark 11.3).
           Actually in Case 3, X0 = K∞ (Xf ) with Xf = R2 , the maximal controllable set. Also,
           the size of the feasibility region increases with the size of the target set (increase from
           Case 1 to Case 2).
           Example 12.4 Consider the double integrator system (12.11) subject to the input
           constraints
                                          − 1 ≤ u(k) ≤ 1                           (12.36)
           and the state constraints
                                                − 5 ≤ x(k) ≤ 5.                               (12.37)
           We want to regulate the system to the origin by using the RHC controller (12.6)–
           (12.9) with cost (12.7), p = ∞, Q = [ 10 01 ], R = 20. We consider two cases:
           Case 1. Xf = Rn , N = 6 (determinedness index+1) and P = Q
           Case 2. Xf = Rn , N = 6 and P = P∞ given in (9.34) measuring the infinite time
           unconstrained optimal cost in (9.32).
           From Corollary 12.2 in both cases persistent feasibility is guaranteed for all cost func-
           tions and X0 = C∞ . However, in Case 1 the terminal cost P does not satisfy (12.27)
           which is assumption (A3) in Theorem 12.2 and therefore the convergence to and the
12.5     State Feedback Solution of RHC, 1, ∞-Norm Case                                   261
   Next we will detail the explicit solutions for the two cases.
   Case 1. The LP problem associated with the RHC has the form (11.56) with Ḡ0 ∈
   R124×18 , S̄0 ∈ R124×2 and c′ = [06 112 ]. The corresponding polyhedral partition of
   the state space is depicted in Fig. 12.7(a). The RHC law is:
  x2
x2
                        x1                                       x1
       (a) Polyhedral partition of X0 ,         (b) Polyhedral partition of X0 ,
       Case 1.                                  Case 2.
                                              x2
  x2
                        x1                                       x1
       (c) Closed-loop Trajectories, Case       (d)  Closed-loop      Trajectories,
       1. Convergence to origin to guar-        Case 2.
       anteed.
        Figure 12.7 Example 12.4. Double integrator. RHC with ∞-norm cost
        function, behaviour for different terminal weights.
262                                                                       12       Receding Horizon Control
                                                        0.16    0.99
                                                                                   0.82 
                  
                   0                            if       −0.16   −0.99
                                                                              x≤       0.82
                                                                                                    (Region #1)
                  
                                                         −1.00    0.00                5.00
                  
                                                         1.00    0.00                 5.00
                  
                  
                  
                                                                                            
                  
                                                         1.00    0.00                  5.00
                  
                                                         −0.16   −0.99                −0.82
                  
                   [ −0.29 −1.71 ] x +   1.43   if       −1.00    0.00       x≤        5.00        (Region #2)
                  
                                                         0.16    0.99                  1.40
                  
                  
                  
                                                      −0.16
                  
                                                                 −0.99            −1.40 
                  
                                                        1.00     0.00                   5.00
                  
                                                      −1.00
                                                         0.71     0.71                 4.24   
                  
                                                                0.00                 5.00   
                  
                   − 1.00                       if    0.20      0.98  x     ≤        2.94      (Region #3)
                  
                                                      0.16      0.99                        
                  
                                                       0.24      0.97
                                                                                         3.04
                                                                                         2.91
                                                        0.45      0.89                   3.35
             u=                                         0.32      0.95                   3.00
                  
                  
                  
                                                      −1.00                                 
                  
                                                                0.00                   5.00
                  
                   [ −0.29 −1.71 ] x −          if        0.16 0.99
                                                                              x≤       −0.82
                                                                                                    (Region #4)
                  
                                         1.43            1.00 0.00                     5.00
                  
                                                         −0.16 −0.99                   1.40
                  
                  
                  
                                                      −0.32
                  
                                                                 −0.95             3.00
                                                                                                
                  
                                                       −0.24     −0.97               2.91
                  
                                                      −0.20     −0.98            2.94       
                  
                                                      −0.16     −0.99            3.04       
                  
                                                if    −1.00     0.00  x     ≤    5.00          (Region #5)
                  
                  
                     1.00
                                                       0.16      0.99             −1.40      
                  
                  
                  
                                                       −0.71     −0.71               4.24
                  
                                                       −0.45     −0.89               3.35
                  
                                                        1.00     0.00                5.00
           The union of the regions depicted in Fig. 12.7(a) is X0 and is shown in white in
           Fig. 12.7(c). Since N is equal to the determinedness index plus one, X0 is a positive
           invariant set for the closed-loop system and thus persistent feasibility is guaranteed
           for all x(0) ∈ X0 . However, it can be noticed from Fig. 12.7(c) that convergence to
           the origin is not guaranteed. Starting from the initial conditions [-4,2], [-2, 2], [0,
           0.5], [4,-2], [-1,-1] and [2,-0.5], the closed-loop system converges to either [−5, 0] or
           [5, 0].
           Case 2. The LP problem associated with the RHC has the form (11.56) with Ḡ0 ∈
           R174×18 , S̄0 ∈ R174×2 and c′ = [06 112 ]. The RHC law is defined over 21 regions and
           the corresponding polyhedral partition of the state space is depicted in Fig. 12.7(b).
           The union of the regions depicted in Fig. 12.7(b) is X0 and is shown in white in
           Fig. 12.7(d). Since N is equal to the determinedness index plus one, X0 is a positive
           invariant set for the closed-loop system and thus persistent feasibility is guaranteed
           for all x(0) ∈ X0 . Convergence to the origin is also guaranteed by the choice of P as
           shown by the closed-loop trajectories in Fig. 12.7(d) starting from the same initial
           conditions as in Case 1.
tool to analyze the stability of large constrained multivariable systems makes this
stability guarantee by design so important. The application of RHC in practice,
however, requires the designer to make many choices. In this section we will offer
some guidance.
Objective Function
First, we need to choose the horizon length N and the control invariant target
set Xf . Then we can vary the parameters Q and R freely to affect the control
performance in the same spirit as we do for designing an LQR. Stability is assured
as long as we adjust P according to the outlined procedures when changing Q and
264                                                      12   Receding Horizon Control
      R.
           The longer the horizon N , the larger the maximal controllable set KN (Xf ) over
      which the closed-loop system is guaranteed to be able to operate (this is true as
      long as the horizon is smaller than the determinedness index of K∞ (Xf )). On the
      other hand, with the control horizon increases the on-line computational effort or
      the complexity of the explicit controller determined off-line.
           We need to keep in mind that the terminal set Xf is introduced artificially
      for the sole purpose of leading to a sufficient condition for persistent feasibility.
      We want it to be large so that it does not compromise closed-loop performance.
      The larger Xf , the larger KN (Xf ). Though it is simplest to choose Xf = 0, it is
      undesirable unless N is chosen large. Ideally Xf should be the maximal control
      invariant set achieved with the unconstrained controller.
           Specifically, we first design the unconstrained optimal controller as suggested
      at the end of Section 12.3.2. From this construction we also obtain the terminal
      cost satisfying condition (A3) of Theorem 12.2 to use in the RHC design. Then
      we determine the maximal positive invariant set for the closed-loop system with
      the unconstrained controller and use this set as Xf . This set is usually difficult
      to compute for systems of large dimension with the algorithms we introduced in
      Section (10.2).
           Note that for stable systems without state constraints K∞ (Xf ) = Rn always,
      i.e., the choice of Xf is less critical. For unstable systems K∞ (Xf ) is the region
      over which the system can operate stably in the presence of input constraints and
      is of eminent practical importance.
State/Output Constraints
      State constraints arise from practical restrictions on the allowed operating range
      of the system. Thus, contrary to input constraints, they are rarely “hard”. They
      can lead to complications in the controller implementation, however. As it can
      never be excluded that the state of the real system moves outside the constraint
      range chosen for the controller design, special provisions must be made (patches in
      the algorithm) to move the state back into the range. This is difficult and these
      types of patches are exactly what one wanted to avoid by choosing MPC in the
      first place.
          Thus, typically, state constraints are “softened” in the MPC formulation. For
      example,
                                            x ≤ xmax
      is approximated by
                                     x ≤ xmax + ǫ, ǫ ≥ 0,
      and a term l(ǫ) is added to the objective function to penalize violations of the
      constraint. This formulation may, however, lead to a violation of the constraint
      even when a feasible input exists that avoids it but is not optimal for the new
      objective function with the penalty term added. Let us analyze how to choose l(·)
      such that this does not occur by using the exact penalty method [173].
12.6    Tuning and Practical Use                                                        265
As an example take
                            J∗ =    minz          f (z)
                                                                             (12.38)
                                    subj. to      g(z) ≤ 0,
where g(z) is assumed to be scalar for simplicity and f (z) to be strictly convex.
Let us soften the constraints and add the penalty as suggested
                                            p(0) =      J∗
                                        and
                             arg minǫ≥0 p(ǫ) =          0
                              p(0) = J ∗                                     (12.40)
                              and
                              p(ǫ) > p(0), ∀ǫ > 0.                           (12.41)
For (12.40) we require l(0) = 0. To construct l(ǫ) to satisfy (12.41) we assume that
strong duality holds and u∗ exists so that
is preferable. On the other hand, note that l(ǫ) = vǫ2 does not satisfy an inequality
of the form (12.44). Therefore it should not be used as it can lead to optimizers
z ∗ in (12.39) which violate g(z) ≤ 0 even if a feasible optimizer to the original
problem exists.
266                                                             12          Receding Horizon Control
where
         Formulations also exist where the necessary constraint violations are following
      a prescribed order so that less important constraints are violated first [174].
      The standard RHC formulation (12.6) can be easily extended to include these
      features. Known disturbances are simply included in the prediction model. If the
      system states are not to return to the origin, but some output y is to follow some
      trajectory r, then appropriate penalties of the error e = y − r are included in the
      control objective. How to do this and to achieve offset-free tracking is described in
      Section 12.7. Theorem 12.2 can be used to design the controller in these cases.
          If the constraints are time-varying then X and U become time-varying. For
      example, the constraints may be shaped like a funnel tightening towards the end
      of the horizon.
          If the underlying system is nonlinear, one often uses a locally linearized model
      for the prediction and update it at each time step. Note that the results of The-
      orem 12.2 do not apply when the system model and/or the constraints are time-
      varying.
         In all these cases, the optimization problem to be solved on line, (11.31) or (11.56),
      does not change in structure but some of the defining matrices will now change at
      each time step, which will increase the necessary on-line computational effort some-
      what.
          If the controller is to be computed explicitly off-line, then all the varying pa-
      rameters (disturbances, constraints, references), which we will denote by θ, be-
      come parameters in the multi-parametric optimization problem and the resulting
      controller becomes an explicit function of them: u(t) = F (x(t), θ). As we have
      learned, the complexity of the solution of mp-QP and mp-LP problems depends
      primarily on the number of constraints. If the number of parameters affects the
      number of constraints then this may only be possible for a relatively small number
      of parameters. Thus, the possibilities to take into account time-varying control
      problem features in explicit MPC are rather limited. Time-varying models cannot
      be handled at all.
       12.7   Offset-Free Reference Tracking                                                    267
       where K is some feedback gain, Ny , Nu , Nc are the prediction, input, and state
       constraint horizons, respectively, with Nu ≤ Ny and Nc ≤ Ny . This formulation
       reduces the number of constraints and as a consequence makes the long horizon
       prediction used in the optimization less accurate as it is not forced to obey all the
       constraints. As this approximation affects only the states far in the future, it is
       hoped that it will not influence significantly the present control action.
           Generalized Predictive Control (GPC) in its most common formulation [89] has
       multiple horizons as an inherent feature but does not include constraints. Experi-
       ence and theoretical analysis [56] have shown that it is very difficult to choose all
       these horizons that affect not only performance but even stability in a non-intuitive
       fashion. Thus, for problems where constraints are not important and the adaptive
       features of GPC are not needed, it is much preferable to resort to the well estab-
       lished LQR and LQG controllers for which a wealth of stability, performance and
       robustness results have been established.
           Another more effective way to reduce the computational effort is move-blocking
       where the manipulated variables are assumed to be fixed over time intervals in
       the future thus reducing the degrees of freedom in the optimization problem. By
       choosing the blocking strategies carefully, the available RHC stability results remain
       applicable [72].
      Theorem 12.3 [215, 216, 226, 13] The augmented system (12.50) is observable
      if and only if (C, A) is observable and
                                                   
                                           A − I Bd
                                                                          (12.51)
                                             C   Cd
      has full column rank.
            Proof: From the Hautus observability condition system (12.50) is observable
      iff               ′                     
                         A − λI     0     C′
                                                  has full row rank ∀λ.         (12.52)
                           Bd′   I − λI Cd′
      Again from the Hautus condition, the first set of rows is linearly independent iff
      (C, A) is observable. The second set of rows is linearly independent from the first
12.7     Offset-Free Reference Tracking                                                                              269
n rows except possibly for λ = 1. Thus, for the augmented system the Hautus
condition needs to be checked for λ = 1 only, where it becomes (12.51).  
     Remark 12.4 Note that for condition (12.51) to be satisfied the number of distur-
     bances in d needs to be smaller or equal to the number of available measurements in y,
     nd 6 p. Condition (12.51) can be nicely interpreted. It requires that the model of the
     disturbance effect on the output d → y must not have a zero at (1, 0). Alternatively
     we can look at the steady state of system (12.50)
                                                            
                                A − I Bd          x∞         0
                                                        =          ,               (12.53)
                                  C      Cd       d∞        y∞
     where we have denoted the steady state values with a subscript ∞ and have omit-
     ted the forcing term u for simplicity. We note that from the observability condi-
     tion (12.51) for system (12.50) equation (12.53) is required to have a unique solution,
     which means, that we must be able to deduce a unique value for the disturbance d∞
     from a measurement of y∞ in steady state.
     Remark 12.5 We note here how the observability requirement restricts the choice of
     the disturbance model. If the plant has no integrators, then det (A − I) 6= 0 and we
     can choose Bd = 0. If the plant has integrators then Bd has to be chosen specifically
     to make det (A − I − Bd C) 6= 0.
    The state and disturbance estimator is designed based on the augmented model
as follows:
                                                
   x̂(t + 1)       A Bd       x̂(t)      B            Lx                       ˆ
    ˆ + 1) = 0 I
   d(t                         ˆ
                              d(t)
                                     +
                                         0
                                              u(t)+
                                                      Ld
                                                           (−ym (t)+C x̂(t)+Cd d(t)),
                                                                           (12.55)
where Lx and Ld are chosen so that the estimator is stable. We remark that the
results below are independent of the choice of the method for computing Lx and
Ld . We then have the following property.
      Lemma 12.4 Suppose the observer (12.55) is stable. Choose nd = p. The steady
      state of the observer (12.55) satisfies:
                                                             
                            A−I B           x̂∞        −Bd dˆ∞
                                                 =                  ,      (12.58)
                              C     0       u∞      ym,∞ − Cd dˆ∞
      where ym,∞ and u∞ are the steady state measured output and input of the sys-
      tem (12.49), x̂∞ and dˆ∞ are state and disturbance estimates from the observer (12.55)
      at steady state, respectively.
           Proof: From (12.55) we note that the disturbance estimate dˆ converges only if
      Ld (−ym,∞ + C x̂∞ + Cd dˆ∞ ) = 0. As Ld is square by assumption and nonsingular
      by Lemma 12.3 this implies that at steady state, the observer estimates (12.55)
      satisfy
                                − ym,∞ + C x̂∞ + Cd dˆ∞ = 0.                     (12.59)
      Equation (12.58) follows directly from (12.59) and (12.55).                                      
                                 ˆ r(t)))
  x(t + 1) = f (x(t), c0 (x̂(t), d(t),
                                             ˆ + Bc0 (x̂(t), d(t),
  x̂(t + 1) = (A + Lx C)x̂(t) + (Bd + Lx Cd )d(t)            ˆ r(t)) − Lx ym (t)
   ˆ + 1) = Ld C x̂(t) + (I + Ld Cd )d(t)
  d(t                                  ˆ − Ld ym (t).
                                                                              (12.64)
    Often in practice, one desires to track all measured outputs with zero offset.
Choosing nd = p = r is thus a natural choice. Such a zero-offset property continues
to hold if only a subset of the measured outputs are to be tracked, i.e., nd = p > r.
Next we provide a very simple proof for offset-free control when nd = p.
Define δx = x̂∞ − x̄∞ , δu = u∞ − ū∞ and the offset ε = z∞ − r∞ . Notice that the
steady state target values x̄∞ and ū∞ are both functions of r∞ and dˆ∞ as given
272                                                             12    Receding Horizon Control
      by (12.66). Left multiplying the second row of (12.65) by H and subtracting (12.66)
      from the result, we obtain
                                        (A − I)δx + Bδu = 0
                                                                                         (12.67)
                                        HCδx = ε.
      Denote by KMP C the unconstrained MPC controller (12.68), i.e., δu∗0 = KMP C δx(t).
      At steady state δu∗0 → u∞ − ū∞ = δu and δx(t) → x̂∞ − x̄∞ = δx. Therefore, at
      steady state, δu = KMP C δx. From (12.67)
      By assumption the unconstrained system with the MPC controller converges. Thus
      KMP C is a stabilizing control law, which implies that (A − I + BKMP C ) is non-
      singular and hence δx = 0.                                                    
Remark 12.6 Theorem 12.4 was proven in [226] by using a different approach.
          Remark 12.7 Theorem 12.4 can be extended to prove local Lyapunov stability of
          the closed-loop system (12.64) under standard regularity assumptions on the state
          update function f in (12.64) [204].
          Remark 12.8 The proof of Theorem 12.4 assumes only that the models used for the
          control design (12.1) and the observer design (12.50) are identical in steady state in
          the sense that they give rise to the same relation z = z(u, d, r). It does not make
          any assumptions about the behavior of the real plant (12.49), i.e., the model-plant
          mismatch, with the exception that the closed-loop system (12.64) must converge to
          a fixed point. The models used in the controller and the observer could even be
          different as long as they satisfy the same steady state relation.
          Remark 12.9 If condition (12.62) does not specify x̄t and ūt uniquely, it is customary
          to determine x̄t and ūt through an optimization problem, for example, minimizing
          the magnitude of ūt subject to the constraint (12.62) [226].
12.7   Offset-Free Reference Tracking                                                        273
    Remark 12.10 Note that in order to achieve no offset we augmented the model of the
    plant with as many disturbances (and integrators) as we have measurements (nd = p)
    (cf. equation (12.56)). Our design procedure requires the addition of p integrators
    even if we wish to control only a subset of r < p measured variables. This is actually
    not necessary as we suspect from basic system theory. The design procedure for the
    case nd = r < p is, however, more involved [198].
Explicit Controller
Examining (12.61), (12.62) we note that the control law depends on x̂(t), d(t) ˆ and
r(t). Thus in order to achieve offset free tracking of r outputs out of p measurements
we had to add the p + r “parameters” d(t)  ˆ and r(t) to the usual parameters x̂(t).
    There are more involved RHC design techniques to obtain offset-free control
for models with nd < p and in particular, with minimum order disturbance models
nd = r. The total size of the parameter vector can thus be reduced to n + 2r.
This is significant only if a small subset of the plant outputs are to be controlled.
A greater reduction of parameters can be achieved by the following method. By
Corollary 12.3, we are allowed to choose Bd = 0 in the disturbance model if the
plant has no integrators. Recall the target conditions 12.62 with Bd = 0
                                                             
                      A−I B            x̄t                0
                                             =                ˆ     .           (12.71)
                       HC      0       ūt       r(t) − HCd d(t)
Clearly, any solution to (12.71) can be parameterized by r(t) − HCd d(t).    ˆ    The
                                                                ˆ
explicit control law is written as u(t) = c0 (x̂(t), r(t) − HCd d(t)), with only n + r
parameters. Since the observer is unconstrained, complexity is much less of an
issue. Hence, a full disturbance model with nd = p can be chosen to yield offset-
free control.
      Minimum-Time Controller
      In minimum-time control, the cost function minimizes the predicted number of
      steps necessary to reach a target region, usually the invariant set associated with
       12.8   Literature Review                                                                 275
       the unconstrained LQR controller [167]. This scheme can reduce the on-line com-
       putation time significantly, especially for explicit controllers (Section 11.5). While
       minimum-time MPC is computed and implemented differently from standard MPC
       controllers, there is no difference between the two control schemes at steady-state.
       In particular, one can choose the target region to be the unconstrained region
       of (12.61)-(12.62). When the state and disturbance estimates and reference are
       within this region, the control law is switched to (12.61)-(12.62). The analysis and
       methods presented in this section therefore apply directly.
  1. Operations are only on the problem data, and the methods do not require
     the computation of the explicit control law.
  2. Any convex parametric problem can be approximated, not just those for
     which the explicit solution can be computed.
    We begin by assuming that a controller with the desired properties has already
been defined via one of the predictive control methods introduced in Chapters 12,
but that solving the requisite optimization problem online, or evaluating the ex-
plicit solution offline, is not possible due to computational limitations. The chapter
begins by listing the specific assumptions on this optimal control law, which is to
be approximated. Then, the key theorem is introduced, which provides sufficient
conditions under which an approximate control law will be stabilizing and persis-
tently feasible. Section 13.2 describes an abstract algorithm that will provide these
properties, and Section 13.3 reviews a number of specific implementations of this
algorithm that have been proposed in the literature.
278                                             13    Approximate Receding Horizon Control
       with p = 1 or p = ∞, or
                                                         N
                                                         X −1
                           J0 (x(0), U0 ) = x′N P xN +          x′k Qxk + u′k Ruk .           (13.3)
                                                         k=0
          In the following we will prove that the stability of receding horizon control is
       preserved when the suboptimal control law ũ0 (x(t)) is used as long as the level of
       suboptimality is less than the stage cost, i.e.
       (A0)       The stage cost q(x, u) and terminal cost p(x) are continuous and positive
              definite functions.
(A1) The sets X , Xf and U contain the origin in their interior and are closed.
(A4)       The suboptimal Ũ0 (x) satisfies J0 (x, Ũ0 (x)) ≤ J0∗ (x) + γ(x), ∀x ∈ X0 ,
       γ  0.
Then, the origin of the closed-loop system (13.5) is asymptotically stable with do-
main of attraction X0 .
     Proof: The proof follows the proof of Theorem 12.2. We focus only on the
arguments for convergence, which are different for the suboptimal MPC controller.
We establish that the function J0∗ (·) in (13.1) strictly decreases for the closed-loop
system. Because the cost J0 , the system and the constraints are time-invariant we
can study the properties of J0∗ between step k = 0 and step k + 1 = 1.
    Consider problem (13.1) at time t = 0. Let x(0) ∈ X0 and let Ũ0 = {ũ0 , . . . , ũN −1 }
be a feasible suboptimal solution to problem (13.1) and x0 = {x(0), x1 , . . . , xN } be
the corresponding state trajectory. We denote by J˜0 (x(0)) the cost at x(0) when
the feasible Ũ0 is applied, J˜0 (x(0)) = J0 (x(0), Ũ0 ).
    After the implementation of ũ0 we obtain x(1) = x1 = Ax(0) + B ũ0 . Consider
now problem (13.1) for t = 1. We will construct an upper bound on J0∗ (x(1)).
Consider the sequence Ũ1 = {ũ1 , . . . , ũN −1 , v} and the corresponding state trajec-
tory resulting from the initial state x(1), x̃1 = {x1 , . . . , xN , AxN + Bv}. Because
xN ∈ Xf and (A2) there exists a feasible v such that xN +1 = AxN + Bv ∈ Xf
and with this v the sequence Ũ1 = {ũ1 , . . . , ũN −1 , v} is feasible. Because Ũ1 is not
optimal J0 (x(1), Ũ1 ) is an upper bound on J0∗ (x(1)).
    Since the trajectories generated by Ũ0 and Ũ1 overlap, except for the first and
last sampling intervals, it is immediate to show that
Let x = x0 = x(0) and u = ũ0 . Under assumption (A3) equation (13.6) becomes
J0∗ (Ax + Bu) − J0∗ (x) ≤ γ(x) − q(x, u) ≤ γ(x) − q(x, 0), ∀x ∈ X0 . (13.8)
Equation (13.8), the hypothesis (A0) on the matrices Q and R and the hypothesis
(A5) ensure that J0∗ (x) strictly decreases along the state trajectories of the closed-
loop system (13.5) for any x ∈ X0 , x 6= 0.                                          
   Theorem 13.1 has introduced sufficient conditions for stability for the approxi-
mate solution Ũ0 (x) based on its level of suboptimality specified by the assumptions
(A4) and (A5). In the following section we describe how these conditions can be
met by sampling the optimal control law for different values of x and then using a
technique called barycentric interpolation.
280                                          13   Approximate Receding Horizon Control
         To simplify the discussion we will adopt the notation for the general multipara-
      metric programming problem from Chapter 5. We consider the multiparametric
      program
                                   J ∗ (x) = inf J(z, x)
                                              z                                    (13.9)
                                        subj. to (z, x) ∈ C,
      where
                                   C = {z, x : g(z, x) ≤ 0},                      (13.10)
      z ∈ Z ⊆ Rs is the optimization vector, x ∈ X ⊆ Rn is the parameter vector,
      J : Rs × Rn → R is the cost function and g : Rs × Rn → Rng are the constraints.
      We assume throughout this chapter that the set C is convex, and that the func-
      tion J(z, x) is simultaneously convex in z and x. Note that this implies that the
      optimization problem (13.9) is convex for each fixed value of the parameter x. For
      a particular value of the parameter x, we denote the set of feasible points as
and define the feasible set as the set of parameters for which (13.9) has a solution
      We denote by J ∗ (x) the real-valued function that expresses the dependence of the
      minimum value of the objective function over K∗ on x
      and by Z ∗ (x) the point-to-set map which assigns the (possibly empty) set of opti-
      mizers z ∗ ∈ 2Z to a parameter x ∈ X
      Uniqueness The set of optimizers Z ∗ (x) is a singleton for each value of the pa-
          rameter. The function z ∗ (x) = Z ∗ (x) will be called optimizer function.
      Note that the solutions J ∗ (x), Z ∗ (x) and z ∗ (x) of problem (13.1) satisfy these
      conditions. We emphasize, however, that the approximate methods introduced in
      the following are applicable also to more general MPC problems as long as these
      conditions of convexity, uniqueness and continuity are met.
         For the approximation methods introduced below convexity of the function
      γ(x)  0 (Theorem 13.1, assumptions (A4)-(A5)) bounding the level of subopti-
      mality is necessary. It is not required, however, for the closed-loop stability with
      the approximate control law.
         13.2   Barycentric Interpolation                                                         281
13.2.1 Feasibility
         The class of interpolating functions z̃(x) satisfying (13.15) is called the class of
         barycentric functions.
             The key statement that can be made about functions defined via barycentric
         interpolation is that the function values lie within the convex hull of the function
         values at the sample points. This property is illustrated in Figure 13.2, and formally
         defined in the following Lemma.
282                                                 13     Approximate Receding Horizon Control
                                X
                      z̃(x) =         z ∗ (v)wv (x) ∈ R(x) for all x ∈ conv(V ).
                                v∈V
          Proof: The statement holds if for each x ∈ conv(V ) there exists a set of positive
      multipliers λ0 , . . . , λm such that
                                                       m
                                                         X                  
                                          x                            vi
                                                    =          λi
                                        z̃(x)                       z ∗ (vi )
                                                         i=0
           Pm
      and i=0 λi = 1. The properties of barycentric functions (13.17) clearly satisfy
      this requirement.                                                            
         13.2   Barycentric Interpolation                                                      283
13.2.2 Suboptimality
                                                 X
                      J ∗ (x) ≤ J (z̃(x), x) ≤         wv (x)J ∗ (v) for all x ∈ conv(V ).
                                                 v∈V
             Proof: The lower bound follows from the fact that z̃(x) is feasible for the
         optimization problem for all x ∈ V (Lemma 13.1).
284                                               13     Approximate Receding Horizon Control
          The upper bound follows from convexity of the function J (z, x). Consider a
      fixed value of the parameter x ∈ conv(V ):
                                                                     !
                                          X                X
                         J (z̃(x), x) = J   wv (x)z ∗ (v),   wv (x)v
                                                 v∈V                    v∈V
                                           X
                                                             ∗
                                       ≤         wv (x)J (z (v) , v)
                                           v∈V
                                           X
                                       =         wv (x)J ∗ (v).
                                           v∈V
      The inequality in the above sequence follows because for a fixed value of the pa-
      rameter x, the barycentric interpolating functions {wv } are all positive, and sum
      to one.                                                                          
          The previous lemma demonstrates that due to the convexity of the value func-
      tion J (z, x), the interpolation of the optimal value function at the sample points
      provides an upper bound of the value function evaluated at the interpolated approx-
      imation z̃(x) (Fig. 13.3). We can use this fact to formulate a convex optimization
      problem, whose solution will provide a certificate for (13.16).
           Proof: We see that the suboptimality bound is met within the convex hull of
      V if and only if the following value is non-negative:
      and we obtain a further relaxation / lower bound by optimizing over all possible
      barycentric functions
                                                           X
                       (13.20) ≥ min      J ∗ (x) + γ(x) −   λv J ∗ (v)
                                     x∈conv(V )
                                                                         v∈V
                                                  X                       X
                              s.t.         x=           λv v, λv ≥ 0,            λv = 1.
                                                  v∈V                     v∈V
      Recalling that J ∗ (x) = minz J (z, x) s.t. (x, z) ∈ C provides the desired result. 
         13.2   Barycentric Interpolation                                                              285
                                     J ⋆ (v1 )
                                                      P
                                                          wv (x)J ⋆ (v)
                                                      J(z̃(x), x)        J ⋆ (v2 )
                                            J ⋆ (x)
                                   v1                               v2
                Figure 13.3 Illustration of the relationship between the optimal value func-
                tion J ∗ (x), the value function evaluated for the sub-optimal function z̃(x)
                and the convex hull of the optimal value at the sample points.
13.3.1 Triangulation
             There are various triangulations possible; for example, the recursive triangula-
         tion developed in [232, 37] has the strong property of generating a simple hierarchy
         that can significantly speed online evaluation of the resulting control law. The De-
         launay triangulation [109], which has the nice property of minimizing the number
         of skinny triangles, or those with small angles is a common choice for which incre-
         mental update algorithms are well-studied and readily available (i.e., computation
         of TV ∪{v} given TV ). A particularly suitable Delaunay triangulation can be defined
         by using the optimal cost function as a weighting term, which causes the resulting
         triangulation to closely match the optimal partition [159].
             Given a discrete set of states V , we can now define an interpolated control law
         z̃(x; TV ) : Rn 7→ Rm .
                          P                           P
         where λv ≥ 0,        λv = 1 and x =              v∈Vj   vλv .
             For each simplical region conv(Vj ) in the triangulation, the set of multipliers λ
         is unique and can be found by solving the system of linear equations
                                                                        −1  
                                                     v1    ···    vn+1        x
                                           λ=
                                                     1     ···      1         1
         where vi ∈ Vj .
           The function z̃(x; T ) is piecewise affine, and given by:
                                 ′
                        z ∗ (v1 )                           −1  
                            ..    v1     ···        vn+1        x
         z̃(x; T ) =         .                                           if x ∈ Vj = conv({v1 , . . . , vn+1 }).
                                       1   ···          1         1
                      z ∗ (vn+1 )
            The simplical nature of each region immediately demonstrates that the inter-
         polation 13.21 is barycentric.
P J ⋆ (x) + γ(x)
J ⋆ (x)
          Our goal is to compute the Hausdorff distance between our polytopic approxi-
      mation, and epi J ∗,γ by solving a convex optimization problem. We first recall the
      definition of the projection of a point v onto a convex set S
         The following lemma states that we can compute the projection of a point
      onto the epigraph of the optimal value function by solving a convex optimization
      problem.
13.3   Partitioning and Interpolation Methods                                              289
Lemma 13.3 The projection of (v, Jv ) onto the epigraph epi J ∗,γ is the optimizer
of the following problem, (x∗ , J ∗ ):
                       min kx − vk22 + kJ (z, x) + γ(x) − Jv k22
                        z,x
                        s.t. (x, z) ∈ C.
    We can now use the fact that the maximizer of a convex function over a convex
set will always occur at an extreme point of the set to write the Hausdorff distance
as the maximum of the projection of the vertices of the polyhedron P onto the
epigraph, which can be done by testing a finite number of points, since a polyhedron
has a finite number of vertices.
Lemma 13.4 If P is a polyhedron, and P ⊇ epi J ∗,γ is a convex set, then the
Hausdorff distance is:
   dH (P, epi J ∗,γ ) = max(v,Jv )∈extreme(P ) kx∗ (v) − vk22 + kJ ∗ (v) + γ(x) − Jv k22
where (x∗ (v), J ∗ (v)) is the projection of (v, Jv ) onto the epigraph.
    Algorithm 13.2 below will generate a sequence of outer polyhedral approxima-
tions of the epigraph that are monotonically decreasing in terms of the Hausdorff
distance. In each iteration of the algorithm, the Hausdorff distance is computed,
and the extreme point v of P at which the worst-case error occurs is removed from
P by adding a seperating hyperplane between the point v and the epigraph. The
addition of a seperating hyperplane ensures that the updated polyhedron remains
an outer approximation, and since the worst-case point is removed from the set,
we have that the approximation error is monotonically decreasing in the Hausdorff
distance. The algorithm terminates when all of the vertices of P are contained in
the epigraph of J ∗ . Figure 13.5 illustrates the process of a single cycle of the im-
plicit double description algorithm. Figure 13.6 shows a progression of steps until
the termination criterion extreme(P ) ⊂ epi J ∗ (x) is satisfied.
RF = {x : ∃J, (x, J) ∈ F }.
      The set of all such polytopes, {RF }, forms a partition of the feasible set of the
      controller and we define our approximate control law over this set:
                                     X
                         z̃(x) =             u∗ (v)wv,F (x), if v ∈ RF           (13.22)
                                        v∈extreme(RF )
      where wv,F (x) is a barycentric set of functions for the polytope RF . A method to
      construct such a function will be described in the next sub-section.
          The following theorem demonstrates that this approximate z̃(x) satisfies con-
      dition (13.16).
Proof:
                                                                                                 
         13.3   Partitioning and Interpolation Methods                                            291
         where αv is the area of the polytope {y : [V − 1x′ ]y ≤ 0, (v − x)′ y = 1}; i.e., the
                                   P dual of S − {x} corresponding to the vertex v − x. The
         area of the facet of the polar
         function wv (x) = bv (x)/ v bv (x) is barycentric over the polytope S.
             The areas of the facets of the polar duals αv can be pre-computed offline and
         stored. If there are d + 1 facets incident
                                                  with the vertex v (i.e., v is simplical),
         then the area of the polar facet is det a0 · · · ad+1 , where {a0 , . . . , ad+1 } are
         the normals of the incident facets. If the vertex is not simplical, then the area can
         be easily computed by perturbing the incident facets [285]. Such computation is
         straightforward because both the vertices and halfspaces of each region are available
         due to the double-description representation.
         For a particular grid point v, with grid width of w, we can extend the hat function
         by scaling and shifting:
                                                           
                                                       x−v
                                        φv,w (x) = φ          .
                                                        w
292                                           13        Approximate Receding Horizon Control
      where vi and xi are the ith components of the vectors v and x respectively.
         The resulting basis function φ0,1 (x) is illustrated in two dimensions in Fig-
      ure 13.7.
         We now define our interpolated approximation as:
                                           X
                                   z̃(x) =    z ∗ (v)φv,w (x)
                                               v∈G
where w is the width of the grid, and G is the set of grid vertices.
          Lemma 13.6 states that each hypercube in the grid is in fact barycentric. In
      order to apply Algorithm 13.1 we need a method of re-partitioning the current
      sample points. We do this via a hierarchical approach, in which each hypercube
      of the grid is tested for compliance with condition (13.16) and, if it fails, is sub-
      divided into 2d more hypercubes. The result is a hierarchical grid, that is very easy
      to evaluate online.
          What has been discussed so far is termed a ‘nodal’ representation of the approxi-
      mate function. It is also possible to define what is termed a ‘hierarchical multi-scale’
      representation, which, at each level of the re-gridding procedure, approximates only
      the residual, rather than the original function. This approach generally results in
      an extremely sparse representation of the data, and significantly ameliorates the
      downsides of sampling on a grid. See [270] for more details.
   We approximate the control law resulting for a standard quadratic-cost MPC problem
   with a horizon of 10 and weighting matrices taken to be
                                              
                                       0.1 0
                                 Q=              , R = 1.
                                        0    2
   The MPC problem formulation includes a terminal set and terminal weight, which
   are computed as discussed in Chapter 12 as the maximum invariant set for the system
   when controlled with the optimal LQR control law.
   The optimal value function J ∗ for this problem can be seen in Figure 13.8, along with
   the approximation target J ∗ (x) + γ(x) for γ(x) = x′ Qx.
   Figures 13.9-13.11 shows the evolution of the approximation algorithm using a trian-
   gulation approach, and Figure 13.12 shows the resulting approximate control law and
   the approximation error. The approximation error seems quite large but this is all
   what is needed when the only objective is to retain stability rather than performance.
   Figures 13.13-13.14 shows the same evolution, but for the double description/outer
   approximation approach. One can see that far fewer sample points are required to
   reach a stability certificate.
   The example has also been approximated using the second-order interpolant method
   until the stability certification was achieved. Figure 13.15 shows the resulting nodal
   partition of the state space. Note that since it would take an infinite number of
   hypercubes to approximate a non-orthogonal polytope, a soft-constrained version of
   the problem is taken in the domain outside the feasible set (although the stability
   certificate is valid only within the feasible set). One can see the approximate control
   law, the resulting error and the resulting approximated value function in Figures 13.16
   and 13.17, respectively.
   Table 13.1 shows the required online data storage and computation time for the
   various methods introduced in this chapter for the studied example, as well as the
   average and worst-case approximation errors (based on samples). One can see that
   for this small example, the second-order interpolants are clearly the best solution.
   However, this should not be taken as a clear indicator, or a recommendation for
   the method beyond the others, since this would require a thorough computational
   comparison of the various methods (or their variants in the literature) on a wide
   range of practical problems.
                                                  J ⋆ (x) + γ(x)
                       P
J ⋆ (x)
(a) Iteration 1.
                                                  J ⋆ (x) + γ(x)
                       P
J ⋆ (x)
(b) Iteration 2.
P J ⋆ (x) + γ(x)
J ⋆ (x)
      Figure 13.6 Several steps of the Double Description algorithm with the ter-
      mination criterion extreme(P ) ⊂ epi J ∗ (x) satisfied in the last step.
13.3   Partitioning and Interpolation Methods                                          295
                                       1
                          φ0,1 (x)   0.8
                                     0.6
                                     0.4
                                     0.2
                                       0
                                        1
                                                 0                         1
                                                       -1              0
                                                 x2          -1
                                                                  x1
       Figure 13.7 Plot of the second order interpolant in 2D centered at zero, with
       a width of one.
                           40
                           30
                           20
                           10
                            0
                              5
                                            0                              5
                                                                   0
                                                      -5    -5
                                            x2                    x1
       Figure 13.8 Example 13.1. Optimal cost J ∗ (x) and approximation stability
       bound J ∗ (x) + γ(x) above it.
296                                        13   Approximate Receding Horizon Control
       15                                         15
       10                                         10
        5                                          5
        0                                          0
       -5                                         -5
      -10                                        -10
          5                                          5
                   0                       5                   0                             5
                                      0                                              0
                       -5   -5                                          -5    -5
                  x2             x1                            x2                   x1
            5                                           5
            4                                           4
            3                                           3
            2                                           2
            1                                           1
      x2
            0                                     x2    0
           -1                                          -1
           -2                                          -2
           -3                                          -3
           -4                                          -4
           -5-5                            5           -5-5                                  5
                            0                                                 0
                            x1                                                x1
      30                                           30
      20                                           20
      10                                           10
       0                                               0
           5                                               5
                  0                       5                         0                            5
                                  0                                                      0
                       -5   -5                                           -5    -5
                  x2             x1                             x2                   x1
        (a) Sub-optimal solution with 15                (b) Sub-optimal solution with 25
        vertices. Error: δV = −17.8.                    vertices. Error: δV = −4.51.
           Figure 13.9 Example 13.1. Error function −δV (top). Points marked are
           the vertices with worst-case fit. Partition (triangulation) of the sampled
           points (middle). Upper-bound on approximate value function (convex hull
           of sample points) (bottom).
13.3           Partitioning and Interpolation Methods                                               297
    15                                            15
    10                                            10
     5                                             5
     0                                             0
    -5                                            -5
   -10                                           -10
       5                                            5
                   0                      5                   0                             5
                                      0                                             0
                       -5   -5                                         -5    -5
                  x2              x1                          x2                   x1
            5                                          5
            4                                          4
            3                                          3
            2                                          2
            1                                          1
   x2
x2
            0                                          0
           -1                                         -1
           -2                                         -2
           -3                                         -3
           -4                                         -4
           -5-5                            5          -5-5                                  5
                            0                                                0
                            x1                                               x1
   30                                              30
   20                                              20
   10                                              10
       0                                              0
           5                                              5
                  0                       5                        0                            5
                                  0                                                     0
                       -5   -5                                          -5    -5
                  x2             x1                            x2                   x1
       (a) Sub-optimal solution with 35                (b) Sub-optimal solution with 45
       vertices. Error: δV = −1.26.                    vertices. Error: δV = −0.82
           Figure 13.10 Example 13.1. Error function −δV (top). Points marked are
           the vertices with worst-case fit. Partition (triangulation) of the sampled
           points (middle). Upper-bound on approximate value function (convex hull
           of sample points) (bottom).
298                                        13   Approximate Receding Horizon Control
       15                                         15
       10                                         10
        5                                          5
        0                                          0
       -5                                         -5
      -10                                        -10
          5                                          5
                  0                        5                   0                             5
                                      0                                              0
                      -5   -5                                           -5    -5
                 x2              x1                            x2                   x1
            5                                           5
            4                                           4
            3                                           3
            2                                           2
            1                                           1
      x2
                                                  x2
            0                                           0
           -1                                          -1
           -2                                          -2
           -3                                          -3
           -4                                          -4
           -5                                          -5
            -5             0               5            -5                    0              5
                           x1                                                 x1
      30                                           30
      20                                           20
      10                                           10
       0                                               0
           5                                               5
                 0                        5                         0                            5
                                  0                                                      0
                      -5   -5                                            -5    -5
                 x2              x1                             x2                   x1
        (a) Sub-optimal solution with 55               (b) Sub-optimal solution with 61
        vertices. Error: δV = −0.23.                   vertices. Error: δV = 0, system
                                                       stable.
           Figure 13.11 Example 13.1. Error function −δV (top). Points marked are
           the vertices with worst-case fit. Partition (triangulation) of the sampled
           points (middle). Upper-bound on approximate value function (convex hull
           of sample points) (bottom).
13.3     Partitioning and Interpolation Methods                                               299
           1                                                    1
                                               ũ(x) − u∗ (x)
        0.5                                               0.5
          0                                                     0
       -0.5                                             -0.5
         -1                                                     -1
           5                                                      5
                0              0     -5                               0              0   -5
                     -5   5                                                -5   5
                x1            x2                                      x1            x2
       (a) Approximated control law                   (b) Approximation error ũ(x) −
       ũ(x).                                         u∗ (x).
       15                                        15
       10                                        10
        5                                         5
        0                                         0
       -5                                        -5
      -10                                       -10
          5                                         5
                   0                      5                 0                             5
                                      0                                           0
                       -5   -5                                       -5    -5
                  x2             x1                         x2                   x1
            5                                         5
            4                                         4
            3                                         3
            2                                         2
            1                                         1
      x2
            0                                   x2    0
           -1                                        -1
           -2                                        -2
           -3                                        -3
           -4                                        -4
           -5-5                           5          -5-5                                 5
                            0                                              0
                            x1                                             x1
      40                                          40
      30                                          30
      20                                          20
      10                                          10
       0                                           0
         5                                           5
                  0                       5                      0                            5
                                  0                                                   0
                       -5   -5                                        -5    -5
                  x2             x1                          x2                   x1
        (a) Sub-optimal solution with 5               (b) Sub-optimal solution with 13
        facets. Error: δV = −18.35.                   facets. Error: δV = −5.62.
         Figure 13.13 Example 13.1. Error function −δV (top). Points marked are
         the vertices with worst-case fit. Partition (polyhedral approximation) of
         the sampled points (middle). Upper-bound on approximate value function
         (convex hull of sample points) (bottom).
13.3      Partitioning and Interpolation Methods                                               301
    15                                         15
    10                                         10
     5                                          5
     0                                          0
    -5                                         -5
   -10                                        -10
       5                                         5
               0                          5              0                             5
                                   0                                           0
                   -5   -5                                        -5    -5
              x2               x1                        x2                   x1
         5                                          5
         4                                          4
         3                                          3
         2                                          2
         1                                          1
   x2
x2
         0                                          0
        -1                                         -1
        -2                                         -2
        -3                                         -3
        -4                                         -4
        -5              0                          -5                   0
         -5                               5         -5                                 5
                        x1                                              x1
   40                                           40
   30                                           30
   20                                           20
   10                                           10
    0                                            0
      5                                            5
              0                        5                      0                            5
                               0                                                   0
                   -5   -5                                         -5    -5
              x2              x1                          x2                   x1
       (a) Sub-optimal solution with 21            (b) Example 13.1.   Sub-optimal
       facets. Error: δV = −0.77.                  solution with 31 facets. Error:
                                                   δV = 0, system stable.
        Figure 13.14 Example 13.1. Error function −δV (top). Points marked are
        the vertices with worst-case fit. Partition (polyhedral approximation) of
        the sampled points (middle). Upper-bound on approximate value function
        (convex hull of sample points) (bottom).
302                                          13    Approximate Receding Horizon Control
                                   5
                                   4
                                   3
                                   2
                                   1
                             x2
                                   0
                                  -1
                                  -2
                                  -3
                                  -4
                                  -5               0                   5
                                   -5
                                                   x1
       Figure 13.15 Example 13.1. Partition generated by the second-order inter-
       polant method.
         1                                                  1
       0.5                                                0.5
         0                                                  0
      -0.5                                               -0.5
        -1                                                 -1
          5                                                  5
               0                    0    -5                        0                 0   -5
                    -5   5                                                 -5   5
               x1                 x2                               x1               x2
      (a) Approximated control law                       (b) Approximation error ũ(x) −
      ũ(x).                                             u∗ (x).
                                  30
                                  20
                         J(x)
                                  10
                         ˜
                                   0
                                    5
                                        0                              5
                                              -5             0
                                        x2          -5
                                                           x1
                                                             ˜
       Figure 13.17 Example 13.1. Approximate value function J(x) using second-
       order interpolants.
       Chapter 14
                         u∗ (x) = F i x + g i , ∀x ∈ Pi , i = 1, . . . , N r ,     (14.1)
                                               n                               i           i
                                                                                             o
      where F i ∈ Rm×n , g i ∈ Rm , and Pi = x ∈ Rn : H i x ≤ K i , H i ∈ RNc ×n , K i ∈ RNc ,
      i = 1, . . . , N r is a polyhedral partition of X . In the following Hji denotes the j-th
      row of the matrix H i , Kji denotes the j-th element of the vector K i and Nci is the
      number of constraints defining the i-th polyhedron Pi . The on-line implementation
      of the control law (14.1) is simply executed according to the following steps:
          Algorithm 14.1
          Input: State x(t) at time instant t
          Output: Receding horizon control input u(x(t))
               Search for the j-th polyhedron that contains x(t), (H j x(t) ≤ K j )
               u(t) ← F j x(t) + g j
               Return u(t), the j-th control law evaluated at x(t)
      In Algorithm 14.1, step (2) is critical and it is the only step whose efficiency can
      be improved. A simple implementation of step (2) would require searching for the
      polyhedral region that contains the state x(t) as in the following algorithm.
          Algorithm 14.2
                                                                              r
          Input: State x(t) at time instant t and polyhedral partition {Pi }N
                                                                            i=1 of the control
          law (14.1)
          Output: Index j of the polyhedron Pj in the control law (14.1) containing x(t)
               i ← 1, notfound← 1
               While i ≤ N r and notfound
                   j ← 0, stillfeasible← 1
                   While j ≤ Nci and stillfeasible=1
                        If Hji x(t) > Kji Then stillfeasible← 0
                        Else j ← j + 1
         14.1   Storage and On-line Evaluation of the PWA Control Law                                305
                     End
                     If stillfeasible=1 Then notfound← 0 Else i ← i + 1
                  End
                  Return j
             Algorithm 14.2 requires the storage of all polyhedra Pi , i.e., (n + 1)NC real
         numbers (n numbers for each row of the matrix H i plus one number for the cor-
                                                             PN r
         responding element in the matrix K i ), NC = i=1 Nci , and in the worst case (the
         state is contained in the last region of the list) it will give a solution after nNC
         multiplications, (n − 1)NC sums and NC comparisons.
             In this section, by using the properties of the value function, we show how
         Algorithm 14.2 can be replaced by more efficient algorithms that avoid storing the
         polyhedral regions Pi , i = 1, . . . , N r , therefore reducing significantly the storage
         demand and the computational complexity.
             In the following we will distinguish between optimal control based on LP and
         optimal control based on QP.
         From Corollary 11.5, the value function J ∗ (x) corresponding to the solution of the
         CFTOC problem (12.48) with 1, ∞-norm is convex and PWA:
                                          ′
                             J ∗ (x) = T i x + V i , ∀x ∈ Pi , i = 1, . . . , N r .        (14.2)
             By exploiting the convexity of the value function the storage of the polyhedral
         regions Pi can be avoided. From the equivalence of the representations of PWA
         convex functions (see Section 2.2.5), the function J ∗ (x) in equation (14.2) can be
         represented alternatively as
                             n ′                              o               r
                J ∗ (x) = max T i x + V i , i = 1, . . . , N r for x ∈ X = ∪N
                                                                            i=1 Pi .       (14.3)
                                  ′
                                                 n ′                             o
                      x ∈ Pj ⇔ T j x + V j = max T i x + V i , i = 1, . . . , N r .  (14.4)
             Therefore, instead of searching for the polyhedron j that contains the point x
         via Algorithm 14.2, we can just store the value function and identify region j by
         searching for the maximum in the list of numbers composed of the single affine
                     ′
         function T i x + V i evaluated at x (see Figure 14.1):
306                                                            14       On-line Control Computation
                                                                    ′
                                                                  T4 x + V 4
                                                ′             ′
                                           T1 x + V 1    T3 x + V 3
                                 J ∗ (x)
                                                     ′
                                                  T2 x + V 2
P1 P2 P3 P4
               Figure 14.1 Example for Algorithm 14.3 in one dimension: For a given point
               x ∈ P3 (x = 5) we have J ∗ (x) = max(T 1 x + V 1 , . . . , T 4 x + V 4 ).
             Algorithm 14.3
                                                                             ′
             Input: State x(t) at time instant t and value function 14.2, T i x + V i , i = 1, . . . , N r
             Output: Index j of the polyhedron Pj containing x(t) in the control law (14.1)
                                                       ′
                   Compute the list L = {ni = T i x + V i , i = 1, . . . , N r }
                   Find j such that nj = maxni ∈L ni
                   Return j
             The search Algorithm 14.3 requires the storage of (n + 1)N r real numbers
         and will give a solution after nN r multiplications, (n − 1)N r sums, and N r − 1
         comparisons. In Table 14.1 we compare the complexity of Algorithm 14.3 against
         Algorithm 14.2 in terms of storage demand and number of flops. Algorithm 14.3
         will outperform Algorithm 14.2 since typically NC ≫ N r .
         Consider the state feedback solution (11.15) of the CFTOC problem (11.9) with
         p = 2. Theorem 11.2 states that the value function J ∗ (x) is convex and piecewise
         quadratic on polyhedra and the simple Algorithm 14.3 described in the previous
         subsection cannot be used here. Instead, a different approach is described below.
         It uses a surrogate of the value function to uniquely characterize the polyhedral
         partition of the optimal control law.
14.1   Storage and On-line Evaluation of the PWA Control Law                                   307
    We will first establish the following general result: given a general polyhedral
partition of the state space, we can locate where the state lies (i.e., in which poly-
hedron) by using a search procedure based on the information provided by an
“appropriate” PWA continuous function defined over the same polyhedral parti-
tion. We will refer to such “appropriate” PWA function as a PWA descriptor
function. First we outline the properties of the PWA descriptor function and then
we describe the search procedure itself.
                r
    Let {Pi }Ni=1 be the polyhedral partition obtained by solving the mp-QP (11.31)
and denote by Ci = {j : Pj is a neighbor of Pi , j = 1, . . . , N r , j 6= i} the list of
all neighboring polyhedra of Pi . The list Ci has Nci elements and we denote by
Ci (k) its k-th element.
Ai 6= Aj , ∀j ∈ Ci , i = 1, . . . , Nr . (14.6)
Theorem 14.1 Let f (x) be a PWA descriptor function on the polyhedral partition
{Pi }N
     i=1 .
       r
                   i
   Let Oi (x) ∈ RNc be a vector associated with region Pi , and let the j-th element
     i
of O (x) be defined as
                                 
                                   +1     fi (x) > fCi (j) (x)
                       Oji (x) =                                               (14.7)
                                   −1    fi (x) < fCi (j) (x).
f4 (x)
                              f (x)
                                                             f3 (x)
                                               f2 (x)
f1 (x)
P1 P2 P3 P4
            Figure 14.2 Example for Algorithm 14.4 in one dimension: For a given point
            x ∈ P2 (x = 4) we have O2 (x) = [−1 1]′ = S2 , while O1 (x) = 1 6= S1 = −1,
            O3 (x) = [−1 − 1]′ 6= S3 = [1 − 1]′ , O4 (x) = 1 6= S4 = −1.
x ∈ Pi ⇔ Oi (x) = S i , (14.9)
      which means that the function Oi (x) and the vector S i uniquely characterize Pi .
      Therefore, to check on-line if the polyhedral region i contains the state x it is
      sufficient to compute the binary vector Oi (x) and compare it with S i . Vectors
      S i are calculated off-line for all i = 1, . . . , N r , by comparing the values of fi (x)
      and fCi (j) (x) for j = 1, . . . , Nci , for a point x belonging to Pi , for instance, the
      Chebychev center of Pi .
          Remark 14.1 Theorem 14.1 does not hold if one stores the closures of critical regions
          Pi (see Remark 6.8). In this case one needs to modify Theorem 14.1 as follows
The results in the remainder of this section can be easily extended to this case.
    Algorithm 14.4
    Input: State x(t) at time instant t, list of neighboring regions Ci and the vectors S i
    Output: Index i of the polyhedron Pi containing x(t) in the control law (14.1)
         i ← 1, I = {1, . . . , Nr }, notfound← 1
         While notfound and I 6= ∅
             I ←I \i
             Compute Oi (x)
             If Oi (x) = S i Then notfound← 0
             Else i ← Ci (q), where Oqi (x) 6= siq
         End
         Return i
   Algorithm 14.4 does not require the storage of the polyhedra Pi , but only
the storage of one linear function fi (x) per polyhedron, i.e., N r (n + 1) real num-
bers and the list of neighbors Ci which requires NC integers. In the worst case,
Algorithm 14.4 terminates after N r n multiplications, N r (n − 1) sums and NC
comparisons.
   In Table 14.2 we compare the complexity of Algorithm 14.4 against the standard
Algorithm 14.2 in terms of storage demand and number of flops.
    Remark 14.2 Note that the computation of Oi (x) in Algorithm 14.4 requires the
    evaluation of Nci linear functions, but the overall computation never exceeds N r linear
    function evaluations. Consequently, Algorithm 14.4 will outperform Algorithm 14.2,
    since typically NC ≫ N r .
    Now that we have shown how to locate the polyhedron in which the state lies
by using a PWA descriptor function, we need a procedure for the construction of
such a function.
    The image of the descriptor function is the set of real numbers R. In the
following we will show how the descriptor function can be generated from a vector-
valued function m : Rn → Rs . This general result will be used in the following
subsections.
310                                                         14    On-line Control Computation
      Theorem 14.2 Given a vector-valued PWA descriptor function m(x) defined over
      a polyhedral partition {Pi }N
                                  i=1 it is possible to construct a PWA descriptor function
                                    r
          Algorithm 14.5
          Input: Vectors ai ∈ Rs , i = 1, . . . , N
          Output: The vector w ∈ Rs satisfying the set of equations w′ ai 6= 0, i = 1, . . . , N
                w ← [1, . . . , 1]′ , R ← 1
                While k ≤ NC /2
                   d ← w ′ ak
                   If 0 ≤ d ≤ R Then w ← w + 21 (R − d)ak , R ← 12 (R + d)
                   If −R ≤ d < 0 Then w ← w − 12 (R + d)ak , R ← 12 (R − d)
                End
                Return w
                                                           aTi x ≥ 0
                                                    B
                              R′               B′
                              R                            aTi x ≤ 0
                                           d
R−d
does not intersect this hyperplane is designed. The center w of the final ball is the
vector w we wanted to construct, while R gives some information about the degree
of non-orthogonality: |w′ ak | ≥ R, ∀k.
    In the following subsections we will show that the gradient of the value function,
and the optimizer, are vector-valued PWA descriptor functions and therefore we
can use Algorithm 14.5 for the construction of the PWA descriptor function.
   In Section 6.3.4 we have proven that for non-degenerate problems the value
function J ∗ (x) is a C (1) function. We can obtain a vector-valued PWA descriptor
function by differentiating J ∗ (x). We first need to introduce the following theorem.
Theorem 14.3 ([21]) Assume that the CFTOC (11.9) problem leads to a non-
degenerate mp-QP (11.33). Consider the value function J ∗ (x) in (14.12) and let
CRi , CRj be the closure of two neighboring critical regions corresponding to the
set of active constraints Ai and Aj , respectively, then
Qi − Qj 0 or Qi − Qj 0 and Qi 6= Qj (14.13)
and
                                  Qi − Qj  0 iff Ai ⊂ Aj .                          (14.14)
Theorem 14.4 Consider the value function J ∗ (x) in (14.12) and assume that
the CFTOC (11.9) problem leads to a non-degenerate mp-QP (11.33). Then the
gradient m(x) = ∇J ∗ (x), is a vector-valued PWA descriptor function.
    Proof: From Theorem 6.9 we see that m(x) is a continuous vector-valued PWA
function, while from equation (14.12) we get
      Since from Theorem 14.3 we know that Qi 6= Qj for all neighboring polyhedra,
      it follows that m(x) satisfies all conditions for a vector-valued PWA descriptor
      function.                                                                     
          Combining results of Theorem 14.4 and Theorem 14.2 it follows that by using
      Algorithm 14.5 we can construct a PWA descriptor function from the gradient of
      the value function J ∗ (x).
      where F i ∈ Rs×n and g i ∈ Rs . We will assume that Pi are critical regions (as
      defined in Section 6.1.2). Before going further we need the following lemma.
      Lemma 14.1 Consider the state feedback solution (14.16) of the CFTOC prob-
      lem (11.9) and assume that the CFTOC (11.9) leads to a non-degenerate mp-
      QP (11.33). Let Pi , Pj be two neighboring polyhedra, then F i 6= F j .
          Remark 14.3 Note that even if we are implementing a receding horizon control strat-
          egy, the construction of the PWA descriptor function is based on the full optimization
          vector U ∗ (x) and the corresponding matrices F i and g i .
          Remark 14.4 In some cases the use of the optimal control profile U ∗ (x) for the
          construction of descriptor function f (x) can be extremely simple. If there is a row
          r, r ≤ m (m is the dimension of u) for which (F i )r 6= (F j )r , ∀i = 1 . . . , N r , ∀j ∈ Ci ,
                                     ′
          it is enough to set Ai = (F i )r and B i = (g i )r , where (F i )r and (g i )r denote the i-th
          row of the matrices F i and g i , respectively. The row r has to be the same for all
          i = 1 . . . , N r . In this way we avoid the storage of the descriptor function altogether
          since it is equal to one component of the control law, which is stored anyway.
         14.1   Storage and On-line Evaluation of the PWA Control Law                           313
14.1.3 Example
− 1 ≤ u(t) ≤ 1 (14.19)
         CFTOC based on LP
         To regulate (14.17), we design a receding horizon controller based on the optimiza-
         tion problem (12.6), (12.7)) where p = ∞, N = 2, Q = diag{5, 10, 10, 10}, R = 0.8,
         P = 0, Xf = R4 . The PPWA solution of the mp-LP problem comprises 136 regions.
         In Table 14.3 we report the comparison between the complexity of Algorithm 14.2
         and Algorithm 14.3 for this example.
             The average on-line evaluation effort of the PPWA solution for a set of 1000
         random points in the state space is 2259 flops (Algorithm 14.2), and 1088 flops
         (Algorithm 14.3). We note that the solution using Matlab
    R
                                                                         LP solver (function
         linprog.m with interior point algorithm and LargeScale set to ’off’) takes 25459
         flops on average.
         CFTOC based on QP
         To regulate (14.17), we design a receding horizon controller based on the optimiza-
         tion problem (12.6), (12.7)) where N = 7, Q = I, R = 0.01, P = 0, Xf = R4 .
         The PPWA solution of the mp-QP problem comprises 213 regions. We obtained
314                                                      14   On-line Control Computation
         a descriptor function from the value function and for this example the choice of
         w = [1 0 0 0]′ is satisfactory. In Table 14.4 we report the comparison between the
         complexity of Algorithm 14.2 and Algorithm 14.4 for this example.
             The average computation effort of the PPWA solution for a set of 1000 ran-
         dom points in the state space is 2114 flops (Algorithm 14.2), and 175 flops (Algo-
         rithm 14.4). The solution of the corresponding quadratic program with Matlab
    R
         QP solver (function quadprog.m and LargeScale set to ’off’) takes 25221 flops on
         average.
         The problem considered in this chapter has been approached by several other re-
         searchers. For instance in [275] the authors propose to organize the controller
         gains of the PWA control law on a balanced search tree. By doing so, the search
         for the region containing the current state has on average a logarithmic computa-
         tion complexity although it is less efficient in terms of memory requirements. At
         the expense of the optimality a similar computational complexity can be achieved
         with the approximative point location algorithm described in [160].
             The comparison of the proposed algorithms with other efficient solvers in the
         literature, e.g., [21, 55, 256, 105, 209, 212, 284, 61, 25] requires the simultaneous
         analysis of several issues such as speed of computation, storage demand and real
         time code verifiability.
         Note that 1- and ∞-norm cost functions (see Section 11.1) cannot be handled
         by the gradient (projection) methods discussed in this book since they require a
         smooth objective function.
               In Section 14.2.1 we first investigate a special case of the general setup in (14.21)
         which is input-constrained MPC. In this case, we impose constraints on the control
         inputs only, i.e., for the state sets we have X = Xf = Rn . If there are no state
         constraints, the MPC problem can be formulated with the sequence of inputs U0 =
         [u′0 , . . . , u′N −1 ]′ as the optimization vector (so-called condensing) where at the same
         time the feasible set U N = U ×. . .×U remains ‘simple’ if the input set U was simple
         (recall from Section 3.3.1 that a ‘simple’ set is a convex set with a projection
         operator that can be evaluated efficiently). This allows one to solve the MPC
         problem right in the primal domain and thus to achieve linear convergence with
         the gradient projection methods of this book.
               In the case of input and state constraints, the feasible set of problem (14.21)
         does not allow for an easy-to-evaluate projection operator in general, neither in
         condensed form nor with the state sequence as an additional optimization vector
         (so-called sparse formulation). However, gradient methods can still be applied to
         the sparse formulation of the MPC problem if a dual approach, as discussed in
         Section 3.3.1, is applied. However, only sublinear convergence can be achieved
         in the dual domain. Section 14.2.2 will summarize problem formulation, impor-
         tant aspects regarding the computation of the dual gradient and optimal step size
         selection.
         translates to
                                                                 
                                                 2               
                                    πU N    Yi −   HYi + F ′ x(0)   ,                        (14.22)
                                                 L
         where Yi is the previous iterate in case of the classic gradient projection method
         or the previous secondary iterate in case of the fast gradient projection method.
         Since the feasible set in input-constrained MPC is the direct product of N sets,
         evaluation of the projection operator in (14.22) can be separated into N evaluations
                                                                                    
         of the projection operator πU , i.e., if we let Uf = Yi − L2 HYi + F ′ x(0) , then
                                                                               ′
                                  πU N (Uf ) = πU (uf,1 )′ , . . . , πU (uf,N )′ ,
                                       ′
         with Uf = u′f,1 , . . . , u′f,N and uf,k ∈ Rm , k = 1, . . . , N .
       As a prerequisite for the above statement, the minimizer z ∗ (ν) must be unique for
       every dual multiplier vector ν (see Section 3.3.1). A sufficient condition for unique-
       ness of the minimizer is a strongly convex objective function in (14.24). In view of
       the definition of matrix M this is the case whenever the penalty matrices Q, P and
       R are positive definite, which is not a restrictive assumption in an application.
           The so-called inner problem (14.24) needs to be solved in every outer iteration
       of the classic or the fast gradient method in order to determine the dual gradient.
       This can be accomplished in one of the following ways.
          • Exact analytic solution: This is possible if all penalty matrices are positive
            diagonal matrices and all sets X , Xf and U are boxes. In practice, this is a
            frequent setup.
          • Approximate iterative solution: This is the most general approach for the
            solution of the inner problem as it only requires simple sets X , Xf and U (not
            necessarily polyhedral). Each of the 2N + 1 subproblems can then be solved
            approximately by a gradient projection method. Note that convergence issues
            of the outer gradient method might arise if the accuracy of the approximate
            inner solution is too low.
           Finally, we note that under mild assumptions, the tight, i.e., smallest possible,
       Lipschitz constant of the dual gradient is given by Ld = 12 kGM −1/2 k2 which, same
       as in the input-constrained case, is independent of the initial state x(0). The
       Lipschitz constant determines the step size of the outer gradient method and being
       able to compute a tight value ensures the best possible (sublinear) convergence
       (see Section 3.3.1).
      in the optimization vector). As a result, general sparse routines for solving lin-
      ear systems with KKT-structure can be applied to the Newton systems (3.41)
      and (3.45), or specific linear system solvers can be used that exploit the MPC-
      specific problem structure. A good starting point for details on this topic are the
      references [284, 246, 98, 201, 110, 171, 170].
       Chapter 15
       In the previous chapters we assumed perfect model knowledge for the plant to be
       controlled. This chapter focuses on the case when the model is uncertain. We
       focus on discrete-time uncertain linear systems with linear constraints on inputs
       and states. Uncertainty is modeled as additive disturbance and/or parametric
       uncertainty in the state space matrices. We first introduce the concepts of robust
       control design with “open-loop prediction” and “closed-loop prediction”. Then
       we discuss how to robustly enforce constraints satisfaction, and present several
       objective functions one might be interested in minimizing. For each robust control
       design we discuss the conservatism and show how to obtain the optimal control
       action by using convex or non-convex programming.
           For robust controllers which can be implemented by using linear and quadratic
       programming, we show that the robust optimal control law is a continuous and
       piecewise affine function of the state vector. The robust state feedback controller
       can be computed by means of multiparametric linear or quadratic programming.
       Thus, when the optimal control law is implemented in a moving horizon scheme,
       the on-line computation of the resulting controller requires simply the evaluation
       of a piecewise affine function.
       where x(t) ∈ Rn and u(t) ∈ Rm are the state and input vectors, respectively,
       subject to the constraints
      The sets X ⊆ Rn and U ⊆ Rm are polytopes. Vectors wa (t) ∈ Rna and wp (t) ∈ Rnp
      are unknown additive disturbances and parametric uncertainties, respectively. The
      disturbance vector is
      where Ai ∈ Rn×n and B i ∈ Rn×m are given matrices for i = 0 . . . , np and wcp,i is
                                                                         p,n
      the i-th component of the vector wp , i.e., wp = [wcp,1 , . . . , wc p ].
         Robust finite time optimal control problems can be formulated by optimizing
      over “Open-Loop” policies or “Closed-Loop” policies. We will discuss the two cases
      next.
Open-Loop Predictions
                                                              PN −1
      where the operation JW evaluates the cost p(xN ) + k=0 q(xk , uk ) for the set of
      uncertainties {w0 , . . . , wN −1 } ∈ W × · · · × W and the input sequence U0 . The
      following options are typically considered.
         • Nominal Cost.
           In the simplest case, the objective function is evaluated for a single distur-
                                                   p             p
           bance profile w̄0a , . . . , w̄N
                                          a
                                            −1 , w̄0 , . . . , w̄N −1 :
                           h        PN −1           i
                   JW =     p(xN ) + k=0 q(xk , uk )
                                 
                                 
                                  xk+1 = A(wkp )xk + B(wkp )uk + Ewka             (15.6)
                                 
                                   x0 = x(0)
                           where
                                 
                                  w a
                                       = w̄ka , wkp = w̄kp
                                  k
                                   k = 0, . . . , N − 1.
         • Expected Cost.
           Another option is to consider the probability density function f (w) of the
           disturbance w:
                                                       Z
                          Probability [w(t) ∈ W] = 1 =       f (w)dw.
                                                            w∈W
15.1    Problem Formulation                                                                       321
       In this case we consider the expected cost over the admissible disturbance
       set.
                                  h        P −1               i
               JW = Ew0 ,...,wN −1 p(xN ) + N k=0 q(xk , u k )
                              
                              
                               xk+1 = A(wkp )xk + B(wkp )uk + Ewka                  (15.7)
                              
                                x0 = x(0)
                        where
                              
                               w a
                                    ∈ W a , wkp ∈ W p
                               k
                                k = 0, . . . , N − 1.
   If the 1-norm or ∞-norm is used in the cost function of problems (15.6), (15.7)
and (15.8), then we set
                  p(xN ) = kP xN kp , q(xk , uk ) = kQxk kp + kRuk kp                (15.9)
with p = 1 or p = ∞. If the squared Euclidian norm is used in the cost function of
problems (15.6), (15.7) and (15.8), then we set
                   p(xN ) = x′N P xN , q(xk , uk ) = x′k Qxk + u′k Ruk .            (15.10)
Note that in (15.6), (15.7) and (15.8) xk denotes the state vector at time k obtained
by starting from the state x0 = x(0) and applying to the system model
                           xk+1 = A(wkp )xk + B(wkp )uk + Ewka
the input sequence u0 , . . . , uk−1 and the disturbance sequences wa = {w0a , . . . , wN
                                                                                        a
                                                                                          −1 },
  p      p         p
w = {w0 , . . . , wN −1 }.
    Consider the optimal control problem
 J0∗ (x(0)) =   minU0       J0 (x(0), U0 )
                                                                       
                            
                               xk+1 = A(wkp )xk + B(wkp )uk + Ewka     
                                                                        
                            
                                                                       
                                                                        
                             xk ∈ X , uk ∈ U                           
                                                                          ∀wka ∈ W a , ∀wkp ∈ W p
                subj. to        k = 0, . . . , N − 1
                            
                                                                       
                                                                         ∀k = 0, . . . , N − 1.
                            
                               xN ∈ Xf                                 
                                                                        
                                                                       
                                x0 = x(0)
                                                                                    (15.11)
322                                                 15    Constrained Robust Optimal Control
          Remark 15.1 Note that we distinguish between the current state x(k) of system (15.1)
          at time k and the variable xk in the optimization problem (15.11), that is the predicted
          state of system (15.1) at time k obtained by starting from the state x0 = x(0) and
          applying to system xk+1 = A(wkp )xk +B(wkp )uk +Ewka the input sequence u0 , . . . , uk−1
          and the disturbance sequences w0p , . . . , wk−1
                                                       p
                                                           , w0a , . . . , wk−1
                                                                            a
                                                                                . Analogously, u(k) is the
          input applied to system (15.1) at time k while uk is the k-th optimization variable of
          the optimization problem (15.11).
         • In problem (15.6), (15.11), among all control actions which robustly satisfy
           the constraints, the player U chooses the one which minimizes a cost for a
           “guessed” sequence played by W .
         • In problem (15.7), (15.11), among all control actions which robustly satisfy
           the constraints, the player U chooses the one which minimizes an expected
           cost over all the sequences, which can be played by W .
         • The optimal control problem (15.8) and (15.11) is somehow more involved
           and can be viewed as the solution of a zero-sum dynamic game. The player
           U plays first. Given the initial state x(0), U chooses his action over the
15.1    Problem Formulation                                                                       323
       whole horizon {u0 , . . . , uN −1 }, reveals his plan to the opponent W , who de-
       cides on his actions next {w0a , w0p , . . . , wN
                                                       a       p
                                                         −1 , wN −1 } by solving (15.8). By
       solving (15.8), (15.11), the player U selects the action corresponding to the
       smallest worst-case cost.
Closed-Loop Predictions
The constrained robust optimal control problem based on closed-loop predictions
(CROC-CL) is defined as follows:
 J0∗ (x(0)) =   minπ0 (·),...,πN −1 (·)    J0 (x(0), U0 )
                                                                                    
                                           
                                              xk+1 = A(wkp )xk + B(wkp )uk + Ewka   
                                                                                     
                                           
                                                                                    
                                                                                     
                                           
                                              xk ∈ X , uk ∈ U                       
                                                                                     
                                                                                    
                                               uk = πk (xk )                           ∀wka ∈ W a , ∀wkp ∈ W p
                subj. to
                                           
                                              k = 0, . . . , N − 1                  
                                                                                      ∀k = 0, . . . , N − 1.
                                           
                                                                                    
                                                                                     
                                           
                                              x N ∈ Xf                              
                                                                                     
                                                                                    
                                               x0 = x(0)
                                                                                   (15.13)
In (15.13) we allow the same cost functions as in (15.6), (15.7) and (15.8).
    In problem (15.13) we look for a set of time-varying feedback policies π0 (·),. . .,
πN −1 (·) which minimizes the performance index JW and generates input sequences
π0 (x0 ),. . ., πN −1 (xN −1 ) satisfying state and input constraints for all possible dis-
turbance realizations.
    We can formulate the search for the optimal policies π0 (·), . . . , πN −1 (·) as a
dynamic program.
                                                                    
                                  ∗
Jj (xj , uj ) = JW q(xj , uj ) + Jj+1 (A(wjp )xj + B(wjp )uj + Ewja ) ,               (15.15)
for j = 0, . . . , N − 1 and with boundary conditions
                                           ∗
                                          JN (xN ) = p(xN )                          (15.16a)
                                              XN = Xf ,                              (15.16b)
         • Expected Cost.
                                                                                 
                                                      ∗ (A(wp )x + B(wp )u + Ewa ) .
              JW = Ewja ∈W a ,wjp ∈W p q(xj , uj ) + Jj+1   j   j     j   j    j
                                                                              (15.19)
         If the 1-norm or ∞-norm is used in the cost function of problems (15.18), (15.19)
      and (15.20), then we set
          The reason for including constraints (15.14) in the minimization problem and
      not in the inner problem (15.15) is that in (15.15) wja and wjp are free to act
      regardless of the state constraints. On the other hand in (15.14), the input uj has
      the duty to keep the state within the constraints (15.14) for all possible disturbance
      realization. By solving problem (15.14) at step j of the dynamic program, we obtain
      the function uj (xj ), i.e., the policy πj (·).
          Again, the optimal control problem (15.14)–(15.15) can be viewed as a game
      between two players: the controller U and the disturbance W . This time the player
      U predicts that the game is going to be played as follows. At the generic time j
      player U observes xj and responds with uj = πj (xj ). Player W observes (xj , uj )
      and responds with wja and wjp . Therefore, regardless of the cost function in (15.15)
      the player U counteracts any feasible disturbance realization wj with a feedback
      controller πj (xj ). This prediction model takes into account that the disturbance
      and the controller play one move at a time.
          The game is played differently depending on the cost function JW .
         • In problem (15.14) and (15.18), among all the feedback policies uj = πj (xj )
           which robustly satisfy the constraints, the player U chooses the one which
           minimizes a cost for a “guessed” action w̄j played by W .
         • In problem (15.14) and (15.19), among all the feedback policies uj = πj (xj )
           which robustly satisfy the constraints, the player U chooses the one which
           minimizes the expected cost at time j.
                action to player W , then we can only claim that the player W might play
                the worst case action. Problem (15.14)–(15.20) is meaningful in both cases.
                Robust constraint satisfaction and worst case minimization will always be
                guaranteed.
xk+1 = xk + uk + wk (15.23)
             where x, u and w are state, input and disturbance, respectively. Let uk ∈ {−1, 0, 1}
             and wk ∈ {−1, 0, 1} be the feasible input and disturbance. Here {−1, 0, 1} denotes
             the set with three elements: -1, 0 and 1. Let x(0) = 0 be the initial state. The
             objective for player U is to play two moves in order to keep the state x2 at time 2
             in the set [−1, 1]. If U is able to do so for any possible disturbance, then he will win
             the game.
             The open-loop formulation (15.11) is infeasible. In fact, in open-loop U can choose
             from nine possible sequences: (0,0), (1,1), (-1,-1), (-1,1) (1,-1), (-1,0), (1,0), (0,1)
             and (0,-1). For any of those sequences there will always exist a disturbance sequence
             w0 , w1 which will bring x2 outside the feasible set [-1,1].
             The closed-loop formulation (15.14)–(15.20) is feasible and has a simple feasible so-
             lution: uk = −xk . In this case system (15.23) becomes xk+1 = wk and x2 = w1 lies
             in the feasible set [−1, 1] for all admissible disturbances w1 . The optimal feedback
             policy might be different from uk = −xk and depends on the choice of the objective
             function.
         In the following sections we will describe how to compute the solution to CROC-OL
         and CROC-CL problems. In particular we will show that the solution to CROC-
         OL and CROC-CL problem can be expressed in feedback form where u∗ (k) is a
         continuous piecewise affine function on polyhedra of the state x(k), i.e., u∗ (k) =
         fk (x(k)) where
         Hki and Kki in equation (15.24) are the matrices describing the i-th polyhedron
         CRki = {x ∈ Rn : Hki x ≤ Kki } inside which the feedback optimal control law
         u∗ (k) at time k has the affine form Fki x + gki .
             The optimal solution is continuous and has the form (15.24) in the following
         cases.
           Remark 15.2 CROC-OL and CROC-CL problems with expected cost performance
           index are not treated in this book. In general, the calculation of expected costs
           over polyhedral domains requires approximations via sampling or bounding even for
           disturbances characterized by simple probability distribution functions (e.g., uniform
           or Gaussian). Once the cost has been approximated, one can easily modify the
           approaches described in this chapter to solve CROC-OL and CROC-CL problems
           with expected cost performance index.
respectively. Assume that the disturbance sets are represented in terms of their
vertices: W a = conv{wa,1 , . . . , wa,nW a } and W p = conv{wp,1 , . . . , wp,nW p }. Define
Ui = [u′i , . . . , u′N −1 ] and the polyhedron Pi of robustly feasible states and input
sequences at time i,
• State Constraints
                                                                                              (15.28)
In general, the constraint (15.28) is non-convex in the disturbance sequences
wia , . . . , wk−1
               a
                   , wip , . . . , wk−1
                                    p
                                         because of the product Πj=ik−1
                                                                           A(wjp ).
     Assume that there is no uncertainty in the dynamics matrix A, i.e., A(·) = A.
In this case, since B(·) is an affine function of wp (cf. equation (15.4)) and since the
composition of a convex constraint with an affine map generates a convex constraint
(Section 1.2), we can use Lemma 10.1 to rewrite constraints (15.26) at time k as
                              Pk−1 l−i−1                                            
                                                   p
     Ax Ak−i−1 xi + l=i               A       (B(wk−1−l    )uk−1−l + Ewk−1−l a
                                                                                   ) ≤ bx ,
      for all wja ∈ {wa,i }ni=1      Wa
                                        , wjp ∈ {wp,i }ni=1
                                                         Wp
                                                            , ∀ j = i, . . . , k − 1,         (15.29)
                                                                        k = i, . . . , N − 1,
     Remark 15.3 When only additive disturbances are present (i.e., np = 0), vertex
     enumeration is not required and a set of linear programs can be used to transform
     the constraints (15.26) into a smaller number of constraints than (15.29) as explained
     in Lemma 10.2.
328                                            15    Constrained Robust Optimal Control
         Once the matrices Gi , Ei and Wi have been computed, the set XiOL is a poly-
      hedron and can be computed by projecting the polyhedron Pi in (15.25) on the xi
      space.
      The definition of Xi in (15.30) is recursive and it requires that for any feasible
      initial state xi ∈ Xi there exists a feasible input ui which keeps the next state
      A(wip )x + B(wip )u + Ewia in the feasible set Xi+1 for all feasible disturbances wia ∈
      W a , wip ∈ W p .
          Initializing XN to Xf and solving (15.30) backward in time yields the feasible set
      X0 for the CROC-CL (15.14)–(15.16) which, as shown in Example 15.1, is different
      from X0OL .
          Let Xi be the H-polyhedron AXi x ≤ bXi . Then the set Xi−1 is the projection
      of the following polyhedron
                                                                          
                  Au                      0                            bu
                  0      ui−1 +       Ax       xi−1 ≤             bx      
                       p                      p                             a
             AXi B(wi )              AXi A(wi )                   bXi − Ewi
                                                                for all wia ∈ {wa,i }ni=1
                                                                                       Wa
                                                                                          ,
                                                                for all wip ∈ {wp,i }ni=1
                                                                                       Wp
(15.31)
      on the xi−1 space. (Note that we have used Lemma 10.1 and imposed state con-
      straints at all the vertices of the sets W a × W p .)
          Remark 15.4 When only additive disturbances are present (i.e., np = 0), vertex
          enumeration is not required and a set of linear programs can be used to transform the
          constraints in (15.30) into a smaller number of constraints than (15.31) as explained
          in Lemma 10.2.
         The backward evolution in time of the feasible sets Xi enjoys the properties
      described by Theorems 11.1 and 11.2 for the nominal case. In particular if a
      robust controlled invariant set is chosen as terminal constraint Xf , then set Xi
      grows as i becomes smaller and stops growing when it becomes the maximal robust
      stabilizable set.
      Theorem 15.1 Let the terminal constraint set Xf be a robust control invariant
      subset of X . Then,
15.2    Feasible Solutions                                                                       329
xk+1 = xk + uk + wk (15.32)
      where x, u and w are state, input and disturbance, respectively. Let uk ∈ [−1, 1]
      and wk ∈ [−1, 1] be the feasible input and disturbance. The objective for player U
      is to play two moves in order to keep the state at time three x3 in the set Xf = [−1, 1].
         • Batch approach
           We rewrite the terminal constraint as
                       x3 = x0 + u0 + u1 + u2 + w0 + w1 + w2 ∈ [−1, 1]
                                                                                              (15.33)
                         for all w0 ∈ [−1, 1], w1 ∈ [−1, 1], w2 ∈ [−1, 1]
                                         −1 ≤ x0 + u0 + u1 + u2 + 3 ≤ 1
                                         −1 ≤ x0 + u0 + u1 + u2 + 1 ≤ 1
                                                                                              (15.34)
                                         −1 ≤ x0 + u0 + u1 + u2 − 1 ≤ 1
                                         −1 ≤ x0 + u0 + u1 + u2 − 3 ≤ 1
2 ≤ x0 + u0 + u1 + u2 ≤ −2 (15.35)
           which is infeasible and thus X0 = ∅. For the sake of clarity we continue with
           the procedure as if we did not notice that constraint (15.35) was infeasible.
           The set X0OL is the projection on the x0 space of the polyhedron P0 of combined
15.2   Feasible Solutions                                                                                                   331
       • Recursive approach
         For the recursive approach we have X3 = Xf = [−1, 1]. We rewrite the terminal
         constraint as
                              x3 = x2 + u2 + w2 ∈ [−1, 1] for all w2 ∈ [−1, 1]                           (15.36)
          which by Lemma 10.1 becomes
                                              −1 ≤ x2 + u2 + 1 ≤ 1
                                                                                                         (15.37)
                                              −1 ≤ x2 + u2 − 1 ≤ 1
          which by removing redundant constraints becomes
                                                 0 ≤ x2 + u2 ≤ 0.
          The set X2 is the projection on         the x2 space of the polyhedron
                                                                     
                                      1            0               1
                                   −1             0                  
                                                      u2 ≤  1                                        (15.38)
                                   1              1      x2       0 
                                     −1           −1                 0
          which yields X2 = [−1, 1]. Since X2 = X3 one can conclude that X2 is the
          maximal controllable robust invariant set and X0 = X1 = X2 = [−1, 1].
                                          −1 ≤ x0 + u0 + ũ11 + ũ12 − 1 − 1 + 1 ≤ 1
                                          −1 ≤ x0 + u0 + ũ11 + ũ12 − 1 − 1 − 1 ≤ 1
                                          −1 ≤ x0 + u0 + ũ11 + ũ22 − 1 + 1 + 1 ≤ 1
                                          −1 ≤ x0 + u0 + ũ11 + ũ22 − 1 + 1 − 1 ≤ 1
                                          −1 ≤ x0 + u0 + ũ21 + ũ32 + 1 − 1 + 1 ≤ 1
                                          −1 ≤ x0 + u0 + ũ21 + ũ32 + 1 − 1 − 1 ≤ 1
                                          −1 ≤ x0 + u0 + ũ21 + ũ42 + 1 + 1 + 1 ≤ 1
                                          −1 ≤ x0 + u0 + ũ21 + ũ42 + 1 + 1 − 1 ≤ 1                         (15.40)
                                                      −1 ≤ u0 ≤ 1
                                                      −1 ≤ ũ11 ≤ 1
                                                      −1 ≤ ũ21 ≤ 1
                                                      −1 ≤ ũ12 ≤ 1
                                                      −1 ≤ ũ22 ≤ 1
                                                      −1 ≤ ũ32 ≤ 1
                                                      −1 ≤ ũ42 ≤ 1.
       where the polyhedral sets CR0i = {H0i x ≤ k0i }, i = 1, . . . , N0r , are a partition of the
       feasible set X0OL . Moreover f0 can be found by solving an mp-LP for cost (15.9)
       and an mp-QP for cost (15.10). The same result holds for u∗ (k) = fkOL (x(0)), k =
       1, . . . , N − 1.
            Proof: The proof can be easily derived from the results in Chapter 11. The
       only difference is that the constraints have to be first “robustified” as explained in
       Section 15.2.                                                                       
       Theorem 15.3 There exists a state feedback control law u∗ (k) = fk (x(k)), fk :
       Xk ⊆ Rn → U ⊆ Rm , solution of the CROC-CL (15.14)–(15.16) with cost (15.18),
       (15.21) and k = 0, . . . , N −1 which is time-varying, continuous and piecewise affine
       on polyhedra
       Lemma 15.1 Let f : Rs ×Rn ×Rnw → R and g : Rs ×Rn ×Rnw → Rng be functions
       of (z, x, w) convex in w for each (z, x). Assume that the variable w belongs to the
       polyhedron W with vertices {w̄i }N
                                        i=1 . Then the min-max multiparametric problem
                                          W
            Proof: Easily follows from the fact that the maximum of a convex function
       over a convex set is attained at an extreme point of the set, cf. also [259]. 
       Corollary 15.1 If f is convex and piecewise affine in (z, x), i.e., f (z, x, w) =
       maxi=1,...,nf {Li (w)z + Hi (w)x + Ki (w)} and g is linear in (z, x) for all w ∈ W,
       g(z, x, w) = Lg (w)z + Hg (w)x + Kg (w) (with Lg (·), Hg (·), Kg (·), Li (·), Hi (·),
       Ki (·), i = 1, . . . , nf , convex functions), then the min-max multiparametric prob-
       lem (15.43) is equivalent to the mp-LP problem
        J ∗ (x) =   minµ,z µ
                    subj. to µ ≥ Lj (w̄i )z + Hj (w̄i )x + Kj (w̄i ), i = 1, . . . , NW , j = 1, . . . , nf
                             Lg (w̄i )z + Hg (w̄i )x ≤ −Kg (w̄i ), i = 1, . . . , NW .
                                                                                             (15.45)
            Remark 15.5 As discussed in Lemma 10.2, in the case g(z, x, w) = g1 (z, x) + g2 (w),
           the second constraint        in (15.44) can be replaced by g1 (z, x) ≤ −ḡ, where ḡ =
                               ′
             ḡ1 , . . . , ḡng is a vector whose i-th component is
             and g2i (w) denotes the i-th component of g2 (w). Similarly, if f (z, x, w) = f1 (z, x) +
             f2 (w), the first constraint in (15.44) can be replaced by µ ≥ f1 (z, x) + f¯, where
             Clearly, this has the advantage of reducing the number of constraints in the multi-
             parametric program from NW ng to ng for the second constraint in (15.44) and from
             NW nf to nf for the first constraint in (15.44).
         Theorem 15.4 Consider the CROC-OL (15.5), (15.8), (15.9), (15.11). Assume
         that the parametric uncertainties are in the B matrix only (A(wp ) = A). Then,
         there exists a solution u∗ (0) = f0OL (x(0)), f0OL : Rn → Rm , which is continuous
         and PPWA
                          f0OL (x) = F0i x + g0i if x ∈ CR0i , i = 1, . . . , N0r   (15.48)
         where the polyhedral sets CR0i = {H0i x ≤ k0i }, i = 1, . . . , N0r , are a partition of the
         feasible set X0OL . Moreover f0 can be found by solving an mp-LP. The same result
         holds for u∗ (k) = fkOL (x(0)), k = 1, . . . , N − 1.
                                           Pk−1             p
              Proof: Since xk = Ak x0 + k=0 Ai [B(wk−1−i           )uk−1−i + Ewk−1−ia
                                                                                              ] is a linear
                                                                                  p             p
         function of the disturbances wa = {w0a , . . . , wN
                                                           a
                                                             −1 }, and w p
                                                                           =   {w 0 , . . . , w N −1 } for a
         fixed input sequence and x0 , the cost function in the maximization problem (15.8) is
         convex and piecewise affine with respect to the optimization vectors wa and wp and
         the parameters U0 , x0 . The constraints in (15.11) are linear in U0 and x0 , for any
         wa and wp . Therefore, by Corollary 15.1, problem (15.8)–(15.11) can be solved by
         specifying the constraints (15.11) only at the vertices of the set W a ×W a ×. . .×W a
         and W p × W p × . . . × W p and solving an mp-LP. The theorem follows from the
         mp-LP properties described in Theorem 6.5.                                                       
             Remark 15.6 Note that Theorem 15.4 does not hold when parametric uncertainties
             are present also in the A matrix. In this case the predicted state xk is a nonlinear
             function of the vector wp .
             Remark 15.7 In case of CROC-OL with additive disturbances only (wp (t) = 0) the
             number of constraints in (15.11) can be reduced as explained in Remark 15.5.
                                                                                   
                                                 kQxN −1 kp + kRuN −1 kp +         
                                                           p
JN −1 (xN −1 , uN −1 ) = a      maxp              +kP (A(wN  −1  )xN −1 +             .
                        wN −1 ∈W a , wN −1 ∈W p       p                  a         
                                                  +B(wN  −1 )u N −1 + Ew  N −1 )k p
                                                                                   (15.52)
The cost function in the maximization problem (15.52) is piecewise affine and
                                                        a       p
convex with respect to the optimization vector wN         −1 , wN −1 and the parameters
uN −1 , xN −1 . Moreover, the constraints in the minimization problem (15.51) are
                                            a       p
linear in (uN −1 , xN −1 ) for all vectors wN −1 , wN −1 . Therefore, by Corollary 15.1,
  ∗              ∗
JN −1 (xN −1 ), uN −1 (xN −1 ) and XN −1 are computable via the mp-LP:
        ∗
       JN −1 (xN −1 ) =      min      µ
                            µ,uN −1
where {w̄ia }ni=1 and {w̄hp }nh=1 are the vertices of the disturbance sets W a and
               Wa              Wp
   p                                   ∗
W , respectively. By Theorem 6.5, JN     −1 is a convex and piecewise affine function
of xN −1 , the corresponding optimizer u∗N −1 is piecewise affine and continuous,
and the feasible set XN −1 is a convex polyhedron. Therefore, the convexity and
linearity arguments still hold for j = N −2, . . . , 0 and the procedure can be iterated
backwards in time j, proving the theorem. The theorem follows from the mp-LP
properties described in Theorem 6.5.                                                  
336                                                        15   Constrained Robust Optimal Control
             Remark 15.8 Let na and nb be the number of inequalities in (15.53a) and (15.53c),
             respectively, for any i and h. In case of additive disturbances only (nW p = 0) the
             total number of constraints in (15.53a) and (15.53c) for all i and h can be reduced
             from (na + nb )nW a nW p to na + nb as shown in Remark 15.5.
             Remark 15.9 The closed-loop solution u∗ (k) = fk (x(k)) can be also obtained by using
             the modified batch approach with closed-loop prediction as discussed in Section 15.2.
             The idea there is to augment the number of free inputs by allowing one sequence
             ũi0 , . . . ũiN−1 for each vertex i of the disturbance set W a × W a × . . . × W a . The large
                                                                          |        {z           }
                                                                                     N−1
             number of extreme points of such a set and the resulting large number of inputs and
             constraints make this approach computationally hard.
is an mp-MILP.
     Proof: By following the approach of [42] to transform piecewise affine func-
tions into a set of mixed-integer linear inequalities, introduce the auxiliary binary
optimization variables δi ∈ {0, 1}, defined as
                                                          
                                     [δi = 1] ↔ [ xz ] ∈ Ri ,                    (15.57)
                                                                 PnJ
where δi , i = 1, . . . , nJ , satisfy the exclusive-or condition i=1 δi = 1, and set
                                         nJ
                                         X
                           J(z, x) =           qi                                (15.58)
                                         i=1
                                qi   =   [Li z + Hi x + Ki ]δi                   (15.59)
  Next we present two theorems which describe how to use mp-MILP to solve
CROC-OL and CROC-CL problems.
Theorem 15.6 By solving two mp-MILPs, the solution U0∗ (x0 ) to the CROC-
OL (15.8), (15.9), (15.11) with additive disturbances only (np = 0) can be computed
in explicit piecewise affine form (15.48).
       Proof: The objective function in the maximization problem (15.8) is convex
and piecewise affine with respect to the optimization vector wa = {w0a , . . . , wN
                                                                                  a
                                                                                    −1 }
and the parameters U = {u0 , . . . , uN −1 }, x0 . By Lemma 15.2, it can be solved via
mp-MILP. By Theorem 6.10, the resulting value function J is a piecewise affine
function of U and x0 and the constraints in (15.11) are a linear function of the
disturbance wa for any given U and x0 . Then, by Lemma 15.2 and Corollary 15.1
the minimization problem is again solvable via mp-MILP, and the optimizer U ∗ =
{u∗0 ,. . . ,u∗N −1 } is a piecewise affine function of x0 .                         
where L ∈ RmN ×nN and g ∈ RmN are unknown feedback control gain and offset,
respectively. With the parametrization (15.63) the robust control problem (15.60-
(15.62) becomes
                                                             PN −1
         J0Lg (x(0), L, g) = maxw0a ,...,wN
                                          a
                                            −1
                                               p(xN ) +         k=0   q(xk , uk )
                                        
                                        
                                         xk+1 = Axk + Buk + Ewka
                                         wa ∈ W a ,                                    (15.65)
                                            k  P
                               subj. to
                                        
                                         u k = ki=0 Lk,i xi + gi
                                        
                                          k = 0, . . . , N − 1
        ∗
   J0Lg (x0 ) = min J0Lg (x0 , L, g)                                                    (15.66)
                L,g
                                                                  
                          
                              xk ∈ X , uk ∈ U                     
                                                                   
                          
                                       Ax + Buk + Ewka            
                                                                   
                           xk+1 =   Pk k                          
                                                                     ∀wka ∈ W a
               subj. to        uk = i=0 Lk,i xi + gi
                          
                                                                  
                                                                    ∀k = 0, . . . , N − 1.
                          
                              x ∈ Xf                              
                                                                   
                           N                                      
                               k = 0, . . . , N − 1
                                                                                        (15.67)
We denote with X0Lg ⊆ X the set of states x0 for which the robust optimal control
problem (15.66)-(15.67) is feasible, i.e.
                    n                                o
       X0Lg =           x0 ∈ Rn : P0Lg (x0 ) 6= ∅
      P0Lg (x0 ) = {L, g : xk ∈ X , uk ∈ U, k = 0, . . . , N − 1, xN ∈ Xf
                   ∀ wka ∈ W a k = 0, . . . , N − 1,
                                                               Pk
                   where xk+1 = Axk + Buk + Ewka , uk = i=0 Lk,i xi + gi }.
                                                                              (15.68)
    Problem (15.65) looks for the worst value of the performance index J0Lg (x0 , L, g)
and the corresponding worst sequences wa ∗ as a function of x0 and the controller
gain L and offset g.
    Problem (15.66)–(15.67) minimizes (over L and g) the worst performance sub-
ject to the constraint that the input sequence U0 = Lx + g must be feasible for
all possible disturbance realizations. Notice that formulation (15.65)–(15.67) is
based on a closed-loop prediction. Unfortunately the set P0Lg (x0 ) is non–convex,
in general [194]. Therefore, finding L and g for a given x0 may be difficult.
    Consider now the parametrization of the control sequence in past disturbances
                             k−1
                             X
                     uk =          Mk,i wia + vi ,   k ∈ {0, . . . , N − 1},            (15.69)
                             i=0
                                         U0 = M w a + v
340                                           15     Constrained Robust Optimal Control
      where
                                                                          
                           0     ···       ···        0               v0
                                                                      
                                                                       ..
                         M1,0    0        ···        0              
                                                                        .
                  M =     ..    ..        ..         ..  ,     
                                                               v=      .            (15.70)
                                                                       
                                                                        ..
                            .       .         .        .              .
                      MN −1,0    ···    MN −1,N −2    0           vN −1
         Notice that since
                      Ewka = xk+1 − Axk − Buk ,        k ∈ {0, . . . , N − 1}.
      the parametrization (15.69) can also be interpreted as a parametrization in the
      states. The advantages of using (15.69) are explained next.
          With the parametrization (15.69) the robust control problem (15.60-(15.62)
      becomes
                                                           P −1
              J0Mv (x0 , M, v) = maxw0a ,...,wN
                                              a
                                                −1
                                                   p(xN ) + N
                                                            k=0 q(xk , uk )
                                          
                                          
                                           xk+1 = Axk + Buk + Ewka
                                           wa ∈ W a ,                                (15.71)
                                              k  Pk−1
                                 subj. to
                                           uk = i=0
                                                           Mk,i wia + vi
                                          
                                            k = 0, . . . , N − 1
              ∗
         J0Mv (x0 ) = min J0Mv (x0 , M, v)                                            (15.72)
                      M,v
                                                                 
                                
                                   xk ∈ X , uk ∈ U               
                                                                  
                                
                                            Ax + Buk + Ewka      
                                                                  
                                 xk+1 =  Pk−1k                   
                                                                    ∀wka ∈ W a
                     subj. to       u = i=0 Mk,i wia + vi
                                 k
                                                                  ∀k = 0, . . . , N − 1.
                                                                  
                                
                                   x ∈ Xf                        
                                                                  
                                 N                               
                                    k = 0, . . . , N − 1
                                                                                      (15.73)
      The problem (15.71)-(15.73) is now convex in the controller parameters M and v.
      As solution we obtain u∗ (0) = f0 (x(0)) = v0 (x(0)).
         We denote with X0Mv ⊆ X the set of states x0 for which the robust optimal
      control problem (15.72)-(15.73) is feasible, i.e.
                                                 	
        X0Mv =         x0 ∈ Rn : P0Mv (x0 ) 6= ∅
        P0Mv (x0 ) = {M, v : xk ∈ X , uk ∈ U, k = 0, . . . , N − 1, xN ∈ Xf
                     ∀ wka ∈ W a k = 0, . . . , N − 1, where xk+1 = Axk + Buk + Ewka ,
                           Pk−1
                     uk = i=0 Mk,i wia + vi }.
                                                                                (15.74)
      The following result has been proven in [130], the convexity property has also
      appeared in [194][Section 7.4].
      Theorem 15.8 Consider the control parameterizations (15.63), (15.69) and the
      corresponding feasible sets X0Lg in (15.68) and X0Mv in (15.74). Then,
                                          X0Lg = X0Mv
      and P0Mv (x0 ) is convex in M and v.
15.5   Parametrizations of the Control Policies                                                      341
                                              ∗
     Note that in general X0Mv and J0Mv (x0 ) are different from the corresponding
                                                                           ∗
CROC-CL solutions X0 and J0∗ (x0 ). In particular X0Mv ⊆ X0 and J0Mv (x0 ) ≥
J0∗ (x0 ).
     Next we solve the problem in Example 15.2 by using the approach discussed in
this section. The example will shed some light on how to compute the disturbance
feedback gains by means of convex optimization.
xk+1 = xk + uk + wk (15.75)
    where x, u and w are state, input and disturbance, respectively. Let uk ∈ [−1, 1] and
    wk ∈ [−1, 1] be the feasible input and disturbance. The objective for player U is to
    play two moves in order to keep the state x3 in the set Xf = [−1, 1].
    Rewrite the terminal constraint as
                      x3 = x0 + u0 + u1 + u2 + w0 + w1 + w2 ∈ [−1, 1]
                                                                                          (15.76)
                       ∀ w0 ∈ [−1, 1], w1 ∈ [−1, 1], w2 ∈ [−1, 1].
                                  u0 = v0
                                  u1 = v1 + M1,0 w0                                       (15.77)
                                  u2 = v2 + M2,0 w0 + M2,1 w1 .
    There are two approaches to convert the infinite number of constraints (15.78) into
    a set of finite number of constraint. The first approach has been already presented
    in this chapter and resorts to disturbance vertex enumeration. The second approach
    uses duality. We will present both approaches next.
• Enumeration method
        be rewritten as:
           x0 + v0 + v1 + v2 + (1 + M1,0 + M2,0 ) + (1 + M2,1 ) + 1 ∈ [−1, 1]
           x0 + v0 + v1 + v2 + (1 + M1,0 + M2,0 ) + (1 + M2,1 ) − 1 ∈ [−1, 1]
           x0 + v0 + v1 + v2 − (1 + M1,0 + M2,0 ) + (1 + M2,1 ) + 1 ∈ [−1, 1]
           x0 + v0 + v1 + v2 − (1 + M1,0 + M2,0 ) + (1 + M2,1 ) − 1 ∈ [−1, 1]
           x0 + v0 + v1 + v2 + (1 + M1,0 + M2,0 ) − (1 + M2,1 ) + 1 ∈ [−1, 1]
           x0 + v0 + v1 + v2 + (1 + M1,0 + M2,0 ) − (1 + M2,1 ) − 1 ∈ [−1, 1]
           x0 + v0 + v1 + v2 − (1 + M1,0 + M2,0 ) − (1 + M2,1 ) + 1 ∈ [−1, 1]
           x0 + v0 + v1 + v2 − (1 + M1,0 + M2,0 ) − (1 + M2,1 ) − 1 ∈ [−1, 1]     (15.79)
           u0 = v0 ∈ [−1, 1]
           u1 = v1 + M1,0 ∈ [−1, 1]
           u1 = v1 − M1,0 ∈ [−1, 1]
           u2 = v2 + M2,0 + M2,1 ∈ [−1, 1]
           u2 = v2 + M2,0 − M2,1 ∈ [−1, 1]
           u2 = v2 − M2,0 + M2,1 ∈ [−1, 1]
           u2 = v2 − M2,0 − M2,1 ∈ [−1, 1].
                                             u0 = −0.8
                                             u1 = −w0                             (15.81)
                                             u2 = −w1
        which corresponds to
                                             u0 = −0.8
                                             u1 = −x1                             (15.82)
                                             u2 = −x2 .
      • Duality method
        Duality can be used to avoid vertex enumeration. Consider the first constraint
        in (15.78):
        where
         J ∗ (M1,0 , M2,0 , M2,1 )=maxw0 ,w1 ,w2(1 + M1,0 + M2,0 )w0 + (1 + M2,1 )w1 + w2
                                      subj. to  w0 ∈ [−1, 1], w1 ∈ [−1, 1], w2 ∈ [−1, 1].
                                                                                   (15.85)
        For fixed M1,0 , M2,0 , M2,1 the optimization problem in (15.85) is a linear pro-
        gram and can be replaced by its dual
where
            d∗ (M1,0 , M2,0 , M2,1 ) = minλu ,λl    λu0 + λu1 + λu2 + λl0 + λl1 + λl2
                                            i  i
                                      subject to    1 + M1,0 + M2,0 + λl0 − λu0 = 0
                                                    1 + M2,1 + λl1 − λu1 = 0             (15.87)
                                                    1 + λl2 − λu2 = 0
                                                    λui ≥ 0, λli ≥ 0, i = 0, 1, 2
         where λui and λli are the dual variables corresponding to the upper- and lower-
         bounds of wi , respectively. From strong duality we know that for a given v0 ,
         v1 , v2 , M1,0 , M2,0 , M2,1 problem (15.84)-(15.85) is feasible if and only if there
         exists a set of λui and λli which together with v0 , v1 , v2 , M1,0 , M2,0 , M2,1 solves
         the system of equalities and inequalities
is transformed into
         and
                              u1 = v1 + M1,0 w0 ∈ [−1, 1]
                              ∀ w0 ∈ [−1, 1], w1 ∈ [−1, 1], w2 ∈ [−1, 1]
         is transformed into
                                         v1 + ν0u + ν0l ≤ 1
                                         −v1 + κu0 + κl0 ≤ 1
                                         M1,0 + ν1l − ν1u = 0                            (15.90)
                                         −M1,0 + κl1 − κu1 = 0
                                         κu0 , κl0 , ν0u , ν0l ≥ 0,
         and
                             u2 = v2 + M2,0 w0 + M2,1 w1 ∈ [−1, 1]
                              ∀ w0 ∈ [−1, 1], w1 ∈ [−1, 1], w2 ∈ [−1, 1]
344                                               15     Constrained Robust Optimal Control
              is transformed into
                                         v2 + ρu0 + ρu1 + ρl0 + ρl1 ≤ 1
                                         −v2 + π0u + π1u + π0l + π1l ≤ 1
                                         M2,0 + ρl0 − ρu0 = 0
                                         M2,1 + ρl1 − ρu1 = 0                            (15.91)
                                         −M2,0 + π0l − π0u = 0
                                         −M2,1 + π1l − π1u = 0
                                         ρui , ρli , πiu , πil ≥ 0, i = 0, 1
15.6 Example
         Example 15.4 Consider the problem of robustly regulating to the origin the system
                                                           
                                    1    0.1            −0.5
                      x(t + 1) =               x(t) +           u(t) + wa (t)
                                   −0.2   1              1
U = {u ∈ R : − 3 ≤ u ≤ 1}
X = {x ∈ R2 : − 10 ≤ x ≤ 10, k = 0, . . . , 3}.
   in Example 15.3. The resulting polyhedral partition for k = 0 consists of 136 regions
   and is depicted in Figure 15.3(a). Figure 15.3(b) shows the set of feasible initial
   states X0OL , X0 and X0M v corresponding to the controllers CROC-OL, CROC-CL
   and CROC-Parameterized, respectively.
   x2
                                                 x2
                           x1                                        x1
       (a) Example 15.4. Solution to the          (b) Example 15.4. Solution to the
       CROC-OL problem. Polyhedral                CROC-CL problem. Polyhedral
       partition of the state space.              partition of the state space.
        Figure 15.2 Example 15.4. Polyhedral partition of the state space corre-
        sponding to the explicit solution of CROC-OL and CROC-CL at time t = 0.
X0 = X0Mv
                                                                      X0OL
                                                 x2
   x2
x1 x1
        Figure 15.3 Example 15.4. (a) Polyhedral partition of the state space cor-
        responding to the explicit solution of CROC-Parametrized at time t = 0.
        (b) Sets X0OL , X0 and X0M v corresponding to the controllers CROC-OL,
        CROC-CL and CROC-Parameterized, respectively.
346                                              15   Constrained Robust Optimal Control
x(k + 1) = A(wp )x(k) + B(wp )f0 (x(k)) + Ewa = fcl (x(k), wp , wa ), k ≥ 0 (15.94)
           If the CROC falls in one of the classes presented in Section 15.1.1 then from the
       theorems presented in this chapter we can immediately conclude that the robust
       RHC law (15.93) is piecewise affine and thus its on-line computation comprises a
       function evaluation.
           As discussed in Chapter 12 convergence and persistent feasibility of the robust
       receding horizon controller are not guaranteed for nominal receding horizon con-
       trollers. In the robust RHC case it is desirable to obtain robust convergence to a
       set O ⊆ Xf (rather than convergence to an equilibrium point) for all X0 . In other
       words, the goal is to design a RHC control law which drives any feasible state in
       X0 into the set O for all admissible disturbances and keeps the states inside the set
       O for all future time and for all admissible disturbances. Clearly this is possible
       only if O is a robust control invariant set for system (15.1)-(15.4).
           We define a distance of a point x ∈ Rn from a nonempty set Y ⊂ Rn as:
           The following theorem presents sufficient conditions for convergence and per-
       sistent feasibility in the robust case. It can be proven by using the arguments
       of Theorem 12.2. Slightly modified versions can be found with proof and further
       discussion in [247, p. 213-217, p. 618] and in [23, Section 7.6].
       Theorem 15.9 Consider system (15.1)-(15.4), the closed-loop RHC law (15.93)
       where f0 (x) is obtained by solving the CROC-CL (15.14)–(15.16) with cost (15.20), (15.21)
       for x(0) = x and the closed-loop system (15.94). Assume that
       (A0) There exist constants c1 , c2 , c3 , c4 > 0 such that
           Remark 15.10 Robust control invariance of the set O in assumption (A2) of Theo-
           rem 15.9 is also implicitly guaranteed by assumption (A3) as shown next.
           Because of assumption (A0), assumption (A3) in O becomes
                           min max
                               a  p
                                    (p(A(wp )x + B(wp )u + Ewa ) ≤ 0 ∀x ∈ O.
                            u   w ,w
           From assumption (A4), this can be verified only if it is equal to zero, i.e., if there
           exists a u ∈ U such that A(wp )x + B(wp )u + Ewa ∈ O for all wa ∈ W a wp ∈ W p
           (since O is the only place where p(x) can be zero). This implies the robust control
           invariance of O.
      rithms 10.4, 10.5 for computing robust invariant sets (and their finite termination)
      see [10, 49, 172, 124, 164].
          Min-max robust constrained optimal control was originally proposed by Witsen-
      hausen [289]. In the context of robust MPC, the problem was tackled by Campo
      and Morari [78], and further developed in [5] for SISO FIR plants. Kothare et
      al. [180] optimize robust performance for polytopic/multi-model and linear frac-
      tional uncertainty, Scokaert and Mayne [259] for additive disturbances, and Lee
      and Yu [189] for linear time-varying and time-invariant state space models depend-
      ing on a vector of parameters θ ∈ Θ, where Θ is either an ellipsoid or a polyhe-
      dron. Other suboptimal CROC-Cl strategies have been proposed in [180, 29, 181].
      For stability and feasibility of the robust RHC (15.1), (15.93) we refer the reader
      to [43, 197, 204, 23].
          The idea of the parametrization (15.69) appears in the work of Gartska & Wets
      in 1974 in the context of stochastic optimization [119]. Recently, it re-appeared in
      robust optimization work by Guslitzer and Ben-Tal [136, 46], and in the context
      of robust MPC in the work of van Hessem & Bosgra, Löfberg and Goulart &
      Kerrigan [281, 194, 130].
            Part V
       Hybrid systems describe the dynamical interaction between continuous and discrete
       signals in one common framework (see Figure 16.1). In this chapter we focus our
       attention on mathematical models of hybrid systems that are particularly suitable
       for solving finite time constrained optimal control problems.
                     binary                                            binary
                     inputs                 discrete                  outputs
                                           dynamics
                                           and logic
                                                                                 mode
                events
                                                                                switches
                                           continuous
                                            dynamics
                   real-valued                                       real-valued
                     outputs                                           inputs
       tion Language), a high level language for modeling and simulating DHA. Therefore,
       DHA will represent for us the starting point for modeling hybrid systems. We will
       show that DHA, PWA, and MLD systems are equivalent model classes, and in par-
       ticular that DHA systems can be converted to an equivalent PWA or MLD form
       for solving optimal control problems.
           After introducing PWA systems, we will go through the steps needed for model-
       ing a system as a DHA. We will first detail the process of translating propositional
       logic involving Boolean variables and linear threshold events over continuous vari-
       ables into mixed-integer linear inequalities, generalizing several results available in
       the literature, in order to get an equivalent MLD form of a DHA system. Finally, we
       will briefly present the tool HYSDEL that allows to describe the DHA in a textual
       form and to obtain equivalent MLD and PWA representations in MATLAB
             R
                                                                                          .
                                               x-space
                                                                      C3
                            C4
                            C7
C1
C6
C2 C5
       Figure 16.2 Piecewise affine (PWA) systems. Mode switches are triggered
       by linear threshold events. In each one of the shaded regions the affine mode
       dynamics is different.
where x(t) ∈ Rn is the state vector at time t ∈ T and T = {0, 1, . . .} is the set
of nonnegative integers, u(t) ∈ Rm is the input vector, y(t) ∈ Rp is the output
vector, i(t) ∈ I = {1, . . . , s} is the current mode of the system, the matrices Ai(t) ,
B i(t) , f i(t) , C i(t) , Di(t) , g i(t) , H i(t) , J i(t) , K i(t) are constant and have suitable
dimensions, and the inequalities in (16.1c) should be interpreted component-wise.
Each linear inequality in (16.1c) defines a half-space in Rn and a corresponding
hyperplane, that will be referred to as guardline. Each vector inequality (16.1c)
defines a polyhedron C i = {[ xu ] ∈ Rn+m : H i x + J i u ≤ K i } in the state+input
space Rn+m that will be referred to as cell, and the union of such polyhedral cells as
partition. We assume that C i are full-dimensional sets of Rn+m , for all i = 1, . . . , s.
    A PWA system is called well-posed if it satisfies the following property [40]:
Definition 16.1 Let P be a PWA system of the form (16.1) and let C = ∪si=1 C i ⊆
Rn+m be the polyhedral partition associated with it. System P is called well-posed
if for all pairs (x(t), u(t)) ∈ C there exists only one index i(t) satisfying (16.1).
Definition 16.1 implies that x(t+1), y(t) are single-valued functions of x(t) and u(t),
and therefore that state and output trajectories are uniquely determined by the
initial state and input trajectory. A relaxation of definition 16.1 is to let polyhedral
cells C i share one or more hyperplanes. In this case the index i(t) is not uniquely
defined, and therefore the PWA system is not well-posed. However, if the mappings
(x(t), u(t)) → x(t + 1) and (x(t), u(t)) → y(t) are continuous across the guardlines
that are facets of two or more cells (and, therefore, they are continuous on their
domain of definition), such mappings are still single valued.
354                                                                   16       Models of Hybrid Systems
         where ǫ > 0 is an arbitrarily small number, for instance the machine precision.
         Clearly, system (16.2) is not defined for 0 < x(t) < ǫ, i.e., for the values of the state
         that cannot be represented in the machine. However, the trajectories produced
         by (16.2a) and (16.2b) are identical as long as x(t) > ǫ or x(t) ≤ 0, ∀t ∈ N.
             As remarked above, multiple definitions of the state-update and output func-
         tions over common boundaries of sets C i is a technical issue that arises only when
         the PWA mapping is discontinuous. Rather than disconnecting the domain, an-
         other way of dealing with discontinuous PWA mappings is to allow strict inequal-
         ities in the definition of the polyhedral cells in (16.1), or by dealing with open
         polyhedra and boundaries separately as in [266]. We prefer to assume that in the
         definition of the PWA dynamics (16.1) the polyhedral cells C i(t) are closed sets.
         As will be clear in the next chapter, the closed-polyhedra description is mainly
         motivated by the fact that numerical solvers cannot handle open sets.
                                 x1
                                                    time
mode
                                                    time
                  Figure 16.3 Example 16.1. Free response of state x1 for x(0) = [1 0].
             In case the partition C does not cover the whole space Rn+m , well-posedness
         does not imply that trajectories are persistent, i.e., that for all t ∈ N a successor
         state x(t + 1) and an output y(t) are defined. A typical case of C 6= Rn+m is
         when we are dealing with bounded inputs and bounded states umin ≤ u(t) ≤ umax ,
         xmin ≤ x(t) ≤ xmax . By embedding such ranges in the inequalities (16.1c), the
         system becomes undefined outside the bounds, as no index i exists that satisfies
         any set of inequalities (16.1c).
             As will be clearer in the next chapter, when model (16.1) is used in an opti-
         mal control formulation, any input sequence and initial state that are feasible for
         the related optimization problem automatically define unique trajectories over the
         whole optimal control horizon.
             PWA systems can model a large number of physical processes, as they can
         model static nonlinearities through a piecewise affine approximation, or approxi-
         mate nonlinear dynamics via multiple linearizations at different operating points.
         Moreover, tools exist for obtaining piecewise affine approximations automatically
         (see Section 16.8).
             When the mode i(t) is an exogenous variable, condition (16.1c) disappears and
         we refer to (16.1) as a switched affine system (SAS), see Section 16.3.1.
         When dealing with hybrid systems, quite often one encounters some signals that
         can only assume a binary value, namely either 0 or 1. In the most general form, let
         us assume that the state vector x = [ xxcℓ ] where xc ∈ Rnc are the continuous states,
         xℓ ∈ Rnℓ are the binary states, and n = nc + nℓ . Similarly, let y ∈ Rpc × {0, 1}pℓ ,
         p = pc + pℓ , u ∈ Rmc × {0, 1}mℓ , m = mc + mℓ . By defining a polyhedral partition
               s−1
         {C i }i=0 of the sets of state and input space Rn+m , for any xℓ ∈ {0, 1} and uℓ ∈
         {0, 1} a sufficient condition for the PWA system (16.1) to be well posed is that
         the rows and columns of matrices Ai , B i , C i , Di corresponding to binary states
         and binary outputs are zero and that the corresponding rows of matrices f i , g i are
         either 0 or 1, i.e., that the binary state update and output equations are binary
         piecewise constant functions.
              In the following sections we will treat 0-1 binary variables both as numbers
356                                                             16      Models of Hybrid Systems
      (over which arithmetic operations are defined) and as Boolean variables (over which
      Boolean functions are defined, see Section 16.3.3). The variable type will be clear
      from the context.
         As an example, it is easy to verify that the hybrid dynamical system
      where “∧” represents the logic operator “and”,            can be represented in the PWA
      form
                                                 
                                 2xc (t) + uc (t)
                         
                                                    if             xℓ ≤ 12 , uℓ ≤   1
                         
                                         0                                          2
                         
                         
                         
                                                 
                         
                            2xc (t) + uc (t) − 3
                         
                                                    if             xℓ ≤ 21 , uℓ ≥   1
                                                                                         +ǫ
                       
                                      0                                             2
          xc
               (t + 1) =                                                                          (16.5c)
          xℓ             
                                 2xc (t) + uc (t)
                         
                                                    if             xℓ ≥   1
                                                                               + ǫ, uℓ ≤   1
                         
                                         0                                2               2
                         
                         
                         
                         
                         
                                                 
                         
                            2xc (t) + uc (t) − 3                          1               1
                                                    if             xℓ ≥   2   + ǫ, uℓ ≥   2   +ǫ
                                       1
          where x1 and x2 = ẋ1 denote the position and the velocity of the mass, respectively,
          and u1 a continuous force input. The binary input u2 switches the friction coefficient
                                                    
                                                        b1 if u2 = 1
                                        b(u2 ) =
                                                        b2 if u2 = 0.
          The system has four modes, depending on the binary input u2 and the position x1 .
          Assuming that the system parameters are M = 1, b1 = 1, b2 = 50, k1 = 1, k2 = 3,
          d1 = 1, d2 = 7.5, xm = 1, after discretizing the dynamics in each mode with a
          sampling time of 0.5 time units we obtain the following discrete-time PWA system
16.2            Piecewise Affine Systems                                                                                               357
position x1
                                                                     position x1
                                 time
  mode
                                                                     mode
                                 time                                                               time
                 (a) Large damping (u2 = 0).                                       (b) Small damping (u2 = 1).
                       
                         0.8956                                                     −0.0096     Mode 1
                       
                                     0.0198
                       
                       
                                                              0.1044
                                                     x(t) + [ 0.0198 ] u1 (t) +                      if x1 (t) ≤ 1, u2 (t) ≤ 0.5
                       
                       
                          −0.0198     −0.0004                                          −0.0198
                       
                       
                       
                       
                       
                       
                       
                                                                                                    Mode 2
                       
                         0.8956                                                     −0.0711 
                       
                                     0.0195
                                                     x(t) + [ 0.1044                                 if x1 (t) ≥ 1 + ǫ, u2 (t) ≤ 0.5
                       
                        −0.0584      −0.0012                 0.0195 ] u1 (t) +        −0.1459
     x(t+1) =
                       
                       
                       
                                                                                                    Mode 3
                       
                                                                                    −0.1044 
                       
                               0.8956 0.3773
                                                     x(t) + [ 0.1044                                 if x1 (t) ≤ 1, u2 (t) ≥ 0.5
                       
                               −0.3773 0.5182                0.3773 ] u1 (t) +        −0.3773
                       
                       
                       
                       
                       
                       
                       
                       
                       
                                                                           Mode 4   −0.7519 
                               0.8956 0.3463
                                −1.0389 0.3529       x(t) + [ 0.1044          if x(t) ≥ 1 + ǫ, u2 (t) ≥ 0.5
                                                              0.3463 ] u1 (t) +        −2.5972
                                                                                               (16.6)
     for x1 (t) ∈ [−5, 1] ∪ [1 + ǫ, 5], x2 (t) ∈ [−5, 5], u1 (t) ∈ [−10, 10], and for any arbitrary
     small ǫ > 0.
     Figure 16.4 shows the open-loop simulation of the system for a constant continuous
     input u1 = 3, starting from zero initial conditions and for ǫ = 10−6 .
10 10
x1
                                                                      x1
           -10                                                         -10
          x2   1                                                           1
                                                                      x2
               0                                                           0
            10                                                            10
          u
                                                                      u
           -10                                                         -10
                          time steps                                                        time steps
                      (a) Scenario 1.                                                    (b) Scenario 2.
               Figure 16.5 Example 16.3. Open-loop simulation of system (16.10) for dif-
               ferent sequences of the input u.
                                                                         
                       a      0                    b2                     0                              
                    
                                      x(t) +                u(t) +                 if         1   0           x(t) ≤ xlb
                    
                       0      0                    0                      1
                    
                    
                    
                    
                    
                                                                                                                                   
                        a      0                    b1                                         1    0                            xlb + ǫ
           x(t+1) =                    x(t) +                u(t)                   if                             x(t) ≥
                    
                       0      1                    0                                          0   −1                             −0.5
                    
                    
                    
                                                                                                                   
                    
                    
                    
                       a      0                    b2                                                         xlb + ǫ
                                      x(t) +                u(t)                   if     x(t) ≥
                        0      1                    0                                                            0.5
                                                                                            (16.10)
           for u(t) ∈ R, x1 (t) ∈ (−∞, xlb ] ∪ [xlb + ǫ, +∞), x2 ∈ {0, 1}, and for any ǫ > 0.
           Figure 16.5 shows two open-loop simulations of the system, for a = 0.5, b1 = 0.1,
           b2 = 0.3, xlb = −1, ǫ = 10−6 . The initial conditions is x(0) = [1, 0]. Note that when
           the continuous state x1 (t) goes below xlb = −1 at time t, then xℓ (t + 1) switches to
           1 and the input has a stronger effect on the states from time t + 2 on. Indeed, the
           steady state of x1 is a function of the logic state x2 .
                                                     EEvent            xyc(k)
                                                     Generator
                                                     (EG)
                                    !ed(k)                             uvc(k)
                                  FFinite State
                         !ed(k)   Machine           y!(k)                                      1
                         u!u(k)   (FSM)                                    uvc(k)
                                                                                                              yc(k)
                                                                                              ...
                                                                                Switched       s
                                                                                Affine
                                                                                System
                                                                                           (SAS)
                                                                                           S
                                                                M
                                                                Mode
                                                   x!(k)
                                                     x          Selector
                                                                (MS)                 i(k)
                                                   u!(k)
                                                     u                                 i
                                                   !e(k)
                                                     d
         where t ∈ T is the time indicator, xc ∈ Rnc is the continuous state vector, uc ∈ Rmc
         is the exogenous continuous input vector, yc ∈ Rpc is the continuous output vector,
         {Ai , B i , f i , C i , Di , g i }i∈I is a collection of matrices of suitable dimensions, and the
         mode i(t) ∈ I = {1, . . . , s} is an input signal that determines the affine state update
         dynamics at time t. An SAS of the form (16.11) preserves the value of the state
         when a mode switch occurs, but it is possible to implement reset maps on an SAS
         as shown in [276].
         An event generator is an object that generates a binary vector δe (t) ∈ {0, 1}ne
         of event conditions according to the satisfaction of a linear (or affine) threshold
                                                 n
         condition. Let h : Rnc × Rnc → {0, 1} e be a vector function defined as
                                            
                                              1 if Hi xc + Ji uc + Ki ≤ 0
                            hi (xc , uc ) =
                                              0 if Hi xc + Ji uc + Ki > 0
360                                                                   16      Models of Hybrid Systems
         where the lower index i denotes the i-th component of a vector or the i-th row of
         a matrix, and H, J, K are constant matrices of suitable dimensions. Then events
         are defined as
                                      δe (t) = h(xc (t), uc (t)).                  (16.12)
         In particular, state events are modeled as [δe (t) = 1] ↔ [a′ xc (t) ≤ b]. Note that
         time events can be modeled as in (16.12) by adding the continuous time as an
         additional continuous and autonomous state variable, τ (t + 1) = τ (t) + Ts , where
         Ts is the sampling time, and by letting [δe (t) = 1] ↔ [tTs ≥ τ0 ], where τ0 is a given
         time. By doing so, the hybrid model can be written as a time-invariant one. Clearly
         the same approach can be used for time-varying events δe (t) = h(xc (t), uc (t), t), by
                                                                            n
         using time-varying event conditions h : Rnc × Rm × T → {0, 1} e .
         Before we deal in detail with the other blocks constituting the DHA and introduce
         further notation, we recall some basic definitions of Boolean algebra. A more
         comprehensive treatment of Boolean calculus can be found in digital circuit design
         texts, e.g. [86, 142]. For a rigorous exposition see e.g. [208].
             A variable δ is a Boolean variable if δ ∈ {0, 1}, where “δ = 0” means something
         is false, “δ = 1” that it is true. A Boolean expression is obtained by combining
         Boolean variables through the logic operators ¬ (not), ∨ (or), ∧ (and), ← (implied
         by), → (implies), and ↔ (iff). A Boolean function f : {0, 1}n−1 7→ {0, 1} is used
         to define a Boolean variable δn as a logic function of other variables δ1 , . . . , δn−1 :
F (δ1 , . . . , δn ) (16.14)
         that must hold true. Every Boolean formula F (δ1 , δ2 , . . . , δn ) can be rewritten in
         the conjunctive normal form (CNF)
                                                                              
                                         m
                                         ^         _            _         _
                            (CNF)                      δi                 ∼ δi           (16.15)
                                        j=1       i∈Pj                i∈Nj
Nj , Pj ⊆ {1, . . . , n}, ∀j = 1, . . . , m.
            As mentioned in Section 16.2.2, often we will use the term binary variable
         and Boolean variable without distinction. An improper arithmetic operation over
         Boolean variables should be understood as an arithmetic operation over corre-
         sponding binary variables and, vice versa, an improper Boolean function of binary
         variables should be interpreted as the same function over the corresponding Boolean
         variables. Therefore, from now on we will call “binary” variables both 0-1 variables
         and Boolean variables.
         16.3   Discrete Hybrid Automata                                                                   361
∼ δ1
Red
                                         ∼ δ3                          δ1 ∧ ∼ uℓ2
                                                     δ1 ∧ uℓ2
                                                         δ2
                                     Green                                 Blue
δ3 ∧ uℓ1
∼ uℓ1 ∧ δ3 ∼ δ2
             Example 16.4 Figure 16.7 shows a finite state machine where uℓ = [uℓ1 uℓ2 ]′ is
             the input vector, and δ = [δ1 . . . δ3 ]′ is a vector of signals coming from the event
             generator. The Boolean state update function (also called state transition function)
             is:                         
                                         
                                          Red if ((xℓ (t) = Green)∧ ∼ δ3 )∨
                                         
                                                ((xℓ (t) = Red)∧ ∼ δ1 ),
                                         
                                         
                                         
                                         
                                         
                                          Green     if ((xℓ (t) = Red) ∧ δ1 ∧ uℓ2 )∨
                                         
                                                 ((xℓ (t) = Blue) ∧ δ2 )∨
                            xℓ (t + 1) =                                                    (16.17)
                                         
                                                ((xℓ (t) = Green)∧ ∼ uℓ1 ∧ δ3 ),
                                         
                                         
                                         
                                          Blue if ((xℓ (t) = Red) ∧ δ1 ∧ ∼ uℓ2 )∨
                                         
                                         
                                         
                                                ((xℓ (t) = Green) ∧ (δ3 ∧ uℓ1 ))∨
                                         
                                                 ((xℓ (t) = Blue)∧ ∼ δ2 )).
362                                                                       16    Models of Hybrid Systems
            Since the Boolean state update function is deterministic, for each state the
         conditions associated with all the outgoing arcs are mutually exclusive.
         In a DHA, the dynamic mode i(t) ∈ I = {1, . . . , s} of the SAS is a function of the
         binary state xℓ (t), the binary input uℓ (t), and the events δe (t). With a slight abuse
         of notation, let us indicate the mode i(t) through its binary encoding, i(t) ∈ {0, 1}ns
         where ns = ⌈log2 s⌉, so that i(t) can be treated as a vector of Boolean variables.
                                                                                             d(j)
         Any discrete variable α ∈ {α1 , . . . , αj } admits a Boolean encoding a ∈ {0, 1} ,
         where d(j) is the number of bits used to represent α1 , . . . , αj . For example,
         α ∈ {0, 1, 2} may be encoded as a ∈ {0, 1}2 by associating [ 00 ] → 0, [ 01 ] → 1,
         [ 10 ] → 2.
                Then, we define the mode selector by the Boolean function fM : {0, 1}nℓ ×
                 m         n
         {0, 1} ℓ × {0, 1} e → {0, 1}ns . The output of this function
                                         i(t) = µ(xℓ (t), uℓ (t), δe (t))                                         (16.18)
         is called the active mode of the DHA at time t. We say that a mode switch occurs
         at step t if i(t) 6= i(t − 1). Note that, in contrast to continuous-time hybrid models
         where switches can occur at any time, in our discrete-time setting, as mentioned
         earlier, a mode switch can only occur at sampling instants.
         Lemma 16.1 For every Boolean formula F (δ1 , δ2 , . . . , δn ) there exists a polyhedral
         set P such that a set of binary values {δ1 , δ2 , . . . , δn } satisfies the Boolean formula
         F if and only if δ = [δ1 δ2 . . . δn ]′ ∈ P .
                                                                                          
           The smallest polyhedron P associated with formula F has the following ge-
         ometric interpretation: Assume to list all the 0-1 combinations of δi ’s satisfying
364                                                                    16     Models of Hybrid Systems
         where M i , mi are upper and lower bounds, respectively, on hi (xc (t), uc (t), t). As
         we have pointed out in Section 16.2.1, from a computational viewpoint it is con-
         venient to avoid strict inequalities. As suggested in [287], we modify the strict
         inequality (16.21b) into
         where ǫ is a small positive scalar (e.g., the machine precision). Clearly, as for the
         case of discontinuous PWA discussed in Section 16.2.1, Equations (16.21) or (16.12)
         are equivalent to (16.21c) only for hi (xc (t), uc (t), t) ≤ 0 and hi (xc (t), uc (t), t) ≥ ǫ.
             Regarding switched affine dynamics, we first rewrite the state-update equa-
         tion (16.11a) as the following combination of affine terms and if-then-else condi-
       16.5     Mixed Logical Dynamical Systems                                                                365
       tions:
                                  
                                       A1 xc (t) + B 1 uc (t) + f 1 , if (i(t) = 1),
                      z1 (t) =                                                                      (16.22a)
                                       0,                             otherwise,
                             ..
                              .
                                  
                                 As xc (t) + B s uc (t) + f s , if (i(t) = s),
                      zs (t) =                                                                      (16.22b)
                                 0,                             otherwise,
                               s
                               X
                  xc (t + 1) =    zi (t),                                                           (16.22c)
                                  i=1
      where x ∈ Rnc × {0, 1}nℓ is a vector of continuous and binary states, u ∈ Rmc ×
      {0, 1}mℓ are the inputs, y ∈ Rpc × {0, 1}pℓ the outputs, δ ∈ {0, 1}rℓ are auxiliary
      binary variables, z ∈ Rrc are auxiliary continuous variables which arise in the
      transformation (see Example 16.5), and A, B1 , B2 , B3 , C, D1 , D2 , D3 , E1 ,. . . ,E5
      are matrices of suitable dimensions. Given the current state x(t) and input u(t),
      the time-evolution of (16.25) is determined by finding a feasible value for δ(t) and
      z(t) satisfying (16.25c), and then by computing x(t + 1) and y(t) from (16.25a)–
      (16.25b).
          As MLD models consist of a collection of linear difference equations involving
      both real and binary variables and a set of linear inequality constraints, they are
      model representations of hybrid systems that can be easily used in optimization
      algorithms, as will be described in Chapter 17.
          A definition of well-posedness of the MLD system (16.25) can be given similarly
      to Definition 16.1 by requiring that for all x(t) and u(t) within a given bounded
      set the pair of variables δ(t), z(t) satisfying (16.25c) is unique, so that the succes-
      sor state x(t + 1) and output y(t) are also uniquely defined functions of x(t), u(t)
      through (16.25a)–(16.25b). Such a well-posedness assumption is usually guaranteed
      by the procedure described in Section 16.3.3 used to generate the linear inequali-
      ties (16.25c). A numerical test for well-posedness is reported in [42, Appendix 1].
      For a more general definition of well-posedness of MLD systems see [42].
          Note that the constraints (16.25c) allow one to specify additional linear con-
      straints on continuous variables (e.g., constraints over physical variables of the
      system), and logical constraints over Boolean variables. The ability to include
      constraints, constraint prioritization, and heuristics adds to the expressiveness and
      generality of the MLD framework. Note also that despite the fact that the de-
      scription (16.25) seems to be linear, clearly the nonlinearity is concentrated in the
      integrality constraints over binary variables.
          Example 16.5 Consider the following simple switched linear system [42]
                                          
                                               0.8x(t) + u(t)    if   x(t) ≥ 0
                             x(t + 1) =                                                 (16.26)
                                              −0.8x(t) + u(t)    if   x(t) < 0
          where x(t) ∈ [−10, 10], and u(t) ∈ [−1, 1]. The condition x(t) ≥ 0 can be associated
          to an event variable δ(t) ∈ {0, 1} defined as
          where M = −m = 10, and ǫ is an arbitrarily small positive scalar. Then (16.26) can
          be rewritten as
                             x(t + 1) = 1.6δ(t)x(t) − 0.8x(t) + u(t).                (16.29)
       16.6     Model Equivalence                                                                       367
           subject to the linear constraints (16.28) and (16.30). Therefore, the MLD equivalent
           representation of (16.26) for x ∈ [−10, −ǫ]∪[0, 10] and u ∈ [−1, 1] is given by collecting
           equations (16.31), (16.28) and (16.30).
      SYSTEM sample {
      INTERFACE {
        STATE {
          REAL xr [-10, 10]; }
        INPUT {
          REAL ur [-2, 2]; }
      }
      IMPLEMENTATION {
        AUX {
          REAL z1, z2, z3;
          BOOL de, df, d1, d2, d3; }
        AD {
          de = xr >= 0;
          df = xr + ur - 1 >= 0; }
        LOGIC {
          d1 = ~de & ~df;
          d2 = de;
          d3 = ~de & df; }
        DA {
          z1 = {IF d1 THEN xr + ur - 1 };
          z2 = {IF d2 THEN 2 * xr };
          z3 = {IF (~de & df) THEN 2 }; }
        CONTINUOUS {
          xr = z1 + z2 + z3; }
      }}
      using the technique presented in Section 16.4, and a PWA form using either the
      approach of [122] or the approach of [30]. HYSDEL can generate also a simulator
      that runs as a function in MATLAB
 R
                                           . Both the HYSDEL compiler and the Hybrid
      Toolbox can import and convert HYSDEL models.
         In this section we illustrate the functionality of HYSDEL through a set of
      examples. For more examples and the detailed syntax we refer the interested
      reader to [149].
SYSTEM pwa {
INTERFACE {
    STATE { REAL x1 [-5,5];
            REAL x2 [-5,5];
        }
    INPUT { REAL u [-1,1];
        }
    OUTPUT{ REAL y;
        }
    PARAMETER {
        REAL alpha = 60*pi/180;
        REAL C = cos(alpha);
        REAL S = sin(alpha);
        REAL MLD_epsilon = 1e-6;           }
    }
IMPLEMENTATION {
        AUX { REAL z1,z2;
              BOOL sign; }
        AD { sign = x1<=0; }
           CONTINUOUS { x1 = z1;
                        x2 = z2+u; }
           OUTPUT { y = x2;    }
       }
}
Table 16.3 HYSDEL model of the PWA system described in Example 16.1
    make the proper type checks. The second part, IMPLEMENTATION, is composed
    of specialized sections where the relations among the variables are described.
    The HYSDEL section AUX contains the declaration of the auxiliary variables used
    in the model. The HYSDEL section AD allows one to define Boolean variables from
    continuous ones, and is based exactly on the semantics of the event generator (EG)
    described earlier. The HYSDEL section DA defines continuous variables according
    to if-then-else conditions. This section models part of the switched affine system
    (SAS), namely the variables zi defined in (16.22a)–(16.22b). The CONTINUOUS
    section describes the linear dynamics, expressed as difference equations. This section
    models (16.22c). The section LOGIC allows one to specify arbitrary functions of
    Boolean variables.
    Example 16.7 Consider again the PWA system described in Example 16.1. Assume
    that [−5, 5] × [−5, 5] is the set of states x(t) of interest and u(t) ∈ [−1, 1]. By using
370                                                                     16        Models of Hybrid Systems
           HYSDEL the PWA system (16.3) is described as in Table 16.3 and the equivalent
           MLD form is obtained
                       x(t + 1) = [ 10 01 ] z(t) + [ 01 ] u(t)
                       y(t) = [ 0 1 ] x(t)
                        −5−ǫ              0 0               1     0           −ǫ 
                           5                  0 0                −1    0
                                                                                       5
                        c1                1 0 
                                             −1  0              −0.4 −c 2 
                                                                                    cc1 
                        c1                                  0.4 c2              1 
                        −c1                                   −0.4 c2 
                        −c1  δ(t) +       −1 0 
                                            1 0  z(t) ≤ 
                                                                                    0 
                                                                  0.4 −c2  x(t) +  0 
                        c1                0 −1                                c1 
                         c1                  0 1              c2 −0.4 
                                                                    −c2 0.4                    c1
                          −c1                  0 −1                 −c2 −0.4                    0
                          −c1                  0 1                   c2 0.4                     0
                         √                  √
           where c1 = 4( 3 + 1), c2 = 0.4 3, ǫ = 10−6 . Note that in Table 16.3 the OUTPUT
           section allows to specify a linear map for the output vector y.
           Example 16.9 Consider again the system with a logic state described in Example 16.3.
           The MLD model obtained by compiling the HYSDEL list of Table 16.5 is
           where we have assumed that [−10, 10] is the set of states x1 and [−10, 10] the set of
           continuous inputs u of interest. In Table 16.5 the AUTOMATA section specifies the
           state transition equations of the finite state machine (FSM) as a collection of Boolean
           functions.
/* Spring-Mass-Damper System
*/
SYSTEM springmass {
        STATE {
                  REAL x1 [-5,5];
                  REAL x2 [-5,5];
        }
        PARAMETER {
                /* Spring breakpoint */
                REAL xm;
                  /* Dynamic coefficients */
                  REAL A111,A112,A121,A122,A211,A212,A221,A222;
                  REAL A311,A312,A321,A322,A411,A412,A421,A422;
                  REAL B111,B112,B121,B122,B211,B212,B221,B222;
                  REAL B311,B312,B321,B322,B411,B412,B421,B422;
        }
}
IMPLEMENTATION {
    AUX {
            REAL zx11,zx12,zx21,zx22,zx31,zx32,zx41,zx42;
            BOOL region;
    }
        AD {      /* spring region */
                  region = x1-xm <= 0;
        }
        DA {
                  zx11   =   {   IF   region    &   u2    THEN   A111*x1+A112*x2+B111*u1+B112};
                  zx12   =   {   IF   region    &   u2    THEN   A121*x1+A122*x2+B121*u1+B122};
                  zx21   =   {   IF   region    &   ~u2   THEN   A211*x1+A212*x2+B211*u1+B212};
                  zx22   =   {   IF   region    &   ~u2   THEN   A221*x1+A222*x2+B221*u1+B222};
                  zx31   =   {   IF   ~region   &   u2    THEN   A311*x1+A312*x2+B311*u1+B312};
                  zx32   =   {   IF   ~region   &   u2    THEN   A321*x1+A322*x2+B321*u1+B322};
                  zx41   =   {   IF   ~region   &   ~u2   THEN   A411*x1+A412*x2+B411*u1+B412};
                  zx42   =   {   IF   ~region   &   ~u2   THEN   A421*x1+A422*x2+B421*u1+B422};
        }
        CONTINUOUS {         x1=zx11+zx21+zx31+zx41;
                             x2=zx12+zx22+zx32+zx42;
        }
    }
}
      SYSTEM SLS {
      INTERFACE { /* Description of variables and constants */
          STATE {
                  REAL x1 [-10,10];
                  BOOL x2;
          }
          INPUT { REAL u [-10,10];
              }
          PARAMETER {
                    /* Dynamic coefficients */
                    REAL a = .5;
                    REAL b1 =.1;
                    REAL b2 =.3;
          }
      }
      IMPLEMENTATION {
          AUX {BOOL region;
               REAL zx1;
          }
          AD { /* PWA Region */
                  region = x1-xlb <= 0;
          }
          DA { zx1={IF x2 THEN a*x1+b2*u       ELSE a*x1+b1*u};
          }
          CONTINUOUS {    x1=zx1;
          }
          AUTOMATA { x2= x2 | region;
          }
        }
      }
              Table 16.5 HYSDEL model of the system with logic state described in Ex-
              ample 16.3
16.8   Literature Review                                                                 373
      dynamics. We will briefly review some of these results in the next paragraphs and
      provide pointers to some relevant literature references.
      Under the condition that the MLD system is well-posed, the result showing that
      an MLD systems admits an equivalent PWA representation was proved in [36]. A
      slightly different and more general proof is reported in [30], where the author also
      provides efficient MLD to PWA translation algorithms. A different algorithm for
      obtaining a PWA representation of a DHA is reported in [122].
         The fact that PWA systems are equivalent to interconnections of linear systems
      and finite automata was pointed out by Sontag [267]. In [148, 40] the authors proved
      the equivalence of discrete-time PWA/MLD systems with other classes of discrete-
      time hybrid systems (under some assumptions) such as linear complementarity
      (LC) systems [146, 279, 147], extended linear complementarity (ELC) systems [94],
      and max-min-plus-scaling (MMPS) systems [95].
Stability Analysis
Although simulation allows to probe a model for a certain initial condition and
input excitation, any analysis based on simulation is likely to miss the subtle phe-
nomena that a model may generate, especially in the case of hybrid models. Reach-
ability analysis (also referred to as “safety analysis” or “formal verification”), aims
at detecting if a hybrid model will eventually reach unsafe state configurations
or satisfy a temporal logic formula [7] for all possible initial conditions and in-
put excitations within a prescribed set. Reachability analysis relies on a reach set
computation algorithm, which is strongly related to the mathematical model of the
system. In the case of MLD systems, for example, the reachability analysis problem
over a finite time horizon (also referred to as bounded model checking) can be cast
as a mixed-integer feasibility problem. Reachability analysis was also investigated
via bisimulation ideas, namely by analyzing the properties of a simpler, abstracted
system instead of those of the original hybrid dynamics [182].
    Timed automata and hybrid automata have proved to be a successful modeling
framework for formal verification and have been widely used in the literature. The
starting point for both models is a finite state machine equipped with continuous
dynamics. In the theory of timed automata, the dynamic part is the continuous-time
flow ẋ = 1. Efficient computational tools complete the theory of timed automata
and allow one to perform verification and scheduling of such models. Timed au-
tomata were extended to linear hybrid automata [7], where the dynamics is modeled
by the differential inclusion a ≤ ẋ ≤ b. Specific tools allow one to verify such mod-
els against safety and liveness requirements. Linear hybrid automata were further
extended to hybrid automata where the continuous dynamics is governed by differ-
ential equations. Tools exist to model and analyze those systems, either directly or
by approximating the model with timed automata or linear hybrid automata (see
the survey paper [265]).
Control
The majority of the control approaches for hybrid systems is based on optimal
control ideas (see the survey [291]). For continuous-time hybrid systems, most
authors either studied necessary conditions for a trajectory to be optimal [235,
271], or focused on the computation of optimal/suboptimal solutions by means
of dynamic programming or the maximum principle [128, 245, 143, 144, 80, 292,
192, 261, 264, 266, 273, 70, 141, 196, 128, 69, 252, 71] The hybrid optimal control
problem becomes less complex when the dynamics is expressed in discrete-time,
as the main source of complexity becomes the combinatorial (yet finite) number
of possible switching sequences. As will be shown in Chapter 17, optimal control
problems can be solved for discrete-time hybrid systems using either the PWA
or the MLD models described in this chapter. The solution to optimal control
problems for discrete-time hybrid systems was first outlined by Sontag in [266].
In his plenary presentation [202] at the 2001 European Control Conference Mayne
presented an intuitively appealing characterization of the state feedback solution to
optimal control problems for linear hybrid systems with performance criteria based
376                                                      16   Models of Hybrid Systems
      on quadratic and piecewise linear norms. The detailed exposition presented in the
      first part of Chapter 17 follows a similar line of argumentation and shows that the
      state feedback solution to the finite time optimal control problem is a time-varying
      piecewise affine feedback control law, possibly defined over non-convex regions.
          Model Predictive Control for discrete-time PWA systems and their stability and
      robustness properties have been studied in [68, 60, 32, 188, 185, 186]. Invariant
      sets computation for PWA systems has also been studied in [187, 4].
      Identification
      Identification techniques for piecewise affine systems were recently developed [104,
      255, 163, 39, 165, 282, 227], that allow one to derive models (or parts of models)
      from input/output data.
       In this chapter we study the finite time, infinite time and receding horizon optimal
       control problem for the class of hybrid systems presented in the previous chapter.
       We establish the structure of the optimal control law and derive several different
       algorithms for its computation. For finite time problems with linear and quadratic
       objective functions we show that the time varying feedback law is piecewise affine.
       for t ≥ 0, and rewrite its restriction over the set of states and inputs defined
       by (17.1) as                                          h      i
                                                               x(t)
                       x(t + 1) = Ai x(t) + B i u(t) + f i if u(t) ∈ C˜i         (17.2)
       where xk denotes the state vector at time k obtained by starting from the state
       x0 = x(0) and applying to the system model
         If the squared Euclidian norm is used in the cost function (17.3), then we set
      p(xN ) = x′N P xN and q(xk , uk ) = x′k Qxk + u′k Ruk with P  0, Q  0 and R ≻ 0.
      Cost (17.3) is rewritten as
                                                      N
                                                      X −1
                        J0 (x(0), U0 ) = x′N P xN +          x′k Qxk + u′k Ruk .       (17.6)
                                                      k=0
      where the column vector U0 = [u′0 , . . . , u′N −1 ]′ ∈ Rmc N × {0, 1}mℓN , is the opti-
      mization vector, N is the time horizon and Xf is the terminal region.
          In general, the optimal control problem (17.7) may not have a minimizer for
      some feasible x(0). This is caused by discontinuity of the PWA system in the input
      space. We will assume, however, that a minimizer U0 ∗ (x(0)) exists for all feasible
      x(0). Also the optimizer function U0∗ may not be uniquely defined if the optimal
      set of problem (17.7) is not a singleton for some x(0). In this case U0∗ denotes one
      of the optimal solutions.
          We will denote by Xk ⊆ Rnc × {0, 1}nℓ the set of states xk that are feasible
      for (17.7):
                                                                            
                                                  ∃u ∈ Rmc × {0, 1}mℓ ,     
                         
                                                                            
                                                                              
                                   nc
                                                  
                                               nℓ  ∃i  ∈  {1, . . . , s}
                   Xk = x ∈ R × {0, 1}  x                  ˜i                  ,
                         
                         
                                                  [ u ] ∈ C and             
                                                                                       (17.8)
                                                   Ai x + B i u + f i ∈ Xk+1 
                          k = 0, . . . , N − 1
                   XN = Xf .
      The definition of Xi requires that for any initial state xi ∈ Xi there exists a feasible
      sequence of inputs Ui = [u′i , . . . , u′N −1 ] which keeps the state evolution in the
      feasible set X at future time instants k = i + 1, . . . , N − 1 and forces xN into Xf
      at time N . The sets Xk for i = 0, . . . , N play an important role in the solution of
      the optimal control problem. They are independent of the cost function and of the
      algorithm used to compute the solution to problem (17.7). As in the case of linear
      systems (see Chapter 11.2) there are two ways to rigourously define and compute
       17.2   Properties of the State Feedback Solution, 2-Norm Case                                 379
       the sets Xi : the batch approach and the recursive approach. In this chapter we
       will not discuss the details on the computation of Xi . Also, we will not discuss
       invariant and reachable sets for hybrid systems. While the basic concepts are
       identical to those presented in Section 10.1 for linear systems, the discussion of
       efficient algorithms requires a careful treatment which goes beyond the scope of
       this book. The interested reader is referred to the work in [131, 121] for a detailed
       discussion on reachable and invariant sets for hybrid systems.
           In the following we need to distinguish between optimal control based on the
       squared 2-norm and optimal control based on the 1-norm or ∞-norm. Note that
       the results of this chapter also hold when the number of switches is weighted in the
       cost function (17.3), if this is meaningful in a particular situation.
           In this chapter we will make use of the following definition. Consider sys-
       tem (17.2) and recall that, in general, x = [ xxcℓ ] where xc ∈ Rnc are the continuous
       states and xℓ ∈ Rnℓ are the binary states and u ∈ Rmc × {0, 1}mℓ where uc ∈ Rmc
       are the continuous inputs and uℓ ∈ Rmℓ are the binary inputs (Section 16.2.2). We
       will make the following assumption.
       Assumption 17.1 For the discrete-time PWA system (17.2) the mapping (xc (t), uc (t)) 7→
       xc (t + 1) is continuous.
       Assumption 17.1 requires that the PWA function that defines the update of the
       continuous states is continuous on the boundaries of contiguous polyhedral cells,
       and therefore allows one to work with the closure of the sets C˜i without the need
       of introducing multi-valued state update equations. With abuse of notation in the
       next sections C˜i will always denote the closure of C˜i . Discontinuous PWA systems
       will be discussed in Section 17.7.
       where Rik , i = 1, . . . , Nk is a partition of the set Xk of feasible states x(k), and the
       closure R̄ik of the sets Rik has the following form:
                                  n
                                                                        ′
                         R̄ik = x : x(k)′ Lik (j)x(k) + Mki (j) x(k) ≤ Nki (j) ,
                                                       	                                   (17.10)
                                     j = 1, . . . , nik , k = 0, . . . , N − 1,
       and
                         x(k + 1) = Ai x(k)
                                       h    + B ii u∗k (x(k)) + f i
                                          x(k)                                            (17.11)
                                    if u∗ (x(k)) ∈ C˜i , i = {1, . . . , s}.
                                               k
380                                                    17    Optimal Control of Hybrid Systems
           Proof: The piecewise linearity of the solution was first mentioned by Sontag
      in [266]. In [202] Mayne sketched a proof. In the following we will give the proof
      for u∗0 (x(0)), the same arguments can be repeated for u∗1 (x(1)), . . . , u∗N −1 (x(N −1)).
             Because Jv∗i and Jv∗l are quadratic functions of x(0) on T i,j and T l,m
            respectively, we find the expression (17.10) of the control law domain.
            The sets T i,j \T l,m and T l,m \T i,j are two single feasibility P-collections
            which can be partitioned into a set of single feasibility polyhedra, and
            thus be described through (17.10) with Lik = 0.
       In order to conclude the proof, the general case of n intersecting polyhedra
       has to be discussed. We follow three main steps. Step 1: generate one
       polyhedron of nth -ple feasibility and 2n − 2 P-collections possibly empty and
       disconnected, of single, double, . . ., (n−1)th -ple feasibility. Step 2: the ith -ple
       feasibility P-collection is partitioned into several ith -ple feasibility polyhedra.
       Step 3: any ith -ple feasibility polyhedron with i > 1 is further partitioned
       into at most i subsets (17.10) where in each one of them a certain feasible
       value function is greater than all the others. The procedure is depicted in
       Figure 17.1 when n = 3.
                                                                                             
382                                               17    Optimal Control of Hybrid Systems
1 1
                            1,2
                      1,3               2                                                 2
1,2,3
3 3
            Figure 17.1 Graphical illustration of the main steps for the proof of Theo-
            rem 17.1 when 3 polyhedra intersect. Step 1: the three intersecting poly-
            hedra are partitioned into: one polyhedron of triple feasibility (1,2,3), 2
            polyhedra of double feasibility (1, 2) and (1, 3), 3 polyhedra of single fea-
            sibility (1),(2),(3). The sets (1), (2) and (1,2) are neither open nor closed
            polyhedra. Step 2: the single feasibility sets of (1), (2) and (3) are parti-
            tioned into six polyhedra. Step 3: value functions are compared inside the
            polyhedra of multiple feasibility.
         From the result of the theorem above one immediately concludes that the value
      function J0∗ is piecewise quadratic:
                                                  ′
                  J0∗ (x(0)) = x(0)′ H1i x(0) + H2i x(0) + H3i if x(0) ∈ Ri0 .            (17.16)
          The proof of Theorem 17.1 gives useful insights into the properties of the sets
      Rik in (17.10). We will summarize them next.
          Each set Rik has an associated multiplicity j which means that j switching
      sequences are feasible for problem (17.3)-(17.7) starting from a state x(k) ∈ Rik .
      If j = 1, then Rik is a polyhedron. In general, if j > 1 the boundaries of Rik
      can be described either by an affine function or by a quadratic function. In the
      sequel boundaries which are described by quadratic functions but degenerate to
      hyperplanes or sets of hyperplanes will be considered affine boundaries.
          Quadratic boundaries arise from the comparison of value functions associated
      with feasible switching sequences, thus a maximum of j − 1 quadratic boundaries
      can be present in a j-ple feasible set. The affine boundaries can be of three types.
         • Type a: they are inherited from the original j-ple feasible P-collection. In
           this case across such boundaries the multiplicity of the feasibility changes.
         • Type b: they are artificial cuts needed to describe the original j-ple feasible
           P-collection as a set of j-ple feasible polyhedra. Across type b boundaries
           the multiplicity of the feasibility does not change.
         • Type c: they arise from the comparison of quadratic value functions which
           degenerate in an affine boundary.
17.2   Properties of the State Feedback Solution, 2-Norm Case                                  383
    Based on Lemma 17.1 above one can highlight the only source of discontinuity
of the value function: affine boundaries of type a. The following corollary gives a
useful insight on the class of possible value functions.
      Proof: The proof follows from the result on the minimization of lower-semicontinuous
point-to-set maps in [47]. Below we give a simple proof without introducing the
notion of point-to-set maps.
     Only points where a discontinuity occurs are relevant for the proof, i.e., states
belonging to boundaries of type a. From assumption 17.1 it follows that the feasible
switching sequences for a given state x(0) are all the feasible switching sequences
associated with any set Rj0 whose closure R̄j0 contains x(0). Consider a state x(0)
belonging to boundaries of type a and the proof of Theorem 17.1. The only case of
discontinuity can occur when (i) a j-ple feasible set P1 intersects an i-ple feasible
set P2 with i < j, (ii) there exists a point x(0) ∈ P1 , P2 and a neighborhood
N (x(0)) with x, y ∈ N (x(0)), x ∈ P1 , x ∈        / P2 and y ∈ P2 , y ∈    / P1 . The proof
follows from the previous statements and the fact that J0∗ (x(0)) is the minimum of
all Jv∗i (x(0)) for all feasible switching sequences vi .                                 
     The result of Corollary 17.1 will be used extensively in the next sections. Even
if value function and optimizer are discontinuous, one can work with the closure
R̄jk of the original sets Rjk without explicitly considering their boundaries. In fact,
if a given state x(0) belongs to several regions R̄10 ,. . . ,R̄p0 , then the minimum value
among the optimal values (17.16) associated with each region R̄10 , . . . , R̄p0 allows us
to identify the region of the set R10 , . . . , Rp0 containing x(0).
     Next we show some interesting properties of the optimal control law when we
restrict our attention to smaller classes of PWA systems.
384                                                     17    Optimal Control of Hybrid Systems
      Corollary 17.2 Assume that the PWA system (17.2) is continuous, and that E =
      0 in (17.1) and Xf = Rn in (17.7) (which means that there are no state constraints,
      i.e., P̃ is unbounded in the x-space). Then, the value function J0∗ in (17.7) is
      continuous.
             Proof: Problem (17.7) becomes a multi-parametric program with only input
      constraints when the state at time k is expressed as a function of the state at time 0
      and the input sequence u0 , . . . , uk−1 , i.e., xk = fP W A ((· · · (fP W A (x0 , u0 ), u1 ), . . . , uk−2 ), uk−1 ).
      J0 in (17.3) will be a continuous function of x0 and u0 , . . . , uN −1 since it is the
      composition of continuous functions. By assumptions the input constraints on
      u0 , . . . , uN −1 are convex and the resulting set is compact. The proof follows from
      the continuity of J and Theorem 5.2.
                                                                                                             
           Note that E = 0 is a sufficient condition for ensuring that constraints (17.1)
      are convex in the optimization variables u0 , . . . , un . In general, even for continuous
      PWA systems with state constraints it is difficult to find weak assumptions ensuring
      the continuity of the value function J0∗ . Ensuring the continuity of the optimal
      control law u(k) = u∗k (x(k)) is even more difficult. A list of sufficient conditions for
      U0∗ to be continuous can be found in [106]. In general, they require the convexity (or
      a relaxed form of it) of the cost J0 (U0 , x(0)) in U0 for each x(0) and the convexity
      of the constraints in (17.7) in U0 for each x(0). Such conditions are clearly very
      restrictive since the cost and the constraints in problem (17.7) are a composition
      of quadratic and linear functions, respectively, with the piecewise affine dynamics
      of the system.
           The next theorem provides a condition under which the solution u∗k (x(k)) of
      the optimal control problem (17.3)-(17.7) is a PPWA state feedback control law.
           Remark 17.1 Theorem 17.2 relies on a rather strong uniqueness assumption. Some-
           times, problem (17.3)-(17.7) can be modified in order to obtain uniqueness of the
           solution and use the result of Theorem 17.2 which excludes the existence of non-
           convex ellipsoidal sets. It is reasonable to believe that there are other conditions
           under which the state feedback solution is PPWA without claiming uniqueness.
       17.3   Properties of the State Feedback Solution, 1, ∞-Norm Case                                    385
       Theorem 17.3 Consider the optimal control problem (17.7) with cost (17.5), p =
       1, ∞ and let assumption 17.1 hold. Then there exists a solution in the form of a
       PPWA state feedback control law
x2
                                                             x2
                                 x1                                                x1
                        (a) v1 = {1, 1}                                   (b) v2 = {1, 2}
          x2
x2
                                 x1                                                x1
                        (c) v2 = {2, 1}                                   (d) v4 = {2, 2}
               Figure 17.2 Example 17.1. Problem (17.12) with cost (17.6) is solved for
               different vi , i = 1, . . . , 4. Control law u∗0 (x0 ) is PPWA. State space partition
               is shown.
       and the value function Jv∗i is piecewise affine on polyhedra and convex. The rest
       of the proof follows the proof of Theorem 17.1. Note that in this case the value
       functions to be compared are piecewise affine and not piecewise quadratic.     
                                                                  v1            v3
   x2
                                                    x2
                                                                  v2            v4
                         x1                                             x1
       (a) Feasibility domain obtained as             (b) Regions of the state space
       the union of the domains shown                 partition where the switching se-
       in Figure 17.2. All regions are                quences v1 = {1, 1}, v2 = {1, 2},
       polyhedra of multiple feasibility.             v3 = {2, 1}, v4 = {2, 2} are opti-
                                                      mal.
        Figure 17.3 Example 17.1. State space partition corresponding to the opti-
        mal control law.
law (17.17)), more efficient methods than enumeration are desirable. Here we show
that the MLD framework can be used to avoid the complete enumeration. In
fact, when the model of the system is an MLD model and the performance index is
quadratic, the optimization problem can be cast as a Mixed-Integer Quadratic Pro-
gram (MIQP). Similarly, 1-norm and ∞-norm performance indices lead to Mixed-
Integer Linear Programs (MILPs) problems. In the following we detail the trans-
lation of problem (17.7) with cost (17.5) or (17.6) into a mixed integer linear or
quadratic program, respectively, for which efficient branch and bound algorithms
exist.
   Consider the equivalent MLD representation (16.25) of the PWA system (17.2).
Problem (17.7) is rewritten as:
                                N
                                X −1
  J0 (x(0), U0 ) = kP xN kp +          kQxk kp + kRuk kp + kQδ δk kp + kQz zk kp      (17.22)
                                 k=0
388                                                       17     Optimal Control of Hybrid Systems
when p = 1 or p = ∞ or
                                             N
                                             X −1
           J0 (x(0), U0 ) = x′N P xN +              x′k Qxk + u′k Ruk + δk′ Qδ δk + zk′ Qz zk            (17.23)
                                              k=0
      when p=2.
         The optimal control problem (17.21) with the cost (17.22) can be formulated as
      a Mixed Integer Linear Program (MILP). The optimal control problem (17.21) with
      the cost (17.23) can be formulated as a Mixed Integer Quadratic Program (MIQP).
      The compact form for both cases is
                                    k−1
                                    X
                           k
                     xk = A x0 +          Aj (B1 uk−1−j + B2 δk−1−j + B3 zk−1−j )                        (17.25)
                                    j=0
      also solves the original problem, i.e., the same optimum J0∗ (x(0)) is achieved.
      Therefore, problem (17.21) with cost (17.22) can be reformulated as the follow-
17.4    Computation of the Optimal Control Input via Mixed Integer Programming 389
           min      J(ε)
            ε
       subj. to   −1m εuk   ≤    ±Ruk , k = 0, 1, . . . , N − 1
                                             Pk−1
                  −1n εxk   ≤    ±Q(Ak x0 + j=0 Aj (B1 uk−1−j +
                                 B2 δk−1−j + B3 zk−1−j )) k = 0, . . . , N − 1
                                              PN −1
                  −1n εxN   ≤    ±P (AN x0 + j=0 Aj (B1 uk−1−j +                         (17.28)
                                 B2 δk−1−j + B3 zk−1−j ))
                    xk+1    =    Axk + B1 uk + B2 δk + B3 zk , k ≥ 0
                    E2 δk   +    E3 zk ≤ E1 uk + E4 xk + E5 , k ≥ 0
                     xN     ∈    Xf
                      x0    =    x(0)
where the variable x(0) in (17.28) appears only in the constraints as a parameter
vector.
    Given a value of the initial state x(0), the MIQP (17.24) or the MILP (17.28)
can be solved to get the optimizer ε∗ (x(0)) and therefore the optimal input U0∗ (0).
In the next Section 17.5 we will show how multiparametric programming can be
also used to efficiently compute the piecewise affine state feedback optimal control
law (17.9) or (17.19).
    Example 17.2 Consider the problem of steering in three steps the simple piecewise
    affine system presented in Example 16.1 to a small region around the origin. The
    system state update equations are
                                     √              
    
                     
                                 1    − 3             0                
    
                     
                         0.4    √            x(t) +       u(t) if   1 0 x(t) ≥ 0
    
                                 3    1              1
    
        x(t + 1) =                     √              
                      
                                  1      3            0                
    
                     
                         0.4      √          x(t) +       u(t) if   1 0 x(t) ≤ −ǫ
    
                                                     1
    
                              −   3   1
    
            y(t) =       0 1 x(t)
                                                                              (17.29)
    subject to the constraints
             considering the optimal control problem (17.21) with cost (17.23) for the equivalent
             MLD representation and solving the associated MIQP problem (17.24).
             The resulting MIQP has 21 variables (|ε| = 21) which are x ∈ R2 , δ ∈ {0, 1}, z ∈ R2 ,
             u ∈ R, y ∈ R over 3 steps. The number of mixed-integer equality constraints is
             9 resulting from the 3 equality constraints of the MLD systems over 3 steps. The
             number of mixed-integer inequality constraints is 74.
               1. In a first step we relax the integer constraints, i.e., we allow the variables
                  xd,1 , xd,2 , xd,3 to vary continuously between 0 and 1. We find the minimum
                  of the Relaxed LP to be 10, which must be a lower bound on the solution.
               2. We fix one of the integer variables xd,1 at 0 and 1, respectively, and leave the
                  others relaxed. We solve the two resulting LPs and obtain 13 and 12, which are
                  new improved lower bounds on the solutions along the two branches.
               3. Heuristically we decide to continue on the branch with xd,1 = 1, because the
                  lower bound is lower than with xd,1 = 0. We now fix one of the remaining
                  integer variables xd,2 at 0 and 1, respectively, and leave xd,3 relaxed. We solve
                  the two resulting LPs and obtain 16 and 14, which are new improved lower
                  bounds on the solution along the two branches.
               4. Heuristically we decide again to continue on the branch with xd,2 = 1, because
                  the lower bound is lower than with xd,2 = 0. We now fix the remaining integer
                  variable xd,3 at 0 and 1, respectively. We solve the two resulting LPs and obtain
                  15 and 17. We can conclude now that 15 is an upper bound on the solution and
                  the integer choices leading to 17 are non-optimal. We can also stop the further
                  exploration of node 16 because this lower bound is higher than the established
                  upper bound of 15.
17.4   Computation of the Optimal Control Input via Mixed Integer Programming 391
                                         relaxed LP
                                               LB=10
                                          10
                          xd,1 = 0                     xd,1 = 1
                          13                               12
           xd,2 = 0               xd,2 = 1 xd,2 = 0                xd,2 = 1
                ∞                19              16               14
             infeasible        19 > UB       16 > UB
                                                      xd,3 = 0                xd,3 = 1
                                                   optimal
                                                   solution 15                 17
                                                          UB=15           15 < UB = 17
       5. We explore node 13 and find the integer choices either to be infeasible or to lead
          to a lower bound of 19 which is again higher than the established upper bound
          of 15. Thus no further explorations are necessary and 15 is confirmed to be the
          optimal solution.
    More generally, the Branch and Bound algorithm for MILPs involves solving
and generating a set of LP subproblems in accordance with a tree search, where
the nodes of the tree correspond to LP subproblems. Branching generates child-
nodes from parent-nodes according to branching rules, which can be based, for
instance, on a-priori specified priorities on integer variables, or on the amount by
which the integer constraints are violated. Nodes are labeled either as pending, if
the corresponding LP problem has not yet been solved, or fathomed, if the node
has already been fully explored. The algorithm stops when all nodes have been
fathomed.
    The success of the branch and bound algorithm relies on the fact that whole
subtrees can be excluded from further exploration by fathoming the corresponding
root nodes. This happens if the corresponding LP subproblem is either infeasible
or an integer solution is obtained. In the second case, the corresponding value of
the cost function serves as an upper bound on the optimal solution of the MILP
problem, and is used to further fathom any other nodes having either a greater
optimal value or lower bound.
392                                               17    Optimal Control of Hybrid Systems
ζ : x ∈ Ri 7→ Fi x + gi for i = 1, . . . , NR , (17.31)
         Definition 17.1 Given a PWA map (17.31) we define fP W A (x) = ζo (x) as the
17.6      State Feedback Solution via Recursive Approach                                         393
Note that given a PWA map (17.31) the corresponding ordered region single-valued
function ζo changes if the order used to store the regions Ri and the corresponding
affine gains change. For illustration purposes consider the example depicted in
Figure 17.5, where x ∈ R, NR = 2, F1 = 0, g1 = 0, R1 = [−2, 1], F2 = 1, g2 = 0,
R2 = [0, 2].
    In the following, we assume that the sets Rki in the optimal solution (17.9) can
overlap. When we refer to the PWA function u∗k (x(k)) in (17.9) we will implicitly
mean the ordered region single-valued function associated with the map (17.9).
    the expressions (17.32) and a real-valued function that can be extracted from (17.33)
    can be written equivalently as:
        (i)
                                                            
                                                               J1∗ (x) if x ∈ P1
                                           J ∗ (x)     =                              (17.34)
                                                            y   J2∗ (x) if x ∈ P2
                                                            
                                                               u∗1 (x) if x ∈ P1
                                           u∗ (x)      =                              (17.35)
                                                            y   u∗2 (x) if x ∈ P2
F2 x + g2
                                 ζ(x)
                                            F1 x + g1
                                                        x
                                        (a) Multi valued PWA map ζ.
                                                                      
                  F1 x + g1 if x ∈ R1                                  F2 x + g2 if x ∈ R2
       ζ12 (x) = 
                 y F2 x + g2 if x ∈ R2                       ζ21 (x) = 
                                                                       y F1 x + g1 if x ∈ R1
                            x                                                 x
       (b) Ordered region single valued                      (c) Ordered region single valued
       function ζ12 .                                        function ζ21 .
       (iii)
                                        
                                         min{J1∗ (x), J2∗ (x)} if x ∈ P3
                                         ∗
                       J ∗ (x)   =       J1 (x) if x ∈ P1                                (17.36)
                                         ∗
                                        y J2 (x) if x ∈ P2
                                         ∗                  T
                                         u1 (x) if x ∈ P3 {x | x′ L3 x + M3′ x + N3 ≥ 0}
                                         ∗                  T
                                         u2 (x) if x ∈ P3 {x | x′ L3 x + M3′ x + N3 ≤ 0}
                       u∗ (x)    =       ∗                                               (17.37)
                                         u1 (x) if x ∈ P1
                                         ∗
                                        y u2 (x) if x ∈ P2
      where (17.34), (17.35), (17.36), and (17.37) have to be considered as PWA and
      PPWQ functions in the ordered region sense.
         The three points listed above will be the three basic ingredients for storing and
         simplifying the optimal control law (17.9). Next we will show how to compute it.
             Remark 17.2 In Example 17.4 the description (17.36)-(17.37) of Case (iii) can always
             be used but the on-line evaluation of the control u∗ (x) is rather involved requiring
             a series of set membership and comparison evaluations. To assess if the simpler
             description of u∗ (x) of Case (i) or Case (ii) could be used instead, one needs to solve
             indefinite quadratic programs of the form
                                            minx         x′ L3 x + M3′ x + N3
                                                                                                (17.38)
                                            subj. to     x ∈ P3
      and it is equivalent to
                                                                                   
                                        
                                         minu l(x, u) + q1 (f (x, u)),             
                                                                                    
                                        
                                                                                   
                                                                                    
                                        
                                         subj. to f (x, u) ∈ P,                    
                                                                                    
                             ∗
                            J (x) = min         ..                                      .       (17.41)
                                                .                                  
                                        
                                                                                   
                                                                                    
                                         minu l(x, u) + qd (f (x, u))
                                                                                   
                                                                                    
                                                                                   
                                          subj. to f (x, u) ∈ P
      is a one to one problem and therefore it is solvable by an mp-QP. Let the solution
      of the i-th mp-QPs be
      where J˜j∗ (x) are multiple quadratic functions defined over the convex polyhedra
      Dj . The polyhedron Dj can contain several regions Ri or can coincide with one of
      them. Note that (17.45) and (17.46) have to be considered as PWA and PPWQ
      functions in the ordered region sense.
          If d > 2 then the value function in (17.46) is intersected with the solution of
      the third mp-QP sub-problem and the procedure is iterated by making sure not
      to change the relative order of the polyhedra and the corresponding gain of the
      solution constructed in the previous steps. The solution will still have the same
      form (17.45)– (17.46).                                                           
         17.6   State Feedback Solution via Recursive Approach                                   397
             Proof: Let q(x) = qi if x ∈ Pi the PWQ function where the closures P̄i of
         Pi are polyhedra and qi strictly convex quadratic functions. The multi-parametric
         program to solve is
                                                                          
                                        
                                            minu l(x, u) + q1 (f (x, u)), 
                                                                           
                                        
                                                                          
                                                                           
                                        
                                            subj. to f (x, u) ∈ P̄1       
                                                                           
                                        
                                                                          
                                                                           
                                        
                                                     f (x, u) ∈ P         
                                                                           
                             ∗
                          J (x) = min       .
                                            ..,                              .     (17.47)
                                        
                                                                          
                                                                           
                                                                          
                                         minu l(x, u) + qr (f (x, u))} 
                                        
                                                                          
                                                                           
                                                                          
                                         subj. to f (x, u) ∈ P̄r
                                        
                                        
                                                                           
                                                                           
                                                                           
                                                      f (x, u) ∈ P
             The proof follows the lines of the proof of the previous theorem with the excep-
         tion that the constraints of the i-th mp-QP subproblem differ from the j-th mp-QP
         subproblem, i 6= j.
             The lower-semicontinuity assumption on q(x) allows one to use the closure of the
         sets Pi in (17.47).The cost function in problem (17.39) is lower-semicontinuous since
         it is a composition of a lower-semicontinuous function and a continuous function.
         Then, since the domain is compact, problem (17.47) admits a minimum. Therefore
         for a given x, there exists one mp-QP in problem (17.47) which yields the optimal
         solution. The procedure based on solving mp-QPs and storing the results as in
                                                                                   S R j
         Example 17.4 will be the same as in Lemma 17.3 but the domain R = N         j=1 R of
         the solution can be a P-collection.                                                
             If f is PPWA defined over s regions then we have a s to X problem where X
         can belong to any of the problems listed above. In particular, we have an s to
         r problem of multiplicity d if f is PPWA and defined over s regions and q is a
         multiple PPWQ function of multiplicity d, defined over r polyhedral regions. The
         following lemma can be proven along the lines of the proofs given before.
         In the following we will substitute the PWA system equations (17.2) with the
         shorter form
                                   x(k + 1) = f˜P W A (x(k), u(k))            (17.48)
398                                                   17   Optimal Control of Hybrid Systems
              ˜       ˜    n    ˜                i     i     i     x     ˜i
      wheren fPoW A : C → R and fP W A (x, u) = A x + B u + f if [ u ] ∈ C , i = 1, . . . , s,
      and C˜i is a polyhedral partition of C.˜
         Consider the dynamic programming formulation of the CFTOC problem (17.6)-
      (17.7),
                                                XN         = Xf                               (17.51)
                                              ∗             ′
                                             JN (x)   = x P x,                                (17.52)
where Xj is the set of all states x(j) for which problem (17.49)–(17.50) is feasible:
         Assume for the moment that there are no binary inputs and binary states,
      mℓ = nℓ = 0. The Bellman equations (17.49)–(17.52) can be solved backwards in
      time by using a multi-parametric quadratic programming solver and the results of
      the previous section.
         Consider the first step of the dynamic program (17.49)–(17.52)
       ∗                                                                  ∗ ˜
      JN −1 (xN −1 ) =   min{uN −1 }     x′N −1 QxN −1 + u′N −1 RuN −1 + JN (fP W A (xN −1 , uN −1 ))
                                                                                              (17.54)
                         subj. to        f˜P W A (xN −1 , uN −1 ) ∈ Xf .                         (17.55)
                                    ∗
      The cost to go function JN      (x) in (17.54) is quadratic, the terminal region Xf is
      a polyhedron and the constraints are piecewise affine. Problem (17.54)–(17.55) is
      an s to one problem that can be solved by solving s mp-QPs. From the second
                                                                           ∗
      step j = N − 2 to the last one j = 0 the cost to go function Jj+1        (x) is a lower-
      semicontinuous PPWQ with a certain multiplicity dj+1 , the terminal region Xj+1 is
      a P-collection and the constraints are piecewise affine. Therefore, problem (17.49)–
                          r                                              r
      (17.52) is an s to Nj+1  problem with multiplicity dj+1 (where Nj+1    is the number of
                                               ∗                                      r
      polyhedra of the cost to go function Jj+1 ), that can be solved by solving sNj+1    dj+1
      mp-QPs (Lemma 17.5). The resulting optimal solution will have the form (17.9)
      considered in the ordered region sense.
           In the presence of binary inputs the procedure can be repeated, with the dif-
      ference that all the possible combinations of binary inputs must be enumerated.
      Therefore a one to one problem becomes a 2mℓ to one problem and so on. In the
      presence of binary states the procedure can be repeated either by enumerating
      them all or by solving a dynamic programming algorithm at time step k from a
      relaxed state space to the set of binary states feasible at time k + 1.
           Next we summarize the main steps of the dynamic programming algorithm
      discussed in this section. We use boldface characters to denote sets of polyhedra,
      i.e., R = {Ri }i=1,...,|R| , where Ri is a polyhedron and |R| is the cardinality of
17.6   State Feedback Solution via Recursive Approach                                    399
the set R. Furthermore, when we say SOLVE an mp-QP we mean to compute and
store the triplet Sk,i,j of expressions for the value function, the optimizer, and the
polyhedral partition of the feasible space.
400                                                   17     Optimal Control of Hybrid Systems
          Algorithm 17.1
          Input: CFTOC problem (17.3)–(17.7)
          Output: Solution (17.9) in the ordered region sense
               RN ← {Xf }
                ∗
               JN,1 (x) ← x′ P x
               For k = N − 1, . . . , 1
                    For i = 1, . . . , |Rk+1 |
                         For j = 1, . . . , s
                            Sk,i,j ← {}
                            Solve the mp-QP
                         End
                    End
                                                                                     ∗
                    Rk ← {Rk,i,j,l }i,j,l . Denote by Rk,h its elements, and by Jk,h   and u∗k,h (x)
                    the associated costs and optimizers, with h ∈ {1, . . . , |Rk |}
                                             ∗
                    Keep only triplets (Jk,h    (x), u∗k,h (x), Rk,h ) for which ∃x ∈ Rk,h : x ∈   /
                                                     ∗           ∗
                    Rk,d , ∀d 6= h OR ∃x ∈ Rk,h : Jk,h   (x) < Jk,d (x), ∀d 6= h
                    Create multiplicity information and additional regions for an ordered re-
                    gion solution as explained in Example 17.4
               End
         In Algorithm 17.1, the structure Sk,i,j stores the matrices defining quadratic
                ∗
      function Jk,i,j,l (·), affine function u∗k,i,j,l (·), and polyhedra Rk,i,j,l , for all l:
                                     [                                             	
                                             ∗
                          Sk,i,j =          Jk,i,j,l (x), u∗k,i,j,l (x), Rk,i,j,l        ,    (17.56)
                                      l
      where the indices in (17.56) have the following meaning: k is the time step, i
      indexes the piece of the “cost-to-go” function that the DP algorithm is considering,
      j indexes the piece of the PWA dynamics the DP algorithm is considering, and l
      indexes the polyhedron in the mp-QP solution of the (k, i, j)th mp-QP problem.
          The “KEEP only triplets” Step of Algorithm 17.1 aims at discarding regions
      Rk,h that are completely covered by some other regions that have lower cost. Obvi-
      ously, if there are some parts of the region Rk,h that are not covered at all by other
      regions (first condition) we need to keep them. Note that comparing the cost func-
      tions is, in general, non-convex optimization problem. One might consider solving
      the problem exactly, but since algorithm works even if some removable regions are
      kept, we usually formulate an LMI relaxation of the problem at hand.
          The output of Algorithm 17.1 is the state feedback control law (17.9) considered
      in the ordered region sense. The online implementation of the control law requires
      simply the evaluation of the PWA controller (17.9) in the ordered region sense.
         17.6     State Feedback Solution via Recursive Approach                                        401
17.6.4   Examples
            Example 17.5 Consider the control problem of steering the piecewise affine sys-
            tem (17.29) to a small region around the origin. The constraints and cost function
            of Example 17.2 are used. The state feedback solution u∗0 (x(0)) was determined by
            using the approach presented in the previous section. When the infinity norm is used
            in the cost function, the feasible state space X0 at time 0 is divided into 84 polyhedral
            regions and it is depicted in Fig. 17.6(a). When the squared Euclidean norm is used
            in the cost function, the feasible state space X0 at time 0 is divided into 92 polyhedral
            regions and is depicted in Fig. 17.6(b).
           x2
x2
                                  x1                                          x1
                (a) Partition of the feasible state         (b) Partition of the feasible state
                space X0 when the infinity norm             space X0 when the squared Eu-
                is used in the cost function                clidian norm is used in the cost
                (N r 3 = 84)                                function (N r 3 = 92)
Figure 17.6 Example 17.5. State space control partition for u∗0 (x(0))
            Note that as explained in Section 17.6.2 for the case of the squared Euclidian norm,
            the optimal control law is stored in a special data structure where:
           ple 16.2
                        0.90 0.02          0.10
                                                              −0.01 
                      
                        −0.02 −0.00 x(t) + [ 0.02 ] u1 (t) + −0.02                    if x1 (t) ≤ 1, u2 (t) ≤ 0.5
                      
                      
                      
                      
                      
                        0.90 0.02                          −0.07 
                      
                      
                                             0.10
                                                                                       if x1 (t) ≥ 1 + ǫ, u2 (t) ≤ 0.5
                       −0.06 −0.00 x(t) + [ 0.02 ] u1 (t) + −0.15
                      
           x(t+1) =
                      
                                                                         −0.10 
                      
                               0.90 0.38
                                                x(t) + [ 0.10                          if x1 (t) ≤ 1, u2 (t) ≥ 0.5
                      
                              −0.38 0.52                0.38 ] u1 (t) +    −0.38
                      
                      
                      
                      
                      
                                                                         −0.75 
                               0.90 0.35
                               −1.04 0.35       x(t) + [ 0.10
                                                         0.35 ] u1 (t) +    −2.60      if x(t) ≥ 1 + ǫ, u2 (t) ≥ 0.5
                                                                                                               (17.57)
           subject to the constraints
           We solve the finite time constrained optimal control problem (17.7) with cost (17.6)
           with N = 3, P = Q = [ 10 01 ], R = [ 0.2   0
                                                    0 1 ]. The state feedback solution was de-
           termined by using the approach presented in the previous section in two cases:
           without terminal constraint (Figure 17.7(a)) and with terminal constraint Xf =
           [−0.01 0.01] × [−0.01 0.01] (Figure 17.7(b)).
          x2
x2
                                 x1                                                           x1
            (a) Partition with no terminal                             (b) Partition with terminal con-
            constraint (N r 3 = 183).                                  straint (N r 3 = 181).
Figure 17.7 Example 17.6. State space optimal control partition for u∗0 (x(0))
           Under the assumption that the optimizer exists for all states x(k), the ap-
       proach explained in the previous sections can be applied to discontinuous systems
       by considering three elements. First, the PWA system (17.2) has to be defined on
       each polyhedron of its domain and all its lower dimensional facets. Secondly, dy-
       namic programming has to be performed “from” and “to” any lower dimensional
       facet of each polyhedron of the PWA domain. Finally, value functions are not
       lower-semicontinuous, which implies that Lemma 17.4 cannot by used. Therefore,
       when considering the closure of polyhedral domains in multi-parametric program-
       ming (17.47), a post-processing is necessary in order to remove multi-parametric
       optimal solutions which do not belong to the original set but only to its closure.
       The tedious details of the dynamic programming algorithm for discontinuous PWA
       systems are not included here but can be immediately extracted from the results
       of the previous sections.
           In practice, the approach just described for discontinuous PWA systems can
       easily be numerically prohibitive. The simplest approach from a practical point of
       view is to introduce gaps between the boundaries of any two polyhedra belonging
       to the PWA domain (or, equivalently, to shrink by a quantity ε the size of every
       polyhedron of the original PWA system). This way, one deals with PWA systems
       defined over a disconnected union of closed polyhedra. By doing so, one can use
       the approach discussed in this chapter for continuous PWA systems. However, the
       optimal controller will not be defined at the points in the gaps. Also, the computed
       solution might be arbitrarily different from the original solution to problem (17.3)-
       (17.7) at any feasible point x. Despite this, if the magnitude ε of the gaps is close
       to the machine precision and comparable to sensor/estimation errors, such an ap-
       proach can very appealing in practice. In some cases this approach might be the
       only one that is computationally tractable for computing controllers for discontin-
       uous hybrid systems fulfilling state and input constraints that are implementable
       in real-time.
       Consider the problem of regulating the PWA system (17.2) to the origin. Receding
       Horizon Control (RHC) can be used to solve such a constrained regulation problem.
       The control algorithm is identical to the one outlined in Chapter 12 for linear
       systems. Assume that a full measurement of the state x(t) is available at the
404                                                  17     Optimal Control of Hybrid Systems
         The optimization (17.59) is repeated at time t+1, based on the new state xt+1|t+1 =
         x(t + 1), yielding a moving or receding horizon control strategy.
             Based on the results of previous sections the state feedback receding horizon
         controller (17.59)–(17.60) can be immediately obtained in two ways: (i) solve the
         MIQP/MILP (17.24) for xt|t = x(t) or (ii) by setting
         where f0∗ : Rn → Rnu is the piecewise affine solution to the CFTOC (17.59)
         computed as explained in Section 17.6. The explicit form (17.61) has the advantage
         of being easier to implement, and provides insight on the type of action of the
         controller in different regions of the state space.
17.8.2 Examples
             Example 17.7 Consider the problem of regulating the piecewise affine system (17.29)
             to the origin. The constrained finite time optimal control problem (17.7) is solved
             with N = 3, P = Q = [ 10 01 ], R = 1, and Xf = [−0.01 0.01] × [−0.01 0.01]. Its state
17.8          Receding Horizon Control                                                        405
                            time                                       time
         (a) State trajectories (x1 dashed                     (b) Optimal input.
         line and x2 solid line).
              Figure 17.8 Example 17.7. MPC control of system (17.29) when the infinity
              norm is used in the objective.
  x1 and x2
                            time                                       time
         (a) State trajectories (x1 dashed                     (b) Optimal input.
         line and x2 solid line).
              Figure 17.9 Example 17.7. MPC control of system (17.29) when the squared
              Euclidian norm is used in the objective.
406                                                  17     Optimal Control of Hybrid Systems
                                                          u1 and u2
      x1 and x2
                                time                                            time
             (a) State trajectories (x1 dashed                   (b) Optimal inputs (u1 solid line
             line and x2 solid line).                            and binary input u2 dashed line)
                  Figure 17.10 Example 17.8. MPC control of system (17.57) without terminal
                  constraint
17.8          Receding Horizon Control                                                         407
                                                    u1 and u2
  x1 and x2
                           time                                           time
         (a) State trajectories (x1 dashed                 (b) Optimal inputs (u1 solid line
         line and x2 solid line).                          and binary input u2 dashed line)
              Figure 17.11 Example 17.8. MPC control of system (17.57) with terminal
              constraint
408   17   Optimal Control of Hybrid Systems
List of Figures
 1.1   Example 1.1. Constraints, feasible set and gradients. The feasible set is
       the point (1, 0) that satisfies neither Slater’s condition nor the constraint
       qualification condition in Theorem 1.7. . . . . . . . . . . . . . . . . . . 16
 1.2   Geometric interpretation of KKT conditions [27]. . . . . . . . . . . . . . 17
 3.1   Upper and lower bounds on functions: The quadratic upper bound stems
       from L-smoothness of f (Definition 3.2), while the quadratic lower bound
       is obtained from strong convexity of f (Theorem 3.1). In this example,
       f (z) = z 2 + 12 z + 1 and we have chosen L = 3 and µ = 1 for illustration. . 37
 3.2   Example 3.1. First 10 iterations of the gradient method (GM) with
       constant step size 1/L using the tight, a slightly underestimated and a
       strongly underestimated Lipschitz constant L. Also shown are the iter-
       ates of the fast gradient method (FGM) using the tight Lipschitz constant.
       The contour lines indicate the function value of each iterate. Note that
       the gradients are orthogonal to the contour lines. . . . . . . . . . . . . . 40
 3.3   Classic gradient method (left) and fast gradient method (right) for
       the constrained case. After computing the standard update rule
       from the unconstrained case, a projection onto the feasible set is
       applied. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
 3.4   Example 3.4. Illustration of interior point method for example prob-
       lem (3.37). Black dots are the solutions z ∗ (µ). . . . . . . . . . . . . . 55
410                                                                            LIST OF FIGURES
      4.1   Example 4.2. Illustration of the convex hull of three points x1 = [1, 1]′ ,
            x1 = [1, 0]′ , x3 = [0, 1]′ . . . . . . . . . . . . . . . . . . . . . . . . . . .             . 72
      4.2   Example 4.3. Illustration of a cone spanned by the three points x1 =
            [1, 1, 1]′ , x2 = [1, 2, 1]′ , x3 = [1, 1, 2]′ . . . . . . . . . . . . . . . . . . . .        . 73
      4.3   H-polyhedron. The planes (here lines) defining the boundary of the half-
            spaces are a′i x − bi = 0. . . . . . . . . . . . . . . . . . . . . . . . . .                  . 74
      4.4   H-polytope. The planes (here lines) defining the halfspaces are a′i x − bi =
            0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                    .   74
      4.5   Illustration of a polytope in H- and V- representation. . . .                 .   .   .   .   .   76
      4.6   Illustration of the convex hull operation. . . . . . . . . . .                .   .   .   .   .   80
      4.7   Illustration of the envelope operation. . . . . . . . . . . . .               .   .   .   .   .   80
      4.8   Illustration of the Chebychev ball contained in a polytope P. .               .   .   .   .   .   82
      4.9   Illustration of the projection of a 3-dimensional polytope P onto the plane
            x3 = 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
      4.10 Two dimensional example illustrating Theorem 4.2. Partition of the
           rest of the space Y\R0 . . . . . . . . . . . . . . . . . . . . . . . . .                       . 84
      4.11 Illustration of the Pontryagin difference and Minkowski sum opera-
           tions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                   . 85
      4.12 Illustration that the Minkowski sum is not the complement of the
           Pontryagin difference. (P ⊖ Q) ⊕ Q ⊆ P. . . . . . . . . . . . . . .                            . 87
      4.13 Illustration of Algorithm 4.3. Computing the set difference G = C⊖B
           between the P-collection C = C1 ∪ C2 and the polytope B. . . . . .                             . 90
      5.1   Example 5.1. Optimizer z ∗ (x) and value function J ∗ (x) as a function of
            the parameter x. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                    . 97
      5.2   Example 5.3. Point-to-set map and value function. . . . . . . . . . . .                       . 100
      5.3   Example 5.4. Problem (5.10). (a)-(c) Projections of the point-to-set map
            R(x) for three values of the parameter x: x̄1 < x̄2 < x̄3 ; (d) Value function
            J ∗ (x). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                  .   101
      5.4   Example 5.5. Open and not closed point-to-set map R(x). . . . . . . .                         .   102
      5.5   Example 5.6. Closed and not open point-to-set map R(x). . . . . . . .                         .   102
      5.6   Example 5.8. Point-to-set map and value function. . . . . . . . . . . .                       .   105
      6.1   Example 6.2. Optimizer z ∗ (x) and value function J ∗ (x) as a function of
            the parameter x. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
      6.2   Example 6.3. Polyhedral partition of the parameter space. . . . . . . . . 117
      6.3   Example 6.4. Polyhedral partition of the parameter space corresponding
            to the solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
LIST OF FIGURES                                                                                 411
  10.1 Example 10.1. One-step controllable set Pre(X ) ∩ X for system (10.8)
       under constraints (10.9). . . . . . . . . . . . . . . . . . . . . . . . . .       186
  10.2 Example 10.1. Successor set for system (10.8). . . . . . . . . . . . . . .        187
  10.3 Example 10.2. One-step controllable set Pre(X ) ∩ X for system (10.15)
       under constraints (10.16). . . . . . . . . . . . . . . . . . . . . . . . . .      188
  10.4 Example 10.2. Successor set for system (10.15) under constraints (10.16).         189
  10.5 Example 10.3. Controllable sets Kj (S) for system (10.15) under con-
       straints (10.16) for j = 1, 2, 3, 4. Note that the sets are shifted along the
       x-axis for a clearer visualization. . . . . . . . . . . . . . . . . . . . .      . 189
  10.6 Example 10.3. Reachable sets Rj (X0 )) for system (10.15) under con-
       straints (10.16) for j = 1, 2, 3, 4. . . . . . . . . . . . . . . . . . . . . .   . 190
  10.7 Example 10.5. Maximal Positive Invariant Set of system (10.8) under
       constraints (10.9). . . . . . . . . . . . . . . . . . . . . . . . . . . . .      . 192
  10.8 Example 10.6. Maximal Control Invariant Set of system (10.15) subject
       to constraints (10.16). . . . . . . . . . . . . . . . . . . . . . . . . . .      . 194
  10.9 Example 10.8. One-step robust controllable set Pre(X , W) ∩ X for system
       (10.34) under constraints (10.35)-(10.36). . . . . . . . . . . . . . . . .       . 199
  10.10Example 10.8. Robust successor set for system (10.34) under constraints
       (10.36). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       . 200
412                                                                      LIST OF FIGURES
      14.1 Example for Algorithm 14.3 in one dimension: For a given point x ∈ P3
           (x = 5) we have J ∗ (x) = max(T 1 x + V 1 , . . . , T 4 x + V 4 ). . . . . . . . . . 306
      14.2 Example for Algorithm 14.4 in one dimension: For a given point x ∈ P2
           (x = 4) we have O2 (x) = [−1 1]′ = S2 , while O1 (x) = 1 =   6 S1 = −1,
           O3 (x) = [−1 − 1]′ 6= S3 = [1 − 1]′ , O4 (x) = 1 6= S4 = −1. . . . . . . . . 308
      14.3 Illustration for Algorithm 14.5 in two dimensions. . . . . . . . . . . . . . 311
      17.1 Graphical illustration of the main steps for the proof of Theorem 17.1
           when 3 polyhedra intersect. Step 1: the three intersecting polyhedra are
           partitioned into: one polyhedron of triple feasibility (1,2,3), 2 polyhe-
           dra of double feasibility (1, 2) and (1, 3), 3 polyhedra of single feasibility
           (1),(2),(3). The sets (1), (2) and (1,2) are neither open nor closed poly-
           hedra. Step 2: the single feasibility sets of (1), (2) and (3) are partitioned
           into six polyhedra. Step 3: value functions are compared inside the poly-
           hedra of multiple feasibility. . . . . . . . . . . . . . . . . . . . . . . . . 382
      17.2 Example 17.1. Problem (17.12) with cost (17.6) is solved for different vi ,
           i = 1, . . . , 4. Control law u∗0 (x0 ) is PPWA. State space partition is shown. 386
LIST OF FIGURES                                                                             415
  17.3 Example 17.1. State space partition corresponding to the optimal control
       law. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
  17.4 Illustration of Branch and Bound procedure. . . . . . . . . . . . . . . . 391
  17.5 Illustration of the ordered region single valued function. . . . . . . . . . 394
  17.6 Example 17.5. State space control partition for u∗0 (x(0)) . . . . . . . . . 401
  17.7 Example 17.6. State space optimal control partition for u∗0 (x(0)) . . . . . 402
  17.8 Example 17.7. MPC control of system (17.29) when the infinity norm
       is used in the objective. . . . . . . . . . . . . . . . . . . . . . . . . . 405
  17.9 Example 17.7. MPC control of system (17.29) when the squared Eu-
       clidian norm is used in the objective. . . . . . . . . . . . . . . . . . . 405
  17.10Example 17.8. MPC control of system (17.57) without terminal constraint406
  17.11Example 17.8. MPC control of system (17.57) with terminal constraint 407
Index
Strong Duality, 12
Triangulation, 288
      Wolfe Conditions, 46
References
[2] I. Adler and R.D.C. Monteiro. A geometric view of parametric linear pro-
    gramming. Algorithmica, 8(2):161–176, 1992.
[5] J.C. Allwright and G.C. Papavasiliou. On linear programming and robust
    model-predictive control using impulse-responses. Systems & Control Letters,
    18:159–164, 1992.
[7] R. Alur, C. Courcoubetis, T.A. Henzinger, and P.H. Ho. Hybrid automata:
    An algorithmic approach to the specification and verification of hybrid sys-
    tems. In R.L. Grossman, A. Nerode, A.P. Ravn, and H. Rischel, editors,
    Hybrid Systems, volume 736 of Lecture Notes in Computer Science, pages
    209–229. Springer Verlag, 1993.
[8] P.J. Antsaklis. A brief introduction to the theory and applications of hy-
    brid systems. Proc. IEEE, Special Issue on Hybrid Systems: Theory and
    Applications, 88(7):879–886, July 2000.
      [10] J.P. Aubin. Viability theory. Systems & Control: Foundations & Applica-
           tions. Birkhäuser, 1991.
      [11] D. Avis. A revised implementation of the reverse search vertex enumeration
           algorithm. In Gil Kalai and Günter M. Ziegler, editors, Polytopes — Combi-
           natorics and Computation, pages 177–198. Birkhäuser Basel, Basel, 2000.
      [12] D. Avis, D. Bremner, and R. Seidel. How good are convex hull algorithms?
           Computational Geometry, 7(5):265 – 301, 1997.
      [13] T.A. Badgwell and K.R. Muske. Disturbance model design for linear model
           predictive control. In Proc. American Control Conf., volume 2, pages 1621–
           1626, 2002.
      [14] V.L. Bageshwar and F. Borrelli. On a property of a class of offset-free model
           predictive controllers. IEEE Transactions on Automatic Control, 54(3):663
           –669, March 2009.
      [15] E. Balas. Projection with a minimum system of inequalities. Computational
           Optimization and Applications, 10:189–193, 1998.
      [16] A. Balluchi, L. Benvenuti, M. Di Benedetto, C. Pinello, and A. Sangiovanni-
           Vincentelli. Automotive engine control and hybrid systems: Challenges and
           opportunities. Proc. IEEE, 88(7):888–912, 2000.
      [17] A. Balluchi, L. Benvenuti, M.D. Di Benedetto, and A. Sangiovanni-
           Vincentelli. Design of observers for hybrid systems. In C.J. Tomlin and
           M.R. Greenstreet, editors, Hybrid Systems: Computation and Control, vol-
           ume 2289 of Lecture Notes in Computer Science, pages 76–89. Springer Ver-
           lag, Berlin Heidelberg New York, 2002.
      [18] B. Bank, J. Guddat, D. Klatte, B. Kummer, and K. Tammer. Non-Linear
           Parametric Optimization. Akademie-Verlag, Berlin, 1982.
      [19] M. Baotić. An efficient algorithm for multi-parametric quadratic program-
           ming. Technical Report AUT02-05, Automatic Control Laboratory, ETH
           Zurich, Switzerland, February 2002.
      [20] M. Baotić. Gradient of the value function in parametric convex op-
           timization problems.  Technical report, Faculty of Electrical Engi-
           neering and Computing. University of Zagreb, Croatia, 2013. URL:
           https://arxiv.org/abs/1607.00366.
      [21] M. Baotić, F. Borrelli, A. Bemporad, and M. Morari. Efficient on-line com-
           putation of constrained optimal control. SIAM Journal on Control and Op-
           timization, 5:2470–2489, September 2008.
      [22] M. Baotić and F.D. Torrisi. Polycover. Technical Report AUT03-11, Auto-
           matic Control Laboratory, ETHZ, Switzerland, 2003.
      [23] M. Barić. Constrained Control - Computations, Performance and Robust-
           ness. Dr. sc. thesis, Swiss Federal Institute of Technology (ETH), Zürich,
           Switzerland, October 2008.
References                                                                            421
 [24] T. Basar and G.J. Olsder. Dynamic Noncooperative Game Theory. Classics
      in Applied Mathematics. SIAM, Philadelphia, second edition, 1998.
 [25] F. Bayat, T.A. Johansen, and A.A. Jalali. Using hash tables to manage the
      time-storage complexity in a point location problem: Application to explicit
      model predictive control. Automatica, 47(3):571 – 577, 2011.
 [26] M.S. Bazaraa, J.J. Jarvis, and H.D. Sherali. Linear Programming and Net-
      work Flows. John Wiley & Sons, Inc., New York, forth edition, December
      2009.
 [27] M.S. Bazaraa, H.D. Sherali, and C.M. Shetty. Nonlinear Programming —
      Theory and Algorithms. John Wiley & Sons, Inc., New York, second edition,
      1993.
 [51] D.P. Bertsekas. Dynamic Programming and Optimal Control. Athena Scien-
      tific, Belmont, Massachusetts, 1995.
 [53] D.P. Bertsekas. Dynamic Programming and Optimal Control, volume II.
      Athena Scientific, Belmont, Massachusetts, second edition, 2001.
 [54] D.P. Bertsekas and I.B. Rhodes. On the minimax reachability of target sets
      and target tubes. Automatica, 7:233–247, 1971.
 [55] L.T. Biegler and V.M. Zavala. Large-scale nonlinear programming using
      IPOPT: An integrating framework for enterprise-wide dynamic optimization.
      Computers & Chemical Engineering, 33(3):575 – 582, 2009.
 [56] R.R. Bitmead, M. Gevers, and V. Wertz. Adaptive Optimal Control: The
      Thinking Man’s GPC. International Series in Systems and Control Engineer-
      ing. Prentice Hall, 1990.
      [66] M.S. Branicky. Studies in hybrid systems: modeling, analysis, and control.
           PhD thesis, LIDS-TH 2304, Massachusetts Institute of Technology, Cam-
           bridge, MA, 1995.
      [67] M.S. Branicky. Multiple Lyapunov functions and other analysis tools for
           switched and hybrid systems. IEEE Transactions on Automatic Control,
           43(4):475–482, April 1998.
      [68] M.S. Branicky, V.S. Borkar, and S.K. Mitter. A unified framework for hybrid
           control: model and optimal control theory. IEEE Transactions on Automatic
           Control, 43(1):31–45, 1998.
      [69] M.S. Branicky and S.K. Mitter. Algorithms for optimal hybrid control. In
           Proc. 34th IEEE Conf. on Decision and Control, New Orleans, USA, Decem-
           ber 1995.
      [70] M.S. Branicky and G. Zhang. Solving hybrid control problems: Level sets
           and behavioral programming. In Proc. American Control Conf., Chicago,
           Illinois USA, June 2000.
      [71] M. Buss, O. von Stryk, R. Bulirsch, and G. Schmidt. Towards hybrid optimal
           control. AT - Automatisierungstechnik, 48:448–459, 2000.
      [75] F.M. Callier and C.A. Desoer. Linear System Theory. Springer Texts in
           Electrical Engineering. Springer-Verlag New York, 1991.
      [76] E.F. Camacho and C. Bordons Alba. Model Predictive Control. Advanced
           Textbooks in Control and Signal Processing. Springer-Verlag, London, second
           edition, 2007.
      [77] M.K. Camlibel, W.P.M.H. Heemels, and J.M. Schumacher. On linear passive
           complementarity systems. European Journal of Control, 8(3):220–237, 2002.
      [78] P.J. Campo and M. Morari. Robust model predictive control. In Proc.
           American Control Conf., volume 2, pages 1021–1026, 1987.
      [79] P.J. Campo and M. Morari. Model predictive optimal averaging level control.
           AIChE Journal, 35(4):579–591, 1989.
References                                                                            425
 [80] C.G. Cassandras, D.L. Pepyne, and Y.Wardi. Optimal control of a class of
      hybrid systems. IEEE Transactions on Automatic Control, 46(3):3981–415,
      2001.
 [81] T.M. Cavalier, P.M. Pardalos, and A.L. Soyster. Modeling and integer pro-
      gramming techniques applied to propositional calculus. Computers & Oper-
      ations Research, 17(6):561–570, 1990.
 [82] S.N. Cernikov. Contraction of finite systems of linear inequalities (in Rus-
      sian). Doklady Akademiia Nauk SSSR, 152(5):1075–1078, 1963. (English
      translation in Soviet Mathematics - Doklady, Vol. 4, No. 5 (1963), pp.1520–
      1524).
 [83] V. Chandru and J.N. Hooker. Optimization methods for logical inference.
      Wiley-Interscience, 1999.
 [87] F.J. Christophersen. Optimal Control and Analysis for Constrained Piecewise
      Affine Systems. Dr. sc. thesis, Swiss Federal Institute of Technology (ETH),
      Zürich, Switzerland, August 2006.
 [89] D.W. Clarke, C. Mohtadi, and P.S. Tuffs. Generalized Predictive Control –
      part I. the basic algorithm. Automatica, 23(2):137–148, March 1987.
 [91] C.R. Cutler and B.C. Ramaker. Dynamic matrix control—a computer control
      algorithm. In Proc. American Control Conf., volume WP5-B, San Francisco,
      USA, 1980.
 [93] G.B. Dantzig, J. Folkman, and N. Shapiro. On the continuity of the min-
      imum set of a continuous function. Journal of Mathematical Analysis and
      Applications, 17:519–548, 1967.
426                                                                            References
       [95] B. De Schutter and T. van den Boom. Model predictive control for max-plus-
            linear discrete event systems. Automatica, 37(7):1049–1056, July 2001.
       [98] A. Domahidi, A. Zgraggen, M.N. Zeilinger, M. Morari, and C.N. Jones. Ef-
            ficient interior point methods for multistage problems arising in receding
            horizon control. In Proc. 51st IEEE Conf. on Decision and Control, pages
            668–674, Maui, HI, USA, December 2012.
       [99] J.A. De Doná. Input Constrained Linear Control. PhD thesis, Control Group,
            Department of Engineering, University of Cambridge, Cambridge, 2000.
      [100] C.E.T. Dórea and J.C. Hennet. (a,b)-invariant polyhedral sets of linear
            discrete-time systems. J. Optim. Theory Appl., 103(3):521–542, 1999.
      [101] V. Dua and E.N. Pistikopoulos. An algorithm for the solution of multipara-
            metric mixed integer linear programming problems. Annals of Operations
            Research, 99:123–139, 2000.
      [105] H.J. Ferreau and M. Diehl H.G. Bock. An online active set strategy to
            overcome the limitations of explicit MPC. International Journal of Robust
            and Nonlinear Control, 18:816–830, 2008.
      [106] A.V. Fiacco. Sensitivity analysis for nonlinear programming using penalty
            methods. Mathematical Programming, 10(3):287–311, 1976.
References                                                                           427
[113] K. Fukuda, Th.M. Liebling, and C. Lütolf. Extended convex hull. Computa-
      tional Geometry, 20:13–23, 2001.
[116] T. Gal and H.J. Greenberg (Eds.). Advances in Sensitivity Analysis and
      Parametric Programming, volume 6 of International Series in Operations
      Research & Management Science. Kluwer Academic Publishers, 1997.
[118] C.E. Garcı́a and A.M. Morshedi. Quadratic programming solution of dynamic
      matrix control (QDMC). Chem. Eng. Communications, 46:73–87, 1986.
[119] S.J. Gartska and R.J.B. Wets. On decision rules in stochastic programming.
      Mathematical Programming, 7:117–143, 1974.
[120] S.I. Gass and T.L. Saaty. The computational algorithm for the parametric
      objective function. Naval Research Logistics Quarterly, 2:39–45, 1955.
      [122] T. Geyer, F.D. Torrisi, and M. Morari. Efficient Mode Enumeration of Com-
            positional Hybrid Models. In A. Pnueli and O. Maler, editors, Hybrid Sys-
            tems: Computation and Control, volume 2623 of Lecture Notes in Computer
            Science, pages 216–232. Springer Verlag, 2003.
      [123] T. Geyer, F.D. Torrisi, and M. Morari. Optimal complexity reduction of
            polyhedral piecewise affine systems. Automatica, 44:1728–1740, July 2008.
      [124] E.G. Gilbert and K.T. Tan. Linear systems with state and control constraints:
            the theory and applications of maximal output admissible sets. IEEE Trans-
            actions on Automatic Control, 36(9):1008–1020, 1991.
      [125] N. Giorgetti, A. Bemporad, H.E. Tseng, and D. Hrovat. Hybrid model pre-
            dictive control application towards optimal semi-active suspension. Int. J.
            Control, 79(5):521–533, 2006.
      [126] F. Glover. Improved linear integer programming formulations of nonlinear
            integer problems. Management Science, 22(4):455–460, 1975.
      [127] R. Goebel, R.G. Sanfelice, and A.R. Teel. Hybrid dynamical systems. IEEE
            Control Systems Magazine, 29(2):28–93, 2009.
      [128] K. Gokbayrak and C.G. Cassandras. A hierarchical decomposition method
            for optimal control of hybrid systems. In Proc. 38th IEEE Conf. on Decision
            and Control, pages 1816–1821, Phoenix, AZ, December 1999.
      [129] G.C. Goodwin and K. S. Sin. Adaptive Filtering, Prediction and Control.
            Prentice-Hall, Englewood Cliffs, NJ, 1984.
      [130] P.J. Goulart, E.C. Kerrigan, and J.M. Maciejowski. Optimization over state
            feedback policies for robust control with constraints. Automatica, 42(4):523–
            533, 2006.
      [131] P. Grieder. Efficient Computation of Feedback Controllers for Constrained
            Systems. Dr. sc. thesis, Swiss Federal Institute of Technology (ETH), Zürich,
            Switzerland, 2004.
      [132] P. Grieder, F. Borrelli, F.D. Torrisi, and M. Morari. Computaion of the con-
            strained infinite horizon linear quadratic regulator. Technical Report AUT02-
            09, Automatic Control Laboratory, ETH Zurich, Switzerland, July 2002.
      [133] P. Grieder, F. Borrelli, F.D. Torrisi, and M. Morari. Computation of the
            constrained infinite time linear quadratic regulator. Automatica, 40:701–708,
            April 2004.
      [134] P. Grieder, M. Kvasnica, M. Baotić, and M. Morari. Low complexity con-
            trol of piecewise affine systems with stability guarantee. In Proc. American
            Control Conf., pages 1196–1201, Boston, USA, June 2004.
      [135] B. Grünbaum. Convex Polytopes. Springer Verlag, second edition, 2003.
      [136] E. Guslitzer. Uncertainty-immunized solutions in linear programming. Mas-
            ter’s thesis, Technion (Israel Institute of Technology), Haifa, Israel, 2002.
References                                                                            429
[168] S.S. Keerthi and E.G. Gilbert. Optimal infinite-horizon feedback control laws
      for a general class of constrained discrete-time systems: stability and moving-
      horizon approximations. J. Opt. Theory and Applications, 57:265–293, 1988.
[170] A. Kelman and F. Borrelli. Parallel nonlinear predictive control. In 2012 50th
      Annual Allerton Conference on Communication, Control, and Computing
      (Allerton), pages 71–78, Oct 2012.
[172] E.C. Kerrigan. Robust Constraint Satisfaction: Invariant Sets and Predictive
      Control. PhD thesis, Department of Engineering, University of Cambridge,
      Cambridge, England, 2000.
[173] E.C. Kerrigan and J.M. Maciejowski. Soft constraints and exact penalty func-
      tions in model predictive control. In Proc. UKACC International Conference
      (Control 2000), Cambridge, UK, September 2000.
[174] E.C. Kerrigan and J.M. Maciejowski. Designing model predictive controllers
      with prioritised constraints and objectives. In IEEE International Symposium
      on Computer Aided Control System Design, pages 33–38, 2002.
[175] E.C. Kerrigan and J.M. Maciejowski. On robust optimization and the optimal
      control of constrained linear systems with bounded state disturbances. In
      2003 European Control Conference, Cambridge, UK, September 2003.
[176] H.K. Khalil. Nonlinear Systems. Prentice Hall, second edition, 1996.
[178] D. Klatte and G. Thiere. Error bounds for solutions of linear equations and
      inequalities. ZOR - Mathematical Methods of Operations Research, 41:191–
      214, 1995.
432                                                                             References
      [183] J.P. LaSalle. Stability theory for difference equations. In Jack Hale, editor,
            Studies in Ordinary Differential Equations, volume 14 of MAA Studies in
            Mathematics, pages 1–31. Mathematical Assoc. of Amer., 1977.
      [184] J.P. LaSalle. The Stability and Control of Discrete Processes, volume 62 of
            Applied Mathematical Sciences. Springer Verlag, New York, 1986.
      [186] M. Lazar, W.P.M.H. Heemels, and A.R. Teel. Lyapunov functions, stability
            and input-to-state stability subtleties for discrete-time discontinuous systems.
            IEEE Transactions on Automatic Control, 54(10):2421–2425, 2009.
      [189] J. H. Lee and Z. Yu. Worst-case formulations of model predictive control for
            systems with bounded parameters. Automatica, 33(5):763–781, 1997.
      [190] F.L. Lewis and V.L. Syrmos. Optimal Control. John Wiley & Sons, Inc.,
            New York, 1995.
      [191] D. Liberzon. Switching in Systems and Control. Systems and Control: Foun-
            dations and Application. Birkhäuser, Boston, MA, June 2003.
[193] Y.-C. Liu and C. B. Brosilow. Simulation of large scale dynamic systems—
      I. modular integration methods. Computers & Chemical Engineering,
      11(3):241–253, 1987.
[197] J.M. Maciejowski. Predictive Control with Constraints. Prentice Hall, 2002.
[200] O.L. Mangasarian and J.B. Rosen. Inequalities for stochastic nonlinear pro-
      gramming problems. Operations Research, 12(1):143–154, 1964.
[201] J. Mattingley and S. Boyd. CVXGEN: A code generator for embedded convex
      optimization. Optimization and Engineering, 13:1–27, 2012.
[204] D.Q. Mayne, J.B. Rawlings, C.V. Rao, and P.O.M. Scokaert. Constrained
      model predictive control: Stability and optimality. Automatica, 36(6):789–
      814, June 2000.
[207] S. Mehrotra and R.D.C. Monteiro. Parametric and range analysis for interior
      point methods. Technical report, Dept. of Systems and Industrial Engineer-
      ing, University of Arizona, Tucson, USA, 1992.
      [209] J.A. Mendez, B. Kouvaritakis, and J.A. Rossiter. State space approach to
            interpolation in MPC. Int. J. Robust Nonlinear Control, 10(1):27–38, January
            2000.
      [210] D. Mignone. Control and Estimation of Hybrid Systems with Mathematical
            Optimization. Dr. sc. thesis, Swiss Federal Institute of Technology (ETH),
            Zürich, Switzerland, 2002.
      [211] D. Mignone, A. Bemporad, and M. Morari. A framework for control, fault
            detection, state estimation and verification of hybrid systems. Proc. American
            Control Conf., pages 134–138, June 1999.
      [212] R. Milman and E.J. Davison. A fast MPC algorithm using nonfeasible active
            set methods. Journal of Optimization Theory and Applications, 139(3):591–
            616, 2008.
      [213] G. Mitra, C. Lucas, and S. Moody. Tool for reformulating logical forms into
            zero-one mixed integer programs. European Journal of Operational Research,
            71:262–276, 1994.
      [214] R. Möbus, M. Baotić, and M. Morari. Multi-objective adaptive cruise con-
            trol. In O. Maler and A. Pnueli, editors, Hybrid Systems: Computation and
            Control, volume 2623 of Lecture Notes in Computer Science, pages 359–374.
            Springer Verlag, 2003.
      [215] M. Morari and G. Stephanopoulos. Minimizing unobservability in inferential
            control schemes. Int. J. Control, 31:367–377, 1980.
      [216] M. Morari and G. Stephanopoulos. Studies in the synthesis of control struc-
            tures for chemical processes; Part III: Optimal selection of secondary mea-
            surements within the framework of state estimation in the presence of per-
            sistent unknown disturbances. AIChE J., 26:247–260, 1980.
      [217] K.G. Murty. Linear Programming. Wiley-Interscience Publication, 1983.
            First Edition.
      [218] K.R. Muske and T.A. Badgwell. Disturbance modeling for offset-free linear
            model predictive control. Journal of Process Control, 12:617–632, 2002.
      [219] G.L. Nemhauser and L.A. Wolsey. Integer and Combinatorial Optimization.
            Wiley, 1988.
      [220] Y. Nesterov. Introductory Lectures on Convex Optimization. A Basic Course.
            Springer, 2004.
      [221] Y. Nesterov. Smooth minimization of non-smooth functions. Mathematical
            Programming, 103(1):127–152, 2005.
      [222] Y. Nesterov and A. Nemirovski. Interior-Point Polynomial Algorithms in
            Convex Programming. Society for Industrial Mathematics, 1994.
      [223] J. Nocedal and S.J. Wright. Numerical Optimization. Springer, New York,
            2nd edition, 2006.
References                                                                            435
[224] J.M. Ortega and W.C. Rheinboldt. Iterative solution of nonlinear equations
      in several variables, volume 30. Society for Industrial and Applied Mathe-
      matics, 1987.
[226] G. Pannocchia and J.B. Rawlings. Disturbance models for offset-free model
      predictive control. AIChE Journal, 49(2):426–437, 2003.
[229] T. Park and P.I. Barton. Implicit model checking of logic-based control
      systems. AIChE Journal, 43(9):2246–2260, 1997.
[233] S. Pettersson and B. Lennartson. Stability and robustness for hybrid systems.
      In Proc. 35th IEEE Conf. on Decision and Control, pages 1202–1207, Kobe,
      Japan, 1996.
[235] B. Piccoli. Necessary conditions for hybrid optimization. In Proc. 38th IEEE
      Conf. on Decision and Control, Phoenix, Arizona USA, December 1999.
      [239] A.I. Propoi. Use of linear programming methods for synthesizing sampled–
            data automatic systems. Automation and Remote Control, 24(7):837–844,
            1963.
      [240] S.J. Qin and T.A. Badgwell. An overview of industrial model predictive
            control technology. In Chemical Process Control - V, volume 93, no. 316,
            pages 232–256. AIChE Symposium Series - American Institute of Chemical
            Engineers, 1997.
      [241] S.J. Qin and T.A. Badgwell. A survey of industrial model predictive control
            technology. Control Engineering Practice, 11:733–764, 2003.
      [242] S.V. Raković, P. Grieder, M. Kvasnica, D.Q. Mayne, and M. Morari. Com-
            putation of invariant sets for piecewise affine discrete time systems subject to
            bounded disturbances. In Proc. 43rd IEEE Conf. on Decision and Control,
            pages 1418–1423, December 2004.
      [243] S.V. Rakovic, E.C. Kerrigan, and D.Q. Mayne. Reachability computations
            for constrained discrete-time systems with state- and input-dependent distur-
            bances. In Proc. 42nd IEEE Conf. on Decision and Control, pages 3905–3910,
            December 2003.
      [244] R. Raman and I.E. Grossmann. Relation between MILP modeling and logical
            inference for chemical process synthesis. Computers Chem. Engng., 15(2):73–
            84, 1991.
      [246] C.V. Rao, S.J. Wright, and J.B. Rawlings. Application of Interior-Point
            methods to model predictive control. Journal of Optimization Theory and
            Applications, 99(3):723–757, December 1998.
      [247] J.B. Rawlings and D.Q. Mayne. Model Predictive Control: Theory and De-
            sign. Nob Hill Publishing, 2009.
      [249] J. Richalet, A. Rault, J.L. Testud, and J. Papon. Model predictive heuristic
            control-application to industrial processes. Automatica, 14:413–428, 1978.
      [251] S. Richter, C.N. Jones, and M. Morari. Certification Aspects of the Fast Gra-
            dient Method for Solving the Dual of Parametric Convex Programs. Mathe-
            matical Methods of Operations Research, 77(3):305–321, January 2013.
References                                                                             437
      [266] E.D. Sontag. Nonlinear regulation: The piecewise linear approach. IEEE
            Transactions on Automatic Control, 26(2):346–358, April 1981.
      [267] E.D. Sontag. Interconnected automata and linear systems: A theoretical
            framework in discrete-time. In R. Alur, T.A. Henzinger, and E.D. Sontag,
            editors, Hybrid Systems III - Verification and Control, number 1066 in Lec-
            ture Notes in Computer Science, pages 436–448. Springer Verlag, 1996.
      [268] J. Spjotvold, E.C. Kerrigan, C.N. Jones, P. Tøndel, and T.A Johansen. On
            the facet-to-facet property of solutions to convex parametric quadratic pro-
            grams. Automatica, 42(12):2209–2214, December 2006.
      [269] R. Suard, J. Löfberg, P. Grieder, M. Kvasnica, and M. Morari. Efficient
            computation of controller partitions in multi-parametric programming. In
            Proc. 43rd IEEE Conf. on Decision and Control, pages 3643–3648, Bahamas,
            December 2004.
      [270] S. Summers, C.N. Jones, J. Lygeros, and M. Morari. A multiresolution ap-
            proximation method for fast explicit model predictive control. IEEE Trans-
            actions on Automatic Control, 56(11):2530–2541, Nov 2011.
      [271] H.J. Sussmann. A maximum principle for hybrid optimal control problems.
            In Proc. 38th IEEE Conf. on Decision and Control, Phoenix, Arizona USA,
            December 1999.
      [272] M. Sznaier and M.J. Damborg. Suboptimal control of linear systems with
            state and control inequality constraints. In Proc. 26th IEEE Conf. on Deci-
            sion and Control, volume 1, pages 761–762, 1987.
      [273] C.J. Tomlin, J. Lygeros, and S.S. Sastry. A game theoretic approach to
            controller design for hybrid systems. Proceeding of IEEE, 88(7):949–970,
            July 2000.
      [274] P. Tøndel, T.A. Johansen, and A. Bemporad. An algorithm for multi-
            parametric quadratic programming and explicit MPC solutions. In Proc.
            40th IEEE Conf. on Decision and Control, December 2001.
      [275] P. Tøndel, T.A. Johansen, and A. Bemporad. Evaluation of piecewise affine
            control via binary search tree. Automatica, 39(5):945–950, 2003.
      [276] F.D. Torrisi and A. Bemporad. HYSDEL — A tool for generating compu-
            tational hybrid models. IEEE Transactions on Control Systems Technology,
            12(2):235–249, March 2004.
      [277] M.L. Tyler and M. Morari. Propositional logic in control and monitoring
            problems. Automatica, 35(4):565–582, 1999.
      [278] V.I. Utkin. Variable structure systems with sliding modes. IEEE Transac-
            tions on Automatic Control, 22(2):212–222, April 1977.
      [279] A.J. van der Schaft and J.M. Schumacher. Complementarity modelling of
            hybrid systems. IEEE Transactions on Automatic Control, 43:483–490, 1998.
References                                                                            439
[281] D.H. vanHessem and O.H. Bosgra. A conic reformulation of model predictive
      control including bounded and stochastic disturbances under state and input
      constraints. In Proc. 41st IEEE Conf. on Decision and Control, pages 4643–
      4648, Las Vegas, Nevada, USA, 2002.
[284] Y. Wang and S. Boyd. Fast model predictive control using online optimiza-
      tion. IEEE Transactions on Control Systems Technology, 18(2):267 –278,
      March 2010.
[286] H.P. Williams. Logical problems and integer programming. Bulletin of the
      Institute of Mathematics and Its Applications, 13:18–20, 1977.
[289] H.S. Witsenhausen. A min-max control problem for sampled linear systems.
      IEEE Transactions on Automatic Control, 13(1):5–21, 1968.
[293] L.A. Zadeh and L.H. Whalen. On optimal control and linear programming.
      IRE Trans. Automatic Control, 7:45–46, 1962.
440                                                                         References