Methodology for Optimization of the Electric Wire Arc - Spraying Process to the Mixture of Coatings 140MXC-530AS and 140MXC-560AS Using a Multi-objective Genetic Algorithm

The Corporation of Science and Technology for the Development of the Maritime and Fluvial Shipbuilding Industry COTECMAR has been using for more than 4 years the process of electric arc thermal projection with commercial materials such as 530AS, 560AS and 140MXC to mitigate corrosion phenomena and wear of the different devices that make up the boats. The problem lies in mixing these materials (140MXC-530AS and 140MXC-560AS) to produce dissimilar coatings, making it more dicult to optimize the process, whose problem lies in the parameterization of the arc-beam thermal imaging equipment. In the rst phase of the project, a Taguchi L 9 (3 4-2 ) model (fractional factorial orthogonal arrangement) was used to produce the coatings, taking into account the projection parameters of the equipment such as current (A), voltage (V) Primary air pressure (Pp) and secondary air pressure (Ps), which were considered as input variables or experiments for the optimization process. Subsequently the coatings were characterized by techniques such as Scanning Electron Microscopy (SEM) and microhardness to take these data as attributes or output of results in order to obtain the minimization of the size of the projected particles (corrosion) and the microhardness maximization of the coatings (wear). Symbolic regression was used as a technique for obtaining the mathematical models (objective functions), which was done through the "Eureqa Formulize-Desktop" program, because it is considered very complex the modeling of all input variables by conventional mathematical methods. The adaptation of the NSGA-II Multi-Objective Genetic Algorithm was performed through a structured programming in "Matlab", being able to verify that the optimal Pareto fronts obtained in the runs with this Algorithm meet the requirements of the objective functions which are related with the attributes of the selected coatings.


Introduction
The electric wire arc -spraying process is one of the most used industrial techniques in the process of thermal spraying for the recovery of mechanical components that have suffered deterioration due to the conditions of wear and corrosion. The coatings used in this technique are solid wires (Fig. 1) which are fused by the interaction of the electrical parameters of the thermal projection equipment (current and voltage).
The air pressure used in the equipment projects the molten material into drops, which are deposited on a previously prepared surface called the substrate forming the layers of the coating (Fig. 2).
Optimization consists in the selection of a better alternative that results in the search for a minimum or a maximum, locating this optimum through a mathematical structure that can be by descriptive models, that simulate the behavior of a device or system, or by prescriptive models that allow to indicate the course of action or the best design, ful lling with the premise of the optimization as the best result of a problem [3].
Within the optimization practices, there are two branches: 1) the problem of how to properly model the system under study and 2) how to solve the model [4]. These authors agree that the optimization problems contain the following fundamental elements: 1) Objective Function; 2) Design Variables and 3) Restrictions. According to the above, the classi cation of optimization problems can be: according to the form of f (x), the number of constraints, their dimensionality, the probabilistic nature of the problem and the continuity or not of the decision variables [3]. Now, the classi cation of methods of resolution to these problems are given by mathematical calculation, search techniques and / or convergence techniques of solutions [4]. In this way, the classic problem of optimization consists in determining or choosing, among all possible solution alternatives, the one that has a greater degree of desirability for the decision maker, which is the optimal solution.
In this case, the problem of interest to optimize is focused on the electric wire arc -spraying process, which is part of one of the many options that may exist for the production of coatings [5] ranging from materials conventional such as carbon steel (530AS) and stainless steel (560AS) commercially economic and functional for common applications, to materials such nanostructures as socalled nano-compounds (140MXC) that can become raw material of high cost with special properties in their chemical composition and mechanical properties [6]. The production of the coatings provides the surfaces with protection against corrosion and wear; also, improves the performance of the substrate or component when they are used as a thermal barrier, allowing the restoration and repair of parts or components [7].
The equipment works through the manual con guration, by an operator, of the projection parameters (voltage, current, primary air pressure and secondary air pressure) and taking into account in uential aspects such as: projection distance, velocity of projection, spray angle [8]. With this approach, it is implicitly assumed that the criterion in which the preferences of the decision maker (operator of the equipment) are collected can be represented mathematically through a function, called "objective function", that will allow to order the possible decisions by means of the assignment to each one of an index of desirability; so, multi-objective programming can be considered the rst stage of a decisional process [9].
Thanks to this and to the number of problems that often arise, a variety of multi-objective optimization algorithms are found, such as: -PAES (Pareto Archived Evolution Strategy), -PESA (Pareto Envelope Based Selection Algorithm), -APA (Adaptive Pareto Algorithm) [10]; and the most used in recent times as: -SPEA II [11] and -NSGA II (Nondominated Sorting Genetic Algorithm) [12].
In the case of the NSGA-II algorithm used in this work, it is an improved version of its predecessor (NSGA), from which it inherited its main structure but including features that solve three aspects: 1) non-dominated ordering and computational complexity, 2) the absence of elitism and 3) the need to specify additional parameters for the preservation of diversity in the Pareto front [13]. In the software and programs used in optimization problems, considered as a speci c derivation of languages or computing environments, the present investigation based its development on the Eureqa Formulize -Desktop program to obtain the objective functions and the MATLAB R2010a program for analysis and optimization of functions.  Table 1 indicates the operating conditions of the electric wire arc spraying equipment according to its manufacturer and the minimum and maximum values at which the projection parameters can be con gured; current works on 2 levels and voltage 5 (discrete variables), while pressures primary and secondary air rely on the operator to make adjustments (continuous variables). Figure 4 shows the unit operating console for the condition of the projection parameters.    Table 4 shows the values con gured with the Taguchi model L9 (3 4-2 ) for the projection and production parameters of the coating's mixtures 140MC-530AS and 140MXC-560AS.

