stiffness analysis of cardiac electrophysiological models

13
Stiffness Analysis of Cardiac Electrophysiological Models RAYMOND J. SPITERI and RYAN C. DEAN Department of Computer Science, University of Saskatchewan, Saskatoon, SK S7N 5C9, Canada (Received 16 December 2009; accepted 11 June 2010; published online 26 June 2010) Associate Editor Erik L. Ritman oversaw the review of this article. AbstractThe electrophysiology in a cardiac cell can be modeled as a system of ordinary differential equations (ODEs). The efficient solution of these systems is important because they must be solved many times as sub-problems of tissue- or organ-level simulations of cardiac electrophys- iology. The wide variety of existing cardiac cell models encompasses many different properties, including the com- plexity of the model and the degree of stiffness. Accordingly, no single numerical method can be expected to be the most efficient for every model. In this article, we study the stiffness properties of a range of cardiac cell models and discuss the implications for their numerical solution. This analysis allows us to select or design numerical methods that are highly effective for a given model and hence outperform commonly used methods. KeywordsCardiac electrophysiology, Stiff differential equation, Rush–Larsen method, Runge–Kutta methods. INTRODUCTION The electrophysiological behavior in myocardial tissue can be modeled by means of differential equa- tions, often as a combination of ordinary and partial differential equations (ODEs and PDEs). Ionic cur- rents at the myocardial cell level are described by a model consisting of ODEs. These ionic currents are coupled via a model consisting of PDEs to describe the flow of electricity across the heart. A PDE model, such as the bidomain model, coupled with an ionic model can be used to simulate the electrical activity in the heart. For a thorough introduction, see Pullan et al. 42 or Sundnes et al. 53 Coupled ODE/PDE models are often solved sepa- rately via an algorithm called operator splitting. In this algorithm, the solution process alternates between solving the ODEs and the PDEs separately. In this context, the solution of each system is an important sub-problem of the overall solution process, each posing challenges to solving the overall problem effi- ciently. One such challenge is that the ionic model is usually a stiff, non-linear set of ODEs that must be solved for each node in the simulation. Moreover, a fine spatial discretization is required to produce useful data, 57 and so another challenge is the magnitude of the system required for a realistic simulation. Ineffi- ciencies in solving the ionic model, for example, are magnified as simulations become larger. The use of reduced, computationally inexpensive ionic models (e.g., Ten Tusscher et al. 55 ) illustrates the difficulty in efficiently performing simulations. In this study, we perform a systematic stiffness analysis of 37 verified ionic cell models from the CellML model repository 26 and show how this analysis can lead to application or design of appropriate methods for their efficient numerical solution. A wide range of ionic models exists. Many models are based upon the Hodgkin–Huxley (HH) model for the giant squid axon. 21 The FitzHugh–Nagumo (FHN) model, 17,32 a simplification of the HH model with two ODEs, is often used as an inexpensive ionic model, albeit usually in a form modified to more accurately model cardiac action potentials; see, e.g., Aliev and Panfilov, 2 Kogan et al., 24 Rogers and McCulloch, 43 Van Capelle and Durrer. 56 Modern models, on the other hand, usually add detail to the HH model or subsequent models; e.g., the model of Iyer et al. (2004) of human left-ventricular epicardial myocytes consists of 67 ODEs. There is also variety in the type of cardiac cell modeled, including models of cells in the atria, ventri- cles, sinoatrial node, and Purkinje fibers, as well as in the species being modeled, e.g., human, canine, rabbit, etc. The wide variety of ionic models has significant implications for efficiently obtaining their numerical solution. The simplest models, such as FHN, are typ- ically non-stiff. 53 In such cases, the use of a non-stiff numerical method is the most appropriate to obtain a Address correspondence to Raymond J. Spiteri, Department of Computer Science, University of Saskatchewan, Saskatoon, SK S7N 5C9, Canada. Electronic mail: [email protected] Annals of Biomedical Engineering, Vol. 38, No. 12, December 2010 (Ó 2010) pp. 3592–3604 DOI: 10.1007/s10439-010-0100-9 0090-6964/10/1200-3592/0 Ó 2010 Biomedical Engineering Society 3592

Upload: independent

Post on 16-Nov-2023

0 views

Category:

Documents


0 download

TRANSCRIPT

Stiffness Analysis of Cardiac Electrophysiological Models

RAYMOND J. SPITERI and RYAN C. DEAN

Department of Computer Science, University of Saskatchewan, Saskatoon, SK S7N 5C9, Canada

(Received 16 December 2009; accepted 11 June 2010; published online 26 June 2010)

Associate Editor Erik L. Ritman oversaw the review of this article.

Abstract—The electrophysiology in a cardiac cell can bemodeled as a system of ordinary differential equations(ODEs). The efficient solution of these systems is importantbecause they must be solved many times as sub-problemsof tissue- or organ-level simulations of cardiac electrophys-iology. The wide variety of existing cardiac cell modelsencompasses many different properties, including the com-plexity of the model and the degree of stiffness. Accordingly,no single numerical method can be expected to be the mostefficient for every model. In this article, we study the stiffnessproperties of a range of cardiac cell models and discuss theimplications for their numerical solution. This analysisallows us to select or design numerical methods that arehighly effective for a given model and hence outperformcommonly used methods.

Keywords—Cardiac electrophysiology, Stiff differential

equation, Rush–Larsen method, Runge–Kutta methods.

INTRODUCTION

The electrophysiological behavior in myocardialtissue can be modeled by means of differential equa-tions, often as a combination of ordinary and partialdifferential equations (ODEs and PDEs). Ionic cur-rents at the myocardial cell level are described by amodel consisting of ODEs. These ionic currents arecoupled via a model consisting of PDEs to describe theflow of electricity across the heart. A PDE model, suchas the bidomain model, coupled with an ionic modelcan be used to simulate the electrical activity in theheart. For a thorough introduction, see Pullan et al.42

or Sundnes et al.53

Coupled ODE/PDE models are often solved sepa-rately via an algorithm called operator splitting. In thisalgorithm, the solution process alternates betweensolving the ODEs and the PDEs separately. In this

context, the solution of each system is an importantsub-problem of the overall solution process, eachposing challenges to solving the overall problem effi-ciently. One such challenge is that the ionic model isusually a stiff, non-linear set of ODEs that must besolved for each node in the simulation. Moreover, afine spatial discretization is required to produce usefuldata,57 and so another challenge is the magnitude ofthe system required for a realistic simulation. Ineffi-ciencies in solving the ionic model, for example, aremagnified as simulations become larger. The use ofreduced, computationally inexpensive ionic models(e.g., Ten Tusscher et al.55) illustrates the difficulty inefficiently performing simulations. In this study, weperform a systematic stiffness analysis of 37 verifiedionic cell models from the CellML model repository26

and show how this analysis can lead to application ordesign of appropriate methods for their efficientnumerical solution.

Awide range of ionicmodels exists.Manymodels arebased upon the Hodgkin–Huxley (HH) model for thegiant squid axon.21 The FitzHugh–Nagumo (FHN)model,17,32 a simplification of the HH model with twoODEs, is often used as an inexpensive ionic model,albeit usually in a form modified to more accuratelymodel cardiac action potentials; see, e.g., Aliev andPanfilov,2Kogan et al.,24 Rogers andMcCulloch,43 VanCapelle and Durrer.56 Modern models, on the otherhand, usually add detail to the HHmodel or subsequentmodels; e.g., the model of Iyer et al. (2004) of humanleft-ventricular epicardial myocytes consists of 67ODEs. There is also variety in the type of cardiac cellmodeled, including models of cells in the atria, ventri-cles, sinoatrial node, and Purkinje fibers, as well as in thespecies being modeled, e.g., human, canine, rabbit, etc.

The wide variety of ionic models has significantimplications for efficiently obtaining their numericalsolution. The simplest models, such as FHN, are typ-ically non-stiff.53 In such cases, the use of a non-stiffnumerical method is the most appropriate to obtain a

Address correspondence to Raymond J. Spiteri, Department

of Computer Science, University of Saskatchewan, Saskatoon,

SK S7N 5C9, Canada. Electronic mail: [email protected]

Annals of Biomedical Engineering, Vol. 38, No. 12, December 2010 (� 2010) pp. 3592–3604

DOI: 10.1007/s10439-010-0100-9

0090-6964/10/1200-3592/0 � 2010 Biomedical Engineering Society

3592

solution efficiently. Cell models more detailed thanFHN tend to be stiff and require the use of a stiffnumerical method to obtain a solution efficiently.53

