Position Correction Control of Permanent-Magnet Brushless Motor Based on Commutation-Interval Current Symmetry

: With the needs of environmental protection and the adjustment of energy structure, new energy vehicles are playing an increasingly important role in the field of transportation today. The permanent-magnet brushless direct-current motor has the characteristics of high efficiency, and can be used in the drive system of new energy vehicles or other auxiliary equipment. In the control process of the permanent-magnet brushless direct-current motor, based on a three-Hall position sensor, due to various factors, there are some errors in the Hall position signal, which must be corrected by appropriate measures. In this paper, the relationship between the position deviation in the commutation interval and the non-commutation-phase current is analyzed, and the current expressions in three different states are given. A new closed-loop compensation strategy for correcting the inaccurate commutation caused by the Hall signal error is proposed. Taking the position of a 30 ◦ electrical angle before and after the phase-change point as the H point, realizing the current symmetry within the 30 ◦ interval around the H point as the target and the sum of the slopes of the tangent lines at the two points symmetrical within the β (0 < β < 30) electrical angle around the H point as the deviation, a proportional-integral regulator is designed to correct the phase error of the phase-change signal. Finally, it is verified by experiments that the closed-loop compensation strategy proposed in this paper can effectively compensate the phase deviation of the commutation signal at a speed of about 2000 r/min, which improves the working efficiency of the motor to a certain extent.


Introduction
With the increasing shortage of oil resources and increasingly serious environmental problems, new energy vehicles have been rapidly developed around the world.As the core of new energy vehicles, the motor-drive control system provides all the driving force for the vehicle and ensures the power and smoothability of the vehicle during the driving process.Its role is equivalent to that of the traditional car engine, which directly affects the performance of the whole vehicle [1].
The permanent-magnet brushless direct-current (DC) motor has the advantages of simple structure, strong reliability, wide working-speed range, considerable operating efficiency, etc., and can be used in the drive system of new energy vehicles or other auxiliary equipment [2][3][4].In the control of permanent-magnet brushless DC motor, the two-phase conduction mode is usually adopted.According to the position of the rotor permanent-magnet magnetic field, the conduction sequence of the three-phase winding is controlled to realize the control of the speed.Therefore, it is very important to detect the rotor position of the permanent-magnet brushless DC motor.
The permanent-magnet brushless-DC-motor rotor-position sensor generally uses three bipolar latched Hall position sensors to detect the rotor magnetic field.It has low cost and reliable operation, and the output is a 3-bit digital signal that is not susceptible to interference.The control system outputs six different three-level combined signals according to the Hall sensor, which can determine the position of the rotor magnetic field.However, this rotor-position detection method is generally not accurate enough.The bipolar Hall position sensor has a hysteresis interval, and the time of the two Hall level-change intervals is inconsistent.On the other hand, there are individual differences between the welding position of the circuit board and the installation position of the motor.Due to the hysteresis characteristics of the Hall position sensor, there is a large inconsistency between the Hall position signal of the forward rotation and the reverse rotation of the motor, so it is necessary to correct and compensate the position signal of the Hall position sensor.
At present, the rotor-position detection methods of the permanent-magnet brushless motor without a position sensor mainly include the back-electromotive-force method (EMF) [5][6][7], the flux-estimation method [8,9], the freewheeling switch-device current detection method [10], the third-harmonic method [11], and the observer method [12][13][14][15][16].The sensorless-control technology of the brushless DC motor has not yet reached a very mature stage, especially in the initial start-up under the static state.The detected position information of the rotor has a large error, which can easily cause torque pulses, starting current fluctuations, and even out-of-step phenomena in serious cases.In the high-speed state, there will also be a commutation lag or lead deviation, so most of the sensorlesscontrol technology cannot guarantee the stable operation of the motor in the full speed range.Therefore, it is a subject with practical application value to study and improve the compensation correction control method of the Hall sensor.
Research on rotor-position detection technology based on the Hall position sensor mainly includes: the estimation method of rotational speed and position in the Hall sensor [17], the fault diagnosis and correction method of the Hall sensor [18], and the design of a fault-tolerant control strategy [19,20].In the literature [21], an extended finite-state machine for motor operation is established, and then a real-time Hall sensor fault-diagnosis strategy combining the extended finite-state machine (EFSM) and the super-twisting algorithm (STA) speed observers is designed.Finally, a new Hall signal compensation strategy is proposed based on the previous two.The literature [22] first proposed a simple method to estimate the commutation error in order to solve the problem of bias in both advance and delay commutation cases, and finally compensated the second-half period by estimating the bias of the first-half period in a periodic Hall signal.The literature [23] proposed a neural-network framework based on convolutional neural network and long short-term memory (CNN-LSTM) and designed the fault-detection and signal-recovery strategy of the Hall sensor by using the sequence output of the Hall sensor for training.The proposed strategy has a high accuracy in predicting faults.
In this paper, the application principle of the Hall sensor to detect the rotor-position and the cause of the error is described.The expressions of the non-commutation phase current in three states are analyzed.The correction idea of the new closed-loop control strategy in the commutation process is explained, and the implementation scheme of the commutation correction strategy is designed.Aiming at the problem that the detection error of the Hall sensor of the brushless DC motor leads to the advance or lag of the commutation, a new method of correcting the commutation signal error is proposed.The 30 • electrical-angle position before and after the commutation point is the H point, and the current in the 30 • interval around the H point is called the target.A proportional-integral (PI) regulator is designed to correct the phase error of the commutation signal by taking the sum of the tangent slopes of the two points in the left and right symmetrical β (0 < β < 30) electrical angle of the H point as the deviation.Finally, the effectiveness of the strategy is verified by experiments.

