Prediction of Geometric Characteristics of Laser Cladding Layer Based on Least Squares Support Vector Regression and Crested Porcupine Optimization

The morphology size of laser cladding is a crucial parameter that significantly impacts the quality and performance of the cladding layer. This study proposes a predictive model for the cladding morphology size based on the Least Squares Support Vector Regression (LSSVR) and the Crowned Porcupine Optimization (CPO) algorithm. Specifically, the proposed model takes three key parameters as inputs: laser power, scanning speed, and powder feeding rate, with the width and height of the cladding layer as outputs. To further enhance the predictive accuracy of the LSSVR model, a CPO-based optimization strategy is applied to adjust the penalty factor and kernel parameters. Consequently, the CPO-LSSVR model is established and evaluated against the LSSVR model and the Genetic Algorithm-optimized Backpropagation Neural Network (GA-BP) model in terms of relative error metrics. The experimental results demonstrate that the CPO-LSSVR model can achieve a significantly improved relative error of no more than 2.5%, indicating a substantial enhancement in predictive accuracy compared to other methods and showcasing its superior predictive performance. The high accuracy of the CPO-LSSVR model can effectively guide the selection of laser cladding process parameters and thereby enhance the quality and efficiency of the cladding process.


Introduction
Laser cladding technology is a surface engineering technology that utilizes a laser as the heat source.This method involves the rapid melting of metal powder and the substrate under the influence of a high-energy laser beam, resulting in the formation of a molten pool.The molten material is then rapidly solidified into a dense and homogeneous metallurgical bonding layer [1].The laser cladding presents several advantages, such as low dilution rate, reduced work piece deformation, minimized heat-affected zone, and ease of automation.In recent years, laser cladding has gained considerable attention and has found widespread use in diverse fields, including aerospace, automobile, and defense industries [2].The laser cladding process is a complex physical metallurgical process, and the formation state of the clad layer is influenced by multiple factors.Among these, the cladding morphology is a significant characteristic indicator of laser cladding technology [3].The quality of the formed cladding can be significantly affected by variations in its width and height.
Inappropriate width and height may result in reduced efficiency in the forming process and increased likelihood of thermal stress and material distortion [4,5].The dimensions of a cladding layer are influenced by various factors, such as laser power, scanning speed, and powder feed rate [6].Consequently, it is vital to conduct an exploration of the mapping relationship between process parameters and cladding dimensions.This exploration would enable accurate prediction of cladding dimensions at specific parameter inputs, thus facilitating precise regulation of clad dimensions and enhancing forming quality.
Researchers have conducted numerous studies on the prediction of cladding dimensions for laser cladding.Gu et al. [7] and colleagues employed laser cladding technology to produce Fe-Cr-B-Al-Ti overlays aimed at improving the wear resistance of 2Cr13 steel.The research examined how variations in laser scanning velocity and titanium content impact the coatings' microstructure, dilution levels, microhardness, and overall wear resistance.Gao et al. [8].formulated a three-dimensional numerical model called the Single-Track Processing Prediction Model (STPPM) for use in laser cladding, leveraging the birth-anddeath element approach to anticipate the dimensions of the cladding layer's width and height during a single-pass laser cladding operation on 316 L stainless steel.The prediction error was less than 6.6%.Li et al. [9] developed a physics-based model for predicting melt-pool geometry and temperature in single-bead directed energy deposition, validated with Ti-6AL-4V tracks on an Optomec LENS system, showing less than 10% error in part height measurements.Chen et al. [10] introduced an advanced 3D multi-physics finite element model that incorporates heat transfer, fluid dynamics, shielding gas pressure, powder temperature elevation, surface tension, and free surface movement.This model offers strong adaptability and can be applied flexibly across various laser cladding systems and materials.The model's predictions align closely with experimental data, with average discrepancies of 6.05% in width and 4.15% in height.The limitations of the above study are that the laser cladding process is a complex multi-field coupled process, there is a dearth of knowledge regarding the dynamic evolution of the cladding process, and the finite element simulation process relied on numerous over-simplified assumptions, which may have led to potential inaccuracies in the findings.Additionally, the thermodynamic model used in the study is single and not applicable to all scenarios.Moreover, the accuracy and stability of the predictions are heavily reliant on the chosen cell type, boundary conditions, mesh scheme, and other factors.As a result, the accuracy and stability of the prediction are low.
In contrast to finite element methods, machine learning algorithms do not necessitate a comprehensive understanding of intricate physics for identifying the association between process parameters and cladding quality.As a result, the application of machine learning has become increasingly prevalent in the field of additive manufacturing in recent years [11].Mondal et al. [12] utilized an Artificial Neural Network (ANN) to predict the dimensions of the cladding layer's width and depth, achieving results that were in close alignment with the experimental outcomes.Gao et al. [13] applied both Random Forest (RF) and Multilayer Perceptron Backpropagation Neural Network (BPNN) to study the correlation between process parameters and the geometric characteristics of single tracks in the laser metal deposition of TC11 alloy.They considered laser power, scanning speed, and powder feed rate as input variables and track width and height as the output.The study's experimental results demonstrated that the BPNN model had a smaller maximum error than the RF model.Gao et al. [14] used the BPNN model, the Random Forest (RF) algorithm, and the response surface method (RSM) to predict the clad dimensions, respectively, and the results showed that the BPNN model gave the best agreement between the predicted results and the actual values.In summary, machine learning has shown great advantages in the field of additive manufacturing.Previous studies have predominantly used BP neural networks to predict cladding layer dimensions.However, BP neural networks require a high quantity and quality of datasets, while laser cladding is typically a small-sample experiment, making it unsuitable for BP neural networks.Least Squares Support Vector Regression [15] (LSSVR) performs well in small-sample prediction tasks, as it can establish nonlinear relationships between inputs and outputs with fewer data.Therefore, this study uses LSSVR to predict cladding layer dimensions.The penalty factor and kernel parameters of the LSSVR model significantly impact prediction accuracy, and the Crested Porcupine Optimization [16] (CPO) algorithm is used to optimize these parameters, enhancing the prediction accuracy.
This paper proposes a novel approach to predict cladding dimensions with the goal of improving the accuracy of such predictions.Specifically, the proposed method utilizes a Crowned Porcupine Optimization Least Squares Support Vector Regression (CPO-LSSVR) model, which trains and tests the LSSVR model using single cladding size data obtained from orthogonal experiments.Subsequently, the CPO-LSSVR model employs the Crowned Porcupine Optimization algorithm to determine the penalty factor and kernel parameters of the LSSVR model, resulting in a reliable and efficient prediction model that relates the laser cladding process parameters to the cladding dimensions.This study offers valuable reference and guidance for decision-making related to accurate prediction of cladding dimensions, regulation of cladding dimensions, and improvement of forming quality.

