Reach Control Problem Mireille E. Broucke Systems Control Group Department of Electrical and Computer Engineering University of Toronto
March 31, 2014
Acknowledgements • Past Students – Dr. Mohamed Helwa, PhD – Dr. Elham Semsar-Kazerooni, Postdoc – Krishnaa Mehta, MASc – Graeme Ashford, MASc – Marcus Ganness, MASc – Dr. Zhiyun Lin, Postdoc – Bartek Roszak, MASc • Current Students – Zachary Kroeze, PhD – Matthew Martino, MASc – Melkior Ornik, PhD – Mario Vukosavljev, MASc
0
Logic Specifications in Control
Motivating Example
1
Linear Temporal Logic Boolean operators: ¬, ∧, ∨ Temporal operators: - always, ♦ - eventually, U - until • The power in the resistor never exceeds P. • The power through load 1 reaches P1 before the power through load 2 reaches P2. • Two loads must be turned on but not at the same time. • The pendulum swings through θ = 0 at least two times. • In a multi-agent system, if a vehicle visits a target, then no vehicle will visit the same target ever again. • For a walking robot, eventually always the right leg touches the ground and the left knee has an angle between θ1 and θ2 .
Motivating Example
2
Cart and Conveyor Belts
Control Specifications: 1. Safety: |x| ≤ 3, |x| ˙ ≤ 3, |x + x| ˙ ≤ 3. ˙ ≥ 1. 2. Liveness: |x| + |x| 3. Temporal behavior: Every box arriving on conveyor 1 is picked up and deposited on conveyor 2.
Motivating Example
3
Stabilization-based Approach
• Equilibrium stabilization gives no guarantee of safety or liveness. • Difficult to design for trade-off between safety and liveness. • Operationally inefficient - system must be run unnaturally slowly.
Motivating Example
4
Literature on LTL and Control • A. Bemporad and M. Morari. Control of systems integrating logic, dynamics, and constraints. Automatica, 1999. • P. Tabuada and G. Pappas. Model checking LTL over controllable linear systems is decidable. LNCS, 2003. • M. Kloetzer and C. Belta. A fully automated framework for control of linear systems from temporal logic specifications. IEEE TAC, 2008. • T. Wongpiromsarn, U. Topcu, and R.M. Murray. Receding horizon temporal logic planning for dynamical systems. CDC, 2009. • S. Karaman and E. Frazzoli. Sampling-based motion planning with deterministic mu-calculus specifications. CDC, 2009. • A. Girard. Synthesis using approximately bisimilar abstractions: state-feedback controllers for safety specifications. HSCC, 2010.
Motivating Example
5
Preferred Approach
• Safety is built in up front and is provably robust. • Liveness can be traded off with safety by adjusting the size of the hole. • Triangulation is used in algebraic topology, physics, numerical solution of PDE’s, computer graphics, etc. It has a role in control theory. Motivating Example
6
Reach Control Problem
Reach Control Problem
7
What is Given 1. An affine system x˙ = Ax + Bu + a ,
x ∈ Rn ,
u ∈ Rm .
(1)
2. An n-dimensional simplex S = conv{v0 , . . . , vn }. 3. A set of restricted facets {F1 , . . . , Fn }. 4. One exit facet F0 .
Reach Control Problem
8
Setup
v0 B = ImB cone(S) h1
h2 S
O = {x | Ax + a ∈ B} v1
Notation: Reach Control Problem
C(v1 )
F0
C(v2 )
v2
n C(vi ) := y ∈ R | hj · y ≤ 0 , j 6= i 9
Problem Statement Problem. (RCP) Given simplex S and system (1), find u(x) such that: for each x0 ∈ S there exist T ≥ 0 and γ > 0 such that • x(t) ∈ S for all t ∈ [0, T ], • x(T ) ∈ F0 , and • x(t) ∈ / S for all t ∈ (T, T + γ).
Notation: Reach Control Problem
S
S −→ F0
by feedback of class U. 10
Affine Feedback S
Theorem. S −→ F0 by affine feedback u(x) = Kx + g if and only if (a) The invariance conditions hold: Avi + a + Bu(vi ) ∈ C(vi ), i ∈ {0, . . . , n}. (b) The closed-loop system has no equilibrium in S.
[HvS06] L.C.G.J.M. Habets and J.H. van Schuppen. IEEE TAC 2006. [RosBro06] B. Roszak and M.E. Broucke. Automatica 2006. Reach Control Problem
11
Numerical Example
x˙ =
0 0
1 0
x +
0 1
u +
4
1
S determined by: v0 = (−1, −3), v1 = (4, −1), and v2 = (3, −6).
Invariance conditions give: • hT1 (Av0 + Bu0 + a) ≤ 0
⇒
u0 ≥ −1.75
• hT2 (Av0 + Bu0 + a) ≤ 0
⇒
u0 ≤ −0.6
• hT2 (Av1 + Bu1 + a) ≤ 0
⇒
u1 ≤ 0.2
• hT1 (Av2 + Bu2 + a) ≤ 0
⇒
u2 ≥ 0.5.
Reach Control Problem
12
Numerical Example Choose u0 = −1.175, u1 = 0.2, u2 = 0.5.
h2 v1 = (4, −1)
v0 = (−1, −3)
F0 equilibrium
v2 = (3, −6) h1
Reach Control Problem
13
Numerical Example The affine feedback is: u = [0.325 − 0.125]x − 1.225 h2 v1 = (4, −1)
v0 = (−1, −3)
F0 equilibrium
v2 = (3, −6) h1
Reach Control Problem
14
Geometric Theory
Geometric Theory
15
Equilibrium Set and Triangulations Let B = ImB. The equilibrium set is O = {x | Ax + a ∈ B} . Define G := S ∩ O . Assumption. If G = 6 ∅, then G is a κ-dimensional face of S, where 0 ≤ κ < n. Reorder indices so that G = conv{v1 , . . . , vκ+1 } . Note: v0 6∈ G, otherwise there’s a trivial solution to RCP.
Can be achieved using the placing triangulation. Geometric Theory
16
Continuous State Feedback
Theorem. Suppose the triangulation assumption holds. TFAE: S
(a) S −→ F0 by affine feedback. S
(b) S −→ F0 by continuous state feedback.
Proof. Fixed point argument using Sperner’s lemma, M -matrices.
[B10] M.E. Broucke. SIAM J. Control and Opt. 2010.
Geometric Theory
17
Limits of Continuous State Feedback v0
y0 F1
F2
b2 S
v1 F0
v2
b1
Let u(x) be a continuous state feedback satisyfing the invariance conditions. If B = sp{b} and G = v1 v2 , then y(x) := c(x)b ,
x ∈ v1 v2
n
c:R
→ R continuous ,
where c(v1 ) ≥ 0 and c(v2 ) ≤ 0. By Intermediate Value Theorem there exists x s.t. c(x) = 0. Geometric Theory
18
Conditions for a Topological Obstruction 1. B ∩ cone(S) = 0
nontriviality condition
2. 6 ∃ lin. indep. set {b1 , . . . , bκ+1 | bi ∈ B ∩ C(vi )}
system is “underactuated”
B cone(S)
v0
h3 v3 v1 b1
G b2 v2
Geometric Theory
O 19
Reach Control Indices Theorem. There exist integers r1 , . . . , rp ≥ 2 and control directions bi ∈ B ∩ C(vi ) such that w.l.o.g. B ∩ C(vi ) ⊂ sp{bm1 , . . . , bm1 +r1 −1 } , i = m1 , . . . , m1 + r1 − 1 , .. .
.. .
B ∩ C(vi ) ⊂ sp{bmp , . . . , bmp +rp −1 } , i = mp , . . . , mp + rp − 1 ,
where mk := r1 + · · · + rk−1 + 1 , k = 1, . . . , p. Moreover, 0 ∈ conv bmk , . . . , bmk +rk −1 , k = 1, . . . , p . {r1 , . . . , rp } are called the reach control indices of system (1). [BG14] M.E. Broucke and M. Ganness. SIAM J. Control and Opt. 2014. Geometric Theory
20
Reach Control Indices For k = 1, . . . , p define Gk := conv vmk , . . . , vmk +rk â&#x2C6;&#x2019;1 .
Theorem. Let u(x) be a continuous state feedback satisfying the invariance conditions. Then each Gk contains an equilibrium of the closed-loop system.
[B10] M.E. Broucke. SIAM J. Control and Opt. 2010.
Geometric Theory
21
Piecewise Affine Feedback
1.2 1 1 0.8 0.8 0.6 0.6 0.4
0.4
0.2
0.2
0
−0.2
O
−1
−0.8
−0.4
−0.2
0
0.2
0.4
(a) Affine feedback
Geometric Theory
0
F0 −0.6
F0’
0.6
0.8
1
−0.2 −1
F0 −0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
(b) PWA feedback
22
Piecewise Affine Feedback Theorem. Suppose the triangulation assumption holds. For a somewhat stronger version of RCP, TFAE: S
1. S −→ F0 by piecewise affine feedback. S
2. S −→ F0 by open-loop controls.
[BG14] M.E. Broucke and M. Ganness. SIAM J. Control and Opt. 2014.
Geometric Theory
23
Time-varying Affine Feedback Equilibria are such a drag...
v0
v0
v1
v2 x
Geometric Theory
v1
v2 x
24
Time-varying Affine Feedback Theorem. Suppose the triangulation assumption holds and the invariance conditions are solvable. There exists c > 0 sufficiently small S such that S −→ F0 using the time-varying affine feedback u(x, t) = e−ct u0 (x) + (1 − e−ct )u∞ (x) where u0 (x) = K 0 x + g 0 places closed-loop equilibria at vm1 , . . . , vmp and u∞ (x) = K ∞ x + g ∞ places closed-loop equilibria at vm1 +r1 −1 , . . . , vmp +rp −1 .
[AB13] G. Ashford and M. Broucke. Automatica 2013.
Geometric Theory
25
Lyapunov Theory
Lyapunov Theory
26
Revisiting RCP on Simplices S
Theorem. S −→ F0 by the affine feedback u(x) = Kx + g, if and only if (a) The invariance conditions hold. (b) Linear Flow Condition: (∃ξ ∈ Rn ) ξ · (Ax + Bu(x) + a) < 0, ∀x ∈ S. Under affine feedback, the flow condition is necessary and sufficient for leaving S in finite time. [HvS06] Habets and van Schuppen. IEEE TAC 2006. [RosBro06] Roszak and Broucke. Automatica 2006. Lyapunov Theory
27
Lyapunov Theory for RCP • For a given feedback u(x) solving RCP on a polytope P, the invariance conditions can be easily verified, but a linear flow condition may not exist. • In these cases RCP is verified to be solved via exhaustive simulation. • Urgent need for a verification tool for RCP, analogous to Lyapunov theory for stability.
We propose a Lyapunov-like analysis tool.
Lyapunov Theory
28
Flow Functions Let u(x) be a locally Lipschitz state feedback satisfying the invariance conditions of P. To verify trajectories leave a compact set P: • V (x) is C 1 , V˙ (x) 6= 0, x ∈ P • V (x) = h0 · x, • V (x) = ξ · x,
V˙ (x) = h0 · (Ax + Bu(x) + a) 6= 0, x ∈ P V˙ (x) = ξ · (Ax + Bu(x) + a) 6= 0, x ∈ P
[RHL77] [HvS04] [RB06,HB11]
Definition. Let P ⊂ D. A flow function is any scalar function V : D → R that is strictly decreasing along solutions.
Lyapunov Theory
29
Locally Lipschitz Flow Functions
Theorem. Consider system (1) on P ⊂ D. Let u(x) be a c.s.f. such that the closed-loop vector field f (x) is locally Lipschitz on D. If there exists a locally Lipschitz V : D → R such that Df+ V (x) ≤ −1 ,
x∈P
then all trajectories leave P in finite time.
[HB14] M. Helwa and M. Broucke. Automatica 2014.
Lyapunov Theory
30
LaSalle Principle for RCP Theorem. Consider system (1) on P ⊂ D. Let u(x) be a c.s.f. such that the closed-loop vector field f (x) is locally Lipschitz on D. Suppose there exists a locally Lipschitz V : D → R such that Df+ V (x) ≤ 0, x ∈ P. Let M := {x ∈ P | Df+ V (x) = 0} . If M does not contain an invariant set, then all trajectories starting in P leave it in finite time.
Lyapunov Theory
31
Flow Functions on Simplices v4
v3
S2 S1 v1
F0
v2
Theorem. Let T = {S1 , S2 } be a triangulation of P, and u(x) a P
PWA feedback defined on T. If P −→ F0 by u(x), then there exist affine functions V1 (x) and V2 (x) such that V (x) := max{V1 (x), V2 (x)} satisfies Df+ V (x) < 0 for all x ∈ P. Lyapunov Theory
32
Analogies with Stability Theory Stability
RCP
Lyapunov function: V (x) C 1 positive definite
Flow function: V (x) locally Lipschitz
Neg. def. condition: V˙ (x) < 0
Flow condition: Df+ V (x) < −1
LaSalle theorem: V˙ (x) ≤ 0, trajectories tend to inv. set in M
LaSalle theorem: Df+ V (x) ≤ 0, no inv. sets in M
Linear systems: V (x) = xT P x
Affine systems: V (x) = ξ · x
Piecewise linear systems: V (x) = max{Vi (x)}
PWA feedback: max{Vi (x)}
Lyapunov Theory
V (x)
=
33
Emerging Applications
Emerging Applications
34
Automated Anesthesia
Emerging Applications
35
Aggressive Maneuvers of Mechanical Systems State Space Polytope 1.5
S10 S11
Crane Angle (rad)
1
S12
S9
0.5
S8
S13
0
S7
S1
−0.5
S2
−1
S6 S4 S3
Vertical Position (m)
−1.5
Emerging Applications
S5
−1
−0.5
0 Trolley Position (m) Crane Problem Animation
0.5
1
−1
−0.5
0 Trolley Position (m)
0.5
1
0.1 0 −0.1 −0.2 −0.3
36
Bumpless Transfer of Robotic Manipulators
ξ2
ρemax
y2 θ2
P1
P2
m2
x2
l2
F0
ks , rs
µ2
F1
ρ0
O
ρ3
µsw
P3
F2
l1 θ1
ρemin
x1
y1
y0
µ1
ρ2 ξ1
ρ1 P5 F3 P4
x0
Emerging Applications
x1
x2
−µ1 ρˆe
37
Motivating Example S ∩ O = ∅ [B10]
B
B ∩ cone(S) 6= 0 [B10]
B ∩ cone(S) 6= 0 [AB13] or [BG14]
O
Emerging Applications
38
Final Design 4 3 2 1 0 −1 −2 −3 −4 −4
Emerging Applications
−3
−2
−1
0
1
2
3
4
39