1 Introduction

With increasingly stringent requirements concerning the performance, accuracy, manufacturing cost, and cycle of metal parts in various sectors, including aerospace, energy, and defense [1,2,3], the direct forming of metal parts by additive manufacturing has recently attracted considerable scholarly attention [4,5,6]. During cladding, using a laser beam, the powder is radiated and melted on the forming path. The single- and/or multi-pass overlapping multi-layer cladding is cladded on the substrate until the metal parts are fully formed [7]. Therefore, the laser cladding process has several advantages, including low manufacturing cost, high utilization of material, high density, perfect metallurgical bonding performance, uniform chemical composition, excellent mechanical properties, and high production efficiency [8, 9].

The heat accumulation effect is a long-lasting challenge in controlling the multi-pass cladding process [10, 11]. The low temperature of the substrate at the initial stage leads to less energy absorption and a small dilution ratio [12]. The generated heat can continuously be transferred to the substrate surrounding and significantly increases the dilution rate during the following cladding pass, whose impacts cannot be ignored [13, 14]. The so-called heat accumulation effect is capable of inducing an increase in height and width, as well as wrapping deformation upon the cladding process, as shown in Fig. 1 [15, 16].

Fig. 1
figure 1

Defects caused by the heat accumulation effect namely swelling in a molten depth, b height and c width, and d wrapping deformation

An appropriate dilution rate is crucial for the metallurgical bonding strength and forming accuracy between substrate and cladding layers [17, 18]. A lower dilution ratio is reported to adversely affect the strength of the metallurgical bond between the cladding layers and substrate, which expectedly causes the cladding layer to easily peel from the substrate. On the other hand, the excessive dilution rate leads to uneven temperature distribution as well as localized temperature and residual stress gradients. Under the circumstances, the warpage and deformation become prominent where cracking may also occur [19].

Accordingly, an appropriate dilution ratio throughout the cladding process is essential to improve the cladding quality. It will ensure that there is not only a strong metallurgical bonding strength but also a small deformation and residual stress between the substrate and cladding layer [20]. Therefore, by reducing the thermal effect, the desired macro morphology and microstructure characteristics of the cladding layer as well as the appropriate size and uniform dilution ratio can be obtained [21, 22]. Hence, a detailed analysis of the thermal effect mechanism in the laser cladding process is of great scientific and industrial interest to improve the cladding quality [23].

Extensive research investigated the effects of heat accumulation during the multi-pass and multi-layer cladding. Thawari et al. [24] carried out a exploration on the deformation versus temperature variation of the substrate using a real-time monitoring system. In their investigation, comparing the second cladding layer with the single cladding layer indicated a decreased deflection, which was attributed to the relatively uniform temperature field along with the thickness. Moreover, the temperature variation of the molten pool presented that the continuous heat input prolonged the service life of the molten pool and resulted in the warpage and deformation of the cladding layer and substrate. Denlinger et al. [25] used a combination of laser displacement sensors and noncontact pyrometers; the cladding layer distortion and thermal history were monitored. The molten pool temperature was found to be relatively uniform to decrease deflection of cladding layers by adjusting the laser power. Zhao et al. [26] investigated the stress and temperature fields for the multi-pass cladding process using a neural network algorithm and genetic algorithm through the finite element method (FEM). The results indicated that the previous cladding layer was preheated upon the formation of the next cladding layer. The longitudinal tensile stress increases after several times compared to the transverse tensile stress, where the tensile stress reached the maximum at the metallurgical junction of the substrate and cladding layer. Using a 3D FEM, Wang et al. [27] simulated the continuously moving temperature field during a multi-pass cladding process to investigate the effects of overlapping on the melting of preset cladding layer for plasma spraying, based on the existing single-pass temperature field model. The results showed that the heat accumulation effect leads to the gradual rise of temperature and the expansion of the molten pool of cladding layers and substrate. The Molten pool of the same size and a more even cladding layer can be gained by increasing scanning speed or decreasing laser power in different passes sequentially. Ma et al. [28] discussed the main effective factor of temperature field and built the numerical model of temperature field in multi-pass laser cladding. The temperature fields of the three passes cladding process on the plate were calculated, and the temperature variations were determined at the center of each pass. Moreover, under the multi-pass condition, the lowest temperatures of the three points before their temperature increase parabolically during the cladding process. Li et al. [29] measured the multi-layer temperature field by multiple thermal couples. It was found that the temperature varies almost periodically. Such that in the first two layers, the temperature changed sharply in the multi-layer laser cladding. As cladding progressed, the temperature of the substrate increased and varied slightly. In addition, for the same processing parameters, the size of the molten pool increased and the temperature gradient decreased.

As mentioned above, many studies have been carried out to analyze the dilution ratio, heat accumulation effect, residual stress, and other aspects. However, the process parameters were considered as constants with a focus on the cladding results; the consideration of the real-time changes of the energy absorbed has been neglected [30]. Especially in multi-pass lap cladding, the continuous input energy of laser beam leads to the raise of the starting temperature of the substrate and the increase of dilution rate, which results in the more obvious the deformation of the substrate and cladding layer [31, 32].

As a consequence, this study analyzes the multi-pass cladding by characterizing the variations in the temperature distribution within the substrate and cladding layer. Moreover, we attempted to optimize the process parameters using depth learning algorithms, such that the substrate and the cladding layer can suffer the homogeneous energy even at different times. Therefore, this can ensure the uniform distribution of the temperature field, obtain a uniform depth of the molten pool, and produce a small temperature gradient and residual stress, eventually improve metallurgical bonding strength, forming accuracy, and reduce defects. Figure 2 elucidates the optimization process of the dilution rate.

Fig. 2
figure 2

Optimization process of dilution rate

2 Experimental procedure

2.1 Material

The substrate of Invar alloy was prepared with the dimension of 200 mm \(\times\) 100 mm \(\times\) 50 mm. The elemental compositions of substrate and powder are listed in Table 1, respectively. The mechanical properties of the Invar alloy are demonstrated in Table 2. Figure 3a illustrates the element spectrum of Fe and Ni. Figure 3b exhibits the scanning electron microscopy (SEM) image of spherical morphology of the particles where the diameter of the particles is ranged between 60 and 140 μm.

Table 1 Elemental composition of the Invar alloy
Table 2 Mechanical properties of the Invar alloy
Fig. 3
figure 3

a Element spectrum and b SEM micrographs of the spherical morphology of the Fe and Ni particles

The laser cladding equipment consists of a 6 kW laser device, a protective gas device, a powder feeding device, and a movement device; a schematic representation is presented in Fig. 4.

Fig. 4
figure 4

Schematic view of the laser cladding process. Hereon, heat affected zone is referred to as HAZ

2.2 Cladding experiment

On the basis of the collected point cloud from the cladding layer and substrate molten pool contour, the data are fitted with a parabolic function, and the area of the cladding layer and substrate molten pool is calculated accordingly. Following that, the area of cladding layer was calculated as 1.75mm2 and the area of substrate molten pool was 0.32mm2, as shown in Fig. 5.

Fig. 5
figure 5

Cross-sectional features

Subsequently, the dilution rate was calculated using Eq. (1):

$$D\left(\%\right)=\frac{{S}_{2}}{{S}_{1}+{S}_{2}}$$
(1)

3 Modeling of the multi-pass cladding process

3.1 Establishment of geometric model

According to the results of the single pass cladding, the geometric model of three-pass cladding was established by selecting a 45% overlap rate, as shown in Fig. 6.

Fig. 6
figure 6

Geometric model of multi-pass cladding: a isometric view and b front view

3.2 Establishment of finite element model

3.2.1 Element division

In the analysis of the multi-pass cladding temperature field, the changes in pool size and depth under different process parameters were mainly investigated. The division of unit size of the substrate, cladding layer, and the molten pool is 0.73 mm × 0.71 mm × 0.33 mm in Fig. 7a and 0.238 mm × 0.12 mm × 0.12 mm in Fig. 7b; that of the substrate molten pool and the unit nearby is 0.238 mm × 0.12 mm × 0.125 mm in Fig. 7c, which not only ensures the calculation accuracy but also reduces the calculation time. The mesh generation is shown in Fig. 7.

Fig. 7
figure 7

Mesh generation for multi-pass lap cladding: a substrate elements, b cladding layers elements, c transitional elements

3.2.2 Initial and boundary conditions

The ambient temperature of powder and substrate of Invar alloy was considered as 20 °C. As soon as the powder is sent out from the nozzle and interacted with the laser beam, it melts on the substrate and forms cladding layers with a certain shape. The ambient temperature of cladding layers is shown in Eq. (2):

$$T\left({x}_{c},{y}_{c},{z}_{c},0\right)={T}_{c}$$
(2)

The ambient temperature of substrates is shown in Eq. (3):

