Control method for acceleration and deceleration curve optimization stepping motor based on constraint conditions
Through the optimization method of acceleration and deceleration curve based on constraint conditions, the calculation of acceleration and deceleration curve of stepper motor is simplified, and the problems of complex calculation and insufficient load impact in the prior art are solved, so as to achieve fast, high-precision and smooth operation of stepper motors are achieved.
Patent Information
- Application Number
- CN202510597997.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-07-18
AI Technical Summary
The acceleration and deceleration curve calculation of existing stepper motors is complicated, the start-and-stop execution time is long, and the impact of mechanical load is not fully considered, resulting in vibration and blockage problems.
Based on the constraints, by calculating the maximum pulse rate of the stepper motor transmission system, combined with the mechanical load constraints, the acceleration and deceleration curve is generated in reverse, simplifying the calculation and optimizing the acceleration and deceleration process.
It realizes the fast, high-precision and smooth operation of stepper motors in multi-variable displacement scenarios, reducing vibration and blockage, and improving motor performance.
Smart Images

Figure CN120342259A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of stepping motor control, and particularly relates to a control method for optimizing a stepping motor with an acceleration / deceleration curve based on constraint conditions. Background Art
[0002] A stepping motor is a motor that converts an electrical pulse signal into a corresponding angular displacement or linear displacement. Stepping motors play an important role in industrial control systems and are widely used in various occasions that require precise control, such as numerical control machine tools, automation equipment, and robotics. Specifically, as an important part of a digital pathology slide scanning system, a linear stepping motor's focusing and scanning control accuracy and speed greatly affect the image imaging quality and digital slide imaging speed of digital pathology slides. Whether the linear stepping motor is under closed-loop or open-loop control, a reasonable acceleration / deceleration curve can greatly optimize motor control and improve the performance of the linear stepping motor.
[0003] There are already many acceleration / deceleration algorithms for traditional stepping motors that have been widely applied. The trapezoidal acceleration / deceleration has a sudden change in acceleration, which will cause severe vibration or stalling when the stepping motor drives a load at high speed. Although the exponential acceleration / deceleration algorithm has better smoothness than the trapezoidal acceleration / deceleration algorithm, there is still a sudden change in acceleration during the operation of the exponential acceleration / deceleration algorithm. The S-curve acceleration / deceleration algorithm's acceleration and deceleration are similar to the shape of the letter S. Compared with the previous two algorithms, the S-curve acceleration / deceleration algorithm starts and stops smoothly, and is more in line with the characteristics of the stepping motor. However, the calculation is complex, and the start and stop execution times are very long. The complex calculation is not suitable for embedded systems with limited resources, and the S-curve is not suitable for high-speed displacements over extremely short distances and medium-short distances. There is also a curve algorithm that combines the acceleration / deceleration curve with position control, but this algorithm does not fully consider the influence of the load, and the calculation is complex under high-frequency control. Summary of the Invention
[0004] The purpose of the present invention is to provide a control method for optimizing a stepping motor with an acceleration / deceleration curve based on constraint conditions to solve the problems of complex calculation of the existing acceleration / deceleration curve, long start and stop execution times, and insufficient consideration of the influence of mechanical loads in the prior art.
[0005] To achieve the above object, the technical solution adopted by the present invention is:
[0006] A control method for optimizing a stepping motor with an acceleration / deceleration curve based on constraint conditions, comprising the following steps:
[0007] S1. Calculate the maximum pulse rate of the stepping motor under the stepping motor drive system according to the push frequency characteristics;
[0008] S2. Convert the stepping motor speed into the displacement within the unit control time, and introduce two constraint conditions related to the mechanical load based on the displacement within the unit control time;
[0009] S3. Under the two constraint conditions, inversely calculate the total displacement in the acceleration stage based on the maximum pulse rate of the stepping motor;
[0010] S4. Compare and classify the input displacement with the total displacement in the acceleration stage to obtain the acceleration and deceleration curve of the stepping motor.
[0011] Further, in S1, the maximum pulse rate of the stepping motor under the stepping motor drive system is:
[0012]
[0013] In the formula, n max is the maximum pulse rate; N is the stepping motor subdivision; T f is the running torque; A and B are the coefficients of the linear function of the thrust; P B is the lead screw pitch; β is the product of the percentage of the normal state running current to the rated current and the mechanical transmission efficiency.
[0014] Further, the running torque T f is:
[0015]
[0016] In the formula, F A is the external force applied in the moving direction; g is the acceleration due to gravity; m3 is the mass of the load part; μ is the friction coefficient; θ is the angle between the moving direction and the horizontal axis; η is the mechanical transmission efficiency.
[0017] Further, S2 specifically includes:
[0018] Convert the stepping motor speed into the displacement within the unit control time:
[0019] S i = x i t c
[0020] In the formula, x i is the pulse rate at the i-th time; t c is the unit control time of the stepping motor; S i is the unit pulse number;
[0021] According to the mechanical load and the torque-frequency characteristic, introduce two constraint conditions, which include:
[0022] Constraint 1. When there is a mechanical load limit, the stepping motor pulse rate at the current moment and the stepping motor pulse rate at the next moment satisfy:
[0023] abs(s(k)-s(k-1))≤P k
[0024] Where abs is the absolute value expression; s(k) is the unit pulse number of the k-th pulse rate; s(k-1) is the unit pulse number of the k-1-th pulse rate; P k It is the maximum unit pulse number difference of the stepper motor at adjacent moments;
[0025] Constraint 2: When there is a mechanical load, the stepper motor starts to meet the following conditions:
[0026] s(0)≤P k =P T
[0027] Where s(0) is the first solution set in the acceleration phase; P T It is the maximum unit speed displacement when the stepper motor starts.
[0028] Furthermore, the maximum speed difference P of the stepper motor at adjacent moments k Specifically:
[0029] According to the dynamic model of the stepper motor feed system, the angular acceleration α of the stepper motor is calculated:
[0030]
[0031] Where f is the frequency; D is the screw diameter; m1 is the mass of the coupling; m2 is the mass of the screw; m3 is the mass of the load; J B For mechanical damping;
[0032] According to the angular acceleration α, calculate the maximum unit pulse number difference P of the stepper motor at adjacent moments k :
[0033]
[0034] The maximum unit pulse number difference P of the stepper motor at adjacent moments k Combined with the angular acceleration α, we get:
[0035]
[0036] Where s(i-1) is the i-1th solution set in the acceleration phase; x i is the motor pulse rate of the ith time in the acceleration phase solution set, x i-1 is the i-1th motor pulse rate in the solution set of the acceleration phase; b is the maximum thrust of the stepper motor.
[0037] Furthermore, the S3 specifically includes:
[0038] Under the condition of Constraint 1, inversely calculate the number of unit pulses of the stepping motor at the maximum pulse rate n max as follows:
[0039] s(k - 1) = s(k) - P k
[0040] The inverse calculation stops until the following conditions are met:
[0041]
[0042] where s(k - n + 1) is the (k - n + 1)-th of the solution set in the acceleration stage; P k-n+1 is the difference between the (k - n + 1)-th and the (k - n)-th of the solution set in the acceleration stage, and s(k - n) is the (k - n)-th of the solution set in the acceleration stage;
[0043] From the inverse calculation under the condition of Constraint 1, n = k; when n = k, s(0) ≤ P T , satisfying the condition of Constraint 2. Therefore, the total displacement in the acceleration stage at this time is:
[0044]
[0045] where S u is the total displacement in the acceleration stage.
[0046] Furthermore, the specific steps of S4 include:
[0047] Compare and classify the input displacement S with the total displacement S in the acceleration stage u as follows:
[0048]
[0049] When it is in Equation (1), after the stepping motor reaches the maximum pulse rate, it is in uniform motion or enters deceleration motion, and a corresponding acceleration and deceleration curve of the stepping motor is generated;
[0050] When it is in Equation (2), the specific comparison and classification are as follows:
[0051]
[0052] When it is in Equation (21), traverse and calculate s(w) until the following conditions are met:
[0053]
[0054] where, when , a corresponding acceleration and deceleration curve of the stepping motor is generated;
[0055] When When it is, a new value of s(w) is generated, and the corresponding acceleration and deceleration curve of the stepping motor is generated; the formula for the new value of s(w) is:
[0056]
[0057] When it is in Equation (22), s(w) is calculated iteratively until the following conditions are met:
[0058]
[0059] Among them, when it is, the corresponding acceleration and deceleration curve of the stepping motor is generated;
[0060] If it is, a new value of s(w) is generated, and the corresponding acceleration and deceleration curve of the stepping motor is generated; the formula for the new value of s(w) is:
[0061]
[0062] In the formula, s(n - i) is the (n - i)-th of the solution set in the acceleration stage; w is the index of the solution that meets the conditions obtained by traversing the solution set in the acceleration stage; s(w) is the w-th of the solution set in the acceleration stage.
[0063] The control method for optimizing the stepping motor with an acceleration and deceleration curve based on constraint conditions provided by the present invention has the following beneficial effects:
[0064] 1. The present invention provides an optimization method for the acceleration and deceleration curve of a stepping motor that can improve the speed as much as possible and operate smoothly and precisely in view of the scenario where the focus and scanning control in a similar digital slice scanning system have extremely short displacements with variable displacements and require fast, high-precision, and stable operation. It can solve the problems that the existing acceleration and deceleration curves have start-stop vibrations and out-of-step during rapid movement under load, cannot fully utilize the high-precision characteristics of the stepping motor, and are prone to stalling during short-distance rapid displacement. This acceleration and deceleration curve control method can effectively ensure the control of the stepping motor, and has rapidity, accuracy, and stability under variable displacements, and fully optimizes the performance of the stepping motor.
[0065] 2. The present invention generates an acceleration and deceleration curve based on the maximum speed inverse algorithm with two constraint conditions, simplifies the computational complexity of generating the acceleration and deceleration, and ensures that the stepping motor can operate smoothly at the highest possible speed in various transmission systems and has high-precision characteristics; because the stepping motor is a pulse-driven motor, the speed can be converted into the displacement within a unit time, so that the acceleration and deceleration curve can be applied to various non-fixed displacements. Description of the Drawings
[0066] Figure 1 is a flowchart of the control method for optimizing the stepping motor with an acceleration and deceleration curve based on constraint conditions of the present invention.
[0067] Figure 2 This is a schematic diagram of the stepping motor drive system of the present invention.
[0068] Figure 3 This is the theoretical speed - thrust curve of the stepping motor of the present invention.
[0069] Figure 4 This is the first displacement acceleration - deceleration curve of the present invention.
[0070] Figure 5 This is the second displacement acceleration - deceleration curve of the present invention.
[0071] Figure 6 This is the third displacement acceleration - deceleration curve of the present invention.
[0072] Figure 7 This is the fourth displacement acceleration - deceleration curve of the present invention.
[0073] Figure 8 This is the control system framework of the present invention.
[0074] Figure 9 This is the actual speed - thrust curve of the stepping motor of the present invention.
[0075] Figure 10 This is the speed change curve of the stepping motor of the present invention.
[0076] Figure 11 This is the stepping motor pulse rate change curve corresponding to 50 pps of pulse number of the present invention.
[0077] Figure 12 This is the stepping motor pulse rate change curve corresponding to 100 pps of pulse number of the present invention.
[0078] Figure 13 This is the stepping motor pulse rate change curve corresponding to 500 pps of pulse number of the present invention. Detailed implementation manners
[0079] The following describes the detailed implementation manners of the present invention to facilitate those skilled in the art of the present technology to understand the present invention. However, it should be clear that the present invention is not limited to the scope of the detailed implementation manners. For those of ordinary skill in the art of the present technology, as long as various changes are within the spirit and scope of the present invention defined and determined by the appended claims, these changes are obvious, and all inventions created using the concept of the present invention are within the scope of protection.
[0080] Example 1
[0081] A control method for optimizing the acceleration and deceleration curve of a stepping motor based on constraint conditions in this embodiment effectively improves the driving performance of the stepping motor, can adapt to various application scenarios with high precision, speed, and multiple start-stop operations, improves the open-loop control accuracy, and reduces costs. At the same time, it can enhance the stability of closed-loop control and effectively prevent problems such as motor vibration and loss of steps and stall caused by excessive motor acceleration or speed. Refer to Figure 1 , and it specifically includes the following steps:
[0082] Step S1: Calculate the maximum pulse rate of the stepping motor under the stepping motor drive system according to the push frequency characteristics, which specifically includes the following content:
[0083] The theoretical curve corresponding to the push frequency characteristics of the stepping motor is as shown in Figure 2 . When the running frequency f0 is very small, the thrust T is basically constant. When the frequency f increases, the thrust T decreases approximately linearly with the frequency f. Therefore, in the case of a mechanical load in a linear stepping motor, there is a maximum rotational speed. Based on this, calculate the maximum pulse rate corresponding to the maximum rotational speed of the stepping motor under the stepping motor drive system:
[0084] Refer to Figure 3 , approximate the push frequency characteristic curve as a monotonically decreasing curve, and its linearization formula is:
[0085] F = Af + B
[0086] Convert the thrust F into torque:
[0087]
[0088] For a stepping motor with a mechanical load, even when the stepping motor is in a uniform motion state, a certain torque is required to prevent stalling. This torque is the running torque, and its expression is:
[0089]
[0090] Based on this, the maximum pulse rate of the stepping motor under the stepping motor drive system is:
[0091]
[0092] In the formula, n max is the maximum rotational speed; N is the stepping motor subdivision; T f is the running torque; A and B are the coefficients of the linear function of the thrust; P B is the lead of the lead screw; β is the product of the percentage of the normal operating current to the rated current and the mechanical transmission efficiency; F A is the external force applied in the moving direction; g is the acceleration due to gravity; m3 is the mass of the load part; μ is the friction coefficient; θ is the angle between the moving direction and the horizontal axis; η is the mechanical transmission efficiency.
[0093] The mechanical efficiency of the lead screw drive of the stepper motor is 0.9. Therefore, the maximum value of β in this drive system is 0.9. However, in actual engineering applications, the losses of the stepper motor need to be considered, so this value will be appropriately reduced.
[0094] Step S2: Convert the speed of the stepper motor into the displacement within the unit control time, and introduce two constraints related to the mechanical load based on the displacement within the unit control time. The specific content is as follows:
[0095] Determine the unit control time t of the stepper motor c and the maximum pulse rate n max , and regard the total displacement accelerated to the maximum pulse rate as a combination of the number of pulses in multiple unit control times. Assume S i is the number of pulses x i within the unit control period (hereinafter referred to as the unit pulse number). x i is the pulse rate at the i-th time. The pulse rate shall not exceed the maximum pulse rate. The expression is as follows:
[0096] S i = x i t c
[0097] When the pulse rate x i reaches the maximum pulse rate n max , the total acceleration displacement can be obtained by successive superposition; according to different displacements, a set of unit pulse numbers is formed. When the number of unit pulse numbers used is the least, the displacement to reach the maximum pulse rate is the shortest.
[0098] According to the mechanical load and the torque-frequency characteristic, introduce two constraints, including:
[0099] Constraint 1: When there is a mechanical load limit, in order to avoid the stepper motor torque being insufficient and causing out-of-step, the pulse rate of the stepper motor at the current moment and the pulse rate of the stepper motor at the next moment satisfy:
[0100] abs(s(k)-s(k - 1)) ≤ P k
[0101] In the formula, abs is the absolute value expression; s(k) is the unit pulse number of the pulse rate at the k-th time; s(k - 1) is the unit pulse number of the pulse rate at the (k - 1)-th time; P k is the maximum difference in the unit pulse number of the stepper motor between adjacent moments;
[0102] Constraint 2: When there is a mechanical load, in order to prevent the stepper motor from failing to start and overshooting during startup, resulting in a decrease in control accuracy and the service life of the stepper motor, the stepper motor startup satisfies:
[0103] s(0) ≤ P k = P T
[0104] Where s(0) is the first one in the solution set of the acceleration stage; P T is the maximum unit speed displacement at the starting moment of the stepping motor.
[0105] The holding torque refers to the torque when the stator locks the rotor while the stepping motor is powered on but not rotating, and is usually considered as the maximum value of the operating torque under the rated current. Therefore, the maximum number of unit pulses at the starting moment is P T ; s(i) is the number of unit pulses of the last pulse rate.
[0106] The difference P between the maximum number of unit pulses of the stepping motor at adjacent moments k is calculated as follows:
[0107] Build the dynamic model of the stepping motor drive system as:
[0108] J C α + J L a + J B α + Kα + T f = T
[0109] Where a is the linear acceleration; α is the angular acceleration; J C is the moment of inertia; J L is the load moment of inertia; J B is the sum of coefficients such as mechanical damping and electromagnetic damping; K is the system elastic coefficient; T f is the operating torque; T is the total torque that the stepping motor needs to generate.
[0110] Among them, the calculation of the moment of inertia J C , the load moment of inertia J L and the relationship between the angular acceleration α and the linear acceleration a are:
[0111]
[0112] Where D is the lead screw diameter; m1 is the mass of the coupling part; m2 is the mass of the lead screw part; m3 is the mass of the load part.
[0113] Ignoring the system elastic coefficient, the angular acceleration α is:
[0114]
[0115] According to the angular acceleration α, calculate the difference P between the maximum number of unit pulses of the stepping motor at adjacent moments k :
[0116]
[0117] The difference P in the maximum unit pulse number of the stepper motor at adjacent moments k is combined with the angular acceleration α to obtain:
[0118]
[0119] In the formula, N is the stepper motor subdivision; s(i - 1) is the (i - 1)-th of the solution set in the acceleration stage; x i is the motor pulse rate at the i-th time in the solution set, and x i-1 is the motor pulse rate at the (i - 1)-th time in the solution set; b is the maximum thrust of the stepper motor.
[0120] Replacing the thrust part with the holding torque gives the following formula:
[0121]
[0122] In the formula, T k is the holding torque of the stepper motor.
[0123] Step S3: Under two constraint conditions, inversely calculate the total displacement in the acceleration stage based on the maximum pulse rate of the stepper motor, which specifically includes the following content:
[0124] Since the maximum pulse rate is known, the pulse rate per unit time in the acceleration section is calculated in a decreasing manner from the maximum pulse rate. From the push-frequency characteristic of the stepper motor, it can be obtained that the unit pulse rate calculated in this way can meet the two constraint conditions and thus simplify the calculation complexity. Therefore, the total displacement in the acceleration stage is calculated as:
[0125] Calculate the unit pulse number s(k) at the maximum pulse rate n max , where k is the last index of the solution set in the acceleration stage; under the condition of Constraint 1, inversely calculate the rate unit pulse number at the maximum pulse rate n max :
[0126] s(k - 1) = s(k) - P k
[0127] Record the unit pulse number obtained by each inverse calculation to obtain the optimal acceleration in each stage. Stop the inverse calculation after n inverse calculations when the following conditions are obtained, and it can be obtained that n = k:
[0128]
[0129] In the formula, s(k - n + 1) is the (k - n + 1)-th of the solution set in the acceleration stage; P k-n+1 is the difference between the (k - n + 1)-th and the (k - n)-th of the solution set in the acceleration stage; s(k - n) is the (k - n)-th of the solution set in the acceleration stage;
[0130] Backward calculation under a constraint condition gives n = k; when n = k, s(0) ≤ P T , satisfying the condition of Constraint 2. Therefore, the total displacement in the acceleration phase at this time is:
[0131]
[0132] In the formula, S u is the total displacement in the acceleration phase.
[0133] Step S4: Compare and classify the input displacement with the total displacement in the acceleration phase to obtain the acceleration-deceleration curve of the stepping motor, which specifically includes the following:
[0134]
[0135] When it is Equation (1), after the pulse rate of the stepping motor reaches the maximum pulse rate, it is in uniform motion or enters deceleration motion, and the corresponding acceleration-deceleration curve of the stepping motor is generated, such as Figure 4 and Figure 5 ;
[0136] When it is Equation (2), the comparison and classification are specifically as follows:
[0137]
[0138] When it is Equation (21), use the algorithm to traverse and calculate s(w) until the following conditions are met:
[0139]
[0140] Among them, when , the corresponding acceleration-deceleration curve of the stepping motor is generated;
[0141] When , a new value of s(w) is generated, and the corresponding acceleration-deceleration curve of the stepping motor is generated, such as Figure 6
[0142] The formula for the new value of s(w) is:
[0143]
[0144] When it is Equation (22), use the algorithm to traverse and calculate s(w) until the following conditions are met:
[0145]
[0146] Among them, when , the corresponding acceleration-deceleration curve of the stepping motor is generated;
[0147] If When this occurs, a new value of s(w) is generated, and the corresponding acceleration and deceleration curve of the stepping motor is generated, such as Figure 7 ;
[0148] The formula for the new value of s(w) is:
[0149]
[0150] In the formula, s(n - i) is the (n - i)-th in the solution set of the acceleration stage; w is the index of the solution that meets the conditions obtained by traversing the solution set of the acceleration stage; s(w) is the w-th in the solution set of the acceleration stage.
[0151] Embodiment 2
[0152] In this embodiment, the algorithm in Embodiment 1 is verified. The overall control system framework is as Figure 8 . The main controller is composed of an STM32F4 series single-chip microcomputer and its peripheral circuits, which are responsible for coordinating the information interaction with the host, controlling the motor drive and the acceleration and deceleration algorithm. The motor drive is composed of a TMC2660 motor drive chip and its peripheral circuits. TMC2660 is a high-performance stepping motor drive chip, which integrates a microstep indexer, current energy-saving control and a high-precision chopping algorithm, has high-precision subdivision, and can be set up to 256 subdivisions at most, meeting the high-precision drive requirements under various working conditions. TMC2660 has two communication modes. In this embodiment, SPI communication is used to write parameters such as the number of subdivisions and peak current through registers, and then the PWM is input through the pin STEP to drive the stepping motor. In this way, the motor speed can be arbitrarily changed by changing the frequency of the PWM, and the stepping motor can be controlled more flexibly. In the test, a 16-bit SSI optical encoder is selected for feedback, with the model: BRT50-S1M16BIT-RT1, and the linear stepping motor model: 20E228-S1-0504. The motor parameters are shown in Table 2-1 below.
[0153] Table 2-1 Specific parameters of the stepping motor
[0154] Lead of thread 1mm Thread diameter 3.5mm Full-step pitch 5μm Rated voltage 2.55V Rated phase current 0.5A Rated inductance 1.7hm ± 20% Rated resistance 5.1Ω ± 10% Step angle 1.8° Ambient temperature -20℃~+50℃ Holding torque 0.015 Nm
[0155] Set the number of subdivisions of the drive chip to 256, the control period to 500HZ, without a coupling, the weights of the lead screw and the load are 200g and 250g respectively, and the parameters A and B of the linear function of the thrust and the frequency. Refer to the actual stepping motor thrust-frequency characteristic curve as Figure 9 , where 1, 2, and 4 are the thread leads, a is -0.0125, and b is 42.5. Refer to Figure 10 , the maximum speed can be obtained as 858rpm, and the speed per unit control time in the acceleration stage is as follows in the table:
[0156] Table 2-2 Speed per unit time in the acceleration stage - without subdivision
[0157]
[0158] In the case of no micro-stepping, the number of pulses in the acceleration stage is 88 pps, and the number of pulses sent by the stepper motor test is 50 pps, 100 pps, and 500 pps respectively. Refer to Figure 11 、 Figure 12 and Figure 13 , where the speed per unit time in the acceleration stage of 500 pps is the same as that in Table 2-3.
[0159] Table 2-3 Speed per unit time in the displacement acceleration stage of 50 pps - no micro-stepping
[0160]
[0161] Table 2-4 Speed per unit time in the acceleration stage of 100 pps - no micro-stepping
[0162]
[0163] The algorithm of the present invention is compared with the common open-loop algorithm of stepper motors, and the experimental results are shown in Tables 2-5 and 2-6;
[0164] Table 2-5 Common open-loop algorithm of stepper motors
[0165]
[0166]
[0167] The maximum speed of the common open-loop algorithm cannot be the same as that of the algorithm in this article, and the common open-loop algorithm will cause the phenomenon of motor stalling.
[0168] Table 2-6 Open-loop algorithm of stepper motors based on constraints
[0169]
[0170] From the above two tables, it can be obtained that when the stepper motor uses the open-loop algorithm in this article, the average time for the same distance is increased by 17.14%, and the average accuracy is increased by 46.3%.
[0171] Although the specific implementation manners of the invention have been described in detail with reference to the accompanying drawings, it should not be construed as a limitation on the protection scope of this patent. Within the scope described in the claims, various modifications and deformations that can be made by those skilled in the art without creative efforts still fall within the protection scope of this patent.
Claims
1. A control method for optimizing a stepping motor based on a constraint-based acceleration and deceleration curve, characterized in that, Including the following steps: S1. Calculate the maximum pulse rate of the stepper motor under the stepper motor drive system according to the frequency pushing characteristics; S2. Convert the stepper motor speed into the displacement within the unit control time, and introduce two constraint conditions related to the mechanical load based on the displacement within the unit control time; S3. Under the two constraint conditions, inversely calculate the total displacement in the acceleration stage based on the maximum pulse rate of the stepper motor; S4. Compare and classify the input displacement with the total displacement in the acceleration stage to obtain the stepper motor acceleration and deceleration curve.
2. The control method for optimizing a stepping motor based on a constraint-based acceleration / deceleration curve according to claim 1, wherein In S1, the maximum pulse rate of the stepper motor under the stepper motor drive system is: Wherein, is the maximum pulse rate; is the stepping motor subdivision; is the running torque; A and B are the coefficients of the linear function of the thrust; is the lead screw pitch; is the product of the percentage of the normal state operating current and the rated current and the mechanical transmission efficiency.
3. The control method for optimizing the stepping motor based on the acceleration and deceleration curve according to the constraint conditions as described in claim 2, wherein The operating torque is as follows: Wherein, is the external force applied in the moving direction; is the acceleration due to gravity; is the mass of the load part; is the coefficient of friction; is the angle between the moving direction and the horizontal axis; is the mechanical transmission efficiency.
4. The control method for optimizing the stepping motor based on the acceleration and deceleration curve according to claim 2, wherein S2 specifically includes: Convert the stepper motor speed into the displacement within the unit control time: Wherein, is the pulse rate at the i-th time; is the unit control time of the stepping motor; is the number of unit pulses; According to the mechanical load and the torque-frequency characteristics, introduce two constraint conditions, which include: Constraint 1. When there is a mechanical load limit, the pulse rate of the stepper motor at the current moment and the pulse rate of the stepper motor at the next moment satisfy: Wherein, is an absolute value expression; is the number of unit pulses of the pulse rate at the k-th time; is the number of unit pulses of the pulse rate at the (k - 1)-th time; is the maximum difference in the number of unit pulses of the stepping motor at adjacent times; Constraint 2. When there is a mechanical load, the stepper motor starts to satisfy: In the formula, is the first one in the solution set of the acceleration stage; is the maximum unit speed displacement at the starting moment of the stepping motor.
5. The control method for optimizing the stepping motor based on the acceleration and deceleration curve according to claim 4, wherein Maximum speed difference of the stepper motor at adjacent moments Specifically: According to the dynamic model of the stepper motor feed system, the angular acceleration of the stepper motor is calculated : Wherein, is the frequency; D is the lead screw diameter; is the mass of the coupling part; is the mass of the lead screw part; is the mass of the load part; is the mechanical damping; According to the angular acceleration , calculate the maximum difference in the number of unit pulses of the stepper motor at adjacent moments : The maximum unit pulse number difference of the stepper motor at adjacent moments and angular acceleration Combined, we get: In the formula, is the (i - 1)-th of the solution set in the acceleration stage; is the motor pulse rate at the i-th time in the solution set of the acceleration stage, is the motor pulse rate at the (i - 1)-th time in the solution set of the acceleration stage; b is the maximum thrust of the stepper motor.
6. The control method for optimizing the stepping motor based on the acceleration and deceleration curve under constraints according to claim 4, characterized in that, S3 specifically includes: Under the condition of Constraint 1, inversely calculate the number of unit pulses of the stepping motor at the maximum pulse rate : The inverse calculation stops until the following conditions are met: In the formula, is the (k - n + 1)-th of the solution set in the acceleration stage; is the difference between the (k - n + 1)-th and the (k - n)-th of the solution set in the acceleration stage is the (k - n)-th of the solution set in the acceleration stage; The reverse calculation under a constraint condition gives n = k; when n = k, , the condition of Constraint 2 is satisfied, so the total displacement in the acceleration stage at this time is: In the formula, is the total displacement in the acceleration stage.
7. The control method for optimizing the stepping motor based on the acceleration and deceleration curve according to claim 4, characterized in that, S4 specifically includes: The input displacement is compared with the total displacement in the acceleration phase for classification: When it is formula (1), after the stepper motor reaches the maximum pulse rate, it is in uniform motion or enters the deceleration motion, and the corresponding stepper motor acceleration and deceleration curve is generated; When it is formula (2), the comparison and classification are specifically: When it is in the form of formula (21), traverse and calculate until the following conditions are met: Among them, when occurs, a corresponding stepper motor acceleration and deceleration curve is generated; When it generates a new value and generates the corresponding acceleration and deceleration curve of the stepper motor; Among them The new value formula is as follows: When it is in the form of formula (22), perform traversal calculations until the following conditions are met: Among them, when then a corresponding stepper motor acceleration and deceleration curve is generated; If is true, a new value of is generated, and the corresponding acceleration and deceleration curve of the stepper motor is generated; among them The formula for the new value is: In the formula, is the (n - i)-th of the solution set in the acceleration stage; is the index for obtaining the qualified solution by traversing the solution set in the acceleration stage; is the w-th of the solution set in the acceleration stage.