CN110061673B - Motor control method and system based on Hall sensor - Google Patents
Motor control method and system based on Hall sensor Download PDFInfo
- Publication number
- CN110061673B CN110061673B CN201910380868.1A CN201910380868A CN110061673B CN 110061673 B CN110061673 B CN 110061673B CN 201910380868 A CN201910380868 A CN 201910380868A CN 110061673 B CN110061673 B CN 110061673B
- Authority
- CN
- China
- Prior art keywords
- hall sensor
- motor
- rotor
- value
- sensor group
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P21/00—Arrangements or methods for the control of electric machines by vector control, e.g. by control of field orientation
- H02P21/14—Estimation or adaptation of machine parameters, e.g. flux, current or voltage
- H02P21/18—Estimation of position or speed
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Control Of Motors That Do Not Use Commutators (AREA)
- Transmission And Conversion Of Sensor Element Output (AREA)
Abstract
The invention provides a motor control method and system based on a Hall sensor, and relates to the field of motors. In the motor control method based on the Hall sensors, after a motor runs, whether at least one Hall sensor in a Hall sensor group in the motor fails or not is judged, and if at least one Hall sensor fails, whether the Hall sensor group can work in a failure mode or not is judged. If the Hall sensor group can work in a fault mode, calculating the angle between the rotor and a preset coordinate axis arranged on the stator according to a first calculation method; and finally, carrying out vector control on the motor according to the angle. By adopting the method, when the motor runs, the fault diagnosis is firstly carried out on the Hall sensor, and the accuracy and the credibility of the calculated angle position are ensured. Meanwhile, when the Hall sensor has serious faults, the motor is forbidden to operate, and the safety of the vehicle is ensured.
Description
Technical Field
The invention relates to the field of motors, in particular to a motor control method and system based on a Hall sensor.
Background
The back electromotive force waveform of the permanent magnet synchronous motor is partially different from the trapezoidal wave of the dc brushless motor, but is a sine wave. If the motor is controlled by adopting square wave voltage, the control voltage of the square wave and the back electromotive force of the sine wave can distort the current waveform of the motor, thereby causing the fluctuation of output torque. Therefore, vector control is required for the control voltage of the permanent magnet synchronous motor, which requires that the position of the rotor poles relative to the stator windings is known very accurately. Generally, a permanent magnet synchronous motor of a new energy automobile adopts a rotary transformer to obtain an accurate position of a magnetic field of a motor rotor, but the cost of the rotary transformer is very high.
In the prior art, in order to reduce cost, a hall sensor is adopted to complete the magnetic field orientation control of a motor. However, the calculated angle may be subject to large errors due to failure of the hall sensor, which may compromise the safety of the automobile and the occupants.
Disclosure of Invention
The invention aims to provide a motor control method based on a Hall sensor, which aims to solve the problem that a calculated angle has a large error due to the fault of the Hall sensor.
A further object of the present invention is to perform fault diagnosis on the hall sensors to determine whether the motor allows the hall sensor group to operate with a fault.
In one aspect, the invention provides a motor control method based on a hall sensor, which comprises the following steps:
judging whether at least one Hall sensor in a Hall sensor group in the power supply fails;
when at least one Hall sensor breaks down, judging whether a Hall sensor group can work in a failure mode;
if the Hall sensor group can work in a fault mode, calculating an angle between the rotor and a preset coordinate axis arranged on the stator according to a first calculation method;
and carrying out vector control on the motor according to the angle.
Optionally, the determining whether at least one hall sensor in the hall sensor group in the electrical apparatus has a fault includes:
continuously sampling signal values output by the Hall sensor group;
comparing the signal values output by the Hall sensor group twice continuously;
if the signal values output twice are the same, judging that the Hall sensor group does not have a fault; if the signal values output twice are different, judging that the Hall sensor group is likely to have a fault, and carrying out the next step;
obtaining a plurality of values which change in signal values output by a Hall sensor group after a rotor rotates for one circle, wherein any two values in the plurality of values are different;
judging whether the result calculated according to the plurality of numerical values is a preset value or not;
if so, judging that the Hall sensor group does not have a fault, and calculating the angle between the rotor of the motor and the preset shaft according to a second calculation method; if not, the Hall sensor group is judged to have a fault.
Optionally, when at least one hall sensor fails, determining whether the hall sensor group can operate in a failure mode includes:
when one Hall sensor in the Hall sensor group breaks down, the Hall sensor group is judged to work in a failure mode;
when two or more Hall sensors in the Hall sensor group have faults, the Hall sensor group is judged to be incapable of working in a fault mode, and the motor is controlled to stop working.
Optionally, calculating the angle between the rotor and the preset coordinate axis according to the first calculation method or the second calculation method includes:
calculating an extreme value a0 of the angle between the rotor and a preset coordinate axis;
correcting the error of the Hall sensor group;
calculating the rotational speed of the rotor;
calculating the angular acceleration of the rotor;
and according to the extreme value, the error, the rotation angle speed and the angle between the rotation angle acceleration rotor and the preset coordinate axis.
Optionally, when the angle of the rotor to the preset coordinate axis is calculated according to the first calculation method, calculating the extreme value a0 of the angle of the rotor to the preset coordinate axis includes;
the circumferential area where the stator is located is divided into 6 sub-areas U1, U2, U3, U4, U5 and U6 according to 3 Hall sensors in an equal way;
when the magnetic poles of the motor rotor are positioned in different sub-areas, the Hall sensor groups output different signal values Y1, Y2, Y3, Y4, Y5 and Y6; wherein each signal value corresponds to an angle range (R)61~R12)、(R12~R23)、(R23~R34)、(R34~R45)、(R45~R56)、(R56~R61);
When one of the hall sensors fails, the failed hall sensor cannot generate a signal value, and the extreme value a0 is calculated as follows:
if the signal value jumps from Y1 to Y2, the extreme value is R12;
If the signal value jumps from Y2Change to Y3, extremum is R23;
If the signal value jumps from Y3 to Y0, the extreme value is R30;
If the signal value jumps from Y0 to Y1, the extreme value is R01。
Alternatively, when the angle of the rotor of the motor to the preset axis is calculated according to the second calculation method, calculating the extreme value a0 of the angle of the rotor to the preset coordinate axis includes;
the circumferential area where the stator is located is divided into 6 sub-areas U1, U2, U3, U4, U5 and U6 according to 3 Hall sensors in an equal way;
when the magnetic poles of the motor rotor are positioned in different sub-areas, the Hall sensor groups output different signal values Y1, Y2, Y3, Y4, Y5 and Y6; wherein each signal value corresponds to an angle range (R)61~R12)、(R12~R23)、(R23~R34)、(R34~R45)、(R45~R56)、(R56~R61);
The extremum a0 is calculated as follows:
if the signal value jumps from Y1 to Y2, the extreme value is R12;
If the signal value jumps from Y2 to Y3, the extreme value is R23;
If the signal value jumps from Y3 to Y4, the extreme value is R34;
If the signal value jumps from Y4 to Y5, the extreme value is R45;
If the signal value jumps from Y5 to Y6, the extreme value is R56;
If the signal value jumps from Y6 to Y1, the extreme value is R61。
Optionally, the method for detecting a specific failed hall sensor in the hall sensor group includes:
acquiring a plurality of values which change in signal values output by a Hall sensor group when a rotor rotates for one circle, wherein any two values in the plurality of values are different; meanwhile, extracting partial numerical values irrelevant to the target Hall sensor from the plurality of numerical values;
judging whether a first result calculated according to the plurality of numerical values is a first preset value or not; meanwhile, whether a second result calculated according to the partial numerical value is a second preset value is judged;
and if the first result is different from the first preset value and the second result is the same as the second preset value, judging that the target Hall sensor has a fault.
Optionally, before determining whether at least one hall sensor in the hall sensor group in the motor has a fault, the method further includes:
judging whether the rotating speed of the motor is lower than a preset threshold value or not;
if the rotating speed is lower than a preset threshold value, calculating the angle between the rotor and a preset coordinate axis arranged on the stator according to a third calculation method, and then carrying out vector control on the motor according to the angle; and if the rotating speed is greater than or equal to the preset threshold value, judging whether at least one Hall sensor in the Hall sensor group in the power-off machine fails.
Optionally, the third calculation method comprises:
the circumferential area where the stator is located is divided into 6 sub-areas U1, U2, U3, U4, U5 and U6 according to 3 Hall sensors in an equal way;
when the magnetic poles of the rotor are positioned in different sub-areas, the Hall sensor groups output different signal values Y1, Y2, Y3, Y4, Y5 and Y6; wherein each signal value corresponds to an angle range (R)61~R12)、(R12~R23)、(R23~R34)、(R34~R45)、(R45~R56)、(R56~R61)。
On the other hand, the invention also provides a motor applying any one of the motor control methods, wherein three Hall sensors are fixed on a stator of the motor, and the three Hall sensors equally divide the circumferential area of the stator into six areas.
According to the motor control method based on the Hall sensors, after the motor runs, whether at least one Hall sensor in a Hall sensor group in the motor fails or not is judged, and if at least one Hall sensor fails, whether the Hall sensor group can work in a failure mode or not is judged. If the Hall sensor group can work in a fault mode, calculating the angle between the rotor and a preset coordinate axis arranged on the stator according to a first calculation method; and finally, carrying out vector control on the motor according to the angle. By adopting the method, when the motor runs, the fault diagnosis is firstly carried out on the Hall sensor, and the accuracy and the credibility of the calculated angle position are ensured. The motor is degraded through the calculated angle, so that the motor runs stably, and a driver can be allowed to drive the vehicle to a maintenance point for maintenance under the condition that the Hall sensor fails. Meanwhile, when the Hall sensor has serious faults, the motor is forbidden to operate, and the safety of the vehicle is ensured.
Furthermore, when the Hall sensor is normal and has faults, the angle between the motor rotor and the preset coordinate axis is estimated through different algorithms, meanwhile, the manufacturing error of the Hall sensor is considered, and the angle error generated in the manufacturing and mounting processes is corrected through the compensation amount, so that the accurate angle position of the rotor on the whole circumference is obtained, and the Hall sensor can accurately operate.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Drawings
Some specific embodiments of the invention will be described in detail hereinafter, by way of illustration and not limitation, with reference to the accompanying drawings. The same reference numbers in the drawings identify the same or similar elements or components. Those skilled in the art will appreciate that the drawings are not necessarily drawn to scale. In the drawings:
FIG. 1 is a schematic flow diagram of a Hall sensor based motor control method according to one embodiment of the present invention;
FIG. 2 is a schematic block diagram of a Hall sensor group disposed on a motor, according to one embodiment of the present invention;
FIG. 3 is a schematic flow diagram of a Hall sensor based motor control method according to another embodiment of the present invention;
FIG. 4 is a graph of the output signals of the Hall sensor group shown in FIG. 2 operating normally;
fig. 5 is a graph of an output signal when the C sensor of the hall sensor group shown in fig. 2 fails.
Detailed Description
Fig. 1 is a schematic flow diagram of a hall sensor based motor control method according to one embodiment of the present invention. Fig. 2 is a schematic structural view of a hall sensor group disposed on a motor according to one embodiment of the present invention. Fig. 3 is a schematic flow chart of a hall sensor based motor control method according to another embodiment of the present invention. Fig. 4 is a graph of the output signals of the hall sensor group shown in fig. 2 operating normally. Fig. 5 is a graph of an output signal when the C sensor of the hall sensor group shown in fig. 2 fails. A hall sensor based motor control method and system according to an embodiment of the present invention will be described with reference to fig. 1 to 5.
As shown in fig. 1, the motor control method based on hall sensor of the present invention includes:
step S101, judging whether at least one Hall sensor in a Hall sensor group in the power supply fails;
step S102, when at least one Hall sensor breaks down, judging whether the Hall sensor group can work in a failure mode;
step S103, if the Hall sensor group can work in a fault mode, calculating the angle between the rotor and a preset coordinate axis arranged on the stator according to a first calculation method;
and step S104, carrying out vector control on the motor according to the angle.
By adopting the method, when the motor runs, the fault diagnosis is firstly carried out on the Hall sensor, and the accuracy and the credibility of the calculated angle position are ensured. The motor is degraded through the calculated angle, so that the motor runs stably, and a driver can be allowed to drive the vehicle to a maintenance point for maintenance under the condition that the Hall sensor fails. Meanwhile, when the Hall sensor has serious faults, the motor is forbidden to operate, and the safety of the vehicle is ensured.
Specifically, in step S101, determining whether at least one hall sensor in a hall sensor group in the electrical machine has a fault includes:
continuously sampling the signal values output by the Hall sensor group, wherein the continuous sampling refers to collecting and processing signals acquired by the Hall sensors each time;
comparing the signal values output by the hall sensor group twice in succession, generally, the interval between two adjacent output signals of each hall sensor is 200 microseconds, of course, it can also be 100 microseconds, 300 microseconds or other time, the numerical values listed here are not limited to the range, and only an example is given;
if the signal values output twice are the same, judging that the Hall sensor group does not have a fault; if the signal values output twice are different, judging that the Hall sensor group is likely to have a fault, and carrying out the next step;
obtaining a plurality of values which change in signal values output by a Hall sensor group after a rotor rotates for one circle, wherein any two values in the plurality of values are different;
judging whether the result calculated according to the plurality of numerical values is a preset value or not;
if so, judging that the Hall sensor group does not have a fault, and calculating the angle between the rotor of the motor and the preset shaft according to a second calculation method; if not, the Hall sensor group is judged to have a fault.
Further, in step S102, when at least one hall sensor fails, determining whether the hall sensor group can operate in the failure mode includes:
when one Hall sensor in the Hall sensor group breaks down, the Hall sensor group is judged to work in a failure mode;
when two or more Hall sensors in the Hall sensor group have faults, the Hall sensor group is judged to be incapable of working in a fault mode, and the motor is controlled to stop working.
Further, in the embodiment of the present invention, the hall sensor group includes at least three hall sensors, which may be four, five or six. Preferably, the hall sensor group comprises three sensors, so that the cost is saved, and the algorithm is accurate and reliable.
In a particular embodiment of the present invention,
calculating the angle between the rotor and the preset coordinate axis according to the first calculation method or the second calculation method comprises the following steps:
calculating an extreme value a0 of the angle between the rotor and a preset coordinate axis;
correcting the error of the Hall sensor group;
calculating the rotational speed of the rotor;
calculating the angular acceleration of the rotor;
and according to the extreme value, the error, the rotation angle speed and the angle between the rotation angle acceleration rotor and the preset coordinate axis.
When the angle between the rotor and the preset coordinate axis is calculated according to the first calculation method, calculating an extreme value a0 of the angle between the rotor and the preset coordinate axis includes;
the circumferential area where the stator is located is divided into 6 sub-areas U1, U2, U3, U4, U5 and U6 according to 3 Hall sensors in an equal way;
when the magnetic poles of the motor rotor are positioned in different sub-areas, the Hall sensor groups output different signal values Y1, Y2, Y3, Y4, Y5 and Y6; wherein each signal value corresponds to an angle range (R)61~R12)、(R12~R23)、(R23~R34)、(R34~R45)、(R45~R56)、(R56~R61);
When one of the hall sensors fails, the failed hall sensor cannot generate a signal value, and the extreme value a0 is calculated as follows:
if the signal value jumps from Y1 to Y2, the extreme value is R12;
If the signal value jumps from Y2 to Y3, the extreme value is R23;
If the signal value jumps from Y3 to Y0, the extreme value is R30;
If the signal value jumps from Y0 to Y1, the extreme value is R01。
When the angle between the rotor of the motor and the preset axis is calculated according to the second calculation method, calculating an extreme value a0 of the angle between the rotor and the preset coordinate axis includes;
the circumferential area where the stator is located is divided into 6 sub-areas U1, U2, U3, U4, U5 and U6 according to 3 Hall sensors in an equal way;
when the magnetic poles of the motor rotor are positioned in different sub-areas, the Hall sensor groups output different signal values Y1, Y2, Y3, Y4, Y5 and Y6; wherein each signal value corresponds to an angle range (R)61~R12)、(R12~R23)、(R23~R34)、(R34~R45)、(R45~R56)、(R56~R61);
The extremum a0 is calculated as follows:
if the signal value jumps from Y1 to Y2, the extreme value is R12;
If the signal value jumps from Y2 to Y3, the extreme value is R23;
If the signal value jumps from Y3 to Y4, the extreme value is R34;
If the signal value jumps from Y4 to Y5, the extreme value is R45;
If the signal value jumps from Y5 to Y6, the extreme value is R56;
If the signal value jumps from Y6 to Y1, the extreme value is R61。
Furthermore, when the Hall sensor is normal and has faults, the angle between the motor rotor and the preset coordinate axis is estimated through different algorithms, meanwhile, the manufacturing error of the Hall sensor is considered, and the angle error generated in the manufacturing and mounting processes is corrected through the compensation amount, so that the accurate angle position of the rotor on the whole circumference is obtained, and the Hall sensor can accurately operate.
In particular, the method for detecting the specific failed hall sensor in the hall sensor group comprises the following steps:
acquiring a plurality of values which change in signal values output by a Hall sensor group when a rotor rotates for one circle, wherein any two values in the plurality of values are different; meanwhile, extracting partial numerical values irrelevant to the target Hall sensor from the plurality of numerical values;
judging whether a first result calculated according to the plurality of numerical values is a first preset value or not; meanwhile, whether a second result calculated according to the partial numerical value is a second preset value is judged;
and if the first result is different from the first preset value and the second result is the same as the second preset value, judging that the target Hall sensor has a fault.
In a preferred embodiment, before determining whether at least one hall sensor in the hall sensor group in the motor has a fault, the method further includes:
judging whether the rotating speed of the motor is lower than a preset threshold value or not; the preset threshold may be 30 rpm, or may be other values, which are not limited in detail herein;
if the rotating speed is lower than a preset threshold value, calculating the angle between the rotor and a preset coordinate axis arranged on the stator according to a third calculation method, and then carrying out vector control on the motor according to the angle; and if the rotating speed is greater than or equal to the preset threshold value, judging whether at least one Hall sensor in the Hall sensor group in the power-off machine fails.
Further, the third calculation method includes:
the circumferential area where the stator is located is divided into 6 sub-areas U1, U2, U3, U4, U5 and U6 according to 3 Hall sensors in an equal way;
when the magnetic poles of the rotor are positioned in different sub-areas, the Hall sensor groups output different signal values Y1, Y2, Y3, Y4, Y5 and Y6; wherein each signal value corresponds to an angle range (R)61~R12)、(R12~R23)、(R23~R34)、(R34~R45)、(R45~R56)、(R56~R61)。
The invention also provides a motor applying the motor control method introduced in any embodiment, referring to fig. 2, three hall sensors are fixed on a stator of the motor, and the three hall sensors equally divide a circumferential area of the stator into six areas.
The motor and the motor control method will be described in detail with reference to fig. 2 to 5.
The permanent magnet synchronous motor is widely applied to pure electric vehicles and various hybrid electric vehicles, and in the process of controlling the torque of the motor, the relationship between the output torque and the stator current of the permanent magnet synchronous motor is as follows:
Trq=3/2p×ψf×is
where p is the pole pair number of the motor rotor (p is a scalar without units). PsifIs the magnetic flux of the rotor of the machine,. psifIs a vector in weber. i.e. isThe unit is ampere of a current vector synthesized by three-phase stator windings of the synchronous motor. The precision requirement of the output torque of the permanent magnet synchronous motor is high in the processes of starting, accelerating and decelerating of the automobile, and the output torque of the motor is psifAnd isVector multiplication is adopted, so that the included angle between the rotor magnetic pole and the coordinate fixedly connected to the stator needs to be accurately known when the torque is controlled.
Referring to fig. 2, fig. 2 shows a hall sensor mounting method on a permanent magnet synchronous motor, wherein A, B, C is three hall sensors, which are fixed on a stator and do not follow the rotation of a motor rotor. The rotor of the synchronous motor is marked N-S, and when the magnetic pole fixed on the rotor rotates together with the rotor and approaches the hall sensor, it induces current on the sensor, thereby outputting a high level signal, and when the magnetic pole fixed on the rotor is farther from the hall sensor, the induced current disappears, thereby outputting a low level signal. Thus, when the rotor magnetic poles rotate, high and low current signals shown in fig. 4 are induced on A, B, C three hall sensors. The X axis of a coordinate system is fixed on the stator and is in the same straight line with the Hall sensor B, and the included angle a between the N axis and the X axis of the rotor magnetic pole is set to be the included angle a which needs to be calculated, so that the method plays a key role in vector control of the motor. Because the three Hall sensors fixedly connected to the stator divide the circumference into 6 intervals, the accurate position of the rotor can not be estimated directly through the Hall sensors, but a certain calculation method is needed.
Signals output by A, B, C three hall sensors are input to a port of a Motor Controller (MCU), the MCU reads data at an input port in real time and records the data as Y ═ ABC (when a, B or C is high, 1 is recorded, when a is low, 0 is recorded, and Y is a binary number).
Corresponding to the mounting method of fig. 1, six cases where the Y value is Y5, Y4, Y6, Y2, Y3, and Y1 (for example, 101, 100, 110, 010, 011, and 001) are respectively denoted as regions U5, U4, U6, U2, U3, and U1. The logical relationship between the following calculation steps is briefly explained with reference to a flowchart shown in fig. 3.
When the motor is not started or the rotation speed is low, a calculation method (third calculation method) is used to estimate the position of the rotor magnetic pole. The calculation method is as follows:
the circumferential area where the stator is located is divided into 6 sub-areas U1, U2, U3, U4, U5 and U6 according to 3 Hall sensors in an equal way;
when the magnetic poles of the rotor are positioned in different sub-areas, the Hall sensor groups output different signal values Y1, Y2, Y3, Y4, Y5 and Y6; wherein each signal value corresponds to an angle range (R)61~R12)、(R12~R23)、(R23~R34)、(R34~R45)、(R45~R56)、(R56~R61);
If Y is Y5, the range of the rotation angle a of the magnetic pole is R15~R54A value of (e.g., - π/6 to π/6);
if Y is Y4, the range of the rotation angle a of the magnetic pole is R54~R46A value of (e.g., π/6 to π/2);
if Y is Y6, the range of the rotation angle a of the magnetic pole is R46~R62A value of (e.g., pi/2 to 5 pi/6);
if Y is Y2, the range of the rotation angle a of the magnetic pole is R62~R23A value of (e.g., 5 π/6 to 7 π/6);
if Y is Y3, the range of the rotation angle a of the magnetic pole is R23~R31A value of (e.g., 7 π/6 to 3 π/2);
if Y is Y1, the range of the rotation angle a of the magnetic pole is R31~R15A value of (e.g., 3 π/2 to 11 π/6).
When the motor speed exceeds a certain threshold value, another method is adopted to estimate the position of the rotor magnetic pole. The calculation method is as follows:
step 1, judging whether a Y value jumps or not by adopting the following method;
continuously sampling Y by MCU, recording the current value as Y(k)The last sampling period has a value of Y(k-1)If Y is(k)≠Y(k-1)When the Y value is determined to have jumped and the angle of the sensor has changed in the region, the timing is t1(k)(ii) a When the motor is started or at low speed, the angular range of the motor rotor is estimated, and the difference value between the output torque of the permanent magnet synchronous motor and the expected torque can be within the allowable range of the system by using the rough angle.
Step 2, diagnosing faults of the Hall sensor group;
the method for detecting whether the Hall sensor is normal comprises the following steps:
for example, the values in which the Y value has changed most recently several times (n times, and n ≧ 6) are recorded in the memory unit of the MCU, and are chronologically recorded as queues S (0), S (1), S (2), S (3), S (4), S (5) … … S (n-1), and the rotation direction flag sgn of the motor rotor is recorded. Periodically analyzing the n data at intervals of a certain time Tcheck, if the rotating direction of the motor rotor does not change in the period from S (0) to S (n-1) in the recorded queue, we can judge A, B, C whether three Hall sensors have faults. Such as:
(1) when in useWhen the sensor group is in a fault state (S6 is a constant), the Hall sensor group has no fault, and HallErr is 0;
further, the method of detecting a failure of one of the hall sensors A, B or C:
referring to fig. 5, when the hall sensor C has an open-circuit fault, the signal output by C is always low (C may also always output high when the circuit of the hall sensor C has a short-circuit to the power supply).
N data of the queue S are recorded and analyzed periodically, and if the rotating direction of the motor rotor does not change in the period from S (0) to S (n-1) in the queue recording process, the fact that A, B, C Hall sensors have faults can be judged. Such as, for example,
the above method can be used to determine whether the combination of the two sensors is normal (u and v are any one of ABC) or not, and whether the combination of the two sensors is normal or not. For example, in one case, sensor A, B failed, halaberr is 0, but sensor C failed, halcerr is 1.
sensor A, B failure, HallABErr ═ 1; sensor C fails, HallCErr 1.
When the motor runs, the fault diagnosis is firstly carried out on the Hall sensor group, the sensor is ensured to be normal, and the calculated angle position is accurate and credible. The power part of the automobile relates to the life safety of a driver and passengers, and once the position sensor of the rotor magnetic pole of the permanent magnet synchronous motor breaks down, the MCU is given wrong angle feedback, so that the automobile loses power; the motor can output wrong torque or even opposite torque seriously, which can cause serious damage to the automobile so as to endanger the life safety of passengers.
Therefore, it is necessary to perform fault judgment on A, B, C hall sensors and sampling circuits of the MCU, and once a hall sensor fault is detected, the control strategies of the synchronous motor are respectively adopted to perform degraded operation with a fault of the motor and the vehicle, prohibit the motor from operating but the vehicle can operate with a fault, prohibit the motor from operating but allow the vehicle to operate, and prohibit the motor from operating with a start of the vehicle according to the severity of the fault mode.
Step 3, processing the three Hall sensors normally; in the case where all three hall sensors are normal, the exact angular position of the rotor over the entire circumference is calculated by estimating the angular velocity and angular acceleration of the motor rotor. The method comprises the following specific steps:
calculating the extreme value a0 of the included angle between the magnetic pole of the motor rotor and the X axis,
if the value of Y is a jump from Y5 to Y4 (or Y4 to Y5), then take a0 to R54(e.g., π/6);
if the value of Y is a jump from Y4 to Y6 (or Y6 to Y4), then take a0 to R46(e.g., π/2);
if the value of Y is a jump from Y6 to Y2 (or Y2 to Y6), then take a0 to R26(e.g., 5 π/6);
if the value of Y is a jump from Y2 to Y3 (or Y3 to Y2), then take a0 to R23(e.g., 7 π/6);
if the value of Y is a jump from Y3 to Y1 (or Y1 to Y3), then take a0 to R31(e.g., 3 π/2);
if the value of Y is a jump from Y1 to Y5 (or Y5 to Y1), then take a0 to R15(e.g., 11 π/6);
step 4, processing that one of three Hall sensors ABC has a fault;
when 1 of A, B, C three hall sensors has a fault, we can still calculate the position angle of the synchronous motor rotor magnetic pole, marked as a, by the following method when certain conditions (such as stable automobile speed) are met, so that the motor can have partial functions, and the user can drive the vehicle to a nearby maintenance point for repair.
The included angle of the rotor can be estimated under the condition that the two Hall sensors are normal by the following method. The method of calculating a0 in step 3 is modified as follows,
if the value of Y is a jump from Y4 to Y6 (or Y6 to Y4), then take a0 to R46;
If the value of Y is a jump from Y6 to Y2 (or Y2 to Y6), then take a0 to R62;
If the value of Y is a jump from Y2 to Y0 (or Y0 to Y2), then take a0 to R20;
If the value of Y is a jump from Y0 to Y4 (or Y4 to Y0), then take a0 to R04。
In the case of a failure of the hall sensor (for example, in the case of only two normal conditions), if the motor is operating smoothly, the angular velocity and the angular acceleration of the rotor of the motor can still be estimated to calculate the angular position of the rotor over the entire circumference, and the angle thus obtained can allow the driver to drive the vehicle to a maintenance point for maintenance in the case of a failure by degrading the function of the motor. The angular errors are corrected by the compensation amount taking into account manufacturing and installation errors during the calculation of the angle, the angular velocity and the angular acceleration.
Step 5, two or more than two faults of the Hall sensors are processed;
if two or more Hall sensors of the motor have faults, so that the included angle between the magnetic pole of the rotor and the X axis fixed on the stator is very inaccurate, at this time, the faults of the motor need to be reported, the torque output of the motor is forbidden, and meanwhile, the steps 6 to 11 are skipped, and the calculation cycle of the next included angle a is prepared.
Step 6, correcting Hall sensor error delta aij(represents the compensation of the Y value jumping from i to j);
due to installation and manufacturing errors of the Hall sensors, 3 Hall sensors do not divide the circumference into 6 equal parts on average, but have certain errors which cannot be ignored sometimes, and compensation correction is needed here, wherein the correction value is an error obtained through actual measurement and is marked as delta aij;
Step 7, calculating the angular velocity (unit is rad/s) of the motor rotor2);
In the case of a normal hall sensor signal, the MCU can capture the time interval between Y value jump from Yi to Yj, denoted as T1, and the rotational angular velocity of the rotor magnetic pole, denoted as ω, then:
wherein: sgn ═ 1, when the motor rotor rotates counterclockwise;
sgn ═ -1, when the motor rotor rotates clockwise;
in order to eliminate the fluctuation of ω due to the calculation error and the torque ripple, the rotor angular velocity ω is calculated a plurality of times and weighted and averaged to filter out the noise of the disturbance.
Step 8, calculating the angular acceleration (unit is rad/s) of the motor rotor2);
Carrying out differential operation on the angular velocity omega of the motor rotor and carrying out filtering processing to obtain angular acceleration
αr=dω/dt;
To rotor angular acceleration alpharAnd carrying out multiple calculations and weighted averaging to filter out interference noise.
Step 9, calculating an included angle a between the magnetic pole of the rotor of the synchronous motor and the X axis at the moment between two jumps of the Y value;
using the extreme position value a0, the angular velocity value omega, and the angular acceleration value of the motor rotor magnetic poleαrThe included angle of the magnetic poles of the motor rotor is calculated by the following formula,
a=a0+Δaij+ω×Δt+αr×Δt2/2;
wherein Δ aijThe latest jump of the Y value is shown as the installation error of an included angle from i jump to j; t-t1(k)T denotes the current time, t1(k)Representing the moment of the latest jump of the Y value;
due to errors and ripples in the calculation, the calculation result needs to be limited reasonably. And (3) limiting the value range of the angle a up and down:
when omega is greater than 0, the motor runs anticlockwise, and the angle range is [ a0, a0+ delta ij ];
when omega is less than 0, the motor runs clockwise, and the angle range is [ a 0-delta ij, a0 ];
where Δ ij refers to the angle into which the hall sensor divides the Y value in the transition from i to j.
Step 11, outputting a result:
if the Hall sensor group of the motor has no fault, the included angle a between the magnetic pole of the rotor of the motor and the X axis fixed on the stator, which is obtained through the calculation in the steps 1 to 9, is effective, and can be output to a motor control part to carry out vector control on the synchronous motor, and the step 1 is carried out to calculate the angle of the magnetic pole of the rotor of the synchronous motor in the next period. And stopping the torque output of the motor if the Hall sensor of the motor has a fault.
Step 12, preparing to calculate the magnetic pole angle of the synchronous motor rotor in the next period:
before the next calculation cycle, the MCU is required to monitor the motor operating state, such as whether the output torque is abnormal, whether the system voltage of the motor is abnormal, etc. And then jumps to the next operating cycle.
In fig. 3, it should be noted that, when the motor is just started, if the hall sensor group works normally, and when the Y value does not jump, the fault diagnosis is not performed, and since the rotation speed of the motor is fast, the rotor will be shifted from one region to another region in a short time after the motor is started, and the Y value jumps, the above steps are not reflected in the diagram. Meanwhile, after the Y value jumps for the first time, in the subsequent calculation process, when the Y value does not jump, the process directly proceeds to step 6, and a0 in the subsequent step adopts the value of a0 calculated in the previous period.
By adopting the motor, when the motor runs, the fault diagnosis is firstly carried out on the Hall sensor, and the accuracy and the credibility of the calculated angle position are ensured. The angular error in the manufacturing and installation process is corrected by the compensation amount in consideration of the manufacturing error of the hall sensor. Under the condition that the Hall sensors are normal, the accurate angular position of the rotor on the whole circumference is obtained by estimating the angular speed and the angular acceleration of the rotor of the motor. Under the condition that the condition allows, when the Hall sensor breaks down, the angle of the motor rotor is obtained by adopting a certain algorithm, and the Hall sensor is allowed to run with the fault.
Thus, it should be appreciated by those skilled in the art that while a number of exemplary embodiments of the invention have been illustrated and described in detail herein, many other variations or modifications consistent with the principles of the invention may be directly determined or derived from the disclosure of the present invention without departing from the spirit and scope of the invention. Accordingly, the scope of the invention should be understood and interpreted to cover all such other variations or modifications.
Claims (8)
1. A motor control method based on a Hall sensor is characterized by comprising the following steps:
judging whether at least one Hall sensor in a Hall sensor group in the power supply fails;
when at least one Hall sensor breaks down, judging whether the Hall sensor group can work in a fault mode;
if the Hall sensor group can work in a fault mode, calculating an angle between a rotor and a preset coordinate axis arranged on a stator according to a first calculation method;
carrying out vector control on the motor according to the angle;
the judging whether at least one Hall sensor in a Hall sensor group in the power supply device has a fault comprises the following steps:
continuously sampling the signal values output by the Hall sensor group;
comparing the signal values output by the Hall sensor group twice continuously;
if the signal values output twice are the same, judging that the Hall sensor group does not have a fault; if the signal values output twice are different, the Hall sensor group is judged to be possibly failed, and the next step is carried out;
obtaining a plurality of values which change in the signal values output by the Hall sensor group after the rotor rotates for one circle, wherein any two values in the plurality of values are different;
judging whether the result calculated according to the numerical values is a preset value or not;
if so, judging that the Hall sensor group does not have a fault, and calculating the angle between the rotor of the motor and a preset shaft according to a second calculation method; if not, judging that the Hall sensor group has a fault;
the calculating the angle of the rotor with the preset coordinate axis according to the first calculation method or the second calculation method includes:
calculating an extreme value a0 of the angle between the rotor and the preset coordinate axis;
correcting the error of the Hall sensor group;
calculating the rotational speed of the rotor;
calculating the angular acceleration of the rotor;
and calculating the angle between the rotor and a preset coordinate axis according to the extreme value, the error, the corner speed and the corner acceleration.
2. The motor control method according to claim 1,
when at least one Hall sensor breaks down, judging whether the Hall sensor group can work under a fault mode comprises the following steps:
when one Hall sensor in the Hall sensor group has a fault, judging that the Hall sensor group can work in a fault mode;
and when more than two Hall sensors in the Hall sensor group have faults, judging that the Hall sensor group cannot work in a fault mode, and controlling the motor to stop working.
3. The motor control method according to claim 1,
when the angle between the rotor and a preset coordinate axis is calculated according to a first calculation method, calculating an extreme value a0 of the angle between the rotor and the preset coordinate axis includes;
equally dividing a circumferential region where the stator is located into 6 sub-regions U1, U2, U3, U4, U5 and U6 according to 3 Hall sensors;
when the magnetic poles of the motor rotor are positioned in different sub-areas, the Hall sensor groups output different signal values Y1, Y2, Y3, Y4, Y5 and Y6; wherein each signal value corresponds to an angle range (R)61~R12)、(R12~R23)、(R23~R34)、(R34~R45)、(R45~R56)、(R56~R61);
When one of the hall sensors fails, the failed hall sensor cannot generate a signal value, and the extreme value a0 is calculated as follows:
if the signal value jumps from Y1 to Y2, the extreme value is R12;
If the signal value jumps from Y2 to Y3, the extreme value is R23;
If the signal value jumps from Y3 to Y0, the extreme value is R30;
If the signal value jumps from Y0 to Y1, the extreme value is R01。
4. The motor control method according to claim 3,
when the angle between the rotor of the motor and a preset axis is calculated according to a second calculation method, calculating an extreme value a0 of the angle between the rotor and the preset coordinate axis includes;
equally dividing a circumferential region where the stator is located into 6 sub-regions U1, U2, U3, U4, U5 and U6 according to 3 Hall sensors;
when the magnetic poles of the motor rotor are positioned in different sub-areas, the Hall sensor groups output different signal values Y1, Y2, Y3, Y4, Y5 and Y6; wherein each signal value corresponds to an angle range (R)61~R12)、(R12~R23)、(R23~R34)、(R34~R45)、(R45~R56)、(R56~R61);
The extremum a0 is calculated as follows:
if the signal value jumps from Y1 to Y2, the extreme value is R12;
If the signal value jumps from Y2 to Y3, the extreme value is R23;
If the signal value jumps from Y3 to Y4, the extreme value is R34;
If the signal value jumps from Y4 to Y5, the extreme value is R45;
If the signal value jumps from Y5 to Y6, the extreme value is R56;
If the signal value jumps from Y6 to Y1, the extreme value is R61。
5. The motor control method according to claim 1,
the method for detecting the specific failed Hall sensor in the Hall sensor group comprises the following steps:
acquiring a plurality of values which change in the signal values output by the Hall sensor group when the rotor rotates for one circle, wherein any two values in the plurality of values are different; extracting partial values irrelevant to the target Hall sensor from the plurality of values;
judging whether a first result calculated according to the plurality of numerical values is a first preset value or not; meanwhile, whether a second result calculated according to the partial numerical value is a second preset value is judged;
and if the first result is different from the first preset value and the second result is the same as a second preset value, judging that the target Hall sensor has a fault.
6. The motor control method according to claim 1,
before judging whether at least one Hall sensor in the Hall sensor group in the power supply device has a fault, the method further comprises the following steps:
judging whether the rotating speed of the motor is lower than a preset threshold value or not;
if the rotating speed is lower than the preset threshold value, calculating the angle between the rotor and a preset coordinate axis arranged on the stator according to a third calculation method, and then carrying out vector control on the motor according to the angle; and if the rotating speed is greater than or equal to a preset threshold value, judging whether at least one Hall sensor in a Hall sensor group in the motor breaks down.
7. The motor control method according to claim 6,
the third calculation method includes:
equally dividing a circumferential region where the stator is located into 6 sub-regions U1, U2, U3, U4, U5 and U6 according to 3 Hall sensors;
when the magnetic poles of the rotor are positioned in different sub-areas, the Hall sensor groups output different signal values Y1, Y2, Y3, Y4, Y5 and Y6; wherein each signal value corresponds to an angle range (R)61~R12)、(R12~R23)、(R23~R34)、(R34~R45)、(R45~R56)、(R56~R61)。
8. An electric machine to which the motor control method according to any one of claims 1 to 7 is applied, characterized in that three hall sensors are fixed to a stator of the electric machine, and the three hall sensors equally divide a circumferential region of the stator into six regions.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910380868.1A CN110061673B (en) | 2019-05-08 | 2019-05-08 | Motor control method and system based on Hall sensor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910380868.1A CN110061673B (en) | 2019-05-08 | 2019-05-08 | Motor control method and system based on Hall sensor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110061673A CN110061673A (en) | 2019-07-26 |
CN110061673B true CN110061673B (en) | 2021-01-15 |
Family
ID=67322650
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910380868.1A Active CN110061673B (en) | 2019-05-08 | 2019-05-08 | Motor control method and system based on Hall sensor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110061673B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112468027A (en) * | 2020-12-09 | 2021-03-09 | 北京润科通用技术有限公司 | Hall fault determination method and system for unidirectional rotation control of motor |
CN112821812A (en) * | 2021-03-19 | 2021-05-18 | 浙江工业大学 | Combined control method and system based on Hall sensor motor |
CN113328673B (en) * | 2021-04-22 | 2022-12-02 | 深圳赛美控电子科技有限公司 | Method and device for determining position of motor rotor, motor and storage medium |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007151266A (en) * | 2005-11-25 | 2007-06-14 | Mitsuba Corp | Driver for brushless motor and its driving method |
CN103438920A (en) * | 2013-08-23 | 2013-12-11 | 同济大学 | Fault diagnosis method, fault-tolerant control method and fault-tolerant control system of BLDC position sensor |
CN103472263A (en) * | 2013-09-03 | 2013-12-25 | 清华大学 | Fault diagnosing method for hall sensor of permanent magnet synchronous motor |
CN105305914B (en) * | 2014-07-10 | 2018-07-03 | 珠海格力节能环保制冷技术研究中心有限公司 | Angle evaluation method and device, motor vector control method and system and motor |
CN105391362A (en) * | 2015-10-29 | 2016-03-09 | 天津市松正电动汽车技术股份有限公司 | DC brushless motor Hall sensor control algorithm |
CN107612435B (en) * | 2017-09-11 | 2020-04-03 | 珠海格力节能环保制冷技术研究中心有限公司 | Method and device for calculating speed of motor rotor, storage medium and processor |
CN109687809B (en) * | 2018-12-05 | 2020-06-09 | 北京控制工程研究所 | Brushless direct current motor Hall sensor real-time fault identification reconstruction system and method |
CN109546902B (en) * | 2018-12-31 | 2020-09-11 | 成都纵横自动化技术股份有限公司 | Phase-change control method and device for power inverter |
-
2019
- 2019-05-08 CN CN201910380868.1A patent/CN110061673B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN110061673A (en) | 2019-07-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110061673B (en) | Motor control method and system based on Hall sensor | |
US8378605B2 (en) | Method and apparatus for monitoring a system including a sensorless electric motor | |
CN105375833B (en) | Drive system of electric automobile malfunction monitoring and fault tolerant control method | |
US7973504B2 (en) | Electric power steering control | |
CN108372881B (en) | Fault tolerant field-oriented control for electric power steering | |
CN104422918B (en) | Method for detecting current sensor fault in electronic drive system by using voltage command error | |
WO2012090677A1 (en) | Hybrid vehicle system and control method thereof | |
Ebadpour et al. | Fast fault-tolerant control for improved dynamic performance of Hall-sensor-controlled brushless DC motor drives | |
US11136064B2 (en) | Rotation detection device and steering system | |
US10879820B2 (en) | Control device for brushless DC servo motor | |
KR101704215B1 (en) | Control method of motor | |
JP5104647B2 (en) | Control device and control method for hybrid vehicle | |
JP2015502736A (en) | Drive inverter with abnormal torque reversal detector | |
JP7343269B2 (en) | Motor control device and control method | |
CN110995086A (en) | Permanent magnet synchronous motor, control method and device thereof and storage medium | |
JP2002325493A (en) | Motor controller | |
CN112821812A (en) | Combined control method and system based on Hall sensor motor | |
KR101989596B1 (en) | System and method for controlling motor | |
CN109842328A (en) | The method for calculating motor position using Hall sensor | |
JP5605312B2 (en) | Rotating machine control device | |
JP2013017352A (en) | Motor drive device | |
CN112436770A (en) | Fault monitoring method for automobile motor speed sensor, electronic equipment and storage medium | |
JP3903478B2 (en) | Control device for permanent magnet type synchronous motor | |
WO2017138021A1 (en) | Method and system for controlling an integrated starter-generator | |
CN109874394B (en) | Method and monitoring device for monitoring an electric machine of an electrically driven vehicle |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |