Method, device, storage medium and equipment for identifying initial position of magnetic pole

文档序号:750258 发布日期:2021-04-02 浏览:34次 中文

阅读说明:本技术 磁极初始位置辨识的方法、装置、存储介质及设备 (Method, device, storage medium and equipment for identifying initial position of magnetic pole ) 是由 邓锦祥 罗凌云 王宏 马青林 曹家明 于 2021-01-25 设计创作,主要内容包括:本申请实施例提供了一种磁极初始位置辨识的方法、装置、存储介质及设备。该磁极初始位置辨识的方法包括:S1、按照预设角度序列获取电机转子初始位置角度偏差的假定角度;S2、获取速度指令;S3、记录电机转动参数;S4、根据所述电机转动参数计算电机转子的初始位置角度偏差初始实际值;S5、根据所述电机转子的初始位置角度偏差初始实际值计算最大电流值,根据所述电机转子的初始位置角度偏差初始实际值和最大电流值得到电机转子的初始位置角度偏差最终实际值。本申请实施例提供的磁极初始位置辨识的方法、装置、存储介质及设备具有快速、准确获取电机转子的初始位置角度偏差值的技术效果。(The embodiment of the application provides a method, a device, a storage medium and equipment for identifying the initial position of a magnetic pole. The method for identifying the initial position of the magnetic pole comprises the following steps: s1, acquiring an assumed angle of the initial position angle deviation of the motor rotor according to a preset angle sequence; s2, acquiring a speed instruction; s3, recording motor rotation parameters; s4, calculating an initial actual value of the initial position angle deviation of the motor rotor according to the motor rotation parameters; and S5, calculating a maximum current value according to the initial position angle deviation initial actual value of the motor rotor, and obtaining an initial position angle deviation final actual value of the motor rotor according to the initial position angle deviation initial actual value and the maximum current value of the motor rotor. The method, the device, the storage medium and the equipment for identifying the initial position of the magnetic pole have the technical effect of quickly and accurately acquiring the angle deviation value of the initial position of the motor rotor.)

1. A method for identifying the initial position of a magnetic pole is characterized by comprising the following steps:

s1, obtaining an assumed angle of the initial position angle deviation of the motor rotor according to a preset angle sequence, wherein the preset angle sequence is as follows: 0 °, 45 °, 90 °, 135 °, 180 °, 225 °, 270 °, 315 °;

s2, acquiring a speed instruction, and driving a motor to rotate under the condition of the current assumed angle according to the speed instruction to test;

s3, recording motor rotation parameters, wherein the motor rotation parameters comprise assumed angles and sequences of the motors when the motors are reversely rotated, and the motor rotation parameters further comprise the times of the motor reverse rotation after the motor test is completed according to the preset angle sequence;

s4, calculating an initial actual value of the initial position angle deviation of the motor rotor according to the motor rotation parameters;

s5, calculating a first maximum current value and a second maximum current value according to the initial actual value of the initial position angle deviation of the motor rotor, and performing actuarial calculation on the initial actual value of the initial position angle deviation of the motor rotor according to the initial actual value of the initial position angle deviation of the motor rotor, the first maximum current value and the second maximum current value to obtain the final actual value of the initial position angle deviation of the motor rotor.

2. The method for identifying the initial position of a magnetic pole according to claim 1, wherein the step S3 comprises:

s31, judging whether the motor rotor is reversed under the condition of the current assumed angle;

s32, if the motor rotor rotates reversely, recording the current assumed angle and the sequence corresponding to the current assumed angle, and adding 1 to the number of times of reverse rotation of the motor;

and S33, if the motor rotor does not rotate reversely, acquiring the next assumed angle according to the preset angle sequence, and continuing to execute the step S31 until all the preset angle tests in the preset angle sequence are completed.

3. The method for identifying the initial position of the permanent magnet synchronous motor according to claim 2, wherein the step S4 comprises:

s41, calculating a transition parameter L0 according to the motor rotation parameter;

and S42, calculating an initial actual value of the initial position angle deviation of the motor rotor according to the transition parameter L0.

4. The method for identifying the initial position of a magnetic pole according to claim 3, wherein the step S41 is specifically as follows:

if the number of times of the motor reversal is more than 5 or less than or equal to 2, outputting an identification error result;

if the number of times of reverse rotation of the motor is equal to 3, calculating a third reverse rotation angle and a first reverse rotation angle difference W31, a second reverse rotation angle and a first reverse rotation angle difference W21, and a third reverse rotation angle and a second reverse rotation angle difference W32, and if W31 is smaller than or equal to 135 degrees, L0= L1/3; if W21 is 225 ° or more, L0= (L1+360 °)/3; if W32 is larger than or equal to 225 °, L0= (L1+ 720 °)/3, otherwise, outputting a recognition error result; wherein L1 is the sum of the first reversal angle, the second reversal angle, and the third reversal angle;

