Machine tool machining power consumption prediction method based on image coding and convolutional neural network

By using image encoding and convolutional neural networks, the problems of modeling complexity and poor adaptability across working conditions in milling power consumption prediction are solved, achieving high-precision machining power consumption prediction and meeting the real-time monitoring needs of industrial production.

CN122287400BActive Publication Date: 2026-07-24NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NORTHWESTERN POLYTECHNICAL UNIV
Filing Date
2026-05-28
Publication Date
2026-07-24

Smart Images

  • Figure CN122287400B_ABST
    Figure CN122287400B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of cutting processing power consumption prediction, and particularly relates to a machine tool processing power consumption prediction method based on image coding and convolutional neural network. The method constructs a three-axis coordinate system and defines a processing inclination angle, then codes the material removal volume, spindle speed and feed speed, and then constructs a processing power consumption prediction model based on convolutional neural network. The power consumption prediction model of two-dimensional convolutional neural network is trained to realize model verification and processing power consumption prediction application. At the same time, the geometric and processing information of the cutting process is coded into a three-channel RGB image, combined with the feature extraction capability of the two-dimensional convolutional neural network, and a nonlinear mapping model between the processing features and the power consumption is established, solving the problems of insufficient feature expression, weak cross-condition adaptability and insufficient real-time performance of the existing method, realizing high-precision and efficient prediction of machine tool processing power consumption under complex conditions, and providing reliable support for processing process energy efficiency optimization and process parameter adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power consumption prediction technology in cutting processes. Background Technology

[0002] Milling power consumption is a core indicator for measuring the energy efficiency of machining processes and optimizing cutting parameters. Especially in the machining of difficult-to-machine materials in fields such as aerospace, accurate power consumption prediction can achieve energy saving, cost reduction, and process optimization. Machine tool machining power consumption modeling is an important theoretical foundation for utilizing power signals. In actual machining, machine tool machining power consumption is coupled with complex process conditions, significantly increasing the complexity of modeling.

[0003] Currently, milling power consumption prediction methods are mainly divided into two categories: one is the traditional mathematical modeling method, which relies on cutting parameters (spindle speed, feed rate) and empirical formulas. However, this type of method is only applicable to fixed working conditions and has significant errors when working conditions are cross-condition. The other is the machine learning method, such as neural networks and support vector machines, which constructs a prediction model by extracting the time-domain / frequency-domain features of the power signal. However, this type of method often directly uses one-dimensional signal features, which easily loses the time-frequency correlation information of the signal and has insufficient feature expression ability.

[0004] Existing power consumption prediction methods based on convolutional neural networks often directly stretch one-dimensional power signals into pseudo-two-dimensional vectors and input them into the model without performing targeted image encoding processing on the signals. This results in the models failing to fully capture the multi-domain features of the signals (time-domain variations and frequency-domain distributions). Furthermore, such methods have poor adaptability to cross-operating condition data. When cutting parameters change continuously, the prediction accuracy drops significantly, making it difficult to meet the real-time power consumption monitoring requirements for machining complex structural parts. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art by providing a machine tool processing power consumption prediction method based on image encoding and convolutional neural networks. By encoding the geometric and processing information in the milling process into two-dimensional images, the invention uses convolutional neural networks to predict the processing power consumption, thereby solving the problems in the prior art where the modeling process is complex and the model interpretability is weak when facing the coupled influence of complex process conditions.

[0006] To achieve the above objectives, the technical solution adopted by this invention is as follows: a machine tool processing power consumption prediction method based on image coding and convolutional neural networks, comprising the following steps: Step 1: Based on the workpiece coordinate system, machining coordinate system, and tool coordinate system obtained by rotating the machining coordinate system according to the corresponding machining tilt angle, determine the material removal volume. V MRV The distribution position is determined, and thus, based on the given milling parameters, the surface expressions of the current tool sweep surface, the tool sweep surface at the next moment, the machined surface, and the unmachined surface of the workpiece are sequentially established in the tool coordinate system. Among them, the milling machining parameters refer to the machining tilt angle, spindle speed, feed rate, machining path spacing, and depth of cut; Step 2: Based on the tool sweep volume bounded by the current tool sweep surface and the tool sweep surface at the next moment, and the workpiece volume bounded by the machined surface and the unmachined surface of the workpiece, the material removal volume is obtained by solving Boolean intersection operation. V MRV , which is the volume of material removed from the workpiece by the tool per unit time, is used to characterize the material removal power consumption during the milling process; Furthermore, the volume of the material is removed. V MRV Projecting the image onto the plane perpendicular to the tool axis in the tool coordinate system, meshing the plane perpendicular to the tool axis, calculating the micro-element height of each mesh based on the surface expression, assigning pixel values ​​to each mesh according to normalization rules, and generating the material removal volume. V MRV Encoded image; Step 3: Calculate the milling linear velocity corresponding to each grid, and generate an encoded image of the spindle speed based on the pixel value of the grid corresponding to the milling linear velocity, which is used to characterize the idle power consumption of the machine tool. Meanwhile, by converting and moduloing the feed speed vector, the feed speed vector modulus is used as the pixel value of the corresponding grid to generate an encoded image of the feed speed, which is used to characterize the machine tool feed power consumption. Step 4: Remove volume using material V MRV The encoded image is the R channel, the encoded image of the spindle speed is the G channel, and the encoded image of the feed rate is the B channel. An RGB encoded image with geometric and machining information is synthesized. Based on the convolutional neural network, a machine tool machining power consumption prediction model is established with the RGB encoded image as input and the continuous machine tool machining power consumption prediction value as output, so as to realize the nonlinear mapping between feature image and machining power consumption. At this point, given the RGB encoded image corresponding to the combination of milling machining parameters, the predicted machine tool machining power consumption corresponding to the target milling machining parameters can be obtained through the machine tool machining power consumption prediction model.

