Ethercat-based virtual servo full-closed loop control system and method

The EtherCAT virtual servo full closed-loop control system realizes high-performance full closed-loop control of heterogeneous servo drives, solving the problems of limited control loop position, poor synchronization performance and high upgrade cost in the existing technology, and providing an efficient and economical integration solution.

CN120821232BActive Publication Date: 2026-02-03KEDE NUMERICAL CONTROL CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511328239.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-17
Publication Date
2026-02-03
Estimated Expiration
2045-09-17

AI Technical Summary

Technical Problem

Existing protocol conversion gateways cannot achieve high-precision full closed-loop control, resulting in limited control loop position, poor synchronization performance, poor interface compatibility, and high upgrade costs, failing to meet the requirements of high-speed and high-precision machining.

Method used

Design an EtherCAT-based virtual servo fully closed-loop control system, including an EtherCAT master module, a virtual servo fully closed-loop control module, a servo driver, and a displacement feedback device. The virtual servo fully closed-loop control module parses control commands and feedback signals to achieve fully closed-loop control, and integrates rich fully closed-loop grating encoder interfaces and flexible software parsing capabilities.

Benefits of technology

It achieves high-performance full closed-loop position control, solves the problems of protocol fragmentation, incomplete functions and high upgrade costs, and provides an efficient and economical solution for the integration of heterogeneous devices. It is suitable for seamless integration of upper-level standard EtherCAT CNC systems with various heterogeneous servo drives at the bottom level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120821232B_ABST
    Figure CN120821232B_ABST
Patent Text Reader

Abstract

The application discloses a virtual servo full-closed loop control system and method based on EtherCAT, wherein an EtherCAT master module sends a control instruction to a virtual servo full-closed loop control module based on a standard EtherCAT protocol; a virtual servo driver can realize local execution of full-closed loop control, and a corresponding control process comprises the following steps: obtaining the control instruction and analyzing the instruction position; decoding an actual position from a motion signal transmitted by a displacement feedback device, obtaining a compensation control amount according to the actual position and the instruction position, obtaining a correction instruction according to the instruction position and the compensation control amount, and transmitting the correction instruction to a servo driver supporting only semi-closed loop control; and the servo driver supporting only semi-closed loop control completes full-closed loop motion control on a servo driving work module according to the correction instruction. The application fundamentally solves the problems of protocol fragmentation, incomplete functions, insufficient control performance and high upgrade cost in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of industrial automation motion control, and in particular to a virtual servo full closed-loop control system and method based on EtherCAT. BACKGROUND

[0002] In modern numerical control machine tools, robots, precision electronic assembly lines and other high-end manufacturing equipment, the core of motion control is that the numerical control system (master station) commands multiple servo drives through real-time industrial Ethernet (such as EtherCAT), and then drives the motor to drive the mechanical parts to move accurately. In order to achieve extremely high positioning accuracy (for example, microns), the ideal state is to use full closed-loop control: that is, in addition to being able to read the encoder of the motor (half closed loop), it is more important to be able to receive the signals transmitted by the high-precision position feedback device installed on the final controlled mechanical part (such as the machine tool workbench), forming a full closed-loop control, so as to eliminate the errors caused by the mechanical transmission chain (such as the gap of the screw rod, thermal deformation).

[0003] However, in reality, factory production lines are not always newly constructed, but are gradually upgraded and modified. This leads to a common problem: the upper layer wants to use advanced numerical control systems based on the standard EtherCAT protocol, but the lower layer is connected to various brands (such as Siemens, Mitsubishi, Yaskawa, Delta, etc.), different ages, and uses analog-digital interfaces. Servo drives. These drives themselves do not support EtherCAT, nor do they have the interface and ability to access external high-precision position feedback devices to achieve full closed-loop control.

[0004] In order to solve the problem of incompatible communication protocols, there is a common device on the market: a protocol conversion gateway. The basic function of such a gateway is to act as a "translator" between the upper EtherCAT master station and the lower layer drives of various protocols. Although the protocol conversion gateway solves the basic problem of communication protocol conversion, it has a fundamental and insurmountable defect in achieving high-performance, high-precision motion control, especially in meeting the full closed-loop requirement:

