Automata for Real-time Systems
- B. Srivathsan
Chennai Mathematical Institute
1/26
Automata for Real-time Systems B. Srivathsan Chennai Mathematical - - PowerPoint PPT Presentation
Automata for Real-time Systems B. Srivathsan Chennai Mathematical Institute 1/26 In this lecture An academic case-study that investigates methods to build more reliable pacemakers 2/26 Lecture 10: Towards reliable pacemakers 3/26 References
Chennai Mathematical Institute
1/26
2/26
3/26
Modeling and verification of a dual chamber implantable pacemaker
Jiang, Pajic, Moarref, Alur, Mangharam. TACAS’12
Heart-on-a-chip: A closed-loop testing platform for implantable pacemakers
Jiang, Radhakrishnan, Sampath, Sarode, Mangharam. 2013 mlab.seas.upenn.edu
4/26
Presentation of Zhihao Jiang (U Penn)
5/26
6/26
Killed by Code: Software Transparency in Implantable Medical Devices
Karen Sandler, Lysandra Ohrstrom, Laura Moy, Robert McVay 6/26
◮ Model-based system/software design ◮ Closed-loop testing
7/26
Heart automaton Pacemaker automaton Simulink model Simulink model Heart on chip Pacemaker UPPAAL Simulink Testbench Verification Simulation Conformance testing
UPP2SF tool Code generation (Simulink is a commercial tool developed by Mathworks Inc.)
8/26
Heart ¡on ¡FPGA Boston ¡Scientific Pacemaker Analog ¡Interface
Heart on chip Pacemaker
Testbench Conformance testing
9/26
10/26
11/26
Abstract electrical conduction system of heart into nodes and paths
Picture credits: A Simulink hybrid heart model for quantitative verification of cardiac pacemakers Chen et. al. HSCC’13
12/26
Refractory Time
Vout
ERP RRP Rest Rest Cond ERP RRP Rest Rest
Cond RRP t<=Trrp_max ERP t<=Terp_max temp Rest t<=Trest_max t>Trest_min t=0 Act_node? t=0 t>Trrp_min t=0 t>Terp_min t=0 Act_path! Act_node? t=0
Cond Confmict t<=1 Double t1+t2<=Tcond_max Ante t1<=Tcond_max Retro t2<=Tcond_max Idle t1+t2>Tcond_min Act_node_1? Act_node_2? t>1 t1>Tcond_min Act_node_2! t2>Tcond_min Act_node_1! Act_path_2? t2=0 Act_path_1? t1=0
Node Path Parameters Trest_max, Trrp_min, etc. chosen acc. to node placement and patient history
13/26
Ni Node automaton Pi Path automaton k Number of nodes to which heart is abstracted || Parallel composition (asynchronous product construction)
14/26
15/26
Heart
Pacemaker
Aget ! Vget ! VP ! AP !
1 2 3
N1 node at atrial lead N2 node at ventricular lead
16/26
1 2 3
17/26
PVARP Aget? VS? VP? AS! AR! LRI AS? VS? VP? AP! AVI AS? VS? VP? VP! VS? URI VP? VRP Vget? VS! VP? (a) LRI component (b) AVI component (c) URI component (d) PVARP component (e) VRP component
Pacemaker automaton P: LRI || AVI || URI || PVARP || VRP
18/26
19/26
20/26
Slides of Zhihao Jiang
21/26
◮ ELT-detection: If VP-AS pattern within 500ms for at least 8 times ◮ ELT-termination: Increase PVARP to 500ms once
2 1 3
1 VPAS 2 ELTct 3 PVARP’
Pacemaker P1: LRI || AVI || URI || PVARP′ || VRP || ELTct || VPAS
22/26
Question 1: Are 2 ventricular events within time?
secV wait_2nd wait_1st t=0 VP? Vget? VP? t=0 Vget? t=0 (a) Monitor PLRI test
Check in UPPAAL if in H || P1 || PLRItest, all paths satisfy PLRItest.t ≤ TLRI
23/26
Question 2: Are 2 ventricular events very fast?
secV wait_vp wait_v Vget? t=0 t=0 VP? Vget? t=0 VP? t=0 (b) Monitor PURI test
Check in UPPAAL if in H || P1 || PURItest, all paths satisfy PURItest.t ≥ TURI
24/26
Each time new algorithm is added, model it and check if basic safety properties are satisfied
25/26
◮ Model-based system/software design ◮ Closed-loop testing
26/26