Method, device, electronic device and storage medium for determining motor zero angle
By initializing and controlling the position of the motor rotor and obtaining and calculating the average value of its angle value, the problems of low efficiency, high cost and blockage of the motor zero point angle are solved, and efficient and safe motor control is achieved.
Patent Information
- Application Number
- CN202311770709.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2043-12-20
AI Technical Summary
In the prior art, the determination efficiency of the zero point angle of the motor is low, the cost is high, and the operation is complicated, which can easily lead to the motor being blocked near the absolute zero angle, resulting in increased heat generation and damage.
By responding to the target instruction, the target variable of the motor is initialized, and the rotor is controlled to be positioned to a preset first angle position, and then rotated from this angle to an absolute zero angle position, the angle value of the rotor is obtained, and its average value is calculated as the zero point angle of the motor.
Automatically determine the motor zero angle, reducing cost and operation complexity, avoiding the problem of motor jamming near absolute zero angle, and improving the efficiency of determining the motor zero angle and equipment safety.
Smart Images

Figure CN117879402B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motor control technology, and in particular to a method, device, electronic device and storage medium for determining a motor zero angle. Background Art
[0002] With the rapid development of global industrial automation and intelligence, motors have played a very important role in people's lives. From small electronic fans and household appliances to large cars and drones, the application scenarios of motors are becoming more and more extensive and recognized by people. Let's take the brushless direct current motor (BLDC) as an example. BLDC is a type of motor. Its basic structure consists of a rotor and a stator. The stator is composed of a coil that can be energized, and the rotor is a permanent magnet. BLDC generates a magnetic field by energizing the coil, and then uses a complex algorithm to rotate the magnetic field to drive the rotor to rotate, thereby achieving the purpose of controlling the movement of the BLDC motor. For the control of BLDC motors, it is particularly important to obtain the current rotor angle information and the zero-point angle information. Due to the difference in the installation process of the motor, the zero-point angle may be deviated or inaccurate. At present, the control of BLDC in the related art is basically to detect the stator position by installing Hall sensors around the stator, and three Hall sensors need to be installed, resulting in high costs and complicated operations, resulting in low efficiency in determining the motor zero-point angle; the related art also uses a method of locking the motor rotor to point to the initial position of the stator and using the angle of the sensor read as the zero point. This method is likely to cause the motor to stall near the zero-point angle and cause increased heat generation, thereby causing the motor to be easily damaged. It can be seen that the method for determining the zero-point angle of the motor in the related art has the problem of low efficiency.
[0003] With respect to the technical problem of low efficiency in determining the zero angle of the motor existing in the related art, no effective solution has been proposed so far. Summary of the invention
[0004] The present application provides a method, device, electronic device and storage medium for determining the zero angle of a motor, so as to at least solve the technical problem of low efficiency in determining the zero angle of a motor existing in the related art.
[0005] In a first aspect, the present application provides a method for determining the zero angle of a motor, comprising: initializing a target variable of the motor in response to a target instruction, wherein the target instruction is used to instruct the determination of the zero angle of the motor, and the target variable includes a variable of the zero angle of the motor; when the target variable of the motor is initialized, controlling the rotor of the motor to be positioned to a preset first angle position; when the rotor is controlled to rotate from a preset first angle position to an absolute zero angle position, obtaining a first group of angle values of the rotor, wherein the first group of angle values includes angle values of the rotor collected at different times within a preset first time length after the rotor rotates to the absolute zero angle position; and determining an average value of the first group of angle values as the zero angle of the motor, wherein the zero angle is set to a reference angle for rotation control of the motor.
[0006] By adopting the above technical solution, in response to the target instruction, the target variable of the motor is initialized. After completing the initialization operation, the rotor of the motor is controlled to be positioned to the preset first angle position, and then the rotor is controlled to rotate from the preset first angle position to the absolute zero angle position, and the angle values of the rotor at different times within the preset first time length after rotating to the absolute zero angle position are obtained to obtain a first group of angle values, and then the average value of the first group of angle values is determined as the zero angle of the motor. The purpose of automatically determining the zero angle of the motor is achieved, avoiding the problem of high cost and complicated operation caused by the need to use three Hall sensors in the related art, and also avoiding the problem that the motor is easily blocked near the absolute zero angle when the rotor is directly positioned to the absolute zero angle in the related art, thereby causing the motor to generate more heat and damage the motor. The purpose of improving the determination efficiency of the motor zero angle and the purpose of improving the safety of the motor equipment are achieved.
[0007] Optionally, when controlling the rotor to rotate from a preset first angle position to an absolute zero angle position, a first set of angle values of the rotor is obtained, including: when the rotor is at the absolute zero angle position, obtaining the angle values of the rotor at N moments through a tunnel magnetoresistance TMR sensor to obtain N angle values, wherein the first set of angle values includes N angle values, the N moments are different moments within a preset first time length, N is a positive integer greater than or equal to 1, the front surface of the TMR sensor is perpendicular to the shaft of the rotor, and the TMR sensor is used to detect changes in the external magnetic field.
[0008] By adopting the above technical solution, after the rotor rotates to the absolute zero position, the tunnel magnetoresistance TMR sensor is used to obtain the angle value of the rotor at N moments to obtain a first group of angle values, that is, the first group of angle values obtained includes N angle values corresponding to the N moments, and the N angle values are obtained by measuring the TMR sensor, wherein the front surface of the TMR sensor is perpendicular to the rotating shaft of the rotor. That is, only one TMR sensor is needed to obtain the angle of the rotor at the absolute zero angle position at N moments, and then the zero-point angle of the motor can be obtained by calculating the average value of the N angle values. The zero-point angle of the motor can be used as a reference angle for controlling the rotation of the motor, avoiding the problem of high cost and complicated operation caused by the need to use multiple Hall sensors to determine the zero-point angle of the rotor in the related art.
[0009] Optionally, the angle values of the rotor at N moments are obtained by using a tunnel magnetoresistance TMR sensor to obtain N angle values, including: obtaining the angle value of the rotor at the current moment through the following steps, wherein the current moment is any one of the N moments: obtaining the differential sine output signal and the differential cosine output signal of the TMR sensor at the current moment; processing the differential sine output signal and the differential cosine output signal to obtain the angle value of the rotor at the current moment.
[0010] By adopting the above technical solution, for the angle value at the current moment among the N angle values, the differential sine output signal and the differential cosine output signal at the current moment can be obtained through the TMR sensor, and then the differential sine output signal and the differential cosine output signal can be processed to obtain the angle value of the rotor at the current moment. That is, the tunnel magnetoresistance effect of the TMR sensor can be used to conveniently and quickly obtain the angle of the rotor at any moment among the N moments.
[0011] Optionally, after determining the zero-point angle of the motor according to the first set of angle values, the method also includes: obtaining a second set of angle values of the rotor, wherein the second set of angle values are angle values of the rotor at different times obtained by a tunnel magnetoresistance TMR sensor when the motor is driven at a preset speed; judging whether the oil pump is normal based on the second set of angle values and the zero-point angle, wherein the oil pump includes a motor and a TMR sensor, the front surface of the TMR sensor is perpendicular to the shaft of the rotor, and the TMR sensor is used to detect changes in the external magnetic field.
[0012] By adopting the above technical solution, after determining the zero-point angle of the motor, a second set of angle values of the rotor can be further obtained, the second set of angle values being the angle values of the rotor at different times obtained by the TMR sensor when the motor is controlled to rotate at a preset speed, and then judging whether the oil pump is normal based on the second set of angle values and the zero-point angle, wherein the oil pump includes the motor and the TMR sensor. That is, the purpose of judging whether the oil pump is normal can be further achieved by obtaining the second set of angle values.
[0013] Optionally, obtaining a second set of angle values of the rotor includes: controlling the motor to run at a preset speed for a preset second time period; obtaining the angle values of the rotor at J moments through a TMR sensor to obtain J angle values, wherein the J moments are different moments within the preset second time period, the second set of angle values includes J angle values, and J is a positive integer greater than or equal to 1.
[0014] By adopting the above technical solution, the motor can be controlled to run at a preset speed for a preset second time period, and the angle value of the rotor at J moments can be obtained through the TMR sensor within the preset second time period to obtain a second set of angle values, thereby achieving the purpose of controlling the motor to rotate at a preset speed and obtaining J angle values, and achieving the purpose of judging whether the oil pump is normal based on the J angle values and the zero point angle.
[0015] Optionally, judging whether the oil pump is normal is performed based on the second group of angle values and the zero-point angle, including: determining a target angle value from the second group of angle values based on the zero-point angle, wherein the difference between the target angle value and the zero-point angle is less than a preset first angle threshold; taking the target angle value as a starting point, selecting K consecutive angle values from the second group of angle values to obtain a third group of angle values, wherein K is a positive integer greater than or equal to 1 and less than or equal to J, and K is used to represent the number of times a preset TMR sensor can collect data during one rotation of the rotor; when it is determined that the third group of angle values meets the preset conditions, judging that the oil pump is abnormal.
[0016] By adopting the above technical solution, an angle value whose difference with the zero-point angle is less than the preset first angle threshold value, i.e., the target angle value, is determined from the second group of angle values, and then, with the target angle value as the starting point, K consecutive angle values are selected from the second group of angle values to obtain the third group of angle values, where K angle values are the number of times the TMR sensor can collect data during one rotation of the rotor, i.e., the purpose of selecting K angle values that meet the requirements of a full circle of angle values from the second group of angle values is to determine that the oil pump is abnormal when the third group of angle values meets the preset conditions. The purpose of specifically determining whether the oil pump is normal by selecting K angle values covering a full circle of angles 0-360° is achieved.
[0017] Optionally, when it is determined that the third group of angle values meets preset conditions, the oil pump is judged to be abnormal, including at least one of the following: when it is determined that the Kth angle value in the third group of angle values is less than a preset second angle threshold, the oil pump is judged to be abnormal; when it is determined that the K angle values included in the third group of angle values do not meet the condition of successively increasing, the oil pump is judged to be abnormal; when it is determined that the Kth angle value in the third group of angle values is greater than or equal to the preset second angle threshold, the K angle values included in the third group of angle values meet the condition of successively increasing, and the electrical angle error of the rotor is greater than the preset electrical angle threshold, the oil pump is judged to be abnormal, wherein the electrical angle error of the rotor is used to indicate the difference between the electrical angle of the rotor calculated according to the zero point angle and the electrical angle of the rotor calculated according to the theoretical calculation.
[0018] By adopting the above technical solution, when it is determined that the Kth angle value in the third group of angle values is less than the preset second angle threshold, it can be determined that the oil pump is abnormal; or, when it is determined that the K angle values included in the third group of angle values do not satisfy the sequential increasing relationship, it can also be determined that the oil pump is abnormal; or, when it is determined that the Kth angle value is greater than or equal to the preset second angle threshold, the K angle values included in the third group of angle values satisfy the sequential increasing relationship, and the electrical angle error of the rotor is greater than the preset electrical angle threshold, it can also be determined that the oil pump is abnormal. That is, by judging whether the oil pump is normal by the conditions satisfied by the K angle values and calculating the electrical angle error of the rotor, the purpose of timely discovering the abnormality of the oil pump is achieved, and then the purpose of accurately controlling the motor can be achieved.
[0019] In a second aspect of the present application, a device for determining the zero angle of a motor is also provided, comprising: an initialization module, for initializing the target variables of the motor in response to a target instruction, wherein the target instruction is used to indicate the determination of the zero angle of the motor, and the target variables include the variables of the zero angle of the motor; a first control module, for controlling the rotor of the motor to be positioned to a preset first angle position after completing the initialization of the target variables of the motor; a first acquisition module, for acquiring a first group of angle values of the rotor while controlling the rotor to rotate from a preset first angle position to an absolute zero angle position, wherein the first group of angle values include the angle values of the rotor collected at different times within a preset first time length after the rotor rotates to the absolute zero angle position; a determination module, for determining the average value of the first group of angle values as the zero angle of the motor, wherein the zero angle is set to a reference angle for rotation control of the motor.
[0020] In a third aspect of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, any one of the above methods is implemented.
[0021] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any of the above-described methods is executed.
[0022] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0023] 1. The purpose of automatically determining the zero angle of the motor is achieved, avoiding the problem of high cost and complicated operation caused by the need to use three Hall sensors in the related art; and by first positioning the motor rotor to the preset first angle position, and then rotating from the preset first angle position to the absolute zero angle position, it can avoid the problem that the motor is easily blocked near the absolute zero angle when the rotor is directly positioned to the absolute zero angle in the related art, thereby causing the motor to generate more heat and damage the motor. The purpose of improving the determination efficiency of the motor zero angle is achieved, and the purpose of improving the safety of motor equipment is achieved.
[0024] 2. By acquiring the zero-point angle and the angle data of one rotation of the rotor, it is possible to provide an accurate zero-point angle for motor control commutation and verify whether the oil pump is normal. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a flow chart of a method for determining a motor zero angle provided in an embodiment of the present application;
[0026] Figure 2 is an example diagram of a TMR sensor provided in an embodiment of the present application;
[0027] Figure 3 is an example diagram of rotor angle measurement provided by an embodiment of the present application;
[0028] Figure 4 It is a self-learning state diagram of the oil pump provided in the embodiment of the present application;
[0029] Figure 5 It is a structural block diagram of a device for determining a motor zero angle provided in an embodiment of the present application;
[0030] Figure 6 It is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application.
[0031] Description of reference numerals: 600 - electronic device; 601 - processor; 602 - communication bus; 603 - user interface; 604 - network interface; 605 - memory. DETAILED DESCRIPTION
[0032] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0033] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0034] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0035] This application provides a method for determining the zero angle of a motor, referring to Figure 1 , Figure 1 : is a flow chart of a method for determining a motor zero angle provided in an embodiment of the present application, comprising the following steps:
[0036] Step S101, in response to a target instruction, initializing a target variable of the motor, wherein the target instruction is used to instruct to determine a zero angle of the motor, and the target variable includes a variable of the zero angle of the motor;
[0037] Step S102, when the target variable of the motor is initialized, controlling the rotor of the motor to be positioned to a preset first angle position;
[0038] Step S103, obtaining a first set of angle values of the rotor when controlling the rotor to rotate from a preset first angle position to an absolute zero angle position, wherein the first set of angle values includes angle values of the rotor collected at different times within a preset first time period after the rotor rotates to the absolute zero angle position;
[0039] Step S104: determining an average value of the first group of angle values as the zero angle of the motor, wherein the zero angle is set as a reference angle for controlling the rotation of the motor.
[0040] Through the above steps, in response to the target instruction, the target variable of the motor is initialized. After completing the initialization operation, the rotor of the motor is controlled to be positioned to the preset first angle position, and then the rotor is controlled to rotate from the preset first angle position to the absolute zero angle position, and the angle values of the rotor at different times within the preset first time length after rotating to the absolute zero angle position are obtained to obtain a first group of angle values, and then the average value of the first group of angle values is determined as the zero angle of the motor. The purpose of automatically determining the zero angle of the motor is achieved, avoiding the problem of high cost and complicated operation caused by the need to use three Hall sensors in the related art, and also avoiding the problem that the motor is easily blocked near the absolute zero angle when the rotor is directly positioned to the absolute zero angle in the related art, thereby causing the motor to generate more heat and damage the motor. The purpose of improving the determination efficiency of the motor zero angle and the purpose of improving the safety of the motor equipment are achieved.
[0041] The execution subject of the above steps may be a device end, such as the above oil pump device, or a controller in the device, but is not limited thereto.
[0042] In the above embodiment, in response to the target instruction, the target variables of the motor are initialized. The target instruction can be triggered by the user. For example, the user triggers the target instruction in the oil pump device. The target instruction can be triggered by a touch button or a touch screen. Optionally, the target instruction can also be issued through a mobile terminal. In the initialization operation, PWM output is disabled, that is, PWM drive is not performed on the three windings of the motor, and the target variables are initialized, including the variables for initializing the zero angle. After completing the initialization operation, the rotor of the motor is controlled to be positioned to a preset first angle position, and then the rotor is controlled to rotate from the preset first angle position to an absolute zero angle position. For example, the preset first angle position may be 45° (or other angles). In the embodiment of the present application, the rotor is first positioned to the preset first angle position, and then rotated from the preset first angle position to an absolute zero angle of 0°. This is because if it is directly positioned to 0°, the motor rotor will be blocked near 0° after rotating to 0°. In this case, all the power of the motor is used for heat generation, which will cause the motor to generate a lot of heat and easily damage the motor. Preferably, the preset first angle position is generally not 180°, because if the motor rotor is at 180° at the beginning, the torque that the rotor needs to overcome is the largest at this time. Therefore, the duty cycle required by the space vector pulse width modulation (SVPWM) algorithm also needs to be large to rotate the rotor to 0°. The angle values of the rotor at different times within a preset first time length after the rotor rotates to the absolute zero angle position are obtained to obtain a first group of angle values. For example, the preset first time length may be 2S (or 1S, or other time lengths), and then the average value of the first group of angle values is determined as the zero angle of the motor. For example, multiple angle values of the rotor are obtained through a TMR sensor, and then the average value of the multiple angle values is calculated, and the average value is used as the zero angle of the motor. It should be noted that the above-mentioned absolute zero angle can be understood as the theoretical zero angle of the motor rotor. For example, the electronic rotor is positioned to 0° through the SVPWM algorithm, and the zero angle of the motor determined after the above-mentioned first group of angle values can be understood as the actual zero angle of the motor, that is, in the subsequent control operation of the motor, the zero angle of the motor will be used as a reference angle, so that the commutation of the motor can be controlled more accurately, which can avoid the zero angle error that may be caused during the manufacturing and installation of the motor. This embodiment achieves the purpose of automatically determining the zero angle of the motor, avoiding the problem of high cost and complicated operation caused by the need to use three Hall sensors in the related art, and can also avoid the problem that the motor is easily blocked near the absolute zero angle when the rotor is directly positioned to the absolute zero angle in the related art, thereby causing the motor to generate more heat and damage the motor. The purpose of improving the determination efficiency of the motor zero angle and the purpose of improving the safety of the motor equipment are achieved.
[0043] In an optional embodiment, while controlling the rotor to rotate from a preset first angle position to an absolute zero angle position, obtaining a first set of angle values of the rotor, includes: when the rotor is at the absolute zero angle position, obtaining the angle values of the rotor at N moments through a tunnel magnetoresistance TMR sensor to obtain N angle values, wherein the first set of angle values includes N angle values, the N moments are different moments within a preset first time length, N is a positive integer greater than or equal to 1, the front surface of the TMR sensor is perpendicular to the shaft of the rotor, and the TMR sensor is used to detect changes in the external magnetic field.
[0044] In the above embodiment, after the rotor rotates to the absolute zero position, the tunnel magnetoresistance TMR sensor is used to obtain the angle values of the rotor at N moments to obtain a first group of angle values, that is, the first group of angle values obtained includes N angle values corresponding to the N moments, respectively, and the N angle values are obtained by measuring the TMR sensor, wherein the front surface of the TMR sensor is perpendicular to the rotation axis of the rotor. For example, the TMR sensor is placed directly below the rotor, and the rotation axis of the rotor is perpendicular to the front surface (such as the upper surface) of the TMR sensor. The TMR sensor can be used to detect changes in the external magnetic field, that is, to measure the angular direction of the magnetic field vector parallel to the front surface of the sensor; the above N can be 16 or other values, that is, only one TMR sensor is needed to obtain the angle of the rotor at N moments when it is at the absolute zero angle position, and then the zero-point angle of the motor can be obtained by calculating the average value of the N angle values. The zero-point angle of the motor can be used as a reference angle for controlling the rotation of the motor, avoiding the problem of high cost and complicated operation caused by the need to use multiple Hall sensors to determine the zero-point angle of the rotor in the related art.
[0045] In an optional embodiment, the angle values of the rotor at N moments are obtained by using a tunnel magnetoresistance TMR sensor to obtain N angle values, including: obtaining the angle value of the rotor at the current moment through the following steps, wherein the current moment is any one of the N moments: obtaining the differential sine output signal and the differential cosine output signal of the TMR sensor at the current moment; processing the differential sine output signal and the differential cosine output signal to obtain the angle value of the rotor at the current moment.
[0046] In the above embodiment, for the angle value at the current moment among the N angle values, the differential sine output signal and the differential cosine output signal at the current moment can be obtained through the TMR sensor, and then the differential sine output signal and the differential cosine output signal can be processed to obtain the angle value of the rotor at the current moment, that is, using the principle of the TMR sensor to detect the magnetic field angle, the TMR sensor can provide differential sine and differential cosine analog output signals for external angle calculation, and then the magnetic field angle value can be calculated according to the analog output signal of the sensor. For example, with the voltage differential signal, the inverse tangent operation algorithm can be used to obtain the position information of the rotor by solving and calculating the inverse tangent function, and the measurement of the entire range of 360° can be achieved. That is, the tunnel magnetoresistance effect of the TMR sensor can be used to conveniently and quickly obtain the angle of the rotor at any moment among the N moments.
[0047] In an optional embodiment, after determining the zero-point angle of the motor according to the first set of angle values, the method also includes: obtaining a second set of angle values of the rotor, wherein the second set of angle values are angle values of the rotor at different times obtained by a tunnel magnetoresistance TMR sensor when the motor is driven at a preset speed; judging whether the oil pump is normal according to the second set of angle values and the zero-point angle, wherein the oil pump includes a motor and a TMR sensor, the front surface of the TMR sensor is perpendicular to the shaft of the rotor, and the TMR sensor is used to detect changes in the external magnetic field.
[0048] In the above embodiment, after determining the zero-point angle of the motor, a second set of angle values of the rotor can be further obtained. The second set of angle values is the angle values of the rotor at different times obtained by the TMR sensor when the motor is controlled to rotate at a preset speed. Then, whether the oil pump is normal is judged based on the second set of angle values and the zero-point angle, wherein the oil pump includes a motor and a TMR sensor. For example, open-loop control can be performed on the motor, and the motor can be driven to run at a speed of 750rpm (or other), and then the angle values of the motor rotor at different times can be obtained. Similarly, the TMR sensor can be used to measure and calculate the angle values at different times. That is, the purpose of judging whether the oil pump is normal can be further achieved by obtaining the second set of angle values.
[0049] In an optional embodiment, obtaining a second set of angle values of the rotor includes: controlling the motor to run at a preset speed for a preset second time period; obtaining the angle values of the rotor at J moments through a TMR sensor to obtain J angle values, wherein the J moments are different moments within the preset second time period, the second set of angle values includes J angle values, and J is a positive integer greater than or equal to 1.
[0050] In the above embodiment, the motor can be controlled to run at a preset speed for a preset second time period, and the angle values of the rotor at J moments can be obtained through the TMR sensor within the preset second time period to obtain a second set of angle values. For example, the preset second time period is 5S (or 4S, or other time periods), and the above J can be 200 (or 180, or other values), that is, the angle values at J moments are obtained within 5S when the motor rotates at the above preset speed. The purpose of controlling the motor to rotate at the preset speed and obtaining J angle values is achieved, and the purpose of judging whether the oil pump is normal based on the J angle values and the zero angle is achieved.
[0051] In an optional embodiment, judging whether the oil pump is normal based on the second group of angle values and the zero-point angle includes: determining a target angle value from the second group of angle values based on the zero-point angle, wherein the difference between the target angle value and the zero-point angle is less than a preset first angle threshold; taking the target angle value as a starting point, selecting K consecutive angle values from the second group of angle values to obtain a third group of angle values, wherein K is a positive integer greater than or equal to 1 and less than or equal to J, and K is used to represent the number of times a preset TMR sensor can collect data during one rotation of the rotor; when it is determined that the third group of angle values meets the preset conditions, judging that the oil pump is abnormal.
[0052] In the above embodiment, an angle value whose difference from the zero-point angle is less than a preset first angle threshold is determined from the second group of angle values, i.e., a target angle value. The preset first angle threshold may be the accuracy of the minimum angle that can be calculated based on the data collected by the sensor, such as 1° (or 2°, or other values). Optionally, an angle value closest to the aforementioned zero-point angle may be determined from the second group of angle values as the target angle value; then, starting from the target angle value, K consecutive angle values are selected from the second group of angle values to obtain a third group of angle values. K angle values are the number of data that the TMR sensor can collect during one rotation of the rotor. The above target angle value may be understood as a starting angle value. The above K may be selected as 150 (or other values), i.e., the purpose of selecting K angle values that meet the purpose of a full circle of angle values from the second group of angle values is to determine that the oil pump is abnormal when the third group of angle values meets the preset conditions. The purpose of specifically determining whether the oil pump is normal is achieved by selecting K angle values covering a full circle of angles 0-360°.
[0053] In an optional embodiment, when it is determined that the third group of angle values satisfies a preset condition, the oil pump is judged to be abnormal, including at least one of the following: when it is determined that the Kth angle value in the third group of angle values is less than a preset second angle threshold, the oil pump is judged to be abnormal; when it is determined that the K angle values included in the third group of angle values do not satisfy the condition of increasing successively, the oil pump is judged to be abnormal; when it is determined that the Kth angle value in the third group of angle values is greater than or equal to the preset second angle threshold, the K angle values included in the third group of angle values satisfy the condition of increasing successively, and the electrical angle error of the rotor is greater than the preset electrical angle threshold, the oil pump is judged to be abnormal, wherein the electrical angle error of the rotor is used to indicate the difference between the electrical angle of the rotor calculated according to the zero point angle and the electrical angle of the rotor calculated according to the theoretical calculation.
[0054] In the above embodiment, when it is determined that the Kth angle value in the third group of angle values is less than the preset second angle threshold, it can be determined that the oil pump is abnormal. For example, the preset second angle threshold can be 360° (or 358°, or other values). Optionally, in practical applications, each angle value in the second group of angle values can be represented by binary, for example, by 16-bit binary, so that 0 to 65535 can be used to represent 0 to 360 degrees respectively; or, when it is determined that the K angle values included in the third group of angle values do not satisfy the sequentially increasing relationship, it can also be determined that the oil pump is abnormal. For example, K is equal to 150. For example, the 150 angle data can be stored in the form of an array. When the 150 angle data do not satisfy the sequential increasing relationship, it is considered that there is a problem with the 150 data, and it can be determined that there is a problem with the oil pump. At this time, the motor or sensor in the oil pump can be checked in time to confirm the problem as soon as possible, so as to avoid errors in subsequent motor control; or, when it is determined that the Kth angle value is greater than or equal to the preset second angle threshold, the K angle values included in the third group of angle values satisfy the sequential increasing relationship, and the electrical angle error of the rotor is greater than the preset electrical angle threshold, it can also be determined that the oil pump is abnormal. That is, by judging whether the oil pump is normal by the conditions satisfied by the K angle values and calculating the electrical angle error of the rotor, the purpose of timely discovering the abnormality of the oil pump is achieved, and then the purpose of accurately controlling the motor can be achieved.
[0055] Obviously, the above-described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application will be described in detail below in conjunction with specific embodiments.
[0056] The embodiment of the present application provides a BLDC self-learning (or oil pump self-learning) strategy to optimize the BLDC control strategy. The oil pump in the embodiment of the present application is a BLDC sensor oil pump, that is, the oil pump includes a BLDC and a TMR sensor, and the rotor position can be obtained through a TMR sensor.
[0057] The following is a brief explanation of the basic principles of the TMR sensor and the principle of obtaining the magnetic field angle.
[0058] Figure 2 This is an example diagram of a TMR sensor provided in an embodiment of the present application. The sensor can be used to detect the magnetic field angle. The measurement principle is based on the TMR (tunneling magnetoresistance) effect. The angle direction of the magnetic field vector parallel to the packaging surface is measured. The TMR sensor provides a differential sine for external angle calculation (such as Figure 2 SIN_P, SIN_N) and differential cosine (such as Figure 2 The COS_P and COS_N analog output signals of the TMR sensor can be used to obtain the angle value by calculating the output signal of the sensor, and the measurement of the entire 360° range can be achieved. For example, with the voltage differential signal, the inverse tangent operation algorithm can be used to obtain the rotor position information by solving the inverse tangent function. Since the method of obtaining the angle through the TMR sensor belongs to the existing technology, it will not be repeated here.
[0059] Figure 3 This is an example diagram of rotor angle measurement provided in an embodiment of the present application. The BLDC motor rotor is facing the TMR sensor. Since the BLDC rotor is a permanent magnet, the differential sine and differential cosine analog output signals can be directly obtained through the TMR sensor. For example, the differential sine and differential cosine analog output signals can be obtained by the MCU (or controller, or single-chip microcomputer) through the TMR sensor, and the MCU further processes the obtained sine and cosine signals to obtain the magnetic field angle, and thus the current angle information of the rotor can be obtained.
[0060] The embodiment of the present application is aimed at the inductive BLDC, and the purpose of self-learning is to learn a zero point position and calibrate the error of the magnetic field angle of one circle of the rotor. The subsequent motor control commutation needs to establish a reference system with the zero point for commutation. At the same time, calibrate whether the error of the magnetic field angle of one circle of the rotor is too large.
[0061] Figure 4 It is a self-learning state diagram of the oil pump provided in the embodiment of the present application, including: SL_WAIT (self-learning state 1), SL_ZERO_LEARNING (self-learning state 2), SL_ERR_LEARNING (self-learning state 3), SL_FINISHED (self-learning state 4), and each state is described below:
[0062] (1) Oil pump self-learning state 1: SL_WAIT
[0063] This state is the initial state of the sensor self-learning. After running in this state for 200ms, it enters the SL_ZERO_LEARNING state.
[0064] Initialize the self-learning variables and disable the PWM output.
[0065] The controller (such as the aforementioned MCU) performs PWM control on the three-phase winding on the stator. Specifically, the current size and phase in the three-phase winding are controlled by adjusting the duty cycle of PWM.
[0066] (2) Oil pump self-learning state 2: SL_ZERO_LEARNING
[0067] This state runs for a total of 4 seconds, and its purpose is to drive the motor to record the zero angle of the learning motor.
[0068] 1) Positioning:
[0069] ① Enable PWM. In the first second of this state, use the SVPWM (Space Vector Pulse Width Modulation) algorithm to position the BLDC rotor to 45° (note that this angle is an absolute angle).
[0070] ② After positioning to 45°, before the self-learning state timer runs to 3.2S, the SVPWM algorithm is still used to position the BLDC rotor to 0° (this angle is still an absolute angle). When this self-learning state runs for more than 3.2S, the zero point position is obtained.
[0071] Note: Why do we need to position 45° first and then 0° during the 0° positioning process? On the one hand, if we directly position it to 0°, the motor rotor will be blocked near 0° after reaching 0°, and all the power of the motor will be used for heat generation, which will cause the motor to generate a lot of heat and easily damage the motor. On the other hand, if the motor rotor is at 180° at this time, the torque that the rotor needs to overcome is the largest. Therefore, the SVPWM algorithm needs to give a larger duty cycle to make the rotor rotate to 0°. Therefore, for the convenience of implementation, it is preferred to temporarily position the rotor to 45° and then drive the rotor to 0°.
[0072] 2) Zero point position acquisition:
[0073] ① After this state runs for more than 3.2S, it starts to record 16 angle values in a loop (this angle value is obtained from the TMR sensor. Note that the rotor has reached 0° at this time, so the value recorded is 0°).
[0074] ② When this state runs to the 3.92 second, calculate the average value of the 16 zero positions and record this average value as the zero position.
[0075] ③ When this state runs to the 4th second, the zero angle self-learning is completed. The self-learning state jumps to SL_ERR_LEARNING (i.e. self-learning state 2).
[0076] (3) Oil pump self-learning status 3: SL_ERR_LEARNING
[0077] In this motor state, the motor performs open-loop control and runs for a total of 5S.
[0078] 1) Perform open-loop control (which can be understood as energizing the coil, no matter where the rotor is, the coil is energized to make the rotor rotate):
[0079] The motor was driven to run at 750 rpm.
[0080] At 4.2S, 200 (corresponding to the aforementioned J) angle data senseor_data are stored.
[0081] Note: Why is it 200 data? This is because the stable speed is 750rpm / min at this time, so each circle needs to execute 60 / 750S. Since the PWM carrier frequency is 15Khz, a PWM cycle is 1 / 15ms. If you want to take one data every 8 PWM cycles, you need to take 150 (corresponding to the aforementioned K) data for one circle. Because 150 data are just enough to get the angle of the rotor for one circle, considering the data distortion, it is more appropriate to take 200 data.
[0082] 2) Self-learning angle calibration:
[0083] Calculate the difference between each value in the 200 senseor_data and the zero point angle. If the difference between the two is less than 65535 / 150, the angle value at this time is considered to be the zero point angle value, and record the index value index at this time.
[0084] It should be noted that the above 200 angle data are represented by 16-bit binary, that is, 0 to 65535 are used to represent 0 to 360 degrees.
[0085] By comparing the senseor_data data, comparing the first sequence with the 0th sequence, we can determine the direction of learning at this time:
[0086] If the direction is from low to high: store 150 data from the index index out of 200 data. The index index can be understood as the index of the starting value, that is, the index corresponding to the difference between the 200 senseor_data and the zero point angle is less than 65535 / 150. At this time, select 150 data from the index index. When the last data is selected, such as the 200th data, if there are less than 150 data, you can loop and select from the first data until 150 data are selected;
[0087] If the direction is from high to low: store 150 data from the index index out of the 200 data. Similarly, select 150 data from the index index forward. When the first data is selected, if there are less than 150 data, you can loop and select from the 200th data until 150 data are selected.
[0088] After obtaining 150 self-learning data, CRC check is performed and stored.
[0089] 3) Verify the validity of the 150 self-learning data obtained:
[0090] ① If the 150th data obtained by self-learning is less than (65536-(theoretical data [1]-theoretical data [0])*2), the self-learning data is considered invalid;
[0091] Theoretical data [1] represents theoretical data with an index of 1, theoretical data [0] represents theoretical data with an index of 0, and the theoretical data represents 150 predetermined angle data.
[0092] ② Compare the 150 data values to see whether they increase in sequence (i.e. the previous data is smaller than the next data). If they do not increase in sequence, the self-learning data is considered invalid.
[0093] 4) After verifying that 150 data are valid: calculate the electrical angle and the error between the 45° electrical angle and the theoretical 45° electrical angle:
[0094] Get the deviation between 45° and the self-learning zero angle; calculate the electrical angle through the deviation value; get the deviation value by subtracting the actual 45° electrical angle from the theoretically calculated 45° electrical angle, which represents the error between the self-learning and theoretical values;
[0095] ③If the error value is greater than 12° in electrical angle, the self-learning data is considered invalid.
[0096] If ①② in 3) and ③ in 4) above are both valid, the self-learning data is considered valid, otherwise the self-learning fails.
[0097] 5) Store 150 data and zero angle in the address memory, i.e. in the flash:
[0098] If self-learning is effective, it is stored in the address;
[0099] Clear or set the corresponding flag bit.
[0100] (4) Oil pump self-learning status 4: SL_FINISHED
[0101] In this state, self-learning is completed and the corresponding flag can be set.
[0102] The embodiment of the present application provides a self-learning method for oil pump sensor BLDC to verify the correctness of the magnetic field angle and learn the zero angle. By acquiring and storing the zero angle and the angle data of one rotation of the rotor in Flash, it is possible to verify whether there is a problem with the sensor and provide a zero angle reference for subsequent motor control commutation.
[0103] Through the embodiments of the present application, on the one hand, the design of cost and structural space is optimized to a certain extent; on the other hand, it has a significant effect on the precise speed control of BLDC, and the self-learning method of BLDC mentioned in the embodiments of the present application can play a role in the precise control of BLDC, and can be universal for the structural differences between individual BLDC samples and the differences in the positions of the rotor and the sensor.
[0104] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0105] The present application also provides a device for determining the zero angle of a motor, such as Figure 5 As shown, Figure 5 : is a structural block diagram of a device for determining a motor zero angle provided in an embodiment of the present application, the device comprising:
[0106] An initialization module 501 is used to initialize the target variables of the motor in response to the target instruction, wherein the target instruction is used to instruct to determine the zero angle of the motor, and the target variables include the variables of the zero angle of the motor;
[0107] A first control module 502 is used to control the rotor of the motor to be positioned to a preset first angle position when the target variable of the motor is initialized;
[0108] A first acquisition module 503 is used to acquire a first set of angle values of the rotor when controlling the rotor to rotate from a preset first angle position to an absolute zero angle position, wherein the first set of angle values includes angle values of the rotor collected at different moments within a preset first time period after the rotor rotates to the absolute zero angle position;
[0109] The determination module 504 is used to determine the average value of the first group of angle values as the zero angle of the motor, wherein the zero angle is set as a reference angle for controlling the rotation of the motor.
[0110] In an optional embodiment, the above-mentioned first acquisition module 503 includes: a first acquisition unit, used to obtain the angle values of the rotor at N moments through a tunnel magnetoresistance TMR sensor when the rotor is in an absolute zero angle position, and obtain N angle values, wherein the first group of angle values includes N angle values, the N moments are different moments within a preset first time length, N is a positive integer greater than or equal to 1, the front surface of the TMR sensor is perpendicular to the shaft of the rotor, and the TMR sensor is used to detect changes in the external magnetic field.
[0111] In an optional embodiment, the above-mentioned first acquisition unit includes: an acquisition subunit, used to obtain the angle value of the rotor at the current moment through the following steps, wherein the current moment is any one of N moments: obtaining the differential sine output signal and the differential cosine output signal of the TMR sensor at the current moment; processing the differential sine output signal and the differential cosine output signal to obtain the angle value of the rotor at the current moment.
[0112] In an optional embodiment, the above-mentioned device also includes: a second acquisition module, used to obtain a second set of angle values of the rotor after determining the zero point angle of the motor according to the first set of angle values, wherein the second set of angle values are the angle values of the rotor at different times obtained by the tunnel magnetoresistance TMR sensor when the motor is driven at a preset speed; a judgment module, used to judge whether the oil pump is normal based on the second set of angle values and the zero point angle, wherein the oil pump includes a motor and a TMR sensor, the front surface of the TMR sensor is perpendicular to the shaft of the rotor, and the TMR sensor is used to detect changes in the external magnetic field.
[0113] In an optional embodiment, the above-mentioned second acquisition module includes: a control unit, used to control the motor to run at a preset speed for a preset second time period; a second acquisition unit, used to obtain the angle value of the rotor at J moments through a TMR sensor, and obtain J angle values, wherein the J moments are different moments within the preset second time period, the second group of angle values includes J angle values, and J is a positive integer greater than or equal to 1.
[0114] In an optional embodiment, the above-mentioned judgment module includes: a determination unit, used to determine a target angle value from the second group of angle values according to the zero point angle, wherein the difference between the target angle value and the zero point angle is less than a preset first angle threshold; a selection unit, used to select K consecutive angle values from the second group of angle values with the target angle value as the starting point to obtain a third group of angle values, wherein K is a positive integer greater than or equal to 1 and less than or equal to J, and K is used to represent the number of times a preset TMR sensor can collect data during one rotation of the rotor; a judgment unit, used to determine that the oil pump is abnormal when it is determined that the third group of angle values meets the preset conditions.
[0115] In an optional embodiment, the above-mentioned judgment unit includes at least one of the following: a first judgment subunit, used to judge that the oil pump is abnormal when it is determined that the Kth angle value in the third group of angle values is less than a preset second angle threshold; a second judgment subunit, used to judge that the oil pump is abnormal when it is determined that the K angle values included in the third group of angle values do not satisfy the condition of successively increasing; a third judgment subunit, used to judge that the oil pump is abnormal when it is determined that the Kth angle value in the third group of angle values is greater than or equal to the preset second angle threshold, the K angle values included in the third group of angle values satisfy the condition of successively increasing, and the electrical angle error of the rotor is greater than the preset electrical angle threshold, wherein the electrical angle error of the rotor is used to indicate the difference between the electrical angle of the rotor calculated according to the zero point angle and the electrical angle of the rotor calculated according to the theoretical calculation.
[0116] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0117] The present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed, any one of the method steps described above is executed.
[0118] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0119] The present application also discloses an electronic device. Figure 6 As shown, Figure 6 The electronic device 600 may include: at least one processor 601 , at least one network interface 604 , a user interface 603 , a memory 605 , and at least one communication bus 602 .
[0120] The communication bus 602 is used to realize the connection and communication between these components.
[0121] The user interface 603 may include a display screen (Display) and a camera (Camera). The optional user interface 603 may also include a standard wired interface and a wireless interface.
[0122] The network interface 604 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0123] Among them, the processor 601 may include one or more processing cores. The processor 601 uses various interfaces and lines to connect various parts of the entire electronic device (such as a server), and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 605, and calling data stored in the memory 605. Optionally, the processor 601 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 601 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 601, and it can be implemented separately through a chip.
[0124] Among them, the memory 605 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 605 includes a non-transitory computer-readable storage medium. The memory 605 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 605 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 605 may optionally also be at least one storage device located away from the aforementioned processor 601. Refer to Figure 6 , the memory 605 as a computer storage medium may include an operating system, a network communication module, a user interface module and an application program for a method for determining a motor zero angle.
[0125] exist Figure 6 In the electronic device 600 shown, the user interface 603 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 601 can be used to call an application program for a method for determining the zero angle of a motor stored in the memory 605. When executed by one or more processors 601, the electronic device 600 executes one or more of the methods described in the above embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited to the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0126] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0127] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0128] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0129] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0130] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.
[0131] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0132] This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the technical field not recorded in the present disclosure.
Claims
1. A method for determining a motor zero angle, characterized in that: include: Initializing target variables of the motor in response to a target instruction, wherein the target instruction is used to instruct to determine a zero angle of the motor, and the target variables include variables of the zero angle of the motor; When the target variable of the motor is initialized, controlling the rotor of the motor to be positioned to a preset first angle position; Under the condition that the rotor is controlled to rotate from the preset first angle position to the absolute zero angle position, a first set of angle values of the rotor is obtained, wherein the first set of angle values includes angle values of the rotor collected at different moments within a preset first time period after the rotor rotates to the absolute zero angle position; Determining an average value of the first group of angle values as a zero angle of the motor, wherein the zero angle is set as a reference angle for controlling the rotation of the motor; Wherein, after determining the zero angle of the motor according to the first group of angle values, the method further includes: Acquire a second set of angle values of the rotor, wherein the second set of angle values are angle values of the rotor at different times obtained by a tunnel magnetoresistance (TMR) sensor when the motor is driven at a preset speed; Whether the oil pump is normal is determined based on the second set of angle values and the zero point angle, wherein the oil pump includes the motor and the TMR sensor, the front surface of the TMR sensor is perpendicular to the shaft of the rotor, and the TMR sensor is used to detect changes in the external magnetic field.
2. The method according to claim 1, characterized in that In the case of controlling the rotor to rotate from the preset first angle position to the absolute zero angle position, obtaining a first set of angle values of the rotor includes: When the rotor is at the absolute zero angle position, the angle values of the rotor at N moments are obtained by a tunnel magnetoresistance TMR sensor to obtain N angle values, wherein the first group of angle values includes the N angle values, the N moments are different moments within the preset first time length, N is a positive integer greater than or equal to 1, the front surface of the TMR sensor is perpendicular to the shaft of the rotor, and the TMR sensor is used to detect changes in the external magnetic field.
3. The method according to claim 2, characterized in that The angle values of the rotor at N moments are obtained by using a tunnel magnetoresistance TMR sensor to obtain N angle values, including: The angle value of the rotor at the current moment is obtained by the following steps, wherein the current moment is any one of the N moments: Acquire the differential sine output signal and the differential cosine output signal of the TMR sensor at the current moment; The differential sine output signal and the differential cosine output signal are processed to obtain the angle value of the rotor at the current moment.
4. The method according to claim 1, characterized in that: Obtaining a second set of angle values of the rotor, comprising: Controlling the motor to run at the preset speed for a preset second time period; The angle values of the rotor at J moments are acquired through the TMR sensor to obtain J angle values, wherein the J moments are different moments within the preset second time length, the second group of angle values includes the J angle values, and J is a positive integer greater than or equal to 1.
5. The method according to claim 4, characterized in that Judging whether the oil pump is normal according to the second group of angle values and the zero point angle includes: Determining a target angle value from the second group of angle values according to the zero-point angle, wherein a difference between the target angle value and the zero-point angle is less than a preset first angle threshold; Taking the target angle value as a starting point, selecting K consecutive angle values from the second group of angle values to obtain a third group of angle values, wherein K is a positive integer greater than or equal to 1 and less than or equal to J, and K is used to represent the number of data that can be collected by the preset TMR sensor during one rotation of the rotor; When it is determined that the third set of angle values meets the preset condition, it is determined that the oil pump is abnormal.
6. The method according to claim 5, characterized in that When it is determined that the third set of angle values meets the preset condition, the oil pump is judged to be abnormal, including at least one of the following: When it is determined that the Kth angle value in the third group of angle values is less than the preset second angle threshold, it is determined that the oil pump is abnormal; When it is determined that the K angle values included in the third group of angle values do not satisfy the condition of sequentially increasing, it is determined that the oil pump is abnormal; When it is determined that the Kth angle value in the third group of angle values is greater than or equal to the preset second angle threshold, the K angle values included in the third group of angle values satisfy the condition of sequentially increasing, and the electrical angle error of the rotor is greater than the preset electrical angle threshold, it is judged that the oil pump is abnormal, wherein the electrical angle error of the rotor is used to indicate the difference between the electrical angle of the rotor calculated according to the zero point angle and the electrical angle of the rotor calculated according to theoretical calculation.
7. A device for determining a motor zero angle, characterized in that: include: An initialization module, configured to initialize a target variable of the motor in response to a target instruction, wherein the target instruction is used to instruct to determine a zero angle of the motor, and the target variable includes a variable of the zero angle of the motor; A first control module, configured to control the rotor of the motor to be positioned to a preset first angle position after initializing the target variable of the motor; a first acquisition module, configured to acquire a first set of angle values of the rotor when controlling the rotor to rotate from the preset first angle position to the absolute zero angle position, wherein the first set of angle values includes angle values of the rotor collected at different moments within a preset first time period after the rotor rotates to the absolute zero angle position; a determination module, configured to determine an average value of the first group of angle values as a zero angle of the motor, wherein the zero angle is set as a reference angle for rotation control of the motor; The device further includes: a second acquisition module, used to acquire a second set of angle values of the rotor after determining the zero-point angle of the motor according to the first set of angle values, wherein the second set of angle values are angle values of the rotor at different times obtained by a tunnel magnetoresistance TMR sensor when the motor is driven at a preset speed; a judgment module, used to judge whether the oil pump is normal according to the second set of angle values and the zero-point angle, wherein the oil pump includes a motor and a TMR sensor, the front surface of the TMR sensor is perpendicular to the shaft of the rotor, and the TMR sensor is used to detect changes in the external magnetic field.
8. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 6 is performed.
Citation Information
Patent Citations
Method and device for determining zero initial angle of motor
CN104485859A
Driving motor zero calibration method and device, motor controller and storage medium
CN114765442A