$$T\left({{x}_{s}}^{,},{{y}_{s}}^{,},{{z}_{s}}^{,},0\right)={T}_{s}$$
(3)

where \({T}_{c}\) and \({T}_{s}\) are ambient temperature and elevated temperature, respectively.

The boundary conditions are including heat flux, convection, radiation, and heat conduction. The boundary conditions of the first kind is shown in Eq. (4):

$${T}_{W}=f\left(x,y,\mathrm{z},t\right)$$
(4)

The boundary conditions of the second kind is the heat flux, \({q}_{h}\), on the surface, which is defined in Eq. (5):

$${q}_{w}=q\left(x,y,z,t\right)$$
(5)

The boundary conditions of the third kind are the heat exchange which is shown in Eq. (7):

$${q}_{w}=\mathrm{\alpha }\left({T}_{W}-{T}_{f}\right)$$
(6)

where \({T}_{W}\) is the surface temperature of the cladding layer, α is the heat conductivity, and \({q}_{w}\) is the heat flux surface of cladding layer.

3.2.3 Thermophysical parameters of materials

The variations of Young’s modulus, yield strength, coefficient of heat conductivity and specific heat, and thermal expansion coefficient versus temperature are shown in Fig. 8 for the Invar alloy.

Fig. 8
figure 8

Material parameters varying with temperature: a specific heat capacity and thermal conductivity, b yield strength, c coefficient of thermal expansion, and d Young’s modulus

3.2.4 Heat source model

The double ellipsoid model provides several advantages for adjusting the shape and size of the molten pool in the simulation in the case of having a continuously moving temperature field. To ensure high precision, the characteristics of the molten pool, and temperature field during the laser cladding, a double ellipsoidal model is determined.

The double ellipsoid model of heat flow in the first half is presented as Eq. (8):

$${q}_{f}({x}_{f}, {y}_{f},{z}_{f},t)=\frac{6\sqrt{3}{f}_{f}Q}{{a}_{f}bc\pi \sqrt{\pi }}{e}^{-3{{x}_{f}}^{2}/{a}_{{f}^{2}}}{e}^{-3{{y}_{f}}^{2}/{b}^{2}}{e}^{-3{{z}_{f}}^{2}/{c}^{2}}$$
(7)

The function of heat flow in the second half of double ellipsoid is defined as Eq. (9):

$${q}_{s}({x}_{s}, {y}_{s},{z}_{s},t)=\frac{6\sqrt{3}{f}_{r}Q}{{a}_{r}bc\pi \sqrt{\pi }}{e}^{-3{{x}_{s}}^{2}/{a}_{{r}^{2}}}{e}^{-3{{y}_{s}}^{2}/{b}^{2}}{e}^{-3{{z}_{s}}^{2}/{c}^{2}}$$
(8)

where Q is the available power; \({a}_{f}\), \({a}_{r}\), \(b\), and \(c\) are the model parameters; and \({f}_{f}\) and \({f}_{r}\) are the functions of heat-flux distribution before and after the heat source model, respectively such that \({f}_{f}+{f}_{r}=2\).

3.3 Heat transfer model of cladding

The temperature field distribution at different time steps and elements can be extracted in FEM for cladding layer and substrate. The three-dimensional governing equations of temperature field of cladding layer and substrate are as defined as Eq. (10):

$$\rho {C}_{p}\frac{\partial T}{\partial \tau }-\left[\frac{\partial }{\partial x}\left({\lambda }_{x}\frac{\partial T}{\partial x}\right)+\frac{\partial }{\partial y}\left({\lambda }_{y}\frac{\partial T}{\partial y}\right)+\frac{\partial }{\partial z}\left({\lambda }_{z}\frac{\partial T}{\partial z}\right)\right]-\overline{Q }=0\left(T\ge 0\right)$$
(9)

where \(\rho {C}_{p}\frac{\partial T}{\partial \tau }\) is the energy required to raise the temperature by one unit; \(\frac{\partial }{\partial x}\left({\lambda }_{x}\frac{\partial T}{\partial x}\right)\), \(\frac{\partial }{\partial y}\left({\lambda }_{y}\frac{\partial T}{\partial y}\right)\), and \(\frac{\partial }{\partial z}\left({\lambda }_{z}\frac{\partial T}{\partial z}\right)\) are the input discrete element energies in X, Y, and Z directions, respectively; \({\lambda }_{x}\), \({\lambda }_{y}\), and \({\lambda }_{z}\) are the coefficients of heat conductivity of Invar alloy in X, Y and Z directions, respectively; \(\overline{Q }(x,y,z)\) is the energy provided by the laser beam; T is the temperature; \({C}_{p}\) is the specific heat; and ρ is the density.

