hybrid systems modeling analysis and control
play

Hybrid Systems Modeling, Analysis and Control Radu Grosu Vienna - PowerPoint PPT Presentation

Hybrid Systems Modeling, Analysis and Control Radu Grosu Vienna University of Technology Lecture 10 HA with Affine Dynamics Flows of continuous variables: x = A x + B u Invariants and guards: A x c Actions: x : = A x Symbolic


  1. Hybrid Systems Modeling, Analysis and Control Radu Grosu Vienna University of Technology Lecture 10

  2. HA with Affine Dynamics Flows of continuous variables:  x = A x + B u Invariants and guards: A x ≤ c Actions: x : = A x Symbolic representation: convex sets (e.g. polytopes) Reachability: A semi algorithm Methodolgy: Exact time elapse only at discrete time Tools: SpaceEx

  3. Bouncing Ball: HA with Affine Dynamics x = x 0 , v = 0 initial condition location freeFall x ≥ 0 invariant  x = v,  v = − g discrete transition flow label bounce: guard x = 0 ∧ v < 0 action ′ v = − c v

  4. Bouncing Ball: Associated Program x = x 0 , v = 0 initial condition location freeFall x ≥ 0 invariant  x = v,  v = − g discrete transition flow label bounce: guard x = 0 action float x = x 0 , v = 0; d = d 0 ; // initial condition while true { // main loop while ( x ≥ 0) { // free fall x = x + v ∗ d ; // ! x = v v = v − g ∗ d ; } // ! v = − g v = − c ∗ v ; x = 0; } // bounce

  5. Linear Dynamics Autonomous part of dynamics:  x = A x , x ∈ R n Analytic solution: x( t ) = e A t x 0 Time discretization: x( t ) t = δ k x 3 x( δ ( k + 1 )) = e A δ x( δ k ) x 2 Recursive DT-Solution: x 1 x 0 x( 0 ) = x 0 x( k + 1 ) = e A δ x( k ) δ 0 2 δ 3 δ t Multiplication with constant matrix = linear transformation x = M x As a program instruction

  6. Linear DT-Dynamics from Initial Set Recursive DT-Solution: Reach [0 , 3 δ ] ( X 0 ) X( 0 ) = X 0 X( t ) X 3 X( k + 1 ) = e A δ X( k ) X 2 X 1 Purely continuous systems: X 0 i Discrete solution acceptable i x (t) is in ε ( δ )-neighbourhood of some X k in the DT-solution δ 0 2 δ 3 δ t Not acceptable for hybrid systems: i Discrete transitions may fire between sampling times i If transitions are missed, x (t) is not in ε ( δ )-neighbourhood

  7. Bouncing Ball: Error in the DT-Solution X 90

  8. Polyhedral Flow-Pipe Approximation Divide: Reach [0,N δ ] ( X 0 ) into N δ -segments X( t ) t δ 0 2 δ 3 δ

  9. Polyhedral Flow-Pipe Approximation Divide: Reach [0,N δ ] ( X 0 ) into N δ -segments X( t ) Enclose: segments with convex polytopes Ω i Ω 2 Ω 1 Ω 0 t δ 0 2 δ 3 δ

  10. Polyhedral Flow-Pipe Approximation App ( X 0 ) Reach [0,3 δ ] Divide: Reach [0,N δ ] ( X 0 ) into N δ -segments X( t ) Enclose: segments with convex polytopes Ω i Ω 2 App ( X 0 ) = ∪ i = 0 N − 1 Ω i Ω 1 Union: Reach [0,N δ ] Ω 0 App ( X 0 ) Approx: Reach [0,N δ ] ( X 0 ) ⊆ Reach [0,N δ ] t Works for general nonlinear systems! δ 0 2 δ 3 δ

  11. Wrapping Hyper-Planes Around a Set c 2 c 1 Step 1 : S − Choose: directions c 1 ...c n c 3 − Construct: C T = [c 1 ...c n ] c 4

  12. Wrapping Hyper-Planes Around a Set x 2 c i c i .x = c i T x Step 2 : = x || x ||cos θ = − Compute optimal d: in C T x ≤ d d i S where C T = [c 1 ...c 4 ] and x ∈ S − Stepwise: For each direction i d i = max x ∈ S c i .x || x || θ x 1

  13. Wrapping Hyper-Planes Around a Set c 2 c 1 Step 2 : − Compute optimal d: in C T x ≤ d S where C T = [c 1 ...c 4 ] and x ∈ S c 3 − Stepwise: For each direction i c 4 d i = max x ∈ S c i .x

  14. Wrapping a Reached Set Given directions c 1 ...c n , wrap Reach [ t k ,t k + 1 ] ( X 0 ) within a polytope by solving for each i the optimisation problem d i = max T x ( t, x 0 ) x 0 ,t c i x 0 ∈ X 0 t ∈ [ t k ,t k + 1 ] Optimization problem is solved by embedding simulation into objective function computation

  15. Flow Pipe Segment Approximation Step 1: Step 2: Vertices( X 0 ) Solve optimization a. Simulate trajectories at t k problem for each d i from each vertex of X 0 b. Take convex hull and identify outward normal vectors c i c 1 c 1 at t k + 1 Vertices( X 0 ) Flow-pipe segment approximated by { } T x ≤ d i , ∀ i x | c i

  16. Improvements for Linear Systems App ( X 0 ) Step 1: Reach [0,3 δ ] i Compute Ω 0 as discussed before, but X( t ) Ω 2 X( t ) = e A t X 0 Ω 1 Step 2: Ω 0 i Compute Ω k+1 by using the recurrence: t Ω k+1 = e A δ Ω k (proof in Girard's Thesis) δ 0 2 δ 3 δ

  17. Computation of Ω 0 x 00 e A δ X 1 x 01 e A δ x 00 x 01 X 0 Reach [0, δ ] ( X 0 ) Conv( X 0 , X 1 ) Bloat(Conv( X 0 , X 1 ))

  18. Bouncing Ball: DT with Convex Hull X 1 X 0 Ω 0 X 1 Ω 0 X 0

  19. Adding Input Flows of continuous state variables:  x = A x + B u , x ∈ R n , u ∈ U ⊆ R p where x is the state and u is the input Input is treated as nondeterministic:  x = A x + BU, x ∈ R n , U ⊆ R p used later for overapproximating nonlinear dynamics

  20. Analytic Solution δ x ( t ) = e A δ x 0 + ∫ e A( δ − τ ) B u ( τ ) d τ 0 Autonomous dynamics Influence of inputs Reach [0 , 3 δ ] ( X 0 ) δ 0 2 δ 3 δ t

  21. Nondeterminism Overapproximation How far can the input push the system within δ ? V = box with radius e || A|| δ − 1 sup u ∈ U || B u || || A|| Ω 0 = Bloat(Conv( X 0 ,e A δ X 0 )) ⊕ V Ω k+1 = e A δ Ω k ⊕ V Minkowski sum: A + B = { a + b | a ∈ A,b ∈ B }

  22. Implementing Reachability Find representation for continuous sets with: i Linear transformation: Ω k+1 = ΦΩ k i Minkowski sum: Ω k+1 = ΦΩ k ⊕ V i Intersection with guards: A x ≤ c

  23. Polyhedra Finite conjunction of linear constraints: P = { x | A x ≤ b }

  24. Operations on Polyhedra Linear transformation: i Transform matrix i O(n 3 ) Minkowski sum: i Need to compute vertices i O(exp(n)) Intersection: i Join lists of constraints i O(1)

  25. Zonotopes Central-symmetric polyhedron: ⎧ ⎫ m ∑ Z = ( c , < v 1 ,..., v m > ) = c + α i v i | -1 ≤ α i ≤ 1 ⎨ ⎬ ⎩ ⎭ i = 1 generators center

  26. Operations on Zonotopes Linear transformation: i Transform generators: Φ Z = ( Φ c, < Φ v 1 ,..., Φ v m > ) i O(n 2 ) Minkowski sum: i Join generator lists: Z + Z = ( c + ′ c , < v 1 ,..., v m , ′ ′ v 1 ,..., ′ v m' > ) i O(1) Intersection: i Problem: intersection of zonotopes is not a zonotope i Overapproximate

  27. Ellipsoids Quadratic form: { } E = x | x T Q x + A x ≤ b

  28. Operations on Ellipsoids Linear transformation: i Transform generators i O(n 2 ) Minkowski sum: i Problem: result is not an ellipsoid i Overapproximate Intersection: i Problem: intersection of ellipsoids is not an ellipsoid i Overapproximate

  29. Support Functions ρ Ω ( l ) = max x ∈Ω l.x Functional form (lazy evaluation): Ω = ∩ l ∈ R d { x ∈ R d | l.x ≤ ρ Ω ( l )}

  30. Support Functions Unit ball for 2-norm B 2 = {x ∈ R d | ||x|| 2 ≤ 1}: ρ Ω ( l ) = || l || 2 Ellipsoid Ω = {x ∈ R d | x T Qx ≤ 1}, Q is positive definite: ρ Ω ( l ) = l T Ql Hyperrectangle Ω = [-h 1 ,h 1 ] ×  × [-h d ,h d ], h i ∈ R + d : ∑ d ρ Ω ( l ) = | h j l j | j = 1 ∑ r | α i ∈ [-1,1]}, generators g i ∈ R d : Zonotope Ω = { α i g i j = 1 ∑ r ρ Ω ( l ) = | g j .l | j = 1 Polytope Ω = { x ∈ R d | C x ≤ d}: ρ Ω ( l ) = max C x ≤ d l.x

  31. Operations on Support Functions Linear transformation: i ρ A Ω ( l ) = ρ Ω (A T l ) i ρ λΩ ( l ) = ρ Ω ( λ l ) = λρ Ω ( l ) Minkowski sum: i ρ Ω⊕ Ω ( l ) = ρ Ω ( l ) + ρ Ω ( l ) ′ ′ Convex hull: i ρ CH( Ω , Ω ) ( l ) = max{ ρ Ω ( l ), ρ Ω ( l )} ′ ′ Intersection: i Reduces to an optimization problem

  32. Implementing Reachability Complexity of 1-step of time elapse: i Polyhedra: O(exp(n)) i Zonotopes: O(n 2 ) Problem: i With each iteration, Ω k gets more complex i Ω k+1 = e A δ Ω k ⊕ V Minkowski sum increases the number of: i Polyhedra: constraints i Zonotopes: generators

  33. Wrapping Effect Fight complexity by overapproximation Overapproximated sequence: Ω k+1 = Approx(e A δ ˆ i ˆ Ω k ⊕ V ) Accumulation of approximations: i Wrapping effect i Exponential increase in approximation error!

  34. Wrapping Effect Exact versus overapproximation i Dimension 5 for 600 time steps i Overapproximation with 100 generators

  35. Wrapping Effect Ω k+1 = Approx(e A δ ˆ ˆ Ω k ⊕ V ) How does error accumulate? i Linear transformation: Scaling error up (exponential) i Minkowski sum: adding V adds more error

  36. Wrapping Effect Ω k+1 = Approx(e A δ ˆ ˆ Ω k ⊕ V )

  37. Wrapping Effect Ω k+1 = Approx(e A δ ˆ ˆ Ω k ⊕ V )

  38. Wrapping Effect Ω k+1 = Approx(e A δ ˆ ˆ Ω k ⊕ V )

  39. Wrapping Effect Ω k+1 = Approx(e A δ ˆ ˆ Ω k ⊕ V )

  40. Fighting the Wrapping Effect Separate transformations and Minkowski sum: Ω k+1 = e A(k+1) δ Ω 0 ⊕ e Ak δ V ⊕ (e A(k-1) δ V ⊕  ⊕ V ) R k+1 V k S k S k+1 Use four sequences: R 0 = Ω 0 V 0 = V S 0 = {0} R k+1 = e A δ R k Ω k+1 = R k+1 ⊕ S k+1 S k+1 = S k ⊕ V k V k+1 = e A δ V k

  41. Four-Sequence Algorithm R k+1 = e A δ R k Ω k+1 = R k+1 ⊕ S k+1 S k+1 = S k ⊕ V k V k+1 = e A δ V k Transformations only in R k and V k : i Complexity independent of k i No overapproximation necessary Minkowski sum only in S k and Ω k : i Growing no of generators, but no longer transformed i O(Nn 3 ) instead of O(N 2 n 3 )

  42. Four-Sequence Algorithm R k+1 = e A δ R k ˆ S k+1 = ˆ V k+1 = e A δ V k S k ⊕ App( V k ) Ω k+1 = R k+1 ⊕ S k+1 Use overapproximation with: i App( X ) ⊕ App( Y ) = App( X ⊕ Y ) i Bounding box, octogonal, etc. No accumulation of error: i ˆ S k = App( S k ) i ˆ Ω k ⊆ App( Ω k )

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend