SlideShare a Scribd company logo
1 of 34
Download to read offline
Modeling and Verification of Cyber Physical
       Systems: Two Case Studies
          M. V. Panduranga Rao
  Indian Institute of Technology Hyderabad




                     1
Outline

• Model Based Design
• The Hybrid Automata Option for CPS
• A Case Study
• Stochastic Modeling
• A Case Study




                             2
Floodgate management
with Akhilesh Chaganti




          3
Model Based Design for CPS

• Model the system using precise semantics
• Formally specify requirements expected of the system
• (Automatically) verify if the system meets the requirements
                         Why take the pain?

• Advantages: Vital for safety critical systems, Early detection of
  errors; better understanding of the system leading to better
  design




                                 4
Characteristics of CPS

 • Have a discrete component, typically the control logic and
    computation

 • Have a continuous component, typically the controlled
    environment

 • Infinite Execution
 • Several Concurrent Processes with networked communication
Strikingly similar to Hybrid Systems!




                                  5
Formal modeling

• Discrete systems: Finite Automata (and its cousins)
• Continuous systems: Differential Equations
• Hybrid systems? Combine both! Hybrid automata!




                               6
Hybrid Automata: A Quick and Dirty Introduction

• L: Finite ordered set L = {l1 . . . ln } of real valued variables;
       ˙
  also L

• G: Control multigraph G(V, E); V finite, called modes and E
  called control switches

• Init(v): specifies for each v the values that L can take initially
• Inv(v): specifies for each v the values that variables in L must
  necessarily have




                                 7
Hybrid Automata (contd)

• F low(v): specifies for each v the allowable rates of change of
  variables from L

• jump(e): specifies for each e ∈ E , potential source and
  target values each li can take

• Events: A finite set Σ of events, with an edge labeling function
  event : E → Σ.




                                8
An Example




Source: Internet

• Possible to “compose” automata using “synchronization labels”



                                9
Requirements

Examples:

 • Safety: Something bad never happens
 • Liveness: Something good eventually happens
 • Duration: Something happens only for a fraction of the time
Can be specified in Integrator Computation Tree Logic




                                10
Automatic Verification

• Verify the formally defined system against the formally specified
  requirements

• Symbolic Model Checking
• Symbolic Model Checker for “Linear” Hybrid Automata: HyTech




                               11
Case Study 1: Urban Flood Management

n sites in a city with
 • Water channels between (some of) the sites; some site(s) drain
    water out of the system

 • Floodgates that open into the water channels along with
    actuators to operate them

 • Sensors that detect (i) the present water level and (ii) the rate of
    increase of the water level

 • A central control room that obtains the sensor data and decides
    how to operate the floodgates

We need to know how to operate the floodgates to prevent flooding


                                  12
Examples: Tokyo Flood Management System G-CAN

Tokyo Flood Management System




Source: Internet



                            13
“Graph”ically

• n sites represented by the vertices of a directed acyclic graph
• Lower and Upper limits (li and ui ) of water level Li for every
  site i

• If there exists a water channel from site i to j , there is a directed
  edge (i, j) in the directed graph and a floodgate gij at i

• A delay associated with each gate




                                  14
The problem

 • A Floodgate Configuration: A bit string B with one bit for each
    floodgate that can take values “C” or “O” as follows: “C” if the
    corresponding floodgate is open and “O” otherwise.‘

 • A strategy: A transition function that takes as input the current
    floodgate configuration, sensor data and outputs the next
    configuration.

Problem: Figure out if a given strategy for floodgate management is
“safe”: i.e., the water levels always remain within safe limits at all
sites.



                                    15
The Hybrid Automaton

Two types of discrete locations: One type for configurations and one
type for delays.

For a given configuration C:

 • Invariants: li ≤ L ≤ ui ∀i
 • Flow Conditions: dLi /dt = ri +        i   gij −   j   gij
 • Jump conditions: depends on strategy!
