Motor speed loop PI control method, system, equipment and storage medium

文档序号:651755 发布日期:2021-04-23 浏览:10次 中文

阅读说明:本技术 电机速度环pi控制方法、系统、设备及存储介质 (Motor speed loop PI control method, system, equipment and storage medium ) 是由 徐益飞 黎国才 于 2020-12-28 设计创作,主要内容包括:本申请涉及一种电机速度环PI控制方法、系统、设备及计算机存储介质,所述方法包括:对电机转子轴位置角度进行微分处理,获取电机反馈转速;对电机指令转速进行积分处理,获取电机指令角度;根据所述电机指令转速与所述电机反馈转速,获取第一输出部分;根据所述电机指令角度与所述电机转子轴位置角度,获取第二输出部分;根据所述第一输出部分与所述第二输出部分,获取转矩电流指令。本发明提高低线数编码器低速下的转速控制精度,确保电机转速周期一致性。(The application relates to a motor speed loop PI control method, a system, equipment and a computer storage medium, wherein the method comprises the following steps: carrying out differential processing on the position angle of the motor rotor shaft to obtain the feedback rotating speed of the motor; integrating the motor instruction rotating speed to obtain a motor instruction angle; acquiring a first output part according to the motor instruction rotating speed and the motor feedback rotating speed; acquiring a second output part according to the motor instruction angle and the position angle of the motor rotor shaft; and acquiring a torque current instruction according to the first output part and the second output part. The invention improves the rotating speed control precision of the low-linear-number encoder at low speed and ensures the periodic consistency of the rotating speed of the motor.)

1. A motor speed loop PI control method is characterized by comprising the following steps:

carrying out differential processing on the position angle of the motor rotor shaft to obtain the feedback rotating speed of the motor;

integrating the motor instruction rotating speed to obtain a motor instruction angle;

acquiring a first output part according to the motor instruction rotating speed and the motor feedback rotating speed;

acquiring a second output part according to the motor instruction angle and the position angle of the motor rotor shaft;

and acquiring a torque current instruction according to the first output part and the second output part.

2. The motor speed loop PI control method of claim 1, further comprising:

and acquiring the position angle of the motor rotor shaft according to the feedback signal of the encoder.

3. The motor speed loop PI control method of claim 1, wherein said obtaining a torque current command based on the first output portion and the second output portion comprises:

carrying out amplitude limiting on the second output part to obtain the second output part after amplitude limiting;

and acquiring the torque current instruction according to the first output part and the limited second output part.

4. The motor speed loop PI control method of claim 1, wherein the integrating the commanded motor speed to obtain the commanded motor angle comprises: according to

Acquiring the motor command angle, wherein theta*An angle is commanded for the motor and,and commanding the rotating speed of the motor, wherein t is the current moment.

5. The method of claim 1, wherein the obtaining a first output according to the commanded speed and the feedback speed of the motor comprises: according to

Obtaining the first output part, wherein UpIs the first output part, KpFor the proportional gain of the motor speed loop PI controller,commanding a rotational speed, w, for said motorrAnd feeding back the rotating speed for the motor.

6. The motor speed loop PI control method of claim 1, wherein the deriving a second output based on the commanded motor angle and the rotor shaft position angle of the motor comprises: according to

Ui=Ki*-θ)

Obtaining the second output part, wherein UiIs the second output part, KiIntegral gain, θ, of a motor speed loop PI controller*And theta is the motor command angle, and theta is the motor rotor shaft position angle.

7. The motor speed loop PI control method of claim 5, wherein said obtaining a torque current command based on the first output portion and the second output portion comprises: according to

Obtaining the torque current command, wherein,for the torque current command, UpIs the first output part, UiIs the second output section.

8. A motor speed loop PI control system, comprising:

the differentiating unit is used for differentiating the position angle of the rotor shaft of the motor to obtain the feedback rotating speed of the motor;

the integral unit is used for carrying out integral processing on the motor instruction rotating speed to obtain a motor instruction angle;

the speed error control unit is used for acquiring a first output part according to the motor instruction rotating speed and the motor feedback rotating speed;

the position error control unit is used for acquiring a second output part according to the motor instruction angle and the position angle of the motor rotor shaft;

and the result output unit is used for acquiring a torque current instruction according to the first output part and the second output part.

9. An electronic device, comprising:

a memory for storing a computer program;

a processor for executing the computer program to implement the motor speed loop PI control method according to any one of claims 1 to 7.

10. A computer storage medium, characterized in that the computer storage medium has stored thereon a computer program which, when being executed by a processor, implements the motor speed loop PI control method according to any one of claims 1 to 7.

Technical Field

The application relates to the technical field of motor control, in particular to a motor speed loop PI control method, a system, equipment and a storage medium.

Background

In current ac motor vector control systems, the speed loop ASR generally employs classical PI (proportional integral) control. In the conventional PI control structure shown in fig. 1, a difference between the command speed and the feedback speed is output as a torque current command through a PI regulator.

In the closed-loop control of the motor speed, the feedback speed is obtained through an encoder speed measurement link, firstly, the mechanical angle of a rotor is obtained according to an encoder feedback signal, and then the motor shaft speed, namely the motor feedback speed, is obtained through differential operation. In a digital control system, the differential operation inevitably has a calculation rounding error, and particularly under the working conditions of a low-line number encoder or an extremely low speed and the fluctuation of load within a certain range, the period of each rotation of the motor cannot be ensured to be consistent.

Disclosure of Invention

In order to solve the technical problems or at least partially solve the technical problems, the application provides a motor speed loop PI control method, system, device and storage medium, which improve the rotation speed control precision of a low-linear-number encoder at low speed and ensure the periodic consistency of the motor rotation speed.

In a first aspect, the invention discloses a motor speed loop PI control method, which comprises the following steps:

carrying out differential processing on the position angle of the motor rotor shaft to obtain the feedback rotating speed of the motor;

integrating the motor instruction rotating speed to obtain a motor instruction angle;

acquiring a first output part according to the motor instruction rotating speed and the motor feedback rotating speed;

acquiring a second output part according to the motor instruction angle and the position angle of the motor rotor shaft;

and acquiring a torque current instruction according to the first output part and the second output part.

Optionally, the method further includes:

and acquiring the position angle of the motor rotor shaft according to the feedback signal of the encoder.

Optionally, the obtaining a torque current command according to the first output part and the second output part includes:

carrying out amplitude limiting on the second output part to obtain the second output part after amplitude limiting;

and acquiring the torque current instruction according to the first output part and the limited second output part.

Optionally, the integrating the motor instruction rotation speed to obtain the motor instruction angle includes: according to

Acquiring the motor command angle, wherein theta*An angle is commanded for the motor and,and commanding the rotating speed of the motor, wherein t is the current moment.

Optionally, the obtaining a first output part according to the motor instruction rotating speed and the motor feedback rotating speed includes: according to

Obtaining the first output part, wherein UpIs the first output part, KpFor the proportional gain of the motor speed loop PI controller,commanding a rotational speed, w, for said motorrAnd feeding back the rotating speed for the motor.

Optionally, the obtaining a second output part according to the motor command angle and the motor rotor shaft position angle includes: according to

Uii*-)

Obtaining the second output part, wherein UiIs the second output part, KiIntegral gain, θ, of a motor speed loop PI controller*Theta is the motor command angle and theta is the motor rotor shaft position angleAnd (4) degree.

Optionally, the obtaining a torque current command according to the first output part and the second output part includes: according to

Obtaining the torque current command, wherein,for the torque current command, UpIs the first output part, UiIs the second output section.

In a second aspect, the present invention discloses a motor speed loop PI control system, including:

the differentiating unit is used for differentiating the position angle of the rotor shaft of the motor to obtain the feedback rotating speed of the motor;

the integral unit is used for carrying out integral processing on the motor instruction rotating speed to obtain a motor instruction angle;

