Introduction

The electrocardiogram (ECG) is a noninvasive recording of the electrical activity of the heart, obtained from a standard set of skin electrodes and presented to the physician as the “12-lead ECG”: i.e., 12 graphs of the recorded voltage vs. time. The ECG can be considered as the most widely used clinical tool for the detection and diagnosis of a broad range of cardiac conditions (see e.g. Aehlert,1 Goldberger24). Despite that, the clinical significance of some ECG findings is still not fully understood. Computer based simulations of the ECG, linking models of the electrical activity of the heart (in normal or pathological condition) to the ECG signal, can therefore be a valuable tool for improving this knowledge. Such an ECG simulator can also be useful in building a virtual data base of pathological conditions, in order to test and train medical devices.16 Moreover, being able to simulate realistic ECGs is a necessary step toward the development of patient-specific models from clinical ECG data.

The mathematical modeling of the ECG is known as the forward problem of electrocardiography.32 It relies on three main ingredients: a model for the electrical activity of the heart, a model for the torso (extracardiac regions) and some specific heart–torso coupling conditions. Within each of these components, several options are possible, with different levels of complexity and realism (see Lines et al. 32 for a recent comprehensive review).

Although many works have been devoted to the numerical simulation of cardiac electrophysiology (see e.g. the monographs44,47,51 and the references therein), only a small number28,30,32,41,43,54 addresses the numerical simulation of ECGs using a whole-heart reaction-diffusion (i.e. bidomain or monodomain) model. Among them, only a very few41,43 provide meaningful simulations of the complete 12-lead ECG. These simulations rely on a monodomain description of the electrical activity of the heart, a decoupling of the heart and the torso (isolated heart assumption) and a multi-dipole approximation of the cardiac source within the torso (see Sect. 4.2.4 in Lines et al.,32 and Gulrajani26). To the best of our knowledge, none of the existing approaches based on partial differential equations (PDE) and a fully coupled heart–torso formulation (see e.g. Sect. 4.6 in Lines et al.,32 and Sundnes et al. 51) have shown realistic 12-lead ECG simulations.

The main ingredients of our mathematical ECG model are standard (see e.g. Lines et al.,32 Pullan et al.,44 Sundnes et al. 51): bidomain equations and phenomenological cell model for the heart, and a generalized Laplace equation for the torso. Nevertheless, once these ingredients have been chosen, several other critical aspects have to be elucidated: heart–torso transmission conditions, cell heterogeneity, His bundle modeling, anisotropy, etc.

The purpose of the present work is therefore twofold: first, provide realistic simulations of the 12-lead ECG based on a complete PDE model with a fully coupled heart–torso formulation; second, discuss through numerical simulations the impact of various modeling options and the sensitivity to the model parameters. Note that the achievement of these two goals is a fundamental step prior to addressing the inverse problem of electrocardiography, which consists in identifying the ECG model parameters from clinical ECG data.

The numerical methods proposed to solve the problem offer a good balance between efficiency, stability and accuracy. The PDE system made of the heart and torso models is solved using a finite element method and a second order semi-implicit time marching scheme (see e.g. Quarteroni et al. 45). The coupling conditions at the heart–torso interface are enforced by a Dirichlet-Neumann domain decomposition algorithm (see e.g. Quarteroni and Valli,46 Toselli and Widlund53).

The remainder of this paper is organized as follows. The ECG model equations are presented in “Modeling” section. The section “Numerical Methods” is devoted to the description of the numerical algorithm. The numerical ECGs obtained with the resulting computational model, under a healthy and a pathological (bundle branch block) condition, are presented and discussed in “Numerical Results” section. The section “Impact of Some Modeling Assumptions” investigates the impact, on the ECG, of various modeling assumptions: heart–torso uncoupling, monodomain approximation, isotropy, cell homogeneity, resistance–capacitance behavior of the pericardium. In “Numerical Investigations with Weak Heart–Torso Coupling” section, we present a time and space convergence study in terms of the ECG. The sensitivity of the ECG to the main model parameters is also investigated. At last, conclusions and some lines of forthcoming research are drawn in “Conclusion” section.

Modeling

This section contains standard material (see e.g. Chapter 2 in Sundnes et al. 51). It introduces notation and the coupled system of partial and ordinary differential equations (PDE/ODE) involved in the reference mathematical model considered in this paper.

Heart Tissue

Our reference model for the electrical activity of the heart is the so-called bidomain model.44,51,55 This macroscopic model is based on the assumption that, at the cell scale, the cardiac tissue can be viewed as partitioned into two ohmic conducting media, separated by the cell membrane: intracellular, made of the cardiac cells, and extracellular which represents the space between them. After an homogenization process (see Neu and Krassowska,37 Pennacchio et al. 39), the intra- and extracellular domains can be supposed to occupy the whole heart volume ΩH (this also applies to the cell membrane). Hence, the averaged intra- and extracellular densities of current, \({\user2{j}}_{\rm i} \) and \({\user2{j}}_{\rm e},\) conductivity tensors, \({\varvec{\sigma}}_{\rm i} \) and \({\varvec{\sigma}}_{\rm e},\) and electric potentials, u i and u e, are defined in ΩH. The electrical charge conservation becomes

$$ \hbox{div} ({\user2{j} }_{\rm i} +{\user2{j}}_{\rm e} )=0,\quad \hbox{in}\; \Upomega_{\rm H}, $$
(2.1)

and the homogenized equation of the electrical activity of the cell membrane is given by

$$ A_{\rm m}\left(C_{\rm m} \frac{\partial {V_{\rm m}}}{\partial {t}} + I_{\rm ion}(V_{\rm m},w)\right) + \hbox{div} ({\user2{j}}_{\rm i}) = A_{\rm m} {I_{\rm app}}, \quad \hbox{in}\; \Upomega_{\rm H}, $$
(2.2)

complemented with the Ohm’s laws

$$ {\user2{j}}_{\rm i} =-{\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} u_{\rm i},\quad {\user2{j}}_{\rm e} =-{\varvec{\sigma}}_{\rm e} {\varvec{\nabla}} u_{\rm e}. $$
(2.3)

Here, V m stands for the transmembrane potential, defined as

$$ V_{\rm m} \,{\mathop{=}\limits^{\rm def}}\,u_{\rm i} -u_{\rm e}, $$
(2.4)

A m is a constant representing the rate of membrane area per volume unit and C m the membrane capacitance per area unit. The term I ion(V mw) represents the ionic current across the membrane and I app a given applied current stimulus. Both currents are measured per membrane area unit.

In general, the ionic variable w (possibly vector valued) satisfies a system of ODE of the type:

$$ \frac{\partial {w}}{\partial {t}} + g(V_{\rm m},w)= 0,\quad \hbox{in}\; \Upomega_{\rm H}. $$
(2.5)

The definition of the functions g and I ion depends on the considered cell ionic model (see Pullan et al.,44 Sundnes et al., 51 Tung,55 and the references therein). According to their degree of complexity and realism, the ionic models typically fall into one of the following categories (see Chapter 3 in Pullan et al. 44): phenomenological (e.g. Fenton and Karma,18 Fitzhugh,19 Mitchell and Schaeffer,36 and van Capelle and Durrer56) or physiological (e.g. Beeler and Reuter,4 Djabella and Sorine,15 Luo and Rudy,33,34 and Noble et al. 38).

In this study, the phenomenological two-variable model proposed by Mitchell and Schaeffer36 is considered (rescaled version). The functions g and I ion are then given by

$$ \begin{aligned} {I_{\rm ion}}(V_{\rm m},w) & = - \frac{ w}{\tau_{\rm in}} \frac{{(V_{\rm m}-V_{\rm min})}^{2}{(V_{\rm max}-V_{\rm m})}} {V_{\rm max}-V_{\rm min}} + \frac{1}{\tau_{\rm out}} \frac{V_{\rm m}-V_{\rm min}}{V_{\rm max}-V_{\rm min}},\\ g(V_{\rm m},w) &= \left\{ \begin{array}{ll} \frac{w}{\tau_{\rm open}} -\frac{1}{\tau_{\rm open}(V_{\rm max}-V_{\rm min})^2} &\hbox{if } V_{\rm m} < V_{\rm gate},\\ \frac{w}{\tau_{\rm close}} & \hbox{if } V_{\rm m} > V_{\rm gate},\\ \end{array}\right. \end{aligned} $$
(2.6)

where τin, τout, τopen, τclose, V gate are given parameters and V min, V max scaling constants (typically −80 and 20 mV, respectively).

Despite its reduced complexity (2 state variables, 5 free parameters), the Mitchell-Schaeffer model integrates relevant physiological properties of the cell membrane: transmembrane potential, activation dynamics and two currents (inward and outward) leading to depolarization and repolarization. Moreover, owing to its planar character, the model can be understood analytically (see e.g. Mitchell and Schaeffer36), which allows to identify how the free parameters affect its behavior (see “Cell Heterogeneity” section).

The gate variable w depends on the change-over voltage V gate and on the time constants for opening, τopen, and closing, τclose. The time constants τin and τclose are respectively related to the length of the depolarization and repolarization (final stage) phases. Typically, these constants are such that τin ≪ τout ≪ τopen, τclose.

To sum up, the system of equations modeling the electrical activity within the heart is

$$ \left\{ \begin{array}{ll} A_{\rm m}\left(C_{\rm m} \frac{\partial V_{\rm m}}{\partial {t}} +I_{\rm ion} (V_{\rm m},w)\right) -\hbox{div}({\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} V_{\rm m}) - \hbox{div} ({\varvec{\sigma}}_{\rm i} {\varvec{\nabla}}u_{\rm e}) =A_{\rm m} {I_{\rm app}},&\hbox{in } \Upomega_{\rm H},\\ - \hbox{div} (({\varvec{\sigma}}_{\rm i} + {\varvec{\sigma}}_{\rm e}) {\varvec{\nabla}} u_{\rm e}) - \hbox{div} ({\varvec{\sigma}}_{\rm i}{\varvec{\nabla}} V_{\rm m})=0, &\hbox{in } \Upomega_{\rm H},\\ \frac{\partial {w}}{\partial {t}} + g(V_{\rm m},w) = 0,&\hbox{in } \Upomega_{\rm H}, \end{array}\right. $$
(2.7)

with g and I ion given by (2.6). This system has to be complemented with appropriate initial and boundary conditions. Denoting by \(V_{\rm m}^0\) and w 0 given initial data for the transmembrane potential and the gate variable, the following initial condition must be enforced

$$ V_{\rm m}(\user2{x},0) = V_{\rm m}^0(\user2{x}),\quad w(\user2{x},0) = w^0(\user2{x})\quad \forall\user2{x}\in {\Upomega_{\rm H}}. $$
(2.8)

As regards the boundary conditions on \(\Upsigma \,{\mathop{=}\limits^{\rm def}}\, \partial {\Upomega_{\rm H}}\) (see Fig. 1), it is widely assumed (see e.g. Krassowska and Neu,31 Pullan et al.,44 Sundnes et al.,51 and Tung55) that the intracellular current does not propagate outside the heart. Consequently,

$$ {\user2{j}}_{\rm i} \cdot \user2{n} = {\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} u_{\rm i} \cdot \user2{n}=0,\quad \hbox{on}\; \Upsigma, $$

where \(\user2{n}\) stands for the outward unit normal to ΩH. Equivalently, and owing to the divergence structure of (2.7)1, this condition can be enforced as

$$ {\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} V_{\rm m} \cdot \user2{n} + {\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} u_{\rm e} \cdot \user2{n} = 0,\quad \hbox{on }\Upsigma. $$
(2.9)
Figure 1
figure 1

Geometry description: the heart domain ΩH and the torso domain ΩT (extramyocardial regions)

Coupling with Torso

To set up boundary conditions on the extracellular potential u e, a perfect electric transmission between the heart and the torso domains is generally assumed (see e.g. Krassowska and Neu,31 Pullan et al.,44 Sundnes et al.,51 and Tung55):

$$ \left\{ \begin{array}{ll} u_{\rm e} =u_{\rm T},&\hbox{on }\Upsigma,\\ {\varvec{\sigma}}_{\rm e} {\varvec{\nabla}} u_{\rm e} \cdot \user2{n} ={\varvec{\sigma}}_{\rm T} {\varvec{\nabla}} u_{\rm T} \cdot \user2{n},&\hbox{on }\Upsigma. \end{array}\right. $$
(2.10)

Here, u T and \({\varvec{\sigma}}_{\rm T} \) stand respectively for the potential and conductivity tensor of the torso tissue, denoted by ΩT (see Fig. 1). Note that, with (2.9), the current continuity condition (2.10)2 is consistent with the divergence structure of (2.7)2. Other possible heart–torso transmission conditions will be discussed in “Heart–Torso Uncoupling” and “Capacitive and Resistive Effect of the Pericardium” sections.

Under the quasi-static assumption,35 the torso can be viewed as a passive conductor. Therefore, the potential u T satisfies the generalized Laplace equation:

$$ \hbox{div} \left({\varvec{\sigma}}_{\rm T} {\varvec{\nabla}} u_{\rm T}\right)=0,\quad \hbox{in}\; \Upomega_{\rm T}. $$
(2.11)

This equation is complemented with a boundary condition on the external boundary \({\Upgamma_{\rm ext}} \,{\mathop{=}\limits^{\rm def}}\, \partial{\Upomega_{\rm T}}\setminus\Upsigma\) (see Fig. 1). Moreover, assuming that no current can flow from the torso across Γext, we enforce

$$ {\varvec{\sigma}}_{\rm T} {\varvec{\nabla}} u_{\rm T} \cdot \user2{n}_{\rm T}=0,\quad\hbox{on}\;{\Upgamma_{{\rm ext}}}, $$
(2.12)

where \(\user2{n}_{\rm T}\) stands for the outward unit normal to ΩT.

In summary, our reference model for the ECG is based on the coupled solution of systems (2.7), (2.6) and (2.11), completed with the boundary conditions (2.9) and (2.12), the interface conditions (2.10) and the initial condition (2.8). Throughout this study, this system of equations will be termed RM (reference model), which is also known in the literature as full bidomain model (see e.g. Clements et al. 9). The interested reader is referred to Boulakia et al. 7 for a recent study on the mathematical well-posedness of this system, under appropriate assumptions on the structure of I ion and g.

Although additional complexity and realism can still be introduced through the ionic model (see e.g. Beeler and Reuter,4 Djabella and Sorine,15 Luo and Rudy,33,34 and Noble et al. 38), this coupled system can be considered as the state-of-the-art in the PDE/ODE modeling of the ECG (see e.g. Lines et al. 32).

Numerical Methods

This section is devoted to a brief presentation of the numerical method used to solve the coupled problem RM.

Space and Time Discretization

The discretization in space is performed by applying the finite element method to an appropriate weak formulation of this coupled problem. Let Ω be the interior of \(\overline{\Upomega}_{\rm H}\cup\overline{\Upomega}_{\rm T}.\) Problem RM can be rewritten in weak form as follows (see e.g. Boulakia et al. 7): for t > 0, find V m(·, t) ∈ H 1H), w(·, t) ∈ L H) and u(·, t) ∈ H 1(Ω), with \(\int_{{\Upomega_{\rm H}}}u = 0,\) such that

$$ \left\{ \begin{array}{l} A_{\rm m} \int_{\Upomega_{\rm H}}\left( C_{\rm m}\frac{\partial {V_{\rm m}}}{\partial {t}} + {I_{\rm ion}} (V_{\rm m},w) \right) \phi + \int_{{\Upomega_{\rm H}}}{\varvec{\sigma}}_{\rm i} {\varvec{\nabla}}(V_{\rm m} + u)\cdot {\varvec{\nabla}} \phi = A_{\rm m} \int_{{\Upomega_{\rm H}}} {I_{\rm app}} \phi, \\ \int_{{\Upomega_{\rm H}}} ({\varvec{\sigma}}_{\rm i} +{\varvec{\sigma}}_{\rm e} ) {\varvec{\nabla}} u\cdot{\varvec{\nabla}} \psi + \int_{{\Upomega_{\rm H}}} {\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} V_{\rm m}\cdot{\varvec{\nabla}} \psi +\int_{{\Upomega_{\rm T}}} {\varvec{\sigma}}_{\rm T} {\varvec{\nabla}} u \cdot{\varvec{\nabla}} \psi = 0, \\ \frac{\partial{w}}{\partial{t}}+g(V_{\rm m},w)= 0,\quad \hbox{in}\; {\Upomega_{\rm H}}, \end{array} \right. $$
(3.13)

for all \((\phi,\psi) \in H^1({\Upomega_{\rm H}}) \times H^1(\Upomega),\) with \(\int_{{\Upomega_{\rm H}}}\psi = 0.\) The potentials in the heart and the torso are recovered by setting \(u_{\rm e} = u_{\vert {\Upomega_{\rm H}}}\) and \(u_{\rm T} = u_{\vert {\Upomega_{\rm T}}}.\) Note that this weak formulation (3.13) integrates, in a natural way, the coupling conditions (2.10).

The space semi-discretized formulation is based on (3.13) and obtained by replacing the functional spaces by finite dimensional spaces of continuous piecewise affine functions, \(V_h \subset H^1({\Upomega_{\rm H}})\) and \(W_h \subset H^1(\Upomega).\)

The resulting system is discretized in time by combining a second order implicit scheme (backward differentiation formulae, see e.g. Quarteroni et al. 45) with an explicit treatment of the ionic current. We refer to Ethier and Bourgault17 for a recent review which suggests the use of second order schemes. Let \(N \in {{\mathbb{N}}}^*\) be a given integer and consider a uniform partition \(\{ [t_n,t_{n+1}]\}_{0\leq n\leq N-1},\) with \(t_n \,{\mathop{=}\limits^{\rm def}}\,n\delta t,\) of the time interval of interest [0, T], with a time-step \(\delta t \,{\mathop{=}\limits^{\rm def}}\,T/N .\) Denote by \((V_{\rm m}^{n},u^n,w^{n})\) the approximated solution obtained at time t n . Then, \((V_{\rm m}^{n+1},u^{n+1},w^{n+1})\) is computed as follows: For 0 ≤ n ≤ N − 1

  1. 1.

    Second order extrapolation: \(\widetilde{V}_{\rm m}^{n+1}\,{\mathop{=}\limits^{\rm def}}\,2V_{\rm m}^{n}-V_{\rm m}^{n-1}\);

  2. 2.

    Solve for w n+1 ∈ V h :

    $$ \frac{1}{\delta t}\left(\frac{3}{2} w^{n+1} - 2 w^{n} +\frac{1}{2} w^{n-1}\right) + g({\widetilde V}_{\rm m}^{n+1}, w^{n+1})=0,\quad \hbox{(nodal-wise)}; $$
  3. 3.

    Ionic current evaluation: \({I_{\rm ion}}\left({\widetilde V_{\rm m}^{n+1}},w^{n+1}\right);\)

  4. 4.

    Solve for \(\left(V_{\rm m}^{n+1},u^{n+1}\right)\in V_h\times W_h,\) with \(\int_{{\Upomega_{\rm H}}}u^{n+1} = 0\):

    $$ \left\{ \begin{array}{l} A_{\rm m}{\int_{\Upomega_{\rm H}}}\frac{C_{\rm m}}{\delta t} \left(\frac{3}{2}V_{\rm m}^{n+1} - 2V_{\rm m}^{n} +\frac{1}{2} V_{\rm m}^{n-1} \right)\phi + \int_{{\Upomega}_{\rm H}} {\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} \left(V_{\rm m}^{n+1 } + u^{n+1 }\right) \cdot {\varvec{\nabla}} \phi\\ \qquad\qquad= A_{\rm m}\int_{\Upomega_{\rm H}}\left(I_{\rm app} \left(t_{n+1}\right) - I_{\rm ion} \left({\widetilde V_{\rm m}^{n+1}},w^{n+1}\right) \right)\phi, \\ \int_{\Upomega_{\rm H}}\left({\varvec{\sigma}}_{\rm i}+{\varvec{\sigma}}_{\rm e} \right){\varvec{\nabla}} u^{n+1}\cdot{\varvec{\nabla}} \psi + \int_{\Upomega_{\rm H}} {\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} V_{\rm m}^{n+1}\cdot{\varvec{\nabla}} \psi +\int_{\Upomega_{\rm T}} {\varvec{\sigma}}_{\rm T} {\varvec{\nabla}} u^{n+1}\cdot{\varvec{\nabla}} \psi = 0, \end{array} \right. $$
    (3.14)

    for all (ϕ, ψ) ∈ V h × W h , with \(\int_{\Upomega_{\rm H}}{\psi} = 0.\) Finally, set \(u_{\rm e} ^{n+1} = u^{n+1}_{\vert {\Upomega_{\rm H}}}\) and \(u_{\rm T} ^{n+1} = u^{n+1}_{\vert {\Upomega_{\rm T}}}.\)

The above algorithm is semi-implicit (or semi-explicit) since, owing to the extrapolation Step 1, it allows the uncoupled solution of Steps 2 and 4, which are computationally demanding. The interested reader is referred to Sect. 4.6 in Lines et al. 32 for an analogous approach, using a different time discretization scheme and to Colli Franzone and Pavarino,10 Gerardo-Giorda et al.,23 Scacchi et al.,48 and Vigmond et al. 58 for a description of various computational techniques (preconditioning, parallel computing, etc.) used for the numerical resolution of the bidomain equations.

Partitioned Heart–Torso Coupling

At each time step, the linear problem (3.14) requires the coupled solution of the transmembrane potential \(V_{\rm m}^{n+1}\) and the heart–torso potential u n+1. This coupling can be solved monolithically, i.e., after full assembling of the whole system matrix (see e.g. Sects. 4.6 and 4.5.1 in Lines et al.,32 and Buist and Pullan,8 Sundnes et al. 51,52). But this results in a increased number of unknowns with respect to the original bidomain system. Moreover, this procedure is less modular since the bidomain and torso equations cannot be solved independently.

This shortcoming can be overcome using a partitioned iterative procedure based on domain decomposition (see e.g. Quarteroni and Valli,46 Toselli and Widlund53). In this study, the heart–torso coupling is solved using the so-called Dirichlet-Neumann algorithm, combined with a specific acceleration strategy. A related approach is adopted in Buist and Pullan8 (see also Lines et al.,32 Pullan et al. 44), using an integral formulation of the torso equation (2.11).

The main idea consists in (k-)iterating between the heart and torso equations via the interface conditions

$$ \left\{ \begin{array}{ll} u_{\rm T}^{n+1,k+1} =u_{\rm e}^{n+1,k},& {\text{on}} \ \Upsigma, \\ {\varvec{\sigma}}_{\rm e}{\varvec{\nabla}}u_{\rm e}^{n+1,k+1}\cdot \user2{n} ={\varvec{\sigma}}_{\rm T}{\varvec{\nabla}} u_{\rm T} ^{n+1,k+1} \cdot\user2{n},&{\text{on}} \ \Upsigma. \end{array} \right. $$

Hence, the monolithic solution is recovered at convergence. In the framework of (3.14), this amounts to decompose the discrete test function space W h as the direct sum \(W_h = Z_{h,0} \oplus {{\mathcal{L}}} V_h .\) The subspace \(Z_{h,0}\) contains the functions of W h vanishing in \(\overline{\Upomega_{\rm H}},\) whereas \({{\mathcal{L}}} V_h\) is the range of the standard extension operator \({{\mathcal{L}}}:V_h \rightarrow W_h\) satisfying, for all ψe ∈ V h ,

$$ \left\{ \begin{array}{ll} {{\mathcal{L}}}\psi_{\rm e} = \psi_{\rm e}, & {\text{in}} \ \overline{\Upomega_{\rm H}},\\ {{\mathcal{L}}}\psi_{\rm e} = 0, &{\text{on}} \ {\Upgamma_{{\rm ext}}}.\\ \end{array} \right. $$

The full algorithm used in this paper to solve (3.14) reads as follows: For k ≥ 0, until convergence,

  • Torso solution (Dirichlet):

    $$ \begin{array}{ll} u_{\rm T}^{n+1,k+1} =u_{\rm e} ^{n+1,k},& {\text{on}} \ \Upsigma,\\ \int_{{\Upomega_{\rm T}}}{\varvec{\sigma}}_{\rm T} {\varvec{\nabla}} u_{\rm T}^{n+1,k+1}\cdot{\varvec{\nabla}} \psi_{\rm T} = 0,& \forall \psi_{\rm T} \in Z_{h,0}. \end{array} $$
  • Heart-bidomain solution (Neumann):

    $$ \left\{ \begin{array}{l} A_{\rm m} \int_{\Upomega_{\rm H}}\frac{C_{\rm m}}{\delta t} \left(\frac{3}{2} V_{\rm m}^{n+1,k+1} - 2 V_{\rm m}^{n }+ \frac{1}{2}V_{\rm m}^{n-1}\right)\phi\\ \qquad\qquad+ \int_{\Upomega_{\rm H}}{\varvec{\sigma}}_{\rm i} {\varvec{\nabla}}\left(V_{\rm m}^{n+1,k+1} + \widehat{u_{\rm e} ^{n+1,k+1}}\right) \cdot {\varvec{\nabla}} \phi\\ \qquad\qquad = A_{\rm m}\int_{{\Upomega_{\rm H}}}\left({I_{\rm app}} (t_{n+1}) - {I_{\rm ion}}\left({\widetilde V_{\rm m}^{n+1}},w^{n+1}\right)\right)\phi,\\ \int_{\Upomega_{\rm H}}\left({\varvec{\sigma}}_{\rm i} +{\varvec{\sigma}}_{\rm e} \right){\varvec{\nabla}} \widehat{u_{\rm e}^{n+1,k+1}}\cdot{\varvec{\nabla}} \psi_{\rm e} + \int_{\Upomega_{\rm H}}{\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} V_{\rm m}^{n+1,k+1}\cdot{\varvec{\nabla}} \psi_{\rm e}\\ \qquad\qquad=-\int_{\Upomega_{\rm T}}{\varvec{\sigma}}_{\rm T} {\varvec{\nabla}}u_{\rm T}^{n+1,k+1}\cdot{\varvec{\nabla}} {{\mathcal{L}}}\psi_{\rm e},\\ \end{array} \right. $$
    (3.15)

    for all ϕ ∈ V h and ψe ∈ V h , with \(\int_{\Upomega_{\rm H}}\psi_{\rm e} = 0.\)

  • Relaxation step:

    $$ {u_{\rm e}^{n+1,k+1}}_{\vert \Upsigma} \longleftarrow \omega_k \widehat{u_{\rm e}^{n+1,k+1}}_{\vert \Upsigma} + (1-\omega_k){u_{\rm e} ^{n+1,k}}_{\vert \Upsigma}. $$

The coefficient ω k is a dynamic relaxation parameter which aims to accelerate the convergence of the iterations. In this work, the following explicit expression, based on a multidimensional Aitken formula (see e.g. Irons and Tuck29), has been considered

$$ \omega_k = \frac{\left(\lambda^k- \lambda^{k-1}\right) \cdot \left(\lambda^k - \widehat \lambda^{k+1} - \lambda^{k-1} + \widehat{\lambda^{k}}\right)}{ \left|\lambda^k - \widehat{\lambda^{k+1}} - \lambda^{k-1} + \widehat{\lambda^{k}}\right|^2},\quad \lambda^k \,{\mathop{=}\limits^{\rm def}}\, {u_{\rm e} ^{n+1,k}}_{\vert \Upsigma}. $$

Numerical Results

In this section, it is shown that the full PDE/ODE based model RM, completed by additional modeling assumptions, allows to get meaningful 12-lead ECG signals. Moreover, the predictive capabilities of the model are illustrated by providing realistic numerical ECG signals for some known pathologies, without any other calibration of the model than those directly related to the pathology.

Reference Simulation

Throughout this paper, the terminology “reference simulation” (or RS) refers to the 12-lead numerical ECG signals obtained by solving the reference model RM of “Modeling” section with the numerical method described in “Numerical methods” section and the modeling assumption described in the following paragraphs. The model parameters used in the RS are summed up in Tables 13 below and, as initial data, we have taken \(V_{\rm m}^0 = V_{\rm min}\) and \(w^0 =1/\left(V_{\rm max}-V_{\rm min}\right)^2.\)

Anatomical Model and Computational Meshes

The torso computational geometry (see Fig. 2), including the lung and main bone regions, was obtained starting from the Zygote (http://www.3dscience.com) model—a geometric model based on actual anatomical data—using the 3-matic (http://www.materialise.com) software to obtain computationally-correct surface meshes. The heart geometry is simplified, based on intersecting ellipsoids, so that the fibers orientation can be parametrized in terms of analytical functions. We refer to Sermesant et al. 49 for the details of the geometrical definition of the heart. Note that this simplified geometry only includes the ventricles. We therefore cannot simulate the P-wave of the ECG.

Figure 2
figure 2

Computational torso mesh

The 3D computational meshes of the torso and the heart are displayed in Figs. 2 and 3. They have been obtained by processing the surface meshes with the softwares Yams 21 and GHS3D .22

Figure 3
figure 3

Computational heart mesh (left) and heart fiber directions (right)

Heart Conductivity

Cardiac muscle is made of fibers. The electrical conductivity is higher along the fiber direction than along the cross-fiber direction. The intracellular and extracellular media are therefore anisotropic. This anisotropy is included in our model defining the conductivity tensors \({\varvec{\sigma}}_{\rm i} \) and \({\varvec{\sigma}}_{\rm e} \) by:

$$ {\varvec{\sigma}}_{{\rm i},{\rm e}}(x) \,{\mathop{=}\limits^{\rm def}}\, \sigma_{{\rm i},{\rm e}} ^{\rm t} \user2{I} +( \sigma_{{\rm i},{\rm e}}^{{\rm l}} - \sigma_{{\rm i}, {\rm e}} ^{\rm t} ){\user2{{a}} }(x)\otimes {\user2{{a}} }(x), $$
(4.16)

where \({\user2{{a}}}(x)\) is a unit vector parallel to the local fiber direction (Fig. 3) and \(\sigma_{{\rm i},e}^{{\rm l}}\) and \(\sigma_{{\rm i},e}^{\rm t}\) are respectively the conductivity coefficients in the intra- and extra-cellular media measured along the fibers direction and in the transverse direction. Different conductivities values are available in the literature (see e.g. Clements et al.,9 Malmivuo and Plonsey,35 Sundnes et al. 51). The values used in our simulations, originally reported in Potse et al.,42 are given in Table 1. As mentioned above, the fibers directions have been set as in Sermesant et al. 49

Table 1 Heart conductivity parameters

Torso Conductivity

We assume that the torso has isotropic conductivity, i.e. \({\varvec{\sigma}}_{\rm T}\) is diagonal \({\varvec{\sigma}}_{\rm T} = \sigma_{\rm T} \user2 I,\) and that the scalar heterogeneous conductivity σT takes three different values:

$$ \sigma_{\rm T}= \left\{ \begin{array}{ll} \sigma_{\rm T}^{{\rm l}} & \quad \hbox{lungs},\\ \sigma_{\rm T}^{{\rm b}}, & \quad \hbox{bone},\\ \sigma_{{\rm T}}^{{\rm t}}, & \quad \hbox{remaining\ regions,}\\ \end{array} \right. $$

given in Table 2.

Table 2 Torso conductivity parameters

His Bundle and Purkinje Fibers

The His bundle quickly transmits the activation from the atrioventricular node to the ventricles. It is made of three main branches in the septum and gives rise to the thin Purkinje fibers in the ventricular muscle. The activation travels from the His bundle to the ventricular muscle in about 40 ms. Interesting attempts at modeling the His bundle and the Purkinje fibers have been presented in the literature (see e.g. Vigmond and Clements57). But a physiological model of this fast conduction network coupled to a 3D model of the myocardium raises many modeling and computational difficulties: the fiber network has to be manually defined whereas it cannot be non-invasively obtained from classical imaging techniques; the results are strongly dependent on the density of fibers which is a quantity difficult to determine; the time and the space scales are quite different in the fast conduction network and in the rest of the tissue which can be challenging from the computational standpoint.

To circumvent these issues, we propose to roughly model the Purkinje system by initializing the activation with a (time-dependent) external volume current, acting on a thin subendocardial layer (both left and right parts). The propagation speed of this initial activation is a parameter of the model (see the details in Appendix). Although this approach involves a strong simplification of the reality, it allows a simple and quite accurate control of the activation initialization, which is a fundamental aspect in the simulation of correct ECGs.

Cell Heterogeneity

Action potential duration (APD) heterogeneity may be found at different myocardium locations, for instance: between base and apex, between septal and posterior sides, and transmurally (see e.g. Franz et al. 20). Although not yet fully explained (see e.g. Conrath and Opthof,13 for a review), experimental evidence2,20,27,59 suggests that transmural APD heterogeneity is likely to be the most important factor in the genesis of the normal ECG T-wave shape and polarity. A number of simulation studies5,14,30,40,41 confirm also this (still debated) postulate. Interestingly, the numerical investigations recently reported in Colli Franzone et al. 11 (using a highly idealized geometry) indicate that the polarity of the T-wave (for unipolar ECG leads) may be mainly driven by the cardiac tissue anisotropy.

In the present work, cell heterogeneity is only considered as transmural variation of APD in the left ventricle. Hence, we assume that epicardial cells have the shortest APD and that endocardial cells have an intermediate APD between mid-myocardial cells (M-cells) and epicardial cells (see e.g. Yan and Antzelevitch59). From the analysis reported in Sect. 3.1 in Mitchell and Schaeffer,36 the leading order of the maximum APD provided by the Mitchell-Schaeffer ionic model (2.6) is proportional to the parameter τclose. Thus, the APD heterogeneity is modeled with a parameter τclose varying across the left ventricle transmural direction: \(\tau_{\rm close}^{{\rm endo}}\) near the endocardium, \(\tau_{\rm close}^{{\rm mcell}}\) in the mid-myocardium (M-cells) and \(\tau_{\rm close}^{{\rm epi}}\) near the epicardium (see Fig. 4). For simplicity, we take a constant value of \(\tau_{\rm close}^{{\rm RV}}\) in the whole right ventricle. The values of the parameters are given in Table 3.

Figure 4
figure 4

Transmural APD heterogeneity: comparison of the simulated transmembrane potentials for endocardial cells (green), M-cells (red) and epicardial cells (blue). Snapshots of the transmembrane potential at times t = 60 and 300 ms

Table 3 Cell membrane parameters

Results

The ECGs are computed according to the standard 12-lead ECG definition (see Malmivuo and Plonsey,35 for instance):

$$ \begin{aligned} {\rm I} & \,{\mathop{=}\limits^{\rm def}}\,u_{\rm T}(L) - u_{\rm T} (R),\quad \hbox{II} \,{\mathop{=}\limits^{\rm def}}\, u_{\rm T} (F) - u_{\rm T} (R),\quad {\rm III} \,{\mathop{=}\limits^{\rm def}}\, u_{\rm T} (F) - u_{\rm T} (L),\\ \hbox{aVR} & \,{\mathop{=}\limits^{\rm def}}\, \frac{3}{2} \left(u_{\rm T}(R)- u_{\rm W}\right), \quad {\rm aVL} \,{\mathop{=}\limits^{\rm def}}\, \frac{3}{2}\left(u_{\rm T} (L)-u_{\rm W}\right), \quad {\rm aVF} \,{\mathop{=}\limits^{\rm def}}\,\frac{3}{2} \left(u_{\rm T} (F) - u_{\rm W}\right),\\ {\rm V}i & \,{\mathop{=}\limits^{\rm def}}\, u_{\rm T} (V_i) - u_{{\rm W}}\quad i=1,\ldots,6, \end{aligned} $$
(4.17)

where \(u_{{\rm W}} \,{\mathop{=}\limits^{\rm def}}\, (u_{\rm T} (L) + u_{\rm T} (R) + u_{\rm T} (F))/3\) and the body surface electrode locations L, R, F, \(\{V_i\}_{i=1,\ldots,6}\) are indicated in Fig. 5.

Figure 5
figure 5

Torso domain: ECG leads locations

The simulated ECG obtained from RS is reported in Fig. 6. Some snapshots of the corresponding body surface potential are depicted in Fig. 7. Compared to a physiological ECG, the computed ECG has some minor flaws. First, the T-wave amplitude is slightly lower than expected. Second, the electrical heart axis (i.e. the mean frontal plane direction of the depolarization wave traveling through the ventricles during ventricular activation) is about −40° whereas it should be between 0° and 90° (see e.g. Aehlert1). This is probably due to a too horizontal position of the heart in the thoracic cavity. Third, in the precordial leads, the R-wave presents abnormal (low) amplitudes in V1 and V2 and the QRS complex shows transition from negative to positive polarity in V4 whereas this could be expected in V3.

Figure 6
figure 6

Reference simulation: 12-lead ECG signals obtained by a strong coupling with the torso, including anisotropy and APD heterogeneity. As usual, the units in the x- and y-axis are ms and mV, respectively

Figure 7
figure 7

Reference simulation: some snapshots of the body surface potentials at times t = 10, 47, 70, 114, 239 and 265 ms (from left to right and top to bottom)

Despite that, the main features of a physiological ECG can be observed. For example, the QRS-complex has a correct orientation and a realistic amplitude in each of the 12 leads. In particular, it is negative in lead V1 and becomes positive in lead V6. Moreover, its duration is between 80 and 120 ms, which is the case of a healthy subject. The orientation and the duration of the T-wave are also satisfactory. To the best of our knowledge, this 12-lead ECG is the most realistic ever published from a fully based PDE/ODE 3D computational model.

Pathological Simulations

In this paragraph, we modify the reference simulation that provided the “healthy” ECG (Fig. 6) in order to simulate a right or a left bundle branch block (RBBB or LBBB). The purpose is to test whether the ECG produced by our model possesses the main characteristics that allow a medical doctor to detect these pathologies.

In the RS, the right and the left ventricle are activated simultaneously. Now, in order to simulate a LBBB (resp. a RBBB) the initial activation is blocked in the left (resp. right) ventricle.

The results are reported in Fig. 8 (RBBB) and 9 (LBBB). As in the healthy case, an expert would detect some flaws in these ECGs. For example, he would expect a larger QRS and a lead V1 without Q-wave. Nevertheless, he would also recognize the main features that indicate the bundle branch blocks (see e.g. Malmivuo and Plonsey35). First, the QRS-complex exceeds 120 ms in both cases. Second, it can be seen in Fig. 8 that the duration between the beginning of the QRS complex and its last positive wave in V1 exceeds 40 ms which is a sign of RBBB. Third, it can be seen in Fig. 9 that the duration between the beginning of the QRS complex and its last positive wave in V6 exceeds 40 ms which is a sign of LBBB. It is noticeable that these results have been obtained without any recalibration of the RS, besides the above mentioned (natural) modifications needed to model the disease.

Figure 8
figure 8

Simulated 12-lead ECG signals for a RBBB

Figure 9
figure 9

Simulated 12-lead ECG signals for a LBBB

Impact of Some Modeling Assumptions

In this section, the impact of some alternative modeling assumptions on the simulated ECG is investigated. This allows to assess to what extent the modeling assumptions involved in the RS are necessary to obtain a meaningful ECG.

Heart–Torso Uncoupling

A common approach to reduce the computational complexity of the RM consists in uncoupling the computation of (V mu e) and u T. This can be achieved by neglecting, in (2.10), the electrical torso feedback on the cardiac region. That is, by replacing the coupling condition (2.10)2 by

$$ {\varvec{\sigma}}_{\rm e}{\varvec{\nabla}} u_{\rm e} \cdot \user2{n} =0,\quad\hbox{on}\;\Upsigma, $$
(5.18)

which amounts to work with an isolated heart domain (see e.g. Clements et al.,9 Potse et al. 42).

As a result, the intracardiac quantities (V mu e) can be obtained, independently of u T, by solving (2.7) with initial condition (2.8) and insulating conditions

$$ \left\{ \begin{array}{ll} {\varvec{\sigma}}_{\rm i}{\varvec{\nabla}} V_{\rm m} \cdot \user2{n} + {\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} u_{\rm e} \cdot \user2{n} = 0, & \hbox{on}\; \Upsigma,\\ {\varvec{\sigma}}_{\rm e} {\varvec{\nabla}} u_{\rm e} \cdot \user2{n} =0,&\hbox{on}\;\Upsigma. \end{array} \right. $$
(5.19)

Thereafter, the torso potential u T is recovered by solving (2.11) with

$$ \left\{ \begin{array}{ll} u_{\rm T} =u_{\rm e}, & \hbox{on} \ \Upsigma,\\ {\varvec{\sigma}}_{\rm T} {\varvec{\nabla}} u_{\rm T} \cdot \user2{n}_{\rm T}=0,&\hbox{on} \ {\Upgamma_{{\rm ext}}}, \end{array} \right. $$
(5.20)

as boundary conditions. In other words, the uncoupled heart potential u e is transferred, from ΩH to ΩT, through the interface Σ (see Barr et al.,3 Shahidi et al. 50).

Remark 5.1

Rather than interface based, as (5.20), most of the uncoupled approaches reported in the literature are volume based (see Sect. 4.2.4 in Lines et al.,32 for a review). Thus, the torso potentials are generated by assuming a (multi-)dipole representation of the cardiac source, typically based on the transmembrane potential gradient \({\varvec{\nabla}} V_{\rm m}\) (see e.g. Gulrajani,26 Pullan et al. 44).

From the numerical point of view, the heart–torso uncoupling amounts to replace Step 4, in “Space and Time Discretization” section, by:

  • Solving for \((V_{\rm m}^{n+1},u_{\rm e} ^{n+1})\in V_h\times V_h,\) with \(\int_{{\Upomega_{\rm H}}}u_{\rm e}^{n+1}=0\):

    $$ \left\{ \begin{array}{l} A_{\rm m} \int_{\Upomega_{\rm H}}\frac{C_{\rm m}}{\delta t} \left(\frac{3}{2} V_{\rm m}^{n+1} - 2V_{{\rm m}}^{n}+\frac{1}{2} V_{{\rm m}}^{n-1} \right)\phi + \int_{{\Upomega_{\rm H}}} {\varvec{\sigma}}_{\rm i}{\varvec{\nabla}} \left(V_{\rm m}^{n+1 } + u^{n+1}\right) \cdot {\varvec{\nabla}} \phi \\\qquad\qquad= A_{\rm m} \int_{{\Upomega_{\rm H}}} \left({I_{\rm app}}(t_{n+1}) - I_{\rm ion} \left({\widetilde V_{\rm m}^{n+1}},w^{n+1}\right) \right)\phi, \\\int_{{\Upomega_{\rm H}}} \left({\varvec{\sigma}}_{\rm i} +{\varvec{\sigma}}_{\rm e} \right) {\varvec{\nabla}} u_{\rm e}^{n+1}\cdot{\varvec{\nabla}} \psi_{\rm e} + \int_{{\Upomega_{\rm H}}}{\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} V_{\rm m}^{n+1}\cdot{\varvec{\nabla}} \psi_{\rm e} = 0, \end{array} \right. $$

    for all \((\phi,\psi_{\rm e})\in V_h \times V_h,\) with \(\int_{{\Upomega_{\rm H}}}\psi_{\rm e} = 0.\)

Then, once \(\{ u_{\rm e}^{n+1}\}_{0 \leq n \leq N-1}\) are available, the torso potential is obtained by solving, for \(u_{\rm T}^{n+1} \in Z_{h},\)

$$ \begin{aligned} u_{\rm T}^{n+1} =u_{\rm e} ^{n+1},&\quad \hbox{on}\;\Upsigma,\\ \int_{{\Upomega_{\rm T}}}{\varvec{\sigma}}_{\rm T}{\varvec{\nabla}} u_{\rm T}^{n+1}\cdot{\varvec{\nabla}} \psi_{\rm T}= 0,&\quad \forall \psi_{\rm T} \in Z_{h,0}. \end{aligned} $$
(5.21)

The remainder of this section discusses the impact of the uncoupled approach on ECG accuracy and computational cost.

Numerical Results

Figure 10 presents the ECGs obtained with the fully coupled (i.e. the RS) and the uncoupled approaches in a healthy condition. For the sake of conciseness, we have only reported the I, aVR, V1 and V4 leads of the ECG. Figure 11 reports the comparison in the case of a pathological RBBB situation.

Figure 10
figure 10

Comparison of the simulated healthy ECGs obtained using heart–torso uncoupling (top) and fully heart–torso coupling (bottom)

Figure 11
figure 11

Comparison of the simulated RBBB ECGs obtained using heart–torso uncoupling (top) and fully heart–torso coupling (bottom)

In both cases, the amplitude of the waves of the uncoupled formulation is much larger than in the fully coupled formulation. In the healthy case (Fig. 10), it can nevertheless be noted that the shape of the ECG is almost unaffected. These results are consistent with the experimental findings reported in Green et al. 25: no significant changes in epicardial activation but substantial increasing in epicardial potentials magnitude were observed when the heart surface was exposed to insulating air. Thus, considering an uncoupled formulation can be reasonable to get a qualitatively correct ECGs, in the sense that some important features of the ECGs—for example, the QRS or the QT intervals—are the same as in the fully coupled case. This observation is the basis of the numerical study reported in “Numerical Investigations with Weak Heart–Torso Coupling” section using heart–torso uncoupling. Nevertheless, Fig. 11 shows that both amplitude and shape can differ in some cases. The uncoupling assumption has therefore to be considered with caution. Similar conclusions are given in Page 315 in Pullan et al. 44 (see also Sect. 4.3 in Lines et al. 32), by comparing the surface potentials, on a 2D torso slice, obtained with a multi-dipole representation of the cardiac source (see Remark 5.1).

Torso Transfer Matrix Computation

Under a heart–torso uncoupling assumption, the torso potential u T is computed by solving the generalized Laplace equation (2.11) with boundary conditions (5.20). Therefore, u T depends linearly on the heart extracellular potential at the heart–torso interface \({u_{\rm e} }_{\vert \Upsigma}.\) At the discrete level, we will see that this leads to a matrix-vector product representation of the ECG computation in terms of the discrete extracellular potential at the heart–torso interface Σ.

To this aim, we introduce some additional notation and assume that the heart and torso finite element discretizations match at the interface. For the sake of simplicity, the degrees of freedom (DOF) of torso potential are partitioned as \({\user2 x}_{\rm T} \,{\mathop{=}\limits^{\rm def}}\, [{\user2 x}_{{\rm T},{\rm I}},{\user2 x}_{{\rm T},\Upsigma}]\in{{\mathbb{R}}}^{n_{\rm I} + n_{\Upsigma} },\) where \({\user2 x}_{{\rm T},\Upsigma}\) denotes the heart–torso interface DOF and \({\user2 x}_{{\rm T},{\rm I}}\) the remaining DOF. We denote by \({\user2 x}_{{\rm e}\vert\Upsigma}\in{{\mathbb{R}}}^{n_{\Upsigma}}\) the extracellular potential DOF at the heart–torso interface Σ. Finally, we assume that the 9 potential values generating the ECG (see “Results” section), say \({\user2 x}_{{\rm ECG}} \in {{\mathbb{R}}}^9,\) are obtained from the discrete torso potential \({\user2 x}_{\rm T}\) in terms of an interpolation operator \({\user2 P}\in{{\mathbb{R}}}^{9\times n_{\rm I}},\) so that

$$ {\user2 x}_{{\rm ECG}} = {\user2 P}{\user2 x}_{{\rm T},{\rm I}}, $$
(5.22)

for instance, \({\user2 P}\) can be a nodal value extraction of \({\user2 x}_{{\rm T},{\rm I}}.\) On the other hand, from (5.21), the discrete torso potential \({\user2 x}_{\rm T}\) is solution to the following finite element linear system:

$$ \left[ \begin{array}{ll} {\user2 A}_{{{\rm I} {\rm I}}} & {\user2 A}_{{{\rm I} \Upsigma}}\\ {\mathbf 0} &{\user2 {I}} _{\Upsigma \Upsigma}\\ \end{array}\right] \left[ \begin{array}{l} {\user2 x}_{{\rm T},{\rm I}}\\ {\user2 x}_{{\rm T},\Upsigma}\\ \end{array} \right] = \left[ \begin{array}{l} {\mathbf 0}\\ {\user2 x}_{{\rm e}\vert\Upsigma} \end{array} \right]. $$
(5.23)

Hence, by Gaussian elimination, we have that \({{\user2 x}_{{\rm T},{\rm I}}} = -{\user2 A}^{-1}_{{{\rm I}{\rm I}}} {\user2 A}_{{{\rm I} \Upsigma}} { {\user2 x}_{{\rm e}\vert\Upsigma}},\) and by inserting this expression in (5.22), we obtain

$$ {\user2 x}_{{\rm ECG}} = \underbrace{-{\user2 P} {\user2 A}^{-1}_{{{\rm I} {\rm I}}}{\user2 A}_{{{\rm I} \Upsigma}}}_ {\user2{{T}}}{\user2 x}_{{\rm e}\vert\Upsigma}. $$

Therefore, the ECG can be computed from the discrete extracellular potential at the heart torso interface, \({\user2 x}_{{\rm e} \vert\Upsigma},\) by a simple matrix-vector operation \({\user2 x}_{{\rm ECG}} = {\user2{{T}}}{\user2 x}_{{\rm e}\vert\Upsigma},\) with \({{\user2{{T}}}}\,{\mathop{=}\limits^{\rm def}}\,-{\user2 P} {\user2 A}^{-1}_{{{\rm I}{\rm I}}}{\user2 A}_{{{\rm I} \Upsigma}}.\)

There are different solutions to compute \({\user2{{T}} }.\) The naive idea consisting of computing the matrix \({\user2 A}^{-1}_{{{\rm I} {\rm I}}}\) is of course ruled out. A reasonable and natural option is to compute matrix \({\user2{{T}} }\) by column (see Shahidi et al. 50), i.e. by evaluating \({{\user2{{T}} }}{\user2 e}_i\) for i = 1, …, n Σ, where \({\user2 e}_i\) denotes the i-th canonical vector of \({{\mathbb{R}}}^{n_{\Upsigma}}.\) But each of these evaluations involve the solution of system (5.23) with \({\user2 x}_{{\rm e}\vert\Upsigma} = {\user2 e}_i,\) and therefore the overall computational cost is proportional to n Σ, which can be rather expensive (remember that n Σ is the number of nodes on the heart–torso interface, and is therefore of the order of several thousands). In contrast, a computation by row is much more efficient since it is only needed to evaluate \({{\user2{{T}}}}^T{\user2 e}_i\) for i = 1, …, 9, where \({\user2 e}_i\) stands for the i-th canonical vector of \({{\mathbb{R}}}^{9}.\) From the symmetry of the finite element matrix,

$$ {\user2{{T}}}^T = - {\user2 A}_{{{\rm I} \Upsigma}}^T {{\user2 A}}_{{{\rm I} {\rm I}}}^{-T} {\user2 P}^T = - {\user2 A}_{{ \Upsigma {\rm I}}} {{\user2 A}}_{{{\rm I} {\rm I}}}^{-1} {\user2 P}^T. $$

Therefore, the matrix-vector product evaluation

$$ {\user2{T}}^T{\user2{e}}_{i} = - {\user2 A}_{{ \Upsigma {\rm I}}} \underbrace{{\user2 A}_{{\rm II}}^{-1}{\user2 P} ^T{\user2{e}}_i}_{{\user2{x}}_{{\rm T,I}}}, $$
(5.24)

can be performed in two steps as follows. First, solve for \([{\user2 x}_{{\rm T},{\rm I}},{\user2 x}_{{\rm T},\Upsigma}]\) the discrete source problem (depending on the linear operator \( {\user2 P}\)), with homogeneous Dirichlet boundary condition on \(\Upsigma\):

$$ \left[ \begin{array}{ll} {\user2 A}_{{\rm I}{\rm I}} & {\user2 A}_{{\rm I} \Upsigma}\\ {\mathbf 0} & {\user2 I}_{\Upsigma\Upsigma}\\ \end{array} \right] \left[ \begin{array}{l} {\user2 x}_{{\rm T},{\rm I}}\\ {\user2 x}_{{\rm T},\Upsigma}\\ \end{array} \right] \left[ \begin{array}{ll} {\user2 P}^t {\user2 e_i}\\ {\mathbf 0}\\ \end{array} \right], $$
(5.25)

Second, from (5.24), evaluate the interface residual

$$ {\user2{T}}^T{\user2 e}_i= -{\user2 A}_{{ \Upsigma {\rm I}}} {\user2 x}_{{\rm T},{\rm I}} = - \left[ \begin{array}{ll} {\user2 A}_{{\Upsigma {\rm I}}}&{\user2 A}_{{ \Upsigma \Upsigma}}\\ \end{array} \right] \left[ \begin{array}{l} {\user2 x}_{{\rm T,I}}\\ {\user2 x}_{{\rm T},\Upsigma}\\ \end{array} \right]. $$

Note that, \({\user2{T}}^T{\user2 e_i}\) is nothing but the discrete current flux through the heart–torso interface Σ, associated to the homogeneous Dirichlet condition in (5.25).

In this paper, all the numerical ECGs based on the uncoupling conditions (5.19)–(5.20) have been obtained using the matrix \({\user2{{T}} }\) presented in this paragraph (and this matrix has been computed by row).

Remark 5.2

If the operator \({\user2 P}\) is a simple extraction of nodal values from the torso potential DOF, \({\user2 x}_{\rm T},\) each evaluation \({\user2{T}}^T {\user2 e_i},\) for i = 1, …, 9, can be (formally) interpreted at the continuous level as a current flux evaluation at Σ of the problem

$$ \left\{ \begin{array}{ll} \hbox{div}({\varvec{\sigma}}_{\rm T} {\varvec{\nabla}} v)= \delta_{{\user2 x}_i},& \hbox{in} \ {\Upomega_{\rm T}},\\ v=0,&\hbox{on } \Upsigma, \\ {\varvec{\sigma}}_{\rm T}{\varvec{\nabla}} v \cdot \user2{n}_{\rm T} = 0,&\hbox{on }{\Upgamma_{{\rm ext}}}, \end{array} \right. $$

with \(\delta_{{\user2 x}_i}\) the Dirac’s delta function at the i-th point, \({\user2 x}_i,\) of torso potential recording on Γext.

Remark 5.3

Note that the transfer matrix \({\user2 T}\) can be computed “off-line”, since it depends neither on time nor on solution in the heart. Nevertheless, this matrix has to be recomputed when the torso conductivities are modified or when dealing with dynamic torso meshes.

Table 4 reports the elapsed CPU time needed to simulate an ECG with three different approaches. As expected, the uncoupling assumption significantly reduces the computational cost of the ECG simulation, especially if the transfer matrix method is used to recover the torso potentials. Let us emphasize that, the last two columns of Table 4 refer to the same problem (uncoupled formulation) solved with two different algorithms, whereas the problem corresponding to the first column (fully coupled formulation) is different and a priori more accurate.

Table 4 Comparison of the elapsed CPU time (dimensionless) for the computation of the ECG

Study of the Monodomain Model

In the previous section we have investigated a simplifying modeling assumption that allows a uncoupled computation of the heart and torso potentials (V mu e) and u T. We now discuss another simplification known as monodomain approximation (see e.g. Clements et al.,9 Colli Franzone et al. 12). Combined with a heart–torso uncoupling assumption, this approach leads to a fully decoupled computation of V m, u e and u T.

The next subsection investigates the implications, on ECG modeling, of the general monodomain derivation proposed in Clements et al. 9 and Colli Franzone et al.,12 without any assumptions on the anisotropy ratio of the intra- and extracellular conductivities. The impact of this approximation on the simulated ECG is then illustrated in “Numerical Results with Heart–Torso Uncoupling” section, using the heart–torso uncoupling simplification.

The Monodomain Approximation

We assume that the intra- and extracellular local conductivities \(\sigma_{\rm i}^{{\rm l},{\rm t}}\) and \(\sigma_{\rm e}^{{\rm l},{\rm t}}\) are homogeneous (constant in space). Let \({\user2{{j}}} \,{\mathop{=}\limits^{\rm def}}\, {\user2{{j}} }_{\rm i} + {\user2{{j}} }_{\rm e} \) be the total current, flowing into ΩH, and \({\varvec{\sigma}} \,{\mathop{=}\limits^{\rm def}}\, {\varvec{\sigma}}_{\rm i} + {\varvec{\sigma}}_{\rm e} \) be the bulk conductivity tensor of the medium.

From (2.3) and (2.4), \({\user2{{j}} } = -{\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} u_{\rm i} - {\varvec{\sigma}}_{\rm e} {\varvec{\nabla}} u_{\rm e} = - {\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} V_{\rm m} - {\varvec{\sigma}} {\varvec{\nabla}} u_{\rm e} ,\) or, equivalently,

$$ {\varvec{\nabla}} u_{\rm e} = - {\varvec{\sigma}} ^{-1}{\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} V_{\rm m} - {\varvec{\sigma}} ^{-1}{\user2{{j}}} . $$
(5.26)

By inserting this expression in (2.7)1 and (2.9), we obtain

$$ \left\{ \begin{array}{l} A_{\rm m}\left(C_{\rm m} \frac{\partial{V_{\rm m}}} {\partial{t}} + I_{\rm ion}(V_{\rm m},w)\right) -\hbox{div} \left({\varvec{\sigma}}_{\rm i} \left({\user2{{I}} } - {\varvec{\sigma}} ^{-1} {\varvec{\sigma}}_{\rm i} \right){\varvec{\nabla}} V_{\rm m}\right)\\ \qquad\qquad= - \hbox{div} \left( {\varvec{\sigma}}_{\rm i} {\varvec{\sigma}} ^{-1} {\user2{{j}} } \right) + A_{\rm m} {I_{\rm app}} ,\quad \hbox{in } {\Upomega_{\rm H}},\\ {\varvec{\sigma}}_{\rm i} \left({\user2{{I}} } -{\varvec{\sigma}} ^{-1} {\varvec{\sigma}}_{\rm i} \right){\varvec{\nabla}} V_{\rm m}\cdot \user2{n} = {\varvec{\sigma}}_{\rm i} {\varvec{\sigma}}^{-1} {\user2{j}}\cdot \user2{n} ,\quad \hbox{on } \Upsigma.\\ \end{array} \right. $$
(5.27)

On the other hand, \( {\varvec{\sigma}}_{\rm i} \left({\user2{{I}} } - {\varvec{\sigma}} ^{-1} {\varvec{\sigma}}_{\rm i} \right) = {\varvec{\sigma}}_{\rm i} {\varvec{\sigma}} ^{-1}( {\varvec{\sigma}} - {\varvec{\sigma}}_{\rm i} ) = {\varvec{\sigma}}_{\rm i} {\varvec{\sigma}} ^{-1}{\varvec{\sigma}}_{\rm e} .\) Therefore, by defining

$$ {\varvec{\sigma}}_{{\rm a}} \,{\mathop{=}\limits^{\rm def}}\, {\varvec{\sigma}}_{\rm i} {\varvec{\sigma}} ^{-1}{\varvec{\sigma}}_{\rm e} , $$
(5.28)

the expression (5.27) reduces to

$$ \left\{ \begin{array}{l} A_{\rm m}\left(C_{\rm m} \frac{\partial {V_{\rm m}}}{\partial {t}} + I_{\rm ion}(V_{\rm m},w)\right) -\hbox{div} \left({\varvec{\sigma}}_{{\rm a}} {\varvec{\nabla}} V_{\rm m} \right)\\ \qquad\qquad= - \hbox{div}\left({\varvec{\sigma}}_{\rm i} {\varvec{\sigma}} ^{-1} {\user2{{j}} } \right) +A_{\rm m} {I_{\rm app}} ,\quad \hbox{in}\; {\Upomega_{\rm H}},\\ {\varvec{\sigma}}_{{\rm a}} {\varvec{\nabla}} V_{\rm m}\cdot \user2{n} = {\varvec{\sigma}}_{\rm i} {\varvec{\sigma}} ^{-1} {\user2{{j}}} \cdot {\user2{n}} ,\quad \hbox{on}\; \Upsigma. \end{array} \right. $$
(5.29)

Following Clements et al. 9 and Colli Franzone et al.,12 we deduce from (4.16)

$$ {\varvec{\sigma}}_{\rm i} {\varvec{\sigma}} ^{-1} = \mu_{\rm t} \user2 I + (\mu_{{\rm l}} - \mu_{\rm t} )\user2 a \otimes \user2 a , $$
(5.30)

with

$$ \mu_{{\rm l}}\,{\mathop{=}\limits^{\rm def}}\,\frac{\sigma_{{\rm l}}^{\rm i}}{\sigma_{{\rm l}}^{\rm i}+ \sigma_{{\rm l}}^{\rm e}},\quad \mu_{\rm t}\,{\mathop{=}\limits^{\rm def}}\,\frac{\sigma_{{\rm t}} ^{\rm i}}{\sigma_{\rm t}^{\rm i}+ \sigma_{{\rm t}}^{\rm e}}, $$

By setting \(\varepsilon \,{\mathop{=}\limits^{\rm def}}\, |\mu_{\rm t} - \mu_{{\rm l}} |,\) we deduce from (5.30)

$$ {\varvec{\sigma}}_{\rm i}{\varvec{\sigma}} ^{-1} = \mu_{\rm t} \user2 I + O(\varepsilon). $$
(5.31)

As noticed in Clements et al.,9 ε is a parameter that measures the gap between the anisotropy ratios of the intra- and extracellular media. In general 0 ≤ ε < 1, and for equal anisotropy ratios ε = 0 so that \({\varvec{\sigma}}_{\rm i} {\varvec{\sigma}}^{-1} = \mu_{\rm t} \user2 I .\)

Assuming ε ≪ 1, the expansion (5.31) can be inserted into (5.29) by keeping the terms up to the zero order. Thus, since μ t is assumed to be constant, and using (2.1) and (2.9), up to the zero order in ε, the so-called monodomain approximation is obtained:

$$ \left\{ \begin{array}{ll} A_{\rm m}\left(C_{\rm m} \frac{\partial {V_{\rm m}}}{\partial {t}} + I_{\rm ion}(V_{\rm m},w)\right) -\hbox{div} \left({\varvec{\sigma}}_{{\rm a}} {\varvec{\nabla}} V_{\rm m} \right)= A_{\rm m} {I_{\rm app}} ,& \hbox{in } {\Upomega_{\rm H}},\\ {\varvec{\sigma}}_{{\rm a}} {\varvec{\nabla}} V_{\rm m} \cdot\user2{n} = - \mu_{\rm T} {\varvec{\sigma}}_{\rm e} {\varvec{\nabla}} u_{\rm e} \cdot \user2{n} ,& \hbox{on } \Upsigma. \end{array} \right. $$
(5.32)

Heart–torso full coupling. Under the full coupling conditions (2.10), Vm and ue cannot be determined independently from each other. Note that, in (5.32) the coupling between Vm and ue is fully concentrated on Σ, whereas in RM this coupling is also distributed in ΩH, through (2.7)1. Therefore, as soon as the heart and the torso are strongly coupled, the monodomain approximation does not substantially reduce the computational complexity with respect to RM. Owing to this observation, we will not pursue the investigations on this approach.

Heart–torso uncoupling. Within the framework of “Heart–Torso Uncoupling” section, the insulating condition (5.18) combined with (5.32) yields

$$ \left\{ \begin{array}{ll} A_{\rm m}\left(C_{\rm m} \frac{\partial {V_{\rm m}}}{\partial {t}} + I_{\rm ion}(V_{\rm m},w)\right) -\hbox{div}\left({\varvec{\sigma}}_{{\rm a}} {\varvec{\nabla}} V_{\rm m} \right)= A_{\rm m} {I_{\rm app}} ,& \hbox{in } {\Upomega_{\rm H}},\\ \qquad\qquad {\varvec{\sigma}}_{{\rm a}} {\varvec{\nabla}} V_{\rm m}\cdot \user2{n} = 0, & \hbox{on } \Upsigma, \end{array} \right. $$
(5.33)

which, along with (2.5), allows to compute Vm independently of ue. The extra-cellular potential can then be recovered, a posteriori, by solving

$$ \left\{ \begin{array}{ll} - \hbox{div} \left(\left({\varvec{\sigma}}_{\rm i} + {\varvec{\sigma}}_{\rm e}\right) {\varvec{\nabla}} u_{\rm e} \right) = \hbox{div} \left({\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} V_{\rm m}\right),&\hbox{in }{\Upomega_{\rm H}},\\ \left({\varvec{\sigma}}_{\rm i} + {\varvec{\sigma}}_{\rm e} \right) {\varvec{\nabla}} u_{\rm e} \cdot \user2{n} = -{\varvec{\sigma}}_{\rm i} {\varvec{\nabla}}V_{\rm m} \cdot \user2{n},&\hbox{on } \Upsigma. \end{array} \right. $$

At last, the heart potentials are transferred to the torso by solving (2.11) with (5.20), as in “Heart–Torso Uncoupling” section.

Therefore, the monodomain approximation (5.32) combined with a heart–torso uncoupling assumption leads to a fully decoupled computation of V m, u e and u T. The three systems of equations which have to be solved successively read:

  1. 1.

    Monodomain problem, decoupled V m:

    $$ \left\{ \begin{array}{ll} A_{\rm m}\left(C_{\rm m} \frac{\partial V_{\rm m}}{\partial t} + I_{\rm ion}(V_{\rm m},w)\right)- \hbox{div} \left({\varvec{\sigma}}_{{\rm a}}{\varvec{\nabla}} V_{\rm m}\right)=A_{\rm m} {I_{\rm app}} ,& \hbox{in }{\Upomega_{\rm H}},\\ \frac{\partial w}{\partial t}+g(V_{\rm m},w)=0,&\hbox{in }{\Upomega_{\rm H}},\\ {\varvec{\sigma}}_{{\rm a}} {\varvec{\nabla}} V_{\rm m}\cdot \user2{n}= 0, &\hbox{on }\Upsigma. \end{array} \right. $$
    (5.34)
  2. 2.

    Heart extracellular potential u e:

    $$ \left\{ \begin{array}{ll} \hbox{div} \left(({\varvec{\sigma}}_{\rm i} +{\varvec{\sigma}}_{\rm e}){\varvec{\nabla}} u_{\rm e} \right)= -\hbox{div}({\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} V_{\rm m}),&\hbox{in }{\Upomega_{\rm H}},\\ ({\varvec{\sigma}}_{\rm i} + {\varvec{\sigma}}_{\rm e}) {\varvec{\nabla}} u_{\rm e} \cdot \user2{n} =-{\varvec{\sigma}}_{\rm i} {\varvec{\nabla}} V_{\rm m} \cdot \user2{n} ,&\hbox{on }\Upsigma. \\ \end{array} \right. $$
    (5.35)
  3. 3.

    Torso potential u T:

    $$ \left\{ \begin{array}{ll} \hbox{div}\left({\varvec{\sigma}}_{\rm T} {\varvec{\nabla}} u_{\rm T}\right)=0, &\hbox{in }{\Upomega_{\rm T}}, \\ u_{\rm T} = u_{\rm e} ,&\hbox{on }\Upsigma,\\ {\varvec{\sigma}}_{\rm T}{\varvec{\nabla}} u_{\rm T} \cdot \user2{n}_{\rm T}= 0,&\hbox{on } {\Upgamma_{{\rm ext}}}.\\ \end{array} \right. $$
    (5.36)

To sum up the discussion of this subsection on can say that two levels of simplification can be considered with respect to RM: first, replacing the bidomain equations by the monodomain equations; second, replacing the full heart–torso coupling by an uncoupled formulation. The first simplification significantly reduces the computational effort only if the second one is also assumed.

Numerical Results with Heart–Torso Uncoupling

Figure 12 shows the ECG signals obtained with the bidomain model (bottom) and the monodomain approximation (top) in a healthy case, using the heart–torso uncoupling simplification. The simulated ECGs for a RBBB pathological condition are given in Fig. 13. These figures clearly show that the most important clinical characteristics (e.g. QRS or QT durations) are essentially the same in both approaches.

Figure 12
figure 12

Simulated normal ECG with heart–torso uncoupling: monodomain (top) and bidomain (bottom) models

Figure 13
figure 13

Simulated ECG for a RBBB pathology with heart–torso uncoupling: monodomain (top) and bidomain (bottom) models

The first lead, in a healthy case, of both approaches are presented together in Fig. 14, for better comparison. The relative difference on the first lead is only 4% in l 2-norm. Thus, as far as the ECG is concerned, bidomain equations can be safely replaced by the monodomain approximation.

Figure 14
figure 14

First ECG lead: bidomain and monodomain models with heart–torso uncoupling

These observations are consistent with the conclusions of other studies based on isolated whole heart models.9,42 For instance, the numerical results reported in Potse et al. 42 show that the propagation of the activation wave is only 2% faster in the bidomain model and that the electrograms (point-wise values of the extra-cellular potential) are almost indistinguishable.

Isotropy

The impact of the conductivity anisotropy on the ECG signals is now investigated. To this aim, the numerical simulations of “Reference Simulation” section are reconsidered with isotropic conductivities, by setting

$$ {\varvec{\sigma}}_{\rm e}^{\rm t}={\varvec{\sigma}}_{\rm e} ^{{\rm l}}=3.0\times 10^{-3}\,\rm{S\,cm}^{-1}, \quad {\varvec{\sigma}}_{\rm i} ^{\rm t}={\varvec{\sigma}}_{\rm i} ^{{\rm l}}=3.0\times 10^{-3}\,\rm{S\,cm}^{-1}. $$

Figure 15 (top) shows the corresponding ECG signals. The QRS and T waves have the same polarity than in the anisotropic case, Fig. 15 (bottom). However, we can clearly observe that the QRS-complex has a smaller duration and that the S-wave amplitude, in leads I and V4, is larger. The impact of anisotropy is much more striking when dealing with pathological activations. In Fig. 16, for instance, the simulated ECG signals for a RBBB pathology have been reported with anisotropic and isotropic conductivities. Notice that the electrical signal is significantly distorted. In particular, the amplitude of the QRS complex is larger in the isotropic case (this observation also holds in the healthy case).

Figure 15
figure 15

ECG signals: isotropic conductivities (top), anisotropic conductivities (bottom)

Figure 16
figure 16

Isotropic (top) and anisotropic (bottom) conductivities in a pathological case (RBBB)

These numerical simulations show that anisotropy has a major impact on the accuracy of ECG signals. Meaningful ECG simulations have therefore to incorporate this modeling feature (see also Colli Franzone et al. 11).

Cell Homogeneity

As mentioned in “Cell Heterogeneity” section, an heterogeneous coefficient τclose has been considered in RS to incorporate an APD gradient across the left ventricle transmural direction. In this paragraph, the myocardium is assumed to have homogeneous cells. The ECG signals corresponding to a constant APD in the whole heart, obtained with τclose = 140 ms, are reported in Fig. 17.

Figure 17
figure 17

ECG signals: homogeneous action potential duration (top), heterogeneous action potential duration (bottom)

Note that now, in the bipolar lead (I), the T-wave has an opposite polarity with respect to the RS and to what is usually observed in normal ECGs. Indeed, without transmural APD heterogeneity, the repolarization and the depolarization waves travel in the same direction, which leads to the discordant polarity, between the QRS and the T waves, observed in lead I. On the contrary, the unipolar leads (aVR, V1 and V4) present a similar polarity, irrespectively of the ADP heterogeneity (see also Colli Franzone et al. 11).

As a result, as also noticed in Boulakia et al.,5 Keller et al.,30 and Potse et al.,40,41 transmural APD heterogeneity is a major ingredient in the simulation of a complete 12-lead ECG with physiological T-wave polarities.

Capacitive and Resistive Effect of the Pericardium

The coupling conditions (2.10) are formally obtained in Krassowska and Neu31 using an homogenization procedure. In that reference, a perfect electrical coupling is assumed between the heart and the surrounding tissues.

It might be interesting to consider more general coupling conditions. For instance, by assuming that the pericardium (the double-walled sac containing the heart) might induce a resistor–capacitor effect. This can be a way to model pathological conditions—e.g. pericarditis, when the pericardium becomes inflamed—or to take into account the fact that, even in a healthy situation, the heart–torso coupling can be more complex. Thus, we propose to generalize (2.10), by introducing the following resistor–capacitor (R–C) coupling conditions:

$$ \left\{ \begin{array}{ll} R_{{\rm p}} {\varvec{\sigma}}_{\rm T} {\varvec{\nabla}} u_{\rm T} \cdot \user2{n} = R_{{\rm p}} C_{{\rm p}} \frac{\partial{(u_{\rm e} - u_{\rm T})}}{\partial{t}}+(u_{\rm e} - u_{\rm T}),&\hbox{on }\Upsigma,\\ {\varvec{\sigma}}_{\rm e} {\varvec{\nabla}} u_{\rm e} \cdot \user2{n} ={\varvec{\sigma}}_{\rm T} {\varvec{\nabla}} u_{\rm T} \cdot \user2{n},& \hbox{on }\Upsigma, \end{array} \right. $$
(5.37)

where C p and R p stand for the capacitance and resistance of the pericardium, respectively. Note that, the classical relations (2.10) can be recovered from (5.37) by setting R p = 0. To the best of our knowledge, the resistor–capacitor behavior (5.37) of the pericardium is not documented in the literature, so we propose to study its effect on ECGs through numerical simulations.

Numerical tests showed that for R p small (R p <  103 Ω cm2 approximately) or C p large (C p > 1 mF cm−2 approximately) the simulated ECG is very close to the RS. Figure 18, for instance, presents the ECG signals obtained with R p = 102 Ω cm2 and C p = 0 mF cm2.

Figure 18
figure 18

Simulated 12-lead ECG signals: R–C heart–torso coupling conditions with \(R_{{\rm p}}=10^2\,\Upomega\,\hbox{cm}^2, C_{{\rm p}}=0\,\hbox{mF cm}^{-2}\)

In order to illustrate the resistor effect, we have reported in Fig. 19 the ECG obtained with C p = 0 mF cm−2 and R p = 104 Ω cm2. We clearly observe that the amplitude of the signals is smaller than in the RS. More generally, this amplitude decreases when R p increases, as expected.

Figure 19
figure 19

Simulated 12-lead ECG signals: R–C heart–torso coupling conditions with \(R_{{\rm p}}=10^4\,\Upomega\,\hbox{cm}^2, C_{{\rm p}}=0\,\hbox{mF cm}^{-2}\)

We now focus on the capacitor effect by taking R p very large. Figure 20 presents the ECG signals obtained with R p = 1020 Ω cm2 and C p = 10−2 mF cm−2. We observe that the capacitive term induces a relaxation effect and distorts the signal. In particular, the T-wave is inverted in all the ECG leads and the S-wave duration is larger than for the RS. At last, Fig. 21 shows that for very small values of C p the amplitude of the ECG is also very small. This can be formally explained by the fact that, in this case, condition (5.37)1 approximately becomes \({\varvec{\sigma}}_{\rm T} {\varvec{\nabla}} u_{\rm T} \cdot \user2{n}=0\) on Σ: no heart information is transferred to the torso, leading to very low ECG signals.

Figure 20
figure 20

Simulated 12-lead ECG signals: R–C heart–torso coupling conditions with \(R_{{\rm p}}=10^{20}\,\Upomega\,\hbox{cm}^2 ,\) \(C_{{\rm p}}=10^{-2} \hbox{mF cm}^{-2}\)

Figure 21
figure 21

Simulated 12-lead ECG signals: R–C heart–torso coupling conditions with R p = 1020 Ω cm2, C p = 10−4 mF cm−2

Numerical Investigations with Weak Heart–Torso Coupling

In this section, we investigate the ECG sensitivity to the time and space discretizations and to the heart and torso model parameters. To carry out these studies at a reasonable computational cost, we consider the heart–torso uncoupling. Although we have noticed (in “Heart–Torso Uncoupling” section) that uncoupling may affect the ECG accuracy in some cases, we can expect that the conclusions of the sensitivity analysis remain still valid under this simplification.

Time and Space Convergence

In this section, we are not interested in the convergence of the whole solution of the RM with respect to the space and time discretization parameters, but rather in the convergence of the ECG which is here considered as the quantity of interest.

Time Convergence

In Fig. 22, we present the first ECG lead (lead I) obtained for three different time-step sizes δt = 0.25, 0.5 and 2 ms. The l 2-norm of the relative difference with the result obtained with δt = 0.25 ms is 10% when δt = 2 ms and 2.0% when δt = 0.5 ms.

Figure 22
figure 22

Comparison of three simulations of ECG (lead I) with three different time steps: 2, 0.5 and 0.25 ms

Space Convergence

Three different levels of refinements are considered for the heart and the torso meshes, as shown in Table 5. The finite element meshes used in the RS are the R2. In Fig. 23, we report the first lead of the ECGs obtained for these simulations.

Table 5 There different levels of refinement for the computational heart and torso meshes (rounded off values)
Figure 23
figure 23

Comparison of three simulations of ECG (lead I), using three different levels of mesh refinement (see Table 5)

Although the whole solution might not be fully converged within the heart, we can observe that the quantity of interest—namely the ECG—is almost unaffected by the last refinement. Therefore, in a goal-oriented refinement framework, the solution may indeed be considered as converged.

Sensitivity to Model Parameters

In this section, we study the sensitivity of ECG to some model parameters. This is fundamental step prior to addressing its estimation (see e.g. Boulakia et al. 6) using data assimilation techniques.

Suppose that α1, α2, …, αp are parameters the ECG depends upon, i.e.

$$ {\text{ECG}}={\text{ECG}}\left(\alpha_1, \alpha_2,\ldots,\alpha_{{\rm p}}\right). $$

The ECG sensitivity to parameter α i can then be approximated as

$$ \partial_{\alpha_i}{\text{ECG}}\left(\alpha_1,\alpha_2,\ldots,\alpha_{{\rm p}}\right) \approx\frac{{\text{ECG}}(\alpha_1,\alpha_2,\ldots,(1+\varepsilon)\alpha_i,\ldots,\alpha_{{\rm p}})-{\text{ECG}}(\alpha_1,\alpha_2,\ldots,\alpha_{{\rm p}})}{\varepsilon \alpha_i}, $$

where ε is a small parameter, in our case 10−6 ≤ ε ≤ 10−4 gives a good approximation. Instead of \(\partial_{\alpha_i}{\text{ECG}}\left(\alpha_1,\alpha_2,\ldots,\alpha_{{\rm p}}\right)\) we consider the normalized value \({\alpha_i}\partial_{\alpha_i}{\text{ECG}}\left(\alpha_1,\alpha_2,\ldots,\alpha_{{\rm p}}\right)\), which allows to compare the sensitivity irrespectively of the parameter scales. In the next paragraphs, we provide time evolution of this scaled derivative, evaluated around the parameters used in the RS. Once more, for the sake of conciseness, we focus on the first ECG lead.

Ionic Model Parameters

In this paragraph, we investigate the sensitivity of the ECG to the Mitchell-Schaeffer parameters. In Fig. 24, we have reported the normalized derivatives with respect to τin, τout, τopen or τclose. The high ECG sensitivity to τin is clearly visible, particularly during the QRS-complex. The sensitivity to τout is moderate both during the depolarization and depolarization phases. As expected, the sensitivity to τclose is only relevant during repolarization. Interestingly, the sensitivity to τopen is relatively small. Therefore, this parameter may be removed (i.e. keep fixed) within an inverse estimation procedure.

Figure 24
figure 24

Normalized ECG sensitivity to τin, τout, τopen and τclose

Bidomain Model Parameters

We first focus on the ECG sensitivity to the local myocardium conductivities: σ te , σ le , σ ti and σ li . The corresponding normalized derivatives are given in Fig. 25. During depolarization (QRS-complex), the ECG is mainly sensitive to transverse conductivity (σ te , σ ti ). This can be due to the dominating transmural propagation of the depolarization wave in the left ventricle (see Fig. 4, left). During repolarization (T-wave), on the contrary, the ECG shows approximately the same sensitivity to all the local conductivities.

Figure 25
figure 25

Normalized ECG sensitivity to the local myocardium conductivities: σ te , σ le , σ ti and \(\sigma^{{\rm l}}_{\rm i}\)

We now pursue our sensitivity analysis, by considering the parameters A m and C m. The corresponding normalized derivatives are given in Fig. 26. We observe a strong sensitivity to both parameters during depolarization. Whereas, during the repolarization phase, the sensitivity is reduced.

Figure 26
figure 26

Normalized ECG sensitivity to A m and C m

At last, we investigate the sensitivity of the ECG to the initial activation in the heart (see Appendix). More precisely, we focus on the sensitivity to the activation angular velocity \(\frac{\pi}{2t_{{\rm act}}}\). The corresponding normalized derivative is reported Fig. 27. As expected, the ECG is strongly sensitive to this parameter, particularly during the depolarization phase.

Figure 27
figure 27

Normalized ECG sensitivity to the activation angular velocity

Torso Parameters

We finally consider the sensitivity of the ECG to the torso conductivities σ lT , σ bT and σ tT . Note that, in a heart–torso uncoupling framework, the corresponding three normalized derivatives are linked by a linear relation. Indeed, from (2.11) and (5.20), we have that, for all \(\lambda \in {{\mathbb{R}}},\) u T solves

$$ \left\{ \begin{array}{ll} \hbox{div} \left(\lambda {\varvec{\sigma}}_{\rm T} {\varvec{\nabla}} u_{\rm T} \right)=0,& \hbox{in } {\Upomega_{\rm T}},\\ u_{\rm T} =u_{\rm e},& \hbox{on } \Upsigma, \\ \lambda {\varvec{\sigma}}_{\rm T} {\varvec{\nabla}} u_{\rm T} \cdot \user2{n}_{\rm T}=0,&\hbox{on } {\Upgamma_{{\rm ext}}}. \end{array} \right. $$

In other words,

$$ u_{\rm T} \left(\lambda \sigma_{\rm T}^{{\rm l}},\lambda \sigma_{\rm T}^{{\rm b}}, \lambda \sigma_{\rm T}^{\rm t}\right)= u_{\rm T} \left( \sigma_{\rm T}^{{\rm l}}, \sigma_{\rm T}^{{\rm b}}, \sigma_{\rm T}^{\rm t}\right). $$
(6.38)

Differentiating this relation with respect to λ (and evaluating the resulting expression at λ = 1) yields

$$ \sigma_{\rm T}^{{\rm l}}\partial_{\sigma_{\rm T}^{{\rm l}}}u_{\rm T} + \sigma_{\rm T}^{{\rm b}} \partial_{\sigma_{\rm T}^{{\rm b}}}u_{\rm T} +\sigma_{\rm T}^{\rm t}\partial_{\sigma_{\rm T}^{\rm t}}u_{\rm T} =0. $$

Thus, from (4.17), we obtain a similar relation for the normalized ECG derivatives:

$$ \sigma_{\rm T}^{{\rm l}}\partial_{\sigma_{\rm T}^{{\rm l}}}{\text{ECG}}+ \sigma_{\rm T}^{{\rm b}} \partial_{\sigma_{\rm T}^{{\rm b}}}{\text{ECG}}+\sigma_{\rm T}^{\rm t}\partial_{\sigma_{\rm T}^{\rm t}}{\text{ECG}}=0. $$

Figure 28 presents the normalized derivatives of the ECG with respect to the tissue, lung and bone conductivities. This figure clearly shows that the ECG sensitivity to the bone parameter σ bT is negligible compared to its sensitivity to the tissue and lung parameters. Thus, if we have in mind to limit the number of parameters to be estimated, σ bT can safely be fixed to the value used in the RS.

Figure 28
figure 28

Normalized ECG sensitivity to \(\sigma_{\rm T}^{{\rm l}},\) \(\sigma_{\rm T}^{{\rm b}}\) and \(\sigma_{\rm T}^{\rm t}\)

Conclusion

A fully PDE/ODE based mathematical model for the numerical simulation of ECGs has been described. The electrical activity of the heart is based on the coupling of the bidomain equations with the Mitchell-Schaeffer phenomenological ionic model, including anisotropic conductivities and transmural APD heterogeneity. This system of equations has been coupled to a generalized Laplace equation in the torso, with inhomogeneous conductivity (bone, lungs and remaining tissue). A detailed description of the different algorithms used for the numerical solution of the resulting ECG model has been also provided.

Our approach has several limitations: we did not consider the atria, which prevents us from computing the P wave of the ECG; the cell model being phenomenological, it cannot handle complex ionic interactions; the effect of the blood flow on the ECG was neglected; the geometry of the ventricles were simplified.

Despite the above mentioned limitations, we were able to compute a satisfactory healthy 12-lead ECG, with a limited number a parameters. To the best of our knowledge, this constitutes a breakthrough in the modeling of ECGs with partial differential equations. Moreover, for a pathological situation corresponding to a bundle branch block, our simulations have provided an ECG which satisfies the typical criteria used by medical doctors to detect this pathology. This shows, in particular, that our numerical model have some predictive features.

In a second part, we have studied the impact of some modeling assumptions on the ECGs. The main conclusions of this investigation are the following:

  1. 1.

    As far as the general shape of the ECGs is concerned, heart–torso uncoupling can be considered. The level of accuracy obtained with uncoupling is probably sufficient in several applications, which may explain why this simplification is so widespread in the literature. Nevertheless, our numerical results have clearly pointed out that the amplitudes of the ECG signals obtained via uncoupling and full coupling can significantly differ. We therefore recommend to carefully check in each specific situations whether the uncoupling approximation is acceptable or not.

  2. 2.

    In agreement with other studies, we noticed that cell heterogeneity and fiber anisotropy have an important impact on the ECG and, therefore, cannot be neglected.

  3. 3.

    The bidomain equations can apparently be safely replaced by the monodomain approximation (5.32). Nevertheless, even with this simplification, the transmembrane potential V m and the extracellular potential u e still have to be solved simultaneously when the heart and the torso are fully coupled. Therefore, to be really attractive, the monodomain simplification (5.32) has to come with a heart-torso uncoupling approximation, which (as mentioned above) can affect the ECG. An alternative can be to neglect the boundary coupling in (5.32) while keeping u e and u T fully coupled (see e.g. Potse et al. 43 In a pure propagation framework, i.e. without extracellular pacing, numerical experiments suggest that this approach can provide accurate ECG signals.

  4. 4.

    We have proposed a new heart–torso coupling condition which takes into account possible capacitive and resistive effects of the pericardium. We did not find in the literature any evidence of these effects and our results show that it does not seem necessary to include them in order to get realistic healthy ECGs. Nevertheless, these coupling conditions might be relevant in some pathologies affecting the pericardial sac and the simulations we provided to illustrate these effects might be useful for future works.

  5. 5.

    At last, a sensitivity analysis has shown that the most critical parameters of the bidomain model are C m, A m, the angular velocity of the activation wave and the transverse conductivities σ ti and σ te . As regards the ECG sensitivity to the ionic model parameters, we have noticed a extreme sensitivity of the QRS-complex to the parameter τin and a high sensitivity of the T-wave to the parameter τclose. Moreover, we have also observed that the ECG sensitivity to the torso conductivity parameters is less significant than to the heart model parameters.

To conclude, our main concern during this study was to build a model rich enough to provide realistic ECGs and simple enough to be easily parametrized. In spite of its shortcomings, the proposed approach essentially fulfills these requirements and is therefore a good candidate to address inverse problems. This will be investigated in future works.