[0007] Furthermore, in step one, the workpiece coordinate system is a fixed coordinate system, consistent with the machine tool coordinate system; The machining coordinate system is a moving coordinate system, with the center of the ball end mill as the origin. It consists of the vector F of the tool along the feed direction, the vector C of the machining spacing direction, and the normal vector N of the machining surface, which correspond to the three axes F, C, and N of the machining coordinate system in sequence. The machining spacing direction is the direction of vector C perpendicular to the feed direction. The machining tilt angle includes the tool tilt angle. γ lead and tool tilt angle γtilt Tool tilt angle γ lead The angle between the projection of the tool axis onto the FN plane of the machining coordinate system and the N-axis is the tool tilt angle. γ tilt Let be the angle between the projection of the tool axis onto the NC plane of the machining coordinate system and the N-axis, and let the tool rake angle satisfy . γ lead ≥0°, tool tilt angle meets 0° <γ tilt Constraints <90°; The tool coordinate system is formed by first rotating the machining coordinate system around the C-axis, with the rotation angle being the tool rake angle. γ lead Equal to the F-axis, then rotate around the F-axis, with the rotation angle equal to the tool tilt angle. γ tilt Equal, thus, an axis is established with the center of the ball head cutter as the origin and the rotated F-axis as the reference point. x The axis, the rotated C-axis is y axis, z A tool coordinate system in which the axis coincides with the tool axis; the tool coordinate system's... xoy The surface is the surface perpendicular to the cutter axis.

[0008] Furthermore, in step one, the surface expression in the tool coordinate system includes: The expression for the current tool sweep surface: , The expression for the tool sweep surface at the next moment: , The expression for a machined surface: , The expression for the unmachined surface of the workpiece: , In the formula, R The radius of the cutting tool; γ lead γ tilt These are the tool rake angle and the tool side tilt angle, respectively. x , y , z Let be the coordinates of the tool contact point in the tool coordinate system. s To process line spacing; , Let be the angle between the tool axis and the normal vector of the unmachined surface of the workpiece at the current moment. For cutting depth, f t The feed distance of the cutting tool is the distance between the feed distance and the travel distance.

[0009] Furthermore, in step two, the material removal volume is determined through the Boolean intersection operation. V MRV The solution formula is: , In the formula, Indicates the volume swept by the cutting tool; For the volume of the workpiece; This represents the intersection operation in Boolean operations.

[0010] Furthermore, in step three, the milling linear velocity... The calculation formula is: , In the formula, n Main spindle speed; φ i Tool coordinate system xoy The axial immersion angle corresponding to each grid of the surface. R The radius of the cutting tool; The larger the radius of the cutting point where the grid is located, the higher the milling linear speed, and the larger the corresponding pixel value. At this time, the encoded image of the spindle speed is generated.

[0011] Furthermore, in step three, the process of generating the encoded image of the feed rate is specifically as follows: First, transform the feed rate vector in the machining coordinate system to the tool coordinate system using the transformation matrix. B Represented as: , Obtain the feed rate vector in the tool coordinate system The expression is: , In the formula, It is the inverse of transformation matrix B. It is the feed rate vector in the machining coordinate system, specifically represented as , It's the feed rate. γ lead , γ tilt These are the tool rake angle and the tool side tilt angle, respectively. Then, the converted feed velocity vector Calculate the modulus using the feed velocity vector. The modulus is used as the pixel value of the corresponding grid to generate an encoded image of the feed rate.

[0012] Furthermore, in step four, the machine tool processing power consumption prediction model is specifically constructed based on a two-dimensional convolutional neural network. The established two-dimensional convolutional neural network includes an input layer, a convolutional layer, a pooling layer, a fully connected layer, a regression layer, and an output layer. The convolutional layers are set to 2-6 layers, each using a 3×3 kernel. The number of kernels is configured hierarchically according to feature extraction requirements, and all kernels use the same convolution mode to maintain the feature map size consistent with the input. The RGB encoded image is then input into the machine tool processing power prediction model. This is achieved by generating a two-dimensional feature map through convolution of a set of two-dimensional kernels, defining the two-dimensional convolution operation of the RGB encoded image. The convolution operation formula is: , In the formula, These are the pixel values ​​of the output feature map after the convolution operation; These are the parameters of the convolution kernel; The pixel values ​​of the input RGB encoded image; i , j =1,2,3 k The index of the convolution kernel; Pooling layers and convolutional layers are set up in a one-to-one correspondence. All pooling layers use 2×2 average pooling with a pooling stride of 2 to achieve dimensionality reduction of feature maps and preservation of core features. The fully connected layer receives the feature map output from the last pooling layer, first flattens the feature map to transform it into a one-dimensional feature vector, and then completes the material removal volume through fully connected operations. V MRV Global integration of local extraction features of spindle speed and feed rate to establish material removal volume V MRV The relationship between spindle speed and feed rate and machine tool processing power consumption; The regression layer performs numerical mapping operations on the globally integrated one-dimensional feature vector output by the fully connected layer, and outputs continuous machine tool processing power consumption prediction values, thus completing the transformation from features to prediction values.