Materials and Setup
All experiments conducted for this research utilized a Laser Cladding and Deposition (LCD) system.As depicted in Figure 1, the LCD system is composed of a laser unit, a powder feeding mechanism, a coaxial powder nozzle, and a cooling apparatus.The laser head is attached to a 3-kilowatt laser source to provide the necessary energy.It operates with a laser spot diameter of 1 mm and a working distance set at 18 mm.Powder is transported to the melt pool by a powder feeder aided by a carrier gas, with Argon serving dual roles as the feed and protective gas at a flow rate of 8 L per minute.To safeguard the equipment, a water-based cooling system is integrated with the laser head to help regulate and reduce its temperature.typically a small-sample experiment, making it unsuitable for BP neural networks.Least Squares Support Vector Regression [15] (LSSVR) performs well in small-sample prediction tasks, as it can establish nonlinear relationships between inputs and outputs with fewer data.Therefore, this study uses LSSVR to predict cladding layer dimensions.The penalty factor and kernel parameters of the LSSVR model significantly impact prediction accuracy, and the Crested Porcupine Optimization [16] (CPO) algorithm is used to optimize these parameters, enhancing the prediction accuracy.This paper proposes a novel approach to predict cladding dimensions with the goal of improving the accuracy of such predictions.Specifically, the proposed method utilizes a Crowned Porcupine Optimization Least Squares Support Vector Regression (CPO-LSSVR) model, which trains and tests the LSSVR model using single cladding size data obtained from orthogonal experiments.Subsequently, the CPO-LSSVR model employs the Crowned Porcupine Optimization algorithm to determine the penalty factor and kernel parameters of the LSSVR model, resulting in a reliable and efficient prediction model that relates the laser cladding process parameters to the cladding dimensions.This study offers valuable reference and guidance for decision-making related to accurate prediction of cladding dimensions, regulation of cladding dimensions, and improvement of forming quality.

