1 Introduction

Currently, global resources and environmental conditions have become increasingly complex and special attention is being paid to lightweight materials to reduce the weights of aerospace structures, automobile bodies, high-speed passenger trains, etc. [1]. For weight reduction, the most effective method is the application of lightweight materials. In existing lightweight structures in aerospace and automotive structure, because elements such as Al, Mg and Ti are implanted of advancement in fabrication and processing methods [2]. The biggest problem in dissimilar Al and Ti alloy fusion joining process is diffusion of Al before reaching the melting point of Ti [3]. This huge difference between the melting point, thermal conductivity, specific heat capacity and linear expansion coefficient of Al and Ti alloys results in great deformation, internal stress and lack of bounding during joining process [4]. To solve this issue, some solid-state joining methods such as diffusion welding [5], laser welding–brazing [6], pressure welding [7], and friction welding [8] have been introduced. These specified methods had significant capability to weld dissimilar Al–Ti alloys that might forms intermetallic compounds. One eminent element in joining dissimilar Al–Ti alloys is nucleation of Ti3Al, TiAl and TiAl3 intermetallic phases. These compounds mainly rely on heating rate, thermal cycle, maximum heating temperature, cooling rate, and dwell period at high temperature [9]. Comparatively, friction stir welding (FSW) shows significant reduction in intermetallic compounds (IMC) layer compared to other solid-state joining methods, because FSW process is a solid-state joining method which occurs below melting temperature [10]. Friction stir spot welding (FSSW) was developed for the spot joining of similar and dissimilar metals as a solid-state joining method which was fundamentally based on FSW procedure. FSSW was first introduced by Kawasaki as a substitute for resistance spot welding (RSW) in 2000 and used by corporations such as Mazda and Ford in 2003 in car body joints [11]. The newly developed FSSW technique provides more technical advantages such as low energy input requirement, less problem related to porosity and cracking, low heat affected zone (HAZ) and low residual compared to conventional resistance spot weld (RSW). Therefore, due to the technical advantages and ability of FSSW to joint dissimilar alloys, it has been considered as a substitute for RSW in automotive applications [12]. However, in last few decades, many pioneering works have been performed on the FSSW of dissimilar alloys as a substitute for RSW in automobile application; however, further investigation is required. FSSW has extensively been applied in the manufacturing of body parts in automobiles, and has been found to be very economical in joining Al and Cu in aluminum car bodies [13]. Mazda is using this FSSW technique in its MX-5 sports car since 2006 to swap Al trunk lid to steel hinges. Toyota has also used this process in the manufacturing of deck lid and hood of its Prius hybrid vehicle [14].

Currently, ML algorithms are employed for regression, classification, clustering or dimensionality contraction in large sets of data inputs [15]. Numerous ML models are used to explore the required output variables using different ML tools to compare input restriction and output variables. Regression method is one of the most established and frequently applied techniques for forecasting/prediction. It is used to determine the relation between reliant and self-reliant variables. Regression model establishes relationships among more than one input value and several output values. MLR is an appropriate tool for the estimation of real functional connections between input and response variables that may distinguish the nature of joints [16]. ANN was one of the first ML methods which was developed in 1940s on the basis of human brain neuron system. Later in 1980s, it found its first application and now, it is used in several engineering operations due to its competence of removing complex and non-linear relations among the characteristics of various systems [17]. Nevertheless, ANN can only provide reliable results, when a huge number of data set is used for training. In some cases, it provides very poor analysis ability and offer local optimal solution instead of best global answer [18]. The major disadvantage of ANN model is its incompetence to define weight values affiliated to ANN model. Furthermore, to address this problems, ANN can be resolved using a hybrid artificial technique denoted as neuro-fuzzy system, which implies the combination of fuzzy reasoning and ANN. Adaptive neuro-fuzzy inference system (ANFIS) uses both neural network and fuzzy system that combines both human like reasoning style of fuzzy systems with the learning and connectionist structure of neural network. The biggest disadvantage of ANN model is eliminated in ANFIS using fuzzy inference system, which provides a weight to each function. Therefore, this weight function ability of ANFIS system make it superior to others and it has been applied in many field of studies as demonstrated Kar et al. [19] in his study. ANFIS model is more favored due to its easy implementation, fast and precise learning, distinct generalization ability, excellent clarification aptitude using fuzzy rules and easy combination with both semantic and mathematical information for trouble solving [20]. In early 1990s, a supervised ML approach called SVM was introduced as non-linear solution for classification and regression functions. In some fields (such as hydrology), researcher found that SVM was a better method in forecasting compared to ANN and ANFIS. SVM has better analysis capability, unprecedented and globally excellent architecture, and rapid data training capability. All these features makes SVM more robust, adequate and trustworthy [21]. ML models are extensively being employed in different manufacturing industries and researchers are applying them in real-life applications. Shojaeefard et al. [22] focused on the microstructure and mechanical features of the FSW of AA7075-O to AA5083-O alloys and developed an ANN model to simulate the correlation between the friction stir welding parameters and mechanical characteristics of the weld joints. ANN model works excellent and predicts the ultimate tensile strength and hardness of butt joints. Dewan et al. [23] applied ANN and ANFIS models to estimate the ultimate tensile strength of FSW parameters. From the results of ANN and ANFIS, it was found that optimized ANFIS models provided more improved results than ANN. Armansyah et al. [24] applied SVM to establish a load level forecasting system for the FSSW joints of AA5052-H112 Al alloy. The results obtained for training and testing from the proposed system exhibited that the classification of load data matched 100% to the required loads. Panda et al. [25] investigated the failure load of spot-welded B.S. 1050 Al sheets by utilizing AI methods such as ANFIS and SVM regression models. The performance of both models was compared in terms of relative error. The statistical comparison of both models showed that SVR model outperformed ANFIS.

In this work, 7075-T651 and Ti-6Al-4V Al alloys were welded by FSSW. The effects of revolving speed and dwell period on the mechanical and microstructural characteristics of weld joints were investigated. The obtained TSS results in this experimental study on dissimilar alloys were utilized to develop and train machine learning models (i.e. ANN, ANFIS, SVM and regression) to predict the response of all mentions models. All specified ML models were individually applied in the field of FSW and FSSW to forecast TSS response but they were not applied combined to predict the response. Therefore, this study was performed to categorize the performance of all these models on a specified data set of FSSW joints. The performance of each model was classified on the premise of root mean square error (RMSE) and overall prediction error % of the models from the obtained experimental data.

2 Experimental and machine learning methodology

2.1 Material preparation

In this study, AA7075-T651 and Ti-6Al-4V alloys with 4 mm thickness were adopted to perform experiments and the chemical composition of the plates are summarized in Table 1. Joints were made in a lap position using FSSW method to ensure joint reliability. The plates were prepared according to JIS Z3136 Standard [26] with dimensions of 100 mm × 35 mm × 4 mm, as shown in Fig. 3b. Prior to welding, all prepared sample sheets of AA7075-T651 and Ti-6Al-4V alloys were cleaned with industrial alcohol to remove impurities from the surface and protect from contamination or oxidization. Figure 1 illustrates the position of sample plates and role of tool which was used to weld the plates. Welding tool was made of H-13 high strength steel alloy. The dimensions of the prepared tool are shown in Fig. 2.

Table 1 Chemical composition and mechanical characteristics of base metals
Fig. 1
figure 1

Illustration of FSSW joining process of AA7075-T651/Ti-6Al-4V

Fig. 2
figure 2

The dimensions of the welding tool (mm) used in FSSW process

2.2 Experiment setup and procedure

In this study, semi-automatic milling machine model FV250E was used to weld AA7075-T651 and Ti-6Al-4V alloys. The operating machine was semi-automatic and therefore, a special assembly mechanism was developed to hold the samples during welding process. A 25 mm hole was drilled in the assembly mechanism, as shown in Fig. 3a, to weld the specimen where tool could penetrate in metal sheet to make a weld joint. AA 7075-T651 aluminum plate were placed on top due to their lower melting temperature and easier infiltration compare to Ti-6Al-4V titanium alloy plate with high melting temperature and very difficult infiltration. The crossovers of both plates were 35 × 35 mm which were pointed out by cross line, as seen in Fig. 3b. Welding process parameters were shuffled using full factorial design of experiment method with two measurable process stages. Revolving speed (RS) was classified into three sublevels and dwell period (DP) was distinguished into two sublevels, as seen in Table 2. Minitab 18.1 was used to arbitrate process parameters.

Fig. 3
figure 3

FSSW of AA7075-T651 with Ti-6Al-4V alloy, a assembly mechanism b welded sample according to JIS Z3136 standard

Table 2 Full factorial design of experiment 23

Tensile shear strength (TSS) tests were performed on universal testing machine (INSTRON 3385H) at constant load rate of 3 mm/min at room temperature for all samples. Three replicate samples were created for each specified welding parameters shown in Table 3. Separate samples were produced for microstructural and micro-hardness analyses. All samples were sectioned in the middle of joint structure for characterization and were cut using electrical discharge machine (DK-7763 EDM). All samples were mounted with epoxy hardener and resins with 2:1 ratio. The mounted specimens were grinded with specified abrasive papers P220, P320, P500, P1000, P2400 and P4000 to get abrasion free surfaces. Then, grinded specimens were washed with distilled water to prepare them for polishing. All prepared samples were polished by particle-impregnated carrier paste with grit size of 1 µm. Keller’s reagent [H2O (95 ml) + HNO3 (2.5 ml) + HCL (1.5 ml) + HF (1 ml)] was used to etch the specimens.

Table 3 Randomized full factorial design of experiment models with three replications

In this work, the hardness results of welded joints were taken along horizontal direction. Micro-hardness tests were conducted according to ASTM E384 standard [27]. Tukon micro-hardness tester (TU 300 FM) was used to conduct indentation. Micro-hardness tests were performed at 0.5HV Vickers hardener with DP of 20 s at constant force of 4.903 N. Along horizontal direction, diversified indents were made on both sides of weld cross section, as shown in Fig. 9. Micro-hardness tests were conducted after 40 days of legitimate aging period.

2.3 Machine learning methods

ML has an important statistical section denoted as neural network (NN) which is extensively being utilized in various forecasting projects. Today, ML applications are being used in many fields and industries such as medical, weather forecast, river water flow and many more [28]. NN is increasingly used in artificial intelligent models and is based on the ability of human neuron system to process information. Astronomical researchers were attracted to ANN due to their outstanding performance based on non-linear input variables [29]. Psychologist Frank Rosenblatt first introduced artificial neural network (ANN), named as ‘perceptron’, in 1958. ANNs are data processing tools and are frequently used for prediction and classification [30]. Figure 4 shows multilayer ANN perceptron arrangement with three layers of input, hidden, and output. The input layer resided all input parameters. Input layer information was further refined in hidden layers section, and pursued to output layer. The data set applied to train machine learning models of ANN, ANFIS and SVM are summarized in Table 4.

