CN-115411983-B - Acceleration and deceleration curve optimization method, control method and system of stepping motor
Abstract
The invention relates to an acceleration and deceleration curve optimization method, a control method and a system of a stepping motor, which relate to the technical field of stepping motor control and are characterized in that the motion process of the stepping motor is divided into four non-zero starting and stopping rotation modes, the method comprises a uniform speed mode, a uniform acceleration mode, a uniform deceleration non-zero crossing point mode and a uniform deceleration zero crossing point mode, pulse generation time and adjacent pulse generation time intervals are calculated for each mode respectively, and an acceleration and deceleration curve is optimized based on the pulse generation time and the generation time intervals in the four modes. The stepping motor is driven to start from a certain speed by utilizing the optimized acceleration and deceleration curve, and compared with a linear acceleration and deceleration curve started from a static state, the stepping motor has smaller dynamic torque required in the acceleration process and better control performance under the condition of acceleration to medium and high speed.
Inventors
- WANG BANGJI
- LIU JIE
- LIU QINGXIANG
- WU PENGCHENG
- QIU SONG
Assignees
- 西南交通大学
Dates
- Publication Date
- 20260508
- Application Date
- 20220402
Claims (6)
- 1. An acceleration and deceleration curve optimization method of a stepping motor is characterized by comprising the following steps: Inputting at least one control period and initial angular speed and angular displacement of a stepping motor corresponding to each control period, wherein the control period is arbitrarily set time for controlling the stepping motor to rotate; Calculating an angular acceleration according to each of the control periods, the initial angular velocity, and the angular displacement under the condition that the stepping motor is in an operating state; Judging a rotation mode corresponding to the stepping motor according to the initial angular speed and the angular acceleration, wherein the rotation mode comprises a uniform speed mode, a uniform acceleration mode, a uniform deceleration zero crossing point mode and a uniform deceleration zero crossing point mode; calculating the occurrence time of each pulse and the occurrence time interval of adjacent pulses sent to the stepping motor in each control period based on the rotation mode; Obtaining an optimized acceleration and deceleration curve according to all the occurrence moments and the occurrence moment intervals under all the control periods; When the rotation mode is the uniform speed mode, the expression of the adjacent pulse generation time interval is as follows: Wherein c i is the generation time interval of the ith and the (i-1) th pulse sent to the stepping motor in a uniform speed mode, f is the working clock frequency of a processor, T is a control period, n is a step number, eta is the step angle of the stepping motor, theta 1 is the angular displacement in the uniform speed mode, and theta 1 =ω 0 T;ω 0 is the initial angular speed of the stepping motor; When the current rotation mode is the uniform acceleration mode, the expression of the adjacent pulse generation time interval is as follows: Wherein c i is the generation time interval of the ith and the (i-1) th pulse sent to the stepping motor in the uniform acceleration mode, f is the working clock frequency of a processor, omega 0 is the initial angular speed, T is the control period, eta is the step angle of the stepping motor, and theta 2 is the angular displacement in the uniform acceleration mode, |theta 2 |>|ω 0 T|; when the current rotation mode is the uniform deceleration non-zero crossing mode, the expression of the adjacent pulse generation time interval is as follows: Wherein c i is the generation time interval of the ith and the (i-1) th pulses sent to the stepping motor in the uniform deceleration non-zero crossing mode, f is the working clock frequency of a processor, omega 0 is the initial angular velocity, T is the control period, eta is the stepping angle of the stepping motor, and theta 3 is the angular displacement in the uniform deceleration non-zero crossing mode, and 0.5 |ω 0 T|≤|θ 3 |<|ω 0 T|; When the current rotation mode is a deceleration mode in the uniform deceleration zero crossing mode, the expression of the adjacent pulse generation time interval sent to the stepping motor is as follows: Wherein c i is the occurrence time interval of the ith and the (i-1) th pulses sent to the stepper motor in the deceleration mode in the uniform deceleration zero crossing mode, f is the working clock frequency of the processor, omega 0 is the initial angular velocity, T is the control period, eta is the stepping angle of the stepper motor, theta 4 is the angular displacement in the uniform deceleration zero crossing mode, and theta 4 is <0.5 Omega 0 T|;T A is the control period in the deceleration mode, theta 41 is the angular displacement in the uniform deceleration mode; When the current rotation mode is an acceleration mode in the uniform deceleration zero crossing mode, the expression of the adjacent pulse generation time interval sent to the stepping motor is as follows: Wherein T B is a control period in the acceleration mode, and θ 42 is an angular displacement in the acceleration mode.
- 2. The acceleration and deceleration curve optimization method according to claim 1, characterized in that the acceleration and deceleration curve optimization method is performed using pipeline technology.
- 3. The method for optimizing an acceleration/deceleration curve according to claim 1, wherein the determining a rotation mode corresponding to the stepper motor according to the initial angular velocity and the angular acceleration specifically includes: judging whether the value of the angular acceleration is 0 or not to obtain a first judgment result; If the first judgment result is yes, determining that the rotation mode is a uniform speed mode; If the first judgment result is negative, judging whether the sign values of the initial angular velocity and the angular acceleration are the same, and obtaining a second judgment result; if the second judgment result is yes, determining that the rotation mode is a uniform acceleration mode; if the second judgment result is negative, judging whether half of the absolute value of the product of the initial angular velocity and the control period is smaller than or equal to the absolute value of the angular displacement, and obtaining a third judgment result; If the third judgment result is yes, determining that the rotation mode is a uniform deceleration non-zero crossing mode; Otherwise, determining the rotation mode to be a uniform deceleration zero crossing mode.
- 4. A stepper motor control system, wherein the control system is a stepper motor controller IP core designed on an FPGA chip, the IP core comprising: the interface module is connected with the soft core processor through an Avalon bus and is used for sending a control instruction of the soft core processor to the curve algorithm module; The curve algorithm module is connected with the interface module and is used for executing the acceleration and deceleration curve optimization method according to claim 1 by adopting a pipeline technology after receiving the control instruction to obtain an optimized acceleration and deceleration curve; the pulse generation module is connected with the curve algorithm module and used for outputting pulses according to the optimized acceleration and deceleration curve and controlling the stepping motor to rotate according to the pulses.
- 5. The stepper motor control system of claim 4, wherein the curve algorithm module is provided with clock gating, the curve algorithm module controlling the clock gating according to the time for performing the acceleration and deceleration curve optimization method of claim 1.
- 6. A stepping motor control method using the control system according to any one of claims 4 to 5, comprising: Receiving a control instruction of a soft core processor; according to the control instruction, adopting a pipeline technology to execute the acceleration and deceleration curve optimization method as claimed in claim 1 to obtain an optimized acceleration and deceleration curve; outputting a pulse according to the optimized acceleration and deceleration curve; And controlling the stepping motor to rotate according to the pulse.
Description
Acceleration and deceleration curve optimization method, control method and system of stepping motor Technical Field The invention relates to the technical field of stepping motor control, in particular to a linear acceleration and deceleration curve optimization method, a linear acceleration and deceleration curve control method and a linear acceleration and deceleration curve control system for a stepping motor. Background The stepping motor is an executive component for converting a digital pulse sequence into an angular displacement increment, has the characteristics of low cost, quick start and stop, high positioning precision and the like, and is widely applied to the fields of robots, numerical control machine tools, automation equipment and the like. The control method of the stepping motor comprises an open loop and a closed loop. The closed-loop control has the characteristics of high control precision and high efficiency, but the system cost and the implementation complexity are also higher. With the development of subdivision driving technology, the synchronization capability of angular displacement output and tracking pulse input is continuously improved, and then the phenomena of step loss, impact oscillation and the like can be effectively avoided through the optimization of a proper acceleration and deceleration curve algorithm. Because the open loop control is simple to realize, the control precision can meet most application requirements, and is a main control mode of the stepping motor, the current research is mainly focused on acceleration and deceleration curve optimization and specific realization. Researchers at home and abroad propose many optimization schemes of stepping motor acceleration and deceleration curve algorithms, mainly including linear, S-shaped, normal vector and the like. The S-shape and the orthographic shape can well inhibit the impact and the residual oscillation in the motion process, but are not suitable for the occasion of quick requirement on dynamic response. Meanwhile, the two acceleration and deceleration curve algorithms are complex in implementation process, and the accurate real-time calculation difficulty is high. The linear acceleration and deceleration curve algorithm is simple to implement and quick in response, and has the characteristic of time optimization. At present, most of linear acceleration and deceleration curves are started and stopped at zero speed, the self-starting and stopping frequency and moment-frequency characteristics of a stepping motor are not fully utilized, and the control performance of the stepping motor is difficult to fully develop. Therefore, there is a need for a linear acceleration and deceleration curve optimization method based on a non-zero start-stop state of a stepper motor, and control of rotation of the stepper motor based on the optimization method, so as to improve control performance of the stepper motor. Disclosure of Invention The invention aims to provide an acceleration and deceleration curve optimization method, a control method and a system for a stepping motor, which realize non-zero starting and stopping of the stepping motor and improve the control performance of the stepping motor. In order to achieve the above object, the present invention provides the following solutions: an acceleration and deceleration curve optimization method of a stepping motor comprises the following steps: Inputting at least one control period and initial angular speed and angular displacement of a stepping motor corresponding to each control period, wherein the control period is arbitrarily set time for controlling the stepping motor to rotate; Calculating an angular acceleration according to each of the control periods, the initial angular velocity, and the angular displacement under the condition that the stepping motor is in an operating state; Judging a rotation mode corresponding to the stepping motor according to the initial angular speed and the angular acceleration, wherein the rotation mode comprises a uniform speed mode, a uniform acceleration mode, a uniform deceleration zero crossing point mode and a uniform deceleration zero crossing point mode; calculating the occurrence time of each pulse and the occurrence time interval of the adjacent pulse under each control period based on the rotation mode; And obtaining an optimized acceleration and deceleration curve according to all the occurrence moments and the occurrence moment intervals under all the control periods. A stepper motor control system, the control system being a stepper motor controller IP core designed on an FPGA chip, the IP core comprising: The interface module is connected with the soft core processor and is used for sending a control instruction of the soft core processor to the curve algorithm module; the curve algorithm module is connected with the interface module and is used for executing an acceleration and deceleration curve optimization meth