3.4 Verification of heat source model

The temperature distribution of the laser cladding process is compared with that of the single cladding experiment, as the benchmark, to ensure high precision. Moreover, the parameters of the heat source model are modified and adjusted according to the experimental results, as shown in Fig. 9. The technological parameters include the laser power of 1500W, the scanning speed of 3 mm/s, and the powder feeding rate of 5 g/s. It can be seen that the height, width, and depth of the cladding layer of experimental results were in good agreement with the simulation results, which indicates that the simulation model is accurate to simulate the temperature field distribution of Invar alloy.

Fig. 9
figure 9

Verification of the FEM analysis using experimental results of the cladding process

3.5 Investigation of thermal effect on the molten depth

3.5.1 Analysis of molten depth variation at different time during the first pass

Figure 10 shows the molten pool depth at different steps during the first pass. As shown in Fig. 10a, the substrate temperature was 20 °C where any evidence of energy absorption cannot be captured, and the substrate was not melted. By absorbing energy, the energy dissipates to the surrounding, and consequently, the substrate cannot be molten. That is to say, the particles ejected out of the nozzles were not synchronized with the laser beam along the scanning direction and have a certain hysteresis. Then the powder particles absorb less energy from the laser beam and fail to be melted, which leads to the smaller width and height.

Fig. 10
figure 10

Molten pool depth at different steps during the first pass

Figure 10b illustrates the molten pool depth at step 1–2 indicates a depth of 0.01688 mm. The substrate had absorbed and accumulated energy and had begun to melt. Gradually, the powder was synchronized with the laser beam with increasing the energy absorption which leads to swelling the width and height of the cladding layer. Figure 10c captures the molten pool depth at step 1–4 shows a depth of 0.5327 mm. In this case, the substrate absorbed and accumulated even more energy as a result the molten pool depth reached an ideal value. The particles were synchronized with the laser beam and fully absorbed energy through the laser beam. The height and width of the cladding layer reached the expected size.

In step 1–16, the molten pool depth reached 0.9116 mm (Fig. 10d). Due to the constant process parameters throughout the cladding process, the substrate progressively absorbs and accumulates energy and continuously transfers energy to the surrounding. As a result, the continuous increase of the initial temperature of substrate, the substrate molten pool depth, and finally the maximum is 0.9116 mm.

Figure 10e illustrates the molten pool depth in step 1–47 shows a depth of 0.8641 mm. Because there are convection, radiation, and conduction factors, the initial temperature of the substrate was not increased progressively, instead reach an equilibrium eventually. Following that, the energy was gradually decreased resulting in the depth of the substrate molten pool to be decreased gradually.

In step 1–81, the molten pool depth gradually increased to 0.9966 mm (Fig. 10f). As the laser beam was getting closer to the end of the substrate, the absorbed energy of the substrate could not be transferred to the front and gradually accumulated near the end of the substrate, which resulted in the starting temperature of the substrate and the depth of the molten pool to be increased progressively.

3.5.2 Analysis of molten depth variation at different time during the second pass

Figure 11 illustrates that the corresponding molten depths of steps 1, 2, 3, 16, 76, and 81 during the second pass are 0 mm, 0.3001 mm, 0.5002 mm, 0.9666 mm, 0.9104 mm, and 1.0217 mm, respectively. After the first pass cladding, it took two seconds for the laser beam to move from the end of the first cladding (layer?) to begin the second cladding (layer?). During this period, the substrate and cladding layer dissipate the accumulated energy during the first pass via convection, conduction, and radiation.

Fig. 11
figure 11

Molten pool depth at different steps during the second pass

Figure 11a shows that the molten pool depth is 0 mm. Figure 11b presents that the molten pool depth in step 2–2 is 0.3001 mm, which is nearly 80% larger than that in step 1–2 of 0.1688 mm. It is evident that although the heat dissipation takes place between the first and second passes, the substrate still has a higher initial temperature which leads to a higher depth of molten. Figure 11c illustrates that the molten pool depth in step 2–3 is 0.5002 mm, which is nearly 30% larger than that in step 1–3 of 0.3864 mm. Figure 11d exhibits that the molten pool depth in step 2–16 is 0.9666 mm, which is about 6% larger than that in step 1–16 of 0.9116 mm. Figure 11e shows that the molten pool depth of the substrate in step 2–76 is 0.9104 mm, which is about 4% larger than that in step 1–76 of 0.8754 mm. Figure 11f presents that the molten pool depth of the substrate in step 2–81 is 1.0217 mm, which is about 3% larger than that in step 1–81 of 0.9966 mm.

