Servo motor acceleration and deceleration curve implementation method and servo motor control system

By combining the Sigmoid function and closed-loop PID control, a smooth servo motor acceleration and deceleration curve is generated, solving the problems of mechanical shock and complex parameter adjustment in existing technologies, and achieving high-precision and stable motion control.

CN121813974APending Publication Date: 2026-04-07SHANDONG SHEENRUN OPTICS & ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing servo motor acceleration and deceleration control methods are prone to mechanical shock, vibration and noise at speed change points, and parameter adjustment is complicated, making it difficult to meet the requirements of high precision and dynamic performance.

Method used

By combining the Sigmoid function with closed-loop PID control, a smooth speed reference curve is generated, and closed-loop control is performed through the PID controller to achieve continuous transition and precise tracking of motor speed.

Benefits of technology

It significantly reduces mechanical vibration and noise during start-up and shutdown, improves motion positioning accuracy and tracking stability, adapts to different load and speed requirements, and reduces computational load and debugging difficulty.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121813974A_ABST
    Figure CN121813974A_ABST
Patent Text Reader

Abstract

The invention provides a servo motor acceleration and deceleration curve implementation method and a servo motor control system, and belongs to the technical field of motor control. The method comprises the following steps: acquiring a target final speed value, a current actual speed value, a target acceleration value and an acceleration efficiency coefficient of the motor servo driver; constructing a smooth speed curve function based on the target final speed value C; calculating the difference value between the target speed and the actual speed, determining the motion direction according to the plus or minus of the difference value, and calculating the theoretical acceleration time T and the smoothing parameter b according to the acceleration; generating a continuous speed reference curve according to the smoothing parameter b and the target final speed C; the speed reference curve serves as a set value of a speed loop, closed-loop control is conducted on the motor through the PID controller, mechanical vibration and noise in the start-stop process are remarkably reduced, the service life of equipment is prolonged, and motion positioning precision and tracking stability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for realizing acceleration and deceleration curves of a servo motor and a servo motor control system, belonging to the field of motor control technology. Background Technology

[0002] With the rapid development of industrial automation, marine equipment, robotics, and precision manufacturing, servo motors, as actuators, directly affect the accuracy, response speed, and stability of systems through their motion control performance. In practical applications, especially in ship deck machinery, machine tool feed systems, and robotic arm joint drives, servo motors often need to frequently switch between different speeds and achieve smooth start-stop and precise positioning.

[0003] Currently, common servo motor acceleration and deceleration control methods mainly include trapezoidal acceleration / deceleration algorithms and S-curve acceleration / deceleration algorithms. Trapezoidal acceleration / deceleration algorithms have a simple structure and low computational load, but acceleration jumps occur at speed abrupt changes, easily leading to mechanical shock, vibration, and noise, affecting equipment lifespan and motion accuracy. S-curve acceleration / deceleration algorithms improve acceleration continuity, but their curve shape is usually composed of piecewise polynomials or trigonometric functions, making parameter adjustment complex, imposing a heavy real-time computational burden, and exhibiting weak adaptability to different loads and dynamic conditions. Furthermore, traditional methods often employ open-loop or simple closed-loop control for speed planning, lacking real-time adaptability to the system's dynamic characteristics. Especially under load changes, inertia fluctuations, or external disturbances, speed tracking is prone to overshoot, oscillation, or response lag, making it difficult to meet the control requirements of high precision and high dynamic performance.

[0004] Therefore, there is an urgent need in this field for a servo motor acceleration and deceleration control method that can ensure smooth motion, achieve adaptive parameter adjustment, and is easy to implement in embedded or industrial controllers. Summary of the Invention

[0005] The purpose of this invention is to provide a method for realizing the acceleration and deceleration curve of a servo motor and a servo motor control system. By combining mathematical functions with closed-loop control, a smooth transition and precise tracking of motor speed can be achieved.

[0006] To achieve the above objectives, the present invention employs the following technical solution: A method for implementing acceleration and deceleration curves of a servo motor includes the following steps: Obtain the target final speed value C, the current actual speed value, the target acceleration value, and the acceleration efficiency coefficient of the motor servo driver; A smooth velocity curve function is constructed based on the target final velocity value C. This function is the Sigmoid function. , in, , For smoothing parameters related to acceleration, It is a time variable; Calculate the difference between the target speed and the actual speed, determine the direction of motion based on the sign of the difference, and calculate the theoretical acceleration time T and the smoothing parameter b based on the acceleration. A continuous velocity reference curve is generated based on the smoothing parameter b and the target final velocity C; Using the speed reference curve as the setpoint for the speed loop, the motor is controlled in a closed loop by a PID controller. The output of the PID controller... for: , in, The deviation between the speed setpoint and the actual value, , , These are the proportional, integral, and differential coefficients, respectively.

[0007] Preferably, the smoothing parameter The calculation formula is: , in, The theoretical acceleration time is obtained by subtracting the actual speed from the target final speed and then dividing by the acceleration. It is the efficiency coefficient for acceleration.

[0008] Preferably, the acceleration efficiency coefficient The value ranges from 0.8 to 0.95 and is used to adjust the smoothness of the transition during the acceleration process of the Sigmoid function.

[0009] Preferably, it also includes direction determination and coefficient initialization processes: Set the direction variable dir; when the target speed is greater than the actual speed, dir=1; otherwise, dir=-1. Set a time variable `timer`, whose initial value is the negative of the theoretical acceleration time `T`.

[0010] Preferably, the method further includes a step of outputting speed waveform data in real time, for monitoring and debugging the speed curve via a serial port or other communication interface.

[0011] A servo motor control system, comprising: The parameter input module is used to obtain the target velocity, acceleration, and efficiency coefficient; A speed curve generation module is used in the servo motor acceleration / deceleration curve implementation method to generate a smooth speed reference curve. The PID control module is used to perform PID calculations based on the deviation between the speed reference curve and the actual speed, and output control signals. The motor drive module is used to drive the servo motor to run according to the control signal.

[0012] Preferably, it also includes a monitoring output module, which is used to output the speed setpoint, actual value and control quantity through the communication interface and display the speed curve in a graphical manner.

[0013] The advantages of this invention are as follows: Using the Sigmoid function as the velocity curve enables continuous acceleration variation, significantly reducing mechanical vibration and noise during start-up and shutdown, and extending equipment lifespan. By adjusting the acceleration efficiency coefficient and smoothing parameters, it can flexibly adapt to different load and speed requirements, improving system adaptability. Combined with PID closed-loop control, it corrects speed deviations in real time, improving motion positioning accuracy and tracking stability. The algorithm structure is clear, with low computational complexity, making it suitable for embedded systems or industrial controllers, reducing development and debugging difficulty. Attached Figure Description

[0014] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0015] Figure 1 This is a schematic diagram of the method flow of the present invention.

[0016] Figure 2 This is a schematic diagram illustrating the effect of the present invention. Detailed Implementation

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

[0018] Example 1 like Figure 1 As shown, a method for implementing acceleration and deceleration curves of a servo motor is proposed. This method utilizes the property that the output range of the Sigmoid function is between (0,1). The time T is used as the data of the x-axis, and the speed output is used as the corresponding f(x). The output of the function is used as the input of the speed loop and controlled by PID.

[0019] Specifically, it includes the following steps: S1: Obtain the target final speed value C, the current actual speed value, the target acceleration value, and the acceleration efficiency coefficient of the motor servo driver; S2: Construct a smooth velocity curve function based on the target final velocity value C. The function is the Sigmoid function. , in, , For smoothing parameters related to acceleration, It is a time variable; S3: Calculate the difference between the target speed and the actual speed, determine the direction of motion based on the sign of the difference, and calculate the theoretical acceleration time T and smoothing parameter b based on the acceleration. S4: Generate a continuous velocity reference curve based on the smoothing parameter b and the target final velocity C; S5: Using the speed reference curve as the setpoint for the speed loop, the motor is controlled in a closed loop by a PID controller. The output of the PID controller... for: , in, The deviation between the speed setpoint and the actual value, , , These are the proportional, integral, and differential coefficients, respectively. This is the time interval from the start of adjustment to the output of the current control value.

[0020] The PID control algorithm is a control algorithm that combines proportional, integral, and derivative components. It is the most mature and widely used control algorithm in continuous systems.

[0021] As a refinement of the above embodiments, the smoothing parameter The calculation formula is: , in, The theoretical acceleration time is obtained by subtracting the actual speed from the target final speed and then dividing by the acceleration. It is the efficiency coefficient for acceleration.

[0022] The following is the derivation process: , , , , , .

[0023] As a refinement of the above embodiments, the acceleration efficiency coefficient The value ranges from 0.8 to 0.95 and is used to adjust the smoothness of the transition during the acceleration process of the Sigmoid function.

[0024] By changing the coefficient of x through the acceleration parameter, the output can be made smoother, such as... Figure 2 The figure shows the graph of the function when the coefficient of x is 1 / 0.08.

[0025] As a refinement of the above embodiments, it also includes a direction determination and coefficient initialization process: Set the direction variable dir; when the target speed is greater than the actual speed, dir=1; otherwise, dir=-1. Set a time variable `timer`, whose initial value is the negative of the theoretical acceleration time `T`.

[0026] As a refinement of the above embodiments, the method further includes a step of outputting speed waveform data in real time, for monitoring and debugging the speed curve through a serial port or other communication interface.

