Distributed control for cyber-physical systems II Claudio De Persis University of Groningen joint work with Romain Postoyan (Université de Lorraine and CNRS–CRAN) ASCI Autumn School on Cyber-physical systems October 2, 2014 C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 1 / 33 Outline Higher-dimensional multi-agent systems Cyber-physical Lyapunov function Event triggered control Two variations Self-triggered control Time-triggered control Numerical results Conclusions C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 2 / 33 Higher-dimensional multi-agent systems C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 3 / 33 roblem statement A “higher-dimensional” multi-agent system ri Systems in networkdAC,i yC,i • Inteconnection graph G = (I, E ) dAB,i yB,i • Node dynamics (i ∈ I) i yA,i ṗi v̇ii R = = vi −vi + ui xA,i xB,i xC,i Fig. 1. Wheeled robot i A “higher-dimensional” multi-agent system Control objective 0 1 m =pd j (t) vhi → 0 as t → ∞ Rendez-vous, 0i.e. piṗ(t) i m− d +I Ci (pi ) = @ v̇i mi dAB,i hi mi d2AB,i +ICM,i i AB,i i 2 i AB,i CM,i A = 0 −vi +. ui , p iposition e Hamiltonian ) equals the kinetic energy of the pi , vi ∈ HRir (p bot and is given p by v ∈ R velocity 1 1 2 2 ui ∈ R2 torque = 2mi pi + 2ICM,i hi , inaire du i groupe 1MAC, 4 juin 2014 Hir (pi ) = ppTi (M r ) 1 pi i ∈ I = {1, 2, . . . , n} 2/36 Romain Postoyan - Université de Lorraine, CNRS (Nancy) ere Mir = diag (mi , ICM,i ), with robot mass mi and C. DeICM,i Persis Distributed control CPS II oment of inertia . (RUG) ASCI, 2-10-2014 4 / 33 roblem statement A “higher-dimensional” multi-agent system ri Systems in networkdAC,i yC,i • Inteconnection graph G = (I, E ) dAB,i yB,i • Node dynamics (i ∈ I) i yA,i ṗi v̇ii R = = vi −vi + ui xA,i Fig. 1. xB,i xC,i Wheeled robot i Rendezvous Control objective[Arcak 2007] 0 1 mp d (t) For each initial i = 1, 2, . . . , n, Rendez-vous, → 0 aszit(0), →∞ i (0), i (t) − j hp 0i.e. pcondition m d +I Ci (pi ) = @ mi dAB,i hi mi d2AB,i +ICM,i i AB,i i 2 i AB,i CM,i 0 A. lim kpi (t) − pj (t)k = 0, ∀i, j t→+∞ e Hamiltonian Hir (pi ) equals the kinetic energy of the bot and is given by lim kv inaire du groupe MAC, 4 juin 2014 1 Hir (pi ) = pTi (M r ) 1 pi 2 1 2 1 t→+∞ = p + h2 , 2mi i 2ICM,i i i (t)k 2/36 = 0, ∀i Romain Postoyan - Université de Lorraine, CNRS (Nancy) ere Mir = C.diag (mi , ICM,i ), with robot mass mDistributed i and De Persis (RUG) control CPS II ASCI, 2-10-2014 5 / 33 Formation control Virtual coupling System i is interconnected to its neighbors via arantees Self-triggered controllers Simulation results Conclusions X ui = ψij (zij ), j∈Ni with ψ : R → R C 1 , nondecreasing and odd and zij = pj − pi Figure: Georg-Johann – wikipedia C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 6 / 33 Energy-based analysis Multi-agent system + virtual coupling ṗ1 = v1 v̇1 = −v1 + ψ(p2 − p1 ) ṗ2 = v2 v̇2 = −v2 + ψ(p1 − p2 ) Energy-based (Lyapunov) analysis I Consider 2 agents (n = 2) evolving on a line (pi , vi ∈ R) and let q = (z, v ), with z = p2 − p1 and define [Arcak, TAC 2007] 1 Uphys (q) := (v12 + v22 ) + 2 | {z } kinetic C. De Persis (RUG) Distributed control CPS II Z z ψ(s)ds | 0 {z } potential ASCI, 2-10-2014 7 / 33 Energy-based analysis Energy-based (Lyapunov) analysis II d U(q) = = −v12 − v22 + (v1 − v2 )ψ(z) + ψ(z)(v2 − v1 ) dt = −v12 − v22 Energy is dissipated until system comes to a stop If v = 0 and z 6= 0 then virtual force ψ(z) kicks in The system comes to a stop iff z = 0 C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 8 / 33 Cyber-physical Lyapunov function C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 9 / 33 Ideal scenario Continuous measurements Continuous control updates E) C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 10 / 33 Idealmeasurements scenario nuous nuousContinuous control updates measurements Continuous control updates C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 11 / 33 Ideal measurements scenario nuous measurements nuousContinuous control updates Continuous control updates C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 12 / 33 imit the network usage Cyber-physical scenario reduceTosensors batteries consumption limit network usage To reduce sensor wear re control updates than event-triggered control To reduce actuator wear C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 13 / 33 imit the network usage Cyber-physical scenario reduceTosensors batteries consumption limit network usage To reduce sensor wearevent-triggered control re control updates than To reduce actuator wear C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 14 / 33 imit the network usage Cyber-physical scenario reduceTosensors batteries consumption limit network usage To reduce sensor wear re control updates than event-triggered control To reduce actuator wear C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 15 / 33 t control updates and communication → Self-triggered contr Problem statement limit the network usage reduceTosensors batteries limit network usageconsumption To reduce sensor wear re control updates than event-triggered control To reduce actuator wear C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 16 / 33 Problem statement Communication/computation limitations Agents update their control and/or take their measurements at t`ij , ` ∈ Z, ui = X ψij (ẑij ) j∈Ni where ( ẑ˙ ij (t) = 0, t 6= t`ij ẑij (t + ) = zij , t = t`ij Problem For each agent i and each neighbor j ∈ Ni , determine sequence t`ij so that rendezvous is achieved. C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 17 / 33 Energy-based analysis Energy function n = 2 1 Uphys (q) := (v12 + v22 ) + |2 {z } kinetic Energy-based (Lyapunov) analysis Z | z 0 ψ(s)ds {z } potential d U(q) = = −v12 − v22 + (v1 − v2 )ψ(ẑ) + ψ(z)(v2 − v1 ) dt 6= −v12 − v22 Due to the sampling, energy may not be dissipated C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 18 / 33 Cyber-physical (Lyapunov) energy function Cyber-physical (Lyapunov) energy function U(q) := Uphys (q) + Ucyber (q) where 1 Uphys (q) := (v12 + v22 ) + 2 and Ucyber (q) := 1 Z z ψ(s)ds 0 2 φ ψ(ẑ) − ψ(z) 2 is the “energy” of the sampling error weighted via φ. C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 19 / 33 Analysis Lyapunov analysis d U(q) = −v12 − v22 + (v1 − v2 )ψ(ẑ) + ψ(z)(v2 − v1 ) dt 2 1 dφ − ψ(ẑ) − ψ(z) 2 dt −φ ψ(ẑ) − ψ(z) ∇ψ(z)(v2 − v1 ) The choice of dφ dt as dφ dt = − σ1 (1 + φ2 dψ dz 2 ) and a completion of the squares argument yields d U(q) ≤ (−1 + 2σ)(v12 + v22 ) ≤ 0. dt where σ measures the convergence degradation. C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 20 / 33 Analysis During continuous evolution d U(q) ≤ (−1 + 2σ)(v12 + v22 ) ≤ 0. dt At the updates U(q + ) Z z 1 2 1 2 = (v + v2 ) + ψ(s)s + b(ψ(z) − ψ(z)) 2 1 2 Z0 z 2 1 2 1 ≤ (v1 + v22 ) + ψ(s)ds + φ ψ(ẑ) − ψ(z) 2 2 0 = U(q). Energy is dissipated until system comes to a stop C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 21 / 33 Clock The “weight” φ ∈ [a, b] plays the role of a clock Clock dynamics φ̇ φ+ 1 = − σ = b 1 + φ2 dψ(z) dz 2 ! φ ∈ [a, b], φ = a. where σ ∈ (0, 12 ) 0<a<b C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 22 / 33 Event-based control C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 23 / 33 System with n agents Dynamics of node i ∈ I ṗi v̇i = vi P = −vi + ψij (ẑij ) j∈Ni ∀j ∈ Ni φij ∈ [aij , bij ] 2 φ̇ij = − σ1ij 1 + (φij )2 ∇ψij (zij ) + pi = pi vi+ = vi z ! ij φ = a ∃j ∈ Ni φij = aij . + ij ij ẑij bij = ẑij φ+ ij φij > aij φij ẑ˙ ij = 0 C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 24 / 33 Event-triggered control Theorem 1 The solutions to the closed-loop hybrid dynamical system have a uniform semiglobal dwell-time 2 The maximal solutions are precompact and 3 approach the set {(p, v , ẑ, φ) : p1 = p2 = . . . = pn , v = 0, ẑ = 0 and φ ∈ [a, b]n } Precompact solutions A maximal solution is precompact if it is complete and bounded. Goebel-Sanfelice-Teel, Hybrid Dynamical Systems, Princeton University Press. C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 25 / 33 Two variations C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 26 / 33 Self-triggered control To avoid continuous measurement of z in φ̇ = − σ1 1 + φ2 (∇ψ(z))2 φ ∈ [a, b], φ+ = b 1 φ=a One can replace z with its analytical expression z(t, k) = z(tk , k ) + (1 − e−(t−tk ) )[v2 (tk , k) − v1 (tk , k) +2ψ(z(tk , k ))] − 2ψ(z(tk , k))(t − tk ) 2 solve the ODE and determine the time T (a, b, p1 (tk , k ) − p2 (tk , k), v1 (tk , k) − v2 (tk , k)) it takes for φ to reach a starting from b. C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 27 / 33 Time-triggered control To avoid continuous measurement of z in φ̇ = − σ1 1 + φ2 (∇ψ(z))2 φ ∈ [a, b], φ+ = b 1 φ=a One can replace ∇ψ(z) with M where |∇ψ(z)| ≤ M for any z ∈ R (saturated control) θ̇ = − σ1 (1 + M 2 θ2 ), 2 θ(0) = b, solve the ODE and determine the time T = σ (arctan(Mb) − arctan(Ma)). M it takes for φ to reach a starting from b. C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 28 / 33 Numerical results C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 29 / 33 Numerical results 10 [1 5 [1 z (i) ψ(z) = z (ii) ψ(z) = arctan(z) 0 [1 −5 0 5 10 15 20 [1 2 100 uniformly distributed initial conditions v1 , v2 [1 0 [1 −2 0 5 10 15 t 20 (a, b) = (1, 10) (a, b) = (0.1, 10) (a, b) = (0.1, 50) Fig. 1. Trajectories of z, v1 and v2 (self-triggered control (blue) / time(i) (ii) (i) (ii) (i) (ii) triggered control (green) / crosses indicate triggering instants). Average # of events STC TTC 116 idem Average t∗ STC TTC 10.4 idem 73 116 58 idem 36 58 55 idem 9 55 13.4the number 13.0 of events. 16.0 This13.1 > 20 fewer point is interesting as these 11.2 idembe used 11.8 idem adapt 13.6 parameters can to heuristically the number of events to theI desired performances. TABLE OF EVENTS AND AVERAGE VALUE OF t∗ FOR THE SELF - TRIGGERED (#: NUMBER , VIII.CONTROL C ONCLUSIONS C. De Persis (RUG) Distributed control CPS II TTC: TIME - TRIGGERED CONTROL ). [1 [1 [1 [2 STC: SELF - TRIG ASCI, 2-10-2014 30 / 33 [2 Conclusions Event-based rendezvous of coupled dynamical systems Event-triggered (reduce control update) Self-triggered (reduce measurement frequency) Time-triggered (reduce computational burden) Cyber-physical Lyapunov function Hybrid invariance principle Details available in C. De Persis and R. Postoyan. A Lyapunov redesign of coordination algorithms for cyberphysical systems. http://arxiv.org/abs/1404.0576 Current focus: resilient control to cyber-attacks C. De Persis and P. Tesi. Input-to-state stabilizing control under Denial-of-Service. IEEE Transactions on Automatic Control arXiv:1311.5143 C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 31 / 33 Some related literature 1 Distributed cooperative control M. Arcak. Passivity as a design tool for group coordination. IEEE Transactions on Automatic Control, 52(8):1380–1390, 2007. 2 Lyapunov redesign D. Carnevale, A.R. Teel, and D. Nešić. A Lyapunov proof of an improved maximum allowable transfer interval for networked control systems. IEEE Trans. on Automatic Control, 52(5):892–897, 2007. 3 Hybrid dynamical systems R. Goebel, R.G. Sanfelice, and A.R. Teel.Hybrid dynamical systems. Princeton University Press, 2012. C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 32 / 33 Thank you for your attention C. De Persis (RUG) Distributed control CPS II ASCI, 2-10-2014 33 / 33