Stepping motor operation control method and device, terminal and medium

By calculating the motor speed and electrical angular velocity to generate a voltage vector control strategy with a lead angle, the problems of current distortion and torque collapse in two-phase hybrid stepper motors at high speeds are solved, and the motor can achieve stable operation and maintain average torque in the voltage saturation region.

CN122495907APending Publication Date: 2026-07-31上海先楫半导体科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
上海先楫半导体科技有限公司
Filing Date
2026-03-09
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

At high speeds, the back electromotive force amplitude of a two-phase hybrid stepper motor increases linearly with the mechanical angular velocity, causing the voltage margin to be rapidly depleted. Traditional current command output control strategies suffer from current distortion and torque collapse, leading to step loss or stalling.

Method used

By acquiring the actual motor speed and electrical angular velocity of the stepper motor, calculating the voltage amplitude and generating a voltage vector by combining it with the lead angle, and using the limited voltage vector for control, the motor can be bypassed by the current PI bandwidth limitation, thus achieving stable operation in the voltage saturation region.

Benefits of technology

Even under voltage constraints, it can still form a periodic steady state, maintain average torque, avoid current distortion and torque collapse, and improve the motor's operating stability and efficiency at high speeds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122495907A_ABST
    Figure CN122495907A_ABST
Patent Text Reader

Abstract

This application provides a stepper motor operation control method, device, terminal, and medium. The method includes: acquiring the actual motor speed and electrical angular velocity of the target stepper motor in the current PWM cycle through the encoder of the target stepper motor; calculating the voltage amplitude of the current PWM cycle based on the target motor speed and the actual motor speed in the current PWM cycle; obtaining the lead angle of the current PWM cycle based on the electrical angular velocity of the target stepper motor in the current PWM cycle using a lead angle calculation model based on a time-domain injection strategy; generating a voltage vector for the current PWM cycle based on the lead angle and the voltage amplitude; and controlling the target stepper motor accordingly based on the voltage vector of the current PWM cycle after limiting its amplitude. This application bypasses the current PI bandwidth limitation by combining voltage control with voltage vector lead, allowing the motor to operate in the voltage saturation region while still achieving periodic steady-state operation and averaging torque even when the voltage is limited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of motor control technology, and in particular to a stepper motor operation control method, device, terminal and medium. Background Technology

[0002] Two-phase hybrid stepper motors typically have a high number of teeth (high equivalent pole pair count), which leads to the following problems at high speeds: the back electromotive force (EMF) amplitude increases linearly with the mechanical angular velocity, rapidly depleting the voltage margin. At high speeds, the electrical angular frequency is extremely high, and the winding inductance makes it difficult for the current to build up and follow quickly. Furthermore, when the back EMF exceeds the usable voltage across most of the electrical angle range, traditional current command output control strategies suffer from current distortion and torque collapse, resulting in step loss or stalling. Summary of the Invention

[0003] In view of the shortcomings of the prior art described above, the purpose of this application is to provide a stepper motor operation control method, device, terminal and medium to solve the problems of current distortion and torque collapse that occur in existing motor control strategies.

[0004] To achieve the above and other related objectives, a first aspect of this application provides a stepper motor operation control method, comprising: obtaining the actual motor speed and electrical angular velocity of the target stepper motor in the current PWM cycle through the encoder of the target stepper motor; calculating the voltage amplitude of the current PWM cycle based on the target motor speed and the actual motor speed of the target stepper motor in the current PWM cycle; obtaining the lead angle of the current PWM cycle based on the electrical angular velocity of the target stepper motor in the current PWM cycle through a lead angle calculation model based on a time-domain injection strategy; generating a voltage vector of the current PWM cycle based on the electrical angular velocity and voltage amplitude of the target stepper motor in the current PWM cycle, and in combination with the lead angle of the current PWM cycle; limiting the voltage vector of the current PWM cycle; and performing corresponding control on the target stepper motor based on the limited voltage vector of the current PWM cycle.

[0005] In some embodiments of the first aspect of this application, calculating the voltage amplitude of the current PWM cycle based on the target motor speed and the actual motor speed of the target stepper motor in the current PWM cycle includes: calculating the speed difference of the target stepper motor in the current PWM cycle based on the target motor speed and the actual motor speed of the target stepper motor in the current PWM cycle; inputting the speed difference of the target stepper motor in the current PWM cycle into a pre-built PI controller to obtain the voltage amplitude of the current PWM cycle; wherein, the PI controller is: ; and among them, The speed difference of the target stepper motor in the current PWM cycle. This represents the voltage amplitude for the current PWM cycle. These are the weight parameters.

[0006] In some embodiments of the first aspect of this application, the lead angle calculation model based on the time-domain injection strategy is as follows: ;in, The electrical angular velocity of the current PWM cycle. For the amplitude limiting function, For a predetermined lead angle coefficient, The maximum lead angle is predetermined.