[0027] The program is implemented as follows: pathCfg->actualVelocity=ptrVelocityPid->velocity; / / Calculate coefficients based on velocity and acceleration target=pathCfg->targetVelocity-pathCfg->actualVelocity; pathCfg->coeff=(target>0)?pathCfg->actualVelocity:pathCfg->targetVelocity; pathCfg->dir=(target>0)?1.0:-1.0; pathCfg->targetVelocity=fabs(target); pathCfg->timer=pathCfg->targetVelocity / pathCfg->acc; pathCfg->ratio=pathCfg->timer / log(a / (1.0-a)); pathCfg->timer=-pathCfg->timer; Example 2 A servo motor control system, comprising: The parameter input module is used to obtain the target velocity, acceleration, and efficiency coefficient; A speed curve generation module is used in the servo motor acceleration / deceleration curve implementation method to generate a smooth speed reference curve. The PID control module is used to perform PID calculations based on the deviation between the speed reference curve and the actual speed, and output control signals. The motor drive module is used to drive the servo motor to run according to the control signal.

[0028] As a refinement of the above embodiments, a monitoring output module is also included, which is used to output the speed setpoint, actual value and control quantity through the communication interface and display the speed curve in a graphical manner.

[0029] This disclosure also provides a servo motor acceleration / deceleration curve implementation device, including a processor and a memory. Optionally, the device may further include a communication interface and a bus. The processor, communication interface, and memory can communicate with each other via the bus. The communication interface can be used for information transmission. The processor can call logical instructions in the memory to execute the servo motor acceleration / deceleration curve implementation method of the above embodiments.

[0030] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0031] Memory, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as the program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor executes the program instructions / modules stored in the memory to perform functional applications and data processing, thereby implementing the servo motor acceleration / deceleration curve implementation method in the above embodiments.

[0032] The memory may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory may include high-speed random access memory and may also include non-volatile memory.

[0033] This disclosure provides a computer-readable storage medium storing computer-executable instructions configured to execute the above-described servo motor acceleration / deceleration curve implementation method.

[0034] The aforementioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0035] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this disclosure. The aforementioned storage medium can be a non-transitory storage medium, including: a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media capable of storing program code. It can also be a transient storage medium.

[0036] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for implementing acceleration and deceleration curves of a servo motor, characterized in that, Includes the following steps: Obtain the target final speed value C, the current actual speed value, the target acceleration value, and the acceleration efficiency coefficient of the motor servo driver; A smooth velocity curve function is constructed based on the target final velocity value C. This function is the Sigmoid function. , in, , For smoothing parameters related to acceleration, It is a time variable; Calculate the difference between the target speed and the actual speed, determine the direction of motion based on the sign of the difference, and calculate the theoretical acceleration time T and the smoothing parameter b based on the acceleration. A continuous velocity reference curve is generated based on the smoothing parameter b and the target final velocity C; Using the speed reference curve as the setpoint for the speed loop, the motor is controlled in a closed loop by a PID controller. The output of the PID controller... for: , in, The deviation between the speed setpoint and the actual value, , , These are the proportional, integral, and differential coefficients, respectively.

2. The method for realizing the acceleration and deceleration curve of a servo motor according to claim 1, characterized in that, The smoothing parameter The calculation formula is: , in, The theoretical acceleration time is obtained by subtracting the actual speed from the target final speed and then dividing by the acceleration. It is the efficiency coefficient for acceleration.

3. The method for realizing the acceleration and deceleration curve of a servo motor according to claim 2, characterized in that, The acceleration efficiency coefficient The value ranges from 0.8 to 0.95 and is used to adjust the smoothness of the transition during the acceleration process of the Sigmoid function.

4. The method for realizing the acceleration and deceleration curve of a servo motor according to claim 1, characterized in that, It also includes the direction determination and coefficient initialization process: Set the direction variable dir; when the target speed is greater than the actual speed, dir=1; otherwise, dir=-1. Set a time variable `timer`, whose initial value is the negative of the theoretical acceleration time `T`.

5. The method for realizing the acceleration and deceleration curve of a servo motor according to claim 1, characterized in that, The method also includes a step of outputting speed waveform data in real time, which is used to monitor and debug the speed curve through a serial port or other communication interface.

6. A servo motor control system, characterized in that, include: The parameter input module is used to obtain the target velocity, acceleration, and efficiency coefficient; A velocity curve generation module is used to perform the method as described in any one of claims 1-5 to generate a smooth velocity reference curve; The PID control module is used to perform PID calculations based on the deviation between the speed reference curve and the actual speed, and output control signals. The motor drive module is used to drive the servo motor to run according to the control signal.

7. The servo motor control system according to claim 6, characterized in that, It also includes a monitoring output module, which outputs the speed setpoint, actual value and control quantity through the communication interface to display the speed curve graphically.

8. A device for realizing acceleration and deceleration curves of a servo motor, comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to execute the servo motor acceleration / deceleration curve implementation method as described in any one of claims 1-5 when running the program instructions.

9. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements the servo motor acceleration / deceleration curve implementation method as described in any one of claims 1-5.