For locations corresponding to delay, there is a clock variable:

 • Invariants: clock should not exceed 2 units
 • Flow conditions: the clock variable rises with slope 1

                                  16
An Example Mode

Two sites, site 2 drains into river

 • Label: OC
 • Flow Conditions:
       ˙
    – L1 = R1 − I12

     –    ˙
         L2 = R2 + I12
 • Invariants:
     – l1   ≤ L1 ≤ u1
     – l2   ≤ L2 ≤ u2
     – Example Jump Conditions:

     – If L1 falls below 5, goto Label “delayCC”


                                      17
– If L2 rises above 10, goto Label “delayOO”

• Label: delayOC
  – Flow Conditions: same as OC and clock variable starts

  – Invariants: clock variable has value less than T seconds

  – Jump Condition: When the clock variable equals T , goto
     Label “CC”

  Safety requirement: The water levels are safe at all sites in the
  city




                                18
The Architecture of the Tool


                          HyTech




       Strategy as                   Feedback
       HyTech File



                   Floodgate Management
                         System



Current Water Levels,                 Actuator Commands
Current Rate of Rise                  for Opening/Closing



    Sensor Network                        Floodgates




                             19
Ongoing Work

• One HA for each site, compose using synchronization labels.
Saves state space! Easier to handle!

                         Future Directions

 • General city topology (i.e. DAGs that are not line graphs)
 • Synthesis of the necessary and sufficient conditions for safety:
   Parametric Analysis




                                 20
Building Occupancy Modeling
      with Anmol Kohli




             21
Why?!

• Energy expenditure and appliance requirement of a building is
  proportional to ocupancy.

• Need to justify deployment of smart energy management
  systems. (akin to safety!)

• To estimate the number and capacity of environment/lighting
  control appliances




                                22
Typical questions

• For what fraction of time would the occupation of a room be
   –   ≤ (say) 20%?
   –   ≥ (say) 80%?
• What is the peak occupancy?
• Etc.




                               23
Existing work

• Has attracted a lot of interest in recent times
 • Single rooms [WFR05]
 • Household occupancy [RTI08]
 • Agent based modeling [JRMS08]
 • Agent based + graphical models [LB10]
• Specific cases and/or complex approaches! Scope for
generalization and simplification!




                                    24
Stochastic Modeling of Building Occupancy

 • A building consists of some (say three) rooms interconnected by
    corridors

 • People arrive at a building in a Poisson fashion at a rate that
    depends on time of the day (TOD).

 • Each person goes to one of the rooms according to a
    distribution that again depends on TOD.

 • People exit each room according to an exponential distribution
    with rate that depends on TOD.

 • Each person that exits has a destination according to some
    probability distribution.

• All parameters to be learned from real data.

                                 25
Building topology

                                µ 1( t)
                            1


         p  (t)
          o1


                            2   µ 2( t)
λ (t)      p
            o2
              (t)


        p  (t)
         o3


                            3

                                µ 3( t)




                    26
Simulation parameters

 Hours     1    2    3   4    5    6    7   8    9    10

   λ      10    10   1   1    1    10   1   1    1    1

  µ’s      0    1    1   1   20    1    1   1   10    10

Example exit distribution:
Out of Room 1, at lunch break and end of day: 0.95 go out, 0.2 and
0.3 to rooms 1 and 2
At all other times, 0.2 go out, 0.4 each to rooms 2 and 3.

• Each room maximum capacity assumed to be 150.



                                  27
Room 1 population plot




             100
             80
             60
population
             40
             20
             0




                   0      10   20   30     40   50   60
                                    time




                                    28
Room 2 population plot




             100
             80
             60
population
             40
             20
             0




                   0      10   20   30     40   50   60
                                    time




                                    29
Room 3 population plot




             25
             20
population
             15
             10
             5
             0




                  0      10   20   30     40   50   60
                                   time




                                   30
One room building




             80
             60
population
             40
             20
             0




                  0   10   20   30     40   50   60
                                time




                                31
