A configuration method of a servo drive acting as an external encoder

By configuring the servo drive as an external encoder and implementing full closed-loop control, the accuracy and stability problems of traditional servo systems under complex working conditions are solved, achieving highly flexible and high-precision positioning control, which is suitable for machining, robotics and other applications.

CN120802606BActive Publication Date: 2025-11-21JIANGSU DAODA INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511318609.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2025-11-21
Estimated Expiration
2045-09-16

AI Technical Summary

Technical Problem

Traditional servo control systems are prone to insufficient accuracy and stability issues under complex working conditions. In particular, when the load changes or external interference occurs, the system parameters need to be manually adjusted, which increases the complexity of operation and time cost.

Method used

The first control unit is configured as an external encoder in absolute mode. The absolute position data is converted into incremental pulse signals through the first servo driver. Combined with the full closed-loop control mode, the electronic gear ratio and gain parameters are calculated and adjusted to achieve full closed-loop position correction and dynamic response optimization.

Benefits of technology

It improves the flexibility and positioning accuracy of the servo system, ensures that the position information of the load is not lost after an unexpected power outage, has fast dynamic response and stable operation, and is suitable for application scenarios with high continuity and safety requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120802606B_ABST
    Figure CN120802606B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of industrial control, in particular to a configuration method of a servo drive serving as an external encoder, which comprises the following steps: taking a first control unit as an external encoder and configuring the first control unit as an absolute value mode; taking a second control unit as a main drive unit and setting the second control unit as a full-closed loop control mode; converting absolute position data of a first motor into an incremental pulse signal; transmitting the pulse signal to a second servo driver as feedback data to perform full-closed loop position correction; recording pulse numbers of a second motor and feedback pulse numbers of the first control unit, calculating an electronic gear ratio, and writing the electronic gear ratio into the second servo driver; injecting an excitation signal into the second servo driver through an upper computer, recording response data of the second motor and a load end, calculating and adjusting gain parameters based on dynamic characteristics of a mechanical transmission chain of the load end, and writing the gain parameters into the second servo driver. The application realizes absolute value full-closed loop by servo serving as an encoder.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial control technology, specifically to a configuration method for a servo drive to act as an external encoder. Background Technology

[0002] With the rapid development of automation technology, servo control systems have been widely used in industrial applications, especially in the field of precision control. These systems achieve high-precision positioning and dynamic control of loads by precisely controlling the movement of motors. Servo systems are commonly used in machining, robotics, automated production lines, and other applications, providing precise position control, speed control, and acceleration control.

[0003] In traditional servo control systems, position feedback and closed-loop control techniques are typically used to adjust the motor's motion in real time. By comparing the motor's current position with the target position, the control system can adjust the motor drive signal based on the position error, ensuring the load moves precisely along a predetermined trajectory. Traditional control methods rely on preset gain values ​​and static parameters, which can easily lead to insufficient accuracy or stability issues under complex operating conditions. Furthermore, factors such as load fluctuations, changes in friction, and external interference can cause changes in the dynamic response of the servo system, affecting its stability and control accuracy. In traditional servo control systems, when the load changes significantly or the system encounters external interference, it is usually necessary to manually adjust system parameters to ensure accuracy and stability, which increases the complexity and time cost of manual operation.

[0004] Therefore, designing an adaptive servo control system that can automatically adjust gain and adapt to different loads and external disturbances has become a major challenge for current servo control technology.

[0005] To address this, a configuration method is proposed that allows a servo driver to act as an external encoder. Summary of the Invention

[0006] The purpose of this invention is to provide a configuration method for a servo drive to act as an external encoder, achieving a full closed-loop absolute value control. A first control unit is configured as an external encoder in absolute value mode, and a second control unit is configured as the main drive unit in full closed-loop control mode. The absolute position data of the first motor is converted into incremental pulse signals, which are then transmitted as feedback data to the second servo drive for full closed-loop position correction. The number of pulses from the second motor and the number of feedback pulses from the first control unit are recorded, the electronic gear ratio is calculated, and the electronic gear ratio is written to the second servo drive. An excitation signal is injected into the second servo drive via a host computer, and the response data between the second motor and the load is recorded. Based on the dynamic characteristics of the mechanical transmission chain at the load end, the gain parameters are calculated and adjusted, and the gain parameters are written to the second servo drive.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] A method for configuring a servo driver to act as an external encoder, comprising:

[0009] The first control unit is used as an external encoder and configured in absolute mode. The first control unit includes a first motor and a first servo driver. The second control unit is used as the main drive unit and configured in full closed-loop control mode. The second control unit includes a second motor and a second servo driver.

[0010] The absolute position data of the first motor is converted into an incremental pulse signal using the first servo driver, and the pulse signal is transmitted as feedback data to the second servo driver for full closed-loop position correction.

[0011] Record the number of pulses from the second motor and the number of feedback pulses from the first control unit, calculate and adjust the electronic gear ratio, and write the optimized electronic gear ratio into the second servo driver;

[0012] The host computer injects an excitation signal into the second servo driver to detect the dynamic response characteristics of the entire mechanical transmission chain. The response data of the second motor and the load end are recorded. The dynamic characteristics of the mechanical transmission chain are analyzed based on the oscillation decay speed and overshoot of the load end. Based on the dynamic characteristics, the gain parameters are calculated and adjusted, and the gain parameters are written into the second servo driver.

