Prediction model of surface roughness of selective laser melting formed parts based on back propagation neural network

In this article, selective laser melting (SLM) equipment is used to print 316L stainless steel parts under different process parameters, and the surface roughness of the parts is measured. Based on back propagation neural networks (BP neural networks, BPNN), the upper surface roughness prediction model is established. The laser power, scanning speed, and scanning interval are used as model input, and the surface roughness of the workpiece is output. This model can easily and quickly predict the surface roughness of SLM metal printing, with high prediction accuracy, and can provide a basis for the optimization of SLM process parameters.


F I G U R E 1 BP neural network structure
At present, the surface roughness of SLM-formed parts is basically measured directly by the roughness tester to obtain the surface roughness.This method of printing the formed parts first, and then obtaining the surface roughness, not only wastes materials, but also wastes staff operation and equipment working hours.In this study, the process parameters of SLM-formed parts are used as the input of the BP neural network, the surface roughness is the output, and a model for predicting the surface roughness of SLM-formed parts is constructed.Through the constructed prediction model, the surface roughness of the formed parts with different process parameters can be predicted without printing the formed parts.The method can not only regulate the process parameters and ensure the surface quality of the formed parts, but also save the cost, and contribute to promoting the development of laser selective melting and expanding the application scope of the neural network in the manufacturing industry.

Measurement principle
Surface roughness refers to the smaller spacing and peak-to-valley unevenness in the processed surface.The main parameters for measuring the surface roughness are: the arithmetic mean deviation of the profile (R a ), the maximum height of the profile (R y ), the 10-point height of the micro unevenness (R Z ) and so forth.
In the plane Cartesian coordinate system, a two-dimensional model of the surface contour of a part is established.A central line "m" is drawn on a certain length (L) so that the contour areas of the first and fourth quadrants are equal, rather than the middle line of a certain length L, as shown in Figure 2.
R a refers to the abscissa of the length L selected on the surface profile, and the arithmetic means obtained by selecting the sum of the absolute values of n points within the sampling length.Theoretically, the larger n is, the more reliable the deviation of the arithmetic mean is obtained.R z refers to the sum of the average of five adjacent peaks and five adjacent valleys on the part surface profile.R y refers to the difference between the highest peak and the lowest valley depth in the selected area.In this study, according to the existing experimental equipment conditions, the maximum height R y of the contour is selected as the parameter to study the surface roughness.

Experimental equipment and materials
The experimental laser melting selection equipment adopts the WXL-120 equipment independently developed by Xiamen Wuxinglong Technology Co., Ltd., as shown in Figure 3.The processing size of the equipment is 120 mm × 120 mm × 100 mm, which is mainly composed of an optical path system, laser scanning system, gas protection system, powder spreading system, forming cylinder, powder feeding cylinder, powder recovery bar, motion mechanism, and upper computer control system.Users can independently adjust equipment parameters and flexibly choose metal materials.In this experiment, 316L stainless steel spherical powder prepared by AVIC Metal Powder Metallurgy Technology (Beijing) Co., Ltd. was used as the printing material.The standard grade of 316L is 022Cr17Ni12Mo2, which mainly contains Cr, Ni, and Mo, and has excellent corrosion resistance, especially pitting resistance-, and excellent work hardening performance.The particle size range is 15-53 μm, and the median diameter (D50) is 34.57μm. Figure 4 is the shape of the 316L alloy powder.The powder is uniform and high in sphericity.It has good fluidity and is good for forming.Figure 5 is a particle size distribution curve.
In order to ensure the fluidity of the powder during the printing process, the powder was placed in a vacuum drying oven at high temperature for heating and holding for a period of time before the experiment to achieve the effect of drying.After the powder is dried, put it in the printing equipment to print.According to the previous basic experiments and the characteristics of WXL-120 equipment, combined with the research content of this article, using 80-110 W laser, 600-1200 mm/s scanning speed, 0.03-0.07mm scanning spacing, printing 48 different process parameters of 10 mm × 10 mm × 10 mm experimental piece.The selection of specific parameters is shown in Table 1.Nitrogen is used as a protective gas during the printing process, and the oxygen content is controlled below 0.24%.The scanning strategy adopts interlaced scanning, and the powder layer thickness is set to 30 μm.After printing, it will be shown in Figure 6.
FEI Quanta FEG 250 scanning electron microscope (SEM) was used to investigate the SLM-formed samples' surface topography.The 2D/3D surface topographies of the upper surfaces were examined by a NanoMap-1000 WLI profilometer to evaluate the surface quality, its measurement settings are shown in Table 2.