Rajalakshmi et. al. @ IITH




            32
Future Work

• Generalize the model including, e.g., corridor delays
• Learn/correlate with experiments ongoing at IITH
• A tool for building occupancy, incorporating various models
• Can be used for the new IITH campus?




                               33
Thanks, Questions?




        34

More Related Content

Viewers also liked

biosensor presentation faculty
biosensor presentation facultybiosensor presentation faculty
biosensor presentation faculty
Robin Kim
 
Kent State University Makerspace (proposal)
Kent State University Makerspace (proposal)Kent State University Makerspace (proposal)
Kent State University Makerspace (proposal)
kate harmon
 
Model checking of time petri nets
Model checking of time petri netsModel checking of time petri nets
Model checking of time petri nets
Marwa Al-Rikaby
 

Viewers also liked (20)

2012 zebedee
2012 zebedee2012 zebedee
2012 zebedee
 
Monash University Prototyping Resources
Monash University Prototyping ResourcesMonash University Prototyping Resources
Monash University Prototyping Resources
 
Open Innovation: Evolution of research at Cambridge University Engineering De...
Open Innovation: Evolution of research at Cambridge University Engineering De...Open Innovation: Evolution of research at Cambridge University Engineering De...
Open Innovation: Evolution of research at Cambridge University Engineering De...
 
Open Platform for ICS Cybersecurity Research and Education
Open Platform for ICS Cybersecurity Research and EducationOpen Platform for ICS Cybersecurity Research and Education
Open Platform for ICS Cybersecurity Research and Education
 
Schneider-Electric & NextNine – Comparing Remote Connectivity Solutions
Schneider-Electric & NextNine – Comparing Remote Connectivity SolutionsSchneider-Electric & NextNine – Comparing Remote Connectivity Solutions
Schneider-Electric & NextNine – Comparing Remote Connectivity Solutions
 
Conducting research that counts dr.gould
Conducting research that counts dr.gouldConducting research that counts dr.gould
Conducting research that counts dr.gould
 
Autonomous Systems Lab
Autonomous Systems LabAutonomous Systems Lab
Autonomous Systems Lab
 
biosensor presentation faculty
biosensor presentation facultybiosensor presentation faculty
biosensor presentation faculty
 
Preparing for the Makerspace Implemnetation at UMB HS/HSL
Preparing for the Makerspace Implemnetation at UMB HS/HSLPreparing for the Makerspace Implemnetation at UMB HS/HSL
Preparing for the Makerspace Implemnetation at UMB HS/HSL
 
Making a Makerspace Happen
Making a Makerspace HappenMaking a Makerspace Happen
Making a Makerspace Happen
 
The Human Component of Intelligence Surveillance & Reconnaissance
The Human Component of Intelligence Surveillance & ReconnaissanceThe Human Component of Intelligence Surveillance & Reconnaissance
The Human Component of Intelligence Surveillance & Reconnaissance
 
The Grand Unified Theory of Autonomous Systems, Humans and Simulation
The Grand Unified Theory of Autonomous Systems, Humans and SimulationThe Grand Unified Theory of Autonomous Systems, Humans and Simulation
The Grand Unified Theory of Autonomous Systems, Humans and Simulation
 
actividad 2.4
actividad 2.4actividad 2.4
actividad 2.4
 
Kent State University Makerspace (proposal)
Kent State University Makerspace (proposal)Kent State University Makerspace (proposal)
Kent State University Makerspace (proposal)
 
Ch28 microelectronic devices Erdi Karaçal Mechanical Engineer University of G...
Ch28 microelectronic devices Erdi Karaçal Mechanical Engineer University of G...Ch28 microelectronic devices Erdi Karaçal Mechanical Engineer University of G...
Ch28 microelectronic devices Erdi Karaçal Mechanical Engineer University of G...
 
UPATcopter
UPATcopterUPATcopter
UPATcopter
 
Fabrication of microelectronic devices
Fabrication of microelectronic devicesFabrication of microelectronic devices
Fabrication of microelectronic devices
 