[0013] Furthermore, it also includes a training step for the machine tool processing power consumption prediction model, specifically using RGB encoded images corresponding to specified milling processing parameter combinations as input samples and synchronously collected measured machine tool processing power consumption values ​​as labels to construct a training dataset. , ; With mean square error MSE As the loss function, the formula is: , In the formula, This represents the actual measured power consumption value. This is a power consumption prediction value; The number of samples in the training set; The Sgdm optimizer is used to iteratively update the parameters of the machine tool processing power consumption prediction model. The training configuration is set with initial learning rate, learning rate decay rate, number of mini-batch samples, maximum number of iterations, and validation frequency. The model performance is validated periodically during training to complete the model training and selection of the optimal model, thus obtaining the optimal machine tool processing power consumption prediction model.

[0014] Furthermore, it also includes a verification and evaluation step for the machine tool processing power consumption prediction model, specifically: The RGB encoded images corresponding to the milling parameter combinations not used in training are compared with the measured values ​​of machine tool processing power consumption acquired simultaneously. The encoded images are input into the optimal machine tool processing power consumption prediction model, and the output is the predicted processing power consumption value, using the mean absolute error. MAE Mean absolute percentage error MAPE Maximum prediction error ME Quantify the deviation between predicted and measured values ​​to evaluate the machine tool processing power consumption prediction model. Among them, mean absolute error MAE Mean absolute percentage error MAPE Maximum prediction error ME The calculation formulas are as follows: , , , In the formula, Measured values ​​representing the power consumption of machine tool processing; The predicted value representing the power consumption of the machine tool during processing; N This represents the total number of prediction points.

[0015] Furthermore, it also includes a step of obtaining the power consumption change trend of the continuous processing process, specifically generating multiple frames of material removal volume sequentially according to the processing time sequence. V MRV The RGB encoded images corresponding to the encoded images of spindle speed and feed rate are input into the optimal machine tool machining power consumption prediction model to obtain the time-series machining power consumption prediction results.

[0016] The beneficial effects of this invention are as follows: This invention provides a machine tool machining power consumption prediction method based on image encoding and convolutional neural networks. It encodes the geometry and machining information of the cutting process into a three-channel RGB image, and combines this with the feature extraction capability of a two-dimensional convolutional neural network to establish a nonlinear mapping model between machining features and power consumption. This solves the problems of insufficient feature representation, weak adaptability across working conditions, and insufficient real-time performance of existing methods. It achieves high-precision and efficient prediction of machine tool machining power consumption under complex working conditions, providing reliable support for energy efficiency optimization and process parameter adjustment in the machining process. Specific innovations also include: (1) By using three-channel image encoding, the spatial distribution and quantification information of core influencing factors such as material removal volume, spindle speed and feed rate are completely preserved, avoiding the problem of loss of one-dimensional signal features and significantly improving the feature expression capability of processing information; (2) The constructed 2D-CNN model can deeply extract basic features and high-order abstract features from the image, adapt to complex cross-working scenarios such as machining tilt angle and cutting parameter changes, reduce the dependence on fixed working condition data, and improve the generalization ability of the model. (3) No complex signal time-frequency domain preprocessing is required. The image encoding and model inference process is simple and efficient, which greatly improves the timeliness of power consumption prediction and meets the needs of real-time monitoring in industrial production. (4) A dataset was constructed using measured power consumption as a label. The model was trained using an appropriate loss function and optimizer. The optimal model was selected by combining the validation set, which ensured the accuracy and reliability of the prediction results and provided accurate data support for energy saving, cost reduction and process optimization. Attached Figure Description

[0017] Picture 1 This is a diagram defining the machining coordinate system and machining tilt angle of the present invention; Picture 2 The material removal volume considering the processing angle during the implementation of this invention. V MRV Schematic diagram; Picture 3 The material removal volume during the implementation of this invention V MRV Image encoding; Picture 4 This is a schematic diagram of the spindle speed encoding image during the implementation of this invention; Picture 5 This is a schematic diagram of the feed speed encoding image during the implementation of the present invention; Picture 6 This invention is a method for encoding milling geometry and machining information that takes into account machining tilt angles during implementation; Picture 7 This is a structural framework diagram of a two-dimensional convolutional neural network in the implementation of this invention; Picture 8This is a schematic diagram of convolution operation during the implementation of the present invention; Picture 9 This is a schematic diagram of pooling operations during the implementation of this invention; Picture 10 This is the predicted result of the ball-end blade verification experiment during the implementation of this invention. Detailed Implementation

