1 / 19

The future ambient environments based on user’s expression: rules and invariants

Internet Based Monitoring And Control Of Embedded Systems project. The future ambient environments based on user’s expression: rules and invariants. Thang Manh Tran 13, Jun, 2003. You know about me via state variables x, y, z. I can work with you all, in the same manner

alden
Download Presentation

The future ambient environments based on user’s expression: rules and invariants

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Internet Based Monitoring And Control Of Embedded Systems project The future ambient environments based on user’s expression: rules and invariants Thang Manh Tran 13, Jun, 2003

  2. You know about me via state variables x, y, z I can work with you all, in the same manner – UPNP You can control me via function A, function B,… I will give you all in XML format. Do you run HTTP?? I am not an Internet device, I need help !!! No problem !, I will help you. I am IP enabled

  3. UPNP • Addressing • Discovery and advertisement • Description • Control • Eventing • Presentation

  4. Tomorrow, if phone is ring and TV volume too high -> reduce TV volume!! OK, I can control TV and phone from here!! H..mm, phone is ring, but TV volume is too high !! Ok, I know how to work with each of you!! Time = “tomorrow” ^ Phone=“ring” ^ TV_Volume >10 -> TV_Volume(5) Time = “tomorrow” ^ Phone=“ring” ^ TV_Volume >10 => TV_Volume = 5 after 1 minute OK, tomorrow, hope they work well, Otherwise, alert me ! I has to check them In advanced -> simulation Will they work as I want??

  5. Progress Industrial Design Dept, Who else? User interface Rule, invariant structure Rule, invariant detection Tran, Lukkien Environment Simulation System architecture

  6. Semantics Rule, invariant structure Requirement Rule, invariant detection Prototypes Environment Simulation System architecture

  7. Rule Condition becomestrue R: If St(C) A on T Time to start the action Condition Action E.g. : If (TV = “ON”) -> SetTVVolume(10) at now If (Time = 10 ^ Telephone = “Ring” ) -> SetTelePhoneAnswer(“Not at home”)

  8. Condition semantics History X=0 Y=0 Z=false X=5 Y=7.5 Z=false X=0 Y=0 Z=true X=5 Y=0 Z=false h 0 Var: A set of variable. E.g. {x,y,….} Val: A set of values ∑ : A set of all states. It means σ є ∑ is a map: σ : Var → Val aH: A set of all histories. It means h є aH is a map: h : R+→ ∑ We say a h iscalm if in each finite interval [T1 ,T2 ] there are only finitely changes of the state. H = { h є aH | h is calm} From now, the def of a condition or invariant is on h є H, Tє R+

  9. Condition semantics Simple condition Condition: Simple condition(SC) & composite condition(CC) CC SC SC ((TV = “ON”)^(A* (Radio=”ON” ^ RadioVolume < 20)[14, 16]))^(Start(TV=”ON”) > 12 ^Start(Tel = “RING”|Mobile = “RING”) > 10) State variables Temporal variables Variables of SC: State variable, Temporal variable

  10. Condition semantics St(C) Define G : C x H x R+ → bool. Condition C is hold on given h at time T if G(C,h,T). Define St(C) : R+ → bool , given by St(C)(T) = true if either G(C,h,0) or T>0 ^ G(C,h,T) ^(exist З є R+: for all δ є R+, δ< З, ┐G(C,h,t- δ)) = false otherwise. This identifies the time that C becomes true. Define Г(C,t1,t2) = {T є R+: St(C)(T)}. Г(C,t1,t2)(i) is the ith element in Г(C,t1,t2). # Г(C,t1,t2) is the number of element in Г(C,t1,t2).

  11. Condition semantics Composite condition(CC) • Disjunctive condition: C1 or C2 • G(C1 or C2 ,h,T) = G(C1 ,h,T) | G(C2,h,T). • Conjunctive condition: C1 and C2 • G(C1 and C2 ,h,T) = G(C1,h,T) ^ G(C2,h,T). • A-periodic condition: A*(C,t1, t2) • G(A*(C,t1, t2),h,T) = (t1≤T)^(exist T’ є R+ : • t1≤T’ ≤t2^ T’≤T^G(C,h,T’). • Periodic condition: P*(C,lt, t1, t2) • G(P*(C,lt,t1, t2),h,T)= (M>1 ^ (forall i: 0 ≤i ≤M-1: • |M(i+1) - M(i) - lt| ≤ β, β є R+) • where M = # Г(C,t1,t2).

  12. Condition semantics Consequences 1. St(C1 or C2)(T) = St(C1)(T) | St(C2)(T) 2. St(C1and C2)(T) = (St(C1)(T) ^ G(C2,h,T)) | (St(C2)(T) ^ G(C1,h,T)) 3. St(A*(C,t1,t2),T) = true if (t1 = T)^( exist T’є R+ : T’ < t1 : St(C,T’) ^ (non exist T’’ є R+, T’ < T’’≤ t1. ┐G(C,T”,h)) otherwise true if (t1 ≤ T≤ t2)^St(C)(T) otherwise false. 4. St(P*(C,lt, t1, t2),T) = true if (T= t2^ G(P*(C,lt, t1, t2),T,h)) otherwise false

  13. Condition semantics Temporal variables • - Г(C,t1,t2)(i) is the ith element in Г(C,t1,t2). • # Г(C,t1,t2) is the number of element in Г(C,t1,t2). • Time that C becomes true nearest T • Start(C): R+ → R+ • Length of C holds nearest T • Length(C,T’): R+ → R+, where T’ = Start(C) • Length of C holds in [t1,t2] at ith • Length(C,i, t1,t2): R+ → R+ • Time that C becomes true nearest T in [t1,t2] • Start(C,t1,t2): R+ → R+

  14. Condition semantics Some examples B enters the room after A 1hour. Define C1= A enters; C2= B enters (Start(C1 )-Start(C2 )=1) B has entered the room.Before that A had entered and left. B has stayed there for 2 hours. Define C1= A enters; C2= A leaves;C3= B enters (Length(C3,Start(C3))=2 and (Start(C2 )<Start(C3)) and Start(C1) < Start(C2 ) Neither A nor B in the room. Define C1= A not in; C2= B not in (C1 and C2) To day TV has been on for more than 5 times and the third time is more than 2 hours long. Define: C = TV is on; T1 = Г(C,1,24)(3) ; (A*(C,1,24) and #Г(C,1,24) > 5))and(Length(C, T1 ) > 2) From 1am to 6am, every 5 minutes the security system has sent information to the PC. Define: C = the security system sends information to the PC P*(C,5m,1,6)

  15. Action For each device D, each service S є D, each function F є S, action A is defined as: A(D, S, F) : ∑→ ∑ , formally A(D, S, F)(h(T1)) = h(T2 ) X=0 Y=0 Z=false X=5 Y=7.5 Z=false X=0 Y=0 Z=true X=5 Y=0 Z=false Action 2 h 0 T2 T1 Action 1

  16. Invariant An invariant I has the same structure as a C The evaluation whether an I is true is the same as that for C, but for all T є R+. 2 new variables is introduced: #R : number of times that a rule is activated. #R(t1,t2) : number of times that a rule is activated in an interval. Example: I : (#R < 4)

  17. Condition detection ((TV = “ON”)^(A* (Radio=”ON” ^ RadioVolume < 20)[14, 16]))^(Start(TV=”ON”) > 12 ^Start(Tel = “RING”|Mobile = “RING”) > 10) (C1 ^ A*(C2 ^ C3)[14, 16]) ^ (Start(C1) > 12 ^ Start(C4 | C5) > 10)

  18. Condition detection Controller TV Radio Tel Mobile Event Event A*(14) A*(16) Begin Event h 0

More Related