Materials and Setup
All experiments conducted for this research utilized a Laser Cladding and Deposition (LCD) system.As depicted in Figure 1, the LCD system is composed of a laser unit, a powder feeding mechanism, a coaxial powder nozzle, and a cooling apparatus.The laser head is attached to a 3-kilowatt laser source to provide the necessary energy.It operates with a laser spot diameter of 1 mm and a working distance set at 18 mm.Powder is transported to the melt pool by a powder feeder aided by a carrier gas, with Argon serving dual roles as the feed and protective gas at a flow rate of 8 L per minute.To safeguard the equipment, a water-based cooling system is integrated with the laser head to help regulate and reduce its temperature.In this study, 20 × 10 × 8 mm of 45 steel was used as the substrate.To avoid the influence of repeated processing on the experimental results, only one laser cladding experiment was carried out per substrate.Before the experiment, the substrate surface was sanded and then cleaned of surface impurities using anhydrous ethanol.The 17-4PH is a martensite precipitation hardening stainless steel that exhibits superior strength, hardness, and exceptional corrosion resistance.These advantageous properties have resulted in its widespread utilization in various industrial applications, including aerospace, nuclear power, and medical devices.Its exceptional mechanical and corrosion resistance properties make it an ideal material for critical applications that require high performance and reliability.In this study, 17-4PH powder was used as the cladding material.The particle size distribution of the powder was 75~120 µm, and the chemical composition is shown in Table 1.

Design of Experiments
The utilization of the orthogonal test approach ensures a more uniform distribution of sample data.This technique meets testing design requirements with a reduced number of experiments, enhancing efficiency and reducing costs.In this study, laser power, scanning speed, and powder feed rate are used as input variables, and a predictive model is developed to link these process parameters with the dimensions of the melt layer, with the layer's width and height serving as output variables.Following the orthogonal experimental methodology, 25 sets of laser cladding experiments were crafted, each with varying levels-five for laser power, scanning speed, and powder feed rate.Table 2 provides detailed information on the experimental design.

Results
According to the experimental design shown in Table 2, 25 sets of laser cladding experiments were carried out with different process parameters.The cladding was cut using a Wire Cut EDM in a direction perpendicular to the laser scan.After cutting, the cross-section of the cladding was ground with #200, #400, #600, #800, #1000, #1500, #1800, and #2200 grit sandpapers, followed by polishing with a grinding and polishing machine.Finally, it was etched with an etchant composed of 4 g of CuSO 4 , 20 mL of HCl, and 20 mL of H 2 O.The cross-section of the clad layer, after the grinding and polishing process, was photographed using an optical microscope, and the shape of the clad layer is shown in Figure 2.  ImageJ software (ImageJ2) was used to measure the width and height of the cladding layer to obtain the width and height of the cladding layer for different process parameters.The results of the orthogonal experiment are shown in Table 3. P, V, and f in Table 3 represent the three process parameters of laser power, scanning speed, and powder feeding rate, respectively.W and H represent the width and height of the cladding layer, respectively.ImageJ software (ImageJ2) was used to measure the width and height of the cladding layer to obtain the width and height of the cladding layer for different process parameters.The results of the orthogonal experiment are shown in Table 3. P, V, and f in Table 3 represent the three process parameters of laser power, scanning speed, and powder feeding rate, respectively.W and H represent the width and height of the cladding layer, respectively.To investigate the effect of different process parameters on the width and height of the cladding layer, an analysis of variance (ANOVA) was carried out on the experimental results.The ANOVA conducted on the width of the cladding layer has revealed that the laser power parameter in the laser cladding process exerts the most significant influence on the clad width.This is followed by the scanning speed parameter, while the powder feed parameter demonstrates the least impact on the width.A multivariate nonlinear fit was carried out to investigate the relationship between the process parameters and the cladding width.The process parameters were considered as independent variables, and the cladding width was considered as the dependent variable.This analysis was performed using the nonlinear least squares-McQuart method for 25 sets of experiments.The objective function of the cladding width and the laser cladding process parameters was obtained, taking into account the nonlinear nature of the relationship between these variables.The objective function is shown below: As can be seen from objective function 1, the cladding width increases with increasing laser power and powder feed, and the scanning speed increases as the cladding width decreases.
The ANOVA conducted on the height of the cladding layer has revealed that the scanning speed parameter in the laser cladding process exerts the most significant influence on the clad width.This is followed by the laser power parameter, while the powder feed parameter demonstrates the least impact on the width.Similarly, using the process parameters as the independent variables and the height of the cladding layer as the dependent variable, a multivariate nonlinear fit of the experimental results was performed to obtain the objective function of the cladding height versus the laser cladding process parameters as follows: As can be seen from the objective function, the cladding height decreases as the laser power and scanning speed increase, and the cladding height increases as the powder feed volume increases.

LSSVR Prediction Model
Least Squares Support Vector Regression (LSSVR) is an extension of the Support Vector Regression (SVR) algorithm [17].By minimizing a quadratic programming problem, LSSVR finds the optimal solution efficiently, effectively handling nonlinear regression problems while reducing algorithm complexity.Compared to the SVR algorithm, LSSVR significantly improves computational speed and convergence accuracy [18].The relationship between the laser cladding process parameters and the size of the cladding layer is nonlinear and represents a typical small-sample scenario, making the LSSVR model highly suitable for predicting the cladding layer in laser cladding processes.
In a given training set containing N points {x i , y i } N , x i is inputs, and y i is the output.The objective function can be expressed as follows: where ω is the weight vector; x i is the input vector; ϕ(x i ) is the nonlinear function that maps the input matrix to a higher-dimensional feature space; and b is the bias term.
The optimization problem for LSSVR is where C ∈ R + is the penalty coefficient; y i is the output vector; J is the loss function; and ξ i ∈ R is the slack variable; The constraint conditions are Through its dual form, the Lagrangian function is established based on the objective function and the constraint conditions: where α i is the Lagrange multiplier, α i > 0.
According to the Karush-Kuhn-Tucker (KKT) conditions, taking the partial derivatives with respect to ω, ξ i , b, and α i and setting them to zero, we have We obtain the following expressions: Using the method of kernel functions for calculation, the kernel function expression is as follows: Finally, we obtain the following matrix: where ) is a kernel function that satisfies the Mercer condition.
In this paper, we select the Gaussian RBF function, which has fewer parameters and strong learning capability, as the kernel function for the LSSVR model.By solving the equation above, we finally obtain the decision function of LSSVR as From the 25 sets of test data, 5 sets were randomly selected as the testing set and the remaining 20 sets as the training set.Firstly, the data from the training set were imported into the LSSVR.Since the experimental data are not of uniform dimension and the values of different parameters vary greatly from one another, the data need to be normalized and all data converted to between [0, 1], which can speed up the convergence and improve the prediction accuracy.The normalization equation is shown as follows: where X is the original data; X max , X min are the maximum and minimum values of the original data, respectively; and X is the normalized data.

Crested Porcupine Optimizer (CPO) Algorithm for Optimizing Least Squares Support Vector Regression (LSSVR)
In LSSVR, hyperparameters significantly influence model prediction performance.This study employs an RBF kernel function to construct the LSSVR model, where the penalty factor C and kernel parameter σ exert the greatest influence on prediction performance [19].To enhance prediction accuracy and reliability, this study utilizes the CPO algorithm to optimize the parameters of LSSVR.

Crested Porcupine Optimizer Algorithm
The CPO algorithm is a novel metaheuristic optimization technique that mimics four defense behaviors of the crested porcupine (visual, auditory, olfactory, and physical attacks) to solve optimization problems.It possesses strong global search capabilities and features rapid convergence.
The CPO algorithm, like other metaheuristic swarm algorithms, initiates the search process from an initial set of individuals.For each individual i, a random position X i is generated within the search space, expressed mathematically as follows: where N is the population size; r is a uniformly distributed random number between 0 and 1; and L and U are the lower and upper bounds of the search range, respectively.
To enhance the algorithm's convergence speed while maintaining population diversity, the Cycle Population Reduction (CPR) technique periodically increases or decreases the population size according to a predefined pattern.The mathematical expression is where N(t) is the population size at the current iteration t; N min is the minimum population size; N is the initial population size; T max is the maximum number of iterations for the algorithm; t is the current iteration number; % denotes the modulo operation used to apply adjustments periodically.
The purpose of the visual strategy is to simulate the behavior of a crested porcupine when it detects a predator.In the algorithm, this corresponds to the behavior of individuals moving towards the global best solution.The mathematical expression is where X t+1 i represents the position of the ith individual in the next-generation iteration; X t CP represents the position of the current global best solution, i.e., the position of the best individual found at the current iteration t; τ 1 is a random number based on a normal distribution, used to simulate randomness and enhance the algorithm's exploration capability; τ 2 is a random number in the interval [0, 1] used to adjust the intensity of exploration; X t CP − y t i represents the difference between the current global optimal solution and the position of the current individual i; y t i represents the midpoint position between individual i and a random individual at iteration t, used to simulate the position of the predator.
The purpose of the sound strategy is to simulate the behavior of crested porcupines emitting sounds when a predator approaches.In the algorithm, this represents the update of the individual's position.The mathematical expression is where X t+1 i represents the position of the ith individual in the next iteration; X t i represents the position of the ith individual at the current iteration t; U 1 is a random vector with elements valued at 0 or 1, used to simulate whether the crested porcupine emits a threatening sound to the predator and the intensity of the sound; y represents the position of the predator, usually calculated from the positions of two random individuals in the current population; τ 3 is a random value in the interval [0, 1] used to control the step size of the predator's movement; X t r1 and X t r2 represent the positions of two different randomly selected individuals from the population at the current iteration t.
The scent strategy simulates the behavior of crested porcupines releasing a scent to repel predators.In the algorithm, this is represented by the movement and update of individuals in the search space to explore new solutions and avoid local optima.In this way, the algorithm can gradually approach the global optimum while maintaining population diversity.The mathematical expression is where X t+1 i represents the position of the ith individual at the next iteration t + 1; X t i represents the position of the ith individual at the current iteration t; U 1 is a random vector with elements valued at 0 or 1, used to simulate whether the crested porcupine releases a scent.When the value is 1, the individual participates in the scent strategy update; when the value is 0, it does not participate in the scent strategy update; X r 1 represents the position of a randomly selected individual used to calculate the new position; S i is the scent diffusion factor used to control the intensity of the position update in the scent strategy; X r 2 and X r 3 represent the positions of two other randomly selected individuals in the search space, used along with X r 1 to calculate the direction and intensity of the scent diffusion; τ 3 is a random value in the interval [0, 1] used to control the influence of randomness in the scent strategy; δ represents a parameter that controls the search direction, used to adjust the movement direction of the individual in the search space; γ t is the defense factor, a time-varying function used to simulate defensive behaviors at different points in time.The mathematical expression is as follows: where t max is the maximum number of iterations.
The physical attack strategy simulates the defensive behavior of crested porcupines, allowing the algorithm to conduct more focused and target-oriented searches during the search process.This strategy is particularly suitable for the later stages of the algorithm, when more refined searches are needed in identified promising areas.The mathematical expression is where X t+1 i represents the position of the ith individual at the next iteration t + 1; X t CP represents the position of the global optimal solution at the current iteration t; α is the convergence factor used to control the speed at which the algorithm converges to the optimal solution; τ 4 is a random value in the interval [0, 1] used to introduce randomness in the physical attack strategy; F t CP represents the average force exerted by the global optimal solution X t CP on predators at the current iteration t.This can be computed based on the principles of elastic collision: where τ 5 represents another random number within the interval [0, 1], used to further control the strength of the force; α i is a parameter related to the importance of the ith individual.The flowchart of the Crested Porcupine Optimization (CPO) algorithm is shown in Figure 3: where 5  represents another random number within the interval [0, 1], used to further control the strength of the force; i  is a parameter related to the importance of the ith individual.
The flowchart of the Crested Porcupine Optimization (CPO) algorithm is shown in Figure 3:

CPO-LSSVR
The CPO algorithm is used to optimize the penalty factor C and kernel parameter  of the LSSVR model to improve prediction accuracy.The process is shown in Figure 4.

CPO-LSSVR
The CPO algorithm is used to optimize the penalty factor C and kernel parameter σ of the LSSVR model to improve prediction accuracy.The process is shown in Figure 4. Step 1: Input process parameters into the model, use deposition layer width and height as output data inputs to the model, and divide into training and testing sets; Step 2: Set initial parameters, including the search range for penalty factor c and kernel parameter  , and randomly generate a population; Step 3: Build the LSSVR model and train it using the training set; Step 4: Substitute the optimization results of each individual into the LSSVR model.Calculate the mean squared error between the predicted values obtained from different LSSVR model training processes and the experimental values.Use this as the fitness function for the CPO algorithm and compute the fitness of all individuals; Step 5: Apply cyclic population reduction techniques to periodically reduce the size of the population; Step 6: Execute exploration and exploitation strategies, updating individual positions; Step 7: Determine if the termination condition is met.If satisfied, output the optimal penalty factor bestC and optimal kernel parameter best .If not satisfied, proceed to Step 4; Step 8: Replace the LSSVR model's c and  with bestC and best ; Step 9: Test the CPO-LSSVR model using the test dataset.

