Motor magnetic pole position detection method

By applying current to the motor and using incremental encoder detection, the problem of high cost and poor applicability of the initial phase detection of the motor is solved, and low-cost, stable magnetic pole position detection is achieved, which is suitable for motors with brakes and large gravity loads.

CN118539807APending Publication Date: 2024-08-23SUZHOU ELITE ROBOTICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410488084.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-23
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing motor initial phase detection method has the problems of high cost, not suitable for motor systems with brakes and motors with large gravity loads, and unstable detection results.

Method used

A motor magnetic pole position detection method is adopted. By applying current to the motor, the d-axis is rotated. The incremental encoder is used to detect the motor position in real time. If it does not rotate, the current is increased until it rotates. The magnetic pole is determined based on the encoder detection value and the rotation angle. location without installing a Hall sensor.

Benefits of technology

It achieves low-cost initial phase detection suitable for motors with brakes and large gravity loads, reduces the motor movement distance during the detection process, and improves the stability and applicability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118539807A
    Figure CN118539807A
Patent Text Reader

Abstract

The invention relates to the technical field of motors, and particularly discloses a motor magnetic pole position detection method, when a motor is in a braking state, the motor has a rotation space with a preset angle; the motor magnetic pole position detection method comprises the following steps: applying current to a motor to enable a d axis to rotate, and simultaneously obtaining a detection value of an encoder in real time; when the d shaft completes one round of rotation, whether the motor rotates or not is determined according to a detection value of the encoder; if not, the current applied to the motor is increased, and the d-axis rotates for the next round until the motor rotates; and determining the magnetic pole position of the motor according to the detection value of the encoder and the rotation angle of the d axis. Through a mode of gradually increasing the current, the motor can overcome the gravity load born by the motor to generate rotation, so that the movement distance of the motor in the detection process is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of motor technology, and in particular to a method for detecting the magnetic pole position of a motor. Background Art

[0002] When using an incremental encoder to detect the motor position, the initial phase of the motor needs to be detected before performing speed closed-loop control. Conventional initial phase detection methods include Hall detection method, micro-motion method, voltage injection method, etc. Among them, for the Hall detection method, it is necessary to install multiple Hall sensors on the motor end, which is costly; for the micro-motion method, it requires the motor to be able to move freely in the forward and reverse directions, but it is not suitable for motor systems with brakes, and it is not suitable for situations where the motor's gravity load is heavy and the motor cannot be easily rotated; for the voltage injection method, its actual detection effect is related to the electrical parameters of the motor and is not stable.

[0003] In summary, existing initial phase detection methods all have certain drawbacks. Summary of the invention

[0004] Based on this, it is necessary to provide a method for detecting the magnetic pole position of a motor in view of the above problem. When the motor is in a braking state, the motor has a rotation space of a preset angle; the method for detecting the magnetic pole position of the motor includes:

[0005] Applying current to the motor to rotate the d-axis, while acquiring the detection value of the encoder in real time;

[0006] When the d-axis completes one round of rotation, determining whether the motor is rotating according to the detection value of the encoder;

[0007] If not, increasing the current applied to the motor to make the d-axis rotate for the next round until the motor rotates;

[0008] The magnetic pole position of the motor is determined according to the detection value of the encoder and the rotation angle of the d-axis.

[0009] In one embodiment, in one round, the d-axis rotates a total of 360 degrees.

[0010] In one of the embodiments, in the step of applying current to the motor to rotate the d-axis, 360 degrees are divided into N equal parts, and the rotation angle of the d-axis Id_angle = 360°*k / N, wherein N is an integer greater than 0, k is an integer greater than or equal to 0, k is less than N, and in one round, k gradually increases.

[0011] In one embodiment, when the d-axis completes one round of rotation, the step of determining whether the motor rotates according to the detection value of the encoder comprises:

[0012] Determine whether there is a detection value indicating that the motor has rotated in each detection value of the encoder during one rotation of the d-axis;

[0013] If so, determining that the motor is rotating;

[0014] If not, it is determined that the motor is not rotating.

[0015] In one embodiment, the detection value of the encoder includes a first type of detection value, a second type of detection value, and a third type of detection value. The first type of detection value indicates that the motor has not rotated, the second type of detection value indicates that the motor has rotated in a first direction, and the third type of detection value indicates that the motor has rotated in a second direction, and the first direction is opposite to the second direction.

[0016] In one embodiment, the first category detection value is equal to 0, the second category detection value is greater than 0, and the third category detection value is less than 0.

[0017] In one embodiment, before the step of increasing the current applied to the motor, the motor magnetic pole position detection method further comprises: applying a maximum current I max The current Id_cur=I max *i / M, where M and i are both integers greater than 0, and i is less than or equal to M;

[0018] In the step of increasing the current applied to the motor, the value of i is increased.

[0019] In one embodiment, the step of determining the magnetic pole position of the motor according to the detection value of the encoder and the rotation angle of the d-axis includes:

[0020] According to the detection value of the encoder, the rotation angles of the d-axis when the motor rotates are screened out;

[0021] The rotation angles of the screened d-axis are averaged to obtain the angle average value;

[0022] The magnetic pole position of the motor is determined according to the angle average value.

[0023] In one embodiment, the step of determining the magnetic pole position of the motor according to the angle average value comprises:

[0024] When the detection value of the encoder indicates that the motor rotates in the first direction, the magnetic pole position of the motor is determined according to the following formula: mag_angle=Id_angle_mean-90°;

[0025] When the detection value of the encoder indicates that the motor rotates in the second direction, the magnetic pole position of the motor is determined according to the following formula: mag_angle=Id_angle_mean+90°;

[0026] Among them, mag_angle is the magnetic pole position of the motor, and Id_angle_mean is the angle mean.

[0027] In one embodiment, the step of averaging the selected rotation angles of the d-axis to obtain the angle average value comprises:

[0028] When the difference between the selected rotation angles of the d-axis exceeds 180 degrees, the selected rotation angles of the d-axis are converted so that the difference between the converted rotation angles is less than 180 degrees;

[0029] The average of the converted rotation angles is taken to obtain the angle average value.

[0030] The motor magnetic pole position detection method provided by the embodiment of the present application is applicable to a motor that has a certain rotation space when it is in a braking state. First, current is applied to the motor to rotate the d-axis. During the rotation of the d-axis, the encoder detects the position of the motor in real time, so the detection value of the encoder can be obtained. When the d-axis completes a round of rotation, it is determined whether the motor rotates according to the detection value of the encoder. If rotation occurs, the magnetic pole position of the motor, that is, the initial phase of the motor, can be determined according to the detection value of the encoder and the rotation angle of the d-axis. If rotation does not occur, the current can be continued to increase, and the above process is repeated until the motor is detected to rotate. According to the detection value of the encoder and the rotation angle of the d-axis, the magnetic pole position of the motor is determined. The above detection method does not require the installation of a Hall sensor, and the cost is low. When the motor is in a braking state, the detection method can be used as long as the motor has a certain rotation space, and by gradually increasing the current, the motor can overcome the gravity load it bears and rotate, thereby reducing the movement distance of the motor during the detection process. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is a structural diagram of the braking system;

[0032] Figure 2 is a schematic diagram of the structure of the d-axis and rotor magnetic field in an example;

[0033] Figure 3is a schematic structural diagram of the d-axis and rotor magnetic field in another example;

[0034] Figure 4 A flowchart of a method for detecting the magnetic pole position of a motor provided in an embodiment of the present application;

[0035] Figure 5 A flowchart of a method for detecting the magnetic pole position of a motor provided in an embodiment of the present application;

[0036] Figure 6 A flowchart of step S800 in a method for detecting a motor magnetic pole position according to an embodiment of the present application;

[0037] Figure 7 This is a flowchart of step S820 in the motor magnetic pole position detection method provided in an embodiment of the present application.

[0038] Description of reference numerals:

[0039] 100, brake pad; 110, protrusion; 200, coupling piece; 300, arm body. DETAILED DESCRIPTION

[0040] In order to facilitate the understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present application are given in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to understand the disclosure of the present application more thoroughly and comprehensively.

[0041] In this application, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0042] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0044] When using an incremental encoder to detect the motor position, the initial phase of the motor needs to be detected before performing speed closed-loop control. Conventional initial phase detection methods include Hall detection method, micro-motion method, voltage injection method, etc.