[0013] Preferably, the process of using the first control unit as an external encoder and configuring it in absolute mode includes:

[0014] The first motor is coupled to the load end, so that the first motor can move synchronously with the load end;

[0015] Parameters are set in the first servo driver to enable it to be set to absolute mode and to acquire the real-time absolute position data of the first motor.

[0016] Preferably, the process of using the second control unit as the main drive unit and setting it to a fully closed-loop control mode includes:

[0017] The second motor is used to perform the positioning task and drive the main load;

[0018] Parameters are set in the second servo drive to make the control mode of the second servo drive a fully closed loop, and to enable the second servo drive to receive pulse signals from the first control unit as external position feedback.

[0019] Preferably, the pulse signal is transmitted as feedback data to the second servo driver, and the process of performing full closed-loop position correction includes:

[0020] The pulse signal output port of the first servo driver is physically connected to the external encoder pulse signal input port of the second servo driver to establish a feedback data transmission path;

[0021] During the preset sampling period of the first servo driver, the current absolute position value of the built-in absolute encoder of the first motor is read cyclically, and the position change is obtained by differential operation with the absolute position value recorded in the previous sampling period. An incremental pulse signal is generated based on the position change and output through the pulse signal output port.

[0022] The second servo driver cyclically receives the incremental pulse signal, updates the count value of the internal position feedback counter, compares the count value as the external feedback position with the internal position command value, calculates the position error, and inputs the position error into the PID controller. The PID controller calculates and adjusts the drive signal to the second motor to continuously reduce the position error.

[0023] Preferably, the full closed-loop position correction further includes executing feedforward compensation control based on a disturbance observer within the second servo driver to assist the internal PID controller in correction. The feedforward compensation control includes:

[0024] The stiffness coefficient of the mechanical transmission chain is pre-calibrated by the host computer, and the stiffness coefficient is written into the second servo driver as a control parameter.

[0025] During each control cycle of the second servo drive, the internal controller of the second servo drive acquires the load equivalent torque value estimated by the disturbance observer in real time. The load equivalent torque value represents the comprehensive torque exerted on the load by the mechanical transmission chain.

[0026] Based on the internally stored control parameters and the real-time acquired equivalent load torque value, the predicted position deviation is calculated in real time by the internal controller of the second servo drive.

[0027] The predicted position deviation is used as a feedforward compensation value and directly superimposed on the received original position command inside the driver to form a new compensated position command. This new position command replaces the original position command and serves as the command input for the position loop controller. It is then compared and calculated with the fully closed-loop feedback position from the first control unit to generate a compensated position error for the PID controller.

[0028] Preferably, the process of writing the optimized electronic gear ratio into the second servo drive includes:

[0029] The host computer sends a preset long-distance positioning command to the second servo driver to drive the second motor to complete the test stroke. After the test stroke is completed, the host computer reads and records from the second servo driver the total number of pulses accumulated by the second motor's own encoder during the test stroke, as well as the total number of feedback pulses received from the first control unit. The total number of pulses from the second motor's own encoder is divided by the total number of feedback pulses from the first control unit to calculate the mechanical transmission ratio. The calculated mechanical transmission ratio is written into the second servo driver as the optimized electronic gear ratio parameter.

[0030] Preferably, the process of calculating and adjusting the gain parameters includes: the host computer injecting a step-type positioning command as an excitation signal into the second servo driver to stimulate the dynamic response of the mechanical transmission chain; during the excitation signal, the host computer synchronously collects and records the response curve of the encoder of the second motor and the load-side response curve of the first servo feedback; comparing the differences between the two response curves, analyzing the overshoot, oscillation frequency, and decay time required to reach a stable state of the load-side response curve; based on the analysis results, reducing the load-side overshoot and shortening the oscillation decay time are the optimization objectives, adjusting the position loop gain, speed loop gain, and speed loop integral time constant inside the second servo driver, and writing the optimized gain parameters into the second servo driver.

[0031] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0032] 1. By configuring the first control unit as an external feedback source in absolute mode and utilizing its driver to convert the absolute position into a universal incremental pulse signal, the main drive unit (second control unit) was successfully provided with position feedback that it could receive and process. This method breaks down the technical barriers caused by incompatible or closed external encoder interface protocols of the main drive, allowing users to freely combine servo systems of different brands or models to build a fully closed loop with absolute position feedback capabilities, greatly improving flexibility and the freedom of solution selection.

[0033] 2. By setting the source of the feedback signal (the first control unit) to work in absolute value mode, it ensures that the precise position information of the load can be saved even after an unexpected power outage. This allows the work to be resumed without performing a time-consuming return-to-origin operation after power is restored. This not only greatly improves production efficiency but also avoids equipment collisions or production accidents that may be caused by position loss. It is particularly suitable for application scenarios with high requirements for continuity and safety.

[0034] 3. By precisely calculating and adjusting the electronic gear ratio, accurate uniformity of command and feedback in scale is ensured. Gain parameters are optimized by injecting excitation signals and analyzing dynamic response, effectively suppressing the inherent oscillations and overshoot of the mechanical transmission chain. This entire optimization process ensures that the fully closed-loop system constructed using this method not only has high positioning accuracy but also fast dynamic response and stable operation, fully leveraging the performance advantages of fully closed-loop control. Attached Figure Description

[0035] Figure 1 This is a schematic diagram illustrating a configuration method for a servo driver to act as an external encoder, provided by an embodiment of the present invention.