Characterization of coatings
The morphological characterization and the determination of the particle size for the mixture of coatings 140MXC-530AS and 140MXC-560AS were carried out in the rst instance by means of scanning electron microscopy (SEM). The obtained images were divided in four sectors ( Figure 5) and analyzed in the program "GWYDDION", which generates a pixel contrast to the selected geometries and a sweep on the surface of the same, in order to measure the size particle by an autocorrelation internal statistical data obtained by the program.
The samples were indented with a diamond tip over the cross-section of the coating using a load of 200 g and an indentation time of 30 seconds, making three indentations in the middle zone and at the interface of the deposit with the base material (substrate) as it is shown in Figure 6.

Obtaining the Objective Functions
Symbolic regression is a statistical technique that seeks to deduce the pattern of a series of data or to investigate the statistical relationship between a dependent variable (Y) and one or more independent variables. The result is an algebraic expression of type Y = F (X1, X2, ... Xn). Given the data, it will look for the pattern (algebraic expression) that identi es the behavior of these accessing all kinds of functions and algebraic combinations [14]. The program Eureqa Formulize-Desktop is software that meets the abovementioned conditions and has an online user guide where you can nd all possible speci cations and published by the manufacturer on how to handle this free program. For this purpose, an "Intel (R) Core (TM) i5-2410M processor, CPU @ 2.30 GHz, 8GB RAM" was used to support the computational requirement of this program as well as for the work in MATLAB.
Its handling is as follows: a. Data Entry: According to the projection parameters (Input variables) for the production of the coatings and the results obtained from the characterization. f. Reports: When the program has made a convergence of 100%, a report is generated with the list of expressions generated in descending order of quality, appreciation charts for the accuracy-approximation of the model to the data entered, the amount of occurrence of each variable in total generated equations, etc.

Multi-objective optimization
The problem raised is how to treat several objective functions at the same time, this is known as multicriteria decision [15]. Before entering the objective functions to Matlab the following aspects must be considered: a. Optimal Selection Criteria: The optimal selection criteria can be divided into two methods for multi-objective optimization: No Dominated Classi cation and Pareto Optimal Classi cation. In both methods, before "Pareto-optimal" individuals for the current generation (Front n + 1), the "Pareto-optimal" individuals of the previous generation (Front n) are added. In fact, this is the operator of elitism [16].
b. Multi-objective Optimization Algorithms: In multi-objective search and optimization problems, the quality of a candidate solution can be represented by means of a vector that groups the factors that evaluate the different objectives. The relative quality between pairs of candidate solutions is quanti ed using the Pareto dominance concept. A multi-objective vector u = (u1, u2, ..., uk) dominates another multi-objective vector v = (v1, v2, ..., vk) if and only if "u" is better than "v" in a target without being worse in all other [17]. In this case, it is possible to nd a more e cient solution in an iteration, so that, comparatively, traditional techniques are able to achieve a better border in a shorter simulation time [13].