Fig. 4
figure 4

Schematic of ANN layer

Table 4 Machine learning data sets used to train the model sets of ANN, ANFIS and SVM

ANFIS model was first established and introduced by Jang [31] and is a combination of NN and fuzzy inference system (FIS). Takagi [32] proposed FIS, also known as fuzzy model, and Sugeno et al. [33] developed an organized method to generate fuzzy rules from a data set with input and output variables. This five-layer rules inference system was developed together by Takagi, Sugeno and Kang (TSK). ANFIS with two inputs x and y and one output F was selected. It was assumed that rule base contained two fuzzy if–then rules of TSK:

$${\text{Rule 1}}:{\text{If}}\left( {x{\text{ is }}X_{{1}} } \right){\text{ and }}\left( {y{\text{ is }}Y_{{1}} } \right){\text{ then }}F_{{1}} = a_{{1}} x + b_{{1}} y + c_{{1}} ,$$
$${\text{Rule 2}}:{\text{If}}\left( {x{\text{ is }}X_{2} } \right){\text{ and }}\left( {y{\text{ is }}Y_{2} } \right){\text{ then }}F_{2} \, = \,a_{2} x\, + \,b_{2} y\, + \,c_{2} ,$$

where ai, bi, ci (i = 1, 2) are linear consequent parameters and X1, X2, Y1 and Y2 are the linguistic terms of precondition, and Fig. 5 shows ANFIS architecture. In this interference method, the outcomes of individual rules are consecutive combination of intake value added by a constant term. Weighted average is the final outcome of each rule. ANFIS architecture consists of five layers, as described below in detail [31].

Fig. 5
figure 5

Type-3 ANFIS structure with two inputs and one output with two rules

SVM is a supervised training algorithm and is used for classification and regression analyses [34]. SVM is basically divided into two classes, support vector classification (SVC) and support vector regression (SVR). SVR was first proposed in 1997 by Vapnik et al. [35] and could be enforced to a statistical regression to help evaluate the relationships among variables. SVR anticipates the values of continuous dependent variable, unlike SVC that only classifies pattern into discrete classes. SVR relies on the subgroup of training data which lies within the margin of tolerance. SVR does not consider the data points which are beyond the margin of tolerance. The main goal of SVR model is to create a function with the highest tolerance deviation from the actual obtained targets for all training data and at the same time behave as flat as possible Fig. 6 [36].

Fig. 6
figure 6

Schematic explanation of SVC and SVR

Regression determination is the most frequently used classical estimation method to examine the combination of relevant and irrelevant values. Relationships among input and predicted variables could be describes by using the following linear model equation.

$$Y= {\beta }_{0}+\sum {\beta }_{i}{X}_{i}+ {\varepsilon }_{i},$$
(1)

where \({\beta }_{0}\)\({\beta }_{i}\) represent regression coefficients and \({\varepsilon }_{i}\) is arbitrary error examines the overall performance of the model at each regression coefficient [37].

3 Experimental results and discussion

3.1 Temperature examination of FSSW process

In FSSW method, inflated heat has a key function in the mixing and plastic flow of materials. However, temperature has significant influence on the nucleation and growth of IMCs, because the formation of IMC is thermally mobilized [38]. Temperature measurement of AA7075-T651 aluminum alloy and titanium sheet was conducted using Thermometer (PCE-T390) during FSSW process. The thermometer was type K thermocouple temperature sensor with four input channels with temperature accuracy of ± 5 °C. Type K thermocouple was adjusted on the upper aluminum sheet near tool penetration region. Figure 7 shows the peak temperatures of AA7075-T651 and Ti-6Al-4V alloys during FSSW process at different revolving speeds and dwell periods. The temperature of weld joint was increased as the revolving speed and dwell period of the weld joint were increased. Temperature profile showed a linear relation between revolving speed and dwell period. As revolving speed and dwell period were increased, temperature was also increased. The maximum temperature of 329.2 °C was acquired at revolving speed of 2000 rpm and 10 s of dwell period. While the minimum temperature of 278 °C was obtained at revolving speed of 1000 rpm and dwell period of 5 s. At all revolving speeds, when dwell period increase from 5 to 10 s a significant improvement in temperature results obtained [39]. A significant increase in temperature up to 15.55 was seen by increasing revolving speed from 1000 to 2000 rpm. The obtained results demonstrated that maximum revolving speed and longer dwell period produced immense heat input leading to high-temperature generation [40].

Fig. 7
figure 7

Temperature profile of FSSW joints at specified welding parameters

3.2 Microstructure analysis

Optical and stereo microscopes were used to characterize the microstructural features of welded samples at different welding parameters. Low magnification stereo microscope was used to examine the whole structure of welded specimens, as shown in Fig. 8. High magnification optical Olympus microscope was used to examine the internal joint features of welded joints, as shown in Fig. 9. At certain welding parameters, tool pin penetrated into upper sheet, since material underneath tool pin become soft due to frictional heat and squeezed downward because of tool penetration causing lower sheet material to move upward toward the upper sheet and soften material mixed at edges of two facial surface that make a strong joint between two plates [41].Typically, in FSSW joints, faying surfaces exhibit a unique geometry known as ‘hook’, as shown in Fig. 8a–d. This hooking between faying surfaces is a result of inadequate metallic sticking between the two plates due to trapped oxide films and upward displacement during downward penetration of tool. In SZ, the broken particles of oxide layers are properly mixed with plasticized material and form a continuous joint. However, outside SZ, oxide layer fragments stay unmixed because of low stirring which often forms a flow curved profile denoted as hook. The distribution of oxide film and hook size depends on welding parameters [42]. The distance from the tip of the hook to the interface of keyhole was referred to as weld bond width. Figure 8a–d exhibits that geometrical features such as width of bond, SZ size, height of the hook of joints and adjustment varied according to welding parameters [43]. The upper bond width of weld specimen of shorter dwell period had larger bond width compared to longer dwell periods, especially at 1000 and 1400 rpm and 5 s dwell period. Normally, at longer dwell periods, heat input is increased which results in the formation of larger bond widths, but due to low revolving speeds at 1000 rpm, longer dwell periods play crucial part in making materials softer resulting in upward flow toward pinhole and creation of smaller hook heights and lower bond widths and, therefore, stronger joints [44], as shown in Fig. 8a. However, some defects were found in these small interfacial hook regions that might be due to insufficient metallurgical bonding during welding process. Interfacial hooks act as preexisting cracks and result in failure in weld joints [45]. Microcracks were found in hook region due to broken unmixed Ti particles with trapped oxide layer during material mixing at specified welding parameters. However, elongated grain particles of titanium alloys are visible in the hook region which are produced due to partial recrystallization at specific welding parameters, as shown in Fig. 10c, d [46].

Fig. 8
figure 8

Stereo macroscopic images at different revolving speeds and dwell periods a 1000 rpm and 10 s, b 1000 rpm and 5 s, c 1400 rpm and 10 s, d 1400 rpm and 5 s

Fig. 9
figure 9

Cross-sectional images of welding joint at 1000 rpm revolving speed and 5 s dwell period at pointed section cracks

Fig. 10
figure 10

Optical micrographs at different welding parameters: a 1000 rpm and 10 s left hook, b 1000 rpm and 10 s right hook, c 1400 rpm and 5 s, d 1400 rpm and 10 s, e 2000 rpm and 5 s, f 2000 rpm and 10 s

Similar phenomena were observed in microstructural analysis of specimens at 1400 revolving speed and dwell period of 10 s. Because of revolving speed of higher than 1000 rpm, macro-cracks were found in hook region which resulted in lower strength of weld joints, as shown in Fig. 10d. In this figure, cracks along grain boundaries of some unmixed aluminum alloys were presented which might be due to excessive heat generation. Figure 10c shows longer bond widths at shorter dwell periods which was due to lower time for material to flow upward during FSSW process resulting in longer bond widths. Even though increment in bonded width had no effect on the TSS of weld joint, because the creation of cracks in hook and some unmixed and broken particles of titanium alloys play main roles in low TSS, as shown in Fig. 13 [47]. Figure 10e, f represent the interfacial bounded width of the joint fabricated at high revolving speed of 2000 rpm and dwell periods of 5 and 10 s, respectively. A visible macro-crack at joint weld interface was noticed at all dwell periods. Theses cracks were formed in the aluminum side due to immense heat input during welding procedure. SZ suffers from the highest welding temperature due to high revolving speeds and dwell periods; therefore, high input dynamic recrystallization occurs and fine and equiaxed grains were noticed in SZ, as shown in Fig. 10f. Cracks mostly propagate in the SZ of the interface of upper sheet weld joint. Some researchers have suggested that if welds were constructed with larger bond widths and tinier hook altitudes, the weld strength of FSSW joints could be improved [40]. The interface of SZ and TMAZ was weak due to microstructure variation during FSSW process. A large fracture line was observed in the upper sheet of weld interface which caused early fracture during TSS test. It is well known that there are additional crystal imperfections such as vacancy and dislocation in the grain borders of weld joint [48].

The effects of welding parameters could be observed in the SZ and TMAZ of welded structure. The optical microstructure shown in Fig. 9 presented unmixed region in SZ joint interface area which might be generated, because low revolving speeds produced low heat and low dwell periods did not provide enough time to stir well and create strong weld joint. Therefore, in SZ area, cracks were obvious which reduced joint strength. Similarly, as was seen from Fig. 8a, b for revolving speed of 1000 rpm and dwell period of 10 s, stereo macroscope showed smaller hook regions compare to that obtained for dwell period of 5 s, which showed the effect of dwell period on welded joint microstructure. Figure 10a, b represents the optical microstructures of left and right sides of hook region at 1000 rpm revolving speed and 10 s dwell period which showed good joint bond at the interface. Dwell period had significant importance in obtaining high strength, because longer dwell periods allow materials to stir and improve material flow during tool penetration. As revolving speed was increased to 2000 rpm, heat generation was increased which caused variations in the microstructure of compound area. In Fig. 10e, f, white and gray regions present alpha and beta phases in hook region. Laminar β phase was prominent in hook region. In SZ area, grain refinement could be seen which was due to mechanical stresses along the direction of applied force causes friction. Whereas in TMAZ region, the grains are elongated in direction parallel to the boundary, which provided evidence of material flow during FSSW process. The material that flow under the tool undergoes extreme plastic deformation in sense of strain and strain rate at high temperature, which led to ultrafine equiaxed grains due to recrystallization around the revolving tool [49]. Mostly, recrystallization region was referred to as SZ. The outer side of SZ was TMAZ, which was exposed to moderate thermal cycle and limited plastic deformation. Therefore, it can be expected that recrystallization did not occur in TMAZ due to lower temperatures which caused insufficient plastic deformation [50].