[0007] In some embodiments of the first aspect of this application, the voltage vector of the current PWM cycle is generated based on the electrical angular velocity and voltage amplitude of the target stepper motor in the current PWM cycle, and in combination with the lead angle of the current PWM cycle. This includes: obtaining the control angle of the current PWM cycle through a control angle calculation model based on the lead angle of the current PWM cycle and the electrical angular velocity of the target stepper motor in the current PWM cycle; and generating the voltage vector of the current PWM cycle based on the control angle and voltage amplitude of the current PWM cycle.

[0008] In some embodiments of the first aspect of this application, the control angle calculation model is as follows: ;in, The electrical angular velocity of the current PWM cycle. The lead angle of the current PWM cycle. The control angle for the current PWM cycle. This represents the modulation angle for the current PWM cycle.

[0009] In some embodiments of the first aspect of this application, generating a voltage vector for the current PWM cycle based on the control angle and voltage amplitude of the current PWM cycle includes: performing an inverse Park transform based on the control angle and voltage amplitude of the current PWM cycle to generate voltage components in a two-phase stationary coordinate system, and outputting them as the voltage vector for the current PWM cycle; wherein the formula for the inverse Park transform is: ; ; and among them, These are the voltage components in the two-phase stationary coordinate system during the current PWM cycle. This represents the voltage amplitude for the current PWM cycle. The d-axis voltage of the current PWM cycle. This is the control angle for the current PWM cycle.

[0010] In some embodiments of the first aspect of this application, the speed difference of the target stepper motor in the current PWM cycle is input to a pre-built PI controller to obtain the voltage amplitude of the current PWM cycle, including: inputting the speed difference of the target stepper motor in the current PWM cycle to the pre-built PI controller to obtain the initial voltage amplitude of the current PWM cycle; subtracting the initial voltage amplitude of the current PWM cycle from the calculated damping voltage of the current PWM cycle to obtain the final voltage amplitude of the current PWM cycle; wherein the calculation process of the damping voltage of the current PWM cycle includes: calculating the acceleration of the current PWM cycle based on the actual rotational speed of the current PWM cycle and the actual rotational speed of the previous PWM cycle; and calculating the damping voltage of the current PWM cycle based on the acceleration of the current PWM cycle and a predetermined damping coefficient.

[0011] To achieve the above and other related objectives, a second aspect of this application provides a stepper motor operation control device, comprising: an acquisition module, configured to acquire the actual motor speed and electrical angular velocity of the target stepper motor in the current PWM cycle through the encoder of the target stepper motor; a voltage amplitude calculation module, configured to calculate the voltage amplitude of the current PWM cycle based on the target motor speed and the actual motor speed of the target stepper motor in the current PWM cycle; a voltage vector generation module, configured to obtain the lead angle of the current PWM cycle based on the electrical angular velocity of the target stepper motor in the current PWM cycle through a lead angle calculation model based on a time-domain injection strategy; and generate a voltage vector of the current PWM cycle based on the electrical angular velocity and voltage amplitude of the target stepper motor in the current PWM cycle, combined with the lead angle of the current PWM cycle; and a motor control module, configured to limit the voltage vector of the current PWM cycle and perform corresponding control on the target stepper motor based on the limited voltage vector of the current PWM cycle.

[0012] To achieve the above and other related objectives, a third aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the stepper motor operation control method.

[0013] To achieve the above and other related objectives, a fourth aspect of this application provides an electronic terminal, including a memory, a processor, and a computer program stored in the memory; the processor executes the computer program to implement the stepper motor operation control method.

[0014] As described above, the stepper motor operation control method, device, terminal and medium of this application have the following beneficial effects: This application bypasses the current PI bandwidth limitation by combining voltage control and voltage vector lead, so that the motor can work in the voltage saturation region and can still form a periodic steady state and average torque when the voltage is limited. Attached Figure Description

[0015] Figure 1 The diagram shown is a flowchart of a stepper motor operation control method in one embodiment of this application.

[0016] Figure 2 The diagram shown is a schematic block diagram of a stepper motor operation control device according to an embodiment of this application.

[0017] Figure 3 The diagram shown is a structural schematic of an electronic terminal according to an embodiment of this application. Detailed Implementation

[0018] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.

[0019] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" do not necessarily imply that they are different.

[0020] It should be noted that, in the embodiments of this application, the words "exemplary" or "for example" indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0021] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0022] Before providing a further detailed description of the present invention, the nouns and terms used in the embodiments of the present invention are explained, and the nouns and terms used in the embodiments of the present invention are subject to the following interpretations:

[0023] <1> Two-phase hybrid stepping motor: It is an open-loop digital control motor. By energizing the two-phase windings in a specific timing sequence, the rotor can rotate precisely step by step, achieving precise angular displacement control. It also combines the advantages of permanent magnet and variable reluctance motors.

[0024] <2> Back electromotive force (EMF): In a two-phase hybrid stepper motor, the rotor has an axial permanent magnet. When the rotor is driven to rotate / pulled by an external force, the permanent magnet continuously cuts the stator A and B phase winding coils. According to the law of electromagnetic induction, an electromotive force (EMF) is induced in the windings. According to Lenz's law, this EMF always opposes the change in current in the windings and the movement of the rotor; therefore, it is called back EMF.