[0005] 1. Only protocol conversion, no enhancement of capabilities: the core function of the gateway is only protocol translation and data forwarding. It cannot change the functional limitations of the physical drive itself. If the physical drive is an old model, it does not have full closed-loop control function, or it does not have an interface to access external feedback devices such as grating rulers, then even if the gateway is connected to the EtherCAT network, the drive can still only do half closed-loop control, and cannot achieve high-precision full closed-loop control of the final mechanical position, which includes:

[0006] (1) Control loop position is limited, and performance is low: in order to realize full closed loop, the user is sometimes forced to write a position closed loop control algorithm in the gateway or upper master station, or in the additional PLC / motion controller. However, closing the position loop at the gateway or master station / PLC level, the control cycle (usually >=1ms) is much slower than the internal closed loop of the driver (usually <= a few hundred microseconds or even lower). This results in slow system dynamic response, low bandwidth, poor anti-disturbance ability, and difficulty in meeting high-speed high-precision processing requirements;

[0007] (2) Poor synchronization performance: when multiple axes are cooperatively moving, closing the loop at the upper level will introduce additional communication delay and calculation delay, which seriously damages the excellent distributed clock synchronization capability of EtherCAT itself, resulting in a decrease in synchronization accuracy between axes and generating contour error;

[0008] 2. Unable to provide a standard and consistent interface: even if the gateway completes protocol conversion, the upper master station still sees a variety of physical driver object models at the bottom. This forces master station developers to still adapt and specially process different drivers after the gateway, which violates the original intention of standardization, and system integration and maintenance are still complex;

[0009] 3. Poor encoder interface adaptability: old drivers or simple conversion gateways usually do not support high-precision grating encoder interfaces. There is a lack of flexible adaptive support capability for various new or high-precision absolute value encoder protocols, limiting the selection of high-precision feedback devices;

[0010] 4. High cost and waste of upgrading: if the existing physical driver itself has acceptable performance, it is forced to replace the entire set of new drivers that support EtherCAT and full closed loop because of the old protocol or the lack of full closed loop function, which is very expensive (the cost of a single driver may exceed ten thousand), and causes waste of the original hardware, which does not comply with the principles of green economy and gradual industrial upgrading. SUMMARY

[0011] The present application provides an EtherCAT-based virtual servo full closed loop control system and method to overcome the above technical problems.

[0012] In order to achieve the above purpose, the technical scheme of the present application is:

[0013] An EtherCAT-based virtual servo full closed loop control system, comprising: an EtherCAT master station module, a virtual servo full closed loop control module, a servo driver only supporting semi-closed loop control, a servo drive working module, and a displacement feedback device;

[0014] The EtherCAT master module interacts only with the virtual servo closed-loop control module based on the standard EtherCAT protocol, and sends control commands to the virtual servo closed-loop control module to control the motion mode of the servo drive module.

[0015] The displacement feedback device is used to collect the actual motion signals of the servo drive module and transmit them to the virtual servo closed-loop control module.

[0016] The virtual servo full closed-loop control module has a virtual servo driver that supports the standard Ethercat communication protocol and can implement local execution of full closed-loop control. The corresponding control process includes:

[0017] Obtain the control commands transmitted by the EtherCAT master module, and parse the command positions based on the control commands;

[0018] The actual position of the servo drive module is obtained by decoding the motion signal transmitted by the displacement feedback device. A compensation control quantity is obtained based on the actual position and the command position. A correction command is obtained based on the command position and the compensation control quantity. The correction command is then transmitted to the servo drive that only supports semi-closed-loop control.

[0019] The servo driver that only supports semi-closed-loop control interacts only with the virtual servo full-closed-loop control module and completes full-closed-loop motion control of the servo drive module according to the correction instructions.

[0020] Furthermore, the virtual servo closed-loop control module includes a communication module and a data analysis module;

[0021] The communication module is used to perform low-level protocol parsing on the control commands and transmit the control commands parsed by the low-level protocol to the data analysis module.

[0022] The underlying protocol parsing includes CRC check and distributed clock synchronization operations. The CRC check is used to verify the integrity of the control commands transmitted by the EtherCAT master module. The distributed clock synchronization is used to unify the time base to ensure that all modules execute actions synchronously within microsecond precision. The data analysis module is used to receive control commands and parse the command positions based on the control commands.

[0023] Furthermore, the virtual servo full closed-loop control module also includes a differential receiving module, a level conversion module, an absolute value isolation module, and a decoding module;

