500 likes | 687 Views
Statistical Model Checking , Refinement Checking , Optimization , .. for Stochastic Hybrid Systems. Kim G. Larsen Peter Bulychev , Alexandre David , Dehui Du, Axel Legay , Guangyuan Li, Marius Mikucionis , Danny B. Poulsen , Amalie Stainer , Zheng Wang.
E N D
StatisticalModel Checking, Refinement Checking, Optimization, .. for Stochastic Hybrid Systems Kim G. Larsen Peter Bulychev, Alexandre David, Dehui Du, Axel Legay, Guangyuan Li, Marius Mikucionis, Danny B. Poulsen, Amalie Stainer, Zheng Wang TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAAAAAAAA
IDEA4CPS Foundations for CPS Inst. of Software Chinese Academy of Sciences, Beijing, China I D TechnicalUniversity of Denmark, Lyngby, Denmark E East China Normal University, Shanghai, China Aalborg University, Denmark A FORMATS, Sep 2012
Cyber-Physical Systems • Complex systems that tightly integrate multiple, networked computing elements (hardware and software) with non-computing physical elements such as electrical or mechanical components. Hybrid Systems Smart X FORMATS, Sep 2012
Trustworthiness Probabilities Confidence (TCPS) .. by which we mean CPS on which reliance can justifiably be placed. (wiki) .. of a component is .. defined by how well it secures a set of functional and non-functional properties, deriving from its architecture, construction, and environment, and evaluated as appropriate. FORMATS, Sep 2012
Current State Probabilistic Temporal Logic Stochastic Hybrid Systems Statistical Model Checking FORMATS, Sep 2012
Overview Stochastic Hybrid Systems WeightedMetric Interval Temporal Logic UPPAAL SMC (Demo) Energy Aware Buildings SMC and RefinementChecking SMC and Optimization Conclusion FORMATS, Sep 2012
Stochastic HybridSystems Simulate 5 [<=20] {p} Pr[<=20](<>(time >=12 && p >= 4)) A Bouncing Ball FORMATS, Sep 2012
HybridAutomata H=(L, l0,§, X,E,F,Inv)where • L set of locations • l0 initial location • §=§i[§o set of actions • X set of continuous variablesvaluationº: X!R (=RX) • E set of edges(l,g,a,Á,l’) with gµRXand ÁµRX£RX and a2§ • For each l a delayfunctionF(l): R>0£RX ! RX • For each l an invariantInv(l)µRX FORMATS, Sep 2012
HybridAutomata Semantics • States(l,º) whereº2RX • Transitions (l,º) !d (l,º’) whereº’=F(l)(d)(º) providedº’2Inv(l)(l,º) !a (l’,º’) if thereexists (l,g,a,Á,l’)2E with º2g and (º,º’)2Á and º’2Inv(l’) FORMATS, Sep 2012
StochasticHybridAutomata StochasticSemantics For eachstates=(l,º) Delaydensityfunction* ¹s: R>0!R Output Probability Function °s: §o! [0,1] Next-state density function* ´as: St!R where a2§. * Dirac’s delta functions for deterministicdelays / nextstate FORMATS, Sep 2012
StochasticHybridAutomata StochasticSemantics For eachstates=(l,º) Delaydensityfunction* ¹s: R>0!R Output Probability Function °s: §o! [0,1] Next-state density function* ´as: St!R where a2§. UPPAAL Uniform distributions (boundeddelay) Exponential distributions (unboundeddelay) Syntax for discreteprobabilisticchoice Distribution on nextstate by use of random Hybrid flow by use of ODEs Networks Repeated races between components for outputting * Dirac’s delta functions for deterministicdelays / nextstate FORMATS, Sep 2012
Stochastic Semantics NTAs Pr[time<=2](<> T.T3) ? Pr[time<=T](<> T.T3) ? Pr[c<=C](<> T.T3) ? Composition = Race between components for outputting FORMATS, Sep 2012
Stochastic Semantics of NHAs • Assumptions: • Component SHAs are: • Input enabled • Deterministic • Disjoint set of output actions ¼ ( s , a1a2 …. an ) : the set of maximal runs from s with a prefix t1a1t2a2 … tnak for some t1,…,tn2R. FORMATS, Sep 2012
Metric Interval Temporal Logic • MITL≤ syntax: ϕ ::=σ | ¬ϕ|ϕ1∧ ϕ2| Oϕ | ϕ1U≤dϕ2 where d ∈ ℕ is a natural number. • MITL≤ semantics [ r=(a1,t1)(a2,t2)(a3,t3)… ]: • r⊨σif a1= σ • r⊨¬ϕ ifr ⊭ ϕ • r⊨ ϕ1∧ ϕ2ifr⊨ ϕ1andr ⊨ ϕ2 • r⊨Oϕif(a2,t2)(a3,t3)… ⊨ϕ • r⊨ϕ1U≤dϕ2if 9i. (ai,ti)(ai+1,ti+1)…⊨ϕ2 with t1+t2 +…+ti≤d and (aj,tj)(aj+1,tj+1)… ⊨ϕ1for j<i FORMATS, Sep 2012
Logical Properties– WMITL Á = MODEL M PrM(Á) = ?? FORMATS, Sep 2012
[FORMATS11, RV12] Statistical Model Checking M Generator }<T p Á Inconclusive Validator µ, ² p,® Core Algorithm PrM(Á) ¸p at significancelevel® PrM(Á) 2 [a-²,a+²] with confidenceµ FORMATS, Sep 2012
Logical Properties– WMITL Á = OBSERVER (det) MODEL M 95% confidence interval: [0.215,0.225] FORMATS, Sep 2012
Statistical Model Checking[LPAR2012] M | OÁ M Generator M | UÁ OÁ UÁ AÁ Á Inconclusive CASAAL Validator }acc µ, ² p,® Core Algorithm PrM(Á) ¸p at significancelevel® PrM(Á) 2 [a-²,a+²] with confidenceµ FORMATS, Sep 2012
Experiments • How exact is the O/U? • 1000 random formulas • 2, 3, 4 actions • 15 connectives New exactmethod for fullMITL[a,b] usingrewriting [RV12] FORMATS, Sep 2012
EnergyAwareBuildings With Alexandre David, Dehui Du Marius Mikucionis Arne Skou Fehnker, Ivancic. Benchmarks for Hybrid Systems Verification. HSCC04
Stochastic HybridSystems Room1 simulate 1 [<=100]{Temp(0).T, Temp(1).T} simulate 10 [<=100]{Temp(0).T, Temp(1).T} Pr[<=100](<> Temp(1).T<=5 and time>30) >= 0.2 on/off Heater Pr[<=100](<> Temp(0).T >= 10) Room 2 on/off FORMATS, Sep 2012
Framework Design Space Exploration FORMATS, Sep 2012
Rooms & Heaters – MODELS FORMATS, Sep 2012
Control Strategies – MODELS Temperature Threshold Strategies FORMATS, Sep 2012
Weather & User Profile – MODELS FORMATS, Sep 2012
Results – Simulations simulate 1 [<=2*day] { T[1], T[2], T[3], T[4], T[5] } simulate 1 [<=2*day] { Heater(1).r, Heater(2).r, Heater(3).r } FORMATS, Sep 2012
Results – Discomfort Pr[<=2*day](<> time>0 && Monitor.Discomfort) FORMATS, Sep 2012
Results – Comfort Pr[comfort<=2*day] (<> time>=2*day) FORMATS, Sep 2012
Results – Energy Pr[Monitor.energy<=1000000](<> time>=2*day) FORMATS, Sep 2012
Result – User Profile Pr[Monitor.energy<=1000000](<> time>=2*day) FORMATS, Sep 2012
Refinement FORMATS, Sep 2012
Controller Synthesis Heater Room on/off Room ?? constintTenv=7; constintk=2; constintH=20; constintTB[4]= {12, 18, 25, 28}; constintTenv=7; constintk=2; constintH=20; constint TB[4]= {12, 18, 25, 28}; criticalhigh 28 high 25 normal 18 low 12 criticallow FORMATS, Sep 2012
Unfolding criticalhigh 28 high 25 normal 18 low 12 criticallow FORMATS, Sep 2012
Timing criticalhigh 28 high 25 normal 18 low 12 criticallow FORMATS, Sep 2012
TA Abstraction constintuL[3]={3,5,2}; constintuU[3]={4,6,3}; constintdL[3]={3,9,15}; constintdU[3]={4,10,16} FORMATS, Sep 2012
Validation by Simulation FORMATS, Sep 2012
Validation by Simulation constintuL[3]={3,8,2}; constintuU[3]={4,9,3}; constintdL[3]={3,9,15}; constintdU[3]={4,10,16} FORMATS, Sep 2012
Optimization FORMATS, Sep 2012
Time Bounded L-problem [Qest12] simulate 1 [time<=5] {C, x, y} Problem: Determineschedulethatmaximizes time until out of energy WATA, Dresden, May 30, 2012
Time Bounded L-problem [Qest12] Pr[time<=30] (<> C<0 ) WATA, Dresden, May 30, 2012
Time Bounded L-problem [Qest12] simulate 10000 [time<=10] {C,x,y}: 1 : time>=7 && Test.GOOD TEST Can we do better? Pr [time<=10] (<> time>=7 && Test.GOOD WATA, Dresden, May 30, 2012
RESTART Method FORMATS, Sep 2012
Meta Modeling RESTART Approach FORMATS, Sep 2012
Meta Modeling Direct Approach FORMATS, Sep 2012
Meta Analysis Direct Approach RESTART Approach FORMATS, Sep 2012
Meta Analysis FORMATS, Sep 2012
Meta Analysis FORMATS, Sep 2012
Other Case Studies BLUETOOTH 10 node LMAC FIREWIRE ROBOT Schedulability Analysis for Mix Cr Sys Energy Aware Buildings Genetic Oscilator (HBS) Passenger Seating in Aircraft FORMATS, Sep 2012
Contribution & More • Natural stochastic semantics of networks of stochastic hybrid systems. • Efficient implementation of SMC algorithms: • Estimation of • Sequential testing ¸ p • Sequential probability comparison ¸ • Parameterized comparison • Distributed Implementation of SMC ! FORMATS, Sep 2012
Thank You ! FORMATS, Sep 2012