Next Article in Journal
Brain-Inspired Navigation Model Based on the Distribution of Polarized Sky-Light
Next Article in Special Issue
Process Simulation and Optimization of Arc Welding Robot Workstation Based on Digital Twin
Previous Article in Journal
A Control Strategy of LCL-Type Grid-Connected Inverters for Improving the Stability and Harmonic Suppression Capability
Previous Article in Special Issue
Decision Support Method for Dynamic Production Planning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A GAN-BPNN-Based Surface Roughness Measurement Method for Robotic Grinding

Department of State Key Laboratory of Robotics and System, Harbin Institute of Technology, Harbin 150001, China
*
Author to whom correspondence should be addressed.
Machines 2022, 10(11), 1026; https://doi.org/10.3390/machines10111026
Submission received: 21 September 2022 / Revised: 28 October 2022 / Accepted: 31 October 2022 / Published: 4 November 2022
(This article belongs to the Special Issue Industrial Process Improvement by Automation and Robotics)

Abstract

:
Existing machine vision-based roughness measurement methods cannot accurately measure the roughness of free-form surfaces (with large curvature variations). To overcome this problem, this paper proposes a roughness measurement method based on a generative adversarial network (GAN) and a BP neural network. Firstly, this method takes images and curvature of free-form surfaces as training samples. Then, GAN is trained for roughness measurement through each game between generator and discriminant network by using real samples and pseudosamples (from generator). Finally, the BP neural network maps the image discriminant value of GAN and radius of curvature into roughness value (Ra). Our proposed method automatically learns the features in the image by GAN, omitting the independent feature extraction step, and improves the measurement accuracy by BP neural network. The experiments show that the accuracy of the proposed roughness measurement method can measure free-form surfaces with a minimum roughness of 0.2 μm, and measurement results have a margin of 10%.

1. Introduction

Grinding is a widespread but essential process in manufacturing products. It is widely used in aerospace, automobile manufacturing, rail transit and other industries [1]. Traditionally, grinding is done by manual operation or multi-axis CNC machine tools. The former is time-consuming and labor-intensive, while the latter is limited by operating space. Recently, robotic belt grinding has become an alternative due to its low cost, efficiency and large operating space [2]. For small workpiece, the robot generally uses appropriate contact force to ensure the stability of the workpiece [3]. The robot holds the workpiece to complete the grinding operation and uses its dexterity to move to the best inspection position on the surface of the workpiece [4]. Multiple sampling points are planned according to the curvature of the workpiece surface, and the robot moves to each sampling point in turn to complete the surface image sampling.
As an important indicator of the quality of machined surfaces, surface roughness has a significant impact on product life and reliability [5]. The traditional probe-based measurement method [6,7,8,9] uses a probe that slides over the surface of the workpiece for measurement. This method has been proven to be highly reliable and highly accurate. However, it has several limitations, such as long measurement times, high environmental requirements and complex steps.
With the development of optical technology, a variety of noncontact measurement methods has been developed to address the limitations of the contact measurement method. For example, optical microscopy, confocal laser scanning microscopy and white light interferometry are used to measure surface roughness, but these methods are mainly used in laboratories, because their high cost and complicated operation are not suitable for real industrial production. Currently, the most popular noncontact measurement method is based on machine vision for roughness measurements of the machined workpiece surface [10,11,12,13,14,15]; this is widely used because of its advantages, which include unrestricted size of the measured object, low cost, high speed, and easy factory automation deployment.
Usually, vision-based measurement methods can be divided into four stages: image acquisition, image processing, feature extraction and prediction strategy [16]. Most vision-based methods for surface roughness assessments rely on feature extraction. Suganandha et al. [17] used a single-point laser to irradiate the surface of an object and analyzed the gray-level covariance matrix (GLCM) features of the scatter pattern, such as contrast, correlation, energy, entropy homogeneity and maximum probability, in order to investigate the correlation between 3D surface roughness and scatter images. Shanta et al. [18] obtained roughness measures by using a singular value decomposition method to analyze contrast, as well as light and dark pixels of binarized scatter patterns. Samie et al. [19] proposed a method to transform the image of a surface into an unweighted and undirected network graph. The graph-theoretic invariants and Fiedler number were estimated for use as discriminative factors for the surface roughness of the workpiece, avoiding the filtering and segmentation of complex images. Liu et al. [20] proposed an improved method based on microscopic vision to detect the surface roughness of R surfaces in valves. The method analyzed the surface morphology images of R surfaces by the gray-level covariance matrix (GLCM) method and used a support vector machine (SVM) model to describe the relationship between GLCM features and the actual surface roughness. Huaian et al. [21] used a specific of color light source to illuminate the surface and measured the surface roughness of the object based on the color distribution statistical matrix for features such as texture in the image.
Vision-based surface roughness assessment methods have been proven to be reliable and accurate, but there are still some limitations, especially in the feature extraction process. Visual assessment methods that rely on feature extraction are difficult to reapply to different datasets. Feature extraction is a highly intensive process that requires a high degree of computation and expert decision making in selecting the appropriate surface features. As a result, the process can lead to long processing times, which are not conducive to the rapid diffusion of the technique.
Some researchers had accomplished roughness measurement by using intelligent algorithms for the self-learning of image features. For example, Du-Ming [22] used the two-dimensional Fourier transform to extract quantitative measures of surface roughness in the spatial frequency domain. The roughness features were used as input to build an artificial neural network to determine the surface roughness. Gürcan [23] converted the surface image into a binary image as input data. The log-sigmoid function was chosen as the transfer function and the neural network model was trained using the scaled conjugate gradient algorithm. Kaixuan et al. [24] proposed a roughness classification method. The method expanded and preprocessed the images, and then trained an AlexNet-based surface roughness classification model for milled samples.
Jamal et al. [25] proposed that a convolutional neural network (CNN) is used as a regressor in order to obtain steel surface roughness, and that a CNN based on spatial pooling pyramid is applied for roughness classification. Achmad et al. [26] proposed a deep learning model containing convolutional layer, ReLU, pooling layer and two FC layers to automatically learn image features using a gradient descent method to optimize hyperparameters in the model.
GAN is an emerging self-supervised learning technique that provides a method to learn deep representations without the use of extensively labeled training data [27,28].
In this paper, we design a surface roughness prediction model based on GAN + BP neural network. Firstly, we consider the difference in surface images with different curvatures and use the images and curvatures as training samples. Then, the GAN network performs model training in such a way that the generative network and the discriminative network play with each other to automatically learn the features in the images, omitting the feature extraction step. Finally, the BP neural network represents the correlation between the GAN discriminant value and the roughness (Ra).

2. Generative Adversarial Network

A GAN consists of two parts: the generative and discriminative networks, which use an adversarial game between generators and discriminators to achieve self-supervised learning. The main difference from the traditional network model is that the data training process contains both consistent and adversarial data. The generators and discriminators each optimize in different directions and form a competitive relationship with each other, but they also depend on each other to form a unified whole. In the adversarial training mode, the generator no longer learns directly from the training dataset, but learns iteratively in an indirect way through the optimization directions output by the discriminator, generating pseudosamples to mix the spurious with the genuine. A GAN computes faster and has greater expansion flexibility than a traditional network. In this paper, we propose using a GAN to discriminate the roughness of the surface of workpieces using the structure shown in Figure 1.
p z ( z ) represented a prior on input noise variables, G ( z ) was generator of GAN, and D ( x ) represented the probability that x comes from real images. GAN’s goal is training D ( x ) to maximize the probability of assigning the correct label to both training real samples and pseudosamples from G ( z ) , at the same time training G ( z ) to minimize log ( 1 D ( G ( z ) ) ) . In other words, the loss function of GAN is as follows:
min G   max D V ( D , G ) = Ε x ~ p d a t a ( x ) [ log D ( x ) ] + Ε z ~ p z ( z ) [ log ( 1 D ( G ( z ) ) ) ]
The disadvantages of GAN:
(1) GAN training is unstable, and the training degree of generator and discriminator should be carefully balanced.
(2) When the generator learns that some features of the real data successfully deceive the discriminator, it will not update. As a result, the generated samples lack diversity, and a collapse mode occurs in GAN.
(3) When the overlap between the real and generated distributions is negligible, the JS divergence between the real and generated distributions is minimized to a constant log2. When the discriminator is optimal, the loss of the minimized generator is also closer to log2, and G is no longer updated, resulting in the disappearance of the generator gradient.
In order to overcome the above shortcomings, the generator and discriminator network structures of the original GAN network are redesigned. In this paper, a deep convolutional neural network is used as the network structure of the generator and discriminator:
The structure of the generative network is shown in Figure 2, and the corresponding discriminator network structure is shown in Figure 3.
From Equation (1), it can be seen that the objective of the discriminator is to obtain the maximum value of V ( G , D ) . Then, it is necessary to maximize D ( x ) , which means maximizing the probability that real samples and generated samples will be assigned the correct label. At the same time, the generator G is trained to minimize log ( 1 D ( G ( z ) ) ) , which means minimizing the difference between the generated samples and the true samples.
Therefore, the value function of GAN can be decomposed into two optimization problems:
(1) Fix the generator G , train the discriminator D , so that it can maximize the correct determination of whether the sample is from the real sample or from the sample generated by G . The objective function of D is,
max D V ( D , G ) = E x ~ p d a t a [ log D ( x ) ] + E x ~ p g [ log ( 1 D ( x ) ) ]
Finding the derivative of Equation (2) with respect to D ( x ) , such that its derivative 0 gives,
P d a t a ( x ) D ( x ) P g ( x ) 1 D ( x ) = 0
Rewriting Equation (3), the optimal discriminator is obtained as follows:
D ( x ) = P d a t a ( x ) P d a t a ( x ) + P g ( x )
(2) Fix the discriminator D and train the generator G , such that L = max D V ( D , G ) minimizes the difference between the generated samples and the real samples. The objective function of G is given by,
min G L = E x ~ p d a t a [ log D ( x ) ] + E x ~ p g [ log ( 1 D ( x ) ) ]
Substituting Equation (4) into Equations (2) and (5), we obtain,
min G L = E x ~ p d a t a [ log P d a t a ( x ) P d a t a ( x ) + P g ( x ) ] + E x ~ p g [ log ( P g ( x ) P d a t a ( x ) + P g ( x ) ) ]
Introducing two important similarity metrics KL divergence (Kullback–Leibler divergence) and JS divergence (Jensen–Shannon divergence), Equation (6) is rewritten as,
min G L = K L ( P d a t a P d a t a + P g 2 ) + K L ( P z P d a t a + P g 2 ) 2 · log 2 = 2 · J S D ( P d a t a P g ) 2 · log 2
From Equation (7), it can be seen that fixing the discriminator, the goal of training the generator is to have a JS dispersion of 0 between P g and P d a t a , i.e., P g = P d a t a . At this point, the discriminator D ( G ) = 1 2 . Thus, the equilibrium between generator and discriminator is realized by reciprocally training the GAN.

3. Measurement of Surface Roughness of Workpieces

In this method, a neural network is used to discriminate the surface roughness of a grinded workpiece. A small number of data images are used to train a generative adversarial network (GAN) to generate the required large dataset for training the discriminative network, which outputs the surface roughness measurements of the workpiece.

3.1. Image Acquisition and Data Preprocessing Methods Subsection

The radius of the curvature and roughness of the workpiece surface directly determine the refractive index of light, a factor which affects the imaging effect of the workpiece surface.
Therefore, 72 images of workpieces with different curvature radii and roughness were collected in this study. The 12 images with the roughest and smoothest surfaces were selected as the original training dataset for the GAN generator, with 6 smooth and 6 rough images, as shown in Figure 4. However, the amount of data in the original dataset of 12 images was too small to be used directly for training the GAN discriminator, which would lead to severe overfitting of the discriminator. Therefore, the original images were first rotated and panned to generate a sufficient number of derived images (32,000 images were generated in the experiment).

3.2. GAN-Based Surface Roughness Discrimination Method

The generative network attempts to create images that the discriminant network cannot distinguish from real images during the training process, while the discriminant network is equivalent to a binary classification network to distinguish between the real training images and the images created by the generator. In this way, the model parameters are continuously optimized by the adversarial training between the two networks. Over multiple iterations, the images created by the generative network become closer to the real images, and the discriminant network increasingly understands the meaning of the roughness represented by the images, and finally gives the roughness value.
The process of training the GAN is shown in Figure 5.
Step 1: The original datasets (surface roughness images) are classified in a binary fashion and labeled as “smooth” and “rough” according to a certain threshold.
Step 2: Real surface roughness images marked by the classification in step 1 are rotated and panned to expand datasets.
Step 3: The GAN is trained using the “rough” category data in the dataset in Step 2.
Step 4: The GAN is trained using the “smooth” category data in the dataset in Step 2.
Step 5: The image data is generated from the generation network trained in steps 3 and 4 to complete the data set expansion.
Step 6: The discriminative network is retrained for the expanded smooth and rough datasets generated by the generative network in step 5 to obtain the final roughness recognition network model.

3.3. Training Results

To teach the GAN the meaning of “rough,” real smooth images are added as fake data to train the discriminator along with the output of the generator, as shown in Figure 6a. Figure 6b shows examples of the surface roughness of workpieces generated by the GAN.
The GAN is trained using the expanded datasets, and then the GAN is able to generate a series of smooth and rough images as the training set. The problem is treated as a binary classification problem using the sigmoid function as the output activation function and the binary cross-entropy as the loss function for training, with the rough images labeled ‘1’ and the smooth images labeled ‘0’. In this method, the same network structure of the classifier with the discriminator of the GAN is used, as shown in Table 1.
In the method described above, a dataset with only roughness Ra of 0.2, 0.4, 3.2, 6.3 and radius of curvature R of 50, 1000, and infinity are used as the training set. However, the dataset in the actual test contains more cases of roughness and radius of curvatures. A qualified classifier should be able to accurately distinguish the cases which are not encountered in the training set. Some of the actual test results are shown in Table 2, which visually reflects the classifier’s scoring of images with different roughness levels. The smaller score means the smoother surface. The test results show that the method can accurately determine the untrained intermediate roughness (0.8 and 1.6 are the untrained cases), which indicates that the network can understand the concept of “roughness.”