However, stiffness is a subtle effect and challenging todefinitively characterize. The distinction between stiffand non-stiff models is not clear-cut in general; itdepends on aspects such as the range of the time scalesinvolved and the accuracy required of the approximatesolution. We find there is a considerable difference inthe degree of stiffness across the diversity of ionicmodels even for typical accuracy requirements. Forexample, Maclachlan et al.28 demonstrate the markeddifference in the degree of stiffness between the modelsof Courtemanche et al.11 and Winslow et al.59 Both arestiff, detailed, second-generation models, but the mostwell-suited numerical method is different in each case.

In this study, we analyze the stiffness of a wide rangeof cardiac electrophysiological models. We examinethe eigenvalues of the Jacobian of the solutions overtime for the 37 ionic cell models considered. Theseeigenvalues are often related to the stiffness of themodel,19 and in fact a stiff initial-value problem issometimes defined in terms of these eigenvalues, e.g.,Lambert.25 We show how this information can be usedto select or design an effective numerical method forspecific ionic cell models. We give special focus tonumerical methods commonly used in cardiac elec-trophysiological simulations and demonstrate the effi-ciency gains that are possible through the use ofstiffness data.

The rest of this article is organized as follows. In thesection ‘‘Cardiac electrophysiological models,’’ we givea brief outline of ionic cell models and an overview ofthe particular models used in this study. In the section‘‘Stiffness,’’ we give a brief overview of the concept ofstiffness. We also present the extreme eigenvalue datagenerated for the models considered and discuss theimplications for model stiffness. In the section ‘‘Usingstiffness data,’’ we use the eigenvalue data to select aneffective numerical method for the model of Panditet al. (2003)39 as well as to design effective type-insensitive codes for several cell models. We comparethe proposed numerical methods in terms of efficiencyto commonly used methods. Finally, in the section‘‘Conclusions,’’ we summarize the conclusions reachedbased on our observations.

CARDIAC ELECTROPHYSIOLOGICAL

MODELS

Ionic Current Models

Small-scale processes that occur at the level of theindividual cells in the heart can be modeled using

ODEs. Such models can be used to simulate thebehavior of electrical activity in an isolated cell, or,when coupled with a PDE model, can be used toprovide the ionic current to tissue- or organ-levelsimulations. The simplest of these models are calledfirst-generation models. A first-generation model con-tains enough detail to reproduce an action potential,but it has a simplified description of the underlyingphysiological details.53 Some popular examples of first-generation models are the FHN model and the 1991Luo–Rudy model (LR).27 More complex models,called second-generation models, contain all of thedetails included in first-generation models and as manyfine-scaled physiological details as possible.53 Mostmodern models can be classified as second-generationmodels because the most useful simulations tend torequire details on the finest level.53 Although first-generation models have less detail, their advantage isthat they are computationally inexpensive relative tosecond-generation models.

The heart consists of different types of excitablecells, each having their own properties.42 As such, mostmodels are suited to particular type of cell in the heart.Normally, the electrical activity in the heart is initiatedby a spontaneous electrical pulse emanating fromspecialized tissue called the sinoatrial node. From thesinoatrial node, electricity spreads to the atrial myo-cardium.42 From the atria, the activation wave spreadsto the atrioventricular node, the Purkinje fibers, and,finally, to the ventricles. There are models for each ofthese regions of the heart. In particular, there arenumerous models of atrial and ventricular cells. On theother hand, there are relatively few cell models for theatrioventricular node; see, e.g., Pullan et al.42 for adetailed list of dozens of cardiac electrophysiologicalmodels classified in this way.

As an example of a first-generation model, weconsider the LR model, sometimes called the LR Phase1 model. The LR model describes guinea pig ventric-ular tissue and consists of eight ODEs. For an indi-vidual cardiac cell, we have that the transmembranepotential, Vm, satisfies

27

dVm

dt¼ � 1

CmðIion þ IstÞ; ð1Þ

where Cm is the membrane capacitance, Iion is the totaltransmembrane ionic current, and Ist is the stimuluscurrent. The LR model contains six gating variablesthat determine the flow of current. The evolution ofeach gating variable y is governed by a nonlinear ODEinvolving rate parameters ay = ay(Vm) and by ¼byðVmÞ in the general form

dy

dt¼ y1 � y

sy; ð2Þ

Stiffness Analysis of Cardiac Electrophysiological Models 3593

where

y1 ¼ay

ay þ by

and sy ¼1

ay þ by

:

The range of each gating variable is [0, 1], representingthe probability of a channel being open or closed. Wheny ¼ 0; all channels are completely closed, allowing nocurrent to flow. When y ¼ 1; all channels are com-pletely open, allowing current to flow without beinginhibited by the gate.42 The remaining ODE in the LRmodel describes calcium concentration in the cell:

d ½Ca�i� �

dt¼ �10�4Isi þ 0:07ð10�4 � ½Ca�iÞ; ð3Þ

where ½Ca�i is the intracellular calcium concentrationand Isi is the slow inward calcium current.27 The sixgating equations of the form (2) are coupled with (1)and (3) to form the complete LR model. Full details ofthe model can be found in Luo and Rudy.27

As an example of a second-generation model, wemention the model of Winslow et al.59 This modeldescribes canine ventricular tissue and consists of 33ODEs.

Models Used

In this study, we consider 37 different ionic models,including some that are variations of a given model.This represents a wide variety of models in terms oftype of cardiac cell, species modeled, degree of stiff-ness, and level of detail. Model data were obtainedfrom the CellML model repository.26 The CellMLrepresentation of models was used to generate Matlabcode via a Python script. To ensure the faithfulness ofthe code to the model, two specific considerations weremade. First, apart from one exception, we used onlymodels considered to be faithful to the publishedmodel according to CellML’s curation guidelines, i.e.,models marked with a gold star on the CellML web-site. The exception was for the Puglisi–Bers model41

because we already had reliable code as part of otherwork.48 Second, reference solutions were obtained withthe generated Matlab code and were verified to be thesame as reference solutions obtained with JSim,1 anindependent software package capable of parsingCellML files.

A detailed formulation of all models is omitted forthe sake of brevity. The reader is instead referred to theoriginal model papers or to the CellML repository,which contains a concise formulation of each model. Asummary of each of the models used in this study ispresented in Table 1 including, for each model, thename used for it in this article, a reference to the ori-ginal paper, a brief description of the model, and thenumber of ODEs in the model.

For each model, the set of default parameters inCellML was used. All models contain adjustableparameters; e.g., the model of Pandit et al. (2001) has aparameter that determines if the model should takeinto account the influence of diabetes. Becauseadjusting parameters to the models requires intricateknowledge of each of the model and increases thechance of human error, we did not vary any of theseparameters unless separate CellML files were providedfor variations on the same model. This was the case forthe model of Sakmann et al. (2000) and the two modelsof Ten Tusscher et al. studied here. For these threemodels, endocardial, epicardial, and M-cell variants ofthe model were in the CellML repository and thusincluded in this study.

STIFFNESS

We are concerned with the characterization of stiff-ness in various ionic cell models. Arguably, there is nouniversally accepted definition of stiffness. For example,Hairer and Wanner state that ‘‘stiff equations areproblems for which explicit methods don’t work’’ (seep. 2 of Hairer and Wanner19). Lambert25 describesstiffness as a phenomenon rather than a property be-cause the concept of property implies the requirement ofa precise mathematical definition. In this article, we saythat a problem is stiff with respect to a given methodwhen stability requirements force the method to take asmaller step size than that dictated by accuracyrequirements. This is similar to the definition of stiffnessused by Ascher and Petzold.4 This can be seen as apragmatic definition because it frames stiffness in termsof the associated computational consequences. Gener-ally, the step size required for a non-stiff method appliedto a stiff problem is much smaller than accuracyrequirements dictate, resulting in a numerical solutionthat ismuchmore accurate (and hencemore costly) thandesired. For efficiency, we would like that a step size bechosen based only the accuracy requirements. Forexample, second-ordermethods have an error ofOðDt2Þ:So for an error tolerance TOL of 10�4; a step sizeDt � 10�2 might suffice. However, suppose the methodhas a stability restriction of Dt ¼ 10�6; i.e., step sizesDt>10�6 are unstable. Then the error produced wouldbe around 10�12; much smaller than desired. As Dt isrestricted by stability, there is no way to stably increaseDt to make the error match the tolerance more closely.

Despite the absence of a universally accepted defi-nition, there is a large body of knowledge regarding thesuitability of particular methods for both stiff and non-stiff problems. Numerical methods for the solution ofODEs can generally be put into two groups, stiff andnon-stiff. The placement of a particular method in a

R. J. SPITERI AND R. C. DEAN3594

