3.1. RSM Depth Modeling
With the depth of the hardened layer as the response variable, a multivariate regression model was constructed using data from BBD experiments at varying induction frequencies. Subsequently, the model’s performance was evaluated through analysis of variance (ANOVA) [
36], with the ANOVA results for the hardened layer depth detailed in
Table 4 and
Table 5.
The F-value, which represents the statistic of the F-test, indicates the ratio of the sum of squares of deviations between and within groups relative to the degrees of freedom, while the
p-value indicates the significance of the factors. As shown in
Table 4, at an induction frequency of 10 kHz, the factors of laser power (A), scanning speed (B), induction power (C), the quadratic terms B
2 and C
2, and the interaction term BC all have a significant effect on the depth of the hardened layer (
p < 0.0001), while the remaining factors are non-significant. Comparing mean square values, the process parameters affecting depth are ranked as C > B > A. The
p-value for the lack-of-fit term is 0.5128 (
p > 0.05), indicating that the model effectively describes the relationship between the depth of the hardened layer and the influencing factors.
In addition, the coefficient of determination of the RSM model has a value of 0.998 for R
2 and 0.985 for R2adjust. After calculating Equations (1)–(3), the RMSE is 0.249 mm, the MAE is 0.019 mm, and the MAPE is 0.31%. The final response regression prediction of the quadratic polynomial model of the actual parameters is established as follows:
Table 5 indicates that at an induction frequency of 15 kHz, laser power (A), scanning speed (B), induction power (C), and the quadratic term C
2 significantly influence the depth of the hardened layer (
p < 0.0001). Additionally, the quadratic terms A
2 and B
2 and the interaction term AC have a notable impact (
p < 0.05), while the other factors are non-significant. The ranking of the process parameters affecting depth remains consistent with that at 10 kHz: C > B > A. The
p-value for the lack-of-fit term is 0.6217 (
p > 0.05), indicating that the model effectively describes the relationship between the depth of the hardened layer and the influencing factors.
In addition, the coefficient of determination of the RSM model has a value of 0.993 for R
2 and 0.955 for R2adjust. After calculating Equations (1)–(3), the RMSE is 0.069 mm, the MAE is 0.054 mm, and the MAPE is 1.12%. The final response regression prediction of the quadratic polynomial model of the actual parameters is established as follows:
3.2. RSM Hardness Modeling
The hardness of the hardened layer was used as the response value, and the data from the BBD experiments conducted at different induction frequencies were modeled by multivariate regression fitting. The model was then analyzed using the analysis of variance (ANOVA) method, and the results of the ANOVA for the hardness of the hardened layer are presented in
Table 6 and
Table 7. It was found that the prediction model of the hardness of the hardened layer using the response surface method was worse compared to that of the depth.
Table 6 illustrates that at an induction frequency of 10 kHz, the quadratic term A
2, the cubic term AB
2, and the three interaction terms significantly influence the hardness of the hardened layer (
p < 0.05), while the remaining terms are not statistically significant. The process parameters are ranked in terms of their influence on hardness as follows: B > C > A. The
p-value for the lack-of-fit term is 0.2819 (
p > 0.05), suggesting that the model effectively describes the relationship between the hardness of the laser-induced hybrid hardening hardened layer and the influencing factors.
In addition, the coefficient of determination of the RSM model has a value of 0.850 for R
2 and 0.758 for R2adjust. After calculating Equations (1)–(3), the RMSE is 10.098 HV
0.3, the MAE is 8.504 HV
0.3, and the MAPE is 1.15%. The final response regression prediction of the quadratic polynomial model of the actual parameters is established as follows:
Table 7 indicates that at an induction frequency of 15 kHz, scanning speed (B), the cubic term AB
2, and the interaction term BC significantly affect the hardness of the hardened layer (
p < 0.05), while the remaining terms are non-significant. The ranking of process parameters influencing hardness is B > A > C. The
p-value for the lack-of-fit term is 0.2819 (
p > 0.05), suggesting that the model effectively describes the relationship between the hardness of the laser-induced hybrid hardening hardened layer and the influencing factors.
In addition, the coefficient of determination of the RSM model has a value of 0.9085 for R
2 and 0.7910 for R2adjust. After calculating Equations (1)–(3), the RMSE is 12.691 HV
0.3, the MAE is 10.635 HV
0.3, and the MAPE is 1.36%. The final response regression prediction of the quadratic polynomial model of the actual parameters is established as follows:
3.3. Interactivity Analysis of RSM Model Process Parameters
Upon comparison of the data in
Table 4 and
Table 5 (corresponding to depth) and
Table 6 and
Table 7 (corresponding to hardness), it is evident that the significance of certain parameters varies between the two frequencies. This discrepancy may be attributed to the differing mechanisms by which the process parameters influence the depth and hardness of the hardened layer at different induction frequencies, thus necessitating further analysis.
Based on the multiple regression equations and analysis of variance, three-dimensional surface plots can be generated to illustrate the interaction effects of the experimental factors.
Figure 2 provides an intuitive representation of the effects of the laser power, the scanning speed, and the induced power, along with their interactions, on the depth of the hardened layer when the induction frequency is 10 and 15 kHz, respectively.
Among the three process parameters, only scanning speed (B) exhibits a negative correlation with the depth of the hardened layer. As scanning speed increases, the total heat input per unit time and area decreases, leading to a lower average surface temperature and a shallower region reaching the austenitizing temperature. In contrast, laser power (A) and induction power (C) show a positive correlation with the depth of the hardened layer. Increased heat input raises the temperature, allowing a deeper region of the 42CrMo steel to reach the austenitizing temperature. Furthermore, analysis of the interaction effect plots reveals that lower induction frequencies favor deeper hardened layers, with maximum depth increasing from 7.022 mm at 15 kHz to 7.817 mm at 10 kHz, indicating that induction heating penetrates deeper in this range.
Figure 3 shows the effects of laser power, scanning speed, and induction power on the hardened layer at induction frequencies of 10 kHz and 15 kHz. The key to surface hardening of 42CrMo steel is the martensitic structure from phase transformation. At a constant scanning speed, increasing laser power boosts energy input, which raises the material’s temperature and extends the region reaching the austenitizing temperature. This leads to faster cooling and more martensite, increasing hardness. However, too much laser power can overload the heat input, insulating the specimen and slowing cooling, which cuts martensite formation and caps hardness gains. Consequently, simply increasing laser power, as shown in
Figure 3a,d, will not enhance hardness. The complexity of multiple factors makes hardness analysis tricky, rendering single-factor evaluations less reliable.
3.4. WOA-BPNN Modeling
BPNN is a multilayer feedforward neural network trained according to the error back-propagation algorithm [
37]. Mirjalili proposed the whale optimization algorithm (WOA) in 2016 [
31]. This algorithm draws inspiration from the humpback whales’ unique feeding strategy, simulating their foraging behavior to enhance global search capabilities. It consists of three phases: encircling prey, the bubble-net attacking method, and searching for prey, as illustrated in the flowchart in
Figure 4.
(1) Encircling Prey. The mathematical model of a whale encircling prey is:
where
t indicates the current iteration number,
is the current position vector of the best solution,
is the current position vector, and
and
are coefficient vectors. The specific formula is as follows:
where
is the random vector in [0, 1], and
is the distance control factor, which decreases linearly from 2 to 0 during the iteration process:
where
MaxIter is the maximum number of iterations.
(2) Bubble-net Attacking Method. The mathematical model of the whale bubble-net attacking method is:
where
renders the distance from the first whale to the prey.
l is a random value between [−1, 1], and b is a spiral constant. When
p < 0.5, it is a narrowing encircling predation behavior. Conversely, it is a spiral bubble predation behavior.
(3) Search for Prey. The mathematical model for the random search hunt for whales is:
where
is the position vector of an individual whale randomly selected from the population.
Optimization of BPNN using the WOA helps to find the optimal initial weights and thresholds and requires fewer adjustment parameters. This compensates for the shortcomings of BPNNs, which are prone to falling into local optimal solutions.
Figure 5 shows the topology of the BPNN model structure optimized based on the whale algorithm.
From the 34 samples prepared in the BBD experiment and the 20 randomly generated samples, 80% were selected as training samples and 20% as test samples. The WOA-BPNN model addresses the challenge of predicting the depth and hardness of the hardened layer under varying induction frequencies. This model features four input neurons representing induction frequency, laser power, scanning speed, and induction power. After parameter tuning, a single hidden-layer neural network with 10 neurons was chosen, resulting in a final structure of 4 × 10 × 2.
The whale algorithm was set with a population size of 30 and a maximum of 50 evolutionary iterations to find the optimal weight threshold for the BPNN. Initial parameters included 500 iterations, a learning rate of 0.01, and a training target of 0.0001. Predictive performance was assessed using scoring indices, allowing for the development of the laser-induced hybrid hardening hardened layer process prediction model in MATLAB.
Figure 6 shows the fitness evolution of the hardened layer’s quality (depth and hardness). After optimizing the weights and thresholds via WOA, these values were applied to the BPNN. By the 50th generation, the fitness value for hardened layer depth reached 0.0256, while hardness fitness reached 0.0626.
After training, the depth coefficient of determination of the neural network model optimized by the whale algorithm was 0.995, and the hardness coefficient of determination was 0.996. The RMSE, MAE, and MAPE of the depth of the WOA-BPNN model were calculated by Equations (1)–(3) to be 0.099 mm, 0.022 mm, and 0.697%, respectively, and those of the hardness of the WOA-BPNN model were 1.734 HV0.3, 0.596 HV0.3, and 0.787%, respectively.
3.5. Comparison of RSM and WOA-BPNN Models
The depth of the hardened layer was analyzed using the RSM and WOA-BPNN laser-induced hybrid hardening models, as established in the experiments. Both models showed coefficients of determination close to 1, indicating high fitting accuracy. However, the WOA-BPNN model exhibited significantly higher coefficients for the hardness of the hardened layer, indicating greater stability than the RSM model. A comparison of RMSE, MAE, and MAPE values reveals that the WOA-BPNN model has superior modeling capability in the laser-induced hybrid hardening process. All comparison results are presented in
Table 8. Its main advantage lies in overcoming the limitations of the response surface method, particularly in simultaneously predicting both depth and hardness. This enhancement significantly improves model efficiency while maintaining accuracy, thus addressing multi-objective parameter challenges more effectively.
To compare the generalization abilities of the RSM and WOA-BPNN models, MATLAB randomly selected 10 sets of process parameters for laser-induced hybrid hardening experiments from the previously mentioned 54 sets. The experimental results and corresponding predictions from both models are shown in
Figure 7. The RSM model yielded a MAPE of 0.715% in terms of the mean hardened layer depth for induction frequencies of 10 kHz and 15 kHz, while the WOA-BPNN model achieved a MAPE of 0.697%. For the hardened layer hardness, the RSM had a MAPE of 1.255%, in contrast to 0.787% for the WOA-BPNN model. Thus, the WOA-BPNN model demonstrates superior generalization ability and accuracy in predicting both depth and hardness of the hardened layer.
In the hardness compliance and fixed process interval, the RSM model and WOA-BPNN were set to the optimal process parameters, i.e., an induction frequency of 10 kHz, laser power of 3600 W, scanning speed of 2.5 mm/s, and induction power of 40 kW. At that time, the predicted depths D were 8.016 mm and 7.762 mm, respectively. Under these conditions, the laser-induced hybrid hardening experiments were carried out. The average value of depth was 7.7 mm, as shown in
Figure 8. The difference between the theoretical and experimental values of RSM is 5.27%. In contrast, the difference between the experimental and predicted values of WOA-BPNN is 0.81%, so the accuracy of WOA-BPNN prediction is found to be higher than that of RSM.