4. Discriminating Method of Workpiece Surface Roughness

Roughness (Ra) is a small-distance (usually less than 1 mm) peak–valley that forms from a microgeometric shape error of the surface of the part. As shown above, the real surface image can obtain a discriminant value, nonlinearly related to roughness Ra through the trained GAN. In order to establish a mapping relationship between the discrimination value of GAN and surface roughness Ra, this paper proposes a surface roughness Ra discrimination method based on the BP neural network, which is shown in Figure 7.
The input layer of the BP neural network for image discriminant value and radius of curvature is denoted as x i ( i = 1 , 2 ) , and the output surface roughness is denoted as z . The number of neurons in the hidden layer is s, denoted as y i ( 1 , 2 , , s ) . The bias value of the hidden layer is γ , and the bias of the output layer is θ . w denotes the connection weights from the input layer to the hidden layer, v denotes the connection weights from the hidden layer to the output layer, while f y and f z are the activation functions of the hidden and output layers, respectively. The forward propagation process of the BP neural network is expressed as:
y i = f y ( i = 1 2 w x i γ ) z = f z ( j = 1 s v y j θ )
Equation (8) completes the mapping from x i ( i = 1 , 2 ) to z . α denotes the target value of the output, and the error of the BP neural network is:
min δ = z α
The error back-propagation process of the BP neural network is implemented by minimizing the objective function by Equation (9). The weights and biases of each layer are adjusted for each propagation as follows:
v ^ = v η δ ( v , θ ) v θ ^ = θ η δ ( v , θ ) θ , w ^ = w η δ ( w , γ ) w γ = γ η δ ( w , γ ) γ
From Equation (8), it can be seen that the data transfer process between the layers is transformed and connected by the activation function. Meanwhile, in the error back-propagation process in the BP neural network in Equation (10), the derivatives of the activation function adjust the connection weights of each layer to reduce the error to the desired range. Considering the requirement that the activation function be continuously differentiable, the sigmoid function is chosen as the output layer activation function, and the tanh function is chosen as the output layer activation function.
f y = 1 1 + e x , f z = e x e x e x + e x
To ensure accuracy of roughness estimation, this study determines the number of neurons in the hidden layer according to the Hecht–Nelson method [29] because the hidden layer affects the stability of the network. The number of input layer neurons is n, while the number of hidden layer neurons is 2n + 1. That is, the number of hidden layer neurons in the network is 5. Networks with different numbers of neurons have also been tested, as shown in Table 3.
After determining that there should be one hidden layer for the BP neural network model, the number of neurons in the hidden layer must be determined. For each neural network model in Table 3, the average error between the actual and predicted values were recorded in 10 training sessions. It is clear from Table 3 that as the number of neurons in the hidden layer increases, the accuracy does not necessarily follow. When the number of hidden layer neurons increases from 3 to 5, the average error decreases from 12.42% to 6.24%. However, as the number of hidden layer neurons continues to increase to 7, the average error increases from 6.24% to 14.63%. The 2-5-1 neural network structure has the smallest error, and so this network structure is used in the real-time surface roughness model in this study.

5. Experiments

