CN114487813A - Motor zero position detection method and device, motor controller and storage medium - Google Patents

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

Info

Publication number
CN114487813A
CN114487813A CN202111617104.3A CN202111617104A CN114487813A CN 114487813 A CN114487813 A CN 114487813A CN 202111617104 A CN202111617104 A CN 202111617104A CN 114487813 A CN114487813 A CN 114487813A
Authority
CN
China
Prior art keywords
current
motor
zero
offset angle
axis
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.)
Pending
Application number
CN202111617104.3A
Other languages
Chinese (zh)
Inventor
董晓光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Midea Group Co Ltd
Guangdong Midea White Goods Technology Innovation Center Co Ltd
Midea Group Shanghai Co Ltd
Original Assignee
Midea Group Co Ltd
Guangdong Midea White Goods Technology Innovation Center Co Ltd
Midea Group Shanghai Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Midea Group Co Ltd, Guangdong Midea White Goods Technology Innovation Center Co Ltd, Midea Group Shanghai Co Ltd filed Critical Midea Group Co Ltd
Priority to CN202111617104.3A priority Critical patent/CN114487813A/en
Publication of CN114487813A publication Critical patent/CN114487813A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/34Testing dynamo-electric machines
    • G01R31/343Testing dynamo-electric machines in operation
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • G01R19/175Indicating the instants of passage of current or voltage through a given value, e.g. passage through zero
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P21/00Arrangements or methods for the control of electric machines by vector control, e.g. by control of field orientation
    • H02P21/14Estimation or adaptation of machine parameters, e.g. flux, current or voltage
    • H02P21/18Estimation of position or speed
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P6/00Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
    • H02P6/14Electronic commutators
    • H02P6/16Circuit arrangements for detecting position
    • H02P6/18Circuit arrangements for detecting position without separate position detecting elements
    • H02P6/182Circuit 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 position detection method, a device, a motor controller and a storage medium, wherein the motor zero position detection method comprises the following steps: controlling the motor based on the first current command; under the condition that the first rotating speed of the motor reaches a set threshold value within a set time length, 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; 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.

Description