[0036] Figure 2 This is a schematic diagram of the control unit connection structure provided in an embodiment of the present invention;

[0037] Figure 3 This is a schematic diagram illustrating the process of calculating and adjusting the gain parameters according to an embodiment of the present invention. Detailed Implementation

[0038] 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, and 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.

[0039] Please see Figures 1 to 3 This invention provides a configuration method for a servo driver to act as an external encoder, the technical solution of which is as follows:

[0040] Example 1

[0041] A configuration method for a servo driver to act as an external encoder, the specific process is as follows: Figure 1 As shown, it includes:

[0042] The first control unit is used as an external encoder and configured in absolute mode. The first control unit includes a first motor and a first servo driver. The second control unit is used as the main drive unit and configured in full closed-loop control mode. The second control unit includes a second motor and a second servo driver.

[0043] The absolute position data of the first motor is converted into an incremental pulse signal using the first servo driver, and the pulse signal is transmitted as feedback data to the second servo driver for full closed-loop position correction.

[0044] Record the number of pulses from the second motor and the number of feedback pulses from the first control unit, calculate and adjust the electronic gear ratio, and write the optimized electronic gear ratio into the second servo driver;

[0045] The host computer injects an excitation signal into the second servo driver to detect the dynamic response characteristics of the entire mechanical transmission chain. The response data of the second motor and the load end are recorded. The dynamic characteristics of the mechanical transmission chain are analyzed based on the oscillation decay speed and overshoot of the load end. Based on the dynamic characteristics, the gain parameters are calculated and adjusted, and the gain parameters are written into the second servo driver.

[0046] A schematic diagram of the specific control unit connection structure is shown below. Figure 2 As shown.

[0047] Furthermore, the process of configuring the first control unit as an external encoder and setting it to absolute mode includes:

[0048] The first motor is coupled to the load end, so that the first motor can move synchronously with the load end;

[0049] Parameters are set in the first servo driver to enable it to be set to absolute mode and to acquire the real-time absolute position data of the first motor.

[0050] Specifically, this embodiment is applied to a scenario where the accuracy of an existing rack and pinion linear transmission mechanism is upgraded to a fully closed-loop configuration. In this mechanism, the second motor of the main drive unit (second control unit) drives the load end (such as a worktable) to move linearly through gear and rack meshing. To avoid interference from the measurement activity with the main drive chain, a high-precision measuring rack or a synchronous belt is additionally installed on the side of the worktable. This measuring rack / synchronous belt is only used for measurement and does not participate in the transmission of the main driving force. The first motor of the first control unit is mounted on a fixed bracket, and a pinion or synchronous pulley matching the measuring rack / synchronous belt is fitted on its output shaft, so that the pinion / synchronous pulley gently meshes with the measuring rack / synchronous belt. Thus, when the load end moves, it drives the independent measuring rack / synchronous belt to move, thereby driving the shaft of the first motor to rotate synchronously.

[0051] Subsequently, parameters are set in the first servo drive to absolute mode. This setting process is completed via a host computer (e.g., a computer with servo configuration software installed). The operator connects to the first servo drive via software, locates the parameter item defining the encoder's operating mode in the parameter list, and sets its value to absolute mode. This is a common servo drive function, which configures the servo motor to operate in absolute mode through parameter configuration, thereby saving position data after power failure. After the parameter is modified, a save operation is performed, writing the data to the drive's non-volatile memory, and the drive is powered off and restarted to make the configuration effective. To ensure the power-off retention function, a dedicated battery unit is connected to the absolute encoder built into the first motor. Finally, the first control unit is successfully configured as an external encoder unit capable of accurately measuring and maintaining the absolute position of the load end even when power is lost.

[0052] To achieve the power-off position retention function, the first control unit also includes a power-on position synchronization process. When power is restored after a complete power outage, the host controller will execute an initialization program through the communication interface with the first servo driver. This program will actively query and read the absolute position data stored in the non-volatile memory of the first servo driver.

[0053] After acquiring the absolute position data, the controller will use the absolute position data as the current actual position reference and set it in the relevant position register of the second servo drive (for example, set it as the current feedback position value or the synchronous modification instruction position value). Through the position data handshake and synchronization process, the position information of the main drive unit (second control unit) is completely aligned with the actual absolute position of the load end, and the absolute position control can be restored without performing a return-to-origin operation.

[0054] By using an independent measuring rack / synchronous belt, precise synchronization between the first motor and the load is achieved, ensuring that the linear displacement of the load is accurately converted into the rotational motion of the motor. This coupling method provides high-precision position sensing, allowing the first motor to act as a high-precision external encoder, providing real-time feedback on load position changes. Furthermore, the servo drive, set to absolute mode, retains position data after power failure, ensuring that the motor position is not lost even when power is interrupted. The core advantage of this configuration is significantly improved operational reliability, especially in applications requiring long-term operation and stringent positional requirements. It avoids position information loss due to power interruptions and compensates for some errors in the main drivetrain through a fully closed-loop feedback system, thereby improving the final positioning accuracy.

[0055] Furthermore, the process of using the second control unit as the main drive unit and setting it to a fully closed-loop control mode includes:

[0056] The second motor serves as the main drive unit, responsible for performing the positioning task and driving the main load;

