Home > Documents > ECE7850 Lecture 8 Nonlinear Model Predictive Control ...zhang/teaching... · ECE7850 Wei Zhang...

# ECE7850 Lecture 8 Nonlinear Model Predictive Control ...zhang/teaching... · ECE7850 Wei Zhang...

Date post: 05-Jun-2020
Category:
View: 8 times
of 31 /31
ECE7850 Wei Zhang ECE7850 Lecture 8 Nonlinear Model Predictive Control: Theoretical Aspects Model Predictive control (MPC) is a powerful control design method for constrained dynam- ical systems. The basic principles and theoretical results for MPC are almost the same for most nonlinear systems, including discrete-time hybrid systems. The particular underlying model (e.g. linear or switched afﬁne, or piecewise afﬁne, or hybrid systems), mainly affects the computational aspects for MPC. This lecture focuses on principles for general nonlinear MPC; next lecture will cover compu- tational aspects, especially for MPC of hybrid systems. 1
Transcript

ECE7850 Wei Zhang

ECE7850 Lecture 8

Nonlinear Model Predictive Control: Theoretical Aspects

• Model Predictive control (MPC) is a powerful control design method for constrained dynam-

ical systems.

• The basic principles and theoretical results for MPC are almost the same for most nonlinear

systems, including discrete-time hybrid systems.

• The particular underlying model (e.g. linear or switched affine, or piecewise affine, or hybrid

systems), mainly affects the computational aspects for MPC.

• This lecture focuses on principles for general nonlinear MPC; next lecture will cover compu-

tational aspects, especially for MPC of hybrid systems.

1

ECE7850 Wei Zhang

Lecture Outline

• Formulation and Related Definitions for General MPC

• Persistent Feasibility of MPC

• Stability Analysis of MPC

• Analysis Without Terminal Constraint/Cost

• Other Selected Topics

2

ECE7850 Wei Zhang

Formulation and Related Definitions

• General discrete-time nonlinear systems:

⎧⎪⎪⎨⎪⎪⎩x(t + 1) = f(x(t), u(t))y(t) = h(x(t))

, t ∈ Z+ (1)

• State and Control constraints:

x(t) ∈ X u(t) ∈ U (2)

– In general, X ⊂ Rn × Q and U ⊂ R

m × Σ have both continuous and discrete components.

– To simplify presentation, we assume X ⊂ Rn (but u can have both continuous and dis-

crete components)

• Assume full state information available, unless otherwise stated. (e.g. y(t) = x(t) or h(·) is

bijection)

Formulation and Related Definitions 3

ECE7850 Wei Zhang

• Basic ideas for MPC: Receding Horizon Control (RHC)

– At time t, solves a finite horizon optimal control problem based on the system model

– Apply the first step of the optimal control sequence

– At time t + 1, horizon is shifted and the optimal control problem is solved again using

newly obtained state measurements

Formulation and Related Definitions 4

ECE7850 Wei Zhang

• Formalizing the idea:

– At time t: solve the following N -horizon optimal control problem:

PN(x(t)) : VN(x(t)) =

⎧⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩

minu J(x(0), u) � Jf(xN) + ∑N−1k=0 l(xk, uk)

subj. to: xk+1 = f(xk, uk), k = 0, . . . , N − 1xk ∈ X, uk ∈ U, k = 0, . . . , N − 1xN ∈ Xf, x0 = x(t)

(3)

– Xf ⊆ X: terminal state constraint set

– Assume nonnegative cost functions: Jf : X → R+ and l : X × U → R+

– Given x(0), optimal control sequence u∗0, . . . , u∗

N−1 can be found via numerical optimiza-

tion

Formulation and Related Definitions 5

ECE7850 Wei Zhang

• Problem (3) can also be solved using DP, leading to optimal control laws

μ∗j(z) = argminu∈U(z){l(z, u) + Vj−1(f(z, u))}, j = 1, . . . , N

• Finding {u∗k} is much easier than finding μ∗

j(·);

• Why we care about {μ∗j(·)}?

– For many cases, μ∗j(z) may have appealing analytical structures that can simplify the