the speed error control unit is used for acquiring a first output part according to the motor instruction rotating speed and the motor feedback rotating speed;

the position error control unit is used for acquiring a second output part according to the motor instruction angle and the position angle of the motor rotor shaft;

and the result output unit is used for acquiring a torque current instruction according to the first output part and the second output part.

In a third aspect, the present invention discloses an electronic device, comprising:

a memory for storing a computer program;

a processor for executing the computer program to implement the motor speed loop PI control method of the first aspect.

In a fourth aspect, the present invention discloses a computer storage medium, wherein the computer storage medium stores a computer program, and the computer program, when executed by a processor, implements the motor speed loop PI control method according to the first aspect.

The invention provides a motor speed loop PI control method, a system, equipment and a storage medium, wherein the method comprises the following steps: carrying out differential processing on the position angle of the motor rotor shaft to obtain the feedback rotating speed of the motor; integrating the motor instruction rotating speed to obtain a motor instruction angle; acquiring a first output part according to the motor instruction rotating speed and the motor feedback rotating speed; acquiring a second output part according to the motor instruction angle and the position angle of the motor rotor shaft; and acquiring a torque current instruction according to the first output part and the second output part. The invention improves the rotating speed control precision of the low-linear-number encoder at low speed and ensures the periodic consistency of the rotating speed of the motor.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.

In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.

FIG. 1 is a schematic diagram of a prior art motor speed loop PI controller architecture;

FIG. 2 is a flow diagram illustrating a motor speed loop PI controller design method in accordance with an exemplary embodiment;

FIG. 3 is a flow chart illustrating a motor speed loop PI controller design method in accordance with an exemplary embodiment;

fig. 4 is a schematic diagram illustrating a motor speed loop PI controller according to an exemplary embodiment.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but 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 application.

FIG. 1 is a schematic diagram of a prior art motor speed loop PI controller, shown in FIG. 1, for commanding a speedAnd the feedback velocity wrIs output as a torque current command through a PI regulator

Coefficient K herepProportional gain, K, for a motor speed loop PI controlleriIs the integral gain of the motor speed loop PI controller. And limiting the upper limit and the lower limit of the integral term and the final calculation result of the above formula to obtain a torque current instruction.

FIG. 2 is a flow chart illustrating a motor speed loop PI controller design method according to an exemplary embodiment, as shown in FIG. 2, comprising:

step 210: carrying out differential processing on the position angle of the motor rotor shaft to obtain the feedback rotating speed of the motor;

as shown in fig. 4, in the embodiment of the present application

Obtaining the feedback rotating speed of the motor, wherein wrAnd theta is the feedback rotating speed of the motor, and theta is the position angle of the rotor shaft of the motor. The embodiments of the application can be based onThe feedback signal of the encoder acquires the position angle of the motor rotor shaft, and the feedback current speed of the motor, namely the feedback rotating speed of the motor, can be obtained by differentiating the position angle of the motor rotor shaft.

Step 220: integrating the motor instruction rotating speed to obtain a motor instruction angle;

as shown in fig. 4, in the embodiment of the present application

Acquiring the motor command angle, wherein theta*An angle is commanded for the motor and,and commanding the rotating speed of the motor, wherein t is the current moment. The motor command rotation speedSetting the rotating speed for the motor by a user through a motor setting panel, and commanding the rotating speed for the motorThe expected rotation angle of the motor at the current time, i.e., the motor command angle, can be obtained by performing integration from the starting time to the current time.

Step 230: acquiring a first output part according to the motor instruction rotating speed and the motor feedback rotating speed;

as shown in fig. 4, in the embodiment of the present application

Obtaining the first output part, wherein UpIs the first output part, KpFor the proportional gain of the motor speed loop PI controller,commanding a rotational speed, w, for said motorrAnd feeding back the rotating speed of the motor, namely feeding back the current rotating speed of the motor by the encoder.

