Configuration method for servo drive serving as external encoder

By configuring the servo drive as an external encoder to achieve full closed-loop control, the accuracy and stability issues of traditional servo systems under complex working conditions are resolved, the system's flexibility and positioning accuracy are improved, position loss due to power failure is reduced, and production efficiency and safety are enhanced.

CN120802606AActive Publication Date: 2025-10-17JIANGSU DAODA INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional servo control systems are prone to insufficient accuracy and stability problems due to load changes and external interference under complex working conditions. In addition, parameter adjustment is complex, making it difficult to achieve adaptive control.

Method used

The first control unit is configured in absolute value mode and converted into incremental pulse signals as feedback. Combined with full closed-loop control, the gain parameters and electronic gear ratio are adjusted by the host computer to optimize the dynamic characteristics of the mechanical transmission chain and achieve full closed-loop position correction.

Benefits of technology

It improves the flexibility and positioning accuracy of the servo system, reduces position loss due to power failure, ensures stable operation of the system under complex working conditions, and improves production efficiency and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120802606A_ABST
    Figure CN120802606A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial control, in particular to a configuration method for taking a servo drive as an external encoder, which comprises the following steps: taking a first control unit as an external encoder and configuring the external encoder as an absolute value mode, taking a second control unit as a main drive unit and setting the external encoder as a full-closed-loop control mode, and converting absolute position data of a first motor into absolute position data of a second motor; the signal is converted into an incremental pulse signal, and the pulse signal is used as feedback data to be transmitted to a second servo driver for full-closed-loop position correction; recording the pulse number of the second motor and the feedback pulse number of the first control unit, calculating an electronic gear ratio, and writing the electronic gear ratio into a second servo driver; an excitation signal is injected into the second servo driver through the upper computer, response data of the second motor and the load end are recorded, gain parameters are calculated and adjusted based on the dynamic characteristics of the mechanical transmission chain of the load end, and the gain parameters are written into the second servo driver. Servo serves as an encoder, and absolute value full closed loop is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of industrial control, and particularly relates to a configuration method of a servo drive serving as an external encoder. BACKGROUND

