CN114487813B - Motor zero position detection method, device, motor controller and storage medium - Google Patents
Motor zero position detection method, device, motor controller and storage mediumInfo
- Publication number
- CN114487813B CN114487813B CN202111617104.3A CN202111617104A CN114487813B CN 114487813 B CN114487813 B CN 114487813B CN 202111617104 A CN202111617104 A CN 202111617104A CN 114487813 B CN114487813 B CN 114487813B
- Authority
- CN
- China
- Prior art keywords
- current
- motor
- offset angle
- zero
- zero offset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
- G01R31/34—Testing dynamo-electric machines
- G01R31/343—Testing dynamo-electric machines in operation
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R19/00—Arrangements for measuring currents or voltages or for indicating presence or sign thereof
- G01R19/175—Indicating the instants of passage of current or voltage through a given value, e.g. passage through zero
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P21/00—Arrangements or methods for the control of electric machines by vector control, e.g. by control of field orientation
- H02P21/14—Estimation or adaptation of machine parameters, e.g. flux, current or voltage
- H02P21/18—Estimation of position or speed
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P6/00—Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
- H02P6/14—Electronic commutators
- H02P6/16—Circuit arrangements for detecting position
- H02P6/18—Circuit arrangements for detecting position without separate position detecting elements
- H02P6/182—Circuit arrangements for detecting position without separate position detecting elements using back-emf in windings
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Control Of Ac Motors In General (AREA)
Abstract
The application discloses a motor zero detection method, a motor zero detection device, a motor controller and a storage medium, wherein the motor zero detection method comprises the steps of controlling a motor based on a first current instruction; and under the condition that the first rotation speed of the motor reaches a set threshold value within a set duration, controlling the motor based on a second current instruction, and determining a first zero offset angle of the motor based on a first direct-axis voltage and a first quadrature-axis voltage of the motor, wherein the first current instruction represents that a direct-axis given current is a first current, the quadrature-axis given current is a second current, 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.
Description
Technical Field
The present application relates to the field of electronic power technology, and in particular, to a motor zero detection method, a device, a motor controller, and a storage medium.
Background
In a vector control system of a permanent magnet synchronous motor, the zero position of the motor is a key parameter, and if the zero position of the motor is inaccurate, the control effect and the operation efficiency of the motor are directly affected. In the related art, the method for detecting the zero position of the motor has the problem of low test efficiency.
Disclosure of Invention
In view of this, the embodiment of the application provides a motor zero detection method, a motor zero detection device, a motor controller and a storage medium.
In order to achieve the above purpose, the technical scheme of the application is realized as follows:
The embodiment of the application provides a motor zero detection method, which comprises the following steps:
controlling the motor based on the first current command;
controlling the motor based on a second current command and determining a first zero offset angle of the motor based on a first direct voltage and a first quadrature voltage of the motor when a first rotational speed of the motor reaches a set threshold within a set period of time,
The first current instruction characterizes that a straight-axis given current is a first current, an intersecting-axis given current is a second current, and the first current or the second current is zero;
the second current command characterizes that both the direct axis given current and the quadrature axis given current are zero.
In the above scheme, the method further comprises:
controlling the motor based on a third current instruction, wherein the third current instruction characterizes that a direct-axis given current is the second current, and a quadrature-axis given current is the first current;
controlling the motor based on the second current instruction under the condition that the second rotating speed of the motor reaches the set threshold value, and determining a second zero offset angle of the motor based on a second direct axis voltage and a second quadrature axis voltage of the motor;
and determining a final zero offset angle based on the first zero offset angle and the second zero offset angle.
In the above aspect, the controlling the motor based on the third current command includes:
And controlling the motor based on the third current instruction under the condition that the first rotating speed of the motor does not reach the set threshold value or the first zero deviation angle of the motor is determined within the set duration.
In the above scheme, the determining the final zero offset angle includes one of the following:
determining the first zero offset angle as a final zero offset angle when the first zero offset angle is within a set error range and the second zero offset angle is outside the set error range;
determining the second zero offset angle as a final zero offset angle when the first zero offset angle is outside the set error range and the second zero offset angle is within the set error range;
And under the condition that the first zero offset angle and the second zero offset angle are both positioned in a set error range, determining the average value of the first zero offset angle and the second zero offset angle as a final zero offset angle.
In the above scheme, the method further comprises:
determining a current which is not zero in the first current and the second current based on the rated current and the set current of the motor, 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 characterizes a minimum current required by the motor to overcome resistance to reach the set threshold rotational speed within the set duration.
In the above scheme, the controlling the motor based on the first current command includes:
And under the condition of starting an operating mode of calibrating the zero position of the motor, controlling the motor based on the first current instruction.
In the above aspect, after the controlling the motor based on the second current command, the method further includes:
recording a plurality of direct axis voltages and a plurality of quadrature axis voltages, wherein,
The first direct axis voltage or the second direct axis voltage represents the average value of a plurality of direct axis voltages;
The first quadrature axis voltage or the second quadrature axis voltage represents a mean value of a plurality of quadrature axis voltages.
The embodiment of the application also provides a motor zero position detection device, which comprises:
a first control module for controlling the motor based on the first current command;
A second control module, configured to control the motor based on a second current instruction and determine a first zero offset angle of the motor based on a first direct voltage and a first quadrature voltage corresponding to a stator of the motor when a first rotational speed of the motor reaches a set threshold within a set duration,
The first current instruction characterizes that a straight-axis given current is a first current, an intersecting-axis given current is a second current, and the first current or the second current is zero;
the second current command characterizes that both the direct axis given current and the quadrature axis given current are zero.
The embodiment of the application also provides a motor controller which comprises a processor and a memory for storing a computer program capable of running on the processor, wherein the processor is used for executing the steps of the motor zero detection method when running the computer program.
The embodiment of the application also provides a storage medium, on which a computer program is stored, which when being executed by a processor, realizes the steps of the motor zero detection method.
In the embodiment of the application, a motor is controlled based on a first current instruction, the motor is controlled based on a second current instruction under the condition that the first rotation speed of the motor reaches a set threshold value within a set duration, and a first zero offset angle of the motor is determined based on a first direct-axis voltage and a first quadrature-axis voltage of the motor, wherein the first current instruction represents that a direct-axis given current is a first current, the quadrature-axis given current is a second current, 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. Therefore, the zero position of the motor can be detected through the motor controller without using test equipment, the test time can be saved, the test efficiency can be improved, and the zero position of the motor can be automatically detected under the condition that the motor is connected to a speed reducer or the motor is assembled completely. Under the condition that the first rotation speed of the motor reaches a set threshold value, the motor is characterized to run to a stable state, and a first zero offset angle of the motor is determined based on the first direct voltage and the first quadrature voltage under the stable state, so that the accuracy of the determined zero offset angle can be improved, and the accuracy of the zero position of the motor is further improved.
Drawings
Fig. 1 is a schematic diagram of an implementation flow of a motor zero detection method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a zero offset angle of a motor according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an implementation flow of a motor zero detection method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a motor zero detection device according to an embodiment of the present application;
Fig. 5 is a schematic diagram of a hardware composition structure of a motor controller according to an embodiment of the present application.
Detailed Description
In the related art, a tested motor is dragged by a test device (e.g., a test bench motor), a counter electromotive force zero-crossing point is tested, and a zero position of the motor is determined based on the tested counter electromotive force zero-crossing point. However, this method relies on a test device, and before the motor to be tested is tested, a test system comprising the test device and the motor to be tested needs to be built, the test time is long, the test efficiency is low, and the test limitation exists. For example, the zero position of the motor cannot be tested without test equipment or the motor has been connected to the decelerator.
Based on the first zero position detection method, the motor is controlled based on a first current instruction, the motor is controlled based on a second current instruction under the condition that the first rotation speed of the motor reaches a set threshold value within a set duration, and a first zero position deviation angle of the motor is determined based on a first direct axis voltage and a 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, 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. Therefore, the zero position of the motor can be detected through the motor controller without using test equipment, the test time can be saved, the test efficiency can be improved, and the zero position of the motor can be automatically detected under the condition that the motor is connected to a speed reducer or the motor is assembled completely.
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Fig. 1 is a schematic diagram of an implementation flow of a motor zero detection method according to an embodiment of the present application, where an execution body of the flow is a motor controller. As shown in fig. 1, the motor zero detection method includes:
And 101, controlling a motor based on a first current instruction, wherein the first current instruction represents that the given current of a straight shaft is a first current, the given current of an intersecting shaft is a second current, and the first current or the second current is zero.
The motor controller determines a direct-axis given current and an intersecting-axis given current of the motor in a case of detecting a zero position of the motor, generates a first current command based on the determined direct-axis given current and intersecting-axis given current, and controls the motor based on the first current command. The motor comprises a permanent magnet synchronous motor, and the motor controller is integrated in the motor.
Wherein, the straight axis of the motor is also called d axis, and the intersecting axis is also called q axis. The first current command characterizes the direct axis given current as a first current, the quadrature axis given current as a second current, and the first current and the second current are not zero at the same time. I.e. the first current is zero and the second current is non-zero, and the first current is non-zero and the second current is zero.
It should be noted that, the motor controller may detect the zero position of the motor according to a set period, or may detect the zero position of the motor when detecting a related instruction of the user. The values of the currents that are not zero in the different first current commands may be the same or different.
In order to prevent the motor from moving in position due to the vibration of the motor, the motor needs to be fixed at a certain position before the motor is controlled based on the first current command.
In some embodiments, the controlling the motor based on the first current command includes:
And under the condition of starting an operating mode of calibrating the zero position of the motor, controlling the motor based on the first current instruction.
Here, the user opens the operation mode of calibrating the zero position of the motor under the condition that the zero position of the motor needs to be calibrated, and the motor controller controls the motor based on the first current instruction under the condition that the motor controller detects the current operation mode of calibrating the zero position of the motor. Therefore, a user can start the working mode of calibrating the zero position of the motor according to actual needs, and the control flexibility can be improved.
Step 102, under the condition that the first rotation speed of the motor reaches a set threshold value within a set duration, controlling the motor based on a second current instruction, 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 second current instruction represents that the direct axis given current and the quadrature axis given current are zero.
The motor controller obtains the first rotating speed of the motor, judges whether the first rotating speed of the motor reaches a set threshold value in a set duration, characterizes the motor to run stably under the condition that the first rotating speed of the motor reaches the set threshold value in the set duration, modifies a current instruction of the motor at the moment, sets the direct-axis given current and the quadrature-axis given current of the motor to be zero, generates a second current instruction based on the modified direct-axis given current and the quadrature-axis given current, and controls the motor based on the second current instruction. Wherein the first rotational speed of the motor may be detected by the sensor. The second current command characterizes that both the direct axis given current and the quadrature axis given current of the motor are zero. The threshold value may be set, for example, at 2000 revolutions per minute, although other values may be set.
When the zero position of the motor is accurate, under the control mode that the given direct-axis current and the given quadrature-axis current of the motor are both zero, the direct-axis voltage u d = 0 of the motor can be determined according to the voltage calculation formula of the motor, the quadrature-axis voltage is a fixed value,Ω represents the electrical angular velocity of the motor,The rotor flux linkage of the motor is characterized. Wherein, u d=Rs×id-ω×Lq×iq is a single-component,R s represents the phase resistance of the motor, i d represents the direct-axis current of the motor, L q represents the quadrature-axis inductance of the motor, i q represents the quadrature-axis current of the motor, i q represents the quadrature-axis current of the motor, and L d represents the direct-axis inductance of the motor.
However, when the zero position of the motor is inaccurate, for example, as shown in fig. 2, the zero position deviation angle θ exists in the zero position of the motor, and the motor controller controls the motor according to the second current command i d=iq =0, the direct axis voltage u d' of the motor is no longer zero, and the quadrature axis voltage of the motor is no longer a fixed valueFor example, u d'=sinθ×uq,uq'=cosθ×uq, in which the ratio of the direct-axis voltage to the quadrature-axis voltage of the motor is tan theta, thus zero offset angle
Under the control mode that the direct-axis given current and the quadrature-axis given current of the motor are both 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 by the at least one direct-axis voltage, a first quadrature-axis voltage is determined by the at least one quadrature-axis voltage, and an arctangent value 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 factory zero angle of the motor is stored in the motor controller, the zero position of the motor can be obtained by the determined zero position deviation angle and the factory zero angle under the condition that the zero position deviation angle of the motor is determined.
To reduce measurement errors and improve accuracy of the determined first zero offset angle, in some embodiments, after the controlling the motor based on the second current command, the method further comprises:
recording a plurality of direct axis voltages and a plurality of quadrature axis voltages, wherein,
The first direct-axis voltage represents the average value of a plurality of direct-axis voltages;
the first quadrature voltage characterizes a mean value of the plurality of quadrature voltages.
Here, in the process of executing step 102, the motor controller records a plurality of direct-axis voltages and a plurality of quadrature-axis voltages, determines the average value of the recorded plurality of direct-axis voltages as the first direct-axis voltage, and determines the average value of the recorded plurality of quadrature-axis voltages as the first quadrature-axis voltage in the case where the first rotational speed of the motor reaches the set threshold value within the set period of time and the motor is controlled based on the second current command. Therefore, the first zero offset angle can be determined based on the direct axis voltage average value and the quadrature axis voltage average value, errors of the determined first zero offset angle are reduced, and the measurement accuracy of the zero position of the motor is improved.
It should be noted that, in the case that the first zero offset angle is outside the set error range, the motor controller may adjust a given current that is not zero of the direct-axis given current and the quadrature-axis given current, and generate a new first current command to redetermine the first zero offset angle of the motor according to steps 101 to 102.
In the process of controlling the motor by the motor controller based on the first current command, the motor may not rotate, or the first rotation speed of the motor may not reach the set threshold, and at this time, the control flow is ended.
In the embodiment of the application, a motor is controlled based on a first current instruction, the motor is controlled based on a second current instruction under the condition that the first rotation speed of the motor reaches a set threshold value within a set duration, and a first zero offset angle of the motor is determined based on a first direct-axis voltage and a first quadrature-axis voltage of the motor, wherein the first current instruction represents that a direct-axis given current is a first current, the quadrature-axis given current is a second current, 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. Therefore, the zero position of the motor can be detected through the motor controller without using test equipment, the test time can be saved, the test efficiency can be improved, and the zero position of the motor can be automatically detected under the condition that the motor is connected to a speed reducer or the motor is assembled completely. Under the condition that the first rotation speed of the motor reaches a set threshold value, the motor is characterized to run to a stable state, and a first zero offset angle of the motor is determined based on the first direct voltage and the first quadrature voltage under the stable state, so that the accuracy of the determined zero offset angle can be improved, and the accuracy of the zero position of the motor is further improved.
In some embodiments, the method further comprises steps 103 to 105:
and 103, controlling the motor based on a third current instruction, wherein the third current instruction represents that the direct-axis given current is the second current, and the quadrature-axis given current is the first current.
Here, in a case of detecting a zero position of the motor, the motor controller controls the motor based on the third current command. In the case where the first current command characterizes the first current as zero and the second current is not zero, the third current command characterizes the first current as non-zero, the second current as zero and the first current in the third current command is equal to the second current in the first current command.
In the case where the first current command characterizes the second current as zero and the first current is not zero, the third current command characterizes the second current as not zero, the first current is zero and the second current in the third current command is equal to the first current in the first current command.
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. That is, the motor controller can calibrate the motor zero by performing steps 101 through 105. The first current command characterizes i d=K,iq =0 and the third current command characterizes i d=0,iq =k. K characterizes the given current. Or the first current command characterizes i d=0,iq = K and the third current command characterizes i d=K,iq = 0. Therefore, through the first current command and the third current command, the rotating speed of the motor can reach a set threshold value within a set duration, and the zero offset angle is determined based on the direct axis voltage and the quadrature axis voltage of the motor.
Considering that in practical application, since the zero position of the motor is unknown, in the process that the motor controller controls the motor based on the first current command or the third current command, the rotation speed of the motor may not reach the set threshold, 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:
determining a current which is not zero in the first current and the second current based on the rated current and the set current of the motor, 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 characterizes a minimum current required by the motor to overcome resistance to reach the set threshold rotational speed within the set duration.
Here, the motor controller may determine any one of the currents between the rated current and the set current of the motor as a quadrature axis given current or a direct axis given current of the motor, and obtain a non-zero current of the first current and the second current, so as to generate the first current command or the third current command according to the determined current. Therefore, the probability that the rotating speed of the motor can reach the set threshold value within the set duration can be ensured under the condition that the motor can rotate.
In some embodiments, the controlling the motor based on the third current command includes:
And controlling the motor based on the third current instruction under the condition that the first rotating speed of the motor does not reach the set threshold value or the first zero deviation angle of the motor is determined within the set duration.
Here, considering that the motor may not rotate during the motor controller controlling the motor based on the first current command or the first rotation speed of the motor may not reach the set threshold value within the set period of time, the motor controller cannot determine the zero offset angle of the motor, at this time, the motor controller controls the motor based on the third current command so as to determine the second zero offset angle of the motor by executing steps 104 to 105, thereby calibrating the zero position of the motor according to the second zero offset angle. Therefore, through the first current instruction and the third current instruction, the rotating speed of the motor can be ensured to reach a set threshold value within a set duration, so that a zero offset angle can be determined based on the direct axis voltage and the quadrature axis voltage of the motor, and the success rate of detecting the zero position of the motor is improved. In addition, in the case where the first rotational speed of the motor reaches the set threshold, the motor controller may not execute steps 103 to 105.
The motor controller may further execute steps 103 to 105 after executing steps 101 to 102, so as to determine a final zero offset angle based on the first zero offset angle and the second zero offset angle, and further calibrate the zero position of the motor according to the final zero offset angle, so that measurement errors can be reduced, and the final zero offset angle can be determined more accurately.
And 104, controlling the motor based on the second current instruction 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 under the condition that the second rotating speed of the motor reaches the set threshold value.
The motor controller obtains a second rotating speed of the motor, and under the condition that the second rotating speed of the motor reaches a set threshold value, the motor is characterized to be stable in operation, at the moment, a current command is modified, the direct-axis given current and the quadrature-axis given current of the motor are set to be zero, a second current command is generated based on the modified direct-axis given current and the quadrature-axis given current, and the motor is controlled based on the second current command.
And under the control mode that the direct axis given current and the quadrature axis given current of the motor are both 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 by the at least one direct axis voltage, a second quadrature axis voltage is determined by the at least one quadrature axis voltage, and an arctangent value of the ratio of the second direct axis voltage to the second quadrature axis voltage is calculated to obtain a second zero offset angle of the motor.
When the motor is tested by the first current command and the third current command, the rotation speed of the motor can reach the set threshold value in at least one test. In an application scenario, when the motor controller performs step 101 to perform the first test on the motor, it is uncertain whether the first rotation speed of the motor can reach the set threshold value within the set duration, so it is required to determine whether the first rotation speed of the motor reaches the set threshold value within the set duration during the first test, and when the first rotation speed of the motor does not reach the set threshold value within the set duration, step 103 is performed to perform the second test on the motor, where the second rotation speed of the motor is determined to reach the set threshold value in step 104, so it is not required to determine whether the second rotation speed of the motor reaches the set threshold value within the set duration in step 104.
To improve the accuracy of the determined first zero offset angle, in some embodiments, after the controlling the motor based on the second current command, the method further comprises:
recording a plurality of direct axis voltages and a plurality of quadrature axis voltages, wherein,
The second direct axis voltage represents the average value of a plurality of direct axis voltages;
the second quadrature axis voltage characterizes a mean value of the plurality of quadrature axis voltages.
Here, in the process of executing step 104, when the second rotational speed of the motor reaches the set threshold value and the motor is controlled based on the second current command, the motor controller records a plurality of direct-axis voltages and a plurality of quadrature-axis voltages, determines the average value of the recorded plurality of direct-axis voltages as the second direct-axis voltage, and determines the average value of the recorded plurality of quadrature-axis voltages as the second quadrature-axis voltage. Therefore, the second zero offset angle can be determined based on the direct axis voltage average value and the quadrature axis voltage average value, errors of the determined second zero offset angle are reduced, and zero accuracy of the motor is improved.
And 105, determining a final zero offset angle based on the first zero offset angle and the second zero offset angle.
Here, the motor controller determines a final zero offset angle based on the determined first zero offset angle and the determined second zero offset angle, with the first zero offset angle and the second zero offset angle being determined. The motor controller can determine the determined first zero offset angle or the determined second zero offset angle as a final zero offset angle, and can also determine the average value between the first zero offset angle and the second zero offset angle as the final zero offset angle.
In order to improve the accuracy of the final zero offset angle determined, in some embodiments, by considering that the zero offset angle calculated in actual use may be outside the set error range, the final zero offset angle is determined to include one of:
determining the first zero offset angle as a final zero offset angle when the first zero offset angle is within a set error range and the second zero offset angle is outside the set error range;
determining the second zero offset angle as a final zero offset angle when the first zero offset angle is outside the set error range and the second zero offset angle is within the set error range;
And under the condition that the first zero offset angle and the second zero offset angle are both positioned in a set error range, determining the average value of the first zero offset angle and the second zero offset angle as a final zero offset angle.
The motor controller compares the first zero deviation angle with the set error range to obtain a first comparison result, and compares the second zero deviation angle with the set error range to obtain a second comparison result.
And under the condition that the first comparison result indicates that the first zero offset angle is located in the set error range and the second comparison result indicates that the second zero offset angle is located outside the set error range, the second zero offset angle is invalid, and the first zero offset angle is determined to be the final zero offset angle.
And under the condition that the first comparison result indicates that the first zero offset angle is out of the set error range and the second comparison result indicates that the second zero offset angle is in the set error range, the first zero offset angle is invalid, and the second zero offset angle is determined to be the final zero offset angle.
And under the condition that the first comparison result represents that the first zero offset angle is located in the set error range and the second comparison result represents that the second zero offset angle is located in the set error range, representing that the first zero offset angle and the second zero offset angle are both effective, and determining the average value between the first zero offset angle and the second zero offset angle as the final zero offset angle.
In this embodiment, the motor controller determines the final zero offset angle based on the first zero offset angle and the second zero offset angle, and calibrates the motor zero based on the final zero offset angle, so as to reduce measurement errors, improve the accuracy of the finally determined zero offset angle, and further improve the accuracy of the calibrated motor zero.
Fig. 3 is a schematic implementation flow chart of a motor zero detection method provided by an application embodiment of the present application, where, as shown in fig. 3, the motor zero detection method includes:
Step 301, controlling a motor based on a first current instruction, wherein the first current instruction represents that a given direct-axis current is a first current, a given quadrature-axis current is a second current, and the first current or the second current is zero.
The steps 301 to 305 are the same as the steps 101 to 105, and the implementation process of the steps 301 to 305 is referred to the related descriptions of the steps 101 to 105, which are not repeated here.
Step 302, under the condition that the first rotation speed of the motor reaches a set threshold value within a set duration, controlling the motor based on a second current instruction, 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 second current instruction represents that the direct axis given current and the quadrature axis given current are zero.
And 303, controlling the motor based on a third current instruction, wherein the third current instruction represents that the given current of a straight shaft is the second current, and the given current of an intersecting shaft is the first current.
And 304, controlling the motor based on the second current instruction and determining a second zero offset angle of the motor based on a second direct axis voltage and a second quadrature axis voltage of the motor under the condition that the second rotating speed of the motor reaches the set threshold.
Step 305, determining a final zero offset angle based on the first zero offset angle and the second zero offset angle.
Wherein, when the first zero offset angle is located in a set error range and the second zero offset angle is located outside the set error range, determining the first zero offset angle as a final zero offset angle;
determining the second zero offset angle as a final zero offset angle when the first zero offset angle is outside the set error range and the second zero offset angle is within the set error range;
And under the condition that the first zero offset angle and the second zero offset angle are both positioned in a set error range, determining the average value of the first zero offset angle and the second zero offset angle as a final zero offset angle.
In order to implement the method of the embodiment of the present application, the embodiment of the present application further provides a motor zero detection, as shown in fig. 4, where the motor zero detection includes:
A first control module 41 for controlling the motor based on the first current command;
A second control module 42, configured to control the motor based on a second current command and determine a first zero offset angle of the motor based on a first direct voltage and a first quadrature voltage corresponding to a stator of the motor when a first rotational speed of the motor reaches a set threshold within a set period of time, where,
The first current instruction characterizes that a straight-axis given current is a first current, an intersecting-axis given current is a second current, and the first current or the second current is zero;
the second current command characterizes that both the direct axis given current and the quadrature axis given current are zero.
In some embodiments, the motor zero detection further comprises:
the third control module is used for controlling the motor based on a third current instruction, wherein the third current instruction represents that the direct-axis given current is the second current, and the quadrature-axis given current is the first current;
The fourth control module is used for controlling the motor based on the second current instruction and determining a second zero offset angle of the motor based on a second direct axis voltage and a second quadrature axis voltage of the motor under the condition that the second rotating speed of the motor reaches the set threshold;
and the first determining module is used for determining a final zero offset angle based on the first zero offset angle and the second zero offset angle.
In some embodiments, the third control module is specifically configured to:
And controlling the motor based on the third current instruction under the condition that the first rotating speed of the motor does not reach the set threshold value or the first zero deviation angle of the motor is determined within the set duration.
In some embodiments, the first determining module is specifically configured to:
determining the first zero offset angle as a final zero offset angle when the first zero offset angle is within a set error range and the second zero offset angle is outside the set error range;
determining the second zero offset angle as a final zero offset angle when the first zero offset angle is outside the set error range and the second zero offset angle is within the set error range;
And under the condition that the first zero offset angle and the second zero offset angle are both positioned in a set error range, determining the average value of the first zero offset angle and the second zero offset angle as a final zero offset angle.
In some embodiments, the electrode null detection device further comprises:
a second determining module, configured to determine a current that is not zero in the first current and the second current based on the rated current and the set current of the motor,
The determined current is greater than or equal to the set current and less than or equal to the rated current;
the set current characterizes a minimum current required by the motor to overcome resistance to reach the set threshold rotational speed within a set duration.
In some embodiments, the first control module 41 is specifically configured to:
And under the condition of starting an operating mode of calibrating the zero position of the motor, controlling the motor based on the first current instruction.
In some embodiments, the electrode null detection device further comprises:
A recording module for recording a plurality of direct axis voltages and a plurality of quadrature axis voltages, wherein,
The first direct axis voltage or the second direct axis voltage represents the average value of a plurality of direct axis voltages;
The first quadrature axis voltage or the second quadrature axis voltage represents a mean value of a plurality of quadrature axis voltages.
In practical applications, the modules included in the motor zero detection device may be implemented by a Processor in the motor zero detection device, such as a central processing unit (CPU, central Processing Unit), a digital signal Processor (DSP, digital Signal Processor), a micro control unit (MCU, microcontroller Unit), or a Programmable gate array (FPGA, field-Programmable GATE ARRAY), or the like.
It should be noted that, when the motor zero detection device provided in the above embodiment performs motor zero detection, only the division of the above program modules is used as an example, in practical application, the above processing allocation may be performed by different program modules according to needs, that is, the internal structure of the device is divided into different program modules to complete all or part of the above processing. In addition, the motor zero detection device and the motor zero detection method provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments, which are not repeated herein.
Based on the hardware implementation of the program modules, and in order to implement the method of the embodiment of the application, the embodiment of the application also provides a motor controller. Fig. 5 is a schematic diagram of a hardware composition structure of a motor controller according to an embodiment of the present application, and as shown in fig. 5, the motor controller 5 includes:
a communication interface 51 capable of information interaction with other devices such as a network device and the like;
and the processor 52 is connected with the communication interface 51 to realize information interaction with other devices, and is used for executing the motor zero detection method provided by one or more of the technical schemes when running the computer program. And the computer program is stored on the memory 53.
Of course, in practice, the various components in the motor controller 5 are coupled together by a bus system 54. It is understood that the bus system 54 is used to enable connected communications between these components. The bus system 54 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration the various buses are labeled as bus system 54 in fig. 5.
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 for operation on the motor controller 5.
It will be appreciated that the memory 53 may be either volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The non-volatile Memory may be, among other things, a Read Only Memory (ROM), a programmable Read Only Memory (PROM, programmable Read-Only Memory), erasable programmable Read-Only Memory (EPROM, erasable Programmable Read-Only Memory), electrically erasable programmable Read-Only Memory (EEPROM, ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory), Magnetic random access Memory (FRAM, ferromagnetic random access Memory), flash Memory (Flash Memory), magnetic surface Memory, optical disk, or compact disk-Only Memory (CD-ROM, compact Disc Read-Only Memory), which may be disk Memory or tape Memory. the volatile memory may be random access memory (RAM, random Access Memory) which acts as external cache memory. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM, static Random Access Memory), synchronous static random access memory (SSRAM, synchronous Static Random Access Memory), dynamic random access memory (DRAM, dynamic Random Access Memory), synchronous dynamic random access memory (SDRAM, synchronous Dynamic Random Access Memory), and, Double data rate synchronous dynamic random access memory (DDRSDRAM, double Data Rate Synchronous Dynamic Random Access Memory), enhanced synchronous dynamic random access memory (ESDRAM, enhanced Synchronous Dynamic Random Access Memory), synchronous link dynamic random access memory (SLDRAM, sync Link Dynamic Random Access Memory), Direct memory bus random access memory (DRRAM, direct Rambus Random Access Memory). The memory 53 described in embodiments of the present application is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the above embodiment of the present application may be applied to the processor 52 or implemented by the processor 52. The processor 52 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware in processor 52 or by instructions in the form of software. The processor 52 may be a general purpose processor, DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. Processor 52 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiment of the application can be directly embodied in the hardware of the decoding processor or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located in a storage medium in the memory 53 and the processor 52 reads the program in the memory 53 to perform the steps of the method described above in connection with its hardware.
Optionally, when the processor 52 executes the program, a corresponding flow implemented by the terminal in each method of the embodiment of the present application is implemented, which is not described herein for brevity.
In an exemplary embodiment, the present application also provides a storage medium, i.e. a computer storage medium, in particular a computer readable storage medium, for example comprising a first memory 53 storing a computer program executable by the processor 52 of the terminal for performing the steps of the method described above. The computer readable storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is merely a logical function division, and there may be additional divisions of actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described as separate components may or may not be physically separate, and components displayed as units may or may not be physical units, may be located in one place, may be distributed on a plurality of network units, and may select some or all of the units according to actual needs to achieve the purpose of the embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing module, or each unit may be separately used as a unit, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of hardware plus a form of software functional unit.
It will be appreciated by those of ordinary skill in the art that implementing all or part of the steps of the above method embodiments may be implemented by hardware associated with program instructions, where the above program may be stored in a computer readable storage medium, where the program when executed performs the steps comprising the above method embodiments, where the above storage medium includes various media that may store program code, such as a removable storage device, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic or optical disk, etc.
The technical schemes described in the embodiments of the present application may be arbitrarily combined without any collision.
It should be noted that, the term "and/or" in the embodiment of the present application is merely an association relationship describing the association object, and indicates that three relationships may exist, for example, a and/or B, and may indicate that a exists alone, and a and B exist together, and B exists alone. In addition, the term "at least one" herein means any combination of any one or more of at least two of the plurality, for example, including at least one of A, B, C, may mean including any one or more elements selected from the group consisting of A, B and C.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (8)
1. A method of zero detection of an electric machine, comprising:
controlling the motor based on the first current command;
Controlling the motor based on a second current instruction under the condition that the first rotation speed of the motor reaches a set threshold value within a set duration, and determining a first zero offset angle of the motor based on a first direct-axis voltage and a first quadrature-axis voltage of the motor, wherein the first current instruction represents that a 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 represents that the direct-axis given current and the quadrature-axis given current are both zero;
controlling the motor based on a third current instruction, wherein the third current instruction characterizes that a direct-axis given current is the second current, and a quadrature-axis given current is the first current;
controlling the motor based on the second current instruction under the condition that the second rotating speed of the motor reaches the set threshold value, and determining a second zero offset angle of the motor based on a second direct axis voltage and a second quadrature axis voltage of the motor;
Determining a final zero offset angle based on the first zero offset angle and the second zero offset angle;
determining a zero position of the motor based on the final zero position deviation angle and the factory zero position angle;
wherein the determining a final zero offset angle based on the first zero offset angle and the second zero offset angle comprises:
determining the first zero offset angle as a final zero offset angle when the first zero offset angle is within a set error range and the second zero offset angle is outside the set error range;
determining the second zero offset angle as a final zero offset angle when the first zero offset angle is outside the set error range and the second zero offset angle is within the set error range;
And under the condition that the first zero offset angle and the second zero offset angle are both positioned in a set error range, determining the average value of the first zero offset angle and the second zero offset angle as a final zero offset angle.
2. The method of claim 1, wherein the controlling the motor based on the third current command comprises:
And controlling the motor based on the third current instruction under the condition that the first rotating speed of the motor does not reach the set threshold value or the first zero deviation angle of the motor is determined within the set duration.
3. The method according to claim 1, wherein the method further comprises:
determining a current which is not zero in the first current and the second current based on the rated current and the set current of the motor, 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 characterizes a minimum current required by the motor to overcome resistance to reach the set threshold rotational speed within the set duration.
4. The method of claim 1, wherein controlling the motor based on the first current command comprises:
And under the condition of starting an operating mode of calibrating the zero position of the motor, controlling the motor based on the first current instruction.
5. The method of claim 1, wherein after the controlling the motor based on the second current command, the method further comprises:
recording a plurality of direct axis voltages and a plurality of quadrature axis voltages, wherein,
The first direct axis voltage or the second direct axis voltage represents the average value of a plurality of direct axis voltages;
The first quadrature axis voltage or the second quadrature axis voltage represents a mean value of a plurality of quadrature axis voltages.
6. A motor zero detection device, comprising:
a first control module for controlling the motor based on the first current command;
A second control module, configured to control the motor based on a second current instruction and determine a first zero offset angle of the motor based on a first direct voltage and a first quadrature voltage corresponding to a stator of the motor when a first rotational speed of the motor reaches a set threshold within a set duration,
The first current instruction characterizes that a straight-axis given current is a first current, an intersecting-axis given current is a 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;
The motor zero detection device further comprises:
the third control module is used for controlling the motor based on a third current instruction, wherein the third current instruction represents that the direct-axis given current is the second current, and the quadrature-axis given current is the first current;
The fourth control module is used for controlling the motor based on the second current instruction and determining a second zero offset angle of the motor based on a second direct axis voltage and a second quadrature axis voltage of the motor under the condition that the second rotating speed of the motor reaches the set threshold;
The first determining module is used for determining a final zero offset angle based on the first zero offset angle and the second zero offset angle;
The first determining module is used for determining the zero position of the motor 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 offset angle as a final zero offset angle when the first zero offset angle is located in a set error range and the second zero offset angle is located outside the set error range;
determining the second zero offset angle as a final zero offset angle when the first zero offset angle is outside the set error range and the second zero offset angle is within the set error range;
And under the condition that the first zero offset angle and the second zero offset angle are both positioned in a set error range, determining the average value of the first zero offset angle and the second zero offset angle as a final zero offset angle.
7. A motor controller comprising a processor and a memory for storing a computer program capable of running on the processor,
Wherein the processor is adapted to perform the steps of the method of any of claims 1 to 5 when the computer program is run.
8. A storage medium having stored thereon a computer program, which when executed by a processor performs the steps of the method according to any of claims 1 to 5.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111617104.3A CN114487813B (en) | 2021-12-27 | 2021-12-27 | Motor zero position detection method, device, motor controller and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111617104.3A CN114487813B (en) | 2021-12-27 | 2021-12-27 | Motor zero position detection method, device, motor controller and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN114487813A CN114487813A (en) | 2022-05-13 |
| CN114487813B true CN114487813B (en) | 2025-09-30 |
Family
ID=81496521
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111617104.3A Active CN114487813B (en) | 2021-12-27 | 2021-12-27 | Motor zero position detection method, device, motor controller and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114487813B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115441806B (en) * | 2022-09-20 | 2024-08-23 | 浙江吉利控股集团有限公司 | Vehicle motor calibration method and device, vehicle controller and storage medium |
| CN119853527B (en) * | 2024-12-04 | 2025-11-11 | 中联重科股份有限公司 | Method and device for calibrating zero position of motor, storage medium and motor |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106160594A (en) * | 2015-04-27 | 2016-11-23 | 比亚迪股份有限公司 | Method and system for permagnetic synchronous motor zero measurement |
| CN110784132A (en) * | 2018-07-27 | 2020-02-11 | 比亚迪股份有限公司 | Determination method and device for motor zero position |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108173465A (en) * | 2018-02-06 | 2018-06-15 | 无锡华宸控制技术有限公司 | Misalignment angle detection method, device and electronic equipment |
| CN110855194B (en) * | 2018-07-27 | 2021-11-12 | 比亚迪股份有限公司 | Method and device for determining zero position of motor |
| CN109327174B (en) * | 2018-11-14 | 2022-03-29 | 苏州绿控传动科技股份有限公司 | Automatic zero position identification method for rotary transformer of permanent magnet synchronous motor |
| CN111865163B (en) * | 2019-04-29 | 2022-04-26 | 蜂巢传动系统(江苏)有限公司保定研发分公司 | Motor zero position detection device and method, vector control system and storage medium |
| CN113630053A (en) * | 2021-07-30 | 2021-11-09 | 珠海格力电器股份有限公司 | Method, device and equipment for detecting initial position angle of permanent magnet synchronous motor rotor |
-
2021
- 2021-12-27 CN CN202111617104.3A patent/CN114487813B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106160594A (en) * | 2015-04-27 | 2016-11-23 | 比亚迪股份有限公司 | Method and system for permagnetic synchronous motor zero measurement |
| CN110784132A (en) * | 2018-07-27 | 2020-02-11 | 比亚迪股份有限公司 | Determination method and device for motor zero position |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114487813A (en) | 2022-05-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11356044B2 (en) | Method for detecting motor initial phase and phase sequence and system for controlling permanent-magnet synchronous motor | |
| KR102446699B1 (en) | Method for sensor-free control of a PMSM motor | |
| CN109655083B (en) | Magnetic encoder, calibration method and calibration device, motor and unmanned aerial vehicle | |
| CN109217758B (en) | Online identification method for rotary transformer zero point, motor controller and storage medium | |
| CN114487813B (en) | Motor zero position detection method, device, motor controller and storage medium | |
| CN114499290B (en) | Position deviation calibration method, motor driving method, system and device | |
| CN109870177A (en) | Magnetic coder and its calibration method and calibrating installation, motor and unmanned vehicle | |
| CN113063345B (en) | Motor zero position angle calibration method and device and computer storage medium | |
| CN111308339A (en) | Servo motor testing method, device and equipment and computer storage medium | |
| CN111082725A (en) | Magnetic rotary encoder angle compensation method, compensation system and motor | |
| CN116647156A (en) | Automatic adjustment method, system and storage medium for zero potential angle of motor | |
| CN109004875A (en) | Permanent-magnet synchronous motor rotor position sensing device zero degree calculation method and scaling method | |
| CN111049463B (en) | Method for motor to exit three-phase active short-circuit mode and control device | |
| CN114172414B (en) | Method and device for determining initial electrical angle of servo motor and readable storage medium | |
| CN115580199A (en) | Resolver zero calibration method, device, electronic equipment and storage medium | |
| KR102359677B1 (en) | Rotor initial angle estimation device and method | |
| CN118117918A (en) | Zero position identification method suitable for motor magnetic encoder of electric power-assisted vehicle | |
| US20190238078A1 (en) | Driving permanent magnet motor based on neutral point voltage | |
| CN113131818A (en) | Hall sensor installation error identification method and device and motor control system | |
| CN113328673A (en) | Method and device for determining position of motor rotor, motor and storage medium | |
| CN115085621A (en) | Method and device for determining initial angle of permanent magnet synchronous motor rotor and motor | |
| CN117879402B (en) | Method, device, electronic device and storage medium for determining motor zero angle | |
| CN120750247B (en) | Method, apparatus and readable storage medium for zero-position calibration of electrical angle of three-phase brushless motor under finite angle constraint | |
| CN115963865B (en) | A system and method for calibrating the magnetic pole position of an electric motor | |
| CN111313772A (en) | Method for determining the rotational position of a rotor in a permanent magnet synchronous machine |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |