Digital Twin Five-Axis Machine Tool Contour Error Prediction Method, System and Electronic Equipment
By using digital twin technology and autoregressive exogenous ARX models, accurate dynamic prediction of five-axis machine tool contour errors was achieved, which solved the shortcomings of precision control in traditional methods, improved machining accuracy and debugging efficiency, and reduced maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-27
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies struggle to accurately and dynamically predict contour errors during five-axis machine tool machining, resulting in poor machining accuracy and shape consistency. Furthermore, traditional methods lack unified multi-source error coupling analysis and adaptive compensation capabilities, leading to high maintenance costs and long debugging cycles.
A real-time synchronous five-axis machine tool contour error prediction system is constructed using digital twin technology. By identifying the dynamic parameters of the electromechanical system of the servo axis online, the open-loop dynamic model is reconstructed, and the error is predicted using an autoregressive exogenous ARX model. Combined with kinematic calculations, the system achieves accurate prediction and compensation of contour errors.
It achieves high-fidelity simulation before or during five-axis machine tool processing, provides forward-looking online compensation basis, improves processing accuracy and stability, reduces maintenance costs, and improves debugging efficiency and technology reusability through an automated closed-loop system.
Smart Images

Figure CN121578742B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of CNC machine tool precision control and digital twin technology, and in particular to a method, system and electronic equipment for predicting the contour error of a five-axis digital twin machine tool. Background Technology
[0002] As the manufacturing industry moves towards higher precision and efficiency, five-axis CNC machine tools have become core equipment for machining complex curved surface parts such as blades and molds. However, under complex working conditions involving high speed, multi-axis linkage, and rapid changes in tool posture, multiple sources of errors, such as machine tool geometric errors, servo system dynamic characteristics, interpolation algorithm errors, friction, and thermal deformation, are coupled together, ultimately manifesting as significant contour errors on the workpiece, which seriously affects the dimensional accuracy and morphological consistency of the parts.
[0003] Currently, the mainstream approach in industry to improve the accuracy of five-axis machine tools still relies on periodic geometric parameter calibration and experience-based process parameter optimization. These traditional methods have the following inherent drawbacks:
[0004] Static compensation with poor dynamic adaptability: Existing technologies mainly rely on "static" or "quasi-static" geometric error compensation, which cannot effectively predict and compensate for trajectory tracking errors caused by servo dynamics and acceleration / deceleration during the operation of specific CNC code trajectories.
[0005] Error sources are treated in isolation, and coupling effects are ignored: Most methods model and compensate for single types of error sources independently, lacking the ability to comprehensively model and couple errors of multiple physical fields such as geometry, dynamics, and thermodynamics within a unified tool center point pose framework.
[0006] The model is prone to inaccuracy and has high maintenance costs: The performance parameters of the machine tool will change with conditions such as load, temperature, and wear, which will cause the accuracy of the compensation model established based on the initial parameters to decrease after long-term operation, requiring frequent recalibration.
[0007] High-precision compensation lacks effective input: To achieve high-precision compensation integrated with machine tool dynamic constraints, the primary prerequisite is obtaining accurate, trajectory-level error predictions. Existing methods cannot provide such predictions, making the formulation of compensation strategies lack quantitative basis and difficult to implement.
[0008] The technology chain is fragmented and the results cannot be reused: The entire process from error modeling, parameter identification, prediction compensation to effect verification is usually fragmented, lacking a closed-loop, automated system, resulting in long debugging cycles and difficulty in transferring and reusing optimization results.
[0009] Therefore, there is an urgent need in this field for a high-fidelity digital twin system that can synchronize with the physical machine tool in real time and evolve dynamically. This system can accurately predict the contour error of any given NC trajectory before or during machining, thereby providing a quantitative basis for achieving forward-looking and adaptive online compensation or process optimization, and ultimately breaking the traditional precision control mode that relies on post-process inspection and repeated trial and error. Summary of the Invention
[0010] The purpose of this invention is to provide a method, system, and electronic device for predicting the contour error of a five-axis machine tool using digital twins, in order to solve the problem that existing technologies are unable to accurately and dynamically predict the contour error during the machining process of a five-axis machine tool.
[0011] To achieve the above objectives, this invention provides a method for predicting the contour error of a digital twin five-axis machine tool, comprising the following steps:
[0012] Step S1: On the CNC system of the five-axis machine tool, the position command sequence, current command sequence and actual position feedback sequence of each servo axis are collected in real time, and all collected signals are synchronized and aligned in time.
[0013] Step S2: Based on the signals collected and aligned in step S1, identify the electromechanical system dynamic parameters of each servo axis online, and reconstruct the open-loop dynamic model of each axis accordingly, while estimating the comprehensive disturbance sequence acting on the servo axis.
[0014] Step S3: Update the parameters of the autoregressive exogenous ARX model using the dynamic parameters of the electromechanical system identified in step S2 and the estimated comprehensive disturbance sequence.
[0015] Step S4: On the digital twin end of the five-axis machine tool, completely reproduce the CNC code parsing, tool path planning and interpolation calculation process of each axis of the CNC system, thereby generating the interpolation instruction sequence of each servo axis;
[0016] Step S5: Input the interpolation command sequence of each axis generated in step S4 into the autoregressive exogenous ARX model updated in step S3 and the open-loop electromechanical model reconstructed in step S2 to calculate the predicted position of each axis including the predicted position deviation.
[0017] Step S6: Perform forward kinematics calculation on the predicted positions of each axis obtained in step S5 to obtain the predicted motion trajectory of the tool center point in the workpiece coordinate system.
[0018] Step S7: Align the predicted motion trajectory obtained in step S6 with the ideal nominal trajectory in geometric space, and calculate the contour error at each point along the nominal trajectory.
[0019] Preferably, in step S2, the identification of the dynamic parameters of the electromechanical system is based on the following equations of motion:
[0020] ;
[0021] in, For the quality matrix, For the Coriolis force and centrifugal force terms, C The damping coefficient is... K This is the stiffness coefficient. For friction, For location-dependent disturbance terms, The actual position of the axis. The actual speed of the shaft. The actual acceleration of the axis. This is the command current for the motor.
[0022] Preferably, in step S3, the parameter update of the autoregressive exogenous ARX model is performed using the instrumental variable method or the subspace state space method for closed-loop identification.
[0023] Preferably, the instrumental variable method is adopted in the following manner: constructing a sequence of instrumental variables, which consists of lagged... The sequence consists of a position command sequence and a comprehensive perturbation sequence for each sampling period, wherein... It is greater than or equal to the sum of the autoregressive order and the exogenous input order of the autoregressive exogenous ARX model.
[0024] Preferably, the autoregressive exogenous ARX model includes a multi-input single-output structure or a multi-input multi-output structure.
[0025] Preferably, in step S7, calculating the contour error specifically includes:
[0026] Step S71: Project the points on the predicted motion trajectory onto the nominal trajectory to find the nearest reference point;
[0027] Step S72: Calculate the spatial deviation vector between the predicted point and the nearest reference point;
[0028] Step S73: Decompose the spatial deviation vector into tangential error along the nominal trajectory tangent direction and normal error perpendicular to the tangent direction. The normal error is the profile error.
[0029] Preferably, the method further includes outputting a distribution map of the contour error along the nominal trajectory arc length, the root mean square value of the contour error, or the maximum value of the contour error.
[0030] Preferably, when the autoregressive exogenous ARX model has a multi-input multi-output structure, an inter-axis dynamic coupling term is introduced into the model.
[0031] This invention also provides a digital twin five-axis machine tool contour error prediction system, comprising:
[0032] The data acquisition and synchronization module is used to acquire the position command sequence, current command sequence and actual position feedback sequence of each servo axis in real time at the CNC system end of the five-axis machine tool, and to synchronize and align all acquired signals in time.
[0033] The online identification and modeling module is used to identify the electromechanical system dynamic parameters of each servo axis online based on the alignment signal output by the data acquisition and synchronization module, reconstruct the open-loop dynamic model of each axis, and estimate the comprehensive disturbance sequence acting on the servo axis.
[0034] The ARX model update module is used to update the parameters of the autoregressive exogenous ARX model using the electromechanical system parameters and integrated disturbance sequence obtained from the online identification and modeling module.
[0035] The digital twin module is used to completely reproduce the CNC code parsing, tool path planning and interpolation calculation process of the CNC system on the digital twin end of the five-axis machine tool, and generate the interpolation instruction sequence of each servo axis;
[0036] The predicted position calculation module is used to input the interpolation command sequence of each axis generated by the digital twin module into the ARX model updated by the ARX model update module and the open-loop electromechanical model reconstructed by the online identification and modeling module to calculate the predicted position of each axis including the predicted position deviation.
[0037] The forward kinematics module is used to perform forward kinematics calculations on the predicted positions of each axis obtained by the predicted position calculation module for the five-axis machine tool, and to obtain the predicted motion trajectory of the tool center point in the workpiece coordinate system.
[0038] The contour error calculation module is used to geometrically align the predicted motion trajectory with the ideal nominal trajectory and calculate the contour error at each point along the nominal trajectory.
[0039] The present invention also provides an electronic device, comprising: a memory and a processor; the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described digital twin five-axis machine tool contour error prediction method.
[0040] Therefore, the present invention employs the above-mentioned digital twin five-axis machine tool contour error prediction method, system, and electronic equipment, and the beneficial technical effects are as follows:
[0041] (1) This invention constructs a digital twin that is synchronized with the physical machine tool in real time, enabling high-fidelity simulation of any given NC code before or during actual machining. This method not only considers geometric errors but also incorporates time-varying factors such as servo dynamics, friction, and disturbances through online identified ARX and electromechanical models, thereby achieving accurate and quantitative prediction of the specific machining trajectory contour error. This changes the passive mode that relies on post-processing inspection and experience-based debugging, providing a key data foundation for achieving forward-looking online compensation or process optimization, improving machining accuracy from the source and shortening the debugging cycle.
[0042] (2) Under a unified RTCP pose framework, this invention integrates the coupling effects of multiple sources of errors, such as geometric, dynamic, and thermal errors, into the prediction model. More importantly, through the real-time online identification service at the CNC end, the model parameters can be continuously updated, enabling the digital twin to track the performance drift of the machine tool caused by changes in temperature, wear, and load. This self-evolutionary capability overcomes the problem of inaccuracy after long-term operation of traditional static models, improves the stability and reliability of prediction accuracy throughout the entire life cycle and under complex working conditions, and reduces maintenance costs.
[0043] (3) This invention integrates the previously fragmented error modeling, parameter identification, trajectory prediction, and effect verification processes into an automated, closed-loop digital twin system. Once established, this system can serve the long-term precision management and process iteration of the machine tool. This methodology and system architecture are universal; by deploying corresponding twins for different machine tools, the rapid transfer and reuse of technical experience can be achieved, avoiding repetitive and inefficient debugging, and providing a reusable solution for achieving precision consistency control in intelligent manufacturing. Attached Figure Description
[0044] Figure 1 This invention relates to a dual-side system architecture and data flow.
[0045] Figure 2 The relationship between the series structure and signal of the single-axis "ARX model + open-loop electromechanical model";
[0046] Figure 3 Generate the link and output position for the overall error after the five-axis parallel deployment;
[0047] Figure 4 A comparative illustration of the nominal and predicted trajectories of a two-dimensional contour;
[0048] Figure 5 This is a schematic diagram comparing the nominal and predicted trajectories of the three-dimensional toolpath. Detailed Implementation
[0049] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0050] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.
[0051] Example 1
[0052] like Figure 1 As shown, the specific method for predicting the contour error of a digital twin five-axis machine tool is as follows:
[0053] 1. Application objects and initialization.
[0054] This embodiment uses a five-axis machining center for processing aero-engine blades as an example. First, a real-time data acquisition and modeling update module is deployed on the CNC system side of the machining center; a five-axis machine tool digital twin prediction module is deployed on a separate industrial computer. The two modules are connected via an industrial Ethernet network. During initialization, a set of default electromechanical system dynamic parameters and autoregressive exogenous ARX model parameters are assigned to the five servo axes.
[0055] 2. Execution process of the CNC end modeling and update module.
[0056] The CNC modeling update module performs the following operations:
[0057] Step S1, Signal Acquisition and Time Alignment: While the machine tool is executing a segment of excitation trajectory or running under no-load conditions, the position command sequence of each servo axis is synchronously acquired at a sampling rate of 1kHz. Current command sequence and actual position feedback sequence All signals are precisely aligned using timestamps, and the inherent pipeline delay of the system is estimated. .
[0058] Step S2, Online Identification and Modeling: Based on the aligned signal, according to the motion equation:
[0059] ;
[0060] in, For the quality matrix, For the Coriolis force and centrifugal force terms, C The damping coefficient is... K This is the stiffness coefficient. For friction, For location-dependent disturbance terms, The actual position of the axis. The actual speed of the shaft. The actual acceleration of the axis. This is the command current for the motor.
[0061] Subsequently, using the identified parameters from By stripping the nominal dynamic components, a comprehensive perturbation sequence acting on the servo axis is reconstructed. ,in The linear component is The remaining part is a disturbance, for The linear part in the equation is identified using the least squares method for linear system identification, and for disturbances... The three terms are systematically identified separately, including the Coriolis force and centrifugal force terms. Utilizing its characteristic of being "linear with respect to dynamic parameters," a corresponding regression matrix is constructed, and the least squares identification method linear with respect to parameters is used to estimate the combination of relevant inertial parameters; for the friction term... A parameterized friction model incorporating Coulomb friction, viscous friction, and the Stribeck effect is employed, and parameters are identified using a nonlinear least squares algorithm. Position-related perturbation terms are also considered. A nonlinear regression identification method based on table lookup and spline interpolation is adopted to construct a perturbation lookup table in the location domain, thereby achieving fine modeling of periodic or location-related perturbations.
[0062] Step S3, ARX model parameter update: After completing the identification of the nominal dynamic parameters of the single-axis servo axis and reconstructing the comprehensive disturbance sequence. Subsequently, a two-input two-output discrete-time linear model based on the ARX structure was constructed to describe the perturbation sequence. and the position of interpolation instructions Servo axis position tracking error and motor command current The equivalent closed-loop dynamic relationship between them. Under a fixed sampling period. The following sequence of signals is defined:
[0063] : No. Interpolation position command for each sampling time; : No. The actual position of the axis at each sampling time; Position following error; : Motor command current output by the driver; In the aforementioned steps, by The reconstructed integrated perturbation sequence includes Coriolis and centrifugal force terms, friction terms, and position-dependent perturbation terms.
[0064] Let the output vector be: Input vector: .
[0065] In this embodiment, the output order is selected. Input order Establish the following two-input two-output ARX model:
[0066] ;
[0067] in, To output the autoregressive coefficient matrix; This is the input channel coefficient matrix.
[0068] Expanding the above matrix equation by its components yields the position following error. and current command scalar form, for example:
[0069] ;
[0070] in, , The ARX coefficients to be identified.
[0071] To perform parameter identification, the above ARX structure was rewritten into a linear regression form.
[0072] For each moment , For the first moment when all lags can be gathered, the index is used to construct the regression vector. :
[0073] ;
[0074] For the error output channel, we have:
[0075] ;
[0076] in, For inclusion The parameter vector, This indicates transpose.
[0077] Similarly, for the current output channel, we have:
[0078] ;
[0079] in, This is the corresponding parameter vector.
[0080] The collection length is sample sequence Select As the first available sample index, the regression vectors at each time point are arranged row-wise to form a regression matrix. :
[0081] ;
[0082] Simultaneously construct the output vector:
[0083] ;
[0084] in, It is from arrive All error outputs during this period Arrange them vertically into a column vector. It is from arrive All current output during this period Arrange them vertically into a column vector.
[0085] Then, the parameters of the two output channels are estimated using the least squares method:
[0086] ;
[0087] in, , These are estimates of two sets of ARX parameter vectors. For error channel All coefficients, For current channel All coefficients.
[0088] This allows us to obtain all the coefficient matrices of the ARX model. The estimated value, thus establishing a basis Input and The output is a two-input two-output closed-loop equivalent linear model.
[0089] Using the above two-input two-output ARX model, a given interpolation trajectory can be interpolated. and estimated disturbance Under these conditions, quickly predict the position following error of the servo axis on the trajectory. With current command The time-domain response provides a unified linearized model basis for subsequent contour error prediction, trajectory optimization, and feedforward compensation design.
[0090] Parameter release: The latest dynamic parameters of the electromechanical system and the parameters of the autoregressive exogenous ARX model updated in steps S2 and S3 are released to the prediction module of the five-axis machine tool digital twin via the network.
[0091] 3. Execution process of the prediction module of the digital twin of a five-axis machine tool.
[0092] After receiving the updated parameters, the twin-end prediction module performs simulation prediction on a section of precision machining NC code for the target blade part.
[0093] Step S4, Digital Twin Simulation: On the digital twin end, the CNC code parsing, tool path planning and interpolation calculation process of each axis are fully reproduced, and the interpolation instruction sequence of each servo axis corresponding to the NC code segment is generated.
[0094] Step S5, Predicted position calculation: The interpolation instruction sequence generated in step S4 is fed into the autoregressive exogenous ARX model updated in step S3 and the open-loop electromechanical model reconstructed in step S2, respectively, for series calculation, and finally the predicted position of each axis including the predicted position deviation is obtained.
[0095] like Figure 2 As shown, the single-axis model realizes the conversion from interpolation command to predicted position through the cascade of the ARX model and the open-loop electromechanical model.
[0096] Step S6, Forward Kinematics Solution: Using the predicted positions of each axis obtained in Step S5, the forward kinematics model of the five-axis machine tool is called to calculate the predicted motion trajectory points of the tool center point (TCP) in the workpiece coordinate system. .
[0097] Step S7, Contour Error Calculation: Align the predicted motion trajectory obtained in Step S6 with the ideal nominal trajectory defined by the NC code in geometric space. Specifically, for each point on the predicted trajectory... The projection point is found on the nominal trajectory polyline using a nearest-point search algorithm with a window. Record the arc length parameter corresponding to that point. Calculate the error vector. This vector is then decomposed into tangential errors along the nominal trajectory tangent direction. ( The error is the unit tangent and the normal direction perpendicular to the tangent. The normal error This refers to the desired profile error and normal error. The minimum geometric distance from the predicted trajectory point to the nominal trajectory.
[0098] like Figure 3 As shown, the five-axis parallel processing outputs the contour error through forward kinematics and geometric alignment.
[0099] Example 2
[0100] The difference between this embodiment and Embodiment 1 is that the autoregressive exogenous ARX model adopts a multiple-input multiple-output (MIMO) structure and introduces inter-axis dynamic coupling terms.
[0101] In step S3, the ARX model parameter update, a MIMO-ARX model with five inputs (position commands and combined disturbances for the five axes) and five outputs (position tracking errors or current commands for the five axes) is constructed. The model regression term includes not only the historical input and output data for each axis itself but also the historical input and output data for other axes to characterize the dynamic coupling effect between axes. The model parameter update also employs the instrumental variable method, but the instrumental variable matrix... and regression matrix The dimensions are expanded accordingly to cover coupling information across all axes.
[0102] This approach is particularly suitable for five-axis machine tools where the dynamic characteristics of each axis differ significantly and coupling is strong during operation. The MIMO model in Example 2 can more accurately capture additional contour errors caused by inter-axis coupling, especially in machining areas where tool posture changes rapidly. Its prediction accuracy is further improved compared to the MISO model in Example 1, providing a more reliable decision-making basis for high-precision machining.
[0103] Example 3
[0104] In the precision machining of complex profiled parts (such as mold cavities, blade profiles, and skeleton structures), it is usually necessary to control the contour error within a few micrometers. Otherwise, it will lead to substandard surface quality, abnormal subsequent polishing allowance, or even scrapping of the part. The traditional method is to first perform actual cutting on a machine tool, and then use a coordinate measuring machine to inspect the machined surface. This method has a long inspection cycle, high cost, and once deviations are found, it is necessary to readjust the machining parameters or even rework the part.
[0105] The method proposed in this invention, based on servo axis dynamics identification and TCP contour error prediction, can perform offline simulation of the tool path under a given NC program without cutting the workpiece, and obtain the predicted TCP trajectory and its contour error distribution relative to the nominal trajectory, thereby realizing the pre-verification and optimization of the machining scheme. Figure 4 , Figure 5 Typical simulation results of the method of the present invention in a complex spatial curve processing scenario are presented.
[0106] like Figure 4 and Figure 5 As shown, this embodiment selects a spatial S-shaped test trajectory for testing the multi-axis dynamic performance of a machine tool, simulating the finishing process of a mold surface on a five-axis linkage machining center.
[0107] 1. Operating conditions settings.
[0108] The machine tool is a five-axis machining center with three linear axes and two rotary tables. The nominal trajectory of the TCP in the workpiece coordinate system is obtained by interpolation from the CNC system. The total travel of the trajectory is approximately 30mm to 40mm, and the maximum feed rate is 6000mm / min. The trajectory includes continuous acceleration, deceleration, and curvature changes. According to the product drawing requirements, the profile error of this surface needs to be controlled within 10μm.
[0109] 2. Predicting motion trajectory generation.
[0110] Following steps S1-S6 of Example 1, the nominal mass, damping, stiffness, and friction and position-related disturbance terms of each servo axis are first identified, and a digital twin model of the servo drive and machine tool geometry is constructed based on this. The NC program to be evaluated is imported into this model, and offline simulation is performed under conditions consistent with the sampling period of the actual controller to obtain the predicted TCP trajectory considering servo dynamics and comprehensive disturbances. At the same time, it preserves the ideal nominal trajectory defined by the NC code. .
[0111] 3. Contour error calculation and visualization.
[0112] For each discrete point on the predicted TCP trajectory Search for its nearest projection point on the nominal trajectory polyline. And record the corresponding arc length parameters. Calculate the error vector And decompose to obtain the tangential error With normal error Among them, the normal error This refers to the TCP profile error that is of interest in this embodiment.
[0113] Figure 4 The spatial trajectory is given in The projection results on the plane, where the solid line is the nominal TCP trajectory, the dashed line is the actual TCP trajectory predicted by the method of this invention, and the black arrow segments represent the TCP error vector at several sparse sampling points. .from Figure 4 It can be intuitively observed that in areas with large trajectory curvature and significant acceleration / deceleration, the predicted TCP trajectory deviates significantly from the nominal trajectory, and the length of the error vector is the magnitude of the local contour error.
[0114] Figure 5 This displays the geometric relationship of the same trajectory in three-dimensional space. The solid line represents the nominal three-dimensional TCP trajectory, the dotted line represents the predicted TCP trajectory, and the black arrow segments indicate the TCP error visualization results at several sampling points. The three-dimensional view allows for a more intuitive assessment of the error distribution along the entire toolpath in space, especially the spatial transition segments caused by multi-axis linkage.
[0115] 4. Error evaluation and process decision-making.
[0116] Based on the normal error calculated above The entire trajectory is statistically analyzed to obtain the distribution curve of contour error as a function of arc length, and its maximum value is extracted. In this embodiment, simulation results show that, under a given feed rate and current servo parameter configuration, the maximum contour error of the spatial trajectory is approximately 4μm to 6μm, which is less than the design-defined 10μm contour error limit. Therefore, the machining scheme can be determined to meet the accuracy requirements without cutting the workpiece. If the predicted accuracy is... If the parameters exceed the allowable range, the NC program and servo parameters can be optimized in advance by reducing the feed rate, optimizing acceleration and deceleration parameters, or adjusting the servo gain, and then the simulation verification can be performed again using the method of this invention.
[0117] As can be seen from the above embodiments, Figure 4 , Figure 5 The prediction results shown can provide the geometric deviation and contour error distribution between the nominal trajectory and the predicted TCP trajectory before actual processing, enabling offline evaluation and optimization of high-precision complex surface processing technology, reducing the number of trial cuts, lowering processing test costs, and improving the utilization rate of the whole machine and the success rate of processing on the first attempt.
[0118] Example 4
[0119] A digital twin five-axis machine tool contour error prediction system includes:
[0120] The data acquisition and synchronization module is used to acquire the position command sequence, current command sequence and actual position feedback sequence of each servo axis in real time at the CNC system end of the five-axis machine tool, and to synchronize and align all acquired signals in time.
[0121] The online identification and modeling module is used to identify the electromechanical system dynamic parameters of each servo axis online based on the alignment signal output by the data acquisition and synchronization module, reconstruct the open-loop dynamic model of each axis, and estimate the comprehensive disturbance sequence acting on the servo axis.
[0122] The ARX model update module is used to update the parameters of the autoregressive exogenous ARX model using the electromechanical system parameters and integrated disturbance sequence obtained from the online identification and modeling module.
[0123] The digital twin module is used to completely reproduce the CNC code parsing, tool path planning and interpolation calculation process of the CNC system on the digital twin end of the five-axis machine tool, and generate the interpolation instruction sequence of each servo axis;
[0124] The predicted position calculation module is used to input the interpolation command sequence of each axis generated by the digital twin module into the ARX model updated by the ARX model update module and the open-loop electromechanical model reconstructed by the online identification and modeling module to calculate the predicted position of each axis including the predicted position deviation.
[0125] The forward kinematics module is used to perform forward kinematics calculations on the predicted positions of each axis obtained by the predicted position calculation module for the five-axis machine tool, and to obtain the predicted motion trajectory of the tool center point in the workpiece coordinate system.
[0126] The contour error calculation module is used to geometrically align the predicted motion trajectory with the ideal nominal trajectory and calculate the contour error at each point along the nominal trajectory.
[0127] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0128] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0129] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0130] It is worth noting that all contents not described in detail in this invention are existing technologies and are well known to those skilled in the art.
[0131] Therefore, the present invention employs the above-mentioned digital twin five-axis machine tool contour error prediction method, system and electronic equipment, which can effectively overcome the limitations of traditional static compensation methods. Through online identification and digital twin technology, it realizes dynamic and forward-looking prediction of machining trajectory contour errors, providing quantitative basis and advanced tools for the precision control of five-axis machine tools, and improving the precision stability and process optimization efficiency of complex parts machining.
[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for predicting the contour error of a five-axis digital twin machine tool, characterized in that, Includes the following steps: Step S1: On the CNC system of the five-axis machine tool, the position command sequence, current command sequence and actual position feedback sequence of each servo axis are collected in real time, and all collected signals are synchronized and aligned in time. Step S2: Based on the signals collected and aligned in step S1, identify the electromechanical system dynamic parameters of each servo axis online, and reconstruct the open-loop dynamic model of each axis accordingly, while estimating the comprehensive disturbance sequence acting on the servo axis. The identification of dynamic parameters of the electromechanical system is based on the following equations of motion: ; in, For the quality matrix, For the Coriolis force and centrifugal force terms, C The damping coefficient is... K This is the stiffness coefficient. For friction, For location-dependent disturbance terms, The actual position of the axis. The actual speed of the shaft. The actual acceleration of the axis. This is the command current for the motor; Step S3: Update the parameters of the autoregressive exogenous ARX model using the dynamic parameters of the electromechanical system identified in step S2 and the estimated comprehensive disturbance sequence. Among them, the parameter update of the autoregressive exogenous ARX model is identified by using the instrumental variable method or the subspace state space method for closed-loop identification. The instrumental variable method employs the following approach: Constructing a sequence of instrumental variables, which consists of lagged... The sequence consists of a position command sequence and a comprehensive perturbation sequence for each sampling period, wherein... Greater than or equal to the sum of the autoregressive order and the exogenous input order of the autoregressive exogenous ARX model; Construct a two-input two-output ARX model based on the ARX architecture: ; ; ; in, for The system output vector at time t. for The system input vector at time t, This is the weighting coefficient matrix of the output vector at time k-1 with respect to the output at time k. This is the weighting coefficient matrix of the output vector at time k-2 with respect to the output at time k. This is the weighting coefficient matrix of the input vector at time k-1 with respect to the output at time k. This is the weighting coefficient matrix of the input vector at time k-2 with respect to the output at time k. This refers to the position following error; This is the motor command current output by the driver; The reconstructed composite perturbation sequence; For the first Interpolation position command for each sampling time; Step S4: On the digital twin end of the five-axis machine tool, completely reproduce the CNC code parsing, tool path planning and interpolation calculation process of each axis of the CNC system, thereby generating the interpolation instruction sequence of each servo axis; Step S5: Input the interpolation command sequence of each axis generated in step S4 into the autoregressive exogenous ARX model updated in step S3 and the open-loop electromechanical model reconstructed in step S2 to calculate the predicted position of each axis including the predicted position deviation. Step S6: Perform forward kinematics calculation on the predicted positions of each axis obtained in step S5 to obtain the predicted motion trajectory of the tool center point in the workpiece coordinate system. Step S7: Align the predicted motion trajectory obtained in step S6 with the ideal nominal trajectory in geometric space, and calculate the contour error at each point along the nominal trajectory. Specifically, calculating the contour error includes: Step S71: Project the points on the predicted motion trajectory onto the nominal trajectory to find the nearest reference point; Step S72: Calculate the spatial deviation vector between the predicted point and the nearest reference point; Step S73: Decompose the spatial deviation vector into tangential error along the nominal trajectory tangent direction and normal error perpendicular to the tangent direction. The normal error is the profile error.
2. The method for predicting the contour error of a five-axis digital twin machine tool according to claim 1, characterized in that, Autoregressive exogenous ARX models include multi-input single-output (MIMO) or multi-input multi-output (MIMO) structures.
3. The method for predicting the contour error of a five-axis digital twin machine tool according to claim 1, characterized in that, The method also includes outputting a distribution map of the contour error along the nominal trajectory arc length, the root mean square value of the contour error, or the maximum value of the contour error.
4. The method for predicting the contour error of a digital twin five-axis machine tool according to claim 1, characterized in that, When the autoregressive exogenous ARX model has a multi-input multi-output structure, an inter-axis dynamic coupling term is introduced into the model.
5. A digital twin five-axis machine tool contour error prediction system, characterized in that, The method for predicting the contour error of a digital twin five-axis machine tool according to any one of claims 1-4 includes: The data acquisition and synchronization module is used to acquire the position command sequence, current command sequence and actual position feedback sequence of each servo axis in real time at the CNC system end of the five-axis machine tool, and to synchronize and align all acquired signals in time. The online identification and modeling module is used to identify the electromechanical system dynamic parameters of each servo axis online based on the alignment signal output by the data acquisition and synchronization module, reconstruct the open-loop dynamic model of each axis, and estimate the comprehensive disturbance sequence acting on the servo axis. The ARX model update module is used to update the parameters of the autoregressive exogenous ARX model using the electromechanical system parameters and integrated disturbance sequence obtained from the online identification and modeling module. The digital twin module is used to completely reproduce the CNC code parsing, tool path planning and interpolation calculation process of the CNC system on the digital twin end of the five-axis machine tool, and generate the interpolation instruction sequence of each servo axis; The predicted position calculation module is used to input the interpolation command sequence of each axis generated by the digital twin module into the ARX model updated by the ARX model update module and the open-loop electromechanical model reconstructed by the online identification and modeling module to calculate the predicted position of each axis including the predicted position deviation. The forward kinematics module is used to perform forward kinematics calculations on the predicted positions of each axis obtained by the predicted position calculation module for the five-axis machine tool, and to obtain the predicted motion trajectory of the tool center point in the workpiece coordinate system. The contour error calculation module is used to geometrically align the predicted motion trajectory with the ideal nominal trajectory and calculate the contour error at each point along the nominal trajectory.
6. An electronic device, comprising: Memory and processor; The memory stores a computer program, characterized in that when the processor executes the computer program, it implements the steps of the digital twin five-axis machine tool contour error prediction method according to any one of claims 1-4.