1. Introduction
Recently, much attention has been focused on magnesium and aluminium alloys in many industrial sectors because of their unique properties. For their practical applications, joining technologies should also be developed in addition to considering issues such as alloy design, microstructure control, plastic forming, casting, and surface treatment [
1]. Combining aluminium alloys with magnesium alloys contributes to reducing the weight of components and increasing production efficiency by replacing aluminium alloys with magnesium alloys wherever possible. Joining the mentioned metals is very difficult using conventional welding methods [
2]. During standard joining, due to the melting of materials and a large amount of heat supplied, significant grain growth occurs in the heat-affected zone (HAZ), and many brittle intermetallic metal compounds (IMCs) are formed [
3]. The aluminium–magnesium equilibrium system has partial solubility of magnesium and aluminium. However, in the range of several percent by weight and the remaining compositions, the IMCs are made [
4,
5]. The magnesium alloy was efficiently joined with the aluminium alloy by laser [
6,
7] and diffusion welding methods [
8,
9]. Various Mg/Al joints are made primarily by friction stir welding (FSW) to take advantage of the lower ability to form an intermetallic phase in the case of solid-state welding [
10,
11,
12]. Authors in the following papers [
10,
13,
14] observed the presence of precipitates of the intermetallic phase, which caused a substantial increase in hardness at the weld zone. The defect-free joints were observed for various rotational speeds in the study [
15]. Moreover, no intermetallic phases or cracks were found in the joint area. The maximum value of 132 MPa tensile strength and extremely low elongation of 2% was achieved for a tool rotation speed of 1000 rpm in reference [
16]. The literature results indicate the possibility of producing sound Mg/Al welded joints with different mechanical properties using solid-state friction welding methods [
17,
18].
Recently, a relatively common solid-state welding method is rotary friction welding (FRW) [
19]. Friction welding of metals can be performed using an inertia friction welding (IFW) or direct-drive rotational friction welding (DD-FRW) process. In the IFW, the rotating part is connected to a flywheel, and energy is supplied to the joint through the loss of kinetic rotational energy. The DD-FRW method directly converts mechanical energy into thermal energy on mutually rubbing surfaces in the contact area [
20]. The friction welding process can be divided into two periods: friction and upsetting. The key parameters of the FRW process are friction time (FT), friction force (FF), upsetting force (UF) and rotational speed (RS). The parameters determine the temperature in the contact area and the temperature gradient in the weld zone. Friction time is necessary to heat the elements to the required temperature. The key process parameter during the upsetting period is the upsetting force (UF). The UF parameter is applied to heated metals. The upsetting force brings the crystals of the rubbing surfaces closer to the distance of the spatial mesh [
21]. Moreover, the upsetting parameter facilitates the diffusion process and leads to the consolidation of the joint. The optimisation of welding parameters is necessary for the proper course of thermal phenomena and its effects on the mechanical properties and microstructure of the joint [
20].
Many works have presented the optimisation of welding parameters for dissimilar metals using statistical methods, neural networks, response surface methods, factorial design, genetic algorithms, or hybrid artificial intelligence methods. A factorial design for selecting the process parameters and predicting the bead width, height and penetration in the joint was investigated [
22]. The optimal weld pool geometry in the tungsten insert gas (TIG) welding of the stainless steel was studied [
23]. The authors [
24] intensively explored the effect of process parameters on the weld pool geometry using the Taguchi method. A statistical response surface method for optimising welding parameters was developed [
25,
26]. Multi-regression methods and neural network models to predict optimal weld parameters were also analysed in [
27,
28,
29]. The neural networks have been used to identify the welding parameters in real-time [
30]. ANNs successfully predicted the desired weld beam geometry in gas metal arc welding. The optimal process parameters like feed rate, welding voltage and weld speed have been found to predict the beam height and depth of penetration of the weld beam [
31]. Simulated annealing (SA) was also applied as an intelligent method for optimising welding parameters and weld pool in the TIG welding process [
32]. The neural networks and genetic algorithm as the hybrid intelligent method were also studied to search optimal process parameters [
33,
34,
35]. The evolutionary algorithms (EAs), particle swarm (PSO) and SA algorithms have been used to determine welding parameters to maximise tensile strength and minimise metal loss in friction welding steel [
36]. A multi-objective optimisation for maximising the tensile strength and minimising the flash diameter and the HAZ width for the ductile iron with low-carbon steel joints was carried out in the study [
37]. A genetic algorithm modeling temperature distribution during heating and cooling AZ31B magnesium alloys with 7075 aluminium alloy friction welded joints was investigated [
38].
Rotary friction welding is a suitable welding method for joining light (Mg and Al) alloys [
39,
40]. In addition, FRW between dissimilar materials has recently received much attention [
41]. However, more research is needed to optimise dissimilar FRW between Mg and Al alloys with relatively high strength using the conventional friction welding method [
42,
43,
44,
45]. In addition, it is difficult to fully understand the effects of basic processing parameters such as friction force, upsetting force and friction time on the dissimilar FRW between magnesium and aluminium alloys.
In this study, the previous joining of AZ91D with 6xxx series alloy bars by the direct-drive friction welding method was conducted. Then, the influences of the welding parameters on tensile properties and metal loss of the joints were experimentally and numerically investigated.
4. Modeling and Optimisation
ANNs are an artificial intelligence method with excellent approximation properties. Additionally, ANNs have a high accuracy in mapping nonlinear functions. In our example, the neural networks were used to find the objective function for the genetic algorithm. The neural networks have found relationships between the process parameters and the tensile strength and shortening of the joint. In our study, the 48 cases (see
Table 4) were normalised between 0 and 1, dividing them by their maximum values: 45, 50, 12 for the input parameters and 81, 40.8 for the TS and ML as output parameters, respectively. The input data were randomly divided into training (75%), testing (15%) and validation (15%) cases.
The input and output variables, the symbols used for each, the minimum and maximum values, and the mean and standard deviations of each variable are shown in
Table 5.
4.1. Network Architecture
The neural network architecture was studied for twelve different cases based on previous literature. To find the best relations between the inputs (friction force, friction time and upsetting force) and outputs (tensile strength and metal loss), different activation functions and different numbers of neurons in the hidden layer were tested (see
Table 6). The number of hidden nodes in a network is especially critical to network performance [
27]. The effectiveness of the model was measured using the mean square error of validation samples (MSE
valid.) and the correlation coefficient (
R-value).
The typical architecture of an ANN includes an input layer, one or more hidden layers, and an output layer. The layers consist of one or more neurons linked together by weights and biases. In this study, a multilayer perceptron of ANN architecture is shown in
Figure 4. The optimum architecture is taken as 3-9-2: three neurons in the input layer FF (x
1), UF (x
2), and FT (x
3), nine neurons in the hidden layer and two neurons in the output layer UTS (y
1) and ML (y
2). Logarithmic–sigmoidal activation functions for the hidden and output layers were selected for the study.
4.2. Validation and Learning Process
The relationship between process parameters and the tensile strength of the joint and the shortening of materials were modelled using artificial neural networks (ANNs) in Matlab. In this case study, a multilayer neural network with a backpropagation algorithm used the
Lavenberg Marquart method for learning data [
47]. The best MSE for the validation test is shown in
Figure 5.
The best fit was obtained after 29 epochs, for which the smallest MSE error was 0.00019381. The low value of the mean squared error indicates that the neural network model developed will provide good predictions.
Figure 6 shows the performance plot for training, validation, testing and overall data. A correlation coefficient (
R-value) close to 1 implies a close relationship between definite output and forecast output.
Figure 6 shows the results of the correlation coefficient
R for the training, test, validation and total sets. The values for these sets are 0.9986, 0.9993, 0.9992 and 0.998, respectively. These values are close to 1; hence, it can be concluded that the neural network has been well-modelled and can be used to optimise the process parameters [
47].
4.3. Formulation of Objective Function
The objective functions for ultimate tensile strength (UTS) and metal loss (ML) are calculated as follows:
The mathematical formulations (1) and (2) can be derived from resulting weights and activation function (3).
The activation function was given as
Function (3) determines the value of the state of the neurons, which will be transmitted to the downstream neurons.
The constants used to estimate the
are given in
Table 7.
In this study, functions (1)–(4) are simultaneously optimised according to the lower and upper bounds, as shown below:
The constraints in Equations (5)–(7) are the constraints for the friction force x1, the upsetting force x2 and the friction time x3, respectively.
4.4. Genetic Algorithms
Recently, many works have been devoted to multi-criteria optimisation using genetic algorithms. The most popular are the multi-criteria genetic algorithms MOGA and NSGA. Both methods provide solutions in the form of a Pareto chart. These algorithms are an optimisation method based on the natural evolution of populations of living organisms. The algorithms conduct searches on populations built of chromosomes. These, in turn, are built of genes. Genetic algorithms search for the best solutions from a population and not from a single point. Genetic algorithms use random methods of chromosome selection in which crossover and mutation operators play an important role. Crossover is the exchange in a sequence of genes between two chromosomes. A mutation parameter involves changing the value of a gene in a single chromosome [
48]. Genetic algorithms optimise tasks in a big search space for nonlinear functions of complex problems.
A multi-objective genetic algorithm (MOGA) is employed to optimise engineering tasks where multiple criteria impact the quality of the solutions. MOGA identifies a set of decision variables that meet specific constraints to provide satisfactory values for all objective functions. The algorithm minimises or maximises several objective functions [
46,
48]. MOGA produces a set of optimal solutions known as Pareto optimal solutions. The Pareto front represents all of these non-dominated solutions within the objectives space. This study used the Non-Sorting Genetic Algorithm II (NSGA-II) for the multi-objective optimisation of process parameters. The main steps of the NSGA-II have been demonstrated in previous papers [
49,
50].
Multi-objective optimisation was performed using the
Gamultiobj procedure in the Optimisation Tool of Matlab R2018a software.
Gamultiobj uses the NSGA II for multi-objective optimisation [
47,
51]. The main parameters of the multi-objective genetic algorithm are presented in
Table 8.
5. Results and Discussion
Table 9 shows the thirty-two solutions (No. 1–32) of the optimal set in the
Pareto sense.
Table 9 shows that the best solutions were obtained for a low friction force of 35 kN and a friction welding time of 10 s. According to the results (see
Table 9, No. 7–10), the tensile strength was about 80 MPa, and the average joint shortening was only 3.5 mm. For these solutions, the upsetting force was also low. Increasing the upsetting force to almost the maximum value (48 kN) caused more significant material losses of up to 8 mm. It is worth noting that in the optimisation case, a lower material loss of about 50% was achieved, comparing
Table 4, No. 7, 8 with
Table 9, No. 7, 8.
The Pareto curve of UTS and ML using genetic algorithms is presented in
Figure 7.
The set of solutions consists of 32 points, forming a
Pareto curve, with limits defined by the extreme points ID1 and ID2 (see No. 1 and 2,
Table 9). Point ID2 in
Figure 7 is the highest point on the
Pareto curve with the highest UTS = 80.13 MPa and the highest metal loss ML = 8.25 in mm (see
Table 9, point No. 2). For point ID2, the welding parameters are as follows: friction force is 35 kN, friction time is 6 s, and upsetting force is 48 kN. The lowest point on the
Pareto curve is ID1 (see
Figure 7). For point ID = 1, the lowest metal loss is 0.23 mm, while the lowest UTS = 30 MPa is received (see No. 1 in
Table 9). For point ID1, the following welding parameters (FF = 35 kN, FT = 9 s and UF = 40 kN) were found. When the
Pareto solutions are analysed further, more information regarding the variation in the process parameters is exposed. All the Pareto solutions are numbered and sorted in order to increase the tensile strength of the joint and decrease metal loss for all cases.
Figure 8 shows the variation in UTS and ML values of the
Pareto solutions for the AZ91D/6061 joint (arranged in ascending order and plotted as the population size (
Popsize).
Conflicting relations between the objective functions (UTS and ML) of welding process quality have been observed. The
Pareto solution number of UTS vs. ML was optimised using a combination of
Ngen and population size. In this optimisation task, the
Ngen and
Popsize values were 80. The probability crossover of 0.9 and mutation of 0.2 are kept constant in all optimisation procedures. In this problem, the UTS and ML were optimised simultaneously. However, finding a solution that simultaneously optimises UTS and ML is not possible. From
Figure 8, it can be observed that the range of region (A–B) of higher UTS (68–80 MPA) with metal loss that changed in the range (0.7–7 mm) was selected for further analysis of the
Pareto results. The solution numbers corresponding to the region (A–B) are 25 to 60, which could be used to determine the ranges of best FF, FT, and UF welding parameters.
The process parameter solutions FF (a), UF (b) and FT (c) in all 80
Pareto solutions with increasing tensile strength are shown in
Figure 9.
The optimisation results in
Figure 9 show many variants of
Pareto solutions for welding parameters.
Figure 9a indicates the average value of 35 kN for FF, whereas UF increases linearly from 67 to 80 MPa (
Figure 9b).
Figure 9b,c show the increasing UF and UT values in the A–B range. Moreover, the constant values outside the range are visible. The UF and UF values are 48 kN and 6 s, respectively.
Figure 10 shows the variation in the FF, UF and FT parameters in all 80
Pareto solutions with decreasing metal loss.
Figure 10 shows the predicted effects of friction force, upsetting force and friction time on the metal loss in the
Pareto solution number. As expected, with increasing upsetting force and more shortening of metal in the considered area (A–B), UF decreases linearly from 42 to 40 kN, or logarithmically from 27 to 46%. After reaching 60 generations, the shortening value stabilises at an 8 mm level. The predicted pattern shows linearly decreasing metal loss with decreasing upsetting force and friction time [
52,
53].
The new experimental runs for FF = 35 kN, UF = 48 kN, and FT = 6 s were used to confirm the developed model. The validation UTS and ML results are presented in
Table 10.
Table 10 shows that the experimental values are close to those obtained by the genetic algorithm. So, the absolute relative error between them was only 3%.