Machining error prediction and compensation method based on deep learning
By constructing a deep learning-based error prediction and compensation method for gear hobbing, and utilizing time-series feature extraction and frequency domain analysis, the problems of inaccurate error prediction and compensation lag in gear hobbing are solved, achieving accurate error prediction and dynamic compensation, and improving gear machining accuracy and consistency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING SAIYUAN XIONGMING MASCH CO LTD
- Filing Date
- 2026-04-23
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies lack the ability to deeply mine time-series process data in gear hobbing, making it difficult to capture the time-series characteristics of process parameters. The accuracy of error prediction is insufficient, the error compensation strategy is simplistic and cannot achieve accurate frequency domain compensation, and there is a lack of adaptive closed-loop adjustment mechanism, resulting in insufficient machining accuracy and consistency.
A prediction model with temporal feature extraction capability is constructed using a deep learning-based approach. The model captures the dynamic changes of process parameters such as hob speed, feed rate, and depth of cut through a long short-term memory network, achieving accurate error prediction and frequency domain compensation. The compensation strategy is optimized by feedback from measured data, and the learning rate is dynamically adjusted to adapt to changes in working conditions.
Real-time error prediction and dynamic compensation were achieved during gear hobbing, which improved the gear machining accuracy and consistency, ensured the machining qualification rate of motor shaft gears for new energy vehicles, and enhanced prediction accuracy and compensation effect.
Smart Images

Figure CN122087366A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of precision gear machining technology, and in particular to a method for predicting and compensating machining errors based on deep learning. Background Technology
[0002] With the rapid development of the new energy vehicle industry, electric drive systems have placed extremely stringent requirements on the noise, vibration, and acoustic roughness performance of gear transmissions. The gears of the motor shaft in new energy vehicles need to maintain stable meshing under high-speed and heavy-load conditions. Their machining accuracy directly affects the quietness and comfort of the entire vehicle. As a key process in gear machining, gear hobbing has machining errors mainly from multiple aspects such as machine tool geometric accuracy, tool wear, cutting thermal deformation, and the coupling effect of process parameters. These error sources are mutually coupled and dynamically change over time, posing a great challenge to error prediction and compensation.
[0003] Chinese Patent Publication No. CN120115763A discloses a method for machining spiral bevel gears based on error compensation. The method involves fixing the spiral bevel gear to be machined at the clamping position of a CNC bevel gear grinding machine, calibrating the position and coordinate system of the cutting tool and the spiral bevel gear, setting the machining process, and machining the clamped spiral bevel gear. The machined spiral bevel gear is then removed and machined again. After machining a predetermined number of spiral bevel gears, the gear spacing error during machining is measured using an online measurement system. However, this invention is a post-processing compensation method and cannot address instantaneous error fluctuations caused by changes in cutting fluid temperature or sudden micro-wear of the cutting tool during machining.
[0004] The existing technology still has the following technical shortcomings: 1. Lack of in-depth mining capabilities of time-series process data. During gear hobbing, process parameters such as hob speed, feed rate, depth of cut, and hob installation angle change dynamically over time. There are complex time-series dependencies between various error sources. Traditional methods struggle to capture these time-series characteristics, resulting in insufficient prediction accuracy.
[0005] 2. The error compensation strategy is too simplistic and cannot achieve accurate compensation in the frequency domain. Different physical error sources, such as machine tool geometric errors, transmission chain errors, and cutting chatter, exhibit different characteristic frequencies in the frequency domain. Traditional time-domain compensation methods cannot distinguish the source of error, resulting in poor compensation targeting and ineffective compensation.
[0006] 3. Lack of an adaptive closed-loop adjustment mechanism. Existing methods cannot dynamically optimize the compensation strategy based on actual measurement results after compensation. When the working conditions change or the model deviates, it cannot be automatically corrected, making it difficult to guarantee the first-pass yield of gears.
[0007] Therefore, there is an urgent need for an intelligent error compensation method that can integrate multi-source heterogeneous data, has time-series prediction capabilities, can achieve accurate frequency domain compensation, and has an adaptive closed-loop adjustment mechanism, in order to eliminate dynamic errors in the gear hobbing process, improve gear machining accuracy and consistency, and ensure the first-pass yield of gears for motor shafts in new energy vehicles. Summary of the Invention
[0008] To address this, the present invention provides a deep learning-based method for predicting and compensating machining errors, which overcomes the problems of inaccurate error prediction and delayed compensation caused by the coupling effect of heat, force and wear in gear hobbing in the prior art.
[0009] To achieve the above objectives, this invention provides a method for predicting and compensating machining errors based on deep learning, comprising: The timing process data during gear hobbing is input into the prediction model to output several error data. Based on several error data, a prediction error data characterization value is determined, and based on the prediction error data characterization value and a preset characterization value, it is determined whether the prediction error exceeds the standard. In response to the prediction error exceeding the limit, the learning rate is dynamically adjusted based on the deviation value and the preset deviation value; Based on the error amplitude spectrum, the energy proportion of a single error term in a preset number of characteristic frequency bands is determined, so as to determine the compensation value of a single error term in the characteristic frequency band and perform compensation processing. Based on several measured error data of compensated machining, the characteristic value of the measured error data is determined in order to determine the qualification of gear hobbing. In response to unqualified gear hobbing, an adjustment strategy is determined based on the measured data and the preset data. The adjustment strategy includes adjusting the compensation value of a single error term in the characteristic frequency band; The process of constructing the prediction model includes acquiring the time-series process data and corresponding measured error data of the historical gear hobbing process, and constructing a training dataset; Construct an initial deep learning model, which has the ability to extract temporal features; The base learning rate of the initial deep learning model is determined based on the training dataset. Using the aforementioned base learning rate, the time-series process data as input, and the measured error data as a supervision signal, the initial deep learning model is trained to obtain the prediction model. Output several error data points; The timing process data includes hob speed, feed rate, depth of cut, and hob mounting angle, while the error data includes cumulative pitch error, radial runout error of the gear ring, tooth direction error, and tooth profile error.
[0010] Furthermore, the process of determining whether the prediction error exceeds the standard includes: The predicted values of cumulative pitch error, radial runout error, tooth direction error, and tooth profile error are weighted and summed using weighting coefficients to determine the characterization value of the prediction error data. The predicted error data representation value is compared with the preset representation value; The prediction error is determined to be excessive based on the result that the predicted error data characterization value is greater than the preset characterization value.
[0011] Furthermore, the process of dynamically adjusting the learning rate includes: The deviation value is determined based on the predicted error data characterization value and the preset characterization value; The gradient adjustment factor is determined based on the comparison result between the deviation value and the preset deviation value; The adjusted learning rate is calculated based on the gradient adjustment factor and the base learning rate.
[0012] Furthermore, the process of determining the energy percentage of a single error term in a preset number of characteristic frequency bands includes: Obtain the original error sequence of a single error term along its measurement direction; Perform a Fast Fourier Transform on the original error sequence to determine the error amplitude spectrum of the error term; The error amplitude spectrum is divided into a predetermined number of characteristic frequency bands according to frequency. Calculate the percentage of energy in each characteristic frequency band relative to the total energy of the error term to determine the energy proportion of the error term in each frequency band.
[0013] Furthermore, the process of determining the compensation value of a single error term in the characteristic frequency band includes: The compensation frequency band is determined based on the comparison between the energy proportion of the characteristic frequency band described in a single error term and the preset proportion. The characteristic frequency band needs to be compensated based on the result that the energy ratio is greater than or equal to the preset ratio.
[0014] Furthermore, the process of determining the compensation value of a single error term in the characteristic frequency band also includes: The energy deviation value is determined based on the difference between the energy percentage and the preset percentage; The compensation value is determined based on the comparison between the energy deviation value and the preset energy deviation value.
[0015] Furthermore, the process of performing the compensation processing includes: Based on the error term and characteristic frequency band corresponding to the compensation value, the corresponding compensation method is matched from the preset compensation method library; Map the compensation value to the process parameter adjustment amount of the compensation method; Control commands are generated based on the adjustment amount, and compensation processing is performed.
[0016] Furthermore, the process of determining the pass / fail status of the gear hobbing includes: The measured data characterization values are determined based on the measured cumulative tooth pitch error, tooth ring radial runout error, tooth direction error, and tooth profile error. The measured data characterization value is compared with the prediction error data characterization value; The gear hobbing process is deemed qualified if the measured data value is less than or equal to the predicted error data value.
[0017] Furthermore, the process of determining the adjustment strategy includes: The characterization difference is determined based on the measured data characterization value and the prediction error data characterization value. The characterization difference is compared with a preset deviation value; Based on the fact that the characterization difference is greater than a preset deviation value, the adjustment strategy is determined to be the overall sensitivity coefficient of the characterization value of the prediction error data.
[0018] Compared with existing technologies, the beneficial effects of this invention are that by constructing a deep learning model with temporal feature extraction capabilities and using a long short-term memory network to capture the dynamic changes of temporal process data such as hob speed, feed rate, depth of cut, and hob mounting angle, it can effectively extract the temporal dependencies of process parameters over time. Compared with existing technologies that can only perform post-processing detection or empirical prediction based on static parameters, this invention can fully explore the influence of historical information such as accumulated cutting heat and progressive tool wear on current errors during gear hobbing. It achieves accurate prediction of cumulative pitch error, radial runout error of gear ring, tooth direction error, and tooth profile error before or during machining, significantly improving prediction accuracy and providing reliable pre-processing information for proactive error compensation.
[0019] Furthermore, this invention integrates multidimensional errors into a single representation value using a weighted formula and compares it with a preset representation value to determine whether the predicted error exceeds the standard. This addresses the technical problem of different error items having varying degrees of impact on gear performance and being difficult to evaluate uniformly. This invention assigns weights according to the degree of impact of each error on gear performance, integrating multidimensional errors into a single representation value, which facilitates unified judgment and decision-making. By comparing the predicted data error representation value with the preset representation value, the processing quality can be predicted before processing, providing a basis for whether compensation is needed, and realizing predictive quality control.
[0020] Furthermore, this invention converts the error sequence into an error amplitude spectrum using Fast Fourier Transform, dividing the spectrum into low-frequency, mid-frequency, and high-frequency bands. It calculates the energy proportion of each characteristic frequency band, effectively distinguishing different physical error sources such as machine tool geometric errors, transmission chain errors, and cutting chatter. Based on the comparison between the energy proportion and a preset proportion, compensation is only applied to frequency bands with excessive energy proportions. This avoids the problems of traditional time-domain compensation methods failing to distinguish error sources and having poor compensation targeting. By establishing a differentiated mapping table between error terms, characteristic frequency bands, and compensation methods, precise targeting of error sources is achieved, significantly improving the compensation effect and effectively avoiding overcompensation and undercompensation problems.
[0021] Furthermore, in response to excessive prediction errors, this invention determines gradient adjustment factors based on the magnitude of the deviation and dynamically adjusts the learning rate. When the deviation is small, a smaller gradient factor is used for fine-tuning, and when the deviation is large, a larger gradient factor is used for rapid response, enabling the model to adapt to changes in working conditions such as tool wear and thermal deformation accumulation in a timely manner. This effectively overcomes the problems of lagging model updates and inability to respond to changes in working conditions in real time in traditional methods.
[0022] Furthermore, this invention not only achieves real-time prediction and dynamic compensation during the processing, but also constructs a feedback optimization mechanism based on measured results. It uses a gear measurement center to obtain measured error data, objectively evaluates the processing quality, and determines the adjustment coefficient according to the magnitude of the deviation between the measured characteristic value and the preset characteristic value, thereby optimizing and adjusting the compensation value. This further enables the system to learn from each processing iteration and continuously optimize the compensation strategy. As the number of processing batches increases, the compensation accuracy continues to improve, and the defect rate gradually decreases. Attached Figure Description
[0023] Figure 1 This is a flowchart of the deep learning-based machining error prediction and compensation method described in this embodiment of the invention; Figure 2 This is a logic diagram for determining whether the prediction error exceeds the standard in an embodiment of the present invention; Figure 3 This is a flowchart illustrating the determination of the energy percentage of a single error term in a preset number of characteristic frequency bands in an embodiment of the present invention. Figure 4 This is a logic diagram for determining whether the characteristic frequency band needs compensation in an embodiment of the present invention. Detailed Implementation
[0024] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0025] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0026] Please see Figure 1 As shown, it is a structural schematic diagram of the deep learning-based machining error prediction and compensation method described in an embodiment of the present invention.
[0027] The deep learning-based machining error prediction and compensation method described in this embodiment of the invention includes: S1. Input the timing process data of the gear hobbing process into the prediction model to output some error data; S2. Determine the prediction error data characterization value based on several error data, and determine whether the prediction error exceeds the standard based on the prediction error data characterization value and the preset characterization value. S3. In response to the prediction error exceeding the standard, dynamically adjust the learning rate based on the deviation value and the preset deviation value; S4. Based on the error amplitude spectrum, determine the energy proportion of a single error term in a preset number of characteristic frequency bands, so as to determine the compensation value of a single error term in the characteristic frequency band, and perform compensation processing; S5. Determine the characteristic value of the measured error data based on several measured error data of compensated machining, so as to determine the qualification of gear hobbing; S6. In response to unqualified gear hobbing, determine the adjustment strategy based on the measured data characterization value and the preset characterization value.
[0028] Specifically, the prediction model is constructed according to the following steps: S11. Constructing the training dataset Collect the time-series process data and corresponding measured error data of the historical gear hobbing process. The time-series process data includes hob speed, feed rate, depth of cut and hob installation angle. The measured error data includes cumulative pitch error, radial runout error of gear ring, tooth direction error and tooth profile error. The collected data are used to construct a training dataset.
[0029] S12, Constructing the initial deep learning model An initial deep learning model is constructed, which has the ability to extract temporal features. Specifically, the model uses a Long Short-Term Memory (LSTM) network as the temporal feature extraction layer to capture the dependencies of process parameters over time during gear hobbing. The model structure includes an input layer, two LSTM hidden layers, and an output layer. The functions and implementation of each layer are as follows: The input layer receives a 4-dimensional vector of temporal process data (hob speed, feed rate, depth of cut, hob mounting angle) and is responsible for vectorizing the original process parameters. It serves as the input interface for the model and outputs 4-dimensional vectorized data to the first LSTM hidden layer. The first LSTM hidden layer contains 64 hidden units with the activation function tanh. It takes the output of the input layer as input and is responsible for extracting the short-term temporal dependencies of process parameters between adjacent time steps, capturing rapid dynamic changes during the cutting process, and outputting a 64-dimensional short-term temporal feature sequence to the second LSTM hidden layer. The first LSTM hidden layer has an M-level hidden layer; the second LSTM hidden layer contains 32 hidden units with the activation function tanh. It receives the output of the first LSTM hidden layer as input and further refines the 64-dimensional short-term temporal feature sequence extracted from the first LSTM hidden layer to capture the long-term temporal evolution trend of process parameters throughout the entire processing, generating a 32-dimensional temporal feature vector containing long-term trend information, which is then output to the output layer. An output layer is set after the second LSTM hidden layer. This output layer is a fully connected layer that takes the output of the second LSTM hidden layer as input and has an output dimension of 4. It is used to linearly map the 32-dimensional temporal feature vector extracted by the second LSTM hidden layer into four error data, corresponding to the predicted values of cumulative tooth pitch error, radial runout error of tooth ring, tooth direction error, and tooth profile error, respectively. During training, the mean squared error is used as the loss function, and all network parameters are optimized through the backpropagation algorithm.
[0030] S13. Determine the base learning rate The learning rate range test method is used to determine the base learning rate. Within the preset learning rate search range, the model is trained for a short period of time, and the rate of decrease of the loss function corresponding to each learning rate is recorded. The learning rate with the largest loss decrease rate and no gradient oscillation is selected as the base learning rate.
[0031] In this embodiment of the invention, the preset learning rate search range is 1×102 -5 Up to 1×10 -1 Uniform sampling on a logarithmic scale, specifically, at 1×10 -5 Up to 1×10 -1Thirty learning rate values were selected from the range, and the model was trained for short periods using each value. Short-period training refers to rapid training using 20% of the training dataset and 5 training epochs. The purpose is to quickly evaluate the impact of different learning rates on the model's convergence behavior, rather than training the final model. The relative rate of change of the loss function for each learning rate was recorded. The relative rate of change of the loss function is defined as the relative change in the loss value between two adjacent epochs, calculated using the following formula: (1); in, This represents the loss function value at the nth epoch. ΔL represents the loss function value at the (n-1)th epoch, and ΔL represents the relative rate of change of the loss function. A larger ΔL indicates that the model converges faster at the current learning rate. In the last 3 epochs of short-cycle training, the average value of ΔL between adjacent epochs is taken as the final evaluation index under this learning rate. The learning rate-loss relative change rate curve is plotted, and the learning rate with the largest relative change rate of loss in the curve and without gradient oscillation is selected as the base learning rate. The criterion for judging gradient oscillation is: within 3 consecutive epochs, the loss value changes in a directional alternation 2 or more times, that is, it decreases and then increases or increases and then decreases, and the amplitude of a single fluctuation (i.e. the absolute value of the relative change of loss value between adjacent epochs) exceeds 5%, when gradient oscillation is judged to have occurred.
[0032] In implementation, with a certain learning rate, the loss values for four consecutive epochs are set as follows: 0.100, 0.095, 0.097, and 0.093. Then, the ΔL between the first and second epochs is 5%, the ΔL between the second and third epochs is -2.1% (loss increases, direction alternates), and the ΔL between the third and fourth epochs is 4.1%. Since there is a change in direction and the fluctuation amplitude exceeds 5%, gradient oscillation is determined to occur, and this learning rate should be excluded.
[0033] S14, Training Model Using a base learning rate, time-series process data as input, and measured error data as supervision signal, the initial deep learning model is trained. During training, mean squared error is used as the loss function, and the model parameters are optimized through backpropagation algorithm.
[0034] S15. Obtain the prediction model. After training, the optimized model is used as the prediction model. This prediction model can output corresponding error data based on the input time-series process data, including cumulative pitch error, radial runout error of the gear ring, tooth direction error, and tooth profile error.
[0035] Specifically, the process of determining the prediction error data characterization value includes: determining the cumulative tooth pitch error, radial runout error of the gear ring, tooth direction error, and tooth profile error based on the prediction model, and determining the prediction error data characterization value based on the weighted formula.
[0036] Specifically, the weighting formula is as follows: (2); Where M is the prediction error data representation value, This is the predicted value of cumulative pitch error. This is the predicted value for the radial runout error of the gear ring. This is the predicted value of the tooth direction error. T1-T4 are the predicted values of tooth profile error; T1-T4 are the tolerance values of each error; w1 is the weighting coefficient of the predicted value of cumulative tooth pitch error; w2 is the weighting coefficient of the predicted value of radial runout error of the gear ring; w3 is the weighting coefficient of the predicted value of tooth direction error; w4 is the weighting coefficient of the predicted value of tooth profile error; and w1+w2+w3+w4=1, w3>w1>w4>w2.
[0037] In this embodiment of the invention, the tolerance values T1-T4 of each error are determined according to the accuracy grade of the target gear and in accordance with the standards GB / T 10095.1 and GB / T 10095.2. Specifically, T1 is the tolerance value of the cumulative pitch error, T2 is the tolerance value of the radial runout error of the gear ring, T3 is the tolerance value of the tooth direction error, and T4 is the tolerance value of the tooth profile error. In this embodiment of the invention, the accuracy grade of the target gear is grade 6, and correspondingly, T1 is 25 μm, T2 is 28 μm, T3 is 11 μm, and T4 is 8 μm. Those skilled in the art should understand that for other accuracy grades, such as grade 5 and grade 7, the corresponding tolerance values can be selected with reference to the same standard. This is common knowledge in the art and will not be elaborated here.
[0038] Specifically, the weighting coefficients w1, w2, w3, and w4 are pre-calibrated through the following steps: S21. Collect N sets of hobbing samples. Each set of samples includes the measured value of cumulative tooth pitch error, the measured value of radial runout error of gear ring, the measured value of tooth direction error, the measured value of tooth profile error, and the corresponding gearbox NVH test results. The gearbox NVH test results are the test results of noise, vibration and acoustic roughness. S22. Using the measured values of cumulative pitch error, radial runout error of gear ring, tooth direction error and tooth profile error as independent variables, and the NVH test results as dependent variables, establish a multiple linear regression model, and use the least squares method to estimate the non-standardized regression coefficients r1-r4 to minimize the sum of squared residuals. The multiple linear regression model is as follows: (3); Wherein, r0 is the intercept term, which refers to the predicted value of the NVH comprehensive index Q when all measured values of error terms are zero. In this embodiment of the invention, based on the test results of different batches and models of gearboxes, the intercept term r0 usually fluctuates in the range of 40-55 dB, and the specific value depends on the structural characteristics of the gearbox body. This represents the measured value of the cumulative pitch error. This represents the measured value of the radial runout error of the gear ring. This is the measured value of the tooth profile error. This represents the measured value of the tooth profile error; The residual term refers to the difference between the measured NVH value and the predicted value of the linear regression model. In this embodiment of the invention, the residual term is not a fixed constant, but takes different values for each group of samples. In this embodiment, the mean residual of the 200 groups of samples is 0, the standard deviation is 2.1 dB, and the residual range is between -5.2 dB and +4.8 dB. S23. Convert the unstandardized regression coefficients to standardized regression coefficients, denoted as γ1-γ4. The conversion formula is: (4); in, Let be the standard deviation of the measured value of the i-th error term. The standard deviation of the NVH test results; The standardized regression coefficients γ1-γ4 are dimensionless, and their absolute values directly reflect the sensitivity of each error term to NVH performance. The larger the absolute value, the higher the sensitivity. S24. Normalize the standardized regression coefficients γ1-γ4 so that their sum is 1, to obtain the weight coefficients w1, w2, w3, and w4. The normalization formula is: (5).
[0039] In this embodiment of the invention, for the application scenario of motor shaft gears in new energy vehicles, the calibration range of the weighting coefficients is: w1 is 0.25-0.35, w2 is 0.05-0.15, w3 is 0.35-0.45, and w4 is 0.15-0.25, and satisfies w3>w1>w4>w2. The preferred values can be determined according to the actual situation, and no specific limitation is made here.
[0040] In this embodiment of the invention, for the motor shaft gear of new energy vehicles, more attention is paid to the error terms that affect the noise, vibration and acoustic roughness performance of gear transmission. Therefore, the weight configuration is determined as follows: set w1=0.3, w2=0.1, w3=0.4, w4=0.2.
[0041] Please see Figure 2 As shown, it is a logic diagram for determining whether the prediction error exceeds the standard in an embodiment of the present invention.
[0042] Specifically, the process of determining whether the prediction error exceeds the standard includes: The predicted values of cumulative pitch error, radial runout error, tooth direction error, and tooth profile error are weighted and summed using weighting coefficients to determine the characterization value of the prediction error data. The predicted error data representation value is compared with the preset representation value; Based on the result that the prediction error data characterization value is less than or equal to the preset characterization value, it is determined that the prediction error has not exceeded the standard; The prediction error is determined to be excessive based on the result that the predicted error data characterization value is greater than the preset characterization value.
[0043] In this embodiment of the invention, the preset characterization value is based on several batches of qualified gear samples known from historical data. The error characterization value of each batch is calculated, and the upper limit of the qualified product characterization value is taken as the preset characterization value. The preset characterization value is preferably 0.85.
[0044] In this embodiment of the invention, the gear hobbing error is a nonlinear function of the process parameters speed, feed rate, depth of cut, and mounting angle. By learning this mapping relationship, the present invention can predict the magnitude of the error before processing. Different errors have different weights in their impact on gear performance. The predicted error data characterization value is obtained through weighted fusion and compared with the preset characterization value to determine whether the current processing is under control. When the predicted error data characterization value is greater than the preset characterization value, it indicates that the model can no longer accurately describe the current working condition and the model parameters need to be updated. This realizes real-time prediction and online optimization of multi-source coupled errors in gear hobbing.
[0045] Specifically, in response to the prediction error exceeding the standard, a deviation value is determined based on the prediction error data characterization value and a preset characterization value; The gradient adjustment factor is determined based on the comparison result between the deviation value and the preset deviation value; The adjusted learning rate is calculated based on the gradient adjustment factor and the base learning rate. Based on the result that the deviation value is less than or equal to the first preset deviation value, the gradient factor for adjusting the base learning rate is the first gradient adjustment factor. Based on the result that the deviation value is greater than the first preset deviation value and less than or equal to the second preset deviation value, the gradient factor for adjusting the base learning rate is the second gradient adjustment factor. Based on the result that the deviation value is greater than the second preset deviation value, the gradient factor for adjusting the base learning rate is the third gradient adjustment factor; Among them, the first preset deviation value is less than the second preset deviation value, and the first gradient adjustment factor is less than the second gradient adjustment factor and less than the third gradient adjustment factor.
[0046] In this embodiment of the invention, the preferred first preset deviation value is 0.3T, and the preferred second preset deviation value is 0.6T. When ΔM≤0.3T, the error exceeds the standard to a relatively minor degree, usually caused by normal fluctuations in process parameters. In historical data, about 60% of the exceeding samples fall within this range, which is considered normal fluctuation in process parameters and is set as a slight exceeding range. When 0.3T<ΔM≤0.6T, it belongs to gradual anomalies such as tool wear and is set as a moderate exceeding range, with about 30% of the samples falling within this range. When ΔM>0.6T, it is caused by sudden anomalies and is set as a serious exceeding range, with about 10% of the samples falling within this range. The division of 0.3T and 0.6T is based on the Pareto principle and control theory engineering experience, and those skilled in the art can adjust it within the ranges of 0.2T-0.4T and 0.5T-0.7T.
[0047] In this embodiment of the invention, the calculation formula for the dynamically adjusted learning rate is as follows: (6); (7); (8); Where η is the adjusted learning rate, η0 is the base learning rate, α is the gradient factor, and β is the learning rate scaling factor. M represents the deviation between the predicted error data representation value and the preset representation value, where M is the predicted error data representation value and T is the preset representation value.
[0048] The value of β ranges from 0.1 to 0.5. The rationale for this value is as follows: when β < 0.1, even if the deviation reaches its maximum, the learning rate adjustment is still less than 10%, which cannot substantially affect the model update; therefore, 0.1 is set as the lower limit for effective adjustment. When β > 0.5, if the deviation is large, the learning rate may be amplified by more than 1.5 times, resulting in an excessively large parameter update step size, causing loss function oscillations or even model divergence; therefore, 0.5 is set as the upper limit for safety. In this embodiment, a value of 0.3 is preferred: experimental verification shows that β = 0.3 achieves the best balance between response speed and stability. Those skilled in the art can select a specific β value within the range of 0.1-0.5 according to actual processing conditions and accuracy requirements.
[0049] Please see Figure 3 As shown, it is a flowchart for determining the energy percentage of a single error term in a preset number of characteristic frequency bands in an embodiment of the present invention.
[0050] Specifically, the process of determining the energy percentage of a single error term in a preset number of characteristic frequency bands includes: S41. Obtain the original error sequence of a single error term along its measurement direction; S42. Perform a fast Fourier transform on the original error sequence to determine the error amplitude spectrum of a single error term; S43. Divide the error amplitude spectrum into a preset number of characteristic frequency bands according to frequency; S44. Calculate the percentage of energy in each characteristic frequency band relative to the total energy of the error term, in order to determine the energy proportion of the error term in each frequency band.
[0051] In this embodiment of the invention, the error amplitude spectrum is used to reflect the intensity distribution of different frequency components in a single error term. The larger the amplitude, the greater the contribution of that frequency component to the total error.
[0052] Specifically, the process of determining the error amplitude spectrum of the cumulative tooth pitch error includes: The original sequence E of the cumulative tooth pitch error is obtained by sampling at equal intervals along the tooth profile through the gear measurement center. p =[e p1 ,e p2 ,...,e pm ]; Perform a Fast Fourier Transform on the original error sequence Ep to calculate the amplitude spectrum: (9); Where k = 1, 2, ..., m; The amplitude spectrum This reflects the intensity distribution of different frequency components in the cumulative pitch error; j is the imaginary unit, satisfying j 2 =−1,j= .
[0053] The process of determining the error amplitude spectrum of the radial runout error of the gear ring includes: The original sequence E of the radial runout error of the gear ring is obtained by sampling at equal intervals along the circumference of the gear through the gear measurement center. r =[e r1 ,e r2 ,...,e rm ]; Perform a Fast Fourier Transform on the original error sequence Er to calculate the amplitude spectrum: (10); The amplitude spectrum This reflects the intensity distribution of different frequency components in the radial runout error of the gear ring, where j is the imaginary unit, and satisfies j 2 =−1,j= .
[0054] The process of determining the error amplitude spectrum of the tooth direction error includes: The original sequence E of the tooth direction error is obtained by sampling at equal intervals along the tooth width direction through the gear measurement center. β =[e β1 ,e β2 ,...,e βm ]; For the original error sequence E β Perform a fast Fourier transform to calculate the amplitude spectrum: (11); The amplitude spectrum This reflects the intensity distribution of different frequency components in the tooth profile error, where j is the imaginary unit, and satisfies j 2 =−1,j= .
[0055] The process of determining the error amplitude spectrum of the tooth profile error includes: The original sequence E of tooth profile error is obtained by sampling at equal intervals along the tooth profile direction through the gear measurement center. α =[e α1 ,e α2 ,...,e αm ]; For the original error sequence E α Perform a fast Fourier transform to calculate the amplitude spectrum: (12); The amplitude spectrum This reflects the intensity distribution of different frequency components in the tooth profile error, where j is the imaginary unit, satisfying j 2 =−1,j= .
[0056] In this embodiment of the invention, the spectrum is divided into three characteristic frequency bands, namely: Low frequency band Ω L f < 5 Hz; Mid-frequency band Ω M : 5 Hz ≤ f ≤ 50 Hz; High frequency band Ω H f > 50 Hz.
[0057] It should be noted that the above-mentioned characteristic frequency band division is an optimal scheme derived from typical gear hobbing parameters and a large amount of experimental data. Those skilled in the art can make adaptive adjustments to the frequency band boundary points according to specific processing conditions and gear precision requirements. For example, the boundary points can be adjusted to 3 Hz and 40 Hz, or adjusted to dynamic boundary points related to the workpiece rotation frequency and the tool rotation frequency. All these adjustments fall within the protection scope of this invention.
[0058] Specifically, the formula for calculating the energy proportion of each characteristic frequency band of the cumulative tooth pitch error is as follows: (13); (14); (15); The formula for calculating the energy percentage of each characteristic frequency band of the radial runout error of the gear ring is as follows: (16); (17); (18); The formula for calculating the energy percentage of each characteristic frequency band of tooth profile error is as follows: (19); (20); (twenty one); The formula for calculating the energy percentage of each characteristic frequency band of tooth profile error is: (twenty two); (twenty three); (twenty four); Where k is the discrete frequency index, Ω L Ω M Ω H These are the frequency point sets corresponding to the low-frequency band, mid-frequency band, and high-frequency band, respectively.
[0059] Please see Figure 4 As shown, it is a logic diagram for determining whether the characteristic frequency band needs compensation in an embodiment of the present invention.
[0060] Specifically, the process of determining the compensation value of a single error term in the characteristic frequency band includes: The compensation frequency band is determined based on the comparison between the energy proportion of the characteristic frequency band described in a single error term and the preset proportion. Based on the result that the energy percentage is less than the preset percentage, it is determined that the characteristic frequency band does not require compensation. The characteristic frequency band needs to be compensated based on the result that the energy ratio is greater than or equal to the preset ratio.
[0061] After statistical analysis of the error spectrum of hundreds of qualified gears, it was found that the fluctuation range of the energy ratio of each frequency band is usually between 15% and 25%. Setting the threshold to 30% can effectively distinguish between normal fluctuations and abnormal errors. In practice, the preferred value of the preset ratio in this embodiment of the invention is 30%.
[0062] The energy ratio of this invention reflects the degree of contribution of frequency band error components to the total error. When the energy ratio of a certain frequency band reaches the preset ratio, it means that the error component of that frequency band has become the dominant factor of the total error, and its amplitude is significantly higher than that of other frequency bands and background noise. At this time, if no compensation is given, the physical error source corresponding to that frequency band will continue to act, resulting in a decrease in processing quality. Conversely, for frequency bands with an energy ratio lower than the preset ratio, their error contribution is small, and they can naturally converge through adaptive adjustment of the model without additional compensation intervention, effectively avoiding overcompensation and undercompensation problems.
[0063] Specifically, the process of determining the compensation value of a single error term in the characteristic frequency band further includes: The energy deviation value is determined based on the difference between the energy percentage and the preset percentage; The compensation value is determined based on the comparison result between the energy deviation value and the preset energy deviation value; The first compensation value is determined based on the comparison result that the energy deviation value is less than the preset energy deviation value; The second compensation value is determined based on the comparison result where the energy deviation value is greater than or equal to the preset energy deviation value; The first compensation value is less than the second compensation value.
[0064] In this embodiment of the invention, the preferred value of the preset energy deviation value is 10%. The basis for this value is as follows: Statistical analysis shows that when the preset energy deviation value is <10%, the error is slight, which is reflected in the appearance of the physical error source, the presence of small bulges in the frequency band of the amplitude spectrum, and the faint visible vibration bars, which can be finely adjusted; when the preset energy deviation value is ≥10%, the error is significant, which is reflected in the presence of severe physical error sources, the presence of towering peaks in the frequency band of the amplitude spectrum, and the clearly visible vibration bars, which requires significant adjustment; and a 10% deviation corresponds to a compensation amount change of approximately 0.01mm, which can effectively distinguish the compensation value.
[0065] Furthermore, in this embodiment of the invention, when multiple characteristic frequency bands need to be compensated simultaneously, the compensation value of each characteristic frequency band is calculated separately, and the compensation processing is performed by superimposing or performing the compensation process separately based on the error term.
[0066] Specifically, the process of performing the compensation processing includes: Based on the error term and characteristic frequency band corresponding to the compensation value, the corresponding compensation method is matched from the preset compensation method library. In this embodiment of the invention, the compensation methods for different error terms and different characteristic frequency bands are shown in Table 1: Table 1 Compensation methods for different error terms and different characteristic frequency bands
[0067] Then, the compensation value is mapped to the specific adjustment amount of the corresponding process parameter through a pre-calibrated mapping function. For example, for mid-frequency compensation of tooth direction error, the feed rate is reduced by 5% for every 0.001mm increase in the compensation value. Based on the adjustment amount, control instructions executable by the machine tool are generated to perform compensation processing. Process parameter corrections are implemented in the next batch or subsequent parts processing of the current batch to reduce the error contribution in the corresponding frequency band and achieve accurate frequency domain compensation. During implementation, if multiple characteristic frequency bands of the same error item need to be compensated, the compensation values of each frequency band can be superimposed and executed uniformly. If different error items need to be compensated, they are executed separately.
[0068] Specifically, the process of determining the pass / fail status of gear hobbing includes: The measured data characterization values are determined based on the measured cumulative tooth pitch error, tooth ring radial runout error, tooth direction error, and tooth profile error. The measured data characterization value is compared with the prediction error data characterization value; The gear hobbing process is deemed qualified if the measured data characterization value is less than or equal to the predicted error data characterization value. The gear hobbing process is deemed unqualified based on the measured data value being greater than the predicted error data value.
[0069] Specifically, the process of determining the adjustment includes: The characterization difference is determined based on the measured data characterization value and the prediction error data characterization value. The characterization difference is compared with a preset deviation value; Based on the fact that the characterization difference is less than or equal to a preset deviation value, the adjustment strategy is determined to be to adjust the compensation value of a single error term in the characteristic frequency band. Based on the fact that the characterization difference is greater than a preset deviation value, the adjustment strategy is determined to be the overall sensitivity coefficient of the characterization value of the prediction error data.
[0070] In this embodiment of the invention, the calculation method for the measured data characterization value is as follows: The measured cumulative pitch error, radial runout error, tooth direction error, and tooth profile error of the gear after machining are obtained through a gear measurement center. Based on the target gear accuracy grade, the tolerance values corresponding to each error are obtained, including the tolerance for cumulative pitch error, radial runout tolerance, tooth direction error tolerance, and tooth profile error tolerance. Each measured error is divided by its corresponding tolerance value to obtain a normalized value, unifying errors of different dimensions for comparison. Finally, the normalized values are weighted and summed according to preset weighting coefficients to obtain the measured data representation value. The weighting coefficients are determined in the same way as the weighting coefficients used to determine the predicted error data representation value.
[0071] Specifically, the formula for the adjusted compensation value is as follows: Cn = C × (1 + λ) (25); Where Cn is the adjusted compensation value, C is the original compensation value, and λ is the adjustment coefficient.
[0072] In this embodiment of the invention, through a large number of field experiments, it was found that 0.05, 0.10, and 0.20 achieved the optimal convergence speed and the lowest overshoot rate at each deviation level. Therefore, the preferred adjustment coefficients are 0.05, 0.10, and 0.20.
[0073] Specifically, the formula for the corrected prediction error data representation value is as follows: M1 = q × M (26); Where M1 is the corrected prediction error data representation value, and q is the overall sensitivity coefficient.
[0074] In this embodiment of the invention, q=0.85. Through statistical analysis of historical gear hobbing data, when the deviation between the measured characteristic value and the preset characteristic value exceeds 30%, about 85% of the cases are caused by the systematic deviation of the error evaluation system. Through reverse calculation of these cases, the overall sensitivity coefficient is distributed between 0.80 and 0.90. The specific preferred value is not limited.
[0075] In response to non-conformity in gear hobbing, this invention determines an adjustment strategy based on the magnitude of the difference in the characteristic values. The aim is to construct a tiered adaptive adjustment mechanism. When the characteristic difference is less than or equal to a preset deviation value, it indicates a minor non-conformity, primarily due to insufficient compensation. This can be resolved by adjusting the compensation value, using a compensation value formula for refined adjustment. Conversely, when the characteristic difference exceeds the preset deviation value, it indicates a severe non-conformity. This stems from a systematic bias in the error evaluation system itself, making simple adjustment of the compensation value insufficient. A correction to the overall sensitivity coefficient of the predicted error data's characteristic values is required. A prediction error data characteristic value correction formula is used to scale the characteristic values overall. Through this tiered adjustment strategy, progressive optimization from the surface to the deeper levels is achieved, improving the system's adaptability and robustness.
[0076] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
[0077] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for predicting and compensating machining errors based on deep learning, characterized in that, include: The timing process data during gear hobbing is input into the prediction model to output several error data. Based on several error data, a prediction error data characterization value is determined, and based on the prediction error data characterization value and a preset characterization value, it is determined whether the prediction error exceeds the standard. In response to the prediction error exceeding the limit, the learning rate is dynamically adjusted based on the deviation value and the preset deviation value; Based on the error amplitude spectrum, the energy proportion of a single error term in a preset number of characteristic frequency bands is determined, so as to determine the compensation value of a single error term in the characteristic frequency band and perform compensation processing. Based on several measured error data of compensated machining, the characteristic value of the measured error data is determined in order to determine the qualification of gear hobbing. In response to unqualified gear hobbing, an adjustment strategy is determined based on the measured data and the preset data. The adjustment strategy includes adjusting the compensation value of a single error term in the characteristic frequency band; The process of constructing the prediction model includes acquiring the time-series process data and corresponding measured error data of the historical gear hobbing process, and constructing a training dataset; Construct an initial deep learning model, which has the ability to extract temporal features; The base learning rate of the initial deep learning model is determined based on the training dataset. Using the aforementioned base learning rate, the time-series process data as input, and the measured error data as a supervision signal, the initial deep learning model is trained to obtain the prediction model. Output several error data points; The timing process data includes hob speed, feed rate, depth of cut, and hob mounting angle, while the error data includes cumulative pitch error, radial runout error of the gear ring, tooth direction error, and tooth profile error.
2. The method for predicting and compensating machining errors based on deep learning according to claim 1, characterized in that, The process of determining whether the prediction error exceeds the standard includes: The predicted values of cumulative pitch error, radial runout error, tooth direction error, and tooth profile error are weighted and summed using weighting coefficients to determine the characterization value of the prediction error data. The predicted error data representation value is compared with the preset representation value; The prediction error is determined to be excessive based on the result that the predicted error data characterization value is greater than the preset characterization value.
3. The method for predicting and compensating machining errors based on deep learning according to claim 1, characterized in that, The process of dynamically adjusting the learning rate includes: The deviation value is determined based on the predicted error data characterization value and the preset characterization value; The gradient adjustment factor is determined based on the comparison result between the deviation value and the preset deviation value; The adjusted learning rate is calculated based on the gradient adjustment factor and the base learning rate.
4. The method for predicting and compensating machining errors based on deep learning according to claim 1, characterized in that, The process of determining the energy percentage of a single error term in a preset number of characteristic frequency bands includes: Obtain the original error sequence of a single error term along its measurement direction; Perform a Fast Fourier Transform on the original error sequence to determine the error amplitude spectrum of the error term; The error amplitude spectrum is divided into a predetermined number of characteristic frequency bands according to frequency. Calculate the percentage of energy in each characteristic frequency band relative to the total energy of the error term to determine the energy proportion of the error term in each frequency band.
5. The deep learning-based machining error prediction and compensation method according to claim 4, characterized in that, The process of determining the compensation value of a single error term in the characteristic frequency band includes: The compensation frequency band is determined based on the comparison between the energy proportion of the characteristic frequency band described in a single error term and the preset proportion. The characteristic frequency band needs to be compensated based on the result that the energy ratio is greater than or equal to the preset ratio.
6. The method for predicting and compensating machining errors based on deep learning according to claim 5, characterized in that, The process of determining the compensation value of a single error term in the characteristic frequency band also includes: The energy deviation value is determined based on the difference between the energy percentage and the preset percentage; The compensation value is determined based on the comparison between the energy deviation value and the preset energy deviation value.
7. The method for predicting and compensating machining errors based on deep learning according to claim 6, characterized in that, The process of performing the compensation processing includes: Based on the error term and characteristic frequency band corresponding to the compensation value, the corresponding compensation method is matched from the preset compensation method library; Map the compensation value to the process parameter adjustment amount of the compensation method; Control commands are generated based on the adjustment amount, and compensation processing is performed.
8. The method for predicting and compensating machining errors based on deep learning according to claim 1, characterized in that, The process of determining the pass / fail status of gear hobbing includes: The measured data characterization values are determined based on the measured cumulative tooth pitch error, tooth ring radial runout error, tooth direction error, and tooth profile error. The measured data characterization value is compared with the prediction error data characterization value; The gear hobbing process is deemed qualified if the measured data value is less than or equal to the predicted error data value.
9. The method for predicting and compensating machining errors based on deep learning according to claim 1, characterized in that, The process of determining the adjustment strategy includes: The characterization difference is determined based on the measured data characterization value and the prediction error data characterization value. The characterization difference is compared with a preset deviation value; Based on the fact that the characterization difference is greater than a preset deviation value, the adjustment strategy is determined to be the overall sensitivity coefficient of the characterization value of the prediction error data.