Motor zero position detection method, device, motor controller and storage medium

The motor controller uses current instructions and voltage detection methods to automatically detect the zero-position deviation angle of the permanent magnet synchronous motor, solving the problem of low efficiency in motor zero-position detection and achieving efficient and accurate detection under various motor states.

CN114487813BActive Publication Date: 2025-09-30MIDEA GRP (SHANGHAI) CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111617104.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-09-30
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

In the prior art, the efficiency of motor zero-position detection in a permanent magnet synchronous motor vector control system is low, and accurate detection cannot be performed without testing equipment or when the motor is connected to a reducer.

Method used

The motor is controlled by a motor controller based on the first current and the second current instructions. The motor's direct-axis voltage and quadrature-axis voltage are combined to automatically detect the motor's zero-position deviation angle, avoiding the need for test equipment. This is suitable for motors that have been connected to a reducer or assembled as a whole.

Benefits of technology

It improves the efficiency and accuracy of motor zero position detection, reduces test time, and is suitable for automated detection under various motor states.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114487813B_ABST
    Figure CN114487813B_ABST
Patent Text Reader

Abstract

The present application discloses a motor zero-position detection method, device, motor controller and storage medium. The motor zero-position detection method includes: controlling the motor based on a first current instruction; controlling the motor based on a second current instruction when the first speed of the motor reaches a set threshold within a set time, and determining the first zero-position deviation angle of the motor based on the first direct-axis voltage and the first quadrature-axis voltage of the motor; wherein the first current instruction represents that the direct-axis given current is a first current, the quadrature-axis given current is a second current, and the first current or the second current is zero; and the second current instruction represents that the direct-axis given current and the quadrature-axis given current are both zero.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic power technology, and in particular to a motor zero position detection method, device, motor controller and storage medium. Background Art

[0002] In a permanent magnet synchronous motor vector control system, the motor's zero position is a key parameter. If the motor's zero position is inaccurate, it will directly affect the motor's control effect and operating efficiency. Related technologies have the problem of low test efficiency in detecting the motor's zero position. Summary of the Invention

[0003] In view of this, embodiments of the present application provide a motor zero position detection method, device, motor controller, and storage medium.

[0004] To achieve the above objectives, the technical solution of this application is implemented as follows:

[0005] The present invention provides a method for detecting a zero position of a motor, including:

[0006] controlling the motor based on the first current command;

[0007] When the first speed of the motor reaches a set threshold within a set time, the motor is controlled based on a second current instruction, and a first zero deviation angle of the motor is determined based on a first direct-axis voltage and a first quadrature-axis voltage of the motor; wherein,

[0008] The first current instruction indicates that the direct-axis given current is a first current, the quadrature-axis given current is a second current, and the first current or the second current is zero;

[0009] The second current instruction indicates that both the direct-axis given current and the quadrature-axis given current are zero.

[0010] In the above solution, the method further includes:

[0011] The motor is controlled based on a third current instruction; wherein the third current instruction indicates that the direct-axis given current is the second current and the quadrature-axis given current is the first current;

[0012] When the second rotational speed of the motor reaches the set threshold, controlling the motor based on the second current command, and determining a second zero deviation angle of the motor based on a second direct-axis voltage and a second quadrature-axis voltage of the motor;

[0013] A final zero deviation angle is determined based on the first zero deviation angle and the second zero deviation angle.

[0014] In the above solution, controlling the motor based on the third current command includes:

[0015] When the first rotational speed of the motor does not reach the set threshold within the set time period, or when the first zero deviation angle of the motor is determined, the motor is controlled based on the third current command.

[0016] In the above solution, determining the final zero deviation angle includes one of the following:

[0017] When the first zero deviation angle is within a set error range and the second zero deviation angle is outside the set error range, determining the first zero deviation angle as a final zero deviation angle;

[0018] When the first zero deviation angle is outside the set error range and the second zero deviation angle is within the set error range, determining the second zero deviation angle as a final zero deviation angle;

[0019] When the first zero deviation angle and the second zero deviation angle are both within a set error range, an average of the first zero deviation angle and the second zero deviation angle is determined as a final zero deviation angle.

[0020] In the above solution, the method further includes:

[0021] Based on the rated current and the set current of the motor, a current which is not zero between the first current and the second current is determined; wherein,

[0022] The determined current is greater than or equal to the set current and less than or equal to the rated current;

[0023] The set current represents the minimum current required for the motor to overcome resistance and reach a speed of the set threshold within the set time period.

[0024] In the above solution, controlling the motor based on the first current command includes:

[0025] When the working mode for calibrating the motor zero position is turned on, the motor is controlled based on the first current command.

[0026] In the above solution, after controlling the motor based on the second current command, the method further includes:

[0027] Record multiple direct-axis voltages and multiple quadrature-axis voltages; wherein,

[0028] The first direct-axis voltage or the second direct-axis voltage represents an average value of a plurality of direct-axis voltages;

[0029] The first quadrature-axis voltage or the second quadrature-axis voltage represents an average value of a plurality of quadrature-axis voltages.

[0030] The present application also provides a motor zero position detection device, comprising:

[0031] A first control module, configured to control the motor based on a first current instruction;

[0032] The second control module is configured to control the motor based on a second current instruction when the first speed of the motor reaches a set threshold within a set time period, and determine a first zero-position deviation angle of the motor based on a first straight-axis voltage and a first quadrature-axis voltage corresponding to the stator of the motor; wherein,

[0033] The first current instruction indicates that the direct-axis given current is a first current, the quadrature-axis given current is a second current, and the first current or the second current is zero;

[0034] The second current instruction indicates that both the direct-axis given current and the quadrature-axis given current are zero.

[0035] An embodiment of the present application also provides a motor controller, comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor is used to execute the steps of the above-mentioned motor zero position detection method when running the computer program.

[0036] An embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned motor zero position detection method are implemented.

[0037] In an embodiment of the present application, a motor is controlled based on a first current instruction; when the first speed of the motor reaches a set threshold within a set time, the motor is controlled based on a second current instruction, and the first zero-position deviation angle of the motor is determined based on the first direct-axis voltage and the first quadrature-axis voltage of the motor; wherein the first current instruction indicates that the direct-axis given current is the first current, the quadrature-axis given current is the second current, and the first current or the second current is zero; the second current instruction indicates that the direct-axis given current and the quadrature-axis given current are both zero. Thus, the motor zero position can be detected by the motor controller without the aid of test equipment, which can save test time and improve test efficiency. Moreover, the motor zero position can be automatically detected even when the motor is connected to a reducer or the motor has been assembled. When the first speed of the motor reaches the set threshold, it indicates that the motor has reached a stable state. Based on the first direct-axis voltage and the first quadrature-axis voltage in the stable state, the first zero-position deviation angle of the motor is determined, which can improve the accuracy of the determined zero-position deviation angle and thereby improve the accuracy of the motor zero position. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1A schematic diagram of the implementation flow of the motor zero position detection method provided in an embodiment of the present application;

[0039] Figure 2 A schematic diagram of the zero-position deviation angle of a motor provided in an embodiment of the present application;

[0040] Figure 3 A schematic diagram of the implementation flow of the motor zero position detection method provided in the application embodiment of the present application;

[0041] Figure 4 A schematic diagram of the structure of a motor zero position detection device provided in an embodiment of the present application;

[0042] Figure 5 A schematic diagram of the hardware composition structure of the motor controller provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] In the related art, the motor under test is dragged by a test device (for example, a test bench motor), the back electromotive force zero crossing is tested, and the zero position of the motor is determined based on the back electromotive force zero crossing tested. However, this method depends on the test device. Before the motor under test is tested, it is necessary to build a test system consisting of the test device and the motor under test. The test is time-consuming, the test efficiency is low, and there are test limitations. For example, in the absence of a test device or the motor is connected to a reducer, the zero position of the motor cannot be tested.

[0044] Based on this, an embodiment of the present application provides a motor zero position detection method, which controls the motor based on a first current instruction; when the first speed of the motor reaches a set threshold within a set time, controls the motor based on a second current instruction, and determines the first zero position deviation angle of the motor based on the first direct-axis voltage and the first quadrature-axis voltage of the motor; wherein, the first current instruction represents that the direct-axis given current is the first current, the quadrature-axis given current is the second current, and the first current or the second current is zero; the second current instruction represents that the direct-axis given current and the quadrature-axis given current are both zero. Thus, the motor zero position can be detected by the motor controller without the aid of test equipment, which can save test time and improve test efficiency. In addition, the motor zero position can be automatically detected when the motor is connected to the reducer or the motor has been assembled as a whole.

[0045] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0046] Figure 1The following is a schematic diagram of the implementation process of the motor zero position detection method provided in the embodiment of the present application, wherein the execution subject of the process is the motor controller. Figure 1 As shown, the motor zero position detection method includes:

[0047] Step 101: Control a motor based on a first current instruction; wherein the first current instruction indicates that a direct-axis given current is a first current, a quadrature-axis given current is a second current, and the first current or the second current is zero.

[0048] Here, when detecting the motor's zero position, the motor controller determines the motor's direct-axis current and quadrature-axis current; generates a first current command based on the determined direct-axis current and quadrature-axis current; and controls the motor based on the first current command. The motor includes a permanent magnet synchronous motor, and the motor controller is integrated into the motor.

[0049] The motor's direct axis is also called the d-axis, and the quadrature axis is also called the q-axis. The first current command indicates that the direct axis current is the first current, the quadrature axis current is the second current, and the first and second currents are not simultaneously zero. That is, when the first current is zero, the second current is non-zero; and when the first current is non-zero, the second current is zero.

[0050] It should be noted that the motor controller can detect the motor zero position according to a set period, or can detect the motor zero position when a relevant instruction from the user is detected. The non-zero current values ​​in different first current instructions can be the same or different.

[0051] It should be noted that, in order to prevent the motor from moving due to vibration when it rotates, the motor needs to be fixed at a certain position before controlling the motor based on the first current command.

[0052] In some embodiments, controlling the motor based on the first current command includes:

[0053] When the working mode for calibrating the motor zero position is turned on, the motor is controlled based on the first current command.

[0054] Here, when the user needs to calibrate the motor zero position, the user activates the motor zero position calibration working mode. When the motor controller detects that it is currently in the motor zero position calibration working mode, it controls the motor based on the first current command. Thus, the user can activate the motor zero position calibration working mode according to actual needs, which can improve control flexibility.

[0055] Step 102: When the first speed of the motor reaches a set threshold within a set time, the motor is controlled based on a second current command, and the first zero-position deviation angle of the motor is determined based on the first direct-axis voltage and the first quadrature-axis voltage of the motor; wherein the second current command indicates that the direct-axis given current and the quadrature-axis given current are both zero.

[0056] Here, the motor controller obtains the first speed of the motor and determines whether the first speed of the motor reaches the set threshold within the set time. If the first speed of the motor reaches the set threshold within the set time, it indicates that the motor is running stably. At this time, the current command of the motor is modified, and the direct-axis given current and the quadrature-axis given current of the motor are both set to zero; based on the modified direct-axis given current and the quadrature-axis given current, a second current command is generated, and the motor is controlled based on the second current command. The first speed of the motor can be detected by a sensor. The second current command indicates that the direct-axis given current and the quadrature-axis given current of the motor are both zero. For example, the threshold value can be set to 2000 rpm, and of course it can be set to other values.

[0057] When the motor zero position is accurate, in the control mode where the motor's direct axis given current and quadrature axis given current are both zero, the motor's direct axis voltage u can be determined according to the motor voltage calculation formula. d =0, the quadrature axis voltage is a fixed value, ω represents the electrical angular velocity of the motor, Characterizes the rotor flux of the motor. d =R s ×i d -ω×L q ×i q , R s Characterizes the phase resistance of the motor, i d Characterizes the direct axis current of the motor, L q Characterizes the quadrature axis inductance of the motor, i q Characterizes the quadrature axis current of the motor; i q Characterizes the quadrature axis current of the motor, L d Characterizes the direct-axis inductance of the motor.

[0058] But when the motor zero position is not accurate, for example Figure 2 As shown, there is a zero position deviation angle θ at the motor zero position, and the motor controller is based on the second current instruction i d =i q =0 when controlling the motor, the motor's direct axis voltage u d 'is no longer zero, and the quadrature axis voltage of the motor is no longer a fixed value For example, d '=sinθ×u q ,u q'=cosθ×u q At this time, the ratio of the motor's direct-axis voltage to the quadrature-axis voltage is tanθ, so the zero-position deviation angle

[0059] In a control mode in which both the direct-axis given current and the quadrature-axis given current of the motor are zero, at least one direct-axis voltage and at least one quadrature-axis voltage of the motor are read and recorded, a first direct-axis voltage is determined from the at least one direct-axis voltage, a first quadrature-axis voltage is determined from the at least one quadrature-axis voltage, and an inverse tangent of the ratio of the first direct-axis voltage to the first quadrature-axis voltage is calculated to obtain a first zero-position deviation angle of the motor. Because the motor controller stores the factory zero-position angle of the motor, once the zero-position deviation angle of the motor is determined, the motor zero position can be obtained using the determined zero-position deviation angle and the factory zero-position angle.

[0060] In order to reduce measurement errors and improve the accuracy of the determined first zero deviation angle, in some embodiments, after controlling the motor based on the second current command, the method further includes:

[0061] Record multiple direct-axis voltages and multiple quadrature-axis voltages; wherein,

[0062] The first direct-axis voltage represents an average value of multiple direct-axis voltages;

[0063] The first quadrature-axis voltage represents an average value of multiple quadrature-axis voltages.

