Optimization of Welding Input Parameters Using PSO Technique for Minimizing HAZ Width in GMAW

In order to conceive command systems for welding equipment based on intelligence techniques similar to human thinking; it is better to use artificial intelligence methods, for example: Genetic algorithms and particle swarm optimization. Freshly, this latter has received increased attention in many research fields. This paper discuss the application of particle swarm optimization algorithm to optimize the welding process parameters and obtain a better Width of Head Affected Zone (WHAZ) in the welding machine which is gas metal arc welding. The effect of four main welding variables in the gas metal arc welding process, namely welding speed, welding voltage, nozzle-to-plate distance and wire feed speed on the WHAZ are studied. A source code is developed in MATLAB 8.3 to perform the optimization.


Introduction
Gas Metal Arc Welding (GMAW) is an arc welding process which produces the coalescence of metals by heating them with an arc between a continuously fed filler metal (consumable) electrode and the work-piece.GMAW is dominant today as a joining process among the world's welding fabricators.Despite its sixty years of history, research and development continue to provide improvements to this process, and the effort has been rewarded with high quality results [1].
Improving quality and strength of molten metal is the primary goal of most researchers.In this regard, it is necessary to control the welding input variables in order to obtain a minimum width of HAZ.
With heightened emphasis to improve the product quality and process efficiency, the welding industry is challenged to consider innovative approaches like Artificial Intelligence (AI) techniques [2].
An optimization is the main act of obtaining the best result under given situations.Mathematically, an optimization problem has a fitness function, describing the problem under a set of constraints which represents the solution space for the problem.A lot of optimization methods have been developed for solving complex engineering problems.There is no known single optimization method available for solving all optimization problems [3].
One of AI approaches like Particle Swarm Optimization (abbreviated as: PSO) has received a lot of attention in combinatorial optimization.PSO is part of the swarm intelligence family [4], it based on swarm behavior in nature, such as fish and bird schooling.
Nowadays, PSO has generated much wider interests and forms an exciting, ever-expanding research subject.It has become one of the most widely used algorithms due to its simplicity and flexibility [5,6].
PSO is based on the principle that each possible solution can be represented as a particle in a swarm.Each particle has a position, which is updated at each step of iteration, by adding the current position of the particle to its velocity term [7,8].
In this work, five levels and four input process parameters are selected.These input parameters chosen are welding speed (S), welding voltage (V), nozzle-to-plate distance (N) and wire feed speed (W).The output parameter is Width of Heat Affected Zone (WHAZ).The image of the latter is shown in Fig. 1.
The application of computer-aided optimization methods for welding processes is widely used.For example: Kumar et al. [9] used particle swarm optimization method to maximize the weld strength while simultaneously decreasing the weld seam width in the laser welding process.Also, PSO method was used by Sudhakaran et al. [10] for obtaining the best process parameters to minimize angular distortion in gas tungsten arc welded stainless steel 202 grade Plates.Sahare and Pradhan [11] used genetic algorithm method to optimize submerged arc welding on Windmill tower.

Experimental procedures
The experimental procedures used for this study are briefly explained below.

Description
The experiments were performed by means of a GMAW machine using direct current electrode positive.Test pieces of size (200 mm × 100 mm × 6 mm) were cut from steel plates.Filler wire (class ER70S-6) in the form of coil of 0.8 mm diameter was used for depositing the weld beads.The experimental setup consisted of three parts: wire feed unit, welding power source and the welding manipulator where the welding gun was held in a frame mounted above the work table directly on it, and it was provided with an attachment on the manipulator for both up and down movement for setting the required nozzle-to-plate distance.The bead-on-plate technique was adopted for welding the test pieces.The spray transfer mode has been used in this process.The composition of the shielding gas was argon (80%) plus carbon dioxide (20%).The gas flow rate used was 14 l/min.
The chemical composition of the base metal and filler wire are given in Table 1 and Table 2 [12], respectively.
The HAZ width was measured manually according to the following steps: cutting the test pieces, mechanical polishing, revealing of the structure by chemical attack (Nital) and finally micro-graphic observation.
The microstructure of the base materiel can be observed in Fig. 2.

Identification of input process parameters
The selected limits of the selected input process parameters with their notations and units are given in Table 3.

Recording the response variables
In this work, the observed experimental input and output values are presented in Table 4.

Development of mathematical models
The regression procedure was used for the development of mathematical model to predict width of HAZ.The response function representing any of the width of HAZ dimensions   where WHAZ is the response, that is, the output parameter and S, V, N, W are the input variables.
The second-order polynomial, representing the response surface for 4 factors, is given by Eq. (1) [10,13]: where Y (WHAZ) is the dependent variable; The final mathematical model, being a second-degree response surface, is expressed by Eq. ( 2): . (2)

Principles of swarm intelligence
Many intelligent algorithms including: particle swarm optimization, artificial fish swarm algorithms, ant colony algorithms, artificial immune systems, firefly algorithm and genetic algorithms are based on the concept of populations or swarms.Swarm intelligence can be described by considering five fundamental principles: • Principle of stability: the population should not change its behavior mode whenever the environment changes.• Principle of adaptability: the population should be able to change its mode of behavior when it is worth the computational price.
• Principle of quality: the population should be able to respond to quality factors in the environment.• Principle of proximity: the population should be able to perform simple calculations of space and time.• Principle of diverse response: the population should not commit its activity on too narrow channels [4].
The swarm is typically modeled by particles in multidimensional space that have a position and a velocity, where each particle represents a candidate solution to the optimization problem [14].
PSO is inspired by the observation of social behavior of bird flocks.It initializes the population with random potential solutions of the problem.The individuals in the population are called as particles, each of which has its own position and velocity [19].
During the optimization procedure, particles communicate good positions to each other and adjust position according to their experience of history and neighboring particles [14].
By the help of the two parameters (velocity and position), the fitness function of the particle has been calculated, and each particle in the problem space would have its best solution.That personal best experience of particle is called as "Pbest".When a particle completes its population, the best value of all particles is global best experience "Gbest".After finding the two best values, the particle updates its velocity "V id (t + 1)" and position "X id (t + 1)" according to Eq. (3) and Eq. ( 4) [20]: where i th is the particle, N is the number of particles in the swarm, so i = 1, 2 … N particles; the index t denotes the iteration counter, and d is the dimension index of the search space; V id (t + 1), and X id (t + 1) are respectively, the particle's velocity and position at the new iteration Fig. 3 illustrates the main elements of PSO.

PSO parameters
The parameters that must be set in PSO and their typical values are as follows: When W is big, particle swarm trend to global search and when it is small, particle swarm trends to local search; where W varies from 0.4 to 0.9 during the entire optimization process of the algorithm.

• Maximum allowable velocity for particles ( V d_max ):
It determines the maximum change one particle can take during iteration.Thus, resolution and fitness of search depends on V d_max .If it is too high, then particles will move beyond a good solution, and if it is too low, particles will be trapped in local minima; where V d_max should be chosen in the following interval: • Where: X d _ max and X d _ min are respectively, the upper and lower boundaries of the d th dimension of the search space; and K is a constant, varies from 0 to 1.

• Stop condition:
The stop conditions depend on the problem complexity to be optimized.There are two possible conditions to stop the algorithm execution.These stopping criteria are usually either the maximum number of iterations executed by the PSO, or the minimum error requirement achieved [6,22,25,26].

Basic PSO algorithm
Fig. 4 shows a flow chart of the basic optimization process based on particle swarm.

PSO applications
The first practical application of PSO was in the field of neural network training and was reported together with the algorithm itself (Kennedy and Eberhart, in 1995 [15]).Many more areas of application have been explored ever since, including control, optimization, design, telecommunications, signal processing, power systems, etc.To date, there are hundreds of publications reporting applications of particle swarm optimization algorithms.Although PSO has been used primarily to solve unconstrained, single-objective optimization problems; PSO algorithms have been developed to solve constrained problems, multi-objective optimization problems, problems with dynamically changing landscapes, and to find multiple solutions [27].

Advantages and disadvantages of PSO method
The basic particle swarm optimization algorithm has many key advantages over other optimization techniques; among these advantages, we can mention: • The calculation in PSO is very simple, it occupies the greatest optimization capacity and it can be completed easily [3,27,28].• It adopts the real number code; with the dimension number is equal to the constant of the solution.• PSO have no overlapping or mutation calculation.
The search can be carried out by particle velocity.
During the development of several generations, only the most optimist particle can transmit information onto the other particles [27,28].• The PSO algorithm is a derivative-free algorithm, unlike many conventional methods [3,21].• It is easy to implement and program, so it can be applied both in scientific research and engineering problems.• It has fewer parameters to adjust and the impact of these parameters on the solutions is low compared to other optimization techniques, like GA [3].• It does not require a good initial solution to begin its iteration process.
• It has the flexibility to be integrated with other optimization techniques to form hybrid tools [21].• It can search very large spaces of candidate solutions, and the speed of the researching is very quick.• PSO does not utilize the gradient of the problem being optimized, which means PSO does not require that the optimization problem be differentiable as is required by classic optimization methods such as gradient descent method.
Some of the PSO disadvantages include: • The PSO method has problems with non-coordinate system exit (for example, in the field of energy).• It suffers from partial optimism, which degrades the regulation of its speed and direction [3,27,28].• The PSO technique needs an evaluation function in real-time applications [29].• Meta-heuristic methods such as PSO do not guarantee that the solution found is optimal.

Future research on PSO
Compared to other algorithms, the PSO method is very simple, easily completed and it requires fewer parameters, which made it fully developed.However, the research on the PSO is still at the beginning, many problems need to be resolved.PSO research will focus mainly on the following: • Develop the application area of its algorithm: The effect can be found in practical application.Although the PSO algorithm has been used widely, it will be very interesting to explore the developing area further.Currently, most PSO research is focused on the coordinate system.Although in practical usage, it is used in non-coordinate system (scattered system and compound optimization system); there is less research on the application of the PSO algorithm in these systems.• Select the appropriate topology of the particle swarm: Research on the topology of the new pattern particle swarm which has a better function can be performed.The neighboring topology of the different particle swarms are based on the imitation of different societies.It is meaningful to use and spread the algorithm to determine the appropriate topology, to allow PSO to obtain the best property and do the research on the suitable ranges of different topologies.

• Mixing with other intelligent optimization algorithms:
The goal of blending PSO with other intelligent optimization algorithms is to combine the benefits of PSO with the benefits of other intelligent optimization algorithms, to create a compound algorithm that has practical value.For example, the particle swarm optimization algorithm can be improved by the simulated annealing approach; it can be connected with the hereditary agents, the algorithm of a colony of ants, etc. [28].

Strong points of PSO compared with GA
Optimization of particle swarms an extremely simple algorithm that seems to effectively optimize a wide range of functions.It is strongly dependent on stochastic processes, such as genetic algorithms [15].PSO and GA are population-based meta-heuristics, which means that both searches are based on social components.PSO shares many common points with GA, but PSO has some interesting features compared to GA, namely the following: • PSO is easier than GA in operation quantity; because PSO does not realize crossover and mutation (there are fewer parameters to adjust).• PSO has memory (every particle remembers its own previous best value as well as the best neighborhood; therefore, it has a memory capacity more effective than GA); contrary in GA, it is destroyed the prior knowledge of the problem as soon as the population changes.• PSO is more efficient in maintaining the diversity of the swarm (more similar to the ideal social interaction in a community), since all particles use the information related to the most successful particle in order to improve themselves; whereas in GA, the worse solutions are discarded and only the good ones are saved.Therefore, in GA the population evolves around a subset of the best individuals.• PSO has good cooperation between particles when we compare by GA, that is to say, particle swarms share their information [4,22,30,31].• PSO is a parallel optimization strategy but GA is a serial strategy, and GA may be integrated into PSO.

Confirmation test
After collecting data, and applying the least squares method, the regression equation of Width of Heat Affected Zone "WHAZ" was obtained in Eq. ( 6): After that, the regression equation was minimized by PSO and GA methods.
Operators of GA are as follows: number of populations is 40, type of selection is lottery wheel, crossover type is two points, type of mutation is uniform, probability of crossover is 0.8, probability of mutation is 0.01, and maximum iteration is 100.
In order to show the effectiveness of the proposed method, a program developed in a MATLAB environment is used.
The results of minimization are shown in Table 5.
The optimal process parameters with PSO technique gave a value of "0.6939 mm" for Width of Heat Affected Zone.This value is better than the value obtained with GA.
The result shows that in order to obtain the lower width of HAZ, welding speed "S" and nozzle-to-plate distance "N" at their highest levels, welding voltage "V" and wire feed speed "W" must be at their lowest levels.
The computational result demonstrates that the two optimization algorithms proposed are quiet effective in minimizing the objective function.
Fig. 5 shows the search for the best value of WHAZ by the PSO technique.

Effects of input process variables on width of HAZ
From Figs. 6-9, it was observed these widths all increase with an increase in heat input or arc energy.This is because an increase in heat input results in a decrease in cooling rate.Also, increased heat input generally results in a larger weld pool size and fused area.
The effects of all input parameters on width of HAZ are discussed below.

Effect of input S
The welding speed is the main factor controlling heat input and the width of HAZ.Fig. 6 shows the effect of S on WHAZ.The following facts are evident from Fig. 6: the value WHAZ decreases with the increase in S.This is because heat input is inversely proportional to welding speed.As S increases, heat input decreases.Also S has a negative effect on WHAZ because of its influence on heat input.

