Parallel Computational Experiments in Electrical ... - CiteSeerX

2 downloads 0 Views 149KB Size Report
[2] R. Bayford, A. Gibson, A. Tizzard, T. Tidswell, and. D. Holder. Solving the forward problem in electrical impedance tomography for the human head using ...
Parallel Computational Experiments in Electrical Impedance Tomography Luis Paulo da Silva Barra

Rodrigo Weber dos Santos Franciane C. Peters Elisa P. Santos Helio J. C. Barbosa Universidade Federal de Juiz de Fora Campus Universit´ario, Bairro Martelos, CEP 36036-330, Juiz de Fora, MG, Brasil [email protected]

Abstract In this work we present a parallel method for the solution of the inverse problem associated to Electrical Impedance Tomography (EIT). This technique tries to recover the spatial distribution of electrical conductivity in the interior of a body from electric potential measurements taken on the external boundary of the body. The problem we address in this work consists in estimating the shape and position of cavities inside a two-dimensional domain. In the present approach a parametric representation of the geometry of the internal cavities is used and the problem is formulated as an optimization one, where the objective function is the fit between simulated and measured electrical potentials. The simulated electric potentials are numerically obtained by casting the Poison’s Equation and applying the Boundary Element Method (BEM) for discretization. As experimental data was not available, the BEM is also used to generate synthetic sets of measured electric potentials. The optimization strategy is based on a hybrid method that uses a Genetic Algorithm (GA) as a localization tool and a classical derivative free mathematical programming routine to enhance the spatial precision achieved by the GA. Since the GA dominates computation time, this part of the method is parallelized in a master-slave fashion. Results showing the performance of the proposed parallel strategy are presented for the standard problem of identifying cylindrical cavities with the influence of noise in the synthetic measurements.

1

INTRODUCTION

The present work describes a parallel solution strategy for a numerical problem related to the electrical impedance tomography (EIT). This technique tries to recover the spatial distribution of electrical conductivity in the interior of a body from potential measurements obtained by electrodes positioned around the boundary of the body. The measured

potentials are due to some known applied potential (or current injection) patterns, through the same electrodes. This technique has a broad range of applications, from industry process monitoring [9] to medical imaging. The medical applications include mapping of cerebral activity [2, 12], breast cancer detection [8, 16] and lung ventilation monitoring [10, 3, 17]. The efforts to solve the inverse problem related to this technique begun in the 80’s [5] and the strategies used nowadays can be classified in two groups. In the first group one tries to obtain the conductivity value of each pixel or sub domain (like a finite element) resulting in a conductivity image of the domain. In this case the number of unknowns is usually greater than the number of conditions to satisfy, resulting in an ill-posed problem, requiring some regularization methods in order to achieve a solution. This type of procedure provides a distribution of conductivity that can be represented by an image of the domain with a smooth distribution of conductivity. In order to identify different materials, or tissues, with known different conductivities it is still necessary a segmentation process that introduces a second source of approximation. The approach here adopted belongs to another group and resemble strategies proposed in previous works [6, 11, 7] where instead of determining conductivities within small sub domains, the unknowns are shape parameters of the desired sub domain. In this way, the number of unknowns in the problem is greatly reduced and the segmentation step is avoided. More precisely, the problem studied in the present work treats an initial simplification of the problem of TIE, where the objective is to determine the extension of nonconducting sub domains (cavities) embedded in a homogeneous conducting two-dimensional medium.

2

THE INVERSE PROBLEM

The strategy here adopted takes the original problem as an optimization one. In this problem the objective function

is defined as a distance, in some sense, between the electric potential measurements obtained on the boundary, and the corresponding simulated values computed for a candidate solution, i.e. for some given cavities. Although the adopted procedure can be easily extended to 3D problems with a general geometry of the external boundary, in the present paper the domain where the cavities are to be found is supposed to be 2D and circular. In the numerical experiments here devised 16 electrodes are assumed and only one pair of them (diametrically opposed) are forced at a time, as shown in Figure 1. In this way, a set of 13 measures for each adopted pair is available, since for each configuration a third electrode is used as reference. The adopted configuration provides 104 measures of potentials, as there are 8 distinct pairs of diametrically opposed electrodes. The objective function, F (z), to be minimized, can be defined as: v u 8 13 uX X (zij − z¯ij )2 (1) F (z) = t i=1 j=1

