Motor driving circuit and control method thereof

文档序号:1469609 发布日期:2020-02-21 浏览:29次 中文

阅读说明:本技术 一种电动机驱动电路及其控制方法 (Motor driving circuit and control method thereof ) 是由 赵长海 万秋华 于海 梁立辉 卢新然 于 2019-11-08 设计创作,主要内容包括:本发明涉及电动机驱动技术领域,具体涉及一种电动机驱动电路及其控制方法。本发明采用两级控制的方法来控制电动机线圈中的电流,其中第一级电路为电压转换电路,电压转换电路将输入的电压Ui转换为电动机上所需的电压Us。第二级电路由多个开关管、电动机线圈、电流检测器组成的桥式电路来控制电动机线圈上的电流。通过控制第一级电路的PWM0信号的占空比,来控制施加在第二级电路电动机线圈上的电压Us,使第二级电路在电动机线圈电流不变的情况下增大PWM信号的有效时间,降低死区对电动机的影响,使电动机线圈的电流更稳定,电动机的运行更平稳,精度更高。(The invention relates to the technical field of motor driving, in particular to a motor driving circuit and a control method thereof. The invention adopts a two-stage control method to control the current in the motor coil, wherein the first stage circuit is a voltage conversion circuit which converts the input voltage Ui into the voltage Us required by the motor. The second stage circuit is a bridge circuit consisting of a plurality of switching tubes, a motor coil and a current detector and is used for controlling the current on the motor coil. The duty ratio of the PWM0 signal through controlling the primary circuit controls the voltage Us applied to the motor coil of the secondary circuit, so that the effective time of the PWM signal is increased by the secondary circuit under the condition that the current of the motor coil is not changed, the influence of a dead zone on the motor is reduced, the current of the motor coil is more stable, the motor runs more stably, and the precision is higher.)

1. A motor drive circuit comprising a two-stage circuit, wherein a first stage circuit is a voltage conversion circuit which converts an input voltage Ui into a desired voltage Us across a motor, and a second stage circuit is a bridge circuit, the bridge circuit comprising: a plurality of switching tubes, a motor coil, and a current detector; the motor drive circuit controls the voltage Us applied to the motor coil in the second-stage circuit by controlling the duty ratio of the PWM0 signal input to the first-stage circuit.

2. The motor drive circuit according to claim 1, wherein the voltage conversion circuit comprises: the power supply circuit comprises a switching tube V0, an inductor L1, a diode D0 and a capacitor C1, wherein the drain electrode of the switching tube V0 is connected with an input power Ui, the grid electrode of the switching tube V0 is connected with a voltage control signal PWM0, the source electrode of the switching tube V0 is connected with the cathode of the diode D0 and one end of an inductor L1, the other end of the inductor L1 is connected with the anode of the capacitor C1, the cathode of the capacitor C1 and the anode of the diode D0 are connected with a power ground, and the anode of the capacitor C1 outputs a voltage Us.

3. The motor drive circuit according to claim 1, wherein the bridge circuit comprises: switch tubes V1-V4, diodes D1-D4, a motor coil M and a current detector U1; wherein V1 and D1 are switching tubes containing reverse freewheeling diodes.

4. A motor drive circuit control method applied to the motor drive circuit according to claim 1, characterized by comprising the steps of:

when the motor driving circuit is powered on, the duty ratio of the PWM0 is firstly set to be an initial value X0;

controlling the waveform output of PWM 1-PWM 4 according to the set value of the motor coil current, and calculating the effective time of the waveforms of PWM 1-PWM 4;

when the effective time of the waveforms of the PWM 1-4 is larger than a preset value Y1, increasing the duty ratio of the PWM 0; when the effective time of the waveforms of the PWM 1-4 is less than a preset value Y2, reducing the duty ratio of the PWM 0; when the effective time of the PWM 1-PWM 4 waveforms is between Y1 and Y2, keeping the duty ratio of the PWM0 unchanged; wherein Y2 < Y1.

5. The motor driving circuit control method according to claim 4, wherein when the effective time of the PWM 1-PWM 4 waveform is greater than a preset value Y1, the duty ratio of the PWM0 is increased until the effective time of the PWM 1-PWM 4 waveform is less than Y1 or the duty ratio of the PWM0 is a maximum value of 1.

6. The motor driving circuit control method according to claim 4, wherein when the effective time of the PWM 1-PWM 4 waveform is less than a preset value Y2, the duty ratio of the PWM0 is reduced until the effective time of the PWM 1-PWM 4 waveform is greater than Y2 or the duty ratio of the PWM0 is less than a set minimum value X1.