Al/Ti hybrid structures have some benefits compare to single materials in term of accomplishment and lightweight structure demands. Al/Ti metals have mediocre inter-solubility and have brittle IMC; therefore, the possibility of interfacial crack during welding process is inevitable and joint features can vigorously degraded. Thus, it is difficult to develop strong Al/Ti weld joints without any cracks or imperfections. In the interface of dissimilar weld joints, cracks propagate due to the formation of intermetallic compounds. According to duality phase diagram, both Ti and Al were active materials which could create Ti3Al, TiAl and Al3Ti and other intermetallic compounds [51]. In the junction of weld joint, two zones are mainly present: Al-rich and Ti–rich. In Al/Ti interface of a weld joint, mostly Al metal dominates. This shows that phase change mostly happened in Al-rich area. However, it was observed in some cases in Ti-rich areas forming titanium-rich intermetallic compounds. According to research, the most preferable IMC in welding of Al/Ti has been TiAl3 due to its transit phase, when response temperature is lower than the melting point of Al [52]. The formation of TiAl3 IMCs were discussed in detail elsewhere [53]. In this study, FSSW welded samples at 2000 rpm revolving speed and 5 s dwell period was selected for SEM–EDS analysis. SEM–EDS analyses were carried at weld joint interfaces and under tool pin area. Figure 11 shows AlTi intermetallic compound at the interface of welded specimen and Fig. 12 exhibits Ti3Al IMCs under tool pin region. The formation of AlTi IMCs depended on process temperature and according to binary diagram, AlTi IMCs was found in welding dissimilar alloys. The free energy of AlTi compound was greater than that of TiAl3 compound [54]. The maximum process temperature obtained in this FSSW process was 329.2 °C. According to Klassen et al. [55], the dispersion of Al atoms in Ti plate had greater influence than the spread of Ti atoms in Al plate. Therefore, AlTi and Al3Ti IMCs should be formed chronologically due to the prominent diffusion of Al into Ti Side. However, in our research, Ti3Al IMCs were formed at weld interface due to the huge amounts of Ti fragments at elevated temperatures. According to Salishchev et al. [56], Ti3Al grains were divided into fragments by low angle boundaries and recrystallized grains were formed around them. Recrystallization of Ti3Al could be accelerated by the transformation of material into disordered state. However, at low temperature, the volume of recrystallized material could significantly increase during deformation. High revolving speeds raised Ti fragments in joint interface region resulting in the development of IMCs and nucleation of cracks in weld joint and deprecation of tensile shear strength. Figure 10e shows cracks and voids at the weld interface of the joint. The movement of Ti atoms toward aluminum side produce Ti3Al compound. As revolving speed was increased, the amount of Ti fragments were increased which produced brittle IMCs at joint surface and the occurrence of fracture on the joint at higher revolving speeds was related to Ti fragments [43]. According to Esmaeili et al. [57], in friction welding process, the establishment of abundant amount of rigid material fragments created resistance in soft material flow. Therefore, the dispersion of rigid material fragments in soft material flow formed defects such as voids and cracks in soft metal near the weld interface. According to Fuji et al. [58], the dominant factor in the mechanical properties of friction welded joints of Al and Ti dissimilar alloys was the thickness of IMCs produced at weld interface. The critical thickness of intermetallic compound layer was found to be 5 µm. Furthermore, in our experiments, IMCs occurred extremely in a very narrow region at the interface of weld joints. The thickness of Ti3Al compound might not exceed the critical value of 5 µm; therefore, the obtained joints exhibited considerable tensile shear strength. Wu et al. [59] confirmed the thickness of IMC in his study on friction stir welding of Al 6061with Ti-6Al-4V alloys. The maximum strength was achieved because of the formation of thin IMC of TiAl3 layer with only 100 nm thickness at joint interface. The formation of IMC layer during FSSW study was remarkably thin (did not exceed the critical limit value of 5 µm) resulting in high failure load values. They pointed out that small variations in dwell period significantly influenced diffusion process during the FSSW of AL/Ti joints.

Fig. 11
figure 11

SEM–EDS analysis of FSSW joints of dissimilar AA7075-T651 and Ti-6Al-4V at 2000 rpm revolving speed and 5 s dwell period

Fig. 12
figure 12

SEM–EDS analysis of FSSW joints of dissimilar AA7075-T651 and Ti-6Al-4V at 2000 rpm revolving speed and 5 s dwell period

3.3 Tensile shear strength

Tensile shear strength of FSSW joints at specified welding criteria are shown in Fig. 13. Revolving speed and dwell period had immense effect on the TSS of weld joints which were controlled by process parameters. At low dwell period of 5 s, maximum TSS values were 958.5 N, 1084.03 N and 2148.6 N for revolving speeds of 1000, 1400 and 2000 rpm, respectively. At low revolving speed of 1000 rpm and dwell period of 5 s, lowest TSS value was obtained which was due to lower heat generation and shorter period of stirring and mixing the materials at the interface that later caused joint failure. As revolving speed was increased from 1000 to 2000 rpm, the value of TSS of weld joint was increased to 55.38%. At lower dwell periods, increment in revolving speed improved heat generation which increased the fluidity of plasticized material at the interface increasing the TSS of joint. Therefore, at lower dwell periods, the highest TSS was gained at highest revolving speed [60]. Moreover, it has been reported that low dwell periods play a key function in the failure of FSSW joints [61] (Table 5).

Fig. 13
figure 13

Tensile shear strength of FSSW joints at specified welding parameters

Table 5 Tensile shear strength results with standard deviation and temperature at specified parameters

At high dwell period of 10 s and low revolving speed of 1000 rpm, TSS was 3457.2 N and as revolving speed was increased to 1400 and then 2000 rpm, joint strength was decreased respectively to 2241.565 N and 874.6 N. Maximum TSS was obtained at low revolving speed which meant low heat generation during welding process [62] but dwell period played a key function in enhancing temperature and improving material mixing under low revolving speeds resulting in establishing strong weld joints [63]. It has been proved that dwell period played a critical role in nugget thickness. Dwell period was found to be important in attaining large joint lengths that enhanced TSS [64]. Also, high dwell periods enhanced process heat increasing volume flow of stir material below the tool and broadening joint area [61]. High revolving speed and at high dwell period welded joint has low TSS [65]. Devaluation in TSS at high dwell periods and revolving speeds was because of increase in temperature which led to complete plasticization of metal [66]. High heat input changed the structure of grains in weld joints changing their mechanical properties. It is believed that the TSS of weld joint is mainly affected by the formation of intermetallic compounds [67]. At high dwell periods and revolving speeds, a sharp decline of 74.70% was observed in the TSS of the weld joint. Dwell period increased heat input creating micro-cracks at the interface and producing IMC compounds such as Ti3Al which depreciated the TSS of welded joints (Figs. 11, 12) [51].

3.4 Micro-hardness

Figure 14 shows the micro-hardness characterization of jointed specimens in aluminum plate presenting smoot tendency in TMAZ. The highest micro-hardness of 129.8 HV was found in the TMAZ of aluminum region at 2000 rpm revolving speed at 10 s dwell period. Enhancement in micro-hardness was found in TMAZ area rather than SZ due to heat flow during solidification which increased grain size. The highest micro-hardness in SZ was 124 HV which was acquired at revolving speed of 1000 rpm and dwell period of 5 s. SZ had lower hardness than TMAZ due to high heat input which led to dynamic recrystallization in aluminum sheet [68]. Improvement in dwelling period increased the heat of process causing coarser grains size, which decreased hardness [61]. Reduction in micro-hardness flow of a few samples could be due to the formation of micro-cracks at maximum revolving speed and longer dwell periods.

Fig. 14
figure 14

Micro-hardness indentation profile of AA7075-T651/Ti-6Al-4V alloy at various process parameters

At 2000 rpm revolving speed and 10 s dwell period, the highest micro-hardness of 386.1 HV was obtained in titanium under tool pin stir region. A minor variation in the hardness profile of weld joint was seen at dwell periods of 5 s and 10 s. On titanium side, high micro-hardness was found in the keyhole of weld joint which could be due to high temperatures which changed crystal structure and made grains more equixed under tool pin [69]. A reasonable improvement of 13.85% in hardness was observed at 2000 rpm revolving speed and 10 s dwell period almost 13.85% higher in keyhole compare to SZ and 4.32% higher in keyhole with respect to TMAZ region. Compare to TMAZ and keyhole regions, a decline in hardness profile was noticed in SZ [68]. The lowest hardness value was obtained at 1000 rpm revolving speed and 10 s dwell period which was due to low heat input. In titanium region, micro-hardness value was increased in keyhole periphery. This increment in micro-hardness value might be due to grain refinement [70] which was responsible for higher hardness [65]. Inversely, linear combination was found between hardness and grain intensity of SZ [61].

4 Machine learning models training

4.1 ANN model training

ANN is a heavily aligned disseminated information processing system that has absolute depiction features resembling biological neural networks of human brain [71]. Two-layer feed-forward neural network (FFNN) tool with backpropagation learning algorithm was applied to predict the responses of TSS, because it is a well-known universal predictor. Neural network fitting tool was consisted of input and output layers, twin-layer feed-forward network with sigmoid unseen neurons and linear output neurons (fitnet) that can be appropriate for easy multi-dimensional mapping of problems. MATLAB R2019a computing environment was applied to develop the ANN model. The graphical structure of the developed neural network model is shown in Fig. 15. In this model, eight neurons were applied for hidden layer to train the model. There was no specified methods to select the number of hidden neurons. Thus, mostly, the selection of hidden neurons depended on minimum mean square error (MSE). There are various types of algorithms available for training model input data. The selection criteria of algorithm were performance and learning speed which could provide the best fit to data. Therefore, Levenberg-Marquard (LM) backpropagation algorithm was selected to train the model. LM was especially constructed for quicker convergence in backpropagation algorithms. The presented technique was the quickest and supported numerical solution to obtain mean square error [72]. 70% of input data was used to train network model, 15% of the data was applied for testing and the remaining 15% data of experimental results was employed for validation. The model was trained multiple times until R-square value near to 1 or exactly 1 was obtained.

Fig. 15
figure 15

Neural network architecture

Figure 16 shows the plot of experimental (target) findings and corresponding predicted results of training, validation, and test data with overall prediction of the model. The correlation coefficient of target values with training data was found to be 0.99896. Similarly, the correlation coefficients of validation and test data were 0.9991 and 0.99967, respectively. The value of correlation coefficient R-square for validation and test data near to 1 showed that the model was trained very well. The overall value of R-square of 0.99853 endorsed that ANN model prediction efficiency was excellent.

Fig. 16
figure 16

ANN model results of training, testing, validation and overall data

4.2 ANFIS model training

ANFIS is basically a combination of two different techniques of ANN and fuzzy logic. FIS trained himself by using ANN systems. Neuro-adaptive learning method provided a process for fuzzy system to learn from the data set [19]. In this study, neuro-fuzzy designer tool was used to train the model by utilizing the provided data set. Detailed procedure of ANFIS training and pseudocode is depicted in Fig. 17. To train the model, default hybrid method was selected that possesses the advantages of ANN systems and FIS. The most well-known fuzzy inference system is shown in Fig. 5. In this study, single-output-Sugeno fuzzy inference system (FIS) model was automatically generated by using grid partitioning. The FIS model utilized in this paper contained two inputs, in which one input contained three and the other contained two membership functions for input. Membership type for input data training was selected as gaussmf function. Error tolerance for the model was adjusted as 0.005 and the number of epochs was 100 to train the model.

Fig. 17
figure 17

Flowchart of ANFIS training and testing

4.3 SVM regression training

SVR model is supervised ML tool that can learn from input data. SVR learning model was trained using ten cross-validation processes. Cross-validation is extensively applied to assess the accomplishment of classifiers and prediction models to calculate error rate. In SVM, ten cross-validation is used by default which is denoted by V. In this technique, 10% data are used each time for validation and remaining data is used to train the model. This process continues until repetition of training and testing takes place on all data sets. Support vector regression model was trained on all models and the best trained model was chosen and presented in this study. Fine Gaussian and medium Gaussian kernel functions provided better results with functional error R-square values of 0.99 and 0.99 with function root mean square error (RMSE) values of 103.23 and 112.57, respectively. Figures 18 and 19 show regression results.

Fig. 18
figure 18

Support vector regression result of fine Gaussian kernel with experimental and predicted responses

Fig. 19
figure 19

Support vector regression result of medium Gaussian kernel with experimental and predicted responses

4.4 Regression model training

The current regression model shown the correlation between the input and output parameters. The adequacy of the regression models is tested with correlation coefficient (R2) value. Equation 2 presents the relationship between the revolving speed and dwell time and the output as tensile strength. To obtain this relation, curve fitting tool was applied to get the graphical results of tensile shear strength which obtained using a non-linear polynomial equation.

$$\mathrm{TSS}=f \left(R, T\right).$$
(2)

The second-order polynomial regression equation was applied to show the outcome of the results Y, as shown in Eq. 3.

$$Y= {a}_{0}+ \sum {a}_{i}{x}_{i}+ \sum {a}_{ii}{x}_{i}^{2}+ \sum {a}_{ij}{x}_{i}{x}_{j}.$$
(3)

Therefore, the expression for two factors and picked polynomial equation was stated in Eq. 4:

$$Y= {a}_{0}+ {a}_{i}R+ {a}_{ii}T+ {a}_{ij}R\times T+ {a}_{02}{T}^{2},$$
(4)

where \({a}_{0}\) is the average of responses and \({a}_{i},{a}_{ii},{a}_{ij}\) are regression coefficients [73] which relied on particular linear, interaction, and squared terms of factors. Conclusive experimental connection was assembled by utilizing these coefficients and the grown final equation of multi linear regression model was represented as

$$\mathrm{TSS}=-4414+1272R+1.665T-0.7588RT+0.00111*{T}^{2}.$$
(5)

To visually study the effects of process parameters on TSS on specified welding parameters, a 3D response surface graph was generated which is shown in Fig. 20. The response surface graph showed the influences of parameters on welded joints at various revolving speeds (rpm) and dwell periods (s), on the TSS of weld joints. The highest TSS was obtained at low revolving speeds and immense dwell periods.

Fig. 20
figure 20

Response surface graph to represent the effects of welding parameters

5 Machine learning model results and discussion

Four different ML models were adopted in this study, namely ANN, ANFIS, SVM and Regression analysis, to train the model and then predict the expected outcomes of TSS of FSSW joints. The performance of all models was evaluated by computing prediction errors among experimental and predicted results based on the following equation.

$$\mathrm{Prediction \, error}\%= \frac{|\mathrm{actual \, value}-\mathrm{predicted \, value}|}{\mathrm{actual \, value}}\times 100.$$
(6)

Prediction error equation is the principle tool to process the efficiency of a trained model. The model test was trained with input parameters to obtain predicted results. The prediction error of trained model demonstrated the overall prediction performance of the specified models. Furthermore, RMSE is also a frequently used method to measure model error in analytical approximation. The applied RMSE equation is described below

$$\mathrm{RMSE}= \sqrt{\frac{1}{N}\sum_{i=1}^{N}({{p}_{i}-{t}_{i})}^{2}},$$
(7)