if the number of times of reverse rotation of the motor is equal to 4, calculating a second reverse rotation angle and a first reverse rotation angle difference W21, a third reverse rotation angle and a second reverse rotation angle difference W32, a fourth reverse rotation angle and a third reverse rotation angle difference W43, if W21, W32 or W43 are not equal to 45 degrees or 225 degrees, outputting a recognition error result, otherwise L0= (L2 + L3)/4,

wherein L2 is the sum of the first reversal angle, the second reversal angle, the third reversal angle, and the fourth reversal angle;

wherein L3= n × 360 °, if W43 equals 225 °, then n = 3; if W43 is not equal to 225 ° and W32 is equal to 225 °, then n = 2; if W43 is not equal to 225 ° and W32 is not equal to 225 ° and W21 is equal to 225 °, then n = 1;

the first reverse rotation angle is a corresponding assumed angle when the motor is reversed for the first time;

the second reverse rotation angle is a corresponding assumed angle when the motor reversely rotates for the second time;

the third reverse rotation angle is a corresponding assumed angle when the motor reverses for the third time;

and the fourth reverse rotation angle is an assumed angle corresponding to the fourth reverse rotation of the motor.

5. The method for identifying the initial position of a magnetic pole according to claim 4, wherein the step S42 comprises the steps of:

s421, calculating an initial position angle deviation initial actual value Theta of the motor rotor, wherein the initial position angle deviation initial actual value Theta = L0-180 degrees.

6. The method for identifying the initial position of a magnetic pole according to claim 5, wherein the step S5 comprises:

s51, calculating Theta1= Theta +45 degrees, Theta2= Theta-45 degrees, setting the initial position angle deviation of the motor rotor to Theta1, acquiring a speed command to drive the motor rotor to rotate, and recording a first maximum current value PC1 of the motor under the condition that the initial position angle deviation is Theta 1; setting the initial position angle deviation of the motor rotor as Theta2, acquiring a speed command to drive the motor rotor to rotate, recording a second maximum current value PC2 of the motor under the condition that the initial position angle deviation is Theta2, and executing a step S52;

s52, judging whether a preset condition is met, and if the preset condition is met, outputting Theta as a final actual value of the initial position angle deviation of the motor rotor; if not, the cycle number N = N +1, and step S53 is executed;

s53, judging whether PC1 is larger than PC2, if yes, letting Theta = Theta- (30 °/2)N) Repeatedly executing step S51; if not, let Theta = Theta + (30 °/2)N) Step S51 is repeatedly executed.

7. The method for identifying an initial position of a magnetic pole according to claim 6, wherein the step S52 of determining whether the predetermined condition is satisfied includes: and judging whether the difference value between the PC1 and the PC2 is within a preset range or not, or whether the cycle number is larger than a preset threshold value or not.

8. An apparatus for identifying an initial position of a magnetic pole, comprising:

the first obtaining module is used for obtaining an assumed angle of the initial position angle deviation of the motor rotor according to a preset angle sequence, wherein the preset angle sequence is as follows: 0 °, 45 °, 90 °, 135 °, 180 °, 225 °, 270 °, 315 °;

the second acquisition module is used for acquiring a speed instruction, driving the motor to rotate under the condition of the current assumed angle according to the speed instruction, and testing;

the motor rotation parameter comprises an assumed angle when the motor rotates reversely and the sequence of the assumed angle, and the motor rotation parameter also comprises the number of times of the motor rotating reversely after the motor is tested according to the preset angle sequence;

the first calculation module is used for calculating an initial actual value of the initial position angle deviation of the motor rotor according to the motor rotation parameters;

and the second calculation module is used for calculating a first maximum current value and a second maximum current value according to the initial position angle deviation initial actual value of the motor rotor, and carrying out actuarial calculation on the initial position angle deviation initial actual value of the motor rotor according to the initial position angle deviation initial actual value of the motor rotor, the first maximum current value and the second maximum current value to obtain a final actual value of the initial position angle deviation of the motor rotor.

9. An apparatus comprising a processor and a memory, the memory storing computer readable instructions that, when executed by the processor, perform the method of any one of claims 1-7.

10. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the method according to any of claims 1-7.

Technical Field

The application relates to the technical field of permanent magnet synchronous motors, in particular to a method, a device, a storage medium and equipment for identifying the initial position of a magnetic pole.

Background

In a servo control system, high-performance control of a motor depends on an accurate rotor position, and obtaining the initial position of the rotor is a premise that the motor is started smoothly, if the initial position of the rotor cannot be detected accurately, a proper voltage space vector cannot be selected correctly, overcurrent or inversion of the motor can be caused, and a process that a driver searches for a rotor electric angle 0 point of the motor is called phase finding. The positioning method is simple and effective for identifying the initial position.

The initial position of the current positioning method is identified, so that fixed position deviation is easily caused, and the initial position is inaccurate.

In view of the above problems, no effective technical solution exists at present.

Disclosure of Invention