[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 mechanical processing, robots, automated production lines, and other occasions to provide precise position control, speed control, and acceleration control.

[0003] In traditional servo control systems, position feedback and closed-loop control techniques are usually used to adjust the movement of the motor in real time. By comparing the current position of the motor with the target position, the control system can adjust the motor drive signal according to the position error to ensure that the load moves accurately along the predetermined trajectory. Traditional control methods rely on pre-set gain values and static parameters, which can easily lead to insufficient precision or stability problems under complex working conditions. In addition, factors such as load fluctuations, changes in friction, and external disturbances 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 disturbances, manual adjustment of system parameters is usually required to ensure precision and stability, which increases the complexity and time cost of manual operation.

[0004] Therefore, how to design an adaptive servo control system that can automatically adjust the gain and adapt to different loads and external disturbances has become an important challenge in current servo control technology.

[0005] To this end, a configuration method of a servo drive serving as an external encoder is provided. SUMMARY

[0006] The application aims to provide a configuration method of a servo drive serving as an external encoder, which realizes absolute value full closed loop by servo serving as encoder. The first control unit is configured as an external encoder in absolute value mode, and the second control unit is configured as a 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 transmitted to the second servo driver as feedback data for full closed loop position correction. The pulse number of the second motor and the feedback pulse number of the first control unit are recorded, and the electronic gear ratio is calculated and written into the second servo driver. Excitation signals are injected into the second servo driver through the upper computer, and the response data of the second motor and the load end are recorded. Based on the dynamic characteristics of the mechanical transmission chain of the load end, the gain parameter is calculated and adjusted, and the gain parameter is written into the second servo driver.

[0007] To achieve the above object, the present application provides the following technical solutions: A configuration method of a servo drive acting as an external encoder, comprising: Taking the first control unit as an external encoder and configuring it as an absolute value mode, the first control unit comprising a first motor and a first servo driver; taking the second control unit as a main drive unit and setting it as a full closed loop control mode, the second control unit comprising a second motor and a second servo driver; Converting absolute position data of the first motor into incremental pulse signals by the first servo driver, and transmitting the pulse signals as feedback data to the second servo driver for full closed loop position correction; Recording pulse numbers of the second motor and feedback pulse numbers of the first control unit, calculating and adjusting an electronic gear ratio, and writing the optimized electronic gear ratio into the second servo driver; Injecting an excitation signal to the second servo driver through an upper computer to detect dynamic response characteristics of the whole mechanical transmission chain, recording response data of the second motor and a load end, analyzing dynamic characteristics of the mechanical transmission chain based on an oscillation decay speed and an overshoot of the load end, calculating and adjusting gain parameters based on the dynamic characteristics, and writing the gain parameters into the second servo driver.

[0008] Preferably, the process of taking the first control unit as an external encoder and configuring it as an absolute value mode comprises: Coupling the first motor to the load end so that the first motor can move synchronously with the load end; Setting parameters in the first servo driver so that the first servo driver is set as an absolute value mode and can obtain real-time absolute position data of the first motor.

[0009] Preferably, the process of taking the second control unit as a main drive unit and setting it as a full closed loop control mode comprises: Using the second motor to drive a main load for positioning tasks; Setting parameters in the second servo driver so that the control mode of the second servo driver becomes full closed loop, and the second servo driver can receive pulse signals from the first control unit as external position feedback.

[0010] Preferably, the process of transmitting the pulse signals as feedback data to the second servo driver for full closed loop position correction comprises: Physically connecting a pulse signal output port of the first servo driver to an external encoder pulse signal input port of the second servo driver to establish a feedback data transmission path; The first servo driver pre-sets a sampling period, and cyclically reads a current absolute position value of the absolute value encoder built-in the first motor, and differentiates the absolute position value recorded in the last sampling period to obtain a position change amount, and generates an incremental pulse signal according to the position change amount and outputs the incremental pulse signal through a pulse signal output port; The second servo driver cyclically receives the incremental pulse signal, updates a count value of an internal position feedback counter, compares the count value with an internal position instruction value to calculate a position error, and inputs the position error into a PID controller to calculate and adjust a driving signal of the second motor to continuously reduce the position error.

[0011] Preferably, the full-closed-loop position deviation correction further comprises performing a disturbance observer-based feedforward compensation control in the second servo driver to assist the internal PID controller to correct the deviation, and the feedforward compensation control comprises: The stiffness coefficient of the mechanical transmission chain is calibrated by a host computer in advance, and the stiffness coefficient is written into the second servo driver as a control parameter; In each control period of the second servo driver, an equivalent load torque value estimated by a disturbance observer is acquired by the internal controller of the second servo driver in real time, and the equivalent load torque value represents a comprehensive torque applied to the load by the mechanical transmission chain; Based on the control parameter stored internally and the equivalent load torque value acquired in real time, a predicted position deviation amount is calculated by the internal controller of the second servo driver in real time; The predicted position deviation amount is taken as a feedforward compensation value, and is directly superimposed on the original position instruction received in the driver to form a new position instruction after compensation, and the new position instruction will replace the original position instruction as an instruction input of a position loop controller, and is compared with a full-closed-loop feedback position from the first control unit to generate a compensated position error for the PID controller.

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

[0013] Preferably, the process of calculating and adjusting the gain parameter includes: the host computer injects a first-step form of positioning instruction as an excitation signal to the second servo driver to excite the dynamic response of the mechanical transmission chain; during the action of the excitation signal, the host computer synchronously collects and records the response curve of the second motor's own encoder and the load end response curve of the first servo feedback; the differences between the two response curves are compared to analyze the overshoot, oscillation frequency and decay time required to reach a stable state of the load end response curve; based on the analysis result, reducing the load end overshoot and shortening the oscillation decay time are the optimization goals, the position loop gain, the speed loop gain and the speed loop integral time constant inside the second servo driver are adjusted, and the optimized gain parameter is written into the second servo driver.

[0014] Compared with the prior art, the beneficial effects of the present application are: 1. By configuring the first control unit as an absolute value mode external feedback source and using its driver to convert absolute position into a general incremental pulse signal, the main drive unit (second control unit) is successfully provided with position feedback that it can receive and process. This method breaks through the technical barriers caused by the incompatibility or closure of the external encoder interface protocol of the main driver, allowing users to freely combine different brands or models of servo systems to build a full closed loop with absolute position feedback capability, greatly improving flexibility and the degree of freedom of scheme selection.

[0015] 2. By setting the source of the feedback signal (the first control unit) to work in absolute value mode, it is ensured that even after an unexpected power failure, the precise position information of the load can be saved, so that after power-on, no time-consuming home operation is required to resume work, not only greatly improving production efficiency, but also avoiding equipment collisions or production accidents that may be caused by position loss, especially suitable for application scenarios with high requirements for continuity and safety.

[0016] 3. By precisely calculating and adjusting the electronic gear ratio, the accuracy of the instruction and feedback in the scale is ensured, the gain parameters are optimized by injecting the excitation signal and analyzing the dynamic response, and the inherent oscillation and overshoot of the mechanical transmission chain are effectively suppressed. This set of optimization process ensures that the full closed-loop system constructed by the method not only has high positioning accuracy, but also has fast dynamic response and smooth operation, which can fully exert the performance advantages of full closed-loop control. BRIEF DESCRIPTION OF DRAWINGS

[0017] Fig. 1 A configuration method schematic diagram of a servo drive acting as an external encoder is provided for an embodiment of the present application. Fig. 2 A control unit connection structure schematic diagram is provided for an embodiment of the present application. Fig. 3 A flowchart of calculating and adjusting gain parameters is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0018] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0019] Please refer to Figs. 1 to 3 , the present application provides a configuration method of a servo drive acting as an external encoder, and the technical solutions are as follows:

