Motor rotation control method and terminal

文档序号:1365633 发布日期:2020-08-11 浏览:32次 中文

阅读说明:本技术 一种电机转动的控制方法及终端 (Motor rotation control method and terminal ) 是由 何春洪 于 2020-05-07 设计创作,主要内容包括:本发明公开一种电机转动的控制方法及终端,确定所述电机的当前转动角度和目标转动角度,根据所述当前转动角度和目标转动角度确定角度变化量;根据所述电机的当前转动角度和所述角度变化量确定所述电机的占空比,所述占空比保证所述电机能够转动;根据所述占空比对所述电机的转动角度进行调整直至将所述电机的转动角度调整至所述目标转动角度;通过二级控制方式对电机转动进行控制,能够弥补单纯使用PWM调速过程中,低速情况调节不稳定甚至无法调节的问题,二级控制可以实现不同速度下高扭力输出控制,在电机低速运转下也能输出大扭力运动,在离合控制上发挥着重要作用。(The invention discloses a control method and a terminal for motor rotation, which are used for determining the current rotation angle and the target rotation angle of a motor and determining the angle variation according to the current rotation angle and the target rotation angle; determining a duty ratio of the motor according to the current rotation angle of the motor and the angle variation, wherein the duty ratio ensures that the motor can rotate; adjusting the rotation angle of the motor according to the duty ratio until the rotation angle of the motor is adjusted to the target rotation angle; the motor is controlled to rotate in a secondary control mode, the problem that the low-speed condition is unstable in adjustment or even cannot be adjusted in the process of simply using PWM (pulse-width modulation) speed regulation can be solved, high-torque output control under different speeds can be realized through secondary control, large-torque motion can be output under the low-speed operation of the motor, and the secondary control plays an important role in clutch control.)

1. A method of controlling rotation of a motor, comprising the steps of:

s1, determining the current rotation angle and the target rotation angle of the motor, and determining the angle variation according to the current rotation angle and the target rotation angle;

s2, determining the duty ratio of the motor according to the current rotation angle of the motor and the angle variation, wherein the duty ratio ensures that the motor can rotate;

and S3, adjusting the rotation angle of the motor according to the duty ratio, and returning to S2 until the rotation angle of the motor is adjusted to the target rotation angle.

2. The method of controlling rotation of an electric motor according to claim 1, wherein the S1 includes:

the angle variation is as follows:

in the formula, cur _ angle represents the current rotation angle, tar _ angle represents the target rotation angle, f represents the control frequency, and accuracy represents the motor precision.

3. The method of claim 1, wherein the determining the duty ratio of the motor according to the current rotation angle of the motor and the angle variation in the S2 comprises:

determining a subdivision target rotation angle according to the angle variation;

determining the angle deviation of the motor according to the subdivided target rotation angle and the current rotation angle;

determining a motor angle integral and a motor angle difference within a preset time period according to the motor angle deviation;

and determining the duty ratio of the motor according to the motor angle deviation, the motor angle integral and the motor angle difference.

4. The method of claim 3, wherein determining the duty cycle of the motor based on the motor angle deviation, the motor angle integral, and the motor angle differential comprises:

the duty cycle P _ pwm of the motor is:

in the formula, Kp represents a proportional term coefficient, k represents k time sampling points within a preset time period, e _ angle represents a motor angle deviation, Ki represents an integral term coefficient, and Kd represents a differential term coefficient.

5. A control terminal for motor rotation, comprising a memory, a processor and a computer program stored in the memory and operable on the processor, wherein the processor executes the computer program to implement the following steps:

s1, determining the current rotation angle and the target rotation angle of the motor, and determining the angle variation according to the current rotation angle and the target rotation angle;

s2, determining the duty ratio of the motor according to the current rotation angle of the motor and the angle variation, wherein the duty ratio ensures that the motor can rotate;

and S3, adjusting the rotation angle of the motor according to the duty ratio, and returning to S2 until the rotation angle of the motor is adjusted to the target rotation angle.

6. The control terminal for rotation of an electric motor according to claim 5, wherein said S1 includes:

the angle variation is as follows:

in the formula, cur _ angle represents the current rotation angle, tar _ angle represents the target rotation angle, f represents the control frequency, and accuracy represents the motor precision.

7. The terminal of claim 5, wherein the determining the duty ratio of the motor according to the current rotation angle of the motor and the angle variation in the S2 includes:

determining a subdivision target rotation angle according to the angle variation;

determining the angle deviation of the motor according to the subdivided target rotation angle and the current rotation angle;