[0025] <3> Voltage margin: Voltage margin = Bus voltage that the driver can provide - Back EMF currently generated by the motor - Voltage drop required by the resistor / inductor.

[0026] <4> Electrical angular frequency: In a two-phase hybrid stepper motor, the rotor contains permanent magnets. Rotation induces a periodic alternating voltage (back electromotive force) in the stator windings. Each time the rotor rotates through one tooth pitch angle, the electrical signal completes one full electrical cycle. The electrical angular frequency is the angular frequency of this back electromotive force signal, directly determined by the rotor's mechanical speed and the motor's structure.

[0027] <5> Lead angle: The lead angle refers to the angle at which the current / voltage needs to be applied to the windings in advance when the motor rotor is rotating.

[0028] <6> Lead Angle Coefficient: The lead angle coefficient is a correction parameter used to advance the application of current / voltage. Its core function is to compensate for the electromagnetic delay of the motor, improve high-speed performance, and increase output torque. The lead angle coefficient is not a direct angle value, but a proportional coefficient used to automatically calculate the lead angle based on the rotational speed. Lead Angle = Lead Angle Coefficient × Rotational Speed ​​(or Electrical Angular Velocity)

[0029] <7> Maximum lead angle: The maximum lead angle is the lead angle saturation limit value.

[0030] Before describing the stepper motor operation control method of the present invention, the control logic of the present invention will be explained first:

[0031] This invention can be viewed as a two-loop control system, consisting of a position loop and a speed loop. It should be understood that the position loop and speed loop represent a logical functional division. Before the motor starts operating, motor parameters and control parameters need to be configured, including but not limited to the number of pole pairs, bus voltage, voltage limit, lead angle coefficient, maximum lead angle, and damping coefficient. It should be understood that configuring motor parameters and control parameters includes: the number of pole pairs, bus voltage, voltage limit, lead angle coefficient, maximum lead angle, and damping coefficient. It should be understood that the number of pole pairs describes the number and pairing of magnetic poles in the motor stator magnetic field, directly determining the motor's synchronous speed, rated speed, and operating characteristics; it is a key indicator for motor selection, speed regulation, and calculation. Bus voltage is the DC or AC voltage value on the main power supply line, serving as the common power supply voltage reference for all loads and equipment on that branch. The bus is a common conductor (copper busbar, aluminum busbar, cable busbar, PCB copper plating, etc.) used in the system to collect, distribute, and transmit electrical energy; it is the main power supply line for the entire circuit / equipment. Voltage limiting refers to using circuits or algorithms to forcibly restrict the voltage at a certain point within a set upper and lower limit range, prohibiting it from exceeding the upper limit or falling below the lower limit; any excess is truncated, thus confining the output voltage within a safe and permissible range. Advance angle refers to the electrical angular offset by which the current vector / commutation time / voltage vector is electrically advanced relative to the permanent magnet's magnetic field position, the zero-crossing point of the back EMF, or the conventional commutation point, in order to compensate for back EMF and optimize commutation. Damping coefficient refers to the adjustment coefficient in a closed-loop control system used to suppress system oscillations, reduce overshoot, and accelerate response convergence, applying a "resistance / braking effect" to the system. Essentially, it adds a damping effect to the dynamic process, allowing the system to quickly return to a stable state from fluctuations.

[0032] When the motor is running, given a target position, the deviation between the target position and the actual position fed back by the encoder is used as the input to the position loop. After PID calculation in the position loop, a speed command is obtained. Then, the speed given by the position loop and the actual speed fed back by the encoder are used as the input to the speed loop. The output of the speed loop is used to drive the inverter, which in turn drives the motor. The core of the inverter is PWM (Pulse Width Modulation).

[0033] The control method of the present invention will be described in detail below:

[0034] To facilitate understanding of the embodiments of this application, firstly, in conjunction with Figure 1 Detailed explanation. Figure 1 A flowchart illustrating a stepper motor operation control method according to an embodiment of the present invention is shown. The stepper motor operation control method in this embodiment mainly includes the following steps:

[0035] Step S101: Obtain the actual motor speed and electrical angular velocity of the target stepper motor in the current PWM cycle through the encoder of the target stepper motor.

[0036] In one specific embodiment, the target stepper motor is a two-phase hybrid stepper motor.

[0037] In one embodiment, a motor encoder is also deployed on the motor, which is a core sensor used to detect the position and speed of the motor rotor in real time. The encoder's acquisition frequency is equal to the PWM acquisition frequency to ensure stable and accurate control. That is, the encoder acquisition period is equal to the PWM period. In each PWM period, the encoder measures the actual position (mechanical angle of the motor rotor) and the actual motor speed (which can be expressed as mechanical speed or mechanical angular velocity). Further, the encoder can calculate the electrical angle and electrical angular velocity based on the number of pole pairs. It should be understood that the method by which the encoder calculates the electrical angle and electrical angular velocity can refer to existing technology, and will not be elaborated here.