[0057] Parameters are set in the second servo drive to make the control mode of the second servo drive a fully closed loop, and to enable the second servo drive to receive pulse signals from the first control unit as external position feedback.

[0058] Specifically, the second control unit serves as the main drive unit and is configured in a fully closed-loop control mode. First, the second motor, acting as the main drive unit, is responsible for performing the positioning task and driving the main load. This main load can be a robotic arm, conveyor belt, or other motion platform. The second motor, coupled with the transmission system, drives the main load to move along a predetermined trajectory or position. The second motor transmits power to the main load via gears, belts, or other means, ensuring that the load accurately completes the designated task.

[0059] When configuring the second servo drive, its control mode needs to be set to full closed-loop control mode. This process is completed via a host computer. The operator connects to the second servo drive through the host computer, enters the parameter setting interface, selects the control mode, and switches it to full closed-loop control mode. In this mode, the second servo drive receives pulse signals from the first control unit and uses these pulse signals as external position feedback signals. These pulse signals represent the motor position data provided by the first control unit. The second servo drive will adjust the position of the second motor according to these feedback signals to ensure precise movement of the load.

[0060] Once configured, the second servo drive continuously receives pulse signals from the first control unit and adjusts the drive signal of the second motor in real time based on these feedback signals. Through a closed-loop control mechanism, the second servo drive automatically corrects load deviations, ensuring the precise position of the main load. This process effectively reduces errors caused by load variations, friction, external disturbances, and other factors, enabling the load to move stably along a predetermined trajectory.

[0061] After configuration, verification will be initiated. The host computer sends an initial positioning command to the second servo drive, activating the second motor to drive the main load. The second servo drive receives pulse signals from the first control unit to ensure precise movement of the main load. This verification process ensures that the second servo drive can accurately receive and process external feedback signals, controlling the movement of the second motor and ensuring high-precision control.

[0062] Through this fully closed-loop control mode, the second servo drive can receive feedback pulse signals from the first control unit in real time. Within its internal control loop, the controller continuously compares the position command value with the accumulated position value from the feedback pulses, thereby calculating the position error in real time. This position error is a direct reflection of the deviation between the drive motor (second motor) and the load end caused by the mechanical transmission chain (such as gear backlash, belt slippage, etc.).

[0063] Subsequently, the PID controller adjusts the driving torque to the second motor based on this error. Its core objective is to drive the second motor to perform compensatory motion, continuously reducing and ultimately eliminating the position error. This process is a correction mechanism based on error feedback. Therefore, when encountering external disturbances or load changes, a measurable position deviation is first generated, which can then be effectively compensated and suppressed, ultimately ensuring the accurate positioning of the load.

[0064] Through this fully closed-loop control mode, the second servo drive can receive and process pulse signals from the first control unit in real time, thereby precisely controlling the position of the second motor. Even when encountering external disturbances or load changes, the closed-loop control can effectively compensate for these deviations, ensuring accurate positioning. Therefore, the application of this control mode can achieve the accuracy level required by fully closed-loop control.

[0065] Furthermore, the pulse signal is transmitted as feedback data to the second servo driver, and the process of performing full closed-loop position correction includes:

[0066] The pulse signal output port of the first servo driver is physically connected to the external encoder pulse signal input port of the second servo driver to establish a feedback data transmission path;

[0067] During the preset sampling period of the first servo driver, the current absolute position value of the built-in absolute encoder of the first motor is read cyclically, and the position change is obtained by differential operation with the absolute position value recorded in the previous sampling period. An incremental pulse signal is generated based on the position change and output through the pulse signal output port.

[0068] The second servo driver cyclically receives the incremental pulse signal, updates the count value of the internal position feedback counter, compares the count value as the external feedback position with the internal position command value, calculates the position error, and inputs the position error into the PID controller. The PID controller calculates and adjusts the drive signal to the second motor to continuously reduce the position error.

[0069] Specifically, the pulse signal output port of the first servo drive needs to be physically connected to the external encoder pulse signal input port of the second servo drive to establish a feedback data transmission path. This connection is the foundation for realizing full closed-loop control, ensuring that the pulse signals generated in real time by the first control unit can be accurately transmitted to the second servo drive for position feedback and correction.

[0070] The first servo driver cyclically reads the current absolute position value from the built-in absolute encoder of the first motor according to a preset sampling period, and performs a differential operation between this value and the absolute position value recorded in the previous sampling period to calculate the position change. This differential operation accurately obtains the motor's displacement information between two consecutive time points. Based on this position change, the first servo driver generates an incremental pulse signal and outputs it through the pulse signal output port. The incremental pulse signal is received by the second servo driver, which updates its internal position feedback counter. The value of the position feedback counter represents the current motor position calculated from the incremental signal. The second servo driver compares the count value with an internally preset position command value to calculate the position error. By comparing the difference between the external feedback position (i.e., the actual position generated by the incremental signal) and the internal position command value, the current position error can be identified and processed by a PID controller.

[0071] Under the action of the PID controller, the drive signal of the second motor is adjusted in real time. The goal of the adjustment is to continuously reduce the position error, thereby achieving precise positioning control. Through this feedback adjustment, the motor motion can be continuously optimized to synchronize it with the predetermined trajectory or target position as much as possible. Each error calculation and adjustment provides more precise control, enhancing stability and reliability under various working conditions.