certain group is based on the method’s relative per-formance on stiff and non-stiff problems. Consider, forexample, the forward Euler (FE) and backward Euler(BE) methods (see ch. 3 of Ascher and Petzold4). Onestep with FE is computationally inexpensive. So whenthe step size is dictated by accuracy considerations, FEis more efficient than BE. However, FE has a relativelysmall region of absolute stability (see ch. 3 of Ascherand Petzold4). An attempt to solve a stiff problem withFE requires a small step size, and overall the numericalsolution process is less efficient than if we use a methodwith a larger stability region. Hence, FE is classified asa non-stiff method. On the other hand, BE has a largestability region. Despite the fact that each step of BE ismore expensive than FE because a system of nonlinearequations must generally be solved at each step, theoverall performance trade-off is favorable: the step sizecan be increased by more than enough to offset theextra cost per step. Hence, BE is classified as a stiffmethod. This analysis illustrates that choosing theproper type of method to solve the ODEs can becritical to achieve good performance.

Related to the stiffness of a general initial-valueproblem (IVP)

dy

dt¼ f t; yð Þ; yð0Þ ¼ y0; t 2 ½t0; tf�; ð4Þ

are the eigenvalues of the Jacobian J ¼ @f@yðt; yÞ over

time. These eigenvalues can give us an indication of aproblem’s stiffness. In particular, eigenvalues withlarge negative real parts are likely to lead to stiffproblems on their corresponding time intervals.Problems that have eigenvalues with large imaginaryparts also tend to be difficult to solve by standardsolvers, but the highly oscillatory nature of the solu-tions to the associated linearized problem does notmake the problems stiff according to the classicaldescription of stiffness. In the section ‘‘Eigenvaluedata,’’ we compute the eigenvalues of the Jacobianover time for each of the models introduced in thesection ‘‘Models used’’ and discuss the implicationsfor stiffness. In the section ‘‘Numerical experiments,’’we discuss numerical experiments to illustrate ourdiscussion of stiffness.

TABLE 1. Summary of models used.

Model Reference ODEs Description

Beeler–Reuter (1977) 6 8 Canine ventricular model

Bondarenko et al. (2004) 8 41 Mouse ventricular model

Courtemanche et al. (1998) 11 21 Human atrial model

Demir et al. (1994) 13 27 Rabbit sinoatrial node model

Demir et al. (1999) 12 29 Rabbit sinoatrial node model

DiFrancesco–Noble (1985) 14 16 Mammal Purkinje fiber model

Dokos et al. (1996) 15 18 Rabbit sinoatrial node model

Faber–Rudy (2000) 16 19 Guinea pig ventricular model

FitzHugh–Nagumo (1961) 17,32 2 Nerve membrane model

Fox et al. (2002) 18 13 Canine ventricular model

Hilgemann–Noble (1987) 20 15 Rabbit atrial model

Hund–Rudy (2004) 22 29 Canine ventricular model

Jafri et al. (1998) 23 31 Guinea pig ventricular model

Luo–Rudy (1991) 27 8 Guinea pig ventricular model

Maleckar et al. (2008) 29 30 Human atrial model

McAllister et al. (1975) 31 10 Canine Purkinje fiber model

Noble (1962) 33 4 Mammal Purkinje fiber model

Noble–Noble (1984) 34 15 Rabbit sinoatrial node model

Noble et al. (1991) 35 17 Guinea pig ventricular model

Noble et al. (1998) 36 22 Guinea pig ventricular model

Nygren et al. (1998) 37 29 Human atrial model

Pandit et al. (2001) 38 26 Rat left-ventricular model

Pandit et al. (2003) 39 26 Rat left-ventricular model

Puglisi–Bers (2001) 41 17 Rabbit ventricular model

Sakmann et al. (2000)* 45 21 Guinea pig ventricular model

Stewart et al. (2009) 51 20 Human Purkinje fiber model

Ten Tusscher et al. (2004)* 54 17 Human ventricular model

Ten Tusscher et al. (2006)* 55 19 Human ventricular model

Wang–Sobie (2008) 58 35 Neonatal mouse ventricular model

Winslow et al. (1999) 59 33 Canine atrial model

Zhang et al. (2000) 61 15 Rabbit sinoatrial node model

Three variants (endocardial cell, epicardial cell, and M-cell) exist for each of the models marked with an asterisk.

Stiffness Analysis of Cardiac Electrophysiological Models 3595

Eigenvalue Data

For each model in the section ‘‘Models used,’’ wefound the eigenvalues of the Jacobian over time in thefollowing way. First, a reference solution was gener-ated using Matlab’s ode15s.30 This was done bylowering the error tolerances for successive approxi-mations until two approximations were identical for atleast 10 significant digits at N* = 100 equally spacedoutput points. Matlab code representing the derivativeof each model was created via automatic differentia-tion using AdiMat.7 We found a value for the Jacobianat every 1 ms of simulated time using the derivativecode with the reference solution, and we found theeigenvalues of each of these Jacobians with Matlab’seig function.

The extreme values in the set of eigenvalues asso-ciated with a model are of particular interest becausethey offer a worst-case or extreme look at the stiffnessproperties. The largest stable step size for the FEmethod is approximately two times the reciprocal ofthe extreme negative real eigenvalue. At each point intime considered, we found the maximum and mini-mum values of both the real and complex parts of theeigenvalues. The extreme values across the solutioninterval of these minimum and maximum values arereported in Table 2 along with the percentage of timeat least one pair of complex eigenvalues was present.As we can see, there is a wide range of behaviorsencompassed by these models, from models such asFHN and Beeler–Reuter that do not have relatively

TABLE 2. Extreme values of the eigenvalues for each model.

Model min(Re(k)) max(Re(k)) min(Im(k)) max(Im(k)) % Complex

Beeler–Reuter (1977) 28.20E+1 23.968E23 0.00E+0 0.00E+0 0

Bondarenko (2004) 28.49E+3 4.51E+0 22.80E+0 2.80E+0 64

Courtemanche et al. (1998) 21.29E+2 1.87E21 24.50E+0 4.50E+0 82

Demir et al. (1994) 22.24E+4 4.57E+0 27.35E+0 7.35E+0 100

Demir et al. (1999) 23.45E+4 4.81E+2 26.50E+1 6.50E+1 66

DiFrancesco–Noble (1985) 22.62E+4 8.24E+1 23.21E+0 3.21E+0 31

Dokos et al. (1996) 22.99E+4 2.49E215 26.39E+1 6.39E+1 100

Faber–Rudy (2000) 21.83E+2 1.36E217 0.00E+0 0.00E+0 0

FitzHugh–Nagumo (1961) 24.38E21 1.78E21 24.59E22 4.59E22 45

Fox et al. (2002) 24.38E+2 4.44E22 24.18E21 4.18E21 65

Hilgemann–Noble (1987) 22.86E+4 1.81E214 27.71E+1 7.71E+1 21

Hund (2004) 21.95E+2 2.69E22 21.57E23 1.57E23 4

Jafri et al. (1998) 21.12E+3 2.31E27 21.91E22 1.91E22 52

Luo–Rudy (1991) 21.51E+2 7.01E22 24.11E22 4.11E22 74

Maleckar et al. (2008) 24.16E+4 2.42E+2 23.42E+2 3.42E+2 28

McAllister et al. (1975) 28.18E+1 24.79E24 22.85E22 2.85E22 100

Noble (1962) 29.79E+3 21.92E+0 0.00E+0 0.00E+0 0

Noble–Noble (1984) 26.56E+3 1.35E215 21.36E+1 1.36E+1 100

Noble et al. (1991) 23.88E+4 1.78E212 0.00E+0 0.00E+0 0

Noble et al. (1998) 23.60E+4 26.32E27 28.41E+0 8.41E+0 9

Nygren et al. (1998) 24.03E+4 1.22E21 23.88E+2 3.88E+2 22

Pandit et al. (2001) 28.89E+4 2.20E214 0.00E+0 0.00E+0 0

Pandit et al. (2003) 23.90E+9 6.83E+0 28.09E25 8.09E25 17

Puglisi–Bers (2001) 21.67E+1 1.29E+0 21.52E21 1.52E21 35

Sakmann et al. (2000)—Endocardial 22.93E+4 6.02E21 25.21E+1 5.21E+1 100

Sakmann et al. (2000)—Epicardial 22.93E+4 3.59E+1 25.24E+1 5.24E+1 100

Sakmann et al. (2000)—M-cell 22.93E+4 1.03E+2 25.20E+1 5.20E+1 100

Stewart et al. (2009) 21.38E+2 3.34E+0 21.56E+0 1.56E+0 92

Ten Tusscher et al. (2004)—Endocardial 21.17E+3 1.16E21 24.67E+0 4.67E+0 17