7. The motor drive circuit control method according to claim 4, wherein calculating the effective time of the PWM 1-PWM 4 waveforms includes: and calculating the vector composite value of the effective value of each path of PWM waveform.

8. The motor drive circuit control method according to claim 7, wherein, for a two-phase motor, voltage vectors of two-phase PWM waveforms are in an orthogonal relationship, and assuming that an effective value of a first-phase PWM waveform is M1 and an effective value of a second-phase PWM waveform is M2, a vector resultant value M of the effective values of the PWM waveforms is:

Figure FDA0002265324930000021

9. the motor drive circuit control method according to claim 7, wherein two voltage vectors of the output PWM waveform are in a relationship of an angle of 60 ° for a three-phase motor, and assuming that effective values of the two voltage vectors are N1 and N2, respectively, a vector resultant value N of the effective values of the PWM waveform is:

Figure FDA0002265324930000022

10. the motor drive circuit control method according to claim 4, characterized by further comprising:

when a motor driving circuit is powered on, firstly, whether the motor driving circuit is in a fixed voltage mode or an automatic adjusting mode is detected;

if the voltage is in the fixed voltage mode, setting the signal of the PWM0 as a fixed square wave signal, wherein the duty ratio of the square wave signal is a fixed set value; if the auto-tune mode is used, the duty cycle of the PWM0 is first set to a starting value X0.

Technical Field

The invention relates to the technical field of motor driving, in particular to a motor driving circuit and a control method thereof.

Background

The motor is a device for converting electric energy into mechanical energy, utilizes an electrified coil to generate a rotating magnetic field, acts on a rotor to form magnetoelectric power rotating torque, and is widely applied to various industrial systems. The control of the torque of the motor is actually the control of the current in the motor coil. Since it is very difficult to directly control the current of the motor coil, the current of the coil is generally controlled by controlling the voltage across the coil.

The most common use today is for pulse width modulated (PWM wave) driven motors, as shown in fig. 1. In fig. 1, V1-V4 are switching tubes, and when the control end of the switching tube is increased in high level, the switching tube is turned on, and when the control end of the switching tube is increased in low level, the switching tube is turned off. When the switching tubes V1 and V4 are switched on and V2 and V3 are switched off, a forward voltage is applied to the motor coil; when V2 and V3 are conducted and V1 and V4 are closed, reverse voltage is applied to the motor coil; when V2 and V4 are on and V1 and V3 are off, no voltage is applied to the motor coil, and the motor is in a freewheeling state. The current on the coil is controlled by controlling the time for which the forward voltage or the reverse voltage is applied on the coil. In a control period, when the time of applying forward voltage on the coil is longer than the time of applying reverse voltage, the current of the coil is increased; conversely, when the reverse voltage is applied to the coil for a time greater than the forward voltage, the coil current decreases.

When V1 is turned on and V2 is turned off, the electromotive force at the point A in FIG. 1 is Us; when V1 is closed and V2 is turned on, the electromotive force at the point A is 0; when the switch tubes V1 and V2 are turned on simultaneously, the current flowing through V1 and V2 will be very large, possibly damaging the switch tubes. In order to protect the switch tube and prolong the service life of the switch tube, a dead zone is added during actual use. That is, when the state of V1 being opened and V2 being closed in fig. 1 is shifted to the state of V1 being closed and V2 being opened, a state of V1 and V2 both being closed is added, and this state is called a dead zone. In a commonly used control method, one PWM cycle is generally divided into three states, as shown in fig. 2, where state 1 is a forward voltage time, states 2 and 4 are dead time, and state 3 is a motor coil freewheel time.

In the dead zone state, the electromotive force at the point a is uncertain, and when the direction of the current in the coil is in the forward direction (current flows from left to right), the freewheeling diode of V2 is turned on, and the electromotive force at the point a is 0; when the current in the coil is in the reverse direction, the freewheeling diode of V1 will conduct and the electromotive force at point a will be Us. It is very difficult to accurately judge the direction of the current in the coil, so that the electromotive force at the a point is difficult to be determined in the dead zone state. Due to the existence of the dead zone, the control precision of the motor current can be influenced, and especially when the current crosses zero, the current waveform can be distorted, and the control precision of the motor can be seriously influenced.

Disclosure of Invention

