A non-symmetrical adaptive hybrid freewheeling method for a stepper motor based on phase-shift modulation
By employing asymmetric PWM phase-shift modulation and an adaptive hybrid freewheeling method, the problems of large ripple, slow dynamic response, and zero-crossing distortion in stepper motor drive systems are solved, achieving a balance between steady-state low ripple and fast dynamic response, thus improving high-precision drive performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENYANG INST OF AUTOMATION - CHINESE ACAD OF SCI
- Filing Date
- 2026-05-22
- Publication Date
- 2026-06-19
AI Technical Summary
In existing stepper motor drive systems, the fixed-ratio hybrid freewheeling strategy cannot achieve the optimal balance between steady-state low ripple, fast dynamic response, and zero-crossing current smoothness, resulting in large current ripple, slow dynamic response, and zero-crossing distortion, which affects high-precision drive performance.
An asymmetric PWM phase-shift modulation architecture and an adaptive dynamic adjustment algorithm are adopted. By forming a hybrid freewheeling mode of high-side slow decay, fast decay, and low-side slow decay within a single PWM cycle, and combining the charging time with the phase-shift phase angle, the fast decay time is adaptively adjusted to optimize the freewheeling mode.
It significantly reduces current ripple, improves the accuracy of current tracking reference current, enhances the smoothness and control precision of the drive system, reduces switching losses, and improves operational stability.
Smart Images