[0018] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0019] To achieve the above objectives, the present invention provides the following specific embodiments: Example 1: As Picture 1 to Picture 9 As shown, a method for predicting machine tool processing power consumption based on image coding and convolutional neural networks includes the following steps: S01. Based on the workpiece coordinate system, the machining coordinate system, and the tool coordinate system obtained by rotating the machining coordinate system according to the corresponding machining tilt angle, determine the material removal volume. V MRV The distribution location; The workpiece coordinate system is a fixed coordinate system, consistent with the machine tool coordinate system. like Picture 1 As shown in (a), the machining coordinate system is a moving coordinate system with the ball end mill's center as the origin. It consists of the vector F along the feed direction of the tool, the vector C along the machining spacing direction, and the normal vector N of the machining surface, which correspond to the three axes F, C, and N of the machining coordinate system in sequence. The machining spacing direction is the direction of vector C perpendicular to the feed direction. like Picture 1 As shown in (b), the machining tilt angle includes the tool rake angle. γ lead and tool tilt angle γ tilt Tool tilt angle γ lead The angle between the projection of the tool axis onto the FN plane of the machining coordinate system and the N-axis is the tool tilt angle. γ tilt Let be the angle between the projection of the tool axis onto the NC plane of the machining coordinate system and the N-axis, and let the tool rake angle satisfy . γ lead ≥0°, tool tilt angle meets 0° <γ tilt Constraints <90°; The tool coordinate system is formed by first rotating the machining coordinate system around the C-axis, with the rotation angle being the same as the tool rake angle. γ lead Equal to the F-axis, then rotate around the F-axis, with the rotation angle equal to the tool tilt angle. γ tiltEqual, thus, an axis is established with the center of the ball head cutter as the origin and the rotated F-axis as the reference point. x The axis, the rotated C-axis is y axis, z A tool coordinate system in which the axis coincides with the tool axis; Among them, milling machining parameters refer to machining tilt angle, spindle speed, feed rate, machining path distance, and depth of cut.

[0020] S02, such as Picture 2 As shown, based on the given milling parameters, the surface expressions for the current tool sweep surface, the tool sweep surface at the next moment, the machined surface, and the unmachined surface of the workpiece are sequentially established in the tool coordinate system, and are expressed as follows: The expression for the current tool sweep surface: , The expression for the tool sweep surface at the next moment: , The expression for a machined surface: , The expression for the unmachined surface of the workpiece: , In the formula, R The radius of the cutting tool; γ lead γ tilt These are the tool rake angle and the tool side tilt angle, respectively. x , y , z Let be the coordinates of the tool contact point in the tool coordinate system. s To process line spacing; , Let be the angle between the tool axis and the normal vector of the unmachined surface of the workpiece at the current moment. For cutting depth, f t The feed distance of the cutting tool is the distance between the feed distance and the travel distance.

[0021] S03. Based on the tool sweep volume enclosed by the current tool sweep surface and the tool sweep surface at the next moment, and the workpiece volume enclosed by the machined surface and the unmachined surface of the workpiece, the material removal volume is obtained by solving Boolean intersection operation. V MRV , which is the volume of material removed from the workpiece by the tool per unit time, is used to characterize the material removal power consumption during the milling process; Among them, the material removal volume of the Boolean intersection operation. V MRV The solution formula is: , In the formula, Indicates the volume swept by the cutting tool; For the volume of the workpiece; This represents the intersection operation in Boolean operations.

[0022] S04, such as Picture 3 As shown, the volume of material is removed. V MRV Projected onto the tool coordinate system xoy The surface, i.e., the surface perpendicular to the cutter axis, is meshed. The micro-element height of each mesh is calculated based on the surface expression, and pixel values ​​are assigned to each mesh according to normalization rules to generate the material removal volume. V MRV Encoded image.

[0023] S05. Calculate the milling linear velocity for each grid. Milling linear speed The calculation formula is: , In the formula, n Main spindle speed; φ i Tool coordinate system xoy The axial immersion angle corresponding to each grid of the surface. R The radius of the cutting tool; The larger the radius of the cutting point where the grid is located, the higher the milling linear speed, and the larger the corresponding pixel value. At this time, the pixel value of the grid corresponding to the milling linear speed is used to generate an encoded image of the spindle speed, which is used to characterize the idle power consumption of the machine tool.

[0024] S06. Transform the feed rate vector in the machining coordinate system to the tool coordinate system, using the transformation matrix. B Represented as: , Obtain the feed rate vector in the tool coordinate system The expression is: , In the formula, It is the inverse of transformation matrix B. It is the feed rate vector in the machining coordinate system, specifically represented as , It's the feed rate. γ lead , γ tilt These are the tool rake angle and the tool side tilt angle, respectively. Then, the converted feed velocity vector Calculate the modulus using the feed velocity vector. The modulus is used as the pixel value of the corresponding grid to generate an encoded image of the feed speed, which is used to characterize the feed power consumption of the machine tool.