[0038] Step S102: Calculate the voltage amplitude of the current PWM cycle based on the target motor speed and the actual motor speed of the target stepper motor in the current PWM cycle.

[0039] It should be understood that the target motor speed of the target stepper motor in the current PWM cycle refers to the instantaneous speed command value that the speed loop expects the motor rotor to reach.

[0040] Before detailing step S102, let's first describe the existing technology. The existing technology mainly employs a three-loop control system: a position loop, a speed loop, and a current loop. It should be understood that the position loop, speed loop, and current loop represent a logical functional division. When a target position is given (e.g., the motor shaft needs to rotate 100°), the deviation between the target position and the actual position fed back by the encoder is used as the input to the position loop. After PID calculation in the position loop, a speed command is obtained. Then, the speed given by the position loop and the actual speed fed back by the encoder are used as the input to the speed loop. After PI calculation in the speed loop, a current command is obtained. Based on the current command, the current loop outputs a PWM duty cycle to drive the inverter, and thus the motor. However, this method has a problem:

[0041] The time-domain voltage balance equation of the motor is:

[0042] (1)

[0043] At ultra-high speeds of the motor, the back electromotive force It is a sine wave with a huge amplitude and an extremely high frequency (thousands of hertz).

[0044] In existing current closed-loop control, the task of the current loop PI regulator is to regulate... To eliminate current errors. To maintain a constant current or change according to instructions, the PI controller needs to output a value that is analogous to... The voltage waveforms must be approximately synchronously canceled, while also covering... and The required voltage. When the number of pole pairs of the motor is very high (e.g., 50 pairs) and the speed is extremely high, The rate of change is extremely fast. A traditional PI controller is a linear feedback system with a limited response speed (i.e., bandwidth). When... When the frequency approaches or exceeds the PI bandwidth, the voltage output of the PI lags significantly and cannot be balanced in time. This leads to current runaway. Even with sufficient PI bandwidth, its output is limited by bus voltage and modulation saturation. When the electrical angle is significantly greater than the usable output voltage over most of the electrical angle range, the PI cannot cancel out. It can only reach saturation, thus losing its linear regulation capability.

[0045] To address the problems of existing technologies, this invention employs a speed loop output voltage amplitude method to bypass the current loop bandwidth limitation. Step S102 specifically includes:

[0046] Calculate the target motor speed of the target stepper motor in the current PWM cycle. and actual motor speed The deviation between them is used as the speed difference of the target stepper motor in the current PWM cycle. The specific formula is shown below:

[0047] (2)

[0048] Next, the speed difference of the target stepper motor in the current PWM cycle is... The input is fed into a pre-built PI controller, and the voltage amplitude output by the PI controller is used as the voltage amplitude for the current PWM cycle. The built PI controller is shown below:

[0049] (3)

[0050] in, This represents the voltage amplitude for the current PWM cycle. For proportional gain, For integral gain, It can be determined in advance through simulation debugging.

[0051] It should be noted that, compared to the existing technology where the speed loop outputs a current command, which is then processed by a current PI controller to obtain a voltage command, this invention directly outputs the voltage amplitude from the speed loop as the voltage command. Because this invention omits the dynamic current PI controller, the transmission from the speed command to the voltage vector output no longer includes the phase lag and bandwidth limitations of the current loop. The speed loop PI controller only needs to adjust the macroscopic amplitude of the energy input on a mechanical time scale (milliseconds), while the high-frequency phase synchronization of the voltage vector is directly determined by position feedback.

[0052] In a preferred embodiment, to suppress low-speed oscillations and mechanical resonances in voltage mode and improve global domain availability, specifically, based on the actual rotational speed of the current PWM cycle... and the actual speed of the previous PWM cycle The acceleration of the current PWM cycle is calculated using the following formula 4. :

[0053] (4)

[0054] Where Ts is the length of the PWM period.

[0055] Furthermore, based on the acceleration of the current PWM cycle The damping voltage of the current PWM cycle is calculated using the following formula 5. :

[0056] (5)

[0057] in, The damping coefficient can be determined through simulation and debugging.

[0058] Furthermore, the voltage amplitude output by the PI controller is the initial voltage amplitude of the current PWM cycle. The initial voltage amplitude of the current PWM cycle is subtracted from the damping voltage to obtain the final voltage amplitude of the current PWM cycle. :

[0059] (6)

[0060] Step S103: Based on the electrical angular velocity of the target stepper motor in the current PWM cycle, obtain the lead angle of the current PWM cycle through the lead angle calculation model based on the time-domain injection strategy; based on the electrical angular velocity and voltage amplitude of the target stepper motor in the current PWM cycle, and combined with the lead angle of the current PWM cycle, generate the voltage vector of the current PWM cycle.