[0020] Embodiment one A configuration method of a servo drive acting as an external encoder, the specific process is as shown in Fig. 1 , including: The first control unit is configured as an absolute value mode and acts as an external encoder, and the first control unit includes a first motor and a first servo driver; the second control unit is configured as a full closed-loop control mode and acts as a main drive unit, and the second control unit includes a second motor and a second servo driver; The first servo driver is used to convert the absolute position data of the first motor into an incremental pulse signal, and the pulse signal is transmitted to the second servo driver as feedback data for full closed-loop position correction; The pulse number of the second motor and the feedback pulse number of the first control unit are recorded, the electronic gear ratio is calculated and adjusted, and the optimized electronic gear ratio is written into the second servo driver; An excitation signal is injected into the second servo driver through the host computer to detect the dynamic response characteristics of the entire mechanical transmission chain, record the response data of the second motor and the load end, analyze the dynamic characteristics of the mechanical transmission chain based on the oscillation attenuation speed and overshoot of the load end, calculate and adjust the gain parameters based on the dynamic characteristics, and write the gain parameters into the second servo driver.

[0021] The specific control unit connection structure diagram is as follows Fig. 2 shown.

[0022] Furthermore, the process of using the first control unit as an external encoder and configuring it in absolute value mode includes: coupling the first motor to a load end so that the first motor can move synchronously with the load end; Parameters are set in the first servo driver so that the first servo driver is set to an absolute value mode and can obtain real-time absolute position data of the first motor.

[0023] Specifically, this embodiment is applied to a scenario where an existing gear rack linear transmission mechanism is upgraded to a full closed-loop precision. In this mechanism, the second motor of the main drive unit (second control unit) engages with the rack through the gear to drive the load end (such as a workbench) to perform linear motion. To prevent the measurement behavior from interfering with the main transmission chain, an additional high-precision measuring rack or a synchronous belt is installed on the side of the workbench. The measuring rack / synchronous belt is only used for measurement and does not participate in the main driving force transmission. The first motor of the first control unit is mounted on a fixed bracket, and a pinion or synchronous wheel that matches the measuring rack / synchronous belt is assembled on its output shaft so that the pinion / synchronous wheel gently meshes with the measuring rack / synchronous belt. In this way, when the load end moves, it will drive the independent measuring rack / synchronous belt to move, thereby driving the shaft of the first motor to rotate synchronously.

[0024] Subsequently, parameters are set in the first servo drive to set it to absolute value mode. This setting process is completed by a host computer (for example, a computer with servo configuration software installed). The operator connects to the first servo drive through the software, finds the parameter item used to define the encoder operating mode in the parameter list, and sets its value to absolute value mode. This is a common servo drive function, that is, through parameter configuration, the servo motor operates in absolute value mode, thereby realizing the preservation of position data after power failure. After the parameter modification is completed, the save operation is executed and written to the non-volatile memory of the drive. The drive is then powered off and restarted for the configuration to take effect. To ensure the power-off retention function, a dedicated battery unit is connected to the absolute value encoder built into the first motor. Finally, the first control unit is successfully configured as an external encoder unit that can accurately measure and maintain the absolute position of the load end after power failure.

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

[0026] After obtaining the absolute position data, the controller will set the absolute position data as the current actual position reference and set it to the relevant position register of the second servo driver (for example, set it to the current feedback position value or the synchronization modification instruction position value). Through the position data handshake and synchronization process, the position information of the master drive unit (second control unit) is fully aligned with the actual absolute position of the load end, and absolute position control can be restored without performing the home operation.

[0027] By independent measurement of the rack / synchronous belt, the first motor and the load end are precisely synchronized, ensuring that the linear displacement of the load can be 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 that can provide real-time feedback on the position changes of the load. In addition, the absolute value mode servo driver can retain position data after power failure, ensuring that the motor position will not be lost even if the power is interrupted. The core advantage of this configuration is that it greatly improves the operational reliability, especially in applications that require long-term operation and strict position requirements. It avoids the loss of position information due to power interruptions and compensates for some errors in the main drive chain through full closed-loop feedback, thereby improving the final positioning accuracy.

[0028] Further, the process of setting the second control unit as the master drive unit and setting it to full closed-loop control mode includes: The second motor serves as the master drive unit and is responsible for performing positioning tasks and driving the main load. Parameters are set in the second servo driver to change the control mode of the second servo driver to full closed loop and enable the second servo driver to receive pulse signals from the first control unit as external position feedback.