Effect of input V
The voltage process has no significant effect on width of HAZ.From Fig. 7, it is apparent WHAZ increases slightly with the increase in V.The reason for this effect is the slight increase in heat input with the increase in V from its lower limit to upper limit.This slight increase in heat input reduces the cooling rate.

Effect of input N
In Fig. 8, it is found N has a negligible effect on width of HAZ within the range evaluated.From this figure, it was found WHAZ decreases slightly with the increase in N.This slight decrease in width of HAZ might be due to the decrease in heat input when N is increased.As heat input has a positive effect on the WHAZ, the slight decrease in heat input results in a slight decrease in the values of the width of HAZ.

Effect of input W
From Fig. 9, it is clear the WHAZ increase with the increase of W. This effect is due to the fact that as W increases, the heat-input value also increases more or less proportionately; but the increase in heat input level results in a decrease in cooling rate.

Conclusion
In searching for the optimal solution of the problem, the particles define trajectories in the parameter space (i.e., iteratively update their positions) based on the equation of motion.The velocity vectors govern the way particles move across the search space and are made of the contribution of Fig. 6 Effect of welding speed "S" on width of HAZ "WHAZ" Fig. 7 Effect of welding voltage "V" on width of HAZ "WHAZ" Fig. 8 Effect of nozzle-to-plate distance "N" on width of HAZ "WHAZ" Fig. 9 Effect of wire feed speed "W" on width of HAZ "WHAZ" three terms: the first one, defined the inertia prevents the particle from drastically changing direction, by keeping track of the previous flow direction; the second term, called the cognitive component, accounts for the tendency of particles to return to their own previously found best positions; the last one, named the social component, identifies the propensity of a particle to move towards the best position of the whole swarm [26].This survey reveals that, the approach of particle swarm optimization has been shown as an effective tool for solving optimization problems with constraints [32], which greatly save the time and enhance efficiency.
Based on the experimental work and the optimization method used, the following conclusions are drawn: • If welding speed or nozzle-to-plate distance is increased, width of HAZ generally decreases.
• If voltage speed or wire feed speed is decreased, width of HAZ generally decreases.
Because of the complexity in the input parameters, the present work is limited to four input process parameters variation and five levels.The accuracy of the values can be improved by considering more input process parameters and more levels.However there are other factors such as gas flow rate, which also affect the width of HAZ.

Fig. 2
Fig. 2 Microscopic image of the base materiel microstructure X i (S, V, N, W) are the four independent variables; the coefficient b 0 is the free term of the regression equation; the coefficients b i ( b 1 , b 2 , b 3 and b 4 ) are linear terms; the coefficients b ii ( b 11 , b 22 , b 33 and b 44 ) are quadratic terms; and the coefficients b ij ( b 12 , b 13 , b 14 , b 23 , b 24 and b 34 ) are interaction terms.
Dimension of particles: It is determined by the problem to be optimized; the solution space has a number of dimensions (1 or more) matching the number of variables in the problem.The PSO algorithm has no difficulty working with 4 or more dimensions.• Range of particles: It is also determined by the problem to be optimized.You can specify different ranges for different particle dimensions.• Number of particles: The typical range is usually from 20 to 40, to get good results.• Learning factors ( C 1 and C 2 ): The constants C 1 and C 2 in Eq. (1), termed as cognition and social components, respectively; they are the acceleration coefficients which changes the velocity of a particle towards Pbest and Gbest.C 1 is usually equal to C 2 and ranges from [0-4].In general, it has been shown that: C 1 ≈ C 2 ≈ 2 works well for most applications.• Inertia weight (W): The weight of inertia controls the exploitation and exploration of the search space, because it dynamically adjusts velocity.The inertia weight gets important effect on balancing global and local search in PSO.

Fig. 4
Fig. 4 Flow chart of PSO algorithm

Table 1
Chemical composition of the base metal (ST37 steel)

Table 3
Chosen welding input process parameters and their limits

Table 4
[17,[20][21][22][23][24]utput values used for this study V id (t), and X id (t) represent the velocity value and position at the current iteration (t), respectively; W is the inertia weight; C 1 and C 2 are positive constants, referred to as cognitive and social parameters respectively; they are used to control the impact of local and global components; R 1 and R 2 are two separately random numbers distributed in the range [0, 1]; Pbest id (t) is the personal (local) best position of the d th dimension of the i th particle at the t th iteration; Gbest d (t) is the global best position of particles at t iteration[17,[20][21][22][23][24].

Table 5
Confirmation test results of minimization Fig. 5 Fitness function convergence with the PSO method