[0045] Among them, the Hall detection method uses the Hall principle to detect the motor rotor position to obtain the initial phase angle. In this way, it is necessary to install multiple Hall sensors at the motor end, which is costly.

[0046] The micro-motion method adjusts the internal electrical angle based on the output current and the feedback of the incremental encoder to detect the initial phase angle. This method requires the motor to move freely in the forward and reverse directions, but existing motors often have brakes. When the motor is in a braking state, it cannot rotate. In addition, if the gravity load of the motor is too large, the motor cannot rotate. Therefore, the micro-motion method has many limitations.

[0047] The voltage injection method is based on the principle of difference in motor inductance. The output voltage has different current feedback at different phases, thereby obtaining the initial phase angle. Its core is based on the difference in inductance between the motor's d-axis and q-axis. However, the motor's magnetic saturation range is different, that is, different motors need to set different voltage values. In other words, the actual use effect is related to the motor's electrical parameters, and the detection effect is not stable.

[0048] In summary, existing initial phase detection methods all have certain drawbacks.

[0049] To this end, the present application provides a method for detecting the magnetic pole position of a motor, which can be applicable to a motor system with a brake and is suitable for situations where the motor's gravity load is too heavy and the motor cannot rotate easily. In addition, there is no need to install an additional Hall sensor, and the cost is low.

[0050] When the motor is in a braking state, the motor still has a rotation space of a preset angle. For example, when the motor is in a braking state, the motor still has a free movement gap of 30 degrees, 40 degrees or 50 degrees, thereby facilitating the encoder to detect the rotation of the motor in the following detection process.

[0051] Reference Figure 1In a specific example, the braking system of the motor is a blocking braking system. When the braking is effective, the brake pad 100 and the coupling 200 block each other, blocking the motor from rotating, thereby achieving a braking effect. The outer periphery of the brake pad 100 has protrusions 110 arranged at intervals, and there is a gap between two adjacent protrusions 110. The motor can have a free movement gap of about 50 degrees in the gap. In practical applications, the motor has a certain gravity load, such as the arm body 300 of the mechanical arm. When the gravity applied by the arm body 300 of the mechanical arm to the motor is large, at this time, the protrusion 110 of the brake pad 100 and the coupling 200 squeeze each other, and the brake pad 100, that is, the motor, may not be able to move freely. The motor needs to overcome the gravity of the arm body 300 of the mechanical arm to rotate counterclockwise.