[0029] Specifically, the second control unit serves as the master drive unit and is configured in full closed-loop control mode. First, the second motor serves as the master drive unit and is responsible for performing positioning tasks and driving the main load. The main load can be a robotic arm, a conveyor belt, or other motion platforms. The second motor drives the main load to move along a predetermined trajectory or position through coupling with the transmission system. The second motor transmits power to the main load through gears, belts, etc., ensuring that the load accurately completes the specified task.

[0030] In configuring the second servo driver, it is necessary to set its control mode to full closed-loop control mode. This process is completed through the host computer. The operator connects with the second servo driver 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 driver will receive pulse signals from the first control unit and input these pulse signals as external position feedback signals. This pulse signal represents the motor position data provided by the first control unit, and the second servo driver will adjust the position of the second motor according to these feedback signals to ensure accurate movement of the load.

[0031] After configuration is complete, the second servo driver will continue to receive pulse signals from the first control unit and make real-time adjustments to the driving signals of the second motor according to these feedback signals. Through the closed-loop control mechanism, the second servo driver can automatically correct the deviation of the load, thereby ensuring the accurate position of the main load. This process can effectively reduce errors caused by load changes, friction, external disturbances, etc., allowing the load to move stably along the predetermined trajectory.

[0032] After configuration is complete, verification will be started. The host computer sends an initial positioning command to the second servo driver to start driving the main load with the second motor. The second servo driver ensures accurate movement of the main load by receiving pulse signals from the first control unit. This verification process ensures that the second servo driver can accurately receive and process external feedback signals to control the movement of the second motor and ensure high-precision control.

[0033] Through this full closed-loop control mode, the second servo driver can receive feedback pulse signals from the first control unit in real time. In its internal control loop, the controller continuously compares the position command value with the cumulative position value of the feedback pulse to calculate the position error in real time. This position error is a direct reflection of the deviation between the driving motor (second motor) and the load end due to mechanical transmission chain (such as gear clearance, belt slip, etc.).

[0034] Subsequently, the PID controller will adjust the driving torque of the second motor according to this error, and its core goal is to drive the second motor to perform compensatory movement to continuously reduce and eventually eliminate 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 will first be generated, and then it can be effectively compensated and suppressed to ultimately ensure accurate positioning of the load.

[0035] Through this full closed-loop control mode, the second servo driver can receive and process the pulse signal from the first control unit in real time, so as to accurately control the position of the second motor. Even if encountering external disturbance or load change, the closed-loop control can effectively compensate for these deviations, ensuring accurate positioning, so that the application of this control mode can achieve the accuracy level required by full closed-loop control.

[0036] Further, the pulse signal is transmitted to the second servo driver as feedback data, and the full closed-loop position correction process 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, establishing a feedback data transmission path; In the preset sampling period of the first servo driver, the current absolute position value of the first motor built-in absolute value encoder is read cyclically, and the absolute position value recorded in the last sampling period is differentially operated to obtain the position change amount, and the incremental pulse signal is generated according to the position change amount 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 with the internal position instruction value as the external feedback position, calculates the position error, and inputs the position error into the PID controller to calculate and adjust the driving signal of the second motor, continuously reducing the position error.

[0037] Specifically, the pulse signal output port of the first servo driver needs to be connected to the external encoder pulse signal input port of the second servo driver through physical connection, so as to establish a feedback data transmission path. This connection is the basis for realizing full closed-loop control, which ensures that the pulse signal generated by the first control unit in real time can be accurately transmitted to the second servo driver for position feedback and correction.

[0038] The first servo driver reads the current absolute position value of the absolute encoder in the first motor at a preset sampling period, and performs a differential operation on the value and the absolute position value recorded in the last sampling period, so as to calculate the position change. Through the differential operation, the displacement information of the motor between two continuous time points can be accurately obtained. Based on the position change, the first servo driver generates an incremental pulse signal and outputs the signal through a pulse signal output port. The incremental pulse signal is received by the second servo driver, and the second servo driver updates the internal position feedback counter, the value of which represents the current motor position calculated by the incremental signal. The second servo driver compares the counter value with the internal preset position command value, calculates the position error, and identifies the current 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, and processes the error through the PID controller.

[0039] Under the action of the PID controller, the driving signal of the second motor is adjusted in real time, and the target of the adjustment is to continuously reduce the position error, so as to realize accurate positioning control. Through this feedback adjustment, the motor movement can be continuously optimized to be as synchronized as possible with the predetermined trajectory or target position. Each error calculation and adjustment provides more accurate control, and enhances the stability and reliability under various working conditions.