[0064] Here, during step 102, when the first speed of the motor reaches a set threshold within a set time period and the motor is controlled based on the second current command, the motor controller records multiple direct-axis voltages and multiple quadrature-axis voltages, determines the average of the recorded multiple direct-axis voltages as the first direct-axis voltage, and determines the average of the recorded multiple quadrature-axis voltages as the first quadrature-axis voltage. Thus, a first zero-position deviation angle can be determined based on the average direct-axis voltage and the average quadrature-axis voltage, thereby reducing the error in the determined first zero-position deviation angle and improving the measurement accuracy of the motor zero position.

[0065] It should be noted that when the first zero deviation angle is outside the set error range, the motor controller can adjust the non-zero given current in the direct-axis given current and the quadrature-axis given current, and generate a new first current instruction to redetermine the first zero deviation angle of the motor according to steps 101 to 102.

[0066] It should be noted that, during the process of the motor controller controlling the motor based on the first current command, the motor may not rotate, or the first speed of the motor may not reach the set threshold. In this case, the control process is terminated.

[0067] In an embodiment of the present application, a motor is controlled based on a first current instruction; when the first speed of the motor reaches a set threshold within a set time, the motor is controlled based on a second current instruction, and a first zero-position deviation angle of the motor is determined based on the first direct-axis voltage and the first quadrature-axis voltage of the motor; wherein the first current instruction indicates that the direct-axis given current is the first current, the quadrature-axis given current is the second current, and the first current or the second current is zero; and the second current instruction indicates that both the direct-axis given current and the quadrature-axis given current are zero. Thus, the motor zero position can be detected by the motor controller without the aid of test equipment, which can save test time and improve test efficiency. Moreover, the motor zero position can be automatically detected even when the motor is connected to a reducer or the motor has been assembled. When the first speed of the motor reaches the set threshold, it indicates that the motor has reached a stable state. Based on the first direct-axis voltage and the first quadrature-axis voltage in the stable state, the first zero-position deviation angle of the motor is determined, which can improve the accuracy of the determined zero-position deviation angle and thereby improve the accuracy of the motor zero position.

[0068] In some embodiments, the method further includes steps 103 to 105:

[0069] Step 103: Control the motor based on a third current instruction; wherein the third current instruction indicates that the direct-axis given current is the second current and the quadrature-axis given current is the first current.

[0070] Here, in the scenario of detecting the zero position of the motor, the motor controller controls the motor based on the third current command. When the first current command indicates that the first current is zero and the second current is non-zero, the third current command indicates that the first current is non-zero, the second current is zero, and the first current in the third current command is equal to the second current in the first current command.

[0071] When the first current instruction indicates that the second current is zero and the first current is not zero, the third current instruction indicates that the second current is not zero, the first current is zero, and the second current in the third current instruction is equal to the first current in the first current instruction.

[0072] It should be noted that the motor controller may execute steps 103 to 104 after executing steps 101 to 102; or may execute steps 103 to 104 before executing steps 101 to 102. In other words, the motor controller may calibrate the motor zero position by executing steps 101 to 105. For example, the first current instruction represents i d =K,i q =0; the third current instruction represents i d =0,i q=K. K represents the given current. Or, the first current instruction represents i d =0,i q =K; the third current instruction represents i d =K,i q = 0. Thus, the first current command and the third current command can ensure that the motor speed can reach the set threshold within the set time, thereby determining the zero deviation angle based on the direct-axis voltage and the quadrature-axis voltage of the motor.

[0073] Considering that in actual applications, since the zero position of the motor is unknown, the motor speed may fail to reach a set threshold value during the process in which the motor controller controls the motor based on the first current command or the third current command. In order to improve the success rate of detecting the zero position of the motor, in some embodiments, before step 101 or step 103, the method further includes:

[0074] Based on the rated current and the set current of the motor, a current which is not zero between the first current and the second current is determined; wherein,

[0075] The determined current is greater than or equal to the set current and less than or equal to the rated current;

[0076] The set current represents the minimum current required for the motor to overcome resistance and reach a speed of the set threshold within the set time period.

[0077] Here, the motor controller may determine any current between the rated current and the set current of the motor as the quadrature-axis given current or the direct-axis given current of the motor, obtain the current that is non-zero between the first current and the second current, and generate the first current command or the third current command based on the determined current. This ensures the probability that the motor speed will reach the set threshold within the set time period, provided that the motor is capable of rotating.

[0078] In some embodiments, controlling the motor based on the third current command includes:

[0079] When the first rotational speed of the motor does not reach the set threshold within the set time period, or when the first zero deviation angle of the motor is determined, the motor is controlled based on the third current command.