where zij stands for the computed potential value at the j−th electrode in the i−th position of source electrodes, and z¯ij are the corresponding measured values.

∇2 φ = 0

where φ is the electric potential. For the solution of this problem the Boundary Element Method (BEM) was adopted mainly due to two characteristics: accuracy and ease in mesh generation. As electric potential values inside the domain are not required during the solution, the BEM becomes advantageous and more efficient when compared to other methods like the Finite Element Method. Related BEM work for the solution of the problem here focused can be found in several references such as [4]. The discretization of the Poison equation generates a linear system of algebraic equations: Hφ=Gq

Another simplifying assumption adopted is that the shape of the cavities is restricted to circular ones. The identification of cavities of more general shapes can be made by an adequate parameterization of geometry and will be focused in future work.

2.1

The Direct Problem

In order to solve the inverse problem, the procedure proposed here involves the solution of the direct (or forward) problem which, under assumption of usual simplifying hypothesis, is modeled by the well known Laplace’s equation:

(3)

where H and G are square matrices of order N , being N the number of nodes used in the approximation and φ and q are the vectors storing the values of the electrical potentials and their normal derivatives, respectively. Introduction of the boundary conditions is obtained through a column reordering of matrices H e G, resulting in a unknown vector x and a prescribed vector b : Ax=b

Figure 1. Diametrical loading configuration and definition of the reference electrode.

(2)

(4)

where A is a dense non-symmetric matrix. In order to enhance the computational performance, the resulting system of equations is solved by the GMRES [15, 14] iterative algorithm with a diagonal preconditioning (Jacobi). Along the iterative procedure of the optimization problem, the forward problem has to be solved a large number (a few thousand) of times demanding a considerable amount of computational effort. In order to achieve greater computational performance the coefficients corresponding to the fixed part of the boundary (that does not change) are computed once and stored for later use. Consider the partition of the matrices H and G :       H ee H ei φe Gee Gei qe = H ie H ii φi Gie Gii qi (5) where the subscript e refers to the external (fixed) part of boundary and i to the internal boundary, i.e., to the cavities that iteratively are to be detected. As the partitions H ee and Gee do not change along the solution, they are computed once at the beginning of the process and stored. In order to compute the objective function from a given cavity geometry it is necessary to solve as many systems of equations (4) as the number of different current injection (applied potential) cases involved (eight in the present

implementation). Therefore, the coefficients of matrices H and G related to internal boundaries (cavities) are computed once for each objective function evaluation. For each of the eight configurations needed to the computation of the objective function, a system like (4) is then assembled and solved.

3

THE INVERSE PROBLEM SOLUTION

Within the hypothesis assumed, each cavity p is defined by three parameters: the two coordinates of its center (xpc , ycp ), and its radius (rp ). In order to solve problems in which there are more than one cavity the vector containing the unknowns, X, stores, in sequence, the geometry parameters of all cavities and has a dimension n; for instance, with four cavities (as in the example here presented) one has: X = (x1c , yc1 , r1 , x2c , yc2 , r2 , x3c , yc3 , r3 , x4c , yc4 , r4 ) and n = 12. Since the computed potential values at electrodes , z, depend on the n shape parameters, the optimization problem is formulated as: Find X that minimizes F (z(X)), with F defined in Equation 1. The geometry of the cavities must be subject to geometrical constraints which will be handled in two different ways. In previous work [1] a set of test-problems with one, two, and three circular cavities were explored, solving the inverse problem by means of a simple mathematical programming procedure, namely Powell’s method, briefly described in section 3.1. For problems with one or two cavities this procedure was effective. However, for the case with three cavities Powell’s method was overly dependent on a good initial starting vector. This indicates that as the number of parameters grow the landscape of the optimization problem becomes more complex, presenting several local minima. The behavior described above suggests that a global optimization procedure should be devised and the Genetic Algorithm (GA) was then adopted in order to provide a good initial solution to be subsequently refined by Powell’s method. In the adopted real-coded Genetic Algorithm, described in more detail in section 3.2, the geometry constraints are enforced when each new individual is generated, allowing only for feasible ones. In this step, only non-overlapping cavities fully contained inside the circular domain are allowed. After finishing the GA, its best solution is then used as the initial guess for Powell’s Method, which treats the (local) problem as an unconstrained one.

3.1

Powell’s Method

This widely known unconstrained optimization method was chosen because (i) it does not require derivatives (only

objective function values are used), (ii) an off-the-shelf implementation [13] is available, and (iii) good results have previously been reported in the literature [11, 7]. In this method each iteration completes after a sequence of n line searches is performed, each one taking as the starting point the minimum achieved in the previous search. Initially such directions coincide with the coordinates of the optimization problem, but after each iteration the initial and final points define a composite search direction that may replace one of the previous search directions. It should be mentioned that in this sequential process the order of such minimizations –which is defined by the order of the parameters in vector X– can change the final results of the algorithm. In the sequential version of the method here presented the time spent in Powell’s method was limited to about one tenth of the overall time. Therefore, we focus on the parallelization of the GA part of the method.

3.2

The Genetic Algorithm

Genetic algorithms are biologically inspired search procedures which have found applications in different areas and have been shown to efficiently search complex spaces for good solutions to optimization problems. One of their most attractive characteristics, besides being naturally parallel and robust, is that they do not require the computation of derivatives. When used for continuous optimization problems, GAs encode all the variables xj (j = 1, . . . , l), corresponding to a candidate solution, in a chromosome xi ∈ Rl (i = 1, . . . , p) and maintain a population (of size p) of candidate solutions which is evolved mimicking Nature’s evolutionary process: solutions are selected and have their genetic material recombined/mutated by means of genetic operators giving rise to a population with improved solutions. The process starts from a usually random initial population and is repeated for a given number of iterations or until some stopping criteria are met. In this paper, a generational GA is adopted, where an almost entirely new population is created and tested for insertion in the population of the former generation. In the selection scheme used, the individuals in the current population are ranked (according to the value of the objective function to be minimized) in a way that the best individual –the one with the lowest function value– has the highest ranking. A pseudo-code for the GA used here can be written as: Begin Initialize the population P Evaluate individuals in P Sort P according to the fitness value

Repeat select genetic operator select parents apply genetic operator evaluate offspring W Repeat for each wi in W if wi is better than wworst then remove wworst insert wi in P endif End repeat until stopping criteria are met End where W is a set of individuals wi , wworst is the worst individual in P. In a all tests presented here only one run of the GA was performed and the best result was adopted as initial guess for the Powell’s method step. The main characteristics of the genetic operators adopted in the present work are listed below: • Crossover was applied with a probability of 90% and was implemented in the following ways. Simple Crossover: two parents are selected; a random number splits the chromosomes in two sections; and a new individual is generated by merging the first section of one of the parent’s chromosome and the second section of the other parent. Blend Crossover: two parents are selected, w1 and w2 ; a new individual is generated by computing w3 = w1 +β ∗(w2 −w1 ) with β varying between -0.5 and 1.5. Averaged Crossover: a random number of genes is selected; each one is combined with the corresponding parent and generates a new individual in which each selected gene is computed as the average between the referred values. This operator tends to reduce the diversity of the population by moving the individuals towards the center of the search space. • Mutation was applied with a probability of 30% in a random number of genes of an individual.

3.3

Parallel Strategy, Software and Hardware

The parallel GA adopted here is a straightforward implementation of a master-slave strategy, dividing the evaluation of the created individuals into the available processor. In this strategy the communication between the master node and the slaves limits to: request messages sent from the master to a slave containning some individuals (number and chromosomes); and the returning message, i.e. from slave

to master, containing the computed fitness of the requested individuals. The creation of a new population, including the necessary feasibility verification, is sequentially performed by the master process. The parallel GA used was coded in C++ and the direct solver was coded in standard Fortran 77. The Message Passing Interface (MPI) library was used for the communication among the different processes. The computational experiments here reported were realized, remotely from Federal University of Juiz de Fora, at the CarcarCluster (www.carcara.lncc.br) of LNCC (National Laboratory of Scientific Computing). From the 55 nodes available, 35 nodes are Pentium III PC’s with 512 Mbytes RAM, where the following results were run. As the nodes are not dedicated the results presented could be perturbed by sharing the capacity of the nodes, but this was avoided running the jobs in a period of low demand.

4

NUMERICAL RESULTS

In order to establish the performance of the proposed procedure some numerical experiments are proposed considering a configuration including four cavities. The experimental data were replaced by simulated input data (the potential measures along the boundary) obtained from a previous solution of the forward problem. The initially proposed configurations are then referred to as the exact solution for the identification problem. In order to get more realistic results, the influence of noise in the measurements is considered in a simplified fashion, assuming that such effect can be simulated by rounding the exact numerical results for a reduced number of digits. Therefore, the measures (values in z¯) were taken with only 2 digits.

4.1

Four Cavities Detection

In Figure 2, the target configuration, the GA solution (obtained with 8 processors and initial guess for the Powell’s method) and the final solution are presented, showing the spatial resolution achieved by the proposed method. Table 1 presents the coordinate values for each configuration. Although with a variable performance depending on the specific run, the method was able to find the size and locations of four cavities, using noisy measurements as input. A population of 210 individuals and 150 generations resulting in almost 17000 (16898 for eight processors and 16749 for four processors) objective function evaluations. The performance of the parallel implementation can be observed in Table 2 where the solution times were obtained from different number of processors. Two measures of efficiency are presented in Table 2, the first, labeled SE, is computed considering only the slave

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12

Exact 0.0000 -8.0000 4.5000 -8.0000 0.0000 3.5000 0.0000 8.0000 1.5000 8.0000 0.0000 2.5000

GA -0.3314 -7.5511 4.5158 -7.4467 -0.2391 3.3091 -2.8447 5.8167 1.4796 7.3380 -0.7565 2.5660

GA + Powell -0.0308 -7.9145 4.5265 -8.0320 0.0995 3.4532 -0.3365 7.8534 1.4894 7.8882 -0.1514 2.4994

Table 1. Exact, GA only and final (GA + Powell) solution configurations.

Number of Processors Time (s) SE (%) E (%)

Figure 2. Exact, GA only and final (GA + Powell) solution configurations.

nodes using the expression (6)bellow where Ti stands for the time required for a solution using i nodes. T2 SE = 100 (n − 1)Tn

E = 100

T1 (n)Tn

(7)

It is assumed that the time needed for the two nodes configuration is (essentially) the same needed for sequential solution. The results presented above were obtained with no load balancing strategy. Because different individuals possess cavity boundaries of different lengths, the execution time of the forward problem, and consequently, of the fitness calculation varies from one individual to another. As can be seen in Figure 3 as the geometry of the cavities vary, the number of boundary elements used in the discretization also varies, which explains the considerably high variation (about 400%) for the fitness computation time. As the distribution of the individuals among the processors is random, the execution time per processor during a whole generation does not vary that much among the different processors. In addition, Figure 3 presents the computational savings related to the strategy described by Equation 5. The points

4 17582 94.28 70.72

8 7408 95.91 83.92

Table 2. Times and efficiency for GA solutions with 2, 4 and 8 processors.

(6)

The above measure gives an idea of the effect of lack of balancing between slaves and the wasted time of these nodes while the master is reordering the fitness results and generating the new individuals. The second, a standard efficiency measure, E, is computed considering all nodes, by the expression:

2 49733 — 50.00

above the main concentration of results are related to the computation of the initial individuals and include the coefficients related to the fixed part of the boudary. For the next individuals this fixed part is not re-computed and the calculations are faster. In Figure 4 the fraction 100∗(tmax −tavg )/tmax for each cluster configuration used is plotted, where tmax and tavg are the maximum and average (over the slaves) times spent by the slave-processors to evaluate its share of the generation. The averages of this values ( 3.20% for 8 nodes and 1.44% for 4 nodes) can be seen as upper bounds for the increase in performance for a perfect balanced load distribution.

5

CONCLUSIONS

In this work we presented a parallel method for the solution of the inverse problem associated to Electrical Impedance Tomography (EIT). The particular problem we addressed consists in estimating the shape and position of cavities inside a two-dimensional domain. The problem was formulated as an optimization one, and the objective function was taken as the distance between simulated and measured electrical potentials. The simulated electric po-

Figure 3. Variation of elapsed time for a single fitness computation with the number of equations of BEM discretization in the seven slave processors configuration.

Figure 4. Percent variation between maximum and medium elapsed time for fitness computation on slave nodes for each generation.

tentials were numerically obtained via the Boundary Element Method (BEM). As experimental data was not available, the BEM was also used to generate synthetic sets of measured electric potentials. The optimization strategy was based on a hybrid method that combined a Genetic Algorithm (GA) and a classical derivative free mathematical programming routine. The computational effort of the whole inverse problem is considerable and justifies the use of techniques of high performance computing in order to keep the execution times acceptable. Since the GA dominated execution time, this part of the method was parallelized using a master-slave approach. The parallel implementation achieved considerable speed-ups when running in a 8-node linux cluster. Nevertheless, the preliminary results indicate that by adding more nodes the effect of load unbalancing tends to grow. Therefore a strategy for load balancing could further improve the performance of the parallel implementation.

[2] R. Bayford, A. Gibson, A. Tizzard, T. Tidswell, and D. Holder. Solving the forward problem in electrical impedance tomography for the human head using IDEAS, a finite element modelling tool. Physiological Measurements, 22:55–64, 2001. [3] J. S. Bevilacqua. Modelagem em biomatem´atica. In Notas em Matem´atica Aplicada. SBMAC, 2003. [4] C. Brebbia, J. C. F. Telles, and L. C. Wrobel. Boundary Element Techniques: Theory and Applications in Engineering. Springer-Verlag, 1984. [5] A. Calderon. On an inverse boundary value problem. In Seminar on Numerical Analysis and its Applications to Continuum Mechanics, pages 65–73, Rio de Janeiro, Brasil, 1980. LNCC. [6] D. Han and A. Prosperetti. A shape decomposition technique in electrical impedance tomography. Journal of Computational Physics, 155:75–95, 1999. [7] C. T. Hsiao, G. Chahine, and N. Gumerov. Application of a hybrid genetic/Powell algorithm and a boundary element method to electrical impedance tomography. Journal of Computational Physics, 173:433–454, 2001. [8] T. Kerner, K. Paulsen, A. Hartov, S. Soho, and S. Poplack. Electrical impedance spectroscopy of the breast: Clinical imaging results in 26 subjects. IEEE Transactions on Medical Imaging, 21(6):638–645, 2002. [9] M. Kim, K. Kim, and S. Kim. Phase boundary estimation in two-phase flows with electrical impedance tomography. Int. Comm. Heat Transfer, 31(8):1105–1114, 2004. [10] P. Metherall. Three Dimensional Electrical Impedance Tomography of the Human Thorax. PhD thesis, University of Sheffield, 1998. [11] J. C. Munck, T. Faes, and R. M. Heetaar. The boundary element method in the forward and inverse problem of electrical impedance tomography. IEEE Transactions on Biomedical Engineering, 47(06):792–800, June 2000.

Acknowledgments The authors would like to thank the Carcar´a Project at Laborat´orio Nacional de Computac¸a˜ o Cient´ıfica - LNCC, where the computational experiments were performed. Franciane Peters and Elisa Santos thank CNPq and Universidade Federal de Juiz de Fora for the IC scholarships.

References [1] L. Barra, F. Peters, and C. Martins. Imageamento de cavidades utilizando programao matem´atica e o m´etodo dos elementos de contorno. In Anais do Simmec, Arax´a, Maio 2006. ABMEC.

[12] N. Polydorides, W. Lionheart, and H. McCann. Krylov subspace iterative techniques: On the brain activity with electrical impedance tomography. IEEE Transactions on Medical Imaging, 21(6):596–603, June 2002. [13] W. Press, B. Flannery, S. Teukolsky, and W.T.Vetterling. Numerical Recipes, The Art of Scientific Computing. Cambridge University Press, 1988. [14] Y. Saad. Iterative Methods for Sparse Linear Systems. PWD Publishing Company, 1996. [15] Y. Saad and M. Schultz. GMRES a generalized minimal residual algorithm for solving nonsymmetric linear systems. SIAM Journal of Scientific and Statistical Computing, 7:856–869, 1986. [16] J. Seo, O. Kwon, H. Ammari, and E. Woo. A mathematical model for breast cancer lesion estimation: Electrical impedance technique using TS2000 commercial system. IEEE Transactions on Biomedical Engineering, 51(11):1898–1906, 2004. [17] F. Trigo, R. Lima, and M. Amato. Electrical impedance tomography using extended Kalman filter. IEEE Transactions on Biomedical Engineering, 51(1):72–81, 2004.