Control method of stepping motor

文档序号:571618 发布日期:2021-05-18 浏览:32次 中文

阅读说明:本技术 一种步进电机的控制方法 (Control method of stepping motor ) 是由 宋慧明 王�忠 于 2021-03-30 设计创作,主要内容包括:本发明涉及自动化控制技术领域,尤其是指一种步进电机的控制方法,包括脉冲测试器、第一PID控制器、第二PID控制器、第三PID控制器、第一处理器、第二处理器、编码器、两相电桥、电机,编码器、第一PID控制器均与脉冲测试器电性连接;第二PID控制器、第三PID控制器均与第一PID控制器电性连接,第二PID控制器、第三PID控制器均与第一处理器电性连接,第一处理器与两相电桥电性连接,两相电桥与电机电性连接,电机与编码器电性连接,根据定、转子磁极轴线间的夹角θ确定定子电流磁势的q轴和d轴分量的方向和幅值,进而分别对q轴分量和d轴分量加以控制,实现电磁转矩的控制,减少高温问题,能耗损失问题,与延长电机的使用寿命。(The invention relates to the technical field of automatic control, in particular to a control method of a stepping motor, which comprises a pulse tester, a first PID controller, a second PID controller, a third PID controller, a first processor, a second processor, an encoder, a two-phase bridge and a motor, wherein the encoder and the first PID controller are electrically connected with the pulse tester; the second PID controller and the third PID controller are electrically connected with the first PID controller, the second PID controller and the third PID controller are electrically connected with the first processor, the first processor is electrically connected with the two-phase bridge, the two-phase bridge is electrically connected with the motor, the motor is electrically connected with the encoder, the direction and the amplitude of a q-axis component and a d-axis component of stator current magnetic potential are determined according to an included angle theta between stator and rotor magnetic pole axes, and then the q-axis component and the d-axis component are controlled respectively, so that the control of electromagnetic torque is realized, the high temperature problem and the energy consumption loss problem are reduced, and the service life of the motor is prolonged.)

1. A control device of a stepping motor is characterized by comprising a pulse tester, a first PID controller, a second PID controller, a third PID controller, a first processor, a second processor, an encoder, a two-phase bridge and a motor, wherein the encoder and the first PID controller are electrically connected with the pulse tester;

the second PID controller and the third PID controller are both electrically connected with the first PID controller, the second PID controller and the third PID controller are both electrically connected with the first processor, the first processor is electrically connected with the two-phase electric bridge, the two-phase electric bridge is electrically connected with the motor, and the motor is electrically connected with the encoder;

the second processor is electrically connected with the first PID controller, and the first processor and the second processor are both electrically connected with the encoder.

2. The stepping motor control device according to claim 1, wherein the pulse tester is configured to measure stator currents i α, i β of the motor.

3. The control device of a stepping motor according to claim 1, wherein the first PID controller is capable of converting the input values of i α and i β into values of Id and Ip and outputting the values of Id and Ip in the formula of Id α cos θ + i β sin θ and Iq α sin θ + i β cos θ.

4. The control device of a stepping motor according to claim 1, wherein the second PID controller is capable of converting input va, V β values into Vq values output; the conversion formula is V α ═ Vd ═ cos θ -Vq ═ sin θ, and V β ═ Vd ═ sin θ + Vq × cos θ.

5. The control device of the stepping motor according to claim 1, wherein the third PID controller is capable of converting the input va, V β values into Vd values and outputting the Vd values; the conversion formula is V α ═ Vd ═ cos θ -Vq ═ sin θ, and V β ═ Vd ═ sin θ + Vq × cos θ.

6. The stepping motor control device according to claim 1, wherein the encoder is capable of obtaining a current actual accumulated stroke of the motor and an actual speed Vfbd value of the motor.

7. A control method of a stepping motor is characterized by comprising the following steps:

s1, current loop:

a. measuring motor i α and i β values: measuring values of i alpha and i beta of the two-phase electric bridge, wherein the i alpha and the i beta are mutually orthogonal time-varying current values, and rotating the 2-axis system to align with the magnetic flux of the rotor according to a transformation angle theta calculated by the last iteration of the control ring; the variables i alpha and i beta are transformed to obtain Id and Iq, wherein the Id and the Iq are orthogonal currents transformed to a rotating coordinate system;

the Id is calculated by the formula: id ═ i α · cos θ + i β · sin θ

The Iq calculation formula is: iq ═ i α × sin θ + i β cos θ

b. Error signals are obtained by comparing actual values of Id, Iq and respective reference values, wherein the reference value of Id controls the rotor flux, the reference value of Iq controls the torque output of the motor, the error signal is an input to a PID controller, the output of the second PID controller is Vq, the output of the third PID controller is Vd, i.e. the voltage vector to be applied to the motor estimates the new transformation angle, wherein va, ν β, i α and i β are input parameters;

the new transformation angle theta can inform the algorithm of where the next voltage vector is, and by using the new transformation angle theta, the Vd and Vq output values of the first PID controller can be inverted to a static reference coordinate system, so that the second PID controller and the third PID controller can carry out calculation, and the calculation can generate the next orthogonal voltage value V alpha and V beta;

the formula for V alpha is: v α ═ Vd ═ cos θ -Vq ═ sin θ

The formula for V β is: v β ═ Vd ═ sin θ + Vq ═ cos θ;

s2, speed loop:

a. when a control signal is input (pulse and bus), a reference speed Vref can be obtained;

b. acquiring the actual speed Vfbd of the current motor through an encoder;

c. when Vref > Vfbd, increase the Iq reference value; when Vref is less than Vfbd, decreasing the Iq reference value;

s3, position loop:

a. when a control signal is input (pulse and bus), a reference accumulated stroke can be obtained;

b. acquiring the actual accumulated travel of the current motor through an encoder;

c. controlling the motor to run and stop by comparison;

s4, stationary processing:

when the motor is static, outputting a static torque to lock the motor through a traditional control mode, wherein the static torque can be configured, the magnitude of the static torque is determined by configured current, and theta is the electric angle of the actual position at the final static time;

detecting two-phase feedback current of the motor, and comparing the feedback current with the set output current to adjust the output so as to finally achieve the required static torque;

the required V alpha and V beta sizes are obtained after the configured current and the feedback current are converted by the second PID controller and the third PID controller through the first processor.

Technical Field

The invention relates to the technical field of automatic control, in particular to a control method of a stepping motor.

Background

In the field of automatic control, the stepping motor is widely used by respective automatic equipment manufacturers due to simple and accurate control and low cost, in order to ensure the stepping accuracy of the stepping motor, the stepping motor usually operates by adopting constant current maximum torque, and the situation of overshoot and step loss of the stepping motor can not occur as long as the torque required by a use scene does not exceed the maximum torque, which is one of the main reference standards in type selection at present; the mode not only brings accurate walking, but also has the following problems of high temperature and energy consumption loss, and seriously influences the service life of the motor.

Disclosure of Invention

The invention aims to overcome the defects of the prior art and provide a technical scheme capable of solving the problems.

A control device of a stepping motor comprises a pulse tester, a first PID controller, a second PID controller, a third PID controller, a first processor, a second processor, an encoder, a two-phase bridge and a motor, wherein the encoder and the first PID controller are electrically connected with the pulse tester; the second PID controller and the third PID controller are both electrically connected with the first PID controller, the second PID controller and the third PID controller are both electrically connected with the first processor, the first processor is electrically connected with the two-phase electric bridge, the two-phase electric bridge is electrically connected with the motor, and the motor is electrically connected with the encoder; the second processor is electrically connected with the first PID controller, and the first processor and the second processor are both electrically connected with the encoder.

Preferably, the pulse tester is used for measuring the stator currents i α, i β of the electric machine.

Preferably, the first PID controller converts the input values of i α and i β into values of Id and Ip, and outputs the values as a conversion formula of Id ═ i α × cos θ + i β × sin θ and Iq ═ i α × sin θ + i β cos θ.

Preferably, the second PID controller is configured to convert the input V α and V β values into Vq values and output the Vq values by using a conversion formula of V α ═ Vd × cos θ -Vq × sin θ, and V β ═ Vd × sin θ + Vq × cos θ.

Preferably, the third PID controller is configured to convert the input V α and V β values into Vd values and output the Vd values by using a conversion formula of V α ═ Vd × cos θ -Vq × sin θ, and V β ═ Vd × sin θ + Vq × cos θ.

Preferably, the encoder can acquire the actual accumulated stroke of the current motor and the actual speed Vfbd value of the motor.

A control method of a stepping motor, comprising the steps of:

s1, current loop:

a. measuring values of i alpha and i beta of the two-phase electric bridge, wherein the i alpha and the i beta are mutually orthogonal time-varying current values, and rotating the 2-axis system to align with the magnetic flux of the rotor according to a transformation angle theta calculated by the last iteration of the control ring; the variables i alpha and i beta are transformed to obtain Id and Iq, wherein the Id and the Iq are orthogonal currents transformed to a rotating coordinate system; under steady state conditions, Id and Iq are constants.

The Id is calculated by the formula: id ═ i α · cos θ + i β · sin θ

The Iq calculation formula is: iq ═ i α × sin θ + i β cos θ

b. Error signals are obtained by comparing actual values of Id, Iq and respective reference values, wherein the reference value of Id controls the rotor flux, the reference value of Iq controls the torque output of the motor, the error signal is an input to a PID controller, the output of the second PID controller is Vq, the output of the third PID controller is Vd, i.e. the voltage vector to be applied to the motor estimates the new transformation angle, wherein va, ν β, i α and i β are input parameters;

the new transformation angle theta can inform the algorithm of where the next voltage vector is, and by using the new transformation angle theta, the Vd and Vq output values of the first PID controller can be inverted to a static reference coordinate system, so that the second PID controller and the third PID controller can carry out calculation, and the calculation can generate the next orthogonal voltage value V alpha and V beta;

the formula for V alpha is: v α ═ Vd ═ cos θ -Vq ═ sin θ

The formula for V β is: v β is Vd × sin θ + Vq × cos θ.

S2, speed loop:

a. when a control signal is input (pulse and bus), a reference speed Vref can be obtained;

b. acquiring the actual speed Vfbd of the current motor through an encoder;

c. when Vref > Vfbd, increase the Iq reference value; when Vref is less than Vfbd, decreasing the Iq reference value;

s3, position loop:

a. when a control signal is input (pulse and bus), a reference accumulated stroke can be obtained;

b. acquiring the actual accumulated travel of the current motor through an encoder;

c. controlling the motor to run and stop by comparison;

s4, stationary processing:

when the motor is static, outputting a static torque to lock the motor through a traditional control mode, wherein the static torque can be configured, the magnitude of the static torque is determined by configured current, and theta is the electric angle of the actual position at the final static time;

and detecting two-phase feedback current of the motor, and comparing the feedback current with the set output current to adjust the output so as to finally achieve the required static torque.

Compared with the prior art, the invention has the beneficial effects that: the direction and the amplitude of a q-axis component and a d-axis component of the stator current magnetic potential are determined according to an included angle theta between magnetic pole axes of the stator and the rotor, and then the q-axis component and the d-axis component are controlled respectively, so that the control of electromagnetic torque is realized, the problems of high temperature and energy consumption loss are reduced, and the service life of the motor is prolonged.

Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.

FIG. 1 is a schematic diagram of the present invention.

Fig. 2 is a current view.

Fig. 3 is a speed view.

In the figure: a first PID controller-1, a second PID controller-2, a third PID controller-3, a first processor-4, a second processor-5, an encoder-6, a two-phase bridge-7, a motor-8, and a pulse tester-9.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all 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.

Referring to fig. 1 to 3, in an embodiment of the present invention, a control device for a stepping motor includes a pulse tester 9, a first PID controller 1, a second PID controller 2, a third PID controller 3, a first processor 4, a second processor 5, an encoder 6, a two-phase bridge 7, and a motor 8, where the encoder 6 and the first PID controller 1 are electrically connected to the pulse tester 9; the second PID controller 2 and the third PID controller 3 are both electrically connected with the first PID controller 1, the second PID controller 2 and the third PID controller 3 are both electrically connected with the first processor 4, the first processor 4 is electrically connected with the two-phase electric bridge 7, the two-phase electric bridge 7 is electrically connected with the motor 8, and the motor 8 is electrically connected with the encoder 6; the second processor 5 is electrically connected with the first PID controller 1, and both the first processor 4 and the second processor 5 are electrically connected with the encoder 6.

The pulse tester 9 is used to measure the stator currents i α, i β of the motor 8.

The first PID controller 1 can convert the input values of i α and i β into values of Id and Ip, and output the values as an equation Id ═ i α × cos θ + i β × sin θ, and Iq ═ i α × sin θ + i β cos θ.

The second PID controller 2 can convert the input V α and V β values into Vq values and output the Vq values by using the conversion formula of V α ═ Vd × cos θ -Vq × sin θ, and V β ═ Vd × sin θ + Vq × cos θ.

The third PID controller 3 can convert the input V α and V β values into Vd values and output them, where V α is Vd × cos θ -Vq × sin θ, and V β is Vd × sin θ + Vq × cos θ.

The encoder 6 can obtain the current actual accumulated stroke of the motor 8 and the actual speed Vfbd value of the motor 8.

The relation between the electromagnetic torque and the stator current is not a linear relation, and in fact, only the tangential attraction of the stator rotating magnetic poles to the rotor magnetic poles can generate the electromagnetic torque for driving the rotor to rotate; therefore, the magnetic potential generated by the stator current can be decomposed into two directional components, namely a direct-axis (or called d-axis) component along the magnetic pole direction of the rotor and an orthogonal-axis (or called q-axis) component orthogonal to the magnetic pole direction of the rotor; obviously, only the q-axis component can generate electromagnetic torque; therefore, the electromagnetic torque cannot be controlled simply by adjusting the stator current, but the directions and the amplitudes of q-axis and d-axis components of the stator current magnetic potential are determined according to the included angle theta between the stator magnetic pole axes and the rotor magnetic pole axes, and then the q-axis component and the d-axis component are controlled respectively, so that the electromagnetic torque is controlled.

A control method of a stepping motor, comprising the steps of:

s1, current loop:

a. measuring values of a two-phase bridge 7i alpha and i beta, wherein the i alpha and the i beta are mutually orthogonal time-varying current values, and rotating the 2-axis system to align with the magnetic flux of the rotor according to a transformation angle theta calculated by the last iteration of the control ring; the variables i alpha and i beta are transformed to obtain Id and Iq, wherein the Id and the Iq are orthogonal currents transformed to a rotating coordinate system; under steady state conditions, Id and Iq are constants.

The Id is calculated by the formula: id ═ i α · cos θ + i β · sin θ

The Iq calculation formula is: iq ═ i α × sin θ + i β cos θ (see fig. 2)

b. Error signals are obtained by comparing the actual values of Id, Iq with respective reference values, where Id's reference value controls the rotor flux, Iq's reference value controls the torque output of the motor 8, the error signal is an input to the PID controller, the output of the second PID controller 2 is Vq, the output of the third PID controller 3 is Vd, i.e. the voltage vector to be applied to the motor 8 estimates the new transformation angle, where V α, V β, i α and i β are input parameters;

the new transformation angle theta may inform the algorithm where the next voltage vector is, and by using the new transformation angle theta, the Vd and Vq output values of the first PID controller may be inverted to the stationary reference frame, causing the second PID controller, the third PID controller to perform calculations that will yield the next quadrature voltage values V alpha and V beta.

The formula for V alpha is: v α ═ Vd ═ cos θ -Vq ═ sin θ

The formula for V β is: v β is Vd × sin θ + Vq × cos θ (see fig. 2)

S2, speed loop:

a. when a control signal is input (pulse, bus), the reference speed Vref can be acquired.

b. The current actual speed Vfbd of the motor 8 is obtained by the encoder 6.

c. When Vref > Vfbd, increase the Iq reference value; when Vref < Vfbd, the Iq reference is decreased.

S3, position loop:

a. when a control signal is input (pulse, bus), a reference accumulated stroke can be obtained.

b. The current actual accumulated travel of the motor 8 is obtained by the encoder 6.

c. The motor 8 is controlled to run and stop by comparison.

S4, stationary processing:

when the motor 8 is at rest, a static torque is output through a traditional control mode to lock the motor 8, the static torque can be configured, the magnitude of the static torque is determined by the configured current, and theta is the actual position electrical angle at the last rest.

And (3) detecting two-phase feedback current of the motor 8, comparing the output set current to regulate the output, and finally achieving the required static torque.

Namely, the required magnitude of V alpha and V beta is obtained after the configured current and the feedback current are converted by the second PID controller 2 and the third PID controller 3 through the first processor 4.

It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种永磁同步电机非光滑自适应直接转矩控制方法和系统

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!