[0072] Furthermore, to address the issue of incremental pulse signals potentially being lost or incorrectly counted in high-speed motion or electromagnetic interference environments, leading to cumulative errors, the process of transmitting the pulse signal as feedback data to the second servo driver also includes a pulse absolute value hybrid verification mechanism: While the first servo driver outputs incremental pulse signals, upon detecting a drastic change in motion state, it asynchronously sends an absolute position verification frame containing current absolute position data to the second servo driver via the communication bus. In its main control loop, the second servo driver, in addition to accumulating the received incremental pulses, periodically checks whether it has received the absolute position verification frame. When the absolute position verification frame is received, it compares the absolute position data within the frame with its own position feedback count value obtained through pulse accumulation. If the deviation exceeds a preset fault tolerance threshold, it determines that a pulse accumulation error has occurred and forcibly uses the data in the absolute position verification frame to synchronously correct the internal position feedback counter.

[0073] When the deviation exceeds a preset fault tolerance threshold, in addition to performing forced synchronization correction, the second servo driver also sets an internal status flag. When the correction event occurs, the corresponding status flag is set (e.g., from 0 to 1). The host controller can periodically read this status flag during its regular monitoring cycle. If the host controller reads that the flag is set, it can know that the system has undergone at least one position correction recently, and thus can perform the corresponding recording and archiving operation. The status flag can be automatically reset after being read by the host controller.

[0074] Specifically, when a drastic change in motion is detected, the second servo driver monitors its acceleration command or acceleration feedback value in real time. When the absolute value of this acceleration exceeds a preset acceleration threshold (e.g., 5 m / s²), it is determined that a drastic change in motion has occurred, and the first servo driver is triggered to send an absolute position verification frame via the communication bus. To ensure the periodicity and reliability of the verification, regardless of whether the motion state changes drastically, a fixed time period (e.g., every 100 milliseconds) is set to force the sending of an absolute position verification frame, thereby achieving a more robust verification mechanism based on a combination of event triggering and periodic triggering.

[0075] By combining the high-speed real-time performance of incremental pulses with the absolute accuracy of absolute position data, accumulated errors can be dynamically eliminated without interrupting normal operation, thereby enhancing the system's robustness under harsh conditions and its long-term positioning accuracy.

[0076] By transmitting pulse signals as feedback data to the second servo driver, a fully closed-loop position correction is achieved, providing precise positioning control. The position data of the first motor is read in real time, and incremental pulse signals are generated, enabling the second servo driver to continuously receive feedback signals and adjust the motor drive signals accordingly to reduce position errors. This process is fundamental to achieving fully closed-loop control, aiming to suppress the accumulation of position errors under different operating conditions and dynamically correct deviations through the adjustment of the PID controller, thereby improving control robustness.

[0077] Furthermore, the full closed-loop position correction also includes executing feedforward compensation control based on a disturbance observer within the second servo driver to assist the internal PID controller in correction. The feedforward compensation control includes:

[0078] The stiffness coefficient of the mechanical transmission chain is pre-calibrated by the host computer, and the stiffness coefficient is written into the second servo driver as a control parameter.

[0079] During each control cycle of the second servo drive, the internal controller of the second servo drive acquires the load equivalent torque value estimated by the disturbance observer in real time;

[0080] Based on the internally stored control parameters and the real-time acquired equivalent load torque value, the predicted position deviation is calculated in real time by the internal controller of the second servo drive.

[0081] The predicted position deviation is used as a feedforward compensation value and directly superimposed on the received original position command inside the driver to form a new compensated position command. This new position command replaces the original position command and serves as the command input for the position loop controller. It is then compared and calculated with the fully closed-loop feedback position from the first control unit to generate a compensated position error for the PID controller.

[0082] Specifically, during the initialization phase, the host computer pre-calibrates the mechanical transmission chain to determine its stiffness coefficient. This process is conducted by connecting the host computer to the second servo driver, and the stiffness coefficient is set via servo configuration software. The stiffness coefficient is a key parameter reflecting the rigidity of the mechanical transmission and is closely related to dynamic response characteristics. By inputting the stiffness coefficient of the transmission chain into the second servo driver, the stiffness coefficient is stored as a control parameter in the driver's internal memory. During each control cycle of the driver, the internal controller of the second servo driver acquires the load equivalent torque value estimated by the disturbance observer in real time. The disturbance observer estimates the impact of these disturbances by monitoring dynamic changes (such as load fluctuations, friction, etc.). The load equivalent torque value represents the torque disturbance caused by external factors (such as load changes or friction, etc.), which will lead to position deviation. Based on the internally stored control parameters (i.e. stiffness coefficient) and the real-time acquired load equivalent torque value, the internal controller of the second servo drive calculates the predicted position deviation in real time. The predicted position deviation represents the position error caused by the disturbance. This deviation will be used as a feedforward compensation value to adjust the motor's motion in real time and reduce the position error caused by the disturbance.

[0083] The feedforward compensation value is directly superimposed on the received original position command to form a new compensated position command. This new compensated position command is generated internally by the driver and replaces the original position command as the input signal to the position loop controller. This enables real-time compensation for position errors caused by disturbances, ensuring accurate arrival at the predetermined target. The compensated new position command is compared with the fully closed-loop feedback position from the first control unit to calculate the compensated position error. This error is used as input to the PID controller to further adjust the drive signal of the second control unit. The PID controller generates an adjustment signal based on this error, adjusting the motor drive signal to achieve more precise positioning control.

