1166
IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 46, NO. 9, SEPTEMBER 1999
An Advanced Algorithm for Solving Partial Differential Equation in Cardiac Conduction
very small to keep the numerical stability and accuracy. To advance the integration efficiency, we apply the operator splitting and adaptive time step methods to integrate (1)–(3), which we outline in detail below. Consider a differential equation
Zhilin Qu* and Alan Garfinkel
Abstract— An advanced integration method for solving reactiondiffusion-type equations for cardiac conduction is suggested. Operator splitting and adaptive time step methods were used in this method, which can significantly speed up integration while preserving accuracy. Index Terms—Cardiac conduction, partial differential equation (PDE).
I. INTRODUCTION Numerical simulation of wave processes in cardiac tissue requires large spatial arrays and small time steps because of the space and time constants inherent in the dynamics. In general, the cardiac action potential has an extremely fast upstroke (depolarization) and very slow recovery (repolarization) phase [1]–[7]. Adaptive time step methods were widely used to integrate the differential equations for a single cell, but few studies attempt this in an array of coupled cells. Most studies [8]–[12] used the simple forward Euler method to integrate the partial differential equations (PDE) using a very small time step to keep numerical stability and accuracy. This makes the computation very slow. In this study, we will provide an advanced algorithm to integrate PDE’s for cardiac conduction, which speeds up the simulation without losing accuracy. The basic techniques we used are operator splitting and adaptive time step methods.
dV=dt = (01 + 02 )V where 01 and 02 are two differential operators. From we can integrate (4) approximately as V (t + 1T ) = e(0 +0 )1T V (t)
where V is the local membrane potential, C is membrane capacitance, D is the diffusion coefficient related to gap junctions between cells, Iion is the total ionic current density which is a function of voltage V , gating variables Y1 ; . . . ; Yi ; . . . ; YM , and ion concentrations Z1 ; . . . ; Zi ; . . . ; ZN . In general, the gating variables Yi satisfy the following type of ordinary differential equation [1]–[7]:
dYi =dt = i (1 0 Yi ) 0 i Yi
(2)
where i and i are rate constants and are solely voltage-dependent functions. The ion concentrations Zi satisfy another set of ordinary differential equations [4]–[7]
dZi =dt = fi IZ ; V; Zi
(3)
where IZ is the Zi -related ionic current. To integrate (1)–(3) using the conventional forward Euler method requires the time step to be Manuscript received May 29, 1998; revised April 30, 1999. This work was supported by the National Institutes of Health (NIH) SCOR in Sudden Cardiac Death under Grant P50 HL52319. The work of Z. Qu was supported by a Fellowship from the American Heart Association, Greater Los Angeles Affiliate. Asterisk indicates corresponding author. *Z. Qu is with the Department of Medicine (Cardiology), University of California, MacDonald Research Laboratory building, 675 Circle Dr. South, room 3645, Los Angeles, CA 90095-1760 USA (e-mail:
[email protected]). A. Garfinkel is with the Departments of Medicine (Cardiology) and Physiological Science, University of California, Los Angeles, CA 90095-1769 USA. Publisher Item Identifier S 0018-9294(99)06811-1.
(5)
1T 3
(6)
This is called operator splitting method [13], [14]. To apply this method to integrate (1)–(3), we choose 01 as the operator associated with the nondiffusion part and 02 as the operator associated with the diffusion part. We then proceed as follows. Step 1) Use the result at time t as the initial condition to integrate the following PDE:
@V=@t = r 1 (DrV )
for a step length
1T=2
(7)
which corresponds to applying the operator e0 1T =2 to V (t) in (6). Step 2) Use the results of Step I as the initial condition to integrate the following ordinary differential equations (ODE’s) from (1)–(3):
dV=dt = 0Iion =C; dYi =dt = i (1 0 Yi ) 0 i Yi ; i = 1; . . . ; M; dZi =dt = Fi IZ ; V; Z i = 1; . . . ; N; for a time step 1T;
II. ALGORITHM
(1)
t to t + 1T ,
which can be further approximated as V (t + 1T ) = e0 1T =2 e0 1T e0 1T =2 V (t) + O
Cells are connected by gap junctions in cardiac tissue. In a monodomain model, conduction is described by the reaction-diffusion-like cable equation [8]–[12]
@V=@t = 0Iion =C + r 1 (DrV )
(4)
(8)
which is equivalent to applying the operator e0 1T to the term e0 1T =2 V (t) in (6), plus the integration of all the other ordinary differential equations in the process. Step 3) Using the results of Step II as the initial condition, we again integrate the PDE
@V=@t = r 1 (DrV )
for a time step
1T=2
(9)
which is equivalent to applying the operator e0 1T =2 to the term e0 1T [e0 1T =2 V (t)] in (6). This step completes the integration in the interval [t; t + 1T ] and we obtain the result at t + 1T . Practically, Step I and Step III can be combined into one step, except for the first step and the last step of the whole integration epoch. Here we refer to the combination of Steps I and III as Step B and to Step II as Step A. Thus the integration is performed alternately between Step A and Step B, except for the first step and the last step of the whole integration epoch. In Step A, we solve a set of ODE’s for independent cells, while in Step B we solve the simplest diffusion equation. Actually, the main load of the integration of this system is in integrating the ODE’s of gating variables and the ionic concentrations. The advantage of the splitting method outlined above is that it allows us to integrate the ODE’s in Step A adaptively, which can save a lot of computation time without losing accuracy. In Step A, we integrate the ODE’s of the gating variables by the algorithm by Rush and Larsen [15]. This method is based on the
0018–9294/99$10.00 1999 IEEE
IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 46, NO. 9, SEPTEMBER 1999
Fig. 1. (a) Voltage V versus x in a 120 cm cable of cardiac cells, (b) CPU time versus T , (c) CV versus T , and (d) APD versus T . Filled circles are for the splitting method and open circles are for the simple forward Euler cm. method. Spatial step is x :
1
1 1 = 0 02
1
observation that the equations for the gating variables can be viewed as linear equations if we assume that the coefficients and change slowly. Hence the equations can be solved analytically as negative exponentials. For the rest of the ODE’s we can either utilize the Euler method or the Runge–Kutta method. The adaptive time steps we choose are as follows: t T=k; k ; ; K , where k and K are integers. k was chosen according to the derivative of V , for instance, k jdV=dtj ; if k < , then k ; if k > K then k K . So the minimum time step in Step A is tmin T=K and the maximum is tmax T . The reason that we choose k to be an integer is to keep Step A and Step B synchronized at t T. Practically, we need to leave a “protective zone” for the wave front to propagate safely. Even if the derivative of V is small in front of the wavefront we need to use a small time step to integrate it, to keep the wavefront propagating safely. Due to the inherent features of the cardiac action potential, most of the adaptive integrations were carried out during the upstroke which is a very small portion of the whole action potential. During the slow recovery process, the time step was chosen at tmax T . For the integration in Step B, we can integrate it with the forward Euler method or multistep forward Euler method if required by numerical stability, or with an alternating direction implicit (ADI) method [14].
=
1 =1 = int( ) 1 1 =1
1
= 1 ... =1 1
=1 +1
=1
III. COMPUTER SIMULATION To demonstrate the accuracy of the method above, we stimulated action potentials unidirectionally propagating in a one-dimensional (1-D) cable model, and stimulated a spiral wave in a two-dimensional (2-D) tissue model. We used the Luo–Rudy action potential model [3] to produce the action potential, i.e., Iion in (1) is the total ionic current density of the Luo–Rudy model. For the other parameters in (1) we set: C 1 F/cm2 , D 0.001 cm2 /ms. In either 1-D or 2-D simulations, no-flux boundary conditions were used. In the simulation of the 1-D cable with our new method, in Step A we used the Rush and Larsen method [15] to integrate the ODE’s describing the gating variables, i.e., (2) or the second ODE in (8). We used the simple Euler method to integrate the other ODE’s, i.e., the first and the third in (8). We integrated Step B, i.e., (7) or (9), with the forward Euler method twice during the T interval to extend the region of numerical stability. For comparison, we also integrated (1) and (3) using the simple forward Euler method and (2) with the Rush
=
=
1
1167
Fig. 2. (a)–(c) Snapshots of clockwise rotating spiral waves. Voltage dems. (a) T : creases from white to black. Data were taken at t ms for either method, (b) T ms for the splitting method, (c) : T : ms for the direct ADI method, (d) CPU versus T , and (e) CL versus T . Filled circles are for the splitting method and open circles are for the ADI method. Note that the delay in (c) compared to (a) and (b). This is due to the prolongation of CL by numerical error. We changed some parameters of the Phase I Luo–Rudy action potential model to achieve a stable period-1 spiral wave in the tissue. The grid size is 200 200. Spatial steps are x y : cm.
1 = 01
1 = 01 1
= 500
1 = 0 02 1
2
1 = 1 = 0 015
and Larsen method. We periodically paced the left end of the cable to produce a wave train propagating to the right with a basic cycle length of 500 ms, as shown in Fig. 1(a). In simulations with our method, the minimum time step tmin was fixed to 0.01 ms and t varied between 0.01 ms to T . t was chosen as t T=k, where jdV=dtj , if dV=dt > , then k0 (to set up the k k0 “protective zone”), otherwise k0 . If k > T= tmin then k T= tmin . In simulations with the simple forward Euler method, the time step was chosen as T . The total simulation epoch was 5000 ms for each numerical experiment. Fig. 1(b)–(d) shows the CPU time, conduction velocity (CV) and action potential duration (APD) versus T for both methods. CPU times are of the same order in the two methods and decrease linearly as T increases. However, the CV in the forward Euler method had a 20% reduction when T changed from 0.01 ms to 0.12 ms, and numerical instability occurred ms. But the change in CV using the splitting when T > : method was less than 2%, even when we changed T from 0.01 ms to 0.4 ms. Note that APD was almost unchanged with T in both methods. This is because the upstroke is very short and the main contribution to APD is the slow recovery process. We also carried out simulations of spiral waves in the 2-D tissue model. In our advanced method, the ODE’s in Step A were integrated as in the 1-D cable, the PDE in Step B was integrated using the ADI method. For comparison, we also directly integrated (1)–(3) using ADI method. For both methods, we integrated the ODE’s describing the gating variables with the Rush and Larsen method [15]. The time step for our advanced method adaptively changed from 0.01 ms to T as for the 1-D cable. The time step for the ADI method was fixed at T . The simulation epoch is 500 ms for each simulation. All the simulations started with the same initial condition. Fig. 2 shows three snapshots of the spiral wave, the CPU time versus T and cycle length (CL) versus T . The CPU times used in the two methods are close for each T , but the accuracy is different. For the splitting method, the change of CL is less than 3% when T changed from 0.01 ms to 0.3 ms, but for the ADI method the change is up to 10% for the same T range. Actually, for the stable period-1 spiral
1 1 1 ) )
= + int( = int(1 1
0 =1 1
1
1
1
1 =1 =5 int(1 1
1
1
0 12
)
1
1
1
1
1
1
1
1
1
1168
IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 46, NO. 9, SEPTEMBER 1999
wave we chose, the (dV =dt)max is smaller than for the propagation in the 1-D cable shown in Fig. 1, or for the spiral wave breakup regime shown in [12]. In these cases, an even larger numerical error will occur by the conventional method due to the steeper upstroke of the action potential. IV. DISCUSSION In this paper, we suggested an advanced numerical method for integrating the PDE’s used in cardiac conduction. This method is relatively simple but very effective in solving PDE’s from physiological cardiac models. Our numerical simulation with the Phase I Luo–Rudy model showed an excellent speedup of the integration with good accuracy. More recent cardiac action potential models [4]–[7], contain more and more ODE’s relating to gating variables and ion concentrations; this method will be even more efficient than it is for the relatively simpler models. Also, because we can solve the split PDE by an explicit method, it can be easily applied to any complex anatomic structure in the cardiac tissue. In addition, it is also as easy as the simple forward Euler method for parallel computing. REFERENCES [1] D. Noble, “A modification of the Hodgkin–Huxley equations applicable to Purkinje fiber action and pacemaker potentials,” J. Physiol., vol. 160, pp. 317–352, 1962. [2] G. W. Beeler and H. Reuter, “Reconstruction of the action potential of ventricular myocardial fibers,” J. Physiol. (Lond.), vol. 268, pp. 177–210, 1977. [3] C. H. Luo and Y. Rudy, “A model of the ventricular cardiac action potential: Depolarization, repolarization, and their interaction,” Circ. Res., vol. 68, pp. 1501–1526, 1991.
[4] C. H. Luo and Y. Rudy, “A dynamical model of the cardiac ventricular action potential: I. Simulations of ionic currents and concentration changes,” Circ. Res., vol. 74, pp. 1071–1096, 1994. [5] D. S. Lindblad, C. R. Murphey, J. W. Clark, and W. R. Giles, “A model of the action potential and underlying membrane currents in an atrial cell,” Am. J. Physiol., vol. 271, pp. H1666–H1696, 1996. [6] A. Nygren, C. Fiset, L. Firek, J. W. Clark, D. S. Lindblad, R. B. Clark, and W. R. Giles, “Mathematical model of an adult human atrial cell: The role of K currents in repolarization,” Circ. Res., vol. 82, pp. 63–81, 1998. [7] M. S. Jafri, J. J. Rice, and R. L. Winslow, “Cardiac Ca2+ dynamics: The roles of ryanodine receptor adaptation and sarcoplasmic reticulum load,” Biophys. J., vol. 74, pp. 1149–1168, 1998. [8] M. Courtemanche, L. Glass, and J. P. Keener, “Instabilities of a propagating pulse in a ring of excitable media,” Phys. Rev. Lett., vol. 70, pp. 2182–2185, 1993. [9] M. Courtemanche and A. T. Winfree, “Re-entrant rotating waves in a Beeler–Reuter based model of two-dimensional cardiac conduction,” Int. J. Bif. Chaos, vol. 1, pp. 431–444, 1991. [10] I. R. Efimov, V. I. Krinsky, and J. Jalife, “Dynamics of rotating vortices in the Beeler-Reuter model of cardiac tissue,” Chaos, Solitons, Fractals, vol. 5, pp. 513–526, 1995. [11] V. N. Biktashev and A. V. Holden, “Control of reentrant activity in a model of mammalian atrial tissue,” in Proc. Roy. Soc. (Lond.) B, 1995, vol. 260, pp. 211–217. [12] M. Courtemanche, “Complex spiral wave dynamics in a spatially distributed ionic model of cardiac electrical activity,” Chaos, vol. 6, pp. 579–600, 1996. [13] G. Strang, “On the construction and comparison of difference schemes,” SIAM J. Numer. Anal., vol. 5, pp. 506–517, 1968. [14] W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, Numerical Recipes in C: The Art of Scientific Computing. New York: Cambridge Univ. Press, 1992. [15] S. Rush and H. Larsen, “A practical algorithm for solving dynamic membrane equations,” IEEE Trans. Biomed. Eng., vol. BME-25, pp. 389–392, 1978.
+