Numerical Comparison of the Performance of Genetic Algorithm and Particle Swarm Optimization in Excavations

Today, the back analysis methods are known as reliable and effective approaches for estimating the soil strength parameters in the site of project. The back analysis can be performed by genetic algorithm and particle swarm optimization in the form of an optimization process. In this paper, the back analysis is carried out using genetic algorithm and particle swarm optimization in order to determine the soil strength parameters in an excavation project in Tehran city. The process is automatically accomplished by linking between MATLAB and Abaqus software using Python programming language. To assess the results of numerical method, this method is initially compared with the results of numerical studies by Babu and Singh. After the verification of numerical results, the values of the three parameters of elastic modulus, cohesion and friction angle (parameters of the Mohr–Coulomb model) of the soil are determined and optimized for three soil layers of the project site using genetic algorithm and particle swarm optimization. The results optimized by genetic algorithm and particle swarm optimization show a decrease of 72.1% and 62.4% in displacement differences in the results of project monitoring and numerical analysis, respectively. This research shows the better performance of genetic algorithm than particle swarm optimization in minimization of error and faster success in achieving termination conditions.


Introduction
Excavation operations increase the probability of occurring problems like collapse of the buildings, large deformations at the ground level and especially unpredicted damages.This importance is due to the concerns related to ground movements around deep excavations.Therefore, precise identification of the soil strength parameters are essential for predicting lateral soil movements.But, there are limitations associated with the results of experimental models and also in-situ tests for determining the soil strength parameters.So, for determination of the soil strength parameters one could take advantage of various the back analysis methods.
The back analysis method was first used by Peck in 1980 to estimate the soil parameters based on project monitoring.Afterwards, the technique was used in geotechnical structures such as rock tunneling, soil structures, identification of soil parameters in laboratory or in situ tests and operational data of excavation systems.Over time, optimization methods including metaheuristic algorithms, such as genetic algorithm (GA) and particle swarm optimization (PSO), were used to accelerate the achievement of ultimate target and increase the accuracy of predictions in the back analysis [1].
In fact, the back analysis methods are based on the measured deformations after construction of the structure and their interpretation.In the back analysis, strength parameters of the soil can be determined by minimizing the difference between the measured results after construction of the projects and numerical analysis.The back analysis provides the conditions for establishing a relationship between measured and predicted results [2,3].Given that the back analysis methods are named by measuring many quantities, one of the most important of these is displacement.Displacement back analysis methods are divided into two direct and indirect categories.The direct method is based on optimization and the indirect method is based on mathematical formulation [2].

Direct and Indirect Displacement Back Analysis
Direct displacement back analysis method is based on reducing the difference between the field measurements and results calculated by numerical analysis.So, at first, the error (objective) function can be used to describe the difference.The performance of optimization methods, such as the genetic algorithm and particle swarm optimization algorithm, is in a way that minimize the difference within an automated process without human intervention.A disadvantage of direct method is associated with time consuming repetitive calculations [4].But the indirect displacement back analysis method is based on mathematical formulation.This method has a lot of complexities which limit its use, but its main advantage is elimination of repetitive calculations that greatly reduces the time of computation [2].

Genetic Algorithm (GA)
Genetic algorithm is one of the most powerful metaheuristic algorithm by which complex problems can be optimized.This algorithm is created based on the theory of evolution of organisms in nature.This algorithm was first introduced by John Holland at University of Michigan in 1975 and its basic principles were then developed by Professor Goldberg in 1989 and Renders in 1994.In fact, the genetic algorithm is a computer search method based on the structure of genes and chromosomes that uses operators such as selection, crossover and mutation for reproduction and survival of the best children of parents.Based on such method, this optimization program is developed in FORTRAN for geotechnical studies by 3S-R laboratory [5][6][7].Four important stages in the genetic algorithm are as follows:  Defining the research space. Encoding individuals and populations. Generating an initial population. Selection, crossover and mutation.

Defining the Research Space
The problem is solved as a minimization problem for Np parameters in the Np-dimension space.If each parameter is considered as P, restricted to authorized values of P between a minimum (Pmin) and a maximum (Pmax).

Encoding Individuals and Populations
A number of bytes (Nb) with each encoded binary parameter are forming a gene.The research space is meshed into (2 Nb ) Np elements, the choice of Nb is linked to the parameter values.Several genes form an individual (one point of the research space) and a set of Ni individuals forms a population.

Generating an Initial Population
Initial population is chosen in the research space.The objective function is evaluated by finite element method calculation.

Selection, Crossover and Mutation
Given the minimum value of objective function, only the best Ni/3 individuals is selected for the next population.In the next population, the best individuals will be considered as parents.The parents are randomly crossed over to generate new pairs of individuals.This process continues until 2 Ni/3 new individuals (children), are generated.When the parents and children generate a new population together with Ni children, some children are randomly mutated and modified to diversify the population [1, 9 and 10].

Particle Swarm Optimization (PSO)
Particle swarm optimization algorithm is one of the most powerful metaheuristic algorithms.This algorithm was created by James Kennedy (social psychologist) and Russell Eberhart (electrical engineer) in 1995.They aimed to produce a model of social collaboration and community based on mathematics that led to a kind of computational intelligence.In 1992, they initially began their work on the collective behavior of birds for finding food.Their efforts led to the creation of particle swarm optimization (PSO) algorithm which later became widely used in optimization problems.In this algorithm, each organism is seen as a particle spread in the research space, whose ultimate target is to determine and minimize the value of objective (error) function [12,13].Five important stages in the particle swarm optimization are as follows:  Estimation and initial positioning to particles. Updating the position and velocity of all particles. Evaluation of new conditions and competition. Satisfaction a termination criterion. Introduction of the best results.

Estimation and Initial Positioning to Particles
At first, the particles form a population, then positions and velocities in the research space are allocated to each particle and the eligibility of particles is assessed.

Updating the Position and Velocity of All Particles
The next position of particles is estimated according to Equation 1 and particles update their velocity according to Equation 2.
Where w is the inertia weight which prevents the algorithm being trapped into local optimum; V is the velocity vector in the iteration t; r1 and r2 are random numbers in the region 0 to 1; c1 and c2 are the local and global learning factors (positive constants); x is the position of each particle; ibest is a particle best position and gbest is a global best position.

Evaluation of New Conditions and Competition
After updating for all particles, the new conditions created for each particle are evaluated and the competition is done to compare the performance of particles.

Satisfaction a Termination Criterion
The process stops when the algorithm reaches a termination criterion, unless process is iterated from the updating stage.

Introduction of the Best Results
After reaching a termination criterion, the best results according to an assessment of the objective function (error) are introduced [14].

Error Function
In this paper, the error (objective) function determines the difference between measured and calculated values.
Where ui is displacement calculated by finite element method in point i; ui* is displacement measured by monitoring in point i; and N is the number of measuring points for a vertical section of wall [15].

Convergence Criterion
The convergence used in this study is considered according to Equation (4).The back analysis ends when the criterion is satisfied.
The convergence criterion (Equation 4) is based on the absolute value of change of the error function obtained between two successive iterations is less than the specified tolerance [16].

Implementation of Genetic Algorithm and Particle Swarm Optimization in MATLAB
In this paper, genetic algorithm and particle swarm optimization are implemented by coding in MATLAB.These algorithms can be applied in MATLAB for discrete and continuous problems [17,18].In continuous problems, the values of input data varies within a certain range and numerical values can be applied.Floating point numbers are used for codes in such problems.Uniform operators of the algorithms are often used for this type of coding.The advantages of this approach include less storage space and higher speed [19].
In discrete problems, variables do not have continuous changes in these problems and all values cannot be aligned to them.In discrete problems, the set of variables being optimized are coded as binary strings and then attached to each other [17].

Verification
The numerical results of the studies by Babu and Singh are chosen for verification.They analyzed a soil nailed wall in five stages by the excavation of 2 m via Plaxis software [20].In this paper, the modeling and analysis were done by Abaqus software.The results showed that the use of the Mohr-Coulomb model could affect the lateral displacement of the soil nailed wall; because the soil elasticity modulus in the reloading situation is equal to the loading condition in Abaqus, which may lead to overestimation of uplift in the excavation bottom.Hajialilue Bonab and Razavi studied several confirmed researches in relation to this problem.They modeled and analyzed a 3D model based on experimental data to find a solution against excessive uplift.According to their research, the geometry should slightly change in order to achieve a more reasonable lateral displacement of the soil nailed wall.They discussed about modification of the height of excavation bottom to the model bottom about 5 m [21].In this paper, after modification of the geometry, the results of modeling and analysis of the soil nailed wall by Abaqus indicate a good agreement with the results of the studies by Babu and Singh in Figure 1 (error less than 5%).

Introduction of Case Study
The west side of the project consists of three layers of homogeneous CL-type gravel-clay as well as SC-and GCtype clayey gravel and sand, classified by according to USCS; as well as, the groundwater level is not considered in geometry of the soil.The selected type of soil was excavated in 7 lifts to a depth of 15 m.To stabilize the wall, a nailing system is implemented with an angle of 15 degrees and 2 m distances between boreholes.The load of behind the wall is estimated about 10 / 2 and the monitoring data of reflector no.23 located on the top of west side indicates 8mm lateral displacement.
Three parameters of the soil such as soil friction angle (), elastic modulus (E) and cohesion (C) are selected for the back analysis and the other parameters that do not have much effect are ignored.
 Poisson ratio v=0.3  Dilation angle Ψ=∅-30° Jacky's formula is also used to calculate the coefficient of lateral earth pressure.
Table 1 represents the mechanical parameters used for stability design and calculations.

Analysis of Case Study and Implementation of Python Programming Language
After modeling and analyzing the project, the Python programming language provides a basis for establishing a link between the algorithms (GA and PSO) in environment of MATLAB computing software and Abaqus software.This fully automated cycle is able to perform the back analysis without human intervention, e.g.performing the process of searching by the algorithms, modeling and analyzing the project by finite element method, determining the soil strength parameters, calculating the objective (error) function, introducing the best soil strength parameters as optimal parameters, satisfy the convergence criterion and introducing the minimum error.Lateral displacement of the soil nailed wall (ux), read from reflector no.23, is used as a criterion for determining soil strength parameters in the back analysis.

Effective Parameters of Genetic Algorithm and Particle Swarm Optimization
The results may be improved by increasing and selecting the correct values for parameters such as the population size (npop) and maximum number of iterations (maxiter) in the genetic algorithm and the number of particles (npar) and maximum number of iterations (maxiter) in the particle swarm optimization [11].

Feasibility of Back Analysis
The results of project monitoring and finite element analysis show a 73.7% difference in lateral displacement.The back analysis should be implemented to reduce the difference.

Back Analysis of Case Study by Genetic Algorithm and Particle Swarm Optimization
According to Table 2, 9 soil strength parameters (E1, E2, E3), (C1, C2, C3) and (1, , ) are considered for the first to third soil layers of the project site in certain ranges in order to implement the displacement back analysis.In this paper, effective parameters (npop, npar, maxiter) and the soil strength parameters ranges are considered in similar conditions and the case study considered as a continuous problem for genetic algorithm and particle swarm optimization to implement the back analysis in MATLAB software.Lateral displacement (mm) The result of project monitoring The result of finite element analysis The back analysis by GA and PSO is demonstrated in Figures 3 and 4.

