Adaptive error compensation method and system for high-precision CNC machine tools

Through the multi-dimensional expansion state observer and trust domain parameter optimization algorithm, adaptive error compensation for high-precision CNC machine tools under five-axis linkage conditions is achieved, which solves the accuracy problems caused by multi-source errors and improves machining accuracy and stability.

CN119472506BActive Publication Date: 2025-05-16SHENZHEN TUOZHIZHE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510063876.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-05-16
Estimated Expiration
2045-01-15

AI Technical Summary

Technical Problem

Under the five-axis linkage conditions, multi-source errors (such as thermal deformation, friction and path errors) of high-precision CNC machine tools make it difficult to ensure machining accuracy. Traditional compensation methods lack real-time and adaptability, making it difficult to cope with dynamic changes.

Method used

The multi-dimensional expansion state observer is used for error observation, combined with the trust domain parameter optimization algorithm to achieve coordinated compensation of thermal deformation, friction and path error. Through the three-stage series compensation control structure and trajectory reconstruction method, a higher-order continuous compensation trajectory is generated.

Benefits of technology

It realizes adaptive error compensation for high-precision CNC machine tools, improves machining accuracy and stability, and overcomes the problems of insufficient real-time and adaptability in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119472506B_ABST
    Figure CN119472506B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of numerical control machine tools, and discloses an adaptive error compensation method and system for high-precision numerical control machine tools. The method comprises: mathematically modeling the multi-dimensional errors of a five-axis numerical control machine tool to obtain a thermal deformation displacement vector, a friction force vector and a path deviation vector; inputting a multi-dimensional extended state observer to perform error observation to obtain a thermal deformation amount, a friction force value and a path error value; optimizing trust domain parameters to obtain a thermal deformation compensation gain matrix, a friction force pre-compensation coefficient matrix and a path error compensation coefficient matrix; performing three-level series compensation calculation to obtain a compensation position instruction, a compensation speed instruction and a compensation acceleration instruction; performing trajectory reconstruction calculation to generate a position instruction sequence, a speed instruction sequence and an acceleration instruction sequence for each axis, thereby realizing adaptive error compensation for the high-precision numerical control machine tool and improving the machining accuracy of the high-precision numerical control machine tool.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of CNC machine tools, and in particular to an adaptive error compensation method and system for high-precision CNC machine tools. Background Art

[0002] The application of high-precision CNC machine tools in the fields of aerospace, precision instruments, etc. is becoming more and more widespread. However, in the actual processing process, multi-source error factors such as thermal deformation, friction fluctuation and path error of the machine tool seriously affect the processing accuracy. Especially in the five-axis linkage working condition, there is a complex coupling relationship between the error sources, and the traditional single compensation method is difficult to meet the high-precision processing requirements.

[0003] At present, research on machine tool error compensation mainly focuses on compensation methods for single error sources, such as thermal error compensation or friction compensation. These methods often use unified compensation parameters and lack the ability to differentiate between different types of errors. At the same time, existing compensation methods generally have problems such as poor real-time performance and weak adaptability, making it difficult to cope with dynamic changes in the machining process. Under multi-axis linkage, the control of workpiece surface quality and machining accuracy becomes more difficult due to the complex changes in tool posture. Traditional error compensation methods lack the ability to coordinate compensation for the tool center point, workpiece surface contact point and tool axis vector, and cannot effectively deal with the cumulative effect of spatial errors in the five-axis linkage process. Summary of the invention

[0004] The present application provides an adaptive error compensation method and system for a high-precision CNC machine tool, thereby realizing adaptive error compensation for the high-precision CNC machine tool and improving the machining accuracy of the high-precision CNC machine tool.

[0005] The first aspect of the present application provides an adaptive error compensation method for a high-precision CNC machine tool, the adaptive error compensation method for a high-precision CNC machine tool comprising:

[0006] The multi-dimensional error of the five-axis CNC machine tool is mathematically modeled to obtain the thermal deformation displacement vector, friction force vector and path deviation vector;

[0007] Inputting the thermal deformation displacement vector, the friction force vector and the path deviation vector into a multi-dimensional extended state observer for error observation to obtain a thermal deformation amount, a friction force value and a path error value;

[0008] Performing trust region parameter optimization on the thermal deformation, the friction force value and the path error value to obtain a thermal deformation compensation gain matrix, a friction force pre-compensation coefficient matrix and a path error compensation coefficient matrix;

[0009] Performing three-level series compensation calculation on the thermal deformation compensation gain matrix, the friction pre-compensation coefficient matrix and the path error compensation coefficient matrix to obtain a compensation position instruction, a compensation speed instruction and a compensation acceleration instruction;

[0010] A trajectory reconstruction operation is performed on the compensation position instruction, the compensation speed instruction and the compensation acceleration instruction to generate a position instruction sequence, a speed instruction sequence and an acceleration instruction sequence for each axis.

[0011] A second aspect of the present application provides an adaptive error compensation system for a high-precision CNC machine tool, the adaptive error compensation system for a high-precision CNC machine tool comprising:

[0012] A modeling module is used to mathematically model the multi-dimensional errors of the five-axis CNC machine tool to obtain the thermal deformation displacement vector, friction force vector and path deviation vector;

[0013] An observation module, used for inputting the thermal deformation displacement vector, the friction force vector and the path deviation vector into a multi-dimensional extended state observer for error observation, so as to obtain a thermal deformation amount, a friction force value and a path error value;

[0014] An optimization module, used for performing trust region parameter optimization on the thermal deformation, the friction force value and the path error value to obtain a thermal deformation compensation gain matrix, a friction force pre-compensation coefficient matrix and a path error compensation coefficient matrix;

[0015] A calculation module, used for performing three-level series compensation calculation on the thermal deformation compensation gain matrix, the friction pre-compensation coefficient matrix and the path error compensation coefficient matrix to obtain a compensation position instruction, a compensation speed instruction and a compensation acceleration instruction;

[0016] A generation module is used to perform trajectory reconstruction operations on the compensation position instructions, the compensation speed instructions and the compensation acceleration instructions to generate position instruction sequences, speed instruction sequences and acceleration instruction sequences for each axis.

[0017] The third aspect of the present application provides an electronic device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the electronic device executes the above-mentioned adaptive error compensation method for high-precision CNC machine tools.

[0018] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned adaptive error compensation method for high-precision CNC machine tools.

[0019] Compared with the prior art, the present application has the following beneficial effects: by constructing a multi-dimensional extended state observer, hierarchical observation of thermal deformation error, friction error and path error is realized, the problem of real-time identification of multi-source errors is solved, and the amplification effect of measurement noise is avoided. Based on the parameter adaptive configuration strategy of the trust domain optimization algorithm, the optimal compensation parameters are independently calculated for each compensation curve, which overcomes the limitations of the traditional unified parameter compensation method and significantly improves the compensation accuracy. The three-level series compensation control structure is adopted to realize the coordinated compensation of thermal deformation, friction and path errors, and effectively suppress the coupling effect of errors. Through the trajectory reconstruction method, the high-order continuity of the compensation trajectory is realized, and the stability during the five-axis linkage process is guaranteed. In view of the characteristics of the five-axis CNC machine tool, the coordinated compensation of the workpiece surface contact point, the tool center point and the tool axis vector is realized, which significantly improves the spatial contour processing accuracy. The layered friction characteristic curve and dynamic response function are adopted to overcome the nonlinear problem caused by the Stribeck effect and improve the motion accuracy of the feed axis. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0021] The structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with this technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantive technical significance. Any structural modification, change in proportion or adjustment of size, without affecting the effects and purposes that can be achieved by the present invention, should still fall within the scope of the technical contents disclosed by the present invention.

[0022] Figure 1 It is a flow chart of an adaptive error compensation method for a high-precision CNC machine tool provided by an embodiment of the present invention;

[0023] Figure 2 It is a schematic block diagram of the structure of an adaptive error compensation system for a high-precision CNC machine tool provided by an embodiment of the present invention;

[0024] Figure 3 It is a schematic block diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0027] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0028] It should be further understood that the term "and / or" used in the specification and appended claims of this application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations. Figure 1 , an embodiment of the adaptive error compensation method of a high-precision CNC machine tool in the embodiment of the present application includes:

[0029] Step 100, mathematically modeling the multi-dimensional error of the five-axis CNC machine tool to obtain a thermal deformation displacement vector, a friction force vector and a path deviation vector;

[0030] It is understandable that the execution subject of the present application may be an adaptive error compensation system for a high-precision CNC machine tool, or a terminal or a server, which is not specifically limited here. The present application embodiment is described by taking a server as the execution subject as an example.

[0031] Specifically, the temperature field of the spindle unit, rotary unit, turntable unit and guide rail unit of the five-axis CNC machine tool is multi-point sampled and analyzed. The temperature data of these units are obtained by arranging temperature sensors at key parts of the machine tool to obtain the spatial thermal field distribution data of the whole machine tool. Based on the spatial thermal field distribution data, the thermal deformation of each axis is coupled and calculated using the thermodynamic model to obtain the thermal deformation transfer chain. The thermal deformation transfer chain describes the heat transfer process between the units of the machine tool, as well as the cumulative effect of the deformation and the change in spatial position caused by it. The thermal deformation transfer chain is linearly superimposed with the structural characteristic parameters of the machine tool to consider the amplification or suppression of the geometric characteristics and mechanical properties of the machine tool on the thermal deformation. In this way, the influence of thermal effects on the motion accuracy of the machine tool is reflected, and the thermal deformation displacement vector is obtained. For the friction error of the five-axis CNC machine tool, each feed axis is modeled. Friction plays an important role as an error source in the operation of the CNC machine tool, and the influence of friction is accurately modeled. Using three types of friction, static friction, Coulomb friction and viscous friction, the friction force is decomposed in three dimensions of displacement, velocity and acceleration to obtain a layered friction characteristic curve. Static friction describes the friction resistance at the beginning of the movement, Coulomb friction describes the friction force that is independent of speed during the movement, and viscous friction is proportional to the speed. By comprehensively analyzing these three friction characteristics, the friction characteristics of the machine tool under different motion states are characterized. The layered friction characteristic curve is input into the nonlinear friction prediction unit, and the amplitude and phase characteristics of the friction force are determined by the numerical iteration method to obtain the basic friction parameter matrix of each axis. According to the basic friction parameter matrix, the friction force synthesis calculation under the five-axis linkage state is performed to obtain the friction force vector, ensuring that the friction force can be effectively predicted and compensated under different motion states. For the calculation of path deviation, the spatial positions of the contact point on the workpiece surface, the tool center point and the tool axis vector are sampled in real time, and fitted with the deviation distribution to obtain a three-dimensional error distribution function describing the error distribution. The three-dimensional error distribution function can reflect the spatial deviation between the workpiece and the tool during the machining process, and combined with the kinematic model of the machine tool, it is substituted into the inverse kinematic equation of the machine tool, and the compensation required for each axis is calculated through spatial coordinate transformation. By decomposing the error vectors of the workpiece and tool positions, the error values ​​in the normal, tangential and tool axis directions are obtained, and the compensation amounts in these three directions are calculated respectively to obtain the path deviation vector.

[0032] Step 200, inputting the thermal deformation displacement vector, the friction force vector and the path deviation vector into a multi-dimensional extended state observer for error observation, and obtaining the thermal deformation amount, the friction force value and the path error value;

[0033] Specifically, the thermal deformation displacement vector is input into the thermal deformation observation layer of the multi-dimensional extended state observer, and the thermal deformation of each axis of the five-axis CNC machine tool is processed in layers. Through the layered processing, the complex thermal deformation process is decomposed into simple deformations of multiple different states, and the thermal deformation layered state equation is established, which helps to more accurately characterize the thermal deformation characteristics and effectively separate the coupling effects between different axes. The state equation after layered processing is used to describe the dynamic response of the thermal deformation of each axis under different ambient temperatures and load conditions, and improve the observer's adaptability to thermal deformation errors. For the friction force vector, the intermediate frequency bandwidth analysis is performed to identify the characteristics of friction under different motion conditions. The nonlinear friction state observation equation is constructed through the five-axis linkage kinematic model. Based on this observation equation, the friction characteristics of each feed axis are adaptively tracked in the direction to obtain the friction dynamic response function. The characteristic of friction is that it is closely related to the motion state, and through the adaptive direction tracking, the parameters of the friction model are adjusted in real time to reflect the actual friction situation. The friction dynamic response function is used to describe the behavior of friction changing with time and motion direction, ensuring that the error compensation can accurately match the friction changes of each feed axis in actual work. At the same time, based on the path deviation vector, a high-frequency bandwidth analysis is performed on the tool center point, the workpiece surface contact point and the tool axis vector to obtain the path error observation state equation. The purpose of high-frequency bandwidth analysis is to identify the error introduced by the path deviation in the high-dynamic machining process. Since there are high-frequency components in the relative motion between the tool and the workpiece during the machining process, the high-frequency error is carefully observed, and the path error observation state equation can effectively describe the motion deviation characteristics of each point in this process and help to compensate for the error. The thermal deformation layering state equation, the friction dynamic response function and the path error observation state equation are substituted into the multi-dimensional extended state observer, and the nonlinear state of the system is reconstructed through the Lyapunov stability analysis to ensure the stability and accuracy of the state observer. Based on the Lyapunov stability analysis, the state observation gain matrix is ​​obtained to describe the rate of change of each state variable of the system and the sensitivity to the error. The state observation gain matrix is ​​configured with directional adaptive factors to adapt to the dynamic characteristics of different axes. The errors of each axis are independently observed and calculated through Kalman filtering to obtain multi-axis coupling observation data. Kalman filtering is an effective linear optimal estimation method that can use the dynamic model and measurement data of the system to estimate the system state and accurately observe the errors of each axis. The multi-axis coupling observation data is input into the state decoupling unit. Based on the processing of the decoupling unit, the thermal deformation error, friction error and path error are separated and calculated to obtain the error component decoupling matrix, which effectively separates the mutual influence between the error sources. Based on the error component decoupling matrix, the state feedback equation is constructed, and the errors are quantified by eigenvalue decomposition and singular value decomposition. Eigenvalue decomposition effectively analyzes the dynamic characteristics of the system, while singular value decomposition quantifies the influence of each error on the overall system to obtain error quantification data.Then, the error quantization data is substituted into the inverse state reconstruction equation, and each error quantity is converted into the thermal deformation, friction value and path error value of each axis through space mapping transformation. The process of space mapping transformation is to restore the observed data to the actual physical space so that the compensation instructions can be used for specific machine tool control.

[0034] Step 300, performing trust region parameter optimization on the thermal deformation, friction force value and path error value to obtain a thermal deformation compensation gain matrix, a friction force pre-compensation coefficient matrix and a path error compensation coefficient matrix;

[0035] It should be noted that the thermal deformation is decomposed according to the data of each axis of the five-axis CNC machine tool. The temperature field of the spindle unit, rotary unit, turntable unit and guide unit is monitored in real time to obtain the temperature data of these components and construct the initial compensation vector of thermal deformation. The friction force value is input into the compensation prediction model based on the Stribeck effect. The Stribeck effect describes the changing characteristics of friction force under low and high speed conditions. By analyzing the layered characteristic curves of static friction, Coulomb friction and viscous friction, the friction compensation calculation is performed in combination with the actual situation of five-axis linkage motion to obtain the initial compensation vector of friction force. Different types of friction play an important role in different motion stages of the machine tool. For example, static friction is significant at the start of motion, while Coulomb friction exists stably during motion. The compensation calculation is effectively performed through layered analysis. The path error value is analyzed in three-dimensional space characteristics, and corresponding compensation is performed based on the contact point on the workpiece surface, the tool center point and the tool axis vector. In this process, the compensation of path error is realized through coordinate transformation. The deviation caused by the relative motion between the tool and the workpiece is corrected by compensating the contact point on the workpiece surface. The compensation of the tool center point improves the machining accuracy of the tool. The compensation of the tool axis vector can effectively reduce the influence of the tool direction error during machining, and the initial compensation vector of the path error is obtained. Through multi-dimensional compensation, the machine tool is ensured to maintain high precision during machining. The initial compensation vector of thermal deformation, the initial compensation vector of friction force and the initial compensation vector of path error are input into the trust domain optimization algorithm, and the initial trust domain radius is set to obtain the optimized initial parameter group. The trust domain optimization algorithm is an effective nonlinear optimization method. By setting the initial trust domain radius, it is ensured that the search starts with a relatively small range in the parameter space, so as to gradually approach the optimal solution. Based on the optimized initial parameter group, the trust domain is iteratively calculated. In each iteration, the compensation parameters of each axis are gradient searched, and the trust domain radius is dynamically adjusted according to the search results to ensure the convergence and optimization accuracy of the algorithm. In this way, the optimal solution of the trust domain is obtained, that is, the optimal compensation parameters of thermal deformation, friction force and path error. The optimal solution of the trust region is substituted into the compensation parameter constraint equation for signal smoothing to ensure that the compensation parameters are smooth and continuous in practical applications. Through signal smoothing, the boundary conditions of the compensation parameters are obtained to ensure that the compensation signal remains within a reasonable range during execution. The boundary conditions of the compensation parameters are subjected to matrix decomposition operations, and the thermal deformation compensation parameters, friction compensation parameters, and path error compensation parameters are orthogonalized to eliminate the mutual interference between the compensation parameters. Through orthogonalization, the orthogonal basis of the compensation parameters is obtained, which represents the independent components of the compensation parameters in different directions, thereby achieving more effective error separation and compensation. On this basis, matrix reconstruction is performed based on the orthogonal basis of the compensation parameters, and the thermal deformation compensation gain matrix, friction pre-compensation coefficient matrix, and path error compensation coefficient matrix are obtained through linear algebra operations and optimization solutions.These three matrices are used to compensate for the thermal deformation, friction and path deviation of the CNC machine tool during the machining process, thereby improving the overall machining accuracy and stability of the machine tool.

[0036] The initial compensation vectors of thermal deformation, friction and path error are normalized to ensure the consistency of magnitude of different error sources and eliminate the influence caused by unit differences, so as to ensure the calculation stability in the optimization process. On this basis, the optimization objective function of the five-axis CNC machine tool is constructed. The objective function is used to quantify the influence of different compensation vectors on the overall error, so that the objective function value can be gradually reduced during the optimization process to improve the machining accuracy of the machine tool. The optimization objective function is expanded by the second-order Taylor at the current compensation parameter point, and the complex nonlinear objective function is approximated as a local quadratic model. When performing the second-order Taylor expansion, the local quadratic model is obtained by calculating the main diagonal elements and off-diagonal elements of the Hessian matrix. The Hessian matrix is ​​used to describe the curvature characteristics of the objective function. By analyzing its main diagonal and off-diagonal elements, the changing trend of the optimization objective function near the current point is understood, which helps the optimization algorithm find a more suitable step size and search direction. Based on the local quadratic model, the search range of the initial trust domain is calculated by setting the product of the step size upper limit and the objective function gradient value, and the initial trust domain radius is obtained. The trust domain radius is used to define the acceptable range of compensation parameter changes in the current iteration step. Whether the initial trust domain radius is selected reasonably or not directly affects the convergence speed and accuracy of the optimization algorithm. In this process, the setting of the upper limit of the step size needs to comprehensively consider the physical characteristics of the machine tool and the dynamic response capabilities of each axis to ensure that the optimization process will not be unstable due to too large a step size, nor will it converge slowly due to too small a step size. The initial trust domain radius is dynamically adjusted, and the trust domain radius is adjusted by calculating the ratio of the predicted descent rate to the actual descent rate to obtain an adaptive trust domain scale. The predicted descent rate refers to the decrease in the objective function value predicted by the local quadratic model, while the actual descent rate refers to the change in the objective function value obtained by the actual calculation. When the prediction is consistent with the actual, the trust domain radius is appropriately increased to speed up the optimization process; conversely, if there is a large deviation between the prediction and the actual, the trust domain radius needs to be reduced to improve the stability of the optimization. Through dynamic adjustment, it is ensured that the trust domain radius is always kept within a reasonable range throughout the optimization process to achieve a more stable and efficient optimization process. The adaptive trust region scale is substituted into the constraint construction unit, and the feasible domain is constructed in combination with the physical constraints of the thermal deformation compensation parameters, friction compensation parameters, and path error compensation parameters to obtain the constraint conditions for parameter search. The physical constraints include the motion restrictions of each axis, the physical characteristics of friction, and the maximum acceptable compensation amount of thermal deformation. Based on the parameter search constraints, the solution operation is performed, and the compensation parameter combination that minimizes the objective function value is gradually found by performing gradient descent on the objective function within the constraints. In this process, the termination condition of the iteration is determined by calculating the Euclidean distance between the current compensation parameter and the optimal compensation parameter.The size of the Euclidean distance reflects the difference between the current solution and the optimal solution. When the distance is less than the preset threshold, it is considered that a satisfactory solution is found, the iteration is stopped, and the optimized initial parameter group is obtained.