where N represents entire training data, \({p}_{i}\) is the assessment of required knowledge, and \({t}_{i}\) is the experimental value. The RMSE approach was used to calculate the forecasting efficiency of the work. ANN model had two inputs and one output with hidden layer which included eight nodes, beginning with one node to fabricate and evaluate using Levenberg–Marquard procedure. The unseen nodes employed sigmoid transfer function and outcome node employed linear transfer function. The model was trained multiple times to obtain optimal predicted results. The overall correlation coefficient of experimental and predicted outcomes could be observed based on prediction error % value of model. In Table 6, the average prediction error % of ANN model was 3.774% with RMSE of 52.633. Similarly, in ANFIS model, gradient descent and least square algorithms were applied for the functional analysis of optical factor to obtain good performance. Sugeno fuzzy model was developed with two IF rules. The Build in MATLAB neuro-fuzzy designer tool was employed to train the input data. ANFIS model had six fuzzy rules for the data set and Gaussian (gaussmf) membership function was chosen to train the model. The average prediction error of ANFIS model with Hybrid propagation was 3.361% and the RMSE of the predicted result was 50.934. ANFIS model provided more accurate prediction then ANN model which showed that the prediction capability of ANFIS model was higher than ANN model. Furthermore, MLR model was used to predict surface response and optimize process parameters. MLR model was trained by using polynomial functions to fit the model. The obtained polynomial equation was employed to predict the response of the results on specified welding parameters. The obtained results showed good prediction accuracy with prediction error of 2.624% and RMSE value of 39.352, which demonstrated the overall performance of the model. SVM regression model is a supervised ML model, which used input and output data to train the model and then predict the results. SVM regression models were trained under all kernel functions and the best result was provided by fine and medium Gaussian kernel functions. The prediction result of SVM regression model vs experimental results are compared in Table 6. The average prediction errors of SVM regression model was found to be 2.354 and 1.822% with RMSE values of 67.762 and 56.259, respectively. Both fine and medium Gaussian kernel SVM regression models provided the lowest prediction error in percentage which showed that the prediction capacity of SVM regression model was much higher than all other applied ML models. SVM regression model is a better method to predict the mechanical properties (tensile shear strength) of FSSW joints. Various different available kernel functions in MATLAB are applied in this study and every kernel function has great impact on the prediction based on SVR network.

Table 6 Experimental vs prediction results of specified models with average prediction error and RMSE

6 Conclusion

In this study, dissimilar AA7075-T651 and Ti-6Al-4V alloys were joined by FSSW and the effects of welding procedures such as revolving speed and dwell period on the mechanical and microstructural characteristics were evaluated. Furthermore, machine learning models MLR, ANN, ANFIS and SVM were applied on the TSS of welded joints to examine welding parameters (revolving speed and dwell period) to predict the results and compare with experimental data. The applications of machine learning algorithm, especially in the field of friction stir spot welding, are limited. The prediction of TSS at different parameters with multiple machine learning regression tool models has not been conducted yet. Therefore, the conclusion of this study is based on experimental and predicted results of machine learning models.

  • The utmost tensile shear strength of 3457.2 N was obtained at revolving speed of 1000 rpm and dwell period of 10 s. The main reason for obtaining this high strength at low rpm was low heat input. Longer dwell periods had crucial effects on material mixing. Longer dwell periods allowed the materials to be stirred under low temperatures, while maintaining standard properties of metals. As revolving speed was increased to 2000 rpm at constant dwell period, an intensive down turn of 74.70% was observed in tensile shear strength that was because of excessive heat input which totally plasticized metal under the tool and initiated micro-cracks and defects in the junction of weld joint.

  • At lower time period of 5 s, revolving speed has significant effect on the strength of weld joints. A significant increase of 55.38% in tensile shear strength of weld joints was observed at revolving speed of 2000 rpm compare to that at 1000 rpm. Improvement in tensile shear strength was due to higher temperature compare to low revolving speed. Lower dwell periods performed an important function to control the plasticization of metal relative to high dwell period of 10 s. A 59.3% advancement in tensile shear strength was observed from higher 10 s dwell time to lower 5 s one at same 2000 rpm revolving speed.

  • The highest hardness of 129.6 HV in aluminum region was noticed in TMAZ instead of SZ at revolving speed of 2000 rpm and time period of 10 s. Enhancement in hardness profile in TMAZ rather than SZ was because of increment in grain structure. Maximum hardness 124HV was received in SZ. SZ had lower hardness than TMAZ due to high temperature which led to dynamic recrystallization in aluminum sheet.

  • Mostly, hardness value is affiliated with revolving speed and increases as revolving speed is increased. In titanium plate, the maximum hardness of 386.1 HV was acquired at revolving speed of 2000 rpm and time period of 10 s. This increment in hardness might be due to the formation of intermetallic compounds due to dissimilar joint welding.

  • Scanning electron microscopy (SEM–EDS) showed the composition of AlTi and Ti3Al intermetallic compounds at weld interface. The creation of these IMCs reduced the tensile shear strength of joint at high revolving speeds and dwell periods. The major factor in the creation of IMCs was Ti fragments which were rigid materials that reduced the flow of soft materials during FSSW process.

  • The applications of machine learning algorithms, especially in the area of FSSW, are limited. The forecasting of tensile shear strength at different parameters with multiple machine learning regression tools has not been studied yet.

  • Support vector machine regression model provided better tensile shear strength predictions compare to ANFIS and ANN models. In SVM, two kernel functions of fine and medium Gaussian provided better forecast results in term of error prediction % and RMSE value. Minimum prediction errors were 2.354 and 1.822 with 67.762 and 56.259% RMSE, respectively. Even though it has been reported in other fields of study that the prediction capability of SVM model was much higher than ANN and ANFIS models, regression model had significantly lower prediction error% than ANFIS and ANN models. In this study, ANN had the highest prediction error% among all other applied models.