Thermal Error Compensation Method for High Precision CNC Thread Grinding Machine

By combining the thermal error slope model and multi-layer perceptron, thermal error prediction and Kalman filtering are integrated, and processing parameters are dynamically adjusted, which solves the problem of low thermal error prediction accuracy for high-precision CNC thread grinders, and achieves more efficient thermal error compensation and improve accuracy.

CN118927014BActive Publication Date: 2024-12-10HANGZHOU FUDE MASCH TOOL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411421976.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2024-12-10
Estimated Expiration
2044-10-12

AI Technical Summary

Technical Problem

The thermal error prediction accuracy of existing high-precision CNC thread grinders is not high, resulting in poor compensation effect. The existing methods rely on a single compensation strategy, which is time-consuming and labor-intensive and difficult to adjust dynamically.

Method used

Temperature data and working parameters are collected, the first and second predicted values ​​are calculated through the combination of thermal error slope model and multi-layer perceptron, and the Kalman filtering is fused, and the PID controller is constructed for thermal error compensation and dynamically adjusting the processing parameters.

Benefits of technology

Improve the accuracy and robustness of thermal error prediction, ensure that the processing parameters are always in the best state, and significantly improve the thread processing accuracy and product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118927014B_ABST
    Figure CN118927014B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of grinding machine tools, and discloses a thermal error compensation method for a high-precision CNC thread grinder, comprising the following steps: S1: collecting working data of the high-precision CNC thread grinder, including temperature data and working parameters; S2: calculating a first predicted value and a second predicted value of each thermal error of the high-precision CNC thread grinder based on the working data; S3: fusing the first predicted value and the second predicted value to obtain a value of each thermal error of the high-precision CNC thread grinder; S4: calculating a control signal of a processing parameter based on the value of each thermal error; S5: performing thermal error compensation on the high-precision CNC thread grinder based on the control signal of the processing parameter. The present invention can effectively reduce the thermal error of the high-precision CNC thread grinder and improve the precision and quality of thread processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of grinding machine tools, and in particular to a thermal error compensation method for a high-precision numerically controlled thread grinder. Background Art

[0002] In recent years, CNC machine tools have been widely used in aerospace, automobile manufacturing, precision instrument manufacturing and other fields due to their high precision, high efficiency and flexibility. Among them, high-precision CNC thread grinders play an important role in various mechanical assemblies because they can process high-precision threaded parts. Thermal error refers to the phenomenon that the heat generated during the processing causes thermal deformation of machine tool parts, resulting in a decrease in processing accuracy. Especially in high-precision CNC thread grinders, thermal errors will have an adverse effect on the quality of the product. Therefore, how to effectively identify and compensate thermal errors has become one of the key technologies to improve thread processing accuracy. The thermal errors of high-precision CNC thread grinders mainly come from frictional heat generated by machine tool spindles, guide rails and other components, heat conduction and heat radiation during cutting, etc. The changes of these thermal errors are complex and difficult to predict, which makes the prediction and calculation of thermal errors difficult. Most of the existing thermal error compensation methods rely on a single compensation strategy, such as reducing the impact of thermal errors through temperature compensation or static correction. These methods are difficult to achieve high compensation accuracy. In the process of thermal error compensation, multiple parameters need to be adjusted to achieve the best compensation effect. However, the adjustment of these parameters often requires a lot of manual experiments, which is time-consuming, labor-intensive and inefficient. In the actual processing process, thermal errors change dynamically with time and processing conditions. Existing compensation methods often ignore this dynamic characteristic, resulting in poor compensation effects.

[0003] For example, a Chinese patent with the authorization announcement number CN106312816B discloses a grinding machine spindle axial thermal error detection device, including a transverse slideway, the structural key points of which are that one end of the transverse slideway is connected to the upper end of the machine tool Y axis, and the lower end of the machine tool Y axis is arranged on the machine tool Y axis track; the other end of the transverse slideway is connected to the upper end of the bracket tilted forward, the lower end of the bracket is connected to the rear end of the transverse linear stepper motor, and the front end drive output end of the linear stepper motor is connected to the eddy current sensor; the machine tool Y axis is provided with a machine tool Z axis that can move up and down, the front end of the machine tool Z axis is connected to the rear end of the machine tool processing spindle, and the front end of the machine tool processing spindle is provided with a vertical grinding wheel; the eddy current sensor is placed above the machine tool processing spindle and behind the vertical grinding wheel. This patent has the problem raised by this background technology: the detection means for thermal errors is single, resulting in low prediction accuracy of thermal errors.

[0004] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgement or any form of suggestion that the information constitutes the prior art already known to ordinary technicians in this field. Summary of the invention

[0005] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide a thermal error compensation method for a high-precision CNC thread grinder, thereby reducing the thermal error of the high-precision CNC thread grinder and improving the accuracy and quality of thread processing.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In one aspect, the present invention provides a thermal error compensation method for a high-precision CNC thread grinder, comprising the following steps:

[0008] S1: Collect working data of high-precision CNC thread grinder, including temperature data and working parameters;

[0009] S2: Calculating a first predicted value and a second predicted value of each thermal error of the high-precision CNC thread grinder based on the working data;

[0010] S3: fusing the first prediction value and the second prediction value to obtain a value of each thermal error of the high-precision CNC thread grinder;

[0011] S4: Calculating a control signal of a processing parameter based on the value of each thermal error;

[0012] S5: Based on the control signal of the processing parameter, thermal error compensation is performed on the high-precision CNC thread grinder.

[0013] As a preferred solution of the thermal error compensation method of the high-precision CNC thread grinder of the present invention, wherein: the method for calculating the first predicted value is to input the temperature data of the high-precision CNC thread grinder into the first error model, calculate and output the first predicted values ​​of the tool position error, feed speed error, and cutting depth error respectively; the first error model is a thermal error slope model, including a first error formula, a second error formula, and a third error formula; wherein the first error formula calculates the first predicted value of the tool position error based on the spindle temperature, the tool holder temperature, and the guide rail temperature, as follows:

[0014] ;

[0015] in, A first predicted value representing a tool position error; Indicates the spindle temperature; Indicates tool holder temperature; Indicates the rail temperature; Indicates the reference operating temperature; Bias coefficient representing tool position error; Indicates the weight coefficient of spindle temperature; Represents the weight coefficient of tool holder temperature; Indicates the weight coefficient of the rail temperature.

[0016] As a preferred solution of the thermal error compensation method of the high-precision CNC thread grinder described in the present invention, wherein: the temperature data includes spindle temperature, tool holder temperature, guide rail temperature, feed motor temperature, ball screw temperature, and tool temperature; wherein the spindle temperature is collected by a temperature sensor installed at the spindle bearing; the tool holder temperature is collected by a temperature sensor installed at the tool fixing position on the tool holder; the guide rail temperature is obtained by installing sensors at both ends and in the middle of the guide rail, collecting the temperature and calculating the average value; the feed motor temperature is collected by installing a temperature sensor on the housing of the feed servo motor; the ball screw temperature is collected by installing temperature sensors at both ends of the ball screw; the tool temperature is measured by an infrared temperature sensor;

[0017] The working parameters include spindle speed, feed speed, and cutting force; the thermal error of the high-precision CNC thread grinder includes tool position error, feed speed error, and cutting depth error.

[0018] As a preferred solution of the thermal error compensation method of the high-precision CNC thread grinder of the present invention, the second error formula calculates the first predicted value of the feed speed error based on the feed motor temperature and the ball screw temperature, which is as follows:

[0019] ;

[0020] in, A first predicted value representing a feed speed error; Indicates the feed motor temperature; Indicates the ball screw temperature; The bias coefficient representing the feed speed error; Indicates the weight coefficient of the feed motor temperature; Represents the weight coefficient of the ball screw temperature;