The embodiment of the invention provides a motor driving circuit and a control method thereof, which at least solve the technical problem that the existing motor driving circuit has low control precision on a motor.

According to an embodiment of the present invention, there is provided a motor drive circuit including a two-stage circuit, in which a first stage circuit is a voltage conversion circuit that converts an input voltage Ui into a required voltage Us across a motor, and a second stage circuit is a bridge circuit, the bridge circuit including: a plurality of switching tubes, a motor coil, and a current detector; the motor drive circuit controls the voltage Us applied to the motor coil in the second-stage circuit by controlling the duty ratio of the PWM0 signal input to the first-stage circuit.

Further, the voltage conversion circuit includes: the power supply circuit comprises a switching tube V0, an inductor L1, a diode D0 and a capacitor C1, wherein the drain electrode of the switching tube V0 is connected with an input power Ui, the grid electrode of the switching tube V0 is connected with a voltage control signal PWM0, the source electrode of the switching tube V0 is connected with the cathode of the diode D0 and one end of an inductor L1, the other end of the inductor L1 is connected with the anode of the capacitor C1, the cathode of the capacitor C1 and the anode of the diode D0 are connected with a power ground, and the anode of the capacitor C1 outputs a voltage Us.

Further, the bridge circuit includes: switch tubes V1-V4, diodes D1-D4, a motor coil M and a current detector U1; wherein V1 and D1 are switching tubes containing reverse freewheeling diodes.

According to another embodiment of the present invention, there is provided a motor drive circuit control method to which the above motor drive circuit is applied, including the steps of:

when the motor driving circuit is powered on, the duty ratio of the PWM0 is firstly set to be an initial value X0;

controlling the waveform output of PWM 1-PWM 4 according to the set value of the motor coil current, and calculating the effective time of the waveforms of PWM 1-PWM 4;

when the effective time of the waveforms of the PWM 1-4 is larger than a preset value Y1, increasing the duty ratio of the PWM 0; when the effective time of the waveforms of the PWM 1-4 is less than a preset value Y2, reducing the duty ratio of the PWM 0; when the effective time of the PWM 1-PWM 4 waveforms is between Y1 and Y2, keeping the duty ratio of the PWM0 unchanged; wherein Y2 < Y1.

Further, when the effective time of the waveforms of the PWM 1-4 is larger than the preset value Y1, the duty ratio of the PWM0 is increased until the effective time of the waveforms of the PWM 1-4 is smaller than Y1 or the duty ratio of the PWM0 is the maximum value 1.

Further, when the effective time of the waveforms of the PWM 1-4 is smaller than a preset value Y2, the duty ratio of the PWM0 is reduced until the effective time of the waveforms of the PWM 1-4 is larger than Y2 or the duty ratio of the PWM0 is smaller than a set minimum value X1.

Further, calculating the effective time of the PWM 1-4 waveforms includes: and calculating the vector composite value of the effective value of each path of PWM waveform.

Further, for a two-phase motor, voltage vectors of two-phase PWM waveforms are in an orthogonal relationship, and assuming that an effective value of a first-phase PWM waveform is M1, and an effective value of a second-phase PWM waveform is M2, a vector composite value M of the effective values of the PWM waveforms is:

Figure BDA0002265324940000031

further, for a three-phase motor, two voltage vectors of the output PWM waveform are in a relationship of an included angle of 60 °, and assuming that effective values of the two voltage vectors are N1 and N2, respectively, a vector composite value N of the effective values of the PWM waveform is:

Figure BDA0002265324940000032

further, the method further comprises:

when a motor driving circuit is powered on, firstly, whether the motor driving circuit is in a fixed voltage mode or an automatic adjusting mode is detected;

if the voltage is in the fixed voltage mode, setting the signal of the PWM0 as a fixed square wave signal, wherein the duty ratio of the square wave signal is a fixed set value; if the auto-tune mode is used, the duty cycle of the PWM0 is first set to a starting value X0.

The motor driving circuit and the control method thereof in the embodiment of the invention can reduce the ratio of the dead time to the effective PWM waveform time, reduce the influence of the dead time on the motor, and especially improve the stability of the motor when the motor is at low speed and is still.

Drawings

The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:

FIG. 1 is a schematic diagram of a one-phase motor drive of the prior art;

FIG. 2 is a schematic diagram of a prior art one-phase motor drive PWM waveform;

FIG. 3 is a schematic diagram of a one-phase motor drive in accordance with an embodiment of the present invention;