An object of the embodiments of the present application is to provide a method, an apparatus, a storage medium, and a device for identifying an initial position of a magnetic pole, which can quickly determine an electrical angle of a rotor of a motor.

In a first aspect, an embodiment of the present application provides a method for identifying an initial position of a magnetic pole, where the method includes:

s1, obtaining an assumed angle of the initial position angle deviation of the motor rotor according to a preset angle sequence, wherein the preset angle sequence is as follows: 0 °, 45 °, 90 °, 135 °, 180 °, 225 °, 270 °, 315 °;

s2, acquiring a speed instruction, and driving a motor to rotate under the condition of the current assumed angle according to the speed instruction to test;

s3, recording motor rotation parameters, wherein the motor rotation parameters comprise assumed angles and sequences of the motors when the motors are reversely rotated, and the motor rotation parameters further comprise the times of the motor reverse rotation after the motor test is completed according to the preset angle sequence;

s4, calculating an initial actual value of the initial position angle deviation of the motor rotor according to the motor rotation parameters;

s5, calculating a first maximum current value and a second maximum current value according to the initial actual value of the initial position angle deviation of the motor rotor, and performing actuarial calculation on the initial actual value of the initial position angle deviation of the motor rotor according to the initial actual value of the initial position angle deviation of the motor rotor, the first maximum current value and the second maximum current value to obtain the final actual value of the initial position angle deviation of the motor rotor.

Optionally, in the method for identifying an initial position of a magnetic pole in the embodiment of the present application, the step S3 includes:

s31, judging whether the motor rotor is reversed under the condition of the current assumed angle;

s32, if the motor rotor rotates reversely, recording the current assumed angle and the sequence corresponding to the current assumed angle, and adding 1 to the number of times of reverse rotation of the motor;

and S33, if the motor rotor does not rotate reversely, acquiring the next assumed angle according to the preset angle sequence, and continuing to execute the step S31 until all the preset angle tests in the preset angle sequence are completed.

Optionally, in the method for identifying an initial position of a permanent magnet synchronous motor according to the embodiment of the present application, the step S4 includes:

s41, calculating a transition parameter L0 according to the motor rotation parameter;

and S42, calculating an initial actual value of the initial position angle deviation of the motor rotor according to the transition parameter L0.

Optionally, in the method for identifying an initial position of a magnetic pole in the embodiment of the present application, the step S41 specifically includes:

if the number of times of the motor reversal is more than 5 or less than or equal to 2, outputting an identification error result;

if the number of times of reverse rotation of the motor is equal to 3, calculating a third reverse rotation angle and a first reverse rotation angle difference W31, a second reverse rotation angle and a first reverse rotation angle difference W21, and a third reverse rotation angle and a second reverse rotation angle difference W32, and if W31 is smaller than or equal to 135 degrees, L0= L1/3; if W21 is 225 ° or more, L0= (L1+360 °)/3; if W32 is larger than or equal to 225 °, L0= (L1+ 720 °)/3, otherwise, outputting a recognition error result; wherein L1 is the sum of the first reversal angle, the second reversal angle, and the third reversal angle;

if the number of times of reverse rotation of the motor is equal to 4, calculating a second reverse rotation angle and a first reverse rotation angle difference W21, a third reverse rotation angle and a second reverse rotation angle difference W32, a fourth reverse rotation angle and a third reverse rotation angle difference W43, if W21, W32 or W43 are not equal to 45 degrees or 225 degrees, outputting a recognition error result, otherwise L0= (L2 + L3)/4,

wherein L2 is the sum of the first reversal angle, the second reversal angle, the third reversal angle, and the fourth reversal angle;

wherein L3= n × 360 °, if W43 equals 225 °, then n = 3; if W43 is not equal to 225 ° and W32 is equal to 225 °, then n = 2; if W43 is not equal to 225 ° and W32 is not equal to 225 ° and W21 is equal to 225 °, then n = 1;

the first reverse rotation angle is a corresponding assumed angle when the motor is reversed for the first time;

the second reverse rotation angle is a corresponding assumed angle when the motor reversely rotates for the second time;

the third reverse rotation angle is a corresponding assumed angle when the motor reverses for the third time;

and the fourth reverse rotation angle is an assumed angle corresponding to the fourth reverse rotation of the motor.

Optionally, in the method for identifying an initial position of a magnetic pole in the embodiment of the present application, the step S42 includes the following steps:

s421, calculating an initial position angle deviation initial actual value Theta of the motor rotor, wherein the initial position angle deviation initial actual value Theta = L0-180 degrees.

Optionally, in the method for identifying an initial position of a permanent magnet synchronous motor according to the embodiment of the present application, the step S5 includes:

s51, calculating Theta1= Theta +45 degrees, Theta2= Theta-45 degrees, setting the initial position angle deviation of the motor rotor to Theta1, acquiring a speed command to drive the motor rotor to rotate, and recording a first maximum current value PC1 of the motor under the condition that the initial position angle deviation is Theta 1; setting the initial position angle deviation of the motor rotor as Theta2, acquiring a speed command to drive the motor rotor to rotate, recording a second maximum current value PC2 of the motor under the condition that the initial position angle deviation is Theta2, and executing a step S52;

s52, judging whether a preset condition is met, and if the preset condition is met, outputting Theta as a final actual value of the initial position angle deviation of the motor rotor; if not, the cycle number N = N +1, and step S53 is executed;

s53, judging whether PC1 is larger than PC2, if yes, letting Theta = Theta- (30 °/2)N) Repeatedly executing step S51; if not, let Theta = Theta + (30 °/2)N) Step S51 is repeatedly executed.

Optionally, in the method for identifying an initial position of a permanent magnet synchronous motor according to the embodiment of the present application, the step S55 of determining whether a preset condition is satisfied specifically includes: and judging whether the difference value between the PC1 and the PC2 is within a preset range or not, or whether the cycle number is larger than a preset threshold value or not.

In a second aspect, an apparatus for identifying an initial position of a magnetic pole is further provided, where the apparatus includes:

the first obtaining module is used for obtaining an assumed angle of the initial position angle deviation of the motor rotor according to a preset angle sequence, wherein the preset angle sequence is as follows: 0 °, 45 °, 90 °, 135 °, 180 °, 225 °, 270 °, 315 °;

the second acquisition module is used for acquiring a speed instruction, driving the motor to rotate under the condition of the current assumed angle according to the speed instruction, and testing;

the motor rotation parameter comprises an assumed angle when the motor rotates reversely and the sequence of the assumed angle, and the motor rotation parameter also comprises the number of times of the motor rotating reversely after the motor is tested according to the preset angle sequence;

the first calculation module is used for calculating an initial actual value of the initial position angle deviation of the motor rotor according to the motor rotation parameters;

and the second calculation module is used for calculating a first maximum current value and a second maximum current value according to the initial actual value of the initial position angle deviation of the motor rotor, and carrying out actuarial calculation on the initial actual value of the initial position angle deviation of the motor rotor according to the initial actual value of the initial position angle deviation of the motor rotor, the first maximum current value and the second maximum current value to obtain the final actual value of the initial position angle deviation of the motor rotor.

In a third aspect, an apparatus is also provided in an embodiment of the present application, where the apparatus includes a processor and a memory, where the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the apparatus performs the method according to any one of the above descriptions.

In a fourth aspect, the present application further provides a storage medium having a computer program stored thereon, where the computer program is executed by a processor to execute the method according to any one of the above-mentioned methods.

As can be seen from the above, the method, the apparatus, the storage medium, and the device for identifying an initial position of a magnetic pole provided in the embodiments of the present application perform a rotation test on a motor rotor according to a preset angle sequence, record a motor rotation parameter, calculate an initial actual value of an initial position angle deviation of the motor rotor and an initial angle interval where the initial actual value is located according to the motor rotation parameter, so as to calculate a first maximum current value and a second maximum current value according to the initial actual value of the initial position angle deviation of the motor rotor, and perform a fine calculation on the initial actual value of the initial position angle deviation of the motor rotor according to the initial actual value of the initial position angle deviation of the motor rotor, the first maximum current value, and the second maximum current value, so as to obtain a final actual value of the initial position angle deviation of the motor rotor, the method has the technical effect of quickly and accurately acquiring the initial position angle deviation value of the motor rotor.

Additional features and advantages of the present application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the present application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.

Fig. 1 is a schematic flow chart of a method for identifying an initial position of a magnetic pole according to an embodiment of the present disclosure.

Fig. 2 is a schematic illustration of a method for identifying an initial position of a magnetic pole according to an embodiment of the present application.

Fig. 3 is a schematic illustration of a method for identifying the initial position of a magnetic pole according to another embodiment of the present application.

Fig. 4 is a schematic structural diagram of an apparatus for identifying an initial position of a magnetic pole according to an embodiment of the present disclosure.

Fig. 5 is a schematic structural diagram of an apparatus provided in an embodiment of the present application.

Fig. 6 is a flow chart illustrating a speed command according to an embodiment of the present application.

Detailed Description

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 only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.

In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", and the like, indicate orientations and positional relationships based on those shown in the drawings, and are used only for convenience of description and simplicity of description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be considered as limiting the present invention. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.

Referring to fig. 1, fig. 1 is a flowchart of a method for identifying an initial position of a magnetic pole according to some embodiments of the present disclosure, the method for identifying an initial position of a magnetic pole includes the following steps:

s1, acquiring the assumed angle of the initial position angle deviation of the motor rotor according to a preset angle sequence, wherein the preset angle sequence is as follows: 0 °, 45 °, 90 °, 135 °, 180 °, 225 °, 270 °, 315 °.

And S2, acquiring a speed instruction, and driving the motor to rotate under the condition of the current assumed angle according to the speed instruction to perform testing.

And S3, recording motor rotation parameters, wherein the motor rotation parameters comprise assumed angles when the motor rotates reversely and the sequence of the assumed angles, and the motor rotation parameters further comprise the times of the motor rotating reversely after the motor test is finished according to a preset angle sequence.

And S4, calculating an initial actual value of the initial position angle deviation of the motor rotor according to the motor rotation parameters.

S5, calculating a first maximum current value and a second maximum current value according to the initial actual value of the initial position angle deviation of the motor rotor, and performing actuarial calculation on the initial actual value of the initial position angle deviation of the motor rotor according to the initial actual value of the initial position angle deviation of the motor rotor, the first maximum current value and the second maximum current value to obtain the final actual value of the initial position angle deviation of the motor rotor.

In step S1, the assumed angle of the angular deviation of the initial position of the motor rotor is set in the order of the above angular sequence, for example, the assumed angle is set to 0 °, and then the motor rotor is controlled to rotate by a speed command, and the motor rotation parameters are recorded; and then setting the assumed angle to be 45 degrees, controlling the motor rotor to rotate through a speed command, and recording motor rotation parameters until the test of the final angle 315 degrees of the angle sequence is completed. Through the setting mode, referring to fig. 2, 360 ° can be divided into 8 intervals, each interval is 45 °, and through testing according to the angle sequence, the initial actual value of the initial position angle deviation of the motor rotor and the initial angle interval where the initial actual value is located can be quickly determined, so that the final actual value of the initial position angle deviation of the motor rotor can be quickly calculated.

In step S2, the speed command is a periodic trapezoidal speed command (see fig. 6 in detail).

Wherein, step S3 includes:

s31, judging whether the motor rotor is reversed under the condition of the current assumed angle;

s32, if the motor rotor rotates reversely, recording the current assumed angle and the sequence corresponding to the current assumed angle, and adding 1 to the number of times of reverse rotation of the motor;

and S33, if the motor rotor does not rotate reversely, acquiring the next assumed angle according to the preset angle sequence, and continuing to execute the step S31 until all the preset angle tests in the preset angle sequence are completed.

In step S31, it is determined whether the motor rotor is in reverse rotation at the current assumed angle, specifically: judging whether the rotating direction of the motor rotor under the condition of the current assumed angle is opposite to the speed instruction direction or not, for example, if the speed instruction direction is a forward direction and the motor rotor rotates reversely, the motor rotor is considered to be reversed; similarly, if the speed command direction is reverse and the motor rotor rotates in the forward direction, the motor rotor is considered to be in reverse rotation. In practice, the motor is preferably tested for a given forward speed command.

By way of example, referring to fig. 2, assuming that the final actual value θ of the initial position angle deviation of the motor rotor is in the interval 3, the assumed angle of the initial position angle deviation of the motor rotor is obtained according to the preset angle sequence, and the test is performed according to the driving of the motor under the current assumed angle, specifically:

firstly, setting an assumed angle to be 0 degrees, wherein the difference value between theta and the assumed angle is larger than 90 degrees, so that the motor can rotate reversely (if the difference value is smaller than 90 degrees, the motor rotates forwards, and if the difference value is equal to 90 degrees, the motor does not rotate), and recording 0 degrees as the assumed angle when the motor rotates reversely, namely a first reverse rotation angle (the first is the sequence of the assumed angle when the motor rotates reversely), and simultaneously rotating reversely for +1 time for 1 reverse rotation;

after the motor stops rotating (active stop or automatic stop is selected according to actual conditions, for example, when the motor rotates reversely, PWM output is closed to stop the motor, when the motor rotates forwards, the motor stops after a complete speed instruction is finished), the assumed angle is set to be 45 degrees, and because the difference value between theta and the assumed angle is smaller than 90 degrees, the motor rotates forwards, and at the moment, recording is not needed;

after the motor stops rotating, the assumed angle is set to be 90 degrees, and the difference value between theta and the assumed angle is smaller than 90 degrees, the motor rotates forwards, and at the moment, recording is not needed;

after the motor stops rotating, the assumed angle is set to be 135 degrees, and the difference value between theta and the assumed angle is smaller than 90 degrees, the motor rotates forwards, and at the moment, recording is not needed;

after the motor stops rotating, the assumed angle is set to be 180 degrees, and the difference value between theta and the assumed angle is smaller than 90 degrees, the motor rotates forwards, and at the moment, recording is not needed;

after the motor stops rotating, the assumed angle is set to 225 degrees, and the difference value between theta and the assumed angle is larger than 90 degrees, the motor rotates reversely, at this time, 225 degrees is recorded as the assumed angle when the motor rotates reversely, namely a second reverse rotation angle (the second is the sequence of the assumed angle when the motor rotates reversely), and the number of reverse rotations is +1 for 2 times;

