Servo motor control method

By using load observer estimation, dynamic feedforward compensation, and variable gain PID strategy, the problems of insufficient dynamic response speed and anti-interference capability in traditional servo control are solved, thereby improving the dynamic performance and positioning accuracy of the servo system.

CN122495934APending Publication Date: 2026-07-31ZHEJIANG MAILI ELECTROMECHANICAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG MAILI ELECTROMECHANICAL CO LTD
Filing Date
2026-05-13
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Traditional servo control strategies struggle to balance dynamic response speed and anti-interference capabilities when faced with sudden load changes or high-speed, high-precision positioning requirements, easily leading to overshoot, oscillation, or decreased positioning accuracy.

Method used

By integrating load observer estimation, dynamic feedforward compensation, gear backlash nonlinear model compensation, and variable gain PID strategy, the instantaneous load torque is estimated by real-time acquisition of the servo motor's operating current and encoder position feedback signal. Dynamic feedforward compensation algorithm and backlash compensation mode are introduced, and variable gain PID strategy is used to adjust control parameters.

Benefits of technology

It significantly improves the dynamic response speed, anti-interference capability and position control accuracy of the servo system, solves the problems of response lag, overshoot oscillation and insufficient positioning accuracy, and achieves stable operation under complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122495934A_ABST
    Figure CN122495934A_ABST
Patent Text Reader

Abstract

This application provides a servo motor control method, belonging to the field of motor control technology. The method includes: Step S1: Real-time acquisition of the servo motor's operating current and encoder position feedback signal; Step S2: Estimate the instantaneous load torque of the motor using a load observer based on the operating current and encoder position feedback signal; Step S3: Adjusting the output current command in real-time according to the instantaneous load torque during the speed loop and position loop control processes; Step S4: Establishing a nonlinear mathematical model of gear backlash, automatically triggering backlash compensation mode when a change in motion direction or a zero-point speed is detected; Step S5: Employing a variable-gain PID strategy, dynamically adjusting the proportional gain and integral gain according to the magnitude of the instantaneous load torque. This method solves the response lag and vibration problems of traditional servo systems under load disturbances and direction changes, significantly improving the system's dynamic response speed, anti-interference capability, and position control accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of motor control technology, specifically relating to a servo motor control method. Background Technology

[0002] With the rapid development of industrial automation and precision manufacturing technologies, servo motors, as the core actuators for motion control, are widely used in CNC machine tools, industrial robots, and precision electronic manufacturing. In actual operation, servo systems often face complex conditions such as external load disturbances, nonlinearity of mechanical transmission chains (such as gear backlash), and changes in load inertia.

[0003] Traditional servo control strategies often employ fixed-parameter PID control. Although the structure is simple, it is often difficult to balance the dynamic response speed and anti-interference capability of the system when facing sudden load changes or high-speed, high-precision positioning requirements. This can easily lead to problems such as overshoot, oscillation, or decreased positioning accuracy. Summary of the Invention

[0004] To address at least one of the technical problems existing in the background art, this application provides a servo motor control method. By integrating load observer estimation, dynamic feedforward compensation, gear backlash nonlinear model compensation, and variable gain PID strategy, it effectively solves the response lag and vibration problems of traditional servo systems under load disturbances and direction switching, and significantly improves the dynamic response speed, anti-interference ability, and position control accuracy of the system.

[0005] The technical solution adopted in this application is as follows: The first aspect of this application provides a servo motor control method, including: Step S1: Real-time acquisition of the servo motor's operating current and encoder position feedback signal; Step S2: Based on the operating current and encoder position feedback signal, estimate the instantaneous load torque of the motor using a load observer; Step S3: In the control process of the speed loop and position loop, a dynamic feedforward compensation algorithm is introduced to adjust the output current command in real time according to the instantaneous load torque; Step S4: Establish a nonlinear mathematical model for gear backlash. When a change in motion direction or zero velocity is detected, the backlash compensation mode is automatically triggered. The mechanical backlash is filled and damping is applied through a preset adaptive compensation curve. Step S5: Employ a variable gain PID strategy to dynamically adjust the proportional gain and integral gain based on the magnitude of the instantaneous load torque.

[0006] According to the servo motor control method provided in the first aspect of this application, position feedback is accurately obtained using photoelectric encoder quadruple frequency counting and timestamp alignment technology. Based on the extended state constructed from the motor dynamics equations or a Luneburg observer, the instantaneous load torque including external disturbances is estimated in real time, providing the system with high-precision load state perception capability. Furthermore, a dynamic feedforward compensation algorithm is introduced to convert the estimated torque into current commands for linear superposition, directly offsetting the impact of load disturbances on the system and significantly improving response speed. Simultaneously, by establishing a piecewise function form of a nonlinear mathematical model of gear backlash, the system can detect motion... When switching gears or when the speed crosses zero, the backlash compensation mode is automatically triggered. The backlash is filled with a preset adaptive curve and differential negative feedback damping is introduced, which effectively suppresses the impact and vibration at the moment of gear meshing. In addition, a variable gain PID strategy is adopted, which dynamically switches the proportional and integral gain in the light load, medium load and heavy load range according to the magnitude of the instantaneous load torque. This achieves the best balance between response speed and stability under different working conditions, thus solving the technical problems of response lag, overshoot oscillation and insufficient positioning accuracy of traditional servo systems under complex working conditions. This significantly improves the dynamic performance, anti-interference ability and operation stability of the servo system.

[0007] According to one embodiment of this application, the real-time acquisition of the servo motor's operating current and the encoder position feedback signal includes: The orthogonal encoded signal of the output shaft is read using a photoelectric encoder, and the orthogonal encoded signal is counted by four times to obtain a position feedback signal; The position feedback signal is timestamped in units of control cycles.

[0008] According to one embodiment of this application, estimating the instantaneous load torque of the motor using a load observer based on the operating current and the encoder position feedback signal includes: Construct an extended state observer or Luneburg observer based on the equations of motor dynamics; The operating current is used as the input control quantity of the observer, and the position feedback signal is used as the output feedback quantity of the observer. By adjusting the pole configuration parameters of the observer, the equivalent load torque value including external disturbances can be calculated in real time.

[0009] According to one embodiment of this application, the introduction of a dynamic feedforward compensation algorithm in the control process of the speed loop and position loop, and the real-time adjustment of the output current command based on the instantaneous load torque, includes: Divide the instantaneous load torque by the motor torque constant to calculate the feedforward current compensation amount used to counteract load disturbances; The feedforward current compensation amount is linearly superimposed with the base current command output by the speed loop or position loop PID controller; The superimposed total current command is used as the final control input to the current loop.

[0010] According to one embodiment of this application, the step of establishing a nonlinear mathematical model for gear backlash, automatically triggering a backlash compensation mode when a change in motion direction or a zero-point velocity is detected, and filling the mechanical backlash and applying damping through a preset adaptive compensation curve includes: A nonlinear mathematical model of gear backlash with dead zone characteristics is constructed based on piecewise functions. The system monitors the change of speed sign or the state where the absolute speed value is lower than the threshold in real time to trigger the backlash compensation mode. At the instant of switching motion direction, a torque feedforward compensation amount with gradually varying amplitude is applied to fill the mechanical backlash through a preset adaptive curve. After the gap is filled, a differential negative feedback damping term is introduced to suppress the vibration generated at the moment of gear meshing.

[0011] According to one embodiment of this application, the use of a variable gain PID strategy to dynamically adjust the proportional gain and integral gain based on the magnitude of the instantaneous load torque includes: Establish a nonlinear mapping table between instantaneous load torque and PID controller gain parameters, and divide the load torque range into three levels: light load, medium load, and heavy load. When the estimated instantaneous load torque is in the light load range, it automatically switches to the first parameter group; When the estimated instantaneous load torque is in the heavy load range, it automatically switches to the second parameter group.

[0012] According to one embodiment of this application, the method of employing a variable gain PID strategy to dynamically adjust the proportional gain and integral gain based on the magnitude of the instantaneous load torque further includes: When the estimated instantaneous load torque is in the medium load range, it automatically switches to the third parameter group.

[0013] According to one embodiment of this application, the method further includes: A torque limiting protection mechanism is set up so that when the estimated value of the instantaneous load torque exceeds a preset multiple of the rated torque of the motor, the amplitude of the output current command is forcibly limited and an overload alarm signal is triggered.

[0014] According to one embodiment of this application, the method further includes: During the servo motor start-up or reset phase, an inertial identification program is executed to analyze the acceleration response fed back by the encoder and the rotational inertia parameters in the load observer.

[0015] A second aspect of this application provides a servo motor control device, comprising: The data acquisition module is suitable for real-time acquisition of the servo motor's operating current and encoder position feedback signals; The data calculation module is adapted to estimate the instantaneous load torque of the motor based on the operating current and the encoder position feedback signal through a load observer; The command output module is suitable for introducing a dynamic feedforward compensation algorithm during the control process of the speed loop and position loop, and adjusting the output current command in real time according to the instantaneous load torque. The operation control module is suitable for establishing a nonlinear mathematical model of gear backlash. When a change in motion direction or zero speed is detected, the backlash compensation mode is automatically triggered, and the mechanical backlash is filled and damping is applied through a preset adaptive compensation curve. The control adjustment module is suitable for using a variable gain PID strategy to dynamically adjust the proportional gain and integral gain according to the magnitude of the instantaneous load torque. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart illustrating the servo motor control method provided in an embodiment of this application. Detailed Implementation

[0017] To more clearly illustrate the overall concept of this application, a detailed explanation is provided below with reference to the accompanying drawings.

[0018] Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below. It should be noted that, unless otherwise specified, the embodiments of this application and the features thereof can be combined with each other.

[0019] In this application, unless otherwise expressly specified and limited, the "above" or "below" of the second feature can mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediate medium. In the description of this specification, references to terms such as "an embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples.

[0020] like Figure 1 As shown, the first aspect of this application provides a servo motor control method, including: Step S1: Real-time acquisition of the servo motor's operating current and encoder position feedback signal; Step S2: Based on the operating current and encoder position feedback signal, estimate the instantaneous load torque of the motor using a load observer; Step S3: In the control process of speed loop and position loop, a dynamic feedforward compensation algorithm is introduced to adjust the output current command in real time according to the instantaneous load torque; Step S4: Establish a nonlinear mathematical model for gear backlash. When a change in motion direction or zero velocity is detected, the backlash compensation mode is automatically triggered. The mechanical backlash is filled and damping is applied through a preset adaptive compensation curve. Step S5: Employ a variable gain PID strategy to dynamically adjust the proportional gain and integral gain based on the magnitude of the instantaneous load torque.

[0021] First, in step S1, the system collects the motor's operating current and encoder position feedback signal in real time. The orthogonal signal of the photoelectric encoder is used to perform quadruple frequency counting to improve position resolution, and the data is aligned according to the control cycle to provide accurate basic data for subsequent processing.

[0022] Next, in step S2, based on the acquired current (as input control quantity) and position signal (as output feedback quantity), an extended state observer or Luneburg observer is constructed to estimate the instantaneous load torque value including external disturbances in real time according to the motor dynamics equation, thereby achieving accurate perception of the load state.

[0023] Subsequently, in step S3, a dynamic feedforward compensation algorithm is introduced to convert the estimated load torque into a feedforward current compensation amount by dividing it by the torque constant, and then superimposing it on the base current command of the speed loop or position loop, thereby offsetting load disturbances in advance and improving the system response speed.

[0024] To address the nonlinear problem in mechanical transmission, a piecewise function-based nonlinear mathematical model of gear backlash is established in step S4. When a change in motion direction or a zero-point velocity is detected, the backlash compensation mode is automatically triggered. First, the mechanical backlash is smoothly filled by an adaptive curve, and then differential negative feedback damping is introduced to suppress vibration and impact at the moment of meshing.

[0025] Finally, in step S5, a variable gain PID strategy is adopted to automatically switch different control parameters in three ranges: light load, medium load, and heavy load, according to the magnitude of the load torque. A high proportional gain is used to improve the response under light load, a high integral gain is used to suppress overshoot under heavy load, and a balance is maintained under medium load, thereby ensuring that the system can maintain the best dynamic performance and stability under various operating conditions.

[0026] According to the servo motor control method provided in the first aspect of this application, position feedback is accurately obtained using photoelectric encoder quadruple frequency counting and timestamp alignment technology. Based on the extended state constructed from the motor dynamics equations or a Luneburg observer, the instantaneous load torque including external disturbances is estimated in real time, providing the system with high-precision load state perception capability. Furthermore, a dynamic feedforward compensation algorithm is introduced to convert the estimated torque into current commands for linear superposition, directly offsetting the impact of load disturbances on the system and significantly improving response speed. Simultaneously, by establishing a piecewise function form of a nonlinear mathematical model of gear backlash, the system can detect motion... When switching gears or when the speed crosses zero, the backlash compensation mode is automatically triggered. The backlash is filled with a preset adaptive curve and differential negative feedback damping is introduced, which effectively suppresses the impact and vibration at the moment of gear meshing. In addition, a variable gain PID strategy is adopted, which dynamically switches the proportional and integral gain in the light load, medium load and heavy load range according to the magnitude of the instantaneous load torque. This achieves the best balance between response speed and stability under different working conditions, thus solving the technical problems of response lag, overshoot oscillation and insufficient positioning accuracy of traditional servo systems under complex working conditions. This significantly improves the dynamic performance, anti-interference ability and operation stability of the servo system.

[0027] In some embodiments of this application, real-time acquisition of the servo motor's operating current and encoder position feedback signals includes: The orthogonal encoded signal of the output shaft is read by using a photoelectric encoder, and the orthogonal encoded signal is counted by four times to obtain the position feedback signal; The position feedback signal is timestamped in units of control cycles.

[0028] The real-time acquisition of servo motor operating current and encoder position feedback signals is based on the principle of using two orthogonal signals (phase A and phase B) with a 90-degree phase difference output from the photoelectric encoder. By performing full edge detection on the rising and falling edges of these two signals, a fourfold frequency counting is achieved. This increases the position resolution to four times the original pulse count without increasing the physical line count of the encoder, significantly reducing quantization errors. At the same time, the acquired position feedback signals are timestamped in units of control cycles to ensure strict synchronization of data in the time dimension, eliminating data misalignment caused by transmission delays or asynchronous sampling.

[0029] The quadruple frequency technology significantly improves the accuracy of position detection and the sensitivity of low-speed response, enabling the control system to sense even smaller displacement changes and laying a solid foundation for high-precision closed-loop control. The timestamp alignment mechanism ensures that current and position data participate in calculations under the same time reference, avoiding phase lag or control deviation caused by data asynchrony, thereby effectively improving the accuracy of the load observer in estimating instantaneous load torque and the dynamic stability of the entire servo system.

[0030] In some embodiments of this application, the instantaneous load torque of the motor is estimated using a load observer based on the operating current and encoder position feedback signal, including: Construct an extended state observer or Luneburg observer based on the equations of motor dynamics; The operating current is used as the input control quantity of the observer, and the position feedback signal is used as the output feedback quantity of the observer. By adjusting the pole configuration parameters of the observer, the equivalent load torque value including external disturbances can be calculated in real time.

[0031] Based on the dynamic equations of the motor ( ), will the unknown instantaneous load torque ( External disturbances are treated as extended state variables, thus constructing an extended state observer (ESO) or a Romberg observer. In this model, the real-time acquired operating current is used as the input control variable for the observer (used to calculate the electromagnetic torque). The position signal fed back by the encoder is used as the output of the observer. By comparing the output of the internal model of the observer with the actual feedback position signal in real time, the state variables are dynamically corrected using the observation error. By adjusting the pole configuration parameters of the observer (i.e., the observer gain matrix), the dynamic response speed of the observer is made much faster than that of the motor itself, so that the equivalent load torque value including external disturbances can be reconstructed and calculated in real time and accurately.

[0032] It achieves "soft measurement" of load torque, eliminating the need for additional physical torque sensors, thus reducing hardware costs and improving system reliability. Secondly, by estimating load disturbances as extended states in real time, the observer can quickly detect sudden load changes (such as impact loads or frictional changes), providing a high-precision lead signal for subsequent feedforward compensation. Finally, compared to traditional estimation methods based on fixed models, this observer is more robust to small perturbations of motor parameters, ensuring the accuracy of estimation results under different operating conditions, and laying a solid data foundation for achieving high-dynamic-performance servo control.

[0033] In some embodiments of this application, a dynamic feedforward compensation algorithm is introduced during the control process of the speed loop and position loop to adjust the output current command in real time according to the instantaneous load torque, including: Divide the instantaneous load torque by the motor torque constant to calculate the feedforward current compensation amount used to counteract load disturbances. The feedforward current compensation is linearly superimposed with the base current command output by the speed loop or position loop PID controller. The superimposed total current command is used as the final control input to the current loop.

[0034] Specifically, by dividing the instantaneous load torque by the motor's torque constant, the feedforward current compensation amount that generates an equivalent reverse electromagnetic torque is accurately calculated. This compensation amount is then linearly superimposed on the base current command output by the speed loop or position loop PID controller. This superposition operation is equivalent to connecting a feedforward channel in parallel outside the feedback control loop, enabling the system to inject sufficient drive current into the current loop to counteract the disturbance before it causes speed or position deviation, thus achieving proactive, "preemptive" control.

[0035] First, it fundamentally changes the way the system combats load disturbances, shifting from the traditional "error-driven" (i.e., PID adjustment only occurs after an error occurs) to "disturbance suppression" (compensation is performed before the error occurs), greatly improving the system's dynamic response speed and anti-interference capability, and effectively reducing speed drops or position overshoots during sudden load changes. Second, by introducing feedforward compensation, the dependence on the PID gain of the feedback loop can be reduced, avoiding the risk of system oscillation caused by excessively increasing the gain to improve response speed, thus significantly improving control accuracy while ensuring system stability. Finally, this method has low computational complexity, strong real-time performance, and can work closely with the observer, enabling the servo system to maintain a stable and accurate operating state even when facing complex and changing load conditions.

[0036] In some embodiments of this application, a nonlinear mathematical model of gear backlash is established. When a change in motion direction or a zero-point velocity is detected, a backlash compensation mode is automatically triggered. This mode fills the mechanical backlash and applies damping using a preset adaptive compensation curve, including: A nonlinear mathematical model of gear backlash with dead zone characteristics is constructed based on piecewise functions. The system monitors the change of speed sign or the state where the absolute speed value is lower than the threshold in real time to trigger the backlash compensation mode. At the instant of switching motion direction, a torque feedforward compensation amount with gradually varying amplitude is applied to fill the mechanical backlash through a preset adaptive curve. After the gap is filled, a differential negative feedback damping term is introduced to suppress the vibration generated at the moment of gear meshing.

[0037] To address the highly nonlinear component of gear backlash, a common feature in mechanical transmission chains, a dead-zone mathematical model based on piecewise functions is constructed to accurately describe the physical characteristics of gears during commutation: disengagement-idle rotation-contact. The system accurately identifies the switching point or zero-crossing point of the motion direction by real-time monitoring of changes in the velocity sign or whether the absolute velocity value falls below a set threshold, thereby automatically triggering the backlash compensation mode. At the instant commutation is detected, the controller uses a preset adaptive compensation curve to output a torque feedforward compensation amount with gradually varying amplitude that covers the backlash width, actively driving the motor to quickly cross the mechanical dead zone. At the estimated moment of backlash filling completion, a differential negative feedback damping term is immediately introduced, using the damping torque generated by the velocity differential term to absorb the kinetic energy generated by the rigid collision during gear re-meshing, thus achieving closed-loop suppression of backlash nonlinearity throughout the entire process.

[0038] First, it effectively solves the "blind zone" problem caused by backlash near the zero crossing point in traditional PID control, eliminating the resulting limit cycle oscillations and steady-state errors, and significantly improving trajectory tracking accuracy at low speeds. Second, by filling the mechanical backlash with an adaptive curve, it avoids the current surge and mechanical stress caused by traditional hard-switching compensation, achieving smooth torque transition. Finally, the introduction of a differential negative feedback damping term is like adding an "electronic damper" to the mechanical system, greatly suppressing high-frequency vibrations and noise at the moment of gear meshing, which not only improves the dynamic stability of the system but also effectively reduces the wear of mechanical components and extends the service life of the transmission mechanism.

[0039] In some embodiments of this application, a variable gain PID strategy is employed to dynamically adjust the proportional gain and integral gain based on the magnitude of the instantaneous load torque, including: Establish a nonlinear mapping table between instantaneous load torque and PID controller gain parameters, and divide the load torque range into three levels: light load, medium load, and heavy load. When the estimated instantaneous load torque is in the light load range, it automatically switches to the first parameter group; When the estimated instantaneous load torque is in the heavy load range, it automatically switches to the second parameter group.

[0040] Based on the real-time load torque estimated by the observer, the system dynamically classifies the operating conditions into three levels: light load, medium load, and heavy load, and adaptively switches parameters accordingly. In the light load range, the system automatically switches to the first parameter group with high proportional gain and low integral gain. The high proportional gain enhances the system's sensitivity to small errors and accelerates dynamic response, while the integral gain is reduced to prevent overshoot and oscillation caused by low load inertia. In the heavy load range, the system switches to the second parameter group with low proportional gain and high integral gain. The proportional gain is reduced to avoid insufficient phase margin and system instability caused by large load inertia and response lag, while the integral gain is increased to enhance the system's ability to eliminate steady-state errors, ensuring sufficient drive stiffness and disturbance recovery capability even under heavy load.

[0041] It breaks through the limitations of traditional fixed-parameter PID controllers that rely on a single parameter, resolving the contradiction that a single parameter cannot simultaneously achieve high response under light loads and high stability under heavy loads. By dynamically "shifting gears" according to the load, this strategy significantly improves the system's sensitivity and positioning accuracy under light loads, avoiding overshoot; under heavy loads, it effectively enhances the system's robustness and steady-state holding capability, preventing tailing or instability risks. This variable gain strategy enables the servo motor to maintain optimal control performance across the entire load range, greatly improving the equipment's adaptability to complex and changing operating conditions.

[0042] In some embodiments of this application, a variable gain PID strategy is employed to dynamically adjust the proportional gain and integral gain based on the magnitude of the instantaneous load torque, and the method further includes: When the estimated instantaneous load torque is in the medium load range, it automatically switches to the third parameter group.

[0043] When the load torque is at a moderate level, the system's inertia and friction characteristics fall between the "sensitive and prone to vibration" of light load and the "hysteretic and stable" of heavy load. Using a high proportional gain under light load may lead to insufficient phase margin under moderate inertia, causing micro-vibrations. Using a high integral gain under heavy load may result in tracking lag due to slow response. Therefore, by configuring a set of moderate parameters, a suitable response capability to moderate load disturbances is maintained, while control output jitter caused by parameter abrupt changes is avoided.

[0044] First, it constructs a three-level "gain setting" across the entire load range, enabling control parameters to more precisely match actual working conditions and eliminating performance blind spots that may exist with fixed parameters or two-level switching. Second, in scenarios with continuously changing loads (such as the gradual change of a robotic arm from no load to half load), the intermediate load parameter group acts as a buffer, preventing frequent jumps in control gain between high and low levels, thereby ensuring the continuity and stability of the system's dynamic characteristics and further improving the adaptability and robustness of the servo system in complex industrial environments.

[0045] In some embodiments of this application, the method further includes: A torque limiting protection mechanism is set up so that when the estimated value of the instantaneous load torque exceeds a preset multiple of the motor's rated torque, the amplitude of the output current command is forcibly limited, and an overload alarm signal is triggered.

[0046] Based on the instantaneous load torque value estimated by the aforementioned load observer, a software-level "electronic fuse" is constructed. The system compares the estimated load torque with a preset safety threshold in real time (usually set to 1.2 to 1.5 times the rated torque of the motor; the specific multiple can be adjusted according to equipment strength and process requirements). Once a sudden load change or abnormal resistance is detected, causing the estimated value to reach or exceed this threshold, the protection mechanism immediately takes effect: on the one hand, it forcibly clamps the current command amplitude output to the current loop within the safety limit to prevent the driver from continuing to output larger electromagnetic torque, thereby exacerbating the overload; on the other hand, it synchronously triggers an overload alarm signal to notify the host computer or PLC system that an abnormal operating condition has occurred.

[0047] First, it provides dual protection for the motor and mechanical system, effectively preventing motor burnout and transmission mechanism (such as reducer and lead screw) damage caused by external mechanical jamming, collision, or abnormal resistance, significantly improving the safety and reliability of equipment operation. Second, compared with traditional physical mechanical clutches or torque limiters, this mechanism has a faster response speed (microsecond level) and requires no additional hardware costs; precise torque limiting can be achieved through software algorithms. Finally, the linkage between forced limiting and alarm signals not only avoids secondary damage caused by forced operation of equipment under overload conditions but also provides operators with clear fault warnings, facilitating timely troubleshooting of potential problems such as mechanical interference, poor lubrication, or abnormal external loads, thereby reducing maintenance costs and ensuring production safety.

[0048] In some embodiments of this application, the method further includes: During the servo motor startup or reset phase, an inertial identification program is executed to analyze the acceleration response fed back by the encoder and the rotational inertia parameters in the load observer.

[0049] During this stage, the system controls the motor to perform specific acceleration or deceleration actions, utilizing Newton's second law, which states that torque equals moment of inertia multiplied by angular acceleration. The system combines the torque estimate provided by the load observer with the real-time acceleration response calculated from the encoder feedback signal. Using algorithms such as least squares or model reference adaptation, it reverse-engineers the total moment of inertia of the current system (including the motor rotor inertia and the load-adjusted inertia).

[0050] First, it provides accurate physical model parameters for subsequent variable gain PID strategies and dynamic feedforward compensation, as moment of inertia is a key factor determining speed loop bandwidth and gain tuning. Second, by automatically identifying rather than manually estimating, it eliminates parameter mismatch problems caused by load changes (such as a robotic arm grasping workpieces of different weights) or transmission ratio calculation errors, avoiding sluggish system response due to excessive inertia setting or mechanical resonance and howling due to insufficient setting. Finally, this process is completed automatically during startup or reset without user intervention, achieving "plug-and-play" and adaptive optimization of the servo system, significantly improving the equipment's compatibility and control accuracy under different working conditions.

[0051] A second aspect of this application provides a servo motor control device, comprising: The data acquisition module is suitable for real-time acquisition of the servo motor's operating current and encoder position feedback signals; The data calculation module is suitable for estimating the instantaneous load torque of the motor based on the operating current and encoder position feedback signal through a load observer; The command output module is suitable for introducing a dynamic feedforward compensation algorithm in the control process of speed loop and position loop, and adjusting the output current command in real time according to the instantaneous load torque. The operation control module is suitable for establishing a nonlinear mathematical model of gear backlash. When a change in motion direction or zero speed is detected, the backlash compensation mode is automatically triggered, and the mechanical backlash is filled and damping is applied through a preset adaptive compensation curve. The control adjustment module is suitable for using a variable gain PID strategy to dynamically adjust the proportional gain and integral gain according to the magnitude of the instantaneous load torque.

[0052] The servo motor control device provided in the second aspect of this application can implement the servo motor control method in any of the embodiments of the first aspect above, and therefore can achieve any of the technical effects in the above servo motor control method, which will not be elaborated here.

[0053] For any parts not mentioned in this application, existing technologies may be used or referenced.

[0054] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0055] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A servo motor control method, characterized in that, include: Step S1: Real-time acquisition of the servo motor's operating current and encoder position feedback signal; Step S2: Based on the operating current and encoder position feedback signal, estimate the instantaneous load torque of the motor using a load observer; Step S3: In the control process of the speed loop and position loop, a dynamic feedforward compensation algorithm is introduced to adjust the output current command in real time according to the instantaneous load torque; Step S4: Establish a nonlinear mathematical model for gear backlash. When a change in motion direction or zero velocity is detected, the backlash compensation mode is automatically triggered. The mechanical backlash is filled and damping is applied through a preset adaptive compensation curve. Step S5: Employ a variable gain PID strategy to dynamically adjust the proportional gain and integral gain based on the magnitude of the instantaneous load torque.

2. The servo motor control method according to claim 1, characterized in that, The real-time acquisition of the servo motor's operating current and encoder position feedback signals includes: The orthogonal encoded signal of the output shaft is read using a photoelectric encoder, and the orthogonal encoded signal is counted by four times to obtain a position feedback signal; The position feedback signal is timestamped in units of control cycles.

3. The servo motor control method according to claim 1, characterized in that, The step of estimating the instantaneous load torque of the motor using a load observer based on the operating current and encoder position feedback signal includes: Construct an extended state observer or Luneburg observer based on the equations of motor dynamics; The operating current is used as the input control quantity of the observer, and the position feedback signal is used as the output feedback quantity of the observer. By adjusting the pole configuration parameters of the observer, the equivalent load torque value including external disturbances can be calculated in real time.

4. The servo motor control method according to claim 1, characterized in that, In the control process of the speed loop and position loop, a dynamic feedforward compensation algorithm is introduced to adjust the output current command in real time according to the instantaneous load torque, including: Divide the instantaneous load torque by the motor torque constant to calculate the feedforward current compensation amount used to counteract load disturbances; The feedforward current compensation amount is linearly superimposed with the base current command output by the speed loop or position loop PID controller; The superimposed total current command is used as the final control input to the current loop.

5. The servo motor control method according to claim 1, characterized in that, The establishment of a nonlinear mathematical model for gear backlash, when a change in motion direction or zero velocity is detected, automatically triggers a backlash compensation mode, filling the mechanical backlash and applying damping through a preset adaptive compensation curve, including: A nonlinear mathematical model of gear backlash with dead zone characteristics is constructed based on piecewise functions. The system monitors the change of speed sign or the state where the absolute speed value is lower than the threshold in real time to trigger the backlash compensation mode. At the instant of switching motion direction, a torque feedforward compensation amount with gradually varying amplitude is applied to fill the mechanical backlash through a preset adaptive curve. After the gap is filled, a differential negative feedback damping term is introduced to suppress the vibration generated at the moment of gear meshing.