[0080] Here, considering that in the process of the motor controller controlling the motor based on the first current instruction, the motor may not rotate, or the first speed of the motor may not reach the set threshold value within the set time, the motor controller cannot determine the zero-position deviation angle of the motor. At this time, the motor controller controls the motor based on the third current instruction so as to determine the second zero-position deviation angle of the motor by executing steps 104 to 105, thereby calibrating the motor zero position according to the second zero-position deviation angle. Thus, through the first current instruction and the third current instruction, it can be ensured that the speed of the motor can reach the set threshold value within the set time, so that the zero-position deviation angle can be determined based on the direct-axis voltage and the quadrature-axis voltage of the motor, thereby improving the success rate of detecting the zero position of the motor. It should be noted that when the first speed of the motor reaches the set threshold value, the motor controller may not execute steps 103 to 105.

[0081] The motor controller can also execute steps 103 to 105 after executing steps 101 to 102, thereby determining the final zero position deviation angle based on the first zero position deviation angle and the second zero position deviation angle, and then calibrating the motor zero position according to the final zero position deviation angle, which can reduce measurement errors and more accurately determine the final zero position deviation angle.

[0082] Step 104: When the second rotational speed of the motor reaches the set threshold, the motor is controlled based on the second current command, and a second zero-position deviation angle of the motor is determined based on the second direct-axis voltage and the second quadrature-axis voltage of the motor.

[0083] Here, the motor controller obtains the second speed of the motor. When the second speed of the motor reaches a set threshold, it indicates that the motor is running stably. At this time, the current command is modified, and the direct-axis given current and the quadrature-axis given current of the motor are both set to zero; based on the modified direct-axis given current and the quadrature-axis given current, a second current command is generated, and the motor is controlled based on the second current command.

[0084] In a control mode in which both the direct-axis given current and the quadrature-axis given current of the motor are zero, at least one direct-axis voltage and at least one quadrature-axis voltage of the motor are read and recorded, a second direct-axis voltage is determined from the at least one direct-axis voltage, a second quadrature-axis voltage is determined from the at least one quadrature-axis voltage, and an inverse tangent value of the ratio of the second direct-axis voltage to the second quadrature-axis voltage is calculated to obtain a second zero-position deviation angle of the motor.

[0085] It should be noted that when the motor is tested using the first current instruction and the third current instruction respectively, the motor speed can reach the set threshold value in at least one test. In one application scenario, when the motor controller executes step 101 to test the motor for the first time, since it is uncertain whether the first speed of the motor can reach the set threshold value within the set time length, it is necessary to determine whether the first speed of the motor reaches the set threshold value within the set time length during the first test. If the first speed of the motor does not reach the set threshold value within the set time length, step 103 is executed to perform a second test on the motor. At this time, in step 104, the second speed of the motor is determined to reach the set threshold value. Therefore, in step 104, it is not necessary to determine whether the second speed of the motor reaches the set threshold value within the set time length.

[0086] In order to improve the accuracy of the determined first zero deviation angle, in some embodiments, after controlling the motor based on the second current command, the method further includes:

[0087] Record multiple direct-axis voltages and multiple quadrature-axis voltages; wherein,

[0088] The second direct-axis voltage represents an average value of multiple direct-axis voltages;

[0089] The second quadrature-axis voltage represents an average value of multiple quadrature-axis voltages.

[0090] Here, during step 104, when the second motor speed reaches a set threshold and the motor is controlled based on the second current command, the motor controller records multiple direct-axis voltages and multiple quadrature-axis voltages, determines the average of the recorded multiple direct-axis voltages as the second direct-axis voltage, and determines the average of the recorded multiple quadrature-axis voltages as the second quadrature-axis voltage. Thus, a second zero-position deviation angle can be determined based on the average direct-axis voltage and the average quadrature-axis voltage, thereby reducing the error in the determined second zero-position deviation angle and improving the motor zero-position accuracy.

[0091] Step 105: Determine a final zero deviation angle based on the first zero deviation angle and the second zero deviation angle.

[0092] Here, after determining the first zero deviation angle and the second zero deviation angle, the motor controller determines a final zero deviation angle based on the first and second zero deviation angles. The motor controller may determine the first or second zero deviation angle as the final zero deviation angle, or may determine the average of the first and second zero deviation angles as the final zero deviation angle.

[0093] Considering that the calculated zero deviation angle may exceed the set error range in actual applications, in order to improve the accuracy of the final zero deviation angle determined, in some embodiments, determining the final zero deviation angle includes one of the following:

[0094] When the first zero deviation angle is within a set error range and the second zero deviation angle is outside the set error range, determining the first zero deviation angle as a final zero deviation angle;

[0095] When the first zero deviation angle is outside the set error range and the second zero deviation angle is within the set error range, determining the second zero deviation angle as a final zero deviation angle;

[0096] When the first zero deviation angle and the second zero deviation angle are both within a set error range, an average of the first zero deviation angle and the second zero deviation angle is determined as a final zero deviation angle.