ICRA 2013 Tilt-TriRotor
ICRA 2013 Tilt-TriRotorICRA 2013 Tilt-TriRotor
ICRA 2013 Tilt-TriRotor
 
Model checking of time petri nets
Model checking of time petri netsModel checking of time petri nets
Model checking of time petri nets
 
A Preliminary Study on Architecting Cyber-Physical Systems
A Preliminary Study on Architecting Cyber-Physical SystemsA Preliminary Study on Architecting Cyber-Physical Systems
A Preliminary Study on Architecting Cyber-Physical Systems
 

Similar to Modeling and Verification of Cyber Physical Systems

Queuing theory and traffic analysis in depth
Queuing theory and traffic analysis in depthQueuing theory and traffic analysis in depth
Queuing theory and traffic analysis in depth
IdcIdk1
 
Scaling blockchain poart II: Rollups by Dan Boneh
Scaling blockchain poart II: Rollups by Dan BonehScaling blockchain poart II: Rollups by Dan Boneh
Scaling blockchain poart II: Rollups by Dan Boneh
r1tretyakov
 
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Lionel Briand
 
Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...
Universität Rostock
 

Similar to Modeling and Verification of Cyber Physical Systems (20)

Circuitrix@Pragyan 2015 NITT
Circuitrix@Pragyan 2015 NITTCircuitrix@Pragyan 2015 NITT
Circuitrix@Pragyan 2015 NITT
 
What is Quantum Computing and Why it is Important
What is Quantum Computing and Why it is ImportantWhat is Quantum Computing and Why it is Important
What is Quantum Computing and Why it is Important
 
IBIS MODELING FOR WIDEBAND EMC APPLICATIONS
IBIS MODELING FOR WIDEBAND EMC APPLICATIONSIBIS MODELING FOR WIDEBAND EMC APPLICATIONS
IBIS MODELING FOR WIDEBAND EMC APPLICATIONS
 
Queuing theory and traffic analysis in depth
Queuing theory and traffic analysis in depthQueuing theory and traffic analysis in depth
Queuing theory and traffic analysis in depth
 
Quantum computer
Quantum computerQuantum computer
Quantum computer
 
Scaling blockchain poart II: Rollups by Dan Boneh
Scaling blockchain poart II: Rollups by Dan BonehScaling blockchain poart II: Rollups by Dan Boneh
Scaling blockchain poart II: Rollups by Dan Boneh
 
2017 10 17_quantum_program_v2
2017 10 17_quantum_program_v22017 10 17_quantum_program_v2
2017 10 17_quantum_program_v2
 
QUANTUM COMP 22
QUANTUM COMP 22QUANTUM COMP 22
QUANTUM COMP 22
 
Introduction_to_Quantum_Computers.pdf
Introduction_to_Quantum_Computers.pdfIntroduction_to_Quantum_Computers.pdf
Introduction_to_Quantum_Computers.pdf
 
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
 
Quantum Computing and Qiskit
Quantum Computing and QiskitQuantum Computing and Qiskit
Quantum Computing and Qiskit
 
Crash course on data streaming (with examples using Apache Flink)
Crash course on data streaming (with examples using Apache Flink)Crash course on data streaming (with examples using Apache Flink)
Crash course on data streaming (with examples using Apache Flink)
 
Distributed Systems in the Post-Moore Era.pptx
Distributed Systems in the Post-Moore Era.pptxDistributed Systems in the Post-Moore Era.pptx
Distributed Systems in the Post-Moore Era.pptx
 
Quantum programming
Quantum programmingQuantum programming
Quantum programming
 
HDT TOOLS PRESENTATION (2000)
HDT TOOLS PRESENTATION (2000)HDT TOOLS PRESENTATION (2000)
HDT TOOLS PRESENTATION (2000)
 
Quantum computing
Quantum computingQuantum computing
Quantum computing
 
Concurrency in Distributed Systems : Leslie Lamport papers
Concurrency in Distributed Systems : Leslie Lamport papersConcurrency in Distributed Systems : Leslie Lamport papers
Concurrency in Distributed Systems : Leslie Lamport papers
 
Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...
 
Seminar on quatum
Seminar on quatumSeminar on quatum
Seminar on quatum
 
Fundamentals of Quantum Computing
Fundamentals of Quantum ComputingFundamentals of Quantum Computing
Fundamentals of Quantum Computing
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 

Modeling and Verification of Cyber Physical Systems

  • 1. Modeling and Verification of Cyber Physical Systems: Two Case Studies M. V. Panduranga Rao Indian Institute of Technology Hyderabad 1
  • 2. Outline • Model Based Design • The Hybrid Automata Option for CPS • A Case Study • Stochastic Modeling • A Case Study 2
  • 4. Model Based Design for CPS • Model the system using precise semantics • Formally specify requirements expected of the system • (Automatically) verify if the system meets the requirements Why take the pain? • Advantages: Vital for safety critical systems, Early detection of errors; better understanding of the system leading to better design 4
  • 5. Characteristics of CPS • Have a discrete component, typically the control logic and computation • Have a continuous component, typically the controlled environment • Infinite Execution • Several Concurrent Processes with networked communication Strikingly similar to Hybrid Systems! 5
  • 6. Formal modeling • Discrete systems: Finite Automata (and its cousins) • Continuous systems: Differential Equations • Hybrid systems? Combine both! Hybrid automata! 6
  • 7. Hybrid Automata: A Quick and Dirty Introduction • L: Finite ordered set L = {l1 . . . ln } of real valued variables; ˙ also L • G: Control multigraph G(V, E); V finite, called modes and E called control switches • Init(v): specifies for each v the values that L can take initially • Inv(v): specifies for each v the values that variables in L must necessarily have 7
  • 8. Hybrid Automata (contd) • F low(v): specifies for each v the allowable rates of change of variables from L • jump(e): specifies for each e ∈ E , potential source and target values each li can take • Events: A finite set Σ of events, with an edge labeling function event : E → Σ. 8
  • 9. An Example Source: Internet • Possible to “compose” automata using “synchronization labels” 9
  • 10. Requirements Examples: • Safety: Something bad never happens • Liveness: Something good eventually happens • Duration: Something happens only for a fraction of the time Can be specified in Integrator Computation Tree Logic 10
  • 11. Automatic Verification • Verify the formally defined system against the formally specified requirements • Symbolic Model Checking • Symbolic Model Checker for “Linear” Hybrid Automata: HyTech 11
  • 12. Case Study 1: Urban Flood Management n sites in a city with • Water channels between (some of) the sites; some site(s) drain water out of the system • Floodgates that open into the water channels along with actuators to operate them • Sensors that detect (i) the present water level and (ii) the rate of increase of the water level • A central control room that obtains the sensor data and decides how to operate the floodgates We need to know how to operate the floodgates to prevent flooding 12
  • 13. Examples: Tokyo Flood Management System G-CAN Tokyo Flood Management System Source: Internet 13
  • 14. “Graph”ically • n sites represented by the vertices of a directed acyclic graph • Lower and Upper limits (li and ui ) of water level Li for every site i • If there exists a water channel from site i to j , there is a directed edge (i, j) in the directed graph and a floodgate gij at i • A delay associated with each gate 14
  • 15. The problem • A Floodgate Configuration: A bit string B with one bit for each floodgate that can take values “C” or “O” as follows: “C” if the corresponding floodgate is open and “O” otherwise.‘ • A strategy: A transition function that takes as input the current floodgate configuration, sensor data and outputs the next configuration. Problem: Figure out if a given strategy for floodgate management is “safe”: i.e., the water levels always remain within safe limits at all sites. 15
  • 16. The Hybrid Automaton Two types of discrete locations: One type for configurations and one type for delays. For a given configuration C: • Invariants: li ≤ L ≤ ui ∀i • Flow Conditions: dLi /dt = ri + i gij − j gij • Jump conditions: depends on strategy! For locations corresponding to delay, there is a clock variable: • Invariants: clock should not exceed 2 units • Flow conditions: the clock variable rises with slope 1 16
  • 17. An Example Mode Two sites, site 2 drains into river • Label: OC • Flow Conditions: ˙ – L1 = R1 − I12 – ˙ L2 = R2 + I12 • Invariants: – l1 ≤ L1 ≤ u1 – l2 ≤ L2 ≤ u2 – Example Jump Conditions: – If L1 falls below 5, goto Label “delayCC” 17
  • 18. – If L2 rises above 10, goto Label “delayOO” • Label: delayOC – Flow Conditions: same as OC and clock variable starts – Invariants: clock variable has value less than T seconds – Jump Condition: When the clock variable equals T , goto Label “CC” Safety requirement: The water levels are safe at all sites in the city 18
  • 19. The Architecture of the Tool HyTech Strategy as Feedback HyTech File Floodgate Management System Current Water Levels, Actuator Commands Current Rate of Rise for Opening/Closing Sensor Network Floodgates 19
  • 20. Ongoing Work • One HA for each site, compose using synchronization labels. Saves state space! Easier to handle! Future Directions • General city topology (i.e. DAGs that are not line graphs) • Synthesis of the necessary and sufficient conditions for safety: Parametric Analysis 20
  • 21. Building Occupancy Modeling with Anmol Kohli 21
  • 22. Why?! • Energy expenditure and appliance requirement of a building is proportional to ocupancy. • Need to justify deployment of smart energy management systems. (akin to safety!) • To estimate the number and capacity of environment/lighting control appliances 22
  • 23. Typical questions • For what fraction of time would the occupation of a room be – ≤ (say) 20%? – ≥ (say) 80%? • What is the peak occupancy? • Etc. 23
  • 24. Existing work • Has attracted a lot of interest in recent times • Single rooms [WFR05] • Household occupancy [RTI08] • Agent based modeling [JRMS08] • Agent based + graphical models [LB10] • Specific cases and/or complex approaches! Scope for generalization and simplification! 24
  • 25. Stochastic Modeling of Building Occupancy • A building consists of some (say three) rooms interconnected by corridors • People arrive at a building in a Poisson fashion at a rate that depends on time of the day (TOD). • Each person goes to one of the rooms according to a distribution that again depends on TOD. • People exit each room according to an exponential distribution with rate that depends on TOD. • Each person that exits has a destination according to some probability distribution. • All parameters to be learned from real data. 25
  • 26. Building topology µ 1( t) 1 p (t) o1 2 µ 2( t) λ (t) p o2 (t) p (t) o3 3 µ 3( t) 26
  • 27. Simulation parameters Hours 1 2 3 4 5 6 7 8 9 10 λ 10 10 1 1 1 10 1 1 1 1 µ’s 0 1 1 1 20 1 1 1 10 10 Example exit distribution: Out of Room 1, at lunch break and end of day: 0.95 go out, 0.2 and 0.3 to rooms 1 and 2 At all other times, 0.2 go out, 0.4 each to rooms 2 and 3. • Each room maximum capacity assumed to be 150. 27
  • 28. Room 1 population plot 100 80 60 population 40 20 0 0 10 20 30 40 50 60 time 28
  • 29. Room 2 population plot 100 80 60 population 40 20 0 0 10 20 30 40 50 60 time 29
  • 30. Room 3 population plot 25 20 population 15 10 5 0 0 10 20 30 40 50 60 time 30
  • 31. One room building 80 60 population 40 20 0 0 10 20 30 40 50 60 time 31
  • 32. Rajalakshmi et. al. @ IITH 32
  • 33. Future Work • Generalize the model including, e.g., corridor delays • Learn/correlate with experiments ongoing at IITH • A tool for building occupancy, incorporating various models • Can be used for the new IITH campus? 33