Mathematical Modeling of Brushless DC Motors
The equivalent circuit of the permanent-magnet brushless-DC-motor system is shown in Figure 1.In the figure, R and L, respectively, represent the resistance and the inductance of each phase winding of the motor; e A , e B , and e C represent the opposite potentials of the three phases, respectively; i A , i B , and i C represent the phase currents of the three phases, respectively; u A , u B , and u C represent the phase voltages of the three phases, respectively; U dc is DC voltage; N is the neutral point of the three-phase winding with star connection; O is the reference potential.The terminal voltage expression of three-phase winding of permanent-magnet brushless DC motor is as follows: where M is the mutual inductance between the two phases of the stator windings; p is the differential operator; u NO is the voltage between point N and point O.

Mathematical Modeling of Brushless DC Motors
The equivalent circuit of the permanent-magnet brushless-DC-motor system is shown in Figure 1.In the figure, R and L , respectively, represent the resistance and the inductance of each phase winding of the motor; A e , B e , and C e represent the opposite potentials of the three phases, respectively; A i , B i , and C i represent the phase currents of the three phases, respectively; A u , B u , and C u represent the phase voltages of the three phases, respectively; dc U is DC voltage; N is the neutral point of the three-phase winding with star connection; O is the reference potential.The terminal voltage expres- sion of three-phase winding of permanent-magnet brushless DC motor is as follows: where M is the mutual inductance between the two phases of the stator windings; p is the differential operator; NO u is the voltage between point N and point O.

Rotor-Position Detection Principle
A general permanent-magnet brushless DC motor requires three Hall sensors to be installed internally to detect the rotor-position information.The Hall position sensors are mounted on the centerline of the stator teeth and are separated by a phase interval of 120° between every two Hall sensors.Provided that the rotor straight axis relative to the axis of the stator A-phase winding turned the electrical angle for the rotor-position to Angle θ , the rotor rotation of 360° for an electrical cycle, as shown in Figure 2, will be divided into an electrical cycle of six sectors, 1 S -6 S , each sector for the electrical angle of 60°.The

Rotor-Position Detection Principle
A general permanent-magnet brushless DC motor requires three Hall sensors to be installed internally to detect the rotor-position information.The Hall position sensors are mounted on the centerline of the stator teeth and are separated by a phase interval of 120 • between every two Hall sensors.Provided that the rotor straight axis relative to the axis of the stator A-phase winding turned the electrical angle for the rotor-position to Angle θ, the rotor rotation of 360 • for an electrical cycle, as shown in Figure 2, will be divided into an electrical cycle of six sectors, S 1 -S 6 , each sector for the electrical angle of 60 • .The blue line represents the three-phase sine wave back electromotive force waveform, and the red line represents the three-phase Hall signal waveform.The different sectors, correspond to different Hall position sensor signals and also correspond to the different output phase sequences; with the change of rotor position, the Hall position signal also changes accordingly, according to the change of Hall position signal to control the switching sequence of the power circuit, outputting the corresponding current i A , i B , i C , drive motor operation.Such is the first sector S 1 , Figure 1, C-phase upper bridge arm Q 5 conduction, B-phase lower bridge arm Q 6 conduction; into the second sector, C-phase upper bridge arm Q 5 off, A-phase upper bridge arm Q 1 open; and so on.The rotor rotates at a 360 • electrical angle and Hall sensor signals will be six changes; at the same time, the controller through the Hall signals will be changed by the conductivity of the three bridge arms on the six switching devices, six times the current exchange.Through the analysis we find that the permanent-magnet brushless DC motor uses a six-step phase-change method; each phase will have two-phase conduction, and one phase of the upper bridge arm is on, and the other phase of the lower bridge arm is on.
motor operation.Such is the first sector 1 S , Figure 1, C-phase upper bridge arm 5 Q duction, B-phase lower bridge arm 6 Q conduction; into the second sector, C-phas per bridge arm 5 Q off, A-phase upper bridge arm 1 Q open; and so on.The rotor r at a 360° electrical angle and Hall sensor signals will be six changes; at the same tim controller through the Hall signals will be changed by the conductivity of the three b arms on the six switching devices, six times the current exchange.Through the an we find that the permanent-magnet brushless DC motor uses a six-step phase-ch method; each phase will have two-phase conduction, and one phase of the upper b arm is on, and the other phase of the lower bridge arm is on.The reason why the motor can always rotate is that the stator magnetic field an rotor magnetic field remain relatively static in space; the stator magnetic field is a about 90° ahead of the rotor magnetic field, and the average electromagnetic torqu be generated between the two, thus pulling the rotor that has been moving.In parti it is not immediately commutated after the change of Hall signal.In order to obta maximum electromagnetic torque and reduce the torque pulse, the state change o Hall sensor must be a 30° electrical angle ahead of the current ideal state commu point, that is, the rotor position must be turned at a 30° electrical angle after the chan the Hall state, and then the corresponding winding is switched on and off control.
In this paper, the experimental prototype was tested at a fixed speed of 2000 r and the signal waveform of Hall sensor was obtained without the application of corre strategy, as shown in Figure 3.If the Hall sensor detects the rotor position under the working state, the time interval between the two phases of the Hall signal obtained sh be the same, but, as shown in Figure 3, the time interval is not equal when meas bc ab ca t t t Δ > Δ > Δ , This may be caused by the uneven installation of Hall sensors, the consuming conversion of signal high and low levels, the existence of hysteresis loop other factors, so it is necessary to correct and compensate the commutation signal.The reason why the motor can always rotate is that the stator magnetic field and the rotor magnetic field remain relatively static in space; the stator magnetic field is always about 90 • ahead of the rotor magnetic field, and the average electromagnetic torque can be generated between the two, thus pulling the rotor that has been moving.In particular, it is not immediately commutated after the change of Hall signal.In order to obtain the maximum electromagnetic torque and reduce the torque pulse, the state change of the Hall sensor must be a 30 • electrical angle ahead of the current ideal state commutation point, that is, the rotor position must be turned at a 30 • electrical angle after the change of the Hall state, and then the corresponding winding is switched on and off control.
In this paper, the experimental prototype was tested at a fixed speed of 2000 r/min, and the signal waveform of Hall sensor was obtained without the application of correction strategy, as shown in Figure 3.If the Hall sensor detects the rotor position under the ideal working state, the time interval between the two phases of the Hall signal obtained should be the same, but, as shown in Figure 3, the time interval is not equal when measured, ∆t bc > ∆t ab > ∆t ca , This may be caused by the uneven installation of Hall sensors, the time-consuming conversion of signal high and low levels, the existence of hysteresis loops, and other factors, so it is necessary to correct and compensate the commutation signal.

