Brushless direct current motor phase commutation method based on digital Hall sensor
Technical Field
The invention relates to the field of brushless direct current motor control, in particular to a brushless direct current motor phase change method based on a digital Hall sensor.
Background
Brushless dc motors were developed from brushed dc motors. Compared with a brush motor, the brushless direct current motor has the advantages of simple structure, large output and good speed regulation performance. Therefore, the brushless dc motor is widely used in the industrial field. In order to improve the commutation method, in recent years, domestic research institutions have successively developed control methods based on different hardware structures and software programming, including designing the installation position of the hall sensor and designing the execution flow of software.
The patent application number 201510724513.1 provides a 'Hall sensor control algorithm of a direct current brushless motor', which adopts an installation method that the adjacent Hall A, Hall B and Hall C have a difference of 120 degrees to detect the position of a rotor, and can quickly detect the position of a failed Hall and effective fault processing measures when the Hall fails.
The invention patent with the patent application number of 201210467230.X provides a brushless direct current motor position detection method, which detects rising edge or falling edge jump through a capture port to obtain a commutation control word so as to carry out commutation.
The Hall commutation is mainly used for improving the stability of detection and the effectiveness of fault treatment, plays a good role in commutation in the running process of the motor rotor, does not relate to the stator state of the motor, and after the motor rotor is started, if the difference between the rotor of the motor and the fixed rotating speed is reduced, the phenomenon of commutation disorder can occur by applying the current motor commutation method when the stator of the motor rotates.
Disclosure of Invention
The invention provides a brushless direct current motor phase change method based on a digital Hall sensor, which is suitable for controlling a spring motor of a low-speed double-rotation fixed duck rudder, and can start the motor and control the motor to reach a preset rotating speed in a state that a stator rotates or is fixed.
The technical scheme for realizing the purpose of the invention is as follows: a brushless direct current motor phase change method based on a digital Hall sensor comprises the following specific steps:
step 1, the initial state of the motor is a P state, namely the three-phase winding is not electrified, phase change is carried out from the P state, when D =0, the step 2 is carried out, and when D =1, the step 4 is carried out;
step 2, detecting the value of the three-phase Hall control word Y, and turning to step 3;
if Y =1, electrifying the AB phase;
if Y =2, electrifying the BC phase;
if Y =3, energizing the AC phase;
if Y =4, electrifying the CA phase;
if Y =5, electrifying the CB phase;
if Y =6, electrifying the BA phase;
step 3, entering a cyclic energization state, namely, AB → AC → BC → BA → CA → CB → AB, when the AB phase is energized and X =1 is detected, energizing the AC phase, when the AC phase is energized and X =1 is detected, energizing the BC phase, when the BC phase is energized and X =1 is detected, energizing the BA phase, when the BA phase is energized and X =1 is detected, energizing the CA phase, when the CA phase is energized and X =1 is detected, energizing the CB phase, when the CB phase is energized and X =1 is detected, energizing the AB phase;
step 4, detecting the value of the three-phase Hall control word Y, and turning to step 5;
if Y =1, electrifying the CA phase;
if Y =2, electrifying the AB phase;
if Y =3, energizing the CB phase;
if Y =4, electrifying the BC phase;
if Y =5, electrifying the BA phase;
if Y =6, energizing the AC phase;
and step 5, entering a cyclic energization state, namely AB → CB → CA → BA → BC → AC → AB, energizing the CB phase when the AB phase is energized and X =1 is detected, energizing the CA phase when the CB phase is energized and X =1 is detected, energizing the BA phase when the CA phase is energized and X =1 is detected, energizing the BC phase when the BA phase is energized and X =1 is detected, energizing the AC phase when the BC phase is energized and X =1 is detected, and energizing the AB phase when the AC phase is energized and X =1 is detected.
Compared with the prior art, the invention has the following remarkable advantages:
1) hall A, Hall B, Hall C place according to clockwise order, and the contained angle between adjacent double-phase is 120, obtains three-phase Hall control word simultaneously with the three passageway of a timer, improves the motor control real-time.
2) The invention can not only start the motor in the state that the stator is fixed and change the phase according to the correct phase sequence, but also start the motor in the state that the stator rotates, so that the motor changes the phase in the correct phase sequence and finally controls the motor to rotate forwards and backwards.
3) Extensive applicability can be applied to the brushless DC motor who works under special environment, for example: and (5) controlling the steering engine in a bouncing manner.
Drawings
Fig. 1 is a forward commutation state diagram of the commutation method of the brushless dc motor based on the digital hall sensor according to the present invention.
Fig. 2 is a reverse commutation state diagram of the commutation method of the brushless dc motor based on the digital hall sensor according to the present invention.
Fig. 3 is a block diagram of a control circuit of the brushless dc motor according to the present invention.
Detailed Description
The experimental platform of the brushless direct current motor phase commutation method based on the digital Hall sensor comprises a high-speed turntable, a projectile body and a torque motor. The projectile body is provided with a brushless direct current motor, the high-speed rotary table drives the projectile body to rotate in the anticlockwise direction, the force arm of the torque motor is fixed with the rotor of the brushless direct current motor, and the torque motor drives the rotor of the brushless direct current motor to rotate clockwise. When the high-speed turntable and the torque motor rotate clockwise at 5Hz and anticlockwise at 5Hz respectively, the brushless DC motor is started, and the rotor of the brushless DC motor can be reduced to a certain speed according to the phase change method of the invention. The starting and control of the brushless direct current motor under the special state are realized.
The brushless dc motor includes three parts: the motor comprises a motor body, a phase change circuit and three position sensors. The brushless DC motor used in the invention is a three-phase brushless DC motor, the three-phase windings of which are respectively A, B, C, the adopted commutation circuit is a full-bridge commutation circuit, and the position sensor used is a Hall sensor. The three hall sensors correspond to the three-phase winding A, B, C one by one and are respectively called hall A, hall B and hall C, the hall A, the hall B and the hall C are placed in the clockwise direction, and the included angle between every two phases of the hall sensors is 120 degrees.
Referring to fig. 3, the control circuit of the brushless dc motor includes a power circuit, a clock circuit, a download circuit, a driving circuit, and a controller, the power circuit: the 12V power supply generates 5V voltage through LM2576, and the 5V voltage generates 3.3V voltage through LDS3985 for supplying power. A clock circuit: an 8MHz clock is generated using XO53 as the external clock. The downloading circuit: SW mode using JTAG interface. A drive circuit: and selecting an IRS2003 chip to drive the brushless direct current motor. A controller: STM32F407VGT6 is adopted to receive three-phase Hall signals and generate PWM to control the motor. The 5V interface of the power circuit is connected with the VCC interfaces of the clock circuit, the download circuit and the drive circuit, the 5V interface of the power circuit is connected with the VCC interface of the three-phase Hall sensor in the brushless DC motor, and the 3.3V interface of the power circuit is connected with the VVC interface of the controller. And an output clock interface of the clock circuit is connected with an external clock interface of the controller. The SW interface of the downloading circuit is connected with the SW interface of the controller. And a signal output interface of the driving circuit is connected with a signal input interface of a full-bridge phase-changing circuit of the brushless direct current motor. And the PWM interface of the controller is connected with the signal input interface of the driving circuit. Three channels of the same timer in the controller are connected with signal lines of three Hall sensors of the brushless DC motor.
Referring to fig. 1 and 2, AB, AC, BC, BA, CA, CB represent the on states of the brushless dc motor. The variable X represents whether the rising edge or the falling edge of the three-phase Hall is detected, when X =0, the rising edge or the falling edge of the Hall is not detected, when X =1, the rising edge or the falling edge of the Hall is detected, phase commutation is carried out at the moment, the variable Y represents the value of 4 hc +2 hb + ha, hc represents the level value of the Hall C, hb represents the level value of the Hall B, ha represents the level value of the Hall A, Y represents a three-phase Hall control word, P represents the state of the motor when the power is not supplied, the variable D represents the steering of the motor, when D =0, the motor rotates forwards, and when D =1, the motor rotates backwards.
The invention relates to a brushless direct current motor phase change method based on a digital Hall sensor, which comprises the following specific steps:
step 1, the initial state of the motor is a P state, namely the three-phase winding is not electrified, phase change is carried out from the P state, when D =0, the step 2 is carried out, and when D =1, the step 4 is carried out;
step 2, detecting the value of the three-phase Hall control word Y, and turning to step 3;
if Y =1, electrifying the AB phase;
if Y =2, electrifying the BC phase;
if Y =3, energizing the AC phase;
if Y =4, electrifying the CA phase;
if Y =5, electrifying the CB phase;
if Y =6, electrifying the BA phase;
step 3, entering a cyclic energization state, namely, AB → AC → BC → BA → CA → CB → AB, when the AB phase is energized and X =1 is detected, energizing the AC phase, when the AC phase is energized and X =1 is detected, energizing the BC phase, when the BC phase is energized and X =1 is detected, energizing the BA phase, when the BA phase is energized and X =1 is detected, energizing the CA phase, when the CA phase is energized and X =1 is detected, energizing the CB phase, when the CB phase is energized and X =1 is detected, energizing the AB phase;
step 4, detecting the value of the three-phase Hall control word Y, and turning to step 5;
if Y =1, electrifying the CA phase;
if Y =2, electrifying the AB phase;
if Y =3, energizing the CB phase;
if Y =4, electrifying the BC phase;
if Y =5, electrifying the BA phase;
if Y =6, energizing the AC phase;
and step 5, entering a cyclic energization state, namely AB → CB → CA → BA → BC → AC → AB, energizing the CB phase when the AB phase is energized and X =1 is detected, energizing the CA phase when the CB phase is energized and X =1 is detected, energizing the BA phase when the CA phase is energized and X =1 is detected, energizing the BC phase when the BA phase is energized and X =1 is detected, energizing the AC phase when the BC phase is energized and X =1 is detected, and energizing the AB phase when the AC phase is energized and X =1 is detected.