Fault diagnosis method for hall sensors in brushless direct-current electric motor
By calculating the changes in the HALL value of the Hall sensor and the cumulative number of errors, combined with the bitwise calculation of historical data, the accurate diagnosis of Hall sensor failure of the brushless DC motor is achieved, and the false alarm problem in the existing technology is solved, and the diagnosis is improved. accuracy.
Patent Information
- Application Number
- PCT/CN2024/100689
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-04
- Filing Date
- 2024-06-21
- Publication Date
- 2025-01-09
AI Technical Summary
There is a lack of effective fault diagnosis methods in the prior art to detect Hall sensor failures in brushless DC motors, resulting in possible false alarms.
By reading the position signal of the Hall sensor, calculating the sum of the HALL values, judging its changes, counting the number of errors, and performing fault type diagnosis when the threshold is reached, and using historical data to perform bitwise calculations to determine the fault type.
It realizes accurate diagnosis of Hall sensor failure of brushless DC motor, avoids false alarms caused by single diagnosis errors, and ensures the accuracy of diagnostic results.
Smart Images

Figure CN2024100689_09012025_PF_FP_ABST
Abstract
Description
A fault diagnosis method for Hall sensor in brushless DC motor
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] The embodiments of this application are based on the Chinese patent application with application number 202310817840.6 and application date July 4, 2023, and claim the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby introduced into the embodiments of this application as a reference. Technical Field
[0003] The invention belongs to the field of brushless DC motor control, and in particular relates to a fault diagnosis method for a Hall sensor in a brushless DC motor. Background Art
[0004] Brushless DC motors overcome the inherent flaws of brushed DC motors by replacing the mechanical commutator with an electronic one. They combine the advantages of DC motors, such as good speed regulation, with the simple structure, absence of commutation sparks, reliable operation, and ease of maintenance of AC motors. However, BLDC motors incorporate Hall sensors, but existing solutions for diagnosing these sensors are limited.
[0005] Summary of the Invention
[0006] The object of the present invention is to provide a fault diagnosis method for a Hall sensor in a brushless DC motor, which performs fault diagnosis on the Hall sensor in the brushless DC motor, diagnoses which Hall sensors have faults and the type of fault that has occurred, and performs a delayed judgment operation to avoid false alarms due to single diagnostic errors.
[0007] To solve the above technical problems, the technical solution of the present invention is: a fault diagnosis method for a Hall sensor in a brushless DC motor, applied to an electronic device of a vehicle, comprising the following steps:
[0008] S1. Read the position signals of all Hall sensors to obtain their corresponding HALL values; wherein, when the position signal of the Hall sensor is read, its corresponding HALL value is sent, and each Hall sensor is assigned a HALL value k1, k2...k bit by bit. m , and satisfy k1=ak2,k2=ak3...k m-1 =ak m ,k1,k2...k m and a are both positive integers, a≥2; in this cycle, the HALL values of all Hall sensors are added together to obtain the initial value of the HALL sum primary_hall;
[0009] S2. In any other cycle, the HALL values of all Hall sensors are added together to obtain the HALL sum value new_hall;
[0010] S3: Determine whether the new_hall of the current cycle is equal to the actual_hall sum of the HALL values stored in the previous cycle. If they are not equal, proceed to S4; if they are equal, it is considered that the brushless DC motor has stopped rotating and the diagnosis ends.
[0011] S4, judge whether new_hall is in the valid range [k m , k1+k2+...+k m-1 If yes, go to S5; if no, go to S6;
[0012] S5. Set the cumulative number of hall errors to 0, assign the value of new_hall to actual_hall, store new_hall and the corresponding Hall values of each Hall sensor as a set of data in the Hall sum value history array hallHistory, and enter S6; wherein the cumulative number of hall errors is the statistical value of the number of Hall sensor errors in the diagnosis;
[0013] S6. Store new_hall in hallHistory, add 1 to the cumulative number of hall errors, and perform Hall sensor fault type diagnosis when the cumulative number of hall errors reaches a first threshold;
[0014] S7. Take out n groups of data from the hallHistory from the back to the front, perform bitwise operations on the n groups of data, and accumulate the counts of the corresponding bits of each Hall sensor to obtain the count values of the corresponding bits of each Hall sensor. Determine the fault type of the corresponding Hall sensor based on the calculated values.
[0015] As a second aspect, the present invention also provides a fault diagnosis system for a Hall sensor in a brushless DC motor, comprising a memory, a controller, and a computer program stored in the memory and executable on the controller, wherein the controller implements the steps of any of the methods described above when executing the program.
[0016] As a third aspect, the present invention further provides a brushless DC motor memory having a program stored thereon, wherein the program, when executed by a controller, implements the steps of any of the above methods.
[0017] Compared with the prior art, the present invention has the following beneficial effects:
[0018] The present invention performs fault diagnosis on the Hall sensors in the brushless DC motor, diagnoses which Hall sensors have faults and the types of faults that have occurred, and performs a delayed judgment operation to avoid false alarms caused by a single diagnostic error. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] FIG1 is a schematic diagram of a process of embodiment 1 of the present invention;
[0020] FIG2 is a schematic diagram showing the structure of the connection between the CPU and the Hall sensor according to an embodiment of the present invention;
[0021] FIG3( a ) is a diagram showing the commutation sequence of the Hall sensor when the brushless DC motor is reversed according to an embodiment of the present invention;
[0022] FIG3( b ) is a diagram showing the commutation sequence of the Hall sensor when the brushless DC motor rotates forward in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0024] The technical solution of the present invention is:
[0025] Example 1:
[0026] A fault diagnosis method for a Hall sensor in a brushless DC motor, applied to electronic equipment of a vehicle, comprises the following steps:
[0027] S1. As shown in Figure 1, read the position signals of all three Hall sensors to obtain their corresponding HALL values (bitwise assignment A=4, B=2, C=1). It is assumed that the pins of the corresponding Hall sensors are all at a high level at this time. In this cycle, add the HALL values of all Hall sensors to obtain the initial HALL sum value primary_hall, which is 7.
[0028] S2. In any other cycle, add the HALL values of all three Hall sensors to get the HALL sum value new_hall; when the pin of the corresponding Hall sensor is at a high level, the corresponding HALL value of that position is set to
[0029] S3: Determine whether the new_hall of the current cycle is equal to the actual_hall sum of the HALL values stored in the previous cycle. If they are not equal, proceed to S4; if they are equal, it is considered that the brushless DC motor has stopped rotating and the diagnosis ends.
[0030] S4. Determine whether new_hall is within the valid range [1, 6]. If yes, proceed to S5; if not, proceed to S6.
[0031] S5. Set the cumulative number of hall errors to 0, assign the value of new_hall to actual_hall, store new_hall and the corresponding Hall values of each Hall sensor as a set of data in the Hall sum value history array hallHistory, and enter S6; wherein the cumulative number of hall errors is the statistical value of the number of Hall sensor errors in the diagnosis;
[0032] S6. Store new_hall in hallHistory, add 1 to the cumulative number of hall errors, and when the cumulative number of hall errors reaches a first threshold, which in this embodiment is 8, perform Hall sensor fault type diagnosis;
[0033] S7. Take out four sets of data from the hallHistory file from the back to the front, perform bitwise operations on the four sets of data, and accumulate the counts of the corresponding bits of each Hall sensor to obtain the count values of the corresponding bits of each Hall sensor. Determine the fault type of the corresponding Hall sensor based on the calculated values.
[0034] The S6 is specifically:
[0035] S61, determine whether the cumulative number of hall errors is less than a first threshold, if yes, proceed to S62; if no, proceed to S71;
[0036] S62, determine whether the cumulative number of hall errors is 0, if so, store new_hall in hallHistory and enter S63; if not, enter S64;
[0037] S63, the cumulative number of hall errors increases by 1;
[0038] S64: Determine whether the cumulative number of hall errors reaches a first threshold. If yes, proceed to S7; if not, consider the detection error and re-execute S64.
[0039] The S7 is specifically:
[0040] S71. Extract 4 sets of data from hallHistory in order from the back to the front.
[0041] S72. Determine whether the first set of data retrieved is 7. If so, perform a bitwise AND operation on the four sets of data, and accumulate the corresponding bits of each Hall sensor to obtain the count values of the corresponding bits of each Hall sensor, and then proceed to S73. If not, proceed to S74.
[0042] S73. Determine whether there is a count value of 4. If so, the HALL sensor corresponding to the bit is open or short-circuited to the power supply; if not, the HALL sensor corresponding to the bit is not faulty.
[0043] S74, determine whether the first group of data taken out is 0. If so, perform a bitwise XOR operation on the four groups of data and 7, then perform a bitwise AND operation, and accumulate the corresponding bits of each Hall sensor to obtain the count value of the corresponding bit of each Hall sensor, and then enter S75;
[0044] S75. Determine whether there is a count value of 4. If so, the HALL sensor corresponding to the bit is short-circuited to the ground; if not, the HALL sensor corresponding to the bit is not faulty.
[0045] Example 2:
[0046] A fault diagnosis method for a Hall sensor in a brushless DC motor, applied to electronic equipment of a vehicle, comprises the following steps:
[0047] S1. As shown in Figure 1, read the position signals of all three Hall sensors to obtain their corresponding HALL values (bitwise assignment A=8, B=4, C=2). It is assumed that the pins of the corresponding Hall sensors are all at a high level at this time. In this cycle, add the HALL values of all Hall sensors to obtain the initial HALL sum value primary_hall, which is 14.
[0048] S2. In any other cycle, add the HALL values of all three Hall sensors to obtain the HALL sum value new_hall; when the pin of the corresponding Hall sensor is at a high level, set the corresponding HALL value at that position;
[0049] S3: Determine whether the new_hall of the current cycle is equal to the actual_hall sum of the HALL values stored in the previous cycle. If they are not equal, proceed to S4; if they are equal, it is considered that the brushless DC motor has stopped rotating and the diagnosis ends.
[0050] S4. Determine whether new_hall is within the valid range [2, 12]. If yes, proceed to S5; if not, proceed to S6.
[0051] S5. Set the cumulative number of hall errors to 0, assign the value of new_hall to actual_hall, store new_hall and the corresponding Hall values of each Hall sensor as a set of data in the Hall sum value history array hallHistory, and enter S6; wherein the cumulative number of hall errors is the statistical value of the number of Hall sensor errors in the diagnosis;
[0052] S6. Store new_hall in hallHistory, and add 1 to the cumulative number of hall errors. When the cumulative number of hall errors reaches a first threshold, which is 10 in this embodiment, a Hall sensor fault type diagnosis is performed.
[0053] S7. Take out four sets of data from the hallHistory file from the back to the front, perform bitwise operations on the four sets of data, and accumulate the counts of the corresponding bits of each Hall sensor to obtain the count values of the corresponding bits of each Hall sensor. Determine the fault type of the corresponding Hall sensor based on the calculated values.
[0054] The S6 is specifically:
[0055] S61, determine whether the cumulative number of hall errors is less than a first threshold, if yes, proceed to S62; if no, proceed to S71;
[0056] S62, determine whether the cumulative number of hall errors is 0, if so, store new_hall in hallHistory and enter S63; if not, enter S64;
[0057] S63, the cumulative number of hall errors increases by 1;
[0058] S64: Determine whether the cumulative number of hall errors reaches a first threshold. If yes, proceed to S7; if not, consider the detection error and re-execute S64.
[0059] The S7 is specifically:
[0060] S71. Extract 4 sets of data from hallHistory in order from the back to the front.
[0061] S72, determine whether the first group of data taken out is 14. If so, perform a bitwise AND operation on the four groups of data, and accumulate the corresponding bits of each Hall sensor to obtain the count value of the corresponding bit of each Hall sensor, and enter S73; if not, enter S74;
[0062] S73. Determine whether there is a count value of 4. If so, the HALL sensor corresponding to the bit is open or short-circuited to the power supply; if not, the HALL sensor corresponding to the bit is not faulty.
[0063] S74, determine whether the first group of data taken out is 0. If so, perform a bitwise XOR operation on the four groups of data and 14, then perform a bitwise AND operation, and accumulate the corresponding bits of each Hall sensor to obtain the count value of the corresponding bit of each Hall sensor, and then enter S75;
[0064] S75. Determine whether there is a count value of 4. If so, the HALL sensor corresponding to the bit is short-circuited to the ground; if not, the HALL sensor corresponding to the bit is not faulty.
[0065] Based on the above method, the present invention also provides a fault diagnosis system for a Hall sensor in a brushless DC motor, comprising a memory, a controller, and a computer program stored in the memory and executable on the controller, wherein the controller implements the steps of any of the above methods when executing the program.
[0066] Based on the above method, the present invention further provides a brushless DC motor memory having a program stored thereon, which implements the steps of any of the above methods when executed by a controller.
[0067] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0068] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A fault diagnosis method for a Hall sensor in a brushless DC motor, applied to an electronic device of a vehicle, characterized in that: The following steps are involved: S1. Read the position signals of all Hall sensors to obtain their corresponding HALL values; wherein, when the position signals of the Hall sensors are read, their corresponding HALL values are sent, and each Hall sensor is assigned HALL values k1, k2, ...k bit by bit. m , and satisfies k1=ak2, k2=ak3...k m-1 =ak m ,k1,k2...k m , a are both positive integers, a≥2; in this cycle, the HALL values of all Hall sensors are added together to obtain the HALL sum initial value primary_hall; S2. In any other cycle, the HALL values of all Hall sensors are added together to obtain the HALL sum value new_hall; S3, determine whether the new_hall of the current cycle is equal to the actual_hall of the total HALL value stored in the previous cycle. If they are not equal, enter S4; if they are equal, it is considered that the brushless DC motor is stopped at this time, and the diagnosis ends; S4, determine whether new_hall is in the valid range [k m , k1+k2+...+k m-1 】, if yes, go to S5; if no, go to S6; S5, set the cumulative number of hall errors to 0, assign the value of new_hall to actual_hall, store new_hall and the HALL values of its corresponding Hall sensors as a set of data in the HALL sum value history array hallHistory, and enter S6; wherein the cumulative number of hall errors is the statistical value of the number of Hall sensor errors in the diagnosis; S6. Store new_hall in hallHistory, add 1 to the cumulative number of hall errors, and perform Hall sensor fault type diagnosis when the cumulative number of hall errors reaches a first threshold; S7. Take out n groups of data from hallHistory from the back to the front, perform bitwise operation on the n groups of data, accumulate the counts of the corresponding bits of each Hall sensor to obtain the count values of the corresponding bits of each Hall sensor, and determine the fault type of the corresponding Hall sensor according to the calculated values.
2. The fault diagnosis method of a Hall sensor in a brushless DC motor according to claim 1, characterized in that: The S6 is specifically: S61, determine whether the cumulative number of hall errors is less than a first threshold, if yes, proceed to S62; if no, proceed to S7; S62, determine whether the cumulative number of hall errors is 0, if yes, store new_hall in hallHistory and enter S63; if no, enter S64; S63, the cumulative number of hall errors is increased by 1; S64, determine whether the cumulative number of hall errors reaches a first threshold, if yes, proceed to S7; if no, consider the detection error and re-execute S64.
3. The fault diagnosis method of a Hall sensor in a brushless DC motor according to claim 1, characterized in that: The S7 is specifically: S71, take out n groups of data from hallHistory in order from the back to the front; S72, determine whether the first set of data taken out is (k1+k2+...+k m ), if yes, perform bitwise AND operation on n groups of data, and accumulate counts of corresponding bits of each Hall sensor to obtain count values of corresponding bits of each Hall sensor, and enter S73; if no, enter S74; S73, judging whether there is a certain count value n, if yes, the HALL sensor corresponding to the bit is open circuit or short circuited to the power supply; if no, the HALL sensor corresponding to the bit is not faulty; S74, determine whether the first set of data taken out is 0, if yes, then perform a calculation on n sets of data and (k1+k2+...+k m ) performs a bitwise XOR operation and then a bitwise AND operation, and accumulates the counts of the corresponding bits of each Hall sensor to obtain the count values of the corresponding bits of each Hall sensor, and enters S75; S75. Determine whether there is a count value n. If yes, the HALL sensor corresponding to the bit is short-circuited to the ground; if no, the HALL sensor corresponding to the bit is not faulty.
4. The fault diagnosis method of a Hall sensor in a brushless DC motor according to claim 1, characterized in that: The number of Hall sensors is 3.
5. The fault diagnosis method of a Hall sensor in a brushless DC motor according to claim 4, characterized in that: If k3 is 1 and a is 2, then k1=4 and k2=2.
6. The fault diagnosis method of a Hall sensor in a brushless DC motor according to claim 1, characterized in that: The number n of groups of data taken out is 4.
7. The fault diagnosis method of a Hall sensor in a brushless DC motor according to claim 1, characterized in that: The position signal of each Hall sensor is read through the IO pin of the CPU. When the pin of the corresponding Hall sensor is at a high level, the position is set to its corresponding HALL value.
8. The fault diagnosis method of a Hall sensor in a brushless DC motor according to claim 1, characterized in that: The first threshold is 5-20.
9. A fault diagnosis system for a Hall sensor in a brushless DC motor, comprising a memory, a controller, and a computer program stored in the memory and executable on the controller, characterized in that: When the controller executes the program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A brushless DC motor memory having a program stored thereon, characterized in that: When the program is executed by the controller, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Fault detection method for Hall position sensors
CN103424651A
Power-on self-detection method for brushless direct-current motor hall sensor
CN104165649A
Fault diagnosis method for Hall position sensor of permanent magnet synchronous motor
CN105573304A
Fault diagnosis method for Hall sensor in brushless direct current motor
CN116992368A
Method for verifing hall sensor signal, and apparatus applied to the same
KR1020130072659A