[0097] Here, the motor controller compares the first zero-position deviation angle with the set error range to obtain a first comparison result; and compares the second zero-position deviation angle with the set error range to obtain a second comparison result.

[0098] When the first comparison result indicates that the first zero deviation angle is within the set error range and the second comparison result indicates that the second zero deviation angle is outside the set error range, the second zero deviation angle is invalid and the first zero deviation angle is determined as the final zero deviation angle.

[0099] When the first comparison result indicates that the first zero deviation angle is outside the set error range and the second comparison result indicates that the second zero deviation angle is within the set error range, the first zero deviation angle is invalid and the second zero deviation angle is determined as the final zero deviation angle.

[0100] When the first comparison result indicates that the first zero deviation angle is within the set error range, and the second comparison result indicates that the second zero deviation angle is within the set error range, both the first zero deviation angle and the second zero deviation angle are valid, and the average between the first zero deviation angle and the second zero deviation angle is determined as the final zero deviation angle.

[0101] In this embodiment, the motor controller determines the final zero-position deviation angle based on the first zero-position deviation angle and the second zero-position deviation angle, and calibrates the motor zero position based on the final zero-position deviation angle, which can reduce the measurement error, improve the accuracy of the final determined zero-position deviation angle, and thereby improve the accuracy of the calibrated motor zero position.

[0102] Figure 3The following is a schematic diagram of the implementation flow of the motor zero position detection method provided in the application embodiment of the present application, as shown in FIG. Figure 3 As shown in FIG, the motor zero position detection method includes:

[0103] Step 301: Control a motor based on a first current instruction; wherein the first current instruction indicates that a direct-axis given current is a first current, a quadrature-axis given current is a second current, and the first current or the second current is zero.

[0104] Among them, steps 301 to 305 are the same as steps 101 to 105. For the implementation process of steps 301 to 305, please refer to the relevant description of steps 101 to 105, which will not be repeated here.

[0105] Step 302: When the first speed of the motor reaches a set threshold within a set time, the motor is controlled based on a second current instruction, and the first zero-position deviation angle of the motor is determined based on the first direct-axis voltage and the first quadrature-axis voltage of the motor; the second current instruction indicates that the direct-axis given current and the quadrature-axis given current are both zero.

[0106] Step 303: Control the motor based on a third current instruction; wherein the third current instruction indicates that the direct-axis given current is the second current and the quadrature-axis given current is the first current.

[0107] Step 304: When the second rotational speed of the motor reaches the set threshold, the motor is controlled based on the second current command, and a second zero-position deviation angle of the motor is determined based on the second direct-axis voltage and the second quadrature-axis voltage of the motor.

[0108] Step 305: Determine a final zero deviation angle based on the first zero deviation angle and the second zero deviation angle.

[0109] Wherein, when the first zero deviation angle is within a set error range and the second zero deviation angle is outside the set error range, the first zero deviation angle is determined as a final zero deviation angle;

[0110] When the first zero deviation angle is outside the set error range and the second zero deviation angle is within the set error range, determining the second zero deviation angle as a final zero deviation angle;

[0111] When the first zero deviation angle and the second zero deviation angle are both within a set error range, an average of the first zero deviation angle and the second zero deviation angle is determined as a final zero deviation angle.

[0112] In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a motor zero position detection, such as Figure 4 As shown, the motor zero position detection includes:

[0113] A first control module 41, configured to control the motor based on a first current command;

[0114] The second control module 42 is configured to control the motor based on a second current instruction when the first speed of the motor reaches a set threshold within a set time period, and determine a first zero-position deviation angle of the motor based on a first straight-axis voltage and a first quadrature-axis voltage corresponding to the stator of the motor; wherein,

[0115] The first current instruction indicates that the direct-axis given current is a first current, the quadrature-axis given current is a second current, and the first current or the second current is zero;

[0116] The second current instruction indicates that both the direct-axis given current and the quadrature-axis given current are zero.

[0117] In some embodiments, the motor zero position detection further includes:

[0118] a third control module, configured to control the motor based on a third current instruction; wherein the third current instruction indicates that the direct-axis given current is the second current and the quadrature-axis given current is the first current;

[0119] a fourth control module, configured to control the motor based on the second current command when the second speed of the motor reaches the set threshold, and determine a second zero deviation angle of the motor based on a second direct-axis voltage and a second quadrature-axis voltage of the motor;

[0120] The first determining module is configured to determine a final zero deviation angle based on the first zero deviation angle and the second zero deviation angle.

[0121] In some embodiments, the third control module is specifically configured to:

[0122] When the first rotational speed of the motor does not reach the set threshold within the set time period, or when the first zero deviation angle of the motor is determined, the motor is controlled based on the third current command.

