Data-driven grayscale image generation method for cutting surface topography
By establishing a mapping model of machining signals and tool parameters to the cutting surface morphology grayscale image in the generative adversarial network, the problem of time-consuming generation of cutting surface morphology images in the prior art is solved, and fast and accurate surface morphology grayscale image generation is achieved.
Patent Information
- Application Number
- CN202310065585.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-13
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2043-01-13
AI Technical Summary
In the prior art, when generating three-dimensional images of cutting surface morphology, there are complex mathematical modeling and time-consuming iterative calculation problems, making it difficult to quickly and directly generate grayscale images of surface morphology.
By establishing a mapping model of the cutting surface morphology grayscale image, the processing signal spectrum map and tool stiffness data are directly converted into cutting surface morphology grayscale image data using a generator in the generative adversarial network.
It realizes the rapid and direct generation of grayscale images of the cutting surface morphology, reducing image acquisition and generation time, improving image generation accuracy, and able to reflect processing surface features in real time.
Smart Images

Figure CN116012480B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of cutting processing, and specifically relates to a data-driven method for generating grayscale images of cutting processing surface morphology. Background Art
[0002] Turning, milling and other cutting processes are the basic manufacturing processes in the field of CNC cutting. The surface morphology of the workpiece after cutting will affect the fatigue strength, fit performance, friction performance, corrosion resistance and lubricity of the parts. Surface morphology is a comprehensive indicator for evaluating surface quality and is also a prerequisite for calculating structural characteristic parameters such as surface shape error and roughness. After the processing is completed, the use of expensive special instruments to measure the surface morphology image offline consumes a lot of manpower and financial resources. Therefore, three-dimensional surface morphology simulation and surface morphology grayscale image generation methods are more advantageous. Existing surface morphology simulation methods usually solve the three-dimensional surface morphology of the workpiece through analytical models.
[0003] At present, some research has been done on the generation of three-dimensional surface morphology images during the cutting process. For example, a Chinese patent with publication number CN112387995B discloses a method for predicting the surface morphology after ultra-precision turning of a free-form surface. The area to be simulated for surface morphology is divided into grids through the planned tool trajectory. The coordinate data of all grid points in the simulation area are calculated according to the geometric position relationship between each grid point and the tool contact point on the planned tool trajectory. The calculated coordinate data is then used to reconstruct the surface, thereby realizing the surface morphology simulation modeling of single-point diamond turning of the surface. A Chinese patent with publication number CN107577882B discloses a simulation method for surface morphology modeling and forming of side-milling straight-grained surfaces. The spindle coordinate system is established using the tool position file, the kinematic description of the tool cutting edge is performed, a series of discrete tool point space point cloud data is obtained, the point cloud data is gridded and a follow-up containment box is established, the lowest point of the point cloud data in each containment box is extracted to represent the surface morphology, and all grid nodes are traversed to obtain the three-dimensional surface morphology of the milling process. The Chinese patent application with publication number CN114858432A discloses a method for analyzing and predicting the surface morphology of peripheral milling. The contact mode between the workpiece and the fixture is equivalently converted into a linear spring-damper system, and the vibration differential equation of the workpiece during the milling process is derived using the energy method; a modal analysis solution method for the vibration differential equation with constraints is proposed through the coordinate transformation method to achieve the prediction of the workpiece position deviation; then the motion trajectory equation of the cutting edge during the milling process is established, and a surface morphology discretization algorithm for the surface morphology of the workpiece is proposed by combining the workpiece position deviation and the motion trajectory equation of the cutting edge. The Chinese patent with publication number CN108710339B discloses a method for rapid modeling of the surface morphology of peripheral milling. The side teeth of the end mill are averagely discretized into a series of discrete points according to the radial position angle, and each discrete point corresponds to a discrete surface of the tool and a discrete surface of the workpiece. The characteristic of the equal inter-tooth angle of the side teeth of the milling cutter is used to establish a simulation method with far fewer calculation times than the normal method.
[0004] Compared with the three-dimensional surface topography image obtained by solving the cutting mechanism model in the above method, the surface topography grayscale image can better reflect the depth, density, shape, and especially the texture characteristics of the traces left on the machined surface. In addition, it is time-consuming and cumbersome to first solve the three-dimensional surface topography and then convert it into a surface topography grayscale image. Therefore, the direct generation of surface topography grayscale images has great potential for surface quality monitoring. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a data-driven method for generating grayscale images of cutting surface morphology. In view of the problems of complex mathematical modeling and time-consuming iterative calculation in solving cutting surface morphology based on analytical modeling methods, an end-to-end mapping model of processing signals, tool parameters and other information to cutting surface morphology grayscale images is established to achieve fast and direct generation of cutting surface morphology grayscale images.
[0006] In order to achieve the above object, the present invention provides the following technical solutions:
[0007] A data-driven method for generating a grayscale image of a cutting surface, comprising the following steps:
[0008] Step 1: Read a real cutting surface topography image in the training set and define it as a three-dimensional matrix of (H, W, C) according to the size of the image, expressed as: X t (H t ,W t ,C t ); t = 1;
[0009] Step 2: X t After iterative training t-1 times, the discriminator obtains the feature map M t1 ~M t7 , and output the probability that the cutting surface topography image is true after passing the feature map through a classification function;
[0010] Step 3: Use the binary cross entropy loss function to calculate the loss value between the probability that the cutting surface morphology image obtained in the step 2 is true and the true probability 1, and perform reverse propagation, so as to iteratively optimize the model parameters in the discriminator iteratively trained t-1 times, and obtain the discriminator model iteratively trained t times;
[0011] Step 4: Determine whether the number of iterations t reaches the set maximum number of iterations T max : If yes, terminate the iteration, get the trained generator, and execute step 10; if not, t=t+1, execute step 5;
[0012] Step 5: Perform stream preprocessing on the processing signal data. During the real-time monitoring of the processing surface, the data is normalized and spectral transformed by moving a short time window along the tool trajectory using the short-time Fourier transform technology. The processing signal spectrum is obtained and the spectrum size is defined as a three-dimensional matrix of (H, W, C), expressed as X t1 (H t1 ,W t1 ,C t1 );
[0013] Step 6: Obtain the stiffness data along the tool axis and obtain the stiffness of a series of points along the tool axis, expressed as X t2 (1,W t2 ,1), so that W t1 =W t2 ;
[0014] Step 7: In the generator, build an autoencoder network and convert the corresponding processing signal spectrum and tool stiffness data into a five-channel unit matrix X′ through data conversion t , expressed as: X′ t (H′ t ,W′ t ,C′ t );
[0015] Step 8: Build the generator network, add the recursive residual block to the generator network to obtain an improved generator, and preprocess the network feature map X′ t The improved generator obtains the feature map M t8 ~M t13 ;
[0016] Step 9: The feature map M t13 As the current X t , loop and execute step 2;
[0017] Step 10: Input the processing signal spectrum and tool stiffness data in the test set into the trained generator to generate the cutting surface morphology image.
[0018] Further, in step 2, X t After iterative training t-1 times, the discriminator obtains the feature map M t1 ~M t7 The method is:
[0019] 21) X t Perform feature extraction and change X through convolution operation t The number of channels is then normalized and activated to obtain the feature map M. t1 (H′ t1 , W′ t1 , C′ t1 );
[0020] 22) To M t1 Perform feature extraction and change M through convolution operation t1 The size of the feature map, and then the feature map is obtained by data normalization and activation operation
[0021] 23) To M t2 Perform feature extraction and change M through convolution operation t2The size of the feature map, and then the feature map is obtained by data normalization and activation operation
[0022] 24) To M t3 Perform feature extraction and change M through convolution operation t3 The size of the feature map, and then the feature map is obtained by data normalization and activation operation
[0023] 25) To M t4 Perform feature extraction and change M through convolution operation t4 The size of the feature map is then normalized and activated to obtain the feature
[0024] 26) To M t5 Perform feature extraction and change M through convolution operation t5 The size of the feature map is then normalized and activated to obtain the feature
[0025] 27) To M t6 Perform feature extraction and change M through convolution operation t6 The size of the feature map is then normalized and activated to obtain the feature
[0026] Furthermore, the classification function is a Sigmoid function.
[0027] Furthermore, in step 7, the corresponding processing signal spectrum and tool stiffness data are converted into a five-channel unit matrix X′ t The method is:
[0028] 71) Processing signal spectrum X t1 (H t1 ,W t1 ,C t1 ) is transposed, and then the frequency dimension is reduced to 1 / 4 through (1×1) convolution, and we get Then transpose the channel dimension and frequency dimension of the processed signal spectrum to obtain
[0029] 72) Tool stiffness data X t2 (1,W t2 ,1) Perform feature extraction and change X through convolution operation t2 The frequency dimension is get Then, after transposing the frequency dimension and channel dimension, we get
[0030] 73) The processed signal spectrum diagram X t1 and tool stiffness data Xt2 Concatenate into preprocessing network feature map on the channel dimension
[0031] Further, in step 8), the preprocessed network feature map X t ′ The improved generator obtains the feature map M t8 ~M t13 The method is:
[0032] 81) X′ t Perform feature extraction and convert X′ t After the convolution operation, the feature map size and the number of channels are changed to obtain the feature map M t8 (H′ t ,W′ t ,C′ t );
[0033] 82) To M t8 Perform feature extraction and convert M t8 After N serial recursive residual units, the feature map M is changed t8 The number of channels is M t9 (H′ t ,W′ t , N*C′ t );
[0034] 83) To M t9 Perform feature extraction and convert M t9 After the convolution operation, the number of feature map channels is changed to obtain the feature map M t10 (H′ t ,W′ t ,2C′ t );
[0035] 84) To M t10 Perform feature extraction and convert M t10 After the convolution operation, the number of feature map channels is changed to obtain the feature map M t11 (H′ t ,W′ t ,C′ t );
[0036] 85) M t8 and M t11 The skip connection is directly added, and the size and number of channels of the feature map are changed through the deconvolution operation.
[0037] 86) To M t12 Perform feature extraction and convert M t12The number of feature map channels is changed through convolution operation, and then the feature map M is obtained through data normalization and tanh activation operation. t13 (2H′ t , 2W′ t ,1).
[0038] Furthermore, the recursive residual block includes N recursive residual units, and the recursive residual unit is composed of two convolutional layers, two BN data normalizations and two linear activation functions.
[0039] Furthermore, the activation function is a LeakyReLU function.
[0040] The beneficial effects of the present invention are:
[0041] The data-driven cutting surface morphology grayscale image generation method of the present invention has the following advantages:
[0042] (1) Compared with the offline collection process of cutting surface morphology and the kinematic simulation process of cutting surface morphology, the present invention greatly reduces the collection time and image generation time of cutting surface morphology images. By using the generator in the generative adversarial network, the processing signal spectrum diagram and the tool stiffness data are directly converted into the cutting surface morphology grayscale image data, avoiding the time-consuming surface morphology image data collection and simulation process;
[0043] (2) The application of generative adversarial networks to realize the conversion from processing signal data and tool stiffness information to cutting surface topography images is conducive to the generative adversarial network learning the global information between processing signal data and tool stiffness information, thereby improving the accuracy of cutting surface topography image generation.
[0044] (3) It can help processing workers directly obtain the cutting surface morphology image of the workpiece during the processing process. The grayscale image can better reflect the depth, density, shape, and especially the texture characteristics of the marks left on the processing surface, which helps workers quickly judge the product quality of the processed parts.
[0045] In summary, the data-driven cutting surface morphology grayscale image generation method of the present invention can achieve fast and direct cutting surface morphology grayscale image generation by establishing an end-to-end mapping model from processing signals, tool parameters and other information to cutting surface morphology grayscale images. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to make the purpose, technical solution and beneficial effects of the present invention clearer, the present invention provides the following drawings for illustration:
[0047] Figure 1 It is a principle diagram of an embodiment of a method for generating a grayscale image of a cutting surface driven by a data-driven method of the present invention;
[0048] Figure 2 A schematic diagram of a discriminator network in a generative adversarial network in this embodiment;
[0049] Figure 3 A schematic diagram of a generator network in a generative adversarial network in this embodiment;
[0050] Figure 4 Schematic diagram of the structure of a single recursive residual block in this embodiment;
[0051] Figure 5 This is an example of a grayscale image of the cutting surface morphology generated in this embodiment. DETAILED DESCRIPTION
[0052] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0053] like Figure 1 As shown, the data-driven cutting surface morphology grayscale image generation method of this embodiment includes the following steps.
[0054] Step 1: Read a real cutting surface topography image in the training set and define it as a three-dimensional matrix of (H, W, C) according to the size of the image, expressed as: X t (H t ,W t ,C t ); t = 1. Specifically, in the embodiment, a real cutting surface topography image is read in the training set, and the read real cutting surface topography image is represented by a three-dimensional matrix X t (640, 512, 1) indicates that the numbers 640 and 512 in the first and second dimensions represent the width and height of the real cutting surface morphology image; the number 1 in the third dimension indicates that the number of channels of the real cutting surface morphology image is 1.
[0055] Step 2: X t After iterative training t-1 times, the discriminator obtains the feature map M t1 ~M t7 And after the feature map passes through the classification function, the probability of the cutting surface topography image being true is output. Figure 2 As shown in FIG. 1 , a schematic diagram of the discriminator network in the generative adversarial network of this embodiment is shown. Each part of the discriminator consists of a convolution operation, a data normalization operation, and an activation function. Specifically, in this embodiment, X t The number of feature map channels is changed by convolution operation to obtain M t1 (H′ t1 ,W′ t1 ,C′ t1); Then, the feature map size is changed by the size and step size of the convolution kernel in the convolution layer to obtain the feature map M t2 ~M t7 . Feature map M t2 ~M t7 The sizes are
[0056] Specifically, the feature map M t7 After the classification function is applied, the probability that the cutting surface topography image is true is outputted. Specifically, in this embodiment, the classification function is an S-shaped growth curve function, namely, a Sigmoid function.
[0057] Specifically, X t After iterative training t-1 times, the discriminator obtains the feature map M t1 ~M t7 The method is:
[0058] 21) X t Perform feature extraction and change X through convolution operation t The number of channels is then normalized and activated to obtain the feature map M. t1 (H′ t1 ,W′ t1 ,C′ t1 ). In this step, the convolution operation has 1 convolution kernel, 3×3 kernel size, 2 stride, and 0 padding. Apply this convolution operation to X t Perform feature extraction, and then perform data standardization and activation operations on the feature map after the convolution operation to obtain the feature map M t1 (512,640,1).
[0059] 22) To M t1 Perform feature extraction and change M through convolution operation t1 The size of the feature map, and then the feature map is obtained by data normalization and activation operation In this step, the convolution operation uses 64 convolution kernels, a size of 3×3, a step size of 2, and a padding of 0. t1 Perform feature extraction, and then perform data standardization and activation operations on the feature map obtained after the convolution operation to obtain the feature map M t2 (256,320,64).
[0060] 23) To M t2 Perform feature extraction and change M through convolution operation t2 The size of the feature map, and then the feature map is obtained by data normalization and activation operation In this step, the convolution operation uses 128 convolution kernels, a size of 3×3, a step size of 2, and a padding of 0. First, the convolution operation is applied to M t2 Perform feature extraction, and then perform data standardization and activation operations on the feature map obtained after the convolution operation to obtain the feature map M t3 (128,160,128).
[0061] 24) To M t3 Perform feature extraction and change M through convolution operation t3 The size of the feature map, and then the feature map is obtained by data normalization and activation operation In this step, the convolution operation uses 256 convolution kernels, a size of 3×3, a step size of 2, and a padding of 0. t3 Perform feature extraction, and then perform data standardization and activation operations on the feature map obtained after the convolution operation to obtain the feature map M t4 (64,80,256).
[0062] 25) To M t4 Perform feature extraction and change M through convolution operation t4 The size of the feature map is then normalized and activated to obtain the feature In this step, the convolution operation uses 512 convolution kernels, a size of 3×3, a step size of 2, and a padding of 0. t4 Perform feature extraction, and then perform data standardization and activation operations on the feature map obtained after the convolution operation to obtain the feature map M t5 (32,40,512).
[0063] 26) To M t5 Perform feature extraction and change M through convolution operation t5 The size of the feature map is then normalized and activated to obtain the feature In this step, the convolution operation uses 128 convolution kernels, a size of 3×3, a step size of 2, and a padding of 0. t5 Perform feature extraction, and then perform data standardization and activation operations on the feature map obtained after the convolution operation to obtain the feature map M t6 (32,40,128).
[0064] 27) To M t6 Perform feature extraction and change M through convolution operation t6 The size of the feature map is then normalized and activated to obtain the feature In this step, the convolution operation has 1 convolution kernel, 3×3 kernel size, 2 stride, and 0 padding. t6Perform feature extraction, and then perform data standardization and activation operations on the feature map obtained after the convolution operation to obtain the feature map M t7 (32,40,128).
[0065] In this way, the classification function is applied to the feature map M t7 Calculation is performed, and the classification function outputs the probability that the online reconstruction image of the cutting surface morphology is true. In the embodiment, the classification function Sigmoid (S-shaped growth curve) function is used to calculate the feature map M 7 Calculation is performed to obtain the probability that the online reconstructed image of the cutting surface morphology is true.
[0066] Step 3: Use the binary cross entropy loss function to calculate the loss value between the probability that the cutting surface topography image obtained in step 2 is true and the true probability 1, and perform reverse propagation, so as to iteratively optimize the model parameters in the discriminator iteratively trained t-1 times, and obtain the discriminator model iteratively trained t times. In the embodiment, the binary cross entropy loss function is applied to calculate M t4 The loss value between the true probability with the same shape and value of 1 is back-propagated in the discriminator to iteratively optimize the model parameters in the discriminator. The binary cross entropy loss function is shown below.
[0067]
[0068] Where n represents the number of samples, y i represents the label of the i-th sample, z i It represents the probability that the i-th sample is predicted as a positive example.
[0069] Step 4: Determine whether the number of iterations t reaches the set maximum number of iterations T max : If yes, then the iteration is terminated, the trained generator is obtained, and step 10 is executed; if no, t=t+1, and step 5 is executed. In the embodiment, the maximum number of iterations T is set. max is 500. When the number of iterations reaches the maximum number of iterations T max , we get the trained generator model.
[0070] Step 5: Perform stream preprocessing on the processing signal data. During the real-time monitoring of the processing surface, the data is normalized and spectral transformed by moving a short time window along the tool trajectory using the short-time Fourier transform technology. The processing signal spectrum is obtained and the spectrum size is defined as a three-dimensional matrix of (H, W, C), expressed as X t1 (H t1 ,W t1 ,C t1 ).
[0071] In the embodiment, Matlab is used to perform spectrum conversion on the cutting force signal in the feed direction, the cutting force signal perpendicular to the feed direction, the vibration signal in the feed direction, and the vibration signal perpendicular to the feed direction during processing using short-time Fourier transform STFT to obtain the processing signal spectrum and define the spectrum size as a three-dimensional matrix of (512, 160, 3), expressed as X t1 (512,160,3).
[0072] Step 6: Use ANSYS APDL simulation to obtain the stiffness data along the tool axis and obtain the stiffness of a series of points along the tool axis, expressed as X t2 (1,W t2 ,1), so that W t1 =W t2 In the embodiment, ANSYS APDL is used to obtain the tool point stiffness data of 160 points on the tool axis, expressed as X t2 (1,160,1).
[0073] Step 7: In the generator, build an autoencoder network and convert the corresponding processing signal spectrum and tool stiffness data into a five-channel unit matrix X′ through data conversion t , expressed as: X′ t (H′ t ,W′ t ,C′ t ). The corresponding processing signal spectrum and tool stiffness data are converted into a five-channel unit matrix X′ t The method is:
[0074] 71) Processing signal spectrum X t1 (H t1 ,W t1 ,C t1 ) is transposed, and then the frequency dimension is reduced to 1 / 4 through (1×1) convolution, and we get Then transpose the channel dimension and frequency dimension of the processed signal spectrum to obtain Specifically, in the embodiment, an autoencoder network is constructed, and the PIL library is used to input the processing signal spectrum and tool stiffness data, and the cutting force in the x and y directions and the vibration signals in the x and y directions are spliced into (512, 160, 4) on the channel, and the spectrum data axis is transposed so that the channel dimension and the frequency dimension are interchanged to obtain the frequency characteristics of the full frequency band, and the X t1 (4,160,512); after (1×1) convolution, the frequency dimension is reduced to 1 / 4, and X is obtained t1 (4,160,128), and then transpose the channel dimension and frequency dimension of the processed signal spectrum to obtain X t1 (128,160,4), used for splicing with stiffness data.
[0075] 72) Tool stiffness data X t2 (1,W t2 ,1) Perform feature extraction and change X through convolution operation t2 The frequency dimension is get Then, after transposing the frequency dimension and channel dimension, we get In this embodiment, the tool stiffness data X t2 (1,160,1) is convolved with (1×1) to increase the frequency dimension 1 to 128 to obtain X t2 (1,160,128), and then transpose the frequency dimension and channel dimension to get X t2 (128,160,1).
[0076] 73) The processed signal spectrum diagram X t1 and tool stiffness data X t2 Concatenate into preprocessing network feature map on the channel dimension The spectrum of the signal to be processed X t1 and tool stiffness data X t2 Concatenate into preprocessing network feature map X′ on the channel dimension t (128,160,5).
[0077] Step 8: Build the generator network, add the recursive residual block to the generator network to obtain an improved generator, and preprocess the network feature map X′ t The improved generator obtains the feature map M t8 ~M t13 . Specifically, Figure 3 As shown in , the input data is first downsampled and then connected to several recursive residual blocks for feature extraction, and then gradually upsampled to the same dimension as the measured surface morphology, where each recursive residual block consists of a convolution layer, data normalization, and an activation function. Figure 4 As shown, the recursive residual block includes N recursive residual units, and the recursive residual unit is composed of two convolutional layers, two BN data normalizations and two linear activation functions. In this embodiment, the activation function is the LeakyReLU function.
[0078] In an embodiment, the preprocessing network feature map X′ t After the generator, the feature map M is obtained t8 ~M t13 The method is: first, X′ t After upsampling, the number of feature map channels is changed to obtain feature map M t8 (H′ t ,W′ t ,C′ t );then Mt8 After N recursive residual blocks, change M t8 The size of the feature map is M t9 (H′ t ,W′ t , N*C′ t ), and then M t9 After convolution operation, the feature map M is obtained t10 (H′ t ,W′ t ,2C′ t ), then M t10 The feature map M is obtained by convolution operation. t11 (H′ t ,W′ t ,C′ t ), and then M t8 and M t11 Directly add through skip connection and obtain feature map through deconvolution operation Finally, M t12 After convolution operation, data normalization and tanh activation operation, the feature map M is obtained. t13 (2H′ t , 2W′ t ,1).
[0079] Specifically, in this embodiment, the preprocessing network feature graph X t ′ The improved generator obtains the feature map M t8 ~M t13 The method is:
[0080] 81) X′ t Perform feature extraction and convert X′ t After the convolution operation, the feature map size and the number of channels are changed to obtain the feature map M t8 (H′ t ,W′ t ,C′ t ). In this step, the convolution operation has 64 convolution kernels, a size of 3×3, a step size of 2, and a padding of 0. Apply this convolution operation to X′ t Perform feature extraction, and then perform data standardization and activation operations on the feature map obtained after the convolution operation to obtain the feature map M t8 (256,320,64).
[0081] 82) To M t8 Perform feature extraction and convert M t8 After N serial recursive residual units, the feature map M is changed t8 The number of channels is M t9 (H′ t,W′ t , N*C′ t ). In this step, the number of convolution kernels is 64, the size is 3×3, the step size is 2, and the padding is 0. t8 Feature extraction is performed through N serial recursive residual units, and then the feature map obtained after the convolution operation is normalized and activated to obtain the feature map M t9 (256,320,64*N).
[0082] 83) To M t9 Perform feature extraction and convert M t9 After the convolution operation, the number of feature map channels is changed to obtain the feature map M t10 (H′ t ,W′ t ,2C′ t ). In this step, the convolution operation uses 128 convolution kernels, a size of 3×3, a step size of 2, and a padding of 0. t9 Perform feature extraction, and then perform data standardization and activation operations on the feature map obtained after the convolution operation to obtain the feature map M t10 (256,320,128).
[0083] 84) To M t10 Perform feature extraction and convert M t10 After the convolution operation, the number of feature map channels is changed to obtain the feature map M t11 (H′ t ,W′ t ,C′ t ). In this step, the convolution operation has 64 convolution kernels, a size of 3×3, a step size of 2, and a padding of 0. Apply this convolution operation to M t10 Perform feature extraction, and then perform data standardization and activation operations on the feature map obtained after the convolution operation to obtain the feature map M t11 (256,320,64).
[0084] 85) M t8 and M t11 The skip connection is directly added, and the size and number of channels of the feature map are changed through the deconvolution operation. In this step, the number of convolution kernels is 32, the size is 3×3, the step size is 2, and the padding is 0. t8 (256,320,64) and M t11 (256,320,64) is directly added through skip connection to get M′ t12 (256,320,64), and then apply the deconvolution operation to M′ t12Perform feature extraction, and then perform data standardization and activation operations on the feature map obtained after the deconvolution operation to obtain the feature map M t12 (512,640,32).
[0085] 86) To M t12 Perform feature extraction and convert M t12 The number of feature map channels is changed through convolution operation, and then the feature map M is obtained through data normalization and tanh activation operation. t13 (2H′ t , 2W′ t ,1). In this step, the convolution operation has 1 convolution kernel, 3×3 kernel size, 2 stride, and 0 padding. t12 Perform feature extraction, and then perform data standardization and activation operations on the feature map obtained after the convolution operation to obtain the feature map M t13 (512,640,1).
[0086] Step 9: The feature map M t13 As the current X t , and execute step 2 repeatedly.
[0087] Step 10: Input the processing signal spectrum and tool stiffness data in the test set into the trained generator to generate the cutting surface morphology image.
[0088] In the embodiment, the processing signal spectrum diagram and tool stiffness data in the test set are input into the trained generator to realize the generation of the cutting surface topography image. The generated cutting surface topography image is as follows: Figure 5 shown.
[0089] The above-described embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or changes made by those skilled in the art based on the present invention are within the protection scope of the present invention. The protection scope of the present invention shall be subject to the claims.
Claims
1. A data-driven method for generating grayscale images of cutting surface morphology, characterized in that: The steps include: Step 1: Read a real cutting surface morphology image in the training set and define it as a three-dimensional matrix of (H, W, C) according to the size of the image, expressed as: X t (H t , W t , C t ); t = 1; Step 2: X t After iterative training t-1 times, the discriminator obtains the feature map M t1 ~M t7 , and output the probability that the cutting surface topography image is true after passing the feature map through a classification function; Step 3: Use the binary cross entropy loss function to calculate the loss value between the probability that the cutting surface morphology image obtained in the step 2 is true and the true probability 1, and perform reverse propagation, so as to iteratively optimize the model parameters in the discriminator iteratively trained t-1 times, and obtain the discriminator model iteratively trained t times; Step 4: Determine whether the number of iterations t reaches the set maximum number of iterations T max : If yes, terminate the iteration, get the trained generator, and execute step 10; if not, t=t+1, execute step 5; Step 5: Perform stream preprocessing on the processing signal data. During the real-time monitoring of the processing surface, the data is normalized and spectral transformed by moving a short time window along the tool trajectory using the short-time Fourier transform technology. The processing signal spectrum is obtained and the spectrum size is defined as a three-dimensional matrix of (H, W, C), expressed as X t1 (H t1 , W t1 , C t1 ); Step 6: Obtain the stiffness data along the tool axis and obtain the stiffness of a series of points along the tool axis, expressed as X t2 (1, W t2 , 1), make W t1 =W t2 ; Step 7: In the generator, build an autoencoder network and convert the corresponding processing signal spectrum and tool stiffness data into a five-channel unit matrix X′ through data conversion t , expressed as: X′ t (H′ t , W′ t , C′ t ); Step 8: Build the generator network, add the recursive residual block to the generator network to obtain an improved generator, and preprocess the network feature map X′ t The improved generator obtains the feature map M t8 ~M t13 ; Step 9: The feature map M t13 As the current X t , loop and execute step 2; Step 10: Input the processing signal spectrum and tool stiffness data in the test set into the trained generator to generate the cutting surface morphology image.
2. The data-driven cutting surface topography grayscale image generation method according to claim 1 is characterized in that: In the step 2, x t After iterative training t-1 times, the discriminator obtains the feature map M t1 ~M t7 The method is: 21) X t Perform feature extraction and change X through convolution operation t The number of channels is then normalized and activated to obtain the feature map M. t1 (H′ t1 , W′ t1 , C′ t1 ); 22) To M t1 Perform feature extraction and change M through convolution operation t1 The size of the feature map, and then the feature map is obtained by data normalization and activation operation 23) To M t2 Perform feature extraction and change M through convolution operation t2 The size of the feature map, and then the feature map is obtained by data normalization and activation operation 24) To M t3 Perform feature extraction and change M through convolution operation t3 The size of the feature map, and then the feature map is obtained by data normalization and activation operation 25) To M t4 Perform feature extraction and change M through convolution operation t4 The size of the feature map is then normalized and activated to obtain the feature 26) To M t5 Perform feature extraction and change M through convolution operation t5 The size of the feature map is then normalized and activated to obtain the feature 27) To M t6 Perform feature extraction and change M through convolution operation t6 The size of the feature map is then normalized and activated to obtain the feature 3. The data-driven cutting surface topography grayscale image generation method according to claim 1 is characterized in that: The classification function is a Sigmoid function.
4. The data-driven cutting surface topography grayscale image generation method according to claim 1, characterized in that: In step 7, the corresponding processing signal spectrum and tool stiffness data are converted into a five-channel unit matrix X′ t The method is: 71) Processing signal spectrum X t1 (H t1 , W t1 , C t1 ) is transposed, and then the frequency dimension is reduced to 1 / 4 through (1×1) convolution, and we get Then, the channel dimension and frequency dimension of the processed signal spectrum are transposed to obtain 72) Tool stiffness data X t2 (1, W t2 , 1) Perform feature extraction and change X through convolution operation t2 The frequency dimension is get Then, after transposing the frequency dimension and channel dimension, we get 73) The processed signal spectrum diagram X t1 and tool stiffness data X t2 Concatenate into preprocessing network feature map on the channel dimension 5. The data-driven cutting surface topography grayscale image generation method according to claim 1, characterized in that: In the step eight), the preprocessed network feature graph X′ t The improved generator obtains the feature map M t8 ~M t13 The method is: 81) X′ t Perform feature extraction and convert X′ t After the convolution operation, the feature map size and the number of channels are changed to obtain the feature map M t8 (H′ t , W′ t , C′ t ); 82) To M t8 Perform feature extraction and convert M t8 After N serial recursive residual units, the feature map M is changed t8 The number of channels is M t9 (H′ t , W′ t , N*C′ t ); 83) To M t9 Perform feature extraction and convert M t9 After the convolution operation, the number of feature map channels is changed to obtain the feature map M t10 (H′ t , W′ t , 2C′ t ); 84) To M t10 Perform feature extraction and convert M t10 After the convolution operation, the number of feature map channels is changed to obtain the feature map M t11 (H′ t , W′ t , C′ t ); 85) M t8 and M t11 The skip connection is directly added, and the size and number of channels of the feature map are changed through the deconvolution operation. 86) To M t12 Perform feature extraction and convert M t12 The number of feature map channels is changed through convolution operation, and then the feature map M is obtained through data normalization and tanh activation operation. t13 (2H′ t , 2W′ t , 1).
6. The data-driven cutting surface topography grayscale image generation method according to claim 1, characterized in that: The recursive residual block includes N recursive residual units, and the recursive residual unit is composed of two convolutional layers, two BN data normalizations and two linear activation functions.
7. The data-driven method for generating grayscale images of cutting surface topography according to claim 6, characterized in that: The activation function is the LeakyReLU function.
Citation Information
Patent Citations
A simulation method for modeling and shaping the surface morphology of side-milled ruled surfaces.
CN107577882B
A rapid modeling method for surface topography of peripheral milling
CN108710339B
A method for predicting the surface morphology of free-form surfaces after ultra-precision turning
CN112387995B
Circumferential milling surface topography analysis and prediction method
CN114858432A