determining a motor angle integral and a motor angle difference within a preset time period according to the motor angle deviation;

and determining the duty ratio of the motor according to the motor angle deviation, the motor angle integral and the motor angle difference.

8. The terminal of claim 7, wherein the determining the duty cycle of the motor based on the motor angle deviation, the motor angle integral, and the motor angle differential comprises:

the duty cycle P _ pwm of the motor is:

in the formula, Kp represents a proportional term coefficient, k represents k time sampling points within a preset time period, e _ angle represents a motor angle deviation, Ki represents an integral term coefficient, and Kd represents a differential term coefficient.

Technical Field

The invention relates to the field of motor control, in particular to a motor rotation control method and a terminal.

Background

The traditional direct current brush motor generally adopts a Pulse Width Modulation (PWM) mode to control the motor, positive and negative rotation and rotation speed control of the motor are carried out through controlling the duty ratio of drive output, but the control is carried out by adopting the mode, under the condition of low rotation speed, insufficient drive can occur, the condition that the motor cannot normally drive is caused, if the duty ratio is improved, the motor rotates and fails to rapidly adjust the duty ratio, the rotation speed is unstable, and the operation of low rotation speed and high torque output cannot be realized. However, many control fields require that the motor be operated at a low speed, such as clutch motor engagement control, steering motor steering control, and the like.

Disclosure of Invention

The technical problem to be solved by the invention is as follows: the motor rotation control method and the terminal are provided, the motor can output large-torque motion even when running at low speed, and the problems that the traditional PWM speed regulation cannot rotate at low rotating speed and the PWM speed regulation is unstable are solved.

In order to solve the technical problems, the invention adopts a technical scheme that:

a method of controlling rotation of a motor, comprising the steps of:

s1, determining the current rotation angle and the target rotation angle of the motor, and determining the angle variation according to the current rotation angle and the target rotation angle;

s2, determining the duty ratio of the motor according to the current rotation angle of the motor and the angle variation, wherein the duty ratio ensures that the motor can rotate;

and S3, adjusting the rotation angle of the motor according to the duty ratio, and returning to S2 until the rotation angle of the motor is adjusted to the target rotation angle.

In order to solve the technical problem, the invention adopts another technical scheme as follows:

a control terminal for motor rotation, comprising a memory, a processor and a computer program stored in the memory and operable on the processor, wherein the processor executes the computer program to perform the following steps:

s1, determining the current rotation angle and the target rotation angle of the motor, and determining the angle variation according to the current rotation angle and the target rotation angle;

s2, determining the duty ratio of the motor according to the current rotation angle of the motor and the angle variation, wherein the duty ratio ensures that the motor can rotate;

and S3, adjusting the rotation angle of the motor according to the duty ratio, and returning to S2 until the rotation angle of the motor is adjusted to the target rotation angle.

The invention has the beneficial effects that: the method comprises the steps of subdividing a target rotation angle into a plurality of small target rotation angles, determining an angle variation, determining a duty ratio for ensuring that a motor can rotate according to the angle variation and the current rotation angle, adjusting the rotation angle of the motor according to the duty ratio, controlling the rotation of the motor in a two-stage control mode, and solving the problem that the low-speed condition adjustment is unstable or even cannot be adjusted in the process of simply using PWM (pulse width modulation) speed adjustment.

Drawings

Fig. 1 is a flowchart illustrating steps of a method for controlling rotation of a motor according to an embodiment of the present invention;

fig. 2 is a schematic structural diagram of a motor rotation control terminal according to an embodiment of the present invention;

fig. 3 is a schematic structural diagram of a motor control system for controlling the rotation of a motor according to an embodiment of the present invention;

description of reference numerals:

1. a control terminal for motor rotation; 2. a memory; 3. a processor.

Detailed Description

In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.

Referring to fig. 1, a method for controlling rotation of a motor includes the steps of:

s1, determining the current rotation angle and the target rotation angle of the motor, and determining the angle variation according to the current rotation angle and the target rotation angle;

s2, determining the duty ratio of the motor according to the current rotation angle of the motor and the angle variation, wherein the duty ratio ensures that the motor can rotate;

and S3, adjusting the rotation angle of the motor according to the duty ratio, and returning to S2 until the rotation angle of the motor is adjusted to the target rotation angle.

From the above description, the beneficial effects of the present invention are: the method comprises the steps of subdividing a target rotation angle into a plurality of small target rotation angles, determining an angle variation, determining a duty ratio for ensuring that a motor can rotate according to the angle variation and the current rotation angle, adjusting the rotation angle of the motor according to the duty ratio, controlling the rotation of the motor in a two-stage control mode, and solving the problem that the low-speed condition adjustment is unstable or even cannot be adjusted in the process of simply using PWM (pulse width modulation) speed adjustment.