Ten Tusscher et al. (2004)—Epicardial 21.17E+3 1.12E21 24.73E+0 4.73E+0 18

Ten Tusscher et al. (2004)—M-cell 21.16E+3 1.12E21 24.73E+0 4.73E+0 22

Ten Tusscher et al. (2006)—Endocardial 21.26E+3 1.94E28 0.00E+0 0.00E+0 0

Ten Tusscher et al. (2006)—Epicardial 21.26E+3 1.92E28 0.00E+0 0.00E+0 0

Ten Tusscher et al. (2006)—M-cell 21.26E+3 1.92E28 0.00E+0 0.00E+0 0

Wang–Sobie (2008) 21.22E+2 1.23E+0 21.23E+0 1.23E+0 46

Winslow et al. (1999) 21.84E+4 1.53E+0 24.22E21 4.22E21 63

Zhang et al. (2000) 22.22E+4 1.29E+2 21.00E+2 1.00E+2 89

The minimum real part of the set of eigenvalues is denoted min(Re(k)), and the maximum real part of the set of eigenvalues is

denoted max(Re(k)). Similarly, the minimum and maximum imaginary parts are denoted min(Im(k)) and max(Im(k)). The

percentage of the solution interval in which there is at least one pair of complex eigenvalues is also reported.

R. J. SPITERI AND R. C. DEAN3596

large negative eigenvalues to models such as Wang–Sobie and that of Maleckar et al. that have moder-ately large negative eigenvalues to the model ofPandit et al. (2003) that has extremely large negativeeigenvalues.

Although not apparent from these tables, we notethat problems may not be stiff everywhere in theirrespective intervals of integration. Accordingly it maybe possible to use different integration methods thatare more appropriate on different time intervals. Wealso note that the integration methods that use aconstant step size are subject to the constraintsimposed by the worst-case behavior of stiffness andhence tend to perform poorly. Graphs of how theextreme eigenvalues vary over time for two models(Pandit et al. (2003) and Winslow et al.) are given inFigs. 1 and 2 below; graphs for the remaining modelscan be found in Spiteri and Dean.49

Numerical Experiments

Overview

We now discuss numerical experiments to show howthe data presented in the section ‘‘Eigenvalue data’’can be utilized. We focus on numerical experiments forthree integration methods for ionic cell models: FE, theRush–Larsen (RL)44 method, and the recently pro-posed second-order generalization of RL (GRL2).52

The primary goal of these experiments is not to find themost efficient numerical method possible but rather toillustrate how the stiffness of particular models affectsthe performance of different numerical methods. Asecondary goal of these experiments is to demonstratethe suitability of numerical methods to particular ionicmodels according to their degree of stiffness.

For each numerical method, we aim to balance therequirements for accuracy and efficiency. To quantifythe error in a solution, we use the relative root meansquare error (RRMS) error of the transmembranepotential:

RRMS :¼

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi1

N�

PN�

i¼1ðVi � ViÞ2PN�

i¼1 V2i

s

;

where Vi is the numerical approximation and Vi is thereference solution at time ti as described above. Foreach model and numerical method considered, wemaximize the step size while producing a solution thathas less than 5% RRMS error. For each combinationof numerical method and model, we report the resultfor the step size with the least execution time and lessthan 5% RRMS error.

We used constant step sizes in our experiments toreflect the typical use of the cell models within a tissue-scale simulation. As mentioned, these simulationsemploy operator splitting, and constant equal step sizesare often used for integrating both the PDEs and theODEs. The use of variable step sizes for the integrationof the ODEs over long time intervals can generally beexpected to be more efficient than the use of constantsteps48 and hence would likely be more effective in ascenario where a fully coupled (i.e., unsplit) integrationapproach is used; see e.g., Ying et al.60 In the context ofoperator splitting, variable step sizes for the ODEs maybe allowed provided they remain below the (constant)step size used for the PDEs.

We placed two additional requirements on the stepsize. First, the maximum step size allowed was equal tothe length of time for which the stimulus current wasapplied. The cases for which this maximum wasreached are denoted with a dagger in Table 3. Second,the step size was adjusted at up to three points in timein order to resolve important events: the start of theapplication of stimulus current, the end of the

0 50 100 150 200 250−4

−3.5

−3

−2.5

−2

−1.5

−1

−0.5

0

0.5 x 109

Time

Ext

rem

e E

igen

valu

e

MAX REAL

MIN REAL

FIGURE 1. Extreme eigenvalues of the model of Pandit et al.(2003).

0 50 100 150 200 250 300−20000

−15000

−10000

−5000

0

5000

Time

Ext

rem

e E

igen

valu

e

MAX REAL

MIN REAL

FIGURE 2. Extreme eigenvalues of the model of Winslowet al.

Stiffness Analysis of Cardiac Electrophysiological Models 3597

application of stimulus current, and the end point of thesimulation. If the integration were to step past one ofthese three points, the step size would be adjusted, forthat step only, to land on the point exactly. This wasdone mainly because a discontinuous stimulus appli-cation can introduce errors that are avoidable if thepoints at which the discontinuities occur are resolved.

Methods

The first method used in our experiments is theexplicit first-order FE method. Applied to the generalIVP (4), one step of FE from (tn21, yn21) to (tn, yn) isgiven by

yn ¼ yn�1 þ Dtnf tn�1; yn�1ð Þ;tn ¼ tn�1 þ Dtn;

where yn � y(tn) and tn = tn21 + Dtn. It is a popularmethod in practice mainly due to the ease of imple-mentation.

The second method is the RL method. The RLmethod advances the solution to the gating equa-tions (2) associated with HH variables using

yn ¼ y1 þ ðyn�1 � y1Þe�Dtnsy ;

which represents the exact solution of (2) assuming allvariables besides y are constant. FE is then used toadvance the solution of the remaining equations,including those associated with non-HH state variablesand Markov-type models of currents. This method isan effective stiff solver for the LR model50; i.e., the stepsize can be chosen based on accuracy considerations.RL is generally one of the most popular methods in

TABLE 3. Step size, in milliseconds, and execution time, in seconds, of the three numerical methods using the largest step sizewith less than 5% RRMS error.

Model

FE RL GRL2

Dt Time Dt Time Dt Time

Beeler–Reuter (1977) 2.53E22 5.19E22 8.49E21 9.83E23 8.58E21 3.09E22

Bondarenko et al. (2004) 2.13E24 3.81E+0 2.50E24 4.13E+0 1.40E22 1.85E+0

Courtemanche et al. (1998) 1.94E22 4.27E+0 3.45E21 4.79E21 9.95E21 2.07E21

Demir et al. (1994) 5.95E22 1.74E22 1.53E21 7.48E23 2.86E21 6.76E22

Demir et al. (1999) 5.97E22 2.13E22 9.66E22 1.71E22 2.49E21 8.24E22

DiFrancesco–Noble (1985) 7.85E22 8.59E22 6.62E21 7.66E22 9.99E21 2.67E21

Dokos et al. (1996) 7.30E22 3.44E22 7.64E21 3.37E23 9.99E21 8.35E22

Faber–Rudy (2000) 1.12E22 1.69E21 9.51E21 4.60E23 6.35E21 1.38E21

FitzHugh–Nagumo (1961) 5.00E21y 3.93E23 N/A N/A 5.00E21y 3.19E22

Fox et al. (2002) 4.60E23 4.11E21 6.37E21 3.11E22 7.74E21 7.70E22

Hilgemann–Noble (1987) 6.25E22 1.69E21 8.06E22 9.56E22 9.96E22 6.23E22

Hund–Rudy (2004) 1.11E22 1.75E21 4.17E22 5.35E22 6.20E21 4.26E21

Jafri et al. (1998) 5.77E24 6.18E+0 5.89E24 4.42E+0 1.59E23 8.38E+0

Luo–Rudy (1991) 1.34E22 3.61E21 2.50E21 6.94E22 1.00E+0y 2.31E22

Maleckar et al. (2008) 5.02E22 1.09E21 7.50E21 9.44E22 8.21E21 3.84E21

McAllister et al. (1975) 2.46E22 1.21E21 7.06E21 6.00E22 2.63E21 2.32E21

Noble (1962) 2.03E21 7.63E23 9.41E22 8.82E22 2.22E21 7.89E22

Noble–Noble (1984) 2.04E21 1.82E21 2.73E21 1.20E21 1.00E+0y 4.99E22

Noble et al. (1991) 5.15E22 3.00E22 1.53E21 1.21E22 6.25E21 9.31E23

Noble et al. (1998) 5.58E22 5.25E22 1.57E21 1.50E22 5.43E21 2.67E22

Nygren et al. (1998) 5.36E22 1.02E21 8.88E22 8.68E22 9.81E21 3.65E22

Pandit et al. (2001) 2.91E24 8.85E+0 2.91E24 1.01E+1 4.98E24 2.56E+1

Pandit et al. (2003) 1.04E27 4.20E+4 1.04E27 8.37E+4 9.28E27 8.93E+4

Puglisi–Bers (2001) 1.08E22 4.43E21 4.30E21 8.35E22 6.24E21 4.18E21

Sakmann et al. (2000)—Endocardial 6.90E22 4.73E22 2.36E21 1.80E22 9.71E21 1.03E22

Sakmann et al. (2000)—Epicardial 6.90E22 5.11E22 2.36E21 1.80E22 9.71E21 1.03E22

Sakmann et al. (2000)—M-cell 6.86E22 5.12E22 2.36E21 1.80E22 9.71E21 1.03E22

Stewart et al. (2009) 1.50E22 4.35E21 1.62E21 5.60E22 3.58E22 8.61E22

Ten Tusscher et al. (2004)—Endocardial 1.78E23 1.75E+0 1.00E+0y 5.43E23 1.00E+0y 1.30E22

Ten Tusscher et al. (2004)—Epicardial 1.78E23 1.75E+0 1.00E21y 5.43E23 1.00E+0y 1.30E22

Ten Tusscher et al. (2004)—M-cell 1.76E23 1.25E+0 2.80E21 1.29E22 9.81E21 2.84E22

Ten Tusscher et al. (2006)—Endocardial 1.62E23 1.33E+0 1.52E21 6.41E22 7.80E21 9.27E23

Ten Tusscher et al. (2006)—Epicardial 2.14E23 9.79E21 2.80E21 3.64E22 8.39E21 7.06E23

Ten Tusscher et al. (2006)—M-cell 2.14E23 9.79E21 2.05E21 4.17E22 7.77E21 9.27E23

Wang–Sobie (2008) 1.66E22 5.95E22 5.26E22 2.19E22 4.97E21 1.61E22

Winslow et al. (1999) 1.07E24 1.70E+1 2.80E24 8.84E+0 1.34E23 2.26E+0

Zhang et al. (2000) 9.90E22 5.19E22 1.00E+0y 7.69E23 1.00E+0y 1.85E21

Maximum allowable step sizes that were determined by the stimulus duration are indicated with a dagger.

R. J. SPITERI AND R. C. DEAN3598

practice due to its good stability properties and ease ofimplementation. However, this method is only first-order accurate and thus suffers from the usual ineffi-ciencies of low-order methods when high accuracy isrequired.

The third method is the GRL2 method proposed bySundnes et al.52 GRL2 decouples and linearizes theODE system consisting of m ODEs around a pointy = yn at time t = tn to obtain

dyidt¼ fiðynÞ þ

@

@yifiðynÞ yi � yn;i

� �; yiðtnÞ ¼ yn;i; ð5Þ

for i = 1, 2, …, m, where the subscript i denotescomponent i of a vector. The exact solution of (5) isgiven by

yiðtÞ ¼ yn;i þa

bebðt�tnÞ � 1� �

; i ¼ 1; 2; . . . ;m; ð6Þ

where a = fi(yn) and b ¼ @fiðynÞ=@yi: The numericalsolution yn+1 at time t = tn+1 is then obtained in twosteps:

1. Estimate the solution at time tn+1/2 with

ynþ1=2;i ¼ yn;i þa

bebðDtn=2Þ � 1� �

; i ¼ 1; 2; . . . ;m:

2. Let �ynþ1=2 ¼ ynþ1=2 but with component ireplaced by yn,i. For each i, compute thenumerical solution at time tn+1 from

ynþ1;i ¼ yn;i þ�a�be

�bDtn � 1� �

; i ¼ 1; 2; . . . ;m;

where �a ¼ fið�ynþ1=2Þ; �b ¼ @fið�ynþ1=2Þ=@yi andwe have used the fact that �ynþ1=2;i ¼ yn;i:

GRL2 and RL treat the gating equations (2) in asimilar manner. The main difference is that GRL2 alsotreats the non-gating equations with an exponentialformula based on local linearization, whereas RL usesFE. GRL2 is verified to have second-order accuracy inArtebrant et al.3

We note that care must be taken in the implemen-tation of GRL2 to ensure efficiency, in particularregarding the computation of the Jacobian @f=@ybecause only the diagonal elements are needed. Forexample, the finite-difference approximation of@fiðyÞ=@yi is performed via

@fiðyÞ=@yi �fiðy1; . . . ; yi�1; yi þ d; yiþ1; . . . ; ymÞ � fiðyÞ

d;

where d = 1028 for double-precision calculations.Without careful implementation, this could addanother m full ODE right-hand side function evalua-tions per step, making the method prohibitivelyexpensive for all but the simplest models. Moreover,

we note that a full ODE right-hand-side functionevaluation is not needed for each @fiðyÞ=@yi:

Also in practice, if j@fiðyÞ=@yij<d; the limit as@fiðyÞ=@yi ! 0 is used instead of (6):

yiðtÞ ¼ yi þ aðt� tnÞ; i ¼ 1; . . . ;m:

We illustrate a specific implementation of GRL2on the subsystem describing the ryanodine-sensitiverelease channel from the model of Winslow et al.59 TheODEs considered are

dPC1

dt¼ �kþa ½Ca2þ�

NssPC1

þ k�a PO1;

dPO1

dt¼ kþa ½ Ca2þ�

NssPC1

� k�a PO1;�kþb ½Ca

2þ�Mss PO1

þ k�b PO2� kþc PO1

þ k�c PC2;

dPO2

dt¼ kþb ½Ca

2þ�Mss PO1� k�b PO2

;

dPC2

dt¼ kþc PO1

� k�c PC2;

where the quantities M, N, and ka,b,c± are constants;

their values can be found in Winslow et al.59 For thepurposes of this example, the subspace calcium con-centration [Ca2+]ss is also assumed to be constant.

One step of size Dtn for GRL2 applied to this systemstarting from time tn and state yn ¼ ðPC1;n;PO1;n;PO2;n;PC2;nÞ

T yields

PC1;nþ1=2 ¼ PC1;n þ�kþa ½Ca2þ�

N

ssPC1;n þ k�a PO1;n

�kþa ½Ca2þ�N

ss

� e�kþa ½Ca2þ�

N

ssDtn=2 � 1h i

;

with analogous expressions for PO1;nþ1=2;PO2;nþ1=2;PC2;nþ1=2; then

PC1;nþ1 ¼ PC1;n þ�kþa ½Ca2þ�

N

ssPC1;n þ k�a PO1;nþ1=2

�kþa ½Ca2þ�N

ss

� e�kþa ½Ca2þ�

N

ssDtn � 1h i

;

with analogous expressions for PO1;nþ1;PO2;nþ1;PC2;nþ1:For the results reported here for GRL2, we used a

finely tuned version of the cell model code. This codehad the ability to return the value of the right-handside of any particular ODE in the system and wouldcompute only the information required for the indi-vidual ODE. This fine tuning was necessary for GRL2to be competitive.

Results

For each pair of a model given in the section‘‘Model used’’ and a method given in the section‘‘Methods,’’ we find a maximum step size to three

Stiffness Analysis of Cardiac Electrophysiological Models 3599

significant digits subject to the conditions given in thesection ‘‘Overview.’’ With this information, we per-formed an experiment to determine the best executiontime possible for combinations of a model with amethod. All numerical experiments were performed inMatlab on an iMac with 2.8 GHz Intel Core Duoprocessor with 4 GB DDR SD RAM running at667 MHz. Except for the model of Pandit et al. (2003),we report the minimum of 100 runs of each combina-tion of a method and model. Because the model ofPandit et al. (2003) required significant run times withthe methods used, the execution time reported is theminimum of ten runs. In all cases, we ensured that thevariance of the times recorded for a given combinationwas small.

Results for FE, RL, and GRL2 are presented inTable 3. The non-standard methods RL and GRL2generally outperformFE. Of themodels considered, RLis the most efficient in 18 cases, GRL2 is the most effi-cient in 15 cases, and FE is the most efficient in fourcases. GRL2 can usually take a larger step than RL,which can in turn usually take a larger step than FE.However, GRL2 generally has a higher cost per stepthan RL, which in turn has a higher cost per step thanFE. We see that generally the increases in acceptablestep sizes for GRL2 and RL are large enough to morethan offset the added cost per step when compared withFE. The situation for GRL2 compared with RL is lessclear, with each being the most efficient on roughly anequal number of models. These results support thefindings in Sundnes et al.52 for the competitiveness ofGRL2 as a method for the integration of cell models,albeit at the expense of amore involved implementation.FEwas themost efficientmethod on fourmodels: FHN,Noble (1962), Pandit et al. (2001), and Pandit et al.(2003). In these cases, despite the increase in maximumstep size, RL and GRL2 significantly underperformcompared to FE due to their higher costs per step.