In this study, a robot is used to hold the workpiece while grinding a complex, curved item. The robotic grinding platform is built as shown in Figure 8, consisting of a belt grinder, a lightweight robot with seven degrees of freedom and a camera.
Surface roughness is a key feature of the surface texture of a workpiece because it has a significant impact on the service life and reliability of a mechanical product. This paper proposes a vision-based roughness measurement method for comprehensively considering the cost, usability, and efficiency. This method consists of three stages: image acquisition, self-supervised learning and result discrimination. A narrow-angle industrial camera is used to build a vision-based surface roughness measurement system, as shown in Figure 9.
The narrow-angle Balser ace 2 industrial camera meets the needs of this method for surface roughness measurement of curved workpieces. Its detailed parameters are shown in Table 4.
Balser ACE 2 samples images of standard grinding surface roughness contrasts as shown in Figure 10a, and images of standard milled surface roughness contrasts as shown in Figure 10b. There is no significant difference between images Ra 0.2 and Ra 0.1. The camera can distinguish surfaces with surface roughness Ra greater than 0.2. The image samples in Figure 10 are added to the training set of the proposed GAN to enrich the samples and increase the measurement accuracy of the model.
The blade-grinding process is divided into three processing stages according to the requirements of the grinding process: rough grinding, semi-finishing grinding and finishing grinding. The rough grinding stage removes a large amount of the material using the grinding parameters belt line speed 5 m/s, feed speed 3 mm/s, belt mesh 120 and contact force 15 N. The semi-finishing stage removes a small amount of material with the grinding parameters of belt line speed 5 m/s, feed speed 3 mm/s, belt mesh 320 and contact force 10 N. The finishing stage is mainly for finishing the surface of the workpiece with the grinding parameters belt line speed 5 m/s, feed speed 3 mm/s, belt mesh 320, and contact force 5 N. After each grinding stage, the surface roughness is measured and analyzed.
In this study, an industrial camera was used to take pictures of the workpiece surface under a specific light environment to measure the surface roughness conditions, as shown in Figure 11. In order to compare the measurement accuracy of different learning algorithms, ANN and CNN are added to train the surface roughness measurement model in this paper. The GAN-BPNN, ANN, CNN were used to judge the smoothness of the polished processing surface in Figure 11, as shown in Table 5. The proposed GAN-BPNN has a margin of error of 10%. However, the prediction error of ANN and CNN were more than 10%.
In order to measure blade surface roughness more accurately, this paper designs a sampling point distribution method based on constant chord height. The method realizes a dense distribution of sampling points in the region with a large curvature variation and a sparse distribution in the region with a small curvature variation, as shown in Figure 12.
(1) Set a chord height ε .
(2) The baseline AE was obtained by connecting the end points of the curve.
(3) Determine whether there exists a point on the curve AE whose distance to the datum line is greater than ε . If there is a point on AE , whose distance from the datum line AE is the farthest point is n 0 , then delete the original datum line AE.
(4) Set n 0 to B and connect the AB and BE as the new datum line.
(5) Determine whether there exists a point on the curve AB whose distance to the datum line is greater than ε , and if there is a point on AB whose distance from the datum line AB is the farthest point is n 1 . Similarly, point n 2 on curve AB is obtained. Rewrite A, n 1 , B, n 2 , E as A, B, C, D, E.
Repeat the above process until all points on the curve to the datum line position are less than the threshold ε . In this paper, five sampling points (A,…, E) marked in the figure were taken as examples to compare the roughness changes of blades before and after grinding, as shown in Figure 13. The robot planed the motion trajectory according to the position and curvature of the sampling points (20 mm × 20 mm area centered on this point), collecting images of the five sampling points in turn at the best angle, as shown in Figure 14.
The image data of the sampling points before and after polishing can obtain the corresponding predicted value by the roughness discrimination model of the GAN + BP neural network, as shown in Table 6. It can be seen that the relative error between the predicted roughness and the real roughness (measured by SJ-210) has a margin of error of 10%, which meets the needs of industrial detection.

6. Conclusions

In this paper, we propose a roughness evaluation method combining generative an adversarial network (GAN) and a BP neural network, which avoids the influence of surface image differences with different curvatures on the accuracy of roughness measurements. The method automatically learns features in the image by generators playing with discriminators, eliminating the independent feature extraction step. This does not merely shorten the prediction time but reduces the complexity of model training as well. Experiments show that the proposed method can measure a free-form surface with a minimum roughness of 0.2 µm, and measurement results have a margin of error of 10%. Since the proposed method does not require the operator to have the field knowledge of feature recognition, the method is easier to apply in a factory. However, the proposed roughness evaluation method using GAN takes a long time for model training due to its convolution process and depth structure characteristics. To overcome this problem, the adaptive model can be considered in future research to automatically adjust the hyperparameters.

Author Contributions

G.Z. was responsible for methodology and manuscript writing. C.L. was responsible for software. K.M. was responsible for experiments. F.N. was responsible for reviewing papers and providing funding support. H.L. provided resources. All authors have read and agreed to the published version of the manuscript.

Funding

This work is supported by Self-Planned Task (NO.SKLRS202204B) of State Key Laboratory of Robotics and System (HIT).

