Abstract
The bidomain equations with Neumann boundary stimulation and optimal control of these stimuli are investigated. First an analytical framework for boundary control is provided. Then a parallel finite element based algorithm is devised and its efficiency is demonstrated not only for the direct problem but also for the optimal control problem. The computations realize a model configuration corresponding to optimal boundary defibrillation of a reentry phenomenon by applying current density stimuli.
Keywords: bidomain model, defibrillation, Neumann stimulation, optimal control, parallel FEM
1 Introduction
The heart is an electrically-controlled mechanical pump which drives blood through the circulatory system with remarkable efficiency. Under healthy conditions its electrical activation is highly organized, in disease, however, disturbances in the formation and/or propagation of electrical impulses may induce reentrant activation patterns which precipitate its rhythm significantly. Ultimately, such fast rhythms may evolve to highly disorganized almost chaotic activation patterns, an electrical state referred to as fibrillation. Under such conditions the heart looses its capacity to pump a sufficiently large mass of blood through the circulatory system. Without therapy, death would ensue within minutes. The only reliable therapy to terminate this otherwise lethal condition is the delivery of a strong electrical shock. This therapy, referred to as electrical defibrillation, is nowadays reliably achieved in a large patient population via the implantation of devices, so-called implantable cardioverters defibrillators (ICD), which monitor the heart rate and, if needed, deliver a discharge to restore a normal rhythm.
Although ICD therapy has proved to be efficient and reliable in preventing sudden cardiac death [2], it is far from ideal. There are several known adverse effects secondary to the administration of strong electrical shocks which are caused by the high field strengths required to terminate fibrillation with a sufficiently high probability. Moreover, psychological effects play an important role as well since shock delivery is perceived as extremely painful by conscious patients, leading to traumatization and a reduced quality of life. The link between the high shock strengths required and adverse effects provides the motivation for posing the defibrillation process as an optimization problem, where one aims to achieve defibrillation with minimal energy and, consequently, with minimal detrimental side effects.
The optimal control approach to defibrillation is to determine an applied electrical field in such a way that it optimizes a given design objective, which is, in our case, the restoration of a tissue state in which fibrillatory propagation cannot be maintained. This can be achieved by driving the whole tissue to a resting state, or equivalently, to an excited state. In both cases the main ingredients for maintaining fibrillation, namely the presence of both propagating wavefronts and a sufficient mass of excitable tissue at rest, referred to as “excitable gap”, in which these wavefronts can travel, are missing. Achieving these objectives is challenging since, on biophysical grounds, shock-induced changes in polarization of both polarities are always present during shock delivery [26, 22].
In previous work [17, 16, 15] we addressed these points by modeling the controller action representing the current delivered by the electrodes as distributed forces. One of the main objectives of the current work consists in analyzing the case when the action of the electrodes is modeled as Neumann boundary conditions.
From a methodological point of view, in most, if not all, recent finite element modeling studies the effect of extracellularly applied electric fields has been accounted for either by imposing inhomogeneous Dirichlet boundary conditions to model extracellular potential stimuli, or, by using current volume sources to model current stimuli.
The use of inhomogeneous Neumann boundary conditions for modeling current stimuli has been the method of choice in early pioneering monodomain modeling work where the finite difference method was employed to model impulse propagation in 1D strands or 2D sheets [27]. Surprisingly, to the best of our knowledge, in the bidomain literature Neumann boundary conditions for modeling current injection via electrodes have not been rigorously stated yet, neither in bidomain forward models nor in the context of optimal control. While equivalence between both formulations, i.e. Neumann boundary conditions and volume sources, can be achieved for any given setup, in the latter case where currents are injected via shape functions into 2D or 3D elements, the total injected current depends on spatial discretization and choice of weighting function. Thus, in the present work we aim to investigate the suitability of using inhomogeneous Neumann boundary conditions in a bidomain model, specifically, the feasibility of optimal boundary control for the bidomain equations.
A second important issue of the current work consists in comparing the nonlinear conjugate gradient and the Newton method as iterative solution processes to solve the resulting optimization problems. Here we point out that due to the complicated dynamical systems behavior of the bidomain equations including wave phenomena which change significantly during the iterations of the optimal control scheme, it is out front not evident that the strength of improved rate of Newton’s method over gradient based methods can be achieved. Unless it is possible to obtain sufficiently accurate approximations to the Hessian the Newton method will provide no improvement or may fail. This behavior is has been addressed in the passed for control of fluids, see e.g. [8, 10] , but there is much less experience with optimal control of reaction diffusion systems.
Finally any numerical optimization approach requires repeated solution of the bidomain equations and the associated adjoint equations. While an efficient solution strategy is already of paramount importance for the direct numerical simulation of bidomain equation it is indispensable in the context of optimal control. For this reason our numerical realization relies on parallelization. We report on the parallel efficiency both for the direct simulation and for the optimization algorithms.
The optimal pacing of the cardiac tissue is expressed by optimal control with partial differential equations as constraints. Let , denote a bounded connected domain with Lipschitz continuous boundary ∂Ω. The space-time domain and its lateral boundary are denoted by Q = Ω×(0, T] and ∑ = ∂Ω(0, T], respectively. Also we denote the observation domain by Ωobs ⊂ Ω. The standard form control problem is expressed as:
| (1.1) |
where u, v and w are the state variables, and Ie is the extracellular current which is utilized as a control variable in the optimal control problem and e = 0 stands formally for the dynamical system constraint. The dynamical behavior of the intra- and extracellular potentials is described by the coupled system of reaction-diffusion equations which can be expressed as follows
| (1.2) |
| (1.3) |
| (1.4) |
where u: is the extracellular potential, v : is the transmembrane voltage, w: represents the ionic current variables, σi: and σe: are respectively the intracellular and extracellular conductivity tensors. The term Itr(x, t) is the transmembrane current density stimulus as delivered by an intracellular electrode. The Iion(v, w) is the current density flowing through the ionic channels and the function G(v, w) determines the evolution of the gating variables, which is determined by an electrophysiological cell model, see e.g. [1] for more description on these models. Eq. (1.2) above is an elliptic type equation, Eq. (1.3) is a parabolic type equation and Eq. (1.4) is a set of ordinary differential equations which can be solved independently for each node. Typically, the conductivity tensors, which were considered in our computations, are expressed in the following form,
| (1.5) |
where σcl and σct are longitudinal and transverse fiber conductivities, respectively.
The membrane model for the ionic activity is described by a set of ordinary differential equations. The dimension of the ODE system is a consequence of the ionic model. In our numerical computations, we used a modified FitzHugh-Nagumo (FHN) model, called Rogers-McCulloch model [24], which consists of only two state variables and has a cubic non-linearity in the transmembrane potential
| (1.6) |
| (1.7) |
where g, η1, η2, η3 are prescribed positive real coefficients, vth > 0 is the threshold potential and vp > vth is the peak potential.
In the absence of a conductive bath both intracellular and extracellular domains are electrically isolated along the tissue boundaries and homogeneous Neumann boundary conditions are appropriate to reflect this fact, except for those parts of the boundary where extracellular stimuli are applied. The initial values of the transmembrane voltage and state variables are prescribed by given values v0 ∈ L2(Ω) and w0 ∈ L2(Ω). The initial and boundary conditions are therefore prescribed as
| (1.8) |
| (1.9) |
| (1.10) |
| (1.11) |
where η denotes the outwards normal to the boundary of Ω. Here Ie is the extracellular current density stimulus which acts as control along the boundary Γ12 = Γ1 ⋃ Γ2, where Γi, I = 1, 2, 3 are mutually disjoint and satisfy Γ1 ⋃ Γ2 ⋃ Γ3 = ∂Ω. For compatibility reasons it is assumed throughout that
| (1.12) |
for almost every t ∈ (0, T). In the numerical experiments Ie will be only temporally dependent and will be of the form
where χΓi is the characteristic function of the set Γi, i = 1, 2. Then condition (1.12) is satisfied if ∣Γ1∣ = ∣Γ2∣. The support regions Γ1 and Γ2 can be considered to represent a cathode and an anode, respectively.
In terms of optimal control we recall that the optimality system involves the primal as well as the adjoint equations. Each of these two systems has similar complexity and must be solved within an iterative solution process. Also, the linearized primal and dual equations need to be solved frequently in each iteration of Newton-Krylov methods. The computational costs involved in this solution process are significant, rendering the use of efficient numerical approaches a key ingredient to obtain results within reasonable time frames. Parallelization techniques, as they are routinely used in virtually any bidomain modeling study, suggest themselves quite naturally also as a mean to speed up the solution process of the optimal control problem. In this regard, we parallelized our optimization codes based on the public domain package DUNE [4]. In the numerical section we compare the improvements in terms of computational cost that can be offered by Newton-Krylov optimization algorithm over gradient type algorithms.
The remainder of the paper is organized as follows. In Section 2, the boundary control formulation of the bidomain model is presented. There we discuss the necessary first order optimality conditions for the boundary control problem. Also, we lay out the necessary steps to implement Newton’s method in our numerical realization. The numerical discretization of the optimality system is described in Section 3. At the end of that section a brief overview of parallelization results is given. In Section 4 numerical results are presented for the different test cases. A summary is given then in the last section.
2 The optimal control problem
Before turning to the optimal control problem, let us briefly address the state equation (1.2)-(1.4) together with initial and boundary conditions (1.8)-(1.11). Throughout we assume that the conductivity tensors satisfy σi ∈ L∞(Ω), σe ∈ L∞(Ω) and that they are uniformly elliptic, i.e. there exist 0 < m < M < ∞ such that
| (2.1) |
We refer to triple as weak solution to (1.2)-(1.4), (1.8)-(1.11), if it satisfies for a.e. t ∈ (0, T) the variational system
for all , and (v(0), w(0)) = (v0, w0), together with the initial condition (1.11). Here denotes the space
If (2.1) holds, then for each Itr ∈ L2(0, T; H1(Ω)*), Ie ∈ L2(0, T; Γ12) satisfying (1.12), there exists a unique weak solution to (1.2)-(1.4), (1.8)-(1.11), and there is a constant K > 0 such that the following a-priori bound holds:
For the proof we can follow the verification of Theorems 2.5 and 2.6 in [11] noting that ψ → ∫Γ12 Ie(t, s)ψ(t, s) ds dt defines a continuous functional on L2(0, T; H1(Ω)). Concerning well-posedness of the bidomain system with different ionic models we refer also to the early work by [6] and [30].
We return to the optimal control problem (P). The cost functional J is chosen in such a manner that the controlled trajectory of the transmembrane voltage is driven to a desired state vd by applying extracellular current Ie. Application of Ie has an averse effect on the tissue and hence it enters into the cost functional as penalization term.
We consider
| (2.2) |
where α > 0 is the weight for the control cost, Ωobs ⊂ Ω is the observation domian, vd ∈ L2(0, T; L2(Ωobs)) and
The set U is a closed, convex and weakly* sequentially compact subset of L∞(0, T; L2(Γ12)). This fact together with the well-posedness result from above allows to deduce the existence of a solution (u*, v*, v*, Ie*) to (2.2) by standard arguments. For the case of distributed control action the details are provided in [12]. For computational purposes the first order necessary conditions are of paramount importance. We give a formal derivation of these conditions here. They can be made rigorous by modifications of the proofs given in [12].
To obtain these first order conditions we introduce the Lagrangian associate to (2.2) by defining
where p, q, r are the Lagrange multipliers associated to the equations (1.2)-(1.4). Taking variations with respect to the state variables, invoking integration by parts with respect to the temporal variable and Green’s formula with respect to the spatial variable, and keeping in mind the initial- and boundary conditions we obtain the first order optimality system which we express in operator form:
| (2.3) |
| (2.4) |
| (2.5) |
together with the terminal conditions
and the boundary conditions for the adjoint states
and ∫Ωp(t) dx = 0, for a.e. t ∈ (0, T). Furthermore for any optimal control Ie* the following variational inequality must be satisfied:
| (2.6) |
where on Γ12. The pointwise formulation of (2.6) is found to imply a.e. in Q
where is such that .
For the numerical realization of (2.2) we shall require the reduced cost functional
where v(Ie) is the solution component to (1.2)-(1.4). From (2.6) the gradient of at some Ie is given by
| (2.8) |
In the numerical experiments we consider the practically relevant case that Ie is only spatially dependent and Ie(t) is of the form where Γ12 = Γ1 ⋃ Γ2, ∣Γ1∣ = ∣Γ2∣, and
For this case the optimality condition (2.6) turns out to be
From the point of view of numerical optimization we shall not only consider a nonlinear conjugate gradient, but also a Newton method, which, without considering line-search steps, is based on the iteration procedure where δIe is the solution to
| (2.9) |
and k denotes the iteration level. Here denotes the Hessian of the reduced cost functional. It is numerically infeasible to set up as a (discretized) matrix operator, rather one needs to resort to an iterative procedure to solve (2.9) approximately for δIe, e.g. by a conjugate gradient method. Below we summarize the necessary steps to realize the Newton step (2.9) by an iterative procedure:
Compute the first derivative according to (2.8), which requires one primal and one adjoint solve.
- In each iteration step for solving (2.9), evaluate the action of on δI by means of the following sequence of computation:
- solve the linearized primal equation for (δu, δv, δw) using δI
with the following initial and boundary conditions - evaluate from (2.10),
- solve the adjoint equation with (ξ1, ξ2, ξ3) as r.h.s., i.e.
by using homogenous initial and boundary conditions, - compute the action .
Above we use that the second derivative of the operator at yk = (uk, vk, wk, ), zk = (pk, qk, rk), with k denoting the iteration level, applied to the vector (δu, δv, δw, δIe) can be expressed as
| (2.10) |
where .
3 Numerical approach
In this section we describe the numerical treatment of the complete optimality system. For the spatial discretization of the primal and dual equations we used a piecewise linear finite element method and linearly implicit Runge-Kutta methods for the temporal discretization.
3.1 Semi-discretization in space
Here we give an overview of the spatial discretization of the primal problem by a finite element method based on the weak formulation. An analogous discretization is used for the dual equations, we refer to our previous paper [17, Section 3.1.2] in this respect.
A weak solution triple (u, v, w) satisfies for a.e. t ∈ (0, T) and for all ψ ∈ H1(Ω)
| (3.1) |
| (3.2) |
| (3.3) |
together with initial and boundary conditions (1.8)-(1.11). Let Vh ⊂ H1(Ω) be the finite dimensional subspace of piecewise linear basis functions with respect to the spatial grid. The approximate solutions u, v and w are expressed in the form , and , respectively, where denote the basis functions. The semi-discretization of primal equations in space results in the differential algebraic system as follows:
| (3.4) |
| (3.5) |
| (3.6) |
together with initial conditions for v and w, where and are the stiffness matrices, is the mass matrix, and the vectors Ie, Iitr are defined by and , respectively. The expression (Iion)(v, w) is defined by
The same spatial discretization technique is applied for the linearized primal and dual equations.
3.2 Full discretization and solution procedure
After the semi discretization of primal and dual equations one has to apply a time discretization technique to get a fully discretized system. For this purpose we applied a third order Rosenbrock method called ROS3PL [13]. Here we avoid the time discretization details for this problem which was explained in [17, Section 3.2].
The solution of the singular linear systems which arise after the full discretization of Eqs (1.2) and (2.3) are defined up to an additive constant. We mentioned earlier that to fix this constant we impose a zero mean condition. For the numerical realization of this condition we adopted a stabilized saddle point formulation from the work of Bochev and Lehoucq [5]. See [17] for the discussion and implementation details of this technique for the current problem. After the full discretization of the PDEs we obtain a system of linear algebraic equations. To solve this linear system we employed a BiCGSTAB [29] method with Jacobi preconditioning.
To solve the complete optimality system the Hager-Zhang variant of the non-linear conjugate gradient (NCG) [19], and the Newton method as explained in the previous section, were developed. Their performances will be compared in the following section.
3.3 Parallel implementation
To solve the optimality system numerically, many PDE solves are required to obtain an approximate solution to the optimal control problem. The solution of the bidomain equation system itself, due different time-scales that are present in the dynamical system, as well as the wave formation and the resulting necessity for fine scale spatio-temporal simulations, puts substantial demands on the computation see eg. [21, 20, 18, 28, 23]. This suggests to apply parallelization techniques. For this purpose, the public domain FEM package DUNE [4] is used and the internal parallel uniform Cartesian grid in DUNE is employed for parallel grid constructions. The Cartesian grid uses the simple coordinate bisection method for the non overlapping domain decomposition of the spatial grid. The finite element discretization module dune-pdelab in the DUNE package [4] was used.
Let us recall the number of PDE solves that are needed for optimization. One iteration of the NCG algorithm needs the solution of the primal and of dual equations, plus one additional primal evaluation for the line search method. The Newton method, moreover requires evaluation of the Hessian of the reduced cost functional in direction of the increment of the control δIe which is required for the iterative Krylov solver. Each inner iteration is achieved by one linearized primal, see 2(a) at the end of Section 2, and a dual equation solver 2(c), which together achieve the matrix-vector product of the Hessian on δIe. The solution of these linearized equations in parallel was done similarly to the solution procedure for primal and dual equations.
To achieve overall parallel scalability in the optimization problem we require first and foremost efficient realization of the communication in the finite element context of the solution of the direct problem in every iteration of the linear solver at each time step. For optimization this communication must also be considered for the adjoint equations, the computation of the Jacobian update and for the efficient parallel implementation of the Newton-Krylov method. Finally communication is required for the evaluation of the norm of the gradient of the cost functional, and for the cost itself.
4 Numerical results
Numerical results on the basis of two different test cases are discussed in this section. First numerical results based on boundary control of the bidomain equations are presented where the control acts on the left and right boundary of the computational domain, as shown in Figure 1. The second test case deals with a similar situation but now there are four smaller electrodes placed on either side of the domain, as shown in right hand side of Figure 1. In all cases the computational domain of size 2 * 2 cm2 is fixed and a 256 × 256 uniform quadrilateral spatial grid is used which consists of 65, 536 elements and 66, 049 nodes. Thus the computation involved 198, 147 dofs for one PDE solve.
Figure 1.
Computational domain with two and four stimulation boundaries.
Now we turn to the stopping criteria for the optimization algorithm. The termination of the optimization algorithm is based on the following condition:
| (4.1) |
If this condition was not satisfied within a prescribed number of 300 iterations, the algorithm was terminated. An Armijo type condition is imposed in the line search algorithm.
The presented numerical results as well as the parallel efficiency of the optimization algorithms are done on a Linux cluster (GHOST) with two nodes, where each node consists of 8 quad-core AMD Opteron processors 8356 clocked at 2.3 GHz and equipped with 256 GB RAM. For our computations we used only one node (overall 32 cpus).
As presented previously [17], the conductivity tensors were chosen, on one hand, to arrive at a good match with physiological conduction velocities with the simplified FitzHugh-Nagumo model, and, on the other hand, to keep anisotropy ratios within the range of values reported in experimental studies [25]. This led to the following choice of simulation parameters, σil = 2.0 · 10−3 S/cm, σit = 3.1 · 10−4 S/cm, σel = 2.0 · 10−3 S/cm, σet = 1.3 · 10−3 S/cm g = 1.5 S/cm2, vth = 13 mV, vp = 100 mV, η1 = 4.4 S/cm2, η2 = 0.012, η3 = 1. To account for the statistical discontinuous variation of conductivities which are omnipresent in cardiac tissue due to the discrete micro-structure, the intracellular conductivity tensors were modified by multiplying with random numbers in the range (0, 1). Moreover, those random numbers which were below a threshold of 0.34 were set equal to 10−12, for details of the underlying rationale see [7, 17].
A standard S1 – S2 stimulation protocol was applied to induce a reentrant activation pattern. An initial S1 stimulus of Itr = 100 μA/cm3 and 5 msec duration was applied at time t = 0 msec along the bottom edge of the tissue sheet. At time t = 183 msec, when the critical recovery isoline crossed the center of the sheet, a second S2 stimulus of Itr = 100 μA/cm3 and 5 msec duration was applied in a small region of 0.3 cm radius at the center of the domain. This S2 stimulus generated two phase singularities at the intersections between critical recovery isoline and the boundary of the S2 stimulus region, leading to a so-called Figure of Eight reentrant pattern. The solution at t = 435 msec was then chosen as the initial state for simulating the delivery of electrical shocks and the post-shock evolution following at the end of the shock.
The three temporal horizons are illustrated in Figure 2. The solution for the transmembrane voltage v in absence of any control is shown in Figure 3 at different instances of time to verify that the reentry is sustained for a sufficiently long time. During the shock, which constitutes the time period within which optimization takes place, the size of the time step was kept constant at Δt = 0.04 msec, while during the pre- and post-shock phases adaptive time stepping features of the ROS3PL method were used to speed up computation.
Figure 2.