To sum up, with the second cladding, the effect of the first cladding on the initial temperature of the second cladding decreased gradually. When the molten depth reached a certain depth, the initial temperature of the substrate reached an approximate equilibrium state, and the molten depth increased less than that of the first pass.

3.5.3 Analysis of molten depth variation at different steps during the third pass

Figure 12 shows the variation of molten depths during the third pass taken from the steps 1, 2, 3, 16, 73, and 81 which were 0 mm, 0.3301 mm, 0.5352 mm, 1.0267 mm, 0.9754 mm, and 1.0629 mm, respectively.

Fig. 12
figure 12

Molten pool depth at different steps during the third pass

Comparing the molten pool depth in step 2 of the first and third passes, a considerable increase of 96% was noticed in the depth which can be attributed to the heat accumulation after the first and second cladding. Under the same process parameters and higher initial temperature, the molten depth of step 3–2 is nearly twice as deep as that of step 1–2. From Fig. 12c, the molten pool depth in step 3–3 is 0.5352 mm, about 39% larger than 0.3864 mm in step 1–3.

According to Fig. 12d, the depth of the molten pool in step 3–16 is 1.0267 mm, about 13% larger than 0.9116 mm in step 1–16. According to Fig. 12e, the depth of the molten pool in steps 3–73 is 0.9754 mm, about 12% larger than 0.8728 mm in steps 1–73. According to Fig. 12f, the depth of the molten pool in step 3–81 is 1.0629 mm, about 7% larger than 0.9966 mm in step 1–81. With the third cladding pass, the heat of the substrate gradually reached the equilibrium, and the effect of heat generated in the first and second passes on the depth of the third pass of the substrate pool decreased gradually.

3.5.4 Influence and analysis of thermal action at different steps and stages

Figure 13a–c illustrates that the molten pool depth of the first, second, and third passes is small in the initial stage, then increases rapidly. Moreover, in the middle stage, it was noticed that the molten pool depth size almost remained unchanged. The trend of the average molten pool depth size taken from the three passes is plotted in Fig. 13d, where a gradual increase is apparent.

Fig. 13
figure 13

Variation and trend of molten depth of three passes: a first pass, b second pass, c third pass, and d comparison of molten depth

That is to say, the average molten depth of the first, second, and third passes was 0.8422 mm, 0.9018 mm, and 0.9572 mm, respectively. During the first cladding process, the substrate produces a higher temperature, according to a certain temperature gradient to the around the substrate. Consequently, the average depth of the second molten depth was 7% greater than that of the first molten depth, as a result of the increase in the initial temperature of the second and third cladding path.

In the second cladding process, the higher temperature generated by the first pass of cladding is transferred to the third cladding path, and the initial temperature of the third cladding is increased by the interaction with the first cladding. Therefore, the average molten depth of the third pass is 14% greater than that of the first pass.

The difference between the maximum molten depths of the first, second, and third substrates is small, and all occur in the last step of cladding. The maximum molten depth of the first, second, and third passes is 1.1230 mm, 1.1330 mm, and 1.1705 mm, respectively. The maximum molten depth of the first, second, and third pass increases gradually. The difference between the maximum molten depths of the three passes is also small. This can be attributed to the energy generated by the laser beam moving to the last few steps accumulates, resulting in the rapid increase of the initial temperature of the last step. However, the effect of heat on the molten depth was found to be weak.

4 Establishment of optimized model for thermal effect

To keep the dilution rate at the desired value during cladding, it was adjusted using a deep learning approach. Firstly, to ensure validity and precision, five different linear and nonlinear power functions are employed to load the FEM, and the corresponding data were extracted. Secondly, the appropriate network depth, convolution kernel number, and convolution kernel size were determined according to the extracted data. Then, the optimized model was constructed, and the power function was fitted. Finally, the power function was inputted into the FEM for simulation and verified by experiments.

4.1 Loading and analysis of linear and nonlinear power functions

To employ a convolution network to adequately learn the correlation between the molten depth and laser power, the deep learning model was emulated by the constant power, linear function, and quadratic function. The results of five different functions and corresponding molten depth are shown in Fig. 14.

Fig. 14
figure 14

Five power functions and corresponding molten depth: a five power functions, b constant power, c quadratic decreasing function, d quadratic increasing function, e linear decreasing function, and f linear increasing function