[0052] Reference Figure 2 For the sake of explanation, it is assumed that the motor has a pair of magnetic poles. If the phase angle of the synchronous motor is correct, the direction of the d-axis overlaps with the N-pole of the motor rotor magnetic field. The d-axis is the direct axis, which is the direction of the magnetic field of the motor closed-loop vector control. However, in actual applications, when the motor is just powered on, the rotor position is unknown, that is, the phase angle of the synchronous motor is often incorrect, that is, there is an unknown angle difference between the d-axis and the N-pole of the rotor magnetic field (for example, Figure 3 According to the principle of synchronous motor, when the d-axis and the N-pole of the rotor magnetic field differ by 90 degrees, the maximum torque will be generated and the motor will rotate. At this time, the incremental encoder can detect that the motor is rotating. The motor magnetic pole position detection method provided in this embodiment is based on the above principle, controls the rotation of the d-axis, and determines the position of the motor magnetic pole, that is, the initial phase of the motor, in combination with the detection result of the incremental encoder.

[0053] Reference Figure 4 The motor magnetic pole position detection method provided in this embodiment includes the following steps:

[0054] Step S200: applying current to the motor to rotate the d-axis, and acquiring the detection value of the encoder in real time.

[0055] A certain current is applied to the motor through the motor controller to rotate the d-axis, that is, the angle between the d-axis and the N pole of the rotor magnetic field changes. At the same time, the position of the motor, that is, the position of the rotor, can be detected through the encoder, and the detection value output by the encoder can be obtained. Among them, the encoder can be an incremental encoder.

[0056] Since the position of the N pole of the rotor magnetic field is unknown, in this embodiment, the d-axis can be controlled to rotate by a certain angle so that the angle between the d-axis and the N pole of the rotor magnetic field changes during the rotation of the d-axis. Theoretically, when the angle between the d-axis and the N pole of the rotor magnetic field reaches 90 degrees, the maximum torque will be generated, the motor will rotate, and the encoder can detect the rotation of the motor. Therefore, for each angle to which the d-axis rotates, the detection value of the encoder can be obtained, so that the position of the rotor can be determined in combination with each detection value later.

[0057] Step S400: When the d-axis completes one round of rotation, determine whether the motor rotates according to the detection value of the encoder; if not, execute step S600.

[0058] Before controlling the rotation of the d-axis, the rotation angle of the d-axis can be preset, for example, the various rotation angles of the d-axis in one round and the cumulative rotation angle of the d-axis can be set in advance. When it is determined that the d-axis has completed one round of rotation, the detection values ​​corresponding to the encoder at each rotation angle of the d-axis can be obtained, and whether the motor has rotated can be determined based on each detection value.

[0059] The detection value of the encoder may include a first-class detection value, a second-class detection value, and a third-class detection value. The first-class detection value indicates that the motor does not rotate, the second-class detection value indicates that the motor rotates in a first direction, and the third-class detection value indicates that the motor rotates in a second direction. The first direction is opposite to the second direction, the first direction may be counterclockwise, the second direction may be clockwise, or the first direction may be clockwise, and the second direction may be counterclockwise.

[0060] In this embodiment, as long as there is a detection value indicating that the motor has rotated among the detection values ​​of the encoder, that is, there is a second-class detection value or a second-class detection value, it can be determined that the motor has rotated in this round of rotation of the d-axis. If there is no detection value indicating that the motor has rotated among the detection values ​​of the encoder, that is, all the detection values ​​are first-class detection values, it can be determined that the motor has not rotated in this round of rotation of the d-axis. Of course, in other embodiments, other identification methods can also be used.

[0061] In this embodiment, the first type of detection value may be a detection value equal to 0, the second type of detection value may be a detection value greater than 0, and the third type of detection value may be a detection value less than 0.

[0062] If it is determined that the motor rotates during the rotation of the d-axis, step S800 may be performed, that is, determining the magnetic pole position of the motor, that is, the initial phase of the motor. If it is determined that the motor does not rotate during the rotation of the d-axis, step S600 may be performed.

[0063] Step S600: Increase the current applied to the motor to make the d-axis rotate for the next round until the motor starts to rotate.

[0064] Since in actual applications, the motor may not be able to rotate easily due to excessive load, in this case, in this embodiment, the current applied to the motor can be increased so that the motor can overcome the gravity of the load and rotate. That is, when it is determined that the motor does not rotate in a rotation round of the d-axis, the current applied to the motor is increased to make the d-axis rotate for the next round. Similar to the above steps, when the d-axis rotates for the next round, the position change of the motor is detected by the encoder, and the detection value of the encoder corresponding to each rotation angle of the d-axis is obtained. When the d-axis completes the rotation, it is determined whether the motor has rotated according to each detection value. If it has rotated, the current is no longer increased, and step S800 is executed. If it has not rotated, the current continues to be increased until the motor rotates.

[0065] Step S800: Determine the magnetic pole position of the motor according to the detection value of the encoder and the rotation angle of the d-axis.

[0066] When it is determined that the motor has rotated, the magnetic pole position of the motor, that is, the initial phase of the motor, can be determined based on the detection values ​​of the encoder and the rotation angle of the d-axis corresponding to the detection values.

[0067] The motor magnetic pole position detection method provided by the embodiment of the present application is applicable to a motor that has a certain rotation space when it is in a braking state. First, current is applied to the motor to rotate the d-axis. During the rotation of the d-axis, the encoder detects the position of the motor in real time, so the detection value of the encoder can be obtained. When the d-axis completes a round of rotation, it is determined whether the motor rotates according to the detection value of the encoder. If rotation occurs, the magnetic pole position of the motor, that is, the initial phase of the motor, can be determined according to the detection value of the encoder and the rotation angle of the d-axis. If rotation does not occur, the current can be continued to increase, and the above process is repeated until the motor is detected to rotate. According to the detection value of the encoder and the rotation angle of the d-axis, the magnetic pole position of the motor is determined. The above detection method does not require the installation of a Hall sensor, and the cost is low. When the motor is in a braking state, the detection method can be used as long as the motor has a certain rotation space, and by gradually increasing the current, the motor can overcome the gravity load it bears and rotate, thereby reducing the movement distance of the motor during the detection process.

[0068] In one embodiment, in one round, the d-axis rotates 360 degrees cumulatively. That is, during the rotation of the d-axis, if the cumulative rotation angle of the d-axis reaches 360 degrees, it is determined that the d-axis has completed one round of rotation.

[0069] In one embodiment, in step S200, i.e., the step of applying current to the motor to rotate the d-axis, 360 degrees is divided into N equal parts, and the rotation angle of the d-axis Id_angle=360°*k / N, wherein N is an integer greater than 0, k is an integer greater than or equal to 0, k is less than N, and in one round, k gradually increases (refer to Figure 5 ).

[0070] That is, 360 degrees are divided equally, and in the process of actually controlling the rotation of the d-axis, the rotation angle of the d-axis is gradually increased proportionally until the cumulative rotation angle of the d-axis reaches 360 degrees. Dividing 360 degrees equally is conducive to uniformly controlling the change of the rotation angle of the d-axis.

[0071] In a specific example, N may be 12, and the value range of k may be 0 to 11. That is, 360 degrees may be divided into 12 equal parts, and the rotation angle of the d-axis Id_angle=360°*k / 12, and k gradually increases in the range of 0 to 11, which are 0, 1, 2, 3, ..., 11, respectively, that is, the d-axis gradually rotates from 0 degrees to 30 degrees, 60 degrees, and 90 degrees. . . , when the value of k is 11, the cumulative rotation angle of the d-axis reaches 360 degrees.

[0072] In practical applications, the values ​​of N and k can be set according to actual needs and are not specifically limited here.

[0073] In one embodiment, referring to Figure 5 Before step S600, that is, the step of increasing the current applied to the motor, the motor magnetic pole position detection method provided in this embodiment further includes:

[0074] The maximum current I applied to the motor max The current Id_cur=I max *i / M, wherein M and i are both integers greater than 0, and i is less than or equal to M.

[0075] In step S600, ie, the step of increasing the current applied to the motor, the value of i is increased.

[0076] That is, in this embodiment, the current applied to the motor is divided equally. During the actual detection process, the current applied to the motor is gradually increased according to the actual situation until the motor rotates, which helps to increase the current evenly and improves stability and reliability.

[0077] In a specific example, M may be 6, and the value range of i may be 1 to 6. That is, the maximum current applied to the motor may be divided into 6 equal parts, and the current applied to the motor Id_cur=I max*i / 6, i gradually increases in the range of 1 to 6, namely 1, 2, 3, ..., 6. For example, the initial value of i is 1, and I is applied to the motor. max *1 / 6 of the current, after the d axis rotates one round, if it is determined that the motor does not rotate, increase i to 2 and apply I to the motor again max *2 / 6 of the current, and so on, until the motor starts to rotate.

[0078] Reference Figure 6 In one embodiment, step S800, i.e., the step of determining the magnetic pole position of the motor according to the detection value of the encoder and the rotation angle of the d-axis, comprises:

[0079] Step S810: Filter out the rotation angles of the d-axis when the motor rotates according to the detection value of the encoder.

[0080] Since the encoder has a corresponding detection value when the d-axis rotates to each set angle, each detection value can represent whether the motor is rotating. Therefore, the detection values ​​representing the rotation of the motor can be screened out, and then the rotation angles of the d-axis corresponding to these screened detection values ​​can be obtained.

[0081] Step S820: average the selected rotation angles of the d-axis to obtain an angle average value.

[0082] Step S830: Determine the magnetic pole position of the motor according to the angle average value.

[0083] After obtaining the rotation angles of the d-axis when the motor rotates, the average value of the rotation angles can be obtained, and then the magnetic pole position of the motor can be determined based on the average value.

[0084] In step S820, there is a case where the difference between the rotation angles of the d-axis selected exceeds 180 degrees. If the average value is directly calculated, the result will be inaccurate. Figure 7 , step S820 may further include:

[0085] Step S821: when the difference between the selected rotation angles of the d-axis exceeds 180 degrees, the selected rotation angles of the d-axis are converted so that the difference between the converted rotation angles is less than 180 degrees;

[0086] Step S822: average the converted rotation angles to obtain an angle average value.

[0087] Specifically, the conversion method of each selected rotation angle of the d-axis can be to add or subtract 360 degrees from the rotation angle. For example, if the selected rotation angles are 0 degrees, 30 degrees, 270 degrees, 300 degrees, and 330 degrees, 360 degrees can be subtracted from 270 degrees, 300 degrees, and 330 degrees, respectively, and the converted angles of 270 degrees, 300 degrees, and 330 degrees are -90 degrees, -60 degrees, and -30 degrees.

[0088] In one embodiment, step S830, i.e., the step of determining the magnetic pole position of the motor according to the angle average value, comprises:

[0089] Step S831: when the detection value of the encoder indicates that the motor rotates in a first direction, the magnetic pole position of the motor is determined according to the following formula: mag_angle=Id_angle_mean-90°;

[0090] Step S832: when the detection value of the encoder indicates that the motor rotates in the second direction, the magnetic pole position of the motor is determined according to the following formula: mag_angle=Id_angle_mean+90°;

[0091] Among them, mag_angle is the magnetic pole position of the motor, and Id_angle_mean is the angle mean.

[0092] According to the principle of synchronous motor, when the d-axis and the N-pole of the rotor magnetic field differ by 90 degrees, the maximum torque will be generated and the motor will rotate. At this time, the incremental encoder can detect the rotation of the motor. Based on this principle, when the encoder detects that the motor is rotating, the d-axis and the N-pole of the rotor magnetic field differ by 90 degrees. When the average angle is determined, the average angle can be used as the rotation angle corresponding to the d-axis, thereby determining the angle of the N-pole of the rotor magnetic field.

[0093] In practical applications, when the motor is in a braking state, the direction in which it can freely rotate in the free movement gap may be counterclockwise or clockwise. For example, when the coupling member 200 contacts different contact surfaces of the protrusion 110 of the brake plate 100, the brake plate 100 can rotate in different directions. In order to improve the accuracy, in this embodiment, the magnetic pole angle is determined according to the rotation direction of the motor. Specifically, the rotation direction of the motor can be determined first according to the detection value of the encoder, and then the angle of the magnetic pole can be determined in combination with the angle average value, thereby improving the detection accuracy.

[0094] The motor magnetic pole position detection method provided by this embodiment is described below with reference to a specific example:

[0095] Reference Figure 3In this example, the N pole and the d-axis differ by 60 degrees, and the rotation angle of the d-axis Id_angle=360°*k / 12, where k gradually increases in the range of 0 to 11, controlling the d-axis to complete a round of rotation.

[0096] Case 1: In braking state, the motor cannot move clockwise

[0097]

[0098] Among them, when the motor is in a light load or heavy load scenario, the detection results of the encoder are different.

[0099] According to the above table, the motor rotates at 5 angles. The 5 angles are accumulated and averaged to get the angle average value Id_angle_mean:

[0100] Id_angle_mean=(90+120+150+180+210) / 5=150 degrees.

[0101] The detection value of the encoder is positive, and the current magnetic pole position angle mag_angle is calculated:

[0102] mag_angle=Id_angle_mean-90=60 degrees.

[0103] The magnetic pole angle determined by the above detection method is consistent with the actual magnetic pole position. In addition, when overloaded, the motor cannot move at most angles, so the d-axis rotation angle corresponding to the maximum motor movement distance can be determined as Id_angle_mean.

[0104] The second situation: In the braking state, the motor cannot move counterclockwise

[0105]

[0106]

[0107] Among them, when the motor is in a light load or heavy load scenario, the detection results of the encoder are different.

[0108] According to the above table, the motor rotates at 5 angles. The 5 angles are accumulated and averaged to obtain the angle average value Id_angle_mean. Since the difference between the angles is greater than 180 degrees, for the accuracy of the result, the angles of 270 degrees, 300 degrees and 330 degrees are first converted so that the difference between the angles does not exceed 180 degrees, and then the angle average value is calculated.

[0109] The calculated angle average value Id_angle_mean=(0+30+(270-360)+(300-360)+(330-360)) / 5=-30 degrees.

[0110] The detection value of the encoder is negative, and the current magnetic pole position angle mag_angle is calculated:

[0111] mag_angle=Id_angle_mean+90=60 degrees.

[0112] The magnetic pole angle determined by the above detection method is consistent with the actual magnetic pole position. In addition, when overloaded, the motor cannot move at most angles, so the d-axis rotation angle corresponding to the maximum motor movement distance can be determined as Id_angle_mean.

[0113] The above example corresponds to a rotation process of the d-axis in one round, and the motor rotates in this round of rotation. If the motor does not rotate in this round of rotation, the current applied to the motor is increased to control the d-axis to rotate for the next round, that is, repeat the above detection method.

[0114] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0115] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the patent. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for detecting the magnetic pole position of a motor, characterized in that: When the motor is in a braking state, the motor has a rotation space of a preset angle; The motor magnetic pole position detection method comprises: Applying current to the motor to rotate the d-axis, while acquiring the detection value of the encoder in real time; When the d-axis completes one round of rotation, determining whether the motor is rotating according to the detection value of the encoder; If not, increasing the current applied to the motor to make the d-axis rotate for the next round until the motor rotates; The magnetic pole position of the motor is determined according to the detection value of the encoder and the rotation angle of the d-axis.

2. The motor magnetic pole position detection method according to claim 1, characterized in that: In one round, the d-axis rotates 360 degrees cumulatively.

3. The motor magnetic pole position detection method according to claim 2, characterized in that: In the step of applying current to the motor to rotate the d-axis, 360 degrees are divided into N equal parts, and the rotation angle of the d-axis Id_angle=360°*k / N, wherein N is an integer greater than 0, k is an integer greater than or equal to 0, k is less than N, and in one round, k gradually increases.

4. The motor magnetic pole position detection method according to claim 1, characterized in that: When the d-axis completes one round of rotation, the step of determining whether the motor rotates according to the detection value of the encoder comprises: Determine whether there is a detection value indicating that the motor has rotated in each detection value of the encoder during one rotation of the d-axis; If so, determining that the motor is rotating; If not, it is determined that the motor is not rotating.

5. The motor magnetic pole position detection method according to claim 4, characterized in that: The detection values ​​of the encoder include one type of detection value, two type of detection value and three type of detection value. The one type of detection value indicates that the motor has not rotated, the two type of detection value indicates that the motor has rotated in a first direction, and the three type of detection value indicates that the motor has rotated in a second direction, and the first direction is opposite to the second direction.

6. The motor magnetic pole position detection method according to claim 5, characterized in that: The first category detection value is equal to 0, the second category detection value is greater than 0, and the third category detection value is less than 0.