Motor zero position detection method and device, motor controller and storage medium
Technical Field
The present disclosure relates to the field of electronic power technologies, and in particular, to a method and an apparatus for detecting a zero position of a motor, 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 influenced. In the related art, the method for detecting the zero position of the motor has the problem of low testing efficiency.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and an apparatus for detecting a zero position of a motor, a motor controller, and a storage medium.
In order to achieve the purpose, the technical scheme of the application is realized as follows:
the embodiment of the application provides a motor zero position detection method, which comprises the following steps:
controlling the motor based on the first current command;
under the condition that the first rotating speed of the motor reaches a set threshold value within a set time length, 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 content of the first and second substances,
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.
In the above scheme, the method further comprises:
controlling the motor based on a third current command; wherein the third current command represents that the direct-axis given current is the second current, and the quadrature-axis given current is the first current;
under the condition that a second rotating speed of the motor reaches the set threshold value, 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;
determining a final null-offset angle based on the first null-offset angle and the second null-offset angle.
In the foregoing aspect, the controlling the motor based on the third current command includes:
and under the condition that the first rotating speed of the motor does not reach the set threshold value or the first zero offset angle of the motor is determined in the set time length, controlling the motor based on the third current instruction.
In the above scheme, the determining the final null deviation angle includes one of:
determining the first null-offset angle as a final null-offset angle if the first null-offset angle is within a set error range and the second null-offset angle is outside the set error range;
determining the second null-offset angle as a final null-offset angle if the first null-offset angle is outside the set error range and the second null-offset angle is within the set error range;
and under the condition that the first zero deviation angle and the second zero deviation angle are both within a set error range, determining the average value of the first zero deviation angle and the second zero deviation angle as a final zero deviation 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 content of the first and second substances,
the determined current is greater than or equal to the set current and less than or equal to the rated current;
the set current is indicative of a minimum current required by the motor to overcome a resistance to the set threshold speed for the set length of time.
In the foregoing aspect, the controlling a motor based on a first current command includes:
and under the condition of starting a working mode of calibrating the zero position of the motor, controlling the motor based on the first current instruction.
In the foregoing 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 content of the first and second substances,
the first direct axis voltage or the second direct axis voltage represents a mean value of a plurality of direct axis voltages;
the first quadrature axis voltage or the second quadrature axis voltage represents an average of a plurality of quadrature axis voltages.
The embodiment of the present application further provides a motor zero position detection device, including:
the first control module is used for controlling the motor based on the first current instruction;
the second control module is used for controlling the motor based on a second current instruction under the condition that the first rotating speed of the motor reaches a set threshold value within a set time length, and determining a first zero offset angle of the motor based on a first direct-axis voltage and a first quadrature-axis voltage corresponding to a stator of the motor; wherein the content of the first and second substances,
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.
The embodiment of the present application further provides a motor controller, including: a processor and a memory for storing a computer program operable on the processor, wherein the processor is configured to perform the steps of the above-described 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, and when the computer program is executed by a processor, the steps of the motor zero position detection method are realized.
In the embodiment of the application, the motor is controlled based on the first current instruction; under the condition that the first rotating speed of the motor reaches a set threshold value within a set time length, 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; 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. Therefore, the zero position of the motor can be detected through the motor controller without the help of testing equipment, the testing time can be saved, the testing efficiency is improved, and the zero position of the motor can be automatically detected under the condition that the motor is connected to the speed reducer or the motor finishes the assembly of the whole machine. Under the condition that the first rotating speed of the motor reaches a set threshold value, the motor is represented to be in a stable state, the first zero offset angle of the motor is determined based on the first direct-axis voltage and the first quadrature-axis voltage in the stable state, 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 view of an implementation flow of a motor zero position detection method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a null angle of a motor according to an embodiment of the present disclosure;
fig. 3 is a schematic flow chart illustrating an implementation of a motor zero position detection method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a motor zero position detection apparatus provided in an embodiment of the present application;
fig. 5 is a schematic diagram of a hardware 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 testing device (e.g., a test bench motor), a back emf zero crossing point is tested, and a zero position of the motor is determined based on the tested back emf zero crossing point. However, the method depends on test equipment, and before testing the tested motor, a test system consisting of the test equipment and the tested motor needs to be built, so that 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 a test device or with the motor already connected to the retarder.
Based on this, the embodiment of the application provides a motor zero position detection method, which controls a motor based on a first current instruction; under the condition that the first rotating speed of the motor reaches a set threshold value within a set time length, 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; 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. Therefore, the zero position of the motor can be detected through the motor controller without the help of testing equipment, the testing time can be saved, the testing efficiency is improved, and the zero position of the motor can be automatically detected under the condition that the motor is connected to the speed reducer or the motor finishes the assembly of the whole machine.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Fig. 1 is a schematic diagram of an implementation process of a motor zero position detection method provided in an embodiment of the present application, where an execution main body of the process is a motor controller. As shown in fig. 1, the motor zero detection method includes:
step 101: controlling the motor based on the first current command; 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.
In the scene of detecting the zero position of the motor, the motor controller determines the direct-axis given current and the quadrature-axis given current of the motor; and generating a first current command based on the determined direct-axis given current and quadrature-axis given current, and controlling the motor based on the first current command. The motor comprises a permanent magnet synchronous motor, and a motor controller is integrated in the motor.
Wherein, the direct axis of the motor is also called d axis, and the quadrature axis is also called q axis. 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 and the second current are not zero at the same time. That is, when the first current is zero, the second current is not zero; when the first current is not zero, 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 under the condition that a relevant instruction of a user is detected. The values of currents other than zero in the different first current commands may be the same or different.
In order to prevent the motor from moving to a position due to vibration of the motor when the motor is rotated, the motor needs to be fixed at a certain position before the motor is controlled based on the first current command.
In some embodiments, said controlling the electric machine based on the first current command comprises:
and under the condition of starting a working mode of calibrating the zero position of the motor, controlling the motor based on the first current instruction.
Here, the user starts the working 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 that the motor is currently in the working 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 flexibility of control can be improved.
Step 102: under the condition that the first rotating speed of the motor reaches a set threshold value within a set time length, 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; and the second current instruction represents that the direct-axis given current and the quadrature-axis given current are both zero.
The motor controller obtains a first rotating speed of the motor, judges whether the first rotating speed of the motor reaches a set threshold value within a set time length, represents that the motor operates stably under the condition that the first rotating speed of the motor reaches the set threshold value within the set time length, modifies a current instruction of the motor at the moment, and sets a direct axis given current and a quadrature axis given current of the motor to be zero; and generating a second current command based on the modified direct-axis given current and quadrature-axis given current, and controlling the motor based on the second current command. Wherein the first rotation speed of the motor can be detected by a sensor. The second current instruction represents that the direct-axis given current and the quadrature-axis given current of the motor are both zero. Illustratively, the set threshold may be 2000 rpm, although other values may be set.
When the zero position of the motor is accurate, under the control mode that the direct-axis given current and the quadrature-axis given current of the motor are both zero, the direct-axis voltage u of the motor can be determined according to a voltage calculation formula of the motordThe quadrature axis voltage is a fixed value, 0,
Figure BDA0003436614070000061
ω represents the electrical angular velocity of the motor,
Figure BDA0003436614070000062
characterizing the rotor flux linkage of the machine. Wherein u isd=Rs×id-ω×Lq×iq
Figure BDA0003436614070000065
RsCharacterizing the phase resistance, i, of the machinedCharacterizing the direct-axis current, L, of the machineqCharacterization of quadrature inductance of the machine, iqCharacterizing quadrature axis current of the motor; i.e. iqCharacterizing quadrature-axis current, L, of the motordThe direct-axis inductance of the motor is characterized.
However, when the motor zero position is inaccurate, for example, as shown in fig. 2, the motor zero position has a zero offset angle θ, and the motor controller responds to the second current command id=iqWhen the motor is controlled as 0, the direct axis voltage u of the motord' is no longer zero, and the quadrature axis voltage of the motor is no longer a fixed value
Figure BDA0003436614070000063
E.g. ud'=sinθ×uq,uq'=cosθ×uq(ii) a At this time, the ratio of the direct-axis voltage to the quadrature-axis voltage of the motorTan θ, and therefore, the null angle
Figure BDA0003436614070000064
Under a control mode that the direct-axis given current and the quadrature-axis given current of the motor are both zero, reading and recording at least one direct-axis voltage and at least one quadrature-axis voltage of the motor, determining a first direct-axis voltage by the at least one direct-axis voltage, determining a first quadrature-axis voltage by the at least one quadrature-axis voltage, and calculating an arctangent value of a ratio of the first direct-axis voltage to the first quadrature-axis voltage to obtain a first zero-position deviation angle of the motor. Because the factory zero position 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 position angle under the condition of determining the zero position deviation angle of the motor.
To reduce measurement error and improve the accuracy of the determined first null-offset angle, in some embodiments, after said controlling the electric machine 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 content of the first and second substances,
the first direct-axis voltage represents an average value of a plurality of direct-axis voltages;
the first quadrature axis voltage represents an average value of a plurality of quadrature axis voltages.
Here, in the case where the motor controller reaches the set threshold for the first rotation speed of the motor for the set period of time and controls the motor based on the second current command in the process of executing step 102, the plurality of direct-axis voltages and the plurality of quadrature-axis voltages are recorded, an average value of the recorded plurality of direct-axis voltages is determined as the first direct-axis voltage, and an average value of the recorded plurality of quadrature-axis voltages is determined as the first quadrature-axis voltage. Therefore, the first zero offset angle can be determined based on the direct-axis voltage mean value and the quadrature-axis voltage mean value, the error of the determined first zero offset angle is reduced, and the measurement precision of the zero position of the motor is improved.
It should be noted that, in the case that the first null angle is outside the set error range, the motor controller may adjust a non-zero given current of the direct-axis given current and the quadrature-axis given current, and generate a new first current command to re-determine the first null angle of the motor according to steps 101 to 102.
It should be noted that, 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, the motor is controlled based on the first current command; under the condition that the first rotating speed of the motor reaches a set threshold value within a set time length, 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; 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. Therefore, the zero position of the motor can be detected through the motor controller without the help of testing equipment, the testing time can be saved, the testing efficiency is improved, and the zero position of the motor can be automatically detected under the condition that the motor is connected to the speed reducer or the motor finishes the assembly of the whole machine. Under the condition that the first rotating speed of the motor reaches a set threshold value, the motor is represented to be in a stable state, the first zero offset angle of the motor is determined based on the first direct-axis voltage and the first quadrature-axis voltage in the stable state, 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:
step 103: controlling the motor based on a third current command; and 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, the motor controller controls the motor based on the third current command in a scenario in which a zero position of the motor is detected. And under the condition that the first current command represents that the first current is zero and the second current is not zero, the third current command represents that the first current is not zero and 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.
And under the condition that the first current instruction represents that the second current is zero and the first current is not zero, the third current instruction represents 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.
It should be noted that, after executing steps 101 to 102, the motor controller may execute steps 103 to 104; step 103 to step 104 may be performed before step 101 to step 102 are performed. That is, the motor controller may calibrate the motor zero by performing steps 101 to 105. Illustratively, the first current command characterizes id=K,iq0; third Current Command characterization id=0,iqK. K characterizes a given current. Alternatively, the first current command characterizes id=0,iqK; third Current Command characterization id=K,iq0. Therefore, the rotation speed of the motor can reach the set threshold value within the set time length through the first current instruction and the third current instruction, and therefore the zero offset angle is determined based on the direct-axis voltage and the quadrature-axis voltage of the motor.
In order to increase 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 content of the first and second substances,
the determined current is greater than or equal to the set current and less than or equal to the rated current;
the set current is indicative of a minimum current required by the motor to overcome the resistance to the set threshold speed for the set length of time.
Here, the motor controller may determine any one of currents between a rated current and a set current of the motor as a quadrature axis set current or a direct axis set current of the motor, obtain a current other than zero of the first current and the second current, and generate the first current command or the third current command based on the determined current. Therefore, the probability that the rotating speed of the motor can reach the set threshold within the set time length can be ensured under the condition that the motor can rotate.
In some embodiments, said controlling the electric machine based on the third current command comprises:
and under the condition that the first rotating speed of the motor does not reach the set threshold value or the first zero offset angle of the motor is determined in the set time length, controlling the motor based on the third current instruction.
Here, it is considered that, in the process of controlling the motor by the motor controller based on the first current instruction, the motor may not rotate, or the first rotation speed of the motor may not reach the set threshold value within the set time period, and the motor controller may not determine the zero offset 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 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, the rotating speed of the motor can reach the set threshold value within the set time through the first current instruction and the third current instruction, so that the 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. It should be noted that, in the case that the first rotation speed of the motor reaches the set threshold, the motor controller may not execute steps 103 to 105.
After the step 101 to the step 102 are executed, the motor controller may further execute the step 103 to the step 105, so as to determine a final null offset angle based on the first null offset angle and the second null offset angle, and then calibrate the motor null according to the final null offset angle, so that the measurement error may be reduced, and the final null offset angle may be determined more accurately.
Step 104: and under the condition that the second rotating speed of the motor reaches the set threshold value, 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.
The motor controller obtains a second rotating speed of the motor, the motor is characterized to operate stably under the condition that the second rotating speed of the motor reaches a set threshold value, at the moment, a current instruction is modified, and a direct-axis given current and a quadrature-axis given current of the motor are set to be zero; and generating a second current command based on the modified direct-axis given current and quadrature-axis given current, and controlling the motor based on the second current command.
Under a control mode that the direct-axis given current and the quadrature-axis given current of the motor are both zero, reading and recording at least one direct-axis voltage and at least one quadrature-axis voltage of the motor, determining a second direct-axis voltage according to the at least one direct-axis voltage, determining a second quadrature-axis voltage according to the at least one quadrature-axis voltage, and calculating an arctangent value of a ratio of the second direct-axis voltage to the second quadrature-axis voltage to obtain a second zero-position deviation angle of the motor.
It should be noted that, when the motor is tested through the first current command and the third current command, the rotation speed of the motor can reach the set threshold in at least one test. In an application scenario, when the motor controller executes step 101 to perform a first test on the motor, it is not determined whether the first rotation speed of the motor reaches a set threshold within a set time period, and therefore, it is necessary to determine whether the first rotation speed of the motor reaches the set threshold within the set time period during the first test, and when the first rotation speed of the motor does not reach the set threshold within the set time period, step 103 is executed to perform a second test on the motor, and at this time, the second rotation speed of the motor is determined to reach the set threshold in step 104, and therefore, it is not necessary to determine whether the second rotation speed of the motor reaches the set threshold within the set time period in step 104.
To improve the accuracy of the determined first null-offset angle, in some embodiments, after said controlling the electric machine 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 content of the first and second substances,
the second direct-axis voltage represents the average value of a plurality of direct-axis voltages;
the second quadrature axis voltage represents an average value of the plurality of quadrature axis voltages.
Here, in the case where the motor controller controls the motor based on the second current command while the second rotation speed of the motor reaches the set threshold in the process of executing step 104, the motor controller records a plurality of direct-axis voltages and a plurality of quadrature-axis voltages, determines an average value of the recorded plurality of direct-axis voltages as the second direct-axis voltage, and determines an 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 mean value and the quadrature-axis voltage mean value, the error of the determined second zero offset angle is reduced, and the zero position accuracy of the motor is improved.
Step 105: determining a final null-offset angle based on the first null-offset angle and the second null-offset angle.
Here, the motor controller determines a final null angle based on the determined first null angle and the determined second null angle in a case where the first null angle and the second null angle are determined. The motor controller can determine the determined first zero offset angle or the second zero offset angle as a final zero offset angle; the mean between the first null-deviation angle and the second null-deviation angle may also be determined as the final null-deviation angle.
In order to improve the accuracy of the determined final null offset angle, considering that the computed null offset angle may exceed the set error range in practical applications, in some embodiments, the determining the final null offset angle includes one of:
determining the first null-offset angle as a final null-offset angle if the first null-offset angle is within a set error range and the second null-offset angle is outside the set error range;
determining the second null-offset angle as a final null-offset angle if the first null-offset angle is outside the set error range and the second null-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 within 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.
Here, the motor controller compares the first null deviation angle with a set error range to obtain a first comparison result; and comparing the second zero offset angle with a set error range to obtain a second comparison result.
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 out of the set error range, the representation of the second zero offset angle is invalid, and the first zero offset angle is determined as the final zero offset angle.
And under the condition that the first comparison result represents that the first zero offset angle is out of the set error range and the second comparison result represents that the second zero offset angle is in the set error range, the representation of the first zero offset angle is invalid, and the second zero offset angle is determined as 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 a 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, so that the measurement error can be reduced, the accuracy of the finally determined zero-position deviation angle is improved, and the accuracy of the calibrated motor zero position is improved.
Fig. 3 is a schematic flow chart of an implementation of the motor zero position detection method according to an embodiment of the present application, and as shown in fig. 3, the motor zero position detection method includes:
step 301: controlling the motor based on the first current command; 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.
Steps 301 to 305 are the same as steps 101 to 105, and the implementation process of steps 301 to 305 refers to the related description of steps 101 to 105, which is not repeated herein.
Step 302: under the condition that the first rotating speed of the motor reaches a set threshold value within a set time length, 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; and the second current instruction represents that the direct-axis given current and the quadrature-axis given current are both zero.
Step 303: controlling the motor based on a third current command; and 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.
Step 304: and under the condition that the second rotating speed of the motor reaches the set threshold value, 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.
Step 305: determining a final null-offset angle based on the first null-offset angle and the second null-offset angle.
Wherein, when the first null-deviation angle is within a set error range and the second null-deviation angle is outside the set error range, determining the first null-deviation angle as a final null-deviation 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 within 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 according to the embodiment of the present application, an embodiment of the present application further provides a motor zero position detection, as shown in fig. 4, the motor zero position detection includes:
a first control module 41 for controlling the motor based on the first current command;
the second control module 42 is configured to control the motor based on a second current instruction when a first rotation speed of the motor reaches a set threshold within a set time period, and determine a first zero offset angle of the motor based on a first direct-axis voltage and a first quadrature-axis voltage corresponding to a stator of the motor; wherein the content of the first and second substances,
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.
In some embodiments, the motor zero detection further comprises:
a third control module for controlling the motor based on a third current command; wherein the third current command 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 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;
a first determining module configured to determine a final null-offset angle based on the first null-offset angle and the second null-offset angle.
In some embodiments, the third control module is specifically configured to:
and under the condition that the first rotating speed of the motor does not reach the set threshold value or the first zero offset angle of the motor is determined in the set time length, controlling the motor based on the third current instruction.
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 null-offset angle as a final null-offset angle if the first null-offset angle is outside the set error range and the second null-offset angle is within the set error range;
and under the condition that the first zero deviation angle and the second zero deviation angle are both within a set error range, determining the average value of the first zero deviation angle and the second zero deviation angle as a final zero deviation angle.
In some embodiments, the electrode null detection device further comprises:
the second determination module is used for 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 content of the first and second substances,
the determined current is greater than or equal to the set current and less than or equal to the rated current;
the set current is indicative of a minimum current required by the motor to overcome a resistance to reach a speed of the set threshold for a set length of time.
In some embodiments, the first control module 41 is specifically configured to:
and under the condition of starting a working 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:
the recording module is used for recording a plurality of direct-axis voltages and a plurality of quadrature-axis voltages; wherein the content of the first and second substances,
the first direct axis voltage or the second direct axis voltage represents a mean value of a plurality of direct axis voltages;
the first quadrature axis voltage or the second quadrature axis voltage represents an average of a plurality of quadrature axis voltages.
In practical applications, each module included in the motor zero position detection apparatus may be implemented by a Processor in the motor zero position detection apparatus, such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), a Micro Control Unit (MCU), or a Programmable Gate Array (FPGA).
It should be noted that: in the motor zero position detection apparatus provided in the above embodiment, when performing motor zero position detection, only the division of the program modules is used for illustration, and in practical applications, the processing distribution may be completed by different program modules according to needs, that is, the internal structure of the apparatus is divided into different program modules to complete all or part of the processing described above. In addition, the motor zero position detection device provided by the above embodiment and the motor zero position detection method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
Based on the hardware implementation of the program module, in order to implement the method of the embodiment of the present application, the embodiment of the present application further provides a motor controller. Fig. 5 is a schematic diagram of a hardware 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 network devices 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 position detection method provided by one or more of the above technical solutions when running a 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 will be appreciated that the bus system 54 is used to enable communications among the components. The bus system 54 includes a power bus, a control bus, and a status signal bus in addition to the data bus. For clarity of illustration, however, 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 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may 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 (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration 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), Enhanced Synchronous Dynamic Random Access Memory (Enhanced Synchronous Dynamic Random Access Memory), Synchronous linked Dynamic Random Access Memory (DRAM, Synchronous Link Dynamic Random Access Memory), Direct Memory (DRmb Random Access Memory). The memory 53 described in embodiments herein is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the above embodiments of the present application may be applied to the processor 52, or implemented by the processor 52. 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 circuits of hardware or instructions in the form of software in the processor 52. The processor 52 described above may be a general purpose processor, a 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 the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 53, and the processor 52 reads the program in the memory 53 and performs the steps of the aforementioned method in conjunction with its hardware.
Optionally, when the processor 52 executes the program, the corresponding process implemented by the terminal in each method of the embodiment of the present application is implemented, and for brevity, no further description is given here.
In an exemplary embodiment, the present application further 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, which is executable by a processor 52 of the terminal to perform the steps of the foregoing method. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing module, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit may be implemented in the form of hardware, or in the form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various media capable of storing program codes.
The technical means described in the embodiments of the present application may be arbitrarily combined without conflict.
It should be noted that the term "and/or" in the embodiment of the present application is only an association relationship describing an associated object, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any combination of any one or more of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by 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 (10)