Back Analysis Results
In this paper, acceptable results are based on reduction of the value of error function (the difference between numerical and monitoring results (observation measurements)) to less than 5% and to satisfaction of the convergence criterion.After the back analysis using GA and PSO under similar conditions (maxiter GA = maxiter PSO, npop = npar, identical numerical ranges for the soil strength parameters), the genetic algorithm satisfies the convergence criterion and reduces the error to less than 5% by 254 iterations of finite element analysis and checking objective function.The back analysis using GA stops after reaching the termination condition and 9 soil strength parameters (parameters of Mohr-Coulomb model) are simultaneously introduced and determined for the three soil layers.However, the PSO algorithm cannot reduce the amount of error function to less than 5% by 254 iterations, unlike GA; the back analysis should continue by PSO algorithm or the ranges must be more limited.Finally, it can be concluded that the genetic algorithm has been more successful in this research.The results of last 5 evaluations of each algorithm are listed In Tables 3 and  4. The convergence criterion is determined using Equation ( 4), according to the value of error function in the last two analyses.Given the estimated error percentage and satisfaction of the convergence criterion by genetic algorithm, the results of genetic algorithm are considered as acceptable parameters and the results of particle swarm optimization algorithm are rejected.Acceptable parameters are considered as equivalent soil parameters because the lateral displacement of soil nailed wall is affected by many factors such as previous stresses, depth and area of excavation, overheads, consolidation, drainage operations and etc.In Figures (5) to (7), the initial values of soil strength parameters used in the design are compared with the estimated values by GA and PSO for the project.In Figure 8, the lateral displacement approximated by the algorithms (by estimating the soil strength parameters) is compared with the displacement read in project monitoring (observation measurements).Second Layer (MPa)

Conclusion
In this paper, the back analysis was carried out automatically without human intervention to determine soil strength parameters in an excavation project in Tehran city using genetic algorithm and particle swarm optimization.This fully automated process was done by establishing a link between MATLAB and Abaqus software by Python programming language.When the soil strength parameters such as Young's modulus, cohesion and soil friction angle were determined by genetic algorithm and particle swarm optimization under similar conditions, the genetic algorithm could satisfy the convergence criterion and reduce the error to less than 5% by 254 iterations of finite element analysis and check of error function.The back analysis using genetic algorithm stopped when reached the termination condition and 9 soil strength parameters (parameters of the Mohr-Coulomb model) were simultaneously introduced for the 3 soil layers of the project.However, the particle swarm optimization algorithm failed to reduce the value of error to less than 5% by 254 iterations of finite element analysis, unlike the genetic algorithm.The back analysis must continue by particle swarm optimization algorithm to achieve the termination condition, which involves time consuming calculations.The re-evaluation of the back analysis by PSO showed that it could achieve the convergence criterion and error less than 5% in smaller ranges of the soil strength parameters.
This could indicate the superiority of GA versus PSO in such problems.The results of the back analysis by GA were selected as equivalent optimized results for the project.So, this method can be employed in professional problems for cost-effectiveness of the projects.However, the disadvantage of GA and PSO is the time-consuming process to achieve the termination condition.

Figure 1 .
Figure 1.Comparison of numerical results

Figure 2 .
Figure 2. Comparison of the results of ateral displacement

Figure 8 .
Figure 8.Comparison of lateral displacement obtained by GA and PSO versus project monitoring operationThe results show the highest increasing changes in optimized values of elastic modulus.Underestimated values are used in design because of limitations in field or laboratory tests to estimate the soil strength parameters, which declines cost-effectiveness of project.Figures 9 to 11 illustrate the estimation of the most effective parameter (Young's modulus) for the first to third layers in accordance with final population or last 15 final results (npop=npar=15) until the analysis No.254, to investigate and compare the results of back analysis using GA and PSO.

Figure 9 .Figure 10 .Figure 11 .
Figure 9.Comparison of Young's modulus for first layer versus third layer in accordance with final population