[0084] The pre-calibrated stiffness coefficient of the mechanical transmission chain is calibrated by first mechanically locking the load end to prevent macroscopic movement. Then, a known, gradually increasing static torque command is applied to the second motor via a host controller, while the first control unit precisely records the minute positional changes at the load end. Based on the recorded torque-displacement data, a relationship curve can be fitted, and the slope of this curve can be used as the stiffness coefficient of the mechanical transmission chain. The disturbance observer is implemented using a Q-filter structure based on the motor's nominal inertia model. Key parameters need to be set during implementation, such as the nominal inertia of the motor and load referred to the motor shaft and the observer bandwidth (i.e., the cutoff frequency of the Q-filter). This bandwidth parameter determines the observer's response speed and noise suppression capability, typically ranging from 50Hz to 200Hz. Specific values ​​can be experimentally selected between response speed and system stability to achieve optimal load equivalent torque estimation.

[0085] By employing feedforward compensation control based on a disturbance observer, some external disturbances and load changes can be proactively compensated for, assisting the PID controller in corrective actions. Real-time calculation and compensation of predicted position deviations can more quickly suppress the impact of certain disturbances on position errors, thereby improving dynamic tracking performance to some extent. Combining stiffness coefficients and disturbance estimates allows for more targeted responses to load changes, helping to maintain control stability under complex operating conditions and further ensuring control accuracy.

[0086] Furthermore, the process of writing the optimized electronic gear ratio into the second servo drive includes:

[0087] The host computer sends a preset long-distance positioning command to the second servo driver to drive the second motor to complete the test stroke. After the test stroke is completed, the host computer reads and records from the second servo driver the total number of pulses accumulated by the second motor's own encoder during the test stroke, as well as the total number of feedback pulses received from the first control unit. The total number of pulses from the second motor's own encoder is divided by the total number of feedback pulses from the first control unit to calculate the mechanical transmission ratio. The calculated mechanical transmission ratio is written into the second servo driver as the optimized electronic gear ratio parameter.

[0088] Specifically, a preset long-distance positioning command is sent from the host computer to the second servo driver. This command drives the second motor to complete the specified test stroke. The test stroke can be set according to actual application requirements; for example, the motor may need to move a certain distance to test response accuracy.

[0089] After the test stroke is completed, the host computer will read and record two key data points from the second servo driver: the total number of pulses accumulated by the second motor's own encoder and the total number of feedback pulses received from the first control unit. The total number of pulses from the second motor represents the actual rotation of the motor during the test stroke, while the total number of feedback pulses from the first control unit represents the feedback position data given by the external encoder.

[0090] Furthermore, the host computer divides the total number of pulses from the second motor encoder by the total number of feedback pulses from the first control unit to calculate the mechanical transmission ratio. The mechanical transmission ratio represents the degree of synchronization between the rotation of the second motor and the feedback from the first control unit. This ratio optimizes the motion coordination between the two, reducing errors. The calculated mechanical transmission ratio is used as the optimized electronic gear ratio, which is then written as a parameter into the second servo driver to ensure high precision and stability during operation.

[0091] Furthermore, considering that the mechanical transmission chain may have nonlinear errors at different positions or temperatures, causing a single mechanical transmission ratio to fail to achieve the highest accuracy throughout the entire process, the process of calculating and writing the optimized electronic gear ratio adopts a piecewise linearization calibration method: the host computer divides the entire test stroke into multiple preset sub-intervals; within each sub-interval, a short-distance positioning test is performed independently, and the local mechanical transmission ratio of that interval is calculated respectively; the local mechanical transmission ratios of all intervals are recorded, and the host computer generates a position transmission ratio lookup table; the lookup table is written into the second servo driver as a dynamic electronic gear ratio parameter. During actual operation, the second servo driver will query the lookup table in real time according to the current feedback absolute position of the load to obtain the electronic gear ratio at the current position for control calculation.

[0092] The original static, global electronic gear ratio was optimized into a dynamic, local one, which can accurately compensate for the nonlinear error of the transmission chain, thereby further improving the positioning accuracy of the system throughout the entire stroke range.

[0093] In this embodiment, a test stroke with a total length of 1000 mm can be divided into 10 equal-length sub-intervals of 100 mm each to achieve basic nonlinear compensation. In applications with higher accuracy requirements, non-equal-length sub-intervals can be used. For example, through pre-testing or based on experience, in areas with known large nonlinear errors in the transmission chain (such as the beginning and end of the stroke), the sub-interval length can be shortened to 50 mm to increase calibration density, while in areas with better linearity, the sub-interval length can be widened to 200 mm to improve calibration efficiency. Typically, the total number of sub-intervals can be between 5 and 50, flexibly selected according to actual accuracy requirements, controller computing power, and storage space.

[0094] By calculating the ratio of the total number of pulses from the second motor to that from the first control unit, the transmission relationship between the two can be accurately calibrated. Correctly setting this parameter is a prerequisite for achieving precise scale consistency between commands and feedback, and is also the foundation for avoiding continuous errors or loss of control due to scale mismatch.