FIG. 4 is a schematic diagram of a one-phase motor-driven PWM waveform in accordance with an embodiment of the present invention;

FIG. 5 is a schematic diagram of a three-phase motor drive in the practice of the present invention;

FIG. 6 is a schematic diagram of a three-phase motor drive PWM waveform in the practice of the present invention;

FIG. 7 is a flow chart of the operation in the practice of the present invention;

fig. 8 is a vector diagram of the effective value of the three-phase motor drive PWM waveform in the practice of the present invention.

Detailed Description

In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

When a motor is controlled by a PWM waveform, a dead zone of the PWM waveform is indispensable. A complete PWM waveform period time is generally divided into three sections, one section of time is dead zone time, one section of time is effective waveform time, and the other section of time is follow current time. The dead time is an unforeseen state, the effective waveform time is an excitation controllable state carried out according to needs, and the follow current time is approximately a state that the current is continuously unchanged. The smaller the ratio of the dead time to the effective PWM waveform time is, the smaller the influence of the dead time is; conversely, the larger the ratio of the dead time to the effective PWM waveform time, the greater the influence of the dead time.

To reduce the effect of dead-time, the ratio of dead-time to effective PWM waveform time needs to be reduced. When the same current is generated in the motor coil, the smaller the voltage Us applied to the coil is, the larger the required effective PWM waveform time is, and the smaller the influence of the dead zone is; conversely, the larger the voltage Us applied to the coil, the smaller the required effective PWM waveform time and the greater the influence of the dead zone. The invention adopts a two-stage PWM waveform control method to control the current in the motor coil, the circuit is shown in figure 3, one PWM waveform is used for controlling the voltage Us applied in the motor coil and is recorded as PWM0, and the other PWM waveforms are used for controlling the time of effective voltage applied in the motor coil, so as to control the current in the motor coil, and the current in the coil is consistent with the set value, such as PWM 1-PWM 4 in figure 4. Setting the power supply voltage of direct current input as Ui, wherein the larger the duty ratio of PWM0 is, the larger the voltage output by the inductor is; the smaller the duty ratio, the smaller the output voltage; when the duty ratio is 0, the output voltage Us is 0, and when the duty ratio is 1, the output voltage Us is Ui.

Taking one phase coil of a two-phase motor as an example, when the rotation speed of the motor is high, the current in the coil changes rapidly, the effective time of the PWM waveform for controlling the coil current is long, the influence of the dead zone is weak, and at the moment, the duty ratio of the PWM0 waveform is increased until the duty ratio is 1 at the highest, so as to ensure that the current in the coil can reach the set current. When the rotating speed of the motor is low or the motor stops, the effective time of the PWM waveform of the control coil current is short, the influence of the dead zone is large, the duty ratio of the PWM0 waveform is reduced, the voltage Us applied to the coil is reduced, the effective time of the PWM waveform of the control coil current is increased, and the influence of the dead zone is weakened, so that the smooth running of the motor is ensured. When the motor speed is at the intermediate value, the duty ratio of the PWM0 is in a proper ratio, so that the voltage Us applied to the coil is at a proper voltage, thereby ensuring smooth operation and fast response of the motor.

In order to prevent the motor from being unstable due to the continuous variation of the voltage Us applied to the motor coil caused by the frequent change of the duty ratio of the PWM0, a certain condition is required for the duty ratio change of the PWM0 in the actual control. When the effective time of the PWM 1-PWM 4 waveforms of the control coil current is larger than a set threshold value Y1, the duty ratio of the PWM0 is increased, so that the voltage Us applied to the motor coil is increased. When the effective time of the waveforms of PWM 1-4 is less than the set threshold value Y2, Y2 < Y1, the duty ratio of PWM0 is reduced, so that the voltage Us applied to the motor coil is reduced. When the effective time of the PWM 1-4 waveforms is between Y2 and Y1, the duty cycle of the PWM0 is kept unchanged. The motor driving circuit needs to detect the effective time of the waveforms from PWM1 to PWM4 in real time in the whole working process so as to set the duty ratio of PWM0 to be an appropriate value.

The duty ratio of the PWM0 may be set according to an external command, and when the external command is mainly for smooth operation of the motor at a low speed, the motor drive circuit decreases the duty ratio of the PWM0 to decrease the voltage Us applied to the coil; when the external command desires a fast response capability of the motor, the motor drive circuit increases the duty cycle of the PWM0 to increase the voltage Us applied to the coil.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种带防电磁干扰的变频器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!