Different time horizons considered in the computations.
Figure 3.
2D visualization of uncontrolled solution (v) at different times of simulation.
4.1 Boundary control with two stimulation boundaries
Here we present the numerical results for the bidomain model with Neumann boundary control. The anode is modeled as a Neumann boundary along the surface Γ1 and the cathode along the surface Γ2 of the computational domain, as shown in Figure 1. The desired trajectory of the transmembrane potential (vd) is obtained by solving once the primal problem using a prescribed time course of a stimulation current, Ie(t) = 200 mA/cm3. Here the desired trajectory ensures that optimized states attain a steady state during the post shock period. The optimization algorithm constructs the best optimal control while keeping the energy low, due to the term in cost functional.
The phase plane analysis of the modified FHN model, see for instance [14, 17], explains that if a sufficient perturbation is given to the excitable state, then it tends rapidly to a maximal value and subsequently gradually goes to a stable resting point. In optimal control we influence a sufficient portion of the cardiac tissue to reach the maximal value by providing the optimum extracellular current. Then the excitable gap over the cardiac tissue is sufficiently small so that no further excitation wave fronts can arise. After turning off the external stimulus in the post shock simulation the cardiac tissue goes to a resting state. This post shock simulation time takes approximately 150 msec.
The 2D spatial representation of the optimized transmembrane voltage is shown in Figure 4 at different time instances. Observe that during the shock period, at time t = 438msec, most of the computational domain is depolarized. Due to the applied external stimulus strength the cardiac tissue responds strongly and produces a large number of virtual electrodes at the microscopic size scale during the shock period. Eventually, these virtual electrodes over the tissue effectively block further wave propagation of the reentry wave and this leads to a successful defibrillation if the optimum external stimulus. The results depicted in Figure 4 were obtained by the Newton method, and those obtained by NCG are graphically indistinguishable. But algorithmically these methods behave differently as we discuss next.
Figure 4.
2D visualization of controlled solution (v) at different times of simulation.
The norm of the gradients of the cost functionals and the values of the cost functionals for the NCG and Newton methods are shown in the leftmost and middle panel of Figure 5, over the optimization iterations. We observe that both algorithms achieve approximately at same minimization values. The corresponding optimal controls are shown on the right hand side of Figure 5. The optimal controls are graphically indistinguishable.
Figure 5.
The gradient, minimum value of the cost functional and the optimal control values are shown on the left, middle and right figures respectively (Some specific values are highlighted by a circle for better visualization of the graphics).
Turning to the computational cost, we report that the Newton method takes 12 outer iterations to achieve convergence. Per outer iteration an average of 9 inner CG iterations were taken. The accepted step length is 0.5 for the first three optimization iterations and full step lengths for subsequent ones. Overall, the complete Newton optimization algorithm needed 240 PDE solves and additionally 15 PDE solves for the line search method to converge to the optimal solution. The NCG method took 300 iterations. It accepted the step length 1.0 right from beginning. Thus the NCG required 600 PDE solves and additionally 300 PDE solves for the line search algorithm. In conclusion the Newton method was significantly more effective than the NCG algorithm for this configuration.
Let us finally discuss the total extracellular current that is required for defibrillation. It is computed by the following expression:
The extracellular current for desired trajectory vd on the basis of a constant value for the stimulus required 3.2 A/cm3. The total extracellular current required to drive the system from arrhythmia pattern to steady state pattern by the optimized control based on Newton’s algorithm is 2.6788 (A ms)/cm3 and that for NCG is 2.6844 (A ms)/cm3 . Thus both methods give comparable results and both require less total current to obtain the successful defibrillation than that chosen on heuristic consideration to compute vd.
In Section 5.2 below we shall consider the effect of reducing the control domain of the electrodes on the total current required for defibrillation.
Numerical test with mesh dependency
To further validate the robustness of the optimization approach we conducted a test focusing on mesh-dependence. We first considered the Newton’s method with uniform Cartesian grids 128×128, 256×256 and 512×512. To eliminate possible effects due to randomly chosen conductivity tensors first conductivity tensors are generated for the 256 256 mesh as explained above. The values on the 128 × 128 and 512 × 512 grids are obtained by restriction and linear interpolation respectively. In a similar manner initial values are obtained by restriction and linear interpolation from the initial data which is constructed on 256 × 256 grid. The norm of the cost functional and its gradient for these different meshes is depicted Figure 6. First and foremost we note that the behavior only differs slightly, in the sense that for smaller mesh the gradient and the cost converge to zero more rapidly. The total value of the current is 2.7045 (A ms)/cm3 on 128 × 128 mesh, 2.6788 (A ms)/cm3 on 256 × 256 mesh and 2.6426 (A ms)/cm3 on 512 × 512. In each of these cases the stopping criterion is met after 12 iterations. As expected the NCG method is much significantly slower for all three mesh sizes and is terminated after 300 iterations. The desired defibrillation is achieved, but the values are less accurate than those achieved by the Newton algorithm in much fewer iterations. For example, in case of mesh size 256×256, the norm of the gradient of the cost functional in the Newton algorithm is 0.011 while for NCG we have 0.032.
Figure 6.
The gradient, minimum value of the cost functional and the optimal control values are shown on the left and right figures respectively for the different mesh sizes.
Parallel scalability for optimization
For benchmarking parallel scalability of the optimization algorithm the computational setup which is demonstrated in Section 4.1 is used. In this case the mesh size is h = 7.8 μm and consists of 65, 536 elements and 66, 049 nodes. Strong scalability experiments were performed on the 32 core GHOST cluster where also the boundary control simulations were performed. Parallel efficiency was computed as
where T1 is the total cpu time of a reference simulation on 1 core, and N and TN are number of cores and total cpu time in the scalability experiments. Parallel efficiency e of the first primal solve during the optimization with NCG and Newton optimization algorithms are shown in Figure 7. We achieved 82% of cpu gain on 32 processors for the first primal solve which is a crucial step in the optimization algorithms. For the overall optimization by the NCG algorithm 75% cpu time gain and by the Newton algorithm 73% cpu time gain were achieved. Absolute execution times on a single core for one primal solve was 8 min, while the execution of NCG and Newton algorithm lasted approximately 84 hours and 41 hours, respectively. Evidently, Newton’s method performed better, being roughly twice as fast as NCG. These numbers highlight the pivotal importance of using scalable parallel algorithms for the optimization of the application under consideration.
Figure 7.
Parallel efficiency for different optimization algorithms.
4.2 Numerical results for multiple boundary stimulations
Here we discuss the numerical results for the set up of multiple stimulation electrodes which are placed at the left and right boundary of the computational domain, see right hand side of Figure 1. The smaller support patches of the control domains for the anode region are chosen to be Ωc1 = [0, 0]×[0, 0.5] and Ωc2 = [0, 1.5]×[0, 2.0] of size 1 cm as well as for the cathode region to be Ωc3 = [2, 0]×[2, 0.5] and Ωc3 = [2, 1.5]×[2, 2] of size 1 cm. From the view of applications, the main goal is to consider the control domains as small as possible. For this case the desired transmembrane solution trajectory is constructed using the stimulus strength Ie = 400 mA/cm3.
We again conducted the numerical experiments based on the NCG and Newton’s optimization algorithms and both led to a successful defibrillation. Since the images for the optimized transmembrane voltage at different time instances are quite similar to those in Figure 4 we do not depict them here.
The gradient value of the cost functionals, the values of the cost themselves as well as the optimal controls are depicted in Figure 8. Again the NCG does not reach the stopping criterion within the first 300 iterations, and it is terminated there. At this point the algorithm decreases only very slowly. Comparable numbers as in the case of two electrodes are required as in the case of two electrodes. Here we only report that the overall computational time for (parallelized) NCG algorithm is 8174 seconds and that for the Newton method takes about 68% of the NCG CPU time. Thus clearly for this set-up the Newton optimization outperforms the NCG method.
Figure 8.
The gradient, minimum value of the cost functional and the optimal control values are shown on the left, middle and right respectively.
The computed total optimum extracellular current for NCG is 2.0146 (A ms)/cm3 and that for Newton is quite close with value 2.0134 (A ms)/cm3. This optimized applied current is distinctly less than that which is used to design the desired trajectory which uses 2.4 (A ms)/cm3.
5 Discussion
In practice, defibrillation is achieved either externally by two large paddle electrodes placed on the chest, or, internally, via ICDs. In the latter scenario, both the size of shock electrodes as well as their number are small. Typically, in concurrent transvenous ICDs the shocking coil through which current is injected, is placed in the right ventricular apex, and the case of the ICD serves as reference electrode. Very recent devices offer more flexibility in terms of number of electrodes and placement options. Alternative subcutaneous placement strategies have been proposed recently [3], which allow a much wider range of feasible lead placements. However, the rationalization of lead placements is challenging [9]. In all scenarios which are currently considered, currents are injected via a sparse set of small electrodes. Hence, the control regions are sparse and have local support. This is well in line with the boundary formulation underlying this study. To be of practical relevance for optimal control approaches to the cardiac defibrillation problem, it has to be demonstrated first that reductions in required energy can be achieved by finding optimal pulses as well as to enable the investigation of various electrode sizes and placements. In this study two electrode configurations were considered where for the setup with 4 smaller electrodes it could be shown that defibrillation could be achieved with less energy.
We use Neumann boundary conditions for modeling current injection. This is advantageous over the standard approaches typically used in bidomain modeling where currents are injected via nodes weighted with the corresponding nodal hat functions. The total injected current is then readily computed as the total length/area of the Neumann boundary multiplied by the imposed current density and does not depend on discretization and choice of weighting function.
The optimization of the applied current problem was achieved by the NCG and Newton algorithms, and it was found that the latter is advantageous in terms of computational efficiency as well as achieving local minima.
The optimization algorithm rely on frequent calls to the primal and adjoint equations and hence parallel efficiency is essential. In our computations we observed good parallel efficiency for the NCG and Newtons optimization algorithms.
Acknowledgment
The authors gratefully acknowledge the Austrian Science Foundation (FWF) for financial support under SFB 032, “Mathematical Optimization and Applications in Biomedical Sciences”.
References
- [1].CellML Model Repository. http://models.cellml.org/cellml
- [2].Bardy GH, Hofer B, Johnson G, Kudenchuk PJ, Poole JE, Dolack GL, Gleva M, Mitchell R, Kelso D. Implantable transvenous cardioverter-defibrillators. Circulation. 1993;87(4):1152–68. doi: 10.1161/01.cir.87.4.1152. [DOI] [PubMed] [Google Scholar]
- [3].Bardy GH, Smith WM, Hood MA, Crozier IG, Melton IC, Jordaens L, Theuns D, Park RE, Wright DJ, Connelly DT, Fynn SP, Murgatroyd FD, Sperzel J, Neuzner J, Spitzer SG, Ardashev AV, Oduro A, Boersma L, Maass AH, Van Gelder IC, Wilde AA, van Dessel PF, Knops RE, Barr CS, Lupo P, Cappato R, Grace AA. An entirely subcutaneous implantable cardioverter-defibrillator. N Engl J Med. 2010;363(1):36–44. doi: 10.1056/NEJMoa0909545. [DOI] [PubMed] [Google Scholar]
- [4].Bastian P, Blatt M, Dedner A, Engwer C, Klöfkorn R, Kornhuber R, Ohlberger M, Sander O. A generic grid interface for parallel and adaptive scientific computing. Part II: implementation and tests in DUNE. Computing. 2008 Jul;82(2):121–138. [Google Scholar]
- [5].Bochev P, Lehoucq RB. On the finite element solution of the pure neumann problem. SIAM Rev. 2005 Jan;47:50–66. [Google Scholar]
- [6].Bourgault Y, Coudiére Y, Pierre C. Existence and uniqueness of the solution for the bidomain model used in cardiac electrophysiology. Nonlinear Analysis: Real World Applications. 2009;10(1):458–482. [Google Scholar]
- [7].de Bakker JMT, van Rijen HMV. Continuous and discontinuous propagation in heart muscle. J Cardiovasc Electrophysiol. 2006 May;17(5):567–573. doi: 10.1111/j.1540-8167.2006.00367.x. [DOI] [PubMed] [Google Scholar]
- [8].Heinkenschloss M. Formulation and analysis of a sequential quadratic programming method for the optimal dirichlet boundary control of navier-stokes flow. 1998;15:178–203. [Google Scholar]
- [9].Jolley M, Stinstra J, Pieper S, Macleod R, Brooks DH, Cecchin F, Triedman JK. A computer modeling tool for comparing novel ICD electrode orientations in children and adults. Heart Rhythm. 2008;5(4):565–72. doi: 10.1016/j.hrthm.2008.01.018. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [10].Kunisch K, Vexler B. Optimal vortex reduction for instationary flows based on translation invariant cost functionals. SIAM Journal on Control and Optimization. 2007;46(4):1368–1397. [Google Scholar]
- [11].Kunisch K, Wagner M. Optimal control of the bidomain system (II): uniqueness and regularity theorems for weak solutions. Annali di Matematica Pura ed Applicata. 2012:1–36. doi: 10.1007/s10231-012-0254-1. [Google Scholar]
- [12].Kunisch K, Wagner M. Optimal control of the bidomain system (iii): Existence of minimizers and first-order optimality conditions. ESAIM: Mathematical Modelling and Numerical Analysis. 2013;47:1077–1106. [Google Scholar]
- [13].Lang J, Teleaga D. Towards a fully space-time adaptive FEM for magnetoquasistatics. IEEE Transactions on Magnetics. 2008;44(6):1238–1241. [Google Scholar]
- [14].Murray J. Mathematical biology: I. An introduction. Springer; Heidelberg: 2002. [Google Scholar]
- [15].Nagaiah C, Kunisch K. Higher order optimization and adaptive numerical solution for optimal control of monodomain equations in cardiac electrophysiology. Appl. Numer. Math. 2011;61:53–65. [Google Scholar]
- [16].Nagaiah C, Kunisch K, Plank G. Numerical solution for optimal control of the reaction-diffusion equations in cardiac electrophysiology. Computational Optimization and Applications. 2011;49:149–178. doi: 10.1007/s10589-009-9280-3. [Google Scholar]
- [17].Nagaiah C, Kunisch K, Plank G. Optimal control approach to termination of re-entry waves in cardiac electrophysiology. Journal of Mathematical Biology. 2012:1–30. doi: 10.1007/s00285-012-0557-2. doi: 10.1007/s00285-012-0557-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [18].Niederer S, Mitchell L, Smith N, Plank G. Simulating human cardiac electro-physiology on clinical time-scales. Front Physiol. 2011;2:14. doi: 10.3389/fphys.2011.00014. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [19].Nocedal J, Wright SJ. Numerical Optimization. second edition edition Springer Verlag; New York: 2006. [Google Scholar]
- [20].Pavarino LF, Scacchi S. Multilevel additive schwarz preconditioners for the bidomain reaction-diffusion system. SIAM J. Sci. Comput. 2008 Oct;31:420–443. [Google Scholar]
- [21].Plank G, Liebmann M, dos Santos RW, Vigmond E, Haase G. Algebraic multigrid preconditioner for the cardiac bidomain model. IEEE Trans Biomed Eng. 2007;54(4):585–596. doi: 10.1109/TBME.2006.889181. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [22].Plank G, Prassl A, Hofer E, Trayanova NA. Evaluating intramural virtual electrodes in the myocardial wedge preparation: simulations of experimental conditions. Biophys J. 2008 Mar;94(5):1904–1915. doi: 10.1529/biophysj.107.121343. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [23].Potse M, Dube B, Richer J, Vinet A, Gulrajani R. A comparison of monodomain and bidomain reaction-diffusion models for action potential propagation in the human heart. IEEE Transactions on Biomedical Engineering. 2006 Dec.53(12):2425–2435. doi: 10.1109/TBME.2006.880875. [DOI] [PubMed] [Google Scholar]
- [24].Rogers JM, McCulloch AD. A collocation-Galerkin finite element model of cardiac action potential propagation. IEEE Trans. Biomed. Eng. 1994;41:743–757. doi: 10.1109/10.310090. [DOI] [PubMed] [Google Scholar]
- [25].Roth BJ. Electrical conductivity values used with the bidomain model of cardiac tissue. IEEE Trans Biomed Eng. 1997 Apr;44(4):326–328. doi: 10.1109/10.563303. [DOI] [PubMed] [Google Scholar]
- [26].Sepulveda NG, Roth BJ, Wikswo JP., Jr. Current injection into a two-dimensional anisotropic bidomain. Biophys J. 1989;55(5):987–99. doi: 10.1016/S0006-3495(89)82897-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [27].Spach MS, Kootsey JM. Relating the sodium current and conductance to the shape of transmembrane and extracellular potentials by simulation: effects of propagation boundaries. IEEE Trans Biomed Eng. 1985 Oct;32(10):743–755. doi: 10.1109/TBME.1985.325489. [DOI] [PubMed] [Google Scholar]
- [28].Trayanova NA. Whole-heart modeling: applications to cardiac electrophysiology and electromechanics. Circ Res. 2011 Jan;108(1):113–128. doi: 10.1161/CIRCRESAHA.110.223610. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [29].van der Vorst HA. Bi-CGSTAB: A fast and smoothly converging variant of bi-cg for the solution of nonsymmetric linear systems. SIAM J. Sci. Stat. Comput. 1994;13:631–644. [Google Scholar]
- [30].Veneroni M. Reactiondiffusion systems for the macroscopic bidomain model of the cardiac electric field. Nonlinear Analysis: Real World Applications. 2009;10(2):849–868. [Google Scholar]







