1. Introduction
Laser cleaning technology is a revolution in the cleaning industry [
1]. Laser cleaning can make use of the advantages of high energy density, high precision, and efficient conduction of lasers [
2,
3] to remove the excess attached materials on a metal surface. Compared with the traditional cleaning technology, it has apparent strength in its cleaning effect and accuracy for a typical workpiece and can effectively avoid chemical contamination, which means it is marked as an environmentally friendly cleaning technology [
4,
5]. So far, laser cleaning technology has been able to stably and effectively clean the surface of various regular substrates, and the materials that can be cleaned include but are not limited to metals, alloys, glass, and various composites [
6,
7]. The application scope of this technology has been gradually expanding to various fields such as industry, military industry, shipbuilding, aviation, and aerospace [
8,
9,
10] in recent years.
Many scholars have made some in-depth research on the mechanism, effect evaluation, effect improvement, and cleanable materials’ expansion of laser cleaning [
11,
12]. Laser cleaning analysis methods based on optical properties emerge endlessly [
13,
14], such as using spectral analysis to detect the level of laser cleaning online [
15,
16] or employing digital holography to analyze the impact of laser cleaning on substrate materials [
17]. As one of the investigated indexes of laser-cleaning-effect evaluation, surface roughness refers to the small spacing and micro peak–valley unevenness in the workpiece surface, which is closely related to the matching property, wear resistance, fatigue strength, contact stiffness, and vibration and noise of parts. It has an important impact on the service life and reliability of workpieces [
18]. The modern precision machining industry has continuously improved the requirements for surface machining quality of workpieces, mainly because the quality of surface machining will not only affect the service life of products but also influence the performance of products. Therefore, the evaluation of laser cleaning surface-processing quality has an important value for the cleaning industry.
Regarding the estimation of surface roughness after laser cleaning, the traditional contact-measurement method is not suitable for the high-efficiency automation industry because it has low measurement efficiency and easily damages the workpiece surface. For example, the stylus-measurement method is the most commonly used roughness contact-measurement method at present, which uses a stylus to scan the contoured surface of the workpiece and record the roughness-related undulation information [
19]. However, its measurement accuracy is limited by the radius of stylus, and it cannot completely avoid scratching the workpiece surface. On the other hand, the stylus has high environmental requirements, inconvenient operation, low measurement efficiency, and cannot be used for online measurement. The imaging analysis-based surface roughness analysis technology has become a hot spot in recent years [
20,
21]. Many scholars have done research works on roughness measurement [
22]. For example, the authors in [
23] introduced four gray level co-occurrence matrix (GLCM) statistical indicators to analyze the influence of GLCM parameter selection on the measurement results of four indicators; the GLCM distribution map was used to determine the surface roughness grade. The authors in [
24] extracted a series of GLCM-based indicators as the input of a support vector machine (SVM) and constructed a GLCM-SVM model to measure surface roughness. The methods above are effective for their applications; however, the artificially designed image features are difficult and the quality of feature extraction directly affects the performance of the roughness-prediction model; as a result, it is still necessary to research the image-feature analysis-based laser-cleaning-effect evaluation method.
In our previous research work, we successfully built an experimental system for a Q235 carbon steel workpiece cleaning with a Cartesian robot as a core, supplemented by a visible-light camera and a fiber laser for image acquisition and laser cleaning [
25]. In our experimental system, the Cartesian robot was equipped with the same motor in the
x-axis and
y-axis degrees of freedom to ensure that it had the same moving speed in two moving directions. Due to the limitation of the size space, the visible-light camera and fiber laser could only be placed alternately in the Cartesian robot. After the workpiece to be cleaned was placed under the Cartesian robot, the visible-light camera collected the workpiece image along the specific working path. Then, the fiber laser was used to replace the visible-light camera, and the actual laser cleaning process could be carried out by adjusting the range of laser parameters such as the laser frequency, single pulse energy, etc.
In addition, the laser parameters were also combined with the abstract features of a two-dimensional image to realize the intelligent control of the laser-cleaning-process parameters by using the machine-learning method. By accumulating a large number of laser parameters and pictures before and after laser cleaning, and using the image characteristics and laser parameters before laser cleaning, we successfully established a machine- learning-based laser-cleaning effect-level prediction model. Before substantial laser cleaning of the workpiece, the undetermined laser parameters were randomly generated and inputted into the model together with the image features extracted from the surface of the workpiece. The laser parameters to be determined were continuously updated and iterated until the laser-cleaning-effect output by the model was qualified. Finally, the laser parameters at this time were used to clean the workpiece, which was the so-called optimal laser cleaning process.
Besides, we also classified the metal-corrosion degrees, as shown in
Table 1, which were often used in many Chinese factories. For the precise surface roughness estimation after laser cleaning, it is meaningful only when the workpiece is covered by the oxide layer and almost no, or only small, corrosion blocks (the workpiece corrosion degree is A or B) can be found, which can be called the optimal laser cleaning. In the case of poor laser cleaning, it is unrealistic to accurately predict the surface roughness because a large number of residual corrosions are distributed on the workpiece surface. Clearly, our previous work on surface roughness estimation has some shortcomings. For example, we only use the traditional image-texture feature despite the depth feature, and the performance of our final roughness-estimation model after laser cleaning can still be improved.
In this paper, a new estimation method of workpiece surface roughness after laser cleaning is proposed for Q235 carbon steel [
26]. The combination of machine learning and image processing is used to estimate the workpiece surface roughness. First, two-dimensional images of the cleaned workpiece surface are collected by the visible-light camera. Then, the Tamura coarseness feature [
27], Alexnet [
28] abstract depth feature, single blind/referenceless image spatial quality evaluator (BRISQUE) [
29,
30] feature, and a novel enhanced gray level co-occurrence matrix (EGLCM) feature are extracted. Finally, support vector regression (SVR) [
31,
32] is used to fit the surface roughness, and the improved particle swarm optimization (IPSO) algorithm is developed to optimize the training process parameters of SVR [
33,
34]. This method has a high degree of computational accuracy through our experiments. The main contributions of this paper are: (1) The new feature extraction and combination method of images after laser cleaning are developed. The combination of the traditional image features, new EGLCM, and emerging convolution neural network abstract feature is designed. (2) An IPSO-SVR algorithm is proposed. The PSO algorithm with adaptive weight change is integrated into the training process of SVR to optimize the parameters. (3) Both the new image features and the IPSO-SVR are used for the imaging surface roughness estimation of images after laser cleaning.
In the following sections, first, the proposed surface roughness estimation method is presented. Then, the corresponding experimental results are given. Finally, conclusions and future works are presented.
2. Methods
2.1. Proposed Flowchart
Figure 1 shows the main process of workpiece surface roughness estimation after laser cleaning. Firstly, the 2D gray images of workpiece after laser cleaning are accumulated, and the three-dimensional morphology of workpiece surface and its actual roughness are measured through the white-light interferometer. The white-light interferometer is specially used for non-contact measurement of surface roughness, micro shape contour, and size, which is one of the instruments with the highest measurement accuracy in the field of 3D measurement. Therefore, the white-light interferometer is used to capture the true surface roughness value of workpiece after laser cleaning. A large number of workpiece images and the corresponding real values of roughness can be collected. The corresponding 2D gray image and 3D topography are shown in
Figure 2. Then, a variety of image features are extracted from the collected images, including the Tamura coarseness feature, Alexnet abstract depth feature, single BRISQUE feature, and EGLCM feature. Finally, the IPSO-SVR is trained by using the combination of extracted features above. The IPSO algorithm is added to optimize the parameters in the training process of SVR model, and SVR model is established to predict the surface roughness of workpiece after laser cleaning.
2.2. Design of EGLCM
The GLCM is commonly used to describe the texture related information between image pixels, which can represent the overall texture information of image by calculating the gray similarity between different pixels in a specific distance and direction. Regarding the GLCM, it has a large amount of data, which is not conducive to the extraction of image features; therefore, authors in [
35] defined the statistical data such as moment of contrast (
Con), correlation (
Cor), energy (
En), and entropy (
Ent) to summarize the characteristic information in GLCM. The relevant calculation methods are shown in Equations (1)–(4) [
36].
where
P(
i,
j) is the element value at the coordinates (
i,
j) in the GLCM;
k is the gray level of image;
;
;
;
;
.
In this paper, we improve the traditional gray co-occurrence matrix, modify the calculation method of gray co-occurrence matrix in 45° and 135° directions, and add 4 gray co-occurrence matrices in 22.5°, 67.5°, 112.5°, and 157.5° in the original 4 directions (0°, 45°, 90°, and 135°). Four statistics of Con, Cor, En, and Ent can be obtained by calculating the GLCM, and the final EGLCM features will be captured by vectorization. Specific improvements and calculation methods are shown below.
First, a new pixel point for co-occurrence matrix computation is proposed. The traditional GLCM has problems in calculating the co-occurrence matrix of 45° and 135°. When the offset distance is
d, the selected matching pixel distance is actually
, and the pixel pairs for final matching calculation are (
A0,
A4) as shown in
Figure 3. However, this may cause the error of matching pixels to accumulate with the increase in offset distance. In this paper, the pixel point matching
A0 is changed to a pseudo pixel
B0, with an actual distance of
d in the 45° direction.
As
Figure 3 shown, the coordinate of pixel point
A0 is (
x,
y), and the coordinate of pseudo pixel point
B0 is (
x +
d ×
cos 45°,
y +
d ×
sin 45°). However, this pixel point
B0 does not exist in image, so the gray value of this pseudo-pixel point is determined by the gray value of adjacent
A3 and
A4 pixel points, where the coordinates of
A3 and
A4 are (
floor(
x +
d ×
cos 45°),
floor(
y +
d ×
sin 45°)) and (
floor(
x +
d ×
cos 45°) + 1, and
floor(
y +
d ×
sin 45°) + 1). The gray value of the final pseudo pixel
B0 is shown in Equation (5). The definition of gray co-occurrence matrix in 135° direction is the same as that in 45° direction.
where
I(
B0),
I(
A3), and
I(
A4) are the gray values of pseudo pixel point
B0, pixel point
A3, and pixel point
A4, respectively;
floor() means round down;
are the distances between pixel points
A3 and
B0 and
A4 and
B0, respectively.
Second, new computational directions of GLCM are developed. The traditional GLCM only calculates the co-occurrence matrices in four directions: 0°, 45°, 90°, and 135°. This paper added the co-occurrence matrix in four directions: 22.5°, 67.5°, 112.5°, and 157.5°.
Assuming that the offset distance is
d, and the angle is 22.5° (the offset angle is calculated in y-axis), the coordinates of pixel point
B0 to be matched are (
x +
d ×
sin 22.5°,
y +
d ×
cos 22.5°), if the coordinates of initial pixel point
A0 is (
x,
y). Although the pixel point
B0 does not exist in image, it must locate in a square area with
P0,
P1,
P2, and
P3 as vertices in
Figure 4, where the coordinates of the pixel points
P0,
P1,
P2, and
P3 are (
floor(
x +
d ×
sin 22.5°),
floor(
y +
d ×
cos 22.5°)), (
floor(
x +
d ×
sin 22.5°),
floor(
y +
d ×
cos 22.5°) + 1), (
floor(
x +
d ×
sin 22.5°) + 1,
floor(
y +
d ×
cos 22.5°) + 1), and (
floor(
x +
d ×
sin 22.5°) + 1,
floor(
y +
d ×
cos 22.5°)). The gray value of the final pseudo pixel
B0 is shown in Equations (6) and (7):
where
I(
P0),
I(
P1),
I(
P2), and
I(
P3) are the gray values of pixel points
P0,
P1,
P2, and
P3, respectively;
di represents the reciprocal of distance between the pixel point
Pi (
i = 0, 1, 2, 3) and the pseudo pixel point
B0.
Finally, we repeat the above enhancement method, then the GLCM in 8 directions of 0°, 22.5°, 45°, 67.5°, 90°, 112.5°, 135°, and 157.5° can be calculated for any given image. Four statistics values of
En,
Con,
Cor, and
Ent can be calculated and vectorized by using the obtained co-occurrence matrix in eight directions. The vectors in all directions are added with the way shown in
Figure 5, and the final module
En_sum,
Con_sum,
Cor_sum, and
Ent_sum are taken as the enhanced GLCM feature, i.e., EGLCM. The corresponding calculation method is shown in Equations (8)–(11).
where
,
,
, and
(
i = 0, 1, 2, …, 7) represent
En,
Con,
Cor, and
Ent vectors of 0° to 157.5°, respectively.
2.3. Surface Roughness Estimation Using IPSO-SVR
The generalization and fitting abilities of SVR to small sample data are in a leading position among common machine-learning methods, and the unique kernel-function mapping mechanism is sufficient to solve most complex nonlinear problems. In this paper, we use SVR to estimate the workpiece surface roughness after laser cleaning with radical basis function (RBF). The input features of SVR are the Tamura coarseness feature, Alexnet abstract depth feature, single BRSQUE feature, and our proposed EGLCM feature. The dimensions of related features are shown in
Table 2.
The Tamura coarseness feature mainly calculates the difference between the horizontal and vertical average gray values under different window sizes to determine the best value of window size as the coarseness. It can better describe the texture information of image with deep texture. The single BRSQUE feature uses the original size space to calculate BRISQUE feature and discard feature calculation under 0.5 times sampling space. The original BRISQUE features have 36 dimensions; however, we only count first 18 dimensions as the single BRISQUE feature because the texture information is no longer clear for the collected workpiece surface image under 0.5 times sampling space. In addition, the original BRISQUE features with 36 dimensions leads to complex feature combinations, which is prone to create the over fitting problem for SVR model. For the Alexnet abstract-depth feature, we input the collected images into the pre-trained Alexnet, extract the output feature maps by the 1st, 2nd, and 5th convolutional layers, and obtain 3-dimensional Alexnet abstract-depth feature through the fast principal components analysis (PCA) [
37] processing as
Figure 6 shown. The transfer learning mechanism is used for image feature extraction to reduce the difficulty of artificially designing features, and it is completely handed over to the convolutional network for automatic extraction. For the EGLCM feature, we calculate
En_sum,
Con_sum,
Cor_sum, and
Ent_sum at three offset distances (offset = 3, 6, and 9).
SVR has stronger generalization ability compared with traditional polynomial fitting regression, but its selection of parameters
c and
g will directly affect the effect of SVR fitting regression. Common parameter optimization methods such as manual parameter tuning are time-consuming and laborious; in addition, it is difficult to reach the global optimal value. In this paper, we adopt an IPSO algorithm to estimate the parameters above and realize automatic parameter setting in SVR training process. The traditional PSO algorithm is derived from the imitation of bird foraging behavior [
38], and the core velocity and position update formula are shown in Equations (12) and (13).
where
vid and
xid represent the velocity and position of particle, respectively;
pid and
pgd are the best individual extremum of particle and the best extremum of global field, respectively;
w,
c1, and
c2 are speed factor, local learning factor, and global learning factor, respectively. The value of
w,
c1, and
c2 are 0.8, 1.4, and 1.4, respectively.
The traditional PSO algorithm has low convergence accuracy and is easy to fall into local extreme values [
39]. In this paper, we propose a dynamic nonlinear adaptive adjustment strategy for learning factors that are shown in Equations (14) and (15). Through this improved strategy, in the early stage of particle iteration, the global search factor
c2 increases and the local search factor
c1 decreases, so as to enhance the global optimization ability of algorithm. In the subsequent stage of particle iteration, the global search factor
c2 decreases, while the local search factor
c1 increases to enhance the local optimization ability of algorithm. Therefore, the basic steps of using IPSO to optimize SVR training parameters
c and
g are as follows, and the corresponding flow chart is shown in
Figure 7.
where
f is the fitness value of particle at each iteration;
fmean and
fmin are the average and minimum fitness values of all particles in whole particle swarm;
t is the current number of particle iterations;
maxiter is the maximum number of particle iterations; and
temp is the learning factor constant, whose value is 1.4 equal to the learning factors in formal PSO.
Step 1: Particle swarm is initialized. The number of particle swarm (
popsize), maximum number of iterations (
maxiter), and optimization range of
c and
g are set (
Table 3).
Step 2: Fitness value of each particle position is calculated.
Step 3: Individual extremum and global extremum of particles due to the fitness value changes are updated.
Step 4: Particle position and velocity according to Equations (12)–(15) are updated.
Step 5: The maximum number of iterations is checked. If the conditions are met, the process ends, and the optimal parameters c and g are outputted; otherwise, the process proceeds to step 2.
4. Discussion
Laser cleaning technology actually uses the characteristics of a high-energy laser to complete cleaning and corrosion removal. The high-energy laser beam irradiates the workpiece surface, so that the corrosion on the surface absorbs the laser energy and heats up rapidly, which then produces a series of complex chemical and physical effects such as combustion and gasification, thermal shock and thermal vibration, acoustic vibration and fragmentation, and finally the corrosion is separated from the workpiece substrate to complete the laser cleaning [
41,
42]. Clearly, the workpiece surface roughness will change during the process above. For the workpiece surface with a laser-ablation effect, it can be regarded as the result of the joint action of the laser and workpiece materials, which meets the two-temperature model (TTM) [
43], as Equation (19) shows. The TTM theory holds that: in the process of femtosecond laser–material interaction, free electrons first absorb the laser energy, and then through electron–phonon coupling, the electrons transfer energy to the lattice, and the lattice temperature increases into a plasma and emanates from the material in an explosion-like form [
44]. TTM has been extensively applied or modified for simulating a single ultrashort laser-pulse ablation [
45,
46]. Obviously, laser ablation is full of the process of laser cleaning, so we use Equation (19) to describe the process.
where
Ce is the electron specific heat capacity;
Te is the electron temperature;
t is the action time of laser source;
ke is the electronic thermal conductivity;
x is the distance in the direction of light transmission;
G is the electron–phonon-coupling coefficient;
Tl is the lattice temperature;
S(x, t) is the energy of the laser emitted by the laser;
Cl is the lattice specific-heat capacity; and
kl is the lattice thermal conductivity.
In this paper, we adopt surface roughness as a measure to assess the effect of the laser cleaning process. Clearly, the surface roughness is related to the materials themselves and the laser parameters from Equation (19). Common laser parameters include laser frequency, laser linear velocity, laser single-pulse energy, etc. Different laser parameters will affect the surface roughness of the workpiece after cleaning [
47]. Regarding the process of the laser cleaning of the workpiece, the laser is the only energy input. Under the impact of high-energy laser pulses, the corrosion attached to the workpiece surface will be heated up, according to Equation (19), until they fall off, which will result in the changes of workpiece surface roughness. With the assistance of image feature extraction, the properties of the workpiece materials themselves and laser parameters can be reflected, i.e., two operations can roughly reflect the interaction process between laser and materials during laser cleaning.
The relationship between the typical laser parameters and the image quality of workpiece after laser cleaning is evaluated in this paper. In this experiment, the laser parameters we adopt are as follows: the linear velocity is 1000.0 mm/s and the laser frequency is 20.0 KHz. We control the laser single-pulse energy from 2.0 mJ to 9.0 mJ to clean the workpiece and use the BRISQUE model to evaluate the quality of cleaned image. For the BRISQUE model, it can reflect well the changes of image texture or spatial structure. At the same time, the BRISQUE score we calculated is based on statistical form, which is obtained by calculating the mean value of multiple experimental pictures under the same experimental conditions. The relevant results are shown in
Figure 9. For the BRISQUE model, the higher the score is, the worse the image quality. From
Figure 9, when the laser single pulse energy is less than 4.0 mJ, corrosion on the workpiece surface cannot absorb enough energy to escape, which leads to poor image quality and difficulty for precise roughness estimation. When the laser single-pulse energy is large than 4.0 mJ, laser cleaning efficiency is the highest, and the corrosion attached to the surface is almost completely removed. Therefore, the quality of the collected image maintains a relatively excellent level for the subsequent accurate estimation of roughness. However, the laser single pulse energy should not be too high. When the laser single-pulse is 9.0 mJ, the oxide layer covering the workpiece is damaged, and the image quality is worse than before, which will result in the bad performance of the surface roughness estimation model. Based on a large number of cleaning experiments, it is shown that when the laser single-pulse energy is between 4.0 mJ and 8.0 mJ, the workpieces after laser cleaning can reach the corrosion degree A or B, and the cleaning results are satisfactory, which can be regarded as the ideal single-pulse energy. Clearly, the higher the degree of corrosion, the higher the laser energy to completely remove the corrosion. In addition, we believe that the cleaning effect may be better when the laser single-pulse energy is 8.0 mJ. From the laser cleaning process, it is not difficult to see that for the workpiece surface with the same degree of corrosion, on the premise of not damaging the workpiece base material, the laser with higher energy has a stronger cleaning ability for the corrosion attached to the workpiece surface, and the residual corrosion area is also less.
In order to further verify the effectiveness of IPSO algorithm proposed in this paper, we further supplement the comparative experiments of the SVR models based on genetic algorithm-SVR (GA-SVR) and grid search algorithm-SVR (G-SVR). The experimental conditions of the two methods are the same as those of the previous IPSO-SVR model (see
Section 2.3), and the relevant results are shown in
Table 16 and
Table 17. As shown in
Table 15,
Table 16 and
Table 17, under the same training parameters to be optimized, when the kernel function is RBF, the accuracy of the IPSO algorithm is higher than those of grid search algorithm and genetic algorithm with the same feature combination, in most cases. Besides, the highest accuracy of the IPSO algorithm is 92.0%, which is higher than the 90.0% accuracy of the genetic algorithm and the 84.0% accuracy of the grid search algorithm. As a result, the IPSO algorithm proposed in this paper is much better than the traditional grid search algorithm and genetic algorithm in optimizing SVR based on RBF kernel function. The strategy of asynchronous change of the global learning factor and the local learning factor enhances the global and local search capabilities of IPSO, and it is easier to jump out of the local extreme value to reach the global optimal solution. Although the IPSO also has poor performance for the sigmoid kernel function, the SVR training model based on RBF kernel function is sufficient to solve most problems in actual applications, which will not affect the efficiency of IPSO. Besides, the IPSO algorithm takes longer to optimize the training parameters than the two traditional methods.
In this paper, we propose a method to estimate the roughness of the workpiece surface after laser cleaning, so we also compare other surface roughness estimation methods for laser cleaning application. The authors in [
24] extracted a series of GLCM-based indicators as the input of SVM and constructed a GLCM-SVM model to measure surface roughness using the RBF kernel function (Method 1). Besides, the authors in [
48] analyzed the relationship between the homogeneity and contrast parameters of GLCM and surface roughness, and a roughness regression model was constructed by the polynomial fitting (Method 2). In addition, we also used the Tamura coarseness, GLCM, and concavo-convex region features to construct the SVR roughness-estimation model in our previous work [
25] (Method 3). Therefore, we conduct a comparative experiment under the same experimental conditions as
Section 3.3, and the corresponding experimental results are shown in
Table 18. For Method 1 and Method 3, we also adopt different kernel functions to train the surface roughness estimation model. From
Table 18, our method using RBF kernel function has the best accuracy, which is 92.0% and higher than the 82.0% accuracy of Method 1, the 56.0% accuracy of Method 2, and the 76.0% accuracy of Method 3.
Our method proposed in this paper has at least three advantages. First, it has a high degree of automation compared with traditional contact measurement for surface roughness assessment, which can prevent the workpiece from being damaged. Second, the robustness of the EGLCM feature is better than the traditional GLCM feature. With the assistance of various features, the effect of the surface roughness estimation model is stable, and the accuracy of the final model can reach 92.0% through lots of experiments. Third, the IPSO algorithm enhances the ability of parameter optimization in machine learning training, and it can confirm the best training parameters automatically without random commissioning. Obviously, our method also has some shortcomings. For example, the time cost of parameter optimization using the IPSO algorithm is longer than the genetic algorithm and grid search algorithm, which can be improved in our future work.