LSSVR Model Prediction Results
The training data and test data are trained and tested using the constructed LSSVR model.This study conducted a total of 25 experiments, randomly selecting 20 of them as the training set, with the remaining 5 serving as the test set.The true height and width values of the test set are compared with the predicted height and width values to verify the accuracy of the model.Relative error is defined as follows: Step 1: Input process parameters into the model, use deposition layer width and height as output data inputs to the model, and divide into training and testing sets; Step 2: Set initial parameters, including the search range for penalty factor c and kernel parameter σ, and randomly generate a population; Step 3: Build the LSSVR model and train it using the training set; Step 4: Substitute the optimization results of each individual into the LSSVR model.Calculate the mean squared error between the predicted values obtained from different LSSVR model training processes and the experimental values.Use this as the fitness function for the CPO algorithm and compute the fitness of all individuals; Step 5: Apply cyclic population reduction techniques to periodically reduce the size of the population; Step 6: Execute exploration and exploitation strategies, updating individual positions; Step 7: Determine if the termination condition is met.If satisfied, output the optimal penalty factor bestC and optimal kernel parameter bestσ.If not satisfied, proceed to Step 4; Step 8: Replace the LSSVR model's c and σ with bestC and bestσ; Step 9: Test the CPO-LSSVR model using the test dataset.

LSSVR Model Prediction Results
The training data and test data are trained and tested using the constructed LSSVR model.This study conducted a total of 25 experiments, randomly selecting 20 of them as the training set, with the remaining 5 serving as the test set.The true height and width values of the test set are compared with the predicted height and width values to verify the accuracy of the model.Relative error is defined as follows: where X is the actual data value of the test set, and X is the predicted value of the model.Table 4 shows the actual values of the width and height of the test set compared to the predicted values of the LSSVR model.Specifically, the symbols "W" and "W1" are employed to indicate the actual and predicted values of the width, respectively, while "H" and "H1" denote the measured and predicted values of the height, respectively.Furthermore, the symbols "∆1" and "∆2" are adopted to represent the relative error between the predicted and measured values of the width and height, respectively.As can be seen from Table 4, the relative error in width is within 10.82% and the relative error in height is less than 11.11%.In order to visually convey the extent of variance between the predicted and true values, it is often beneficial to utilize a graphical representation of the data in the form of an image.This approach provides a more intuitive and easily interpretable depiction of the degree to which the predictions deviate from the actual values.The results are shown in Figure 5.The solid red line represents the actual values and the solid blue line represents the predicted values from the LSSVR model; Figure 5a shows the actual values of width compared to the model predictions and Figure 5b indicates the actual values of height compared to the model predictions.
where X is the actual data value of the test set, and ' X is the predicted value of the model.Table 4 shows the actual values of the width and height of the test set compared to the predicted values of the LSSVR model.Specifically, the symbols "W" and "W1" are employed to indicate the actual and predicted values of the width, respectively, while "H" and "H1" denote the measured and predicted values of the height, respectively.Furthermore, the symbols " 1  " and " 2  " are adopted to represent the relative error between the predicted and measured values of the width and height, respectively.As can be seen from Table 4, the relative error in width is within 10.82% and the relative error in height is less than 11.11%.In order to visually convey the extent of variance between the predicted and true values, it is often beneficial to utilize a graphical representation of the data in the form of an image.This approach provides a more intuitive and easily interpretable depiction of the degree to which the predictions deviate from the actual values.The results are shown in Figure 5.The solid red line represents the actual values and the solid blue line represents the predicted values from the LSSVR model; Figure 5a shows the actual values of width compared to the model predictions and Figure 5b indicates the actual values of height compared to the model predictions.According to Figure 5, the developed LSSVR model has some errors in the prediction of the cladding layer size.An analysis of the potential sources of error indicates that the LSSVR model may not have been optimized, with the penalty factor C and the kernel parameter  possibly not being the best parameters, which could affect the prediction accuracy.According to Figure 5, the developed LSSVR model has some errors in the prediction of the cladding layer size.An analysis of the potential sources of error indicates that the LSSVR model may not have been optimized, with the penalty factor C and the kernel parameter σ possibly not being the best parameters, which could affect the prediction accuracy.

