Method for determining dynamic error of spindle of numerical control machine tool and computer program product
By building an experimental platform and deep learning model, using vibration signal sequences to predict dynamic errors of the spindle of CNC machine tools, the problem of inaccurate measurement in the existing technology is solved, and error prediction and stability improvement with higher accuracy are achieved.
Patent Information
- Application Number
- CN202511061529.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-07-31
AI Technical Summary
In the prior art, the measurement method of dynamic error of the spindle of CNC machine tools is not direct and accurate enough, and it is difficult to accurately reflect the actual operating state of the spindle, affecting machining accuracy and stability.
An experimental platform is built to simulate the actual working environment of the spindle of CNC machine tools. Through a deep time convolution network or a bidirectional long and short-term memory network model, a vibration signal sequence is used to predict the dynamic error of the spindle, data that truly reflects the spindle under different operating conditions is collected, and a dynamic error prediction model is trained.
It improves the prediction accuracy and generalization ability of spindle dynamic errors, can more truly reflect the errors of spindles under different working conditions, and improves the machining accuracy and stability of machine tools.
Smart Images

Figure CN120561779A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of spindle precision control for numerically controlled machine tools, and in particular to a method for determining the dynamic error of a spindle for a numerically controlled machine tool and a computer program product. Background Art
[0002] With the rapid development of the manufacturing industry, CNC machine tools, as key equipment for precision machining, have a performance that directly affects the quality of machined parts and production efficiency. As the core component of a machine tool, the size of the dynamic error of a CNC machine tool spindle is directly related to the machining accuracy and stability of the machine tool. Therefore, accurately measuring and controlling the dynamic error of a CNC machine tool spindle is of great significance for improving the machining accuracy and reliability of the machine tool. In related technologies, when determining the dynamic error of a CNC machine tool spindle, it is usually necessary to directly measure the overall dynamic error of the CNC machine tool (for example, the axial or radial movement of the entire machine tool), and then estimate the dynamic error of the spindle based on the overall dynamic error of the CNC machine tool. This method of determining the dynamic error of a machine tool spindle is not direct and accurate enough. Therefore, it is necessary to provide a solution for more accurately determining the dynamic error of a machine tool spindle. Summary of the Invention
[0003] In view of this, the present application provides a method for determining the dynamic error of a spindle of a CNC machine tool and a computer program product.
[0004] According to a first aspect of the present application, a method for determining a dynamic error of a spindle of a CNC machine tool is provided, the method comprising: Obtaining a vibration signal sequence for characterizing the vibration condition of a CNC machine tool spindle; Inputting the vibration signal sequence into a pre-trained deep temporal convolutional network, the deep temporal convolutional network predicting the error category to which the dynamic error of the CNC machine tool spindle belongs, wherein the dynamic error range covered by the CNC machine tool spindle during operation is divided into multiple error categories, each error category corresponding to a sub-range of the dynamic error range; The deep temporal convolutional network is trained by multiple sets of sample data, which are constructed based on data collected from a pre-built experimental platform for simulating the actual working environment of the CNC machine tool spindle. The experimental platform includes a spindle load simulation system, an experimental spindle, a spindle drive system, a control system, a dynamic error acquisition system, and a vibration signal acquisition system. The spindle load simulation system is used to receive loading force information set by a user from the control system, and apply a loading force to the experimental spindle based on the loading force information; The spindle drive system is used to receive the rotation speed information set by the user from the control system, and drive the experimental spindle to rotate based on the rotation speed information; The vibration signal acquisition system includes one or more sensors for collecting the vibration signal of the experimental spindle and sending it to the control system; The dynamic error acquisition system is used to acquire the dynamic error of the experimental spindle and send it to the control system.
[0005] According to a second aspect of the present application, a computer program product is provided, which includes a computer program. When the computer program is executed, the method mentioned in the first aspect is implemented.
[0006] According to a third aspect of the present application, an electronic device is provided, comprising a processor, a memory, and a computer program stored in the memory for execution by the processor, wherein the processor implements the method mentioned in the first aspect when executing the computer program.
[0007] According to a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed, the method mentioned in the first aspect is implemented.
[0008] By applying the solution provided in this application, an experimental platform can be constructed to simulate the actual working environment of a CNC machine tool spindle. This experimental platform can simulate the working state of the machine tool spindle under different operating conditions and collect the vibration signal sequence and dynamic error of the spindle under different working conditions to construct sample data for training a dynamic error prediction model. Because the experimental platform can simulate the actual working environment of the machine tool spindle, the collected sample data can truly reflect the actual working state of the machine tool spindle and can cover the actual working state of the machine tool spindle under different operating conditions. The dynamic error model trained using this sample data has better performance and the predicted dynamic error of the machine tool spindle is also more accurate.
[0009] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0011] Figure 1 It is a structural diagram of an experimental platform of an embodiment of the present application.
[0012] Figure 2It is a schematic diagram of a vertical spindle simulation loading experimental platform according to an embodiment of the present application.
[0013] Figure 3 It is a schematic diagram of a horizontal spindle simulation loading experimental platform according to an embodiment of the present application.
[0014] Figure 4 This is a flow chart of a method for determining the dynamic error of a CNC machine tool spindle according to an embodiment of the present application.
[0015] Figure 5 This is a flow chart of a method for determining the dynamic error of a CNC machine tool spindle according to another embodiment of the present application.
[0016] Figure 6 It is a structural diagram of a deep temporal convolutional network according to an embodiment of the present application.
[0017] Figure 7 This is a trend chart of model training accuracy and loss value under four RPM conditions.
[0018] Figure 8 It is the distribution diagram of vertical spindle error value.
[0019] Figure 9 This is the correspondence diagram between the vibration signal sequence and dynamic error categories of the vertical spindle training set.
[0020] Figure 10 It is the chaos matrix diagram of dynamic error prediction of vertical spindle at various speeds.
[0021] Figure 11 It is a structural diagram of the vertical spindle simulation loading test bench.
[0022] Figure 12 It is a structural diagram of the horizontal spindle simulation loading test bench.
[0023] Figure 13 It is a schematic diagram of the logical structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0025] With the rapid development of the manufacturing industry, CNC machine tools, as key equipment for precision machining, have a performance that directly affects the quality of machined parts and production efficiency. As the core component of the machine tool, the size of the dynamic error of the CNC machine tool spindle is directly related to the machining accuracy and stability of the machine tool. The dynamic error of the CNC machine tool spindle refers to the error of the spindle rotation axis deviating from the ideal position due to various factors such as mechanical vibration, bearing wear, thermal deformation, etc. during the operation of the machine tool spindle. This error will affect the dimensional accuracy, shape accuracy and position accuracy of the machined parts, thereby affecting the overall machining quality. The dynamic error of the CNC machine tool spindle mainly includes radial error and axial error. Among them, the radial error refers to the error caused by the movement of the spindle rotation centerline in the radial direction, and the axial error refers to the error caused by the movement of the spindle rotation centerline in the axial direction.
[0026] In related technologies, when determining the dynamic error of a CNC machine tool spindle, the overall dynamic error of the CNC machine tool (for example, the axial or radial movement of the entire machine tool) is usually measured directly, and then the dynamic error of the spindle is estimated based on the overall dynamic error of the CNC machine tool. This method of determining the dynamic error of the machine tool spindle is not accurate enough, and the accuracy needs to be improved.
[0027] Considering the difficulty of directly measuring the dynamic error of a CNC machine tool's spindle using sensors during operation, and the fact that the dynamic error is typically correlated with the spindle's operating parameters (such as vibration data, temperature, and current), which are also relatively easy to measure, a model can be used to learn the inherent relationship between the spindle's operating parameters and the dynamic error. The trained model can then be used to predict the spindle's dynamic error based on the collected CNC machine tool's spindle operating parameters (such as vibration signals).
[0028] A notable characteristic of CNC machine tool spindle dynamic errors is their strong time-correlation. This means that over time, wear, or usage, dynamic errors can gradually increase. Therefore, when using models to predict dynamic errors, it's important to consider their time-correlation characteristics to achieve more accurate predictions.
[0029] In recent years, the development of deep learning technology, particularly the application of neural networks such as Deep Temporal Convolutional Networks (TCNs) and Bidirectional Long Short-Term Memory (BiLSTMs) to sequence data processing, has provided new insights into measuring the dynamic errors of CNC machine tool spindles. These neural networks can effectively process time series data and capture long-term dependencies within the data, offering potential applications in analyzing the dynamic errors of machine tool spindles under different operating conditions.
[0030] However, existing deep learning-based methods still face some challenges in practical applications, such as how to construct an effective training data set to obtain a large amount of effective sample data for training neural networks; how to improve the richness and coverage of samples to cover different application scenarios of CNC machine tool spindles to improve the generalization ability of trained neural networks; when using data such as the vibration signal of the spindle to indirectly measure the dynamic error of the spindle, how to extract more useful features from the vibration signal for training the neural network to improve the prediction accuracy of the neural network, etc. The solution provided in the embodiments of the present application aims to solve one or more of the above technical problems so that the dynamic error of the CNC machine tool spindle can be measured more accurately.
[0031] Based on this, an embodiment of the present application provides a model training method that can train a dynamic error prediction model, and use the dynamic error prediction model to learn the intrinsic relationship between the vibration signal sequence of the CNC machine tool spindle and the dynamic error. Then, during the operation of the CNC machine tool, the vibration signal sequence of the CNC machine tool spindle can be collected so that the model can predict the dynamic error of the spindle based on the vibration signal sequence. In addition, considering that the dynamic error is a continuous value, in order to simplify the difficulty of model prediction and improve the accuracy of model prediction, the dynamic error range covered during the actual operation of the CNC machine tool spindle can be divided into multiple error categories, and each error category corresponds to a sub-range in the dynamic error range. For example, assuming that the dynamic error of the CNC machine tool spindle will not exceed 6μm, the dynamic error can be divided into 6 categories, with each interval of 1μm as a category, namely 0-1μm, 1-2μm, 2-3μm, 3-4μm, 4-5μm, 5-6μm, etc. Of course, the way of dividing the error categories and the dynamic error range corresponding to each error category (for example, 1μm or 0.5μm) can be flexibly set based on actual needs, and this application example does not impose any restrictions.
[0032] In some embodiments, the dynamic error prediction model can be a deep temporal convolutional network. In some embodiments, the dynamic error prediction model can be a bidirectional long short-term memory network. Deep temporal convolutional networks and bidirectional long short-term memory networks perform well when processing sequential data. They can effectively process time series data and capture long-term dependencies in the data, making them more suitable for analyzing time-dependent data such as the dynamic errors of machine tool spindles under different operating conditions.
[0033] In some embodiments, an experimental platform can be pre-established to simulate the actual operating environment of a CNC machine tool spindle and collect corresponding sample data for training the dynamic error prediction model. For example, the sample data can include a vibration signal sequence reflecting the vibration conditions of an experimental spindle in the experimental platform (hereinafter referred to as a sample vibration signal sequence), as well as a label corresponding to the sample vibration signal sequence, which indicates the error category corresponding to the sample vibration signal sequence.
[0034] In some embodiments, in order to obtain a large amount of training data that truly reflects the actual working conditions of the CNC machine tool spindle and improve the richness and coverage of the training data, the applicant has designed an experimental platform for simulating the actual working environment of the CNC machine tool spindle, so as to collect a large amount of training data through the experimental platform. The structure of the experimental platform is as follows: Figure 1 As shown, the experimental platform includes: a spindle load simulation system, an experimental spindle, a spindle drive system, a control system, a dynamic error acquisition system, and a vibration signal acquisition system. The control system is communicatively connected to the spindle load simulation system, the spindle drive system, the control system, and the dynamic error acquisition system. The spindle load simulation system is configured to receive user-set loading force information from the control system and apply a loading force to the experimental spindle based on the loading force information. The spindle drive system is configured to receive user-set speed information from the control system and drive the spindle to rotate based on the speed information. The vibration signal acquisition system includes one or more vibration sensors for collecting vibration signals from the experimental spindle during operation and transmitting them to the control system. The dynamic error acquisition system is configured to collect dynamic errors of the experimental spindle and transmit them to the control system. The control system may include a user interface through which the user can set the operating conditions of the experimental spindle, such as the loading force magnitude, loading mode (constant force or variable force), loading force direction, speed, operating time, etc., to simulate the operating state of a CNC machine tool spindle under different operating conditions.
[0035] The vibration signal acquisition system can collect the vibration conditions of the experimental spindle under different operating conditions, such as axial vibration, radial vibration, etc. The dynamic error acquisition system can collect the dynamic error of the experimental spindle under different operating conditions. Then, based on the data collected by both, sample data can be constructed so that the neural network can learn the inherent relationship between the two.
[0036] By building the above-mentioned experimental platform, the load simulation system in the experimental platform can accurately simulate the application of loading forces in different directions and modes to the experimental spindle. This allows the experimental platform to truly reflect the force process of the machine tool spindle during actual part processing, thereby more realistically simulating the actual working state of the machine tool spindle. The spindle drive system can flexibly drive the spindle to rotate according to the user-set speed information received by the control system, which helps to simulate the operating state of the machine tool under different processing conditions. The vibration data acquisition system can accurately capture the vibration signal of the experimental spindle, and the dynamic error acquisition system can accurately collect the dynamic error of the experimental spindle. Sample data can then be constructed based on the vibration signal data and dynamic error data collected by both.
[0037] This experimental platform simulates the real-world state of CNC machine tool spindles under various operating conditions, allowing us to collect sample data that truly reflects the spindle's actual working conditions. This data is then used to train models and improve their prediction accuracy. Furthermore, the sample data, which covers a wide range of operating conditions, is richer and more comprehensive, further enhancing the generalization capabilities of the trained models.
[0038] Of course, in addition to the above-mentioned structure, the experimental platform can also add other components based on actual needs. For example, it can also include a speed monitoring device for monitoring the speed of the experimental spindle; it can also include a temperature sensor for monitoring the temperature of the experimental spindle; it can also include a current sensor for monitoring the current of the experimental spindle, and then it can combine the monitored speed, current, temperature and other data of the experimental spindle to analyze the changing trend of the dynamic error, etc. Of course, the experimental platform can also include an error meter for performing error correction on the data collected by each sensor, etc. The specific structure can be flexibly set based on actual needs, and the embodiments of this application do not impose any restrictions.
[0039] In some embodiments, the spindle load simulation system includes an air pump, a pneumatic servo valve, an air cylinder, a reversing relay, a loading mechanism, and a tension sensor. The air pump provides an air source. The pneumatic servo valve, located between the air pump and the air cylinder, adjusts the air pressure output by the air pump to the air cylinder to apply different loading forces to the experimental spindle, simulating the axial or radial loading forces experienced by a CNC machine tool spindle during actual part machining. The reversing relay, located between the air pump and the air cylinder, adjusts the direction of the air pressure output by the air pump to the air cylinder to achieve bidirectional operation of the air cylinder, thereby simulating loading forces applied to the experimental spindle in different directions, such as radial and axial loading forces. The air cylinder drives the loading mechanism to apply the loading force to the experimental spindle. The tension sensor, located at the connection between the loading mechanism and the air cylinder, detects the current loading force and provides feedback to the control system. This allows the control system to adjust the pneumatic servo valve based on the current loading force and the user-set loading force, ensuring that the loading force ultimately applied to the experimental spindle by the loading mechanism is the user-set loading force.
[0040] In some embodiments, the dynamic error acquisition system can include a standard rod arranged at the experimental spindle tool position, and at least three eddy current sensors, wherein the X, Y, and Z directions of the standard rod are each provided with an eddy current sensor for collecting the dynamic error of the experimental spindle. Wherein, the standard rod can be used in conjunction with the eddy current sensor to measure the distance information in the X, Y, and Z directions of the experimental spindle tool position, that is, the distance of the experimental spindle in the axial and tangential runout. The eddy current sensor can measure the distance between the standard rod and the spindle tool position contactlessly, thereby collecting dynamic error data with high precision, and by arranging the eddy current sensor in the X, Y, and Z directions, the dynamic error of the spindle in three spatial dimensions can be comprehensively evaluated.
[0041] Considering that the spindles of CNC machine tools include two types: horizontal spindles and vertical spindles, in order to cover different types of spindles and collect data on the actual working processes of different types of spindles, the embodiment of the application designs two experimental platforms, a vertical spindle simulation loading experimental platform and a horizontal spindle simulation loading experimental platform, such as Figure 2 As shown in the figure, it is a schematic diagram of a vertical spindle simulation loading experimental platform. Figure 3 Figure 1 shows a schematic diagram of a horizontal spindle simulation loading experimental platform. By providing both vertical and horizontal experimental platform designs, the working conditions of the spindle under different installation methods can be simulated, enhancing the adaptability of the experiment and the universality of the results.
[0042] In some embodiments, the experimental platform is a vertical spindle simulation loading experimental platform, and the experimental spindle is a vertical spindle. The load simulation system may include three cylinders, two of which are configured at a 90° angle to apply radial loading force to the vertical spindle, and the other cylinder is used to apply axial loading force to the vertical spindle. By applying radial loading force with two cylinders configured at a 90° angle and axial loading force with one cylinder, various load conditions that the vertical spindle may encounter during actual processing can be accurately simulated, allowing the experimental platform to adapt to different testing requirements.
[0043] In some embodiments, the experimental platform is a horizontal spindle simulation loading experimental platform, and the experimental spindle is a horizontal spindle. The load simulation system includes three cylinders, two of which are arranged at a 45° angle to apply radial loading force to the horizontal spindle, and the other cylinder is used to apply axial loading force to the horizontal spindle. By applying radial loading force with two cylinders arranged at a 45° angle and axial loading force with one cylinder, various load conditions that a horizontal spindle may encounter during actual machining can be accurately simulated, allowing the experimental platform to adapt to different testing requirements.
[0044] In some embodiments, the experimental platform is a vertical spindle simulation loading experimental platform, and the experimental spindle is a vertical spindle. For the vertical spindle simulation loading experimental platform, the experimental platform also includes a ground platform for supporting and fixing the vertical spindle. The vibration signal acquisition system includes three vibration sensors, which are respectively installed at the front bearing of the vertical spindle, the loading mechanism and the ground platform. Taking into account that the vertical spindle has higher requirements for precision, three vibration sensors can be set for the vertical spindle to collect vibration signals in different directions for predicting dynamic errors in order to obtain more accurate dynamic errors. By installing vibration sensors at different key positions of the vertical spindle, the vibration characteristics of the spindle under different working conditions can be accurately captured, thereby more accurately evaluating the dynamic error of the spindle.
[0045] In some embodiments, the experimental platform is a horizontal spindle simulated loading experimental platform, the experimental spindle is a horizontal spindle, and the horizontal spindle simulated loading experimental platform is built on a horizontal iron with standard T-slots, and the total weight of the horizontal iron exceeds 2 tons. By building the experimental platform on the horizontal iron with standard T-slots and setting the total weight of the horizontal iron to be larger, the experimental platform is provided with additional stability, reducing vibration and displacement that may occur during the experiment, thereby ensuring the accuracy of the measurement results.
[0046] In some embodiments, the experimental platform provided in the above embodiments can be used to collect multiple sets of sample data, and then the dynamic error measurement model can be trained using the multiple sets of sample data. Each set of sample data includes a sample vibration signal sequence and a label corresponding to the sample vibration signal sequence, and the label is used to indicate the error category corresponding to the sample vibration signal sequence. Each set of sample data can be determined based on the following method: during the operation of the experimental spindle in the experimental platform, the original vibration signal sequence collected by the vibration signal acquisition system in the target time period is obtained, and the original dynamic error sequence collected synchronously by the dynamic error acquisition system in the target time period is obtained. Then, the sample vibration sequence signal in each set of sample data can be determined based on the original vibration signal. For example, the original vibration signal can be directly used as the sample vibration sequence signal, or the original vibration signal can be preprocessed, such as normalization processing, feature extraction processing, etc., and the processed vibration signal sequence can be used as the sample vibration sequence signal. Then, the mean of the original dynamic error sequence can be determined, and the error category corresponding to the mean can be determined as the label of the sample vibration sequence signal.
[0047] In some embodiments, to ensure that the collected sample data covers as many operating conditions as possible for the CNC machine tool spindle and to enhance the richness and comprehensiveness of the sample data, multiple sets of sample data can be constructed based on data collected by the vibration signal acquisition system and the dynamic error acquisition system under different operating conditions of the experimental spindle. The different operating conditions include combined conditions obtained by combining multiple speeds and multiple loading forces. For example, data can be collected for the experimental spindle under multiple speeds (e.g., 1000, 2000, 3000, 4000, 5000) and different axial forces (e.g., 0N, 500N, 1000N, 1500N, 2000N) and different radial forces (e.g., 0N, 700N, 1400N, 2100N, 2800N), resulting in a large amount of sample data. By collecting data under different operating conditions, including multiple speeds and multiple loading force combinations, the dataset is ensured to fully cover the various operating conditions that the CNC machine tool spindle may encounter.
[0048] In addition, in order to collect data that truly reflects the CNC machine tool spindle in the actual working environment, in some embodiments, the process of applying a loading force to the experimental spindle at each speed includes a constant force loading stage and a variable force loading stage, wherein the constant force loading stage uses a first loading force to load the experimental spindle with a constant force in the early stage, and uses a second loading force to load the experimental spindle with a constant force in the later stage, and the first loading force is less than the second loading force. The design of the constant force loading stage and the variable force loading stage simulates the different load conditions that the machine tool spindle may encounter during the actual processing process, making the experimental results closer to the actual application scenario, and by controlling the loading force in the constant force loading stage to be smaller in the early stage and larger in the later stage, the force conditions of the spindle when processing parts can be more realistically simulated.
[0049] In some embodiments, taking into account that there may be certain differences in vibration signals collected under different vibration sensors or different test conditions, in order to eliminate the differences caused by equipment and test conditions, the sample vibration signal sequence can be a vibration signal sequence obtained by normalizing the original vibration signal of the collected experimental spindle, wherein the normalization process is as follows: dividing the collected original vibration signal sequence into multiple vibration signal sequence blocks, determining the mean and variance of each vibration signal sequence block, and determining the minimum mean and maximum variance from the means and variances corresponding to each of the multiple vibration signal sequence blocks, for each original vibration signal in the original vibration signal sequence, the difference between the original vibration signal and the minimum mean, and the ratio of the maximum variance, are used as the vibration signal after the original vibration signal is normalized.
[0050] Among them, the normalization process ensures that different vibration signal sequences have a uniform scale, which helps to eliminate the impact of different test conditions or different sensors, making the data more standardized. Through normalization, the model can perform consistently on different data sets, improving the model's generalization ability for unseen data. In addition, the normalized data can enhance the distinction between different features, helping the model to better learn and identify features related to dynamic errors. The normalization process can reduce the impact of noise by adjusting the variance of the signal, thereby improving the quality of the signal. In addition, the normalized data can simplify the model training process because the model does not need to learn the scale information of the data during training, which helps to improve the accuracy of the model in predicting dynamic errors.
[0051] Among them, in the model training stage, if the sample vibration signal sequence in the sample data is normalized, then in the model application stage, the collected vibration signal sequence of the CNC machine tool spindle can also be normalized and then input into the trained model to predict the dynamic error.
[0052] In some embodiments, the sample vibration signal sequence can be a new vibration signal sequence obtained by extracting and fusing the features of the original vibration signal sequence of the collected experimental spindle. For example, after obtaining the original vibration signal sequence of the experimental spindle collected by the experimental platform, the original vibration signal sequence can be processed into blocks to obtain multiple vibration signal sequence blocks, and then each vibration signal sequence block can be subjected to local mean decomposition processing to obtain the first sample signal feature and the second sample signal feature corresponding to the vibration signal sequence block, and the first sample signal feature corresponding to each vibration signal sequence block in the multiple vibration signal sequence blocks is used to form a first sample signal feature sequence, and the second sample signal feature corresponding to each vibration signal sequence block in the multiple vibration signal sequence blocks is used to form a second sample signal feature sequence. The first sample signal feature sequence and the second sample signal feature sequence can then be fused to obtain a fused vibration signal sequence, wherein the i-th vibration signal in the fused vibration signal sequence is obtained by weighted fusion of the i-th signal feature in the first sample signal feature sequence and the i-th signal feature in the second sample signal feature sequence. As i increases, the fusion weight of the first sample signal feature in the first sample signal feature sequence also increases, wherein i is a positive integer. The fused vibration signal sequence can then be used as the sample vibration signal sequence in each group of sample data, as the input of the model, for training the model. The fusion weight can grow in a step-by-step manner. For example, the fusion weight of the first sample signal feature in the next group of signal features to be fused can be a certain value added to the fusion weight of the first sample signal feature in the previous group of signal features to be fused, so that the model can learn the influence of different features on the dynamic error. By performing block processing and local mean decomposition on the original vibration signal sequence, more detailed features can be extracted from the vibration signal, which helps understand the vibration characteristics of the machine tool spindle. Furthermore, by constructing a first sample signal feature sequence and a second sample signal feature sequence, information related to dynamic errors in the vibration signal can be better expressed. By fusing the two sequences, the advantages of both feature sequences can be combined. Weighted fusion optimizes the feature combination and improves the model's ability to predict dynamic errors. Furthermore, by dynamically adjusting the fusion weights for each set of signal features, the model automatically "learns" which features are most useful for the current task, allowing the model to adapt to different signal characteristics, which helps it maintain good performance under different conditions. The fused vibration signal sequence can be used as input for deep learning models, helping to improve the accuracy of dynamic error prediction and enhance the model's ability to generalize to data under different operating conditions.
[0053] Among them, in the model training stage, if the sample vibration signal sequence in the sample data is subjected to local mean decomposition and fusion processing, then in the model application stage, the collected vibration signal sequence of the CNC machine tool spindle can also be subjected to local mean decomposition and fusion processing, and then input into the trained model to predict dynamic errors.
[0054] In some embodiments, the collected original vibration signal may be normalized first, and then the normalized vibration signal sequence may be subjected to the above-mentioned local mean decomposition and fusion processing to obtain a new fused vibration signal sequence for training the model.
[0055] In some embodiments, each set of sample data includes a sample vibration signal sequence and a label corresponding to the sample vibration signal sequence, and the label is used to indicate the error category corresponding to the sample vibration signal sequence. The dynamic error prediction model can be trained based on the following method: the sample vibration signal sequence corresponding to each set of sample data can be input into a preset model, and the model outputs the predicted probability of each set of sample vibration signal sequence being each error category in a plurality of error categories. Then, a target loss can be constructed based on the predicted probability of each set of sample vibration signal sequence being each error category in a plurality of error categories, the actual probability of each set of sample vibration signal sequence being each error category in a plurality of error categories, and the weight value of each set of sample vibration signal sequence. The model parameters of the model are adjusted based on the target loss to train the model, thereby obtaining a dynamic error prediction model, wherein the weight value of each set of sample vibration signal sequence is negatively correlated with the proportion of noise signals in the set of vibration signal sequences.
[0056] In some embodiments, the target loss is determined by the following formula:
[0057] Where N is the number of sample vibration sequence signals input into the model, K is the total number of error categories into which the dynamic error range covered by the CNC machine tool spindle during operation is divided, zi is the weight value of the i-th sample vibration sequence signal, aij is the predicted probability predicted by the model that the i-th sample vibration sequence signal belongs to the j-th error category, and yij is the actual probability that the i-th sample vibration sequence signal belongs to the j-th error category.
[0058] Taking into account the different proportions of noise in different samples (i.e., different sample vibration signal sequences), when constructing the loss function, the weight value of each sample can be adjusted based on the noise adaptability in each sample. The loss function can balance the contribution of different samples to the overall loss, especially giving smaller weights to samples with more noise, thereby reducing the interference of noise signals on the model and improving the accuracy of the trained model.
[0059] After the dynamic error prediction model is trained, it can be used to predict the dynamic error of a CNC machine tool spindle. For example, during the operation of a CNC machine tool, a vibration sensor can be used to collect the spindle's vibration signal sequence. This vibration signal sequence can be input into the model, and the model can predict the error category of the current dynamic error, such as whether the dynamic error is 1-2μm or 2-3μm.
[0060] Furthermore, embodiments of the present application provide a method for determining the dynamic error of a CNC machine tool spindle. This method can be performed by an electronic device equipped with a pre-trained dynamic error prediction model, such as a mobile phone, a computer, or a server. The pre-trained dynamic error prediction model can be a deep temporal convolutional network or a bidirectional long short-term memory network.
[0061] like Figure 4 As shown, the method may include the following steps: S402, obtaining a vibration signal sequence for characterizing the vibration of a spindle of a CNC machine tool; In step S402, a vibration signal sequence of the machine tool spindle during operation, which is collected by a vibration sensor, may be obtained.
[0062] S404. Input the vibration signal sequence into a pre-trained dynamic error prediction model, and use the dynamic error prediction model to predict the error category to which the dynamic error of the CNC machine tool spindle belongs, wherein the dynamic error range covered by the CNC machine tool spindle during operation is divided into multiple error categories, and each error category corresponds to a sub-range in the dynamic error range; the dynamic error prediction model is obtained by training multiple groups of sample data, and the multiple groups of sample data are constructed based on data collected from a pre-built experimental platform for simulating the actual working environment of the CNC machine tool spindle.
[0063] In step S404, the vibration signal sequence may be input into a pre-trained dynamic error prediction model, and the model may predict the error category to which the dynamic error of the CNC machine tool spindle belongs.
[0064] Among them, the specific structure of the experimental platform can refer to the description in the above embodiment and will not be repeated here. The training method of the dynamic error prediction model can also refer to the description in the above embodiment and will not be repeated here.
[0065] In some embodiments, in order to ensure that different vibration signal sequences have a unified scale, to eliminate the influence of different test conditions or different sensors, and to make the data more standardized, the vibration signal sequence input into the dynamic error prediction model can be a vibration signal sequence obtained by normalizing the original vibration signal of the CNC machine tool spindle collected, wherein the normalization process is as follows: the collected original vibration signal sequence is divided into multiple vibration signal sequence blocks, the mean and variance of each vibration signal sequence block are determined, and the minimum mean and maximum variance are determined from the means and variances corresponding to each of the multiple vibration signal sequence blocks. For each original vibration signal in the original vibration signal sequence, the difference between the original vibration signal and the minimum mean and the ratio of the maximum variance are used as the vibration signal after the original vibration signal is normalized. For example, the following formula can be used to determine the vibration signal after normalization:
[0066] Where x*(t) is the normalized vibration signal, xs(t) represents the original vibration signal, Emin represents the minimum mean among the means of each vibration sequence block, and Dmax represents the maximum variance among the variances of each vibration sequence block.
[0067] In some embodiments, in order to extract more effective features from the vibration signal sequence and improve the accuracy of the model prediction results, the vibration signal sequence input to the model can be a new vibration signal sequence obtained by feature extraction and fusion of the original vibration signal sequence collected from the spindle of a CNC machine tool. Figure 5As shown, the original vibration signal sequence 9 of the CNC machine tool spindle collected by the vibration sensor can be obtained (S502). The original vibration signal sequence can then be divided into blocks to obtain multiple vibration signal sequence blocks (S504). Each vibration signal sequence block can then be subjected to local mean decomposition to obtain the first signal feature and the second signal feature corresponding to the vibration signal sequence block. The first signal feature corresponding to each vibration signal sequence block in the multiple vibration signal sequence blocks is used to form a first signal feature sequence, and the second signal feature corresponding to each vibration signal sequence block in the multiple vibration signal sequence blocks is used to form a second signal feature sequence (S506). The first signal feature sequence and the second signal feature sequence can then be fused to obtain a fused vibration signal sequence (S508), wherein the i-th vibration signal in the fused vibration signal sequence is obtained by weighted fusion of the i-th signal feature in the first signal feature sequence and the i-th signal feature in the second signal feature sequence. As i increases, the fusion weight of the first signal feature in the first signal feature sequence also increases, wherein i is a positive integer. The fused vibration signal sequence can then be input into a trained dynamic error prediction model (e.g., a bidirectional long short-term memory network) to predict the current dynamic error of the data-controlled machine tool spindle (S510). The fusion weight can be increased in a step-by-step manner. For example, the fusion weight of the first sample signal feature in the next set of signal features to be fused can be increased by a certain value based on the fusion weight of the first sample signal feature in the previous set of signal features to be fused, so that the model can learn the impact of different features on the dynamic error. The first signal feature and the second signal feature can represent different types of characteristics of the vibration signal, such as the high-frequency and low-frequency components of the vibration signal.
[0068] In some embodiments, the collected original vibration signal can be normalized first, and then the normalized vibration signal sequence can be subjected to the above-mentioned local mean decomposition and fusion processing to obtain a new fused vibration signal sequence, which is then input into the model so that the model can predict the dynamic error of the CNC machine tool spindle based on the fused vibration signal sequence.
[0069] In some embodiments, the dynamic error prediction model can be a deep temporal convolutional network, wherein the deep temporal convolutional network includes an input layer, a feature extraction layer, a fully connected layer and an output layer, wherein the feature extraction layer includes 4 residual blocks connected in series, the input layer is used to obtain the input vibration signal sequence and input it into the feature extraction layer, the feature extraction layer is used to extract features from the vibration signal sequence, the fully connected layer is used to perform fully connected processing on the features output by the feature extraction layer, and the output layer is used to determine the error category corresponding to the vibration signal sequence based on the features output by the fully connected layer.
[0070] Among them, the solutions of the above embodiments can be freely combined to obtain new solutions when there is no conflict. Due to space constraints, they will not be listed one by one here.
[0071] The following describes the method for determining the dynamic error of a CNC machine tool spindle provided by the present application in conjunction with a specific embodiment.
[0072] In this embodiment, a deep temporal convolutional network can be trained to predict the dynamic error of a CNC machine tool spindle, which can specifically include the following steps: S1. Build a spindle simulation loading experimental platform and set a vibration sensor and a dynamic error acquisition system on the spindle to detect the radial and / or axial vibration of the spindle.
[0073] The spindle simulation loading test platform is divided into a vertical spindle simulation loading test platform and a horizontal spindle simulation loading test platform (the specific construction structure of the test platform is described at the end of the example). The cylinder diameter of the test platform reaches 100mm, the output contact surface of the ejector pin does not exceed 20mm, and the theoretical air pressure loading force can reach 4kN. The vertical and horizontal spindle simulation loading test platforms share the same principles and methods. According to the input table loading spectrum, the loading force setting, speed control, and data acquisition functions are fully automatically realized. The maximum radial and axial loading force is 4000N, and the maximum loading frequency is 10Hz (sinusoidal signal, 50 output points per full cycle). The dynamic errors of the spindle (rotational error, axial runout, etc.) can be monitored in real time with a minimum resolution of 0.25μm.
[0074] S2. Start the spindle, and rotate it for no less than 10 hours per day. Collect data on the spindle for 100 days on the experimental platform. According to the 100-day wear test on the experimental platform, the cumulative wear time exceeds 1000 hours. Mainly collect vibration signal data sets and dynamic error data sets when the spindle achieves speeds of 1000, 2000, 3000, and 4000. After the spindle startup experiment, the experimental process includes two parts: the wear loading process and the data collection process. Generally, the wear loading process is carried out in the mode of initial constant force loading ~ later increasing the axial and transverse constant forces and integrating variable force loading at the same time, and the time series of each sensor is collected to form a data set. Through data collection and analysis, it is known that by the influence of rotational speed, force and running time on the spindle error, it is found that the influence of rotational speed on the spindle error is: the higher the rotational speed, the greater the spindle error; when RPM < 1500, with the increase of wear time, although the forces are different, the spindle error approaches the same broken line; when RPM > 1500, the change rate of the spindle error is relatively small, but when the rotational speed is 4000, the error value is greatly affected by the force. The conclusion about the influence of spindle force is: when the rotational speed is low, the force affects the spindle error with small fluctuations, and when the rotational speed is high, the force affects the fluctuations greatly; when 1500 < RPM < 3500, the experimental spindle error values are very close and the influence of force is small. For the influence of spindle error on the service time: when the experimental spindle is at RPM = 1000, the spindle accuracy retention is good, while for RPM = 2000, 3000 and 4000, with the passage of service time, the error value gradually increases.
[0075] Therefore, the spindle simulation loading experimental platform conducts combined acquisition verification on the force conditions. During the whole process, the spindle is collected with axial forces of 0N, 500N, 1000N, 1500N and 2000N, and radial forces of 0N, 700N, 1400N, 2100N and 2800N, and the acquisitions under various variable and constant forces are also carried out for rotational speeds of 1000, 2000, 3000, 4000 and 5000.
[0076] S3. Construct a deep time convolutional network. The entire network architecture is as Figure 6 shown, including an input layer (Inputlayer), 4 residual blocks (Residual Block 1 ~ Residual Block 4), a fully connected layer (Fully connected Layer) and an output layer (Softmax Layer). The input layer normalizes the input vibration signal sequence. Immediately after the input layer are 4 residual blocks, which are used to extract features from the input vibration signal sequence. Then, the fully connected (Fully ConnectedLayer) layer fully connects the extracted features to flatten the vibration signal sequence data. Finally, the error category recognition is completed through the output layer (i.e., the Softmax layer). Among them, the dynamic error of the spindle can be divided into multiple error categories (Target a1 ~ Target aK), and the interval between different error categories is 1μm.
[0077] When training the deep time convolutional network, the following loss function can be constructed:
[0078] Among them, loss is the objective function, N is the number of sample vibration sequence signals input into the model, K is the total number of error categories divided by the dynamic error range covered by the CNC machine tool spindle during operation, zi is the weight value of the i-th sample vibration sequence signal, aij is the predicted probability predicted by the model that the i-th sample vibration sequence signal belongs to the j-th error category, and yij is the actual probability that the i-th sample vibration sequence signal belongs to the j-th error category.
[0079] S4. Using the data collected in step S2, divide it into a training set and a test set. For the 100 days of data, the ratio of the training set to the test set is 9:1. For the entire sample ratio, the first 90 days of 100 days are used as the training set, and the last 10 days of 20,000 samples are used as the test set. This means that the first 90 days of data are used to train the model, and the last 10 days of data are used to verify the model performance.
[0080] S5. Import the training set in step S4 into the deep temporal convolutional network in step S3 for model training. Then, import the test set into the trained model to verify the performance of the model. The indirect measurement accuracy under the speed conditions of RPM=1000, RPM=2000, RPM=3000 and RPM=4000 can be verified respectively.
[0081] (1) Use the data collected from the horizontal spindle simulation loading test platform to train and verify the model The indirect measurement accuracy is verified under RPM=1000, RPM=2000, RPM=3000 and RPM=4000 respectively. When the speed is 1000, the training process draws a waveform diagram for the training process provided by Matlab. By configuring the output during training, the corresponding training accuracy and loss value are output every iteration. Finally, the results of each output are drawn into a graph. The changes in the accuracy and loss value of the sample training process at each speed are as follows: Figure 7 As shown in the figure, with the increase in the number of training iterations, the training accuracy continues to improve, and the training loss value continues to approach 0, indicating that the network architecture can maintain a high convergence under all four speeds. The convergence effect of training accuracy shows that the convergence of the speed of 1000 is better than that of other speeds. This is mainly because the noise introduced by the spindle at a lower speed is relatively small, making it easier to extract and learn features.
[0082] After completing the model training, the performance of the trained model can be verified using the test set. In order to facilitate the observation of the relationship between the true error value and the actual error value, the difference between the predicted results and the actual results can be presented in the form of a chaos matrix.
[0083] The verification method in this part adopts the TCN-based predictive measurement to perform equal length expansion according to the acquisition frequency of the vibration sequence (20KSa). Then the single error value can be expanded by 20,000 data, resulting in obvious differences in the error values in the chaotic matrix.
[0084] Although predictions varied between correct and incorrect predictions at different speeds, the accuracy of the spindle dynamic error measurements at each RPM was 91.23%, 91.78%, 94.12%, and 91.65%, respectively. The measurement results indicate that the spindle dynamic error measurement results are optimal at RPM=3000. In fact, the experimental spindle's rated speed is 2800, and the test speed at RPM=3000 is closest to the rated speed. The error values at RPM=3000 are the fewest. Given the same sample set at RPM=1000, RPM=2000, and RPM=4000, RPM=3000 requires the fewest classifications, allowing for more training samples for each error, resulting in the highest prediction accuracy.
[0085] (2) Use the data collected by the vertical spindle simulation loading test platform to train and verify the model The error value is segmented into 1um intervals and the number of occurrences is counted. The statistical distribution results are as follows: Figure 8 As shown in the figure, except for the four-category error distribution at RPM = 3000, all other spindle error values have only three categories. As the speed increases, the distribution of spindle error values also changes. At RPM = 1000, the most common error value is 3μm; at RPM = 2000, the most common error value is 3μm; at RPM = 3000, the most common error value is 4μm; at RPM = 4000, the most common error value is 4μm; and at RPM = 5000, the most common error value is 4μm or 5μm.
[0086] At the same time, it is found that the error value of the vertically mounted spindle (i.e. vertical spindle) experimental platform is relatively low, mainly because the horizontally mounted spindle (i.e. horizontal spindle) is used for rough machining, and the vertically mounted spindle is mainly used for five-axis CNC machine tools, which can be said to be a finishing spindle. The data collected by the experimental platform can be preprocessed to construct a corresponding relationship between a single error value and a sequence, such as Figure 10 shown.
[0087] Figure 9The five small figures, arranged from left to right, represent the corresponding relationship between vibration sequences and error classes for RPM = 1000, RPM = 2000, RPM = 3000, RPM = 4000, and RPM = 5000. In addition, some differences can be seen in the vibration amplitudes. For example, at RPM = 1000, when the error value is 4μm, the vibration amplitude is significantly lower than 2μm and 3μm. At RPM = 2000, when the error value is 4μm, the waveform amplitude fluctuates faster than 3μm and 5μm. At RPM = 3000, when the error class is 3μm, the vibration amplitude is higher than other error classes. Similarly, at RPM = 5000, the error class of 5μm is also significantly different from other error classes. The data verification of the vertical spindle simulation loading test platform adopts the same method as the data verification of the horizontal spindle simulation loading test platform, except that the maximum number of training rounds is modified in the training parameters from 100 to 200.
[0088] The setup of test and prediction samples is essentially complete after the input sequence processing. The input-to-test sample ratio is 120,000:30,000 = 4:1, a slight change from the horizontal sample ratio, equivalent to using fewer samples for model training. The data shows that training accuracy gradually improves throughout training, ultimately approaching 100% at all speeds, indicating good convergence of training accuracy. The loss also gradually decreases throughout training, ultimately approaching 0 at all speeds, indicating good convergence of training loss.
[0089] The model verification results are as follows: Finally, the chaotic matrix at each speed is formed as follows: Figure 10 As shown, Figure 10 The small figures in the figure are the chaos matrices representing the differences between the predicted results and the actual results when the speed is RPM=1000, RPM=2000, RPM=3000, RPM=4000 and RPM=5000, respectively, from top to bottom and from left to right. Figure 10 It's easy to see that the crossover values are much larger than the off-diagonal values, indicating a high level of accuracy for all speed predictions. At 3000 RPM, four error classes need to be predicted, while at other speeds, only three need to be predicted.
[0090] Taking the chaotic matrix at RPM = 1000 as an example, when the speed is 1000, the true value is 4um, but the prediction is 4um 3421 times, 2um 9 times, and 3um 71 times. When the true error value is 2um, the prediction is correct 1499 times, and no other error values are predicted. For the true error value of 3um, the prediction is incorrect 48 times and the prediction is correct 3um 34952 times. In addition, the error prediction accuracy at each speed is calculated using the mean error, and the final error prediction accuracy for each speed is: 96.68%, 94.69%, 96.85%, 95.89%, and 96.90%, respectively.
[0091] Data results show that TCN can achieve over 90% prediction accuracy for trained models. TCN, which makes trade-offs in temporal memory associations, completed indirect measurement verification of horizontal spindle dynamic errors, achieving indirect measurement accuracies of 96.68%, 96.69%, 96.85%, and 95.89% at speeds of 1000, 2000, 3000, and 4000, respectively. Because the vertical experimental platform is derived from the horizontal one, in addition to the relevant verification discussion similar to the horizontal one, structural optimization of the vertical experimental platform was added, ultimately achieving indirect measurement accuracies of 96.68%, 94.69%, 96.85%, 95.89%, and 96.90% at speeds of 1000, 2000, 3000, 4000, and 5000, respectively.
[0092] In this embodiment, the specific structure of the horizontal spindle simulation loading experimental platform involved in step S1 is as follows: Figure 11 As shown, it includes pneumatic loading hardware, a horizontal spindle test platform, acquisition and control, and spindle dynamic error acquisition. Before building the test platform, modal analysis is performed using the finite element method. Modal analysis can determine the natural frequency and natural vibration mode of the structure, which is the core of structural dynamic analysis. Natural frequency and natural vibration mode can reflect the frequency at which the structure resonates and the vibration mode. The specific structure of the horizontal test platform is as follows: The pneumatic loading hardware is mainly composed of an air pump that provides air source, three air pressure servo valves that control the air pressure, and two reversing relays. Among the three air pressure servo valves and two reversing relays, one air pressure servo valve is used for spindle axial loading, and the other two air pressure servo valves are used for spindle radial loading, corresponding to one reversing relay. The horizontal spindle experimental platform is mainly composed of a program-controlled horizontal spindle, a vibration sensor I, three tension sensors I, three cylinders I and a spindle simulation loading mechanism. The program-controlled horizontal spindle is mainly connected to the frequency converter power supply and encoder. Two of the three cylinders realize radial loading of the horizontal spindle through the loading mechanism and form a 45° angle, and one of the three cylinders realizes axial loading of the horizontal spindle. A tension and pressure sensor is added at the connection between each cylinder and the horizontal spindle simulation loading mechanism. All radial or axial loading of the horizontal spindle is completed by the air inlet and outlet control of cylinder I of the horizontal spindle experimental platform. The diameter of cylinder I used in the experimental platform reaches 100mm, the output contact surface of the push rod does not exceed 20mm, and the theoretical air pressure loading force can reach 4KN.
[0093] During the simulated loading process, the rotation of the horizontal spindle drives the inner ring of the ball bearing to rotate at high speed, while the outer ring and the fixed sleeve remain stationary. This simulated loading mechanism design simulates the spindle machining process by controlling the cylinder, not only saving actual processing material waste but also achieving a fully automated loading process through the loading spectrum.
[0094] The data acquisition and control system primarily consists of a data acquisition unit, a spindle driver, and a computer monitor. Vibration sensor I is connected to the data acquisition unit via a BNC connector, enabling closed-loop force and spindle speed control, as well as collecting data from the tension sensor. The acquisition control unit, acting as a PXIe-1082, controls the pneumatic loading unit via the analog output (AO) channel, which in turn controls the cylinder via the pneumatic servo valve, thereby applying force to the loading mechanism. The force sensor provides feedback via a four-wire differential signal to the analog input (AI) channel of the PXIe-1082, enabling the PXIe-108 data acquisition unit to implement closed-loop monitoring of the loading force. The PXIe-1082 communicates with the spindle driver via an RS485-USB interface, enabling control of the horizontal spindle's speed, torque, and acceleration / deceleration. The driver outputs three-phase power (UV / W) to operate the spindle, while encoder information is fed back to facilitate accurate spindle speed information.
[0095] The spindle error acquisition part mainly includes three eddy current sensors for collecting distance information in the three directions of XYZ of the standard rod, one speed monitoring Hall sensor, one standard rod and the error meter required for sensor data conditioning. The error meter outputs a digital signal which is directly connected to the data collector and the control unit USB interface through a USB data cable.
[0096] In addition, the entire horizontal spindle simulation loading test platform is built on top of a horizontal iron with standard T-slots. The total weight of the horizontal iron exceeds 2 tons. Such a high weight ensures that the spindle has better static support when running on it.
[0097] In this embodiment, the vertical spindle simulation loading experimental platform involved in step S1 is as follows: Figure 12 As shown, it includes a vertical spindle experimental platform, a pneumatic servo control unit, a vertical spindle state data acquisition unit, and a vertical spindle precision measurement unit. Before building the experimental platform, a modal analysis is performed using the finite element method. Modal analysis can obtain the natural frequency and natural vibration mode of the structure, which is the core of structural dynamic analysis. The natural frequency and natural vibration mode can reflect the frequency at which the structure resonates and the vibration mode. The specific structure of the vertical spindle is as follows: The experimental platform is installed using four anchors. After installation, a spirit level is placed in the middle of the experimental platform. The four anchors are adjusted to ensure that the entire platform is level. To prevent the spindle installation from damaging the ground and to increase the static stiffness of the entire platform, a universal platform is used as the installation base. The weight of the entire base reaches 1.5 tons.
[0098] The vertical spindle experimental platform includes a ground platform for placing the vertical spindle, a vertical spindle and a vertical spindle loading cylinder, as well as a vibration sensor II, a temperature sensor II and a tension sensor II pre-buried in the vertical spindle. There are three vibration sensors II, which are installed at the front bearing of the vertical spindle, the loading bearing and the ground platform respectively. There are three temperature sensors II, two of which are pre-buried in the front and rear bearings of the vertical spindle, and one is magnetically attracted to the outer ring of the loading bearing. There are three vertical spindle loading cylinders, two of which are used for radial loading and one for axial loading. The two radial loading cylinders form a 90° angle. The servo cylinder can achieve a uniaxial loading force of 4000N on the spindle. The tension sensor II is installed between the vertical spindle loading cylinder and the loading bearing, and can measure a maximum range of 5000N. In this way, a closed-loop control system is formed for the relationship between the air pressure and force controlled by the servo cylinder output to ensure the effectiveness of force control and air pressure output.
[0099] The pneumatic servo control unit mainly includes three pneumatic servo valves, three cylinders and a reversing solenoid valve. Two of the pneumatic servo valves form a 90° angle and are used for radial loading of the vertical spindle. The other pneumatic servo valve realizes axial loading of the spindle. The reversing solenoid valve is connected to the pneumatic servo valve to realize the reversal of the vertical spindle loading force, which can realize the tensile and compressive loading process of the spindle.
[0100] like Figure 12As shown, the vertical spindle status data acquisition unit includes a data acquisition chassis. It uses sensors to monitor and collect spindle status. The acquisition platform uses the high-performance PXIe-1082 data acquisition chassis. The experimental platform primarily monitors vibration, current, and temperature signals. Three vibration sensors are installed at the loading bearing, the front spindle bearing, and near the ground platform. These sensors are magnetically mounted. The experimental platform utilizes a 3-axis vibration sensor, with all three sensors oriented in the same direction. Three temperature sensors measure the temperature at the loading bearing, the front spindle support bearing, and the rear support bearing. The current sensor primarily collects the three-phase UVW current output by the servo drive. The sensor uses a high-precision current transformer.
[0101] The vertical spindle precision measurement unit measures the distance between the tool and the reference rod. It includes three eddy-current sensors connected to a precision conditioning unit. Two of these sensors measure radial X- and Y-axis distances, while the third measures the spindle's axial direction. The unit also measures the rod's rotational speed. The eddy-current sensors are connected to the corresponding precision conditioning unit. The calculated results are uploaded to a PC via a USB cable, where the spindle's precision information is displayed.
[0102] The dynamic error measurement solution for CNC machine tool spindles provided in this embodiment has the following beneficial effects: (1) Since the indirect measurement method only considers the temporal memory association characteristics and lacks the multi-layer perception filtering capability, a classification model based on the temporal convolution characteristic sequence is constructed to achieve a more accurate indirect measurement of the spindle dynamic error and the model training consumes less time.
[0103] (2) In order for deep network methods to be more effectively applied, they need to be built on the basis of a complete spindle dynamic error data set. First, the installation posture is diversified. The data set comes not only from the horizontally installed spindle test platform, but also from the vertically installed spindle test platform. Secondly, the data set comes from multiple wear states. Whether it is a horizontally or vertically installed spindle, a staged wear experiment is carried out according to the existing loading spectrum model, and the corresponding dynamic error and state information are collected after each wear is completed. Finally, the data set volume is also reflected. The entire data set exceeds 3TB in the horizontal direction and exceeds 1.5TB in the vertical direction. Constructing a relatively complete spindle dynamic error data set and completing a long period of spindle dynamic error tracking record will lay the data foundation for online real-time measurement of spindle dynamic error.
[0104] (3) By building a spindle simulation loading test platform, not only were data collected at various spindle speeds (1000, 2000, 3000, 4000, and even 5000), but also different combinations of axial force (0N, 500N, 1000N, 1500N, and 2000N) and radial force (0N, 700N, 1400N, 2100N, and 2800N) were considered, totaling 180 combinations. This comprehensive data collection method can more comprehensively reflect the various working conditions of the spindle in actual operation, providing a rich and accurate data foundation for subsequent model training and error evaluation. However, existing technologies lack similar comprehensive data collection research in the measurement and evaluation of dynamic errors of horizontal spindles at different speeds.
[0105] (4) A deep temporal convolutional network based on the dynamic error of the spindle with a spacing of 1 μm was constructed. The network uses the input layer to construct the corresponding sequence relationship and perform sequence normalization processing. It then connects four residual blocks, and then flattens the data through full connection. Finally, the softmax layer completes the category recognition. This model structure fully considers the temporal correlation characteristics of the spindle error accumulated over time and can effectively process time series data, thereby realizing the indirect measurement and evaluation of the spindle dynamic error. This is an effective model construction method for horizontal spindle dynamic error measurement that is not available in the existing technology.
[0106] (5) The structural design of the horizontal spindle simulation loading test platform is detailed and reasonable, including the pneumatic loading hardware part, the horizontal spindle test platform part, the acquisition and control part, and the spindle dynamic error acquisition part. Each part has a clear division of labor. For example, the pneumatic loading hardware part uses an air pump, a pneumatic servo valve, and a reversing relay to achieve loading control in different directions; the horizontal spindle test platform part uses a programmable horizontal spindle, multiple sensors, and loading mechanisms to achieve spindle loading and data acquisition. This detailed structural design can accurately simulate the working state of the horizontal spindle, which helps to accurately measure and evaluate its dynamic error. However, existing technologies may not be perfect in the design of horizontal spindle test platforms.
[0107] (6) Cross entropy is used as a quantitative calculation method for the output layer loss rate. The output layer recognition ratio is improved by calculating the loss rate of the corresponding classification output. This optimization measure helps to improve the accuracy of the model in classifying and identifying the spindle dynamic error, thereby more accurately evaluating the spindle dynamic error. This is not fully utilized in existing research on horizontal spindle dynamic error measurement and evaluation.
[0108] Accordingly, an embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed, implements the method mentioned in any of the above embodiments.
[0109] Furthermore, the present application also provides an electronic device, such as Figure 13 As shown, the electronic device includes a processor 1301, a memory 1302, and a computer program stored in the memory 1302 for execution by the processor 1301. When the processor 1301 executes the computer program, it implements the method mentioned in any of the above embodiments.
[0110] Accordingly, an embodiment of the present application further provides a computer storage medium, in which a program is stored. When the program is executed by a processor, the method in any of the above embodiments is implemented.
[0111] The embodiments of the present application may take the form of a computer program product implemented on one or more storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc, read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disks or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0112] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0113] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0114] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a..." does not exclude the presence of other identical elements in the process, method, article or device that includes the element.
[0115] The above is a detailed introduction to the methods and devices provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the methods and core ideas of the present application. At the same time, for those skilled in the art, based on the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of the present application should not be understood as a limitation on the present application.
Claims
1. A method for determining the dynamic error of a CNC machine tool spindle, characterized in that: The method comprises: Obtaining a vibration signal sequence for characterizing the vibration condition of a CNC machine tool spindle; Inputting the vibration signal sequence into a pre-trained deep temporal convolutional network, the deep temporal convolutional network predicting the error category to which the dynamic error of the CNC machine tool spindle belongs, wherein the dynamic error range covered by the CNC machine tool spindle during operation is divided into multiple error categories, each error category corresponding to a sub-range of the dynamic error range; The deep temporal convolutional network is trained by multiple sets of sample data, which are constructed based on data collected from a pre-built experimental platform for simulating the actual working environment of the CNC machine tool spindle. The experimental platform includes a spindle load simulation system, an experimental spindle, a spindle drive system, a control system, a dynamic error acquisition system, and a vibration signal acquisition system. The spindle load simulation system is used to receive loading force information set by a user from the control system, and apply a loading force to the experimental spindle based on the loading force information; The spindle drive system is used to receive the rotation speed information set by the user from the control system, and drive the experimental spindle to rotate based on the rotation speed information; The vibration signal acquisition system includes one or more sensors for collecting the vibration signal of the experimental spindle and sending it to the control system; The dynamic error acquisition system is used to acquire the dynamic error of the experimental spindle and send it to the control system.
2. The method according to claim 1, characterized in that The deep temporal convolutional network includes an input layer, a feature extraction layer, a fully connected layer, and an output layer, wherein the feature extraction layer includes four residual blocks connected in series; the input layer is used to obtain the vibration signal sequence and input it into the feature extraction layer, the feature extraction layer is used to extract features from the vibration signal sequence, the fully connected layer is used to integrate the features output by the feature extraction layer, and the output layer is used to determine the error category corresponding to the vibration signal sequence based on the features output by the fully connected layer; and / or Each set of sample data includes a sample vibration signal sequence and a label corresponding to the sample vibration signal sequence, and the label is used to indicate the error category corresponding to the sample vibration signal sequence. Each set of sample data is determined based on the following method: during the operation of the experimental spindle, the original vibration signal sequence collected by the vibration signal acquisition system in the target time period is obtained, and the original dynamic error sequence synchronously collected by the dynamic error acquisition system in the target time period is obtained; based on the original vibration signal sequence, the sample vibration signal sequence is obtained, the mean of the original dynamic error sequence is determined, and the error category corresponding to the mean is determined as the label.
3. The method according to claim 1, characterized in that Each set of sample data includes a sample vibration signal sequence and a label corresponding to the sample vibration signal sequence, wherein the label is used to indicate the error category corresponding to the sample vibration signal sequence. The deep temporal convolutional network is trained based on the following method: Inputting the sample vibration signal sequences corresponding to each of the multiple groups of sample data into a preset deep temporal convolutional network, and having the deep temporal convolutional network output a predicted probability that each group of sample vibration signal sequences belongs to each of the multiple error categories; A target loss is constructed based on the predicted probability of each group of sample vibration signal sequences being each error category in the multiple error categories, the actual probability of each group of sample vibration signal sequences being each error category in the multiple error categories, and the weight value of each group of sample vibration signal sequences, and the network parameters of the deep temporal convolutional network are adjusted based on the target loss to train the deep temporal convolutional network; wherein the weight value of each group of sample vibration signal sequences is negatively correlated with the proportion of noise signals in the group of sample vibration signal sequences.
4. The method according to claim 3, characterized in that The target loss is determined by the following formula: Wherein, loss is the target loss, N is the number of sample vibration signal sequences input into the deep temporal convolutional network, K is the total number of error categories into which the dynamic error range covered by the CNC machine tool spindle during operation is divided, zi is the weight value of the i-th sample vibration signal sequence, a ij is the predicted probability that the i-th sample vibration signal sequence predicted by the deep temporal convolutional network belongs to the j-th error category, y ij is the actual probability that the i-th sample vibration signal sequence belongs to the j-th error category.
5. The method according to claim 1, wherein The vibration signal sequence is obtained by normalizing the original vibration signal sequence collected from the spindle of the CNC machine tool, wherein the normalization process is as follows: dividing the original vibration signal sequence into a plurality of vibration signal sequence blocks; Determining a mean and a variance of each vibration signal sequence block, and determining a minimum mean and a maximum variance from the means and variances corresponding to the plurality of vibration signal sequence blocks; For each original vibration signal in the original vibration signal sequence, a ratio of a difference between the original vibration signal and the minimum mean value to the maximum variance is used as a vibration signal after normalization processing of the original vibration signal.
6. The method according to claim 1, characterized in that The multiple groups of sample data are constructed based on the data collected by the vibration signal acquisition system and the dynamic error acquisition system under different operating conditions of the experimental spindle, wherein the different operating conditions include combined conditions obtained by combining multiple rotational speeds and multiple loading forces, wherein the process of applying loading force to the experimental spindle at each rotational speed includes a constant force loading stage and a variable force loading stage, wherein the first loading force is used to load the experimental spindle with constant force in the early stage of the constant force loading stage, and the second loading force is used to load the experimental spindle with constant force in the later stage, and the first loading force is less than the second loading force.
7. The method according to claim 1, characterized in that The spindle load simulation system includes: an air pump, an air pressure servo valve, an air cylinder, a reversing relay, a loading mechanism, and a tension sensor. The air pump is used to provide an air source. The air pressure servo valve is located between the air pump and the air cylinder and is used to adjust the air pressure output by the air pump to the air cylinder. The reversing relay is located between the air pump and the air cylinder and is used to adjust the flow direction of the air pressure output by the air pump to the air cylinder to simulate the application of radial loading force and axial loading force to the experimental spindle. The air cylinder is used to drive the loading mechanism to move so that the loading mechanism applies a loading force to the experimental spindle. The tension sensor is provided at the connection between the loading mechanism and the air cylinder and is used to detect the current loading force and feed it back to the control system so that the control system adjusts the air pressure servo valve based on the current loading force and the loading force set by the user. and / or The dynamic error acquisition system includes: a standard rod set at the tool position of the experimental spindle, used to assist in the measurement of the dynamic error of the experimental spindle; at least 3 eddy current sensors, wherein an eddy current sensor is respectively set in the X, Y and Z directions of the standard rod, used to acquire the dynamic error of the experimental spindle.
8. The method according to claim 7, characterized in that The experimental platform is a vertical spindle simulation loading experimental platform, the experimental spindle is a vertical spindle, and the cylinders include three, two of which are arranged at a 90° angle to realize radial loading of the vertical spindle, and the other cylinder is used to realize axial loading of the vertical spindle; or The experimental platform is a horizontal spindle simulation loading experimental platform, the experimental spindle is a horizontal spindle, and the cylinders include three, two of which are arranged at a 45° angle to realize radial loading force on the vertical spindle, and the other cylinder is used to realize axial loading force on the vertical spindle.
9. The method according to claim 7, characterized in that The experimental platform is a vertical spindle simulation loading experimental platform, the experimental spindle is a vertical spindle, the experimental platform also includes a ground platform for supporting and fixing the vertical spindle, and the vibration signal acquisition system includes three vibration sensors, which are respectively installed at the front bearing of the vertical spindle, the loading mechanism and the ground platform; and / or The experimental platform is a horizontal spindle simulation loading experimental platform, the experimental spindle is a horizontal spindle, and the horizontal spindle simulation loading experimental platform is built on a horizontal iron with a standard T-slot, and the total weight of the horizontal iron exceeds 2 tons.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Integrated testbed for numerical control machine spindle thermal error causes and test method
CN104792533A
Motorized spindle error indirect prediction method and device
CN114942066A
Prediction method for tool remaining life of numerical control machine tool based on hybrid neural model
US20240061396A1
Deterioration-level determination system, learning device, determination device, and deterioration-level determination method
WO2024024281A1
Cited By
Method, device and equipment for recognizing health state of feed shaft of numerical control machine tool
CN120886109A
Spindle motor control method of numerical control machine tool
CN122292996A
Spindle motor control method for CNC machine tools
CN122292996B