Experimental method
There are many measurement methods of surface roughness, such as contact measurement and noncontact measurement, and observation and comparison methods. 20Combined with the existing equipment resources for the experiment and the characteristics of the materials to be measured, this article adopts the contact measurement method.The contact measurement is generally based on the stylus measurement method.The stylus can be used to obtain the required information and calculate the roughness value.In this experiment, the Ji-Tai 0918 roughness tester was used to measure the roughness of the parts, as shown in Figure 7.The surface roughness meter can directly measure the height from the peak to the valley bottom of the surface, the required measurement area is small, the range is 0 ∼ 6500 μm, and the accuracy is 0.2 μm.
In the experiment, a total of five areas from four peripheries and the center of the upper surface of the formed part are selected, as shown in Figure 8. Use a surface roughness tester to measure the R y value of the selected

Selection of input
There are more than 100 factors that affect the quality of laser selective melting molding, but in fact, there are only a dozen factors that affect the molding effect. 21The energy density (E) is the most direct factor affecting the quality of laser-selected and melted parts.It can be seen from Equation (2) that the energy density is determined by the laser power (P), the scanning speed (V), and the scanning distance (H).
Laser power (P) is the premise of laser selective melting printing, and sufficient laser power is a necessary condition for metal powder melting.When the laser power is low, the powder obtains less energy, and the powder obtained in the molten pool cannot be completely melted, resulting in a spheroidization effect.Excessive laser power will cause excessive sintering of the printed parts.Therefore, selecting the laser power within a reasonable range can ensure that the powder is fully melted without causing over-burning, to complete high-quality printing.
The scan speed (V) is the speed at which the laser moves and it determines the time it takes for the laser to melt the powder.The low scanning speed will lead to the metal powder obtaining a high enough energy density, which will cause the local liquid vaporization of the molten pool, the bubbles will not be discharged in time, and the metallurgical pores will be formed inside the part.The high scanning speed makes the residence time in the molten pool too short, and the metal liquid solidifies without being fully wetted, resulting in a keyhole.A suitable scan speed can obtain a good metallurgical combination to meet the needs of printing quality.
The scanning spacing (H) is the distance of the light spot when the laser scans adjacent cladding tracks, which determines the overlap between adjacent cladding tracks.The scanning speed spacing is too small and the overlap is too frequent, which not only makes the energy density of the cladding track too large, but also affects the efficiency of the line.The scanning distance is too large, the overlap is too sparse, and there are pores or even incomplete overlap at the overlap of the cladding track, which reduces the surface quality.Appropriate scanning spacing can fully overlap adjacent cladding tracks, smooth the surface, and improve printing quality.
In a certain range, if the energy density is too low, the powder cannot melt completely, and the surface tension of the liquid is greater than the diffusion stress, spheroidization will occur.The spheroidization effect will affect the quality of the next powder spreading.The powder is not spread sufficiently and many pores are formed.The appearance of the cumulative effect will deteriorate the surface morphology of the formed part, resulting in poor surface quality.As shown in Figure 9A, the printed part with 110 W laser power, 600 mm/s scanning speed, and 0.03 mm scanning pitch, the value of the average surface roughness (S a ) is 53.258 μm.Sufficient energy density can spread the components of the molten pool and eliminate spheroidization.The upper and lower layers can be ideally connected to reduce the effect of cumulative effects and improve the surface quality of the formed parts.As shown in Figure 9B, the printed with 80 W laser power, 1200 mm/s scan speed, and 0.07 mm scan pitch, the sample printed with sufficient energy density has a smooth surface and clear melting channels, and the S a value of the sample is 37.819 μm.It can be seen from the 2D/3D topographies of the samples' surfaces that the surface quality can be significantly improved by adjusting the process parameters.
It can be seen that the energy density is closely related to the quality of the SLM molded part, therefore, the laser power, scanning speed, and scanning interval can be set as the input items of the surface roughness prediction model.