7. The motor magnetic pole position detection method according to claim 1, characterized in that: Before the step of increasing the current applied to the motor, the motor magnetic pole position detection method further includes: applying a maximum current I max The current Id_cur=I max *i / M, where M and i are both integers greater than 0, and i is less than or equal to M; In the step of increasing the current applied to the motor, the value of i is increased.

8. The motor magnetic pole position detection method according to claim 1, characterized in that: The step of determining the magnetic pole position of the motor according to the detection value of the encoder and the rotation angle of the d-axis comprises: According to the detection value of the encoder, the rotation angles of the d-axis when the motor rotates are screened out; The rotation angles of the screened d-axis are averaged to obtain the angle average value; The magnetic pole position of the motor is determined according to the angle average value.

9. The motor magnetic pole position detection method according to claim 8, characterized in that: The step of determining the magnetic pole position of the motor according to the angle average value comprises: When the detection value of the encoder indicates that the motor rotates in the first direction, the magnetic pole position of the motor is determined according to the following formula: mag_angle=Id_angle_mean-90°; When the detection value of the encoder indicates that the motor rotates in the second direction, the magnetic pole position of the motor is determined according to the following formula: mag_angle=Id_angle_mean+90°; Among them, mag_angle is the magnetic pole position of the motor, and Id_angle_mean is the angle mean.

10. The motor magnetic pole position detection method according to claim 8, characterized in that: The step of averaging the screened rotation angles of the d-axis to obtain the angle average value comprises: When the difference between the selected rotation angles of the d-axis exceeds 180 degrees, the selected rotation angles of the d-axis are converted so that the difference between the converted rotation angles is less than 180 degrees; The average of the converted rotation angles is taken to obtain the angle average value.