[0095] Further, the process of calculating and adjusting the gain parameters includes: the host computer injecting a step-type positioning command as an excitation signal into the second servo driver to stimulate the dynamic response of the mechanical transmission chain; during the excitation signal's action, the host computer synchronously acquires and records the response curve of the second motor's own encoder and the load-side response curve of the first servo feedback; comparing the differences between the two response curves, analyzing the overshoot, oscillation frequency, and decay time required to reach a stable state of the load-side response curve; based on the analysis results, reducing the load-side overshoot and shortening the oscillation decay time are the optimization objectives, adjusting the position loop gain, speed loop gain, and speed loop integral time constant inside the second servo driver, and writing the optimized gain parameters into the second servo driver, as detailed in the specific process. Figure 3 As shown.

[0096] Specifically, the host computer injects a step-type positioning command into the second servo driver. The positioning command acts as an excitation signal on the mechanical transmission chain. Through the excitation signal, the dynamic response of the mechanical transmission chain is stimulated, and the response characteristics under specific conditions are tested, such as load overshoot, oscillation frequency and stability.

[0097] During the excitation signal, the host computer synchronously collects and records the response curve of the second motor's own encoder and the load response curve fed back by the first control unit. These two curves represent the dynamic changes of the second motor and the load under the excitation signal, respectively, and can effectively reflect the response characteristics.

[0098] Furthermore, by comparing the differences between the two response curves, the overshoot, oscillation frequency, and decay time required to reach a steady state in the load-side response curve are analyzed. These parameters reflect stability and response speed. By analyzing these parameters, undesirable dynamic characteristics such as excessive overshoot, excessive oscillation, or slow decay can be identified. Based on the evaluation of the analysis results, the optimization objective is to reduce the load-side overshoot and shorten the oscillation decay time. The position loop gain, velocity loop gain, and velocity loop integral time constant inside the second servo drive will be adjusted. By adjusting these gain parameters, faster response and improved stability can be achieved, reducing position errors and oscillation phenomena. The adjusted optimized gain parameters will be written into the second servo drive so that they can be applied in real time during subsequent control processes, ensuring optimal dynamic performance in actual operation.

[0099] By analyzing the dynamic response of the mechanical transmission chain and optimizing the gain parameters, control quality can be improved. Adjusting the position loop gain, velocity loop gain, and velocity loop integral time constant can effectively reduce overshoot at the load end and shorten oscillation decay time within a stable range. The debugging process aims to discover the optimal performance under the current hardware configuration, achieving a good balance between response speed and stability, and reducing positioning errors during operation.

[0100] The configuration method provided by this invention, combined with feedforward compensation and real-time feedback mechanisms, can effectively compensate for transmission errors in traditional semi-closed-loop systems, thereby improving the final positioning accuracy. By monitoring the actual position of the load end in real time (collected and fed back by the first control unit) and using this to correct errors, rather than simply monitoring the position of the drive motor itself, this load-oriented closed-loop control can accurately compensate for errors in all links, including the transmission chain, under load changes and external disturbances. This ensures the load operates efficiently along a predetermined trajectory. The optimized electronic gear ratio and gain adjustment method further improve the synchronization accuracy between the motor and the load, reducing overshoot, oscillation, and position errors. Furthermore, the feedforward compensation control predicts and compensates for some disturbances, helping to improve anti-interference capability and control accuracy.

[0101] Example 2

[0102] The method of this invention is applied to machining and assembly line equipment that needs to maintain precise positioning of the load during operation, especially when the load fluctuates or the friction changes, and still needs to maintain stable control performance.

[0103] First, the first control unit (small motor) is configured as an external encoder in absolute mode and coupled to the load via gears to ensure synchronous movement between the motor and the load. The first servo drive acquires the position data of the small motor in real time through its built-in absolute encoder and transmits the data to the second servo drive via pulse signals. This configuration ensures high accuracy and real-time feedback of the position data, avoiding position loss and accuracy issues.

[0104] Furthermore, the second control unit (large motor) serves as the main drive unit, driving the main load and performing positioning tasks via mechanical transmission. The second motor receives pulse signals from the first control unit through a fully closed-loop control system, ensuring the load runs along a precise path. To address load fluctuations and external disturbances, a disturbance observer is introduced to monitor and estimate the equivalent torque of the load in real time, considering factors such as load changes and friction. The disturbance observer provides disturbance data to the second servo drive by monitoring external disturbances and estimating torque. The stiffness coefficient of the mechanical transmission chain is calibrated by the host computer and stored as a control parameter in the second servo drive. The stiffness coefficient helps accurately predict and compensate for position deviations caused by external disturbances.

[0105] Within each control cycle, the internal controller of the second servo drive acquires the load equivalent torque value estimated by the disturbance observer in real time, and calculates the predicted position deviation based on the control parameters and real-time data. This predicted deviation is used as a feedforward compensation value and directly added to the received original position command to generate a new compensated position command. The compensated new position command replaces the original position command and serves as the input to the position loop controller.

[0106] Furthermore, the position loop controller compares the compensated new position command with the fully closed-loop feedback position of the first control unit to generate a compensated position error. This error is then passed as input to the PID controller to further adjust the drive signal of the second motor, eliminating the error and ensuring accurate load positioning. To further optimize performance, the host computer injects a step-type excitation signal into the second servo driver, stimulating the dynamic response of the entire mechanical transmission chain. The host computer simultaneously acquires and records the response curves of the second motor and the load, compares the differences between them, and analyzes key parameters such as overshoot, oscillation frequency, and decay time to evaluate dynamic characteristics. Based on the analysis of the response curves, the gain parameters are optimized, adjusting the position loop gain, speed loop gain, and speed loop integral time constant to reduce the overshoot at the load, shorten the oscillation decay time, and improve the response speed.