[0037] Step 400, performing three-level series compensation calculation on the thermal deformation compensation gain matrix, the friction pre-compensation coefficient matrix and the path error compensation coefficient matrix to obtain a compensation position instruction, a compensation speed instruction and a compensation acceleration instruction;

[0038] Specifically, the thermal deformation compensation gain matrix is ​​substituted into the first-level thermal deformation compensation controller for temperature field feedforward compensation calculation to obtain the first-level compensation reference. Through feedforward compensation, the thermal deformation is predicted in real time according to the temperature field changes of the key parts of the machine tool, so that the compensation amount is actively adjusted during the processing process to reduce the displacement deviation caused by thermal deformation. Based on the first-level compensation reference, the spatial thermal deformation of each axis of the five-axis CNC machine tool is coupled and analyzed, and the displacement compensation, velocity compensation and acceleration compensation of each axis are calculated through the thermoelastic deformation transfer chain to obtain the first-level compensation instruction matrix. The thermoelastic deformation transfer chain is used to describe the transmission characteristics of thermal deformation in the machine tool structure. Considering the coupling effect between the axes, it ensures that the compensation amount is not only effective on individual axes, but also can maintain accuracy in the case of five-axis linkage. The friction pre-compensation coefficient matrix is ​​substituted into the second-level friction compensation controller, and the static friction, Coulomb friction and viscous friction on each feed axis are nonlinearly predicted and controlled to obtain the second-level compensation reference. The friction compensation process adopts a nonlinear predictive control method, which can dynamically predict and adjust the friction compensation amount to cope with complex changes in friction characteristics. The influence of friction on the motion accuracy of the machine tool is effectively reduced by compensating for the initial static friction, the stable motion compensation of Coulomb friction, and the dynamic speed response compensation of viscous friction. The vibration suppression constraint equation is constructed based on the second-level compensation reference. The first-order derivative and the second-order derivative of the compensation signal are smoothed to reduce the machine tool vibration caused by the friction compensation process, thereby improving the stability of the machine tool in high-speed machining. The compensation signal under the five-axis linkage state is optimized through bandwidth optimization calculation to ensure that the compensation signal can respond to rapid dynamic changes without causing high-frequency vibration, and the second-level compensation instruction matrix is ​​obtained. The path error compensation coefficient matrix is ​​substituted into the third-level path compensation controller, and the compensation amount of the workpiece surface contact point, the tool center point compensation, and the tool axis vector compensation are spatially orthogonally decomposed to obtain the third-level compensation reference. The path compensation process takes into account various spatial errors in the machining process. By orthogonally decomposing the compensation amount of the workpiece surface, the tool center, and the tool axis, the complex spatial error is decomposed into errors in three independent directions. The third-level compensation reference is input into the compensation allocation unit, and the position, velocity and acceleration compensation of each axis are dynamically allocated and calculated to obtain the third-level compensation instruction matrix. In this process, the compensation allocation unit will reasonably allocate the compensation according to the current state of each axis to ensure that the movement of each axis meets the compensation requirements and does not exceed the limitations of physical constraints, thereby realizing dynamic management of position, velocity and acceleration compensation. The first-level compensation instruction matrix, the second-level compensation instruction matrix and the third-level compensation instruction matrix are synthesized in series, and multi-axis compensation coupling calculations are performed through the step-by-step nested control of the position loop, velocity loop and acceleration loop to obtain a comprehensive compensation instruction matrix.The nested control of the position loop, speed loop and acceleration loop makes the compensation process progressive, and can fine-tune the machine tool motion at different levels. Through the nested control, it is ensured that the compensation instructions can respond effectively at different speeds and accelerations, and the comprehensive compensation of multi-axis motion is realized. The comprehensive compensation instruction matrix is ​​transformed by split-axis mapping to obtain the compensation position instruction, compensation speed instruction and compensation acceleration instruction of each axis. The role of the split-axis mapping transformation is to decouple the comprehensive compensation instructions and distribute them to each independent axis to ensure that the results of the compensation calculation can be executed in the actual machine tool control system. These compensation instructions are used to guide the movement of each axis of the machine tool, offset the deviation caused by thermal deformation, friction and path error, and realize high-precision processing control.

[0039] Step 500: Perform trajectory reconstruction operation on the compensation position instruction, the compensation speed instruction and the compensation acceleration instruction to generate a position instruction sequence, a speed instruction sequence and an acceleration instruction sequence for each axis.

[0040] Specifically, the compensation position command, compensation speed command and compensation acceleration command are input into the trajectory reconstruction unit, and the incremental displacement of each axis of the five-axis CNC machine tool is calculated and the compensation amount is decomposed to obtain the initial compensation trajectory data. The compensation amount of each axis is allocated according to its unique motion characteristics to ensure the coordinated action of each axis in the five-axis linkage. The tool posture is reconstructed and calculated for the initial compensation trajectory data, and the posture reconstruction matrix is ​​constructed through the spatial geometric relationship of the workpiece surface contact point compensation, the tool center point compensation and the tool axis vector compensation. The tool posture directly determines the machining accuracy and surface quality. Therefore, it is necessary to combine the geometric relationship between the tool and the workpiece, and accurately describe the position and direction of the tool in three-dimensional space through the posture reconstruction matrix. The construction of the posture reconstruction matrix effectively captures the dynamic changes of the tool during the machining process. The posture reconstruction matrix is ​​substituted into the trajectory interpolation operation unit, and the trajectory synchronization calculation is performed through the real-time speed planning and acceleration planning under the five-axis linkage state to obtain the trajectory interpolation reference. Trajectory interpolation is an important step in achieving high-precision motion control for CNC machine tools. Its goal is to ensure that each axis moves at the required speed and acceleration in the same time period to achieve accurate positioning of the tool. Through real-time speed and acceleration planning, the trajectory is guaranteed to remain smooth and continuous during the movement process, reducing the trajectory following error, thereby improving the processing quality. Based on the trajectory interpolation reference, the acceleration continuity is processed, and the trajectory curve is smoothed by setting the jerk constraint and the third-order derivative continuity constraint to obtain the trajectory continuity parameter. The introduction of the jerk constraint and the third-order derivative continuity constraint effectively ensures the smoothness of the trajectory during high dynamic changes, avoids the vibration of the mechanical structure or excessive mechanical stress caused by the sudden change of the trajectory, and ensures that the machine tool remains stable and accurate during high-speed movement. The trajectory continuity parameters are input into the polynomial fitting unit, and the position curve, velocity curve and acceleration curve are mathematically reconstructed by the seventh-order Hermite interpolation algorithm to obtain the trajectory reconstruction equation. Seventh-order Hermite interpolation is an advanced interpolation method that describes the shape and change trend of the trajectory curve by introducing high-order derivative information. It is suitable for trajectory planning of high-precision CNC machining. After numerically solving the trajectory reconstruction equation, the discretized data of the motion parameters of each axis are obtained. Substitute the discretized trajectory data into the kinematic forward solution equation, and dynamically configure and calculate the motion parameters of each axis through the linkage constraint relationship between the spindle unit, the rotary unit, the turntable unit and the guide unit to obtain the trajectory instruction reference. The kinematic forward solution equation is used to convert the trajectory data into the actual motion parameters of each independent axis, while considering the physical coupling relationship between different units of the machine tool to ensure that each axis is coordinated with other axes when performing compensation. In order to achieve precise control under multi-axis linkage, the trajectory instruction reference is synchronized in time to ensure that all axes execute instructions according to a unified time schedule.Through the above steps, the specific position instruction sequence, speed instruction sequence and acceleration instruction sequence of each axis are generated. These sequences will be used to guide the precise movement of each axis of the CNC machine tool, thereby realizing real-time compensation and adjustment of errors during the machining process.

[0041] In the embodiment of the present application, by constructing a multi-dimensional extended state observer, hierarchical observation of thermal deformation error, friction error and path error is realized, the real-time identification problem of multi-source errors is solved, and the amplification effect of measurement noise is avoided. Based on the parameter adaptive configuration strategy of the trust domain optimization algorithm, the optimal compensation parameters are independently calculated for each compensation curve, which overcomes the limitations of the traditional unified parameter compensation method and significantly improves the compensation accuracy. A three-level series compensation control structure is adopted to realize the coordinated compensation of thermal deformation, friction and path errors, and effectively suppress the coupling effect of errors. Through the trajectory reconstruction method, the high-order continuity of the compensation trajectory is achieved, and the stability during the five-axis linkage process is guaranteed. In view of the characteristics of the five-axis CNC machine tool, the coordinated compensation of the workpiece surface contact point, the tool center point and the tool axis vector is realized, which significantly improves the spatial contour processing accuracy. The layered friction characteristic curve and dynamic response function are adopted to overcome the nonlinear problem caused by the Stribeck effect and improve the motion accuracy of the feed axis.

[0042] In a specific embodiment, the process of executing step 100 may specifically include the following steps:

[0043] The temperature field multi-point sampling analysis is performed on the spindle unit, rotary unit, turntable unit and guide rail unit of the five-axis CNC machine tool to obtain the spatial thermal field distribution data, and the thermal deformation of each axis is coupled calculated based on the spatial thermal field distribution data to obtain the thermal deformation transmission chain;

[0044] The thermal deformation transfer chain and the machine tool structural characteristic parameters are linearly superimposed to obtain the thermal deformation displacement vector;

[0045] Each feed axis of the five-axis CNC machine tool is modeled, and static friction, Coulomb friction and viscous friction are decomposed in three dimensions: displacement, velocity and acceleration to obtain the hierarchical friction characteristic curve.

[0046] The layered friction characteristic curve is input into the nonlinear friction prediction unit for iterative calculation to determine the amplitude and phase characteristics of the friction force of each axis, and obtain the basic friction parameter matrix. The friction force synthesis calculation under the five-axis linkage state is performed according to the basic friction parameter matrix to obtain the friction force vector;

[0047] The spatial positions of the contact points on the workpiece surface, the tool center point and the tool axis vector are sampled in real time and the deviation distribution is fitted to obtain a three-dimensional error distribution function. The three-dimensional error distribution function is substituted into the inverse kinematics equation of the machine tool, and the compensation amount of each axis is calculated through spatial coordinate transformation. The normal error, tangential error and tool axis direction error are vector-decomposed to obtain the path deviation vector.

[0048] Specifically, multi-point sampling analysis of the temperature field of the spindle unit, rotary unit, turntable unit and guide rail unit is performed to obtain the spatial thermal field distribution data of each key component of the machine tool. By installing temperature sensors at key locations of the machine tool, the temperature changes of each component are collected in real time. The obtained temperature field distribution data reflects the heat transfer and temperature changes under different working conditions due to heat sources (such as spindle rotation or friction). These thermal field data are used to analyze the coupling of thermal deformation of each axis to obtain a chain structure that describes the transfer of thermal deformation, namely the thermal deformation transfer chain. The thermal deformation transfer chain describes the mutual influence between different axes and components caused by temperature changes, and reflects the relationship between the thermal behavior of the machine tool and the structural complexity. For example, the following formula is used to describe the thermal deformation transfer chain:

[0049] ;

[0050] in, represents the thermal deformation transfer chain, It is The temperature change of each measuring point, is the thermal deformation coefficient, It is a structural characteristic factor of the machine tool, which describes the sensitivity of each component to thermal deformation. Through the coupling of these parameters, the thermal deformation of the machine tool during the processing is predicted. The thermal deformation transfer chain and the structural characteristic parameters of the machine tool are linearly superimposed to obtain the thermal deformation displacement vector. The thermal deformation is converted into the actual displacement through the characteristic parameters of the structure, which is expressed as the displacement contribution of thermal deformation in each axis. Thermal deformation displacement vector It is expressed as:

[0051] ;

[0052] in, It is a structural characteristic parameter matrix, which reflects the deformation coefficient and geometric characteristics of each part of the machine tool structure under temperature changes. Through calculation, the influence of thermal deformation on the specific position of each axis of the machine tool is obtained. For the friction characteristics of the five-axis CNC machine tool, each feed axis is modeled, and each part of the friction force is analyzed in layers. The influence of friction is divided into three forms: static friction, Coulomb friction and viscous friction. Static friction is significant at the beginning of movement, while Coulomb friction is a constant friction force that is independent of the movement speed, and viscous friction is proportional to the movement speed. In order to achieve precise compensation, the friction force is decomposed in three dimensions of displacement, velocity and acceleration to obtain a layered friction characteristic curve. In a layered manner, the changing characteristics of friction under different working conditions are reflected. The layered friction characteristic curve is input into the nonlinear friction prediction unit for iterative calculation to determine the amplitude and phase characteristics of the friction force of each axis, and obtain a basic friction parameter matrix that describes the friction behavior. For example, the magnitude and phase of the friction force are described by the following formula:

[0053] ;

[0054] in, and Represent the components of static friction, Coulomb friction and viscous friction respectively, and the function 𝑓 represents the friction synthesis result obtained by iterative calculation. Based on the basic friction parameter matrix, the friction force synthesis calculation under the five-axis linkage state is performed to obtain the friction force vector , so as to realize the processing of various friction errors in compensation. When compensating for path deviation, the spatial positions of the contact points on the workpiece surface, the tool center point and the tool axis vector are sampled in real time and the deviation distribution is fitted. By collecting the position data of the contact points on the workpiece surface, the deviation caused by the machining error in the actual machining process is analyzed, and the deviation of the tool center point and the tool axis vector is fitted and analyzed to obtain a three-dimensional error distribution function. This function is used to describe the error distribution between the tool and the workpiece in space during the machining process, especially the normal error, tangential error and the error in the tool axis direction. The three-dimensional error distribution function is substituted into the inverse kinematics equation of the machine tool, and the compensation amount of each axis is calculated through the transformation of the spatial coordinates. For example, the global three-dimensional deviation is converted into the compensation amount of each axis by using the inverse kinematics solution, and the normal error, tangential error and the error in the tool axis direction are vector decomposed to obtain the path deviation vector, which contains the specific position and direction adjustment amount of each axis that needs to be made during the compensation process.

[0055] In a specific embodiment, the process of executing step 200 may specifically include the following steps:

[0056] The thermal deformation displacement vector is input into the thermal deformation observation layer of the multi-dimensional extended state observer, and the thermal deformation of each axis of the five-axis CNC machine tool is processed in layers to obtain the thermal deformation layered state equation;

[0057] The friction force vector is analyzed by medium frequency bandwidth, and the nonlinear friction state observation equation is constructed through the five-axis linkage kinematic model. The friction characteristics of each feed axis are adaptively tracked in the direction to obtain the dynamic response function of the friction force.

[0058] Based on the path deviation vector, a high-frequency bandwidth analysis is performed on the tool center point, the workpiece surface contact point and the tool axis vector to obtain the path error observation state equation;

[0059] The thermal deformation layered state equation, friction dynamic response function and path error observation state equation are substituted into the multi-dimensional extended state observer, and the nonlinear state reconstruction is performed through Lyapunov stability analysis to obtain the state observation gain matrix.

[0060] The state observation gain matrix is ​​configured with directional adaptive factors, and the errors of each axis are independently observed and calculated through Kalman filtering to obtain multi-axis coupling observation data. The multi-axis coupling observation data is input into the state decoupling unit, and the thermal deformation error, friction error and path error are separated and calculated to obtain the error component decoupling matrix.

[0061] The state feedback equation is constructed based on the error component decoupling matrix. The errors are quantified through eigenvalue decomposition and singular value decomposition to obtain error quantization data. The error quantization data is substituted into the inverse state reconstruction equation, and the thermal deformation, friction force and path error values ​​are obtained through spatial mapping transformation.

[0062] Specifically, the thermal deformation displacement vector is input into the thermal deformation observation layer of the multi-dimensional extended state observer. By layering the thermal deformation of each axis of the five-axis CNC machine tool, the thermal deformation layered state equation is obtained to describe the independent deformation of each axis under different temperature conditions. Assume that the thermal deformation displacement vector is , which is layered into independent thermal deformation vectors for each axis:

[0063] ;

[0064] in, Represents the thermal deformation component of each axis. For the friction force vector, a medium-frequency bandwidth analysis is performed, and the nonlinear friction state observation equation is constructed using the kinematic model of the five-axis linkage. The friction force vector is subjected to frequency band analysis, and the friction component is decomposed into frequency-related characteristics to capture the different effects of friction on the dynamic response of the machine tool. On this basis, nonlinear state observation is performed through the kinematic model to obtain the dynamic response function of the friction force. Assume that the friction force vector is , its dynamic response function is expressed by the following formula:

[0065] ;

[0066] in, represents the dynamic response function of friction, is the friction force vector, and θ is the parameter of the nonlinear state observer. The function g describes the dynamic behavior of friction force under different motion states. By adaptively tracking the direction of the friction force, the friction changes of each feed axis in different motion directions are adjusted in real time to obtain more accurate friction compensation data. Based on the path deviation vector, a high-frequency bandwidth analysis is performed on the tool center point, the workpiece surface contact point, and the tool axis vector to obtain the path error observation state equation. Since the path deviation is usually caused by the relative motion between the tool and the workpiece, the high-frequency errors of these spatial positions are analyzed and observed. The path error observation state equation is used to describe the error between the workpiece and the tool under high dynamic machining conditions. Assume that the path deviation vector is , the path error observation state equation is expressed as:

[0067] ;

[0068] in, is the output of the path error observation state equation, is the path deviation vector, is the state variable of the observer, and the function The influence of high-frequency characteristics of path deviation on the overall error is described. The thermal deformation layered state equation, friction dynamic response function and path error observation state equation are substituted into the multi-dimensional extended state observer, and nonlinear state reconstruction is performed in combination with Lyapunov stability analysis to ensure the stability of the entire observation system. Based on the Lyapunov stability analysis, the state observation gain matrix is ​​obtained to describe the influence and sensitivity of each state variable on the error. This gain matrix is ​​used to configure the observer gain under the framework of the multi-dimensional extended state observer, so that the entire observation system can effectively capture the dynamic changes of the error. The state observation gain matrix is ​​configured with directional adaptive factors, and the errors of each axis are independently observed and estimated through Kalman filtering. Kalman filtering is a linear optimal estimation method. It combines the system model and observation data to accurately estimate the system state and obtain multi-axis coupled observation data on each axis. The multi-axis coupled observation data includes various error information such as thermal deformation, friction and path deviation. By inputting these data into the state decoupling unit, the thermal deformation error, friction error and path error are separated to obtain the error component decoupling moment. Based on the error component decoupling matrix, the state feedback equation is constructed, and the errors are quantified through eigenvalue decomposition and singular value decomposition to obtain the quantitative data of the errors. Eigenvalue decomposition is used to analyze the dynamic response characteristics of the system, while singular value decomposition effectively evaluates the influence of each error in the system on the overall dynamic performance. Substitute the error quantization data into the inverse state reconstruction equation, and obtain the specific thermal deformation, friction force and path error values ​​through spatial mapping transformation. For example, if the thermal deformation is The friction value is , the path error value is , which is described by the following inverse state reconstruction equation:

[0069] ;

[0070] in, Represents the inverse matrix of the spatial mapping transformation matrix, which is used to decouple the matrix Mapping back to the specific physical error quantities. Through inverse reconstruction, the observed errors are separated into the actual compensated thermal deformation, friction and path deviation data.

[0071] In a specific embodiment, the process of executing step 300 may specifically include the following steps:

[0072] The thermal deformation is decomposed according to the data of each axis of the five-axis CNC machine tool, and the initial compensation vector of thermal deformation is constructed through the real-time monitoring data of the temperature field of the spindle unit, rotary unit, turntable unit and guide rail unit;

[0073] The friction force value is input into the compensation prediction model based on the Stribeck effect, and the five-axis linkage compensation calculation is performed through the hierarchical characteristic curves of static friction, Coulomb friction and viscous friction to obtain the initial compensation vector of the friction force.

[0074] The path error value is analyzed in three-dimensional space, and the initial compensation vector of the path error is obtained through the coordinate transformation of workpiece surface contact point compensation, tool center point compensation and tool axis vector compensation.

[0075] Input the initial compensation vector of thermal deformation, the initial compensation vector of friction force and the initial compensation vector of path error into the trust region optimization algorithm, and set the initial trust region radius to obtain the optimization initial parameter group;

[0076] Based on the optimization of the initial parameter group, the trust region is iterated and calculated, and the gradient search and trust region radius of each axis compensation parameter are dynamically adjusted to obtain the trust region optimal solution. The trust region optimal solution is then substituted into the compensation parameter constraint equation for signal smoothing to obtain the compensation parameter boundary conditions.

[0077] Matrix decomposition operation is performed on the boundary conditions of the compensation parameters, and the thermal deformation compensation parameters, friction compensation parameters and path error compensation parameters are orthogonalized to obtain the compensation parameter orthogonal basis. Matrix reconstruction is performed based on the compensation parameter orthogonal basis, and the thermal deformation compensation gain matrix, friction pre-compensation coefficient matrix and path error compensation coefficient matrix are obtained through linear algebra operations and optimization solutions.

[0078] Specifically, the thermal deformation is decomposed according to the data of each axis of the five-axis CNC machine tool. The temperature field of the spindle unit, rotary unit, turntable unit and guide rail unit is monitored in real time, and the real-time temperature change data from multiple temperature sensors are collected to reflect the thermal effects of various parts of the machine tool during the processing. Based on these data, the initial compensation vector of thermal deformation is constructed. . Assume that the temperature field distribution data is , thermal deformation The following relationship is obtained:

[0079] ;

[0080] in, is the initial compensation vector for thermal deformation, Indicates temperature change, is the corresponding thermal deformation coefficient, Represents the total number of temperature monitoring points. Through this formula, the temperature change is converted into the displacement influence on each axis. The friction force value is input into the compensation prediction model based on the Stribeck effect to calculate the compensation of static friction, Coulomb friction and viscous friction in the case of five-axis linkage. The Stribeck effect is used to describe the change of friction characteristics at low speed, especially the transition between static friction and dynamic friction. In this model, the hierarchical characteristic curve of friction is described by the following function:

[0081]

[0082] Among them, among them, is the total friction force vector, , , Represent the static friction, Coulomb friction and viscous friction components respectively. Through hierarchical calculation, the contribution of each friction force under specific conditions is obtained, and the initial compensation vector of friction force is constructed. At the same time, for the compensation of path error, the three-dimensional spatial characteristic analysis of the path error value is performed. Through the error acquisition of the contact point on the workpiece surface, combined with the displacement of the tool center point and the spatial deviation of the tool axis vector, a comprehensive path error compensation model is obtained. Let the path error be P, and the initial compensation vector of the path error is obtained through the coordinate transformation matrix C :

[0083] ;

[0084] in, represents the initial compensation vector of the path error, P is the path error vector, is the coordinate transformation matrix. By transforming the coordinates of the contact points between the tool and the workpiece, the comprehensive deviation of the tool center and the tool axis direction is obtained. After the initial compensation vector is constructed, the initial compensation vector of thermal deformation, the initial compensation vector of friction force and the initial compensation vector of path error are input into the trust domain optimization algorithm, and the initial trust domain radius is set to obtain the optimized initial parameter group. The optimal compensation parameters are determined by trust domain optimization. In each iteration, the compensation parameters of each axis are gradient searched, and the trust domain radius is dynamically adjusted to ensure that the optimal compensation value is found. In the trust domain optimization process, the gradient information of the objective function is used to guide the search direction, and the dynamic adjustment of the trust domain radius ensures the stability and rapid convergence of the optimization process, and obtains the trust domain optimal solution. The trust domain optimal solution is substituted into the constraint equation of the compensation parameter for signal smoothing to ensure the continuity and feasibility of the compensation signal when applied, and obtain the boundary conditions of the compensation parameter. The sudden compensation signal may cause vibration or instability of the machine tool. Through smoothing, the sudden change in dynamic response can be effectively reduced. Perform matrix decomposition on the compensation parameter boundary conditions, and perform orthogonal processing on the thermal deformation compensation parameters, friction compensation parameters, and path error compensation parameters to eliminate the coupling effects between different compensation parameters and obtain the compensation parameter orthogonal basis. Assuming that the compensation parameter matrix is ​​A, the compensation parameter orthogonal basis B is obtained through orthogonal processing:

[0085]

[0086] in, It is an orthogonal matrix, which is used to convert the original compensation parameter matrix into an orthogonal basis form to ensure the independence of different error sources. Through orthogonal processing, the configuration of various compensation parameters is optimized to reduce the coupling error between multiple axes. , matrix reconstruction is performed, and through linear algebra operations and optimization solutions, the thermal deformation compensation gain matrix, friction pre-compensation coefficient matrix and path error compensation coefficient matrix are obtained. These matrices are used to compensate thermal deformation, friction and path error in real time. In this process, linear algebra operations are used to solve the optimal compensation coefficient to ensure that the obtained compensation matrix has the smallest error and the best dynamic response performance in practical applications.

[0087] In a specific embodiment, the execution step inputs the initial compensation vector of thermal deformation, the initial compensation vector of friction force and the initial compensation vector of path error into the trust region optimization algorithm, and sets the initial trust region radius, and the process of obtaining the optimized initial parameter group may specifically include the following steps:

[0088] The initial compensation vectors of thermal deformation, friction and path error are normalized, and the optimization objective function of the five-axis CNC machine tool is constructed.

[0089] Perform a second-order Taylor expansion on the optimization objective function at the current compensation parameter point, and obtain a local quadratic model by calculating the main diagonal elements and off-diagonal elements of the Hessian matrix;

[0090] Based on the local quadratic model, the initial trust region search range is calculated by setting the product of the step size upper limit and the objective function gradient value to obtain the initial trust region radius;

[0091] The initial trust region radius is dynamically adjusted, and the trust region radius is expanded or contracted by calculating the ratio of the predicted drop rate to the actual drop rate to obtain an adaptive trust region scale.

[0092] Substitute the adaptive trust region scale into the constraint condition construction unit, construct the feasible region through the physical constraints of thermal deformation compensation parameters, friction compensation parameters and path error compensation parameters, and obtain the parameter search constraints;

[0093] The parameter search constraints are solved, and the iteration termination condition is determined by calculating the Euclidean distance between the current compensation parameters and the optimal compensation parameters to obtain the optimized initial parameter group.

[0094] Specifically, the initial compensation vectors of thermal deformation, friction and path error are normalized, and each compensation amount is scaled to a uniform magnitude so that the optimization algorithm can reasonably compare and calculate between different error sources. The optimization objective function of the five-axis CNC machine tool is constructed based on the normalized compensation vector. The purpose of the optimization objective function is to minimize the error and improve the machining accuracy of the machine tool. Assume that the optimization objective function is ,in represents the vector of all normalized compensation parameters, then the objective function describes the relationship between the compensation amount and the error, and the goal is to find a The minimum parameter combination. During the optimization process, the objective function is optimized at the current compensation parameter point. The second-order Taylor expansion can use an approximate quadratic model to describe the change of the objective function near a certain point, simplifying the computational complexity of the optimization process. Assume At the point The second-order Taylor expansion of is:

[0095] ;

[0096] in, It means that the objective function is at point The gradient at is the Hessian matrix of the objective function, describing the second-order partial derivative information of the objective function. By calculating the main diagonal elements and off-diagonal elements of the Hessian matrix, a local quadratic model is constructed to represent the local curvature characteristics of the objective function. Based on the obtained local quadratic model, the search range of the initial trust region is calculated. By setting the upper limit of the step size The product of the gradient value of the objective function is used to obtain the initial trust region radius

[0097] ;

[0098] in, is the upper limit of the set step size, is the norm of the gradient. The initial trust domain radius determines the search range near the current compensation parameter point to ensure that a suitable parameter combination is found with a reasonable step size. The initial trust domain radius is dynamically adjusted to obtain an adaptive trust domain scale. The effectiveness of the current trust domain is judged by calculating the ratio between the predicted descent rate (i.e., the predicted value based on the quadratic model) and the actual descent rate (i.e., the change in the true objective function value). If the prediction is close to the actual, it means that the model is better, and the trust domain radius is increased to speed up the search; conversely, if the gap is large, the trust domain radius is reduced to ensure the stability of the search. By continuously adjusting the trust domain radius, an adaptive trust domain scale is obtained. Substitute the adaptive trust region scale into the constraint construction unit, and construct the feasible domain by combining the physical constraints of thermal deformation compensation parameters, friction compensation parameters, and path error compensation parameters. Suppose the physical constraints of the compensation parameters are , then the feasible domain is represented by the set of parameters that satisfy the following constraints:

[0099] ;

[0100] in, The physical constraints of the compensation parameters are used to ensure that the compensation amount is within the physically feasible range, avoid compensation values ​​that exceed the motion limit of the machine tool, and ensure the safe and stable operation of the machine tool. Solve the feasible domain to find the optimal compensation parameter combination that meets the physical constraints. In each iteration, the current compensation parameters are calculated. With the optimal compensation parameters The Euclidean distance between , to determine whether the preset iteration termination condition is met. When the Euclidean distance is less than the preset threshold When , it is considered that a satisfactory solution has been found, the iteration is stopped, and the optimization initial parameter group is obtained:

[0101] ;

[0102] This condition ensures that the optimization algorithm stops when it finds a solution that is close enough to the optimal solution, thus avoiding unnecessary calculations and saving time and computing resources.

[0103] In a specific embodiment, the process of executing step 400 may specifically include the following steps:

[0104] Substitute the thermal deformation compensation gain matrix into the first-stage thermal deformation compensation controller to perform temperature field feedforward compensation calculation to obtain the first-stage compensation reference value;

[0105] Based on the first-level compensation reference, the spatial thermal deformation coupling analysis of each axis of the five-axis CNC machine tool is carried out, and the displacement compensation, velocity compensation and acceleration compensation of each axis are calculated through the thermal elastic deformation transfer chain to obtain the first-level compensation instruction matrix;

[0106] Substitute the friction pre-compensation coefficient matrix into the second-level friction compensation controller, perform nonlinear predictive control calculation on the compensation components of static friction, Coulomb friction and viscous friction in each feed axis, and obtain the second-level compensation reference value;

[0107] The vibration suppression constraint equation is constructed based on the second-level compensation reference quantity, and the compensation signal is smoothed by limiting the first-order derivative and second-order derivative. The compensation signal under the five-axis linkage state is optimized by bandwidth calculation to obtain the second-level compensation instruction matrix.

[0108] Substitute the path error compensation coefficient matrix into the third-level path compensation controller, perform spatial orthogonal decomposition on the workpiece surface contact point compensation, tool center point compensation and tool axis vector compensation, and obtain the third-level compensation reference amount;

[0109] The third-level compensation reference quantity is input into the compensation distribution unit, and the position, speed and acceleration compensation quantities of each axis are dynamically distributed and calculated to obtain the third-level compensation instruction matrix;

[0110] The first-level compensation instruction matrix, the second-level compensation instruction matrix and the third-level compensation instruction matrix are serially synthesized, and multi-axis compensation coupling calculation is performed through the step-by-step nested control of the position loop, the speed loop and the acceleration loop to obtain a comprehensive compensation instruction matrix;

[0111] The comprehensive compensation instruction matrix is ​​transformed by axis mapping to obtain compensation position instruction, compensation speed instruction and compensation acceleration instruction.

[0112] Specifically, the thermal deformation compensation gain matrix is ​​substituted into the first-stage thermal deformation compensation controller to perform temperature field feedforward compensation calculation and obtain the first-stage compensation reference value. Assume that the thermal deformation compensation gain matrix is , which describes the influence of thermal deformation on each axis of the machine tool under different temperature conditions. Through feedforward control, the temperature change is actively compensated without waiting for the error to occur, thereby reducing the displacement deviation caused by thermal deformation. Assume that the current temperature field data is , then the first level compensation reference It is expressed as:

[0113] ;

[0114] in, Indicates the first level compensation reference amount, is the temperature field data of each key component at present, is the thermal deformation compensation gain matrix. Through compensation, the movement of each axis of the machine tool is adjusted in real time according to the change of the temperature field to reduce the influence of thermal deformation on the processing accuracy. Based on the first-level compensation reference, the spatial thermal deformation coupling analysis of each axis of the five-axis CNC machine tool is carried out. The displacement compensation, velocity compensation and acceleration compensation of each axis are calculated through the thermoelastic deformation transfer chain to obtain the first-level compensation instruction matrix. The thermoelastic deformation transfer chain describes the transfer characteristics of heat in the machine tool structure and the influence of the resulting deformation on each axis. The friction pre-compensation coefficient matrix is ​​substituted into the second-level friction compensation controller to perform nonlinear predictive control calculations on the compensation components of static friction, Coulomb friction and viscous friction in each feed axis to obtain the second-level compensation reference. The compensation of friction needs to take into account its different performances under different motion states, especially static friction at low speed and viscous friction at high speed. Assume that the friction pre-compensation coefficient matrix is The current friction state is , then the second level compensation reference It is expressed as:

[0115] ;

[0116] in, is the second level compensation reference, is the current friction state of each axis, is the friction pre-compensation coefficient matrix. Based on this compensation reference, the vibration suppression constraint equation is constructed. By smoothing the first-order derivative and second-order derivative of the compensation signal, it is ensured that the compensation signal will not cause vibration or instability of the machine tool in actual application. At the same time, the compensation signal under the five-axis linkage state is optimized by bandwidth calculation to ensure that the compensation signal has sufficient bandwidth when responding to rapid changes, and the second-level compensation instruction matrix is ​​obtained. Substitute the path error compensation coefficient matrix into the third-level path compensation controller, perform spatial orthogonal decomposition on the workpiece surface contact point compensation, tool center point compensation and tool axis vector compensation, and obtain the third-level compensation reference. The path error is caused by the deviation between the motion path of the machine tool and the actual processing path, involving the complex spatial relationship between the workpiece and the tool. Assume that the path error compensation coefficient matrix is , the path deviation is , then the third level compensation reference amount It is expressed as:

[0117] ;

[0118] in, Indicates the third level compensation reference amount, is the path deviation, It is the path error compensation coefficient matrix. Through orthogonal decomposition, the path deviation is decomposed into independent compensation components along different directions, and the compensation components are input into the compensation distribution unit. The position, speed and acceleration compensation of each axis are dynamically distributed and calculated to obtain the third-level compensation instruction matrix. . The first level compensation instruction matrix , the second level compensation instruction matrix and the third level compensation instruction matrix The serial synthesis operation is performed, and the multi-axis compensation coupling calculation is performed through the step-by-step nesting control of the position loop, speed loop and acceleration loop to obtain the comprehensive compensation instruction matrix. The step-by-step nesting control method enables each compensation loop to support each other in different dimensions to achieve all-round compensation. The position loop is mainly used to compensate for the position error, the speed loop is used to smoothly control the machine tool movement and reduce the jitter caused by the sudden change of speed, and the acceleration loop ensures the stability of the motion state during the compensation process. The comprehensive compensation instruction matrix is ​​transformed by split-axis mapping to obtain the compensation position instruction, compensation speed instruction and compensation acceleration instruction. Through split-axis mapping, the comprehensive compensation results are assigned to the specific machine tool control axis to guide the precise movement of each axis. For example, in a certain processing process, the thermal deformation caused by the increase of the spindle temperature will be compensated in real time through the first-level compensation instruction matrix, and the second-level compensator will be dynamically adjusted due to the change of friction, while the path deviation will be finely compensated through the third-level path compensator. All these compensation instructions are combined to achieve precise control of the movement of each axis through step-by-step control, effectively reducing the influence of thermal deformation, friction and path error, and improving processing accuracy and surface quality.

[0119] In a specific embodiment, the process of executing step 500 may specifically include the following steps:

[0120] The compensation position command, the compensation speed command and the compensation acceleration command are input into the trajectory reconstruction unit, and the initial compensation trajectory data is obtained by calculating the incremental displacement of each axis of the five-axis CNC machine tool and decomposing the compensation amount;

[0121] The tool posture reconstruction calculation is performed on the initial compensation trajectory data, and the posture reconstruction matrix is ​​constructed through the spatial geometric relationship of workpiece surface contact point compensation, tool center point compensation and tool axis vector compensation;

[0122] Substitute the posture reconstruction matrix into the trajectory interpolation operation unit, and obtain the trajectory interpolation reference through real-time velocity planning and acceleration planning under the five-axis linkage state and trajectory synchronization calculation;

[0123] Based on the trajectory interpolation reference, acceleration continuity processing is performed. By setting the jerk constraint and the third-order derivative continuity constraint, the trajectory curve is smoothed and the trajectory continuity parameters are obtained.

[0124] The trajectory continuity parameters are input into the polynomial fitting unit, and the position curve, velocity curve and acceleration curve are mathematically reconstructed by the seventh-order Hermite interpolation algorithm to obtain the trajectory reconstruction equation. The trajectory reconstruction equation is numerically solved, and the motion parameters of each axis are discretized to obtain the discretized trajectory data.

[0125] The discretized trajectory data is substituted into the kinematic forward equation. Through the linkage constraint relationship among the spindle unit, rotary unit, turntable unit and guide rail unit, the motion parameters of each axis are dynamically configured and calculated to obtain the trajectory instruction reference quantity. The trajectory instruction reference quantity is then synchronized in time to generate the position instruction sequence, velocity instruction sequence and acceleration instruction sequence of each axis.

[0126] Specifically, the compensation position command, compensation speed command and compensation acceleration command are input into the trajectory reconstruction unit, and the initial compensation trajectory data is generated by calculating the incremental displacement of each axis of the machine tool and decomposing the compensation amount. The calculation of the incremental displacement depends on the position, speed and acceleration compensation of each axis. For example, the incremental displacement Obtained by the following formula:

[0127] ;

[0128] in, It is Incremental displacement of the axis, , and Respectively, in time The compensation position, velocity and acceleration instructions at each moment, is the time step. Through incremental calculation, the displacement changes of each axis are gradually accumulated, and the initial compensation trajectory data is generated. The tool posture is reconstructed for the initial compensation trajectory data to ensure that the spatial position and direction of the tool meet the expected requirements under complex machining conditions. Combine the compensation of the contact point on the workpiece surface, the compensation of the tool center point and the compensation of the tool axis direction. Through these spatial geometric relationships, a posture reconstruction matrix is ​​constructed to describe the precise position and direction of the tool in space. Assume that the position of the contact point on the workpiece surface is , the position of the tool center point is , the knife axis direction is , then the pose reconstruction matrix for:

[0129] ;

[0130] Pose reconstruction matrix Contains the spatial geometric relationship that the tool needs to maintain during the machining process. Substitute the pose reconstruction matrix into the trajectory interpolation operation unit. Under the state of five-axis linkage, the interpolation reference of the trajectory is obtained by planning the real-time speed and acceleration. According to the dynamic performance of each axis of the machine tool, the motion command of each axis is calculated in real time so that the tool can be processed along the predetermined path. Assume that the interpolation speed function is , the acceleration function is , the trajectory interpolation reference is described by the following formula:

[0131] ;

[0132] Through trajectory interpolation, the motion between the five axes can be synchronized, so that the tool moves accurately along the desired trajectory during the machining process. After completing the trajectory interpolation, the continuity of the acceleration is processed based on the trajectory interpolation reference. Since the movement of the machine tool usually needs to maintain a high degree of smoothness, especially during acceleration and deceleration, the jerk (i.e., the rate of change of acceleration) is constrained and the continuity of the third-order derivative is guaranteed. Smoothing processing can significantly reduce discontinuous changes in the trajectory and avoid machine tool vibration caused by sudden changes in acceleration. The smoothed trajectory parameters are input into the polynomial fitting unit, and the position, velocity and acceleration curves are mathematically reconstructed through the seventh-order Hermite interpolation. The seventh-order Hermite interpolation is a high-order interpolation method that ensures that the trajectory curve maintains sufficient smoothness and continuity during the machining process by considering both position and derivative information. Through interpolation, the trajectory reconstruction equation is obtained. The reconstruction of position, velocity and acceleration is described in the following form:

[0133] ;

[0134] in, is the reconstructed trajectory curve, is the seventh-order Hermite interpolation basis function, are the initial position, velocity and acceleration respectively. The trajectory function obtained by interpolation reconstruction is used to describe the trajectory changes of each axis of the machine tool during the machining process. The reconstructed trajectory equation is numerically solved, and the motion parameters of each axis are discretized for use in the actual control system. The discretized trajectory data contains the position, velocity and acceleration that each axis needs to reach at each time point. The discretized trajectory data is substituted into the kinematic forward solution equation, and the motion parameters of each axis are dynamically configured and calculated in combination with the linkage constraint relationship between the spindle, turntable, guide rail and other units to obtain the trajectory instruction reference. Through the kinematic forward solution, the desired tool trajectory is converted into specific motion instructions for each axis. These motion instructions are further processed by time synchronization to ensure that each axis maintains synchronous motion within the same time step. Finally, the specific position instruction sequence, velocity instruction sequence and acceleration instruction sequence of each axis are generated.

[0135] The above describes the adaptive error compensation method of the high-precision CNC machine tool in the embodiment of the present application. The following describes the adaptive error compensation system 10 of the high-precision CNC machine tool in the embodiment of the present application. Figure 2 In the embodiment of the present application, an adaptive error compensation system 10 for a high-precision CNC machine tool includes:

[0136] A modeling module 11 is used to mathematically model the multi-dimensional errors of the five-axis CNC machine tool to obtain a thermal deformation displacement vector, a friction force vector and a path deviation vector;

[0137] An observation module 12 is used to input the thermal deformation displacement vector, the friction force vector and the path deviation vector into a multi-dimensional extended state observer for error observation, and obtain the thermal deformation amount, the friction force value and the path error value;

[0138] The optimization module 13 is used to perform trust region parameter optimization on the thermal deformation, friction value and path error value to obtain a thermal deformation compensation gain matrix, a friction pre-compensation coefficient matrix and a path error compensation coefficient matrix;

[0139] The calculation module 14 is used to perform three-level series compensation calculation on the thermal deformation compensation gain matrix, the friction pre-compensation coefficient matrix and the path error compensation coefficient matrix to obtain a compensation position instruction, a compensation speed instruction and a compensation acceleration instruction;

[0140] The generation module 15 is used to perform trajectory reconstruction operation on the compensation position instruction, the compensation speed instruction and the compensation acceleration instruction to generate a position instruction sequence, a speed instruction sequence and an acceleration instruction sequence for each axis.

[0141] Through the cooperation of the above components and the construction of a multi-dimensional extended state observer, the hierarchical observation of thermal deformation error, friction error and path error is realized, the real-time identification problem of multi-source errors is solved, and the amplification effect of measurement noise is avoided. Based on the parameter adaptive configuration strategy of the trust region optimization algorithm, the optimal compensation parameters are independently calculated for each compensation curve, which overcomes the limitations of the traditional unified parameter compensation method and significantly improves the compensation accuracy. The three-level series compensation control structure is adopted to realize the coordinated compensation of thermal deformation, friction and path error, and effectively suppress the coupling effect of errors. Through the trajectory reconstruction method, the high-order continuity of the compensation trajectory is achieved, ensuring the stability during the five-axis linkage process. According to the characteristics of the five-axis CNC machine tool, the coordinated compensation of the workpiece surface contact point, the tool center point and the tool axis vector is realized, which significantly improves the spatial contour processing accuracy. The layered friction characteristic curve and dynamic response function are adopted to overcome the nonlinear problem caused by the Stribeck effect and improve the motion accuracy of the feed axis.

[0142] See also Figure 3 , Figure 3 This is a schematic block diagram of the structure of an electronic device 300 provided in an embodiment of the present application. The electronic device 300 includes a processor 301 and a memory 302. The processor 301 and the memory 302 are connected via a system bus 203, wherein the memory 302 may include a non-volatile storage medium and an internal memory.

[0143] The non-volatile storage medium can store a computer program. The computer program includes program instructions, and when the program instructions are executed by the processor 301, the processor 301 can execute any of the above-mentioned adaptive error compensation methods for high-precision CNC machine tools.

[0144] The processor 301 is used to provide computing and control capabilities to support the operation of the entire electronic device 300 .

[0145] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor 301, the processor 301 can execute any of the above-mentioned adaptive error compensation methods for high-precision CNC machine tools.

[0146] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a partial structure related to the present application scheme, and does not constitute a limitation on the electronic device 300 involved in the present application scheme. The specific electronic device 300 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0147] It should be understood that the processor 301 may be a central processing unit (CPU), and the processor 301 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0148] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working process of the electronic device 300 described above can refer to the corresponding process of the adaptive error compensation method of the aforementioned high-precision CNC machine tool, and will not be repeated here.

[0149] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by one or more processors, the one or more processors implement the adaptive error compensation method for high-precision CNC machine tools provided in the embodiment of the present application.

[0150] The computer-readable storage medium may be an internal storage unit of the electronic device 300 in the aforementioned embodiment, such as a hard disk or memory of the electronic device 300. The computer-readable storage medium may also be an external storage device of the electronic device 300, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped with the electronic device 300.

[0151] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0152] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable an electronic device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0153] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An adaptive error compensation method for a high-precision CNC machine tool, characterized in that: The method comprises: The multi-dimensional error of the five-axis CNC machine tool is mathematically modeled to obtain the thermal deformation displacement vector, friction force vector and path deviation vector; Inputting the thermal deformation displacement vector, the friction force vector and the path deviation vector into a multi-dimensional extended state observer for error observation to obtain a thermal deformation amount, a friction force value and a path error value; Performing trust region parameter optimization on the thermal deformation, the friction force value and the path error value to obtain a thermal deformation compensation gain matrix, a friction force pre-compensation coefficient matrix and a path error compensation coefficient matrix; Performing three-level series compensation calculation on the thermal deformation compensation gain matrix, the friction pre-compensation coefficient matrix and the path error compensation coefficient matrix to obtain a compensation position instruction, a compensation speed instruction and a compensation acceleration instruction; A trajectory reconstruction operation is performed on the compensation position instruction, the compensation speed instruction and the compensation acceleration instruction to generate a position instruction sequence, a speed instruction sequence and an acceleration instruction sequence for each axis.

2. The adaptive error compensation method for high-precision CNC machine tools according to claim 1, characterized in that: The multi-dimensional error of the five-axis CNC machine tool is mathematically modeled to obtain a thermal deformation displacement vector, a friction force vector and a path deviation vector, including: Perform temperature field multi-point sampling analysis on the spindle unit, rotary unit, turntable unit and guide rail unit of the five-axis CNC machine tool to obtain spatial thermal field distribution data, and perform coupling calculation on the thermal deformation of each axis based on the spatial thermal field distribution data to obtain the thermal deformation transfer chain; Performing linear superposition operation on the thermal deformation transfer chain and the machine tool structural characteristic parameters to obtain a thermal deformation displacement vector; Each feed axis of the five-axis CNC machine tool is modeled, and static friction, Coulomb friction and viscous friction are decomposed in three dimensions: displacement, velocity and acceleration to obtain the hierarchical friction characteristic curve. The layered friction characteristic curve is input into a nonlinear friction prediction unit for iterative calculation, the amplitude and phase characteristics of the friction force of each axis are determined, a basic friction parameter matrix is ​​obtained, and a friction force synthesis calculation is performed under a five-axis linkage state according to the basic friction parameter matrix to obtain a friction force vector; The spatial positions of the contact points on the workpiece surface, the tool center point and the tool axis vector are sampled in real time and the deviation distribution is fitted to obtain a three-dimensional error distribution function. The three-dimensional error distribution function is substituted into the inverse kinematics equation of the machine tool, and the compensation amount of each axis is calculated through spatial coordinate transformation. The normal error, tangential error and tool axis direction error are vector-decomposed to obtain the path deviation vector.

3. The adaptive error compensation method for high-precision CNC machine tools according to claim 2, characterized in that: The step of inputting the thermal deformation displacement vector, the friction force vector and the path deviation vector into a multi-dimensional extended state observer for error observation to obtain the thermal deformation amount, the friction force value and the path error value includes: The thermal deformation displacement vector is input into the thermal deformation observation layer of the multi-dimensional extended state observer, and the thermal deformation of each axis of the five-axis CNC machine tool is processed in layers to obtain a thermal deformation layered state equation; Performing intermediate frequency bandwidth analysis on the friction force vector, constructing a nonlinear friction state observation equation through a five-axis linkage kinematic model, performing direction adaptive tracking on the friction characteristics of each feed axis, and obtaining a dynamic response function of the friction force; Based on the path deviation vector, a high-frequency bandwidth analysis is performed on the tool center point, the workpiece surface contact point and the tool axis vector to obtain a path error observation state equation; Substituting the thermal deformation stratification state equation, the friction force dynamic response function and the path error observation state equation into a multi-dimensional extended state observer, performing nonlinear state reconstruction through Lyapunov stability analysis, and obtaining a state observation gain matrix; The state observation gain matrix is ​​configured with a directional adaptive factor, and each error of each axis is independently observed and calculated by a Kalman filter to obtain multi-axis coupling observation data, and the multi-axis coupling observation data is input into a state decoupling unit, and thermal deformation error, friction error and path error are separately calculated to obtain an error component decoupling matrix; A state feedback equation is constructed based on the error component decoupling matrix, and each error is quantified through eigenvalue decomposition and singular value decomposition to obtain error quantization data. The error quantization data is substituted into the inverse state reconstruction equation, and the thermal deformation, friction force and path error values ​​are obtained through spatial mapping transformation.

4. The adaptive error compensation method for high-precision CNC machine tools according to claim 3, characterized in that: The trust region parameter optimization is performed on the thermal deformation, the friction force value and the path error value to obtain a thermal deformation compensation gain matrix, a friction force pre-compensation coefficient matrix and a path error compensation coefficient matrix, including: Decomposing the thermal deformation according to the axes of the five-axis CNC machine tool, constructing the initial compensation vector of thermal deformation through real-time monitoring data of the temperature field of the spindle unit, the rotary unit, the turntable unit and the guide rail unit; The friction force value is input into the compensation prediction model based on the Stribeck effect, and the five-axis linkage compensation calculation is performed through the layered characteristic curves of static friction, Coulomb friction and viscous friction to obtain the initial compensation vector of the friction force; Performing a three-dimensional spatial feature analysis on the path error value, and obtaining an initial compensation vector for the path error through coordinate transformation of workpiece surface contact point compensation, tool center point compensation, and tool axis vector compensation; Inputting the initial compensation vector of thermal deformation, the initial compensation vector of friction force and the initial compensation vector of path error into a trust region optimization algorithm, and setting an initial trust region radius to obtain an optimized initial parameter group; Based on the optimized initial parameter group, trust domain iterative calculation is performed, gradient search and trust domain radius dynamic adjustment are performed on compensation parameters of each axis to obtain the trust domain optimal solution, and the trust domain optimal solution is substituted into the compensation parameter constraint equation for signal smoothing to obtain the compensation parameter boundary condition; A matrix decomposition operation is performed on the compensation parameter boundary conditions, and the thermal deformation compensation parameters, friction compensation parameters and path error compensation parameters are orthogonalized to obtain a compensation parameter orthogonal basis. Matrix reconstruction is performed based on the compensation parameter orthogonal basis, and the thermal deformation compensation gain matrix, friction pre-compensation coefficient matrix and path error compensation coefficient matrix are obtained through linear algebra operations and optimization solutions.

5. The adaptive error compensation method for high-precision CNC machine tools according to claim 4, characterized in that: The step of inputting the initial thermal deformation compensation vector, the initial friction force compensation vector and the initial path error compensation vector into a trust region optimization algorithm and setting an initial trust region radius to obtain an initial optimization parameter group includes: Normalizing the initial compensation vector for thermal deformation, the initial compensation vector for friction force, and the initial compensation vector for path error, and constructing an optimization objective function for a five-axis CNC machine tool; Performing a second-order Taylor expansion on the optimization objective function at the current compensation parameter point, and obtaining a local quadratic model by calculating the main diagonal elements and off-diagonal elements of the Hessian matrix; Based on the local quadratic model, an initial trust region search range is calculated by setting a product of a step size upper limit and a gradient value of an objective function to obtain an initial trust region radius; Dynamically adjusting the initial trust region radius, scaling the trust region radius by calculating the ratio of the predicted descent rate to the actual descent rate, and obtaining an adaptive trust region scale; Substituting the adaptive trust region scale into the constraint condition construction unit, constructing the feasible region through the physical constraints of thermal deformation compensation parameters, friction compensation parameters and path error compensation parameters, and obtaining parameter search constraints; The parameter search constraint is solved, and the iteration termination condition is determined by calculating the Euclidean distance between the current compensation parameter and the optimal compensation parameter to obtain an optimized initial parameter group.

6. The adaptive error compensation method for high-precision CNC machine tools according to claim 4, characterized in that: The three-level series compensation calculation is performed on the thermal deformation compensation gain matrix, the friction pre-compensation coefficient matrix and the path error compensation coefficient matrix to obtain a compensation position instruction, a compensation speed instruction and a compensation acceleration instruction, including: Substituting the thermal deformation compensation gain matrix into the first-stage thermal deformation compensation controller to perform temperature field feedforward compensation calculation to obtain a first-stage compensation reference value; Based on the first-level compensation reference, the spatial thermal deformation coupling analysis of each axis of the five-axis CNC machine tool is carried out, and the displacement compensation, velocity compensation and acceleration compensation of each axis are calculated through the thermal elastic deformation transfer chain to obtain the first-level compensation instruction matrix; Substituting the friction pre-compensation coefficient matrix into the second-level friction compensation controller, performing nonlinear predictive control calculation on the compensation components of static friction, Coulomb friction and viscous friction in each feed axis, and obtaining the second-level compensation reference amount; Based on the second-level compensation reference quantity, a vibration suppression constraint equation is constructed, and a smoothing process is performed through the first-order derivative and second-order derivative limits of the compensation signal. The bandwidth of the compensation signal under the five-axis linkage state is optimized and calculated to obtain the second-level compensation instruction matrix. Substituting the path error compensation coefficient matrix into the third-level path compensation controller, performing spatial orthogonal decomposition on the workpiece surface contact point compensation, tool center point compensation and tool axis vector compensation to obtain the third-level compensation reference amount; The third-level compensation reference amount is input into the compensation distribution unit, and the position, speed and acceleration compensation amounts of each axis are dynamically distributed and calculated to obtain a third-level compensation instruction matrix; The first-level compensation instruction matrix, the second-level compensation instruction matrix and the third-level compensation instruction matrix are subjected to a series synthesis operation, and a multi-axis compensation coupling calculation is performed through the step-by-step nested control of the position loop, the speed loop and the acceleration loop to obtain a comprehensive compensation instruction matrix; The comprehensive compensation instruction matrix is ​​subjected to axis-by-axis mapping transformation to obtain compensation position instructions, compensation speed instructions and compensation acceleration instructions.

7. The adaptive error compensation method for high-precision CNC machine tools according to claim 6, characterized in that: The performing trajectory reconstruction operation on the compensation position instruction, the compensation speed instruction and the compensation acceleration instruction to generate a position instruction sequence, a speed instruction sequence and an acceleration instruction sequence for each axis includes: Inputting the compensation position instruction, the compensation speed instruction and the compensation acceleration instruction into a trajectory reconstruction unit, and obtaining initial compensation trajectory data by calculating the incremental displacement of each axis of the five-axis CNC machine tool and decomposing the compensation amount; Performing tool posture reconstruction calculation on the initial compensation trajectory data, and constructing a posture reconstruction matrix through the spatial geometric relationship of workpiece surface contact point compensation, tool center point compensation and tool axis vector compensation; Substituting the posture reconstruction matrix into the trajectory interpolation operation unit, through real-time speed planning and acceleration planning under the five-axis linkage state, and performing trajectory synchronization calculation, the trajectory interpolation reference amount is obtained; Based on the trajectory interpolation reference, acceleration continuity processing is performed, and by setting acceleration constraints and third-order derivative continuity constraints, the trajectory curve is smoothed and calculated to obtain trajectory continuity parameters; The trajectory continuity parameters are input into a polynomial fitting unit, and the position curve, the velocity curve and the acceleration curve are mathematically reconstructed by a seventh-order Hermite interpolation algorithm to obtain a trajectory reconstruction equation, and the trajectory reconstruction equation is numerically solved, and the motion parameters of each axis are discretized to obtain discretized trajectory data; The discretized trajectory data is substituted into the kinematic forward equation, and the motion parameters of each axis are dynamically configured and calculated through the linkage constraint relationship among the spindle unit, the rotary unit, the turntable unit and the guide rail unit to obtain the trajectory instruction reference quantity, and the trajectory instruction reference quantity is subjected to time-series synchronization processing to generate the position instruction sequence, speed instruction sequence and acceleration instruction sequence of each axis.

8. An adaptive error compensation system for a high-precision CNC machine tool, characterized in that: The adaptive error compensation system of the high-precision CNC machine tool comprises: A modeling module is used to mathematically model the multi-dimensional errors of the five-axis CNC machine tool to obtain the thermal deformation displacement vector, friction force vector and path deviation vector; An observation module, used for inputting the thermal deformation displacement vector, the friction force vector and the path deviation vector into a multi-dimensional extended state observer for error observation, so as to obtain a thermal deformation amount, a friction force value and a path error value; An optimization module, used for performing trust region parameter optimization on the thermal deformation, the friction force value and the path error value to obtain a thermal deformation compensation gain matrix, a friction force pre-compensation coefficient matrix and a path error compensation coefficient matrix; A calculation module, used for performing three-level series compensation calculation on the thermal deformation compensation gain matrix, the friction pre-compensation coefficient matrix and the path error compensation coefficient matrix to obtain a compensation position instruction, a compensation speed instruction and a compensation acceleration instruction; A generation module is used to perform trajectory reconstruction operations on the compensation position instructions, the compensation speed instructions and the compensation acceleration instructions to generate position instruction sequences, speed instruction sequences and acceleration instruction sequences for each axis.

9. An electronic device, characterized in that: The electronic device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the electronic device executes the adaptive error compensation method for a high-precision CNC machine tool as described in any one of claims 1-7.

10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the adaptive error compensation method for a high-precision CNC machine tool according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Machine tool dynamic error compensation method and system based on instruction sequence analysis

    CN117170308A

  • Following error control method and system for swing shaft of numerical control machine tool

    CN119087909A