Stability and Stabilization of polynomial dynamical systems Hadi - - PowerPoint PPT Presentation
Stability and Stabilization of polynomial dynamical systems Hadi - - PowerPoint PPT Presentation
Stability and Stabilization of polynomial dynamical systems Hadi Ravanbakhsh Sriram Sankaranarayanan University of Colorado, Boulder Proving Asymptotic Stability: Lyapunov Functions Lyapunov Function: V ( x ) Positive Definite Function
Proving Asymptotic Stability: Lyapunov Functions
- Lyapunov Function:
- Positive Definite Function of the State:
- Negative Definite Derivative:
V (x)
(8 x) (x 6= x∗) ) V (x) > 0
(8 x) (x 6= x⇤) ) V 0(x) < 0
V (x∗) = 0
Verifying Stability
- Find (Guess) a Lyapunov function: V(x)
- Check the conditions for the function:
(8 x) (x 6= x∗) ) V (x) > 0 (8 x) (x 6= x⇤) ) V 0(x) < 0
V (x∗) = 0
Finding a Lyapunov Function
- Guess a parametric form of the function:
- Encode Lyapunov conditions:
– Derive constraints on the unknown coefficients. – Solve constraints.
V (x1, x2) : c0 + c1x1 + c2x2 + c3x1x2 + c4x2
1 + c5x2 2
Encoding constraints for Lyapunov
- QE for reals: [Tarski; Collins; … ]
– Nonlinear constraints over template parameters.
- Sum-of-Squares Relaxations: [Shor; Lasserre; Tibken; Parrillo; …]
– Polynomial positivity strengthened to sum of squares (SOS). – Reduced to solving a semi-definite optimization problem.
- LP relaxations:
– Positive Semi-definiteness to diagonal dominance [Ali Ahmadi+Parrillo’2014]
– Use properties of Bernstein polynomials. [Ben Sassi + Girard’12, Ben
Sassi+S+Chen+Abraham’2015]
Lyapunov Function Synthesis: State-of-the-art
- Linear Systems: Solve LMI constraints.
- Polynomial Systems: up to 10 variables, low degree.
- Beyond polynomials: limited progress.
- Systems involving switching (Hybrid Systems).
– Lyapunov conditions extended [Branicky et al. 96]
- Stability proofs that do not involve Lyapunov
functions [Prabhakar et al.’13]
Synthesis for Stabilization
Problem Setup
Plant Model
x0 = f(x, u), u ∈ U
Controller u = g(x)
x
u
Find a suitable g(x)
Problem Setup
Plant Model
x0 = f(x, u), u ∈ U
Controller u = g(x)
x
u
Find g(x) s.t. closed loop x0 = f(x, g(x)) is asymp. stable
Option #1 : Static Feedback
Plant Model
x0 = f(x, u), u ∈ U
Controller u = g(x)
x
u
g(x) : P
i θixi
[Tan & Packard, El Ghaoui & Balakrishnan, Ben Sassi & S]
Control Mode #2
Option #2 : Switched Stabilization
Plant Model
x0 = f(x, u), u ∈ U
Control Mode #1
u = g1(x)
u = g2(x)
Control Mode #k
u = gk(x)
Choose Appropriate Control No single mode stabilizes Goal: Synthesize this logic.
CONTROL LYAPUNOV FUNCTIONS
Control Lyapunov Function
- Lyapunov function: V(x)
- V(x) is positive definite.
- A control input chosen s.t. derivative is negative
definite.
[Artstein; Sontag; …]
(8 x 6= x⇤) (9u 2 U) V 0(x) = rxV (x) · f(x, u) < 0
Control Lyapunov Function: Interpretation
x V(x) Lyapunov Function. Control u1 Control u2
Control Mode #2
Switched Stabilization Problem
Plant Model
x0 = f(x, u), u ∈ U
Control Mode #1
u = g1(x)
u = g2(x)
Control Mode #k
u = gk(x)
Choose Appropriate Control No single mode stabilizes Goal: Synthesize this logic.
Choosing Control Modes
- Idea #1: Sample control values.
- Idea #2: Combine feedback laws that may
stabilize for a subset of the states.
Space of Control Inputs: U
u1 u2 um−1 um
Control Lyapunov Function
CLF V(x)
- 1. Positive Definite.
- 2. For all x ≠x*
– Exists mode gi
- Choosing mode gi causes V to decrease.
x0 = f(x, u), u ∈ U
u = g1(x)
u = g2(x) u = gk(x)
?
V 0
i : (rxV )f(x, gi(x)) is negative
From CLF to controller
x0 = f(x, u), u ∈ U
u = g1(x)
u = g2(x)
u = gk(x)
?
From g1,…,gn choose a mode that causes V(x) to decrease
Issue #1 : Zenoness
x0 = f(x, u), u ∈ U
u = g1(x)
u = g2(x)
u = gk(x)
?
From g1,…,gn choose a mode that causes V(x) to decrease
Potentially Switch Infinitely Often in a finite time interval
Minimum Dwell Time Switching
x0 = f(x, u), u ∈ U
u = g1(x)
u = g2(x)
u = gk(x)
?
g5 g4 g7 g10
≥ Tmin ≥ Tmin ≥ Tmin
Contribution #1
- Define restrictions on CLF V s.t.
– V(x) allows a switching strategy with a minimal dwell time. – Provide a lower bound for the minimal dwell time.
[Ravanbaksh+S’15]
V (x) ≥ ✏||x||2
2
Extra conditions on V 00
V 0(x) ≤ −ˆ ✏||x||2
2
CLF-based Synthesis
- If we can find a CLF V(x) with additional
restrictions,
x0 = f(x, u), u ∈ U
u = g1(x)
u = g2(x)
u = gk(x)
?
From g1,…,gn choose a mode that causes V(x) to decrease
Minimum dwell time guaranteed.
Discovering CLFs
Counter-Example Guided Inductive Synthesis.
CLF Conditions for the Switched Case
x0 = f(x, u), u ∈ U
u = g1(x)
u = g2(x)
u = gk(x)
?
(8 x 6= x∗)V (x) ✏||x||2
2
(8 x 6= x∗)(9i 2 {1, . . . , k})(rV )f(x, gi(x)) ✏||x||2
2
V can be made to decrease by some choice of gi
Synthesizing CLFs
- Fix a template (ansatz) for the CLF with
unknown coefficients.
- Enforce CLF constraints on the unknown form.
V (x1, x2) : c0 + c1x1 + c2x2 + c3x1x2 + c4x2
1 + c5x2 2
(∃ ~ c) (∀ ~ x) (∃i ∈ [1, k]) · · ·
More Complex Constraints. SOS relaxations cannot be used.
Counterexample Guided Inductive Synthesis.
Program Sketching [Solar-Lezama + Others]
int search(int [] a,int n, int s){ //@pre:… if (n <= ??){ return 0; } for i = 0 to ?? if (a[i] == ??){ return 1; } end return ??; } //@post:…
Find appropriate program expressions.
CEGIS Approach
Constraints to be solved:
Template Parameters Program Behaviors
(∃ c) (∀ y)ϕ(c, y)
Iterative Procedure:
- Finite set Yi : {y1,…,yk}
- Instatiate the Quantifier
∀
Basic CEGIS Loop
(∃ c) (∀ y)ϕ(c, y)
- 1. Check SATisfiability of the formula:
ψ(c, y1) ∧ ψ(c, y2) ∧ · · · ∧ ψ(c, yk)
SAT, ck SAT, yk+1
UNSAT, Failure UNSAT, Success
- 2. Check UNSATisfiability of
¬ψ(ck, y)
Applying CEGIS to synthesis CLFs
(9c) (8 x 6= x∗) V (x) ✏||x||2
2
Wk
i=1(rV )f(x, gi(x)) ✏||x||2 2
- 1. When x is instantiated: Linear Arithmetic over c.
- 2. When c is instantiated, non-linear arithmetic over x.
Integrating SMT solvers
CEGIS-based CLF synthesis procedure. SMT-solver Z3 Nonlinear solver dReal.
instantiate x
Value for c New value for x
Instantiate c
CEGIS: novelties
- CEGIS procedure is out-of-the-shelf. But
– Prove eventual termination of the CEGIS procedure for our problem. – Provide heuristics to speedup termination by choosing the right instantiations.
Controller Synthesis
- Support synthesis of MATLAB function (time
triggered).
Plant Model (Predictive)
Control Logic
Control Mode Reside Time
RESULTS
Inverted Pendulum: Bang-Bang Control Synthesis
˙ θ = ω, ˙ ω = g
l sin(θ) − h ml2 ω + 1 mlcos(θ)u ,
http://ctms.engin.umich.edu/CTMS/
g = 9.8, h = 2, l = 2 and m = 0.5
V ([θ ω]T ) = 10θ2 + 1.5312θω + 2.5859ω2
Control Mode #1: u = +30 Control Mode #2: u = - 30
Inverted Pendulum
(a) Inverted Pendulum time time time time ω θ ω V
Overall Results
Problem Results ID n q itr z3 T dReal T
- Tot. Time
Status 1 2 2 1 0.0 0.2 0.2 3 2 2 2 4 0.0 5.5 5.6 3 3 2 2 3 0.0 40.1 40.2 3 4 2 2 15 0.0 10.8 11.6 3 5 2 5 10 0.0 3.8 4.0 3 6 2 2 1 0.0 0.5 0.5 3 7 2 3 4 0.0 15.5 15.6 3 8 2 2 1 0.0 0.4 0.5 3 9 2 2 1 0.0 3.0 3.0 3 10 3 4 1 0.0 5.4 5.4 3 11 4 5 1 0.0 84.8 84.8 3 12 5 6 1 0.0 1652 1652 3 13 2 3 1 0.0 0.7 0.7 3 14 3 3 2 0.2 18.9 19.2 3 15 3 5 2 0.8 44.0 44.9 3 16 3 2 7 0.7 36.1 37.2 3 17 3 2 11 0.8 165.5 167.0 3 18 4 2 11 – >1hr – 6 19 4 2 13 – >1hr – 6 20 5 2 1 – >1hr – 6
2-5 System Variables 2-6 control modes 17 out of 20 benchmarks up to 3 variables
IMPROVING NONLINEAR SOLVING
Use Relaxations
- Use LMI/SDP relaxations.
– Replace dReal with a mixed cone optimization problem.
- Polynomial time but numerical procedures.
– Tricky to formulate.
- Solve all but one benchmark.
– Results need post-verification due to possible numerical errors.
FUTURE WORK
More Work
- Safety + Stability Synthesis.
– Reach While Avoid Properties. – Handling state spaces with obstacles.
- Handle more general temporal objectives
- Future: Stochastic system stabilization.
– “Control” super-martingales.
Thank You
Supported in part by US NSF CAREER Award # 0953941.