[0061] The main purpose of step S103 is to align the voltage vector with the window by using a lead angle to maximize injection. This is because the back electromotive force... It is a sine wave. Near a certain phase (e.g., around 90° electrical angle), the back electromotive force reaches its positive peak. At ultra-high speeds, this peak value is much larger than the bus voltage. (For example, common 24V and 36V). Without control, current cannot be injected at all. However, within an electrical cycle, there is always a phase interval that... Smaller. Within this range, it's more likely that the margin condition for the usable output voltage will be met (e.g., the equivalent usable voltage after modulating the bus voltage is smaller than...). (There is a difference), thus forming a usable injection window.

[0062] A lead angle can advance the voltage vector on the time axis. Without a lead angle, the dominant phase of the voltage vector is more likely to fall within the high-amplitude range of the back EMF. In this case, insufficient available voltage due to bus voltage limiting leads to a significant decrease in injection efficiency or even failure. The maximum lead angle can shift the peak value of the voltage vector to a region where the back EMF is low, thus utilizing this voltage difference (…). ), forcibly injecting current into the coil.

[0063] Next, the process of determining the lead angle of the current PWM cycle will be explained:

[0064] The electrical angular velocity of the target stepper motor in the current PWM cycle is input into the lead angle calculation model based on the time-domain injection strategy to obtain the lead angle of the current PWM cycle.

[0065] Furthermore, the lead angle calculation model based on the time-domain injection strategy is as follows:

[0066] (7)

[0067] in, The electrical angular velocity of the current PWM cycle. For a predetermined lead angle coefficient, For the predetermined maximum lead angle, For the amplitude limiting function, It is an absolute value function.

[0068] Right now, .

[0069] Further explanation of the lead angle coefficient and the method for determining the maximum lead angle:

[0070] When given parameters ( ), This is the lead angle coefficient. To determine the maximum lead angle, the steps for calculating the maximum achievable speed are as follows:

[0071] First, establish the voltage-current relationship:

[0072] In the dq rotating coordinate system, the steady-state voltage equation of the motor is:

[0073] (8)

[0074] in, For electrical angular velocity, It is a permanent magnet flux linkage.

[0075] Next, in voltage mode, the voltage vector is controlled by the lead angle. Decide:

[0076] (9)

[0077] in, .

[0078] Then, substituting the applied voltage into the voltage equation, the current can be solved:

[0079] (10)

[0080] Start at a low speed and gradually increase. Calculate the corresponding .when When the speed drops to the threshold where frictional losses cannot be overcome, this speed is the maximum achievable speed under this parameter combination.

[0081] The process for determining the maximum lead angle is as follows:

[0082] Define the search space, which consists of the search range of the leading angle coefficients and the maximum leading angle range:

[0083] The search range for the leading angle coefficient is: Step length ;

[0084] The maximum lead angle range is: Step length .

[0085] It should be noted that as well as It can be set according to needs; there are no restrictions here.

[0086] For each (in the search space) Combinations of (e.g., ) are used to calculate the maximum achievable speed in the manner described above. Combinations that do not meet the constraints (e.g., ) are eliminated. (Exceeding the thermal limit), among the combinations that satisfy the constraints, the combination with the highest maximum speed is selected. Finally, the optimal combination is determined. The optimal combination of ( ) and the corresponding maximum speed and operating point current. In the combination The predetermined lead angle coefficient is given in Formula 7 above. The maximum lead angle is the one predetermined as described in Formula 7 above.

[0087] The specific calculation process for the control angle includes:

[0088] Based on the lead angle of the current PWM cycle and the electrical angular velocity of the target stepper motor in the current PWM cycle, the control angle of the current PWM cycle is obtained using the control angle calculation formula; where the control angle calculation formula is:

[0089] (10)

[0090] in, The control angle for the current PWM cycle. The modulation angle for the current PWM cycle. It is the lead angle of the current PWM cycle (always positive). It is a basic mathematical function whose core function is to determine the sign of a number and return the numerical value corresponding to its sign.

[0091] This means that even at ultra-high speeds, the applied voltage vector can still maintain a definite phase relationship with the rotor electrical angle, thus avoiding the bottleneck that the current PI needs to track and cancel the back electromotive force at high frequencies.

[0092] Furthermore, a voltage vector is generated based on the control angle and voltage magnitude:

[0093] Specifically, based on the d-axis alignment with the rotor magnetic field direction, assuming the voltage amplitude output by the speed loop is... , (This invention does not employ field weakening control), so the voltage components in the two-phase stationary coordinate system are generated by the inverse Park transform. :

[0094] (11)

[0095] (12)

[0096] Step S104: Limit the voltage vector of the current PWM cycle, and control the target stepper motor accordingly based on the limited voltage vector of the current PWM cycle.

