Improving Efficiency in Electrical Impedance Tomography Problem by Hybrid Parallel Genetic Algorithm and a Priori Information Grazieli L. C. Carosio* Thermal and Fluids Engineering Laboratory, EESC, USP Av. Trabalhador São-carlense 400, 13566-970, São Carlos, SP E-mail:
[email protected]
Vanessa Rolnik Department of Physics and Mathematics, FFCLRP, USP Av. Bandeirantes 3900, 14040-901, Ribeirão Preto, SP E-mail:
[email protected]
Paulo Seleghim Jr. Thermal and Fluids Engineering Laboratory, EESC, USP Av. Trabalhador São-carlense 400, 13566-970, São Carlos, SP E-mail:
[email protected]
1. INTRODUCTION Electrical impedance tomography (EIT) consists in determining the electric contrast distribution in the interior of a sensing volume by applying an excitation profile to the external surface and measuring the corresponding response on the same surface. The data obtained from this procedure are supplied to a computer with specific software that reconstructs the original image. According to the theory of inverse problems, the functional approach treats the numerical reconstruction of EIT as a global minimization problem in which the fitness function is an error functional that expresses the difference between actual measurements experimentally obtained and the approximated measurements obtained numerically from an approximated contrast distribution. The global minimum of the error functional corresponds to the sought image. However, the powerful optimization methods available, as the genetic algorithms (GA), are not capable of obtaining the sought image in viable time. This is due to the nonlinear and ill-posed nature of the problem, which reflects in the minimization hyper-surface topology, implying the convergence of the algorithm for the exact solution in the presence of local minima, saddle points, boundary minima and almost plane regions (plateaus), and also, because of the long time of the evaluation of the fitness function. Thus, the search for high _________________ *bolsista de Doutorado FAPESP
performance (obtaining image in real time) is the principal factor that justifies the need for parallel processing, hybridization of parallel genetic models and introductions of a priori information. Parallel processing is a key technology of high-performance networked systems. It suggests that a task should be divided and accomplished by several elements of the processing, which can communicate simultaneously, searching for efficiency through the breaking of the sequential execution model of the instructions flux. The proposal of the island-cellular hybrid model presented in this paper is to combine the features of both models in order to maintain the diversity of the population during the convergence process by exchanging information between subpopulations and to dissipate good solutions for the whole population through the interaction among the neighborhoods. Previous studies have shown that the island-cellular hybrid model has obtained the best performance compared with the pure models regarding the convergence of the algorithm to the exact solution (sought image). The natural introduction of additional restrictions, representing information known a priori, is an extremely important advantage of GAs in the treatment of the solution of inverse ill-posed problems. Concerning the introduction of restrictions derived from a priori physical knowledge of the EIT problem,
it is possible to use, for instance, the signals derived from a direct imaging probe [9] and, besides the initial images, to calculate the instantaneous volumetric void fraction of the flow and the symmetry coefficient of the flow through calibration models previously determined. According to this context, the objectives of this work are aimed at the inclusion of a priori information in hybrid parallel genetic algorithm to accelerate the search for the image in reasonable time. This strategy seems to be promising since the restriction operator assures that all descendents comply with the physical information. Tests have shown that the introduction of a priori information, instantaneous volumetric void fraction of the flow and the symmetry coefficient of the flow, improved the performance when compared with the hybrid parallel genetic algorithm without a priori information.
functional that compares measurements obtained from an experimental model and a mathematical model. The first model corresponds to a collection of measurements, Qactual, which is the resultant external flux of the experimental assembly that contains the actual medium’s contrast (σactual). The second model consists in calculating Qapprox (the resultant external flux of the numerical model) by applying approximated values of σ (σapprox) in formulation. Therefore, the error functional is defined as e(σ ) = Q actual − Q approx . (4) The error functional e defined in equation (4) depends, firstly, on the contrast σ and the excitation profile φexc. Since the excitation profile is imposed externally, the last variable is suppressed. By adjusting σapprox to σactual within an acceptable error level, it is possible to conclude that σactual ≅ σapprox ⇒ Qactual ≅ Qapprox ⇒ e ≅ 0 (5)
2. STATEMENT OF THE PROBLEM
or also, that σapprox indicates the global minimum of e(σ). Thus, the reconstruction of the contrast σactual from excitations and responses on the external boundary ∂Ω, or more exactly, the solution of the inverse problem is obtained minimizing the error functional, so that δe = 0 . (6) The Euler-Lagrange equations associated with equation (6) became extremely complex, due to the difficulty of representing a direct relation of the contrast σ and the error functional e. Thus, it is convenient to profile the variational problem through the following equation: σ(x, y, z) = σ k ψ k (x, y, z) . (7)
The governing non-dimensional equation of an electrical impedance tomography problem can be derived from Maxwell equations according to the following: r r ∇ ⋅ − σ∇φ = 0 in Ω , (1)
(
)
where φ and σ are 3D scalar functions that represent, respectively, the electric field and the medium’s contrast (permittivity, conductivity or permeability) and Ω represents the domain problem or the sensing volume. The interaction between Ω and the exterior occurs through boundary ∂Ω and is defined by electrical excitation and response: φ(ξ, η) = φ exc (ξ, η) for (ξ, η)∈ Ω , (2) r r Q(ξ, η) = −σ∇φ ⋅ n ξ ,η for (ξ, η)∈ ∂Ω . (3) In equations (2) and (3), φexc denotes the excitation voltage profile (mathematically modeled by Dirichlet boundary conditions or essential boundary conditions) and Q is the measured profile (Neumann boundary conditions or natural boundary conditions). The sough image σ cannot be accessed directly through formulation (equations (1), (2) and (3)), as both σ and φ are unknown. A way to obtain σ is by treating the problem as an inverse problem and constructing an error
∑ k
In equation (7), ψk(x,y,z) are base functions conveniently chosen and σk is the respective decomposition coefficients. Therefore, when optimizing e(σ) in the variables σk restricted to an interval of values defined with regard to the contrast of the multiphase-flow components, the solution of equation (6) can be obtained. 3. GENETIC ALGORITHM A Genetic Algorithm (GA) is a stochastic search method based on the
biological evolution theory of Charles Darwin ([5] and [4]). More specifically, solution candidates (chromosomes) of the optimization problem compete among themselves to transmit their characteristics to new generations of chromosomes from previous generations (reproduction). The best fitted chromosomes (those with the lowest values for the optimization function, considering a minimization problem) have better chances of reproducing (selection), transmitting good characteristics to the new generations (elitism). Besides, random changes occurring at a specific probability (mutation) affect reproduction, providing the emergence of new characteristics that can be explored through the survival or decline of the mutant chromosomes. The application of these concepts to the EIT problem requires a special formalism which will be described in the sequel. Let the error function defined in equation (4) be in a discretization of equations (1), (2) and (3), in which σk with k = 1,2,…,NE are the expansion coefficients of the contrast and NE represents the total number of terms according to equation (7), i.e. r σ = (σ1 , σ 2 ,K, σ NE ) . (8) In other words, each σk is related to an element in the discretization of equation (1), in finite elements, and corresponds to genes of a particular chromosome. In the same way, Qactual and Qapprox are both discretized and calculated only in the NB elements of the boundary: r Q actual = (Q actual,1 , Q actual, 2 ,K, Q actual, NB ) , (9) r Q approx = (Q approx ,1 , Q approx , 2 ,K, Q approx , NB ) . (10) Then, the error functional defined in equation (4) becomes a discrete operator which defines the fitness function of the GA and that must be minimized from successive refinements of the contrast vector. With regard to the coding, the genes can be represented in binary-coding, as proposed by Holland [5], or in floating pointcoding, as employed by Michalewicz et al. [6] and Cho et al. [1] for dealing with EIT problems. Binary-coding was adopted in this work, once the two-phase flow problem can be treated as a combinatorial optimization problem. Considering a set of POP individuals, it is possible to define a generation:
(
)
r σi = σ1i , σi2 ,K, σiNE for i=1,2,...,POP
. (11) The reproduction process to generate the successor generations can be accomplished by combining the chromosomes of two or more parents, according to specific rules (for details, see [2] and [3]). In this work, the twopoint crossover was adopted. Crossover usually provides GA with a feature of local random search converging for the solution, however, in a slow and gradual way. Besides, the convergence for the exact solution can imply the presence of pathologies as minimum multiples, saddle points or almost plane areas surrounding the area of attraction of the global minimum. Mutation can avoid the premature convergence of the algorithm to a local minimum, which is not the global one, once it provides the appearance of the features absent in the initial generators, preventing the population of chromosomes from becoming too similar to each other, which slows or even stops evolution. Besides, mutation guarantees that all the search space can be explored, therefore, reaching the exact solution is theoretically possible, independently of the initial population or the pathology of the problem. According to the binary coding, a common method, which was adopted in this work, involves generating a random number for each gene of the chromosome. This random number shows whether or not a particular gene will be modified (for details, see [6] and [1]). Once the descendents are generated, the best individuals are selected to reproduce in the next generation. Different selection strategies are described in the literature ([5], [4] and [7]), each one with possible variations depending on specific mathematical rules or criteria of computational performance. The most common strategy consists in assigning selection probabilities according to the fitness function of individuals, so that the best ones have greater chances of being selected (elitism). 4. PARALLEL GENETIC ALGORITHMS In the current literature ([8] and [11]), parallel genetic algorithm (PGA) implementations can be separated into three categories: master-slave, island and cellular
models. The master-slave model is the simplest of the PGAs, where fitness evaluations are distributed among multiple processors (slaves) and computed in a parallel form. In the island model, the whole population is divided into multiple subpopulations that evolve on their own isolated from each other most of the time. Each processor handles a subpopulation by itself. The subpopulations communicate through certain migrant individuals that are periodically transferred from one subpopulation to another (migration). Selection and crossover operations occur within a small neighborhood. The island model is more than a hardware accelerator. The behavioral differences between the serial GA permit obtaining advantages in many situations, inherently not only to parallelization, but also to the algorithm. In the cellular model, the population is divided into many small neighborhoods. Each processor usually controls one or a small amount of individuals and there is intensive communication between neighborhoods. The individuals belonging to the whole population are distributed topologically in a grid (one-, two- or three-dimensional) and are restricted to reproduce in a small environment of their location. Selection and mating are performed only with neighbors. As a consequence of local selection, the selection pressure decreases tending toward a deeper exploration of the search space. The neighborhoods overlap and good individuals may disseminate across the whole population. 4.1. HYBRID PARALLEL GENETIC ALGORITHM The hybrid model considered in this work combines features of both island and cellular models. More specifically, it has subpopulations that may exchange information according to various patterns by allowing some individuals to migrate from one subpopulation to another. The individuals are arranged according to a two-dimensional grid and simultaneously evaluated whereas selection and reproduction take place locally within a small neighborhood. The following figure depicts this architecture:
Figure 1: A schematic view of the hybrid model 5. A PRIORI INFORMATION The natural introduction of additional restrictions, representing information known a priori, is an extremely important advantage of GAs in the treatment of the solution of inverse ill-posed problems. Several strategies were proposed to manipulate restrictions with GAs, such as rejecting, repairing, modifying genetic operators and penalty strategies [3]. In the Rejecting Strategy, all infeasible chromosomes created throughout the evolutionary process are discarded. If the feasible search space is convex and constitutes a reasonable part of the whole search space, then this strategy works reasonably well. However, the method presents serious limitations, mainly for highly constrained optimization problems where the greater number of new chromosomes is infeasible. An infeasible chromosome is modified to a feasible one through some repairing procedure in the Repairing Strategy. This procedure should be designed for each particular problem due to dependence concerning the problem. Consequently, the algorithm of repairing infeasible chromosomes might be as complex as to solve the original problem in some cases. Modifying Genetic Operator Strategy consists in designing specific genetic operators for the problem, aiming to maintain the feasibility of chromosomes. Thus, this procedure never produces infeasible chromosomes and the genetic search is confined within the feasible region, loosing the mobility. For constrained optimization problems, the most commonly used strategy to manipulate the infeasible solutions is the Penalty Strategy. In this strategy, penalties are applied to the infeasible solutions through the addition of a term to the fitness function, transforming a constrained problem into an unconstrained one. The infeasible solutions are not rejected or discarded. Actually, the
fitness function has the value increased (for minimization problems) and the infeasible solutions will be few opportunities in reproducing and generating descendents. Concerning the introduction of restrictions derived from a priori physical knowledge of the EIT problem, it is possible to use, for instance, the signals derived from direct imaging probe [9] and, besides the initial images, to calculate the instantaneous volumetric void fraction of the flow, α, and the symmetry coefficient of the flow, β, through calibration models previously determined. Mathematically this can be expressed as α=
β=
∫
∫
Ω
C(x, y, z)σ(x, y, z)dxdydz ,
(12)
xyzC(x, y, z)σ(x, y, z)dxdydz ,
(13)
Ω
where C(x,y,z) denotes the calibration model that, for simplicity, can be arbitrated C ≡ 1. The restriction operators should assure that all the descendents satisfy, at least approximately, equations (12) and (13). Thus, a possible implementation is by rejecting the unviable individuals, which is computationally inefficient, or modifying both reproduction and mutation, generating only viable descendents, which is not always feasible (for details, see [2], [3] and [10]). The strategy adopted in this work was the penalization of the fitness function, including, as a priori information, the instantaneous void fraction and the symmetry coefficient of the flow. 6. NUMERICAL SIMULATIONS The tests with parallel genetic algorithms were performed in a cluster composed of five processors. Linux is the operating system used in the distribution Mandrake 10.1 and the library of subroutines for parallel processing is MPICH version 1.2.5.2 for C and Fortran, a library of Message Passing Interface (MPI) developed by the Mathematics and Computer Sciences (MCS) Division. 6.1. CASE STUDY For test purposes, a two-dimensional domain was used, i.e., a square of unitary
sides with 16 macro-electrodes placed evenly in the boundary, according to Figure 2a. A discrete version of the governing equation (1) can be derived in Cartesian coordinates, according to a finite-element scheme. Initially, Dirichlet conditions (imposed tensions) were assumed in all sides of the square. Figure 2b shows the chosen triangular excitation profile, which simulates the tension of 10V in an electrode, located in the right corner of the superior edge of the square and gradually decreasing to a minimum value (0V) in the electrode diametrically opposite to it. y
x
Figure 2: (a) Representation of the sensing volume with inclusions; (b) Boundary conditions that simulate the triangular excitation profile Figure 2 also shows the real contrast distribution σactual inside the domain. The domain was discretized in a mesh of 10 x 10 points, generating a total of 100 nodes equally spaced (∆ = 0.11) in the two directions and 162 triangular elements. In the domain, the contrast distribution has value σint inside the inclusions (black areas in Figure (2)) defined for the intervals: x∈[0,0.11] and y∈[0.11,0.22] for inclusion 1, x∈[0.44,0.56] and y∈[0.44,0.56] for inclusion 2, x∈[0.33,0.44] and y∈[0.56,0.67] for inclusion 3 and x∈[0.89,1.00] and y∈[0.89,1.00] for inclusion 4. The remainder of the domain is defined by value σext. The aim of the EIT technique is to determine the contrast distribution. The numeric values of σ try to simulate the dielectric feature of a water flow (σext = 80) with inclusions of air (σint = 1). In the direct problem, the electric potential is known on the four sides of the square where the Dirichlet condition is applied, generating a total of 64 unknowns. Nevertheless in the inverse problem, σ should be established in all the 162 elements. The choice for this relatively small domain is justified due to the large size of the space of
the
solutions.
For instance, there are possible solutions in the discreet problem (σ = σint or σ = σext), not allowing for an exhausting search. If a calculation of fitness function takes one second, then an exhausting search will take approximately 1,85.1039 centuries! 2162 ≈ 5,9.1048
All problems have the solution in a domain B162, which represents the vector space with 162 binary components. The following table shows the results.
6.2. RESULTS The tests aimed to compare the performance of the island-cellular hybrid parallel genetic algorithm with regard to the inclusion of a priori information. The parameters adopted in HPGA were initial population with nine hundred individuals, two-point crossover with crossover rate of one hundred percent and mutation rate of six percent for each gene of the chromosome. The individuals with low values of fitness function were selected to the next generation and the ten best individuals migrated every ten generations. One hundred tests were performed for each unconstrained problem described below. Problem 1: fitness function without penalty min e = Q actual −Q approx .
(14)
Problem 2: fitness function with void fraction penalty min e = Qactual − Q approx . α actual − α approx . (15) 1+ α actual Problem 3: fitness function with symmetry coefficient penalty min e = Qactual − Q approx . βactual − βapprox . (16) 1+ βactual Problem 4: fitness function with both void fraction and symmetry coefficient penalties min e = Qactual − Q approx .
− α approx α 1 + actual .. α actual −β β 1 + actual approx βactual
(17)
Average Processing Time (Seconds) Convergence Percentage restricted to 2000000 evaluations Minimum Number of fitness evaluations Maximum Number of fitness evaluations Average Number of fitness evaluations
Fitness function without penalty
Fitness function with void fraction
Fitness function with symmetry coefficient
Fitness function with void fraction and symmetry coefficient
-
175
184
164
0%
18%
5%
42%
-
810,000
1,147,500
742,500
-
1,890,000
1,958,399
1,958,399
-
1,470,000
1,539,179
1,388,592
Table 1: Comparison of a priori information included in the hybrid parallel genetic algorithms. It is possible to observe in Table 1 that Problem 1 (without penalty) did not converge in any of the one hundred attempts, therefore it is not a reasonable choice for the type of inverse problem studied in this work. Problem 2 converged only in eighteen percent of the attempts, that is, only eighteen in one hundred. Problem 3 converged only in five percent of the attempts, that is, only five in one hundred. On the other hand, Problem 4 converged in forty two percent of the attempts (forty two in one hundred), which indicates that the inclusion of both penalties simultaneously improves the convergence rate for the hybrid parallel genetic algorithm model. It is important to stress that the convergence percentage was restricted to two million evaluations. With regard to average processing time, Problem 3 showed the worst performance and Problem 4 presented the best performance. Considering the necessary number of evaluations of fitness function until the convergence of each test, Problems 2 and 4 showed convergence after 810,000 evaluations and 742,000 evaluations respectively. Problem 3 converged only after 1,147,500 evaluations.
Also according to Table 1, Problem 3 required the highest average number of fitness evaluations to converge (1,539,179) whereas Problem 4 converged in the lowest average number of evaluations (1,388,592). 7. CONCLUSIONS The inclusion of a priori information in the hybrid parallel genetic algorithm presented in this paper for global minimum search showed to be efficient when applied to the EIT problem. By penalization of the fitness function, including, as a priori information, the instantaneous void fraction and the symmetry coefficient of the flow, the HPGA allowed for the solution search in a smaller processing time (164s), in comparison with the processing time of the HPGA with symmetry coefficient as a priori information (184s). Moreover, it increased the convergence percentage (restricted to two million evaluations) of the algorithm (42%), when compared with the convergence percentage of the other problems (for instance, only 5% for the HPGA with symmetry coefficient as a priori information and 0% for the HPGA without a priori information). Thus, the HPGA with a priori information (instantaneous volumetric void fraction and the symmetry coefficient of the flow) is a good choice for the type of inverse problem studied in this work, i.e., HPGA with a priori information is a very promising technique for the global minimum search (sought image). 8. ACKNOWLEDGEMENTS The authors would like to acknowledge FAPESP, Grant No. 03/12537-7, for the financial support given to this research.
References [1] K. H. Cho, S. Kim and Y. J. Lee, Impedance imaging of two-phase flow field with mesh grouping method, Nuclear Engineering and Design, vol. 204(1-3), pp. 57- 67 (2001). [2] L. Davis, “Handbook of Genetic Algorithms”, Van Nostrand Reinhold, 385 p, 1991.
[3] M. Gen and R. Cheng, “Genetic Algorithms & Engineering Design”, Wiley Interscience Publication, 432 p, 1997. [4] D. E. Goldberg, “Genetic Algorithms in Search, Optimization, and Machine Learning”, New York: Addison-Wesley, 432 p, 1989. [5] J. H. Holland, “Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence”, The University of Michigan Press, 211 p, 1975. [6] Z. Michalewicz, T. Logan and S. Swaminathan, Evolutionary operators for continuous convex parameter spaces, “Proceedings of the 3rd Annual Conference on Evolutionary Programming” (A.V. Sebald and L.J. Fogel, eds.), pp. 84-97, World Scientific Publishing, 1994. [7] Z. Michalewicz, “Genetic Algorithms + Data Structures = Evolution Programs”, New York: Springer-Verlag Berlin Heidelberg, 387 p, 1996. [8] H. Mühlenbein, M. Schomisch and J. Born, The parallel genetic algorithm as function optimizer, Parallel Computing, vol.17, pp. 619-632 (1991). [9] P. Seleghim Jr. and E. Hervieu, Direct imaging of horizontal gas-liquid flows, Meas. Sci. Technol., vol. 9, No. 8, pp. 1492-1500 (1998). [10] V. P. Rolnik and P. Seleghim Jr, A specialized genetic algorithm for the electrical impedance tomography of twophase flows, J. of the Braz. Soc. of Mech. Sci and Eng., vol. 28, No. 4, pp. 378-390 (2006). D. Whitley, Cellular genetic [11] algorithms, “Proceedings of the Fifth International Conference on Genetic Algorithms” (S. Forrest, ed.), pp. 658, San Mateo, CA: Morgan Kaufmann Publishers, 1993.