Phase-Current Analysis in Motor Commutation Process
In this paper, the commutation process from B-C+ to B-A+ is analyzed.PWM chopper control is generally divided into three states: conduction, freewheeling, and commutation.When analyzing the phase current in the commutation process, the three states are divided into two stages: the instantaneous commutation stage and the final conduction stage.The instantaneous commutation stage includes the conduction state and the freewheeling state.When the freewheeling of the off phase is completely reduced to zero, it enters the final conduction stage.

Current Analysis of Instantaneous Commutation Phase during Real-Time Commutation
In the converter phase of real-time commutation,  At this time, the three-phase voltage equation is:

Phase-Current Analysis in Motor Commutation Process
In this paper, the commutation process from B-C+ to B-A+ is analyzed.PWM chopper control is generally divided into three states: conduction, freewheeling, and commutation.When analyzing the phase current in the commutation process, the three states are divided into two stages: the instantaneous commutation stage and the final conduction stage.The instantaneous commutation stage includes the conduction state and the freewheeling state.When the freewheeling of the off phase is completely reduced to zero, it enters the final conduction stage.

Phase-Current Analysis in Motor Commutation Process
In this paper, the commutation process from B-C+ to B-A+ is analyzed.PWM chopper control is generally divided into three states: conduction, freewheeling, and commutation.When analyzing the phase current in the commutation process, the three states are divided into two stages: the instantaneous commutation stage and the final conduction stage.The instantaneous commutation stage includes the conduction state and the freewheeling state.When the freewheeling of the off phase is completely reduced to zero, it enters the final conduction stage.

Current Analysis of Instantaneous Commutation Phase during Real-Time Commutation
In the converter phase of real-time commutation,  At this time, the three-phase voltage equation is: At this time, the three-phase voltage equation is: where V SW = V D = iR s , R s is the internal resistance of the switching device, and we write L and M in Equation ( 1), simplified and unified, as L. Since this paper analyzes the sinusoidal counter-electromotive force, the counter-electromotive force equation is as follows: where E represents the peak value of back-electromotive force, ω represents the angular velocity of the motor.The commutation stage is located in the interval of 30 • to 90 • in Figure 2. Because the duration of the commutation stage is very short, the value of the three-phase back-electromotive force can be calculated.The back-electromotive force of each winding phase at the beginning of this interval is e A = e C = E/2, e B = −E, and then i A + i B + i C = 0, and the Equation ( 2) is simplified: Equation ( 4) is converted to the three-phase-current equation as: By solving this three-phase-current equation, the solution for the three-phase current is obtained as: where T represents the interval of 0 • -360 • in Figure 2; that is, the time for the motor to rotate one week; τ represents the time constant of the motor, τ = L/(R + R s ); I 0 represents the magnitude of the initial current of the B and C phases at the beginning of the commutation phase.
After the end of the continuous flow of the C phase, it will decay to zero.At this time, the next stage is started, and the solution is obtained by i C (T/12 + t 0 ) = 0: where t 0 is the duration of freewheeling; I 1 is the current of phase A and phase B at the end of freewheeling; Since the time constant τ is very small and close to zero, the freewheeling time t 0 can be ignored.In the calculation and analysis of motor performance, ignoring the transient process of freewheeling usually does not have a significant impact on the results.

Current Analysis of the Final Conduction Phase during Real-Time Commutation
The equivalent circuit diagram of the final conduction stage is shown in Figure 5: wheeling time 0 t can be ignored.In the calculation and analysis of motor performance, ignoring the transient process of freewheeling usually does not have a significant impact on the results.

Current Analysis of the Final Conduction Phase during Real-Time Commutation
The equivalent circuit diagram of the final conduction stage is shown in Figure 5: At this time, 1 Q and 6 Q are turned on, and the voltage equation is as follows: According to Equation ( 3): ( ) In the conduction phase, according to 0 9) and ( 10), the non-commutation phase-current equation in the conduction phase is obtained as follows: By solving Equation (11), we can get: At this time, Q 1 and Q 6 are turned on, and the voltage equation is as follows: According to Equation ( 3): In the conduction phase, according to i A + i B = 0, combined with Equations ( 9) and ( 10), the non-commutation phase-current equation in the conduction phase is obtained as follows: By solving Equation ( 11), we can get: where φ represents the impedance angle, φ = arctan[Lω/(R + R s )], since the time constant τ can be ignored, the attenuation term in Equation ( 12) decayed quickly, which can be simplified to: When time t approaches the final moment of the commutation process, the current of phase B approaches I 0 , so it can be obtained by i B (T/4) = −I 0 : Similarly, at C+B-conduction, the expression for the non-commutative phase current i B is obtained as: By observing the simplified current waveform formula, it can be found that, due to the influence of sinusoidal back-electromotive force, the steady-state component has a cosine term, which leads to the increase of the impedance angle of the permanent-magnet brushless DC motor when the speed is too large, resulting in the increase of the proportion of the cosine term to the whole current formula.In the actual operation process, the current fluctuation will also increase.On the contrary, when the speed is small, the current fluctuation is small.

Current Analysis of Phase Commutation Process at Leading and Lagging a Angles
According to the above analysis, in the commutation process, the continuous flow duration of the off phase is quite short, so in the analysis of this section, the continuous flow process is ignored, and only the lead and lag correction of the final conduction stage is analyzed.Figure 6 shows the actual current waveform obtained by MATLAB simulation after Equation ( 12) is simplified and the corresponding parameters are brought in.Among them, the three dashed lines represent the three-phase sine wave back electromotive force waveform, and the black solid lines represent the current waveform.By observing the phase-current conduction interval in Figure 6, it can be found that the current amplitude before and after the 30 • and 210 • commutation points is equal; that is, take any two symmetric points within the 60 • conduction interval about the commutation point, and the slopes of the tangent lines at the two points are negative to each other.However, in the actual commutation process, due to the existence of winding inductance, the air gap being too large, the impedance angle being too large, and other reasons, the off phase and the on phase will not be synchronized to complete the commutation, and the rotor position will not be synchronized with the current commutation, which will lead and lag commutation.

Analysis of Current Characteristics in Advance Commutation
When leading ( 0)  , the current is commutated in advance before the rotor reaches the specified position.At this time, the line back-electromotive force AB e is: Equations ( 16) and ( 9) are combined to obtain the current equation of phase B as follows: Solving the current equation gives: 6.The relationship between i B and BEMF in the precise commutation phase.
However, in the actual commutation process, due to the existence of winding inductance, the air gap being too large, the impedance angle being too large, and other reasons, the off phase and the on phase will not be synchronized to complete the commutation, and the rotor position will not be synchronized with the current commutation, which will lead and lag commutation.

Analysis of Current Characteristics in Advance Commutation
When leading α(α > 0), the current is commutated in advance before the rotor reaches the specified position.At this time, the line back-electromotive force e AB is: Equations ( 16) and ( 9) are combined to obtain the current equation of phase B as follows: Solving the current equation gives: Since the time constant τ is small and close to zero, Equation ( 18) can be simplified to: Figure 7 shows the current waveform of phase B after the advance commutation α angle.It can be observed from the figure that the current amplitude is the largest at the beginning of the conduction interval after the ideal commutation point, and gradually decreases.This is because the current is commutated at the ideal α Angle position of the rotor in advance, resulting in the rotor magnetic field synchronizing with the current commutation in advance when the ideal commutation point arrives.When 0 < α − φ < 30, the larger the lead angle, the more obvious the current fluctuation.In addition, in the 60 • conduction interval before and after the commutation point, the slope of the tangent line of each point of the current curve gradually increases, and the symmetry is not maintained.
World Electr.Veh.J. 2024, 15, x FOR PEER REVIEW 11 of 19 Figure 7 shows the current waveform of phase B after the advance commutation  angle.It can be observed from the figure that the current amplitude is the largest at the beginning of the conduction interval after the ideal commutation point, and gradually decreases.This is because the current is commutated at the ideal  Angle position of the rotor in advance, resulting in the rotor magnetic field synchronizing with the current commutation in advance when the ideal commutation point arrives.When 0 30   −  , the larger the lead angle, the more obvious the current fluctuation.In addition, in the 60° conduction interval before and after the commutation point, the slope of the tangent line of each point of the current curve gradually increases, and the symmetry is not maintained.

of Current Characteristics during Hysteresis Commutation
When the lag ( 0)  , the current has delayed commutation when the rotor has reached the ideal position.At this time, the line back-electromotive force AB e is: Similar to the derivation of the current equation in advance commutation, the Bphase current is obtained as follows: Since the time constant  is small and close to zero, Equation ( 21) can be simplified

Analysis of Current Characteristics during Hysteresis Commutation
When the lag α(α > 0), the current has delayed commutation when the rotor has reached the ideal position.At this time, the line back-electromotive force e AB is: Similar to the derivation of the current equation in advance commutation, the B-phase current is obtained as follows: Since the time constant τ is small and close to zero, Equation ( 21) can be simplified to: Figure 8 shows the current waveform of phase B after the lag-commutation α Angle.It can be observed from the figure that the current amplitude reaches the maximum at the end of the conduction interval before the ideal commutation point, and gradually increases after passing the ideal commutation point.This is because the current lags behind the ideal α Angle rotor position for commutation, resulting in the rotor magnetic field taking some time to synchronize with the current commutation when the ideal commutation point arrives.With the arrival of synchronization between the two, the voltage difference at this time is large, so the amplitude is large.When −30 < −α − φ < 0, the larger the hysteresis angle, the more obvious the current fluctuation.In addition, in the 60 • conduction interval before and after the commutation point, the slope of the tangent line of each point of the current curve gradually decreases, and the symmetry is not maintained.Figure 8 shows the current waveform of phase B after the lag-commutation  An- gle.It can be observed from the figure that the current amplitude reaches the maximum at the end of the conduction interval before the ideal commutation point, and gradually after passing the ideal commutation point.This is because the current lags behind the ideal  Angle rotor position for commutation, resulting in the rotor magnetic field taking some time to synchronize with the current commutation when the ideal commutation point arrives.With the arrival of synchronization between the two, the voltage difference at this time is large, so the amplitude is large.When 30 0  −  − −  , the larger the hysteresis angle, the more obvious the current fluctuation.In addition, in the 60° conduction interval before and after the commutation point, the slope of the tangent line of each point of the current curve gradually decreases, and the symmetry is not maintained.

Build PI Regulator
As can be obtained from Figure 6, the current waveforms of the non-commutatedphase in the ideal state are symmetrical in the current waveforms in each 60° conduction interval of the phase.As shown in Figure 9, take the first 60° interval of the 120° interval of the non-commutated-phase conduction as an example, where point H is at a position 30° to the left and right of the motor phase-change point, and H1 and H2 are points symmetrical to the left and right within an angle of β (0 < β < 30) with respect to point H. From this it can be obtained: where k and 2 k represent the slopes of the tangents at H1 and H2, respectively, and the sum of the two i  is equal to zero in the ideal state.
The slopes k1 and k2 can be derived from the current values measured at H1 and H2 in a sampling period: where, n = 1,2; according to the commutation point pulse, the time of a commutation period is inferred, so as to determine the rotor angular velocity ω. t represents the time of the eligible point in the period T.

Build PI Regulator
As can be obtained from Figure 6, the current waveforms of the non-commutatedphase in the ideal state are symmetrical in the current waveforms in each 60 • conduction interval of the phase.As shown in Figure 9, take the first 60 • interval of the 120 • interval of the non-commutated-phase conduction as an example, where point H is at a position 30 • to the left and right of the motor phase-change point, and H1 and H2 are points symmetrical to the left and right within an angle of β (0 < β < 30) with respect to point H. From this it can be obtained: where k 1 and k 2 represent the slopes of the tangents at H1 and H2, respectively, and the sum of the two ∆i is equal to zero in the ideal state.Based on the above calculation and analysis, a PI regulator with i  as the error quantity and the compensation angle 1  of the commutation position as the controlled quantity can be designed.The relationship between i  and 1  is: where P K is the scale factor; I K is the integration factor.In the actual operation control process of the motor, there are other fixed delay factors in the system, including the transmission rate of Hall wire, the calculation formula simplification delay, the microcontroller sampling time and so on.In order to make the motor close to the ideal working state, this paper assumes that the fixed delay time here is 5-10 μs, so as to estimate the corresponding phase-compensation Angle θ2, so the final total compensation Angle θ can be expressed as: It can be seen from Figure 6 that when 0   is obtained according to Equation (25), and  increase of the delay angle can be obtained from Equation (26), so as to correct the advance commutation and maintain the symmetry of non-commutation-current waveform.On the contrary, the delay angle decreases when the delay commutation occurs.
Equation ( 25) is discretized according to the incremental PI regulator to obtain: ( ) where k i  represents the i  value entered into the PI regulator for the KTH time; 1k   represents the difference of the compensation angle of the KTH commutation position; k represents the number of iterations in which ∆i is entered the proportional-integral regulator.