[0097] Furthermore, ( The voltages are fed into the A-phase and B-phase H-bridges respectively for PWM modulation. The actual output voltage vector amplitude is limited by the bus voltage. ,when The output voltage is automatically limited (saturated) to ensure it does not exceed the maximum usable output voltage determined by the bus voltage, and the output voltage vector is allowed to saturate under the limiting condition. The system then enters the nonlinear periodic steady-state operating region.

[0098] It should be noted that the angle used for modulation / inverse conversion is from Replace with This is equivalent to advancing the applied voltage vector in electrical angle. Its core purpose is not to change the definition of the coordinate axes, but to change the timing of the voltage vector's action, so that the voltage vector acts more concentratedly on... A smaller phase range with a larger available voltage margin improves the effective injection and average torque per unit electrical cycle.

[0099] That is, when the voltage vector leads After the corner:

[0100] Near the zero-crossing region of BEMF The main component acts precisely on this point, and can be represented by the instantaneous difference between the voltage vector magnitude and the back electromotive force amplitude. The current build-up rate is the highest. In the BEMF peak region, due to the significantly insufficient available output voltage margin, the system no longer relies on continuous hard countermeasures with the applied voltage. The current is maintained from instantaneous interruption primarily by the continuity of the inductor current (freewheeling / energy release). This timing alignment allows the preferential bus voltage to be efficiently utilized within the injection window, rather than wasted in saturation limiting to combat high BEMF. In one embodiment, the stepper motor of the present invention is a two-phase hybrid stepper motor employing two-phase windings (A-phase winding and B-phase winding). The A-phase and B-phase windings together generate a rotating magnetic field with controllable direction and angle, enabling the motor rotor to precisely step, position, and maintain torque. The present invention utilizes the current continuity and energy exchange of the winding inductance to prevent the current from immediately disappearing in the back EMF peak region, thereby obtaining a non-zero periodic average torque.

[0101] Specifically, for any single-phase winding, its time-domain voltage equation is:

[0102] (13)

[0103] in, The amplitude exceeds the bus voltage. The sinusoidal back electromotive force. One electrical cycle is divided into two phases:

[0104] Energy storage stage:

[0105] Using the lead angle, align the voltage vector. The zero-crossing point or low-value region. At this time The voltage margin is relatively small, and the modulation output may not saturate; the effective voltage margin is used more to establish the current. A large positive current change rate can be obtained, and the current rises rapidly. The power source injects energy into the inductor, which is converted into magnetic field energy and stored.

[0106] Energy release phase:

[0107] The motor rotates to The peak region, at this time Theoretically, the power source can no longer drive the current, and the current begins to decrease. However, due to the characteristics of inductance, the current cannot change abruptly; a decrease in current will induce a positive high voltage across the inductor. This induced voltage reflects the release of previously stored energy by the inductor, causing... Within a relatively large phase range with limited output voltage, the current will not instantaneously become zero, but will decay at a certain slope and remain continuous, thereby obtaining a non-zero average torque over the entire cycle.

[0108] It should be understood that this invention utilizes inductance to redistribute energy along the time axis: establishing current and storing magnetic field energy within a phase window with low back EMF, and releasing energy in a phase region with high back EMF to maintain current continuity. Without this precondition of establishing current within a window, the current will not be established when entering... In ranges significantly larger than the available output voltage, the current will rapidly decay to near zero, and the average torque will be insufficient to sustain operation.

[0109] To better illustrate the motor operation control method of the present invention, the current waveform characteristics are now described:

[0110] In actual measurements, the phase current generally exhibits an approximate sine wave (two phases are orthogonal). The main reasons include: the control uses voltage vector rotation (FOC / Park / InvPark) combined with SVPWM / two-phase modulation, and the target voltage vector changes continuously with the electrical angle; the winding inductance has a filtering effect on voltage saturation / clipping, so that the current remains continuously changing rather than an ideal rectangular pulse; in the extreme ultra-high speed range, voltage saturation will introduce certain harmonic distortion, but the current still remains continuous, controllable, and generally close to a sine wave (the degree of distortion is related to the load, bus voltage, and winding parameters).

[0111] The advantages of this invention are:

[0112] The control method of this invention can be applied to both low-speed and high-speed motor scenarios without the need for low-speed / high-speed mode switching. Angle compensation changes continuously with speed, avoiding jumps and instability caused by lookup table switching and segmented switching. Simultaneously, combined with speed loop gain scheduling and active damping, it suppresses jitter at low speeds and resonance at high speeds, resulting in a smoother overall operation.

[0113] Furthermore, under 24V power supply, stable operation at 115 r / s (6900 RPM) under no-load conditions can be achieved (actual measurement), significantly exceeding the usable speed range estimated by traditional steady-state methods. The voltage-mode operation of this invention bypasses the current PI bandwidth limitation, reducing the difficulty of current loop parameter tuning. Even with voltage constraints, a periodic steady state can still be formed and average torque maintained (suitable for no-load / light-load ultra-high speed). No boost voltage hardware or replacement of low-Ke motors is required; the system achieves its ultimate performance through software algorithms, resulting in low system implementation costs.

[0114] The measured no-load power supply current is about 0.7A, which is mainly consumed by copper loss, iron loss and inverter switching loss, consistent with the mechanism of "high frequency window injection and inductor energy round trip".

[0115] Figure 2 This is a schematic block diagram of the stepper motor operation control device provided in the embodiments of this application. Figure 2 As shown, the stepper motor operation control device 200 includes:

[0116] The acquisition module 201 is used to acquire the actual motor speed and electrical angular velocity of the target stepper motor in the current PWM cycle through the encoder of the target stepper motor;

[0117] The voltage amplitude calculation module 202 is used to calculate the voltage amplitude of the current PWM cycle based on the target motor speed and the actual motor speed of the target stepper motor in the current PWM cycle.

[0118] The voltage vector generation module 203 is used to obtain the lead angle of the current PWM cycle based on the electrical angular velocity of the target stepper motor in the current PWM cycle through a lead angle calculation model based on a time-domain injection strategy; and to generate the voltage vector of the current PWM cycle based on the electrical angular velocity and voltage amplitude of the target stepper motor in the current PWM cycle, combined with the lead angle of the current PWM cycle.

[0119] The motor control module 204 is used to limit the voltage vector of the current PWM cycle and control the target stepper motor accordingly based on the voltage vector of the current PWM cycle after the limit.

[0120] It should be understood that the specific process of each module performing the above-mentioned steps has been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.

[0121] It should also be understood that the module division in the embodiments of this application is illustrative and only represents a logical functional division; in actual implementation, there may be other division methods. Furthermore, the functional modules in the various embodiments of this application can be integrated into a single processor, exist as separate physical entities, or be integrated into a single module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0122] Figure 3 This is a schematic block diagram of the electronic terminal provided in an embodiment of this application. Figure 3 As shown, the electronic terminal includes at least one processor 301, a memory 302, at least one network interface 303, and a user interface 305. The various components in the device are coupled together via a bus system 304. It is understood that the bus system 304 is used to implement communication between these components. In addition to a data bus, the bus system 304 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 3 The general will label all buses as bus systems.

[0123] The user interface 305 may include a monitor, keyboard, mouse, trackball, clicker, button, touchpad, or touch screen.

[0124] It is understood that memory 302 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM) or programmable read-only memory (PROM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memories described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable categories of memory.

[0125] In this embodiment of the invention, the memory 302 is used to store various types of data to support the operation of the electronic terminal 300. Examples of this data include: any executable program for operation on the electronic terminal 300, such as the operating system 3021 and application programs 3022; the operating system 3021 contains various system programs, such as the framework layer, core library layer, driver layer, etc., for implementing various basic services and handling hardware-based tasks. The application program 3022 may contain various applications, such as a media player, browser, etc., for implementing various application services. The stepper motor operation control method provided in this embodiment of the invention can be included in the application program 3022.

[0126] The methods disclosed in the above embodiments of the present invention can be applied to processor 301, or implemented by processor 301. Processor 301 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 301 or by instructions in the form of software. The processor 301 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 301 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. General-purpose processor 301 may be a microprocessor or any conventional processor, etc. The steps of the accessory optimization method provided in the embodiments of the present invention can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in memory. The processor reads the information in the memory and combines it with its hardware to complete the steps of the aforementioned method.

[0127] In an exemplary embodiment, the electronic terminal 300 may be used by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), or complex programmable logic devices (CPLDs) to execute the aforementioned method.

[0128] According to the method provided in the embodiments of this application, this application also provides a computer program product, which includes: computer program code, which, when run on a computer, causes the computer to execute... Figure 1 The stepper motor operation control method in the illustrated embodiment.

[0129] According to the method provided in the embodiments of this application, this application also provides a computer-readable storage medium storing program code, which, when executed on a computer, causes the computer to perform... Figure 1 The stepper motor operation control method in the illustrated embodiment.

[0130] As used in this specification, the terms "component," "module," "system," etc., are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process and / or an execution thread, and components may be located on a single computer and / or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).

[0131] Those skilled in the art will recognize that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0132] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0133] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0134] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0135] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0136] In the above embodiments, the functions of each functional unit can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. A computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs, DVDs), or semiconductor media (e.g., solid-state disks, SSDs, etc.).

[0137] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several 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 methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0138] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0139] In summary, this application provides a stepper motor operation control method, device, terminal, and medium. The method includes: obtaining the actual motor speed and electrical angular velocity of the target stepper motor in the current PWM cycle through the encoder of the target stepper motor; calculating the voltage amplitude of the current PWM cycle based on the target motor speed and the actual motor speed in the current PWM cycle; obtaining the lead angle of the current PWM cycle based on the electrical angular velocity of the target stepper motor in the current PWM cycle through a lead angle calculation model based on a time-domain injection strategy; generating the voltage vector of the current PWM cycle based on the lead angle and the voltage amplitude; and controlling the target stepper motor accordingly based on the voltage vector of the current PWM cycle after limiting. This application bypasses the current PI bandwidth limitation by combining voltage control with voltage vector lead, allowing the motor to operate in the voltage saturation region and still achieve periodic steady state and average torque even when the voltage is limited. Therefore, this application effectively overcomes various shortcomings of the prior art and has high industrial applicability.