[0021] The third error formula calculates the first predicted value of the cutting depth error based on the tool temperature, and is as follows:

[0022] ;

[0023] in, represents a first predicted value of a cutting depth error; Bias coefficient representing cutting depth error; Indicates tool temperature; represents the i-th power; Represents the i-th weight coefficient of the tool temperature; the value range of i is 1, 2, ..., n; n represents the threshold number of the tool temperature.

[0024] As a preferred scheme of the thermal error compensation method of the high-precision CNC thread grinder described in the present invention, wherein: the method for calculating the second prediction value is to input the working data of the high-precision CNC thread grinder into a second error model, calculate and output the second prediction value of each thermal error respectively; the second error model is a multi-layer perceptron, the input is the temperature data and working parameters of the high-precision CNC thread grinder, and the output is the second prediction value of the tool position error, feed speed error, and cutting depth error; the multi-layer perceptron includes an input layer, a hidden layer, and an output layer; wherein the input layer is used to input the temperature data and working parameters; the hidden layer is used to extract the characteristics of the temperature data and working parameters; the output layer calculates and outputs the second prediction values ​​of the tool position error, feed speed error, and cutting depth error based on the characteristics of the temperature data and working parameters.

[0025] As a preferred solution of the thermal error compensation method for the high-precision CNC thread grinder of the present invention, the formula for data fusion of the first predicted value and the second predicted value is as follows:

[0026] ;

[0027] in, Represents the value of the jth thermal error at time t; the value range of j is 1, 2, 3; represents the first predicted value of the jth thermal error at time t, represents the second predicted value of the j-th thermal error at time t; and All represent fusion weights, where represents the fusion weight of the first predicted value of the jth thermal error, represents the fusion weight of the second predicted value of the j-th thermal error;

[0028] The fusion weight is determined based on Kalman filtering; a prediction experiment of the first error model and the second error model is performed through a test set of the second error model, and the fusion weight of each thermal error is calculated respectively through Kalman filtering.

[0029] As a preferred solution of the thermal error compensation method of the high-precision CNC thread grinder of the present invention, the method of calculating the control signal of the processing parameter is as follows:

[0030] A PID controller is constructed for each thermal error; the equation for any PID controller is as follows:

[0031] ;

[0032] in, The control signal representing the processing parameters corresponding to the jth thermal error at time t; express The value of the jth thermal error at time; represents integral; represents differential; represents the proportionality coefficient of the jth thermal error, represents the integral coefficient of the jth thermal error, represents the differential coefficient of the jth thermal error;

[0033] The proportional coefficient, integral coefficient and differential coefficient of each thermal error are determined and saved by the attenuation method;

[0034] The value of each thermal error is input into the corresponding PID controller, and the control signal of the processing parameter corresponding to each thermal error is calculated and output.

[0035] As a preferred solution of the thermal error compensation method for the high-precision CNC thread grinder of the present invention, the method for thermal error compensation for the high-precision CNC thread grinder is as follows:

[0036] Based on the control signal Adjust the processing parameters; the processing parameters include tool position, feed motor speed, and distance between tool and workpiece; wherein the control signal corresponding to the tool position error is the adjustment amount of the tool position; the control signal corresponding to the feed speed error is the adjustment amount of the feed motor speed; and the control signal corresponding to the cutting depth error is the adjustment amount of the distance between tool and workpiece.

[0037] In a second aspect, the present invention provides an electronic device, comprising: a memory for storing instructions; a processor for executing the instructions, so that the device performs operations to implement the thermal error compensation method for a high-precision CNC thread grinder described in the present invention.

[0038] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the thermal error compensation method for a high-precision CNC thread grinder of the present invention.

[0039] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:

[0040] By collecting temperature data and working parameters of a high-precision CNC thread grinder, the present invention can comprehensively monitor key factors affecting thermal errors.

[0041] The thermal error slope model and multi-layer perceptron are combined to improve the accuracy and robustness of thermal error prediction through two different prediction methods. The first prediction value and the second prediction value are fused through Kalman filtering to automatically determine the optimal fusion weight, ensuring that the fused thermal error prediction value is both accurate and reliable.

[0042] By dynamically adjusting the tool position, feed motor speed, and distance between the tool and the workpiece, the tool position error, feed speed error, and cutting depth error can be effectively compensated to ensure that the machining parameters are always in the best state, thereby improving machining accuracy and product quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:

[0044] Figure 1 A flow chart of a thermal error compensation method for a high-precision CNC thread grinder provided by the present invention;

[0045] Figure 2 A schematic diagram of the structure of a multilayer perceptron involved in the second error model provided by the present invention;

[0046] Figure 3 A flow chart of a training method for a multilayer perceptron involved in the second error model provided by the present invention. DETAILED DESCRIPTION

[0047] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations on the technical solution of the present invention. The embodiments of the present invention and the technical features in the embodiments may be combined with each other unless there is a conflict.

[0048] Example 1

[0049] This embodiment introduces a thermal error compensation method for a high-precision CNC thread grinder. Figure 1 , the method comprises the following steps:

[0050] S1: Collect working data of high-precision CNC thread grinder, including temperature data and working parameters;

[0051] The temperature data include spindle temperature, tool holder temperature, guide rail temperature, feed motor temperature, ball screw temperature, and tool temperature; the spindle of the CNC thread grinder is the core part for installing the grinding tool, which is responsible for driving the grinding tool for thread grinding. The precision of the spindle directly affects the processing quality. Among them, the spindle temperature is collected by a temperature sensor installed at the spindle bearing; the tool holder is a component used to install and replace the grinding tool. During the grinding process, the tool holder needs to maintain a high degree of stability and accuracy. The tool holder temperature is collected by a temperature sensor installed at the tool holder where the tool is fixed; the guide rail is a path that supports and guides the grinding device and the workpiece clamping device to move precisely. The precision of the guide rail directly affects the motion precision and processing quality of the machine tool. The guide rail temperature is obtained by installing sensors at both ends and in the middle of the guide rail, collecting the temperature at different positions of the guide rail and calculating the average value; the feed servo motor is the core component that controls the movement of the grinding spindle and the workpiece clamping device. By accurately controlling the speed and torque of the motor, the grinding depth and feed speed can be accurately controlled. The feed motor temperature is collected by installing a temperature sensor on the housing of the feed servo motor; the ball screw converts the rotational motion of the feed servo motor into linear motion, thereby driving the grinding device or workpiece clamping device to perform precise linear movement. The ball screw temperature is collected by installing temperature sensors at both ends of the ball screw; the tool temperature is measured by an infrared temperature sensor. The infrared temperature sensor can measure the tool temperature non-contactly, respond quickly to temperature changes, and will not affect the cutting process.

[0052] The operating parameters include spindle speed, feed rate, and cutting force. The spindle speed has a significant impact on the heat generated during the cutting process. The speed at which the tool moves on the workpiece also affects the cutting temperature and thermal error. The cutting force can reflect changes in cutting conditions, which in turn affects the thermal error.

[0053] S2: Calculating a first predicted value and a second predicted value of each thermal error of the high-precision CNC thread grinder based on the working data;

[0054] The thermal errors of high-precision CNC thread grinders include tool position error, feed speed error, and cutting depth error; wherein the tool position error indicates the deviation between the actual position of the cutting tool and the preset position; the tool position error will cause the shape and position deviation of the thread, thereby making the thread asymmetric or the pitch inconsistent, resulting in a decrease in thread accuracy, insufficient thread connection strength or failure to fit properly. The feed speed error indicates the deviation between the actual value and the preset value of the feed speed of the cutting tool; a feed speed that is too fast or too slow will affect the quality of the thread, increase the surface roughness of the thread or make the thread shape irregular, resulting in a decrease in the surface quality of the thread, an increase in friction during thread connection, and an impact on assembly performance. The cutting depth error indicates the deviation between the actual value and the preset value of the relative position of the cutting tool and the workpiece; an error in the cutting depth will result in uneven thread depth, incomplete thread profile or inconsistent thread height, resulting in reduced thread load capacity and durability.

[0055] The method for calculating the first prediction value is to input the temperature data of the high-precision CNC thread grinder into the first error model, calculate and output the first prediction values ​​of the tool position error, feed speed error, and cutting depth error respectively; the first error model is a thermal error slope model, including a first error formula, a second error formula, and a third error formula; wherein the first error formula calculates the first prediction value of the tool position error based on the spindle temperature, the tool holder temperature, and the guide rail temperature, as follows:

[0056] ;

[0057] in, A first predicted value representing a tool position error; Indicates the spindle temperature; Indicates tool holder temperature; Indicates the rail temperature; It represents the reference operating temperature, which is set by technicians in this field based on experience; Bias coefficient representing tool position error; Indicates the weight coefficient of spindle temperature; Represents the weight coefficient of tool holder temperature; Indicates the weight coefficient of the rail temperature;

[0058] The change of spindle temperature directly affects the position accuracy of the tool, so the spindle temperature needs to be involved in calculating the tool position error. The thermal deformation of the tool holder will also affect the tool position, especially near the tool fixing point. The thermal deformation of the guide rail will cause the position deviation of the tool when it moves along the guide rail.

[0059] The second error formula calculates the first predicted value of the feed speed error based on the feed motor temperature and the ball screw temperature, and is as follows:

[0060] ;

[0061] in, A first predicted value representing a feed speed error; Indicates the feed motor temperature; Indicates the ball screw temperature; The bias coefficient representing the feed speed error; Indicates the weight coefficient of the feed motor temperature; Represents the weight coefficient of the ball screw temperature;

[0062] Temperature changes in the feed servo motor can affect its performance, which in turn affects the accuracy of the feed rate. Thermal expansion of the ball screw can also affect the accuracy of the feed system.

[0063] The third error formula calculates the first predicted value of the cutting depth error based on the tool temperature, and is as follows:

[0064] ;

[0065] in, represents a first predicted value of a cutting depth error; Bias coefficient representing cutting depth error; Indicates tool temperature; represents the i-th power; represents the i-th weight coefficient of tool temperature; the value range of i is 1, 2, ..., n; n represents the threshold number of tool temperature;

[0066] The temperature change of the tool will affect the rigidity and deformation of the tool. The heat generated during the cutting process will also cause the local temperature of the tool to rise, affecting the stability of the cutting depth.

[0067] The training method of the first error model is as follows:

[0068] Collecting historical data, any one of the historical data includes a set of temperature data of a high-precision CNC thread grinder and a corresponding thermal error value;

[0069] Performing data cleaning on the historical data, including interpolation and filling of missing values, and detection and replacement of outliers;

[0070] Based on historical data, the first error formula, the second error formula, and the third error formula are fitted to determine the model parameters; the least squares method or other optimization algorithms are used to fit the equations, which can be done by writing custom code or using statistical software (such as Python's SciPy library, etc.). The model parameters that need to be determined for equation fitting include , , , , , , , , , n; where the threshold number n of tool temperature needs to be verified using data that is not involved in fitting, and the calculation errors of the third error formula corresponding to different threshold numbers are compared, and the threshold number that minimizes the calculation error is selected. Too high a threshold number may lead to overfitting, that is, the third error formula performs well on the training data, but has a large error on the new data.

[0071] The model parameters are saved, and the first error model is deployed and applied.

[0072] The method for calculating the second prediction value is to input the working data of the high-precision CNC thread grinder into the second error model, calculate and output the second prediction value of each thermal error respectively; the second error model is a multi-layer perceptron, the input is the temperature data and working parameters of the high-precision CNC thread grinder, and the output is the second prediction value of the tool position error, feed speed error, and cutting depth error; refer to Figure 2 The multilayer perceptron includes an input layer, a hidden layer, and an output layer; wherein the input layer is used to input the temperature data and the working parameters; the hidden layer is used to extract the characteristics of the temperature data and the working parameters; the output layer calculates and outputs the second predicted values ​​of the tool position error, the feed speed error, and the cutting depth error based on the characteristics of the temperature data and the working parameters.

[0073] Furthermore, the input layer of the multi-layer perceptron contains 9 neurons, each neuron corresponds to an input data, namely spindle temperature, tool holder temperature, guide rail temperature, feed motor temperature, ball screw temperature, tool temperature, spindle speed, feed speed, and cutting force; the above input data needs to be preprocessed before entering the multi-layer perception, including normalization and feature encoding, scaling each input data to between 0 and 1, and encoding it into a feature vector, which helps to speed up model training; the hidden layer includes multiple consecutive fully connected layers, and the output of each fully connected layer is processed by a nonlinear activation function, which helps to solve the gradient vanishing problem and accelerate the training process. The output layer contains three neurons, which correspond to the second predicted values ​​of tool position error, feed speed error, and cutting depth error respectively; the output layer uses a linear activation function and can output continuous real values. Reference Figure 3 , the training method of the multilayer perceptron is as follows:

[0074] Collecting historical error data, any one of which includes a set of temperature data, working parameters and corresponding thermal error values ​​of a high-precision CNC thread grinder;

[0075] Normalizing the temperature data and the operating parameters in the historical error data and encoding them into feature vectors, and dividing the historical error data into a training set and a test set;

[0076] Construct a model structure of a multi-layer perceptron; define the model structure of the multi-layer perceptron through a deep learning framework (such as TensorFlow or PyTorch);

[0077] The historical error data in the training set is divided into batches; the model is iteratively trained on the training set. In each iteration, a batch of historical error data is randomly selected, the second predicted value of each thermal error is calculated by forward propagation, and the model parameters are updated by back propagation; each neuron in each layer of the multilayer perceptron is connected to the neuron in the previous layer, and the strength of the connection is determined by weights and biases. These weights and biases are model parameters that need to be learned and updated during the model training process. The mean square error is selected as the loss function, and the model parameters are updated according to the gradient of the loss function through the Adam optimizer.

[0078] Evaluate model performance on the test set and adjust the model, and deploy it to the actual production environment. Adjust the model structure (such as adding hidden layers, changing the number of neurons), optimizer parameters or learning rate as needed to avoid overfitting and improve model performance.

[0079] S3: fusing the first prediction value and the second prediction value to obtain the value of each thermal error of the high-precision CNC thread grinder; the formula is as follows:

[0080] ;

[0081] in, Represents the value of the jth thermal error at time t; the value range of j is 1, 2, 3; represents the first predicted value of the jth thermal error at time t, represents the second predicted value of the j-th thermal error at time t; and All represent fusion weights, where represents the fusion weight of the first predicted value of the jth thermal error, represents the fusion weight of the second predicted value of the j-th thermal error;

[0082] The fusion weight is determined based on Kalman filtering; a prediction experiment of the first error model and the second error model is performed through a test set of the second error model, and the fusion weight of each thermal error is calculated respectively through Kalman filtering.

[0083] S4: Calculate the control signal of the processing parameter based on the value of each thermal error; the method is as follows:

[0084] A PID controller is constructed for each thermal error; the equation for any PID controller is as follows:

[0085] ;

[0086] in, The control signal representing the processing parameters corresponding to the jth thermal error at time t; express The value of the jth thermal error at time; represents integral; represents differential; represents the proportionality coefficient of the jth thermal error, represents the integral coefficient of the jth thermal error, represents the differential coefficient of the jth thermal error;

[0087] The proportional coefficient, integral coefficient and differential coefficient of each thermal error are determined and saved by the attenuation method;

[0088] The value of each thermal error is input into the corresponding PID controller, and the control signal of the processing parameter corresponding to each thermal error is calculated and output.

[0089] S5: Based on the control signal of the processing parameters, thermal error compensation is performed on the high-precision CNC thread grinder. The method is as follows:

[0090] Based on the control signal Adjust the machining parameters; the machining parameters include tool position, feed motor speed, and distance between the tool and the workpiece; wherein the control signal corresponding to the tool position error is the adjustment amount of the tool position; the adjustment amount of the tool position is the displacement amount that the tool needs to be adjusted, which is used to compensate for the tool position deviation caused by thermal error;

[0091] The control signal corresponding to the feed speed error is the adjustment amount of the feed motor speed; it is used to compensate for the feed speed deviation caused by the thermal error and ensure that the feed speed reaches its preset value;

[0092] The control signal corresponding to the cutting depth error is the adjustment amount of the distance between the tool and the workpiece. The adjustment amount of the distance between the tool and the workpiece is the displacement amount that the tool needs to move relative to the workpiece, which is used to adjust the relative position between the tool and the workpiece to ensure that the cutting depth is stable at the preset value.

[0093] Example 2

[0094] This embodiment introduces an electronic device, including a memory and a processor, wherein the memory is used to store instructions, and the processor is used to execute the instructions, so that the computer device executes the thermal error compensation method for the high-precision CNC thread grinder provided in the above embodiment.

[0095] Since the electronic device introduced in this embodiment is an electronic device used to implement the thermal error compensation method of the high-precision CNC thread grinder in the embodiment of the present application, based on the thermal error compensation method of the high-precision CNC thread grinder introduced in the embodiment of the present application, the technical personnel of the field can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as the technical personnel of the field implement the electronic device used in the thermal error compensation method of the high-precision CNC thread grinder in the embodiment of the present application, it belongs to the scope of protection of this application.

[0096] Example 3

[0097] Based on the same inventive concept as other embodiments, this embodiment introduces a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the thermal error compensation method of the high-precision CNC thread grinder provided in the above embodiments is implemented.

[0098] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0099] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the purpose and scope of protection of the present invention, which are all within the protection of the present invention.

Claims

1. A thermal error compensation method for high-precision CNC thread grinder, Features: The following steps are involved: S1: Collect working data of high-precision CNC thread grinder, including temperature data and working parameters; S2: Calculating a first predicted value and a second predicted value of each thermal error of the high-precision CNC thread grinder based on the working data; The method for calculating the first prediction value is to input the temperature data of the high-precision CNC thread grinder into a first error model, calculate and output first prediction values ​​of tool position error, feed speed error, and cutting depth error respectively; The first error model is a thermal error slope model, including a first error formula, a second error formula, and a third error formula; wherein the first error formula calculates a first predicted value of the tool position error based on the spindle temperature, the tool holder temperature, and the guide rail temperature, as follows: ; in, A first predicted value representing a tool position error; Indicates the spindle temperature; Indicates tool holder temperature; Indicates the rail temperature; Indicates the reference operating temperature; Bias coefficient representing tool position error; Indicates the weight coefficient of spindle temperature; Represents the weight coefficient of tool holder temperature; Indicates the weight coefficient of the rail temperature; The second error formula calculates the first predicted value of the feed speed error based on the feed motor temperature and the ball screw temperature, and is as follows: ; in, A first predicted value representing a feed speed error; Indicates the feed motor temperature; Indicates the ball screw temperature; The bias coefficient representing the feed speed error; Indicates the weight coefficient of the feed motor temperature; Represents the weight coefficient of the ball screw temperature; The third error formula calculates the first predicted value of the cutting depth error based on the tool temperature, and is as follows: ; in, represents a first predicted value of a cutting depth error; Bias coefficient representing cutting depth error; Indicates tool temperature; represents the i-th power; represents the i-th weight coefficient of tool temperature; the value range of i is 1, 2, ..., n; n represents the threshold number of tool temperature; The method for calculating the second prediction value is to input the working data of the high-precision CNC thread grinder into the second error model, calculate and output the second prediction value of each thermal error respectively; the second error model is a multi-layer perceptron, the input is the temperature data and working parameters of the high-precision CNC thread grinder, and the output is the second prediction value of the tool position error, feed speed error, and cutting depth error; the multi-layer perceptron includes an input layer, a hidden layer, and an output layer; wherein the input layer is used to input the temperature data and working parameters; the hidden layer is used to extract the characteristics of the temperature data and working parameters; the output layer calculates and outputs the second prediction value of the tool position error, feed speed error, and cutting depth error based on the characteristics of the temperature data and working parameters; S3: fusing the first prediction value and the second prediction value to obtain a value of each thermal error of the high-precision CNC thread grinder; The formula for data fusion of the first predicted value and the second predicted value is as follows: ; in, Represents the value of the jth thermal error at time t; the value range of j is 1, 2, 3; represents the first predicted value of the jth thermal error at time t, represents the second predicted value of the j-th thermal error at time t; and All represent fusion weights, where represents the fusion weight of the first predicted value of the jth thermal error, represents the fusion weight of the second predicted value of the j-th thermal error; The fusion weight is determined based on Kalman filtering; a prediction experiment of the first error model and the second error model is performed through a test set of the second error model, and the fusion weight of each thermal error is calculated respectively through Kalman filtering; S4: Calculating a control signal of a processing parameter based on the value of each thermal error; The method for calculating the control signal of the processing parameters is as follows: A PID controller is constructed for each thermal error; the equation for any PID controller is as follows: ; in, The control signal representing the processing parameters corresponding to the jth thermal error at time t; express The value of the jth thermal error at time; represents integral; represents differential; represents the proportionality coefficient of the jth thermal error, represents the integral coefficient of the jth thermal error, represents the differential coefficient of the jth thermal error; The proportional coefficient, integral coefficient and differential coefficient of each thermal error are determined and saved by the attenuation method; The value of each thermal error is input into the corresponding PID controller, and the control signal of the processing parameter corresponding to each thermal error is calculated and output; S5: Based on the control signal of the processing parameter, thermal error compensation is performed on the high-precision CNC thread grinder; The method for thermal error compensation of a high-precision CNC thread grinder is as follows: Based on the control signal Adjust the processing parameters; the processing parameters include tool position, feed motor speed, and distance between tool and workpiece; wherein the control signal corresponding to the tool position error is the adjustment amount of the tool position; the control signal corresponding to the feed speed error is the adjustment amount of the feed motor speed; and the control signal corresponding to the cutting depth error is the adjustment amount of the distance between tool and workpiece.

2. The thermal error compensation method for a high-precision CNC thread grinder according to claim 1, Features: The temperature data includes spindle temperature, tool holder temperature, guide rail temperature, feed motor temperature, ball screw temperature, and tool temperature; wherein the spindle temperature is collected by a temperature sensor installed at the spindle bearing; the tool holder temperature is collected by a temperature sensor installed at the tool holder where the tool is fixed; the guide rail temperature is obtained by installing sensors at both ends and in the middle of the guide rail, collecting the temperature and calculating the average value; the feed motor temperature is collected by installing a temperature sensor on the housing of the feed servo motor; the ball screw temperature is collected by installing temperature sensors at both ends of the ball screw; the tool temperature is measured by an infrared temperature sensor; The working parameters include spindle speed, feed speed, and cutting force; the thermal error of the high-precision CNC thread grinder includes tool position error, feed speed error, and cutting depth error.

3. An electronic device, It is characterized in that include: A memory for storing instructions; The processor is used to execute the instructions so that the device performs operations to implement the thermal error compensation method for a high-precision CNC thread grinder according to any one of claims 1 to 2.

4. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the thermal error compensation method for a high-precision CNC thread grinder as described in any one of claims 1 to 2 is implemented.