[0107] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for configuring a servo drive to act as an external encoder, characterized in that, include: The first control unit is used as an external encoder and configured in absolute mode. The first control unit includes a first motor and a first servo driver. The second control unit is used as the main drive unit and set to a fully closed-loop control mode. The second control unit includes a second motor and a second servo driver. The first motor is coupled to the load end so that the first motor can move synchronously with the load end. The second motor serves as the main drive unit and is responsible for performing positioning tasks and driving the load. The absolute position data of the first motor is converted into incremental pulse signals using the first servo driver, and the pulse signals are transmitted as feedback data to the second servo driver for full closed-loop position correction. Record the number of pulses from the second motor and the number of feedback pulses from the first control unit, calculate and adjust the electronic gear ratio, and write the optimized electronic gear ratio into the second servo driver; The host computer injects an excitation signal into the second servo driver to detect the dynamic response characteristics of the entire mechanical transmission chain. The response data between the second motor and the load are recorded. Based on the oscillation decay rate and overshoot of the load, the dynamic characteristics of the mechanical transmission chain are analyzed. Based on these dynamic characteristics, the gain parameters are calculated and adjusted, and then written into the second servo driver. The process of calculating and adjusting the gain parameters includes: the host computer injecting a step-type positioning command into the second servo driver as an excitation signal to stimulate the dynamic response of the mechanical transmission chain; during the excitation signal's action, the host computer synchronously acquires and records the response curve of the second motor's own encoder and the load response curve fed back by the first control unit; comparing the differences between the two response curves, the overshoot, oscillation frequency, and decay time required to reach a stable state of the load response curve are analyzed; based on the analysis results, reducing the load overshoot and shortening the oscillation decay time are optimized goals, and the position loop gain, speed loop gain, and speed loop integral time constant inside the second servo driver are adjusted, and the optimized gain parameters are written into the second servo driver.

2. The configuration method of a servo drive acting as an external encoder according to claim 1, characterized in that, The process of using the first control unit as an external encoder and configuring it in absolute mode includes: Set control parameters in the first servo driver, set the first servo driver to absolute value mode, and obtain the real-time absolute position data of the first motor.

3. The configuration method of a servo drive acting as an external encoder according to claim 1, characterized in that, The process of using the second control unit as the main drive unit and setting it to a fully closed-loop control mode includes: Control parameters are set in the second servo drive to make the control mode of the second servo drive a fully closed loop, and enable the second servo drive to receive pulse signals from the first control unit as external position feedback.

4. The configuration method of a servo drive acting as an external encoder according to claim 1, characterized in that, The pulse signal is transmitted as feedback data to the second servo driver, and the process of performing full closed-loop position correction includes: The pulse signal output port of the first servo driver is physically connected to the external encoder pulse signal input port of the second servo driver to establish a feedback data transmission path; During the preset sampling period of the first servo driver, the current absolute position value of the built-in absolute encoder of the first motor is read cyclically, and the position change is obtained by differential operation with the absolute position value recorded in the previous sampling period. An incremental pulse signal is generated based on the position change and output through the pulse signal output port. The second servo driver cyclically receives the incremental pulse signal, updates the count value of the internal position feedback counter, compares the count value as the external feedback position with the internal position command value, calculates the position error, and inputs the position error into the PID controller. The PID controller calculates and adjusts the drive signal to the second motor to continuously reduce the position error.

5. The configuration method of a servo drive acting as an external encoder according to claim 1, characterized in that, The full closed-loop position correction further includes executing feedforward compensation control based on a disturbance observer within the second servo driver to assist the internal PID controller in correction. The feedforward compensation control includes: The stiffness coefficient of the mechanical transmission chain is pre-calibrated by the host computer, and the stiffness coefficient is written into the second servo driver as a control parameter. During each control cycle of the second servo drive, the internal controller of the second servo drive acquires the load equivalent torque value estimated by the disturbance observer in real time. The load equivalent torque value represents the comprehensive torque exerted on the load by the mechanical transmission chain. Based on the internally stored control parameters and the real-time acquired equivalent load torque value, the predicted position deviation is calculated in real time by the internal controller of the second servo drive. The predicted position deviation is used as a feedforward compensation value and directly superimposed on the received original position command inside the driver to form a new compensated position command. This new position command replaces the original position command and serves as the command input for the position loop controller. It is then compared and calculated with the fully closed-loop feedback position from the first control unit to generate a compensated position error for the PID controller.

6. The configuration method of a servo drive acting as an external encoder according to claim 1, characterized in that, The process of writing the optimized electronic gear ratio into the second servo driver includes: The host computer sends a preset long-distance positioning command to the second servo driver to drive the second motor to complete the test stroke. After the test stroke is completed, the host computer reads and records from the second servo driver the total number of pulses accumulated by the second motor's own encoder during the test stroke, as well as the total number of feedback pulses received from the first control unit. The total number of pulses from the second motor's own encoder is divided by the total number of feedback pulses from the first control unit to calculate the mechanical transmission ratio. The calculated mechanical transmission ratio is written into the second servo driver as the optimized electronic gear ratio parameter.

Citation Information

Patent Citations

  • Servo-controller and adjusting method thereof

    CN103163829A

  • Synchronous control method and synchronous control device for double driving motors at double sides

    CN106773683A