Proportional gain K of motor speed loop PI controller in embodiment of the applicationpThe proportional gain is the same as that of the existing motor speed loop PI controller. After the motor outputs the current rotating speed of the motor, the encoder continuously feeds back the current rotating speed of the motor, the current rotating speed of the motor is corrected by using the difference value between the fed back current rotating speed of the motor and the given rotating speed of the motor to form closed-loop control, the current rotating speed of the motor is continuously close to the given rotating speed of the motor, and the first output part UpThe difference value between the fed-back current rotating speed of the motor and the given rotating speed of the motor is scaled, so that the change of the current rotating speed of the motor can be responded quickly.

Step 240: acquiring a second output part according to the motor instruction angle and the position angle of the motor rotor shaft;

as shown in fig. 4, in the embodiment of the present application

Ui=Ki*-θ)

Obtaining the second output part, wherein UiIs the second output part, KiIntegral gain, θ, of a motor speed loop PI controller*And theta is the motor command angle, and theta is the motor rotor shaft position angle.

Integral gain K of motor speed loop PI controller in embodiment of the applicationiThe integral gain is the same as that of the existing motor speed loop PI controller.

The existing motor speed loop PI controller carries out differential operation to obtain motor feedback speed, then carries out integral operation to the motor instruction speed and the motor feedback speed, the calculation rounding error of the motor feedback speed is inevitably existed in the differential operation, the integral operation is carried out to the motor feedback speed again, secondary calculation error is introduced, the control precision of the motor rotating speed control is influenced, particularly under the working condition of a low linear number encoder or extremely low speed and the load fluctuates in a certain range, the control precision of the motor rotating speed control is not high, the consistency of the motor rotating period can not be ensured, the embodiment of the application corrects the current rotating speed of the motor by using the error of the motor instruction angle and the motor rotor shaft position angle, the motor instruction rotating speed directly obtains the motor instruction angle through primary integral operation, and the problem that the result obtained by the differential operation in the prior art needs secondary integral operation is avoided, the calculation errors introduced by differential operation and integral operation are reduced, the rotating speed control precision of the low-linear-number encoder at low speed is improved when the low pulse number is fed back, and the rotation periodicity consistency of the motor is ensured.

Step 250: and acquiring a torque current instruction according to the first output part and the second output part.

As shown in fig. 4, in the embodiment of the present application

Obtaining the torque current command, wherein,for the torque current command, UpIs the first output part, UiIs the second output section.

In the embodiment of the application, the first output part corrects the current rotating speed of the motor by using the difference value of the motor instruction rotating speed and the motor feedback rotating speed, and the change of the motor speed is quickly responded; the second output part corrects the current rotating speed of the motor by using the motor instruction angle and the motor rotor shaft position angle, and ensures that the motor speed control has no static error.

The embodiment of the application can effectively improve the problem of poor rotating speed control precision caused by calculus calculation errors under the working conditions of a low-linear-number encoder or an extremely low speed on the basis of not changing the parameters of the existing motor speed loop PI controller.

FIG. 3 is a flow chart illustrating a motor speed loop PI controller design method according to an exemplary embodiment, as shown in FIG. 3, comprising:

step 310: and acquiring the position angle of the motor rotor shaft according to the feedback signal of the encoder.

The embodiment of the application can detect the rotating position of the motor, namely the position angle of the rotor shaft of the motor, by utilizing the angle encoder with high precision.

Step 320: carrying out differential processing on the position angle of the motor rotor shaft to obtain the feedback rotating speed of the motor;

step 330: integrating the motor instruction rotating speed to obtain a motor instruction angle;

step 340: acquiring a first output part according to the motor instruction rotating speed and the motor feedback rotating speed;

step 350: acquiring a second output part according to the motor instruction angle and the position angle of the motor rotor shaft;

step 360: carrying out amplitude limiting on the second output part to obtain the second output part after amplitude limiting;

in this embodiment, when the second output portion is smaller than a first lower limit value or larger than a second upper limit value, the second output portion is dynamically compensated, so that the second output portion is located at the first lower limit value and the second upper limit value.