1. A motor zero detection method is characterized by comprising the following steps:
controlling the motor based on the first current command;
under the condition that a first rotating speed of the motor reaches a set threshold value within a set time period, 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 content of the first and second substances,
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.
2. The method of claim 1, further comprising:
controlling the motor based on a third current command; 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;
under the condition that a second rotating speed of the motor reaches the set threshold value, 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;
determining a final null-offset angle based on the first null-offset angle and the second null-offset angle.
3. The method of claim 2, wherein the controlling the motor based on the third current command comprises:
and under the condition that the first rotating speed of the motor does not reach the set threshold value or the first zero offset angle of the motor is determined in the set time length, controlling the motor based on the third current instruction.
4. A method according to claim 2 or 3, wherein said determining a final null offset angle comprises one of:
determining the first null-offset angle as a final null-offset angle if the first null-offset angle is within a set error range and the second null-offset angle is outside the set error range;
determining the second null-offset angle as a final null-offset angle if the first null-offset angle is outside the set error range and the second null-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 within 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.
5. The method of claim 1, further comprising:
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 content of the first and second substances,
the determined current is greater than or equal to the set current and less than or equal to the rated current;
the set current is indicative of a minimum current required by the motor to overcome the resistance to the set threshold speed for the set length of time.
6. The method of claim 1, wherein controlling the electric machine based on the first current command comprises:
and under the condition of starting a working mode of calibrating the zero position of the motor, controlling the motor based on the first current instruction.
7. The method of claim 2, 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 content of the first and second substances,
the first direct axis voltage or the second direct axis voltage represents a mean value of a plurality of direct axis voltages;
the first quadrature axis voltage or the second quadrature axis voltage represents an average of a plurality of quadrature axis voltages.
8. A motor zero position detection device, characterized by comprising:
the first control module is used for controlling the motor based on the first current instruction;
the second control module is used for controlling the motor based on a second current instruction under the condition that the first rotating speed of the motor reaches a set threshold value within a set time length, and determining a first zero offset angle of the motor based on a first direct-axis voltage and a first quadrature-axis voltage corresponding to a stator of the motor; wherein the content of the first and second substances,
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.
9. 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 one of claims 1 to 7 when running the computer program.
10. A storage medium having a computer program stored thereon, the computer program, when being executed by a processor, realizing the steps of the method of any one of claims 1 to 7.
CN202111617104.3A 2021-12-27 2021-12-27 Motor zero position detection method and device, motor controller and storage medium Pending CN114487813A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111617104.3A CN114487813A (en) 2021-12-27 2021-12-27 Motor zero position detection method and device, motor controller and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111617104.3A CN114487813A (en) 2021-12-27 2021-12-27 Motor zero position detection method and device, motor controller and storage medium