[0140] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A method of operating a stepper motor, characterized by, include: The actual motor speed and electrical angular velocity of the target stepper motor in the current PWM cycle are obtained by using the encoder of the target stepper motor. Based on the target motor speed and the actual motor speed of the target stepper motor in the current PWM cycle, calculate the voltage amplitude of the current PWM cycle; Based on the electrical angular velocity of the target stepper motor in the current PWM cycle, the lead angle of the current PWM cycle is obtained through a lead angle calculation model based on a time-domain injection strategy; based on the electrical angular velocity and voltage amplitude of the target stepper motor in the current PWM cycle, and combined with the lead angle of the current PWM cycle, the voltage vector of the current PWM cycle is generated. The voltage vector of the current PWM cycle is limited, and the target stepper motor is controlled accordingly based on the limited voltage vector of the current PWM cycle.

2. The stepping motor operation control method according to claim 1, characterized by, Based on the target motor speed and actual motor speed of the target stepper motor in the current PWM cycle, the voltage amplitude of the current PWM cycle is calculated, including: Based on the target motor speed and the actual motor speed of the target stepper motor in the current PWM cycle, calculate the speed difference of the target stepper motor in the current PWM cycle; The speed difference of the target stepper motor in the current PWM cycle is input to a pre-built PI controller to obtain the voltage amplitude of the current PWM cycle; wherein, the PI controller is: ; And wherein, is the velocity difference for the target stepper motor for the current PWM period, is the voltage amplitude for the current PWM period, is the weight parameter.

3. The stepping motor operation control method according to claim 1, characterized by The lead angle calculation model based on the time-domain injection strategy is as follows: ; wherein is the electrical angular velocity for the current PWM period, is a limiting function, is a predetermined lead angle coefficient, is a predetermined maximum lead angle.

4. The stepping motor operation control method according to claim 1, characterized by Based on the electrical angular velocity and voltage amplitude of the target stepper motor in the current PWM cycle, and combined with the lead angle of the current PWM cycle, a voltage vector for the current PWM cycle is generated, including: Based on the lead angle of the current PWM cycle and the electrical angular velocity of the target stepper motor in the current PWM cycle, the control angle of the current PWM cycle is obtained through the control angle calculation model. Based on the control angle and voltage amplitude of the current PWM cycle, the voltage vector of the current PWM cycle is generated.

5. The stepping motor operation control method according to claim 4, characterized by The control angle calculation model is as follows: ; wherein, is the electrical angular velocity of the current PWM cycle, is the lead angle of the current PWM cycle, is the control angle of the current PWM cycle, is the modulation angle of the current PWM cycle.

6. The stepping motor operation control method according to claim 4, characterized by Based on the control angle and voltage amplitude of the current PWM cycle, the voltage vector for the current PWM cycle is generated, including: Based on the control angle and voltage amplitude of the current PWM cycle, the Park inverse transform is performed to generate the voltage components in the two-phase stationary coordinate system, and the output is the voltage vector of the current PWM cycle. The formula for the inverse Park transform is: ; ; and wherein are the voltage components in the two-phase stationary coordinate system of the current PWM period, respectively, is the voltage amplitude of the current PWM period, is the d-axis voltage of the current PWM period, is the control angle of the current PWM period.

7. The stepper motor operation control method according to claim 1, characterized in that, The speed difference of the target stepper motor in the current PWM cycle is input to a pre-built PI controller to obtain the voltage amplitude of the current PWM cycle, including: The speed difference of the target stepper motor in the current PWM cycle is input to the pre-built PI controller to obtain the initial voltage amplitude of the current PWM cycle; Subtract the initial voltage amplitude of the current PWM cycle from the calculated damping voltage of the current PWM cycle to obtain the final voltage amplitude of the current PWM cycle. The calculation process for the damping voltage in the current PWM cycle includes: Based on the actual rotational speed of the current PWM cycle and the actual rotational speed of the previous PWM cycle, the acceleration of the current PWM cycle is calculated; based on the acceleration of the current PWM cycle and the predetermined damping coefficient, the damping voltage of the current PWM cycle is calculated.

8. A stepper motor operation control device, characterized in that, include: The acquisition module is used to acquire the actual motor speed and electrical angular velocity of the target stepper motor in the current PWM cycle through the encoder of the target stepper motor; The voltage amplitude calculation module is used to calculate the voltage amplitude of the current PWM cycle based on the target motor speed and the actual motor speed of the target stepper motor in the current PWM cycle. The voltage vector generation module is used to obtain the lead angle of the current PWM cycle based on the electrical angular velocity of the target stepper motor in the current PWM cycle through a lead angle calculation model based on a time-domain injection strategy; and to generate the voltage vector of the current PWM cycle based on the electrical angular velocity and voltage amplitude of the target stepper motor in the current PWM cycle, combined with the lead angle of the current PWM cycle. The motor control module is used to limit the voltage vector of the current PWM cycle and control the target stepper motor accordingly based on the voltage vector of the current PWM cycle after the limit.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.

10. An electronic terminal, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method according to any one of claims 1 to 7.