[0123] In some embodiments, the first determining module is specifically configured to:

[0124] When the first zero deviation angle is within a set error range and the second zero deviation angle is outside the set error range, determining the first zero deviation angle as a final zero deviation angle;

[0125] When the first zero deviation angle is outside the set error range and the second zero deviation angle is within the set error range, determining the second zero deviation angle as a final zero deviation angle;

[0126] When the first zero deviation angle and the second zero deviation angle are both within a set error range, an average of the first zero deviation angle and the second zero deviation angle is determined as a final zero deviation angle.

[0127] In some embodiments, the electrode zero position detection device further comprises:

[0128] The second determining module is configured to determine a non-zero current between the first current and the second current based on the rated current and the set current of the motor; wherein,

[0129] The determined current is greater than or equal to the set current and less than or equal to the rated current;

[0130] The set current represents the minimum current required for the motor to overcome resistance and reach a speed of the set threshold within a set time period.

[0131] In some embodiments, the first control module 41 is specifically configured to:

[0132] When the working mode for calibrating the motor zero position is turned on, the motor is controlled based on the first current command.

[0133] In some embodiments, the electrode zero position detection device further comprises:

[0134] The recording module is used to record multiple direct-axis voltages and multiple quadrature-axis voltages; wherein,

[0135] The first direct-axis voltage or the second direct-axis voltage represents an average value of a plurality of direct-axis voltages;

[0136] The first quadrature-axis voltage or the second quadrature-axis voltage represents an average value of a plurality of quadrature-axis voltages.

[0137] In actual application, the modules included in the motor zero position detection device can be implemented by a processor in the motor zero position detection device, such as a central processing unit (CPU), a digital signal processor (DSP), a microcontroller unit (MCU) or a field-programmable gate array (FPGA).

[0138] It should be noted that the motor zero-position detection device provided in the above embodiment is merely illustrated by the division of the above-mentioned program modules when performing motor zero-position detection. In actual applications, the above-mentioned processing can be distributed to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the above-described processing. In addition, the motor zero-position detection device provided in the above embodiment and the motor zero-position detection method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0139] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a motor controller. Figure 5 The hardware structure diagram of the motor controller provided in the embodiment of the present application is as follows: Figure 5 As shown, the motor controller 5 includes:

[0140] Communication interface 51, capable of exchanging information with other devices such as network devices;

[0141] The processor 52 is connected to the communication interface 51 to implement information exchange with other devices and is used to execute the motor zero position detection method provided by one or more technical solutions when running a computer program. The computer program is stored in the memory 53.

[0142] Of course, in actual application, the various components in the motor controller 5 are coupled together through the bus system 54. It is understood that the bus system 54 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 54 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 5 Various buses are labeled as bus system 54 .

[0143] The memory 53 in the embodiment of the present application is used to store various types of data to support the operation of the motor controller 5. Examples of such data include any computer program used to operate on the motor controller 5.

[0144] It is understood that the memory 53 can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a magnetic disk memory or a magnetic tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memory 53 described in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.

[0145] The methods disclosed in the above embodiments of the present application can be applied to or implemented by the processor 52. The processor 52 may be an integrated circuit chip with signal processing capabilities. During implementation, the steps of the above methods can be completed by hardware integrated logic circuits in the processor 52 or by software instructions. The above processor 52 may be a general-purpose processor, a DSP, or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. The processor 52 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present application can be directly implemented as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium located in the memory 53. The processor 52 reads the program in the memory 53 and, in conjunction with its hardware, completes the steps of the above methods.

[0146] Optionally, when the processor 52 executes the program, it implements the corresponding processes implemented by the terminal in each method of the embodiment of the present application, which will not be described here for the sake of brevity.

[0147] In an exemplary embodiment, the present application also provides a storage medium, namely, a computer storage medium, specifically, a computer-readable storage medium, including, for example, a first memory 53 storing a computer program. The computer program can be executed by a processor 52 of a terminal to perform the steps of the aforementioned method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface storage, optical disk, or CD-ROM.

[0148] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0149] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0150] In addition, all functional units in the embodiments of the present application can be integrated into one processing module, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0151] Those skilled in the art will appreciate that all or part of the steps of the above-mentioned method embodiments may be implemented by hardware associated with program instructions, and the aforementioned program may be stored in a computer-readable storage medium. When the program is executed, the program executes the steps of the above-mentioned method embodiments. The aforementioned storage medium includes various media that can store program codes, such as mobile storage devices, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0152] It should be noted that the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0153] It should be noted that the term "and / or" in the embodiments of the present application is merely a description of an association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: the existence of A alone, the simultaneous existence of A and B, and the existence of B alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of items. For example, at least one of A, B, and C can represent any one or more elements selected from the set consisting of A, B, and C.

[0154] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A motor zero position detection method, characterized in that: include: controlling the motor based on the first current command; When a first speed of the motor reaches a set threshold within a set time, controlling the motor based on a second current command, and determining a first zero deviation angle of the motor based on a first direct-axis voltage and a first quadrature-axis voltage of the motor; wherein the first current command indicates that the direct-axis given current is a first current, the quadrature-axis given current is a second current, and the first current or the second current is zero; The second current instruction indicates that both the direct-axis given current and the quadrature-axis given current are zero; The motor is controlled based on a third current instruction; wherein the third current instruction indicates that the direct-axis given current is the second current and the quadrature-axis given current is the first current; When the second rotational speed of the motor reaches the set threshold, controlling the motor based on the second current command, and determining a second zero deviation angle of the motor based on a second direct-axis voltage and a second quadrature-axis voltage of the motor; determining a final zero deviation angle based on the first zero deviation angle and the second zero deviation angle; Determining the motor zero position based on the final zero position deviation angle and the factory zero position angle; The determining of a final zero deviation angle based on the first zero deviation angle and the second zero deviation angle includes: When the first zero deviation angle is within a set error range and the second zero deviation angle is outside the set error range, determining the first zero deviation angle as a final zero deviation angle; When the first zero deviation angle is outside the set error range and the second zero deviation angle is within the set error range, determining the second zero deviation angle as a final zero deviation angle; When the first zero deviation angle and the second zero deviation angle are both within a set error range, an average of the first zero deviation angle and the second zero deviation angle is determined as a final zero deviation angle.

2. The method according to claim 1, characterized in that The controlling the motor based on the third current command includes: When the first rotational speed of the motor does not reach the set threshold within the set time period, or when the first zero deviation angle of the motor is determined, the motor is controlled based on the third current command.

3. The method according to claim 1, characterized in that The method further comprises: Based on the rated current and the set current of the motor, a current which is not zero between the first current and the second current is determined; wherein, The determined current is greater than or equal to the set current and less than or equal to the rated current; The set current represents the minimum current required for the motor to overcome resistance and reach a speed of the set threshold within the set time period.

4. The method according to claim 1, wherein The controlling of the motor based on the first current command includes: When the working mode for calibrating the motor zero position is turned on, the motor is controlled based on the first current command.

5. The method according to claim 1, wherein After controlling the motor based on the second current command, the method further includes: Record multiple direct-axis voltages and multiple quadrature-axis voltages; wherein, The first direct-axis voltage or the second direct-axis voltage represents an average value of a plurality of direct-axis voltages; The first quadrature-axis voltage or the second quadrature-axis voltage represents an average value of a plurality of quadrature-axis voltages.

6. A motor zero position detection device, characterized in that: include: A first control module, configured to control the motor based on a first current instruction; The second control module is configured to control the motor based on a second current instruction when the first speed of the motor reaches a set threshold within a set time period, and determine a first zero-position deviation angle of the motor based on a first straight-axis voltage and a first quadrature-axis voltage corresponding to the stator of the motor; wherein, The first current instruction indicates that the direct-axis given current is a first current, the quadrature-axis given current is a second current, and the first current or the second current is zero; The second current instruction indicates that both the direct-axis given current and the quadrature-axis given current are zero; The motor zero position detection device also includes: a third control module, configured to control the motor based on a third current instruction; wherein the third current instruction indicates that the direct-axis given current is the second current and the quadrature-axis given current is the first current; a fourth control module, configured to control the motor based on the second current command when the second speed of the motor reaches the set threshold, and determine a second zero deviation angle of the motor based on a second direct-axis voltage and a second quadrature-axis voltage of the motor; a first determining module, configured to determine a final zero deviation angle based on the first zero deviation angle and the second zero deviation angle; The first determining module is configured to determine the motor zero position based on the final zero position deviation angle and the factory zero position angle; The first determining module is configured to determine the first zero deviation angle as a final zero deviation angle when the first zero deviation angle is within a set error range and the second zero deviation angle is outside the set error range; When the first zero deviation angle is outside the set error range and the second zero deviation angle is within the set error range, determining the second zero deviation angle as a final zero deviation angle; When the first zero deviation angle and the second zero deviation angle are both within a set error range, an average of the first zero deviation angle and the second zero deviation angle is determined as a final zero deviation angle.

7. A motor controller, characterized in that: include: a processor and a memory for storing a computer program capable of being executed on the processor, Wherein, when the processor is used to run the computer program, it executes the steps of the method according to any one of claims 1 to 5.

8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Method and system for zero position measurement of permanent magnet synchronous motor

    CN106160594A

  • Motor zero position determination method and device

    CN110784132A