1 / 34

Modelling and Analysis of Real Time Systems Kim Guldstrand Larsen

Modelling and Analysis of Real Time Systems Kim Guldstrand Larsen. using UPPAAL2k. Hybrid & Real Time Systems. Computer Science. Control Theory. sensors. Task. Task. Task. Task. actuators. Controller Program Discrete. Plant Continuous. Eg.:. Pump Control Air Bags Robots

devon
Download Presentation

Modelling and Analysis of Real Time Systems Kim Guldstrand Larsen

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. Modelling and Analysis of Real Time SystemsKim Guldstrand Larsen using UPPAAL2k

  2. Hybrid & Real Time Systems Computer Science Control Theory sensors Task Task Task Task actuators Controller Program Discrete Plant Continuous Eg.: Pump Control Air Bags Robots Cruise Control ABS CD Players Production Lines Real Time System A system where correctness not only depends on the logical order of events but also on their timing

  3. a a a 1 1 1 1 2 2 2 2 b b b c c c 3 3 3 3 4 4 4 4 Validation & VerificationConstruction of UPPAAL models Controller Program Discrete Plant Continuous sensors Task Task Task Model of tasks (automatic) Task actuators Model of environment (user-supplied) UPPAAL Model

  4. The impatient CS Person Machine Observer coin! cof pub! pub coin Ready cof? Wait

  5. The impatient CS Person Machine Observer coin! cof T:=8 pub! pub coin Ready to(T) cof? Wait Error

  6. CSMA/CD protocol m! m? m! m?

  7. CSMA/CD protocol EVENTS

  8. Timed Automata

  9. Intelligent Light Control press? Off Light Bright press? press? press? WANT: if press is issued twice quickly then the light will get brighter; otherwise the light is turned off.

  10. Intelligent Light Control press? X<=3 Off Light Bright X:=0 press? press? press? X>3 Solution: Add real-valued clock x

  11. Timed Automata Alur & Dill 1990 Clocks:x, y Guard Boolean combination of integer bounds on clocks and clock-differences. n Reset Action perfomed on clocks Action used for synchronization x<=5 & y>3 State (location , x=v , y=u ) where v,u are in R a Transitions x := 0 a (n , x=2.4 , y=3.1415 ) (m , x=0 , y=3.1415 ) m e(1.1) (n , x=2.4 , y=3.1415 ) (n , x=3.5 , y=4.2415 )

  12. Timed Automata Invariants n Clocks:x, y x<=5 Transitions x<=5 & y>3 e(3.2) Location Invariants (n , x=2.4 , y=3.1415 ) a e(1.1) (n , x=2.4 , y=3.1415 ) (n , x=3.5 , y=4.2415 ) x := 0 m Invariants ensure progress!! y<=10 g4 g1 g3 g2

  13. Timed Automata: Example guard location a action reset-set

  14. Timed Automata: Example guard location a a a a action reset-set

  15. Timed Automata: Example a Invariant

  16. Timed Automata: Example a a a a Invariant

  17. Parallel Composition (a’la CCS) m1 l1 Two-way synchronization on complementary actions. Closed Systems! x>=2 y<=4 …………. a! a? x := 0 l2 m2 Example transitions (l1, m1,………, x=2, y=3.5,…..) (l2,m2,……..,x=0, y=3.5, …..) (l1,m1,………,x=2.2, y=3.7, …..) tau 0.2 If aURGENT CHANNEL

  18. The UPPAAL Model= Networks of Timed Automata + Integer Variables +…. m1 l1 Two-way synchronization on complementary actions. Closed Systems! x>=2 i==3 y<=4 …………. a! a? x := 0 i:=i+4 l2 m2 Example transitions (l1, m1,………, x=2, y=3.5, i=3,…..) (l2,m2,……..,x=0, y=3.5, i=7,…..) (l1,m1,………,x=2.2, y=3.7, I=3,…..) tau 0.2 If aURGENT CHANNEL

  19. www.uppaal.com UPPAAL Modelling and Verification ofReal Timesystems UPPAAL2k > 800 users > 35 countries

  20. @UPPsala Wang Yi Johan Bengtsson Paul Pettersson Fredrik Larsson Alexandre David Tobias Amnell Oliver Möller @AALborg Kim G Larsen Arne Skou Paul Pettersson Carsten Weise Kåre J Kristoffersen Gerd Behrman Thomas Hune Oliver Möller Nicky Oliver Bodentien Lasse Poulsen Collaborators @Elsewhere • David Griffioen, Ansgar Fehnker, Frits Vandraager, Klaus Havelund, Theo Ruys, Pedro D’Argenio, J-P Katoen, J. Tretmans,Judi Romijn, Ed Brinksma,Franck Cassez, Magnus Lindahl, Francois Laroussinie, Patricia Bouyer, Augusto Burgueno, H. Bowmann, D. Latella, M. Massink, G. Faconti, Kristina Lundqvist, Lars Asplund, Justin Pearson...

  21. LEGO Mindstorms/RCX • Sensors: temperature, light, rotation, pressure. • Actuators: motors, lamps, • Virtual machine: • 10 tasks, 4 timers, 16 integers. • Several Programming Languages: • NotQuiteC, Mindstorm, Robotics, legOS, etc. 3 output ports 1 infra-red port 3 input ports

  22. First UPPAAL modelSorting of Lego Boxes Ken Tindell Piston Boxes eject remove 99 Conveyer Belt red 81 18 90 9 Blck Rd Controller MAIN PUSH Black Exercise: Design Controller so that only black boxes are being pushed out

  23. NQC programs int active; int DELAY; int LIGHT_LEVEL; task MAIN{ DELAY=75; LIGHT_LEVEL=35; active=0; Sensor(IN_1, IN_LIGHT); Fwd(OUT_A,1); Display(1); start PUSH; while(true){ wait(IN_1<=LIGHT_LEVEL); ClearTimer(1); active=1; PlaySound(1); wait(IN_1>LIGHT_LEVEL); } } task PUSH{ while(true){ wait(Timer(1)>DELAY && active==1); active=0; Rev(OUT_C,1); Sleep(8); Fwd(OUT_C,1); Sleep(12); Off(OUT_C); } }

  24. UPPAAL Demo

  25. From RCX to UPPAAL Task MAIN • Model includes Round-Robin Scheduler. • Compilation of RCX tasks into TA models. • Presented at ECRTS 2000

  26. The Production CellCourse at DTU, Copenhagen Production Cell

  27. Challenge Person Machine Observer coin! y:=0 pub! cof Wait y<=3 pub Go y=3 coin Ready cof? y:=0 y=2 Wait y<=2 DesignMachine andObserver

  28. Train Crossing Stopable Area [10,20] [7,15] [3,5] Crossing River Queue Gate

  29. Case Studies: Protocols • Philips Audio Protocol [HS’95, CAV’95, RTSS’95, CAV’96] • Collision-Avoidance Protocol [SPIN’95] • Bounded Retransmission Protocol [TACAS’97] • Bang & Olufsen Audio/Video Protocol [RTSS’97] • TDMA Protocol [PRFTS’97] • Lip-Synchronization Protocol [FMICS’97] • Multimedia Streams [DSVIS’98] • ATM ABR Protocol [CAV’99] • ABB Fieldbus Protocol [ECRTS’2k] • IEEE 1394 Firewire Root Contention (2000)

  30. Case-Studies: Controllers • Gearbox Controller [TACAS’98] • Bang & Olufsen Power Controller [RTPS’99,FTRTFT’2k] • SIDMAR Steel Production Plant [RTCSA’99, DSVV’2k] • Real-Time RCX Control-Programs [ECRTS’2k] • Experimental Batch Plant (2000) • RCX Production Cell (2000)

More Related