4.2 Construction of optimization model

4.2.1 Convolutional layer

To avoid the problems with a large amount of calculation caused by the fully connected method, the weight allocation method and multiple-convolution kernel were employed by the convolution layer to minimize the calculated quantities. First, by constructing different convolution kernels to traverse the input layer, a new input feature map was obtained by calculating the same weight. Owing to the various convolution kernels, the characteristic mapping of convolution calculation was also different. Then, by adjusting the sliding step of the convolution kernel, the size of the characteristic map presented richer diversity. Based on the above methods, the calculation efficiency could not only be improved, but also the training speed was increased.

The new feature mapping was developed by the convolution calculation. Supposing that the value of the feature mapping approached the convolution kernel, it was approximated as 1. The equation of the convolution layer is presented in Eq. (11):

$${y}_{c}^{{l}_{c}({i}_{c}, {j}_{c})}={K}_{{i}_{c}}^{{l}_{c}}*{x}^{{l}_{c}\left({r}^{{j}_{c}}\right)}=\sum\nolimits_{{{j}_{c}}^{,}=0}^{V-1}{k}_{{i}_{c}}^{{l}_{c}({{j}_{c}}^{,})}{x}^{{l}_{c}({j}_{c}+{{j}_{c}}^{,})}$$
(10)

where \({k}_{{i}_{c}}^{{l}_{c}({{j}_{c}}^{,})}\) is the \({{j}_{c}}^{,}\) th weight of the \({i}_{c}\) th convolution kernel of the \(l\) th layer, \({x}^{{l}_{c}\left({r}^{{j}_{c}}\right)}\) is the \({j}_{c}\) th convolved local area of the \({l}_{c}\) th layer, and V is the convolution kernel width.

4.2.2 Activation layer

A nonlinear activation function was adopted to regulate the whole nonlinear network through computing the convolutional layer. The nonlinear activation functions were the tanh function, Relu function, sigmoid function, etc., which were computed in the functions shown as Eqs. (12), (13), and (14), respectively. The tanh and sigmoid functions had the shortcoming of the disappearance of the gradient. Consequently, the Relu function was employed as the activation function of the front convolution layer.

$${a}_{a}^{{l}_{a}({i}_{a}, {j}_{a})}=sigmolid\left({y}_{a}^{{l}_{a}({i}_{a}, {j}_{a})}\right)=\frac{1}{1+{e}^{-{l}_{a}({i}_{a}, {j}_{a})}}$$
(11)
$${a}_{a}^{{l}_{a}({i}_{a}, {j}_{a})}=tanh\left({y}_{a}^{{l}_{a}({i}_{a}, {j}_{a})}\right)=\frac{{e}^{{y}_{a}^{{l}_{a}({i}_{a}, {j}_{a})}}-{e}^{-{y}_{a}^{{l}_{a}({i}_{a}, {j}_{a})}}}{{e}^{{y}_{a}^{{l}_{a}({i}_{a}, {j}_{a})}}+{e}^{-{y}_{a}^{{l}_{a}({i}_{a}, {j}_{a})}}}$$
(12)
$${a}_{a}^{{l}_{a}({i}_{a}, {j}_{a})}=f\left({y}_{a}^{{l}_{a}({i}_{a}, {j}_{a})}\right)=max\left\{0, \left.{y}_{a}^{{l}_{a}({i}_{a}, {j}_{a})}\right\}\right.$$
(13)

where \({a}_{a}^{{l}_{a}({i}_{a}, {j}_{a})}\) is the active value and \({y}_{a}^{{l}_{a}({i}_{a}, {j}_{a})}\) is the output value.

4.2.3 Pool layer

The pool operation was employed for the convolution neural network to minimize the number of samples. The operation of pooling was comprised of the minimum pool, maximum pool, and average pool. Using 2 × 2 traversal convolution results, the maximum was retrained to obtain a new feature mapping. As the maximum pooling maintains the maximum in each row and column, it corresponded to retain the best combination of (?) results. The closer the value was to 1, the more approximate the surface feature was. The functions are presented in Eqs. (15) and (16).

$${p}_{p}^{{l}_{p}({i}_{p}, {j}_{p})}=\frac{1}{{W}_{p}}{\sum }_{t=\left({j}_{p}-1\right){W}_{p}+1}^{{j}_{p}{W}_{p}}{a}^{{l}_{p}\left({i}_{p},t\right)}$$
(14)
$${p}_{p}^{{l}_{p}({i}_{p}, {j}_{p})}=\underset{\left({j}_{p}-1\right)W+1\le t\le \mathit{jw}}{\mathrm{max}}\left\{\left.{a}^{{l}_{p}\left({i}_{p},t\right)}\right\}\right.$$
(15)