Further, the S1 includes:

the angle variation is as follows:

in the formula, cur _ angle represents the current rotation angle, tar _ angle represents the target rotation angle, f represents the control frequency, and accuracy represents the motor precision.

According to the description, the subdivision width for subdividing the target is determined according to the current rotation angle, the target rotation angle and the control frequency, and if the control frequency is high enough and enough subdivision is ensured, the continuity and the uniform stability of the speed in the process of changing the rotating speed of the motor can be ensured.

Further, the determining the duty ratio of the motor according to the current rotation angle of the motor and the angle variation in S2 includes:

determining a subdivision target rotation angle according to the angle variation;

determining the angle deviation of the motor according to the subdivided target rotation angle and the current rotation angle;

determining a motor angle integral and a motor angle difference within a preset time period according to the motor angle deviation;

and determining the duty ratio of the motor according to the motor angle deviation, the motor angle integral and the motor angle difference.

Further, the determining the duty ratio of the motor according to the motor angle deviation, the motor angle integral and the motor angle difference includes:

the duty cycle P _ pwm of the motor is:

in the formula, Kp represents a proportional term coefficient, k represents k time sampling points within a preset time period, e _ angle represents a motor angle deviation, Ki represents an integral term coefficient, and Kd represents a differential term coefficient.

According to the description, the accuracy and the stability of the calculated duty ratio can be ensured by determining the duty ratio of the motor according to the angular deviation of the motor and the integral and the difference of the angular deviation of the motor in the preset time period, and the parameters used in duty ratio calculation can be determined through actual debugging tests, so that the reliability of motor rotation control is ensured.

Referring to fig. 2, a control terminal for motor rotation includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the following steps:

s1, determining the current rotation angle and the target rotation angle of the motor, and determining the angle variation according to the current rotation angle and the target rotation angle;

s2, determining the duty ratio of the motor according to the current rotation angle of the motor and the angle variation, wherein the duty ratio ensures that the motor can rotate;

and S3, adjusting the rotation angle of the motor according to the duty ratio, and returning to S2 until the rotation angle of the motor is adjusted to the target rotation angle.

From the above description, the beneficial effects of the present invention are: the method comprises the steps of subdividing a target rotation angle into a plurality of small target rotation angles, determining an angle variation, determining a duty ratio for ensuring that a motor can rotate according to the angle variation and the current rotation angle, adjusting the rotation angle of the motor according to the duty ratio, controlling the rotation of the motor in a two-stage control mode, and solving the problem that the low-speed condition adjustment is unstable or even cannot be adjusted in the process of simply using PWM (pulse width modulation) speed adjustment.

Further, the S1 includes:

the angle variation is as follows:

in the formula, cur _ angle represents the current rotation angle, tar _ angle represents the target rotation angle, f represents the control frequency, and accuracy represents the motor precision.

According to the description, the subdivision width for subdividing the target is determined according to the current rotation angle, the target rotation angle and the control frequency, and if the control frequency is high enough and enough subdivision is ensured, the continuity and the uniform stability of the speed in the process of changing the rotating speed of the motor can be ensured.

Further, the determining the duty ratio of the motor according to the current rotation angle of the motor and the angle variation in S2 includes:

determining a subdivision target rotation angle according to the angle variation;

determining the angle deviation of the motor according to the subdivided target rotation angle and the current rotation angle;

determining a motor angle integral and a motor angle difference within a preset time period according to the motor angle deviation;

and determining the duty ratio of the motor according to the motor angle deviation, the motor angle integral and the motor angle difference.

Further, the determining the duty ratio of the motor according to the motor angle deviation, the motor angle integral and the motor angle difference includes:

the duty cycle P _ pwm of the motor is:

in the formula, Kp represents a proportional term coefficient, k represents k time sampling points within a preset time period, e _ angle represents a motor angle deviation, Ki represents an integral term coefficient, Kd represents a differential term coefficient, and n represents an integral quantity.

According to the description, the accuracy and the stability of the calculated duty ratio can be ensured by determining the duty ratio of the motor according to the angular deviation of the motor and the integral and the difference of the angular deviation of the motor in the preset time period, and the parameters used in duty ratio calculation can be determined through actual debugging tests, so that the reliability of motor rotation control is ensured.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:电子钟表、机芯以及钟表用电机控制电路

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!