[0024] The differential receiving module is used to receive the actual motion signal of the servo drive module collected by the displacement feedback device, and after converting the actual motion signal into a single-ended signal, transmit it to the level conversion module.

[0025] The level conversion module is used to convert the voltage range of a single-ended signal into a voltage range that is compatible with the data analysis module, and transmit the converted level signal to the absolute isolation module.

[0026] The absolute value isolation module is used to isolate high-frequency noise in the input level signal before transmitting it to the decoding module;

[0027] The decoding module is used to decode the input level signal to obtain the actual position of the servo drive module, and then transmit it to the data analysis module.

[0028] Furthermore, the virtual servo full closed-loop control module also includes a full closed-loop control module;

[0029] The full closed-loop control module is used to execute the full closed-loop control algorithm within a set period, calculate the error between the actual position and the commanded position in real time to obtain the compensation control quantity, obtain the correction command based on the commanded position and the compensation control quantity, and transmit the correction command to the servo driver that only supports semi-closed-loop control.

[0030] Furthermore, the virtual servo full closed-loop control module includes a Zynq-7020 SOC chip.

[0031] Furthermore, the displacement feedback device is an optical grating ruler or a magnetic grating ruler.

[0032] Furthermore, the EtherCAT-based virtual servo closed-loop control system also includes a follow-up error monitoring module, which is used to calculate the follow-up error value in each control cycle in real time.

[0033] Error_follow=P_cmd-P_actual,

[0034] In the formula, Error_follow is the following error; P_cmd is the command position; and P_actual is the actual position.

[0035] The calculated following error value is compared in real time with the user-preset warning threshold and fault threshold;

[0036] If the following error exceeds the warning threshold, a warning flag will be sent to the main station;

[0037] If the following error exceeds the fault threshold, the internal fail-safe mechanism is triggered.

[0038] Furthermore, the virtual servo closed-loop control system based on EtherCAT also includes an FFT vibration spectrum analysis module. The FFT vibration spectrum analysis module is used to perform a fast Fourier transform on the actual position to obtain a spectrum diagram, and to locate the vibration source and provide vibration safety early warning based on the spectrum diagram.

[0039] A virtual servo full closed-loop control method based on system implementation, comprising:

[0040] S1. Through the EtherCAT master module, it sends control commands to the virtual servo closed-loop control module based on the standard EtherCAT protocol;

[0041] S2. The actual motion signal of the servo drive module is collected through the displacement feedback device and transmitted to the virtual servo closed-loop control module;

[0042] S3. Obtain the control command through the interaction between the virtual servo closed-loop control module and the EtherCAT master station module, and parse the obtained command position;

[0043] S4. Simultaneously, the actual position of the servo drive module is obtained by decoding through the virtual servo full closed-loop control module, and a compensation control quantity is obtained based on the actual position and the command position. A correction command is obtained based on the command position and the compensation control quantity, and the correction command is transmitted to the servo drive that only supports semi-closed-loop control.

[0044] S5. Full closed-loop motion control of the servo drive module is completed using the servo drive that only supports semi-closed-loop control and the correction command.

[0045] Beneficial Effects: This invention designs a virtual servo full-closed-loop control module, featuring a virtual servo driver that supports the standard EtherCAT communication protocol and can perform local full-closed-loop control. This includes interacting with the EtherCAT master module to obtain control commands, parsing these commands to obtain the command position, decoding the motion signal transmitted from the displacement feedback device to obtain the actual position, obtaining a compensation control quantity based on the actual and command positions, and generating a correction command based on the command position and compensation control quantity. This correction command is then transmitted to a servo driver that only supports semi-closed-loop control. The servo driver, supporting only semi-closed-loop control, can then complete full-closed-loop motion control of the servo drive module based on the correction command. This virtual servo full-closed-loop control module is not only a communication protocol converter but also a driver virtualization platform with an embedded high-speed real-time control engine. It achieves high-performance full-closed-loop position control, fundamentally solving the problems of protocol fragmentation, incomplete functionality, insufficient control performance, and high upgrade costs in existing technologies. This provides an efficient, economical, and high-performance solution for the integration of heterogeneous equipment and high-precision motion control in industrial settings. It is suitable for scenarios that require seamless, fully closed-loop, high-performance integration of the upper-level standard EtherCAT CNC system with various heterogeneous (different brands, protocols, and eras) or functionally limited (such as not supporting full closed-loop) physical servo drives at the lower level. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 This is a schematic diagram of the structure of a virtual servo fully closed-loop control system based on EtherCAT in this invention;

[0048] Figure 2 This is a flowchart of a virtual servo full closed-loop control method based on EtherCAT in this invention. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0050] This embodiment provides a virtual servo fully closed-loop control system based on EtherCAT, such as... Figure 1 and Figure 2 As shown, it includes: an EtherCAT master module, a virtual servo full closed-loop control module, a servo driver that only supports semi-closed-loop control, a servo drive working module, and a displacement feedback device.

[0051] The EtherCAT master module interacts only with the virtual servo closed-loop control module based on the standard EtherCAT protocol, and sends control commands to the virtual servo closed-loop control module to control the motion mode of the servo drive module.

[0052] The displacement feedback device is used to collect the actual motion signals of the servo drive module and transmit them to the virtual servo closed-loop control module.

[0053] The virtual servo full closed-loop control module has a virtual servo driver that supports the standard Ethercat communication protocol and can implement local execution of full closed-loop control. The corresponding control process includes:

[0054] Obtain the control commands transmitted by the EtherCAT master module, and parse the command positions based on the control commands;

[0055] The actual position of the servo drive module is obtained by decoding the motion signal transmitted by the displacement feedback device. A compensation control quantity is obtained based on the actual position and the command position. A correction command is obtained based on the command position and the compensation control quantity. The correction command is then transmitted to the servo drive that only supports semi-closed-loop control.

[0056] The servo driver that only supports semi-closed-loop control interacts only with the virtual servo full-closed-loop control module and completes full-closed-loop motion control of the servo drive module according to the correction instructions.

[0057] In a specific embodiment, the virtual servo closed-loop control module includes a communication module and a data analysis module;

[0058] The communication module is used to perform low-level protocol parsing on the control commands and transmit the control commands parsed by the low-level protocol to the data analysis module.

[0059] The underlying protocol parsing includes CRC check and distributed clock synchronization operations. The CRC check operation is used to verify the integrity of the control commands transmitted by the EtherCAT master module; the distributed clock synchronization operation is used to unify the time base to ensure that all modules execute actions synchronously within microsecond precision.

[0060] The data analysis module is used to receive control commands and parse the command positions based on the control commands.

[0061] In a specific embodiment, the virtual servo full closed-loop control module further includes a differential receiving module, a level conversion module, an absolute value isolation module, and a decoding module;

[0062] The differential receiving module is used to receive the actual motion signal of the servo drive module collected by the displacement feedback device, and after converting the actual motion signal into a single-ended signal, transmit it to the level conversion module.

[0063] The level conversion module is used to convert the voltage range of a single-ended signal into a voltage range that is compatible with the data analysis module, and transmit the converted level signal to the absolute isolation module.

[0064] The absolute value isolation module is used to isolate high-frequency noise in the input level signal before transmitting it to the decoding module;

[0065] The decoding module is used to decode the input level signal to obtain the actual position of the servo drive module, and then transmit it to the data analysis module.

[0066] In a specific embodiment, the virtual servo full closed-loop control module further includes a full closed-loop control module;

[0067] The full closed-loop control module is used to execute the full closed-loop control algorithm within a set period, calculate the error between the actual position and the commanded position in real time to obtain the compensation control quantity, obtain the correction command based on the commanded position and the compensation control quantity, and transmit the correction command to the servo driver that only supports semi-closed-loop control.

[0068] In a specific embodiment, the displacement feedback device is an optical grating ruler or a magnetic grating ruler.

[0069] Specifically, the virtual servo full closed-loop control module integrates rich full closed-loop grating encoder interface hardware and flexible software parsing capabilities. While retaining the underlying servo driver's own encoder semi-closed-loop control, it can adaptively connect to various types of full closed-loop grating encoder feedback devices, such as SSI, Biss C, and EnDat, thus solving the compatibility problem of high-precision full closed-loop feedback device access.

[0070] Example 1:

[0071] Taking a CNC milling machine in a precision mold processing workshop as an example, the original system used a Mitsubishi MR-JE servo drive (only supporting digital model input, semi-closed-loop control) to drive the ball screw. Due to mechanical backlash, the machining contour error was large, which could not meet the production requirements of high-precision molds. By deploying the virtual servo full closed-loop control module proposed in this invention (… Figure 2 By combining the core layer of the system with a high-precision grating ruler, full closed-loop control can be achieved while retaining the original driver and motor, thus completing the full closed-loop control transformation of the servo driver that only supports semi-closed-loop control.

[0072] Specifically, such as Figure 2 As shown, the signal flow process includes:

[0073] (1) Uplink command path (from the master station to the virtual servo closed-loop control module)

[0074] The CNC system (EtherCAT master station) acts as the control core, sending position control commands to the virtual servo full closed-loop control module at 2ms intervals. The control commands are transmitted to the LAN9252 communication chip in the virtual servo full closed-loop control module via an RJ45 network cable to achieve distributed clock synchronization. The synchronized commands are then transmitted to the Zynq-7020 SOC chip via the SPI bus. The virtual servo full closed-loop control module calls the pre-stored CiA402 protocol stack to parse the control commands, extract parameters such as target position and speed, and synchronously start the full closed-loop control algorithm (including PID regulation and feedforward compensation).

[0075] Specifically, the LAN9252 communication chip is the core controller of the EtherCAT slave station, responsible for parsing the underlying protocol (such as CRC check and distributed clock synchronization).

[0076] (2) Feedback signal path (from the workbench to the virtual servo closed-loop control module)

[0077] The actual position of the machine tool table is measured in real time by a linear encoder. The actual motion signal (EnDat differential signal with strong common-mode noise immunity) output by the linear encoder from the servo drive module first enters the adaptive interface circuit of the virtual servo full closed-loop control module.

[0078] Step 1: Convert the differential signal into a single-ended signal using a differential receiver module;

[0079] Specifically, the differential receiving module is based on the MC3486 chip;

[0080] Step 2: Convert the single-ended signal from 5V logic level to 3.3V logic level compatible with Zynq-7020 SOC using a level conversion module;

[0081] Specifically, the level conversion module is built based on the SN74LVTH245A level conversion chip;

[0082] Step 3: Isolate the high-frequency noise of the driver by using an absolute value isolation module to avoid interfering with the precise calculations of the virtual servo full closed-loop control module.

[0083] Specifically, the absolute value isolation module is built based on the ADuM3440 magnetic coupling isolation chip;

[0084] Step 4: The input level signal is decoded by the decoding module to obtain the actual position, and then transmitted to the virtual servo closed-loop control module.

[0085] Specifically, the virtual servo full closed-loop control module runs a full closed-loop control algorithm within an ultra-short period of ≤125μs based on the command position and the actual position. It calculates the error between the command position and the actual position in real time and generates a compensation control quantity. It then performs PID calculations based on the command position and the compensation control quantity to obtain a digital control quantity. The digital control quantity is then converted into a ±10V analog voltage signal by the AD5757 DAC chip. The analog signal is amplified and isolated by the OPA4197 operational amplifier to ensure signal purity (±0.1% accuracy). Then, a correction command is output to the Mitsubishi servo driver. The Mitsubishi servo driver operates in "speed loop mode". Its analog input interface (such as the VC-COM port of the Mitsubishi MR-JE) linearly maps the ±10V voltage to a speed command (e.g., +10V = rated forward speed) and drives the motor.

[0086] Specifically, error calculation includes: the virtual servo full closed-loop control module compares the actual position fed back by the grating ruler with the position of the EtherCAT command in real time to generate compensation control quantity; PID calculation includes: proportional operation (P) - real-time response to the current deviation, which directly affects the system response speed and steady-state error; integral operation (I) - eliminates historical accumulated deviation, and has absolute correction capability for long-term errors; derivative operation (D) - predicts the trend of deviation change and improves the dynamic stability of the system; feedforward compensation is performed by superimposing the pre-compensation amount of command acceleration / velocity to perform pre-compensation, improve the dynamic response speed, and generate digital control quantity through PID calculation.

[0087] In a specific embodiment, the virtual servo full closed-loop control module includes a Zynq-7020 SOC chip, and the specific selection criteria for the SOC chip are as follows:

[0088] The SOC chip integrates a dual-core ARM Cortex-A9@866MHz + Artix-7 FPGA, making it suitable for monolithic integration solutions and meeting hardware collaboration requirements;

[0089] FPGA: Handles EnDat / SSI protocol decoding for grating rulers (nanosecond-level delay) and 125μs timing interrupt;

[0090] ARM Cortex-A9: Capable of running CiA402 protocol stack, PID algorithm, and diagnostic logic;

[0091] The key advantage of SOC chips lies in:

[0092] (1) PS+PL architecture: ARM handles software tasks, and FPGA handles hardware interfaces and timing (such as grating ruler differential signal decoding).

[0093] (2) Low-latency interconnection: Data exchange within the chip is achieved via the AXI bus (microsecond level);

[0094] (3) Cost-effectiveness: $25 per chip (integrated FPGA+ARM), saving 50% of PCB area;

[0095] Other alternatives are shown in Table 1:

[0096] Table 1:

[0097]

[0098] Specifically, traditional gateways using pure MCU solutions cannot simultaneously meet the three major requirements of protocol parsing, high-speed closed-loop control, and adaptive grating ruler interface. The heterogeneous computing architecture of Zynq-7020 is the best choice for virtual servo full closed-loop control modules.

[0099] In this embodiment, a virtual servo full closed-loop control method based on a virtual servo full closed-loop control system is also provided, including:

[0100] S1. Through the EtherCAT master module, it sends control commands to the virtual servo closed-loop control module based on the standard EtherCAT protocol;

[0101] S2. The actual motion signal of the servo drive module is collected through the displacement feedback device and transmitted to the virtual servo closed-loop control module;

[0102] S3. Obtain the control command through the interaction between the virtual servo closed-loop control module and the EtherCAT master station module, and parse the obtained command position;

[0103] S4. Simultaneously, the actual position of the servo drive module is obtained by decoding through the virtual servo full closed-loop control module, and a compensation control quantity is obtained based on the actual position and the command position. A correction command is obtained based on the command position and the compensation control quantity, and the correction command is transmitted to the servo drive that only supports semi-closed-loop control.

[0104] S5. Full closed-loop motion control of the servo drive module is completed using the servo drive that only supports semi-closed-loop control and the correction command.

[0105] In this embodiment, the virtual servo closed-loop control system also has intelligent diagnostic functions, including a following error monitoring module and an FFT vibration spectrum analysis module, wherein:

[0106] The follow-up error monitoring module is used to monitor the follow-up error, which is the instantaneous difference between the command position and the actual position. It is a core indicator for measuring the dynamic response performance, rigidity, and whether there is mechanical overload or transmission failure of the servo system. Excessive follow-up error will directly lead to machining contour error.

[0107] This embodiment calculates the following error value in real time within each control cycle (≤125μs):

[0108] Error_follow=P_cmd-P_actual,

[0109] In the formula, Error_follow represents the following error; P_cmd represents the command position; and P_actual represents the actual position.

[0110] The calculated follow-up error value is compared in real time with the warning threshold and fault threshold preset by the user through EtherCAT SDO (Service Data Object);

[0111] If the following error exceeds the warning threshold, the virtual servo full closed-loop control system will send a warning flag to the master station through EtherCAT's EMCY (emergency) message or periodic process data (PDO) to remind the operator to pay attention to the performance degradation and ensure system safety.

[0112] If the following error exceeds the fatal fault threshold, the virtual servo closed-loop control system will immediately trigger the internal fault safety mechanism and notify the master station via EtherCAT EMCY message. At the same time, the virtual servo closed-loop control module will stop analog output, so that the virtual servo closed-loop control system can be safely shut down to prevent equipment damage.

[0113] This embodiment also sets up the real-time value of the tracking error as process data and periodically uploads it to the main station for subsequent analysis such as graphical display, data recording, or process optimization analysis.

[0114] Specifically, the FFT vibration spectrum analysis module is used to upgrade the virtual servo closed-loop control system from "blind execution" to "senseful and diagnosable intelligent execution," enabling users not only to know "the system has a problem," but also to accurately identify "where the problem lies" and "what kind of problem it is." This provides strong data support for predictive maintenance, remote diagnostics, and process parameter optimization (such as adjusting servo gain and avoiding resonant velocity zones). It solves the problem of traditional servo systems struggling to diagnose high-frequency vibration issues caused by mechanical resonance, wear of transmission components, or improper assembly, providing crucial data for predictive maintenance and high-precision process debugging, including:

[0115] (1) Data acquisition: The virtual servo closed-loop control module continuously acquires the actual position data fed back by the high-precision grating ruler and caches it in a fixed length of memory (for example, selecting 1024 points, covering a time window of about 128ms in a period of 125μs). This data truly reflects the actual motion trajectory of the end of the mechanical load and contains rich vibration information.

[0116] (2) FPGA accelerated computation: Since FFT has a large computational load, in order not to affect the real-time performance of the core control task, this invention utilizes the logic resources of the FPGA in the Zynq chip, and the cached position data is efficiently transmitted to the FPGA through the AXI bus. The FPGA hardware accelerates the actual position data fed back by the grating ruler to perform fast Fourier transform, and converts the position signal in the time domain into a spectrum in the frequency domain.

[0117] (3) Feature Extraction and Diagnosis: The ARM core in the virtual servo closed-loop control module analyzes the spectrum to extract the main characteristic vibration frequencies (e.g., identifying significant energy peaks at 500Hz and 1200Hz). These characteristic vibration frequencies are compared with the known natural frequencies of the mechanical system to accurately locate the vibration source (e.g., determining whether it is a damaged lead screw support bearing or resonance of the guide rail). At the same time, the amplitude (energy) value of the vibration can also be monitored. If it exceeds the safety threshold, the virtual servo closed-loop control system can also issue an early warning.

[0118] Specifically, the core innovation of this embodiment lies in achieving a significant leap in CNC machine tool performance with minimal hardware changes. It creatively constructs an intelligent middleware layer (virtual servo full-loop control module) between the CNC system (EtherCAT master station) and the original servo drive. The virtual servo full-loop control module is completely virtualized as a standard EtherCAT communication protocol servo drive supporting the CiA402 protocol for full-loop operation. The master station only needs to interact with this "virtual drive" in a standard manner, without needing to know or care about the specific brand, model, protocol, or capability limitations of the underlying physical servo drive, thus completely decoupling the master station from the physical servo drive. For the physical servo drive, the virtual servo full-loop control module takes over the core position full-loop control function, translating standard CiA402 commands into a protocol that the physical servo drive can understand. When the physical servo drive only supports semi-closed-loop control, it executes the full-loop control algorithm locally, thereby achieving seamless integration and high-performance control of various heterogeneous or functionally limited physical servo drives.

[0119] Specifically, the virtual servo full closed-loop control module receives commands from the master station at high speed (2ms cycle) via a standard EtherCAT network and uses a high-precision grating ruler to obtain the actual position of the worktable. Inside the virtual servo full closed-loop control module, it not only efficiently parses the CiA402 protocol and adaptively processes various grating ruler feedbacks, but also performs precise position loop calculations (including PID and feedforward) at ultra-high speed (≤125μs) to generate compensation quantities in real time. Finally, by sending the analog speed command output from the high-precision DAC to the physical driver (operating in speed loop mode), the physical driver only needs to operate in speed loop mode (this is the basic mode supported by almost all drivers), acting as an "actuator". Its breakthrough lies in the fact that by simply adding a grating ruler and the virtual servo full closed-loop control module, full closed-loop control can be achieved using the original drive system, completely eliminating mechanical transmission chain errors. At the same time, the module's built-in high-speed processing capability (≤125μs position loop) and intelligent diagnostic functions (following error monitoring, FFT vibration analysis) far exceed the performance of traditional semi-closed-loop or driver-built-in closed-loop systems, providing an economical and efficient upgrade solution for high-precision machining. In this way, even if the physical driver itself is old or does not support full closed-loop control, the entire system can achieve true high-performance full closed-loop control through the "empowerment" of this module.

[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A virtual servo fully closed-loop control system based on EtherCAT, characterized in that, include: EtherCAT master module, virtual servo full closed-loop control module, servo driver that only supports semi-closed-loop control, servo drive working module and displacement feedback device. The EtherCAT master module interacts only with the virtual servo closed-loop control module based on the standard EtherCAT protocol, and sends control commands to the virtual servo closed-loop control module to control the motion mode of the servo drive module. The displacement feedback device is used to collect the actual motion signals of the servo drive module and transmit them to the virtual servo closed-loop control module. The virtual servo full closed-loop control module has a virtual servo driver that supports the standard Ethercat communication protocol and can implement local execution of full closed-loop control. The corresponding control process includes: The control commands transmitted by the EtherCAT master module are obtained, and the pre-stored CiA402 protocol stack is called to parse the control commands to obtain the command location; The virtual servo closed-loop control module includes a communication module and a data analysis module; The communication module is used to perform low-level protocol parsing on the control commands and transmit the control commands parsed by the low-level protocol to the data analysis module. The underlying protocol parsing includes CRC check and distributed clock synchronization operations. The CRC check operation is used to verify the integrity of the control commands transmitted by the EtherCAT master module; the distributed clock synchronization operation is used to unify the time base to ensure that all modules execute actions synchronously within microsecond precision. The data analysis module is used to receive control commands and parse the command positions based on the control commands; The actual motion signal transmitted by the displacement feedback device is obtained through the set adaptive full closed-loop encoder interface, and the actual position of the servo drive working module is decoded. The compensation control quantity is obtained according to the actual position and the command position, and the correction command is obtained according to the command position and the compensation control quantity. The correction command is then transmitted to the servo drive that only supports semi-closed-loop control. The servo driver that only supports semi-closed-loop control interacts only with the virtual servo full-closed-loop control module and completes full-closed-loop motion control of the servo drive module according to the correction instructions. The virtual servo full closed-loop control module also includes a differential receiving module, a level conversion module, an absolute value isolation module, and a decoding module; The differential receiving module is used to receive the actual motion signal of the servo drive module collected by the displacement feedback device, and after converting the actual motion signal into a single-ended signal, transmit it to the level conversion module. The level conversion module is used to convert the voltage range of a single-ended signal into a voltage range that is compatible with the data analysis module, and transmit the converted level signal to the absolute isolation module. The absolute value isolation module is used to isolate high-frequency noise in the input level signal before transmitting it to the decoding module; The decoding module is used to decode the input level signal to obtain the actual position of the servo drive module and transmit it to the data analysis module. The virtual servo full closed-loop control module also includes a full closed-loop control module; The full closed-loop control module is used to execute the full closed-loop control algorithm within a set period, calculate the error between the actual position and the commanded position in real time to obtain the compensation control quantity, obtain the correction command based on the commanded position and the compensation control quantity, and transmit the correction command to the servo driver that only supports semi-closed-loop control.

2. The virtual servo fully closed-loop control system based on EtherCAT according to claim 1, characterized in that, The virtual servo closed-loop control module includes a Zynq-7020 SOC chip.

3. The virtual servo fully closed-loop control system based on EtherCAT according to claim 1, characterized in that, The displacement feedback device is an optical grating ruler or a magnetic grating ruler.

4. The virtual servo fully closed-loop control system based on EtherCAT according to claim 1, characterized in that, It also includes a follow-up error monitoring module, which is used to calculate the follow-up error value in each control cycle in real time. Error_follow = P_cmd- P_actual In the formula, Error_follow is the following error; P_cmd is the command position; and P_actual is the actual position. The calculated following error value is compared in real time with the user-preset warning threshold and fault threshold; If the following error exceeds the warning threshold, a warning flag will be sent to the main station; If the following error exceeds the fault threshold, the internal fail-safe mechanism is triggered.

5. The virtual servo fully closed-loop control system based on EtherCAT according to claim 1, characterized in that, It also includes an FFT vibration spectrum analysis module, which is used to perform a fast Fourier transform on the actual location to obtain a spectrum diagram, and to locate the vibration source and provide vibration safety warning based on the spectrum diagram.

6. A virtual servo full closed-loop control method based on the system implementation of claim 1, characterized in that, include: S1. Through the EtherCAT master module, it sends control commands to the virtual servo closed-loop control module based on the standard EtherCAT protocol; S2. The actual motion signal of the servo drive module is collected through the displacement feedback device and transmitted to the virtual servo closed-loop control module; S3. Obtain the control command through the interaction between the virtual servo closed-loop control module and the EtherCAT master station module, and parse the obtained command position; S4. Simultaneously, the actual position of the servo drive module is obtained by decoding through the virtual servo full closed-loop control module, and a compensation control quantity is obtained based on the actual position and the command position. A correction command is obtained based on the command position and the compensation control quantity, and the correction command is transmitted to the servo drive that only supports semi-closed-loop control. S5. Full closed-loop motion control of the servo drive module is completed using the servo drive that only supports semi-closed-loop control and the correction command.

Citation Information

Patent Citations

  • Linux-based Ethercat maser / slave station control system and method

    CN103425106A

  • Feedback servo control method, device and equipment and readable storage medium

    CN116578125A

  • Motor driver protection device

    CN119382028A