BP neural network construction
The effects of laser power, scanning speed, and scanning distance on the surface roughness of SLM forming parts were analyzed.The three variables of laser power, scanning speed, and scanning distance were taken as the input parameters, and the surface roughness was taken as the output.A BP neural network model with three inputs and one output was established.There are many transfer functions of the BP neural network, the input value of the log-sigmoid function can take any value, and the output value is between 0-1.The input value of the tan-sigmod type transfer function tansig can take any value, and the output value is between −1 and 1.When the transfer function uses the tansig function, the error is smaller than that of the log-sigmoid function, and the output value range is larger.Therefore, in the training, the hidden layer transfer function uses the tansig function, and the neurons in the output layer use the purelin function.Its input can take any value, and the entire output of the network can take any value.The determination of hidden layer nodes is the key to success or failure.If the number is too small, the information obtained by the network to solve the problem is too small, and the number is too large, which not only increases the training time, but also may cause the problem of transition matching, that is, the test error large, and the generalization ability decreases.The general principle is that on the basis of correctly reflecting the input-output relationship, a smaller number of hidden layer nodes should be selected Macroscopic appearances and 2D/3D topographies of samples' surfaces to make the network structure simple.In this article, a small number of nodes is set first, the network is trained, and the nodes are added after repeated attempts until the learning error is no longer significantly reduced.Finally, the hidden layer of the network is set to a single layer of 9 nodes.The network structure is shown in Figure 10.

Model prediction results and analysis
Based on the measured surface roughness data, 10 of the 48 samples were randomly selected and substituted into the model for verification to verify the reliability of the predicted results of the surface roughness of the samples.After importing the data, train the BP neural network model and provide 10 sets of verification data input samples to the BP network to obtain the predicted value of the surface roughness, as shown in Table 3.
The network prediction curve is shown in Figure 11.The graph can be seen intuitively to see that the expected surface roughness and the predicted value curve have a high degree of fitting.At the same time, take the parameters corresponding to the printed parts with the largest error, set the same printing parameters of the machine, and repeat the printing to measure the R Z .The comparison found that the change of R Z is small, indicating that the machine environment has no major impact on the printed parts.In order to verify the reliability and generalization of the model, the external data is verified.Keep two of the three input items unchanged, change one of the input items, and in turn, do six sets of parameter experiments, the specific parameters are shown in Table 4, and input samples into the BP neural network to obtain the predicted value of surface roughness.Comparing the measured sample surface roughness data, the absolute error and relative error are calculated, as shown in Table 5.The relative errors are basically less than 10%, indicating that the model has high prediction accuracy and reliable prediction results.

Study on the relationship between surface roughness and relative density
In the experiment, the relative density of 48 small squares was measured by the drainage method.First, the wet weight m 1 of the printed piece in distilled water and the weight m 0 after drying were measured.The value measured by the electronic balance model BSM220.4can be accurate to 0.1 mg, as shown in Figure 12.
According to Archimedes' principle, the relative density  of the molded part is calculated, as shown in Equation ( 3),  1 is the standard atmospheric pressure distilled water density of 1 g∕cm 3 ,  0 is the standard density of 316L stainless steel, and the experiment takes 7.98 g∕cm 3 .F I G U R E 12 BSM220.4electronic balance The relative density and roughness of 48 groups of blocks were calculated and measured as shown in Table 6 below.
When the relative density reaches the maximum of 96.811%, the surface roughness under the corresponding parameters is 219.3 μm, which is not the minimum.When the surface roughness reaches a minimum of 77, the relative density under the corresponding parameters is 82.496%, which is not the maximum.Comprehensive data analysis shows that there is no direct relationship between relative density and surface roughness.

CONCLUSION
In this article, based on the diagnosis idea of the neural network, the surface roughness prediction model of SLM printed parts was established with laser power, scan speed, and scan spacing as input and surface roughness as output.The surface roughness is measured and calculated by sandblasting roughness meter.By comparing the predicted roughness values of neural network samples, the average error is calculated to be 7.20%.Meanwhile, the external data of the model are verified, and the predicted error of the model is calculated to be within 11%, which verifies the accuracy, feasibility, and generalization of the prediction model.It is verified that there is no direct relationship between surface roughness and relative density in this group of test pieces.The prediction model established in this article can predict the surface roughness of SLM forming parts with different process parameters without printing the forming parts.This method can not only control the process parameters, and ensure the surface quality of the molded parts, but also save the and provide technical references for improving the surface quality of printed products.There are many factors affecting the surface roughness of SLM-forming parts.To improve the prediction model, it is necessary to introduce more factor variables (such as powder layer thickness) as input to expand the prediction range of the model, and improving the prediction accuracy of model surface roughness is a new challenge.

F
I G U R E 4 316L powder form F I G U R E 5 Particle size distribution curve

F I G U R E 6 7 F I G U R E 8
Test pieces TA B L E 2 Measurement settings for the NanoMap-1000 WLI profilometer Measured area Surface roughness tester Part surface measurement area area and take the average, as shown in Equation (1), which is the value of the upper surface roughness of each formed part.