after the motor stops rotating, the assumed angle is set to be 270 degrees, the motor rotates reversely because the difference value between theta and the assumed angle is larger than 90 degrees, and at the moment, 270 degrees is recorded as the assumed angle when the motor rotates reversely, namely a third reverse rotation angle (the third is the sequence of the assumed angle when the motor rotates reversely), and the number of reverse rotations is +1 for 3 times;

after the motor stops rotating, the assumed angle is set to be 315 degrees, and because the difference value between theta and the assumed angle is larger than 90 degrees, the motor rotates reversely, at this time, 315 degrees are recorded as the assumed angle when the motor rotates reversely, namely a fourth reverse rotation angle (the fourth is the sequence of the assumed angle when the motor rotates reversely), and the number of reverse rotations is +1, and the total number of reverse rotations is 4;

finally, the case was tested according to the embodiment of fig. 2, with motor rotation parameters including: the first reverse rotation angle is 0 degrees, the second reverse rotation angle is 225 degrees, the third reverse rotation angle is 270 degrees, the fourth reverse rotation angle is 315 degrees, and the number of times of reverse rotation of the motor is 4 times.

Wherein, step S4 includes:

s41, calculating a transition parameter L0 according to the motor rotation parameter;

and S42, calculating an initial actual value of the initial position angle deviation of the motor rotor according to the transition parameter L0.

Further, step S41 is specifically:

if the number of times of the motor reversal is more than 5 or less than or equal to 2, outputting an identification error result;

if the number of times of reverse rotation of the motor is equal to 3, calculating a third reverse rotation angle and a first reverse rotation angle difference W31, a second reverse rotation angle and a first reverse rotation angle difference W21, and a third reverse rotation angle and a second reverse rotation angle difference W32, and if W31 is smaller than or equal to 135 degrees, L0= L1/3; if W21 is 225 ° or more, L0= (L1+360 °)/3; if W32 is larger than or equal to 225 °, L0= (L1+ 720 °)/3, otherwise, outputting a recognition error result; wherein L1 is the sum of the first reversal angle, the second reversal angle, and the third reversal angle;

if the number of times of reverse rotation of the motor is equal to 4, calculating a second reverse rotation angle and a first reverse rotation angle difference W21, a third reverse rotation angle and a second reverse rotation angle difference W32, a fourth reverse rotation angle and a third reverse rotation angle difference W43, if W21, W32 or W43 are not equal to 45 degrees or 225 degrees, outputting a recognition error result, otherwise L0= (L2 + L3)/4,

wherein L2 is the sum of the first reversal angle, the second reversal angle, the third reversal angle, and the fourth reversal angle;

wherein L3= n × 360 °, if W43 equals 225 °, then n = 3; if W43 is not equal to 225 ° and W32 is equal to 225 °, then n = 2; if W43 is not equal to 225 °, W32 is not equal to 225 ° and W21 is equal to 225 °, then n = 1.

Step S41 is described in detail below by way of example:

for example, referring to fig. 3, assuming that the final actual value θ of the initial position angle deviation of the motor rotor is 90 °, the motor rotation parameters obtained according to the above step S3 include: the first reverse rotation angle is 225 degrees, the second reverse rotation angle is 270 degrees, the third reverse rotation angle is 315 degrees, and the number of times of reverse rotation of the motor is 3 times. At this time, L0 is calculated specifically as: the third and first reversal angle differences W31=90 °, the second and first reversal angle differences W21=45 °, the third and second reversal angle differences W32=45 °, in which case W31=90 ° ≦ 135 ° may be determined, then L0= L1/3, where L1 is the sum of the first, second and third reversal angles, i.e. L1=810 °, i.e. L0=270 ° (in conjunction with the following step S42, an initial actual value Theta = L0-180 ° =90 ° of the angular deviation of the initial position of the motor rotor may be calculated, consistent with the assumption).

As another example, referring to fig. 2, assuming that the final actual value θ of the initial position angle deviation of the motor rotor is in the interval 3, the motor rotation parameters obtained according to the above step S3 include: the first reverse rotation angle is 0 degrees, the second reverse rotation angle is 225 degrees, the third reverse rotation angle is 270 degrees, the fourth reverse rotation angle is 315 degrees, and the number of times of reverse rotation of the motor is 4 times. At this time, L0 is calculated specifically as: second and first reversal angle differences W21=225 °, third and second reversal angle differences W32=45 °, fourth and third reversal angle differences W43=45 °, then L0= (L2 + L3)/4, where L2 is the sum of the first, second, third and fourth reversal angles (i.e. L2=810 °), and L3= n =360 ° = 1= 360 ° (where n = 1). It is known that L0= (L2 + L3)/4 =292.5 ° (in conjunction with the following step S42, an initial actual value Theta of the angular deviation of the initial position of the rotor of the motor = L0-180 ° =112.5 °, that is, Theta is in the interval 3, and meets the assumption).

Further, step S42 includes the following steps:

and S421, calculating an initial position angle deviation initial actual value Theta of the motor rotor, wherein the initial position angle deviation initial actual value Theta = L0-180 degrees.

It should be noted that, in the above examples of fig. 2 and 3, the final actual value θ is the final obtained actual value of the motor rotor yaw angle (the error between the final actual value θ and the actual value of the motor rotor yaw angle is within an acceptable range); the initial actual value Theta of the angular deviation of the initial position of the motor rotor is the value calculated through the above steps S1-S4, and has a certain error (the error can be reduced through step S5) with the actual value of the yaw angle of the motor rotor.

Wherein, step S5 includes:

s51, calculating Theta1= Theta +45 degrees, Theta2= Theta-45 degrees, setting the initial position angle deviation of the motor rotor to Theta1, acquiring a speed command to drive the motor rotor to rotate, and recording a first maximum current value PC1 of the motor under the condition that the initial position angle deviation is Theta 1; setting the initial position angle deviation of the motor rotor to Theta2, acquiring a speed command to drive the motor rotor to rotate, recording a second maximum current value PC2 of the motor under the condition that the initial position angle deviation is Theta2, and executing step S52.

S52, judging whether a preset condition is met, and if the preset condition is met, outputting Theta as a final actual value of the initial position angle deviation of the motor rotor; if not, the number of cycles N = N +1, and step S53 is executed.

S53, judging whether PC1 is larger than PC2, if yes, letting Theta = Theta- (30 °/2)N) Repeatedly executing step S51; if not, let Theta = Theta + (30 °/2)N) Step S51 is repeatedly executed.

Specifically, for example, referring to fig. 2, Theta =100 ° (where Theta is an initial actual value of the initial position angle deviation of the motor rotor calculated in step S4 and may have an error from an actual final value, that is, not a final value), the initial position angle deviation Theta1 of the motor rotor is first set to 145 °, the motor rotor is driven to rotate according to a speed command, and a first maximum current value PC1 of the motor in the case where the initial position angle deviation is Theta1 is recorded; and setting the initial position angle deviation Theta2 of the motor rotor to 55 degrees, driving the motor rotor to rotate according to a speed command, and recording a second maximum current value PC2 of the motor under the condition that the initial position angle deviation is Theta 2. Comparing the difference between the first current value PC1 and the second current value PC2 with a set threshold, if the difference is within the set threshold, Theta is the final actual value of the initial position angle deviation of the motor rotor, otherwise, the number of cycles N = N +1, i.e., N =0+1=1, and executing step S53.

Since the initial position angle deviation of the motor rotor has an influence on the current when the motor rotates, if the final actual value of the initial position angle deviation of the motor rotor is exactly the middle value between Theta1 and Theta2 (i.e. Theta), the value of PC1 should be equal to the value of PC2 (or there is only a slight difference, which is within an error tolerance range), and if the value of PC1 is greater than the value of PC2, it indicates that the final actual value of the initial position angle deviation of the motor rotor is close to Theta2 and far from Theta1 (similarly, if the value of PC2 is greater than the value of PC1, it indicates that the final actual value of the initial position angle deviation of the motor rotor is far from Theta 2). Therefore, we can compare the value of PC1 with the value of PC2, and adjust Theta according to the comparison result, so as to continuously update Theta1 and Theta2, to update the value of PC1 and the value of PC2, and finally make the difference between the value of PC1 and the value of PC2 continuously decrease until meeting the preset range, or the number of cycles reaches the preset value (meeting any condition, i.e. explaining that the error between the obtained final actual value of the initial position angle deviation of the motor rotor and the true value is within the allowable range), stop the adjustment of Theta, and output Theta at this time as the final actual value of the initial position angle deviation of the motor rotor, specifically:

for example, Theta1=145 ° and Theta2=55 ° in fig. 2, when the first maximum current value PC1 and the second maximum current value PC2 are compared, and if PC1 is greater than PC2 (the true value is farther away from Theta1 and closer to Theta 2), the initial actual value Theta of the angular deviation of the initial position of the rotor of the motor is made to be = Theta- (30 °/2)N)=100-(30°/21) Where Theta is the initial actual value of the angular deviation of the initial position of the rotor of the motor calculated in step S4 described above, and N is the number of cycles set in step S52, the Theta value is updated so as to be closer to Theta 2. Continuing to repeat the step S51, setting the initial actual value of the angular deviation of the initial position of the rotor of the motor to 85 ° (Theta value after updating), updating Theta1=130 °, Theta2=40 ° according to 85 °, driving the motor to rotate under Theta1=130 °, Theta2=40 ° according to the speed command, recording the first maximum current value PC1 and the second maximum current value PC2 (PC 1 and PC2 are updated in this way, the difference between PC1 and PC2 becomes smaller than the difference between PC1 and PC2 at the previous time), comparing the difference between PC1 and PC2 with the set threshold value until the difference between PC1 and PC2 is within the set threshold value range, and knotting the actual value is within the set threshold value rangeAnd (4) executing the beam. Similarly, if PC1 is less than PC2 (indicating that the true value is further away from Theta2 and closer to Theta 1), the initial position angle of the rotor of the motor is deviated from the initial actual value Theta = Theta + (30 °/2)N) And will not be described in detail later.

