Download The Pacmaker document

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Heart failure wikipedia , lookup

Cardiac contractility modulation wikipedia , lookup

Cardiac surgery wikipedia , lookup

Myocardial infarction wikipedia , lookup

Hypertrophic cardiomyopathy wikipedia , lookup

Electrocardiography wikipedia , lookup

Dextro-Transposition of the great arteries wikipedia , lookup

Heart arrhythmia wikipedia , lookup

Ventricular fibrillation wikipedia , lookup

Atrial fibrillation wikipedia , lookup

Arrhythmogenic right ventricular dysplasia wikipedia , lookup

Transcript
Pacemaker Model Brief Description
A cardiac Pacemaker is an implanted device that assists cardiac functions when the underlying
pathologies make the intrinsic heartbeats low. The Pacemaker runs in either a programming mode or in one of
operational modes. During programming, the programmer specifies the type of the operation mode in which the
device will work. The operation mode depends on whether the Atrium (A), Ventricle (V), or both are being
monitored or paced. The programmer also specifies whether the pacing is inhibit (I), triggered (T), or dual (D).
The first operation mode to discuss is AVI operation mode. In this mode, the Atrial portion (A) of the heart is
paced (shocked), the Ventricular portion (V) of the heart is sensed (monitored), and the Atrial is only paced
when a Ventricular sense does not occur; i.e., inhibited (I). Figure 1 shows the Pacemaker design model using a
Real-Time Object Oriented Modeling (ROOM) actor diagram. ObjecTime simulation environment is used to
implement executable models, which are necessary to validate the timing and deadline constraints and gather
simulation statistics. Actors are used in ROOM to represent the structure of the model while a ROOMchart,
which is based on statechart notation and semantics, models the behavior of each actor. Figure 2 shows the
ROOMchart for the Atrial_Model. Sequence diagrams will be used to describe several operation scenarios for
the Pacemaker: The programming mode, The AVI operation mode, The AAI operation mode, The AAT
operation mode, The VVI operation mode and The VVT operation mode.
The Pacemaker consists of the following classes:
Reed_Switch (RS): A magnetically activated switch that must be closed before programming the device.
The switch is used to avoid accidental programming by electric noise.
Coil_Driver (CD): Receives/sends pulses from/to the device programmer. These pulses are counted and
then interpreted as a bit of value zero or one. These bits are then grouped into bytes and sent to the
communication gnome. Positive and negative acknowledgments as well as programming bits are sent back to
the programmer to confirm whether the device has been correctly programmed and the commands are validated.
Figure 3 shows the ROOMChart.
Communication_Gnome (CG): Receives bytes from the coil driver, verifies these bytes as commands,
and sends the commands to the Ventricular and Atrial models. It sends the positive and negative
acknowledgments to the coil driver to verify command processing. Figure 4 shows the ROOMChart.
Ventricular_Model (VT) and Atrial_Model (AR): These two actors are similar in operation. They both
could pace the heart and/or sense heartbeats. The AVI mode is a complicated mode, as it requires coordination
between the Atrial and Ventricular models. Once the Pacemaker is programmed the magnet is removed from
the Reed_Switch. The Atrial_Model and Ventricular_Model communicate together without further intervention.
Only battery decay or some medical maintenance reasons force reprogramming.
Timing information
Timing constraints are introduced as timeouts form several timers. Timeouts control the outputs
generation and the state changes. In case of the AVI operation mode the concerned inputs are the heartbeats, the
sensed and the expected but not sensed. The expected but not sensed heartbeat is interpreted as a timeout in a
timer named V-heart. This timer is set to 100 epochs where an epoch is set to represent 10 msec. The heartbeat
is simulated at 90 epochs and the pacing timeout (a-pace = 20 epochs) allows for pacing pulse width. Refractory
timer (v-refract) is set to 30 epochs. In the Programming mode P-delay timer (1200 epochs) spaces the bits sent
from the simulated programmer on the programming port, while the coil driver (byte constructor) timers are
adjusted as follows:
Coil-Driver-bit-time = 800 epochs
Coil-Drive-byte-time = 5000 epochs
representing expected delays between bits
representing byte delimiter
Our concern is to study the behavior of the paces versus the sensed and expected but not sensed heartbeats for
all modes and assure adequate synchronization and the observability of all heartbeats to the pacemaker.
Figure 1 Actor diagram for the Pacemaker.
Figure 2 ROOMchart for Atrial_Model
Figure 3 ROOMchart for Coil Driver
Figure 4 ROOMchart for Communication Gnome
1- Sequence diagram for programming mode.
In this scenario the programmer sets the operation mode of the device. The programmer applies a magnet to
enable communication with the device, and then he sends pulses to the device, which in turn interprets these
pulses into programming bits. The device then send back the data to acknowledge valid/invalid program.
Program mer
ReedSwitch
CoilDriver
Comm unication
Gnome
Atrial
ApplyMagnet
IDLE
EnableComm
IDLE
EnableComm
ToON
ToON
Pulse
Count = 1, SetTimer
Receiving
Pulse
Count++,
ResetTimer
BitTimeout
Decode(Count)
Store Bit in Byte
Byte Full?
Waiting For
Byte
enqueue(byte)
Yes
Waiting for
Bit
Pulse
Count =0
Receiving
OR
ByteTimeOut
ByteTimeOut
Validating
IDLE
IsValid?
ToAVI
HerezaByte(ACK)
Yes
Processing
ToAVI
HerezaByte(NAK)
No
Waiting to
Transmit
Waiting to Send
Next Byte
WaitPeriodTimeOut
Transmitting
ReceivedBit
LOOP for All bits in ACK or NAK
IsDone?
DoneTransByte
Yes
IDLE
is IN(mycoil->IDLE)?
Yes
HerezaByte(Byte)
LOOP for all Bytes in the Message
IsDone?
Wait for Message
Timeout
IDLE
Ventricular
2- Sequence diagrams AVI operation
In this scenario, the Ventricular_Model monitors the heart. When a heartbeat is not sensed, the Artial_Model
paces the heart and a refractory period is then in effect.
a- Program Atrial_Molel and Ventricular_Model to AVI mode.
Communication
Gnome
Atrial
Ventricular
ToON
ToON
ToAVI
Ref actoring
Ref actoring
ToAVI
b- Sequence in case of sensing a heartbeat at the Ventricular “Got V Sense”.
Atrial
Ventricular
Heart
RefTimeOut
V Refract Done
Waiting
Waiting
Got V Sense
Reset Sense Timer
Waiting
V Sense
Heart
c- Sequence in case of not sensing a heartbeat at the Ventricular “sense timeout”.
Atrial
Ventricular
RefTimeOut
V Refract Done
Waiting
Waiting
Sense Timeout
A Pace Start
Pacing
Pacing
Pace
PaceTimeOut
A Pace Done
Refactoring
Refactoring
Heart
3- Sequence diagrams AAI operation
In this scenario, the Ventricular_Model Idle and the Artial_Model senses the heart. When a heartbeat is not
sensed, the Artial_Model paces the heart and a refractory period is then in effect.
a- Program Atrial_Molel and Ventricular_Model to AAI mode.
Communication
Gnome
Atrial
Ventricular
ToON
ToON
ToAAI
Refactoring
ToAAI
I
RefTimeOut
Waiting
b- Sequence in case of sensing a heartbeat
at the Atrial “Got A Sense”.
Got A Sense
Waiting
SensTimeOut
Pacing
A Pace Start
Pacing
Pace Pulse Width
Heart
Atrial
Ventricular
Heart
RefTimeOut
Idle
Waiting
Got A Sense
Waiting
c- Sequence in case of not sensing a heartbeat at the Atrial “sense timeout”.
Atrial
Ventricular
RefTimeOut
Heart
Idle
Waiting
SensTimeOut
Pacing
A Pace Start
Pace Timeout
Refactoring
4- Sequence diagrams AAT operation
In this scenario, the Ventricular_Model Idle and the Artial_Model senses and paces the heart. When a heartbeat
is sensed or not sensed, the Artial_Model paces the heart and a refractory period is then in effect.
a- Program Atrial_Molel and Ventricular_Model to AAT mode.
Communication
Gnome
Atrial
Ventricular
ToON
ToON
ToAAT
Ref actoring
ToAAT
Idle
Ref TimeOut
Waiting
Heart
b- Sequence in case of sensing a heartbeat at the Atrial “Got A Sense”.
Atrial
Ventricular
RefTimeOut
Waiting
Got A Sense
Pacing
A Pace Start
Pace Timeout
Refactoring
Heart
c- Sequence in case of not sensing a heartbeat at the Atrial “sense timeout”.
Atrial
Ventricular
RefTimeOut
Waiting
Sense Timeout
Pacing
A Pace Start
Pace Timeout
Refactoring
Heart