where \({a}^{{l}_{p}\left({i}_{p},t\right)}\) is the activation value of the output of the t-th neuron of the i-th feature graph of the first layer, \({p}_{p}^{{l}_{p}({i}_{p}, {j}_{p})}\) is the characteristic value of the output of the t-th neuron of the i-th feature graph of the first layer after pooling, and \({W}_{p}\) is the width of pooling window.

Figure 15 shows the structure of the convolution neural network for multi-pass overlapping cladding. Two convolution layers, one pool layer, and one flat layer were used to predict the power function. The depth of the network layer was 3 layers, and the number, size, and sliding step of the convolution layer were 64 and 2 × 2 and 1, respectively. Moreover, the size and number of convolution cores are 2 × 2, 16. The activation function was Relu activation function, and the filling method was the “same.” Then the pooling layer was flattened and connected with the full connection layer. The loss function was “MSE,” the optimization function was “Adam,” the iteration times were 200, the learning rates were 1e−3, and the cross-validation was used to improve the fitting degree.

Fig. 15
figure 15

Structure diagram of the convolutional neural network

5 Results and discussion

5.1 Construction of power function

To obtain the laser power corresponding to the desired molten depth, the molten pool depth was used as the input and the laser power was employed as the output to train. According to the set parameters, the sample data was imported for prediction. The real-time laser power data points obtained are illustrated in Fig. 16a. To facilitate the simulation and verification against the experimental data, the power data points were fitted using a quadratic function, as shown in Fig. 16b.

Fig. 16
figure 16

a Real-time laser power data points and b power data points fitted using a quadratic function

The predicted results of different cladding passes were fitted by a quadratic function. The optimized three channel power functions are listed in Eqs. (17)–(19):

$$\begin{array}{cc}{y}_{1}=0.707{t}^{2}-14.70t+1201& \left(0<t<6.67\right)\end{array}$$
(16)
$$\begin{array}{cc}{y}_{2}=0.290{t}^{2}-11.64t+1221& \left(8.67<\mathrm{t}<15.34\right)\end{array}$$
(17)
$$\begin{array}{cc}{y}_{3}=0.525{t}^{2}-20.33t+1300& \left(17.34<\mathrm{t}<24\right)\end{array}$$
(18)

where y is the laser power and t is the laser cladding time.

5.2 Analysis of the molten pool depth

The optimized laser power function is loaded on the finite element model, and the analytical results are as follows:

5.2.1 Results and analysis of molten depth after the first pass optimization

Figure 17a–f shows the molten pool after the first cladding process, with the depth of 0.02 mm, 0.5002 mm, 0.5827 mm, 0.5021 mm, 0.4189 mm, and 0.5527 mm, respectively. In step 1–2, the substrate absorbed less heat and the molten depth was small since it was the initial stage. With the continuous input of laser energy, the depth of molten increased. In step 1–6, the molten pool depth and the cladding layer size just reached the expected value. In step 1–13, the molten depth reached the local maximum. Therefore, the power function decreased continuously, and the molten depth decreased from step 1–14 to step 1–73. When the laser beam was closer to the end of the substrate from the steps 1–73 to 1–81, the energy would gather rapidly, leading to the molten pool depth to be increased rapidly.

Fig. 17
figure 17

Optimized molten depth during the first pass

5.2.2 Results and analysis of molten depth after the second pass optimization

Considering the influence of heat generated by the first cladding pass on the second pass, the optimized power function was gradually reduced. Compared with the first pass, the molten depth corresponding to the second pass also changed by adjusting the power function. Figure 18 shows the results of the second cladding and their molten depths.

Fig. 18
figure 18

Optimized molten depth during the second pass

5.2.3 Results and analysis of molten depth after the third pass optimization

After the first and second cladding, the heat accumulation effect was produced on the third cladding, and the optimized power function was further reduced. Figure 19 shows the results of the third cladding.

Fig. 19
figure 19

Optimized molten depth during the third pass

During the first cladding (pass, layer, or process?), the starting temperature of the substrate was low, and the power required for the cladding was high. During the cladding process, the initial temperature increased gradually, and the power required was relatively small. As shown in Fig. 20a, the first unoptimized molten depth is far greater than the expected molten depth. The optimized molten depth reached the expected depth in step 1–6 and then continuously increased by reaching the local maximum in step 1–16.