“online” computation for {u∗k} (e.g.: explicit MPC)

– Enable various analysis for feasibility, performance, and stability of MPC

• At any time t, if the state is x(t), then MPC controller will apply ut = μ∗N

(x

(t

))

Formulation and Related Definitions 6

ECE7850 Wei Zhang

• Two fundamental issues for MPC

– Persistent Feasibility: Problem P(x(t)) remains feasible for all t

– Closed-Loop Stability: x(t + 1) = f(x(t), μ∗N(x(t))) is stable

• We need to introduce some key concepts and definitions:

– One-step backward reachable set: P re(S) = {x ∈ Rn : ∃u ∈ U s.t. f(x, u) ∈ S}

– One-step forward reachable set:

Reach(S) = {x ∈ Rn : ∃u ∈ U, z ∈ S s.t. x = f(z, u) ∈ S}

Formulation and Related Definitions 7

ECE7850 Wei Zhang

– N -step backward reachable set subject to system constraints:

R−j+1(S) = P re

(R−

j (S))

∩ X, R−0 (S) = S (4)

– N -step forward reachable set subject to system contratins:

R+j+1(S) = Reach

(R+

j (S))

∩ X, R+0 (S) = S (5)

– Positive Invariant Set: Given an constrained autonomous system

x(t + 1) = fa(x(t)), t ∈ Z+, x(t) ∈ X (6)

a set O ⊂ X is called a positive invariant set if

x(0) ∈ O ⇒ x(t) ∈ O, ∀t ∈ Z+

Formulation and Related Definitions 8

ECE7850 Wei Zhang

– Maximal Positive Invariant Set O∗: positive invariant + contains all invariant sets con-

tained in X

– C ⊆ X is called a Control Invariant Set for the constrained system (1) if

x(t) ∈ C ⇒ ∃u(t) ∈ U such that f(x(t), u(t)) ∈ C, ∀t ∈ Z+

– Maximal control invariant set C∗: control invariant + contains all control invariant sets

contained in X

– Efficient algorithms to compute (control) invariant sets are available for particular classes

of constrained systems

Formulation and Related Definitions 9

ECE7850 Wei Zhang

Persistent Feasibility of MPC

• Feasible set Xk: the set of feasible state xk at prediction step k for which (3) is feasible

Xk = {x ∈ X : ∃u ∈ U, s.t. f(x, u) ∈ Xk+1}, with XN = Xf (7)

• can be equivalently defined as: Xk = P re(Xk+1) ∩ X, with XN = Xf

• Persistent Feasibility:

– start from any x(0) ∈ X0

– evolve under MPC control law, i.e., x(t + 1) = f(x(t), μ∗N(x(t)))

– feasibility is guaranteed at all time, i.e. x(t) ∈ X0, for all t ∈ Z+.

Persistent Feasibility of MPC 10

ECE7850 Wei Zhang

• Lemma 1 If X1 is control invariant, then receding horizon control problem PN(x(t)) is persis-

tently feasible.

Proof:

– X1 ⊆ P re(X1) ∩ X = X0

– ∀x ∈ X0, apply the first-step of MPC control u∗0. We have x+ = f(x, u∗

0) ∈ X1 ⊆ X0

• However, the above condition is hard to verify as X1 is defined recursively from Xf . A

condition directly imposed on Xf is desirable.

Persistent Feasibility of MPC 11

ECE7850 Wei Zhang

Theorem 1 If Xf is control invariant, then the receding horizon optimization PN(x(t)) is per-

sistently feasible.

Persistent Feasibility of MPC 12

ECE7850 Wei Zhang

Stability of MPC

• Stability analysis of MPC:

– closed-loop system: x(t + 1) = f(x(t), μ∗N(x(t)) persistently feasible and stable

– characterize domain of attraction

• Assumption 1 (i) X and U contains origin in their interior.

(ii) x = 0, u = 0 is an equilibrium f(0, 0) = 0;

(iii) β−l ‖z‖ ≤ l(z, u) ≤ β+

l ‖z‖, for all z ∈ X, u ∈ U .

Stability of MPC 13

ECE7850 Wei Zhang

• Theorem 2 Assume conditions in Assumption 1 hold and

1. Xf ⊆ X is control invariant

2. Terminal cost function Jf is a local control Lyapunov function satisfying

Jf(z) ≤ βf‖z‖, and ∃μ such that: Jf(z) − Jf(f(z, μ(z))) ≥ l(z, μ(z)), ∀z ∈ Xf (8)

Then the origin of the closed-loop system under MPC control is exponentially stable with

region of attraction X0.

Sketch of proof

– Pick an arbitrary z ∈ X0, let u∗0, . . . , u∗

N−1 and x∗0, x∗

1, . . . , x∗N be the corresponding optimal

control and trajectory.

Stability of MPC 14

ECE7850 Wei Zhang

– Need to show VN(z) is a control Lyapunov function on X0

Let μ be the law satisfying (8). Construct a new control sequence

u = {u∗1, u∗

2, . . . , u∗N−1, μ(x∗

N)}.

Starting from x∗1, the control sequence u results in state trajectory {x∗

1, x∗2, . . . , x∗

N, f(x∗N, μ(x∗

N))}.By optimality of VN , we have

VN(x∗1) ≤ JN(x∗

1, u) =N−1∑k=1

l(x∗k, u∗

k) + l(x∗N, μ(x∗

N)) + Jf(f(x∗N, μ(x∗

N)))

= VN(x∗0) − l(x∗

0, u∗0) − Jf(x∗

N) + l(x∗N, μ(x∗

N)) + Jf(f(x∗N, μ(x∗

N)))

Notice that x∗0 = z, x∗

1 = f(z, μ∗N(z)), and x∗

N ∈ Xf . By (8), we have

VN(z) − VN(f(z, μ∗N(z))) ≥ l(z, u∗

0) ≥ β−l ‖z‖

The conditions on l and Jf , along with the boundedness of state trajectory within the N

prediction steps clearly indicates that VN(z) ≤ β‖z‖, for z ∈ X0 and some β < ∞. The

stability the follows from the ECLF theorem.

Stability of MPC 15

ECE7850 Wei Zhang

Analysis Without Terminal Constraint/Cost

• Computation of control invariant set is very challenging (except for some simple cases such

as linear systems with polytopic constraints)

• Even the control invariant set is available, using it as a terminal constraint set can lead to

poor numerical performance for both online and offline optimization algorithms

• Using control invariant set as terminal constraint set also shrinks feasible set X 0.

Analysis Without Terminal Constraint/Cost 16

ECE7850 Wei Zhang

• Lemma 2 (i) If Xf = Rn, then C∗ ⊆ X0 ⊆ X1 · · · ⊆ XN = Xf ;

(ii) If Xf is control invariant, then X ⊇ C∗ ⊇ X0 ⊇ X1 · · · ⊇ XN = Xf

• Persistent feasibility and closed-loop stability can also be guaranteed without terminal con-

straint set

Analysis Without Terminal Constraint/Cost 17

ECE7850 Wei Zhang

• We consider MPC with no terminal constraint:

PntN (z) : VN(z) =

⎧⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩

minu JN(z, u) � Jf(xN) + ∑N−1k=0 l(xk, uk)

subj. to: xk+1 = f(xk, uk), k = 0, . . . , N − 1xk ∈ X, uk ∈ U, k = 0, . . . , N − 1x0 = z

(9)

• With slight abuse of notation, let μN be the MPC law, i.e., μN(z) = argminu∈U(z){l(z, u) +

VN−1(f(z, u))}, where VN is defined above.

• CL-system under MPC: x(t + 1) = f(x(t), μN(x(t)))

• Define the infinite-horizon version of the above problem:

V ∗(z) = infu0,u1,...

⎧⎨⎩

∞∑k=0

l(xk, uk) : subj. to constraint in (9)⎫⎬⎭

Analysis Without Terminal Constraint/Cost 18

ECE7850 Wei Zhang

• We want

⎧⎪⎪⎨⎪⎪⎩Pnt

N (x(t)) persistently feasible along cl-traj

The cl-system is exponentially stable(10)

• We shall establish conditions to ensure (10) for two different cases:

– Case I: Jf(z) ≡ 0, namely, MPC with neither terminal constraint nor terminal cost.

– Case II: Jf(z) is an ECLF (MPC without terminal constraint but with nontrivial terminal

cost)

• Assumption 2 (i) Jf(z) ≤ β+f ‖z‖; (i) β−

l ‖z‖ ≤ l(z, u) ≤ β+l ‖z‖; (iii) V ∗(z) ≤ β∗‖z‖, ∀z ∈ X∗

– As discussed in Lecture Note 7, condition (iii) is “almost equivalent” to exponential stabi-

lizability of the constrained system (1).

– Of course, Assumption 1 is always assumed as well.

Analysis Without Terminal Constraint/Cost 19

ECE7850 Wei Zhang

• The key property for both cases is the convergence of the optimal trajectory and value

iteration as horizon length N increases

• Lemma 3 (Convergence of Optimal Trajectory): Under Assumption 2,

– ‖x(t; z, π∗N)‖ ≤ cxγt

x‖z‖, for all z ∈ X∗ and t = 0, . . . , N − 1

– if additionally Jf(z) ≥ β−l ‖z‖, then the above inequality also holds for t = N

• Without condition Jf(z) ≥ β−l ‖z‖, the final state x(N ; z, π∗

N) may be arbitrarily large.

Example 1 x(t + 1) = x(t) + u(t), for t = {0, 1, . . . , N − 1}, with X = U = R. Let L(x, u) = x2,ψ ≡ 0. Fix an initial state x(0) = z. It can be easily verified that the N -horizon controlsequence is of the form {−z, 0, . . . , 0, c} is optimal for all c ∈ R. Therefore, the terminal stateof the corresponding optimal trajectory is equal to c and can be made arbitrarily large.

Analysis Without Terminal Constraint/Cost 20

ECE7850 Wei Zhang

• Lemma 4 (Value Iteration Convergence): Under Assumption 2,

– Value iteration converges exponentially, |VN(z) − V ∗(z)| ≤ cV γNV ‖z‖;

– ∃N0 such that VN(z) is an ECLF for all N ≥ N0;

sketch of proof:

– Part I: show special case with Jf ≡ 0. General case can be found in zhang09

Analysis Without Terminal Constraint/Cost 21

ECE7850 Wei Zhang

– Part II: show VN eventually becomes an ECLF for sufficiently large N

Analysis Without Terminal Constraint/Cost 22

ECE7850 Wei Zhang

• Theorem 3 (Main Result for Case I): Under Assumption 2 with Jf(z) ≡ 0, there exists

N0 < ∞ such that (10) is guaranteed for all N ≥ N0 with region of attraction Lα = {z ∈ Rn :

VN(z) ≤ α} for any α that ensures Lα ⊆ X.

sketch of proof:

Analysis Without Terminal Constraint/Cost 23

ECE7850 Wei Zhang

• Remarks for Main Result I:

– With neither terminal constraint nor terminal cost, persistent feasibility and cl-stability can

still be guaranteed as long as the prediction horizon N is sufficiently large

– N can be determined by checking whether VN is an ECLF, which can be done through

LMIs in some special cases

– Large N may cause issues for both online optimization and offline explicit MPC solutions.

– As a compromise, we can add the terminal cost back while still omitting the terminal

constraint, which leads us to Case II.

Analysis Without Terminal Constraint/Cost 24

ECE7850 Wei Zhang

• Theorem 4 (Main Result for Case II): Under Assumption 2 with Jf(z) being an ECLF satis-

fying condition (8) over some neighborhood of origin XJf, there exists N0 < ∞ such that (10)

is guaranteed for all N ≥ N0 with region of attraction Lα = {z ∈ Rn : VN(z) ≤ α} for any α

that ensures Lα ⊆ X

sketch of proof:

– Select a sublevel set: Xf = {x ∈ Rn : Jf(x) ≤ α} ⊂ XJf

– Xf is control invariant.

– Need to guarantee the optimal prediction trajectory always hits Xf at the end, i.e., x∗N ∈

Xf . This can be achieved by choosing a sufficiently large N .

Analysis Without Terminal Constraint/Cost 25

ECE7850 Wei Zhang

Relationship With Unconstrained Problem

• State and control constraint sets X and U often cause significant challenge in finding control

invariant sets and control Lyapunov functions.

• Dropping these constraints leads to unconstrained MPC that is easier to solve.

• Solution to the unconstrained MPC can be used to generate control invariant set and control

Lyapunov function for the constrained MPC.

• Consider unconstrained system:

x(t + 1) = f(x(t), u(t)), x ∈ Rn, u ∈ R

m (11)

Relationship With Unconstrained Problem 26

ECE7850 Wei Zhang

• Unconstrained N -horizon optimal control:

V ncN (z) =

⎧⎪⎪⎨⎪⎪⎩minu JN(z, u) = ∑N−1

k=0 l(xk, uk)subj. to xk+1 = f(xk, uk), k = 0, . . . , N − 1

• By Lemma 4, we know V ncN becomes an ECLF of (11) for large N

• Suppose V ncN0 is an ECLF of (11), define

μncN0(z) = argminu∈U(z){l(z, u) + V nc

N0 (z)}

namely, V ncN0 (z) − V nc

N0

(f

(z, μnc

N0

))≥ l(z, μnc

N0(z))

Relationship With Unconstrained Problem 27

ECE7850 Wei Zhang

• Assume: μncN0(z) ≤ βμ‖z‖, z ∈ X

• Due to exponential stability, unconstrained cl-system trajectory and control satisfy:

xnc(t; z, μncN0) ≤ cxrk‖z‖, unc(t; z, μnc

N0) ≤ curk‖z‖

• Lemma 5 There exists a neighborhood around the origin X nc ⊂ X, such that the uncon-

strained cl-trajectory and control are feasible with respect to state and control constraints X

and U , i.e.,

xnc(t; z, μncN0) ∈ X, and unc(t; z, μnc

N0) ∈ U, ∀z ∈ Xnc, ∀k ∈ Z+

Relationship With Unconstrained Problem 28

ECE7850 Wei Zhang

• Definition 1 Given a control law μ, a positive invariant set Ω of the cl-system x(t + 1) =

f(x(t), μ(x(t)) is called constraint admissible if Ω ⊂ X, and {μ(z) : z ∈ Ω} ⊂ U

• Theorem 5 Consider the constrained MPC problem defined in (3). Persistent feasibility and

cl-stability can be guaranteed under either of the following two conditions:

1. Jf(z) = V ncN0 (z) and Xf is a constraint admissible positive invariant set of the uncon-

strained system under control law μncN

2. Jf(z) = V ncN0 (z), Xf = R

n, and N is sufficiently large

Relationship With Unconstrained Problem 29

ECE7850 Wei Zhang

– N0 is the chosen to make unconstrained value function an ECLF, while N is the horizon

size for the constrained MPC problem

– Under the first condition, Xf is control invariant and V ncN is an ECLF on Xf w.r.t. the

constrained system. The desired result follows directly from Theorem 2.

– Under the second condition, there is no terminal constraint; the desired result follows

from Theorem 4.

Relationship With Unconstrained Problem 30

ECE7850 Wei Zhang

• Summary:

– MPC: solve N -horizon constrained optimal control problem PN(z) and apply the first op-timal control action

– cl-system under MPC: x(t + 1) = f(x(t), μN(x(t)))∗ Persistent feasible: x(t) ∈ X0, where X0 denotes the set of initial state for which PN is

feasible.

∗ Stability of MPC: cl-system asymptotically (or exponentially) stable

– Persistent feasibility and cl-stability are guaranteed if either of the following holds:

∗ Xf is control invariant and Jf is a local ECLF satisfying (8) on Xf ;

∗ Jf ≡ 0, Xf = Rn, and N is sufficiently large

∗ Jf is an ECLF satisfying (8) locally and N is sufficiently large

∗ Jf = V ncN0 and Xf is a constraint admissible positive invariant set of the unconstrained

cl-system under μncN0

∗ Jf = V ncN0 , Xf = R

n, and N is sufficiently large.

Relationship With Unconstrained Problem 31

Recommended