We repeated the experiments using a tighter toler-ance of 1% RRMS error. As can be expected, exceptfor the cases when the largest allowable step size wasnot constrained by accuracy, the execution times wereslightly higher. The only changes to the relative rank-ings of the methods for a given model were that FEbecame the most efficient on three more models, thoseof DiFrancesco–Noble, Maleckar et al., and theendocardial variant of Sakmann et al. (2000). We alsoperformed experiments with other explicit or implicit–explicit Runge–Kutta methods with more stages and/or higher order. However, as could have been antici-pated based on the stiffness characteristics of themodels and previous investigations,48 all of thesemethods generally underperformed relative to FE andhence are not reported here. Full details can be foundin Spiteri and Dean.49

USING STIFFNESS DATA

Stiff Solvers

The model of Pandit et al. (2003) is an example ofhighly stiff model that cannot be integrated efficientlyby any of the methods considered here thus far. Thesemethods require between about 11 and 25 h of execu-tion time to integrate this model. As can be seen fromTable 2, there exists a negative real eigenvalue that issome five orders of magnitude larger than any of theother models considered here. Moreover, from Fig. 1we see that this large negative eigenvalue is present formost of the solution interval. Classical non-stiffmethods, such as explicit Runge–Kutta methodsincluding FE, are unlikely to perform well on such amodel under normal accuracy requirements. Theresults presented in the section ‘‘Results’’ demonstrateclearly that the non-standard methods RL and GRL2are also not sufficiently stable to integrate such amodel efficiently. For this model, FE in fact outper-forms RL and GRL2 because they face similar extremerestrictions on their largest stable step sizes while beingmore expensive per step.

The eigenvalue data indicate that solvers suited tostiff problems are ideal for this model. The simplestexample of a stiff solver is the BE method. BE is theone-stage, first-order implicit Runge–Kutta methodgiven by

yn ¼ yn�1 þ Dtnf tn; ynð Þ;

tn ¼ tn�1 þ Dtn:ð7Þ

BE is an implicit method because the unknown ynappears on both sides of (7), and hence the set ofnonlinear algebraic equations defined by (7) must besolved at each step to obtain the solution at time tn. Ingeneral, these equations are solved using Newton’smethod or one of its variants (see p. 145 of Ascher andPetzold4). Using the notation introduced in this article,an outline of the BE algorithm used in our study is asfollows:

Input: ODE right-hand side f(t, y) and JacobianJ(t, y), initial time t0, final time tf,initial condition y0, time step Dt, error toleranceTOLOutput: A matrix of approximate solution vec-tors yt = t0;y(1, :) = y0;Compute the number of steps needed, nsteps;for n = 1 to nsteps do

Compute the initial guess with one step of FE:yð0Þnþ1 ¼ yn þ Dtfðtn; ynÞ;Initialize iteration counter m = 1;

R. J. SPITERI AND R. C. DEAN3600

Initialize error e ¼ TOLþ 1:0;while e>TOL and m < mmax do

Compute Newton iterate for (7):yðmÞnþ1 ¼ y

ðm�1Þnþ1 � J�1ðtn; yðm�1Þnþ1 Þfðtn; y

ðm�1Þnþ1 Þ;

e ¼ kyðmÞnþ1 � yðm�1Þnþ1 k1;

m = m + 1;end while

if m = mmax then

Exit with failure;end if

Save solution vector yðnþ 1; :Þ ¼ yðmÞnþ1;

Update time t = t + Dt;end for

In our implementation, we use mmax = 10.

We performed the following experiment to compareBE to the three other methods used thus far in thisstudy. As in the section ‘‘Numerical experiments,’’ wedetermined the best execution time for BE when solv-ing the model of Pandit et al. (2003) subject to theconditions on the RRMS error and stimulus durationdescribed previously. The software we used was basedon the code available at Ref. 9 but with the followingthree significant enhancements. First, the code wasgeneralized to solving systems of equations. Second,the code was generalized to use Matlab’s numjacfunction to compute partial derivatives. Third, theoriginal Newton solver was re-written using materialfrom Atkinson and Han.5 The initial guess for yn usedat the start of each step was provided by an FE step,and the Jacobian is recalculated and factored at eachNewton iteration. The BE method was deemed to haveconverged at a given step when the norm of the dif-ference between successive iterates was less than 1025.It is difficult to make many categorical statementsabout poor convergence of a Newton iteration; theclassical causes range from an insufficiently accurateinitial guess to an ill-conditioned iteration matrix. Ourcode lacks a few state-of-the-art options, in particular,a lack of step-size control, globalized Newton itera-tions, and the ability to freeze the Jacobian betweeniterations and/or time steps, all of which can poten-tially aid convergence and/or improve efficiency.Accordingly, despite these enhancements, a moresophisticated BE code should be able to produce evenbetter results in some cases than those that we reportbelow.

We find that BE takes less than 20 s to integrate thismodel, almost 2300 times faster than the most efficientand almost 4500 times faster than the least efficient ofthe methods considered. These results confirm whatcould have been inferred from the eigenvalue data: weneed a stiff solver in order to obtain a solution of themodel of Pandit et al. (2003) efficiently. Further effi-ciency gains for this model may be possible through

the use of higher-order stiff solvers or other non-standard methods as in, e.g., Spiteri and Dean48; suchconsiderations are however beyond the scope of thisstudy.

In order to investigate the efficacy of BE to othermodels in our study, we repeated the above experimentwith the models of Courtemanche et al., Faber et al.,Noble (1962), Noble et al. (1998), and Winslow et al.The stiffness data for these models encompass a wideof behavior and none of the original methods tested(FE, RL, and GRL2) is most efficient on all models.We found that for all five additional models at both 5and 1% RRMS error levels, BE was always slowerthan the fastest method we used in our original study.

There can be expected to be a trade-off betweenmodel stiffness and error tolerance in any given simu-lation. In general, as the tolerance is lowered, themodel must be increasingly stiff over significant por-tions of the interval of integration to benefit from afully implicit solver such as BE with constant step sizesapplied to the entire interval of integration. Cellmodels often do not appear to be highly stiff overmuch of their intervals of integration; rather they aremildly stiff in localized regions. This observation sug-gests that the use of a combination of stiff and non-stiffsolvers (i.e., a type-insensitive solver) may be anattractive approach for many cell models.

Type-Insensitive Methods

As discussed in the section ‘‘Stiffness,’’ obtaining asolution efficiently for a given ODE requires the righttype of method, i.e., stiff or non-stiff, and determiningthe right type of method can be challenging. It is alsopossible that an ODE is stiff in some intervals of theintegration and non-stiff in others. To address theseproblems, type-insensitive solvers have been proposed.A type-insensitive solver consists of both a stiff and anon-stiff solver and a mechanism to automaticallydetermine which method is more appropriate to use atevery step. Often a type-insensitive solver estimates thelargest step size that can be taken by both the stiff andnon-stiff methods after analyzing constraints due tostability and accuracy. This strategy can be seen inPetzold40 and Shampine.46 Another frequently usedtechnique is to determine the stiffness of the ODE byestimating a Lipschitz constant for the problem, e.g.,Butcher10 and Shampine.47

A significant cost when using a type-insensitivesolver for an arbitrary ODE is determining whetherand, if applicable, in which solution interval the ODEis stiff. There is also a risk that the type-insensitivesolver selects the wrong method. In this case, the effi-ciency of the solution process is hindered by both theinappropriate choice of method as well as the cost to

Stiffness Analysis of Cardiac Electrophysiological Models 3601

make the decision to use it. However, using data suchas those presented in Fig. 2, one can mitigate both thecost of determining stiffness as well as the risk ofselecting the wrong method. With these data, it is rel-atively clear where each individual problem is stiff.Accordingly a type-insensitive solver can be hard-co-ded to always use the right type of method at eachpoint in the solution interval, thus all but eliminatingthe additional costs associated with stiffness determi-nation and risk of choosing the less-effective method.