Fig. 20
figure 20

Comparison of the molten depth before and after optimization and the expected: a first pass, b second pass, c third pass, and d average molten depth

In order not to make the substrate molten depth deviate from the expected molten depth considerably, with the adjustment of the power function, the molten depth decreased from steps 1–17 to 1–73 over the given time. During this period, the molten depth of the substrate had been decreasing within a reasonable range. To avoid a significant reduction in the molten depth of the substrate, the molten depth increased with the adjustment of the laser power function. Figure 20b, c demonstrates the influence of the first cladding on the initial temperature of the second cladding and the influence of the first and second cladding on the initial temperature of the third cladding.

The molten depth mostly fluctuated near the desirable molten depth with the real-time adjustment of the laser power function, which ensures better cladding quality. Figure 20d explains that the initial temperature increases with the continuous input of energy, which results in the average molten depth of the first, second, and third passes to increase, which is far greater than the expected molten depth. After optimization, the average molten depth of the first pass was very close to the expected molten depth. The average molten depth of the second pass was also slightly lower than the expected molten depth. Moreover, the average molten depth of the third pass was slightly higher than the expected molten depth. However, the average molten depth of the three passes fluctuated around the expected molten depth, which ensures the cladding quality.

5.3 Analysis of model error

Figure 21 shows the size and distribution of the errors after the optimization of the substrate molten depth. As can be seen in Fig. 21a, in the first cladding, the substrate in step 1–1 is not melted, and the molten depth for steps 1–2 to 1–4 is 0.02 mm, 0.2076 mm and 0.3314 mm, respectively, and the errors of the expected molten depth are − 100%, − 96%, − 58.5%, and − 33.75%, respectively. This is because, at the initial stage of cladding, the molten depth cannot reach the expected value immediately, but it increases rather gradually.

Fig. 21
figure 21

Error between the actual and expected dilution rates: a first pass, b second pass, c third pass, and d average error

In the 84th step, the last step, the molten depth increases rapidly to 0.6865 mm due to the energy accumulation, and the error increases to 37.25%. Similarly, Fig. 21b, c illustrates that the tendency of the second and third passes is the same as that of the first pass. According to Fig. 21d, the average errors of the first second and third passes are 10.88%, 8.77%, and 6.89%, respectively.

5.4 Experimental verification

The optimized three power functions were the inputs of the cladding equipment to carry out multi-pass overlapping cladding experiment, and the cladding sample is cut along the radial direction by the wire cutting, as shown in Fig. 22. Due to the real-time adjustment of the power function, the energy absorbed during the first, second, and third passes is basically equal. Therefore, the \({h}_{m1}\), \({h}_{m2}\), and \({h}_{\mathrm{m}3}\) are basically equal and \({A}_{d1}\), \({A}_{d2}\), and \({A}_{d3}\) are also the same; that is to say, the dilution rate of the three passes is basically the same. This confirms that the optimization of molten pool depth is effective.

Fig. 22
figure 22

Experiment on the dilution rate of multi-pass cladding process

6 Conclusion

The FEM model was employed using the experimental result to study the heat accumulation effect in the three-pass laser cladding process. Then, the molten pool depth under different working conditions was obtained by loading different power functions on the FEM model. Finally, their dilution rates were optimized via a deep learning approach. The main conclusions are as follows:

  1. 1.

    The three-pass lapping FEM with a 45% overlapping rate was established based on the experiments, which indicated that the depth, height, and width of the cladding layer obtained from the experimental result were in agreement with those of the simulation analysis.

  2. 2.

    The heat accumulation effect has a critical impact on the process of multi-pass cladding. From the first to the third passes, the average molten depth of the substrate increased gradually. The average molten depth of the first, second, and third passes was 0.8422 mm, 0.9018 mm, and 0.9572 mm, respectively. The maximum molten depth of the first, second, and third passes was 1.1230 mm, 1.1330 mm, and 1.1705 mm, respectively.

  3. 3.

    The dilution rates of three-pass layers were optimized using a deep learning approach. The dilution rates of each cladding layer fluctuate with a small value around the ideal value by dominating the power in actual time. The average error of the first, second, and third passes was 10.88%, 8.77%, and 6.89%, respectively.

  4. 4.

    The optimized three power functions were inputted as the cladding equipment to carry out a multi-pass overlapping cladding experiment, which reached a satisfactory agreement result with the experiment.