Steps to run the algorithm in MATLAB
The multi-objective algorithms require for the development of mathematical optimization methods on a population of solutions, so it has been found in the genetic algorithms a rm proposal given its diversity and reliability characteristics [18]. The steps are the following: a. Opening the Graphical Interface (GUI): The complete program of the algorithm, is located in the "Path" MATLAB folder, then the "Current Folder" tab " Genetic_ Algorithm.m " script, which is what allows the opening of the main graphical interface and activation of the buttons of the sub-routines for parameterization of the algorithm.
b. Entry of the Objective Functions: In this button "DATA_FUNCTIONS" of the GUI, this interface is the selection of the type of optimization (mono-objective or multi-objective), the icons for entering the data of the objective functions and the information of the variables to be handled. With the "Save and Exit" button, all data entered is con rmed and closes this interface, to return to the main interface and continue with the process.
c. Entry of Restrictions: If there are restrictions to consider, activate the button called "RESTRICTION_FUNCTIONS" that also appears in the "GUI" and enter the corresponding data, either by variables or by attributes to optimize, by clicking on the icon "Restriction Inactive". At the end of the information entry click on the "Save and Exit" button, noting that this button has changed color in the main interface, indicating that the restrictions are active.
d. Input of the Algorithm Data: After completing the previous steps, you proceed to enter the necessary data, typical of the algorithm, with which you will be working during your runs. Therefore, when you click on the button "DATA_ALGORITHM", in the GUI, the secondary interface containing the information about it is displayed to be lled out. When nished completing the information entry is saved by pressing the "Save and Exit" button, where it will close this secondary interface returning to the main interface to follow the process.
e. Operation of the Algorithm: Once entered all the necessary data, between functions, restrictions and operating conditions; can be given now click on the button "CALCULATE" on the main interface to run the algorithm. The whole subsequent process is left to the implemented programming so that it nds the expected results, of a simple analysis or of a multi-objective analysis of 2 objective functions.
f. Generation of Results: Once the run is nished due to some stop criterion, the mono-objective solutions are displayed in the "Command Windows" while the multi-objective analysis is shown in 2-D graphic outputs and tabulated or listed data of each graph. The results at multi-objective level are shown in MATLAB with: 1) Valid solutions to the problem in the search space, 2) Selection criteria based on the "Non-dominated classi cation" method and 3) Final selection criteria based on the method of "Optimal Pareto Classi cation".

Implementation of NSGA-II
This algorithm includes features that solve three aspects: 1) non-dominated ordering and computational complexity, 2) the absence of elitism, and 3) the need to specify additional parameters for the preservation of diversity on the front [12]. It is classi ed as an elitist type, since it incorporates a mechanism of preservation of dominant solutions by fronts of dominance, through several generations of a genetic algorithm; and to avoid the dependence of parameters for the dispersion in the front incorporates a calculation of stacking distance [18]. Its implementation is done as follows: In this case, before a generation of the algorithm is nished, a process of preselection and preservation of the elite solutions is executed, which consists of gathering the set of parent solutions and the descendants obtained through the selection, crossing and mutation operators. In this way the current population increases to double of the individuals of the initial population. For this it is necessary to classify the complete set in their respective fronts of dominance and to preserve the individuals that belong to the fronts of better quality. If it is not possible to enter all the alternatives of a given front, then those individuals with a smaller stacking distance given by the gure described above are eliminated [18]. Table 5 shows the results of the coatings characterization process and that were entered with the projection parameters (input variables) in the Eureqa Formulize-Desktop program to obtain the objective functions. According to the analysis of the results of Table 5, the optimization conditions required for the runs of the objective functions in MATLAB were established for the mixture of the coatings as shown in Table 6. For the 140MXC-530AS mixture, 6 target functions were obtained for the microhardness attribute and 6 for the particle size; while for 140MXC-560AS mixture were 7 and 8 respectively. Through eq 1 (calculation of the proportional size of the solution space), the criterion for selection of the functions was established in terms of their quality, which is de ned by the best proportion of the search space determined by the user (minimum and maximum value) in relation to the global search space offered by each function. Table 7 Page 8/20

Results And Discussion
shows the ordering of the pairing for multi-objective analysis of the best objective functions for the mixtures of 140MXC-530AS and 140MXC-560AS coatings according to the expected attributes.  Table 8 shows the best objective functions obtained according to the values formulated by equation 1 for the mixtures of coatings 140MXC-530AS and 140MXC-560AS for the microhardness and particle size attributes respectively.
The objective function No 1 corresponds to the microhardness attribute for the mixture of coatings 140MXC-530AS.
The objective function No 2 corresponds to the particle size attribute for the mixture of coatings 140MXC-530AS.
The objective function No 3 corresponds to the microhardness attribute for the mixture of coatings 140MXC-560AS.
The objective function No 4 corresponds to the particle size attribute for the mixture of coatings 140MXC-560AS.