Step 370: and acquiring the torque current instruction according to the first output part and the limited second output part.

This application embodiment optimizes the integral part of current motor speed ring PI controller, effectively improves the poor problem of rotational speed control precision that low-line number encoder or extremely low speed operating mode lead to because differential calculation error.

FIG. 4 is a block diagram illustrating a motor speed loop PI controller, as shown in FIG. 4, according to an exemplary embodiment, the controller comprising:

the differentiating unit 410 is configured to perform differentiation processing on the position angle of the rotor shaft of the motor to obtain a feedback rotation speed of the motor;

in the embodiment of the application, the position angle of the rotor shaft of the motor is obtained according to the feedback signal of the encoder

Obtaining the feedback rotating speed of the motor, wherein wrAnd theta is the feedback rotating speed of the motor, and theta is the position angle of the rotor shaft of the motor. According to the embodiment of the application, the position angle of the motor rotor shaft can be obtained according to the feedback signal of the encoder, and the current speed of the fed-back motor, namely the feedback rotating speed of the motor, can be obtained by differentiating the position angle of the motor rotor shaft.

The integral unit 420 is used for carrying out integral processing on the motor instruction rotating speed to obtain a motor instruction angle;

in the examples of this application, according to

Acquiring the motor command angle, wherein theta*An angle is commanded for the motor and,and commanding the rotating speed of the motor, wherein t is the current moment. The motor command rotation speedSetting the rotating speed for the motor by a user through a motor setting panel, and commanding the rotating speed for the motorThe expected rotation angle of the motor at the current time, i.e., the motor command angle, can be obtained by performing integration from the starting time to the current time.

A speed error control unit 430, configured to obtain a first output portion according to the motor instruction rotation speed and the motor feedback rotation speed;

in the examples of this application, according to

Obtaining the first output part, wherein UpIs the first output part, KpFor the proportional gain of the motor speed loop PI controller,commanding a rotational speed, w, for said motorrAnd feeding back the rotating speed of the motor, namely feeding back the current rotating speed of the motor by the encoder.

A position error control unit 440, configured to obtain a second output part according to the motor command angle and the motor rotor shaft position angle;

in the examples of this application, according to

Ui=Ki*-θ)

Obtaining the second output part, wherein UiIs the second output part, KiIntegral gain, θ, of a motor speed loop PI controller*And theta is the motor command angle, and theta is the motor rotor shaft position angle.

Integral gain K of motor speed loop PI controller in embodiment of the applicationiThe integral gain is the same as that of the existing motor speed loop PI controller.

And a result output unit 450, configured to obtain a torque current command according to the first output portion and the second output portion.

In the examples of this application, according to

Obtaining the torque current command, wherein,for the torque current command, UpIs the first output part, UiIs the second output section.

In the embodiment of the application, the first output part corrects the current rotating speed of the motor by using the difference value of the motor instruction rotating speed and the motor feedback rotating speed, and the change of the motor speed is quickly responded; the first output part corrects the current rotating speed of the motor by using the motor instruction angle and the motor rotor shaft position angle, and ensures that the motor speed control has no static error.

An embodiment of the present application further provides an electronic device, including:

a memory for storing a computer program;

and the processor is used for executing the computer program to realize the motor speed loop PI control method.

The embodiment of the present application further provides a computer storage medium, where a computer program is stored on the computer storage medium, and when the computer program is executed by a processor, the method for controlling the motor speed loop PI is implemented.

According to the embodiment of the application, the current rotating speed of the motor is corrected by utilizing the error between the motor instruction angle and the position angle of the motor rotor shaft, the motor instruction angle is directly obtained through primary integral operation of the motor instruction rotating speed, the problem that in the prior art, the result obtained through the differential operation needs secondary integral operation is avoided, the calculation errors introduced by the differential operation and the integral operation are reduced, the rotating speed control precision of the low-linear-number encoder at the low speed is improved when the low pulse number is fed back, and the rotation periodicity consistency of the motor is ensured.

It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于滑模观测器的永磁同步电机控制方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!