Institut für Automatik D-ITET ETH Zürich SS 2012 Prof. Dr. M. Morari 22. 03. 2012 MODEL PREDICTIVE CONTROL Exam Stud.-Nr. : Name : Do not use pencils or red color. Make sure that your name and student number is on every sheet you hand in. Use seperate sheets for the four parts. Part Points max. 1 40 2 40 3 25 4 20 125
1. Part Question a) b) c) Total Max. Points 12 12 16 40 Achieved Points Optimal Control of Linear Systems a) Consider the following discrete-time system: [ ] [ ] 0 1/2 1 x k+1 = x 3/2 2 k + u b k }{{}}{{} A B y k = [ 0 2 ] (1) x k }{{} C with parameter b R. i) For which b is the system open-loop stable? ii) For which b is the system controllable? In the following, let b = 0. The goal is to design a linear state feedback controller u k = Kx k with K = [ ] k 1 k 2 such that from any initial state x 0 the closed-loop system reaches the origin in finite time. This is achieved if K is chosen such that all eigenvalues of the closed-loop system are zero. iii) Give a sufficient condition on a general pair A and B for the existence of such a K. Is it fulfilled for A and B given in (1) with b = 0? After how many steps, at most, does the system arrive at the origin with such a controller? b) We want to design a state observer for system (1). i) Derive the update equation for the state estimate ˆx such that the error dynamics are given by e k+1 = (A LC)e k. (2) where e k is the estimation error at time step k which is defined as e k := x k ˆx k. (3) ii) How many states does the closed-loop system with observer and the controller u k = K ˆx k have in total? iii) Let L = [ 1/4 1 ] [ ] T 13/4 0 and V (x) := x P x with P =. 0 1 Show that V is a Lyapunov function for the error dynamics (2). What does this imply?
c) Dynamic Programg. Consider the finite horizon discounted LQR problem N 1 α ( ) k x T k Qx k + u T k Ru k X,U such that x k+1 = Ax k + Bu k, with discount factor α (0, 1), Q = Q T, Q 0, R = R T and R 0. Assume the following form of the optimal cost-to-go at timestep n, n {0, 1,..., N} for the discounted problem (4) where P di n = (P di n ) T and P di n 0. Jn di, (x n ) = α n x T npn di x n i) With the given form of the optimal cost-to-go of the discounted problem and using the principle of optimality derive the recursion Pn+1 di Pn di. ii) Show that the recursion for P di coincides with the standard Riccati recursion for P un (4) P un n ( = ÃT Pn+1à un ÃT Pn+1B un B T Pn+1B un + R ) 1 B T Pn+1à un + Q, of the undiscounted problem X,U N 1 x T k Qx k + u T k Ru k with à = αa and R = R/α. subject to x k+1 = Ãx k + Bu k
2. Part Question a) b) c) Total Max. Points 12 16 12 40 Achieved Points Optimization a) i) Every subspace is a cone ii) Every affine set is a cone iii) Every cone is an affine set iv) The finite intersection of polytopes is always a polytope v) The finite union of polytopes is always a polytope vi) Let f i (x) : R n R, i = 1,..., N be a set of N convex functions. Show that the set is convex. S := {x R n f i (x) 0, i = 1,..., N} b) Consider the following Linear Program subj. to where c R n, G R m n, h R m. i) Problem (5) is always convex ii) Its convexity depends on c iii) It is always feasible iv) Its feasibility depends on c v) Let the matrices in (5) be c = [ ] 1, G = 1 c T x Gx h 1 0 0 1 1 0 0 1, h = 1 1 1. 1 (5) Find the optimal solution of (5) and show that it satisfies the KKT conditions.
vi) The optimal solution of v) remains optimal if we change the cost vector to c = [ 1 0 ] T vii) The optimal solution of (v) remains optimal if we change the right hand side of the constraints to h = [ 1 2 1 1 ] T c) Consider the following quadratic program with equality constraints subj. to x T x Ax = b (6) i) Formulate the Lagrange function corresponding to (6) ii) Formulate the dual function corresponding to (6) iii) Formulate the dual optimization problem corresponding to (6) by imizing (infimizing) over x iv) Let A = [ 1 0 ] and b = 1 in (6). Solve the primal and dual problem and show that the duality gap is zero.
3. Part Question a) b) Total Max. Points 17 8 25 Achieved Points Model Predictive Control Consider the following finite-horizon discrete-time optimal control problem with Q 0,P 0, R 0, (A, B) controllable: V (x) = {u 0,...,u N 1 } subject to: N 1 (x k Qx k + u k Ru k ) + x NP x N x k+1 = Ax k + Bu k, x 0 = x Cx k + Du k f, for k {0,...., N 1} (7) a) Suppose that N = 3 and that the control inputs u k are modeled as u k = Kx k + v k, where K is a constant matrix and the vector v k is a decision variable in the optimization problem. Define v 0 v := v 1. v 2 Find matrices E and S, vectors g and h, and a constant c such that the optimal control problem (7) can be rewritten as v [ v Sv + h v + c ] subject to: Ev g. (8) b) Assume that problem (7) has no constraints, and that one solves, at each time step, the optimization problem with optimal solution V (x) = v [ v Sv + h v + c ], v (x) = (v 0(x); v 1(x); v 2(x)). Assume that the matrix K is chosen such that (A + BK) is stable. Suggest a condition on the matrix P such that the closed-loop system is stable. x(k + 1) = (A + BK)x(k) + Bv 0(x)
4. Part Question a) b) Total Max. Points 14 6 20 Achieved Points Parametric Linear Program / Hybrid MPC a) Consider the parametric linear program J p (x) = max z 1,z 2 z 1 +xz 2 s.t. z 1 + z 2 = 1 z 1 0 z 2 0, (pplp) with parameter x R. i) Sketch the feasible set of (pplp) and the cost gradients for parameter values x {0, 1, 2}. ii) Derive the optimizer function z (x) = (z 1(x), z 2(x)) and the value function J p (x) of (pplp) for parameter values x [0, 2]. Hint: Do it graphically. iii) The dual program of (pplp) is given by Jd(x) = λ λ s.t. λ 1 λ x (dplp) Derive the dual optimizer function λ (x) and the dual value function Jd (x) of (dplp) for parameter values x [0, 2]. iv) Compare Jp (x) with Jd (x). State the reason why or why not the value functions coincide. b) Consider the discrete-time dynamic system x k+1 = Ax k + Bu k, k 0, (SYS) with state x k R n and discrete input u k {v, w}, where v, w are vectors in R m. i) Let us represent (SYS) as a mixed logical dynamical (MLD) system. For this, we introduce binary variables (δ 1,k, δ 2,k ) {0, 1} 2 for every time-step k 0 and rewrite (SYS) as [ ] δ1,k x k+1 = Ax k + B h, k 0 δ 2,k (MLDSYS) c = d 1 δ 1,k + d 2 δ 2,k, k 0. State the input matrix B h R n 2 and the coefficients (c, d 1, d 2 ) R 3 so that (MLDSYS) is an equivalent description of (SYS).
ii) Suppose now that we want to design a model predictive controller based on the MLD representation in (MLDSYS), i.e. at every sampling instant we solve N 1 1 N 2 1 2 xt NP x N + 2 xt k Qx k + s.t. (MLDSYS), k = 0,..., N 1 x,δ1,δ2 f p (δ 1 ) 0 x 0 = x(0), l u (δ 1,k+1, δ 1,k ) where x(0) R n is the initial state of the system and x, δ 1, δ 2 denote the sequences of states/binaries over the prediction horizon of length N. Design the functions l u, f p such that changing the discrete input gets penalized, input v is applied to the system at most N/2 times over the prediction horizon (assug N is an even number). Hint: It suffices to restrict l u and f p to the class of affine and quadratic functions.