Validity and Reliability Criteria
The criteria of validity and reliability were based on the veri cation of the algorithm that was done with the development of routines and subroutines generated by exercises that contained or not restrictions of the similar functions generated by Eureqa. We started by testing a simple genetic algorithm with one-variable exercises; the conditions of the algorithm used for each objective function were maintained in 100 generations and a population size of 100 individuals under a crossover probability of 95% and a mutation probability of 1%. Then test exercises with 2 and 3 variables were performed, thus increasing the complexity of the exercises used; in this case the conditions of the algorithm were varied according to the complexity of each function, but always maintaining the crossover probability of 95% and the probability of mutation in 1%. Figure 8 shows the results of the NSGA-II multi-objective genetic algorithm with respect to the "Dominance Fronts" ( gure 8a), "Pareto Optimal Fronts" (Figure 8b) and "Unmanaged Solutions" (Figure   8c) Of the nal population; this same behavior can be seen in the results reported by [12].

Pilot test
According to the revised literature and to what was established in the previous numerals, it was decided to maintain the probability of crossing and the probability of mutation in 95% and 1% respectively; therefore, the size of population (T) and the number of generations (G) developed for the algorithm were established in the pilot under systematic approaches (trial and error), depending on the quality of results (Optima's Solutions Pareto) and computational resource (processing time). Different values and combinations of T and G were run at a suitable decision criterion for these parameters of 200 for each respectively. The result is shown in gure 9 for 140MXC-530AS a) and 140MXC-560AS b) coating mixes.

Final solutions
Once the number of partial solutions was de ned, a new reclassi cation was carried out in order to obtain a single Optimal Pareto Front for each of the coating mixtures. The best conditions that could be obtained with less standard deviation in the data means that these values do not have much dispersion and that represent a similarity between individuals seen from the condition of parameterization of the technique in the equipment of thermal projection. Figure 10 shows the graphical results of the Pareto optimal fronts, as a response to the processing of the objective functions for mixing 140MXC-530AS coatings with their 10 possible selections. Table 9 presents the tabulation of the results of gure 10 for microhardness (Hv) and particle size (µm) attributes as a function of projection parameters (input variables), according to the algorithm used. In this case, the selection that should be taken into account to maximize microhardness (Hv) and minimize particle size (µm) at the same time would be run # 6. Maximum Microhardness =797.48 (Hv) and minimum Particle Size = 83.13 (µm), are obtained with the projection parameters: Current ≈ 109.8 (A), Primary air pressure ≈ 3.2 (bar), Secondary air pressure ≈ 3.6 (bar) and Voltage ≈ 26.5 (V). For the mixing 140MXC-560AS coatings, the same selection criteria were considered as for the 140MXC-530AS, Figure 11 shows the graphical results of the Pareto optimal fronts, as a response to the processing of the objective functions for mixing 140MXC-560AS coatings with their 10 possible selections too.
Similarly, table 10 presents the tabulation of the results of gure 11 for microhardness (Hv) and particle size (µm) attributes as a function of projection parameters (input variables), according to the algorithm used, Here, the selection that should be taken into account to maximize microhardness (Hv) and minimize particle size (µm) at the same time would be run # 4, Maximum Microhardness =797,56 (Hv) and minimum Particle Size = 80,19 (µm), are obtained with the projection parameters: Current ≈ 102,8 (A), Primary air pressure ≈ 3,2 (bar), Secondary air pressure ≈ 3,8 (bar) and Voltage ≈ 25,9 (V) [19,20]. Therefore, tables 9 and 10 indicate the con guration to be made to the thermal projection equipment as projection parameters and the production of the mixtures 140MXC-530As and 140MXC-560AS coatings for the expected attributes.  5. In the criteria of validity and reliability it was possible to establish that the algorithm converges towards the global optimum depending on the quality of the run, the conditions of restriction and the con guration conditions of the same.
6. The appropriate number of generations (T) and population (G) was 200 for each one respectively, since it was possible to visualize in the feasible space analysis of solutions and in the pilot test according to the computational resource.
7. The individuals closest to the optimization condition established by decision criterion are between 799 and 800 (Hv) for the microhardness attribute and 80 and 90 (μm) for the particle size attribute. 8. In order to obtain the attribute values mentioned above in the production of the mixtures of 140MXC-530AS and 140MXC-560AS coatings, the projection parameters must be set at level 1 for the current and for the minimum voltage at 3 or at maximum at 4; these two parameters are considered as discrete variables ( gure 4) in the con guration of the projection equipment.
9. In the case of air pressures (continuous variables), for the mixture 140MXC-530AS,coatings the values of the primary air pressure must be set at 3,2 (bar) the minimum and 3,3 (bar) the maximum and for the secondary air pressure the minimum at 3,6 (bar) and the maximum at 3,8 (bar); and for mixture 140MXC-560AS coatings the values of the primary air pressure and secondary air pressure are the same as the mixture 140MXC-530AS coatings.

Figure 8
Contrast between results of problems  Final Pareto Front Graphic for 140MXC-560AS