6. The servo motor control method according to claim 1, characterized in that, The adoption of a variable gain PID strategy, which dynamically adjusts the proportional gain and integral gain based on the magnitude of the instantaneous load torque, includes: Establish a nonlinear mapping table between instantaneous load torque and PID controller gain parameters, and divide the load torque range into three levels: light load, medium load, and heavy load. When the estimated instantaneous load torque is in the light load range, it automatically switches to the first parameter group; When the estimated instantaneous load torque is in the heavy load range, it automatically switches to the second parameter group.

7. The servo motor control method according to claim 6, characterized in that, The method of employing a variable-gain PID strategy to dynamically adjust the proportional gain and integral gain based on the magnitude of the instantaneous load torque also includes: When the estimated instantaneous load torque is in the medium load range, it automatically switches to the third parameter group.

8. The servo motor control method according to any one of claims 1 to 7, characterized in that, The method also includes: A torque limiting protection mechanism is set up so that when the estimated value of the instantaneous load torque exceeds a preset multiple of the rated torque of the motor, the amplitude of the output current command is forcibly limited and an overload alarm signal is triggered.

9. The servo motor control method according to any one of claims 1 to 7, characterized in that, The method also includes: During the servo motor start-up or reset phase, an inertial identification program is executed to analyze the acceleration response fed back by the encoder and the rotational inertia parameters in the load observer.

10. A servo motor control device, characterized in that, include: The data acquisition module is suitable for real-time acquisition of the servo motor's operating current and encoder position feedback signals; The data calculation module is adapted to estimate the instantaneous load torque of the motor based on the operating current and the encoder position feedback signal through a load observer; The command output module is suitable for introducing a dynamic feedforward compensation algorithm during the control process of the speed loop and position loop, and adjusting the output current command in real time according to the instantaneous load torque. The operation control module is suitable for establishing a nonlinear mathematical model of gear backlash. When a change in motion direction or zero speed is detected, the backlash compensation mode is automatically triggered, and the mechanical backlash is filled and damping is applied through a preset adaptive compensation curve. The control adjustment module is suitable for using a variable gain PID strategy to dynamically adjust the proportional gain and integral gain according to the magnitude of the instantaneous load torque.