As a concrete example, we look at the model ofWinslow et al. The plot of the extreme eigenvaluesover time in Fig. 2 demonstrates that the degree ofstiffness over time varies considerably over the solutioninterval. As a simple characterization, we consider theproblem to be stiff in the interval [0, 50] and non-stiffin [50, 300]. Using this information, we design a set ofsimple type-insensitive solvers as follows: Apply RL,GRL2, or BE on [0, 50] and FE on [50, 300]. Weconstructed type-insensitive solvers based on a similaranalysis of the extreme eigenvalues of the models ofJafri et al., Bondarenko et al., and Pandit et al. (2001);see Spiteri and Dean49 for the complete figures. Wenote that practical type-insensitive software for realis-tic simulations is likely to require an automatic methodfor choosing the appropriate solver; see, e.g., Sham-pine.47 However, a full discussion of this issue isbeyond the scope of this study.

We performed an experiment as described in theprevious section to compare this type-insensitivemethod to the other three methods discussed in thisstudy. For each model in this experiment we have twostep sizes to consider, one for each method. Accord-ingly we found the pair of step sizes that minimizedexecution time while producing a solution with lessthan 5% RRMS error and present the results inTable 4. We find that the type-insensitive method thatcombines BE with FE is always the best performing,with improvements ranging from 10% to ten timesfaster than the next most efficient single method; recallTable 3 for the results of the single methods. Similarresults hold at 1% RRMS error. The type-insensitivemethods presented here are mainly for proof-of-con-cept; further use of these eigenvalue data or more

elaborate type-insensitive strategies could lead to moreefficient type-insensitive methods.

CONCLUSIONS

In this article, we examined the eigenvalues of theJacobian of a variety of cardiac electrophysiologicalmodels. In particular, we examined the consequencesfor stiffness, which arise from these eigenvalues,and demonstrated how numerical methods could beselected or designed to overcome stiffness.

The extremes of these eigenvalues were presented inthe section ‘‘Eigenvalue data.’’ The wide range ofcardiac electrophysiological models led to considerabledifferences in the eigenvalues from one model toanother. One can infer from these data that there is alarge variation in the stiffness properties among themodels. At one extreme is the non-stiff FHN model; atthe other is the highly stiff model of Pandit et al.(2003). The data suggest that most cell models aremoderately stiff for the typical accuracies required.

Numerical experiments with three integrationmethods (FE, RL, and GRL2) for cell models werediscussed in the section ‘‘Numerical experiments.’’ Thenon-standard methods GRL2 and RL were found tooutperform FE on 33 of the 37 models considered.Individually, each of RL and GRL2 was the mostefficient method on roughly an equal number ofmodels. This observation lends support to the effec-tiveness of the recently proposed GRL2 method, albeitat the cost of a non-trivial implementation. With itsgood stability, RL seems to generally strike a goodbalance between efficient integration and ease ofimplementation. Nonetheless, these methods did notperform satisfactorily on all models. In particular, FE,RL, and GRL2 all face severe step-size restrictions dueto stiffness for the models of Winslow et al. and Panditet al. (2003).

In the cases where FE, RL, and GRL2 produce asolution inefficiently due to step-size restrictions,eigenvalue data can be used to give insight into thecause as well as potential solutions. In the section‘‘Stiff solvers,’’ we observed that the model of

TABLE 4. Stiffness intervals and execution time, in seconds, of type-insensitive methods.

Model Stiff Interval Non-stiff Interval

Time

RL-FE GRL2-FE BE-FE

Bondarenko et al. (2004) [0 10] [10 75] 6.72E21 5.90E21 2.64E21

Jafri et al. (1998) [0 50] [50 300] 8.47E21 9.11E21 5.38E21

Pandit et al. (2001) [105 125] [0 105]; [125 250] 9.86E+0 1.42E+1 7.81E+0

Winslow et al. (1999) [0 50] [50 300] 1.07E+0 7.18E21 2.30E21

R. J. SPITERI AND R. C. DEAN3602

Pandit et al. (2003) is highly stiff for most of thesolution interval. This suggests the use of a stiff solver,such as BE. BE is not commonly used by researchers incell modeling; however, the data and experimentspresented here make a compelling case for its use onsuch models. We compared the solution with BE to thethree other methods in this study and found that BEwas able to produce a solution with at most 5%RRMS error almost 2300 times faster than the nextmost efficient method (FE). In the section ‘‘Type-insensitive methods,’’ we observed that the model ofWinslow et al. is stiff only in a portion of the overallsolution interval. The same was true for the models ofBondarenko et al., Jafri et al., and Pandit et al. (2001).As a way to improve efficiency, we proposed the use ofa type-insensitive method that uses different numericalmethods in the stiff and non-stiff sub-intervals. Spe-cifically we combined RL, GRL2, and BE as stiffsolvers with FE as the non-stiff solver. The BE-FEtype-insensitive solver was able to produce an accept-able solution from about 10% to ten times times fasterthan the next most efficient standard method. We notethat the goal of our studies was to demonstrate howthe eigenvalue data can be used to improve the effi-ciency of the integration rather than to lay claim to themost efficient method for a given model.

REFERENCES

1http://bioeng.washington.edu/jsim/.2Aliev, R. R., and A. V. Panfilov. A simple two-variablemodel of cardiac excitation. Chaos, Solitions and Fractals7(3):293–301, 1996.3Artebrant, R., J. Sundnes, O. Skavhaug, and A. Tveito.A second order method of Rush–Larsen type. TechnicalReport, Simula Research Laboratory, 2008.4Ascher, U. M., and L. R. Petzold. Computer Methods forOrdinary Differential Equations and Differential-Alge-braic Equations. Philadelphia, PA: Society for Industrialand Applied Mathematics (SIAM), 1998.5Atkinson, K., and W. Han. Elementary Numerical Anal-ysis, 3rd ed. Hoboken, NJ: John Wiley & Sons Ltd, 2005.6Beeler, G. W., and H. Reuter. Reconstruction of the actionpotential of ventricular myocardial fibres. J. Physiol.268(1):177–210, 1977.7Bischof, C. H., H. M. Bucker, and A. Vehreschild.A macro language for derivative definition in ADiMat. In:Automatic Differentiation: Applications, Theory, andImplementations, vol. 50, Lecture Notes in ComputerScience Engineering. Berlin: Springer, 2006, pp. 181–188.8Bondarenko, V. E., G. P. Szigeti, G. C. L. Bett, S. J. Kim,and R. L. Rasmusson. Computer model of action potentialof mouse ventricular myocytes. Am. J. Physiol. Heart Circ.Physiol. 287(3):H1378–H1403, 2004.9Burkardt, J. http://orion.math.iastate.edu/burkardt/math2071/be_newton.m.

10Butcher, J. C. Order, stepsize and stiffness switching.Computing 44(3):209–220, 1990.

11Courtemanche, M., R. J. Ramirez, and S. Nattel. Ionicmechanisms underlying human atrial action potentialproperties: insights from a mathematical model. Am. J.Physiol. 275(1):H301–H321, 1998.

12Demir, S. S., J. W. Clark, W. R. Giles. Parasympatheticmodulation of sinoatrial node pacemaker activity in rabbitheart: a unifying model. Am. J. Physiol. 276(6 Pt 2):H2221–H2244, 1999.

13Demir, S. S., J. W. Clark, C. R. Murphey, and W. R. Giles.A mathematical model of a rabbit sinoatrial node cell. Am.J. Physiol. 266(3 Pt 1):C832–C852, 1994.

14DiFrancesco, D., and D. Noble. A model of cardiac elec-trical activity incorporating ionic pumps and concentrationchanges. Philos. Trans. R. Soc. Lond. B Biol. Sci. 307(1133):353–398, 1985.

15Dokos, S., B. Celler, and N. Lovell. Ion currentsunderlying sinoatrial node pacemaker activity: a new singlecell mathematical model. J. Theor. Biol. 181(3):245–272,1996.

16Faber, G. M., and Y. Rudy. Action potential and con-tractility changes in [Na(+)](i) overloaded cardiac myo-cytes: a simulation study. Biophys. J. 78(5):2392–2404,2000.

17FitzHugh, R. Impulses and physiological states in theo-retical models of nerve membrane. Biophys. J. 1(6):445–466, 1961.

18Fox, J. J., J. L. McHarg, and R. F. Gilmour. Ionic mech-anism of electrical alternans. Am. J. Physiol. Heart Circ.Physiol. 282(2):H516–H530, 2002.

19Hairer, E., and G. Wanner. Solving Ordinary DifferentialEquations II: Stiff and Differential-Algebraic Problems,2nd ed. Berlin: Springer-Verlag, 1996.

20Hilgemann, D. W., and D. Noble. Excitation-contractioncoupling and extracellular calcium transients in rabbitatrium: reconstruction of basic cellular mechanisms. Proc.R. Soc. Lond. B Biol. Sci. 230(1259):163–205, 1987.

21Hodgkin, A., and A. Huxley. A quantitative description ofmembrane current and its application to conduction andexcitation in nerve. J. Physiol. (Lond) 117(4):500–544,1952.

