Crossing he Bridge beween Similar Games Jan-David Quesel, Marin Fränzle, and Werner Damm Universiy of Oldenburg, Deparmen of Compuing Science, Germany CMACS Seminar CMU, Pisburgh, PA, USA 2nd December 2011 Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 1 / 22
Ouline 1 Moivaion 2 Hybrid Sysems and Simulaion 3 Logic 4 Deermining Similariy 5 Conclusion Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 2 / 22
Ouline 1 Moivaion 2 Hybrid Sysems and Simulaion 3 Logic 4 Deermining Similariy 5 Conclusion Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 2 / 22
Hybrid Sysems Problem Hybrid Sysem Coninuous evoluions (differenial equaions) Discree jumps (conrol decisions) a v p 2 3.0 6 2.5 5 1 2.0 4 1.5 3 1 2 3 4 1.0 2 1 0.5 1 2 Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 3 / 22
Velociy Conroller v = 2 15 v 30 v 20 v 15 v 15 0 x := 0 x := 0 v 0 5 10 ẋ = v 10 v = 0.001x 0.052v 5 15 v 15 0 v 15 v 15 0 5 10 x := 0 x := 0 5 v v = 1.5 10 30 v 15 15 20 0 5 10 Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 4 / 22 10
Velociy Conroller v 15 x := 0 v = 2 15 v 30 ẋ = v v = 0.001x 0.052v 15 v 15 v 15 x := 0 v 15 x := 0 v = 1.5 30 v 15 v 15 x := 0 τ 30 v < 15 := 0 a := 1.5 x := 0 v = a ṫ = 1 τ τ 15 < v 30 := 0 a := 2 x := 0 τ 15 v 15 := 0 x := x + τv a := 0.001x 0.052v Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 4 / 22
Velociy Conroller 15 v 10 5 0 0 20 40 60 Velociy (specificaion) 15 v 10 5 0 0 20 40 60 Velociy (implemenaion) v 10 5 0 0 20 40 60 Velociy differences Anoine Girard, A. Agung Julius, and George J. Pappas. Approximae simulaion relaions for hybrid sysems. Discree Even Dynamic Sysems, 18(2):163 179, 2008. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 4 / 22
Ouline 1 Moivaion 2 Hybrid Sysems and Simulaion 3 Logic 4 Deermining Similariy 5 Conclusion Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 4 / 22
Example for he Semanics Example x Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 5 / 22
Illusraion of he Similariy Noion Example x Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 6 / 22
Illusraion of he Similariy Noion Example x δ ε Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 6 / 22
Illusraion of he Similariy Noion Example x δ ε Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 6 / 22
Velociy Conroller 15 v 10 5 0 0 20 40 60 Velociy (specificaion) 15 v 10 5 0 0 20 40 60 Velociy (implemenaion) v 10 5 0 0 20 40 60 Velociy differences Anoine Girard, A. Agung Julius, and George J. Pappas. Approximae simulaion relaions for hybrid sysems. Discree Even Dynamic Sysems, 18(2):163 179, 2008. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 7 / 22
Velociy Conroller 15 v 10 5 0 0 20 40 60 Velociy (specificaion) 15 v 10 5 0 0 20 40 60 Velociy (implemenaion) v 10 5 0 0 20 40 60 Velociy differences v 6 4 2 0 0 20 40 60 Temporal differences v 10 5 0 0 20 40 60 Velociy differences (reimed) Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 7 / 22
Reiming Definiion (ε-reiming) A lef-oal, surjecive relaion r R + R + is called ε-reiming iff (, ) r : < ε (, ) r : ( ). Example 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 8 / 22
Definiion of ε-δ-simulaion Definiion For wo sreams σ i : R + N R p wih i {1, 2}, given wo non-negaive real numbers ε, δ, we say ha σ 1 is ε-δ-simulaed by sream σ 2 (denoed by σ 1 ε,δ σ 2 ) iff here is a ε-reiming r such ha (, ) r : c(σ 1 )(), c(σ 2 )( ) < δ where for k {1, 2}: c(σ k ) is defined by c(σ k )() := lim q σ k (, q). Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 9 / 22
Definiion of ε-δ-simulaion Definiion A hybrid sysem A is ε-δ-simulaed by anoher sysem B (denoed by A ε,δ B) iff for all inpu sreams ι A and for all inpu sreams ι B ι A ε,δ ι B implies ha for all oupu sreams ω A Ξ(ι A ) of A, here is an oupu sream ω B Ξ(ι B ) of B such ha ω A ε,δ ω B holds. Jan-David Quesel, Marin Fränzle, Werner Damm Crossing he Bridge beween Similar Games FORMATS, LNCS 6919, 160-176. Springer, 2011. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 9 / 22
Ouline 1 Moivaion 2 Hybrid Sysems and Simulaion 3 Logic 4 Deermining Similariy 5 Conclusion Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 9 / 22
Logic L (Synax) Definiion (Synax of L ) The basic formulas are defined by φ ::= x I f (x 1,..., x n ) 0 φ φ 1 φ 2 φ 1 U J φ 2 where I R, J R, f is a Lipschiz coninuous funcion and he x i are variables. Example (L Formulas) (x y 5)U [0,10] (x y > 10) (x < 3 x>7 (x + y > 10)) Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 10 / 22
Logic L (Semanics) Definiion (Valuaion) We define he valuaion of a variable x a ime on a run ξ as ζ ξ (, x) := lim n ξ(, n) x, where y x denoes he projecion of he vecor y o is componen associaed wih he variable name x. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 11 / 22
Logic L (Semanics) Definiion (Semanics of L ) We define for a run ξ and some R + he semanics of a formula φ by: ξ, = x I iff ζ(, x) I ξ, = f (x 1,..., x n ) 0 iff f (ζ(, x 1 ),..., ζ(, x n )) 0 Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 11 / 22
Logic L (Semanics) Definiion (Semanics of L ) We define for a run ξ and some R + he semanics of a formula φ by: ξ, = x I iff ζ(, x) I ξ, = f (x 1,..., x n ) 0 iff f (ζ(, x 1 ),..., ζ(, x n )) 0 ξ, = φ iff no ξ, = φ ξ, = φ ψ iff ξ, = φ and ξ, = ψ Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 11 / 22
Logic L (Semanics) Definiion (Semanics of L ) We define for a run ξ and some R + he semanics of a formula φ by: ξ, = x I iff ζ(, x) I ξ, = f (x 1,..., x n ) 0 iff f (ζ(, x 1 ),..., ζ(, x n )) 0 ξ, = φ iff no ξ, = φ ξ, = φ ψ iff ξ, = φ and ξ, = ψ ξ, = φu J ψ iff J : ξ, max{ +, 0} = ψ and < + : ξ, = φ Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 11 / 22
Logic L (Semanics) Definiion (Semanics of L ) We define for a run ξ and some R + he semanics of a formula φ by: ξ, = x I iff ζ(, x) I ξ, = f (x 1,..., x n ) 0 iff f (ζ(, x 1 ),..., ζ(, x n )) 0 ξ, = φ iff no ξ, = φ ξ, = φ ψ iff ξ, = φ and ξ, = ψ ξ, = φu J ψ iff J : ξ, max{ +, 0} = ψ and < + : ξ, = φ Addiionally we define for a se of runs Ξ: Ξ, = φ iff for all runs ξ Ξ holds ξ, = φ A hybrid sysem H saisfies a formula denoed by H = φ iff Ξ H, 0 = φ. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 11 / 22
Preservaion (Informal) Example Formula: x {0, 1, 2} x Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 12 / 22
Preservaion (Informal) Example Formula: x {0, 1, 2}, δ = 1 x [ 1, 3] x Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 12 / 22
Preservaion (Informal) Example Formula: φu {1,2,3} ψ x Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 12 / 22
Preservaion (Informal) Example Formula: φu {1,2,3} ψ, ε = 1 φ U [0,4] ψ x Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 12 / 22
Preservaion (Formal) Theorem (Preservaion of logical properies) If hybrid sysems A and B saisfy A ε,δ B and B = φ hen A = φ +δ +ε where φ +δ +ε := re ε,δ(φ) and re ε,δ is defined by: re ε,δ (x I) := x I, where I = {a b I : a [b δ, b + δ]}. re ε,δ (f (x 1,..., x n ) 0) := f (x 1,..., x n ) δ M 0 where M is he Lipschiz consan for f. where I R and J R holds. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 13 / 22
Preservaion (Formal) Theorem (Preservaion of logical properies) If hybrid sysems A and B saisfy A ε,δ B and B = φ hen A = φ +δ +ε where φ +δ +ε := re ε,δ(φ) and re ε,δ is defined by: re ε,δ (x I) := x I, where I = {a b I : a [b δ, b + δ]}. re ε,δ (f (x 1,..., x n ) 0) := f (x 1,..., x n ) δ M 0 where M is he Lipschiz consan for f. re ε,δ ( φ) := ro ε,δ (φ). re ε,δ (φ ψ) := re ε,δ (φ) re ε,δ (ψ). where I R and J R holds. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 13 / 22
Preservaion (Formal) Theorem (Preservaion of logical properies) If hybrid sysems A and B saisfy A ε,δ B and B = φ hen A = φ +δ +ε where φ +δ +ε := re ε,δ(φ) and re ε,δ is defined by: re ε,δ (x I) := x I, where I = {a b I : a [b δ, b + δ]}. re ε,δ (f (x 1,..., x n ) 0) := f (x 1,..., x n ) δ M 0 where M is he Lipschiz consan for f. re ε,δ ( φ) := ro ε,δ (φ). re ε,δ (φ ψ) := re ε,δ (φ) re ε,δ (ψ). re ε,δ (φu J ψ) := re ε,δ (φ)u J re ε,δ (ψ), where J = {a b J : a [b ε, b + ε]}. where I R and J R holds. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 13 / 22
Preservaion (Informal) Example Formula: x [ 1, 3] x Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 14 / 22
Preservaion (Informal) Example Formula: x [ 1, 3], δ = 1 x [0, 2] x Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 14 / 22
Preservaion (Formal) Theorem (Preservaion of logical properies) The ransformaion funcion ro ε,δ is given by: ro ε,δ (x I) := x I, where I = {a b [a δ, a + δ] : b I}. ro ε,δ (f (x 1,..., x n ) 0) := f (x 1,..., x n ) + δ M 0 where M is he Lipschiz consan for f. where I R and J R holds. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 15 / 22
Preservaion (Formal) Theorem (Preservaion of logical properies) The ransformaion funcion ro ε,δ is given by: ro ε,δ (x I) := x I, where I = {a b [a δ, a + δ] : b I}. ro ε,δ (f (x 1,..., x n ) 0) := f (x 1,..., x n ) + δ M 0 where M is he Lipschiz consan for f. ro ε,δ ( φ) := re ε,δ (φ). ro ε,δ (φ ψ) := ro ε,δ (φ) ro ε,δ (ψ). where I R and J R holds. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 15 / 22
Preservaion (Formal) Theorem (Preservaion of logical properies) The ransformaion funcion ro ε,δ is given by: ro ε,δ (x I) := x I, where I = {a b [a δ, a + δ] : b I}. ro ε,δ (f (x 1,..., x n ) 0) := f (x 1,..., x n ) + δ M 0 where M is he Lipschiz consan for f. ro ε,δ ( φ) := re ε,δ (φ). ro ε,δ (φ ψ) := ro ε,δ (φ) ro ε,δ (ψ). ro ε,δ (φu J ψ) := ro ε,δ (φ)u J ro ε,δ (ψ), where J = {a b [a ε, a + ε] : b J }. where I R and J R holds. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 15 / 22
Ouline 1 Moivaion 2 Hybrid Sysems and Simulaion 3 Logic 4 Deermining Similariy 5 Conclusion Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 15 / 22
Classical Relaion Observaion Simulaions can be defined in erms of games. b 1 a 0 a 3 c b 0 a 1 c 2 4 2 3 Observaion Conroller synhesis is a game as well, i.e. he quesion wheher he conroller can win agains an malicious environmen. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 16 / 22
Classical Relaion Observaion Conroller synhesis is a game as well, i.e. he quesion wheher he conroller can win agains an malicious environmen. Example 1 b 0 a 2 a 1 b 3 c d 2 4 Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 16 / 22
Hybrid Game Definiion (Hybrid Game) A hybrid game HG = (S, E c, U c, l) consiss of a hybrid auomaon S = (U, X, L, E, F, Inv, Ini), a se of conrollable ransiions E c E, a se of conrollable variables U c U, and a locaion l L. The environmen wins, if i can force he game o ener he locaion l or if he conroller does no have any more moves. The conroller wins, if he can asser ha he locaion l is avoided. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 17 / 22
Velociy Conroller v 15 x := 0 v = 2 15 v 30 ẋ = v v = 0.001x 0.052v 15 v 15 v 15 x := 0 v 15 x := 0 v = 1.5 30 v 15 v 15 x := 0 τ 30 v < 15 := 0 a := 1.5 x := 0 v = a ṫ = 1 τ τ 15 < v 30 := 0 a := 2 x := 0 τ 15 v 15 := 0 x := x + τv a := 0.001x 0.052v Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 18 / 22
Velociy Conroller (Game) Conrolled Unconrolled C Commied C C U c = {s} Invarian: 0 s 2 v = 0.001x 0.052v v = s ( 0.001x 0.052v) v = a v = (2 s) a Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 19 / 22 C
Similariy and Games Assumpion The sysems ha we compare are inpuless, i.e. U =. Theorem Given wo hybrid sysems A and B. If here is a winning sraegy for he conroller in he game (A B, E c, {s}, bad) hen A ε,δ B holds. Observaion If sysem B is deerminisic and a reiming sraegy is given, model checking can be used o show ha he winning sraegy exiss. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 20 / 22
Opimal Conrol Opimal Conrol Sraegy For x A = (x A,1,..., x A,n ) and x B = (x B,1,..., x B,n ), he square of he disance evolves as follows: d( x A, x B ) 2 d = d( ((x A,1 x B,1 ) 2 + + (x A,n x B,n ) 2 ) 2 ) d = d((x A,1 x B,1 ) 2 + + (x A,n x B,n ) 2 ) d = Σ n i=1(2(x A,i x B,i ) (s dx A,i d (2 s) dx B,i )) d Le s min be he s ha minimizes his erm. Now choose s in he following way: If r < ε s min > 1 or r > ε s min < 1 choose s = s min. Oherwise choose s = 1. The resuling sraegy, for conrolling s can hen be encoded ino a hybrid auomaon and included ino he original auomaon. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 21 / 22
Ouline 1 Moivaion 2 Hybrid Sysems and Simulaion 3 Logic 4 Deermining Similariy 5 Conclusion Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 21 / 22
Summary We...... defined a noion of similariy for hybrid sysems.... showed properies ha are preserved by his noion.... esablished he classical relaion beween simulaions and games for his noion.... esablished some preliminary resuls for solving hese games. Quesel, Fränzle, Damm Crossing he Bridge beween Similar Games 2nd December 2011 22 / 22