170 likes | 327 Views
An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata. Mike True, SUNY at Stony Brook. A Joint Work with: Emilia Entcheva Radu Grosu Scott A. Smolka Pei Ye. Excitable Cells.
E N D
An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook • A Joint Work with: • Emilia Entcheva • Radu Grosu • Scott A. Smolka • Pei Ye
Excitable Cells • Excitable cells are cells that respond to electrical stimuli with electrical signals known at the cellular level as Action Potentials (AP) • An AP is fired by an excitable cell as an all-or-nothing response to an electrical stimulus external to the cell • The sequence of events followed by an AP is for the most part independent of the magnitude of the stimulus • Examples of excitable cells found in mammals include those found in cardiac tissue and neurons
Features of Action Potentials • While the AP of excitable cells might vary greatly in duration and morphology, they generally exhibit the same major phases
Hybrid Automata Models • Differential equations are very expensive to compute directly in simulations • Redefining our model such that all of the differential equations are linear (i.e., of the form δx = ax for some constant a) results in a significant performance improvement • We propose an approach to simulation using Hybrid Automata (HA) models for cells
Hybrid Automata • In our HA models, we divide AP into four different states, namely Resting, Stimulated, Upstroke, and Plateau • The variables of each cell change with time in accordance with the set of differential equations associated with the cell’s current state • When certain conditions are met, the HA will transition from one state to another • To obtain improved performance, we add the restriction that all differential equations in all states must be linear
An Observation • A simple simulatorimplementation for our HA models can be made by using Time-step Integration techniques • This implementation can be improved after observing that the cell is non-responsive to externalinput in the Upstroke and Plateau states • We can readily solve the differential equations for these states to compute how long the cell will spend in them • This modification allows us to effectively ignore cells in these states for several thousands of time steps
An Event-Driven Model • We associate an event with each cell to represent the next time that the cell requires processing and the type of processing required • The correct ordering of events is maintained by storing events on a priority queue data structure
Types of Events • Query_Neighbor: Uses time-step integration to update the cell’s variables considering the effects of neighboring cells and external stimuli (Resting and Stimulated states) • Update_State: Requires a transition to the target state at the calculated time (Upstroke and Plateau states) • Output_To_File: Dumps voltage values to an output file • Begin/End_Stimulation: Applies/Removes stimulus currents from affected cells at the stimulus times
0 1 2 3 4 5 6 7 8 9 Event Handler Event Queue 1.000 ms 1.000 ms 6.000 ms 87.000 ms 87.010 ms 1000 ms 1000 ms 2000 ms 1.001 ms Legend: Events: Query_Neighbor Cell States: Resting (Off Queue) Update_State Resting (On Queue) Begin_Stimulation Upstroke End_Stimulation Plateau Output_To_File An Event-Driven Model Example
Priority Queue Implementation • A standard data structure for implementing a priority queue would be a min-heap, where the time of the event would be the priority • This data structure requires O(log2 n) operations for insertions and removals, creating a large amount of overhead for Query_Neighbor events • We propose a hybrid priority queue, where Query_Neighbor events are stored on two linked lists and all other events are stored on a min-heap
Performance Guarantees • With n events on the min-heap, we can expect 2*n operations (one insertion and removal) while an event is on the heap. The total work is O(n log2 n) operations. • We can assume that each event is equally responsible for 1/n of this overhead, meaning each event is “charged” with O(log2 n) units of work • Because this work is spread throughout the entire time the event is on the min-heap, the amount of work per time-step is approximately (log2 n)/s, where s is the number of time-steps the event spends on the min-heap
Performance Guarantees • For the work required per cell per time-step in the Upstroke and Plateau states to exceed 1 unit, we would need n to be equal to 2s • Since typical values for s are in the thousands, a number of cells much greater than what can be stored in a computer’s memory system is required for this to occur • In the worst case (all cells in the Resting and Stimulated states) the Time-step Integrationmodel will outperform the Event-Driven model by a small factor related to the linked list overhead
Simulation Timing Results • 400x400 Grid, 500 ms simulation (spiral wave): • Event-Driven model time: 1.7 hours • Time-step Integration model time: 9.05 hours • Speedup Factor: 5.33 • Grids of various sizes, wave started in a corner: • Speedup Factor: about 1.25 • This would be considered a “worst-case scenario” for the Event-Driven model
Future Work • “Putting cells to sleep” at resting potential, similar to the idea behind adaptive time-step techniques • Develop tools to facilitate the rapid creation of simulators for models based upon HA specifications that use Event-Driven techniques