A Real-Time Precision Compensation Method Based on EtherCAT Bus
By using the real-time precision compensation method of EtherCAT bus, harmonic compensation and position loop PID algorithm are used to correct the turntable position trajectory, which solves the error problem of EtherCAT bus motion controller in high-precision turntable and improves the speed stability and positioning accuracy of turntable.
Patent Information
- Application Number
- CN202310083367.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-08
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-02-08
AI Technical Summary
In high-precision turntable applications, EtherCAT bus motion controllers suffer from encoder installation errors and mechanical shaft rotation errors, resulting in position information deviations. Existing compensation technologies cannot achieve real-time precision compensation.
A real-time precision compensation method based on the EtherCAT bus is adopted. A real-time compensation data table is generated through harmonic compensation. Combined with position loop and feedforward control algorithm, the position trajectory is corrected in real time to reduce the system tracking error.
It improves the speed stability and positioning accuracy of the turntable, meeting the needs of high-precision applications.
Smart Images

Figure CN116009483B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial control technology, and in particular to a real-time precision compensation method based on the EtherCAT bus. Background Technology
[0002] EtherCAT bus motion controllers are currently mostly PC-based control software, applied in a wide range of scenarios from printing equipment and wind turbines to laboratory benches, theaters, and sports fields. Especially in high-efficiency engineering fields, everything can be automated through EtherCAT bus motion controllers. The modular concept and flexible software architecture of Codesys software are integrated into the entire platform, featuring flexible and adaptable control structures, high synchronization, and high real-time performance.
[0003] Turntables are primarily used for the calibration and verification of inertial navigation systems and inertial components, as well as for simulating the attitude movements of aircraft and aero engines. They feature high dynamic tracking, high speed accuracy, stability, and high positioning accuracy. Currently, turntables commonly use direct drive for control. However, due to encoder installation errors and mechanical shaft rotation errors, discrepancies arise between the position information read from the encoder and the actual position information, leading to decreased speed accuracy, stability, and positioning accuracy. Current motion compensation in Codesys software includes two modules: one based on a stop-at-position compensation module, and the other based on a non-stop-at-position compensation module. Neither can perform real-time compensation during motion. Therefore, further consideration of real-time compensation technology is needed to ensure that the EtherCAT bus motion controller meets the application requirements of the turntable. Summary of the Invention
[0004] (1) Technical problems to be solved
[0005] This invention provides a real-time precision compensation method based on the EtherCAT bus, solving the technical problem that EtherCAT bus motion controllers are difficult to apply to turntables with high precision requirements.
[0006] (2) Technical solution
[0007] An embodiment of the present invention proposes a real-time precision compensation method based on EtherCAT bus, including the following steps: S1, system initialization; S2, setting the driver mode to synchronous speed mode; S3, acquiring host computer or HMI instruction information and motion mode; S4, generating motion trajectory using virtual axis for point-to-point positioning motion; S5, using harmonic compensation to compensate the position trajectory in real time through a real-time compensation data table.
[0008] Furthermore, the steps for calculating the real-time compensation data table are as follows: clear the harmonic coefficients in the control system to zero; perform point-to-point position movement and measure the actual angle error at equal intervals; calculate the harmonic coefficients; and generate the real-time compensation data table.
[0009] Furthermore, the calculation of harmonic coefficients specifically involves using an 8th or 11th harmonic compensation algorithm to calculate the compensation coefficients and download them to the underlying control system.
[0010] Furthermore, generating the real-time compensation data table specifically involves calculating the real-time compensation data table to generate a data table with 360,000 compensation points and a compensation interval of 0.001°.
[0011] Furthermore, a real-time compensation data table is generated and saved using the power-off save data type.
[0012] Furthermore, S4 specifically involves setting the actual position of the virtual axis to the current position of the real axis associated with the driver, and sending instruction information to the virtual axis to generate a real-time position trajectory.
[0013] Furthermore, S4 also includes generating real-time position trajectories of sine waves, triangular waves, and square waves through a trajectory algorithm module.
[0014] Furthermore, in S5, after harmonic compensation, the desired trajectory is processed by the position loop PID and feedforward control algorithm to obtain the desired speed required by the servo. The control system activates the external setting function, and the servo speed is taken over by the external signal receiving module and sent directly to the driver corresponding to the real axis until the motion is completed. If the control system receives a stop command from the host computer or HMI, it needs to generate the corresponding stop trajectory until the motion completely stops. Finally, the external setting function is turned off.
[0015] (3) Beneficial effects
[0016] In summary, this invention employs harmonic compensation to compensate for the position trajectory in real time through a real-time compensation data table, and introduces a position loop and feedforward control algorithm into the controller system, which greatly reduces the system tracking error. The real-time precision compensation technology reduces the error caused by the code disk installation or mechanical shaft system, and the speed stability, speed accuracy and static positioning accuracy are greatly improved, enabling the EtherCAT bus motion control system to meet the usage requirements of special equipment such as turntables. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a control system structure diagram of a real-time precision compensation method based on the EtherCAT bus.
[0019] Figure 2 This is a schematic diagram of the control flow of a real-time precision compensation method based on the EtherCAT bus.
[0020] Figure 3 This is a flowchart illustrating the calculation of a real-time compensation data table for a real-time precision compensation method based on the EtherCAT bus. Detailed Implementation
[0021] The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and examples. The following detailed description of the embodiments and the accompanying drawings are used to illustrate the principles of the present invention by way of example, but should not be used to limit the scope of the present invention. That is, the present invention is not limited to the described embodiments, and any modifications, substitutions and improvements to the parts, components and connection methods are covered without departing from the spirit of the present invention.
[0022] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0023] Please refer to Figure 1 The embodiments of the invention propose a real-time precision compensation method based on the EtherCAT bus, wherein the turntable is the controlled object, and the control system structure diagram is as follows. Figure 1 As shown, in the Codesys software environment of the EtherCAT bus motion controller, the controller control cycle is set to 500µs, and the driver is set to synchronous speed mode. This allows for real-time adjustment of the servo speed. Furthermore, a position loop PID and feedforward control algorithm are added to the controller for closed-loop position control, which improves the dynamic tracking characteristics of the turntable system compared to directly using the driver for closed-loop position control. During system initialization, the slave information and I / O module information on the EtherCAT bus are scanned. With all nodes in OP mode and operating normally, the real-time compensation algorithm coefficients are cleared to zero, and point-to-point equidistant angular motion begins. The actual position error at each angle is measured by external instruments and used as input for the real-time compensation algorithm module to calculate the real-time compensation data table.
[0024] Please refer to Figure 2 The present invention proposes a real-time precision compensation method based on the EtherCAT bus, comprising the following steps:
[0025] S1, System initialization;
[0026] S2, set the drive mode to synchronous speed mode;
[0027] S3, obtains instructions and motion patterns from the host computer or HMI;
[0028] S4, point-to-point positioning motion uses the imaginary axis to generate the motion trajectory;
[0029] S5 uses harmonic compensation to compensate the position trajectory in real time through a real-time compensation data table.
[0030] This invention employs harmonic compensation to compensate for the position trajectory in real time through a real-time compensation data table, and introduces a position loop and feedforward control algorithm into the controller system, which greatly reduces the system tracking error. The real-time precision compensation technology reduces the error caused by code disk installation or mechanical shaft system, and the speed stability, speed accuracy and static positioning accuracy are greatly improved, enabling the EtherCAT bus motion control system to meet the usage requirements of special equipment such as turntables.
[0031] Please refer to Figure 3 In some embodiments, the step of calculating the real-time compensation data table is as follows:
[0032] Clear the harmonic coefficients of the control system to zero;
[0033] Point-to-point positional movement, measuring the actual angular error at equally spaced angles;
[0034] Calculate the harmonic coefficients, use the compensation algorithm to compensate for the 8th or 11th harmonics, apply formulas (1) to (3), calculate the compensation coefficients and download them to the underlying control system;
[0035] A real-time compensation data table is generated. Formula (4) is applied to calculate the real-time compensation data table, resulting in a data table with 360,000 compensation points and a compensation interval of 0.001°. The real-time compensation data table is saved using the power-off save data type.
[0036]
[0037]
[0038]
[0039]
[0040] In the formula, N represents the number of actual angular position errors; N1 represents the harmonic order; N2 represents the number of data in the generated harmonic compensation data table; a and b represent the harmonic coefficients; x represents the actual angular position error value; and y represents the compensation data in the generated harmonic compensation data table.
[0041] In some embodiments, S4 specifically involves setting the actual position of the virtual axis to the current position of the real axis associated with the driver, and sending instruction information to the virtual axis to generate a real-time position trajectory.
[0042] In some embodiments, S4 further includes generating real-time position trajectories of sine waves, triangular waves, and square waves through a trajectory algorithm module.
[0043] In some embodiments, in S5, after the desired trajectory is harmonic compensated, the control system then uses a position loop PID and feedforward control algorithm to obtain the desired speed required by the servo. The control system activates the external setting function, and the servo speed is taken over by the external signal receiving module and sent directly to the driver corresponding to the real axis until the motion is completed. If the control system receives a stop command from the host computer or HMI in the middle, it needs to generate a corresponding stop trajectory until the motion completely stops. Finally, the external setting function is turned off.
[0044] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. The present invention is not limited to the specific steps and structures described above and shown in the figures. Furthermore, for the sake of brevity, detailed descriptions of known methods and techniques are omitted here.
[0045] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art without departing from the scope of the invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.
Claims
1. A real-time precision compensation method based on EtherCAT bus, characterized in that, Including the following steps: S1, System initialization; S2, set the drive mode to synchronous speed mode; S3, obtains instructions and motion patterns from the host computer or HMI; S4, point-to-point positioning motion uses the imaginary axis to generate the motion trajectory; S5 uses harmonic compensation to compensate the position trajectory in real time through a real-time compensation data table; The steps for calculating the real-time compensation data table are as follows: Clear the harmonic coefficients of the control system to zero; Point-to-point positional movement, measuring the actual angular error at equally spaced angles; Calculate the harmonic coefficients; Generate a real-time compensation data table; The calculation of harmonic coefficients is specifically carried out by using the compensation algorithm to compensate for the 8th or 11th harmonics, applying formulas (1) to (3), calculating the compensation coefficients and downloading them to the underlying control system. The real-time compensation data table is generated by applying formula (4) to calculate the real-time compensation data table and generating a data table with 360,000 compensation points and a compensation interval of 0.001°. (1) (2) (3) (4) In the formula, N represents the number of actual angular position errors; N1 represents the harmonic order; N2 represents the number of data in the generated harmonic compensation data table; a and b represent the harmonic coefficients; x represents the actual angular position error value; and y represents the compensation data in the generated harmonic compensation data table.
2. The real-time precision compensation method based on EtherCAT bus according to claim 1, characterized in that, Generate a real-time compensation data table and save it using the power-off save data type.
3. The real-time precision compensation method based on EtherCAT bus according to claim 1, characterized in that, S4 specifically involves setting the actual position of the virtual axis to the current position of the real axis associated with the driver, and sending instruction information to the virtual axis to generate a real-time position trajectory.
4. The real-time precision compensation method based on EtherCAT bus according to claim 1, characterized in that, S4 also includes the generation of real-time position trajectories for sine waves, triangle waves, and square waves through a trajectory algorithm module.
5. The real-time precision compensation method based on EtherCAT bus according to claim 1, characterized in that, In S5, after the desired trajectory is compensated for harmonics, the control system then uses a position loop PID and feedforward control algorithm to obtain the desired speed required for servo control. When the control system activates the external setting function, the servo speed is taken over by the external signal receiving module and sent directly to the driver corresponding to the real axis until the motion is completed. If the control system receives a stop command from the host computer or HMI, it needs to generate the corresponding stop trajectory until the motion stops completely, and finally the external setting function is turned off.
Citation Information
Patent Citations
Real-time and online error testing and compensating method of rotary table angle measuring system
CN102749915A