Coordination control in a cyberphysical environment1 Claudio De Persis Groningen Center for Systems and Control University of Groningen Workshop on the Control of Cyber-Physical Systems University of Notre Dame London Centre October 20-21, 2012 1 Joint work with Paolo Frasca – Politecnico di Torino 1 / 21 Cyberphysical systems Cyber-physical systems (CPS) Engineered systems whose operations are monitored, coordinated, controlled and integrated by a computing and communication core {z } | (P. Antsaklis) cyber-infrastructure Engineered system Coordination Cyber infrastructure = = = Distribution network Load balancing measurement scheduling control computation actuation scheduling robustness to delays, quantization poor clock synchronization 2 / 21 Distribution network ẋ z = Bu = BT x where xi ∈ R, stored quantity at the node i ∈ I := {1, 2, . . . , n} uk ∈ R flow through edge k ∈ E := {1, 2, . . . , m} B incidence matrix of undirected graph G Load balancing Design edge controllers uk , k ∈ E , such that uk depends on zk := xi − xj zk → 0 for all k ∈ E 3 / 21 Why (still) studying load balancing? It is a prototypical problem: solutions can be extended to more complex scenarios It is useful in many application fields: robotic networks sensors networks data networks opinion dynamics It is well studied: Theorem (Standard consensus) If the graph G is connected, the control law uk = −zk guarantees that lim zk (t) = 0 for all k. Moreover t→∞ xi (t) → n X xj (0) j=1 n 4 / 21 Coordination in a cyber-physical environment The algorithm requires continuous acquisition of information from neighbors This is too demanding in a cyber-physical environment! We instead want a scenario in which sensors collect information only upon need the continuous-time systems “naturally” interacts with the discrete-time information acquisition the whole system is robust against network uncertainties (delays, poor synchronization of local clocks, limited data rate communication, noise) 5 / 21 A hybrid coordination algorithm I State variables (i ∈ I , k ∈ E ) node quantities: xi ∈ R flows: uk ∈ {−1, 0, +1} (ternary controls) local clock variables: θk ∈ R Continuous evolution when no information exchange occurs P ẋi = k∈E bik uk u̇k = 0 θ̇k = −1 Jumps occur at every t such that the set I(θ, t) = {k ∈ E : θk = 0} = 6 ∅ 6 / 21 A hybrid coordination algorithm II Discrete evolution: how the exchange of information affects the systems xi (t + ) = x( i (t) ∀i ∈ I u (t + ) = − signε (zk (t)) if k ∈ I(θ, t) k ( uk (t) otherwise α + ) = fk (zk (t)) if k ∈ I(θ, t) θ (t k θk (t) otherwise ( sign(z) signε (z) = 0 if |z| ≥ ε otherwise ε > 0 is a sensitivity parameter α ∈ (0, 1) is a robustness parameter Note: the law uk = − sign(zk ) is known to imply finite-time convergence 7 / 21 A hybrid coordination algorithm III Next sampling time ( f α (zk (t)) if k ∈ I(θ, t) θk (t ) = k θk (t) otherwise + where α |zk | 2(degi + degj ) fkα (zk ) = α ε 2(degi + degj ) so that k dwell time property holds: t`+1 − t`k ≥ if |zk | ≥ ε otherwise αε 2 degmax k ] sign(zk (t)) constant on [t`k , t`+1 ε-deadzone to prevent Zeno 8 / 21 Hybrid coordination algorithm 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: Protocol initialization: for all k ∈ E , set θk (0) = 0, uk (0) ∈ {−1, 0, +1}; for all i ∈ I do for all k ∈ Ei do while θk (t) > 0 do i applies the control bik uk (t); end while if θk (t) = 0 then k polls nodes i, j and collects the information zk (t); k updates θk (t + ) = fkα (zk (t)); k updates uk (t + ) = signε (zk (t)); end if end for end for 9 / 21 Main result Theorem (Practical balancing) For every initial condition x̄, let x(t) be the solution to the Hybrid Coordination Algorithm such that x(0) = x̄. Then x(t) converges in finite time to a point x ∗ belonging to the set T E = {x ∈ Rn : || B x ||∞ < ε} |{z} z Time cost (time to converge) T := inf{t ≥ 0 : x(t) ∈ E} ≤ (degmax +1) ||x̄||2 ε Communication cost (# updates to converge) C := max max{k : tki ≤ T } ≤ i∈I 4 degmax (degmax +1) ||x̄||2 ε2 10 / 21 Main result Theorem (Practical balancing) For every initial condition x̄, let x(t) be the solution to the Hybrid Coordination Algorithm such that x(0) = x̄. Then x(t) converges in finite time to a point x ∗ belonging to the set T E = {x ∈ Rn : || B x ||∞ < ε} |{z} z Proof Based on a Lyapunov-like argument for hybrid systems with V (x) = x T x It satisfies V̇ (t) ≤ − X k∈E :|zk (t`k )|≥ε |zk (t`k )| 2 Communication cost (# updates to converge) 11 / 21 Simulations 1 u1 1 data1 data2 data3 data4 data5 0.8 0 −1 1 u2 0.9 0.7 0 −1 1 x u3 0.6 0.5 0 −1 1 u4 0.4 0 −1 0.3 1 u5 0.2 0 −1 0.1 0 0.05 0.1 0.15 0.2 0.25 Time 0.3 0.35 0.4 0.45 0 0.05 0.1 0.15 0.2 0.25 Time 0.3 0.35 0.4 0.45 Sample evolutions of states x and corresponding controls u on a ring with n = 5 nodes, ε = 0.02 12 / 21 Capacity constraints Ternary controllers satisfy edge capacity constraints Node capacity constraints can also be satisfied Proposition Let 0 ≤ cmin ≤ xi (0) ≤ cmax , for all i ∈ I . where 0 ≤ cmin < cmax are bounds on the capacities of the nodes. Then the solution x(t) to the Hybrid Coordination Algorithm starting from x(0) satisfies 0 ≤ cmin ≤ xi (t) ≤ cmax , for all i ∈ I , for all t ≥ 0. 13 / 21 Asymptotical coordination 14 / 21 Asymptotical coordination: idea Accuracy of practical balancing depends on ε 1 1 0.9 0.9 0.8 0.8 0.7 0.7 0.6 0.6 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0 0 0 0.1 0.2 0.3 0.4 0.5 Time 0.6 0.7 n = 20, ε = 0.01 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 Time 0.6 0.7 0.8 0.9 1 n = 20, ε = 0.001 Practical convergence may not be satisfactory: can we do better? 15 / 21 Asymptotical coordination: idea Underlying idea ε is a measure of the size of the region of convergence To achieve asymptotical coordination we let ε(t) → 0 To prevent Zeno, we must slow down both the information request process and the velocity of the systems Information request 1 α f (zk ) γ(t) k in a consistent way, namely ε(t) ≥c γ(t) System velocity P γ(t) k∈E bik uk ∀t ≥ 0 16 / 21 Asymptotical coordination: system Continuous-time dynamics P ẋi = γ(t) k∈E bik uk u̇k = 0 θ̇k = −1 Discrete-time dynamics xi (t + ) = x( i (t) ∀i ∈ I u (t + ) = signε(t) (zk (t)) if k ∈ I(θ, t) k u (t) otherwise ( k 1 α γ(t) fk (zk (t)) if k ∈ I(θ, t) +) = θ (t k θk (t) otherwise 17 / 21 Asymptotical coordination: results Theorem (Asymptotical consensus) Let x(·) be the solution to the Hybrid Asymptotical Coordination Algorithm. Then, for every initial condition x̄ ∈Z Rn there exists β ∈ R such +∞ that lim xi (t) = β for all i ∈ I , if and only if t→∞ γ(s)ds is divergent 0 R +∞ Condition 0 γ(s)ds = +∞ is necessary because a “persistent excitement” is needed to ensure convergence Dwell time property is satisfied k t`+1 − t`k ≥ 1 α ε(t`k ) k f (x(t )) ≥ ≥ c0 k ` k k 4d γ(t` ) max γ(t` ) Robustness: no need to have the same γ, ε: we can use different γk , εk 18 / 21 Simulations 1 0.7 0 −1 1 u2 0.8 u1 1 data1 data2 data3 data4 data5 0.9 0 −1 0.6 u3 x 1 0.5 0 −1 0.4 1 u4 0.3 0 −1 0.2 1 u5 0.1 0 −1 0 0 2 4 6 Time 8 10 12 0 2 4 6 Time Sample evolutions of x and u on a ring with n = 5, ε(t) = γ(t) = 0.25 1+t : dwell time is 0.025 8 10 12 0.05 1+t , 19 / 21 Conclusion 20 / 21 Conclusions Load balancing in a distribution network Coarse controllers and occasional information collection Protocols for practical & asymptotical convergence Robustness (delays, quantization, clock skews), guaranteed dwell-time Network of hybrid systems that synchronize asynchronously C. De Persis and P. Frasca. Robust self-triggered coordination with ternary controllers. IEEE Transactions on Automatic Control, provisionally accepted. Available at http://arxiv.org/abs/1205.6917 Work in progress ẋ z = Bu = BT x u = −z ẇ = σ(w ) ẋ = f (x) + Bu + Pw z = BT x η̇ = Φ(η, z) u = Ψ(η, z) QUantized Information and Control for formation Keeping (QUICK) 21 / 21