[0025] S07, such as Picture 4 , Picture 5 , Picture 6 As shown, the volume is removed by the material. V MRV The encoded image is the R channel, the encoded image of the spindle speed is the G channel, and the encoded image of the feed rate is the B channel. An RGB encoded image with geometric and machining information is synthesized. Based on a two-dimensional convolutional neural network, a machine tool machining power consumption prediction model is established with the RGB encoded image as input and continuous machine tool machining power consumption prediction value as output, so as to realize the nonlinear mapping between feature image and machining power consumption. Among them, such as Picture 7 As shown, the established two-dimensional convolutional neural network includes an input layer, a convolutional layer, a pooling layer, a fully connected layer, a regression layer, and an output layer. The convolutional layers are set to 2-6 layers, each using a 3×3 kernel. The number of kernels is configured hierarchically according to the feature extraction requirements, and all layers use the same convolution mode to keep the feature map size consistent with the input. At this time, such as... Picture 8 As shown, inputting an RGB-encoded image into a machine tool processing power prediction model involves defining a two-dimensional convolution operation on the RGB-encoded image by generating a two-dimensional feature map through convolution of a set of two-dimensional kernels. The convolution operation formula is as follows: , In the formula, These are the pixel values ​​of the output feature map after the convolution operation; These are the parameters of the convolution kernel; The pixel values ​​of the input RGB encoded image; i , j =1,2,3 k The index of the convolution kernel; like Picture 9 As shown, pooling layers and convolutional layers are set up one-to-one. All pooling layers use 2×2 average pooling with a pooling stride of 2 to achieve dimensionality reduction of feature maps and preservation of core features. The fully connected layer receives the feature map output from the last pooling layer, first flattens the feature map to transform it into a one-dimensional feature vector, and then completes the material removal volume through fully connected operations. V MRV Global integration of local extraction features of spindle speed and feed rate to establish material removal volume V MRV The relationship between spindle speed and feed rate and machine tool processing power consumption; The regression layer performs numerical mapping operations on the one-dimensional feature vector of the fully connected layer's output, and outputs continuous machine tool processing power consumption prediction values, thus completing the transformation from features to prediction values. At this point, given the RGB encoded image corresponding to the combination of milling machining parameters, the predicted machine tool machining power consumption corresponding to the target milling machining parameters can be obtained through the machine tool machining power consumption prediction model.

[0026] Example 2: Same as Example 1, except that it also includes the following steps: S08. The training steps for the machine tool processing power consumption prediction model are as follows: RGB encoded images corresponding to specified milling parameter combinations are used as input samples, and synchronously collected measured machine tool processing power consumption values ​​are used as labels to construct a training dataset. , ; With mean square error MSE As the loss function, the formula is: , In the formula, This represents the actual measured power consumption value. This is a power consumption prediction value; The number of samples in the training set; The Sgdm optimizer is used to iteratively update the parameters of the machine tool processing power consumption prediction model. The training configuration is set with initial learning rate, learning rate decay rate, number of mini-batch samples, maximum number of iterations, and validation frequency. The model performance is validated periodically during training to complete the model training and selection of the optimal model, thus obtaining the optimal machine tool processing power consumption prediction model.

[0027] S09. The verification and evaluation steps for the machine tool processing power consumption prediction model are as follows: The RGB encoded images corresponding to the milling parameter combinations not used in training are compared with the measured values ​​of machine tool processing power consumption acquired simultaneously. The encoded images are input into the optimal machine tool processing power consumption prediction model, and the output is the predicted processing power consumption value, using the mean absolute error. MAE Mean absolute percentage error MAPE Maximum prediction error ME Quantify the deviation between predicted and measured values ​​to evaluate the machine tool processing power consumption prediction model. Among them, mean absolute error MAE Mean absolute percentage error MAPE Maximum prediction error ME The calculation formulas are as follows: , , , In the formula, Measured values ​​representing the power consumption of machine tool processing; The predicted value representing the power consumption of the machine tool during processing; N This represents the total number of prediction points.

[0028] Example 3: Same as Example 1, except that it also includes the following steps: S08, the step of obtaining the power consumption change trend of the continuous processing process, specifically involves generating multiple frames of material removal volume sequentially according to the processing time sequence. V MRV The RGB encoded images corresponding to the encoded images of spindle speed and feed rate are input into the optimal machine tool machining power consumption prediction model to obtain the time-series machining power consumption prediction results.

[0029] like Picture 2 to Picture 10 As shown, to further illustrate the technical solution and technical effects of the present invention, the following specific application examples are provided: Milling is performed using a 10mm diameter two-tooth carbide ball end mill. The workpiece material is aluminum alloy Al7075. The spindle speed is 1000-3000 r / min, the machining path distance is 1-3mm, the feed rate is 100-300mm / min, and the tool rake angle is [not specified]. γ lead =0°, tool tilt angle γ tilt The milling parameters are 20°-30° and a cutting depth of 0.6-1.0 mm. The specific steps of the method of this invention are as follows: Step 1: Based on the workpiece coordinate system, machining coordinate system, and tool coordinate system obtained by rotating the machining coordinate system according to the corresponding machining tilt angle, determine the material removal volume. V MRV The distribution positions are determined, and thus, the surface expressions for the current tool sweep surface, the tool sweep surface at the next moment, the machined surface, and the unmachined surface of the workpiece are established sequentially. The resulting surface is characterized as follows: Picture 2 As shown.

[0030] Step Two, as follows Picture 3 As shown, the material volume obtained from the solution is removed. V MRV Projected onto the plane perpendicular to the tool axis in the tool coordinate system, the plane perpendicular to the tool axis is meshed, and the micro-element height of each mesh is calculated based on the surface expression. Pixel values ​​are assigned to each mesh according to the normalization rule to generate an encoded image of the material removal volume.

[0031] Step 3, as follows Picture 4 As shown, the left side is the geometric model of ball end milling: the spindle speed is n, the tool radius is R, and the angle between the line connecting any cutting point P on the cutting edge and the center O of the ball and the spindle is the axial immersion angle. φi Based on this geometric relationship, with given milling parameters, the milling linear velocity is... The calculation formula yields the milling linear velocity corresponding to each grid. , Milling linear speed The calculation formula is: , In the formula, n Main spindle speed; φ i yes xoy The axial immersion angle corresponding to each grid of the surface. R The radius of the cutting tool; Then, according to the milling linear speed The size assigns pixel values ​​to each grid, generating a result such as... Picture 4 The encoded image of the spindle speed shown on the right; like Picture 5 As shown, the left side is the geometric model of the ball end mill's feed motion. This refers to the feed rate in the machining coordinate system, specifically the feed rate in the given milling parameters. Based on the transformation relationship between the machining coordinate system and the tool coordinate system, the feed rate vector in the machining coordinate system is... Converted to feed rate vector in tool coordinate system feed velocity vector The vector magnitude is used as the pixel value of the corresponding grid, ultimately generating a result like... Picture 5 The rightmost image shows the encoded feed rate.

[0032] Step 4: Use the material removal volume encoded image as the R channel, the spindle speed encoded image as the G channel, and the feed rate encoded image as the B channel, such as... Picture 6 As shown, RGB encoded images with geometric and processing information are synthesized. Then, based on a two-dimensional convolutional neural network, a machine tool processing power prediction model is established with RGB encoded images as input and continuous machine tool processing power prediction values ​​as output, so as to realize the nonlinear mapping between feature images and processing power consumption. At this point, given the RGB encoded image corresponding to the combination of milling machining parameters, the predicted machine tool machining power consumption corresponding to the target milling machining parameters can be obtained through the machine tool machining power consumption prediction model.

[0033] like Picture 7 As shown, the core components of the machine tool processing power consumption prediction model include an input layer, three convolutional layers, three pooling layers, a fully connected layer, a regression layer, and an output layer. In this specific example, three convolutional layers are set, each using a 3×3 kernel. The number of kernels in each layer is 32, 64, and 128 respectively, and all layers use the same convolution mode to maintain the feature map size consistent with the input. At this point, the RGB encoded image is input into the machine tool processing power prediction model, such as... Picture 8 As shown, the two-dimensional convolution operation of RGB encoded images is defined by generating two-dimensional feature maps through convolution of a set of two-dimensional kernels. The convolution operation formula is: , In the formula, These are the pixel values ​​of the output feature map after the convolution operation; These are the parameters of the convolution kernel; The pixel values ​​of the input RGB encoded image; i , j =1,2,3 ,k The index of the convolution kernel , Pooling layers and convolutional layers are configured in a one-to-one correspondence. All pooling layers employ 2×2 average pooling with a stride of 2 to reduce the dimensionality of the feature maps while preserving core features. The pooling operation process is as follows: Picture 9 As shown; The fully connected layer receives the feature map output by the last pooling layer, and first flattens the feature map to transform the two-dimensional feature map into a one-dimensional feature vector. Then, through fully connected operations, it completes the global integration of the local extracted features of material removal volume, spindle speed and feed rate, thereby establishing the relationship between material removal volume, spindle speed and feed rate and machine tool processing power consumption. The regression layer performs numerical mapping operations on the globally integrated one-dimensional feature vector output by the fully connected layer, and outputs continuous machine tool processing power consumption prediction values, thus completing the transformation from features to prediction values.

[0034] Step 5: Training the machine tool machining power consumption prediction model. The input sample is an RGB-encoded image corresponding to a specified combination of milling parameters, i.e., a spindle speed of 1000-3000 r / min, a machining path distance of 1-3 mm, a feed rate of 100-300 mm / min, and a tool rake angle... γ lead =0°, tool tilt angle γ tilt Encoded images corresponding to 150 combinations of milling parameters (20°-30°, cutting depth 0.6-1.0mm) were used as labels, with synchronously acquired measured machine tool power consumption as the label, to construct a training dataset. , ; With mean square error MSE As the loss function, the formula is: , In the formula, This represents the actual measured power consumption value. This is a power consumption prediction value; The number of samples in the training set; The Sgdm optimizer was used to iteratively update the parameters of the machine tool processing power consumption prediction model. The initial learning rate was set to 0.001, the learning rate decay rate was 0.1, the number of mini-batch samples was 128, the maximum number of iterations was 50, and the validation frequency was 20. The model performance was validated periodically during the training process. The model training and the selection of the optimal model were completed to obtain the optimal machine tool processing power consumption prediction model.

[0035] Step 6: Set the spindle speed to 1000-3000 r / min, machining path spacing to 1-3 mm, feed rate to 100-300 mm / min, and tool rake angle to... γ lead =0°, tool tilt angle γ tilt A verification experiment was conducted using 50 sets of milling parameters, consisting of a 50° angle and a cutting depth of 0.6-1.0 mm. The corresponding RGB encoded images were compared with the synchronously acquired measured values ​​of machine tool processing power consumption. The encoded images were input into the optimal machine tool processing power consumption prediction model, which outputs predicted processing power consumption values. The mean absolute error was used as the calculation method. MAE Mean absolute percentage error MAPE Maximum prediction error ME Quantify the deviation between predicted and measured values ​​to evaluate the machine tool processing power consumption prediction model; Among them, mean absolute error MAE Mean absolute percentage error MAPE Maximum prediction error ME The calculation formulas are as follows: , , , In the formula, Measured values ​​representing the power consumption of machine tool processing; The predicted value representing the power consumption of the machine tool during processing; N This represents the total number of prediction points.