Through the calculation mode, the difference value between the PC1 and the PC2 can be continuously reduced, Theta is continuously adjusted (the adjustment amplitude is smaller and smaller each time, N is larger and larger), the final actual value of the angle deviation of the Theta to the initial position of the motor rotor is closed (namely closed to the actual value), the final actual value of the angle deviation of the initial position of the motor rotor can be accurately obtained as long as a threshold value is reasonably set according to the actual application requirement (for example, the range of the difference value between the PC1 and the PC2 or the range of the cycle number N is set), and the method can be applied to identification of the angle deviation of the initial position of the rotor of a motor with load or other interference (such as the torque condition of a large gear), and can efficiently and accurately obtain the final actual value of the angle deviation of the initial position of the motor rotor.

From the above, the method for identifying the initial position of the magnetic pole provided by the embodiment of the application tests the rotation of the motor rotor according to the preset angle sequence and records the rotation parameters of the motor, calculating an initial actual value of the initial position angle deviation of the motor rotor and an initial angle interval where the initial actual value is located according to the motor rotation parameters, so that the initial actual value of the initial position angle deviation of the motor rotor can be calculated according to the initial actual value of the initial position angle deviation of the motor rotor, calculating a first maximum current value and a second maximum current value according to the initial actual value of the angular deviation of the initial position of the motor rotor, and carrying out actuarial calculation on the initial position angle deviation initial actual value of the motor rotor according to the initial position angle deviation initial actual value, the first maximum current value and the second maximum current value of the motor rotor to obtain the final initial position angle deviation actual value of the motor rotor, and the technical effect of quickly and accurately acquiring the initial position angle deviation value of the motor rotor is achieved.

Referring to fig. 4, fig. 4 is a schematic structural diagram of a device for identifying an initial position of a magnetic pole in some embodiments of the present application. The permanent magnet synchronous motor initial position identification device of the embodiment comprises: a first obtaining module 201, a second obtaining module 202, a recording module 203, a first calculating module 204 and a second calculating module 205.

The first obtaining module 201 is configured to obtain an assumed angle of the angular deviation of the initial position of the motor rotor according to a preset angle sequence, where the preset angle sequence is: 0 °, 45 °, 90 °, 135 °, 180 °, 225 °, 270 °, 315 °.

The second obtaining module 202 is configured to obtain a speed instruction, and drive the motor to rotate according to the speed instruction under the current assumed angle, so as to perform a test.

The recording module 203 is configured to record motor rotation parameters, where the motor rotation parameters include assumed angles and their sequences when a motor is in reverse rotation, and the motor rotation parameters further include the number of times that the motor is in reverse rotation after a motor test is completed according to the preset angle sequence;

the first calculating module 204 is configured to calculate an initial actual value of an initial position angle deviation of the motor rotor according to the motor rotation parameter;

the second calculating module 205 is configured to calculate a first maximum current value and a second maximum current value according to the initial actual value of the initial position angle deviation of the motor rotor, and perform a fine calculation on the initial actual value of the initial position angle deviation of the motor rotor according to the initial actual value of the initial position angle deviation of the motor rotor, the first maximum current value, and the second maximum current value to obtain a final actual value of the initial position angle deviation of the motor rotor.

The final actual value calculation method of the initial position angle deviation of the motor rotor in the embodiment of the present application is the same as that in the embodiment of the method described above, and is not described herein again.

Therefore, the motor rotor is subjected to rotation test according to the preset angle sequence, the motor rotation parameters are recorded, the initial position angle deviation initial actual value of the motor rotor is calculated according to the motor rotation parameters, the first maximum current value and the second maximum current value can be calculated according to the initial position angle deviation initial actual value of the motor rotor, and the initial position angle deviation initial actual value of the motor rotor, the first maximum current value and the second maximum current value are calculated accurately to obtain the final initial position angle deviation actual value of the motor rotor.

Referring to fig. 5, fig. 5 is a schematic structural diagram of an apparatus provided in an embodiment of the present application, and the present application provides an apparatus 3, including: the processor 301 and the memory 302, the processor 301 and the memory 302 being interconnected and communicating with each other via a communication bus 303 and/or other form of connection mechanism (not shown), the memory 302 storing a computer program executable by the processor 301, the processor 301 executing the computer program when the computing device is running to perform the method of any of the alternative implementations of the embodiments described above.

The embodiment of the present application provides a storage medium, and when being executed by a processor, the computer program performs the method in any optional implementation manner of the above embodiment. The storage medium may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.

In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.

In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

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.

The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:永磁无刷直流电机调速系统的积分终端滑模复合控制系统

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!