Motion control system and error compensation method, machine tool, electronic device
By establishing a kinematic model and embedding geometric error parameters, the problem of insufficient machining accuracy caused by mechanical errors in five-axis linkage CNC machine tools was solved, achieving efficient error compensation and long-term accuracy maintenance, thereby improving the machining accuracy and maintenance efficiency of the machine tools.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI EMPOWER TECH CO LTD
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-12
Smart Images

Figure CN122194840A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of motion control compensation technology, and more specifically, to a motion control system and error compensation method, a machine tool, and electronic equipment. Background Technology
[0002] Flat beveling technology is a crucial step in the pretreatment of metal welding. It primarily involves cutting bevels of specific shapes and angles (such as V-shaped, X-shaped, Y-shaped, or U-shaped bevels) into the edges of metal sheets to create suitable weld filling space during subsequent welding. This technology significantly increases the welding contact area, optimizes stress distribution, improves the strength and sealing of welded joints, and effectively controls welding deformation. Therefore, it is widely used in fields with extremely high requirements for structural strength and reliability, including shipbuilding, large steel structure buildings, pressure vessels, engineering machinery, and heavy equipment manufacturing such as oil and gas pipelines.
[0003] Traditional beveling has long relied on processes such as flame cutting, plasma cutting, or conventional mechanical milling. While these methods are widely used, they have several inherent drawbacks: thermal cutting can easily lead to an expansion of the heat-affected zone, surface hardening, and even microcracks in the cut, and the machining accuracy is greatly affected by the operator's experience, often resulting in uneven bevel angles and inconsistent blunt edge dimensions; mechanical milling, on the other hand, is often cumbersome, inefficient, and has limited adaptability to complex trajectories. In addition, traditional methods are usually accompanied by low material utilization, high energy consumption, and serious noise and dust pollution, making it difficult to fully meet the comprehensive requirements of modern manufacturing for green manufacturing, precision manufacturing, and high-efficiency manufacturing.
[0004] Against this backdrop, laser beveling technology has emerged and rapidly developed into an important direction for industry technological upgrading. This technology integrates a high-energy-density laser beam with a precision multi-axis CNC system, enabling high-precision cutting and beveling of sheet metal in a single operation through multi-dimensional linkage between the laser head and the workpiece. Compared to traditional processes, laser beveling offers significant advantages such as concentrated heat input, a narrow heat-affected zone, a fine kerf, minimal processing deformation, high-quality cut surface, high dimensional accuracy, and strong process stability. It is particularly suitable for high-strength materials, complex three-dimensional beveling, and the needs of automated production lines.
[0005] However, the actual machining accuracy of laser beveling equipment, especially five-axis CNC machine tools that execute complex spatial trajectories, is constrained by various factors such as mechanical structure, assembly process, and long-term wear. Key geometric parameters of the machine tool, such as the perpendicularity error of the XY axes, the perpendicularity deviation of the Z-axis relative to the XY plane, the discrepancy between the actual axis direction of the rotary swing axis and the theoretical model, and fluctuations in the surface flatness of the workpiece, all introduce non-ideal kinematic errors. When using the RTCP (Rotary Tool Center Point Control) model based on ideal geometric assumptions, the motion compensation calculated by the system does not cover the aforementioned actual structural parameter deviations. This causes the actual position of the laser cutting head (tool tip) to deviate from the theoretical trajectory during the machine tool's rotational motion, resulting in beveling angle errors, out-of-tolerance blunt edge dimensions, or distorted cut contours, thus failing to fully realize the technological potential of laser precision machining. Therefore, developing a high-precision motion control system capable of identifying and compensating for such geometric errors online has become a key technological challenge for further improving the quality of laser beveling processes and expanding its industrial applications. Summary of the Invention
[0006] In view of this, the purpose of this application is to provide a motion control system and error compensation method, machine tool, electronic device and computer storage medium thereof, so as to improve the above-mentioned problems existing in the prior art.
[0007] In a first aspect, embodiments of this application provide a motion control error compensation method, the method comprising: establishing a kinematic model of a machine tool; wherein the kinematic model includes error parameters for describing the geometric errors of the machine tool; based on the kinematic model, calculating the actual motion commands of each axis required to compensate for the geometric errors according to the target tool tip position and the target motion commands of each axis; wherein the actual motion commands are used to control the motion of the machine tool's motion axes.
[0008] In the above implementation process, the geometric error parameters are explicitly embedded into the kinematic model, enabling the simultaneous completion of tool tip trajectory planning and error compensation calculation in a single forward calculation. Furthermore, since the actual motion commands are directly calculated from the error-containing inverse kinematic model, the displacement of each axis already includes equivalent corrections for geometric errors such as straightness, perpendicularity, and angular deviation. Therefore, the servo closed loop only needs to track the compensated ideal trajectory, reducing following and contour errors. The error parameters are stored in the model as identifiable explicit variables. When changes in machine tool temperature, wear, or mechanical issues cause geometric error drift, the parameters can be quickly recalibrated and updated online or offline, achieving long-term accuracy maintenance and reduced maintenance costs.
[0009] Optionally, the motion axes of the machine tool include at least a first rotary axis and a second rotary axis; the error parameters include the actual rotation axis direction vector of at least one of the first and second rotary axes and / or the offset vector between the rotation centers of the two rotary axes.
[0010] In the above implementation process, the actual axis direction vector of the rotary axis and the offset vector of the rotation center are used as error parameters to be identified. The kinematic model can simultaneously characterize multi-source geometric errors such as inter-axis non-orthogonality, axis drift, and rotation center zero-point offset under any swing angle of the machine tool. After the system reads the target tool tip pose, the multiple coordinate transformations required by traditional compensation are merged into a single matrix operation, shortening the interpolation cycle. In addition, since the rotation axis direction vector participates in the model in the form of a unit vector, its identification result naturally satisfies the orthogonality normalization constraint, avoiding error parameter redundancy and correlation singularity, and improving the robustness and convergence speed of parameter identification. When the machine tool experiences new spatial drift of the rotary axis due to temperature rise or bearing wear, it is only necessary to remeasure and update the corresponding direction vector and offset vector to complete the accuracy recalibration without changing the CNC code, achieving long-term adaptive maintenance.
[0011] Optionally, the step of calculating the actual motion commands of each axis required to compensate for the geometric error based on the kinematic model, according to the target tool tip position and the target motion commands of each axis, further includes: when the first rotation axis and / or the second rotation axis generates motion, calculating the vector from the rotation center of the second rotation axis to the target tool tip, and obtaining the vector from the rotation center of the first rotation axis to the target tool tip; wherein, the vector from the rotation center of the first rotation axis to the rotation center of the second rotation axis is... The vector from the rotation center of the second rotation axis to the target tool tip point O is: .
[0012] In the above implementation process, the kinematic model parameterizes the spatial distance between the rotation axes and the distance from the tool tip to the second rotation center. This allows the actual pose of the tool tip in the machine coordinate system to be calculated in one step according to the vector chain rule when any rotation axis undergoes angular displacement, without the need for step-by-step accumulation of translation and rotation transformations. When the spindle thermal expansion or tool length change causes... Drift, or caused by bearing wear When changes are made, the compensation amount can be updated instantly by simply recalibrating these two vectors online or offline, without having to re-survey the entire machine geometry, thus improving the machine tool's accuracy retention capability and maintenance efficiency under long-term, high-load operating conditions.
[0013] Optionally, the step of calculating the actual motion commands of each axis required to compensate for the geometric error based on the kinematic model, according to the target blade tip position and the target motion commands of each axis, includes: calculating a first rotation matrix based on the actual rotation axis direction vector of the first rotation axis and its target rotation angle; and calculating a second rotation matrix based on the actual rotation axis direction vector of the second rotation axis and its target rotation angle.
[0014] In the above implementation process, the actual rotation axis direction vectors of the first / second rotation axes are directly substituted into the generation of the corresponding first and second rotation matrices. This accommodates spatial direction errors caused by axis installation misalignment, bearing clearance, and thermal drift, and eliminates the sequence error and cumulative rounding between the two transformations, thereby improving the accuracy of tool tip pose prediction. In addition, since the rotation matrix only relies on real-time angle feedback and the calibrated direction vector during the interpolation cycle, the computational load is equivalent to two standard transformations. Matrix multiplication takes into account real-time performance; when the machine tool's rotary axis develops a new spatial tilt due to changes in ambient temperature, it is only necessary to remeasure and update the corresponding direction vector. This allows for adaptive correction of geometric errors and long-term accuracy maintenance across the entire stroke range without the need to reprocess the CNC program.
[0015] Optionally, the actual rotation axis direction vector of the first rotation axis is: The actual rotation axis direction vector of the second rotation axis is The step of calculating the actual motion commands for each axis required to compensate for the geometric error based on the kinematic model, according to the target tool tip position and the target motion commands for each axis, further includes: calculating the first rotation matrix R based on geometric relationships. B for: ; Furthermore, based on geometric relationships, the second rotation matrix R can be calculated. A for: ; in, Let be the rotation angle of the first rotation axis; The rotation angle of the second rotation axis.
[0016] In the above implementation process, the actual axis direction vector of the rotation axis is directly embedded into the analytical expression of the general rotation matrix, combining errors such as axis installation misalignment and thermal drift with the rotational motion. No subsequent table lookups or iterations are required; a single calculation simultaneously completes coordinate transformation and error correction. Since the matrix form is fully compatible with ideal rotation, a smooth upgrade can be achieved by adding only one matrix multiplication to the existing interpolation framework, reducing development costs and avoiding additional hardware investment. The direction vector is stored in the model as an explicit parameter. When the machine tool state changes due to temperature or wear, only recalibration and updating of the vector components are needed to instantly refresh the compensation effect, achieving rapid response and thus improving the machine tool's adaptability and process stability during long-term operation.
[0017] Optionally, the step of calculating the actual motion commands of each axis required to compensate for the geometric error based on the kinematic model, according to the target tool tip position and the target motion commands of each axis, further includes: calculating the spatial displacement compensation amount of the tool tip caused by the rotation axis movement based on the first rotation matrix, the second rotation matrix, and the offset vector.
[0018] In the above implementation process, the difference between the ideal pose and the actual pose of the tool tip is directly calculated as the spatial displacement compensation amount. Since the compensation amount is output in vector form at once, the subsequent interpolation process only needs to superimpose it on the linear axis target instruction to complete the geometric error correction without modifying the CNC program, thus reducing the software coupling. When the relative position of the rotary axis of the machine tool drifts due to temperature or wear, it is only necessary to update the offset vector and re-execute the same code path to refresh the compensation result in real time, so as to achieve adaptive accuracy maintenance throughout the entire stroke range, thereby improving long-term stability and maintenance convenience.
[0019] Optionally, the motion axes of the machine tool further include at least one linear axis; the error parameters further include a perpendicularity parameter for describing the perpendicularity error between the linear axes.
[0020] In the above implementation process, a unified correction for the non-orthogonality of the linear axis is further superimposed on the rotary axis compensation. Since the perpendicularity parameter is embedded analytically into the inverse kinematics solution, the coupled compensation of the linear and rotary axes is completed simultaneously within the regular interpolation cycle. The parameter and rotary axis error share the same online calibration process. When the machine tool structure experiences new perpendicularity drift due to foundation settlement or stress release, only remeasurement and updating of the corresponding values are needed to instantly refresh the compensation effect without modifying the CNC code, achieving rapid response and thus improving the overall accuracy stability and maintenance efficiency of the machine tool during long-term use.
[0021] Optionally, the step of calculating the actual motion commands of each axis required to compensate for the geometric error based on the kinematic model, according to the target tool tip position and the target motion commands of each axis, further includes: correcting the component of the tool tip spatial displacement compensation amount in the direction of the linear axis according to the perpendicularity parameter, so as to obtain the actual motion commands of each linear axis.
[0022] In the above implementation process, the perpendicularity parameter is directly introduced into the axis projection stage of the spatial displacement compensation, completing the real-time correction of non-orthogonal coupling while generating the actual motion command of the linear axis. Since the correction process involves only one vector inner product operation, the computational load is comparable to that of conventional interpolation, and it can be seamlessly executed within the existing servo cycle without the need for additional hardware or external compensators. When the machine tool experiences a slow drift in the perpendicularity between axes due to foundation settlement or stress release, only the corresponding perpendicularity parameter needs to be updated online. This allows for immediate updating of the compensation results without modifying the CNC machining program, achieving long-term adaptive maintenance of geometric accuracy across the entire stroke range, thereby improving the machine tool's operational convenience and process stability.
[0023] Optionally, the step of correcting the component of the spatial displacement compensation of the tool tip in the linear axis direction according to the perpendicularity parameter includes: calculating the displacement deviation in the linear axis direction, and calculating the compensation displacement perpendicular to the linear axis based on the displacement deviation in the linear axis direction.
[0024] In the above implementation process, the displacement deviation is first calculated in the direction of the linear axis, and then a compensation displacement perpendicular to it is generated accordingly. At the same time, the tangential progress and normal accuracy of the tool tip along the ideal trajectory are guaranteed, so that the contour error and dimensional error are suppressed simultaneously. Since the compensation displacement always maintains geometric orthogonality with the corresponding linear axis, the system can complete the calculation within the conventional interpolation cycle without introducing additional rotation or iteration, thus taking into account both real-time performance and stability. When the perpendicularity parameter drifts slightly with temperature or structural stress, the deviation-compensation mapping relationship only needs to be refreshed once to update the linkage result in real time, realizing the directional decoupling and rapid self-calibration of geometric error, thereby improving the contour preservation capability and long-term accuracy reliability of the five-axis machine tool in the machining of complex curved surfaces.
[0025] Optionally, the geometric error parameter further includes the perpendicularity error angle between the two axes in the linear axis; the step of calculating the actual motion command of each axis required to compensate for the geometric error based on the kinematic model, according to the target tool tip position and the target motion command of each axis, further includes: decoupling the calculation of the linear axis motion compensation amount after direction vector mapping correction based on the perpendicularity error angle.
[0026] In the above implementation process, the perpendicularity error angle is introduced as an independent variable into the kinematic model. The linear axis motion compensation amount, which has already undergone direction vector mapping, is then further decoupled and calculated. This distributes the geometric deviation originally coupled between the two axes to their respective independent control channels, with each axis only responsible for its own directional compensation component. Furthermore, it can be seamlessly embedded within the existing servo cycle without additional hardware or external compensators. When the machine tool experiences a slow change in the perpendicularity error angle due to temperature gradients or foundation settlement, simply refreshing the angle parameter online and re-executing the same code path instantly updates the distribution ratio of the two-axis compensation amount, achieving adaptive rebalancing of geometric errors. This improves the contour conformation accuracy and maintenance convenience of the machine tool during long-term operation.
[0027] Secondly, embodiments of this application also provide a motion control system, the system comprising: a storage module, a compensation calculation module, and a control output module; the storage module is used to store a geometric error model and its parameters established according to the method described above; the compensation calculation module is used to execute the method described above, and based on the kinematic model, calculate the actual motion commands of each axis required to compensate for the geometric error according to the target tool tip position and the target motion commands of each axis; wherein, the actual motion commands are used to control the motion of the machine tool's motion axes.
[0028] In the above implementation process, the storage module uses a unified data structure to solidify the geometric error model and parameters, enabling error descriptions of different machine tool topologies to be reused on the same software platform. The compensation calculation module only relies on the standard interface to read the target tool position and axis commands, and can complete the synchronous calculation of rotary axis, linear axis and perpendicularity errors within a single calculation link, avoiding the delay and consistency risks caused by frequent data interaction across modules. The control output module directly sends the calculated actual motion commands to the servo drive without the need for additional external compensators or post-processing plug-ins, thereby shortening the control closed loop and improving the response speed. When the machine tool experiences error drift due to environmental factors or wear, the corresponding parameters in the storage module only need to be updated online, and the compensation calculation module can automatically apply the new compensation amount in the next servo cycle, improving the operation and maintenance efficiency and long-term stability of the five-axis equipment.
[0029] Thirdly, this application also provides a machine tool, which includes: a tilting head or tilting table mechanism consisting of at least two rotating axes, and the motion control system described above, for controlling the machine tool body to perform high-precision beveling.
[0030] Fourthly, this application also provides an electronic device, which includes a memory and a processor. The memory stores program instructions, and when the processor runs the program instructions, it executes the steps in any of the methods described above.
[0031] Fifthly, this application also provides a computer-readable storage medium storing computer program instructions, which, when executed by a processor, perform the steps of the method described above. Attached Figure Description
[0032] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is a first flowchart of a motion control error compensation method provided in an embodiment of this application; Figure 2 This is a second flowchart of the motion control error compensation method provided in the embodiments of this application; Figure 3 This is a first schematic diagram of the motion control error compensation method provided in the embodiments of this application; Figure 4 This is a third flowchart of the motion control error compensation method provided in the embodiments of this application; Figure 5 This is a second schematic diagram of the motion control error compensation method provided in the embodiments of this application; Figure 6 A schematic diagram of a motion control system provided in an embodiment of this application; Figure 7 This is a block flowchart illustrating an electronic device provided in an embodiment of this application.
[0034] Icons: 001-Storage module; 002-Compensation calculation module; 003-Control output module; 100-Electronic device; 111-Memory; 112-Storage controller; 113-Processor; 114-Peripheral interface; 115-Input / output unit; 116-Display unit. Detailed Implementation
[0035] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of the embodiments of this application.
[0036] In view of this, the purpose of this application is to provide a motion control system and error compensation method, machine tool, electronic device and computer storage medium thereof, so as to improve the above-mentioned problems existing in the prior art.
[0037] In a first aspect, embodiments of this application provide a motion control error compensation method applied to a server, which can be an electronic device with logic calculation functions such as a personal computer (PC), tablet computer, smartphone, or personal digital assistant (PDA).
[0038] Please see Figure 1 , Figure 1 The first flowchart of the motion control error compensation method provided in the embodiments of this application is shown.
[0039] The motion control error compensation method includes: establishing a kinematic model of the machine tool; wherein the kinematic model contains error parameters used to describe the geometric errors of the machine tool; based on the kinematic model, calculating the actual motion commands of each axis required to compensate for the geometric errors according to the target tool tip position and the target motion commands of each axis; wherein the actual motion commands are used to control the motion of the machine tool's motion axes.
[0040] In the above implementation process, firstly, it achieves both accuracy and universality in compensation by systematically incorporating complex spatial geometric errors into the mathematical model. This makes compensation independent of specific paths or empirical adjustments, and can calculate the actual motion of each axis required to ensure the accuracy of the tool tip trajectory, making it applicable to various complex machining trajectories. Secondly, it enhances the flexibility and deployability of the solution process by placing the computationally intensive model solution and compensation instruction generation tasks on a dedicated server. This reduces the computational pressure on the real-time kernel of the machine tool CNC system, facilitating algorithm upgrades and maintenance, and also supporting remote monitoring and optimization. Thirdly, it provides a general framework for geometric error compensation. By updating the error parameters in the model, it can adapt to changes in different machine tools or machine tool states. This means that accuracy maintenance is no longer entirely dependent on mechanical wear, but can be continuously corrected and optimized through software, thereby fundamentally improving the intelligence level and long-term accuracy stability of motion control.
[0041] Optionally, the motion axes of the machine tool include at least a first rotary axis and a second rotary axis; the error parameters include the actual rotation axis direction vector of at least one of the first and second rotary axes and / or the offset vector between the rotation centers of the two rotary axes.
[0042] In the aforementioned implementation process, traditional methods often simplify the rotation axis into an ideal orthogonal or intersecting mathematical model. This application, however, introduces actual, potentially non-orthogonal axis direction vectors and center offset vectors with spatial positional deviations. These vectors characterize the true spatial posture and positional relationship of the rotation axis due to manufacturing, assembly, and wear. This allows for the calculation and compensation of tool posture and tip position errors caused by these deviations at the kinematic source. During spatial compound rotational motion of the oscillating head or oscillating table mechanism, these minute axis deviations are amplified, leading to significant machining errors. By compensating for these vector parameters, it is possible to ensure that the tool's oscillation center is highly consistent with the actual command model at any rotation angle. This ensures stable maintenance of the programmed tool tip trajectory and tool posture during complex beveling and surface machining, effectively avoiding problems such as contour distortion, overcutting, or undercutting caused by imperfect rotation axis geometry. Furthermore, by identifying and compensating for these specific vector parameters, personalized calibration can be performed for the unique mechanical state of each machine tool. This allows the same control algorithm to be adapted to hardware with different mechanical precision, or to restore precision by re-measuring and updating these vector parameters after the machine tool has undergone long-term use, temperature rise, and stress deformation, thus extending the high-precision service life of the machine tool.
[0043] Optionally, please refer to Figure 2 , Figure 2 The second flowchart of the motion control error compensation method provided in the embodiments of this application is shown.
[0044] Based on the kinematic model, and according to the target tool tip position and the target motion commands for each axis, the calculation of the actual motion commands for each axis required to compensate for geometric errors further includes: when the first and / or second rotation axes generate motion, calculating the vector from the rotation center of the second rotation axis to the target tool tip, and obtaining the vector from the rotation center of the first rotation axis to the target tool tip; wherein, the vector from the rotation center of the first rotation axis to the rotation center of the second rotation axis is... The vector from the center of rotation of the second rotation axis to the target tool tip O is: .
[0045] In the above implementation process, firstly, it constructs a clear and unified framework for calculating the tool tip position. Regardless of the motion state of the two rotation axes, the tool system is decomposed into a fixed offset between the rotation centers ( ) and the dynamic vector from the center of rotation to the tip of the tool ( These two parts systematically describe the complex spatial relationship between the tool tip and each rotation center as the angle changes, providing a stable and reliable mathematical model foundation for inversely solving the actual motion commands of each axis. (Vector) In essence, it includes the static offset error between the centers of the two rotating axes caused by manufacturing and assembly. The direction and die length implicitly include parameters such as the tool length. During compensation calculations, measured values containing errors (such as non-ideal values) are used. Substituting these vector chains into the calculation can offset the tool tip position errors caused by these geometric deviations, ensuring a seamless connection from model to compensation. Finally, the calculation based on vector relationships has clear geometric and mathematical meaning, and the algorithm structure is clear, facilitating efficient and stable completion of the calculation within the servo control cycle. This ensures that the system can respond to complex multi-axis linkage commands online in real time, dynamically correcting the motion of each axis. Thus, in applications such as high-speed, high-precision beveling, it reliably maintains the accuracy of the tool tip trajectory and effectively suppresses contour errors.
[0046] Optionally, based on the kinematic model, according to the target tool tip position and the target motion command of each axis, the actual motion command of each axis required to compensate for geometric errors is calculated, including: calculating the first rotation matrix according to the actual rotation axis direction vector of the first rotation axis and its target rotation angle; and calculating the second rotation matrix according to the actual rotation axis direction vector of the second rotation axis and its target rotation angle.
[0047] In the above implementation process, the traditional ideal model uses standard, coordinate axis-based unit vectors (such as...). The method of generating rotation matrices by means of actual axis deviations (such as non-orthogonality or tilt) that may exist in the actual physical space of the machine tool completely ignores these deviations. This application, however, constructs rotation matrices by introducing axis direction vectors obtained from actual measurements, which accurately reflects the actual orientation of the rotation axes in three-dimensional space. This allows the geometric errors of the rotation axes themselves to be directly and accurately embedded into the core calculation of motion transformation. In the presence of axis deviations, the rotation order of the two rotation axes will affect each other, generating coupling errors. Therefore, by constructing rotation matrices based on their respective actual axis vectors and combining them in an orderly manner according to the actual kinematic chain of the machine tool, the spatial transformation of the tool posture and tool tip position under a real, imperfect mechanical structure can be calculated. This allows for the reverse calculation of the corrected actual motion commands for each axis required to offset the transformation error, effectively solving the problem of complex spatial trajectory distortion caused by non-orthogonal or non-intersecting axes. Abstracting the error of each axis into an independent rotation matrix defined by the actual axis vector makes the model structure clear and the physical meaning of the parameters explicit. This not only facilitates the individual identification and updating of error parameters but also makes the core compensation algorithm independent of specific machine tool configurations, enhancing the method's versatility. Furthermore, matrix calculations based on direction vectors and rotation angles are mature and stable numerical operations, ensuring the computational efficiency and numerical robustness of online real-time compensation.
[0048] In one embodiment of this application, the first rotation matrix R in an ideal state B1 for:
[0049] The second rotation matrix R in the ideal state A1 for:
[0050] in, Let be the rotation angle of the first rotation axis. The rotation angle of the second rotation axis.
[0051] Optionally, the actual rotation axis direction vector of the first rotation axis is: The actual rotation axis direction vector of the second rotation axis is Based on the kinematic model, according to the target tool tip position and the target motion commands of each axis, the actual motion commands of each axis required to compensate for geometric errors are calculated. This also includes: calculating the first rotation matrix R based on geometric relationships. B for: ; Furthermore, based on geometric relationships, the second rotation matrix R can be calculated. A for: ; in, Let be the rotation angle of the first rotation axis; The rotation angle of the second rotation axis.
[0052] In the above implementation, the given matrix formula is a specific expansion of the Rodrigues rotation formula, fully defining a linear transformation of any angle of rotation around an arbitrary direction vector in space (not limited to standard coordinate axes). By directly substituting the measured axis direction vector into this general formula, a model completely consistent with the actual physical motion of any rotation axis that may have installation tilt or structural deformation can be generated, thus ensuring the mathematical rigor and physical reality of the attitude transformation calculation. The explicit formula transforms the abstract rotation based on direction vectors into deterministic calculation steps composed of basic trigonometric functions and vector component operations, which is conducive to stable and efficient code implementation and real-time calculation in industrial control computers or embedded systems. This meets the stringent requirements of CNC systems for high-frequency, deterministic solutions, making real-time compensation for complex geometric errors possible. Rotation matrix R A and R B These are the core operators constituting the overall kinematic transformation of the machine tool. Based on these matrices, it is possible to systematically analyze how the tool posture and tool tip position errors are coupled and amplified with the movement of the two rotary axes, and then solve for the compensation commands of each axis required to offset the composite error through inverse kinematics.
[0053] Optionally, based on the kinematic model, the actual motion commands of each axis required to compensate for geometric errors are calculated according to the target tool tip position and the target motion commands of each axis. The calculation also includes: calculating the spatial displacement compensation amount of the tool tip caused by the rotation axis motion based on the first rotation matrix, the second rotation matrix, and the offset vector.
[0054] In the above implementation process, the matrices (R) representing the attitude error of the rotation axis will be respectively... A , R B ) and the vector representing the position error ( , By combining calculations according to the actual kinematic chain of the machine tool, the deviation between the actual and ideal positions of the tool tip (i.e., displacement compensation) caused by the combined effect of all geometric deviations can be calculated completely and without omission. This achieves a precise, closed-loop transformation from geometric error parameters to direct control quantities. By decomposing complex spatial motion into a standardized combination of rotation and translation (achieved through matrix multiplication and vector addition) and strictly following the motion sequence, the calculation of the tool tip position remains clear, orderly, and programmable even in the presence of multiple non-ideal geometric parameters. This greatly reduces the development difficulty and error risk of inverse kinematics compensation algorithms for complex multi-axis machine tools. The calculated spatial displacement compensation is the direct basis for the final motion correction of each linear axis (X, Y, Z). Matrix and vector-based operations are characterized by numerical stability and high efficiency, making them suitable for rapid completion within a control cycle. This allows for real-time response to the constantly changing rotation axis angles (A, B) during machining, dynamically generating and superimposing compensation commands to ensure that the tool tip position is always locked on the target trajectory set in the program throughout the entire process of continuous tool posture changes. This effectively solves the problem of tool tip drift caused by rotation axis movement during machining and improves dynamic machining accuracy.
[0055] In one embodiment of this application, please refer to Figure 3 , Figure 3 This is a first schematic diagram of the motion control error compensation method provided in the embodiments of this application.
[0056] The vector from the first rotation axis center (B-axis rotation axis center) to the second rotation axis center (A-axis rotation axis center) is This vector represents the static spatial offset between the rotation centers of the two rotation axes. The vector from the rotation center of the second rotation axis to the tool tip point O is... This vector represents the vector relationship from the center of the second rotation axis to the tip of the tool.
[0057] When the machine tool is not performing rotational motion, the vector from the rotation center of the first rotary axis to the tool tip point O. The sum of the two vectors above is given directly:
[0058] This formula establishes the initial spatial position reference of the tool tip relative to the center of rotation of the first rotation axis.
[0059] When the first and second rotating axes move as instructed, the system first calculates the effect of the rotation of the driven axis (second rotating axis). After the second rotating axis rotates by an angle A around its actual axis, the vector... Then rotate to obtain the transformed vector. :
[0060] in, This is a rotation matrix calculated based on the direction vector of the actual rotation axis of the second rotation axis. At this point, the new vector from the rotation center of the first rotation axis to the tool tip... Updated to:
[0061] This step reflects the first change in the position of the tool tip relative to the center of the first rotation axis due to the rotation of the driven shaft.
[0062] Subsequently, the system calculates the effect of the rotation of the drive shaft (first rotation axis). After the first rotation axis rotates by an angle B around its actual axis, the vector obtained in the previous step is... Perform rotation to obtain the final transformed vector. :
[0063] in, It is a rotation matrix calculated based on the actual rotation axis direction vector of the first rotation axis.
[0064] After the combined rotation along two axes (AB axes), the total displacement of the tool tip in the machine coordinate system This can be obtained by comparing the vector difference between the center of the first rotation axis and the tool tip before and after rotation:
[0065] This displacement vector precisely quantifies the change in the spatial position of the tool tip caused by the dual-axis rotational motion.
[0066] In summary, the complete kinematic relationship of the double pendulum axis space can be uniformly expressed as follows: This relationship constitutes the core mathematical model for real-time error compensation in motion control systems. It systematically encapsulates the geometric error of the rotating axis (through...). , The actual axis direction vector in the diagram) and the deviation of structural parameters (through...) , This model reflects the comprehensive influence of the displacement (disp) on the tool tip position. Based on this model, the control system can reversely solve for the linear axis compensation motion commands required to counteract the displacement (disp) and maintain the programmed tool tip position, thereby achieving high-precision machining.
[0067] Optionally, combined Figure 3 The motion axes of the machine tool also include at least one linear axis; the error parameters also include a perpendicularity parameter used to describe the perpendicularity error between the linear axes.
[0068] In the above implementation process, in the Cartesian coordinate system, the non-ideal perpendicularity error between linear axes such as X, Y, and Z directly causes the machine tool's actual Cartesian coordinate system to become an oblique coordinate system with shear deformation. Introducing and compensating for these perpendicularity parameters is equivalent to mapping the ideal orthogonal coordinate system on which the instructions are based to the non-orthogonal motion space of the machine tool's physical existence at the software level, thereby correcting the systematic positioning error caused by the deformation of the basic frame from the root. The attitude and center deviation compensation of the rotary axis mainly affects the spatial position relationship of the tool tip, while the perpendicularity error of the linear axis directly affects the positioning accuracy of the linear motion platform that carries these rotary axes. Integrating the two types of parameters into the same kinematic model allows the system to comprehensively calculate a total spatial error vector that includes both rotational deviation and platform positioning deviation, thereby generating a coordinated composite compensation instruction and avoiding conflicts or omissions that may occur with segmented compensation. Perpendicularity error is a typical form of error that gradually occurs or amplifies due to stress, wear, or temperature changes during long-term use of the machine tool. By including such parameters in the model, the system can not only perform high-precision calibration and compensation during initial assembly, but also has the ability to dynamically correct the accuracy degradation caused by slow changes in mechanical structure by periodically detecting and updating these parameters throughout the machine tool's life cycle. This achieves the sustainable maintenance of machine tool accuracy and extends its high-precision machining life cycle.
[0069] Optionally, please refer to Figure 4 , Figure 4 The third flowchart of the motion control error compensation method provided in the embodiments of this application is shown.
[0070] Based on the kinematic model, according to the target tool tip position and the target motion command of each axis, the actual motion command of each axis required to compensate for geometric errors is calculated. It also includes: according to the perpendicularity parameter, the component of the tool tip spatial displacement compensation in the linear axis direction is corrected to obtain the actual motion command of each linear axis.
[0071] In the above implementation process, the calculated spatial displacement compensation amount of the tool tip is based on an ideal coordinate system that considers the rotation axis error but still assumes the orthogonality of the linear axes. However, there is a perpendicularity deviation between the linear axes of the actual machine tool, which causes their physical motion directions to be not strictly orthogonal. By introducing a perpendicularity parameter to correct this compensation amount, it is essentially performing a precise transformation from the ideal command coordinate system to the actual motion coordinate system of the machine tool, thereby generating actual motion commands that can be correctly responded to and executed by the machine tool's mechanical structure, solving the problem of new errors generated by the compensation command itself due to coordinate system mismatch. The attitude compensation and center offset compensation for the rotating mechanism and the linear axis geometric compensation for the basic frame are finally integrated and unified at the command level, so that all the adjustment amounts required to keep the tool tip position constant are completely and coordinately allocated and encoded into the final position command of each linear axis (X, Y, Z), forming a complete compensation closed loop from the source of error to the final control action, thereby achieving the optimal accuracy of the theoretical design in the actual motion of the machine tool. By automating this correction, the system is transparent to users and programmers. Users only need to input a machining program based on an ideal machine tool model, and the system can automatically output the optimal motion commands adapted to the unique geometry of the machine tool.
[0072] Optionally, the component of the tool tip spatial displacement compensation in the linear axis direction is corrected according to the perpendicularity parameter, including: calculating the displacement deviation in the linear axis direction, and calculating the compensation displacement perpendicular to the linear axis based on the displacement deviation in the linear axis direction.
[0073] In the above implementation process, the essence of perpendicularity error is that when a linear axis (such as the X-axis) moves, it will generate a parasitic displacement in the direction of another axis (such as the Y-axis) that is nominally perpendicular to it because its direction of movement makes an angle with the ideal coordinate axis. By calculating this displacement deviation and then solving for the vertical compensation displacement required to offset the deviation, the cross-coupling error caused by the non-perpendicularity between axes can be clearly separated and quantitatively corrected, ensuring the independence and accuracy of the motion commands of each axis. After completing the spatial displacement compensation calculation based on the rotation matrix and offset vector, this step is introduced to correct the direction of the linear axis, which is equivalent to adding a correction link for the nonlinear deformation of the basic coordinate system at the end of the kinematic chain. When machining large workpieces or executing complex spatial paths, the stroke of the linear axis is long, and the impact of perpendicularity error is more obvious. By calculating and compensating for the displacement deviation in the direction of movement of each axis in real time, the contour distortion or dimensional error caused by the shear deformation of the coordinate system can be effectively eliminated, ensuring that the actual machined three-dimensional curved surface or bevel shape is highly consistent with the digital model, thereby effectively guaranteeing the final machining quality in engineering practice.
[0074] In one embodiment of this application, please refer to Figure 5 , Figure 5 This is a second schematic diagram of the motion control error compensation method provided in the embodiments of this application.
[0075] When a machine tool has linear axis geometric errors, in order to ensure the accurate position of the tool tip, it is necessary to perform special compensation calculations for parasitic displacements caused by the non-orthogonality of the axis system. The first case is the compensation calculation for Z-axis tilt error: The actual Z-axis unit direction vector of the machine tool is set as follows:
[0076] This vector, obtained by measurement, represents the actual orientation of the Z-axis in space. Since the Z-axis is not perpendicular to the ideal XY plane, its commanded displacement in the Z-direction will couple to produce unexpected X and Y-direction displacements.
[0077] Z-axis actual motion calculation: To ensure the tool tip moves the target distance in the ideal Z-direction. The actual distance the Z-axis servo unit should move needs to be calculated based on the actual Z-axis direction vector. :
[0078] This step maps the ideal Z-direction displacement to the actual Z-axis motion direction.
[0079] When the Z-axis performs the above-mentioned actual motion Subsequently, due to its own tilt, it will experience parasitic displacement in the X and Y directions:
[0080]
[0081] To counteract the parasitic effects of Z-axis motion and achieve the target overall displacement of the tool tip. The commands for the X and Y axes need to be pre-corrected to obtain the first-stage compensated commands. :
[0082]
[0083]
[0084] Optionally, the geometric error parameters also include the perpendicularity error angle between two axes in the linear axis; based on the kinematic model, according to the target tool tip position and the target motion command of each axis, the actual motion command of each axis required to compensate for the geometric error is calculated, and it also includes: decoupling the linear axis motion compensation amount after direction vector mapping correction based on the perpendicularity error angle.
[0085] In the above implementation process, the perpendicularity error angle quantitatively describes the degree to which the motion directions of two linear axes deviate from the ideal orthogonal state. Decoupling calculations based on this parameter can separate the parasitic displacement (coupling error) generated in the perpendicular direction of one axis's motion and convert it into an independent compensation command for the other axis. This ensures that the final motion commands of each linear axis are pure and free from mutual interference, allowing the actual motion of the machine tool to faithfully reproduce the ideal toolpath calculated by the model, which already includes rotational error compensation. The impact of perpendicularity error is linearly amplified with the axis's travel. This effect is particularly prominent when machining large workpieces or executing complex three-dimensional trajectories. Through real-time decoupling calculations, the system can dynamically eliminate geometric distortions caused by non-perpendicularity between axes, ensuring that the actual trajectory of the tool remains highly consistent with the program-set trajectory during long-distance movement and complex linkage processes, thus effectively guaranteeing the overall dimensional and shape accuracy of the workpiece. Defining perpendicularity compensation as a decoupling operation based on the error angle makes this part of the compensation logic independent and modular, facilitating implementation, debugging, and verification in the control algorithm.
[0086] In one embodiment of this application, the second case is the compensation calculation for the perpendicularity error of the XY axis. Taking the X-axis as the motion reference, it is assumed that the Y-axis has an angular deviation relative to the ideal direction perpendicular to the X-axis. (i.e., the angle between the X and Y axes is) Under this error, movement along the Y-axis will trigger coupled movement in the X-direction. That is, when the X and Y axes of the machine tool are not perpendicular, taking the X-axis as the reference, let θ be the part where the angle between the X and Y axes exceeds 90 degrees. Because the X-axis is the reference, movement of the X-axis will not affect the Y-axis, but movement of the Y-axis will bring about movement in the X-axis direction, and the Y-axis needs to move more.
[0087] To make the tool tip move a distance compensated by the Z-axis in the direction perpendicular to the X-axis. The actual distance that the Y-axis needs to move for:
[0088] This calculation compensates for the effective displacement loss caused by the deviation in the Y-axis direction.
[0089] When the Y-axis performs actual motion Afterwards, a parasitic displacement will occur in the X-axis direction. At this time, the movement in the X-axis direction caused by the Y-axis is:
[0090] Considering all the effects of Z-axis tilt and XY non-perpendicularity, the actual motion commands sent to each linear axis servo system to ensure the precise tool tip position are ultimately determined by the following XY compensation for a stationary tool tip:
[0091]
[0092]
[0093] Through the aforementioned systematic, geometry-based decoupling calculations, this method can progressively eliminate spatial motion coupling errors caused by the non-orthogonality of linear axis systems. Compared to the traditional ideal RTCP model, this compensation strategy significantly enhances its adaptability to actual machine tool geometric defects. It enables the control system to generate precise compensation commands in real-time using intelligent algorithms, even in high-precision machining scenarios where the machine tool's mechanical accuracy is limited. This ensures that the tool tip trajectory strictly follows the programmed path, thereby greatly improving the overall machining accuracy of complex surfaces, bevels, and other workpieces.
[0094] Secondly, this application also provides a motion control system, please refer to... Figure 6 , Figure 6 A schematic diagram of a motion control system provided in an embodiment of this application.
[0095] The motion control system includes: a storage module 001, a compensation calculation module 002, and a control output module 003; the storage module 001 is used to store the geometric error model and its parameters established according to the above method; the compensation calculation module 002 is used to execute the above method, and based on the kinematic model, calculate the actual motion commands of each axis required to compensate for the geometric error according to the target tool tip position and the target motion commands of each axis; wherein, the actual motion commands are used to control the motion of the machine tool's motion axes.
[0096] In the above implementation process, by clearly separating and professionally dividing the persistent management of error parameters (storage module 001), the real-time calculation of the core compensation algorithm (compensation calculation module 002), and the secure and reliable issuance of instructions (control output module 003), the entire compensation system has a clear structure and well-defined responsibilities. This facilitates the integration of the system as a standardized functional unit into different models of CNC devices, enhancing the universality and portability of the technology. Secondly, the system provides a dedicated calculation and processing channel for high-precision real-time compensation, ensuring performance and reliability. The compensation calculation module 002, as the core of the system, focuses on executing compensation algorithms involving complex matrix operations and spatial geometric calculations. The storage module 001 centrally manages the machine tool's error parameters, providing an accurate data foundation for compensation calculations; the compensation calculation module 002 uses these parameters to correct motion commands in real time; and the control output module 003 drives the machine tool to execute these commands. This closed loop allows machine tool accuracy to no longer depend entirely on the initial mechanical assembly, but can adapt to changes in machine tool status by updating the parameters in storage module 001. This lays a solid system foundation for advanced intelligent functions such as predictive maintenance and self-compensation for accuracy degradation, ultimately significantly improving the long-term machining accuracy, reliability, and intelligence level of the machine tool.
[0097] Thirdly, this application also provides a machine tool, which includes: a tilting head or tilting table mechanism consisting of at least two rotating axes, and the above-mentioned motion control system, for controlling the machine tool body to perform high-precision beveling.
[0098] In the aforementioned implementation process, the motion control system described in this application is integrated into machine tools with multi-axis linkage capabilities, especially CNC machine tools used for complex beveling, offering significant technical advantages and practical benefits. The motion control system can dynamically and accurately compensate for inherent geometric errors of the machine tool (such as perpendicularity between axes and rotation axis positioning deviations), thus effectively ensuring the stability and accuracy of the tool tip position even during complex spatial movements involving tilting heads or tilting tables, directly improving the shape accuracy and dimensional consistency of beveling. Furthermore, the machine tool does not rely on extremely costly zero-error manufacturing and assembly of mechanical structures; through software and algorithm compensation, it achieves high-precision machining capabilities in a more cost-effective manner, lowering the manufacturing and maintenance threshold for high-end machine tools. In addition, the systematic real-time compensation mechanism enhances the reliability and stability of the machine tool machining process, reduces reliance on operator experience for debugging, and helps reduce workpiece rework or scrap rates due to insufficient precision, thereby improving overall machining efficiency and economic benefits.
[0099] Optionally, please refer to Figure 7 , Figure 7This is a block flowchart illustrating an electronic device according to an embodiment of this application. The electronic device 100 may include a memory 111, a memory controller 112, a processor 113, a peripheral interface 114, an input / output unit 115, and a display unit 116. Those skilled in the art will understand that... Figure 7 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device 100. For example, the electronic device 100 may also include components that are more... Figure 7 The more or fewer components shown, or having the same Figure 7 The different configurations shown.
[0100] The aforementioned memory 111, memory controller 112, processor 113, peripheral interface 114, input / output unit 115, and display unit 116 are electrically connected directly or indirectly to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The aforementioned processor 113 is used to execute executable modules stored in the memory.
[0101] The memory 111 can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory 111 stores programs, and the processor 113 executes these programs upon receiving execution instructions. The methods executed by the electronic device 100 as defined in any embodiment of this application can be applied to the processor 113, or implemented by the processor 113.
[0102] The aforementioned processor 113 may be an integrated circuit chip with signal processing capabilities. The processor 113 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a digital signal processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor.
[0103] The peripheral interface 114 described above couples various input / output devices to the processor 113 and the memory 111. In some embodiments, the peripheral interface 114, the processor 113, and the memory controller 112 can be implemented on a single chip. In other instances, they can be implemented on separate chips.
[0104] The input / output unit 115 described above is used to provide user input data. The input / output unit 115 may be, but is not limited to, a mouse and keyboard, etc.
[0105] The aforementioned display unit 116 provides an interactive interface (e.g., a user interface) between the electronic device 100 and the user, or displays image data for the user's reference. In this embodiment, the display unit can be a liquid crystal display (LCD) or a touch display. If it is a touch display, it can be a capacitive touchscreen or a resistive touchscreen that supports single-point and multi-point touch operations. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations generated simultaneously from one or more locations on the touch display and pass the sensed touch operations to the processor for calculation and processing.
[0106] This application also provides a computer-readable storage medium storing computer program instructions, which are read and executed by a processor to perform steps in a motion control error compensation method.
[0107] In summary, this application provides a motion control system and error compensation method, a machine tool, and an electronic device, relating to the field of motion control compensation technology. A kinematic model of the machine tool is established; wherein the kinematic model includes error parameters describing the geometric errors of the machine tool; based on the kinematic model, according to the target tool tip position and the target motion commands of each axis, the actual motion commands of each axis required to compensate for the geometric errors are calculated; wherein the actual motion commands are used to control the movement of the machine tool's motion axes. To address the current problem of insufficient beveling accuracy, error parameters describing the machine tool's geometric errors and the positional deviation of the oscillating axis's rotation axis are introduced. By establishing a motion coordinate system that conforms to the actual machine tool structure, and based on the measured geometric error parameters, the compensation amount is calculated in real time, thereby dynamically correcting the motion commands of each axis during the machining process, ensuring that the tool tip position remains accurate, and ultimately effectively improving the accuracy of beveling.
[0108] In the several embodiments provided in this application, it should be understood that the disclosed device can also be implemented in other ways. The device embodiments described above are merely illustrative; for example, the block diagrams in the accompanying drawings illustrate the possible architecture, functions, and operations of the device according to various embodiments of this application. In this regard, each block in the block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram, and combinations of block diagrams, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0109] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0110] If the aforementioned functions are implemented as software functional modules 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 application, in essence, or the part that contributes to the prior art, or a portion 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 application. 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.
[0111] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0112] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
[0113] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A motion control error compensation method characterized by, The method includes: Establish a kinematic model of the machine tool; wherein, the kinematic model includes error parameters for describing the geometric errors of the machine tool; Based on the kinematic model, the actual motion commands of each axis required to compensate for the geometric error are calculated according to the target tool tip position and the target motion commands of each axis. The actual motion command is used to control the movement of the machine tool's motion axes.
2. The method according to claim 1, characterized in that, in, The motion axes of the machine tool include at least a first rotary axis and a second rotary axis; The error parameters include the actual rotation axis direction vector of at least one of the first and second rotation axes and / or the offset vector between the rotation centers of the two rotation axes.
3. The method according to claim 2, characterized in that, The step of calculating the actual motion commands for each axis required to compensate for the geometric error based on the kinematic model, according to the target tool tip position and the target motion commands for each axis, further includes: When the first rotating axis and / or the second rotating axis generate motion, calculate the vector from the rotation center of the second rotating axis to the target cutting tip, and obtain the vector from the rotation center of the first rotating axis to the target cutting tip; Wherein, the vector from the rotation center of the first rotation axis to the rotation center of the second rotation axis is The vector from the rotation center of the second rotation axis to the target tool tip point O is: .
4. The method according to claim 2, characterized in that, Based on the kinematic model, and according to the target tool tip position and the target motion commands for each axis, the actual motion commands for each axis required to compensate for the geometric error are calculated, including: Calculate the first rotation matrix based on the actual rotation axis direction vector of the first rotation axis and its target rotation angle; The second rotation matrix is calculated based on the actual rotation axis direction vector of the second rotation axis and its target rotation angle.
5. The method according to claim 4, characterized in that, in, The actual rotation axis direction vector of the first rotation axis is The actual rotation axis direction vector of the second rotation axis is ; The step of calculating the actual motion commands for each axis required to compensate for the geometric error based on the kinematic model, according to the target tool tip position and the target motion commands for each axis, further includes: According to geometric relations, the calculation can obtain the first rotation matrix R B is: ; and according to geometric relations, the calculation can obtain the second rotation matrix R A is: ; in, Let be the rotation angle of the first rotation axis; The rotation angle of the second rotation axis.
6. The method according to claim 4, characterized in that, The step of calculating the actual motion commands for each axis required to compensate for the geometric error based on the kinematic model, according to the target tool tip position and the target motion commands for each axis, further includes: Based on the first rotation matrix, the second rotation matrix, and the offset vector, the spatial displacement compensation amount generated by the movement of the rotation axis at the tool tip is calculated.
7. The method according to claim 6, characterized in that, in, The motion axes of the machine tool also include at least one linear axis; the error parameters also include a perpendicularity parameter used to describe the perpendicularity error between the linear axes.
8. The method according to claim 7, characterized in that, The step of calculating the actual motion commands for each axis required to compensate for the geometric error based on the kinematic model, according to the target tool tip position and the target motion commands for each axis, further includes: Based on the perpendicularity parameter, the component of the tool tip spatial displacement compensation in the direction of the linear axis is corrected to obtain the actual motion command of each linear axis.
9. The method according to claim 8, characterized in that, The step of correcting the component of the tool tip spatial displacement compensation amount in the linear axis direction according to the perpendicularity parameter includes: Calculate the displacement deviation along the linear axis, and based on the displacement deviation along the linear axis, calculate the compensation displacement perpendicular to the linear axis.
10. The method according to claim 9, characterized in that, in, The geometric error parameters also include the perpendicularity error angle between the two axes in the linear axis; The step of calculating the actual motion commands for each axis required to compensate for the geometric error based on the kinematic model, according to the target tool tip position and the target motion commands for each axis, further includes: Based on the verticality error angle, the linear axis motion compensation amount after direction vector mapping correction is decoupled and calculated.
11. A motion control system, characterized in that, The system includes: a storage module, a compensation calculation module, and a control output module; The storage module is used to store the geometric error model and its parameters established by the method according to any one of claims 1 to 10; The compensation calculation module is used to execute the method as described in any one of claims 1 to 10, and based on the kinematic model, calculate the actual motion commands of each axis required to compensate for the geometric error according to the target tool tip position and the target motion commands of each axis; The actual motion command is used to control the movement of the machine tool's motion axes.
12. A machine tool, characterized in that, The machine tool includes: a tilting head or tilting table mechanism consisting of at least two rotating axes, and a motion control system according to claim 8, for controlling the machine tool body to perform high-precision beveling.
13. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores program instructions, and when the processor executes the program instructions, it performs the steps of the method according to any one of claims 1-10.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, perform the steps of the method according to any one of claims 1-10.