22Hund, T.J., and Y. Rudy. Rate dependence and regulationof action potential and calcium transient in a canine cardiacventricular cell model. Circulation 110(20):3168–3174,2004.

23Jafri, M. S., J. J.Rice, and R. L. Winslow. Cardiac Ca2+

dynamics: the roles of ryanodine receptor adaptation andsarcoplasmic reticulum load. Biophys. J. 74(3):1149–1168,1998.

24Kogan, B. Y., W. J. Karplus, B. S. Billett, A. Pang, H. S.Karagueuzian, and S. S. Kahn. The simplified FitzHugh–Nagumo model with action potential duration restitution:effects on 2-D wave propagation. Physica D 50:327–340,1991.

25Lambert, J. D. Numerical Methods for Ordinary Differ-ential Systems: The Initial Value Problem. Chichester: JohnWiley & Sons Ltd., 1991.

26Lloyd, C. M., J. R. Lawson, P. J. Hunter, and P. F.Nielsen. The CellML model repository. Bioinformatics24(18):2122–2123, 2008.

27Luo, C., and Y. Rudy. A model of ventricular cardiacaction potential. Circ. Res. 68(6):1501–1526, 1991.

28Maclachlan, M. C., J. Sundnes, and R. J. Spiteri. A com-parison of non-standard solvers for ODEs describing

Stiffness Analysis of Cardiac Electrophysiological Models 3603

cellular reactions in the heart. Comput. Methods Biomech.Biomed. Eng. 10(5):317–326, 2007.

29Maleckar, M. M., J. L. Greenstein, N. A. Trayanova, andW. R. Giles. Mathematical simulations of ligand-gated andcell-type specific effects on the action potential of humanatrium. Prog. Biophys. Mol. Biol. 98(2–3):161–170, 2008.

30MathWorks Inc., The: Matlab R2008b. http://www.mathworks.com/, 2008.

31McAllister, R. E., D. Noble, and R. W. Tsien. Recon-struction of the electrical activity of cardiac Purkinje fibres.J. Physiol. 251(1):1–59, 1975.

32Nagumo, J., S. Arimoto, and S. Yoshizawa. An activepulse transmission line simulating nerve axon. Proc. IRE50(10):2061–2070, 1962.

33Noble, D. A modification of the Hodgkin–Huxley equa-tions applicable to Purkinje fibre action and pace-makerpotentials. J. Physiol. 160(NIL):317–352, 1962.

34Noble, D., and S. J. Noble. A model of sino-atrial nodeelectrical activity based on a modification of theDiFrancesco-Noble (1984) equations. Proc. R. Soc. Lond.B Biol. Sci. 222(1228):295–304, 1984.

35Noble, D., S. J. Noble, G. C. Bett, Y. E. Earm, W. K. Ho,and I. K. So. The role of sodium-calcium exchange duringthe cardiac action potential. Ann. N. Y. Acad. Sci.639(NIL):334–353, 1991.

36Noble, D., A. Varghese, P. Kohl, and P. Noble. Improvedguinea-pig ventricular cell model incorporating a diadicspace, IKr and IKs, and length- and tension-dependentprocesses. Can. J. Cardiol. 14(1):123–134, 1998.

37Nygren, A., C. Fiset, L. Firek, J. W. Clark, D. S. Lindblad,R. B. Clark, and W. R. Giles. Mathematical model of anadult human atrial cell: the role of K+ currents in repo-larization. Circ. Res. 82(1):63–81, 1998.

38Pandit, S. V., R. B. Clark, W. R. Giles, and S. S. Demir. Amathematical model of action potential heterogeneity inadult rat left ventricular myocytes. Biophys. J. 81(6):3029–3051, 2001.

39Pandit, S. V., W. R. Giles, and S. S. Demir. A mathe-matical model of the electrophysiological alterations in ratventricular myocytes in type-I diabetes.Biophys. J. 84(2 Pt 1):832–841, 2003.

40Petzold, L. Automatic selection of methods for solving stiffand nonstiff systems of ordinary differential equations.SIAM J. Sci. Stat. Comput. 4(1):137–148, 1983.

41Puglisi, J. L., and D. M. Bers. Labheart: an interactivecomputer model of rabbit ventricular myocyte ion channelsand ca transport. Am. J. Physiol. Cell Physiol. 281(6):C2049–C2060, 2001.

42Pullan, A. J., M. J. Buist, and L. K. Cheng. MathematicallyModelling the Electrical Activity of the Heart: From Cell toBody Surface and Back Again. New Jersey: World Scien-tific, 2005.

43Rogers, J., and A. McCulloch. A collocation–galerkin finiteelement model of cardiac action potential propagation.IEEE Trans. Biomed. Eng. 41(8):743–757, 1994.

44Rush, S., and H. Larsen. A practical algorithm for solvingdynamic membrane equations. IEEE Trans. Biomed. Eng.BME-25(4):389–392, 1978.

45Sakmann, B. F., A. J. Spindler, S. M. Bryant, K. W. Linz,and D. Noble. Distribution of a persistent sodium current

across the ventricular wall in guinea pigs. Circ. Res. 87(10):910–914, 2000.

46Shampine, L. F. Type-insensitive ODE codes based onextrapolation methods. SIAM J. Sci. Stat. Comput. 4(4):635–644, 1983.

47Shampine, L. F. Stiffness and the automatic selection ofode codes. J. Comput. Phys. 54:74–86, 1984.

48Spiteri, R. J., and R. C. Dean. On the performance of animplicit-explicit Runge–Kutta method in models of cardiacelectrical activity. IEEE Trans. Biomed. Eng. 55(5):1488–1495, 2008.

49Spiteri, R. J., and R. C. Dean. Stiffness analysis of cardiacelectrophysiological models. Technical Report, Depart-ment of Computer Science, University of Saskatchewan,2009.

50Spiteri, R. J., and M. C. MacLachlan. An efficient non-standard finite difference scheme for an ionic model ofcardiac action potentials. J. Differ. Equ. Appl. 9(12):1069–1081, 2003.

51Stewart, P., O. V. Aslanidi, D. Noble, P. J. Noble, M. R.Boyett, and H. Zhang. Mathematical models of the elec-trical action potential of Purkinje fibre cells. Philos.Transact. A Math. Phys. Eng. Sci. 367(1896):2225–2255,2009.

52Sundnes, J., R. Artebrant, O. Skavhaug, and A. Tveito.A second-order algorithm for solving dynamic cell mem-brane equations. IEEE Trans. Biomed. Eng. 56(10):2546–2548, 2009.

53Sundnes, J., G. T. Lines, X. Cai, B. F. Nielsen, K. A.Mardal, and A. Tveito. Computing the Electrical Activityin the Heart. Berlin: Springer-Verlag, 2006.

54Ten Tusscher, K. H. W. J., D. Noble, P. J. Noble, andA. V. Panfilov. A model for human ventricular tissue. Am.J. Physiol. Heart Circ. Physiol. 286(4):H1573–H189, 2004.

55Ten Tusscher, K. H. W. J., and A. V. Panfilov. Cell modelfor efficient simulation of wave propagation in humanventricular tissue under normal and pathological condi-tions. Phys. Med. Biol. 51(23):6141–6156, 2006.

56Van Capelle, F. J. L., and D. Durrer. Computer simulationof arrhythmias in a network of coupled excitable elements.Circ. Res. 47:454–466, 1980.

57Vigmond, E. J., R. W. dos Santos, A. J. Prassl, M. Deo,and G. Plank. Solvers for the cardiac bidomain equations.Prog. Biophys. Mol. Biol. 96(1–3):3–18, 2008.

58Wang, L. J., and E. A. Sobie. Mathematical model of theneonatal mouse ventricular action potential. Am. J. Phys-iol. Heart Circ. Physiol. 294(6):H2565–H2575, 2008.

59Winslow, R. L., J. Rice, S. Jafri, E. Marban, andB. O’Rourke. Mechanisms of altered excitation-contractioncoupling in canine tachycardia-induced heart failure, IImodel studies. Circ. Res. 84(5):571–586, 1999.

60Ying, W., D. J. Rose, and C. S. Henriquez. Efficient fullyimplicit time integration methods for modeling cardiacdynamics. IEEE Trans. Biomed. Eng. 55(12):2701–2711,2008.

61Zhang, H., A. V. Holden, I. Kodama, H. Honjo, M. Lei,T. Varghese, and M. R. Boyett. Mathematical models ofaction potentials in the periphery and center of the rabbitsinoatrial node. Am. J. Physiol. Heart Circ. Physiol.279(1):H397–H421, 2000.

R. J. SPITERI AND R. C. DEAN3604