[0036] Comparison between predicted and measured values, such as Picture 10 As shown, the predicted power consumption of machine tool processing can be obtained through calculation. MAE The value is 5.69 W. MAPE The value is 1.05%. ME The value is 9.68 W, while the prediction result of the traditional convolutional neural network model is... MAE The value is 22.94 W. MAPE The value is 8.68%. ME The value is 26.02 W, which shows that the prediction results of the machine tool processing power consumption prediction model obtained by the present invention are more accurate.

[0037] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for predicting machine tool processing power consumption based on image coding and convolutional neural networks, characterized in that, Includes the following steps: Step 1: Based on the workpiece coordinate system, machining coordinate system, and tool coordinate system obtained by rotating the machining coordinate system according to the corresponding machining tilt angle, determine the material removal volume. V MRV The distribution position is determined, and thus, based on the given milling parameters, the surface expressions of the current tool sweep surface, the tool sweep surface at the next moment, the machined surface, and the unmachined surface of the workpiece are sequentially established in the tool coordinate system. Among them, the milling machining parameters refer to the machining tilt angle, spindle speed, feed rate, machining path spacing, and depth of cut; Step 2: Based on the tool sweep volume bounded by the current tool sweep surface and the tool sweep surface at the next moment, and the workpiece volume bounded by the machined surface and the unmachined surface of the workpiece, the material removal volume is obtained by solving Boolean intersection operation. V MRV , which is the volume of material removed from the workpiece by the tool per unit time, is used to characterize the material removal power consumption during the milling process; Furthermore, the volume of the material is removed. V MRV Projecting the image onto the plane perpendicular to the tool axis in the tool coordinate system, meshing the plane perpendicular to the tool axis, calculating the micro-element height of each mesh based on the surface expression, assigning pixel values ​​to each mesh according to normalization rules, and generating the material removal volume. V MRV Encoded image; Step 3: Calculate the milling linear velocity corresponding to each grid, and generate an encoded image of the spindle speed based on the pixel value of the grid corresponding to the milling linear velocity, which is used to characterize the idle power consumption of the machine tool. Meanwhile, by converting and moduloing the feed speed vector, the feed speed vector modulus is used as the pixel value of the corresponding grid to generate an encoded image of the feed speed, which is used to characterize the machine tool feed power consumption. Step 4: Remove volume using material V MRV The encoded image is the R channel, the encoded image of the spindle speed is the G channel, and the encoded image of the feed rate is the B channel. An RGB encoded image with geometric and machining information is synthesized. Based on the convolutional neural network, a machine tool machining power consumption prediction model is established with the RGB encoded image as input and the continuous machine tool machining power consumption prediction value as output, so as to realize the nonlinear mapping between feature image and machining power consumption. At this point, given the RGB encoded image corresponding to the combination of milling machining parameters, the predicted machine tool machining power consumption corresponding to the target milling machining parameters can be obtained through the machine tool machining power consumption prediction model.

2. The machine tool processing power consumption prediction method based on image coding and convolutional neural networks as described in claim 1, characterized in that, In step one, the workpiece coordinate system is a fixed coordinate system, consistent with the machine tool coordinate system; The machining coordinate system is a moving coordinate system, with the center of the ball end mill as the origin. It consists of the vector F of the tool along the feed direction, the vector C of the machining spacing direction, and the normal vector N of the machining surface, which correspond to the three axes F, C, and N of the machining coordinate system in sequence. The machining spacing direction is the direction of vector C perpendicular to the feed direction. The machining tilt angle includes the tool tilt angle. γ lead and tool tilt angle γ tilt Tool tilt angle γ lead The angle between the projection of the tool axis onto the FN plane of the machining coordinate system and the N-axis is the tool tilt angle. γ tilt Let be the angle between the projection of the tool axis onto the NC plane of the machining coordinate system and the N-axis, and let the tool rake angle satisfy . γ lead ≥0°, tool tilt angle meets 0° <γ tilt Constraints <90°; The tool coordinate system is formed by first rotating the machining coordinate system around the C-axis, with the rotation angle being the tool rake angle. γ lead Equal to the F-axis, then rotate around the F-axis, with the rotation angle equal to the tool tilt angle. γ tilt Equal, thus, an axis is established with the center of the ball head cutter as the origin and the rotated F-axis as the reference point. x The axis, the rotated C-axis is y axis, z A tool coordinate system in which the axis coincides with the tool axis; the tool coordinate system's... xoy The surface is the surface perpendicular to the cutter axis.

3. The machine tool processing power consumption prediction method based on image coding and convolutional neural networks as described in claim 1, characterized in that, In step one, the surface expression in the tool coordinate system includes: The expression for the current tool sweep surface: , The expression for the tool sweep surface at the next moment: , The expression for a machined surface: , The expression for the unmachined surface of the workpiece: , In the formula, R The radius of the cutting tool; γ lead γ tilt These are the tool rake angle and the tool side tilt angle, respectively. x , y , z Let be the coordinates of the tool contact point in the tool coordinate system. s To process row spacing; , Let be the angle between the tool axis and the normal vector of the unmachined surface of the workpiece at the current moment. For cutting depth, f t The feed distance of the cutting tool is the distance between the feed distance and the travel distance.

4. The machine tool processing power consumption prediction method based on image coding and convolutional neural networks as described in claim 1, characterized in that, In step two, the material removal volume is determined through the Boolean intersection operation. V MRV The solution formula is: , In the formula, Indicates the volume swept by the cutting tool; For the volume of the workpiece; This represents the intersection operation in Boolean operations.

5. The machine tool processing power consumption prediction method based on image coding and convolutional neural networks as described in claim 1, characterized in that, In step three, the milling linear velocity The calculation formula is: , In the formula, n Main spindle speed; φ i Tool coordinate system xoy The axial immersion angle corresponding to each grid of the surface. R The radius of the cutting tool; The larger the radius of the cutting point where the grid is located, the higher the milling linear speed, and the larger the corresponding pixel value. At this time, the encoded image of the spindle speed is generated.

6. The machine tool processing power consumption prediction method based on image coding and convolutional neural networks as described in claim 1, characterized in that, Step three, the process of generating the encoded image of the feed rate, specifically involves: First, transform the feed rate vector in the machining coordinate system to the tool coordinate system using the transformation matrix. B Represented as: , Obtain the feed rate vector in the tool coordinate system The expression is: , In the formula, It is the inverse of transformation matrix B. It is the feed rate vector in the machining coordinate system, specifically represented as , It's the feed rate. γ lead , γ tilt These are the tool rake angle and the tool side tilt angle, respectively. Then, the converted feed velocity vector Calculate the modulus using the feed velocity vector. The modulus is used as the pixel value of the corresponding grid to generate an encoded image of the feed rate.

7. The machine tool processing power consumption prediction method based on image coding and convolutional neural networks as described in claim 1, characterized in that, In step four, the machine tool processing power consumption prediction model is specifically constructed based on a two-dimensional convolutional neural network. The established two-dimensional convolutional neural network includes an input layer, a convolutional layer, a pooling layer, a fully connected layer, a regression layer, and an output layer. The convolutional layers are set to 2-6 layers, each using a 3×3 kernel. The number of kernels is configured hierarchically according to feature extraction requirements, and all kernels use the same convolution mode to maintain the feature map size consistent with the input. The RGB encoded image is then input into the machine tool processing power prediction model. This is achieved by generating a two-dimensional feature map through convolution of a set of two-dimensional kernels, defining the two-dimensional convolution operation of the RGB encoded image. The convolution operation formula is: , In the formula, These are the pixel values ​​of the output feature map after the convolution operation; These are the parameters of the convolution kernel; The pixel values ​​of the input RGB encoded image; i , j =1,2,3 k The index of the convolution kernel; Pooling layers and convolutional layers are set up in a one-to-one correspondence. All pooling layers use 2×2 average pooling with a pooling stride of 2 to achieve dimensionality reduction of feature maps and preservation of core features. The fully connected layer receives the feature map output from the last pooling layer, first flattens the feature map to transform it into a one-dimensional feature vector, and then completes the material removal volume through fully connected operations. V MRV Global integration of local extraction features of spindle speed and feed rate to establish material removal volume V MRV The relationship between spindle speed and feed rate and machine tool processing power consumption; The regression layer performs numerical mapping operations on the globally integrated one-dimensional feature vector output by the fully connected layer, and outputs continuous machine tool processing power consumption prediction values, thus completing the transformation from features to prediction values.

8. The machine tool processing power consumption prediction method based on image coding and convolutional neural networks as described in any one of claims 1-7, characterized in that, It also includes the training step of the machine tool processing power consumption prediction model, specifically using RGB encoded images corresponding to specified milling processing parameter combinations as input samples and synchronously collected measured machine tool processing power consumption values ​​as labels to construct a training dataset. , ; With mean square error MSE As the loss function, the formula is: , In the formula, This represents the actual measured power consumption value. This is a power consumption prediction value; The number of samples in the training set; The Sgdm optimizer is used to iteratively update the parameters of the machine tool processing power consumption prediction model. The training configuration is set with initial learning rate, learning rate decay rate, number of mini-batch samples, maximum number of iterations, and validation frequency. The model performance is validated periodically during training to complete the model training and selection of the optimal model, thus obtaining the optimal machine tool processing power consumption prediction model.

9. The machine tool processing power consumption prediction method based on image coding and convolutional neural networks as described in claim 8, characterized in that, It also includes a verification and evaluation step for the machine tool processing power consumption prediction model, specifically: The RGB encoded images corresponding to the milling parameter combinations not used in training are compared with the measured values ​​of machine tool processing power consumption acquired simultaneously. The encoded images are input into the optimal machine tool processing power consumption prediction model, and the output is the predicted processing power consumption value, using the mean absolute error. MAE Mean absolute percentage error MAPE Maximum prediction error ME Quantify the deviation between predicted and measured values ​​to evaluate the machine tool processing power consumption prediction model. Among them, mean absolute error MAE Mean absolute percentage error MAPE Maximum prediction error ME The calculation formulas are as follows: , , , In the formula, Measured values ​​representing the power consumption of machine tool processing; The predicted value representing the power consumption of the machine tool during processing; N This represents the total number of prediction points.

10. The machine tool processing power consumption prediction method based on image coding and convolutional neural networks as described in claim 8, characterized in that, It also includes a step of obtaining the power consumption change trend of the continuous processing process, specifically generating multiple frames of material removal volume sequentially according to the processing time sequence. V MRV The RGB encoded images corresponding to the encoded images of spindle speed and feed rate are input into the optimal machine tool machining power consumption prediction model to obtain the time-series machining power consumption prediction results.