Machine tool precision machining multivariate algorithm error compensation method and device based on big data
By adopting the error compensation method of big data multivariate algorithm in the machine tool control system, the problem of poor error compensation effect in machine tool precision machining is solved, and high-precision, low-cost and high-safe machining control is achieved.
Patent Information
- Application Number
- CN202510108306.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-05-23
AI Technical Summary
The existing machine tool control system has problems such as poor error compensation effect, complex operation, high cost and data safety hazards in precision machining.
采用基于大数据的机床精密加工多元算法误差补偿方法,通过激光跟踪仪和球杆仪测量机床误差数据,建立Jacobi多项式和切比雪夫多项式模型,结合GAN-RVFL模型和改进的三角拓扑聚合优化算法,进行误差预测和补偿。
It realizes high-precision compensation for machine tool errors, improves processing accuracy, simplifies operating procedures, reduces costs, and enhances data security.
Smart Images

Figure CN120029167A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of machine learning and numerical control, and in particular to a method and device for compensating multivariate algorithm errors in precision machining of machine tools based on big data. Background Art
[0002] As the "working mother machine" of the manufacturing industry, machine tools have a long history of development. In the early days, machine tools relied on manual labor, and their precision and processing efficiency were poor, which could only meet the needs of basic industries. It was not until the middle of the 20th century that CNC technology emerged, and the first three-coordinate CNC milling machine was successfully trial-produced, opening a new chapter in machine tool automation. It runs accurately according to preset programs, and the processing accuracy and efficiency have greatly increased, which has effectively promoted the manufacturing of parts in many fields such as automobiles and aerospace, and adapted to small-batch, multi-variety production models. However, processing errors have always hindered the advancement of machine tool accuracy. The operation of machine tools is constrained by many factors such as geometric accuracy, thermal deformation, cutting force, tool wear, etc., and the size, shape accuracy and surface quality of parts are greatly reduced. To this end, error compensation technology has gradually developed from the initial simple mechanical adjustment to the use of big data and multi-algorithms to build complex model compensation, achieving a leap forward.
[0003] At present, modern manufacturing industry has higher requirements for machine tools. High precision, high speed and high automation are still the key pursuits. For example, five-axis linkage processing technology can realize multi-faceted processing of complex parts with one clamping, and nanometer-level precision is in line with ultra-precision manufacturing. At the same time, intelligence and greenness are emerging. Machine tools have self-diagnosis and adaptive processing capabilities, taking into account energy saving and consumption reduction, and the use of environmentally friendly materials. They fully meet the diversified development needs of the manufacturing industry and continue to write new glories in machine tool technology.
[0004] Modern machine tool control has both advantages and disadvantages. In terms of cost, the initial investment is high, and advanced hardware and complex software make machine tools expensive, which is difficult for small and medium-sized enterprises to afford. Subsequent maintenance requires professionals and special equipment, and software upgrades and hardware updates are also expensive. On the technical level, the operation is difficult, and the complex interface and multiple parameters require professional training for operators. The programming of complex parts is cumbersome, and parts are easily scrapped due to errors. Reliability and stability are insufficient, and system software from different manufacturers has poor compatibility and is difficult to integrate. Electromagnetic interference in industrial environments affects operation. In addition, there are hidden dangers in data security, and there is a risk of leakage of a large amount of operating data. Cyber attacks may cause system paralysis and data tampering, and prevention requires additional costs and technical investment. Summary of the invention
[0005] Purpose of the invention: The present invention provides a multivariate algorithm error compensation method and device for machine tool precision machining based on big data, which can effectively realize error compensation and precise machining control of machine tools.
[0006] Technical solution: The multivariate algorithm error compensation method for machine tool precision machining based on big data described in the present invention has the following operating steps:
[0007] (1) Use a laser tracker and a ballbar to measure the geometric error data and thermal error data of the machine tool respectively, and preprocess the data;
[0008] (2) Establish a geometric error model based on Jacobi polynomials and use cross-validation and ridge regression to determine the optimal order and coefficients of the geometric error model respectively;
[0009] (3) Establish a thermal error model based on Chebyshev polynomials and use cross-validation and ridge regression to determine the optimal order and coefficients of the thermal error model;
[0010] (4) Fusing the generative adversarial network GAN and the random vector function chain neural network RVFL to obtain the GAN-RVFL model;
[0011] (5) Using the improved triangle topology aggregation optimization algorithm TTAO to optimize the GAN-RVFL model, we obtain the improved prediction model TTAO-GAN-RVFL;
[0012] (6) Use the TTAO-GAN-RVFL model to predict the geometric error and thermal error, and perform a weighted summation of the predicted result, the geometric error result obtained using the Jacobi polynomial, the thermal error result of the Chebyshev polynomial, and the predicted result of the TTAO-GAN-RVFL model;
[0013] (7) Combined with the current three-dimensional coordinate position information of the machine tool, the Newton interpolation method is used to calculate the compensation required for each position and the corresponding compensated position coordinates; using the processing sequence as a clue, the various compensated position coordinate points are connected in sequence to form a continuous three-dimensional path to achieve error prediction and compensation for the machine tool.
[0014] Furthermore, the implementation process of step (2) is as follows:
[0015] (21) Input matrix for Jacobi polynomial geometric error model:
[0016] X geo It is an n×(21+3) matrix. The first 21 columns are geometric error indicators, the last 3 columns are machine tool coordinate axis positions, and n is the different measurement points selected in sequence. is an n-dimensional column vector;
[0017] (24) For each column of geometric errors, the mean of each column of data is 0 and the variance is 1;
[0018] (25) Generate Jacobi polynomials. The independent variables of the last three columns are α and β are the hyperparameters of the geometric error model, and α = β = 0.5 is taken to ensure the stability and reliability of machine tool processing;
[0019] (24) Construct the basis function matrix:
[0020] The generated Jacobi polynomial basis functions of different orders are combined into a basis function matrix Φ; let Indicates the i-th row in the matrix The elements of the column; l is a loop variable used to calculate the starting column position where the basis function corresponding to each order should be placed in the matrix, then:
[0021]
[0022] Wherein, i=1,…,n, j=1,…,21, z=0,…,n-1;
[0023] The total number of basis functions p is:
[0024]
[0025] The dimension of the Jacobi polynomial basis function matrix Φ is n×p.
[0026] (25) Cross-validation determines the optimal polynomial order:
[0027] The entire data set X geo , randomly divided into K subsets of roughly equal size, denoted as For each possible polynomial order q, perform K cycles, each time using one of the subsets as the validation set and the remaining K-1 subsets as the training set;
[0028] (26) Ridge regression determines the model coefficients:
[0029] Assume that the optimal order q has been determined * , based on the corresponding Jacobi polynomial basis function matrix and the dependent variable vector y g ∈R n ; According to Φ * Determine the number of basis functions.
[0030] Furthermore, the implementation process of step (3) is as follows:
[0031] (31) Input matrix of Chebyshev polynomial thermal error model:
[0032] X therm is an m×17 matrix, the first 17 columns are thermal error indicators, m is the number of times data is collected at different times. is an m-dimensional column vector;
[0033] (32) Chebyshev polynomial of the first kind T m The general formula for (x) is:
[0034]
[0035] In the formula, [m / 2] means rounding down. represents the binomial coefficient;
[0036] (33) Construct the polynomial part of the thermal error model:
[0037]
[0038] Where i = 1, 2, ..., m, j = 1, 2, ..., 17, M is the order of the Chebyshev polynomial, β 0 is the intercept, β mj is the coefficient;
[0039] (34) Cross-validation M and ridge regression to determine parameter β mj and β 0 :
[0040] Calculate the Chebyshev polynomial order M, for the mean square error MSE:
[0041]
[0042] In the formula, is the predicted thermal error result;
[0043] The method for determining the model coefficients for the ridge regression method is as follows:
[0044]
[0045] Similarly, for λ therm , determined using the information criterion method, calculate the likelihood function:
[0046]
[0047] In the formula, the residual sum of squares of the model RSS = m × MSE, and the estimated error variance Calculate each λ according to the formula AIC = 2×17-2ln(L) therm Corresponding AIC value, find the lambda corresponding to the minimum AIC value therm ; The coefficient estimation formula for ridge regression is:
[0048] ((X therm ) T X therm +λtherm I)β t =(X therm ) T y t (14)
[0049] Where, I is therm ) T X therm The dimensions match the identity matrix, β t is the ridge regression coefficient vector to be solved.
[0050] Furthermore, the implementation process of step (4) is as follows:
[0051] (41) Embed RVFL into GAN discriminator:
[0052] The input of the discriminator is the real geometric error and thermal error data X and the data G(z) generated by the generator; first, these input data are passed through a shared input layer to obtain the initial feature representation; then, the feature representation is input into the embedded RVFL module; the RVFL module has a randomly initialized input layer to hidden layer weight matrix W RVFL ∈R L×d and the bias vector b RVFL ∈R L , L is the number of neurons in the hidden layer, d is the dimension of the input data; the hidden layer output h RVFL =σ(W RVFL x+b RVFL ), σ(·) is the activation function, Assume that the discriminator has l layers after the RVFL module, and the weight matrix of the i-th layer is The bias vector is The calculation process from the RVFL hidden layer output to the final output of the discriminator is as follows:
[0053]
[0054] (42) Discriminator loss function in GAN-RVFL training:
[0055] For real data and generated data, the loss function of the discriminator is L D It is expressed as:
[0056]
[0057] In the formula, p data (X) is the distribution of real data, p z (z) is the distribution of random noise;
[0058] When combined with RVFL, the real data after RVFL processing is X RVFL, the generated data is G RVFL (z), the loss function of the discriminator becomes:
[0059]
[0060] In the formula, D(·) is the discriminator’s discriminant result;
[0061] (43) Generator loss function in GAN-RVFL training:
[0062] The goal of the generator is to make the discriminator judge the data it generates as real data; its loss function L G for:
[0063]
[0064] When combined with RVFL, the loss function of the generator becomes:
[0065]
[0066] (44) The preprocessed machine tool error data and the data generated by GAN are input into the discriminator and generator for training.
[0067] Furthermore, the implementation process of step (5) is as follows:
[0068] Replace the uniform distribution initialization of the triangle topology aggregation optimization algorithm with the Hammersley sequence initialization; use the Hammersley sequence generation algorithm to obtain N dim-dimensional points; use n to represent the point number in the sequence, n = 1, 2, ..., N, for each point x n The coordinates in the dim-dimensional space are generated as follows:
[0069]
[0070] In the formula, is the inverse cumulative distribution function corresponding to the j-1th basis function; the generated Hammersley sequence points are mapped to the actual value range of the GAN and RVFL network parameters, and the lower bound vector of the parameters is LB and the upper bound vector is UB; for each dimension j (j=1,2,…,dim) of the individual position vector Position(i,:), the mapping formula is:
[0071] Position(i,j)=LB(j)+(UB(J)-LB(j))×x n,j (twenty one)
[0072] Convert the Hammersley sequence points into the initial population individual parameter combination that meets the network parameter requirements as the starting point for subsequent optimization;
[0073] (52) Triangular topological unit formation stage:
[0074] Keep the original calculation method of triangle topology unit size t is the current iteration number, T is the maximum number of iterations, and l decreases as the number of iterations increases. When generating the second and third vertices, an adaptive adjustment mechanism is introduced into the calculation of the direction vector. Let diversity be the population diversity index. When the diversity is low, the randomness of the direction vector is increased, and γ is increased. j The value range of γ is expanded from (0,π) to (-π,π), making the generation of new vertices more diverse; when the diversity is large, reduce γ j The value range of Accelerate the convergence speed;
[0075] For the fourth vertex of the inner cluster, the weight r 1 、r 2 and r 3 Adaptive adjustment is performed according to individual fitness; max 、Fit min 、Fit avg are the maximum, minimum and average fitness in the current population respectively. For individual i, its fitness is Fit(i), then the weight adjustment formula is as follows:
[0076]
[0077] (53) Adaptive degree balancing FDB is introduced in the global aggregation stage:
[0078] Calculate the mean and standard deviation of the population's original fitness:
[0079]
[0080] Perform adaptive balance adjustment to calculate the fitness balance factor and update individual fitness:
[0081]
[0082] Fit new (i) = a × Fit (i) × F bala +b(26)
[0083] (54) Individual selection and update operations based on adjusted fitness:
[0084] According to the updated fitness Fit new (i) Using the tournament selection strategy, the selection size is Select individuals from the population; for each selection operation, randomly select tour_size individuals, and select the individual with the best fitness to enter the next generation population; for the selected individuals, perform a general aggregation operation; the selected individual is i, and the best individual in the corresponding triangular topological unit is X i,best , randomly select the best individual in the unit set as X rand,best ;
[0085] (55) Local aggregation stage combines adaptive balance FDB and direction adjustment: related parameters are initialized, and the scaling factor parameters and balance adjustment coefficients initialized in the aggregation stage are used; a new local search range adjustment coefficient is added Dynamically adjust the local search range according to the iteration situation; calculate the original fitness and statistics of the population, share the calculation results with the general aggregation stage, calculate the fitness balance factor again, and update the individual fitness;
[0086] (56) Learning rate adjustment: For the generator’s learning rate η G , set an initial learning rate According to the generator loss function L G After each T round of iteration, calculate the L G The average rate of change ΔL G , if ΔL G <ι 1 , ι 1 is the preset threshold, indicating that the loss decreases too slowly, and the updated learning rate is:
[0087]
[0088] On the contrary, if ΔL G <ι 2 , ι 2 is another threshold, indicating instability caused by a rapid drop in loss, then:
[0089]
[0090] During the entire training process, combined with the initial state of the model parameters after the Hammersley sequence is initialized and the parameters dynamically adjusted by the adaptive degree balance FDB mechanism in the loop body, the above-mentioned node state update process based on the TTAO algorithm is repeated continuously. After a certain number of iterations, the trained improved prediction model TTAO-GAN-RVFL is finally obtained.
[0091] Furthermore, the implementation process of step (6) is as follows:
[0092] (61) The preprocessed machine tool error data is input into the trained TTAO-GAN-RVFL model; the generator in the model generates data similar to the real error, the discriminator judges the authenticity of the data, and the RVFL network processes the data. The model outputs the geometric error result Y g And the predicted result of thermal error Y t ;
[0093] (62) According to the proportion of geometric error and thermal error in the influence of machine tools, weights are allocated and the final error result is:
[0094]
[0095] The error data (Δx i ,Δy i ,Δz i ).
[0096] Furthermore, the implementation process of step (7) is as follows:
[0097] (71) Construct a difference quotient table: Divide the path into n+1 segments according to a certain distance, and regard each segment as a point, x 0 ,x 1 ,…,x n , the corresponding function value is the weighted sum of the error values set to f(x 0 ),f(x 1 ),…,f(x n );
[0098] First-order difference quotient:
[0099] Second-order difference quotient:
[0100] And so on, calculate higher-order difference quotients until the n-order difference quotient;
[0101] (72) Calculate the Newton interpolation polynomial:
[0102] N n (x) = f(x 0 )+f[x 0 ,x 1 ](xx 0 )+…f[x 0 ,x 1 ,…,x n ](xx 0 )…(xx n ) (32)
[0103] (73) Calculate the compensation amount and the position coordinates after compensation, substitute the coordinate value x of the current position of the machine tool into the Newton interpolation polynomial, and obtain the error compensation amount corresponding to the position The current position coordinates of the machine tool are (x i ,y i ,z i ), the position coordinates after compensation are
[0104] (74) The compensated coordinate points are stored in a suitable data structure according to the processing sequence. According to the actual processing technology and process of the machine tool, the processing sequence of each position is clarified, and the compensated coordinate points are connected in sequence to ensure that the connection sequence is consistent with the actual processing process, forming a continuous three-dimensional path to achieve error compensation and precise processing control of the machine tool.
[0105] A device according to the present invention includes a memory and a processor, wherein:
[0106] A memory for storing computer programs that can be run on the processor;
[0107] The processor is used to execute the steps of the multivariate algorithm error compensation method for machine tool precision machining based on big data as described above when running the computer program.
[0108] Beneficial effects: Compared with the prior art, the beneficial effects of the present invention are as follows:
[0109] 1. High-precision error compensation: The machine tool geometry and thermal error data are accurately measured by laser tracker and ballbar, and meticulous preprocessing is performed. At the same time, Jacobi polynomials and Chebyshev polynomials are used to construct geometric and thermal error models respectively. The optimal parameters are determined by combining cross-validation and ridge regression to ensure the accuracy of the model. On this basis, the TTAO-GAN-RVFL improved model is used to predict the error, and the weighted sum of multiple error prediction results is calculated. The compensation amount and the compensated coordinates are calculated in combination with Newton interpolation method, which realizes high-precision compensation of machine tool errors and effectively improves processing accuracy.
[0110] 2. Fusion of multiple algorithm advantages: Innovatively fusion of generative adversarial network (GAN) and random vector function chain neural network (RVFL), and optimization using improved triangular topology aggregation (TTAO) optimization algorithm; GAN can capture the distribution characteristics of error data, RVFL has fast learning and generalization capabilities, and TTAO optimization algorithm enhances the model's optimization ability by improving initialization methods and introducing adaptive mechanisms; this fusion of multiple algorithms makes the model more efficient and accurate in processing complex machine tool error data, and improves the ability to predict errors;
[0111] 3. Adaptation and dynamic adjustment: In the TTAO optimization algorithm, adaptive mechanisms are introduced in both the triangular topological unit formation stage and the local aggregation stage; for example, the direction vector is dynamically adjusted according to the population diversity index, the weight is adaptively adjusted according to the individual fitness, and the individual fitness is adjusted through adaptive balance; these mechanisms enable the algorithm to adjust the search strategy in real time according to the machine tool error changes and model training conditions, better adapt to the dynamic changes of the machine tool under different working conditions, and ensure the stability and reliability of the error compensation effect.
[0112] 4. Consider multiple factors and data-driven: The geometric error and thermal error of the machine tool are fully considered, covering a variety of error indicators, and the compensation calculation is performed in combination with the current three-dimensional coordinate position information of the machine tool; error measurement, modeling and prediction are performed based on big data, fully exploring the potential laws in the data, and providing richer and more accurate information for error compensation, overcoming the limitations of traditional methods that may only consider a single factor or insufficient data utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0113] Figure 1 This is a flow chart of the multivariate algorithm error compensation method for machine tool precision machining based on big data;
[0114] Figure 2 Flowchart constructed for geometric errors based on Jacobi polynomials;
[0115] Figure 3 Flowchart constructed for thermal errors based on Chebyshev polynomials;
[0116] Figure 4 Flowchart of GAN-RVFL model formed by fusing RVFL with GAN;
[0117] Figure 5 Flowchart of optimizing the GAN-RFVL model for the improved TTAO algorithm. DETAILED DESCRIPTION
[0118] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0119] like Figure 1 As shown, the present invention discloses a multivariate algorithm error compensation method for machine tool precision machining based on big data, and the specific implementation process is as follows:
[0120] Step 1: Use a laser tracker and a ballbar to measure the geometric error data and thermal error data of the machine tool respectively, and perform data preprocessing.
[0121] Step 1.1: Straightness detection: On the X, Y, and Z axis guide rails of the three-axis machine tool, a high-precision target ball is fixed by a special fixture, and the laser tracker is set up in a suitable position in front of the machine tool. Taking the X axis as an example, the slider is slowly moved at equidistant intervals from the starting point of the guide rail. The laser tracker collects the spatial coordinates of the target ball. After completing the stroke, the least squares method and other algorithms are used to fit the straight line to obtain the straightness errors of the two vertical directions of the X axis guide rail. The same operation is performed on the Y and Z axes.
[0122] Step 1.2: Verticality detection: The laser tracker is precisely leveled and fixed, and the target ball is installed on the machine tool spindle. The spindle is slowly moved along the X axis and then along the Y axis. The laser tracker records the coordinate changes, and the verticality errors of the X and Y axes are obtained through vector analysis; the target ball is fixed on the spindle and moved along the Z axis, and compared with the X and Y axes respectively, to obtain the verticality of the Z axis and the other two axes.
[0123] Step 1.3: Set multiple target ball installation points on the three-axis machine tool workbench in a grid layout. The target balls are fixed in sequence. The laser tracker measures and collects three-dimensional coordinates from multiple angles. Use professional software to build a plane model and compare it with the ideal plane to obtain the flatness error of the workbench.
[0124] Step 1.4: Taking the three-axis machine tool as an example, a total of 21 geometric error data are shown in Table 1:
[0125] Table 1 21 geometric error data of three-axis machine tools
[0126]
[0127]
[0128] Step 1.5: After the machine tool is started, wait for a while to allow the various parts of the machine tool to be in the initial normal temperature stable state. The length of this period depends on factors such as the type, size and ambient temperature of the machine tool. Wait for 30 minutes to 1 hour to ensure that the temperature of the various parts of the machine tool is basically stable and there is no obvious thermal deformation. Start the machine tool's spindle and other key moving parts, make them idle at high speed according to normal processing conditions, and begin to preheat the machine tool. During the preheating process, pay close attention to the temperature changes of each key part measured by the temperature sensor, and record the temperature data at regular intervals (such as 5 minutes). Taking the three-axis machine tool as an example, a total of 17 thermal error data are shown in Table 2:
[0129] Table 2 17 thermal error data of three-axis machine tool
[0130]
[0131]
[0132] Step 1.6: The data obtained by measuring the thermal error of the machine tool using the instrument may contain various noises, outliers, and errors caused by the measurement environment and the characteristics of the instrument itself. Preprocessing this data can improve the quality of the data and enhance the accuracy of subsequent analysis and modeling, thereby more effectively evaluating the thermal error of the machine tool and providing a reliable basis for error compensation. Use the difference between adjacent data points to identify outliers and calculate the difference between adjacent data points Δx i =x i+1 -x i , according to the kinematic characteristics of the machine tool and the accuracy of the measuring instrument, a reasonable difference threshold ΔT is set. If |Δx i |>ΔT, and the difference does not conform to the normal movement or thermal deformation law of the machine tool, then the corresponding data point x i is an outlier and replaces the point with It reduces the impact of outliers on the overall data, while avoiding the data missing problem that may be caused by directly removing outliers.
[0133] Step 2: If Figure 2 As shown, a geometric error model based on Jacobi polynomials is established and the parameters are obtained through cross validation and ridge regression.
[0134] Step 2.1: Input matrix for Jacobi polynomial geometric error model:
[0135] X geo It is an n×(21+3) matrix. The first 21 columns are geometric error indicators, the last 3 columns are machine tool coordinate axis positions, and n is the different measurement points selected in sequence. is an n-dimensional column vector.
[0136] Step 2.2: For each column of geometric error, make the mean of each column of data 0 and the variance 1. The standardization formula is:
[0137]
[0138] Where, X ij is the element in the i-th row and j-th column of the original matrix, is the mean of column j, σ j is the standard deviation of the jth column, where i=1,2,…,n.
[0139] Step 2.3: Generate Jacobi polynomials. The independent variables of the last three columns are by Take Jacobi polynomial generation as an example.
[0140] In the following polynomial, the hyperparameters of the α and β models are set to α = β = 0.5 to ensure the stability and reliability of machine tool processing.
[0141] When n = 0, by definition, For all is the first basis function.
[0142] When n = 1, calculate First of all Find the first-order derivative:
[0143] Then, according to the definition of Jacobi polynomials:
[0144]
[0145] After simplification, we get:
[0146]
[0147] For all calculate Get the value of the second basis function at each data point.
[0148] When n>1, it is known that Using the above recursive formula, we can calculate higher-order Jacobi polynomials:
[0149]
[0150] Step 2.4: Construct the basis function matrix:
[0151] The generated Jacobi polynomial basis functions of different orders are combined into a basis function matrix Φ. Indicates the i-th row in the matrix The elements of the column (l is a loop variable used to calculate the starting column position where the basis function corresponding to each order should be placed in the matrix) are:
[0152]
[0153] In the formula, i=1,…,n, j=1,…,21, z=0,…,n-1.
[0154] The total number of basis functions p can be calculated by the following formula:
[0155]
[0156] The dimension of the Jacobi polynomial basis function matrix Φ is finally obtained to be n×p.
[0157] Step 2.5: Cross-validation to determine the best polynomial order:
[0158] The entire data set X geo , randomly divided into K subsets of roughly equal size, denoted as For each possible polynomial order q (try gradually from smaller values to the pre-set maximum order Q): perform K cycles, each time using one of the subsets as the validation set and the remaining K-1 subsets as the training set. On the training set, use the Jacobi polynomial basis function matrix corresponding to the training data (constructed according to the current order q) to fit the model coefficients through ridge regression (detailed introduction later), and then get the trained model. On the validation set, use the trained model to make predictions, and calculate the error indicator between the predicted value and the true value, the mean square error (MSE):
[0159]
[0160] Where n v is the number of samples in the validation set, is the true value in the validation set, is the model prediction value. Although ridge regression has not been performed to determine the final model coefficients, this basis function matrix and the true values of the training set can be used to perform some calculations and evaluations. The least squares method can be used to preliminarily estimate a temporary model coefficient (but this coefficient is not the final ridge regression coefficient) in order to perform predictions and error calculations on the validation set; select the order q that minimizes the average error index * as the optimal polynomial order.
[0161] Step 2.6: Determine model coefficients by ridge regression:
[0162] Assume that the optimal order q has been determined * , based on the corresponding Jacobi polynomial basis function matrix (here According to Φ * The number of basis functions determined) and the dependent variable vector y g ∈R n (From the input matrix X geo The last 3 columns of are extracted).
[0163] The goal of ridge regression is to minimize the following cost function:
[0164]
[0165] Where θ∈R num is the model coefficient vector to be determined, λ is the regularization parameter of ridge regression, Represents Φ *By taking the derivative of the cost function J(θ) and setting the derivative to 0, we can get the analytical solution of the ridge regression model coefficients:
[0166]
[0167] Where I is The identity matrix of .
[0168] For λ geo , using the information criterion method to determine:
[0169] AIC=2s-2ln(L)(10)
[0170]
[0171] In the formula, θ * is the regression coefficient, These are the first 21 items of data.
[0172] By comparing the AIC values under different λ values, we select the λ that minimizes the AIC value. geo The geometric error model finally established is:
[0173]
[0174] In the formula, is the predicted error vector, Φ * is the Jacobi polynomial basis function matrix, and θ is the analytical solution of the ridge regression model coefficients.
[0175] The geometric error model constructed by Jacobi polynomials has many advantages in machine tool error calculation. In terms of approximation accuracy, it has excellent fitting capabilities for errors caused by complex geometric structures of machine tools. For example, in a multi-axis linkage machining scenario, due to the mutual coupling of geometric deviations such as straightness and verticality of each axis, Jacobi polynomials can accurately approximate the true error surface based on their different weight coefficients. The optimal order is determined through cross-validation to ensure that the model is neither too complex to cause overfitting, nor too low in order to cause underfitting, so that the model can closely fit the actual geometric error variation law of the machine tool.
[0176] In terms of computational efficiency, compared with some traditional high-dimensional function approximation methods, the Jacobi polynomial model can effectively reduce the amount of calculation by using its special orthogonality. When the machine tool changes the processing position quickly, the model can quickly calculate the geometric error based on the motion parameters of the current axis and the determined polynomial coefficients, and provide real-time feedback to the control system to ensure processing accuracy and improve machine tool operation efficiency. Moreover, the model has good scalability and can easily integrate new geometric error source factors. With the in-depth study of machine tool geometric accuracy, its own performance is continuously optimized.
[0177] Step 3: If Figure 3 As shown, a thermal error model based on Chebyshev polynomials was established and the parameters were obtained through cross validation and ridge regression.
[0178] Step 3.1: Input matrix of Chebyshev polynomial thermal error model:
[0179] X therm is an m×17 matrix, the first 17 columns are thermal error indicators, m is the number of times data is collected at different times. is an m-dimensional column vector. Use Equation 1 to normalize the data.
[0180] Step 3.2: Chebyshev polynomials of the first kind are usually defined by the recurrence relation:
[0181] T 0 (x) = 1, T 1 (x) = x, when m>1,
[0182] T m+1 (x) = 2xT m (x)-T m-1 (x)(13)
[0183] Then, the Chebyshev polynomial of the first kind T m The general formula for (x) is:
[0184]
[0185] In the formula, [m / 2] means rounding down. represents the binomial coefficient.
[0186] Step 3.3: Construct the polynomial part of the thermal error model:
[0187] The thermal error model is:
[0188]
[0189] Where i = 1, 2, ..., m, j = 1, 2, ..., 17, M is the order of the Chebyshev polynomial, β 0 is the intercept, β mj is the coefficient.
[0190] Step 3.4: Cross-validation M and ridge regression to determine parameter β mj and β 0 :
[0191] For the Chebyshev polynomial order M, according to step (25), it can be determined that for the mean square error (MSE):
[0192]
[0193] In the formula, is the predicted thermal error result. The method for determining the model coefficients for the ridge regression method is as follows:
[0194]
[0195] Similarly, for λ therm , determined using the information criterion method, calculate the likelihood function:
[0196]
[0197] In the formula, the residual sum of squares of the model RSS = m × MSE, and the estimated error variance
[0198] Calculate each λ according to the formula AIC = 2×17-2ln(L) therm Corresponding AIC value, find the lambda corresponding to the minimum AIC value therm .
[0199] The coefficient estimation formula for ridge regression is:
[0200] ((X therm ) T X therm +λ therm I)β t =(X therm ) T y t (17)
[0201] Where, I is therm ) T X therm The dimensions match the identity matrix, β t is the ridge regression coefficient vector to be solved (the first term is the intercept, and the remaining terms are the coefficients of the thermal error model).
[0202] The thermal error model constructed by Chebyshev polynomials also performs well. First, thermal errors are affected by a variety of heat sources in machine tool processing, such as spindle motor heating, cutting heat, etc., and the distribution is extremely complex. Chebyshev polynomials can efficiently approximate this complex thermal error function with a small number of terms by virtue of their equiripple characteristics in the approximation interval. The optimal order is found through cross-validation, which can accurately capture the trend of thermal errors changing with time and temperature.
[0203] In terms of stability, the temperature of the machine tool working environment fluctuates frequently. Once the Chebyshev polynomial model determines the appropriate order and coefficients, it has a strong adaptability to temperature changes. The method of determining coefficients by ridge regression effectively suppresses the model instability problem caused by multicollinearity in the data (for example, the data of multiple temperature measurement points are highly correlated), making the thermal error prediction value output by the model more reliable. In addition, the model performs well in long-term prediction. As the machine tool continues to run and the temperature gradually accumulates, the model can accurately predict the development of subsequent thermal errors based on the data accumulated in the early stage, providing a strong basis for taking thermal compensation measures in advance and ensuring the stability of processing accuracy.
[0204] Step 4: Figure 4 As shown in the figure, the generative adversarial network (GAN) and the random vector function chain neural network RVFL are fused to obtain the GAN-RVFL model.
[0205] Step 4.1: Embed RVFL into GAN discriminator:
[0206] RVFL is introduced into the discriminator structure of GAN. The input of the discriminator is the real geometric error and thermal error data X (after preprocessing) and the data G(z) generated by the generator (z is a random noise vector). First, these input data are passed through a shared input layer to obtain the initial feature representation.
[0207] This feature representation is then fed into the embedded RVFL module. The RVFL module has a randomly initialized input-to-hidden weight matrix W RVFL ∈R L×d (L is the number of neurons in the hidden layer, d is the dimension of the input data) and the bias vector b RVFL ∈R L The hidden layer output h RVFL =σ(W RVFL x+b RVFL )(σ(·) is the activation function, Assume that the discriminator has l layers (excluding the output layer) after the RVFL module, and the weight matrix of the i-th layer (i = 1, 2, ..., l) is The bias vector is The calculation process from the RVFL hidden layer output to the final output of the discriminator is as follows:
[0208]
[0209] Step 4.2: Discriminator loss function in GAN-RVFL training:
[0210] In the GAN combined with RVFL, the input of the discriminator is not only the original real data and the data generated by the generator, but also the processing of the RVFL network. The loss function of the discriminator is based on the cross entropy loss. For real data and generated data, the loss function of the discriminator is L D It can be expressed as:
[0211]
[0212] In the formula, p data (X) is the distribution of real data, p z (z) is the distribution of random noise.
[0213] When combined with RVFL, it is assumed that the real data after RVFL processing is X RVFL , the generated data is G RVFL (z), the loss function of the discriminator becomes:
[0214]
[0215] Where D(·) is the discriminator’s result.
[0216] Step 4.3: Generator loss function in GAN-RVFL training:
[0217] The goal of the generator is to make the discriminator judge the data it generates as real data, and its loss function L G for:
[0218]
[0219] When combined with RVFL, the loss function of the generator becomes:
[0220]
[0221] Step 4.4: Input the preprocessed machine tool error data and the GAN generated data (processed by RVFL) into the discriminator and generator for training. The trained model can be used to predict the machine tool error. The generator can generate data similar to the real error, and the discriminator can help judge the authenticity of the data. By analyzing the generated data and the real data, we can better understand the distribution and characteristics of the machine tool error, and then take corresponding error compensation measures.
[0222] GAN's adversarial training can accurately capture the complex operating rules of machine tools. The generator simulates various working conditions based on historical data, and the discriminator distinguishes true from false. The game between the two allows the model to gain insight into the causes of errors, and errors caused by tool wear, thermal deformation, etc. can be detected.
[0223] Faced with massive high-dimensional sensor data from machine tools, RVFL uses random hidden layer weights to quickly map features, shorten modeling time, and update the model in a timely manner in response to changes in working conditions.
[0224] The two are integrated, GAN provides RVFL with diverse simulation data, and RVFL accelerates GAN convergence. This enables the model to predict error trends in advance and assist in preventive maintenance, and to quickly adjust strategies when working conditions change, ensuring processing accuracy and reducing costs.
[0225] Step 5: Figure 5 As shown, the GAN-RVFL model is optimized using the improved triangle topology aggregation (TTAO) optimization algorithm to obtain the improved prediction model TTAO-GAN-RVFL.
[0226] Step 5.1: Initialization phase:
[0227] Replace the uniform distribution initialization of the triangle topology aggregation (TTAO) optimization algorithm with the Hammersley sequence initialization. Use the Hammersley sequence generation algorithm to obtain N dim-dimensional points. Let n (n = 1, 2, ..., N) represent the point number in the sequence. For each point x n The coordinates in the dim-dimensional space are generated as follows:
[0228]
[0229] In the formula, is the inverse cumulative distribution function corresponding to the j-1th basis function.
[0230] The generated Hammersley sequence point value range is usually in the interval [0,1], and it needs to be mapped to the actual value range of the GAN and RVFL network parameters. Let the lower bound vector of the parameter be LB and the upper bound vector be UB. For each dimension j (j = 1, 2, ..., dim) of the individual position vector Position(i,:) (i = 1, 2, ..., N, representing the parameter combination of the i-th individual), the mapping formula is:
[0231] Position(i,j)=LB(j)+(UB(J)-LB(j))×x n,j (twenty three)
[0232] Through such mapping, the Hamersley sequence points are converted into initial population individual parameter combinations that meet the network parameter requirements and serve as the starting point for subsequent optimization.
[0233] Step 5.2: Triangle topology unit formation stage:
[0234] Keep the original calculation method of triangle topology unit size (t is the current iteration number, T is the maximum number of iterations, and l decreases as the number of iterations increases). Because it changes dynamically with the number of iterations, it helps to control the contraction of the search range and has a certain effect on the exploration and development balance of the algorithm. When generating the second and third vertices, the calculation of the direction vector introduces an adaptive adjustment mechanism. Let diversity be the population diversity index. When it is small (the population diversity is low and may fall into a local area), appropriately increase the randomness of the direction vector, and the γ j The value range of γ is expanded from (0,π) to (-π,π), making the generation of new vertices more diverse; when the diversity is large (the population explores a wide range but may converge slowly), appropriately reduce γ j The value range of Accelerate the convergence speed. The improved direction vector generation formula is (taking the second vertex as an example):
[0235] When diversity < threshold 1 When f(γ)=[cosγ 1 ',cosγ' 2 ,…,cosγ' D ], where γ' j is a random number between (-π, π), threshold 1 is the lower limit of diversity.
[0236] When diversity>threshold 2 When f(γ)=[cosγ 1 ”,cosγ' 2 ',…,cosγ" D ], where γ' j 'yes A random number between 2 is the upper diversity threshold.
[0237] When threshold 1 ≤diversity≤threshold 2 When the original formula is maintained, f(γ)=[cosγ 1 ,cosγ 2 ,…,cosγ D ]constant.
[0238] For the fourth vertex of the inner cluster, the weight r 1 、r 2 and r 3 Adaptive adjustment is performed according to individual fitness. max 、Fit min 、Fit avgare the maximum, minimum and average fitness in the current population respectively. For individual i, its fitness is Fit(i), then the weight adjustment formula is as follows:
[0239]
[0240] The weights adjusted in this way can enable vertices with better fitness to play a greater role in aggregation, while avoiding over-reliance on a certain vertex and improving the effectiveness of aggregation.
[0241] Step 5.3: Introduce adaptive degree balancing FDB in the global aggregation stage:
[0242] Initialize the relevant parameters, initialize the scaling factor parameters a = 0.95 and b = 0.05, set the balance adjustment coefficients k = 0.5 and m = 0.1. Calculate the mean and standard deviation of the original fitness of the population:
[0243]
[0244] Perform adaptive balance adjustment to calculate the fitness balance factor and update individual fitness:
[0245]
[0246] Fit new (i) = a × Fit (i) × F bala +b(28)
[0247] Step 5.4: Individual selection and update operation based on adjusted fitness:
[0248] According to the updated fitness Fit new (i) Using the tournament selection strategy, the selection size is Select individuals from the population. For each selection operation, randomly select tour_size individuals, and select the individuals with the best fitness to enter the next generation population. For the selected individuals, perform a general aggregation operation. Let the selected individual be i, and the best individual in the corresponding triangular topological unit be X i,best , randomly select the best individual in the unit set as X rand,best , then the new individual generation formula becomes X i,new1 =r 4 ×X i,best +(1-r 4 )×X rand,best (r 4 is a random number between), and then update the optimal proxy according to the greedy strategy of the original algorithm (if but like but ).
[0249] Step 5.5: Local aggregation stage combined with adaptive balance FDB and direction adjustment: Initialize relevant parameters, and use the scaling factor parameters and balance adjustment coefficients initialized in the aggregation stage. Add a local search range adjustment coefficient The initial value is set to 1, which is used to dynamically adjust the local search range according to the iteration situation. Calculate the original fitness and statistics of the population, share the calculation results with the general aggregation stage, calculate the fitness balance factor again, and update the individual fitness.
[0250] According to the updated fitness Fit new (i) Select the top 50% with better fitness to enter the local search range. Let S be the set of individuals entering the local search range.
[0251] For individuals in set S, calculate their local search direction. Suppose individual i is in set S, and its local search direction d i According to its relationship with the optimal individual X best The relative position of is determined. First, calculate the vector v i =X i -X best , then v i Normalize to get
[0252] According to the local search direction and the adjusted fitness, calculate the individual local search step size:
[0253]
[0254] Update individual location:
[0255] X i,new2 =X i +Δ i ×d i (30)
[0256] Perform boundary processing on the updated individual positions to ensure that they are within the legal search space:
[0257] X i,new2 =min(max(X i,new2 ,LB),UB))(31)
[0258] Re-evaluate the individual's fitness f Xi,new2 =fobj(X i,new2 )(fobj is the fitness function).
[0259] Compare the fitness values of the two vertices before and after local mining. If f Xi,new2 <f Xi , then X i =X i,new2 .
[0260] Step 5.6: Learning rate adjustment: For the learning rate η of the generator G , set an initial learning rate According to the generator loss function L G , after each T round of iteration, calculate L in the current T rounds G The average rate of change ΔL G (the ratio of the difference between the loss function values of two consecutive rounds to the initial loss value), if ΔL G < 1 ( 1 is the preset threshold, indicating that the loss decreases too slowly), then the updated learning rate is:
[0261]
[0262] That is, appropriately increase the learning rate to speed up convergence; on the contrary, if ΔL G <ι 2 ( 2 is another threshold, indicating that the loss drops too fast and may lead to instability), then:
[0263]
[0264] During the entire training process, combined with the initial state of the model parameters after the Hammersley sequence is initialized and the parameters dynamically adjusted by the adaptive degree balance FDB mechanism in the loop body, the above-mentioned node state update process based on the TTAO algorithm is repeated continuously. After a certain number of iterations, the trained improved prediction model TTAO-GAN-RVFL is finally obtained.
[0265] When the Hammersley sequence initializes the model parameters at the starting state, they can be evenly distributed in the parameter space, laying a good foundation for the machine tool error prediction model. For example, initializing parameters related to thermal deformation and tool wear can avoid initial value clustering, allowing the model to quickly locate a reasonable parameter search range, stably start training, reduce gradient problems, accelerate convergence, and more quickly master the basic laws of machine tool errors.
[0266] The FDB mechanism in the loop has outstanding advantages in dynamically adjusting parameters. The operating conditions of machine tools are complex and changeable, and the FDB mechanism can be dynamically optimized based on real-time collected data such as spindle vibration and feed displacement error. If the machining accuracy drops suddenly, it quickly increases the adjustment of key parameters to enable the model to adapt quickly and accurately predict the error trend; when the error stabilizes in a small range, it fine-tunes the parameters to prevent overfitting, balance the complexity and accuracy of the model, and ensure long-term stable prediction. The combination of the two, the early uniform initialization and the subsequent dynamic optimization, comprehensively improve the accuracy and timeliness of machine tool error prediction, and escort for precision machining.
[0267] Step 6: Use the TTAO-GAN-RVFL model to predict the geometric error and thermal error, and perform a weighted sum of the predicted result, the geometric error result obtained using the Jacobi polynomial, the thermal error result of the Chebyshev polynomial, and the predicted result of the TTAO-GAN-RVFL model.
[0268] Step 6.1: Input the preprocessed machine tool error data (including geometric error data and thermal error data) into the trained TTAO-GAN-RVFL model. The generator in the model generates data similar to the real error, the discriminator judges the authenticity of the data, and the RVFL network processes the data. Combining the effects of the three, the model outputs the geometric error result Y g And the predicted result of thermal error Y t .
[0269] Step 6.2: Assign weights based on the proportion of the impact of geometric errors and thermal errors on machine tools. For machine tools that have been used for a period of time, as the machine tool is used for a longer time, wear and looseness of components may cause the geometric error to further increase, and its proportion may rise to 50%-70% or even higher. Machine tools under normal processing conditions: If the heat dissipation conditions of the machine tool are general, the heat generated during the processing cannot be dissipated in time, and the thermal error may account for about 20%-40% of the total error. For thermal errors, we can improve them through the cooling system, so here we take the geometric error to account for 70% and the thermal error to account for 30%. Weights are evenly assigned to the results of the thermal error model, geometric error model and fusion model. The final error result:
[0270]
[0271] The error data (Δx i ,Δy i ,Δz i ).
[0272] Step 7: Combined with the current three-dimensional coordinate position information of the machine tool, use the Newton interpolation method to calculate the compensation required for each position and the corresponding compensated position coordinates. Using the processing sequence as a clue, connect the various compensated position coordinate points in sequence to form a continuous three-dimensional path to achieve error prediction compensation for the machine tool. Take the x-axis as an example:
[0273] Step 7.1: Construct a difference quotient table: Divide the path into n+1 segments according to a certain distance, and regard that segment as a point, x 0 ,x 1 ,…,x n , the corresponding function value is the weighted sum of the error values set to f(x 0 ),f(x 1),…,f(x n ).
[0274] First-order difference quotient:
[0275] Second-order difference quotient:
[0276] And so on, higher-order difference quotients are calculated until the n-order difference quotient.
[0277] Step 7.2: Calculate the Newton interpolation polynomial:
[0278] N n (x) = f(x 0 )+f[x 0 ,x 1 ](xx 0 )+…f[x 0 ,x 1 ,…,x n ](xx 0 )…(xx n ) (37)
[0279] Step 7.3: Calculate the compensation amount and the position coordinates after compensation, substitute the coordinate value x of the current position of the machine tool into the Newton interpolation polynomial to obtain the error compensation amount corresponding to the position The current position coordinates of the machine tool are (x i ,y i ,z i ), then the position coordinates after compensation are
[0280] Step 7.4: Store the compensated coordinate points in a suitable data structure according to the processing order, which can facilitate subsequent operations and processing. According to the actual processing technology and process of the machine tool, clarify the processing order of each position. This is the basis for connecting the compensated coordinate points in sequence, ensuring that the connection order is consistent with the actual processing process, forming a continuous three-dimensional path, and realizing error compensation and precise processing control of the machine tool.
[0281] Newton interpolation is highly efficient in calculating compensation. During machine tool processing, the error conditions at each position are complex and changeable. Based on the collected discrete error data points, Newton interpolation can quickly construct interpolation polynomials and accurately calculate the compensation required for each processing position. For example, when milling contours, even if the processing path changes frequently, it can quickly interpolate and calculate the compensation amount at the current position based on the key position errors measured in the early stage, adjust the tool path in real time, and ensure processing accuracy.
[0282] From the perspective of adaptability, the Newton interpolation method can cope well with both linear and nonlinear error change trends. Machine tools are affected by various factors such as mechanical structure wear and thermal deformation, and the error distribution law is complex. This method can fit the error curve under different working conditions with its flexible interpolation characteristics and provide an adaptive compensation strategy.
[0283] In coordinate calculation, it can accurately obtain the position coordinates after compensation. This enables the machine tool control system to accurately position and ensure that the size and shape accuracy of the processed parts meet the requirements. Moreover, the Newton interpolation method is relatively simple and easy to understand, and it is easy to implement programming applications in the machine tool control system, which lowers the technical threshold, facilitates promotion and popularization, and helps improve the overall processing quality and efficiency of machine tools.
[0284] The present invention also provides a device, including a memory and a processor, wherein: the memory is used to store a computer program that can be run on the processor; the processor is used to execute the steps of the multi-algorithm error compensation method for machine tool precision machining based on big data as described above when running the computer program.
[0285] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A multivariate algorithm error compensation method for machine tool precision machining based on big data, characterized in that: The following steps are involved: (1) Use a laser tracker and a ballbar to measure the geometric error data and thermal error data of the machine tool respectively, and preprocess the data; (2) Establish a geometric error model based on Jacobi polynomials and use cross-validation and ridge regression to determine the optimal order and coefficients of the geometric error model respectively; (3) Establish a thermal error model based on Chebyshev polynomials and use cross-validation and ridge regression to determine the optimal order and coefficients of the thermal error model; (4) Fusing the generative adversarial network GAN and the random vector function chain neural network RVFL to obtain the GAN-RVFL model; (5) Using the improved triangle topology aggregation optimization algorithm TTAO to optimize the GAN-RVFL model, we obtain the improved prediction model TTAO-GAN-RVFL; (6) Use the TTAO-GAN-RVFL model to predict the geometric error and thermal error, and perform a weighted summation of the predicted result, the geometric error result obtained using the Jacobi polynomial, the thermal error result of the Chebyshev polynomial, and the predicted result of the TTAO-GAN-RVFL model; (7) Combined with the current three-dimensional coordinate position information of the machine tool, the Newton interpolation method is used to calculate the compensation required for each position and the corresponding compensated position coordinates; using the processing sequence as a clue, the various compensated position coordinate points are connected in sequence to form a continuous three-dimensional path to achieve error prediction and compensation for the machine tool.
2. The multivariate algorithm error compensation method for machine tool precision machining based on big data according to claim 1 is characterized in that: The implementation process of step (2) is as follows: (21) Input matrix for Jacobi polynomial geometric error model: X geo It is an n×(21+3) matrix. The first 21 columns are geometric error indicators, the last 3 columns are machine tool coordinate axis positions, and n is the different measurement points selected in sequence. is an n-dimensional column vector; (22) For each column of geometric errors, the mean of each column of data is 0 and the variance is 1; (23) Generate Jacobi polynomials. The independent variables of the last three columns are α and β are the hyperparameters of the geometric error model, and α = β = 0.5 is taken to ensure the stability and reliability of machine tool processing; (24) Construct the basis function matrix: The generated Jacobi polynomial basis functions of different orders are combined into a basis function matrix Φ; let Indicates the i-th row in the matrix Elements of a column; l is a loop variable, which is used to calculate the starting column position of the basis function corresponding to each order in the matrix, then: Wherein, i=1,…,n, j=1,…,21, z=0,…,n-1; The total number of basis functions p is: The dimension of the Jacobi polynomial basis function matrix Φ is n×p. (25) Cross-validation determines the optimal polynomial order: The entire data set X geo , randomly divided into K subsets of roughly equal size, denoted as For each possible polynomial order q, perform K cycles, each time using one of the subsets as the validation set and the remaining K-1 subsets as the training set; (26) Ridge regression determines the model coefficients: Assume that the optimal order q has been determined * , based on the corresponding Jacobi polynomial basis function matrix and the dependent variable vector y g ∈R n ; According to Φ * Determine the number of basis functions.
3. The multivariate algorithm error compensation method for machine tool precision machining based on big data according to claim 1 is characterized in that: The implementation process of step (3) is as follows: (31) Input matrix of Chebyshev polynomial thermal error model: X therm is an m×17 matrix, the first 17 columns are thermal error indicators, m is the number of times data is collected at different times. is an m-dimensional column vector; (32) Chebyshev polynomial of the first kind T m The general formula for (x) is: In the formula, [m / 2] means rounding down. represents the binomial coefficient; (33) Construct the polynomial part of the thermal error model: Where i = 1, 2, ..., m, j = 1, 2, ..., 17, M is the order of the Chebyshev polynomial, β0 is the intercept, β mj is the coefficient; (34) Cross-validation M and ridge regression to determine parameter β mj and β0: Calculate the Chebyshev polynomial order M, for the mean square error MSE: In the formula, is the predicted thermal error result; The method for determining the model coefficients for the ridge regression method is as follows: Similarly, for λ therm , determined using the information criterion method, calculate the likelihood function: In the formula, the residual sum of squares of the model RSS = m × MSE, and the estimated error variance Calculate each λ according to the formula AIC = 2×17-2ln(L) therm Corresponding AIC value, find the lambda corresponding to the minimum AIC value therm ; The coefficient estimation formula for ridge regression is: ((X therm ) T X therm +λ therm I)b t =(X therm ) T y t (14) Where, I is therm ) T X therm The dimensions match the identity matrix, β t is the ridge regression coefficient vector to be solved.
4. The multivariate algorithm error compensation method for machine tool precision machining based on big data according to claim 1 is characterized in that: The implementation process of step (4) is as follows: (41) Embed RVFL into GAN discriminator: The input of the discriminator is the real geometric error and thermal error data X and the data G(z) generated by the generator. First, these input data are passed through a shared input layer to obtain the initial feature representation. This feature representation is then fed into the embedded RVFL module; the RVFL module has a randomly initialized input-to-hidden weight matrix W RVFL ∈R L×d and the bias vector b RVFL ∈R L , L is the number of neurons in the hidden layer, d is the dimension of the input data; the hidden layer output h RVFL =σ(W RVFL x+b RVFL ), σ(·) is the activation function, Assume that the discriminator has l layers after the RVFL module, and the weight matrix of the i-th layer is The bias vector is The calculation process from the RVFL hidden layer output to the final output of the discriminator is as follows: (42) Discriminator loss function in GAN-RVFL training: For real data and generated data, the loss function of the discriminator is L D It is expressed as: In the formula, p data (X) is the distribution of real data, p z (z) is the distribution of random noise; When combined with RVFL, the real data after RVFL processing is X RVFL , the generated data is G RVFL (z), the loss function of the discriminator becomes: In the formula, D(·) is the discriminator’s discriminant result; (43) Generator loss function in GAN-RVFL training: The goal of the generator is to make the discriminator judge the data it generates as real data; its loss function L G for: When combined with RVFL, the loss function of the generator becomes: (44) The preprocessed machine tool error data and the data generated by GAN are input into the discriminator and generator for training.
5. The multivariate algorithm error compensation method for machine tool precision machining based on big data according to claim 1 is characterized in that: The implementation process of step (5) is as follows: Replace the uniform distribution initialization of the triangle topology aggregation optimization algorithm with the Hammersley sequence initialization; use the Hammersley sequence generation algorithm to obtain N dim-dimensional points; n represents the point number in the sequence, n = 1, 2, ..., N, for each point x n The coordinates in the dim-dimensional space are generated as follows: In the formula, is the inverse cumulative distribution function corresponding to the j-1th basis function; the generated Hammersley sequence points are mapped to the actual value range of the GAN and RVFL network parameters, and the lower bound vector of the parameters is LB and the upper bound vector is UB; for each dimension j (j=1,2,…,dim) of the individual position vector Position(i,:), the mapping formula is: Position(i,j)=LB(j)+(UB(J)-LB(j))×x n,j (21) Convert the Hammersley sequence points into the initial population individual parameter combination that meets the network parameter requirements as the starting point for subsequent optimization; (52) Triangular topological unit formation stage: Keep the original calculation method of triangle topology unit size t is the current iteration number, T is the maximum number of iterations, and l decreases as the number of iterations increases. When generating the second and third vertices, an adaptive adjustment mechanism is introduced into the calculation of the direction vector. Let diversity be the population diversity index. When the diversity is low, the randomness of the direction vector is increased, and γ is increased. j The value range of γ is expanded from (0,π) to (-π,π), making the generation of new vertices more diverse; when the diversity is large, reduce γ j The value range of Accelerate the convergence speed; For the fourth vertex of the internal aggregation, the weights r1, r2, and r3 are adaptively adjusted according to the individual fitness; let Fit max 、Fit min 、Fit avg are the maximum, minimum and average fitness in the current population respectively. For individual i, its fitness is Fit(i), then the weight adjustment formula is as follows: (53) Adaptive degree balancing FDB is introduced in the global aggregation stage: Calculate the mean and standard deviation of the population's original fitness: Perform adaptive balance adjustment to calculate the fitness balance factor and update individual fitness: Fit new (i)=a×Fit(i)×F bala +b(26) (54) Individual selection and update operations based on adjusted fitness: According to the updated fitness Fit new (i) Using the tournament selection strategy, the selection size is Select individuals from the population; for each selection operation, randomly select tour_size individuals, and select the individual with the best fitness to enter the next generation population; for the selected individuals, perform a general aggregation operation; the selected individual is i, and the best individual in the corresponding triangular topological unit is X i,best , randomly select the best individual in the unit set as X rand,best ; (55) Local aggregation stage combines adaptive balance FDB and direction adjustment: related parameters are initialized, and the scaling factor parameters and balance adjustment coefficients initialized in the aggregation stage are used; a new local search range adjustment coefficient is added Dynamically adjust the local search range according to the iteration situation; calculate the original fitness and statistics of the population, share the calculation results with the general aggregation stage, calculate the fitness balance factor again, and update the individual fitness; (56) Learning rate adjustment: For the generator’s learning rate η G , set an initial learning rate According to the generator loss function L G After each T round of iteration, calculate the L G The average rate of change ΔL G , if ΔL G <ι1, <ι1 is the preset threshold, indicating that the loss decreases too slowly, then the updated learning rate is: On the contrary, if ΔL G <ι2, ι2 is another threshold, indicating instability caused by the loss decreasing too quickly, then: During the entire training process, combined with the initial state of the model parameters after the Hammersley sequence is initialized and the parameters dynamically adjusted by the adaptive degree balance FDB mechanism in the loop body, the above-mentioned node state update process based on the TTAO algorithm is repeated continuously. After a certain number of iterations, the trained improved prediction model TTAO-GAN-RVFL is finally obtained.
6. The multivariate algorithm error compensation method for machine tool precision machining based on big data according to claim 1 is characterized in that: The implementation process of step (6) is as follows: (61) The preprocessed machine tool error data is input into the trained TTAO-GAN-RVFL model; the generator in the model generates data similar to the real error, the discriminator judges the authenticity of the data, and the RVFL network processes the data. The model outputs the geometric error result Y g And the predicted result of thermal error Y t ; (62) According to the proportion of geometric error and thermal error in the influence of machine tools, weights are allocated and the final error result is: The error data (Δx i ,Δy i ,Δz i ).
7. The multivariate algorithm error compensation method for machine tool precision machining based on big data according to claim 1 is characterized in that: The implementation process of step (7) is as follows: (71) Construct a difference quotient table: divide the path into n+1 segments according to a certain distance, and regard each segment as a point, x0, x1,…, x n , the corresponding function value is the weighted sum of the error values set to f(x0),f(x1),…,f(x n ); First-order difference quotient: Second-order difference quotient: And so on, calculate higher-order difference quotients until the n-order difference quotient; (72) Calculate the Newton interpolation polynomial: N n (x)=f(x0)+f[x0,x1](x-x0)+…f[x0,x1,…,x n ](x-x0)…(xx n ) (32) (73) Calculate the compensation amount and the position coordinates after compensation, substitute the coordinate value x of the current position of the machine tool into the Newton interpolation polynomial, and obtain the error compensation amount corresponding to the position The current position coordinates of the machine tool are (x i ,y i ,z i ), then the position coordinates after compensation are (74) The compensated coordinate points are stored in a suitable data structure according to the processing sequence. According to the actual processing technology and process of the machine tool, the processing sequence of each position is clarified, and the compensated coordinate points are connected in sequence to ensure that the connection sequence is consistent with the actual processing process, forming a continuous three-dimensional path to achieve error compensation and precise processing control of the machine tool.
8. A device, characterized in that: comprising a memory and a processor, wherein: A memory for storing computer programs that can be run on the processor; A processor is used to execute the steps of the multivariate algorithm error compensation method for machine tool precision machining based on big data as described in any one of claims 1 to 7 when running the computer program.
Citation Information
Cited By
Positioning system for pulsed ion beam processing optical element
CN121028675A
Error separation-based shape error measurement method
CN121475108A