Comparison of Prediction Results from Different Models
Optimize the parameters C and A of the LSSVR model using the CPO algorithm.Use the constructed CPO-LSSVR overlay size prediction model to predict the width and height of the overlay.Backpropagation Neural Networks (BPNNs) have been widely applied in regression prediction problems within the field of additive manufacturing, achieving satisfactory results.In this study, the BPNN is selected as the control group.To objectively compare the predictive accuracy of the CPO-LSSVR model, a Genetic Algorithm [20,21] is employed to determine the optimal weights and thresholds for the BPNN [22].A Genetic Algorithm-optimized BP neural network prediction model is constructed, as depicted in Figure 6.

Comparison of Prediction Results from Different Models
Optimize the parameters C and A of the LSSVR model using the CPO algorithm.Use the constructed CPO-LSSVR overlay size prediction model to predict the width and height of the overlay.Backpropagation Neural Networks (BPNNs) have been widely applied in regression prediction problems within the field of additive manufacturing, achieving satisfactory results.In this study, the BPNN is selected as the control group.To objectively compare the predictive accuracy of the CPO-LSSVR model, a Genetic Algorithm [20,21] is employed to determine the optimal weights and thresholds for the BPNN [22].A Genetic Algorithm-optimized BP neural network prediction model is constructed, as depicted in Figure 6.To visually illustrate the predictive performance of the models, the data were subjected to visual analysis, as shown in Figure 7. Train the LSSVR model, CPO-LSSVR model, and GA-BP model separately using the training set, and evaluate these models using the test set.Table 5 compares the overlay width predictions between actual values and predictions from different models.Here, W represents the actual values, W1 represents predictions from the LSSVR model, W2 represents predictions from the CPO-LSSVR model, and W3 represents predictions from the GA-BP model.∆1 denotes the relative error between predictions of the LSSVR model and actual values, ∆2 denotes the relative error for the CPO-LSSVR model, and ∆3 denotes the relative error for the GA-BP model.To visually illustrate the predictive performance of the models, the data were subjected to visual analysis, as shown in Figure 7.As shown in Table 5 and Figure 7, the predicted values of the CPO-LSSVR model are closer to the actual values, with smaller relative errors.Specifically, the average relative error of the LSSVR model is 3.226%, the CPO-LSSVR model is 1.956%, and the GA-BP model is 5.138%.The average relative error is defined as follows: As shown in Table 5 and Figure 7, the predicted values of the CPO-LSSVR model are closer to the actual values, with smaller relative errors.Specifically, the average relative error of the LSSVR model is 3.226%, the CPO-LSSVR model is 1.956%, and the GA-BP model is 5.138%.The average relative error is defined as follows: where n is the number of experiments in the test set and i is the experiment number.
Similarly, the overlay height predictions were compared, and the results are shown in Table 6.Here, H represents the actual values, H1 represents predictions from the LSSVR model, H2 represents predictions from the CPO-LSSVR model, and H3 represents predictions from the GA-BP model.∆4 denotes the relative error between predictions of the LSSVR model and actual values, ∆5 denotes the relative error for the CPO-LSSVR model, and ∆6 denotes the relative error for the GA-BP model.The data were also visualized, as shown in Figure 8.As shown in Table 5 and Figure 7, the predicted values of the CPO-LSSVR model are closer to the actual values, with smaller relative errors.Specifically, the average relative error of the LSSVR model is 3.226%, the CPO-LSSVR model is 1.956%, and the GA-BP model is 5.138%.The average relative error is defined as follows: where n is the number of experiments in the test set and i is the experiment number.
Similarly, the overlay height predictions were compared, and the results are shown in Table 6.Here, H represents the actual values, H1 represents predictions from the LSSVR model, H2 represents predictions from the CPO-LSSVR model, and H3 represents predictions from the GA-BP model.4  denotes the relative error between predictions of the LSSVR model and actual values, 5  denotes the relative error for the CPO-LSSVR model, and 6  denotes the relative error for the GA-BP model.The data were also visualized, as shown in Figure 8.As shown in Table 6 and Figure 8, the predicted values of the CPO-LSSVR model are closer to the actual values, with higher prediction accuracy.Specifically, the average relative error of the LSSVR model is 3.972%, the CPO-LSSVR model is 2.231%, and the GA-BP model is 7.314%.
In summary, the CPO-LSSVR model has the highest prediction accuracy and the smallest relative error, making it more capable of accurately describing the nonlinear relationship between process parameters and overlay dimensions.The CPO-LSSVR model can achieve precise predictions of overlay dimensions, which is significant for guiding subsequent analyses and process decisions.