[0040] Further, to solve the problem that the incremental pulse signal may be lost or incorrectly counted in a high-speed motion or electromagnetic interference environment, causing cumulative error, 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 the incremental pulse signal, an absolute position verification frame containing the current absolute position data is asynchronously sent to the second servo driver through the communication bus when a drastic change in the motion state is detected; in the main control cycle, the second servo driver not only accumulates the received incremental pulses, but also regularly checks whether the absolute position verification frame is received. When the absolute position verification frame is received, the absolute position data in the frame is compared with the position feedback counter value obtained by accumulating the pulses, and if the deviation between the two exceeds the preset fault tolerance threshold, it is determined that a pulse accumulation error has occurred, and the data in the absolute position verification frame is used to synchronize and correct the internal position feedback counter.

[0041] The deviation exceeds a preset fault tolerance threshold. In addition to performing forced synchronization correction, the second servo driver also sets an internal state flag. When the correction event occurs, the corresponding state flag is set (for example, from 0 to 1). The upper controller can periodically read the state flag in its regular monitoring cycle. If the flag is set, the upper controller can determine that the system has at least once recently performed position correction, and thus can perform corresponding record archiving operations. The state flag can be automatically reset after being read by the upper controller.

[0042] The detection of a sharp change in the motion state is specifically monitoring the acceleration command or acceleration feedback value in real time inside the second servo driver. When the absolute value of the acceleration exceeds a preset acceleration threshold (for example, 5 m / s²), it is determined that the motion state has changed sharply, and the first servo driver is triggered to send an absolute position verification frame through the communication bus. To ensure the periodicity and reliability of the verification, a fixed time period (for example, every 100 milliseconds) is set to force the sending of an absolute position verification frame, thereby realizing a more robust verification mechanism based on the combination of event-triggered and periodic triggering.

[0043] The combination of high-speed real-time incremental pulses and absolute accuracy of absolute position data can dynamically eliminate cumulative errors without interrupting normal operation, enhancing the robustness of the system in harsh conditions and the positioning accuracy of long-term operation.

[0044] By transmitting the pulse signal as feedback data to the second servo driver, full-closed-loop position correction is provided, which provides accurate positioning control. The position data of the first motor is read in real time, and an incremental pulse signal is generated, so that the second servo driver can continuously receive feedback signals and adjust the motor drive signal based on the feedback signals to reduce position errors. This process is the basis for realizing full-closed-loop control, aiming to suppress the accumulation of position errors under different working conditions and dynamically correct deviations through the adjustment of the PID controller, thereby improving control robustness.

[0045] Further, the full-closed-loop position correction further includes performing disturbance observer-based feedforward compensation control inside the second servo driver to assist the internal PID controller in correction, and the feedforward compensation control includes: The stiffness coefficient of the mechanical transmission chain is pre-calibrated by the upper computer, and the stiffness coefficient is written into the second servo driver as a control parameter; In each control period of the second servo driver, the disturbance observer-estimated equivalent load torque value is obtained in real time by the internal controller of the second servo driver; Based on the control parameters stored internally and the load equivalent torque value obtained in real time, the second servo driver internal controller calculates the predicted position deviation in real time; The predicted position deviation is directly superimposed on the received original position command as a feedforward compensation value to form a new compensated position command. The new compensated position command will replace the original position command as the input signal of the position loop controller, which can compensate for the position error caused by disturbance in real time and ensure accurate arrival at the predetermined target. The new compensated position command is compared with the full-closed-loop feedback position from the first control unit to calculate the compensated position error. This error will be used as the input of the PID controller to further adjust the drive signal of the second control unit. The PID controller will generate an adjustment signal based on the error to adjust the drive signal of the motor and achieve more accurate positioning control.

[0046] Specifically, in the initialization phase, the host computer pre-calibrates the mechanical transmission chain to determine its stiffness coefficient. This process is connected to the second servo driver through the host computer and sets the stiffness coefficient through the servo configuration software. The stiffness coefficient is a key parameter reflecting the rigidity of the mechanical transmission and is closely related to the dynamic response characteristics. By inputting the stiffness coefficient of the transmission chain into the second servo driver, the stiffness coefficient will be stored as a control parameter in the internal memory of the driver; in each control cycle of the driver, the internal controller of the second servo driver will obtain the load equivalent torque value estimated by the disturbance observer. 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, which will cause position deviation; based on the control parameters (i.e. stiffness coefficient) stored internally and the load equivalent torque value obtained in real time, the internal controller of the second servo driver calculates the predicted position deviation in real time, which represents the position error caused by disturbance. This deviation will be used as a feedforward compensation value to adjust the motor motion in real time and reduce the position error caused by disturbance.

[0047] The feedforward compensation value is directly superimposed on the received original position command to form a new compensated position command. The new compensated position command will be generated inside the driver and will replace the original position command as the input signal of the position loop controller, which can compensate for the position error caused by disturbance in real time and ensure accurate arrival at the predetermined target; the new compensated position command is compared with the full-closed-loop feedback position from the first control unit to calculate the compensated position error. This error will be used as the input of the PID controller to further adjust the drive signal of the second control unit. The PID controller will generate an adjustment signal based on the error to adjust the drive signal of the motor and achieve more accurate positioning control.