Publications (1)

Publication Number Publication Date
CN114487813A true CN114487813A (en) 2022-05-13

Family

ID=81496521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111617104.3A Pending CN114487813A (en) 2021-12-27 2021-12-27 Motor zero position detection method and device, motor controller and storage medium

Country Status (1)

Country Link
CN (1) CN114487813A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115441806A (en) * 2022-09-20 2022-12-06 浙江吉利控股集团有限公司 Motor calibration method and device for vehicle, vehicle controller and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115441806A (en) * 2022-09-20 2022-12-06 浙江吉利控股集团有限公司 Motor calibration method and device for vehicle, vehicle controller and storage medium

Similar Documents

Publication Publication Date Title
CN109655083B (en) Magnetic encoder, calibration method and calibration device thereof, motor and unmanned aerial vehicle
CN109870177B (en) Magnetic encoder, calibration method and calibration device thereof, motor and unmanned aerial vehicle
US11356044B2 (en) Method for detecting motor initial phase and phase sequence and system for controlling permanent-magnet synchronous motor
CN109217758B (en) Online identification method for rotary transformer zero point, motor controller and storage medium
WO2021164104A1 (en) Servo electric motor testing method and apparatus, device, and computer storage medium
WO2023116626A1 (en) Position deviation calibration method, electric motor driving method and system, and device
WO2019114474A1 (en) Method and device for correcting position of motor rotor, and equipment and storage medium
CN114487813A (en) Motor zero position detection method and device, motor controller and storage medium
CN113691182B (en) Resistance identification method, system, medium and terminal of permanent magnet synchronous motor
CN113063345B (en) Motor zero position angle calibration method and device and computer storage medium
CN116413596A (en) Motor reverse connection detection method and device, computer equipment and storage medium
CN114172414A (en) Servo motor initial electrical angle determining method and device and readable storage medium
CN111049463B (en) Method for motor to exit three-phase active short-circuit mode and control device
CN113131818B (en) Hall sensor installation error identification method, device and motor control system
CN110336508B (en) PMSM stator flux linkage identification method and device
KR102359677B1 (en) Rotor initial angle estimation device and method
CN112924722A (en) Method for determining initial position and wiring mode of motor rotor
JP7487826B1 (en) Motor control device
WO2023159619A1 (en) Locked-rotor detection device, system and method
CN116647156A (en) Automatic adjustment method, system and storage medium for zero potential angle of motor
CN113904607B (en) Predictive current control method for permanent magnet synchronous motor and related equipment
CN116938046A (en) Hall position sensor installation angle calibration method and device, electronic equipment and storage medium
CN115714559A (en) Control method and system for identifying writing error of initial angle of permanent magnet synchronous motor for vehicle
CN115585829A (en) Method, device, equipment and medium for acquiring running state of motor rotor
CN118137912A (en) Method, device, equipment, medium and program product for calibrating initial angle of rotary zero position

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