Conclusions
The main findings and conclusions of this study are as follows: (1) In this study, the CPO algorithm was used to optimize the penalty factor and kernel parameters of the LSSVR model.The CPO-LSSVR model was utilized to predict the dimensions of the overlay, the results indicate that the CPO-LSSVR model achieved a relative prediction error of less than 2.3%.
(2) In this study, the Backpropagation Neural Network (BPNN), widely used in the field of additive manufacturing, was employed as a control group to establish a Genetic Algorithm (GA)-optimized BPNN control predictive model.The results indicated that the CPO-LSSVR model's predictive accuracy is higher than that of the GA-BP model.The CPO-LSSVR can reliably and accurately predict the dimensions of the deposition layer, providing effective guidance for improving the formation accuracy of the deposition layer and optimizing process parameters.

Figure 1 .
Figure 1.Schematic diagram of the laser cladding system.

Figure 1 .
Figure 1.Schematic diagram of the laser cladding system.

Figure 2 .
Figure 2. Cross-section of the cladding layer.(a) The schematic diagram; (b) the sample.

Figure 2 .
Figure 2. Cross-section of the cladding layer.(a) The schematic diagram; (b) the sample.

X 4 
 represents the position of the ith individual at the next iteration t + 1; t CP X represents the position of the global optimal solution at the current iteration t;  is the convergence factor used to control the speed at which the algorithm converges to the optimal solution; is a random value in the interval [0, 1] used to introduce randomness in the physical attack strategy; t CP F represents the average force exerted by the global optimal solution t CP X on predators at the current iteration t.This can be computed based on the principles of elastic collision:

Figure 4 .
Figure 4. Flowchart of CPO algorithm optimization for LSSVR model.

Figure 5 .
Figure 5.Comparison of the actual values of the test set with the predicted values of LSSVR.(a) Graph of actual width values compared to predicted width values.(b) Graph of actual height values compared to predicted height values.

Figure 5 .
Figure 5.Comparison of the actual values of the test set with the predicted values of LSSVR.(a) Graph of actual width values compared to predicted width values.(b) Graph of actual height values compared to predicted height values.

Figure 6 .
Figure 6.Diagram of the GA-BP process.Train the LSSVR model, CPO-LSSVR model, and GA-BP model separately using the training set, and evaluate these models using the test set.Table 5 compares the overlay width predictions between actual values and predictions from different models.Here, W represents the actual values, W1 represents predictions from the LSSVR model, W2 represents predictions from the CPO-LSSVR model, and W3 represents predictions from the GA-BP model. 1  denotes the relative error between predictions of the LSSVR model and actual values, 2  denotes the relative error for the CPO-LSSVR model, and 3  denotes the relative error for the GA-BP model.

Figure 6 .
Figure 6.Diagram of the GA-BP process.

Micromachines 2024 , 16 Figure 7 .
Figure 7.Comparison of overlay width prediction performance among different models.(a) Comparison of predicted values from different models.(b) Comparison of relative errors among different models.

Figure 7 .
Figure 7.Comparison of overlay width prediction performance among different models.(a) Comparison of predicted values from different models.(b) Comparison of relative errors among different models.

Figure 7 .
Figure 7.Comparison of overlay width prediction performance among different models.(a) Comparison of predicted values from different models.(b) Comparison of relative errors among different models.

Figure 8 .
Figure 8.Comparison of overlay height prediction performance among different models.(a) Comparison of predicted values from different models.(b) Comparison of relative errors among different models.

Table 2 .
Design of experiments.

Table 4 .
Data comparison between test values of test set and predicted values of LSSVR model.

Table 4 .
Data comparison between test values of test set and predicted values of LSSVR model.

Table 5 .
Comparison of actual and predicted deposition layer widths for each model test set.

Table 5 .
Comparison of actual and predicted deposition layer widths for each model test set.

Table 6 .
Comparison of actual and predicted deposition layer height for each model test set.

Table 6 .
Comparison of actual and predicted deposition layer height for each model test set.