Cardiac Excitation-Conduction Modeling using MATLAB...
Transcript of Cardiac Excitation-Conduction Modeling using MATLAB...
Proc. of Microelectronics & Nanotechnology (2014) Received 2 July 2013; accepted 7 October 2013
1
Cardiac Excitation-Conduction Modeling using
MATLAB/Simulink for Real Time FPGA Implementation
Nur Atiqah Binti Adon1, Farhanahani Binti Mahmud2
1 2 Department of Electronic Engineering,
Faculty of Electric and Electrical Engineering, Universiti Tun Hussein Onn Malaysia,
86400 Parit Raja, Batu Pahat, Johor, MALAYSIA.
1. Introduction Electrical excitations of cardiac cell membranes
and their propagation in the heart tissue control the
mechanical contractions of the cells through the cardiac
excitation-contraction (E-C) coupling mechanism, leading to coordinated contractions of the heart to pump
blood. The excitation event is finely controlled by
influx and efflux of transmembrane currents through
various types of ion channels permeable to specific
kinds of ions. Cardiac excitation involves generation of
the action potential (AP) by individual cells and its
conduction from cell-to-cell through intercellular gap
junctions. The cardiac excitation can be characterized
by an AP, where the AP is generally has five phases. In
general terms, excitation of a cardiac cell is brought
about by the change in potential across the cell
membrane, due to transmembrane fluxes of various
charged ions (𝑁𝑎+, 𝐾+,𝐶𝑎2+, 𝐶𝑙−, etc) [1]. In a normal dynamics of the heart, the electrical
excitation wave dies when it reaches a complete
activation of myocardium because of a refractoriness
effect of the cardiac tissue that has excited before.
Although most hearts can disrupt the mechanical
functioning of the heart, disturbing the coordinated
contraction of the myocardium and preventing the heart
from supplying sufficient blood to the body. This is
known as a cardiac arrhythmia. Arrhythmias caused by
abnormalities in conduction are often the result of
reentrant excitation. Reentry occurs when previously
activated tissue is repeatedly activated by the
propagating AP wave as it reenters the same anatomical
region and reactivates it. Reactivation occurs
indefinitely until the excitability of the tissue in the
reentrant circuit somehow affected [2].
In recent years, experimental researches and clinical purposes on the membrane potential and the AP
have made it possible to reveal the underlying
mechanisms in the electrical state of the heart.
Although both of studies mechanisms are generally
preferable, investigating the cardiac electrical behavior
experimentally poses a number of challenges, such as a
limitation on quantity of variables for monitoring or
deprivation of high-resolution data in investigating
larger preparations [3]. On the other hand,
mathematical modeling techniques for a computer
simulation of cardiac electrical behavior are not associated with such complications.
The mathematical modeling in excitable media is
pioneered by Hodgkin and Huxley, who formulated a
mathematical description of AP generation in the giant
Abstract: The paper will discuss the development of an FPGA-based implementation of hardware model for the
electrical excitation of a cardiac cell based on FitzHugh-Nagumo (FHN) mathematical model. The FHN model is described by a set of nonlinear Ordinary Differential Equations (ODEs) that include two dynamic state variables for
describing the excitation and the recovery states of a cardiac cell and the model is able to reproduce many
characteristics of electrical excitation in cardiac tissues. The electrical excitation of the cells and their propagation in
the heart tissue provides a basic of the physiological function of the heart through the cardiac excitation-contraction
(E-C) mechanism. One way to understand normal and abnormal dynamics of the heart is to develop a
comprehensive mathematical model of the cardiac excitation in order to study underlying mechanisms of the heart
electrical system. However, simulating the dynamics of large numbers of cellular models forming a tissue model
requires an immense amount of computational time. Our intention in this present study is to perform real-time
simulations of the cellular excitations of the cell models using Field Programmable Gate Array (FPGA) to design a
hardware model responsible for the cellular excitations in tissue level. MATLAB models can be used for hardware
design by using HDL Coder for HDL code generation. HDL Coder automates the algorithm design process, from modeling to FPGA implementation.
Keyword: FPGA-implemented hardware model, FitzHugh-Nagumo Model
Proc. of Microelectronics & Nanotechnology (2014)
2
squid axon in 1952 [4]. In the cardiac cell, starting from
the electrical excitation model of the FitzHugh-Nagumo
(FHN) model [5], the Noble Purkinje model [6], the
Beeler and Reuter [7], the Luo-Rudy ventricular model
[8, 9, 10] have been developed to represent different
regions of the heart. With the progress of technology, the computational techniques become more advance but
complicated as variables parameters in the
mathematical descriptions are increased in order to
represent the cellular processes in more detail. Thus,
tissue models consisting of a large number of single cell
models cause a drawback in the amount of
computations for the dynamic simulations of the
mechanism.
To overcome have the computational challenge,
there are studies of hardware-implemented for electrical
excitation modeling that provides valuable tools for
real-time simulations [11-19]. However, only a few studies have succeeded to design analog circuits that are
biophysically detailed and have quantitative
correspondence to a real cell. A previous study from
Farhanahani et al. [20] have provided the analog-digital
circuits of hardware-implemented cardiac excitation
model designed by using analog circuits and a dsPIC
microcontroller that could reproduce a real-time
simulation of Luo-Rudy based cardiac AP model.
However, the hybrid cell models have shown
limitations due to their power consumption and the less
suitable of the dsPIC to perform rapid calculations in performing the real-time operation.
Thus, study of an Field Programmable Gate Array
(FPGA) implemented real-time cardiac excitation
modeling will be carried out in order to solve these
problems as it is suitable for real-time applications and
has low power consumption [21]. Currently, the FPGA
technology has been advanced enough to model
complex chips with the realistic operating frequency.
Reconfigurable hardware modeling, in the form FPGAs
appears of high performance systems at an economical
price [22].
Consequently, FPGAs seem an ideal candidate to utilize and exploit their inherent advantages such as
special low power consumption, millions of bit-level
operations and extremely sophisticated tools to be used
in this time [23]. Here, we focus on the FHN model, the
Ordinary Differential Equation (ODE) model of cardiac
cell for the AP generation in a mammalian cardiac
ventricle. In this study, HDL Coder in MATLAB will
be used to automate the algorithm design process, from
modeling to FPGA implementation.
The rest of the paper is organized as follows. In
Sec. 2, numerical model of FHN which is the base method in developing the model is explained. In Sec. 3,
details on a method of a cable model in performing the
AP conduction are described. In Sec. 4 details of
method for HDL Code generation from Simulink and
MATLAB code are described. In Sec. 5, result and
analysis were discussed from the numerical simulation
of the FHN model. Summary of the paper is lastly
inferred in Sec. 6.
2. FitzHugh-Nagumo (FHN) Model Many models have been proposed to simulate the
cardiac action potential (AP). Numerical models of
cardiac cell are widely used related with reentrant
arrhythmia to investigate the underlying dynamics of
reentrant wave. Basically, these electrophysiology of
isolated cardiac cell models are coupled together to
perform simulations of AP propagation in the cardiac tissue.
FHN equations are a simplified version of the
Hodgkin-Huxley (HH) model that, presents some of the
essential features of HH’s equations and it is more
convenient for a controller design process [24]. The
FHN model can be used to model the cardiac cells
transmembrane potential. Each cell in the heart
conduction system has an individual set of parameters
with a specific AP representing the cell location and
role within the cardiac structure.
Equations (1) and (2) show the ODEs for the FHN model to simulate the AP.
𝜕𝑉
𝜕𝑡= −𝑉(𝑉 − 0.139)(𝑉 − 1) − 𝑊 + 𝐼 + 𝐷
𝜕2𝑉
𝜕𝑥2 (1)
𝜕𝑊
𝜕𝑡= 0.008(𝑉 − 2.54𝑊) (2)
Here, V is a membrane voltage, W is a refractory period,
D is a diffusion coefficient, I is a time and space
dependent injected current [25].
3. An Active Circuit Cable Model Cardiac contraction is initiated by propagating
electrical waves of excitation. The spread of excitation
in the heart occurs due to excitability of individual
cardiac cells and due to close electrical coupling of
cardiac cells via gap junctions, thereby allowing propagation of these electrical excitations from cell to
cell in tissue [26]. Propagation of action potentials in an
excitable tissue is often modeled by using significantly
simplified quantitative method that can be represented
by the one dimensional (1D) cable model. To describe
wave propagation in cardiac tissue, it is necessary to
specify the currents resulting from the intercellular
coupling, which can usually be approximated by a
differential in equation (3).
𝜕𝑉𝑚
𝜕𝑡= 𝐷(𝛻2𝑉𝑚) −
𝐼𝑚
𝐶𝑚
(3)
Proc. of Microelectronics & Nanotechnology (2014)
3
Where 𝑉𝑚 is the cardiac cell membrane voltage, 𝐷 is
the conductivity tensor, 𝐶𝑚 is the membrane
capacitance and 𝐼𝑚 is transmembrane ionic current
specified by FHN model. According this equation, the cable model of the 1D
ring consists of N cell models can be illustrated as
shown Fig. 1, where a gap junction resistance, R is
corresponded to 1/D. In this study, the cable model of
the 1D ring with a gap junction resistance of R =
0.5kΩcm2 which is equaled to D = 2cm2/sec. The
applied value of R is considered relevant as it belongs
to the range that provides a moderate coupling and
allows a propagation of the action potential (AP).
Fig. 1 A ring-shaped active cable model. The ring
model consists of N cell models and gap junction resistance, R.
4. Methods for HDL Code Generation Programmable devices Field Programmable Gate
Arrays (FPGAs) are very important part of the
development process for almost every electronic system.
FPGA gives resources that can be configured to implement variety of arithmetic and logical functions.
Nowadays, model based development is common
practice with a wide range of specialized software tools
for modeling and simulation such as Simulink and
MATLAB code are used for designing, implementing,
and checking the functionality of new controller
functions. The quality and efficiency of the software are
strongly dependent upon the quality of the model used for
code generation.
The model based design with Simulink and
MATLAB code gives an opportunity for obtaining hardware descriptions without handwriting of Hardware
Description Language (HDL) code and by using an
automatic code generation process [27]. This can be done
by HDL Coder that supports code generation.
There are many architectures and implementation
processes made by different software packages such as
Xilinx ISE Project Navigator. This software package
gives a convenient way for simulation of different system
descriptions and synthesis of electronic systems which are
described with HDL. The two most popular HDLs are
VHDL and Verilog. The simple flow design as shown in
Fig. 2.
In addition, FPGA and Application Specific
Integrated Circuit (ASIC) designs can be used for HDL
Coder and HDL Verifier to specify and explore functional
behavior, generate HDL code for implementation, and continuously test and verify your design through co-
simulation with HDL simulators or FPGA-in-the-loop.
Fig. 2 FPGA and ASIC design with HDL Coder and
HDL Verifier.
4.1 HDL Code Generation for Simulink Simulink HDL Coder automates the algorithm design
process, from modeling to FPGA implementation.
Simulink HDL Coder can control HDL architecture,
implementation and generate hardware resource utilization reports. For automatic generation of hardware
description and FPGA implementation the model have to
be realized with blocks from the library hdlsupported.
HDL code generation process starts by modeling the
algorithm in Simulink more than 200 blocks. This library
provides complex functions, such as the Fast Fourier
Transform (FFT), Cascaded Integrator Comb (CIC)
filters, and Finite Impulse Response (FIR) filters. Finally,
to model the signal processing and communications
systems and generating HDL code.
4.2 HDL Code Generation for MATLAB
code The HDL Coder automatically converts MATLAB
code from floating-point to fixed-point and generates
synthesizable VHDL and Verilog code. This capability
lets algorithm at a high level using abstract MATLAB
constructs and system objects while providing options for
generating HDL code that is optimized for hardware
implementation. The process of translating MATLAB
designs to hardware consists of the several steps involves
model the algorithm in MATLAB, generate HDL code,
verify HDL code and create and verify FPGA prototype.
Proc. of Microelectronics & Nanotechnology (2014)
4
5. Results And Analysis
5.1 Simulink Method
The FHN model of an action potential (AP)
generation has been built by blocks from the Simulink
library. The model for a single cell is shown in Fig. 3.
Fig. 3 The FHN model of single cell in Simulink model.
The AP and the recovery state waveforms of single
cell produced by the FHN model are shown in the Fig. 4.
The waveform of membrane potential and recovery
variable varying against time by the FHN model based numerical cardiac excitation in single cell are as shown in
Fig. 4(a) and Fig. 4(b), respectively.
(a)
(b)
Fig. 4 The AP and recovery state waveforms of single cell
produced by the FHN model. (a) and (b) represent the
time variance of membrane potential and the time
variance of recovery variable, respectively.
The AP conduction model of three FHN cells
connected in 1D ring cable model has also been built
using the Simulink as shown in Fig. 5.
Fig. 5 Three membrane cells in Simulink model.
Proc. of Microelectronics & Nanotechnology (2014)
5
The AP and recovery state waveforms of three FHN
cells connected in 1D ring cable model is shown in the
Fig. 6. The AP conduction around the closed ring active
circuit cable consists of three FHN cell models has been
performed. The waveforms overlapped because of the
small value diffusion coefficient.
(a)
(b)
Fig. 6 The AP and recovery state waveforms of three
FHN cells connected in 1D ring cable model. (a) and (b)
represent the time variance of membrane potential and the
time variance of recovery variable, respectively.
5.2 MATLAB code method In this project, a simulation of an anatomical circus
reentry around the closed ring cable consists of eighty
cells of the FHN model has been performed. It is known
that the reentry occurs because the present of
unidirectional conduction block of conducting action
potentials and excitable gap. Unidirectional block occurs
when an action potential (AP) wave-front fails to
propagate in one particular direction, but can continue to propagate in other directions. Here an unidirectional block
was induced by using the so called S1-S2 protocol [28]
where single or several impulsive stimulations referred to
as S1 were applied at a given location of the ring, and
then another impulsive stimulation referred to as S2 was
applied at a different location from the S1 site in a
particular time.
As shown in Fig. 7, two S1 stimulations were applied
to the ring at the first cell at time t = 100 ms and t = 250
ms, pacing the excitation of the medium. Each stimulus
evokes excitation at the stimulated site, generating two
conducting action potentials. The S2, corresponding to an
ectopic focus excitation in the real heart, was then applied
at a position slightly away from the S1 site at an
appropriate time interval after the second application of
S1. For the result, S2 was applied at the fifteenth cell at t = 460 ms, where the time interval of S1 and S2 was 110
ms after the S1 stimulation. Since the action potentials
generated by the S1 were annihilated eventually, the
single AP generated by the S2 alone was left, initiating
the circus movement reentrant wave. According to the
result, after around 1070 ms of reentrant propagation, S3
stimulation was applied at the fifteenth cell caused the
termination of the reentrant wave.
Fig. 7 A space-time diagram showing membrane
voltage as a function of time and position around the
ring-shaped cable presented by numerical model of the
FHN.
6. Summary This paper described a Simulink model and
MATLAB code can be automated from modeling to Field
Programmable Gate Array (FPGA) implementation using
HDL Coder. The coder generates VHDL or Verilog code
that implements the design embodied in the model. In this
paper, the simulations of cardiac action potential (AP) and
conduction based on the FHN model using the Simulink
blocks and MATLAB scripts have been carried out. The
simulation of the reentrant propagation of the FHN cells
in 1D ring-shaped cable model also has been performed.
From this study, we are concerned that the implementation for real time cardiac excitation modeling
using FPGA/MATLAB could be one of alternative tools
far better understanding the mechanisms of reentry.
Proc. of Microelectronics & Nanotechnology (2014)
6
Acknowledgement This research is supported by the Fundamental
Research Grant Scheme (FRGS) by Universiti Tun
Hussein Onn Malaysia (vote no. 1053), UTHM. The
author gratefully acknowledges the support and advice of
Dr. Farhanahani Binti Mahmud, UTHM.
References [1] Nash M.P. and Panfilov A.V. Electromechanical
Model of Excitable Tissue to Study Reentrant
Cardiac Arrhythmias. Biophysics and Molecular
Biology, Vol 85 (2004): 501–522.
[2] Mark T.K. and Michael C.S. Molecular and Cellular
Mechanisms of Cardiac Arrhythmias. Cell Press,
Vol 104 (February 2001): 569–580.
[3] Mahmud F. Real-Time Simulation of Cardiac
Excitation Using Hardware-Implemented Cardiac
Excitation Modeling. International Journal of
Integrated Engineering, Vol 4, No 3: 13-18,( 2012).
[4] Hodgkin A.L. and Huxley A.F. A Quantitative Description of Membrane Current and Its
Application to Conduction and Excitation in Nerve.
J. Physiol., Vol 117 (1952): 500-544.
[5] Fitzhugh R. Thresholds and Plateaus in the
Hodgkin-Huxley Nerve Equations. J.Gen. Physiol.,
Vol 43, No 5 (1960): 867-896.
[6] Noble D. Cardiac Action Potential and Pacemaker
Potentials Based on the Hodgkin-Huxley Equations.
Nature, Vol 188 (1960): 495-497.
[7] Luo C.H. and Rudy Y. A Model of the Ventricular
Cardiac Action Potential. Depolarization, Repolarization, and Their Interaction. Circulation
Research, Vol 68, No 6 (1991): 1501-1526.
[8] Beeler G.W. and Reuter H. Reconstruction of the
Action Potential of Ventricular Myocardial Fibres. J.
Physiol., Vol 268 (1977): 177-210.
[9] Luo C.H and Rudy Y.A. Dynamic Model of the
Cardiac Ventricular Action Potential. I. Simulations
of Ionic Currents and Concentration Changes. Circ.
Res., Vol 74 (1994): 1071-1096.
[10] Luo C.H. and Rudy Y.A. Dynamic Model of the
Cardiac Ventricular Action Potential. II. After Depolarizations, Triggered Activity, and
Potentiation. Circ. Res., Vol 74 (1994): 1097-1113.
[11] Harmon L.D. Studies with Artificial Neurons, I:
Properties and Functions of an Artificial Neuron.
Kybernetik, Vol 1, No 3 (December 1961): 89-101.
[12] Nagumo J., Arimoto S. and Yoshizawa S. An Active
Pulse Transmission Line Simulating Nerve Axon.
Proceedings of the IRE, Vol 50, No 10 (October
1962): 2061 -2070.
[13] Nagumo J., Yoshizawa S. and Arimoto S. Bistable
Transmission Lines. IEEE Transactions on Circuit
Theory, Vol 12, No 3 (September 1965): 400-412.
[14] Hoshimiya N., Yoshida S., Shogen K. and Matsuo
T. Two-Terminal Electronic Circuit Neuron Model
with Excitable Membrane V–I–T Characteristics
Improvement and Application. Biol. Cybernetics,
Vol 35 (1979): 125-130.
[15] Yagi H. Special Articles on Biomedical Electronics. 1. Biological Cybernetics and Electronics (in
Japanese). Transactions of the Institute of
Electronics. Information and Communication
Engineers, Vol 75, No 9: 916-920, (1992).
BioSystems, Vol 58 (2000): 93-100.
[16] Maeda Y. and Makino H. A Pulse-Type Hardware
Neuron Model with Beating, Bursting Excitation and
Plateau Potential. BioSystems, Vol 58 (2000): 93-
100.
[17] Maeda Y., Yagi E. and Makino H. Synchronization
with Low Power Consumption of Hardware Models
of Cardiac Cells. BioSystems, Vol 79 (2005): 125-131.
[18] Sekine Y., Torita K., Matsuoka J. and Yagi E. Type
Hardware Neuron Model with CMOS IC.
Electronics and Communications in Japan, Part 2,
Vol 85, No 3 (2002): 23-29.
[19] Saeki K., Sekine Y. and Aihara K. Pulse-Type
Bursting Neuron Model using Enhancement Mode
MOSFETs. Electronics and Communications in
Japan, Part 2, Vol 85, No 11 (2002): 1-7.
[20] Mahmud F., Shiozawa N., Makikawa M. and
Nomura T. Reentrant Excitation in an Analog-Digital Hybrid Circuit Model of Cardiac Tissue.
American Institute of Physics, Chaos, Vol 21
(2011): 023121.
[21] Fasih A., Schwarzlmuller C., Chedjou C.J. and
Kyamakya K. Framework for FPGA based Real-
Time Machine. Vision Direct Convolution Versus
CNN ISAST Transactions on Electronics and Signal
Processing, Vol 1, No 4 (2010): 1-76.
[22] Das J., Lam A. and Steven J. E. Wilton. An
Analytical Model Relating FPGA Architecture to
Logic Density and Depth. IEEE Transactions on
Very Large Scale Integration (VLSI) Systems, Vol 19, No 12 (2011): 2229-2242.
[23] Sachin B. Jadhav and Nikhil N. Mane. A Novel
High Speed FPGA Architecture for FIR Filter
Design. International Journal of Reconfigurable and
Embedded Systems (IJRES), Vol 1, No 1 (2012): 1-
10.
[24] Rubin R. Aliev and Alexander V. Panfilov. A
Simple Two Variable Model of Cardiac Excitation.
Chaos Solitons and Fractals, Vol 7 (1996): 293-301.
[25] Nomura T. and Glass L. Entrainment and
Termination of Reentrant Wave Propagation in a Periodically Stimulated Ring of Excitable Media.
Physical Review E., Vol 53, No 6 (1996): 6353-
6360.
Proc. of Microelectronics & Nanotechnology (2014)
7
[26] R. Naderi, M.J. Yazdanpanah, Azemi A. and B.
Nazem R. Tracking Normal Action Potential Based
on the FHN Model Using Adaptive Feedback
Linearization Technique, (2010) 1458-1463.
[27] Lin C.H. and Lin G.W. FPGA Implementation of
Fractal Patterns Classifier for Multiple Cardiac Arrhythmias Detection. J. Biomedical Science and
Engineering, Vol 7 (2012): 120-132,.
[28] Comtois P. and Vinet A. Resetting and Annihilation
of Reentrant Activity in a Model of a Model of a
One-dimensional Loop of Ventricular Tissue. Chaos,
Vol 12, No 3 (2002): 903-922.