Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modelling and Analysis of Real Time Systems Kim Guldstrand Larsen UPPAAL2k using UPPAAL2k.

Similar presentations


Presentation on theme: "Modelling and Analysis of Real Time Systems Kim Guldstrand Larsen UPPAAL2k using UPPAAL2k."— Presentation transcript:

1 Modelling and Analysis of Real Time Systems Kim Guldstrand Larsen UPPAAL2k using UPPAAL2k

2 UCb Kim G. Larsen 2 Hybrid & Real Time Systems Plant Continuous Controller Program Discrete Control Theory Computer Science 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 Real Time System A system where correctness not only depends on the logical order of events but also on their timing sensors actuators Task

3 UCb Kim G. Larsen 3 Validation & Verification Construction of UPPAAL models Plant Continuous Controller Program Discrete sensors actuators Task a cb a cb a cb UPPAAL Model Model of environment (user-supplied) Model of tasks (automatic)

4 UCb Kim G. Larsen 4 The impatient CS Machine Person Observer cof coin pub Ready Wait coin! cof? pub!

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

6 UCb Kim G. Larsen 6 CSMA/CD protocol m!m?m!m?

7 UCb Kim G. Larsen 7 CSMA/CD protocol EVENTS

8 Timed Automata

9 UCb Kim G. Larsen 9 Intelligent Light Control OffLightBright press? WANT: if press is issued twice quickly then the light will get brighter; otherwise the light is turned off.

10 UCb Kim G. Larsen 10 Intelligent Light Control OffLightBright press? Solution: Add real-valued clock x X:=0 X<=3 X>3

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

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

13 UCb Kim G. Larsen 13 Timed Automata: Example guard reset-set location a action

14 UCb Kim G. Larsen 14 Timed Automata: Example a aa guard reset-set location a action

15 UCb Kim G. Larsen 15 Timed Automata: Example a Invariant

16 UCb Kim G. Larsen 16 Timed Automata: Example a aaa Invariant

17 UCb Kim G. Larsen 17

18 UCb Kim G. Larsen 18

19 UCb Kim G. Larsen 19

20 UCb Kim G. Larsen 20

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

22 UCb Kim G. Larsen 22 The UPPAAL Model = Networks of Timed Automata + Integer Variables +…. l1 l2 a! x>=2 i==3 x := 0 i:=i+4 m1 m2 a? y<=4 …………. Two-way synchronization on complementary actions. Closed Systems! Two-way synchronization on complementary actions. Closed Systems! (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,…..) 0.2 tau Example transitions If a URGENT CHANNEL

23 UPPAAL Modelling and Verification of Real Time systems UPPAAL2k > 800 users > 35 countries UPPAAL2k > 800 users > 35 countries

24 UCb Kim G. Larsen 24 yWang Yi yJohan Bengtsson yPaul Pettersson yFredrik Larsson yAlexandre David yTobias Amnell yOliver yKim G Larsen yArne Skou yPaul Pettersson yCarsten Weise yKåre J Kristoffersen yGerd Behrman yThomas Hune yOliver Möller yNicky Oliver Bodentien yLasse yDavid 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...

25 UCb Kim G. Larsen 25 LEGO Mindstorms/RCX  Sensors: temperature, light, rotation, pressure.  Actuators: motors, lamps, zVirtual machine: y10 tasks, 4 timers, 16 integers. zSeveral Programming Languages: yNotQuiteC, Mindstorm, Robotics, legOS, etc. 3 input ports 3 output ports 1 infra-red port

26 UCb Kim G. Larsen 26 First UPPAAL model Sorting of Lego Boxes Conveyer Belt Exercise: Design Controller so that only black boxes are being pushed out Boxes Piston Black red Blck Rd remove eject Controller Ken Tindell MAINPUSH

27 UCb Kim G. Larsen 27 NQC programs 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); } 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); } int active; int DELAY; int LIGHT_LEVEL; 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 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); }

28 UPPAAL Demo

29 UCb Kim G. Larsen 29 From RCX to UPPAAL zModel includes Round-Robin Scheduler. zCompilation of RCX tasks into TA models. zPresented at ECRTS 2000 Task MAIN

30 UCb Kim G. Larsen 30 The Production Cell Course at DTU, Copenhagen Production Cell

31 UCb Kim G. Larsen 31 Challenge Machine Person Observer cof coin pub Wait y<=3 Ready Wait y<=2 Go coin! y:=0 y=3 cof? y:=0 y=2 pub! Design Machine and Observer

32 UCb Kim G. Larsen 32 Train Crossing River Crossing Gate Stopable Area [10,20] [7,15] Queue [3,5]

33 UCb Kim G. Larsen 33 Case Studies: Protocols zPhilips Audio Protocol [HS’95, CAV’95, RTSS’95, CAV’96 ] zCollision-Avoidance Protocol [SPIN’95] zBounded Retransmission Protocol [TACAS’97] zBang & Olufsen Audio/Video Protocol [RTSS’97] zTDMA Protocol [PRFTS’97] zLip-Synchronization Protocol [FMICS’97] zMultimedia Streams [DSVIS’98] zATM ABR Protocol [CAV’99] zABB Fieldbus Protocol [ECRTS’2k] zIEEE 1394 Firewire Root Contention (2000)

34 UCb Kim G. Larsen 34 Case-Studies: Controllers zGearbox Controller [TACAS’98] zBang & Olufsen Power Controller [RTPS’99,FTRTFT’2k] zSIDMAR Steel Production Plant [RTCSA’99, DSVV’2k] zReal-Time RCX Control-Programs [ECRTS’2k] zExperimental Batch Plant (2000) zRCX Production Cell (2000)


Download ppt "Modelling and Analysis of Real Time Systems Kim Guldstrand Larsen UPPAAL2k using UPPAAL2k."

Similar presentations


Ads by Google