Design of Speed Control System
The sum of the tangent slopes of the non-commutated-phase current waveforms at two points symmetrical within a range of 30° before and after the H point can reflect the deviation between the commutated signal and the ideal position, accordingly; based on this idea, this paper proposes a closed-loop correction and compensation strategy for correcting the commutated signal error caused by inaccuracies of the Hall position sensor.The logic block diagram of the new speed control system is shown in Figure 10.The slopes k 1 and k 2 can be derived from the current values measured at H1 and H2 in a sampling period: where, n = 1, 2; according to the commutation point pulse, the time of a commutation period is inferred, so as to determine the rotor angular velocity ω. t represents the time of eligible point in the period T. Based on the above calculation and analysis, a PI regulator with ∆i as the error quantity and the compensation angle θ 1 of the commutation position as the controlled quantity can be designed.The relationship between ∆i and θ 1 is: where K P is the scale factor; K I is the integration factor.
In the actual operation control process of the motor, there are other fixed delay factors in the system, including the transmission rate of Hall wire, the calculation formula simplification delay, the microcontroller sampling time and so on.In order to make the motor close to the ideal working state, this paper assumes that the fixed delay time here is 5-10 µs, so as to estimate the corresponding phase-compensation Angle θ 2 , so the final total compensation Angle θ can be expressed as: It can be seen from Figure 6 that when K P < 0 and K I < 0 are used, ∆i < 0, θ 1 > 0 is obtained according to Equation (25), and θ increase of the delay angle can be obtained from Equation (26), so as to correct the advance commutation and maintain the symmetry of non-commutation-current waveform.On the contrary, the delay angle decreases when the delay commutation occurs.
Equation ( 25) is discretized according to the incremental PI regulator to obtain: where ∆i k represents the ∆i value entered into the PI regulator for the KTH time; ∆θ 1k represents the difference of the compensation angle of the KTH commutation position; k represents the number of iterations in which ∆i is entered into the proportionalintegral regulator.

Design of Speed Control System
The sum of the tangent slopes of the non-commutated-phase current waveforms at two points symmetrical within a range of 30 • before and after the H point can reflect the deviation between the commutated signal and the ideal position, accordingly; based on this idea, this paper proposes a closed-loop correction and compensation strategy for correcting the commutated signal error caused by inaccuracies of the Hall position sensor.The logic block diagram of the new speed control system is shown in Figure 10.In Figure 10, n* refers to the expected speed value; n represents the actual speed value of the motor during operation; D stands for duty cycle; T represents the time of one rotation of the rotor; Sa, Sb, Sc stands for chopper pulse; and Ta, Tb, and Tc represent three virtual Hall signals.The speed control system mainly includes speed loop, Hall detection, duty-ratio regulation, commutation compensation, and so on.The "PWM" module stands for pulse width modulation; The speed loop refers to the output duty cycle D after PI adjustment according to n* and n, and then the chopper pulse is formed, so as to adjust the voltage to achieve speed adjustment; n is calculated from the Hall signal.The module "Commutation point" determines the commutation point time from rising edge of Hall signal of phase A, so as to calculate T obtain the angular speed of the motor.The module "RPM Calculation" represents that the angular speed of the motor ω is converted to rotational speed n.The "slope error" module represents Equations ( 23) and (24); the module 'Commutation point delay' means that the ideal commutation point is calculated from the actual commutation point measured, combined with the compensating Angle θ, so that the three-phase virtual Hall signal is output to control the power switching device.After the motor is positioned, it starts from the static state, and when it enters the target speed and runs stably, all aspects of the speed regulation system begin to work.Compared with the traditional speed control system, the new speed control system in this paper adds a closed-loop control link that automatically compensates the phase error of the signal commutator.
In this control system, the switching logic is divided into two parts to carry on commutation control to the motor power components.In the first part, the commutation time of the motor is obtained by the signal detected by the Hall sensor, so as to determine the time T of one rotation of the rotor, and calculate the motor speed, and then through the speed regulator output switching logic to the logic commutation circuit; in the second part, the phase compensation Angle θ2 is estimated by the fixed delay caused by the Hall wire transmission rate, the simplification of the derivation formula and the sampling time of the single chip computer, etc.; finally, the commutation position compensation Angle θ1 is obtained by PI adjustment on the basis of the symmetry of the non-commutationcurrent waveform in the conduction interval and the commutation-position correction strategy proposed in this paper to further optimize the commutation position.

Experimental Verification and Analysis
On the basis of the above analysis, to build an experimental platform, the control circuit board uses TI's DSP TMS320LF28335 control chip; the experimental platform and control circuit board are shown in Figure 11.In Figure 10, n* refers to the expected speed value; n represents the actual speed value of the motor during operation; D stands for duty cycle; T represents the time of one rotation of the rotor; S a , S b , S c stands for chopper pulse; and T a , T b , and T c represent three virtual Hall signals.The speed control system mainly includes speed loop, Hall position detection, duty-ratio regulation, commutation compensation, and so on.The "PWM" module stands for pulse width modulation; The speed loop refers to the output duty cycle D after PI adjustment according to n* and n, and then the chopper pulse is formed, so as to adjust the voltage to achieve speed adjustment; n is calculated from the Hall signal.The module "Commutation point" determines the commutation point time from rising edge of Hall signal of phase A, so as to calculate T to obtain the angular speed of the motor.The module "RPM Calculation" represents that the angular speed of the motor ω is converted to rotational speed n.The "slope error" module represents Equations ( 23) and (24); the module 'Commutation point delay' means that the ideal commutation point is calculated from the actual commutation point measured, combined with the compensating Angle θ, so that the three-phase virtual Hall signal is output to control the power switching device.After the motor is positioned, it starts from the static state, and when it enters the target speed and runs stably, all aspects of the speed regulation system begin to work.Compared with the traditional speed control system, the new speed control system in this paper adds a closed-loop control link that automatically compensates the phase error of the signal commutator.
In this control system, the switching logic is divided into two parts to carry on commutation control to the motor power components.In the first part, the commutation time of the motor is obtained by the signal detected by the Hall sensor, so as to determine the time T of one rotation of the rotor, and calculate the motor speed, and then through the speed regulator output switching logic to the logic commutation circuit; in the second part, the phase compensation Angle θ 2 is estimated by the fixed delay caused by the Hall wire transmission rate, the simplification of the derivation formula and the sampling time of the single chip computer, etc.; finally, the commutation position compensation Angle θ 1 is obtained by PI adjustment on the basis of the symmetry of the non-commutation-current waveform in the conduction interval and the commutation-position correction strategy proposed in this paper to further optimize the commutation position.

Experimental Verification and Analysis
On the basis of the above analysis, to build an experimental platform, the control circuit board uses TI's DSP TMS320LF28335 control chip; the experimental platform and control circuit board are shown in Figure 11.In the course of the experiment, the software code debugging is used to realiz phenomenon of leading and lagging when the motor is working.However, in the a operation of the motor, no software is used to control the commutation-point delay, the general waveform of the motor is lagging due to the delay effect of various sy factors.In contrast, the advance commutation is difficult to observe; due to the influ of various factors, such as motor parameter fluctuations and control signal interferen is difficult to ensure that the control system has enough accuracy and stability to ach the advance commutation.In this paper, the phase-current waveform of advance com tation is measured by the prototype as much as possible by compensating the exi delay.
Figures 12 and 13 are the actual signal waveforms of the three-phase current in vance commutation and hysteresis commutation, respectively.It can be seen from Fig 12 and 13 that the experimental waveform is consistent with the theoretical analysis mean value of the continuous current is the largest at the beginning of the condu interval after the commutation point, and the mean value of the continuous current in conduction interval gradually decreases, and the tangent slope at the symmetric points of H point in each conduction interval is also unequal.When the delay occurs mean value of the continuous current reaches the maximum at the end of the condu interval before the commutation point, and the mean value of the continuous curre the conduction interval gradually increases.Similarly, the slopes of the tangent lin the symmetric two points about the H point in each conduction interval are also not eq Figure 14 shows the measured three-phase-current waveform after adopting the co tion control method proposed in this paper.As can be seen from Figure 14, after the trol correction method proposed in this paper is adopted, the phase current in each off interval tends to be stable, and the sum of the tangent slopes of the two points a assumed symmetry around point H is close to zero, close to the current waveform u the ideal state analyzed above, and the position error is significantly compensated.In the course of the experiment, the software code debugging is used to realize the phenomenon of leading and lagging when the motor is working.However, in the actual operation of the motor, no software is used to control the commutation-point delay, and the general waveform of the motor is lagging due to the delay effect of various system factors.In contrast, the advance commutation is difficult to observe; due to the influence of various factors, such as motor parameter fluctuations and control signal interference, it is difficult to ensure that the control system has enough accuracy and stability to achieve the advance commutation.In this paper, the phase-current waveform of advance commutation is measured by the prototype as much as possible by compensating the existing delay.
Figures 12 and 13 are the actual signal waveforms of the three-phase current in advance commutation and hysteresis commutation, respectively.It can be seen from Figures 12 and 13 that the experimental waveform is consistent with the theoretical analysis: the mean value of the continuous current is the largest at the beginning of the conduction interval after the commutation point, and the mean value of the continuous current in the conduction interval gradually decreases, and the tangent slope at the symmetric two points of H point in each conduction interval is also unequal.When the delay occurs, the mean value of the continuous current reaches the maximum at the end of the conduction interval before the commutation point, and the mean value of the continuous current in the conduction interval gradually increases.Similarly, the slopes of the tangent lines at the symmetric two points about the H point in each conduction interval are also not equal.Figure 14 shows the measured three-phase-current waveform after adopting the correction control method proposed in this paper.As can be seen from Figure 14, after the control correction method proposed in this paper is adopted, the phase current in each on-off interval tends to be stable, and the sum of the tangent slopes of the two points at the assumed symmetry around point H is close to zero, close to the current waveform under the ideal state analyzed above, and the position error is significantly compensated.When the motor speed is close to 2000 r/min, the operation efficiency curves of th commutation conditions under different torques are shown in Figure 15.When the torq is low, the motor is less affected by the disturbance, so the operation efficiency of the m tor is close to that of the motor in advance commutation.When the torque is high, operation efficiency of the motor decreases obviously under the condition of delayed co mutation and advanced commutation.This is because the loss caused by error increa under the condition of high speed, and the operation efficiency of the motor corrected the compensation strategy is obviously improved.In general, the new closed-loop corr tion strategy proposed in this paper can reduce the errors in commutation and impr the operation efficiency of the motor.When the motor speed is close to 2000 r/min, the operation efficiency curves of three commutation conditions under different torques are shown in Figure 15.When the torque is low, the motor is less affected by the disturbance, so the operation efficiency of the motor is close to that of the motor in advance commutation.When the torque is high, the operation efficiency of the motor decreases obviously under the condition of delayed commutation and advanced commutation.This is because the loss caused by error increases under the condition of high speed, and the operation efficiency of the motor corrected by the compensation strategy is obviously improved.In general, the new closed-loop correction strategy proposed in this paper can reduce the errors in commutation and improve the operation efficiency of the motor.When the motor speed is close to 2000 r/min, the operation efficiency curves of three commutation conditions under different torques are shown in Figure 15. the torque is low, the motor is less affected by the disturbance, so the operation efficiency of the motor is close to that of the motor in advance commutation.When the torque is high, the operation efficiency of the motor decreases obviously under the condition of delayed commutation and advanced commutation.This is because the loss caused by error increases under the condition of high speed, and the operation efficiency of the motor corrected by the compensation strategy is obviously improved.In general, the new closed-loop correction strategy proposed in this paper can reduce the errors in commutation and improve the operation efficiency of the motor.

1.
The causes of errors in detecting the rotor-position information of the Hall sensor are analyzed, and the expressions of non-commutating current in three different commutation cases are given.The duration of the continuous-current phase during commutation is very short and negligible, and the symmetry of the non-commutatingcurrent waveform in each conduction interval before and after the commutation point can reflect the errors in the commutation process.

2.
A novel closed-loop control strategy for compensating the position changeover signal error is proposed.Taking the current symmetry in the range of 30 • about the H point in each conduction interval as the target, the sum of the slopes of the current tangents at the two points symmetrical about the H point is taken as the feedback quantity, and a PI regulator is constructed for correction to eliminate the commutation signal error.

3.
The experimental results show that the new position closed-loop correction strategy proposed in this paper can effectively compensate the commutation error caused by the inaccurate detection of the Hall sensor, and improve the commutation accuracy and operation efficiency of permanent-magnet brushless-motor commutation.The alignment strategy has wide applicability, certain application value, and good prospect.

Discussion
According to the diagram analysis of the experimental results, the current waveform in the case of advanced commutation tested in Figure 12 is not very close to the leadingcurrent waveform in the ideal state analyzed above.In the process of actual debugging code, advance commutation is realized by actively changing the commutation time of the motor.However, due to the hysteresis characteristic of the motor itself and other factors, this part has defects and needs to be further improved.
This paper focuses on the feasibility and generality of the proposed correction method based on current symmetry.The choice of control method and controller can also be varied.First of all, the controller chosen in this paper is a pi regulator.Although the final experiment verifies that the efficiency of the motor has been improved, if it is replaced with a more advanced controller, such as observer control, fuzzy logic, or adaptive control, it can not only advance the mainstream research direction, but also improve the operating efficiency of the motor more significantly.Secondly, in the control method, after the error is described by the Hall position sensor, in the actual control process, the Hall sensor only plays the role of calculating the motor speed, so the method without the position sensor can be selected to participate in the control of the motor.These questions will be the main focus in the next step of this work.
blue line represents the three-phase sine wave back electromotive force waveform, and the red line represents the three-phase Hall signal waveform.The different sectors, correspond to different Hall position sensor signals and also correspond to the different output phase sequences; with the change of rotor position, the Hall position signal also changes accordingly, according to the change of Hall position signal to control the switching sequence of the power circuit, outputting the corresponding current A i , B i , C i , drive

Figure 2 .
Figure 2. Diagram of correspondence between Hall signal and sine-wave back potential.

Figure 2 .
Figure 2. Diagram of correspondence between Hall signal and sine-wave back potential.

Figure 3 .
Figure 3.The prototype measured three-phase Hall signal waveform.

1 Q and 6 Q
in Figure 1 are switched on with the continuous current diode 2 D , and the circuit equivalent diagram is shown in Figure 4.

Figure 4 .
Figure 4. Equivalent circuit diagram of the commutation stage.

Figure 3 .
Figure 3.The prototype measured three-phase Hall signal waveform.

1 Q and 6 Q
in Figure 1 are switched on with the continuous current diode 2 D , and the circuit equivalent diagram is shown in Figure 4.

Figure 4 .
Figure 4. Equivalent circuit diagram of the commutation stage.

Figure 4 .
Figure 4. Equivalent circuit diagram of the commutation stage.

Figure 5 .
Figure 5.The equivalent circuit diagram of the conduction phase.

Figure 5 .
Figure 5.The equivalent circuit diagram of the conduction phase.

19 Figure 6 .
Figure 6.The relationship between B i and BEMF in the precise commutation phase.

Figure 7 .
Figure 7.The relationship between B i and BEMF in the advance commutation phase.

Figure 7 .
Figure 7.The relationship between i B and BEMF in the advance commutation phase.

Figure 8 .
Figure 8.The relationship between B i and BEMF in the hysteresis commutation phase.

Figure 8 .
Figure 8.The relationship between i B and BEMF in the hysteresis commutation phase.

Figure 9 .
Figure 9.The ideal current waveform of the non-commutation phase in the 120° conduction interval.

Figure 9 .
Figure 9.The ideal current waveform of the non-commutation phase in the 120 • conduction interval.

18 Figure 10 .
Figure 10.Logic block diagram of speed control system.

Figure 10 .
Figure 10.Logic block diagram of speed control system.

Figure 11 .
Figure 11.Experiment platform and control board.

Figure 11 .
Figure 11.Experiment platform and control board.

Figure 12 .
Figure 12.The measured three-phase-current waveform under advanced commutation.

Figure 14 .
Figure 14.The measured three-phase-current waveform after correction and compensation.

Figure 14 .
Figure 14.The measured three-phase-current waveform after correction and compensation.

18 Figure 14 .
Figure 14.The measured three-phase-current waveform after correction and compensation.

Figure 15 .Figure 15 .
Figure 15.Motor efficiency for three phase-change cases.6. Conclusions 1.The causes of errors in detecting the rotor-position information of the Hall sensor are analyzed, and the expressions of non-commutating current in three different