Bus constant-current driving circuit of two-phase hybrid stepping motor and control strategy of bus constant-current driving circuit
By using a two-phase hybrid stepper motor drive circuit with single-channel bus current sampling and incremental PID closed-loop algorithm, the problems of complex current sampling and high hardware cost in the existing technology are solved, and constant torque output and stable operation of the motor are achieved.
Patent Information
- Application Number
- CN202511808739.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-17
AI Technical Summary
Existing two-phase stepper motor microstepping drive circuits suffer from problems such as complex current sampling, high hardware cost, complex control, and susceptibility to high-frequency interference and low-frequency oscillation, making it difficult to achieve simplified circuit structure and constant torque output.
A single-channel low-voltage side bus current sampling design is adopted. Combined with operational amplifier circuits, filters and embedded processors, the duty cycle opening coefficient is calculated through incremental PID closed-loop algorithm to control the H-bridge gate drive circuit to achieve constant current drive of the bus, simplifying the circuit structure and ensuring constant torque output of the motor.
It significantly simplifies the circuit structure, reduces hardware costs, improves reliability, avoids step loss and low-frequency oscillation, and achieves constant torque output and stable operation of the motor at ultra-low speeds.
Smart Images

Figure CN121689908A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of stepper motor drive and control technology, and particularly relates to a bus constant current drive circuit and its control strategy for a two-phase hybrid stepper motor. Background Technology
[0002] Stepper motors are widely used in industrial automation, consumer electronics, medical equipment, intelligent equipment, aerospace and other fields due to their advantages such as precise position control, positioning without feedback, adjustable speed and stable operation, and strong cost adaptability. Their mainstream driving methods include constant voltage drive, constant current drive and microstepping drive. Among them, microstepping control is widely used in open-loop control systems because it can reduce the step angle and improve resolution.
[0003] Existing microstepping drive circuits for two-phase stepper motors mainly employ chopper and pulse width modulation (PWM) methods. The chopper method detects the winding current and compares it with the D / A control voltage, controlling the power amplifier transistor to adjust the winding current. The PWM method converts the D / A control voltage into a rectangular wave with variable pulse width, altering the average winding current. Both methods have significant drawbacks: controlling the winding current to form the peaks and troughs of a sine wave easily triggers high-frequency interference, leading to overheating and aging of the drive components, shortening the driver's lifespan; the varying pulse width results in a wide frequency spectrum, complicating filter design, making analog signal recovery difficult, and requiring additional complex filtering circuitry to ensure output stability.
[0004] Another method uses an ADC to acquire the currents of phases A and B, and then uses a processor to implement independent closed-loop control of the two phase currents. However, this method also has drawbacks: 1. System complexity: It requires separate sampling of the two phase currents and independent control of their amplitudes, resulting in complex circuitry, low reliability, and the current closed-loop algorithm consuming significant processor resources; 2. Poor sampling accuracy: The parameters of the two sampling elements are mismatched, and their performance is easily affected by temperature, leading to inconsistent drift. It is necessary to calibrate and compensate for the two sampling circuits separately; 3. Signal delay: The superposition of the analog amplifier delay, low-pass filter delay, and ADC conversion delay in the two sampling circuits causes a lag in the phase current sampling point, increasing the difficulty of current acquisition and the processor's processing time; 4. High hardware cost: It requires additional high-power resistors, isolated magnetocurrent sensors, high common-mode voltage operational amplifiers, and high-speed ADCs, resulting in increased driver size and cost.
[0005] To address the shortcomings of the existing technology, there is an urgent need for a stepper motor drive solution that can simplify the circuit structure, reduce costs, and ensure constant torque output of the motor while avoiding step loss and low-frequency oscillation. Summary of the Invention
[0006] In view of the shortcomings of the related technologies, the purpose of this invention is to provide a bus constant current drive circuit and its control strategy for a two-phase hybrid stepper motor, so as to solve the problems mentioned in the background technology.
[0007] To achieve the above objectives, the present invention provides the following technical solution: A bus constant current drive circuit for a two-phase hybrid stepper motor includes: The current sampling module is used to collect the low-voltage side bus current of the two-phase hybrid stepper motor and convert the current signal into a voltage signal. The operational amplifier circuit has its input terminal connected to the output terminal of the current sampling module. The operational amplifier circuit is used to amplify the voltage signal. A filter is connected to the output of an operational amplifier circuit. Filters are used to filter amplified voltage signals. The embedded processor's signal input is connected to the filter's output to receive the filtered voltage signal. The embedded processor calculates the actual bus current based on the filtered voltage signal, then calculates the total duty cycle opening coefficient of the bus switching using an incremental PID closed-loop algorithm. Based on the current electrical angle of the two-phase hybrid stepper motor, the total duty cycle opening coefficient is allocated to the A-phase and B-phase windings of the two-phase hybrid stepper motor, and the corresponding A-phase PWM control signal and B-phase PWM control signal are output. The H-bridge gate drive circuit connects its control input to the PWM signal output of the embedded processor. Based on the A-phase PWM control signal and the B-phase PWM control signal, the H-bridge gate drive circuit controls the conduction and cutoff of the power transistors in the A-phase H-bridge and B-phase H-bridge respectively, so as to enable the bus constant current drive of the two-phase hybrid stepper motor to output constant torque.
[0008] In some embodiments, the bus constant current drive circuit of the two-phase hybrid stepper motor further includes an ADC analog-to-digital converter; the input terminal of the ADC is connected to the output terminal of the filter, and the output terminal of the ADC is connected to the signal input terminal of the embedded processor. The ADC is used to convert the filtered voltage signal into a digital signal and transmit it to the embedded processor.
[0009] In some embodiments, the H-bridge gate drive circuit includes an A-phase H-bridge gate drive circuit module and a B-phase H-bridge gate drive circuit module; the A-phase H-bridge gate drive circuit module is connected to the power transistor of the A-phase H-bridge and receives the A-phase PWM control signal output by the embedded processor; the B-phase H-bridge gate drive circuit module is connected to the power transistor of the B-phase H-bridge and receives the B-phase PWM control signal output by the embedded processor.
[0010] In some embodiments, the embedded processor is an FPGA or MCU processor.
[0011] A control strategy for a bus constant current drive circuit of a two-phase hybrid stepper motor, applied to the bus constant current drive circuit of the two-phase hybrid stepper motor as described above, includes the following steps: Current signal processing steps: The low-voltage side bus current of the two-phase hybrid stepper motor is acquired by the current sampling module, amplified by the operational amplifier circuit and filtered by the filter, and then the processed voltage signal is received by the embedded processor and the actual bus current is calculated. Total duty cycle opening coefficient calculation steps: Based on the deviation between the preset target bus current and the actual bus current, the embedded processor calculates the total duty cycle opening coefficient of the bus switching through an incremental PID closed-loop algorithm. Opening coefficient allocation steps: The embedded processor determines the current electrical angle of the two-phase hybrid stepper motor, and then allocates the total duty cycle opening coefficient to the opening coefficients of the A-phase winding and B-phase winding of the two-phase hybrid stepper motor according to the cosine and sine laws corresponding to the electrical angle. Constant current drive control steps: Based on the opening coefficients of phase A and phase B windings, the embedded processor outputs the corresponding phase A PWM control signal and phase B PWM control signal to the H-bridge gate drive circuit, controlling the conduction and cutoff of the power transistors in phase A and phase B H-bridges, so as to enable the bus constant current drive of the two-phase hybrid stepper motor to output constant torque.
[0012] In some embodiments, the calculation process of the total duty cycle opening coefficient of the bus switching using an incremental PID closed-loop algorithm is as follows:
[0013]
[0014] in, The current deviation at the current moment, This represents the current deviation at the previous moment. The current deviation between the two moments is... This is the proportionality coefficient. The integral coefficient is... These are the differential coefficients. This represents the total duty cycle opening coefficient of the busbar at the current moment. This represents the increment of the total duty cycle opening coefficient for the current busbar switching position. It is the total duty cycle opening coefficient of the busbar at the previous moment.
[0015] In some embodiments, the calculation process for allocating the total duty cycle opening factor to the A-phase winding and B-phase winding of the two-phase hybrid stepper motor in the opening factor allocation step is as follows:
[0016] in, To perform integer operations, For the modulo operation, The adjustable number within the PWM pulse. This is the total duty cycle opening coefficient. For electrical angle, This refers to the microstepping value per full step of a two-phase hybrid stepper motor. This represents the target total number of microsteps for a two-phase hybrid stepper motor. This is the opening factor of phase A winding. This is the opening factor of phase B winding.
[0017] In some embodiments, the adjustable number of pulses within the PWM pulse ,in, The clock speed of the embedded processor, This is the chopping frequency of a two-phase hybrid stepper motor.
[0018] In some embodiments, the A-phase H-bridge includes four power transistors: a first high-side transistor Q1, a second high-side transistor Q2, a first low-side transistor Q3, and a second low-side transistor Q4; the B-phase H-bridge includes four power transistors: a third high-side transistor Q5, a fourth high-side transistor Q6, a third low-side transistor Q7, and a fourth low-side transistor Q8; in the constant current drive control step, controlling the on and off states of the power transistors in the A-phase and B-phase H-bridges specifically involves: When the opening coefficient of phase A winding At that time, control Q1 and Q4 to turn on synchronously, and the number of turn-on pulses is 1. The absolute value of Q2 and Q3 is the cutoff point; when At that time, control Q2 and Q3 to turn on synchronously, and the number of turn-on pulses is 1. The absolute value, cutoff at Q1 and Q4; When the opening coefficient of phase B winding At that time, control Q5 and Q8 to turn on synchronously, and the number of turn-on pulses is: The absolute value of Q6 and Q7 is the cutoff point; when At that time, control Q6 and Q7 to turn on synchronously, and the number of turn-on pulses is: The absolute value of Q5 and Q8 is the cutoff point.
[0019] In some embodiments, the control strategy of the bus constant current drive circuit of the two-phase hybrid stepper motor further includes an overcurrent protection step: a preset overcurrent threshold is used, and the embedded processor compares the actual bus current with the overcurrent threshold in real time; when the actual bus current reaches or exceeds the overcurrent threshold, the total duty cycle opening coefficient is adjusted. Set to 0, and simultaneously output a cutoff signal to the H-bridge gate drive circuit to control all power transistors of the A-phase H-bridge and B-phase H-bridge to be cut off; when the actual bus current is less than the overcurrent threshold, resume the execution of the original opening coefficient allocation and PWM control logic.
[0020] Compared with the prior art, the beneficial effects of the present invention are: 1. The bus constant current drive circuit for a two-phase hybrid stepper motor provided by this invention eliminates the need for separate sampling and signal conditioning circuits for each phase current through a single-channel low-voltage side bus current sampling design, greatly simplifying the circuit structure and reducing hardware material costs and assembly complexity; the operational amplifier circuit adapts to low-voltage signals using common general-purpose components, eliminating the need for high-cost special operational amplifiers, further controlling costs; the connection logic of each module is clear and the signal transmission is stable, effectively improving the overall reliability of the circuit and reducing the risk of failure that is prone to occur in complex circuits.
[0021] 2. The control strategy of the bus constant current drive circuit of the two-phase hybrid stepper motor provided by this invention adopts an incremental PID closed-loop algorithm, which has no integral accumulation problem and low computational resource consumption. It is compatible with processors such as FPGA or MCU, avoiding the computational burden caused by dual-loop circuits. The opening coefficient is allocated based on the cosine and sine law of electrical angle to ensure constant torque output of the motor and effectively avoid step loss and low-frequency oscillation problems. Combined with overcurrent protection logic, it takes into account both control accuracy and operational safety, realizes the ultra-low speed stable and quiet operation of the motor, and is suitable for the needs of multiple application scenarios. Attached Figure Description
[0022] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a flowchart illustrating an embodiment of the bus constant current drive circuit and control strategy for the two-phase hybrid stepper motor of the present invention. Figure 2 This is a schematic diagram of the bus constant current drive circuit structure of an embodiment of the bus constant current drive circuit and its control strategy for the two-phase hybrid stepper motor of the present invention. Figure 3 The waveforms of phase A and phase B currents are shown in an embodiment of the bus constant current drive circuit and control strategy of the two-phase hybrid stepper motor of the present invention. Figure 4 This is a current synthesis vector diagram of an embodiment of the bus constant current drive circuit and control strategy of the two-phase hybrid stepper motor of the present invention.
[0023] In the picture: 1. Current sampling module; 2. Operational amplifier circuit; 3. Filter; 4. Embedded processor; 5. ADC analog-to-digital converter; 6. Two-phase hybrid stepper motor; 71. A-phase H-bridge gate drive circuit module; 72. B-phase H-bridge gate drive circuit module. Detailed Implementation
[0024] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0025] In the description of this invention, it should be understood that the terms "center", "lateral", "longitudinal", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0026] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0027] Example 1: See appendix Figures 1 to 4 This paper presents a schematic embodiment of the bus constant current drive circuit for a two-phase hybrid stepper motor proposed in this invention. The bus constant current drive circuit for the two-phase hybrid stepper motor includes a current sampling module 1, an operational amplifier circuit 2, a filter 3, an embedded processor 4, and an H-bridge gate drive circuit.
[0028] The current sampling module 1 is used to collect the low-voltage bus current of the two-phase hybrid stepper motor 6 and convert the current signal into a voltage signal. The input terminal of the operational amplifier circuit 2 is connected to the output terminal of the current sampling module 1, and the operational amplifier circuit 2 is used to amplify the voltage signal. The input terminal of the filter 3 is connected to the output terminal of the operational amplifier circuit 2, and the filter 3 is used to filter the amplified voltage signal. The signal input terminal of the embedded processor 4 is connected to the output terminal of the filter 3 to receive the filtered voltage signal. The embedded processor 4 is used to calculate the actual bus current based on the filtered voltage signal, and then uses an incremental PID closed-loop algorithm. The total duty cycle opening coefficient of the bus is calculated, and the total duty cycle opening coefficient is distributed to the A-phase winding and B-phase winding of the two-phase hybrid stepper motor 6 according to the current electrical angle. The corresponding A-phase PWM control signal and B-phase PWM control signal are output. The control input terminal of the H-bridge gate drive circuit is connected to the PWM signal output terminal of the embedded processor 4. The H-bridge gate drive circuit controls the conduction and cutoff of the power transistors in the A-phase H-bridge and B-phase H-bridge respectively according to the A-phase PWM control signal and the B-phase PWM control signal, so that the bus constant current drives the two-phase hybrid stepper motor 6 to output a constant torque.
[0029] The current sampling module 1 acquires the amplitude of the low-voltage bus current of the two-phase hybrid stepper motor 6. Common current sampling methods include using current transformers, Hall effect sensors, or a small-value, high-power sampling resistor in series (e.g., attached). Figure 2 The R1 in the first two methods converts the current signal into a corresponding voltage signal and then samples it. The sampled current value obtained by the first two methods is more accurate, but the hardware cost is higher. The series sampling resistor will affect the current, but as long as the resistance value is reasonable, it has the advantages of simple structure and low cost.
[0030] Operational amplifier circuit 2 amplifies the voltage signal representing the current magnitude through an analog operational amplifier circuit. Since this circuit acquires the low-voltage side voltage signal, its advantage is that it does not require the use of expensive "high common-mode rejection ratio (CMRR) and high common-mode voltage range" operational amplifiers. Ordinary general-purpose operational amplifiers can meet the requirements, resulting in lower material costs.
[0031] Filter 3 uses a low-pass filter to filter out high-frequency EMI interference generated during the high-speed turn-on and turn-off of the switching devices or external high-frequency intrusion interference from other devices, ensuring the stability of the current signal output.
[0032] In this embodiment, the bus constant current drive circuit of the two-phase hybrid stepper motor 6 also includes an ADC analog-to-digital converter 5; the input terminal of the ADC analog-to-digital converter 5 is connected to the output terminal of the filter 3, and the output terminal of the ADC analog-to-digital converter 5 is connected to the signal input terminal of the embedded processor 4. The ADC analog-to-digital converter 5 is used to convert the filtered voltage signal into a digital signal and then transmit it to the embedded processor 4.
[0033] In this embodiment, the embedded processor 4 is an FPGA or MCU processor. The FPGA or MCU processor is used to run the bus current closed-loop algorithm and calculate the switching state of each H-bridge power transistor and the duty cycle of the PWM pulse. It can also receive position commands, perform fault diagnosis and processing, etc. when communicating with the host computer.
[0034] The two-phase hybrid stepper motor 6 in this embodiment is a widely used two-phase hybrid stepper motor. Its stator arrangement strictly matches the "90° electrical angle difference". The stator core has evenly distributed slots and is divided into two independent windings: phase A (A+ / A-) and phase B (B+ / B-). Each winding has the same number of poles (slots) and the magnetic poles of the two windings are arranged alternately in space.
[0035] In this embodiment, the H-bridge gate drive circuit includes an A-phase H-bridge gate drive circuit module 71 and a B-phase H-bridge gate drive circuit module 72. The A-phase H-bridge gate drive circuit module 71 is connected to the power transistor of the A-phase H-bridge and receives the A-phase PWM control signal output by the embedded processor 4. The B-phase H-bridge gate drive circuit module 72 is connected to the power transistor of the B-phase H-bridge and receives the B-phase PWM control signal output by the embedded processor 4.
[0036] The H-bridge gate drive circuit is used to control the gate voltage of the power transistors (such as NMOSFETs or IGBTs) in the H-bridge circuit. It is mainly used to drive loads such as DC motors and stepper motors, enabling functions such as forward and reverse rotation and speed regulation. An H-bridge circuit typically consists of four power transistors forming a bridge structure. Two transistors are located on the high side, and two are located on the low side. (See attached diagram.) Figure 2For example, Q1 and Q2 are high-side transistors, and Q3 and Q4 are low-side transistors. The stepper motor windings are connected between the midpoints of the two bridge arms. For the high-side NMOSFETs, since their source potentials are not fixed, a bootstrap circuit or charge pump circuit is needed to provide a floating gate drive voltage. The gate drive of the low-side NMOSFETs is relatively simple, involving level shifting and amplification to provide sufficient drive current. Motor control is achieved by controlling the on and off states of the four transistors. When Q1 and Q4 are on and Q2 and Q3 are off, current flows from the positive terminal of the power supply through Q1, the motor, and Q4 back to the negative terminal, resulting in positive winding current. When Q2 and Q3 are on and Q1 and Q4 are off, current flows from the positive terminal of the power supply through Q2, the motor, and Q3 back to the negative terminal, resulting in reverse winding current. During state switching, to prevent a short circuit caused by two transistors on the same side conducting simultaneously, a dead time needs to be set, which is the delay time between the two transistors turning on and off or from off to on.
[0037] Participate in the attached Figure 2 The diagram below shows the structure of the two-phase hybrid stepper motor bus constant current drive circuit in this embodiment. Its specific connections and operating links are as follows: The circuit uses an embedded processor 4 as the control core. The signal acquisition link is as follows: one end of the current sampling module 1 is connected to the low-voltage side bus and the other end is grounded (GND). It collects the bus current and converts it into a voltage signal. The voltage signal is input to the operational amplifier circuit 2 for amplification, filtered by the filter 3, and then converted into a digital signal by the ADC analog-to-digital converter 5 and transmitted to the embedded processor 4.
[0038] The control drive link outputs A-phase PWM control signals (PWM_A1, PWM_A2, PWM_A3, PWM_A4) and B-phase PWM control signals (PWM_B1, PWM_B2, PWM_B3, PWM_B4) from the embedded processor 4, which are transmitted to the independent A-phase H-bridge gate drive circuit module 71 and B-phase H-bridge gate drive circuit module 72, respectively. The two drive circuit modules control the conduction and cutoff of the A-phase H-bridge (power transistors Q1, Q2, Q3, Q4) and B-phase H-bridge (power transistors Q5, Q6, Q7, Q8) to ultimately drive the two-phase hybrid stepper motor 6. Both the A-phase H-bridge and the B-phase H-bridge are powered by the bus power supply VCC_Bus.
[0039] This circuit structure enables single-channel sampling and digital processing of the bus current, which, in conjunction with the control logic of the embedded processor 4, completes the constant current drive of the two-phase hybrid stepper motor 6.
[0040] The constant current control of the two-phase hybrid stepper motor 6 based on the low-voltage side bus current utilizes the fact that the two phase windings of the stepper motor are 90° out of phase in space, and sinusoidal currents with an electrical angle difference of 90° are applied to them respectively. That is, it makes full use of the interaction between electromagnetic torque and magnetic reluctance torque, coordinates the control of direct axis and quadrature axis current, so that the magnetic field synthesized inside the motor rotates in a circular form, and the constant current of the bus makes the output torque of the motor constant.
[0041] The main problem with low-frequency oscillation in two-phase stepper motors is the inconsistent output torque. This problem can be reduced by controlling the bus current to be constant and by orthogonally distributing the phase current waveforms to the A and B phase windings. The principle is as follows: the excitation flux Φ of the stepper motor is provided by a permanent magnet (which remains constant), therefore: electromagnetic torque... Among them, torque constant Because Φ is fixed and constant, This is the excitation current; it can be maintained by control. If the electromagnetic torque is constant (e.g., the armature voltage increases with increasing speed to counteract the back electromotive force), then regardless of the speed, the electromagnetic torque will remain constant. The constant torque ensures that the motor can rotate smoothly at ultra-low speeds, greatly avoiding problems such as step loss and low-frequency oscillation in stepper motors.
[0042] In the above illustrative embodiment, the bus constant current drive circuit of the two-phase hybrid stepper motor, through a single-channel low-voltage side bus current sampling design, eliminates the need for separate sampling and signal conditioning circuits for each phase current, greatly simplifying the circuit structure and reducing hardware material costs and assembly complexity; the operational amplifier circuit adapts to low-voltage signals using common general-purpose components, eliminating the need for high-cost special operational amplifiers, further controlling costs; the connection logic of each module is clear and the signal transmission is stable, effectively improving the overall reliability of the circuit and reducing the risk of failure that is prone to occur in complex circuits.
[0043] Example 2: See appendix Figures 1 to 4 This paper presents an illustrative embodiment of the control strategy for the bus constant current drive circuit of the two-phase hybrid stepper motor proposed in this invention. Using the bus constant current drive circuit of the two-phase hybrid stepper motor in Embodiment 1, the control strategy includes the following steps: Current signal processing steps: The low-voltage bus current of the two-phase hybrid stepper motor 6 is collected by the current sampling module 1, amplified by the operational amplifier circuit 2 and filtered by the filter 3. The processed voltage signal is then received by the embedded processor 4 and the actual bus current is calculated. Total duty cycle opening coefficient calculation steps: Based on the deviation between the preset target bus current and the actual bus current, the embedded processor 4 calculates the total duty cycle opening coefficient of the bus switching through an incremental PID closed-loop algorithm. Opening coefficient allocation steps: The embedded processor 4 determines the target total number of microsteps based on the two-phase hybrid stepper motor 6. Subdivisions of each full step Determine the current electrical angle, and then, according to the cosine and sine laws corresponding to the electrical angle, allocate the total duty cycle opening coefficient to the opening coefficient of the A-phase winding and the B-phase winding of the two-phase hybrid stepper motor 6. Constant current drive control steps: Based on the opening coefficients of phase A winding and phase B winding, the embedded processor 4 outputs the corresponding phase A PWM control signal and phase B PWM control signal to the H-bridge gate drive circuit, controlling the conduction and cutoff of the power transistors in phase A H-bridge and phase B H-bridge, so that the bus constant current drive of the two-phase hybrid stepper motor 6 outputs a constant torque.
[0044] Let the bus current corresponding to a certain constant torque of the two-phase hybrid stepper motor 6 be... The actual current sampled by the current sampling circuit after analog-to-digital conversion is Then the current deviation at the current moment is In the calculation step of the total duty cycle opening coefficient, the calculation process of the total duty cycle opening coefficient of the bus switching using the incremental PID closed-loop algorithm is as follows:
[0045]
[0046] in, The current deviation at the current moment (i.e., target current minus actual current). This represents the current deviation at the previous moment. The current deviation between the two moments is... This is a proportionality coefficient (related to sampling time and rotation speed fluctuations). This is the integral coefficient (related to sampling time). These are the differential coefficients (related to sampling time and motor inertia). This is the total duty cycle opening coefficient (current control quantity) for the current busbar on / off state. This represents the increment of the total duty cycle opening coefficient for the current busbar switching position. It is the total duty cycle opening coefficient of the busbar at the previous moment.
[0047] In this embodiment, current closed-loop control is performed using an incremental PID algorithm. Compared with positional PID, it has the advantages of being lightweight, stable, and resistant to overshoot. Its core advantages are no integral accumulation, smooth control, and low computational resource consumption. It is suitable for scenarios such as current variable control and can fully save the computational resources of low-cost FPGAs or processors.
[0048] In the opening coefficient allocation step, the calculation process for allocating the total duty cycle opening coefficient to the A-phase winding and B-phase winding of the two-phase hybrid stepper motor 6 (i.e., calculating the opening coefficient of each phase through the total opening coefficient of the busbar switching) is as follows:
[0049] in, To perform integer operations, For the modulo operation, The number of adjustable pulses per PWM pulse. This is the total duty cycle opening coefficient. The electrical angle within one tooth cogging angle period. This represents the number of whole steps in one revolution of the two-phase hybrid stepper motor 6. This refers to the microstepping value per full step for the two-phase hybrid stepper motor 6. The target total number of microsteps for the two-phase hybrid stepper motor 6. This is the opening factor of phase A winding. This is the opening factor of phase B winding.
[0050] Adjustable number within PWM pulse ,in, The clock speed of the embedded processor 4 This is the chopping frequency of the two-phase hybrid stepper motor 6.
[0051] See appendix Figure 2 In this embodiment, the A-phase H-bridge includes four power transistors: a first high-side transistor Q1, a second high-side transistor Q2, a first low-side transistor Q3, and a second low-side transistor Q4; the B-phase H-bridge includes four power transistors: a third high-side transistor Q5, a fourth high-side transistor Q6, a third low-side transistor Q7, and a fourth low-side transistor Q8. In the constant current drive control step, controlling the on / off state of the power transistors in the A-phase and B-phase H-bridges specifically involves: When the opening coefficient of phase A winding At that time, phase A is in forward current, controlling Q1 and Q4 to turn on synchronously, with the number of main frequency pulses for activation being: The absolute value of Q2 and Q3 indicates that the circuit is closed; when At that time, phase A is in reverse current, controlling Q2 and Q3 to turn on synchronously, with the number of main frequency pulses for activation being: The absolute value of Q1 and Q4 is cut off; when the opening coefficient of phase B winding is... At that time, phase B is in positive current, controlling Q5 and Q8 to turn on synchronously, with the number of main frequency pulses for activation being: The absolute value of Q6 and Q7 indicates that the circuit is closed; when... At that time, phase B is in reverse current, controlling Q6 and Q7 to turn on synchronously, with the number of turn-on pulses being: The absolute value of Q5 and Q8 is the cutoff point.
[0052] The vector current is synthesized using the above method. for:
[0053] in, Let A be the winding current vector. This is the winding current vector for phase B. This represents the amplitude of the bus current. The resultant current vector has an amplitude equal to the bus current amplitude. ,by The phase angle refers to the sinusoidal change in current between the two phase windings. This occurs whenever the electrical angle... When changed, the corresponding composite vector It will rotate synchronously at the corresponding angle and always maintain a constant amplitude, so the torque of the motor can remain consistent and stable when it rotates.
[0054] See appendix Figure 3 and Figure 4 This illustrates the current waveforms and composite vector relationships of phases A and B of the two-phase hybrid stepper motor 6 under the drive circuit and control strategy of this embodiment. (Attached...) Figure 3 The graph shows the waveforms of phase A and phase B currents. The horizontal axis represents time t, and the vertical axis represents the current amplitude iM. The dashed line corresponds to the phase A current waveform, and the solid line corresponds to the phase B current waveform. Both are sinusoidal signals with a 90° phase difference. The four time points A, B, C, and D marked in the graph correspond to the magnitude and direction of the phase A and phase B currents at different times. Figure 4 The current synthesis vector diagram uses phase A current as the vertical component and phase B current as the horizontal component. The phase A and phase B currents at different time points are synthesized as orthogonal components, resulting in a vector arrow that rotates along a circle with time (corresponding to time points A to D), forming a circular rotating magnetic field. Through this design, the phase A and phase B currents can synthesize a rotating magnetic field with a constant amplitude. Combined with the control strategy of this embodiment, it enables the stepper motor to operate smoothly with constant torque, effectively avoiding problems such as missed steps and low-frequency oscillations.
[0055] In this embodiment, the control strategy of the bus constant current drive circuit of the two-phase hybrid stepper motor 6 also includes an overcurrent protection step: a preset overcurrent threshold is used, and the embedded processor 4 compares the actual bus current with the overcurrent threshold in real time; when the actual bus current reaches or exceeds the overcurrent threshold, the total duty cycle opening coefficient is adjusted. Set to 0, and simultaneously output a cutoff signal to the H-bridge gate drive circuit to control all power transistors of the A-phase H-bridge and B-phase H-bridge to be cut off; when the actual bus current is less than the overcurrent threshold, resume the execution of the original opening coefficient allocation and PWM control logic.
[0056] In the above illustrative embodiment, the control strategy of the bus constant current drive circuit of the two-phase hybrid stepper motor adopts an incremental PID closed-loop algorithm, which has no integral accumulation problem and low computational resource consumption. It is compatible with processors such as FPGA or MCU, avoiding the computational burden caused by dual-loop circuits. The opening coefficient is allocated based on the cosine and sine laws of the electrical angle to ensure constant torque output of the motor and effectively avoid step loss and low-frequency oscillation problems. Combined with overcurrent protection logic, it takes into account both control accuracy and operational safety, realizes the motor's ultra-low speed, stable and quiet operation, and adapts to the needs of multiple application scenarios.
[0057] Example 3: This embodiment demonstrates the specific control process based on the two-phase hybrid stepper motor bus constant current drive circuit of Embodiment 1 and the control strategy of Embodiment 2, combined with actual parameters.
[0058] First, set the basic parameters. Given that the number of full steps in one revolution of the two-phase hybrid stepper motor 6 is N=200, and the microstepping of each full step is n=256, the chopping frequency of the two-phase hybrid stepper motor 6 is... The main frequency of the embedded processor 4 (FPGA / MCU) is Based on this, the adjustable number within the PWM pulse can be calculated. , .
[0059] Then, the total duty cycle opening coefficient is determined, and the constant current target of the two-phase hybrid stepper motor 6 is set to 0.3A. The total bus duty cycle opening coefficient at the current cycle time is calculated using an incremental PID closed-loop algorithm. .
[0060] When the two-phase hybrid stepper motor 6 rotates to the total number of microsteps... At that time, according to the formula for electrical angle, the result is calculated as follows: ; Further calculation of the opening factor of phases A and B:
[0061]
[0062] Finally, the H-bridge power transistors are controlled, because... The first high-side transistor Q1 and the second low-side transistor Q4 of the A-phase H-bridge are simultaneously turned on, with 1156 main clock cycles activated in each PWM cycle. The second high-side transistor Q2 and the first low-side transistor Q3 are turned off. The fourth high-side transistor Q6 and the third low-side transistor Q7 of the B-phase H-bridge are turned on synchronously, and 321 main clock cycles are turned on in each PWM cycle, while the third high-side transistor Q5 and the fourth low-side transistor Q8 are turned off.
[0063] Through parameter calculation and control actions in this embodiment, constant current drive of the stepper motor bus can be achieved, ensuring constant torque and no step loss oscillation during motor operation.
[0064] Through the description of several embodiments of the bus constant current drive circuit and its control strategy for the two-phase hybrid stepper motor 6 of the present invention, it can be seen that the embodiments of the bus constant current drive scheme for the two-phase hybrid stepper motor 6 of the present invention have at least one or more of the following advantages: 1. Simplify circuit structure and reduce hardware costs The low-voltage side bus single-resistor current sampling method is adopted, which eliminates the need for independent sampling and signal conditioning circuits for two-phase currents, greatly reducing hardware complexity and material costs, while improving circuit reliability; coupled with constant frequency chopper drive, it reduces unpredictable high-frequency interference.
[0065] 2. Optimize control logic to save computing resources Incremental PID is used to achieve constant current closed-loop control of a single bus. There is no integral accumulation, the control quantity is smooth, and only one PID operation is required. There is no need to perform closed-loop processing for phases A and B separately, which greatly saves processor computing resources and improves motor responsiveness.
[0066] 3. Ensure operational performance and achieve smooth drive. By allocating the phase winding opening coefficient based on the sine and cosine law of electrical angle, the motor can achieve constant torque output, effectively avoiding step loss and low-frequency oscillation. It can also achieve ultra-high resolution subdivision of the whole step in scenarios with limited sampling accuracy and tight computing resources, ensuring the motor operates quietly and smoothly at ultra-low speed.
[0067] 4. Possesses practical value and adapts to various scenarios. The drive circuit and control strategy have been verified in orbit in a series of satellite electromechanical products. The technical solution is mature and reliable, and can be widely promoted to stepper motor drive scenarios in automation and various electromechanical products.
[0068] Finally, it should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0069] The above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them; although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications can still be made to the specific implementation of the present invention or equivalent substitutions can be made to some technical features without departing from the spirit of the technical solutions of the present invention, and all such modifications and substitutions should be covered within the scope of the technical solutions claimed in the present invention.
Claims
1. A bus constant current drive circuit for a two-phase hybrid stepper motor, characterized in that, include: A current sampling module is used to collect the low-voltage side bus current of a two-phase hybrid stepper motor and convert the current signal into a voltage signal. An operational amplifier circuit, the input terminal of which is connected to the output terminal of the current sampling module, is used to amplify the voltage signal; A filter, the input of which is connected to the output of the operational amplifier circuit, is used to filter the amplified voltage signal; An embedded processor is provided, with its signal input terminal connected to the output terminal of the filter to receive the filtered voltage signal. The embedded processor is used to calculate the actual bus current based on the filtered voltage signal, and then calculate the total duty cycle opening coefficient of the bus switching through an incremental PID closed-loop algorithm. According to the current electrical angle of the two-phase hybrid stepper motor, the total duty cycle opening coefficient is allocated to the A-phase winding and B-phase winding of the two-phase hybrid stepper motor, and the corresponding A-phase PWM control signal and B-phase PWM control signal are output. The H-bridge gate drive circuit has its control input terminal connected to the PWM signal output terminal of the embedded processor. The H-bridge gate drive circuit controls the conduction and cutoff of the power transistors in the A-phase H-bridge and B-phase H-bridge respectively according to the A-phase PWM control signal and the B-phase PWM control signal, so as to drive the two-phase hybrid stepper motor with constant current from the bus to output constant torque.
2. The bus constant current driving circuit for two-phase hybrid stepping motor as claimed in claim 1, wherein It also includes an ADC analog-to-digital converter; the input terminal of the ADC is connected to the output terminal of the filter, and the output terminal of the ADC is connected to the signal input terminal of the embedded processor. The ADC is used to convert the filtered voltage signal into a digital signal and then transmit it to the embedded processor.
3. The bus constant current driving circuit of a two-phase hybrid stepping motor as claimed in claim 1, wherein The H-bridge gate drive circuit includes an A-phase H-bridge gate drive circuit module and a B-phase H-bridge gate drive circuit module; the A-phase H-bridge gate drive circuit module is connected to the power transistor of the A-phase H-bridge and receives the A-phase PWM control signal output by the embedded processor; the B-phase H-bridge gate drive circuit module is connected to the power transistor of the B-phase H-bridge and receives the B-phase PWM control signal output by the embedded processor.
4. The bus constant current driving circuit for two-phase hybrid stepping motor as claimed in claim 1, wherein The embedded processor is an FPGA or MCU processor.
5. A control strategy for bus constant current drive circuit of two-phase hybrid stepping motor, characterized by, The bus constant current drive circuit for a two-phase hybrid stepper motor as described in any one of claims 1-4 includes the following steps: Current signal processing steps: The low-voltage side bus current of the two-phase hybrid stepper motor is acquired by the current sampling module, amplified by the operational amplifier circuit and filtered by the filter, and then the processed voltage signal is received by the embedded processor and the actual bus current is calculated. Total duty cycle opening coefficient calculation steps: Based on the deviation between the preset target bus current and the actual bus current, the embedded processor calculates the total duty cycle opening coefficient of the bus switching through an incremental PID closed-loop algorithm. Steps for allocating opening coefficients: The embedded processor determines the current electrical angle of the two-phase hybrid stepping motor, and then distributes the total duty ratio opening degree coefficient to the opening degree coefficients of the A-phase winding and the B-phase winding of the two-phase hybrid stepping motor according to the cosine and sine rules corresponding to the electrical angle; The constant current drive control step: the embedded processor outputs corresponding A-phase PWM control signals and B-phase PWM control signals to the H-bridge gate drive circuit based on the opening degree coefficients of the A-phase winding and the B-phase winding, controls the conduction and cutoff of the power transistors in the A-phase H-bridge and the B-phase H-bridge, so as to drive the two-phase hybrid stepping motor with constant force and torque.
6. The control strategy of bus constant current driving circuit of two-phase hybrid stepping motor as claimed in claim 5, wherein, In the total duty ratio opening degree coefficient calculation step, the calculation process of the total duty ratio opening degree coefficient of the bus on-off through the incremental PID closed loop algorithm is as follows: wherein, is the current time current deviation, is the previous time current deviation, is the previous two time current deviation, is the proportional coefficient, is the integral coefficient, is the derivative coefficient, is the current time bus on-off total duty factor coefficient, is the current time bus on-off total duty factor coefficient increment, is the previous time bus on-off total duty factor coefficient.
7. The control strategy of bus constant current driving circuit of two-phase hybrid stepping motor as claimed in claim 5, wherein, In the opening degree coefficient distribution step, the calculation process of distributing the total duty ratio opening degree coefficient to the A-phase winding and the B-phase winding of the two-phase hybrid stepping motor is as follows: wherein, is an integer operation, is a remainder operation, is an adjustable number within a PWM pulse, is a total duty ratio opening coefficient, is an electrical angle, is a subdivision number per full step of a two-phase hybrid stepping motor, is a target total subdivision micro-step number of a two-phase hybrid stepping motor, is an opening coefficient of an A-phase winding, is an opening coefficient of a B-phase winding.
8. The control strategy of bus constant current driving circuit of two-phase hybrid stepping motor as claimed in claim 7, wherein, adjustable number of pulses within the PWM pulse wherein, is the clock frequency of the embedded processor, is the chopping frequency of the two-phase hybrid stepper motor.
9. The control strategy of bus constant current driving circuit of two-phase hybrid stepping motor as claimed in claim 7, wherein, The A-phase H-bridge includes four power transistors, namely the first high-side transistor Q1, the second high-side transistor Q2, the first low-side transistor Q3, and the second low-side transistor Q4. The B-phase H-bridge includes four power transistors, namely the third high-side transistor Q5, the fourth high-side transistor Q6, the third low-side transistor Q7, and the fourth low-side transistor Q8. In the constant current drive control step, the conduction and cutoff of the power transistors in the A-phase H-bridge and the B-phase H-bridge are as follows: When the opening coefficient of the A-phase winding is , control Q1 and Q4 to open synchronously, the number of opening pulses is the absolute value of , and Q2 and Q3 are cut off; when , control Q2 and Q3 to open synchronously, the number of opening pulses is the absolute value of , and Q1 and Q4 are cut off; When the opening factor of the B-phase winding is , control Q5 and Q8 to open synchronously, the number of opening pulses is the absolute value of , and Q6 and Q7 are closed; when , control Q6 and Q7 to open synchronously, the number of opening pulses is the absolute value of , and Q5 and Q8 are closed.
10. The control strategy of bus constant current driving circuit of two-phase hybrid stepping motor as claimed in claim 7, wherein, Also includes overcurrent protection step: preset overcurrent threshold, the embedded processor compares the actual bus current with the overcurrent threshold in real time; when the actual bus current reaches or exceeds the overcurrent threshold, the total duty ratio opening degree coefficient is set to 0, and a cutoff signal is output to the H-bridge gate drive circuit to control all power transistors of the A-phase H-bridge and the B-phase H-bridge to be cut off; when the actual bus current is less than the overcurrent threshold, the original opening degree coefficient distribution and PWM control logic are resumed. Also includes overcurrent protection step: preset overcurrent threshold, the embedded processor compares the actual bus current with the overcurrent threshold in real time; when the actual bus current reaches or exceeds the overcurrent threshold, the total duty ratio opening degree coefficient is set to 0, and a cutoff signal is output to the H-bridge gate drive circuit to control all power transistors of the A-phase H-bridge and the B-phase H-bridge to be cut off; when the actual bus current is less than the overcurrent threshold, the original opening degree coefficient distribution and PWM control logic are resumed.