Three-axis machine tool track contour error calculation method considering geometric and motion characteristics

By integrating the geometric error model of a three-axis machine tool with the single-axis servo linkage control model, and combining homogeneous coordinate transformation and transfer function derivation, the problem of difficulty in quickly calculating the machining contour error of CNC machine tools in the existing technology is solved, and efficient contour error prediction is achieved.

CN121995854APending Publication Date: 2026-05-08XI AN JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610193997.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-10
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies struggle to quickly calculate the contour errors at various points during CNC machine tool machining without relying on online measurements. In particular, when considering geometric and linkage control errors, the lack of an effective integrated model makes it difficult to accurately predict part contour errors.

Method used

By establishing an integrated method for the geometric error model of a three-axis machine tool and the linkage control model of a single-axis servo, and combining homogeneous coordinate transformation and transfer function derivation, a unified integrated modeling of geometric error and linkage control error and prediction of actual trajectory points are achieved. The contour error is calculated using the interpolation segment perpendicular foot method.

Benefits of technology

It enables the rapid and accurate calculation of the trajectory contour error of a three-axis machine tool without relying on online measurement, improving the real-time prediction capability and calculation efficiency during the machining process, and solving the problem of insufficient dynamic prediction accuracy in existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121995854A_ABST
    Figure CN121995854A_ABST
Patent Text Reader

Abstract

A three-axis machine tool track contour error calculation method considering geometric and motion characteristics comprises the following steps: firstly, establishing a geometric error equivalent mapping model of a three-axis machine tool, and uniformly describing a positioning error, a straightness error, an angle error and an inter-axis perpendicularity error of each motion axis; the geometric error is mapped to a tool nose space position error through homogeneous coordinate transformation; secondly, a three-ring servo linkage control equivalent model containing a position loop, a speed loop and a current loop is established, a dynamic response relation between interpolation instruction displacement and actual axis displacement is obtained through transfer function derivation, and a three-axis machine tool servo linkage control equivalent model is established; integrating the geometric error mapping result with the three-axis linkage control dynamic position deviation to realize the prediction of the actual track of the tool nose of the tool; and finally, based on the interpolation instruction position point and the predicted actual position point, a contour error is calculated by adopting an interpolation line segment perpendicular foot method. The method has the advantages of unified modeling, high calculation efficiency and high engineering applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC machine tool accuracy testing and simulation technology, specifically to a method for calculating the trajectory contour error of a three-axis machine tool that considers geometric and motion characteristics. Background Technology

[0002] In modern CNC machine tool machining, geometric errors and control system linkage errors are the core factors affecting machining accuracy. Geometric errors include straightness errors, angular errors, etc. The ISO 230-1 standard classifies them into position-dependent geometric errors and position-independent geometric errors, which are key to machine tool accuracy analysis and compensation.

[0003] Current geometric error modeling relies heavily on static error data and analysis using multi-rigid-body system relative motion models. However, this approach struggles to account for the dynamic behavior of actual machine tool machining and fails to accurately describe linkage errors. Machine tool servo systems often employ a three-loop control structure consisting of a position loop, a velocity loop, and a current loop. However, existing control models primarily focus on single-axis modeling, neglecting the error coupling effect in multi-axis linkage and the impact of geometric errors on the actual motion trajectory. Considering either geometric error or linkage error in isolation makes it impossible to accurately calculate the actual trajectory of the tool tip and predict part contour errors. With the development of CNC technology, error prediction has shifted from hardware compensation to numerical simulation. However, existing methods based on finite element analysis and kinematic modeling (Fan KG, Yang J G, Yang L Y. Unified Multi-Error Model for Four Types CNC Machining Center[C]. Applied Mechanics and Materials. 2013, 395: 1162-1169) are computationally complex, have poor real-time performance, and primarily model single errors, making them difficult to widely apply in actual production. Meanwhile, existing contour error prediction methods are mostly offline analyses (Sheng XJ, Wang L F. A Comparison Strategy for Improving the Precision of Contour Error Estimation[J]. International Journal of Precision Engineering and Manufacturing, 2019, 20(8): 1395-1403), lacking real-time prediction capabilities during the manufacturing process.

[0004] In summary, existing technologies lack an effective integrated model that cannot comprehensively consider geometric errors and linkage control errors, making it difficult to quickly calculate the contour errors of each point during machining based on CNC instructions without relying on online measurement. Summary of the Invention

[0005] To overcome the shortcomings of the prior art, the present invention aims to provide a method for calculating the contour error of a three-axis machine tool trajectory that considers geometric and motion characteristics. By integrating the geometric error model of the three-axis machine tool with the single-axis servo linkage control model, the contour error of the machining trajectory can be quickly predicted based on the interpolation command points of the CNC system without relying on online measurement.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for calculating the trajectory profile error of a three-axis machine tool considering geometric and kinematic characteristics includes the following steps: Step 1) Establishment of the equivalent mapping model of geometric error of three-axis machine tool: Based on the theory of multi-rigid-body systems, a geometric error model of three-axis CNC machine tool is established, and the positioning error, straightness error, angle error and inter-axis perpendicularity error of each motion axis are described by a unified matrix; through the homogeneous coordinate transformation method, the geometric error of each axis is equivalently mapped to the spatial displacement error of the tool tip in the machine tool coordinate system, and the equivalent mapping model of geometric error of three-axis machine tool is obtained, realizing the quantitative calculation of the geometric error from the interpolation command position to the tool tip. Step 2) Establishment of the equivalent model for servo linkage control of a three-axis machine tool: For a single-axis servo system of a CNC machine tool, a three-loop control equivalent model including a position loop, a speed loop, and a current loop is established. The driver, servo motor, and mechanical transmission components are modeled using transfer functions. The dynamic response relationship between the interpolation command displacement and the actual axis displacement is obtained through transfer function derivation, resulting in a single-axis dynamic response characteristic model. This single-axis dynamic response characteristic model is then extended to the other two axes, ultimately establishing the equivalent model for servo linkage control of a three-axis machine tool. Step 3) Integrated model of geometric error and linkage control error and prediction of actual trajectory point: The tool tip geometric error mapping result obtained in Step 1) and the dynamic position deviation of the three-axis linkage control obtained in Step 2) are integrated in a unified manner. Under the same interpolation time series and coordinate system, the errors of each axis are superimposed and calculated to obtain the actual spatial position prediction value of the tool tip at each interpolation command position, thereby realizing the integrated modeling of geometric error and linkage control error and prediction of actual trajectory point; Step 4) Fast calculation method for contour error based on interpolation point and predicted actual point: Finally, the expected trajectory formed by the interpolation command position point is used as the reference contour, and the actual position point of the tool tip predicted by the integrated model is used as the deviation point. The shortest distance from the actual position point to the expected trajectory is calculated by the perpendicular foot method of the interpolation line segment, and this distance is used as the contour error at the corresponding position, so as to realize the fast calculation of contour error without trajectory analysis and offline measurement.

[0007] The specific process of step 1) is as follows: 1.1) Transformation matrix from tool coordinate system to workpiece coordinate system under ideal conditions: Three-axis machine tools are classified according to the workpiece-to-tool sequence as follows: FXYZ, XFYZ, XYFZ and XYZF ,letter F The fixed part representing the machine tool is called the machine tool coordinate system; F The letters on the left represent the direction of workpiece movement relative to the bed. F The letter on the right represents the direction of movement of the cutting tool relative to the bed; use XYFZ A geometric error model of a three-axis machine tool is established. The initial coordinate system of the machine tool bed is... F ,based on F Create local coordinate systems in each direction X, Y, Z, S, T, W The principal coordinate system is S The tool coordinate system is T , W The workpiece coordinate system is represented by the workpiece coordinate system; based on the topology of CNC equipment, the tool chain is based on the bed coordinate system. F Starting from, via Z The axis coordinate system is ultimately transferred to the tool coordinate system. T The workpiece chain also uses the bed coordinate system. F Starting from, via Y axial coordinate system and X The axis coordinate system is ultimately transferred to the workpiece coordinate system. W The toolchain is: FZT The workpiece chain is as follows: FYXW ; Under ideal conditions, T This represents a coordinate transformation matrix. The subscripts and superscripts on the left side of the matrix represent the subscripts of the original coordinate system and the superscripts of the target coordinate system, respectively. The upper right subscript... i The transformation matrix represents the ideal state; assuming the worktable coordinate system... X, Y, Z They moved a distance along their respective axes in sequence. x, y, z ,for XYFZ For a type of machine tool, the motion chain from the workpiece coordinate system to the machine tool coordinate system is as follows: W- XYFZST , expressed as follows: In the formula: For the workpiece coordinate system W Compared to X Transformation matrix of coordinate system for X coordinate system relative to Y Transformation matrix of coordinate system for Y coordinate system relative to bed coordinate system F The transformation matrix, Bed coordinate system F Compared to Z Transformation matrix of coordinate system for Z Coordinate system relative to principal axis coordinate system S The transformation matrix, Main axis coordinate system S Relative to the workpiece coordinate system T The transformation matrix, ideally the principal axis S and Z Shafts and cutting tools T With spindle S Workbench W and X There is no relative motion between the axes, that is... , , It is the identity matrix. x, y, z This refers to the nominal motion of the translation axis, which is the motion amount commanded by the CNC system. 1.2) Transformation matrix from tool coordinate system to workpiece coordinate system considering geometric errors: Each axis of the machine tool has 6 geometric errors, and there is also a perpendicularity error between two axes, for a total of 21 geometric errors. Taking these geometric errors into account during inter-body motion, the transformation matrix from the tool coordinate system to the workpiece coordinate system under the action of geometric errors is as follows: In the formula: superscript r This represents the transformation matrix considering geometric errors. To consider the workpiece coordinate system under geometric error conditions W Compared to X Transformation matrix of coordinate system To account for geometric error conditions X coordinate system relative to Y Transformation matrix of coordinate system To account for geometric error conditions Y coordinate system relative to bed coordinate system F The transformation matrix, To consider the bed coordinate system under geometric error conditions F Compared to Z Transformation matrix of coordinate system To account for geometric error conditions Z Coordinate system relative to principal axis coordinate system S The transformation matrix, To consider the principal axis coordinate system under geometric error conditions S Relative to the workpiece coordinate system T The transformation matrix, ideally the principal axis S andZ Shafts and cutting tools T With spindle S Workbench W and X There is no relative motion between the axes, that is... , , It is the identity matrix; Ideal transformation matrix and the transformation matrix considering geometric errors The relationship between them is an ideal transformation matrix. Right-multiply by an error motion matrix As shown in the following formula: Based on the small error assumption, the tool coordinate system T To the workpiece coordinate system W Error motion change matrix Assume the following formula: In the formula: , , This refers to the spatial position error between the actual cutting point and the ideal cutting point of the tool. , , This refers to the rotational error of the actual cutting point of the tool relative to the ideal cutting point. The spatial location error part of the error matrix is ​​shown in the following equation: Δ x Δ y and Δ z Error motion is a quantity that is position-dependent; 1.3) Unified spatial error model for four types of three-axis milling machines: The motion chains for the four types of three-axis machine tool structures are shown below: FXYZ: W→F→X→Y→Z→S→T ; XFYZ:W→X→F→Y→Z→S→T ; XYFZ: W→X→Y→F→Z→S→T ; XYZF: W→X→Y→Z→F→S→T . The homogeneous coordinates on the right side of the machine tool coordinate system F are transformed into positive transformations, while the transformations on the left side are negative transformations. For this purpose, a singular function as shown in equation (6) is introduced. The singular function can automatically determine whether the transformation matrix is ​​a positive or negative transformation based on the corresponding machine tool type. In the formula: ,when hour ;parameter i =0,1,2,3, representing four types of machine tools: FXYZ, XFYZ, XYFZ, and XYZF, respectively; =0,1,2 correspond to the transformation matrices of the X, Y, and Z axes, respectively. corresponding =0, corresponding =1, corresponding =2; Using singular matrices, Represented as transformation matrices , and A unified expression form; a unified transformation matrix , and Substituting into equation (2), we obtain the unified spatial error model for the four types of three-axis machine tools; equation (7) represents the displacement error part of the unified kinematic model: In the formula: This refers to the X-axis positioning error. The horizontal straightness error along the X-axis. This refers to the vertical straightness error along the X-axis. This refers to the X-axis pitch angle error. This refers to the X-axis yaw angle error. This refers to the X-axis roll angle error. Y-axis positioning error The error is the horizontal straightness of the Y-axis. This refers to the vertical straightness error along the Y-axis. This represents the Y-axis pitch angle error. This refers to the Y-axis yaw angle error. This refers to the Y-axis roll angle error. Z-axis positioning error The error is the horizontal straightness of the Z-axis. The Z-axis vertical straightness error. The Z-axis pitch angle error is... This refers to the Z-axis yaw angle error. This refers to the Z-axis roll angle error. , , These represent the perpendicularity errors between the X and Y axes, the X and Z axes, and the Y and Z axes, respectively.

[0008] The specific process of step 2) is as follows: 2.1) Equivalent transfer functions of each component of the servo system: 1) Equivalent transfer function of permanent magnet synchronous motor: Select =0 control, as the core control architecture of the PMSM servo system, is known from the mathematical model of the permanent magnet synchronous motor. dq The voltage equation of the motor at coordinate 0, using a vector control strategy. In the =0 control mode, the voltage equation simplifies to: In the formula: for d shaft voltage, for q shaft voltage, for q Shaft inductor, For motor q shaft current, For the motor armature resistance; Performing a Laplace transform on equation (8) yields q Armature current and q The transfer function of the shaft voltage is: use In the =0 control strategy, the direct-axis component of the stator current is completely suppressed, which is equivalent to the direct-axis winding being in an open-circuit state. For surface-mount permanent magnet synchronous motors, the motor port characteristics in the control mode are equivalent to a separately excited DC motor. At this time, the motor output torque and quadrature-axis current are... A linear relationship exists, that is: Right now q Shaft current and electromagnetic torque The transfer function is: In the formula: For the electromagnetic torque of the motor, This represents the number of pole pairs of the motor. This refers to the flux linkage amplitude of the permanent magnet; 2) Equivalent transfer function of the servo driver: In the current loop control architecture, the PWM inverter and the PMSM armature circuit together constitute the controlled object; the PWM inverter is equivalently modeled as a first-order inertial element with pure time delay characteristics, and its dynamic characteristics are determined by the time constant. and equivalent gain coefficient The phase delay in this stage originates from three time-delay factors: the PWM carrier comparison time, the power device switching dead time, and the inverter power device switching off delay time. The cumulative limit of these time-delay components does not exceed a single PWM modulation cycle. The transfer function of the time-delay stage is expressed in the frequency domain as follows: Combined with inverter gain The transfer function of a PWM inverter is expressed as: In the formula: for q Shaft voltage command, (s) represents the PWM modulation period. This represents the operating frequency (Hz) of the inverter's switching transistors. The inverter gain is approximately 1. right Perform a first-order Taylor expansion approximation, in =0 at point Taylor expansion, due to The value is very small, so we ignore the higher-order terms and retain the first-order terms, ultimately approximating the transfer function of the PWM inverter as a first-order inertial element: 3) Transfer function of mechanical transmission system: Based on the equivalent dynamic model of a two-inertia, two-degree-of-freedom ball screw mechanical system, the dynamic equation is: make , Then, equation 14) is transformed into: Taking the Laplace transform of the above equation, we get: The angular velocity of the two-inertia, two-degree-of-freedom motor is derived from the above derivation. Regarding the electromagnetic torque of the motor The transfer function is: Similarly, the angular velocity of the lead screw is obtained. Regarding the electromagnetic torque of the motor The transfer function is: In the formula: The moment of inertia of the motor rotor. The equivalent rotational inertia of the lead screw. For the torque acting on the motor rotor, For the torque acting on the leadscrew, This refers to the rotational displacement of the motor rotor. For the torsional displacement of the leadscrew, For the angular velocity of the leadscrew, The angular velocity of the motor. For the torsional stiffness of the coupling, For the torsional damping of the motor rotor, For the torsional damping of the coupling, For bearing torsional damping, , , , ; 2.2) Establishment of a single-axis three-loop control model: The servo system employs a three-loop control system: current loop, speed loop, and position loop. The current and speed loops use PI controllers, while the position loop uses a P controller. Based on the equivalent transfer functions of each loop, a closed-loop control structure for the single-axis servo system is established. The open / closed-loop transfer functions of the three control loops are expressed as follows: 1) Current loop transfer function: Based on the control structure described above, the open-loop transfer function of the current loop is obtained as follows: The current closed-loop transfer function is: In the formula: , , , , , , This is the proportional gain (V / A) of the current loop controller. The integral time constant of the current loop controller; 2) Velocity loop transfer function: From the current closed-loop transfer function (20) and the transfer function of motor angular velocity and motor electromagnetic torque (17), the speed open-loop transfer function is derived as follows: Furthermore, the velocity closed-loop transfer function is derived as follows: In the formula: For speed commands, The torque constant of the motor is... The proportional gain of the speed loop controller is (A / (rad / s)). The integral time constant of the speed loop controller. , , , , , , , , , , , ; 3) Position loop transfer function: From the closed-loop transfer function of the velocity loop (22) and the transfer function of the position controller, the open-loop transfer function of the position loop is obtained as follows: Then, the closed-loop transfer function of the position loop is obtained: In the formula: For actual location, For instruction location, For the position loop controller, the proportional gain (Hz) , , , , , , , , ; 4) Transfer function of the perturbation input: For a single-axis servo system, assume the input is a disturbance. , According to the current closed-loop transfer function The transfer function of motor angular velocity and motor electromagnetic torque Seeking the perturbation Input and motor speed output Transfer function: In the formula: , , , , , , , , , , , , , , , , , , , ; Disturbance and worktable displacement output Transfer function: In the formula: , , , , , , , , , , , .

[0009] The specific process of step 3) is as follows: 3.1) Analysis of Multi-Axis Linkage Feed Motion Error: This paper analyzes the physical mechanism of the servo drive in a single-axis feed system, and then constructs an electromechanical integrated model of the feed system, which integrates a motion control system, servo amplifier, PWM rectifier inverter, three-phase permanent magnet synchronous motor, and mechanical transmission links. Using a typical ball screw mechanical transmission system on the X-axis, and focusing on the three-phase permanent magnet synchronous motor, the paper establishes the voltage and current equations of the stator and rotor, the magnetomotive force of each phase winding, and the combined magnetomotive force of the stator and rotor. Finally, the electromagnetic torque output by the motor is derived, as shown in the following equation: In the formula: The nominal torque is generated after inputting the CNC interpolation command. Harmonic torques are generated by the non-ideal mechanical structure and electrical nonlinearity of the motor. air permeability, Indicates the rotor diameter. , is the axial length of the rotor core. This represents the number of rotor pole pairs of the motor. The length of the air gap. For the stator's synthesized magnetomotive force. To generate the magnetomotive force of the rotor. The angle between the stator and rotor magnetomotive force axes; Furthermore, position loop feedback and velocity loop feedback disturbances will re-enter the closed-loop control loop, ultimately generating unnecessary displacement responses at the end-effector and the worktable. Furthermore, under the combined effects of excitation sources such as CNC commands, position loop and speed loop feedback interference, and motor torque harmonics, the final displacement output of the worktable is expressed as: In the formula: This represents the displacement of the worktable under no-load interference. Workbench command position, For the position closed-loop transfer function, The harmonic torque disturbance-position output transfer function is... This represents the displacement of the worktable under no-load interference. The table displacement fluctuation is caused by the harmonic torque of the motor. The displacement response generated at the mechanical end of the closed-loop control loop by feedback disturbance excitation of the position loop and velocity loop; For other linear feed axes of a three-axis machine tool, the above method is used to obtain the motion displacement response of the mechanical actuator along the feed direction of each axis; subtracting the actual displacement output from the ideal displacement yields the transient and steady-state following errors during each axis feed, as shown in the following formula: In the formula: The following errors are for transient and steady-state conditions. This is the actual displacement output. Output the command displacement; 3.2) Holographic state solution for the geometric-linkage process: An integrated model of geometric error and linkage control error of CNC machine tool is established to solve the dynamic displacement response of the tool tip under the influence of multi-stage interactive coupling, as shown in the following formula; In the formula: To account for the tool tip displacement deviation due to geometric and linkage errors, The deviation of the tool tip is caused by geometric error. The deviation of the tool tip is caused by the linkage error. This represents the following error along the X-axis. This represents the Y-axis following error. This represents the following error along the Z-axis. This is the transformation matrix for geometric errors between the global coordinate system and the workpiece dynamic coordinate system. This is the transformation matrix of multi-axis linkage error between the global coordinate system and the workpiece dynamic coordinate system; The integrated model is solved by an offline time-domain discrete numerical calculation method. The interpolation command points of the machining trajectory are input, and the predicted tool tip point considering geometric error and linkage error is output.

[0010] The specific process of step 4) is as follows: Interpolation segment perpendicular foot method to solve trajectory contour error: Given the current actual position point The corresponding instruction location is First, find the current interpolation position. The previous n interpolation points are stored to obtain n-1 interpolation line segments, and then the actual position points are... Draw perpendicular lines to these n-1 interpolation segments and find the feet of the perpendiculars. ( i=1,2,3,…,n-1), if the foot of the perpendicular is inside the interpolation segment, then store the distance from the actual point to the foot of the perpendicular; if the foot of the perpendicular is outside the interpolation segment, then take the distance from the actual point to the starting point of the interpolation segment vector corresponding to the foot of the perpendicular as the distance from the interpolation segment to the actual position point. The foot of the perpendicular is calculated using vector projection. (1) For n interpolation points, n-1 interpolation vectors are obtained. , , , … , Additionally, we obtain the vectors from n-1 instruction points to the actual points. , , , … , ; (2) Find the projection coefficients t That is, the projection ratio of the vector from the command point to the actual point onto each interpolation vector: Limiting projection coefficients t Scope: When the foot of the perpendicular is not within the interpolation line segment, the starting point of the interpolation vector is taken as the nearest point. (3) Obtaining the projection coefficients yields the interpolation line segment. Corresponding foot : In the formula: The current command position point The instruction location points of the first n interpolation cycles, interpolation line segment The corresponding foot of the perpendicular; Ultimately, we obtained Distance to these n-1 interpolation segments ( i =1,2,3,…,n-1), where the minimum distance That is, the actual point The contour error value, i.e.: In the formula: Current actual location point The corresponding contour error value, This is the current actual location point. Let the foot of the perpendicular from the current actual position point to the n interpolation line segments be denoted as . Let n be the magnitude of the vector from the current actual position point to the foot of the perpendicular of the n interpolation line segments.

[0011] Compared with the prior art, the present invention has the following advantages: (1) This invention proposes a unified modeling method for geometric errors of three-axis machine tools based on homogeneous transformation matrices. By establishing an error transmission chain from the workpiece coordinate system to the tool coordinate system, the spatial parameterization of 21 geometric errors of the machine tool is realized, providing reliable static error field basic data for the accurate prediction of subsequent part contour errors.

[0012] (2) This invention establishes a single-axis “position-velocity-current” three-loop motion control integrated model that considers the dynamic characteristics of servo control. By deriving the equivalent transfer function of the three-loop control structure, it can accurately simulate the following error and linkage error of each axis in the linkage interpolation process, thus solving the problem of insufficient dynamic prediction accuracy caused by ignoring servo lag in traditional methods.

[0013] (3) This invention realizes the calculation of three-axis machine tool trajectory contour error considering geometric and linkage errors. The dynamic response error of each axis and the tool tip spatial displacement error caused by machine tool geometric errors are jointly mapped to the workpiece coordinate system to obtain the actual tool tip position. Combined with the commanded tool tip position information, a fast algorithm based on vector projection is used to replace the traditional complex iterative optimization process, which improves the calculation efficiency of trajectory contour error. The verification results show that this method significantly improves the prediction efficiency of complex trajectory contour error while ensuring calculation accuracy. Attached Figure Description

[0014] Figure 1 The above are schematic diagrams of the topologies of four types of three-axis machine tools in the embodiments.

[0015] Figure 2 This is a schematic diagram of the topology and transmission chain of the XYFZ type machine tool in the embodiment.

[0016] Figure 3 This is a schematic diagram of a single-axis three-loop servo control model for an example.

[0017] Figure 4 This is a schematic diagram of a three-axis linkage motion control model for an example.

[0018] Figure 5 This is a schematic diagram illustrating the solution of the trajectory contour error of a three-axis machine tool using an integrated model of geometric error and linkage control error as an example.

[0019] Figure 6 This is a schematic diagram illustrating the principle of trajectory contour error solving in an example.

[0020] Figure 7 This is a comparison chart of the ballbar measurement results and the model simulation results for an example.

[0021] Figure 8This is a comparison chart of the contour error predicted by the geometry-linkage model and the contour error predicted by the linkage model alone at different feed rates in the example. Detailed Implementation

[0022] The present invention will now be described in detail with reference to the embodiments and accompanying drawings.

[0023] A method for calculating the trajectory profile error of a three-axis machine tool considering geometric and kinematic characteristics includes the following steps: Step 1) Establishment of the equivalent mapping model of geometric error for a three-axis machine tool: Based on the theory of multi-rigid-body systems, a geometric error model of a three-axis CNC machine tool is established, and the positioning error, straightness error, angular error, and inter-axis perpendicularity error of each motion axis are described by a unified matrix. Through the homogeneous coordinate transformation method, the geometric error of each axis is equivalently mapped to the spatial displacement error of the tool tip in the machine tool coordinate system, thus obtaining the equivalent mapping model of geometric error for the three-axis machine tool. This enables the quantitative calculation of the geometric error from the interpolation command position to the tool tip, providing geometric error input for subsequent linkage error integration. The specific process is as follows: 1.1) Transformation matrix from tool coordinate system to workpiece coordinate system under ideal conditions: Three-axis machine tools can be classified according to the order in which the workpiece is moved to the cutting tool. FXYZ, XFYZ, XYFZ and XYZF ,like Figure 1 As shown, the letters F The fixed part representing the machine tool is called the machine tool coordinate system; F The letters on the left represent the direction of workpiece movement relative to the bed. F The letter on the right represents the direction of movement of the cutting tool relative to the bed; by XYFZ Taking a model as an example, a geometric error model of a three-axis machine tool is established. The initial coordinate system of the machine tool bed is assumed to be... F ,based on F Create local coordinate systems in each direction X, Y, Z, S, T, W The principal coordinate system is S The tool coordinate system is T , W This represents the workpiece coordinate system; as can be seen from the CNC equipment topology, the tool chain is based on the bed coordinate system. F Starting from, via Z The axis coordinate system is ultimately transferred to the tool coordinate system. T The workpiece chain also uses the bed coordinate system. F Starting from, via Y axial coordinate system and X The axis coordinate system is ultimately transferred to the workpiece coordinate system. W The toolchain is as follows: FZT The workpiece chain is as follows: FYXW ; Under ideal conditions,T This represents a coordinate transformation matrix. The subscripts and superscripts on the left side of the matrix indicate the original coordinate system (subscript) and the target coordinate system (superscript), respectively. The upper right subscript... i The transformation matrix representing the ideal state; for example, This indicates that, under ideal conditions, from the coordinate system Y Transform to coordinate system X The homogeneous transformation matrix; now assume the worktable coordinate system X, Y, Z They moved a distance along their respective axes in sequence. x, y, z ,for XYFZ For a type of machine tool, the motion chain from the workpiece coordinate system to the machine tool coordinate system is as follows: WXYFZ- ST ,like Figure 2 As shown, the transformation matrix between the workpiece coordinate system and the tool coordinate system is... It can be represented as: In the formula: For the workpiece coordinate system W Relative to coordinate system X The transformation matrix, for X coordinate system relative to Y Transformation matrix of coordinate system for Y coordinate system relative to bed coordinate system F The transformation matrix, Bed coordinate system F Compared to Z Transformation matrix of coordinate system for Z Coordinate system relative to principal axis coordinate system S The transformation matrix, Main axis coordinate system S Relative to the workpiece coordinate system T The transformation matrix, ideally the principal axis S and Z Shafts and cutting tools T With spindle S Workbench W and X There is no relative motion between the axes, that is... , , It is the identity matrix. x, y, z This refers to the nominal motion of the translation axis, which is the motion amount commanded by the CNC system. 1.2) Transformation matrix from tool coordinate system to workpiece coordinate system considering geometric errors: In practice, each axis of a machine tool has 6 geometric errors, and there is also a perpendicularity error between two axes, for a total of 21 geometric errors. Taking these geometric errors into account in the inter-body motion, the transformation matrix from the tool coordinate system to the workpiece coordinate system under the action of geometric errors can be established as follows: In the formula: superscript r This represents the transformation matrix considering geometric errors. To consider the workpiece coordinate system under geometric error conditions W Relative to coordinate system X The transformation matrix, To account for geometric error conditions X coordinate system relative to Y Transformation matrix of coordinate system To account for geometric error conditions Y coordinate system relative to bed coordinate system F The transformation matrix, To consider the bed coordinate system under geometric error conditions F Compared to Z Transformation matrix of coordinate system To account for geometric error conditions Z Coordinate system relative to principal axis coordinate system S The transformation matrix, To consider the principal axis coordinate system under geometric error conditions S Relative to the workpiece coordinate system T The transformation matrix, ideally the principal axis S and Z Shafts and cutting tools T With spindle S Workbench W and X There is no relative motion between the axes, that is... , , It is the identity matrix; Ideal transformation matrix and the transformation matrix considering geometric errors The relationship between them can be considered as an ideal transformation matrix. Right-multiply by an error motion matrix As shown in the following formula: Based on the small error assumption, the tool coordinate system T To the workpiece coordinate system W Error motion change matrix We can assume the following formula: In the formula: , , This refers to the spatial position error between the actual cutting point and the ideal cutting point of the tool. , , This refers to the rotational error of the actual cutting point of the tool relative to the ideal cutting point. The spatial location error portion of the error matrix is ​​shown in the following equation: Δ x Δ y and Δ z Error motion is a position-dependent quantity; therefore, in order to determine the error motion Δ of the machine tool at any point in the workspace... x Δ y and Δ z First, it is necessary to measure the error elements and model them. Common modeling methods include polynomial fitting. Then, the actual position of each motion axis is recorded in real time, so that the magnitude of the spatial position error can be predicted based on the current position. 1.3) Unified spatial error model for four types of three-axis milling machines: The motion chains of the four three-axis machine tool structures are shown below: FXYZ: W→F→X→Y→Z→S→T ; XFYZ:W→X→F→Y→Z→S→T ; XYFZ: W→X→Y→F→Z→S→T ; XYZF: W→X→Y→Z→F→S→T . The homogeneous coordinates on the right side of the machine tool coordinate system F are transformed into a positive transformation, while the transformation on the left side is a negative transformation; therefore, a singular function as shown in equation (6) is introduced. This singular function can automatically determine whether the transformation matrix is ​​a positive or negative transformation based on the corresponding machine tool type; In the formula: In particular, when hour ;parameter i =0,1,2,3, representing four types of machine tools: FXYZ, XFYZ, XYFZ, and XYZF, respectively; =0,1,2 correspond to the transformation matrices of the X, Y, and Z axes, respectively. corresponding =0, corresponding =1, corresponding =2; Using singular matrices, They can be restated as transformation matrices. , and A unified representation. The unified transformation matrix. , and Substituting into equation (2), we can obtain the unified spatial error model for four types of three-axis machine tools. For three-axis machine tools, the rotational error part has no effect, so it is not listed here. Equation (7) is the displacement error part of the unified kinematic model: In the formula: This refers to the X-axis positioning error. The horizontal straightness error along the X-axis. This refers to the vertical straightness error along the X-axis. This refers to the X-axis pitch angle error. This refers to the X-axis yaw angle error. This refers to the X-axis roll angle error. Y-axis positioning error The error is the horizontal straightness of the Y-axis. This refers to the vertical straightness error along the Y-axis. This represents the Y-axis pitch angle error. This refers to the Y-axis yaw angle error. This refers to the Y-axis roll angle error. Z-axis positioning error The error is the horizontal straightness of the Z-axis. The Z-axis vertical straightness error. The Z-axis pitch angle error is... This refers to the Z-axis yaw angle error. This refers to the Z-axis roll angle error. , , These represent the perpendicularity errors between the X and Y axes, the X and Z axes, and the Y and Z axes, respectively. Step 2) Establishment of the equivalent model for servo linkage control of a three-axis machine tool: For a single-axis servo system of a CNC machine tool, a three-loop control equivalent model including a position loop, a speed loop, and a current loop is established. The driver, servo motor, and mechanical transmission components are modeled using transfer functions. The dynamic response relationship between the interpolation command displacement and the actual axis displacement is obtained through transfer function derivation, resulting in a single-axis dynamic response characteristic model. This single-axis dynamic response characteristic model is then extended to the other two axes, ultimately establishing the equivalent model for servo linkage control of a three-axis machine tool. The specific process is as follows: 2.1) Equivalent transfer functions of each component of the servo system: 1) Equivalent transfer function of permanent magnet synchronous motor: Select =0 control, as the core control architecture of the PMSM servo system, can be seen from the mathematical model of the permanent magnet synchronous motor. dq The voltage equation of the motor at coordinate 0, using a vector control strategy. In the =0 control mode, the voltage equation can be simplified to: In the formula: for d shaft voltage, for q shaft voltage, for q Shaft inductor, For motor q shaft current, For the motor armature resistance; Taking the Laplace transform of equation (8) yields q Armature current and q The transfer function of the shaft voltage is: use When the =0 control strategy is applied, the direct-axis component of the stator current is completely suppressed, equivalent to the direct-axis winding being in an open-circuit state, thus completely eliminating the potential demagnetizing effect of the direct-axis armature reaction on the permanent magnet. For surface-mount permanent magnet synchronous motors, the motor port characteristics in this control mode are equivalent to a separately excited DC motor, at which point the motor output torque and quadrature-axis current are... A linear relationship exists, that is: Right now q Shaft current and electromagnetic torque The transfer function is: In the formula: For the electromagnetic torque of the motor, This represents the number of pole pairs of the motor. This refers to the flux linkage amplitude of the permanent magnet; 2) Equivalent transfer function of the servo driver: In the current-loop control architecture, the PWM inverter and the PMSM armature circuit together constitute the controlled object. The PWM inverter can be equivalently modeled as a first-order inertial element with pure time delay characteristics, whose dynamic characteristics are determined by the time constant. and equivalent gain coefficient Description. The phase delay in this stage mainly originates from three key delay factors: PWM carrier comparison time, power device switching dead time, and inverter power device switching off delay time. The cumulative limit of these delay components does not exceed a single PWM modulation cycle. The transfer function of the delay stage is expressed in the frequency domain as follows: Combined with inverter gain The transfer function of a PWM inverter can be expressed as: In the formula: for q Shaft voltage command, (s) represents the PWM modulation period. This represents the operating frequency (Hz) of the inverter's switching transistors. The inverter gain can be approximated as 1. Under normal circumstances The value is very small, but it can be used for Perform a first-order Taylor expansion approximation, in =0 at point Taylor expansion, due to The value of is very small, so higher-order terms can be ignored, and only first-order terms are retained. Ultimately, the transfer function of the PWM inverter can be approximated as a first-order inertial element: 3) Transfer function of mechanical transmission system Based on the equivalent dynamic model of a two-inertia, two-degree-of-freedom ball screw mechanical system, the dynamic equation of the model can be obtained as follows: make , Then the expression can be transformed into: Taking the Laplace transform of the above equation, we get: The angular velocity of a two-inertia, two-degree-of-freedom motor can be obtained from the above derivation. Regarding the electromagnetic torque of the motor The transfer function is: Similarly, the angular velocity of the lead screw can also be obtained. Regarding the electromagnetic torque of the motor The transfer function is: In the formula: The moment of inertia of the motor rotor. The equivalent rotational inertia of the lead screw. For the torque acting on the motor rotor, For the torque acting on the leadscrew, This refers to the rotational displacement of the motor rotor. For the torsional displacement of the leadscrew, For the angular velocity of the leadscrew, The angular velocity of the motor. For the torsional stiffness of the coupling, For the torsional damping of the motor rotor, For the torsional damping of the coupling, For bearing torsional damping, , , , ; 2.2) Establishment of a single-axis three-loop control model: Servo systems typically employ a three-loop control system: a current loop, a speed loop, and a position loop. The current and speed loops use PI controllers, while the position loop uses a P controller. Based on the equivalent transfer functions of each loop obtained earlier, the closed-loop control structure of a single-axis servo system can be established as follows: Figure 3 As shown, the open / closed-loop transfer functions of the three control loops can be expressed as: 1) Current loop transfer function: Based on the control structure described above, the open-loop transfer function of the current loop can be obtained as follows: The transfer function of the current closed loop is: In the formula: , , , , , , This is the proportional gain (V / A) of the current loop controller. The integral time constant of the current loop controller; 2) Velocity loop transfer function: From the above derivation, the closed-loop transfer function of the current is given by equation (20). In section 2.1), the transfer functions of the motor angular velocity and the motor electromagnetic torque have been obtained as equation (17). Therefore, the open-loop transfer function of the speed loop can be derived as follows: Therefore, the velocity closed-loop transfer function can be derived as follows: In the formula: For speed commands, The torque constant of the motor is... The proportional gain of the speed loop controller is (A / (rad / s)). The integral time constant of the speed loop controller. , , , , , , , , , , , ; 3) Position loop transfer function: The closed-loop transfer function of the velocity loop is obtained as equation (22), and the transfer function of the position controller is known. Therefore, the open-loop transfer function of the position loop can be obtained as follows: The closed-loop transfer function of the position loop can then be obtained: In the formula: For actual location, For instruction location, For the position loop controller, the proportional gain (Hz) , , , , , , , , ; 4) Transfer function of the perturbation input For the single-axis servo system described above, in order to investigate the dynamic characteristics of the disturbance input, we now assume that the input is a disturbance. , Based on the current closed-loop transfer function obtained above... The transfer function of motor angular velocity and motor electromagnetic torque The perturbation can be obtained. Input and motor speed output Transfer function: In the formula: For the disturbance torque, For frictional torque, For other disturbance moments, , , , , , , , , , , , , , , , , , , , ; Disturbance and worktable displacement output Transfer function: In the formula: , , , , , , , , , , , ; After modeling the X-axis single-axis control model using the above method, the Y-axis and Z-axis single-axis control models are then established. The influence of gravity must be considered when modeling the Z-axis. The final three-axis machine tool motion control model is as follows: Figure 4 As shown; Step 3) Integrated Model of Geometric Error and Linkage Control Error and Prediction of Actual Trajectory Points: Based on Step 2), the tool tip geometric error mapping result obtained in Step 1) and the three-axis linkage control dynamic position deviation obtained in Step 2) are integrated. Under the same interpolation time series and coordinate system, the errors of each axis are superimposed and calculated to obtain the predicted value of the actual spatial position of the tool tip at each interpolation command position, thus realizing the integrated modeling of geometric error and linkage control error and prediction of actual trajectory points; the specific process is as follows: 3.1) Analysis of Multi-Axis Linkage Feed Motion Error: Single-axis feed motion is the foundation of multi-axis linkage. Therefore, we first analyze the physical mechanism of the servo drive in a single-axis feed system, and then construct an electromechanical integrated model of the feed system, comprising a motion control system, servo amplifier, PWM rectifier-inverter, three-phase permanent magnet synchronous motor, and mechanical transmission components. Taking a typical ball screw mechanical transmission system on the X-axis as an example, for a three-phase permanent magnet synchronous motor, by establishing the voltage and current equations of the stator and rotor, the magnetomotive force of each phase winding, and the combined magnetomotive force of the three phases of the stator and rotor, we finally derive the electromagnetic torque output by the motor, as shown in the following equation: In the formula: The nominal torque is generated after inputting the CNC interpolation command. Harmonic torques are generated by the non-ideal mechanical structure and electrical nonlinearity of the motor. air permeability, Indicates the rotor diameter. , is the axial length of the rotor core. This represents the number of rotor pole pairs of the motor. The length of the air gap. For the stator's synthesized magnetomotive force. To generate the magnetomotive force of the rotor. The angle between the stator and rotor magnetomotive force axes; Furthermore, position loop feedback and velocity loop feedback disturbances will re-enter the closed-loop control loop, ultimately generating unnecessary displacement responses at the end-effector and the worktable. Furthermore, under the combined effects of excitation sources such as CNC commands, position loop and speed loop feedback interference, and motor torque harmonics, the final displacement output of the worktable can be expressed as: In the formula: This represents the displacement of the worktable under no-load interference. Workbench command position, For the position closed-loop transfer function, The harmonic torque disturbance-position output transfer function is... This represents the displacement of the worktable under no-load interference. The table displacement fluctuation is caused by the harmonic torque of the motor. The displacement response generated at the mechanical end of the closed-loop control loop by feedback disturbance excitation of the position loop and velocity loop; For other linear feed axes of a three-axis machine tool, the above method can be used to obtain the motion displacement response of the mechanical actuator along the feed direction of each axis. Subtracting the actual displacement output from the ideal displacement yields the transient and steady-state following errors during each axis feed, as shown in the following formula: In the formula: The following errors are for transient and steady-state conditions. This is the actual displacement output. This is the output of the instruction displacement.

[0024] 3.2) Holographic state solution for the geometric-linkage process: Based on the above geometric motion error and multi-axis linkage error models, an integrated model of CNC machine tool geometric error and linkage control error is established, such as... Figure 5 As shown in the figure, this figure summarizes the main idea and principle of the present invention. The integrated model mainly considers the influence of geometric motion guidance error of the machine tool mechanical parts, the influence of non-ideal displacement output of linkage, and the friction interference of the dynamic joint, etc., to realize the dynamic displacement response solution of the tool tip under the influence of multi-link interactive coupling, as shown in the following formula; In the formula: To account for the tool tip displacement deviation due to geometric and linkage errors, The deviation of the tool tip is caused by geometric error. The deviation of the tool tip is caused by the linkage error. This represents the following error along the X-axis. This represents the Y-axis following error. This represents the following error along the Z-axis. This is the transformation matrix for geometric errors between the global coordinate system and the workpiece dynamic coordinate system. This is the transformation matrix of multi-axis linkage error between the global coordinate system and the workpiece dynamic coordinate system; In order to deeply analyze the essential mechanism of the machine tool linkage process, an offline time-domain discrete numerical calculation method is used to solve the integrated model. The interpolation command points of the machining trajectory are input, and the predicted tool tip point considering geometric error and linkage error is output, which prepares for further calculation of trajectory contour error. Step 4) A fast method for calculating contour error based on interpolation points and predicted actual points: Finally, using the desired trajectory formed by the interpolation command position points as the reference contour, and the actual position point of the tool tip predicted by the integrated model as the deviation point, the shortest distance from the actual position point to the desired trajectory is calculated using the perpendicular foot method of the interpolation line segment, and this distance is used as the contour error at the corresponding position, thus achieving fast calculation of contour error without trajectory analysis and offline measurement; the specific process is as follows: Interpolation Segment Perpendicular Foot Method for Solving Trajectory Contour Error: In CNC systems, the desired trajectory is composed of several interpolation segments. Therefore, the shortest distance from the actual position point to the interpolation segment is the trajectory contour error. Based on this principle, this paper presents a scheme for solving the contour error: Assuming there is a current actual position point... The corresponding instruction location is First, find the current interpolation position. The previous n interpolation points are stored to obtain n-1 interpolation line segments, and then the actual position points are... Draw perpendicular lines to these n-1 interpolation segments and find the feet of the perpendiculars. ( i =1,2,3,…,n-1), if the foot of the perpendicular is inside the interpolation segment, then the distance from the actual point to the foot of the perpendicular is stored; if the foot of the perpendicular is outside the interpolation segment, then the distance from the actual point to the starting point of the interpolation segment vector corresponding to the foot of the perpendicular is taken as the distance from the interpolation segment to the actual position point. A schematic diagram of this method is shown below. Figure 6 As shown; To improve computational speed, the calculation of the perpendicular point uses vector projection: (1) For n interpolation points, n-1 interpolation vectors can be obtained. , , , … , Alternatively, the vectors from n-1 instruction points to actual points can also be obtained. , , , … , ; (2) Find the projection coefficients t That is, the projection ratio of the vector from the command point to the actual point onto each interpolation vector: To handle cases where the foot of the perpendicular is outside the interpolation segment, the projection coefficient is limited. t Scope: This method limits t When the foot of the perpendicular is not within the interpolation line segment, the starting point of the interpolation vector can be taken as the nearest point.

[0025] (3) The interpolation line segment can be obtained by obtaining the projection coefficients. Corresponding foot : In the formula: The current command position point The instruction location points of the first n interpolation cycles, interpolation line segment The corresponding foot of the perpendicular; Ultimately, we obtained Distance to these n-1 interpolation segments ( i =1,2,3,…,n-1), where the minimum distance That is, the actual point The contour error value, i.e.: In the formula: Current actual location point The corresponding contour error value, This is the current actual location point. Let the foot of the perpendicular from the current actual position point to the n interpolation line segments be denoted as . The magnitude of the vector from the current actual position point to the foot of the perpendiculars of the n interpolated line segments; Step 5) Verify the method of this embodiment through a three-axis machine tool ballbar plane linkage and geometric error identification experiment; 5.1) Planar linkage experimental parameters of the ballbar apparatus: In the embodiment, two radii, R100mm and R150mm, were used to perform planar circular trajectory linkage, with feed speeds of 100:100:3000mm / min. The feed speed ranged from 100mm / min to 3000mm / min, with each group consisting of 100mm / min intervals. Finally, the radial errors of the linkage circular trajectories with different feed speeds and radii on the XY, XZ, and YZ planes were converted to polar coordinates using a MATLAB program. 5.2) Geometric Error Identification Experiment Parameters: Eighteen geometric errors of the three-axis machine tool were identified using an XM-60 laser interferometer. The X-axis measurement range was 900mm, feed rate 1000mm / min, measuring point interval 15mm, and 5 reciprocating cycles; the Y-axis measurement range was 600mm, feed rate 1000mm / min, measuring point interval 15mm, and 5 reciprocating cycles; the Z-axis measurement range was 400mm, feed rate 1000mm / min, measuring point interval 10mm, and 5 reciprocating cycles. Identification of perpendicularity errors between the three axes: Using the X-axis as the reference axis, a 500mm×500mm×50mm high-precision square ruler and dial indicator were used to take points and fit the perpendicularity data of the three axes. 5.3) Comparison Results: A three-axis linkage control model was established based on the actual control parameters and mechanical parameters of the machine tool. Then, the 21 identified geometric errors were incorporated into the geometric error model. Finally, the geometric error model and the three-axis linkage control model were integrated. Simulation results show that during single-axis uniform linear motion, at different feed rates of 500:500:3000 mm / min, the maximum difference between the simulated following error and the actual following error of the machine tool was 1.5 mm / min. When a single-axis sinusoidal position command is input, the maximum difference between the simulation error and the actual machine tool tracking error is 2.3 mm at different feed rates. The maximum difference between the radial error model prediction results and the ballbar measurement results for the linked circular trajectory under different radii and feed rates is 5. The comparison results are as follows Figure 7 As shown in the figure. Furthermore, the contour error calculation method used in this embodiment has similar accuracy to the Newton iteration method, but its calculation speed is three times faster. A comparison of the contour errors obtained by considering both geometric and linkage errors versus considering only linkage errors is shown in the figure. Figure 8 As shown, the present invention has high prediction accuracy and calculation speed, and can better integrate the tool tip offset caused by geometric error and linkage error.

Claims

1. A method for calculating the trajectory profile error of a three-axis machine tool considering geometric and kinematic characteristics, characterized in that, Includes the following steps: Step 1) Establishment of the equivalent mapping model of geometric error of three-axis machine tool: Based on the theory of multi-rigid-body systems, a geometric error model of three-axis CNC machine tool is established, and the positioning error, straightness error, angle error and inter-axis perpendicularity error of each motion axis are described by a unified matrix; through the homogeneous coordinate transformation method, the geometric error of each axis is equivalently mapped to the spatial displacement error of the tool tip in the machine tool coordinate system, and the equivalent mapping model of geometric error of three-axis machine tool is obtained, realizing the quantitative calculation of the geometric error from the interpolation command position to the tool tip. Step 2) Establishment of the equivalent model for servo linkage control of a three-axis machine tool: For a single-axis servo system of a CNC machine tool, a three-loop control equivalent model including a position loop, a speed loop, and a current loop is established. The driver, servo motor, and mechanical transmission components are modeled using transfer functions. The dynamic response relationship between the interpolation command displacement and the actual axis displacement is obtained through transfer function derivation, resulting in a single-axis dynamic response characteristic model. This single-axis dynamic response characteristic model is then extended to the other two axes, ultimately establishing the equivalent model for servo linkage control of a three-axis machine tool. Step 3) Integrated model of geometric error and linkage control error and prediction of actual trajectory point: The tool tip geometric error mapping result obtained in Step 1) and the dynamic position deviation of the three-axis linkage control obtained in Step 2) are integrated in a unified manner. Under the same interpolation time series and coordinate system, the errors of each axis are superimposed and calculated to obtain the actual spatial position prediction value of the tool tip at each interpolation command position, thereby realizing the integrated modeling of geometric error and linkage control error and prediction of actual trajectory point; Step 4) Fast calculation method for contour error based on interpolation point and predicted actual point: Finally, the expected trajectory formed by the interpolation command position point is used as the reference contour, and the actual position point of the tool tip predicted by the integrated model is used as the deviation point. The shortest distance from the actual position point to the expected trajectory is calculated by the perpendicular foot method of the interpolation line segment, and this distance is used as the contour error at the corresponding position, so as to realize the fast calculation of contour error without trajectory analysis and offline measurement.

2. The method for calculating the trajectory contour error of a three-axis machine tool considering geometric and kinematic characteristics according to claim 1, characterized in that, The specific process of step 1) is as follows: 1.1) Transformation matrix from tool coordinate system to workpiece coordinate system under ideal conditions: Three-axis machine tools are classified according to the workpiece-to-tool sequence as follows: FXYZ, XFYZ, XYFZ and XYZF ,letter F The fixed part representing the machine tool is called the machine tool coordinate system; F The letters on the left represent the direction of workpiece movement relative to the bed. F The letter on the right represents the direction of movement of the cutting tool relative to the bed; use XYFZ A geometric error model of a three-axis machine tool is established. The initial coordinate system of the machine tool bed is... F ,based on F Create local coordinate systems in each direction X, Y, Z, S, T, W The principal coordinate system is S The tool coordinate system is T , W Indicates the workpiece coordinate system; Based on the topology of CNC equipment, the tool chain is based on the bed coordinate system. F Starting from, via Z The axis coordinate system is ultimately transferred to the tool coordinate system. T ; The workpiece chain also uses the bed coordinate system. F Starting from, via Y axial coordinate system and X The axis coordinate system is ultimately transferred to the workpiece coordinate system. W ; The toolchain is as follows: FZT The workpiece chain is as follows: FYXW ; Under ideal conditions, T This represents a coordinate transformation matrix. The subscripts and superscripts on the left side of the matrix represent the subscripts of the original coordinate system and the superscripts of the target coordinate system, respectively. The upper right subscript... i The transformation matrix represents the ideal state; assuming the worktable coordinate system... X, Y, Z They moved a distance along their respective axes in sequence. x, y, z ,for XYFZ For a type of machine tool, the motion chain from the workpiece coordinate system to the machine tool coordinate system is as follows: WXY- FZST , expressed as follows: In the formula: Workpiece coordinate system W Compared to X Transformation matrix of coordinate system for X coordinate system relative to Y Transformation matrix of coordinate system for Y coordinate system relative to bed coordinate system F The transformation matrix, Bed coordinate system F Compared to Z Transformation matrix of coordinate system for Z coordinate system relative to principal axis coordinate system S The transformation matrix, Main axis coordinate system S Relative to the workpiece coordinate system T The transformation matrix, ideally the principal axis S and Z Shafts and cutting tools T With spindle S Workbench W and X There is no relative motion between the axes, that is... , , It is the identity matrix. x, y, z This refers to the nominal motion of the translation axis, which is the motion amount commanded by the CNC system. 1.2) Transformation matrix from tool coordinate system to workpiece coordinate system considering geometric errors: Each axis of the machine tool has 6 geometric errors, and there is also a perpendicularity error between two axes, for a total of 21 geometric errors. Taking these geometric errors into account during inter-body motion, the transformation matrix from the tool coordinate system to the workpiece coordinate system under the action of geometric errors is as follows: In the formula: superscript r This represents the transformation matrix considering geometric errors. To consider the workpiece coordinate system under geometric error conditions W Compared to X Transformation matrix of coordinate system To account for geometric error conditions X coordinate system relative to Y Transformation matrix of coordinate system To account for geometric error conditions Y coordinate system relative to bed coordinate system F The transformation matrix, To consider the bed coordinate system under geometric error conditions F Compared to Z Transformation matrix of coordinate system To account for geometric error conditions Z coordinate system relative to principal axis coordinate system S The transformation matrix, To consider the principal axis coordinate system under geometric error conditions S Relative to the workpiece coordinate system T The transformation matrix, ideally the principal axis S and Z Shafts and cutting tools T With spindle S Workbench W and X There is no relative motion between the axes, that is... , , It is the identity matrix; Ideal transformation matrix and the transformation matrix considering geometric errors The relationship between them is an ideal transformation matrix. Right-multiply by an error motion matrix As shown in the following formula: Based on the small error assumption, the tool coordinate system T To the workpiece coordinate system W Error motion change matrix Assume the following formula: In the formula: , , This refers to the spatial position error between the actual cutting point and the ideal cutting point of the tool. , , This refers to the rotational error of the actual cutting point of the tool relative to the ideal cutting point. The spatial location error part of the error matrix is ​​shown in the following equation: Δ x Δ y and Δ z Error motion is a quantity that is position-dependent; 1.3) Unified spatial error model for four types of three-axis milling machines: The motion chains for the four types of three-axis machine tool structures are shown below: FXYZ: W→F→X→Y→Z→S→T ; XFYZ:W→X→F→Y→Z→S→T ; XYFZ: W→X→Y→F→Z→S→T ; XYZF: W→X→Y→Z→F→S→T . The homogeneous coordinates on the right side of the machine tool coordinate system F are transformed into positive transformations, while the transformations on the left side are negative transformations. For this purpose, a singular function as shown in equation (6) is introduced. The singular function can automatically determine whether the transformation matrix is ​​a positive or negative transformation based on the corresponding machine tool type. In the formula: ,when hour ;parameter i =0,1,2,3, representing four types of machine tools: FXYZ, XFYZ, XYFZ, and XYZF, respectively; =0,1,2 correspond to the transformation matrices of the X, Y, and Z axes, respectively. corresponding =0, corresponding =1, corresponding =2; Using singular matrices, Represented as transformation matrices , and A unified expression form; a unified transformation matrix , and Substituting into equation (2), we obtain the unified spatial error model for the four types of three-axis machine tools; equation (7) represents the displacement error part of the unified kinematic model: In the formula: This refers to the X-axis positioning error. The horizontal straightness error along the X-axis. This refers to the vertical straightness error along the X-axis. This refers to the X-axis pitch angle error. This refers to the X-axis yaw angle error. This refers to the X-axis roll angle error. Y-axis positioning error The error is the horizontal straightness of the Y-axis. This refers to the vertical straightness error along the Y-axis. This represents the Y-axis pitch angle error. This refers to the Y-axis yaw angle error. This refers to the Y-axis roll angle error. Z-axis positioning error The error is the horizontal straightness of the Z-axis. The error is the vertical straightness error along the Z-axis. The Z-axis pitch angle error is... This refers to the Z-axis yaw angle error. This refers to the Z-axis roll angle error. , , These represent the perpendicularity errors between the X and Y axes, the X and Z axes, and the Y and Z axes, respectively.

3. The method for calculating the trajectory contour error of a three-axis machine tool considering geometric and kinematic characteristics according to claim 2, characterized in that, The specific process of step 2) is as follows: 2.1) Equivalent transfer functions of each component of the servo system: 1) Equivalent transfer function of permanent magnet synchronous motor: Select =0 control, as the core control architecture of the PMSM servo system, is known from the mathematical model of the permanent magnet synchronous motor. dq The voltage equation of the motor at coordinate 0, using a vector control strategy. In the =0 control mode, the voltage equation simplifies to: In the formula: for d shaft voltage, for q shaft voltage, for q Shaft inductor, For motor q shaft current, This refers to the armature resistance of the motor. Performing a Laplace transform on equation (8) yields q Armature current and q The transfer function of the shaft voltage is: use In the =0 control strategy, the direct-axis component of the stator current is completely suppressed, which is equivalent to the direct-axis winding being in an open-circuit state. For surface-mount permanent magnet synchronous motors, the motor port characteristics in the control mode are equivalent to a separately excited DC motor. At this time, the motor output torque and quadrature-axis current are... A linear relationship exists, that is: Right now q Shaft current and electromagnetic torque The transfer function is: In the formula: For the electromagnetic torque of the motor, This represents the number of pole pairs of the motor. This refers to the flux linkage amplitude of the permanent magnet; 2) Equivalent transfer function of the servo driver: In the current loop control architecture, the PWM inverter and the PMSM armature circuit together constitute the controlled object; the PWM inverter is equivalently modeled as a first-order inertial element with pure time delay characteristics, and its dynamic characteristics are determined by the time constant. and equivalent gain coefficient The phase delay in this stage originates from three time-delay factors: the PWM carrier comparison time, the power device switching dead time, and the inverter power device switching off delay time. The cumulative limit of these time-delay components does not exceed a single PWM modulation cycle. The transfer function of the time-delay stage is expressed in the frequency domain as follows: Combined with inverter gain The transfer function of a PWM inverter is expressed as: In the formula: for q Shaft voltage command, (s) represents the PWM modulation period. This represents the operating frequency (Hz) of the inverter's switching transistors. The inverter gain is approximately 1. right Perform a first-order Taylor expansion approximation, in =0 at point Taylor expansion, due to The value is very small, so we ignore the higher-order terms and retain the first-order terms, ultimately approximating the transfer function of the PWM inverter as a first-order inertial element: 3) Transfer function of mechanical transmission system: Based on the equivalent dynamic model of a two-inertia, two-degree-of-freedom ball screw mechanical system, the dynamic equation is: make , Then, equation 14) is transformed into: Taking the Laplace transform of the above equation, we get: The angular velocity of the two-inertia, two-degree-of-freedom motor is derived from the above derivation. Regarding the electromagnetic torque of the motor The transfer function is: Similarly, the angular velocity of the lead screw is obtained. Regarding the electromagnetic torque of the motor The transfer function is: In the formula: The moment of inertia of the motor rotor. The equivalent rotational inertia of the lead screw. For the torque acting on the motor rotor, For the torque acting on the leadscrew, This refers to the rotational displacement of the motor rotor. For the torsional displacement of the leadscrew, The angular velocity of the leadscrew. The angular velocity of the motor. For the torsional stiffness of the coupling, For the torsional damping of the motor rotor, For the torsional damping of the coupling, For bearing torsional damping, , , , ; 2.2) Establishment of a single-axis three-loop control model: The servo system employs a three-loop control system: current loop, speed loop, and position loop. The current and speed loops use PI controllers, while the position loop uses a P controller. Based on the equivalent transfer functions of each loop, a closed-loop control structure for the single-axis servo system is established. The open / closed-loop transfer functions of the three control loops are expressed as follows: 1) Current loop transfer function: Based on the control structure described above, the open-loop transfer function of the current loop is obtained as follows: The current closed-loop transfer function is: In the formula: , , , , , , This is the proportional gain (V / A) of the current loop controller. The integral time constant of the current loop controller; 2) Velocity loop transfer function: From the current closed-loop transfer function (20) and the transfer function of motor angular velocity and motor electromagnetic torque (17), the speed open-loop transfer function is derived as follows: Furthermore, the velocity closed-loop transfer function is derived as follows: In the formula: For speed commands, The torque constant of the motor is... The proportional gain of the speed loop controller is (A / (rad / s)). The integral time constant of the speed loop controller. , , , , , , , , , , , ; 3) Position loop transfer function: From the closed-loop transfer function of the velocity loop (22) and the transfer function of the position controller, the open-loop transfer function of the position loop is obtained as follows: Then, the closed-loop transfer function of the position loop is obtained: In the formula: For actual location, For instruction location, For the position loop controller, the proportional gain (Hz) , , , , , , , , ; 4) Transfer function of the perturbation input: For a single-axis servo system, assume the input is a disturbance. , According to the current closed-loop transfer function The transfer function of motor angular velocity and motor electromagnetic torque Seeking the perturbation Input and motor speed output Transfer function: In the formula: , , , , , , , , , , , , , , , , , , , ; Disturbance and table displacement output Transfer function: In the formula: , , , , , , , , , , , .

4. The method for calculating the trajectory contour error of a three-axis machine tool considering geometric and kinematic characteristics according to claim 3, characterized in that, The specific process of step 3) is as follows: 3.1) Analysis of Multi-Axis Linkage Feed Motion Error: This paper analyzes the physical mechanism of the servo drive in a single-axis feed system, and then constructs an electromechanical integrated model of the feed system, which integrates a motion control system, servo amplifier, PWM rectifier inverter, three-phase permanent magnet synchronous motor, and mechanical transmission links. Using a typical ball screw mechanical transmission system on the X-axis, and focusing on the three-phase permanent magnet synchronous motor, the paper establishes the voltage and current equations of the stator and rotor, the magnetomotive force of each phase winding, and the combined magnetomotive force of the stator and rotor. Finally, the electromagnetic torque output by the motor is derived, as shown in the following equation: In the formula: The nominal torque is generated after inputting the CNC interpolation command. Harmonic torques are generated by the non-ideal mechanical structure and electrical nonlinearity of the motor. air permeability, Indicates the rotor diameter. , is the axial length of the rotor core. This represents the number of rotor pole pairs of the motor. The length of the air gap. For the stator's combined magnetomotive force. To generate the rotor's synthesized magnetomotive force. The angle between the stator and rotor magnetomotive force axes; Furthermore, position loop feedback and velocity loop feedback disturbances will re-enter the closed-loop control loop, ultimately generating unnecessary displacement responses at the end-effector and the worktable. Furthermore, under the combined effects of excitation sources such as CNC commands, position loop and speed loop feedback interference, and motor torque harmonics, the final displacement output of the worktable is expressed as: In the formula: This represents the displacement of the worktable under no-load interference. Workbench command position, For the position closed-loop transfer function, The harmonic torque disturbance-position output transfer function is... This represents the displacement of the worktable under no-load interference. The table displacement fluctuation is caused by the harmonic torque of the motor. The displacement response generated at the mechanical end of the closed-loop control loop by feedback disturbance excitation of the position loop and velocity loop; For other linear feed axes of a three-axis machine tool, the above method is used to obtain the motion displacement response of the mechanical actuator along the feed direction of each axis; subtracting the actual displacement output from the ideal displacement yields the transient and steady-state following errors during each axis feed, as shown in the following formula: In the formula: The following errors are for transient and steady-state conditions. This is the actual displacement output. Output the command displacement; 3.2) Holographic state solution for the geometric-linkage process: An integrated model of geometric error and linkage control error of CNC machine tool is established to solve the dynamic displacement response of the tool tip under the influence of multi-stage interactive coupling, as shown in the following formula; In the formula: To account for the tool tip displacement deviation due to geometric and linkage errors, The deviation of the tool tip is caused by geometric error. The deviation of the tool tip is caused by the linkage error. This represents the following error along the X-axis. This represents the Y-axis following error. This represents the following error along the Z-axis. This is the transformation matrix for geometric errors between the global coordinate system and the workpiece dynamic coordinate system. This is the transformation matrix of multi-axis linkage error between the global coordinate system and the workpiece dynamic coordinate system; The integrated model is solved by using an offline time-domain discrete numerical calculation method. The interpolation command points of the machining trajectory are input, and the predicted tool tip point considering geometric error and linkage error is output.

5. The method for calculating the trajectory contour error of a three-axis machine tool considering geometric and kinematic characteristics according to claim 4, characterized in that, The specific process of step 4) is as follows: Interpolation segment perpendicular foot method to solve trajectory contour error: Given the current actual position point The corresponding instruction location is First, find the current interpolation position. The previous n interpolation points are stored to obtain n-1 interpolation line segments, and then the actual position points are... Draw perpendicular lines to these n-1 interpolation segments and find the feet of the perpendiculars. ( i =1,2,3,…,n-1), if the foot of the perpendicular is inside the interpolation segment, then store the distance from the actual point to the foot of the perpendicular; if the foot of the perpendicular is outside the interpolation segment, then take the distance from the actual point to the starting point of the interpolation segment vector corresponding to the foot of the perpendicular as the distance from the interpolation segment to the actual position point. The foot of the perpendicular is calculated using vector projection. (1) For n interpolation points, n-1 interpolation vectors are obtained. , , , … , Additionally, we obtain the vectors from n-1 instruction points to the actual points. , , , … , ; (2) Find the projection coefficients t That is, the projection ratio of the vector from the command point to the actual point onto each interpolation vector: Limiting projection coefficients t Scope: When the foot of the perpendicular is not within the interpolation line segment, the starting point of the interpolation vector is taken as the nearest point. (3) Obtaining the projection coefficients yields the interpolation line segment. Corresponding foot : In the formula: The current command position point The instruction location points of the first n interpolation cycles, interpolation line segment The corresponding foot of the perpendicular; Ultimately, we obtained Distance to these n-1 interpolation segments ( i =1,2,3,…,n-1), where the minimum distance That is, the actual point The contour error value, i.e.: In the formula: Current actual location point The corresponding contour error value, This is the current actual location point. Let the foot of the perpendicular from the current actual position point to the n interpolation line segments be denoted as . Let n be the magnitude of the vector from the current actual position point to the foot of the perpendicular of the n interpolation line segments.