[0048] The stiffness coefficient of the pre-calibrated mechanical transmission chain is calibrated by first mechanically locking the load end so that it cannot move macroscopically, then applying a known, gradually increasing static torque command to the second motor through the upper controller, and simultaneously recording the small position change of the load end caused by the second motor through the first control unit. According to the recorded multiple sets of torque displacement data, the relationship curve can be fitted, and the slope of the curve can be used as the stiffness coefficient of the mechanical transmission chain. The disturbance observer is implemented by using a Q-filter structure based on the nominal inertia model of the motor. Key parameters such as the nominal inertia of the motor and the load converted to the motor shaft side and the observer bandwidth (i.e. the cutoff frequency of the Q-filter) need to be set. The bandwidth parameter determines the response speed and noise suppression ability of the observer, and its typical value range can be 50Hz to 200Hz. The specific value can be selected through experiments between response speed and system stability to achieve the best load equivalent torque estimation effect.

[0049] Through the feedforward compensation control based on the disturbance observer, some external disturbances and load changes can be compensated in advance, and the PID controller can be assisted to correct the deviation. By calculating the predicted position deviation in real time and compensating it, the influence of some disturbances on the position error can be suppressed faster, thereby improving the dynamic tracking performance to some extent. Combined with the stiffness coefficient and the disturbance estimation value, the load change can be responded to more specifically, which helps to maintain the stability of the control in complex working conditions and further ensures the control accuracy.

[0050] Further, the process of writing the optimized electronic gear ratio into the second servo driver includes: The upper computer issues 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 upper computer reads and records 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 during the test stroke. The total number of pulses of the second motor's own encoder is divided by the total number of feedback pulses of the first control unit to calculate the mechanical transmission ratio. The calculated mechanical transmission ratio is written into the second servo driver as an optimized electronic gear ratio parameter.

[0051] Specifically, the upper computer issues a preset long-distance positioning command to the second servo driver, which is used to drive the second motor to complete the specified test stroke. The test stroke can be set according to actual application requirements, for example, the motor needs to move a certain distance to test the response accuracy.

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

[0053] Further, the host computer will divide the total number of pulses of the second motor encoder by the total number of feedback pulses of 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 of the first control unit. By optimizing the motion coordination between the two, the error is reduced. The calculated mechanical transmission ratio is used as the optimized electronic gear ratio, and the electronic gear ratio is written into the second servo driver as a parameter to ensure high precision and stability during operation.

[0054] Further, considering that the mechanical transmission chain may have nonlinear errors at different positions or different temperatures, resulting in a single mechanical transmission ratio that cannot achieve the highest precision throughout the entire stroke, the process of calculating and writing the optimized electronic gear ratio uses a segmented linearization calibration method: the host computer divides the entire test stroke into multiple preset subintervals; in each subinterval, a short-distance positioning test is independently performed, and the local mechanical transmission ratio of that interval is calculated; all local mechanical transmission ratios of the intervals are recorded and a position transmission ratio lookup table is generated by the host computer; the lookup table is written into the second servo driver as a dynamic electronic gear ratio parameter, and in actual operation, the second servo driver will query the lookup table in real time according to the current feedback absolute position to obtain the electronic gear ratio at the current position for control calculation.

[0055] Optimizing the original static and global electronic gear ratio to a dynamic and local one can accurately compensate for the nonlinear errors of the transmission chain, further improving the positioning accuracy of the system throughout the entire stroke range.

[0056] The division mode of the plurality of preset subintervals, in this embodiment, for a test stroke with a total length of 1000 mm, can be divided into 10 equal-length subintervals each with a length of 100 mm to achieve basic nonlinear compensation, and in an application with higher accuracy requirements, a non-equal-length division mode can be adopted. For example, through pre-testing or experience, in a region with a known large nonlinear error of the transmission chain (such as the start and end sections of the stroke), the subinterval length is shortened to 50 mm to improve the calibration density, and in a region with good linearity in the middle, the subinterval length is widened to 200 mm to improve the calibration efficiency. Generally, the total number of subintervals can be between 5 and 50, and can be flexibly selected according to the actual accuracy requirements, the operation capacity and storage space of the controller.

[0057] By calculating the ratio of the second motor to the total number of pulses of the first control unit, the transmission relationship between the two can be accurately calibrated. Correctly setting this parameter is the premise of accurately unifying the scale of the command and the feedback, and is also the basis for avoiding continuous errors or loss of control due to scale mismatch.

[0058] Further, the process of calculating and adjusting the gain parameter includes: injecting a positioning command in the form of a first jump by the upper computer to the second servo driver as an excitation signal to stimulate the dynamic response of the mechanical transmission chain; during the action of the excitation signal, synchronously collecting and recording the response curve of the second motor's own encoder and the load end response curve of the first servo feedback by the upper computer; 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 end response curve; based on the analysis results, reducing the overshoot of the load end and shortening the oscillation decay time as the optimization target, adjusting the position loop gain, speed loop gain and speed loop integral time constant inside the second servo driver, and writing the optimized gain parameter into the second servo driver, and the specific process is shown in Fig. 3 .

[0059] Specifically, the upper computer injects a positioning command in the form of a first jump to the second servo driver, which will act as an excitation signal on the mechanical transmission chain. Through the excitation signal, the dynamic response of the mechanical transmission chain is stimulated to test the response characteristics under certain conditions, such as the overshoot, oscillation frequency and stability of the load.

[0060] During the action of the excitation signal, the upper computer synchronously collects and records the response curve of the second motor's own encoder and the load end response curve of the first control unit feedback. The two curves respectively represent the dynamic change process of the second motor and the load end under the excitation signal, and can effectively reflect the response characteristics.

[0061] Further, by comparing the difference between the two response curves, the overshoot, oscillation frequency and decay time required to reach a stable state in the load end response curve are analyzed, which reflect the stability and response speed, and through the analysis of these parameters, the dynamic characteristics of the ideal, such as excessive overshoot, excessive oscillation or slow decay, are identified, and based on the evaluation of the analysis results, the optimization target is to reduce the load end overshoot and shorten the oscillation decay time, the position loop gain, speed loop gain and speed loop integral time constant inside the second servo driver will be adjusted, through the adjustment of these gain parameters, faster response and improved stability can be achieved, and the position error and oscillation phenomenon are reduced, and the optimized gain parameters after adjustment will be written into the second servo driver, so that it can be applied in real time in the subsequent control process, and the best dynamic performance can be achieved in actual work.

[0062] By analyzing the dynamic response of the mechanical transmission chain and optimizing the gain parameters, the control quality can be improved. After adjusting the position loop gain, speed loop gain and speed loop integral time constant, the overshoot of the load end can be effectively reduced and the oscillation decay time can be shortened within the stable range, and the debugging process aims to explore the best performance under the current hardware configuration, and a good balance between response speed and stability is achieved, and the positioning error in operation is reduced.

[0063] By the configuration method provided by the application, the transmission error of the traditional semi-closed loop can be effectively compensated by combining feedforward compensation and real-time feedback mechanism, so that the final positioning accuracy is improved. By monitoring the actual position of the load end (collected and fed back by the first control unit) in real time and correcting the error based on the actual position, instead of only monitoring the position of the driving motor itself, this direct closed-loop control of the load end can accurately compensate for the error generated by all links including the transmission chain under the condition of load change and external disturbance, and ensure efficient operation of the load along the predetermined trajectory, and the optimized electronic gear ratio and gain adjustment method further improves the synchronization accuracy of the motor and the load, reduces the overshoot, oscillation and position error, in addition, the feedforward compensation control predicts and compensates for part of the disturbance, which helps to improve the anti-interference ability and control accuracy.

[0064] Embodiment two The method of the application is applied to machining and assembly line equipment, which needs to maintain accurate positioning of the load during operation, especially when the load fluctuates or the friction changes, and still needs to maintain stable control performance.

[0065] Firstly, the first control unit (small motor) is configured as an absolute mode with an external encoder, and is coupled with the load through a gear to ensure the synchronization of the motor and the load. The first servo driver acquires the position data of the small motor in real time through the built-in absolute encoder and transmits the data to the second servo driver through a pulse signal. This configuration ensures high precision and real-time feedback of the position data, avoiding position loss and precision problems.

[0066] Further, the second control unit (large motor) is configured as the main driving unit to drive the main load and perform positioning tasks through mechanical transmission. The second motor receives pulse signals from the first control unit through full closed-loop control to ensure the load to run along the accurate path. In order to cope with load fluctuations and external disturbances, a disturbance observer is introduced to monitor and estimate the equivalent torque of the load in real time, such as load changes, friction and other factors; the disturbance observer monitors external disturbances and estimates the torque to provide disturbance data to the second servo driver. The stiffness coefficient of the mechanical transmission chain is calibrated by the upper computer and stored as a control parameter in the second servo driver. The stiffness coefficient helps to accurately predict and compensate for the position deviation caused by external disturbances.

[0067] In each control cycle, the internal controller of the second servo driver acquires the equivalent torque value of the load estimated by the disturbance observer in real time, and calculates the predicted position deviation according to the control parameters and real-time data. This predicted deviation is used as a feedforward compensation value, which is directly superimposed on the original position command to generate a new compensated position command. The new compensated position command will replace the original position command as the input of the position loop controller.

[0068] Further, the position loop controller compares the new compensated position command with the full closed-loop feedback position of the first control unit to generate a compensated position error. This error is input to the PID controller to further adjust the drive signal of the second motor to eliminate the error and ensure accurate positioning of the load. In order to further optimize the performance, the upper computer injects a first-order step excitation signal into the second servo driver to stimulate the dynamic response of the entire mechanical transmission chain. The upper computer synchronously collects and records the response curve of the second motor and the response curve of the load end, compares the difference between the two, analyzes key parameters such as overshoot, oscillation frequency and decay time, and evaluates the dynamic characteristics. Based on the analysis of the response curve, the gain parameters are optimized, and the position loop gain, speed loop gain and speed loop integral time constant are adjusted to reduce the overshoot of the load end, shorten the oscillation decay time, and improve the response speed.

[0069] Although embodiments of the present application have been shown and described, it will be understood by those having ordinary skill in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the application, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A configuration method for a servo drive as an external encoder, characterized in that: include: The first control unit is used as an external encoder and configured in absolute value mode, wherein 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 is set to a full closed-loop control mode, wherein the second control unit includes a second motor and a second servo driver; The absolute position data of the first motor is converted into an incremental pulse signal by using the first servo driver, and the pulse signal is transmitted to the second servo driver as feedback data to perform full closed-loop position correction; Record the pulse number of the second motor and the feedback pulse number of the first control unit, calculate and adjust the electronic gear ratio, and write the optimized electronic gear ratio into the second servo driver; An excitation signal is injected into the second servo driver through the host computer to detect the dynamic response characteristics of the entire mechanical transmission chain, record the response data of the second motor and the load end, analyze the dynamic characteristics of the mechanical transmission chain based on the oscillation attenuation speed and overshoot of the load end, calculate and adjust the gain parameters based on the dynamic characteristics, and write the gain parameters into the second servo driver.

2. The configuration method of a servo drive 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 value mode includes: coupling the first motor to a load end so that the first motor can move synchronously with the load end; Control parameters are set in the first servo driver, the first servo driver is set to an absolute value mode, and real-time absolute position data of the first motor is acquired.

3. The configuration method of a servo drive 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 full closed-loop control mode includes: The second motor serves as the main drive unit, responsible for performing positioning tasks and driving the main load; Control parameters are set in the second servo driver so that the control mode of the second servo driver becomes a full closed loop, and the second servo driver is able to receive a pulse signal from the first control unit as external position feedback.

4. The configuration method of a servo drive 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 a preset sampling period of the first servo driver, the first motor's built-in absolute encoder is cyclically read, and a position change is obtained by performing a differential operation on the current absolute position value with the absolute position value recorded during the previous sampling period. An incremental pulse signal is generated based on the position change and output through a pulse signal output port. The second servo driver cyclically receives the incremental pulse signal, updates the count value of the internal position feedback counter, uses the count value as the external feedback position to compare with the internal position command value, calculates the position error, inputs the position error into the PID controller, and the PID controller calculates and adjusts the drive signal for the second motor to continuously reduce the position error.

5. The configuration method of a servo drive as an external encoder according to claim 1, characterized in that: The performing of 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 performing the correction, wherein the feedforward compensation control includes: Pre-calibrating the stiffness coefficient of the mechanical transmission chain by the host computer, and writing the stiffness coefficient into the second servo driver as a control parameter; In each control cycle of the second servo drive, an internal controller of the second servo drive obtains in real time a load equivalent torque value estimated by a disturbance observer, wherein the load equivalent torque value represents a comprehensive torque applied to the load by the mechanical transmission chain; Based on the internally stored control parameters and the load equivalent torque value obtained in real time, the internal controller of the second servo driver calculates the predicted position deviation in real time; 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 compensated new position command. The new position command will replace the original position command as the command input of the position loop controller and be compared with the full 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 as an external encoder according to claim 1, characterized in that: The process of writing the optimized electronic gear ratio into the second servo drive includes: The host computer sends a preset long-distance positioning instruction 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 the total number of pulses accumulated by the second motor's own encoder during the test stroke and the total number of feedback pulses received from the first control unit from the second servo driver; the total number of pulses of 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 an optimized electronic gear ratio parameter.

7. The configuration method of a servo drive as an external encoder according to claim 1, characterized in that: The process of calculating and adjusting the gain parameters includes: the host computer injects a step-form positioning instruction as an excitation signal into the second servo driver to stimulate the dynamic response of the mechanical transmission chain; during the period of the excitation signal, the host computer synchronously collects and records the response curve of the second motor's own encoder and the load-end response curve fed back by the first control unit; compares the difference between the two response curves, and analyzes the overshoot, oscillation frequency and decay time required to reach a stable state of the load-end response curve; based on the analysis results, reducing the load-end overshoot and shortening the oscillation decay time are optimization goals, 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.

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

  • Signal processing method and device for servo driver and encoder

    CN112923957A

  • Alternating-current servo controller using electronic transmission ratio

    CN202004710U

  • Servo press, control method, and a recording medium recording a program

    US20160288442A1