Figure CN122247252A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor control, specifically to an asymmetric adaptive hybrid freewheeling method for stepper motors based on phase-shift modulation, which is particularly suitable for high-precision stepper motor drive systems. Background Technology
[0002] Stepper motors, with their advantages of high positioning accuracy and simple open-loop control, are widely used in high-end equipment fields such as industrial automation, robotics, and aerospace. To suppress motor vibration and noise and improve step resolution, modern stepper motor drives generally adopt microstepping technology. Its core is to use chopper constant current control to make the motor phase current approximate an ideal sine wave.
[0003] In a chopper constant current control system, a single PWM cycle comprises two phases: charging and freewheeling. The selection of the freewheeling mode directly determines the waveform quality of the phase current. Current mainstream freewheeling modes include:
[0004] (1) Slow decay mode: The switching transistors on the same side of the control H-bridge circuit are turned on, so that the internal short circuit of the motor winding forms a freewheeling circuit. This mode can achieve a smaller current ripple, but the decay speed is slow and the dynamic response is poor. When the reference current drops rapidly, the actual current is difficult to follow the reference current in real time, which can easily cause waveform distortion.
[0005] (2) Fast decay mode: The switch on the opposite side of the control H-bridge circuit is turned on, so that the two ends of the motor winding are subjected to the reverse bus voltage. In this mode, the current decreases quickly and the dynamic tracking is good, but it will increase the current ripple, resulting in motor heating and high-frequency electromagnetic noise.
[0006] To balance ripple suppression and dynamic response, existing technologies often employ a fixed-ratio hybrid freewheeling strategy, combining fast and slow attenuation according to a preset duration. However, with increasing demands for high-precision drives, this type of solution suffers from the following significant technical drawbacks:
[0007] (1) Symmetrical PWM modulation leads to high switching losses and uneven heat distribution. Existing hybrid freewheeling circuits mostly adopt symmetrical PWM architecture, in which multiple bridge arm switches operate synchronously within a single cycle, which not only increases switching losses, but also the slow decay loop is fixed on the high or low side of the H-bridge circuit, causing heat to be concentrated on two fixed switches, reducing the reliability of the H-bridge circuit.
[0008] (2) The fixed ratio of hybrid freewheeling strategy cannot adapt to complex operating conditions. Traditional hybrid freewheeling usually sets a fixed ratio of fast and slow decay time. In steady-state operation, a fixed fast decay time can easily lead to excessive current ripple, which aggravates motor heating and noise; in dynamic operating conditions, the adjustment power of the fixed decay ratio is insufficient, and the actual current cannot match the rate of change of the reference current.
[0009] (3) Current distortion is prone to occur in the zero-crossing region of microstepping. When the microstepping sinusoidal current is close to zero, the rate of change of the reference current is the largest. If slow decay is used, the discharge speed of the inductor current lags behind the rate of decrease of the reference current, resulting in a deviation between the actual current and the reference current; conversely, if the fast decay ratio is not reasonable, it will lead to an increase in current ripple, affecting the stability and control accuracy of microstepping drive.
[0010] In summary, existing stepper motor freewheeling methods struggle to achieve an optimal balance between steady-state low ripple, fast dynamic response, and smooth zero-crossing current. Therefore, it is necessary to propose a novel PWM modulation method and adaptive control strategy to meet the application requirements of high-precision stepper motor drives. Summary of the Invention
[0011] In view of at least one of the above technical problems, this application provides an asymmetric adaptive hybrid freewheeling method for stepper motors based on phase-shift modulation. It aims to effectively solve the problems of large ripple, slow dynamic response and zero-crossing distortion caused by traditional fixed-ratio freewheeling by introducing an asymmetric PWM phase-shift modulation architecture and combining it with an adaptive dynamic adjustment algorithm based on charging time.
[0012] The technical solution of this invention is:
[0013] An asymmetric adaptive hybrid freewheeling method for stepper motors based on phase-shift modulation, the method comprising:
[0014] The first and second arms of the H-bridge circuit of the stepper motor are set to an asymmetrical switching state, and the upper and lower arms of the same arm always maintain a complementary conduction state during the switching process.
[0015] An asymmetric PWM signal with a period of T is generated to drive the first and second arms of the H-bridge circuit respectively. The PWM signal of the first arm has a fixed duty cycle of 50% and serves as the phase reference for the phase-shifting modulation of the second arm.
[0016] Set the reference current value I for the current PWM cycle. ref ;
[0017] The H-bridge circuit is controlled to enter charging mode, causing the motor phase current to rise. When the motor phase current reaches I... ref At that time, record the charging duration t. c ;
[0018] The charging duration t c The phase shift angle is mapped to the phase shift angle, and the second bridge arm PWM signal is phase-shifted relative to the first bridge arm PWM signal to form an asymmetric PWM timing in the time domain.
[0019] According to the asymmetric PWM timing, the H-bridge circuit is controlled to sequentially enter a mixed freewheeling mode of high-side slow decay, fast decay, and low-side slow decay within a single PWM cycle, wherein the duration t of the fast decay state is... f Based on the charging duration t c It adaptively adjusts to changes in the reference current.
[0020] Furthermore, according to the aforementioned stepper motor asymmetric adaptive hybrid freewheeling method, the control of the H-bridge circuit to enter the charging mode includes:
[0021] At the beginning of each PWM cycle, the switching transistors in the first and second arms of the control H-bridge drive circuit that correspond to the direction of the reference current are turned on.
[0022] The sampled values of the motor phase current are obtained in real time through a current sampling circuit;
[0023] Compare the sampled value with the reference current value I ref Comparison, when the sampled value reaches I ref At the same time, a control signal to end charging is generated, and the duration from the start of the PWM cycle to the generation of the control signal is recorded to determine the charging duration t. c .
[0024] Furthermore, according to the aforementioned stepper motor asymmetric adaptive hybrid freewheeling method, the step of controlling the H-bridge circuit to sequentially enter a hybrid freewheeling mode of high-side slow decay, fast decay, and low-side slow decay within a single PWM cycle according to the asymmetric PWM timing includes:
[0025] In t c Within the range of 0.5T, the upper arms of the first and second bridge arms are simultaneously in the conducting state. The motor windings form a high-side freewheeling circuit through the two switching transistors at the upper end of the H-bridge circuit. During this period, the phase current slowly decreases, forming a high-side slow decay state.
[0026] At time 0.5T, the lower arm of the first bridge arm and the upper arm of the second bridge arm are turned on. At this time, the two ends of the motor winding are subjected to reverse bus voltage, causing the phase current to drop rapidly and enter a fast decay state. The duration of this state is denoted as t. f ;
[0027] When the fast decay state lasts for t f At this time, the lower arms of the first and second bridge arms are turned on, and the motor windings form a low-side freewheeling circuit through the two switches at the lower end of the H-bridge circuit. During this period, the phase current slowly decreases, entering a low-side slow decay state until the end of the current PWM cycle. The duration of this state is denoted as t. s2 .
[0028] Furthermore, according to the aforementioned asymmetric adaptive hybrid freewheeling method for stepper motors, the duration t of the fast decay state... f Based on the charging duration t c Adaptive adjustment based on changes in the reference current, including:
[0029] The charging duration t c Compared with the preset minimum charging time threshold t cth Compare;
[0030] If the reference current is in a steady state, the duration t of the fast decay state is adjusted according to the comparison result. f ;
[0031] If the reference current is in the dynamic phase, the duration t of the fast decay state is adjusted according to the comparison results, the trend of the reference current, and the magnitude of the change. f .
[0032] Furthermore, according to the aforementioned asymmetric adaptive hybrid freewheeling method for stepper motors, if the reference current is in a steady-state phase, the duration t of the fast decay state is adjusted based on the comparison result. f ;include:
[0033] When t c ≥t cth When it is determined that the current PWM cycle does not require fast decay intervention, that is... If t is satisfied for N consecutive PWM cycles c ≥t cth Then, at the end of the Nth PWM cycle, the stored value t of the current steady-state fast decay time is calculated according to the following formula. fs Perform a decremental update:
[0034] (1);
[0035] in This is the fast decay calibration coefficient during the steady-state phase;
[0036] When t c <t cth If the current decay is insufficient, then:
[0037] a. First trigger t c <t cth At that time, the duration t of the fast decay state is initialized according to formula (2). f :
[0038] (2);
[0039] Where k bs k is the preset rapid decay initial value scaling factor for the steady-state stage.spd t is a preset speed correction coefficient that is negatively correlated with motor speed. fths The preset longest steady-state fast decay time;
[0040] b. If t is triggered at least twice consecutively under the same reference current c <t cth Then, starting from the second trigger, the duration t of the fast decay state is adjusted with a fixed step size. f Adjust incrementally until t f The longest fast decay time t to reach steady state fths ;
[0041] c. The duration t of the fast decay state f After adjustment, update the stored value t of the steady-state fast decay time. fs , let t fs =t f ;
[0042] d. The duration t of the fast decay state when switching from one reference current steady state to another. f The initial value is set as follows:
[0043] (3).
[0044] Furthermore, according to the aforementioned asymmetric adaptive hybrid freewheeling method for stepper motors, if the reference current is in a dynamic phase, the duration t of the fast decay state is adjusted based on the comparison result, the changing trend of the reference current, and the magnitude of the change. f ;include:
[0045] i. When a rise in the reference current is detected, first set it within a preset number of PWM cycles. The subsequent PWM cycle adjusts t according to the adjustment strategy when the reference current is in the steady state phase. f At the same time, according to equation (4), the storage value t of the current steady-state fast decay time is reduced. fs The updated t fs The duration t of the fast decay state during subsequent periodic initialization f The initial value;
[0046] (4);
[0047] Where k rise The preset dynamic phase fast decay update coefficient;
[0048] ii. When a drop in the reference current is detected, initialize the duration t of the fast decay state according to formula (5). f ;
[0049] (5);
[0050] Where k bd The preset dynamic phase rapid decay initial value proportional coefficient; t fthd This is the preset maximum dynamic fast decay time.
[0051] Furthermore, according to the aforementioned stepper motor asymmetric adaptive hybrid freewheeling method, when a decrease in the reference current is detected, after the hybrid freewheeling mode of the current PWM cycle ends, the method further includes:
[0052] If the next PWM cycle t c <t cth Then, the duration t of the fast decay state in the next PWM cycle is given by a fixed step size. f Make incremental adjustments until t is reached. c ≥t cth After exiting the dynamic phase, the PWM cycle is then adjusted according to the adjustment strategy used when the reference current is in the steady-state phase. f ;
[0053] If the reference current decreases continuously, and the decrease in adjacent reference currents is ΔI ≤ ΔI th Then, the duration t of maintaining the current fast decay state is determined. f constant;
[0054] If the reference current decreases continuously, and ΔI > ΔI th When, then according to equation (6) for t f Make corrections:
[0055] (6);
[0056] Where k delta This is a preset reduction correction coefficient that is positively correlated with ΔI; ΔI th This is the reference current descent threshold.
[0057] Furthermore, according to the aforementioned asymmetric adaptive hybrid freewheeling method for stepper motors, the method further includes: when a reversal of the polarity of the reference current is detected, extending the duration t of the fast decay state... f and the current steady-state fast decay time storage value t fs Reset to the initial value.
[0058] Furthermore, according to the aforementioned stepper motor asymmetric adaptive hybrid freewheeling method, the control H-bridge circuit entering the charging mode includes:
[0059] The current sampling resistor R connected in series on the low side of the H-bridge circuit. sense Real-time acquisition of motor phase current, and sampling resistor R senseThe generated voltage signal is input to the first input terminal of the comparator; at the same time, the reference voltage representing the reference current is input to the second input terminal of the comparator.
[0060] At the beginning of each PWM cycle, the switching transistors in the first and second arms of the control H-bridge drive circuit corresponding to the direction of the reference current are turned on, so that the bus voltage is applied across the motor windings and the motor phase current increases from the initial value.
[0061] When the voltage signal characterizing the motor current increases to the reference voltage, the comparator outputs a flip signal; in response to this flip signal, the charging mode immediately ends and switches to hybrid freewheeling mode; simultaneously, the duration from the start of the PWM cycle to the signal flip time is recorded as the charging duration t. c .
[0062] The beneficial effects of adopting the above technical solution are as follows:
[0063] (1) Improves the shortcomings of the fixed ratio mixed freewheeling mode and significantly enhances the stability and control accuracy of micro-step drive. The present invention adopts an adaptive freewheeling adjustment mode based on charging time, which optimizes the mixed freewheeling mode and fast decay time in real time according to the motor operating conditions, effectively reducing current ripple and enabling the winding current to track the reference current more accurately.
[0064] (2) The asymmetric PWM phase-shift modulation structure is adopted, which can sequentially form a three-segment mixed freewheeling timing sequence of high-side slow decay, fast decay, and low-side slow decay, making the current regulation process smoother and more continuous, and the heat dissipation more uniform, thus improving the driving performance from the topology; at the same time, phase-shift modulation can reduce switching action and reduce system loss, thereby improving the operational stability.
[0065] (3) It balances steady-state low ripple and dynamic fast response, maintaining excellent and stable micro-step drive performance across the entire operating range. Adaptive freewheeling strategies are adopted for steady-state and dynamic operating conditions respectively to further enhance the smoothness and control accuracy of micro-step drive. Attached Figure Description
[0066] Figure 1 This is the overall flowchart of the asymmetric adaptive hybrid freewheeling method for stepper motors based on phase-shift modulation in this embodiment;
[0067] Figure 2 This is a flowchart of the adaptive hybrid freewheeling adjustment in this embodiment;
[0068] Figure 3 This is a schematic diagram of the H-bridge circuit topology of the stepper motor in this embodiment;
[0069] Figure 4 This is a timing diagram of the combined state of asymmetric PWM phase shift and hybrid freewheeling in this embodiment;
[0070] Figure 5 This is the adaptive freewheeling current waveform in the steady-state phase of this embodiment;
[0071] Figure 6 This is the adaptive freewheeling current waveform during the dynamic phase of the reference current rise in this embodiment.
[0072] Figure 7 This is the adaptive freewheeling current waveform diagram during the dynamic phase of the reference current decrease in this embodiment. Detailed Implementation
[0073] To describe the present invention in more detail, the technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0074] Figure 1 This is the overall flowchart of the asymmetric adaptive hybrid freewheeling method for stepper motors based on phase-shift modulation in this embodiment. Figure 2 This is a flowchart illustrating the adaptive hybrid freewheeling adjustment in this embodiment. Figure 1 and Figure 2 As shown, the asymmetric adaptive hybrid freewheeling method for stepper motors based on phase-shift modulation includes the following steps:
[0075] Step 1: Set the first and second arms of the stepper motor H-bridge circuit to an asymmetrical switching state, with the upper and lower arms of the same arm always maintaining a complementary conduction state during the switching process.
[0076] like Figure 3 As shown, the method of the present invention is applied to an H-bridge circuit comprising a first bridge arm (phase A) and a second bridge arm (phase B); the first bridge arm (phase A) comprises an upper bridge arm A+ and a lower bridge arm. The second bridge arm (phase B) includes the upper bridge arm B+ and the lower bridge arm. In practice, a current sampling resistor R is typically connected in series on the low side of the H-bridge. sense It is used to extract the phase current of the motor; the upper and lower bridge arms of the same bridge arm always maintain a complementary conduction state during the switching process; the first bridge arm (phase A) and the second bridge arm (phase B) are set to an asymmetrical switching state.
[0077] Step 2: Generate a frequency of f PWM An asymmetric PWM signal with a period of T drives the first and second arms of the H bridge, respectively. The PWM signal of the first arm has a fixed duty cycle of 50% and serves as the phase reference for phase-shifting modulation of the second arm (phase B).
[0078] In a preferred embodiment, the drivers are configured to output frequencies of f. PWMAn asymmetric PWM signal with a period of T is used to drive the first bridge arm (phase A) and the second bridge arm (phase B) of the H-bridge circuit of the stepper motor. The PWM signal driving the first bridge arm (phase A) is configured with a fixed duty cycle of 50%, and the PWM signal driving the second bridge arm (phase B) is configured with an adjustable duty cycle and phase. The PWM signal of the first bridge arm (phase A) is used as the phase reference for phase-shift modulation of the second bridge arm (phase B).
[0079] like Figure 4 As shown, the duty cycle and switching frequency f of the PWM signal driving the first bridge arm (phase A) are maintained during motor operation. PWM Constant. The switching frequency of the second bridge arm (phase B) is consistent with that of the first bridge arm (phase A), configured as a phase-shifting mode with adjustable duty cycle and phase angle; wherein, the conduction time of the upper bridge arm B+ is determined by the end time t of the charging state. c It is determined that the duty cycle is calculated in real time by the subsequent adaptive hybrid freewheeling adjustment process.
[0080] Step 3: Set the reference current value I for the current PWM cycle. ref The H-bridge circuit is controlled to enter charging mode, causing the motor phase current to rise. When the motor phase current reaches the reference current, the charging duration t is recorded. c ;
[0081] At the beginning of each PWM cycle, the H-bridge circuit is controlled to enter charging mode, while the phase current is monitored in real time; when the motor phase current rises to the preset reference current value I... ref When the charging mode ends, it switches to hybrid freewheeling mode to achieve cycle-by-cycle peak current control; simultaneously, it records the duration t of the charging process. c This step specifically includes the following steps:
[0082] Step 3.1: Current sampling configuration: as follows Figure 1 As shown, the current sampling resistor R is connected in series on the low side of the H-bridge circuit. sense Real-time acquisition of motor phase current, and sampling resistor R sense The generated voltage signal is input to the first input terminal of the comparator; simultaneously, the reference voltage (corresponding to I) representing the reference current is input to the comparator. ref The input is given to the second input terminal of the comparator;
[0083] Step 3.2: Start charging mode: such as Figure 4 As shown, at the beginning of each PWM cycle, the opposite switch of the H-bridge circuit is turned on according to the expected current direction (the upper bridge arm A+ of the first bridge arm and the lower bridge arm of the second bridge arm). This causes the bus voltage to be applied across the motor windings, and the motor phase current to increase from its initial value.
[0084] Step 3.3: Peak Current Closed-Loop Control: When the voltage signal characterizing the motor current increases to the reference voltage, the comparator outputs a flip signal; in response to this flip signal, the charging mode is immediately terminated and switched to the hybrid freewheeling mode; simultaneously, the duration from the start of the PWM cycle to the signal flip time is recorded as the charging duration t. c .
[0085] t c It directly reflects the current back EMF characteristics of the motor and the current decay state of the previous cycle, and is an important input variable for subsequent adaptive adjustment.
[0086] Step 4: Set the charging duration t c The phase shift angle is mapped to the phase shift angle, and the second bridge arm PWM signal is phase-shifted relative to the first bridge arm PWM signal to form an asymmetric PWM timing in the time domain.
[0087] According to the charging duration t c Calculate the phase shift angle of the second bridge arm (phase B) PWM signal and control the second bridge arm (phase B) PWM signal to perform PWM phase shifting relative to the first bridge arm (phase A) PWM signal; for example Figure 3 As shown, three mixed freewheeling states—high-side slow decay, fast decay, and low-side slow decay—are generated sequentially within the current PWM cycle.
[0088] In a preferred embodiment, the method for generating a hybrid freewheeling sequence by phase shifting is as follows: the charging duration t c The target phase shift angle is mapped to the PWM signal of the second bridge arm (phase B). Based on the phase shift angle, a PWM signal with the same frequency as the PWM signal of the first bridge arm but with a phase difference is generated as the phase shift signal of the second bridge arm and the phase shift is performed, so that the PWM signal of the second bridge arm (phase B) and the PWM signal of the first bridge arm (phase A) form an asymmetric PWM timing sequence in the time domain.
[0089] Step 5: Based on the asymmetric PWM timing formed in the time domain by the second bridge arm (phase B) and the first bridge arm (phase A), control the H bridge circuit to sequentially enter the mixed freewheeling mode of high-side slow decay, fast decay and low-side slow decay within a single PWM cycle;
[0090] In a preferred embodiment, the high-side slow decay state specifically refers to: at t c Within the range of 0.5T, the upper arm A+ of the first bridge arm (phase A) and the upper arm B+ of the second bridge arm (phase B) are simultaneously in the conducting state. The motor windings form a high-side freewheeling circuit through the two switching transistors at the upper end of the H-bridge circuit. During this period, the phase current slowly decreases. The duration of this state is denoted as t. s1 ;
[0091] In a preferred embodiment, the rapid decay state specifically refers to the following: at time 0.5T, the first bridge arm (phase A) flips, that is, the upper bridge arm A+ turns off and the lower bridge arm... The circuit is turned on, and simultaneously, the upper arm B+ of the second bridge arm (phase B) continues to conduct; at this time, the two ends of the motor winding are subjected to reverse bus voltage, thus entering the fast decay mode, causing the phase current to drop rapidly. The duration of this state is denoted as t. f ;
[0092] In a preferred embodiment, the low-side slow decay state specifically refers to: when the duration of the fast decay state reaches t... f At that time, the second bridge arm (phase B) is controlled to flip, that is, the upper bridge arm B+ is turned off and the lower bridge arm... Conduction is initiated, and simultaneously the lower arm of the first bridge arm (phase A) is activated. The circuit remains on; the motor windings form a low-side freewheeling loop through the two switches at the lower end of the H-bridge circuit, during which the phase current slowly decreases until the end of this PWM cycle. The duration of this state is denoted as t. s2 .
[0093] Step 6: Based on the charging duration t c and the duration t of the fast decay state in relation to the change in reference current. f To perform adaptive adjustment;
[0094] Within each PWM cycle, the charging duration t c Compared with the preset minimum charging time threshold t cth By comparing the data and considering the changing trend of the reference current and the polarity reversal state, the duration t of the fast decay state is adaptively adjusted. f The specific process is as follows: Figure 2 As shown, it includes the following steps:
[0095] Step 6.1: Set physical parameters, including the minimum charging time threshold t. cth (Preferred to be 5%T~10%T), the longest steady-state fast decay time t fths Dynamic longest fast decay time t fthd Reference current drop threshold ΔI th and the rapidly decaying storage value t in the steady-state phase fs ;
[0096] Step 6.2: Set the adjustment coefficients, including the following three categories:
[0097] (1) State correction coefficient: including the speed correction coefficient k which is negatively correlated with the motor speed. spd (Preferred value: 0.5~1.5) and a reduction correction factor k that is positively correlated with the magnitude of the step decrease in the reference current. delta (Preferred value: 1~1.5);
[0098] (2) Initial value proportionality coefficient: including the initial value proportionality coefficient k for rapid decay in the steady state stage. bs (Preferred value: 0.15~0.25), dynamic stage rapid decay initial value proportionality coefficient k bd (Preferred value: 0.4~0.6);
[0099] (3) Process adjustment coefficient: including the fast decay calibration coefficient k in the steady state stage calib (Preferred value: 0.8~0.9), Dynamic phase fast decay update coefficient k rise (Preferred value: 0.5~0.7).
[0100] Step 6.3: Set the charging duration t c Compared with the preset minimum charging time threshold t cth Compare;
[0101] Step 6.4: If the reference current is in a steady state, i.e., when the reference current is constant, then as follows: Figure 5 As shown, the duration t of the fast decay state is adjusted according to the comparison result. f :
[0102] (1) If the actual charging duration t c ≥t cth If so, it is determined that fast decay is not required in the current PWM cycle. This means that after executing the high-side slow decay, the low-side slow decay is executed immediately, i.e., only the high-side slow decay → low-side slow decay slow decay slow decay strategy is executed; if t is satisfied for N consecutive PWM cycles. c ≥t cth Then, at the end of the Nth PWM cycle, the stored value tfs of the current steady-state fast decay time is updated by decreasing according to the following formula:
[0103] (1);
[0104] (2) If the actual charging duration t c <t cth If the current decay is deemed insufficient, a hybrid freewheeling strategy of high-side slow decay → fast decay → low-side slow decay is executed in the current PWM cycle, resulting in:
[0105] a. First trigger t c <t cth When, fast decay time t f The initial value is the steady-state longest fast decay time t. fths The initial value proportionality coefficient k during the steady-state phase rapid decay bs With speed correction factor k spd The product of the three is:
[0106] (2);
[0107] b. If t is triggered at least twice consecutively under the same reference current c <t cth Then, starting from the second trigger, a fixed step size (e.g., 15%t) will be used. fths The duration t of the fast decay state f Adjust incrementally until t f The longest fast decay time t to reach steady state fths ;
[0108] c. The duration t of the fast decay state f After adjustment, update the stored value t of the steady-state fast decay time. fs , let t fs =t f .
[0109] d. The duration t of the fast decay state when switching from one reference current steady state to another. f The initial value is set as follows:
[0110] (3);
[0111] Step 6.5: If the reference current is dynamically changing, adjust the duration t of the fast decay state according to the comparison results, the trend of the reference current change, and the magnitude of the change. f .
[0112] (1) such as Figure 6 As shown, when the reference current rises, within a preset number such as two PWM cycles, the setting is... In other words, fast decay does not need to be intervened. First, a preset number of freewheeling currents are executed, such as two PWM cycles of high-side slow decay → low-side slow decay. In the third cycle, t is adjusted according to the adjustment strategy when the reference current is in the steady state. f Simultaneously, reduce the fast decay time storage value t according to equation (4). fs And will update t fs As the initial value for the third cycle to enter the steady state stage;
[0113] (4);
[0114] (2) For example Figure 7 As shown, when the reference current decreases, a freewheeling strategy of high-side slow decay → fast decay → low-side slow decay is implemented, with the fast decay time t... f The initial value is combined with the previous steady-state storage value t fs Set according to the following formula:
[0115] (5);
[0116] After the hybrid freewheeling mode of the current PWM cycle ends, if the charging duration t of the next PWM cycle is... c <t cth Then, a fixed step size (e.g., 15%t) is used. fth The fast decay time t for the next cycle f Make incremental adjustments; continue adjusting according to this logic until the charging duration meets t. c ≥t cth After exiting the dynamic phase of the continuous flow, the continuous flow strategy of the steady-state phase will be executed in the next cycle.
[0117] (3) If the reference current decreases continuously, and the decrease in reference current ΔI between adjacent PWM cycles is less than or equal to the reference current decrease threshold ΔI th When the previous PWM cycle's fast decay time t is maintained, the current decay time t is maintained. f Unchanged; if the decrease in adjacent reference current ΔI > ΔI th Then, according to equation (6), the fast decay time t f Make corrections:
[0118] (6);
[0119] (4) When the reference current crosses zero (polarity reversal), the fast decay time t is... f and stored value t fs Reset to the initial value.
[0120] In summary, the following conclusions can be drawn: This invention can effectively improve the current control accuracy, dynamic response, and operational stability of a stepper motor system through asymmetric PWM phase shifting and adaptive hybrid freewheeling regulation.
[0121] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions that fall within the scope of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and refinements made without departing from the principle of the present invention should be considered within the scope of protection of the present invention.
Claims
1. A method for asymmetric adaptive hybrid freewheeling current in a stepper motor based on phase-shift modulation, characterized in that, The method includes: The first and second arms of the H-bridge circuit of the stepper motor are set to an asymmetrical switching state, and the upper and lower arms of the same arm always maintain a complementary conduction state during the switching process. An asymmetric PWM signal with a period of T is generated to drive the first and second arms of the H-bridge circuit respectively. The PWM signal of the first arm has a fixed duty cycle of 50% and serves as the phase reference for the phase-shifting modulation of the second arm. Set the reference current value I for the current PWM cycle. ref ; The H-bridge circuit is controlled to enter charging mode, causing the motor phase current to rise. When the motor phase current reaches I... ref At that time, record the charging duration t. c ; The charging duration t c The phase shift angle is mapped to the phase shift angle, and the second bridge arm PWM signal is phase-shifted relative to the first bridge arm PWM signal to form an asymmetric PWM timing in the time domain. According to the asymmetric PWM timing, the H-bridge circuit is controlled to sequentially enter a mixed freewheeling mode of high-side slow decay, fast decay, and low-side slow decay within a single PWM cycle, wherein the duration t of the fast decay state is... f Based on the charging duration t c It adaptively adjusts to changes in the reference current.
2. The asymmetric adaptive hybrid freewheeling method for stepper motors according to claim 1, characterized in that, The control of the H-bridge circuit to enter the charging mode includes: At the beginning of each PWM cycle, the switching transistors in the first and second arms of the control H-bridge drive circuit that correspond to the direction of the reference current are turned on. The sampled values of the motor phase current are obtained in real time through a current sampling circuit; Compare the sampled value with the reference current value I ref Comparison, when the sampled value reaches I ref At the same time, a control signal to end charging is generated, and the duration from the start of the PWM cycle to the generation of the control signal is recorded to determine the charging duration t. c .
3. The asymmetric adaptive hybrid freewheeling method for stepper motors according to claim 2, characterized in that, The method of controlling the H-bridge circuit to sequentially enter a mixed freewheeling mode of high-side slow decay, fast decay, and low-side slow decay within a single PWM cycle, based on asymmetric PWM timing, includes: In t c Within the range of 0.5T, the upper arms of the first and second bridge arms are simultaneously in the conducting state. The motor windings form a high-side freewheeling circuit through the two switching transistors at the upper end of the H-bridge circuit. During this period, the phase current slowly decreases, forming a high-side slow decay state. At time 0.5T, the lower arm of the first bridge arm and the upper arm of the second bridge arm are turned on. At this time, the two ends of the motor winding are subjected to reverse bus voltage, causing the phase current to drop rapidly and enter a fast decay state. The duration of this state is denoted as t. f ; When the fast decay state lasts for t f At this time, the lower arms of the first and second bridge arms are turned on, and the motor windings form a low-side freewheeling circuit through the two switches at the lower end of the H-bridge circuit. During this period, the phase current slowly decreases, entering a low-side slow decay state until the end of the current PWM cycle. The duration of this state is denoted as t. s2 .
4. The asymmetric adaptive hybrid freewheeling method for stepper motors according to claim 1, characterized in that, The duration t of the fast decay state f Based on the charging duration t c Adaptive adjustment based on changes in the reference current, including: The charging duration t c Compared with the preset minimum charging time threshold t cth Compare; If the reference current is in a steady state, the duration t of the fast decay state is adjusted according to the comparison result. f ; If the reference current is in the dynamic phase, the duration t of the fast decay state is adjusted according to the comparison results, the trend of the reference current, and the magnitude of the change. f .
5. The asymmetric adaptive hybrid freewheeling method for stepper motors according to claim 4, characterized in that, If the reference current is in a steady state, the duration t of the fast decay state is adjusted according to the comparison result. f ; include: When t c ≥t cth When it is determined that the current PWM cycle does not require fast decay intervention, that is... If t is satisfied for N consecutive PWM cycles c ≥t cth Then, at the end of the Nth PWM cycle, the stored value t of the current steady-state fast decay time is calculated according to the following formula. fs Perform a decremental update: (1); in This is the fast decay calibration coefficient during the steady-state phase; When t c <t cth If the current decay is insufficient, then: a. First trigger t c <t cth At that time, the duration t of the fast decay state is initialized according to formula (2). f : (2); Where k bs k is the preset rapid decay initial value scaling factor for the steady-state stage. spd t is a preset speed correction coefficient that is negatively correlated with motor speed. fths The preset longest steady-state fast decay time; b. If t is triggered at least twice consecutively under the same reference current c <t cth Then, starting from the second trigger, the duration t of the fast decay state is adjusted with a fixed step size. f Adjust incrementally until t f The longest fast decay time t to reach steady state fths ; c. The duration t of the fast decay state f After adjustment, update the stored value t of the steady-state fast decay time. fs , let t fs =t f ; d. The duration t of the fast decay state when switching from one reference current steady state to another. f The initial value is set as follows: (3)。 6. The asymmetric adaptive hybrid freewheeling method for stepper motors according to claim 5, characterized in that, If the reference current is in the dynamic phase, the duration t of the fast decay state is adjusted according to the comparison results, the trend of the reference current change, and the magnitude of the change. f ; include: i. When a rise in the reference current is detected, first set it within a preset number of PWM cycles. The subsequent PWM cycle adjusts t according to the adjustment strategy when the reference current is in the steady state phase. f At the same time, according to equation (4), the storage value t of the current steady-state fast decay time is reduced. fs The updated t fs The duration t of the fast decay state during subsequent periodic initialization f The initial value; (4); Where k rise The preset dynamic phase fast decay update coefficient; ii. When a drop in the reference current is detected, initialize the duration t of the fast decay state according to formula (5). f ; (5); Where k bd The preset dynamic phase rapid decay initial value proportional coefficient; t fthd This is the preset maximum dynamic fast decay time.
7. The asymmetric adaptive hybrid freewheeling method for stepper motors according to claim 6, characterized in that, When a decrease in the reference current is detected, after the hybrid freewheeling mode of the current PWM cycle ends, the process further includes: If the next PWM cycle t c <t cth Then, the duration t of the fast decay state in the next PWM cycle is given by a fixed step size. f Make incremental adjustments until t is reached. c ≥t cth After exiting the dynamic phase, the PWM cycle is then adjusted according to the adjustment strategy used when the reference current is in the steady-state phase. f ; If the reference current decreases continuously, and the decrease in adjacent reference currents is ΔI ≤ ΔI th Then, the duration t of maintaining the current fast decay state is determined. f constant; If the reference current decreases continuously, and ΔI > ΔI th When, then according to equation (6) for t f Make corrections: (6); Where k delta This is a preset reduction correction coefficient that is positively correlated with ΔI; ΔI th This is the reference current descent threshold.
8. The asymmetric adaptive hybrid freewheeling method for stepper motors according to claim 4, characterized in that, The method further includes: when a reversal of the polarity of the reference current is detected, the duration t of the fast decay state is... f and the current steady-state fast decay time storage value t fs Reset to the initial value.
9. The asymmetric adaptive hybrid freewheeling method for stepper motors according to claim 1, characterized in that, The control of the H-bridge circuit to enter the charging mode includes: The current sampling resistor R connected in series on the low side of the H-bridge circuit. sense Real-time acquisition of motor phase current, and sampling resistor R sense The generated voltage signal is input to the first input terminal of the comparator; at the same time, the reference voltage representing the reference current is input to the second input terminal of the comparator. At the beginning of each PWM cycle, the switching transistors in the first and second arms of the control H-bridge drive circuit corresponding to the direction of the reference current are turned on, so that the bus voltage is applied across the motor windings and the motor phase current increases from the initial value. When the voltage signal characterizing the motor current increases to the reference voltage, the comparator outputs a flip signal; in response to this flip signal, the charging mode immediately ends and switches to hybrid freewheeling mode; simultaneously, the duration from the start of the PWM cycle to the signal flip time is recorded as the charging duration t. c .