Institutional Review Board Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Wei, J.; Wang, L. Industrial Robotic Machining: A Review. Int. J. Adv. Manuf. Technol. 2019, 103, 1239–1255. [Google Scholar]
  2. Zhu, D.; Feng, X.; Xu, X.; Yang, Z.; Li, W.; Yan, S.; Ding, H. Robotic grinding of complex components: A step towards efficient and intelligent machining–challenges, solutions, and applications. Robot. Comput. Integr. Manuf. 2020, 65, 101908. [Google Scholar] [CrossRef]
  3. Liu, Z.; Jiang, L.; Yang, B. Task-Oriented Real-Time Optimization Method of Dynamic Force Distribution for Multi-Fingered Grasping. Int. J. Hum. Robot. 2022, 2250013. [Google Scholar] [CrossRef]
  4. Xu, X.; Zhu, D.; Zhang, H.; Yan, S.; Ding, H. TCP-based calibration in robot-assisted belt grinding of aero-engine blades using scanner measurements. Int. J. Adv. Manuf. Technol. 2017, 90, 635–647. [Google Scholar] [CrossRef]
  5. Liu, J.; Lu, E.; Yi, H.; Wang, M.; Ao, P. A new surface roughness measurement method based on a color distribution statistical matrix. Measurement 2017, 103, 165–178. [Google Scholar] [CrossRef]
  6. Launhardt, M.; Wörz, A.; Loderer, A.; Laumer, T.; Drummer, D.; Hausotte, T.; Schmidt, M. Detecting surface roughness on SLS parts with various measuring techniques. Polym. Test. 2016, 53, 217–226. [Google Scholar] [CrossRef]
  7. Hiziroglu, S. Surface roughness analysis of wood composites: A stylus method. For. Prod. J. 1996, 46, 67. [Google Scholar]
  8. Poon, C.Y.; Bhushan, B. Comparison of surface roughness measurements by stylus profiler, AFM and non-contact optical profiler. Wear 1995, 190, 76–88. [Google Scholar] [CrossRef]
  9. Haitjema, H. Uncertainty analysis of roughness standard calibration using stylus instruments. Precis. Eng. 1998, 22, 110–119. [Google Scholar] [CrossRef]
  10. Kiran, M.B.; Ramamoorthy, B.; Radhakrishnan, V. Evaluation of surface roughness by vision system. Int. J. Mach. Tools Manuf. 1998, 38, 685–690. [Google Scholar] [CrossRef]
  11. Patel, D.R.; Kiran, M.B. Vision based prediction of surface roughness for end milling. Mater. Today: Proc. 2021, 44, 792–796. [Google Scholar] [CrossRef]
  12. John, J.G.; Arunachalam, N. Illumination compensated images for surface roughness evaluation using machine vision in grinding process. Procedia Manuf. 2019, 34, 969–977. [Google Scholar] [CrossRef]
  13. Joshi, K.; Patil, B. Prediction of surface roughness by machine vision using principal components based regression analysis. Procedia Comput. Sci. 2020, 167, 382–391. [Google Scholar] [CrossRef]
  14. Gandla, P.K.; Inturi, V.; Kurra, S.; Radhika, S. Evaluation of surface roughness in incremental forming using image processing based methods. Measurement 2020, 164, 108055. [Google Scholar] [CrossRef]
  15. Sanjeevi, R.; Nagaraja, R.; Krishnan, B.R. Vision-based surface roughness accuracy prediction in the CNC milling process (Al6061) using ANN. Mater. Sci. 2020, 2214, 7853. [Google Scholar] [CrossRef]
  16. Rifai, A.P.; Aoyama, H.; Tho, N.H.; Dawal, S.Z.M.; Masruroh, N.A. Evaluation of turned and milled surfaces roughness using convolutional neural network. Measurement 2020, 161, 107860. [Google Scholar] [CrossRef]
  17. Jayabarathi, S.B.; Ratnam, M.M. Comparison of Correlation between 3D Surface Roughness and Laser Speckle Pattern for Experimental Setup Using He-Ne as Laser Source and Laser Pointer as Laser Source. Sensors 2022, 22, 6003. [Google Scholar] [CrossRef]
  18. Patil, S.H.; Kulkarni, R. Surface roughness measurement based on singular value decomposition of objective speckle pattern. Opt. Lasers Eng. 2022, 150, 106847. [Google Scholar] [CrossRef]
  19. Tootooni, M.S.; Liu, C.; Roberson, D.; Donovan, R.; Rao, P.K.; Kong, Z.J.; Bukkapatnam, S.T. Online non-contact surface finish measurement in machining using graph theory-based image analysis. J. Manuf. Syst. 2016, 41, 266–276. [Google Scholar] [CrossRef]
  20. Liu, W.; Tu, X.; Jia, Z.; Wang, W.; Ma, X.; Bi, X. An improved surface roughness measurement method for micro-heterogeneous texture in deep hole based on gray-level co-occurrence matrix and support vector machine. Int. J. Adv. Manuf. Technol. 2013, 69, 583–593. [Google Scholar] [CrossRef]
  21. Huaian, Y.I.; Jian, L.I.U.; Enhui, L.U.; Peng, A.O. Measuring grinding surface roughness based on the sharpness evaluation of colour images. Meas. Sci. Technol. 2016, 27, 025404. [Google Scholar] [CrossRef]
  22. Tsai, D.M.; Chen, J.J.; Chen, J.F. A vision system for surface roughness assessment using neural networks. Int. J. Adv. Manuf. Technol. 1998, 14, 412–422. [Google Scholar] [CrossRef]
  23. Samtaş, G. Measurement and evaluation of surface roughness based on optic system using image processing and artificial neural network. Int. J. Adv. Manuf. Technol. 2014, 73, 353–364. [Google Scholar] [CrossRef]
  24. Tang, K.; Chen, F.; Chang, F. Roughness Classification of End Milling Based on Machine Vision. In Proceedings of the 3rd World Conference on Mechanical Engineering and Intelligent Manufacturing (WCMEIM), Shanghai, China, 4–16 December 2020; p. 292. [Google Scholar]
  25. Saeedi, J.; Dotta, M.; Galli, A.; Nasciuti, A.; Maradia, U.; Boccadoro, M.; Giusti, A. Measurement and inspection of electrical discharge machined steel surfaces using deep neural networks. Mach. Vis. Appl. 2021, 32, 1–15. [Google Scholar] [CrossRef]
  26. Rifai, A.P.; Fukuda, R.; Aoyama, H. Surface roughness estimation and chatter vibration identification using vision-based deep learning. J. Jpn. Soc. Precis. Eng. 2019, 85, 658–666. [Google Scholar] [CrossRef] [Green Version]
  27. Goodfellow, I.; Pouget-Abadie, J.; Mirza, M.; Xu, B.; Warde-Farley, D.; Ozair, S.; Courville, A.; Bengio, Y. Generative Adversarial Nets, Neural Information Processing Systems; MIT Press: Cambridge, MA, USA, 2014. [Google Scholar]
  28. Creswell, A.; White, T.; Dumoulin, V.; Arulkumaran, K.; Sengupta, B.; Bharath, A.A. Generative adversarial networks: An overview. IEEE Signal Process. Mag. 2018, 35, 53–65. [Google Scholar] [CrossRef]
  29. Hecht-Nielsen, R. Kolmogorov’s Mapping Neural Network Existence Theorem; IEEE Press: Piscataway, NJ, USA, 1987. [Google Scholar]
Figure 1. The structure of the generative adversarial network (GAN).
Figure 1. The structure of the generative adversarial network (GAN).
Machines 10 01026 g001
Figure 2. The structure of the generative network.
Figure 2. The structure of the generative network.
Machines 10 01026 g002
Figure 3. The structure of the discriminant network.
Figure 3. The structure of the discriminant network.
Machines 10 01026 g003
Figure 4. The raw data used for training in this study, where Ra denotes the degree of roughness (the larger the Ra, the rougher the surface) and R is the radius of curvature (the larger the R, the flatter the surface).
Figure 4. The raw data used for training in this study, where Ra denotes the degree of roughness (the larger the Ra, the rougher the surface) and R is the radius of curvature (the larger the R, the flatter the surface).
Machines 10 01026 g004aMachines 10 01026 g004b
Figure 5. The training process of the GAN.
Figure 5. The training process of the GAN.
Machines 10 01026 g005
Figure 6. (a) Training method for the discriminator in the GAN used to generate rough images (b) Data generated by the GAN.
Figure 6. (a) Training method for the discriminator in the GAN used to generate rough images (b) Data generated by the GAN.
Machines 10 01026 g006
Figure 7. Back-propagation neural network structure to evaluate grinding roughness, according to discriminant value.
Figure 7. Back-propagation neural network structure to evaluate grinding roughness, according to discriminant value.
Machines 10 01026 g007
Figure 8. Robotic grinding system.
Figure 8. Robotic grinding system.
Machines 10 01026 g008
Figure 9. Surface roughness measurement system based on vision.
Figure 9. Surface roughness measurement system based on vision.
Machines 10 01026 g009
Figure 10. Images of the roughness standard samples were obtained by Balser ace 2. (a) Images of the roughness standard grinding surface roughness contrasts; (b) Images of the roughness standard milled surface roughness contrasts.
Figure 10. Images of the roughness standard samples were obtained by Balser ace 2. (a) Images of the roughness standard grinding surface roughness contrasts; (b) Images of the roughness standard milled surface roughness contrasts.
Machines 10 01026 g010
Figure 11. Roughness measurement based on machine vision.
Figure 11. Roughness measurement based on machine vision.
Machines 10 01026 g011
Figure 12. Sampling point distribution method.
Figure 12. Sampling point distribution method.
Machines 10 01026 g012
Figure 13. Distribution of sampling points for blade surface roughness.
Figure 13. Distribution of sampling points for blade surface roughness.
Machines 10 01026 g013
Figure 14. The roughness images at the five sampling points. (A) The roughness image at point A; (B) The roughness image at point B; (C) The roughness image at point C; (D) The roughness image at point D; (E) The roughness image at point E.
Figure 14. The roughness images at the five sampling points. (A) The roughness image at point A; (B) The roughness image at point B; (C) The roughness image at point C; (D) The roughness image at point D; (E) The roughness image at point E.
Machines 10 01026 g014
Table 1. The network structure of the generator and the discriminator.
Table 1. The network structure of the generator and the discriminator.
GeneratorDiscriminator
Input(32)Input(80, 80, 1)
Dense(102400)Conv2D(40, 40, 64)
BatchNormalization(102400)LeakyReLU(40, 40, 64)
Activation-ReLU(102400)Dropout(40, 40, 64)
Reshape(20, 20, 256)Conv2D(20, 20, 128)
Dropout(20, 20, 256)LeakyReLU(20, 20, 128)
UpSampling2D(40, 40, 256)Dropout(20, 20, 128)
Conv2DTranspose(40, 40, 128)Conv2D(10, 10, 256)
BatchNormalization(40, 40, 128)LeakyReLU(10, 10, 256)
Activation-ReLU(40, 40, 128)Dropout(10, 10, 256)
UpSampling2D(80, 80, 128)Conv2D(10, 10, 512)
Conv2DTranspose(80, 80, 64)LeakyReLU(10, 10, 512)
BatchNormalization(80, 80, 64)Dropout(10, 10, 512)
Activation-ReLU(80, 80, 64)Flatten(51200)
Conv2DTranspose(80, 80, 32)Dense(1)
BatchNormalization(80, 80, 32)Activation-Sigmoid(1)
Activation-ReLU(80, 80, 32)
Conv2DTranspose(80, 80, 1)
Activation-Sigmoid(80, 80, 1)
Table 2. Surface roughness prediction based on GAN.
Table 2. Surface roughness prediction based on GAN.
Radius of Curvature
(mm)
Roughness Ra (μm)Predictive Value
1500.2−22.61
0.4−8.75
0.89.86
1.612.40
3.228.27
6.330.37
7000.2−27.65
0.4−14.10
0.89.75
1.619.65
3.239.47
6.341.16
0.2−48.25
0.4−31.05
0.837.82
1.645.70
3.254.27
6.362.00
Table 3. BP neural network errors for different network structures.
Table 3. BP neural network errors for different network structures.
Structure of the BP Neural
Network
Average Error (%)
Roughness
2-3-112.42
2-5-16.24
2-7-18.79
2-9-114.63
Table 4. Parameters of Balser ace 2 narrow angle camera.
Table 4. Parameters of Balser ace 2 narrow angle camera.
Parameters
Resolution ratio2.3 MP
ChipIMX392
Frame rate51.0 fps
PortGigE
Noise 2.6 e -
Dynamic range71.7 dB
Signal-to-noise ratio40.2 dB
Photosensitive chip typeCMOS
Photosensitive chip size6.6 mm × 4.1 mm
Table 5. Identify workpiece surface roughness with GAN-BPNN, ANN, CNN.
Table 5. Identify workpiece surface roughness with GAN-BPNN, ANN, CNN.
Real Ra (μm) GAN-BPNN
(μm)
Error (%)ANN (μm)Error (%)CNN
(μm)
Error (%)
Before grinding1.751.656.11.618.01.98.6
Rough grinding stage1.291.365.11.4915.51.4512.4
Semi-finishing stage0.930.876.90.849.71.0310.8
Finishing stage0.590.647.80.515.20.6611.9
Table 6. The relative error between the roughness value predicted by GAN + BP and the real roughness.
Table 6. The relative error between the roughness value predicted by GAN + BP and the real roughness.
Compressor BladeRoughness Ra (μm)
BeforeReal Ra1.641.591.651.681.62
GAN Ra1.751.691.791.741.72
Error (%)6.76.28.53.56.2
AfterReal Ra0.670.640.650.680.61
GAN Ra0.720.670.710.740.66
Error (%)7.44.69.28.88.2
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Zhang, G.; Liu, C.; Min, K.; Liu, H.; Ni, F. A GAN-BPNN-Based Surface Roughness Measurement Method for Robotic Grinding. Machines 2022, 10, 1026. https://doi.org/10.3390/machines10111026

AMA Style

Zhang G, Liu C, Min K, Liu H, Ni F. A GAN-BPNN-Based Surface Roughness Measurement Method for Robotic Grinding. Machines. 2022; 10(11):1026. https://doi.org/10.3390/machines10111026

Chicago/Turabian Style

Zhang, Guojun, Changyuan Liu, Kang Min, Hong Liu, and Fenglei Ni. 2022. "A GAN-BPNN-Based Surface Roughness Measurement Method for Robotic Grinding" Machines 10, no. 11: 1026. https://doi.org/10.3390/machines10111026

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop