Real-Time Fault Diagnosis and Fault-Tolerant Control Strategy for Hall Sensors in Permanent Magnet Brushless DC Motor Drives

The Hall sensor is the most commonly used position sensor of the permanent magnet brushless direct current (PMBLDC) motor. Its failure may lead to a decrease in system reliability. Hence, this article proposes a novel methodology for the Hall sensors fault diagnosis and fault-tolerant control in PMBLDC motor drives. Initially, the Hall sensor faults are analyzed and classified into three fault types. Taking the Hall signal as the system state and the conducted MOSFETs as the system event, the extended finite state machine (EFSM) of the motor in operation is established. Meanwhile, a motor speed observer based on the super twisting algorithm (STA) is designed to obtain the speed signal of the proposed strategy. On this basis, a real-time Hall sensor fault diagnosis strategy is established by combining the EFSM and the STA speed observer. Moreover, this article proposes a Hall signal reconstruction strategy, which can generate compensated Hall signal to realize fault-tolerant control under single or double Hall sensor faults. Finally, theoretical analysis and experimental results validate the superior effectiveness of the proposed real-time fault diagnosis and fault-tolerant control strategy.


Introduction
Permanent magnet brushless direct current (PMBLDC) motors have been widely used in various industrial and commercial fields, benefit from the characteristics of high power density, simple structure, and low cost [1][2][3]. During the regular operation of a PMBLDC motor, the control system needs to acquire the position of its rotor in real-time and apply the corresponding voltage vector on its stator winding to produce the required electromagnetic torque by its rotation [4][5][6][7]. Although different sensorless control methods have been proposed in many literatures, there are many limitations in the applications of these approaches, especially in the startup stage and the speed range [8][9][10][11]. Therefore, the PMBLDC motor drives with position sensors are usually preferred in most applications. The Hall sensors have advantages of simplicity and inexpensive, which make them well suited for the position sensors of the PMBLDC motor drives. Hence, the Hall sensors play a considerable important role in the motor drives [12][13][14]. The Hall sensors may fail due to various reasons (such as harsh environments, faulty connections, violent vibration, etc.), which can result in that the feedback signal of the faulty Hall sensor cannot correctly reflect the position of the rotor [15,16]. Once there is a fault in the Hall sensors, the dynamic performance of the motor drives will be significantly reduced or even overcurrent, which can lead to extensive damage to the whole system [17][18][19].
To improve the reliability of the PMBLDC motor drives with Hall sensors, it is essential to realize the fault-tolerant control (FTC) of the Hall sensors faults in motor drives [20][21][22].
Considering the above analysis, this article proposed a real-time fault diagnosis and fault-tolerant control strategy for Hall sensors in PMBLDC motor drives. The overall contributions of this paper are summarized as follows: (1) This article analyzed the cause of the Hall sensor failure in detail. Meanwhile, according to the fault occurring instants, this article classified the possible faults into three types.
(2) This article proposed a superior real-time Hall fault diagnosis strategy, which is learning from the ideal of the EFSM and STA observer.
(3) Directing at the single and double Hall sensor fault, an effective Hall fault-tolerant control strategy is proposed.
(4) The 35-W PMBLDC motor experimental platform verified the effectiveness and superiority of the proposed methodology.
This reminder of this article is structured as follows. Section II classifies the Hall fault types according to the cause of failure. In Section Ⅲ, a superior real-time Hall sensor fault diagnosis and fault-tolerant control strategy are present. Meanwhile, the effectiveness of the proposed scheme is demonstrated by experiments in Section Ⅳ. Finally, Section Ⅴ concludes this article and addresses the future work directions.

Ideal Hall Signal and Hall Sensor Fault Types
The structure of the PMBLDC motor drives is shown in Figure 1a, which comprises a PMBLDC motor with three Hall sensors, a voltage-source inventor, and a motor control system [32,33]. When the rotor turns from a sector to the next sector, there will be an edge signal in the corresponding Hall signal. Without loss of generality, the edge signal of i H (i = a, b, c) is signed with i E : When the rotor turns from a sector to the next sector, there will be an edge signal in the corresponding Hall signal. Without loss of generality, the edge signal of H i (i = a, b, c) is signed with E i : According to the analysis in [20], Hall sensors may fail due to many reasons, which will lead to the loss of the rotor position information contained in the Hall signal. Like Zhang et al. [22], we just consider the situation of one or two Hall sensors failure in this study. Because when all the three Hall sensors are invalid, only the sensorless control method can be used to maintain the operation of the motor. In the control system, the Hall signal is treated as a digital signal of "0" or "1". For all the Hall sensors failure types, the signal from the faulty Hall sensor is assumed to be a constant value of either "0" or "1".
For simplicity, we define the fault states of Hall sensors for the single and double faults (as shown in Table 1

Fault Types Fault States Faulty Sensor (s)
Normal Operation F a = 0, F b = 0, F c = 0 None Single Fault In Figure 2 (lower panel), during the normal operations, it can be found that the Hall signal H a , H b , and H c changes according to the sequence 011→001→101→100→110→010→011 for CCW and an opposite sequence for CW rotation. In fault situations, the signal from Hall Sensor A does not change anymore, which results in different Hall signal sequences. These Hall sensor faults in Figure 2 can be classified into three fault types, defined as Types 1-3.
Fault Type 1: Abnormal Hall signal change appears when the Hall sensor fault occurs. For example, when the fault in Hall Sensor A occurs at the sector 5π/67π/6, there is an abnormal Hall signal change of 011→111, while the normal one is 011→001; when the fault occurs at the sector π/25π/6, the abnormal Hall signal change is 010→110, while the normal one is 010→011.
Fault Type 2: Hall signal change appears in advance when the Hall sensor fault occurs. For example, when the fault in Hall Sensor A occurs at the sector 7π/63π/2, there is a normal Hall signal change of 001→101, but the Hall signal change is earlier than the normal one.
Fault Type 3: No Hall signal change appears when the Hall sensor fault occurs. For example, when the fault in Hall Sensor A occurs at the sector 3π/211π/6, 11π/6π/6 and π/6π/2, there is no Hall signal change appears.

Finite State Machine and Definition of Signals
The finite state machine (FSM) is a mathematical model, which is usually used to describe the running process of a control system [34,35]. There are four basic components in a traditional basic FSM: state, transition, action, and event [36,37]. For a certain basic FSM, it can be defined as an ordered set of five elements, as shown in (2): where S is the finite state set of the system and , , , = … m C C C C , δ is the state transition rules of the system, 0 S is the initial state of the system and 0 ⊆ S S , O is the output set of the system and In engineering applications, a state transition diagram is usually used in FSM design, representing the transition condition and process of the system more vividly. The basic FSM is shown in Figure 3.  As presented in [20], the fault sensor is identified by detecting the corresponding fault Hall state and Hall transition sequences. Using the fault diagnosis methods in [20], the Type 1 fault can be detected in real-time. However, for the Type 2 and Type 3 fault, there is a common limitation in these fault diagnosis methods: it needs some time for the fault diagnosis system to detect the corresponding abnormal Hall signal sequence from the occurrence of the Hall sensor faults to the completion of the fault detection. During this period, the motor commutation still relies on the fault Hall signal, which will lead to an incorrect commutation in some sectors, as shown in Figure 2. Furthermore, these incorrect commutations may cause the motor to be unable to maintain the normal operation and eventually lead to massive damage to the motor drive system. Therefore, it is necessary to develop a real-time fault diagnosis (RFD) method for the Hall sensor failure in the PMBLDC motor.

Finite State Machine and Definition of Signals
The finite state machine (FSM) is a mathematical model, which is usually used to describe the running process of a control system [34,35]. There are four basic components in a traditional basic FSM: state, transition, action, and event [36,37]. For a certain basic FSM, it can be defined as an ordered set of five elements, as shown in (2): where S is the finite state set of the system and S = {S 0 , S 1 , S 2 , . . . , S m }, C is the input set of the system and C = {C 1 , C 2 , . . . , C m }, δ is the state transition rules of the system, S 0 is the initial state of the system and S 0 ⊆ S, O is the output set of the system and In engineering applications, a state transition diagram is usually used in FSM design, representing the transition condition and process of the system more vividly. The basic FSM is shown in Figure 3.
where S is the finite state set of the system and , , , = … m C C C C , δ is the state transition rules of the system, 0 S is the initial state of the system and 0 ⊆ S S , O is the output set of the system and In engineering applications, a state transition diagram is usually used in FSM design, representing the transition condition and process of the system more vividly. The basic FSM is shown in Figure 3.  According to the above analysis, it can be found that the second state of a basic FSM is determined by the current state, the system event, and the transition function. Meanwhile, it can only transfer between the finite states. Similarly, during the working process of the PMBLDC motor drive, different MOSFETs need to be conducted according to the rotation direction of the motor and the different rotor positions. Therefore, the concept of the FSM can be combined with the PMBLDC motor drives, with the Hall signal as the system state and the conducted MOSFETs as the system event. The six normal Hall signals and two fault Hall signals are marked with S 1 : S 8 , as shown in Table 2. The different conducted MOSFETs are marked with C 1 : C 6 , as shown in Table 3.  Table 3. System events of the FSM.

System Event Conducted MOSFETs
Then the finite state set of the proposed PMBLDC motor drive system is S = {S 1 , S 2 , . . . , S 8 }. The input set of the system is C = {C 1 , C 2 , . . . , C 6 }. The initial state is S 0 ⊆ {S 1 , S 2 , . . . , S 6 }, as the rotor could be in any sector in the initial state. The output set is O = {S 1 , S 2 , . . . , S 8 }.
When there are no faults in the three Hall sensor, the 12 transition functions of the system can be derived from the operation of the motor drive and expressed as: The corresponding normal FSM of the PMBLDC motor drives is shown in Figure 4. Using the proposed FSM in Figure 4, the Type 1 Hall sensor fault can be detected whenever it happens, as an abnormal state transition function appeared when the Hall sensor fails. Take the case of Hall sensor faults in Figure 2, when the fault in Hall Sensor A occurs at sector 5π/67π/6 and π/25π/6, there are abnormal state transition functions of δ(S 4 , C 5 ) = S 7 and δ(S 3 , C 3 ) = S 2 , while the normal state transition functions are δ(S 4 , C 5 ) = S 5 and δ(S 3 , C 3 ) = S 4 .   Figure 4, the state transition events set is C, then in events set ∃ ∈ i C C . In the time zone division in Figure 5  In some real-time systems, the state transition is constrained by the system state variables. Meanwhile, the time constraint of these state variables can also be used as the boundary condition of the system state transition. Based on the definitions of time zone, For the three fault types, the Type 1 fault can be represented by a logical failure, and the Type 2 and 3 faults can be described by a timing failure. It can be found that there are only logic constraints in the basic FSM in Figure 4, that is why it cannot detect the Type 2 and 3 Hall sensor faults in time, and the similar problem comes to the fault diagnosis methods in the other researches.
Therefore, both the logic constraints and time constraints are essential to realize the RFD of the Hall sensor faults, and the following definitions about time zone are introduced [38,39]. Definition 1. Time zone. The range of the global clock L in the proposed FSM model is described as [0, +∞). If the global clock L is divided into k sub zones l 1 , l 2 , . . . , l k , then each of the time point in the sub zones can be represented by L 1 , L 2 , . . . , L k , in which (L 1 < L 2 <, . . . , < L k ). So that the set of {L 1 , L 2 , . . . , L k } can be used as the time zone division for the time constraint τ, as shown in Figure 5.  In some real-time systems, the state transition is constrained by the system state variables. Meanwhile, the time constraint of these state variables can also be used as the boundary condition of the system state transition. Based on the definitions of time zone, From the above definition of the time zone division, the time constraint τ of t 1 < l < t 2 can be divided into three sub time zones of [0, t 1 ], (t 1 , t 2 ) and [t 2 , +∞). Definition 2. Valid time zone. In the proposed FSM in Figure 4, the state transition events set is C, then in events set ∃C i ∈ C. In the time zone division in Figure 5 ∃l i ∈ L, which means that l i is a sub time zone of the global clock L. If the system event C i occurs in l i and the state transition could be triggered by C i , the time zone l i is called a valid time zone for the system event C i . Definition 3. Invalid time zone. In contrast with the valid time zone, if the system event C i occurs in l i and the state transition could not be triggered by C i , the time zone l i is called an invalid time zone for the system event C i . In some real-time systems, the state transition is constrained by the system state variables. Meanwhile, the time constraint of these state variables can also be used as the boundary condition of the system state transition. Based on the definitions of time zone, the basic FSM can be extended with a time constraint, which can be used as the judgment of whether the system state transition is normal. A state transition with both time and variable constraints is shown in Figure 6.
Electronics 2021, 10, x FOR PEER REVIEW 9 of 25 the basic FSM can be extended with a time constraint, which can be used as the judgment of whether the system state transition is normal. A state transition with both time and variable constraints is shown in Figure 6. Then the proposed FSM of the PMBLDC motor drive in Figure 4 can be extended to an extended finite state machine (EFSM) with variable constraints and time constraints. The relation between the variable constraint and the edge signal of the Hall sensors is shown in Table 4. Table 4. Variable Constraints of the EFSM.

Variable Constraint Edge Signal Variable Constraint Edge Signal
Subsequently, the 12 new transition functions of the EFSM are expressed as: In Figure 6, S 1 and S 2 are two system states, C i is a system input. There are two boundary conditions in the state transition: variable constraint X == −1 and time constraint 20 < l i < 25. When the system inputs is C i , the state transition from S 1 to S 2 holds true only when the system variable X == −1 occurs in the valid time zone (20,25). When the system variable X == −1 occurs in the invalid time zone (0, 20] or [25, +∞), or system variables other than X == −1 appear in the time zone (20,25), the state transition from S 1 to S 2 is false.
When it comes to the PMBLDC motor drive in Figure 1, the system operation is similar to the state transition with variable constraint and time constraint: Assuming that the system state (Hall signal) is S i , and the system input (conducted MOSFETs) is C k , then the next system state S j can be obtained from the transition function as S j = δ(S i , C k ). If all the three Hall sensors are normal, a corresponding edge signal will be detected when the state transition from S i to S j is completed. Therefore, the appearance of the edge signal can be treated as the variable constraint of the transition from S i to S j and signed with X i→j . The appearance time of the edge signal can be used as the time constraint of the transition from S i to S j and signed with T i→j .
Then the proposed FSM of the PMBLDC motor drive in Figure 4 can be extended to an extended finite state machine (EFSM) with variable constraints and time constraints. The relation between the variable constraint and the edge signal of the Hall sensors is shown in Table 4.
Subsequently, the 12 new transition functions of the EFSM are expressed as: Based on the above definitions and the basic FSM in Figure 4, the normal EFSM of the PMBLDC motor drive can be established, as shown in Figure 7.
Based on the above definitions and the basic FSM in Figure 4, the normal EFSM of the PMBLDC motor drive can be established, as shown in Figure 7. It can be found that there are both logic constraints and time constraints in the established EFSM in Figure 7. Then the fault detection of the Hall sensors can be realized by detecting the logical states of the variable constraints and solving the time constraints of the state transition. When it comes to the logical states of the variable constraint, i.e., the logical state of the edge signal, it's easy to obtain the corresponding variable constraint from the current system state and input event. However, the time constraint of the state transition is related to the real-time speed of the motor, which means it cannot be obtained directly.
Thus, we need to establish a speed observer, which will be used to estimate the motor speed in real-time and obtain the valid time zone of the state transition. It can be found that there are both logic constraints and time constraints in the established EFSM in Figure 7. Then the fault detection of the Hall sensors can be realized by detecting the logical states of the variable constraints and solving the time constraints of the state transition. When it comes to the logical states of the variable constraint, i.e., the logical state of the edge signal, it's easy to obtain the corresponding variable constraint from the current system state and input event. However, the time constraint of the state transition is related to the real-time speed of the motor, which means it cannot be obtained directly.
Thus, we need to establish a speed observer, which will be used to estimate the motor speed in real-time and obtain the valid time zone of the state transition.

Proposed RFD Method and Fault Analysis
According to the mathematical model of the PMBLDC motor drive, the dynamic equation of speed and current in normal operation can be expressed as: where, ω m is the motor speed, J is the inertia moment, B v is the viscous damping coefficient, T e is the electromagnetic torque, T l is the load torque, i is the armature current, L m is the stator inductance, R s is the stator resistance, e a is the back electromotive force, U a is the armature voltage, k t is the torque constant, k emf is the back electromotive force constant. During the fault detection, the motor speed is necessary to solve the time constraints of the state transition. Next, a motor speed observer based on the super twisting algorithm (STA) is designed with the angular speed of the motor as the observation [40].
The differential equation of the estimated armature currentî can be expressed as: where s i =î − i is the armature current estimation error, ξ(s i ) is a robust term based on the super twisting algorithm. The robust term ξ(s i ) is described as: Electronics 2021, 10, 1268 10 of 23 From Equations (5) and (7), the differential equation of the armature current estimation error can be expressed as: Here, the two disturbance terms in (9) are represented by Ω 1 (s i ) and Ω 2 , in which Ω 1 (s i ) = −s i R s /L m and Ω 2 = −ω m k emf /L m . Then the differential term of Ω 2 can be expressed as: In Ω 1 (s i ) and . Ω 2 , terms L m , J, R s , k emf , B v and k t are all constants, terms ω m , i and T l are all bounded variables.
Taking Ω 1 (s i ) and Ω 2 into Equation (9), we can get (12): Based on the above analysis, if the coefficients k 1 , k 2 and k 3 satisfy the following Equation (13), the armature current estimation error s i will converge to zero in finite time [41].
Consequently, the convergence and stability of the proposed sliding surface in the STA observer can be ensured similar to [41]. After the sliding mode is established, the estimated speed can be expressed as Equation (14): Then the estimated speed can be expressed as Equation (14): As there is observation error between the estimated speed and actual speed, an error threshold ω thr is set. When the motor drive system is working, the threshold value ω thr is always greater than the residual value ω res between the estimated speedω m and actual speed ω m , as shown in (15): To facilitate the subsequent description, a virtual reference variable ω r is introduced into the control system, as described in (16): where π/3 is the rotation angle (electrical angle) of the motor in each commutation cycle, t is the current time of the motor drive system, t n is the initial time of the motor drive system in the commutation cycle. Assumed that the initial state of the motor drive system at, and the system input is C k . Then the next state after S i can be calculated by using the transition functions in Equation (4), which is signed with S j . The corresponding variable constraint of the transition from S i to S j is signed with X i→j , and the valid time zone of X i→j is signed with (t min , t max ). According to the definitions of the EFSM, only when the edge signal corresponding to X i→j occurs in the time range t min < t < t max , the state transition from S i to S j is normal.
In order to analyze the time zone division in the process of state transition intuitively, the relationship among the three signals of the motor estimated speedω m , the error threshold ω thr and virtual reference variable ω r is expressed in Figure 8. According to the signal curve in Figure 8 and the above analysis, the time zone division can be summarized as shown in Equation (17) The proposed STA observer is used to divide the time zone of the variable constraint condition  Figure 9.
When the fault diagnosis system is working, to ensure that the faulty sensor signal is detected and identified in the shortest time, the control system will sample and compare the state transition of the motor drive system in each control cycle. If a state transition process is regarded as a fault signal, the control system records the fault information and carries out the corresponding signal compensation control. Oppositely, if no fault signal is detected, the system is detected to be running normally and proceed to the logic decision of the following control cycle. In Figure 8, according to the relationship amongω m , ω thr and ω r , the time zone can be divided into three parts as follows: (1) Invalid time zone (t n , t min ]. In this interval, ω r keeps decreasing and gradually approachesω m , but ω r is always greater thanω m . Meanwhile, the error is always greater than the set error threshold ω thr . (2) Valid time zone (t min , t max ). The error between ω r andω m is always less than the set error threshold ω thr in this interval.
(3) Invalid time zone (t max , t n+1 ). After time t exceeds t max , the decreasing ω r is always less thanω m . Moreover, the error between ω r andω m is always greater than the set error threshold ω thr .
According to the signal curve in Figure 8 and the above analysis, the time zone division can be summarized as shown in Equation (17): The proposed STA observer is used to divide the time zone of the variable constraint condition X i→j during the state transition process and solve the problem of the time variable constraint condition T i→j in the extended finite state machine. The above workflow based on the FSM-STA Hall sensor fault diagnosis algorithm is summarized, and its implementation logic is shown in Figure 9. Electronics 2021, 10 Figure 9. Fault diagnosis logic based on FSM-STA.
Taking the failure of a single Hall sensor as an example, the fault diagnosis system will have different detection results for three different types of Hall sensor failures: (1) Fault Type 1: When a new jump edge signal is detected in the current commutation period, which is not the signal corresponding to the current variable constraint condition → i j X , it indicates that the Hall sensor with jump edge signal faults with abnormal state transition behavior.
(2) Fault Type 2: When a new jump edge signal is detected in the current commutation period occurring at this time ω ω ω According to the above analysis and the fault diagnosis logic in Figure 9, the fault diagnosis algorithm is designed after integrating the established finite state machine with the motor speed observer based on the STA. The proposed fault diagnosis strategy can effectively distinguish the Hall signal when the motor speed changes direction from the When the fault diagnosis system is working, to ensure that the faulty sensor signal is detected and identified in the shortest time, the control system will sample and compare the state transition of the motor drive system in each control cycle. If a state transition process is regarded as a fault signal, the control system records the fault information and carries out the corresponding signal compensation control. Oppositely, if no fault signal is detected, the system is detected to be running normally and proceed to the logic decision of the following control cycle.
Taking the failure of a single Hall sensor as an example, the fault diagnosis system will have different detection results for three different types of Hall sensor failures: (1) Fault Type 1: When a new jump edge signal is detected in the current commutation period, which is not the signal corresponding to the current variable constraint condition X i→j , it indicates that the Hall sensor with jump edge signal faults with abnormal state transition behavior.
(2) Fault Type 2: When a new jump edge signal is detected in the current commutation period occurring at this time ω thr < ω r −ω m , which corresponds to the current variable constraint condition X i→j , but at this time, it indicates that the variable constraint condition X i→j does not occur in the effective time region. Then, it can be known that the Hall sensor with jump edge signal faults with advance state transition behavior.
(3) Fault Type 3: It is supposed that a new edge signal is not detected until the current commutation cycle ω r <ω m − ω thr . In that case, it indicates that the state transition behavior of the system is not completed in the effective time zone. Therefore, it can be observed that the Hall sensor that should have the edge signal has a Fault Type 3.
According to the above analysis and the fault diagnosis logic in Figure 9, the fault diagnosis algorithm is designed after integrating the established finite state machine with the motor speed observer based on the STA. The proposed fault diagnosis strategy can effectively distinguish the Hall signal when the motor speed changes direction from the Hall signal when the sensor fails and complete the Hall sensor fault diagnosis and identification task.

Signal Reconstruction and Fault-Tolerant Control
After the fault diagnosis is completed, the control system also needs to perform faulttolerant control on the faulty sensor. Hence, the operational stability of the motor drive system can be maintained under fault conditions.
In the fault-tolerant control of the Hall sensor, the rotor rotating angle of the motor should be estimated in real-time. Then the compensation signal of the fault sensor should be generated by the estimation signal, which can be used as the reference signal for motor commutation control of the control system. Through the STA motor speed observer established above, the output motor can be used to estimate the speedω m . The rotation angle θ m of the motor rotor can be estimated in the form of integral. The estimated value of the motor rotation angleθ m can be expressed as: The initial time of the motor drive system in the current commutation cycle is denoted as t n , the initial state is denoted as S i , and the subsequent state of the system is driven by the system input events S j .
Suppose that the ideal time for the state S j to appear is t n+1 . Then, when the motor rotor runs in the commutation interval, the ideal average speed ω n+1 of the motor can be expressed as: Since the state variable ω n+1 is related to the running state of the motor drive system and cannot be accurately calculated, the actual value of the ideal time t n+1 when the state S j appears cannot be obtained. Therefore, the motor estimated speed signalω m from the STA observer is used instead of the state quantity ω n+1 as the average speed of the motor during the commutation interval. Based on this, the estimated valuet n+1 of the ideal time t n+1 can be derived according to Equations (15) and (16), as shown in Equation (20).
Simultaneously, to improve the operation stability of the drive system, the accuracy of the estimated state transition time must be enhanced as much as possible. Therefore, the actual speed of the motor in the previous commutation interval is taken as the initial value of the integral in Equation (20) during each calculation, as shown in Equation (21): Through Equations (20) and (21), the estimation value of state S j existence timet n+1 can be calculated. Then, combining with the normal state transition, compensating Hall signals of the corresponding Hall sensors can be generated according to different fault conditions and used as reference signals in the commutation control of the motor. Similarly, for the fault-tolerant control in the subsequent motor operation cycle, the fault Hall sensor signals that need to compensate can be updated and replaced in real-time by updating the commutation time t n and the motor estimated speedω m .

Experimental Platform
To validate the efficacy of the proposed fault diagnosis and fault-tolerant control strategy, experimental tests are conducted based on a 35-W PMBLDC motor prototype. The overall structure of the proposed real-time fault diagnosis and fault-tolerant control system for Hall sensors in PMBLDCM drives is shown in Figure 10. Hall sensor signals that need to compensate can be updated and replaced in real-time by updating the commutation time n t and the motor estimated speed m ω .

Experimental Platform
To validate the efficacy of the proposed fault diagnosis and fault-tolerant control strategy, experimental tests are conducted based on a 35-W PMBLDC motor prototype. The overall structure of the proposed real-time fault diagnosis and fault-tolerant control system for Hall sensors in PMBLDCM drives is shown in Figure 10. The experimental setup is built, as displayed in Figure 11. The details of the controller are as follows: the digital signal processor (DSP) TMS320F28335 (Texas Instruments, Dallas, TX, USA) is selected as the core control unit; the IR2136s 3-phase bridge driver (Infineon, New bieberg, Germany) is selected as the gate driver; the three-phase inverter consists of the N-channel MOSFET transistor IRFR4615 (Infineon, New bieberg, Germany) with a switching frequency of 5 kHz. In the experiments, the speed and torque signal are measured by the sensor (JN-DN). The currents are detected by Allegro current sensors (ACS712ELCTR-05B-T (Allegro MicroSystems, Manchester, NH, USA)). The time interval of Hall state monitoring is 0.1 ms. The main parameters of the motor are indicated in Table  5.  The experimental setup is built, as displayed in Figure 11. The details of the controller are as follows: the digital signal processor (DSP) TMS320F28335 (Texas Instruments, Dallas, TX, USA) is selected as the core control unit; the IR2136s 3-phase bridge driver (Infineon, New bieberg, Germany) is selected as the gate driver; the three-phase inverter consists of the N-channel MOSFET transistor IRFR4615 (Infineon, New bieberg, Germany) with a switching frequency of 5 kHz. In the experiments, the speed and torque signal are measured by the sensor (JN-DN). The currents are detected by Allegro current sensors (ACS712ELCTR-05B-T (Allegro MicroSystems, Manchester, NH, USA)). The time interval of Hall state monitoring is 0.1 ms. The main parameters of the motor are indicated in Table 5. Hall sensor signals that need to compensate can be updated and replaced in real-time by updating the commutation time n t and the motor estimated speed m ω .

Experimental Platform
To validate the efficacy of the proposed fault diagnosis and fault-tolerant control strategy, experimental tests are conducted based on a 35-W PMBLDC motor prototype. The overall structure of the proposed real-time fault diagnosis and fault-tolerant control system for Hall sensors in PMBLDCM drives is shown in Figure 10. The experimental setup is built, as displayed in Figure 11. The details of the controller are as follows: the digital signal processor (DSP) TMS320F28335 (Texas Instruments, Dallas, TX, USA) is selected as the core control unit; the IR2136s 3-phase bridge driver (Infineon, New bieberg, Germany) is selected as the gate driver; the three-phase inverter consists of the N-channel MOSFET transistor IRFR4615 (Infineon, New bieberg, Germany) with a switching frequency of 5 kHz. In the experiments, the speed and torque signal are measured by the sensor (JN-DN). The currents are detected by Allegro current sensors (ACS712ELCTR-05B-T (Allegro MicroSystems, Manchester, NH, USA)). The time interval of Hall state monitoring is 0.1 ms. The main parameters of the motor are indicated in Table  5.  Figure 11. Experimental Platform. Figure 11. Experimental Platform. The parameters of the STA observer are selected as follows: k 1 = 0.5, k 2 = 6, k 3 = 0.8.

STA Observer Experimental Results
Experiments verify the estimation performance of the proposed STA observer. Meanwhile, the motor speed range is set from 600 rpm to 1200 rpm.
As shown in Figure 12, the estimated current can effectively reflect the actual current, and the maximum error between the actual speed and estimated speed is about 20 rpm. Accordingly, the fault diagnosis threshold during the fault diagnosis process is set to 40 rpm.  The parameters of the STA observer are selected as follows:

STA Observer Experimental Results
Experiments verify the estimation performance of the proposed STA observer. Meanwhile, the motor speed range is set from 600 rpm to 1200 rpm.
As shown in Figure 12, the estimated current can effectively reflect the actual current, and the maximum error between the actual speed and estimated speed is about 20 rpm. Accordingly, the fault diagnosis threshold during the fault diagnosis process is set to 40 rpm.

Fault Diagnosis Experimental Results
The proposed Hall fault diagnosis strategy is signed with M1. To evaluate the effectiveness and superiority of the strategy, a comparative experiment with the fault diagnosis method M2 in [29] is carried out.
Experimental conditions: (1) The controller will run the PMBLDC motor to 200 rpm under the premise of the normal hall signal. When the motor speed reaches 200 rpm and the system enters the steady state, the experimental data will start to be recorded. (2) The motor speed will be increased to 1200 rpm from 0.2 s to 0.4 s. The three different Hall fault types will be simulated in the motor speed increase, and the corresponding fault diagnosis experiments will be analyzed. and M2 are adopted to realize the Hall fault diagnosis experiment. As shown in Figure 13a, the Hall signal fault occurred at t = 335 ms, and the Hall state changed from 010 to 110. Compared to M1 with M2 in Figure 13b, the proposed strategy M1 can immediately diagnose the fault. Meanwhile, when the Hall fault is detected, the output level signal of the fault diagnosis I/O port is converted from low to high. However,

Fault Diagnosis Experimental Results
The proposed Hall fault diagnosis strategy is signed with M 1 . To evaluate the effectiveness and superiority of the strategy, a comparative experiment with the fault diagnosis method M 2 in [29] is carried out.
Experimental conditions: (1) The controller will run the PMBLDC motor to 200 rpm under the premise of the normal hall signal. When the motor speed reaches 200 rpm and the system enters the steady state, the experimental data will start to be recorded.
(2) The motor speed will be increased to 1200 rpm from 0.2 s to 0.4 s. The three different Hall fault types will be simulated in the motor speed increase, and the corresponding fault diagnosis experiments will be analyzed. (1) Fault Type 1 diagnosis experiments: The I/O ports of the DSP are utilized to monitor the Hall signals. When the Hall state change to 010, the I/O port obtaining the Hall signal H a will maintain the high level to simulate fault type 1. At the same time, M 1 and M 2 are adopted to realize the Hall fault diagnosis experiment.
As shown in Figure 13a, the Hall signal fault occurred at t = 335 ms, and the Hall state changed from 010 to 110. Compared to M 1 with M 2 in Figure 13b, the proposed strategy M1 can immediately diagnose the fault. Meanwhile, when the Hall fault is detected, the output level signal of the fault diagnosis I/O port is converted from low to high. However, M 2 did not reflect fault information until t = 336 ms. The strategy M 2 took 1 ms longer than M 1 .   (2) Hall Fault Type 2 diagnosis experiments: Similarly, when the I/O ports acquire the Hall state of 001, the Hall Fault Type 2 will be assumed. It can be seen from Figure 14    Based on the above fault diagnosis experimental results, the comparison of fault diagnosis results between M1 and M2 are summarized in Table 6. It can be found that the proposed fault diagnosis strategy is equipped with the superior fault diagnosis performance compared with Method 2.

Fault-Tolerant Control Experimental Results
After the Hall fault was diagnosed, it is necessary to reconstruct the fault signal and generate the compensated signal to realize fault-tolerant control. The experiments are carried out to verify the validity of the proposed Hall fault-tolerant control strategy. (1) Single Hall fault-tolerant control experimental results: As seen from Figure 16a, the experiment assumes the fault of the Hall signal Ha occurs at t = 0.27 s. Meanwhile, when the fault is diagnosed, the Hall signal reconstruction strategy can ensure the regular operation of the motor. As seen in Figure 16a, the ideal signal can replace the original normal Hall signal. Figure 16b,c showed that the motor speed fluctuated when the fault occurred, and the fluctuation range is 25 rpm. Fortunately, the motor is always in a stable state under the proposed strategy. From Figure 16d, the instantaneous current at the fault point is 2.25 A. The control strategy quickly stabilizes the current after a failure, and it is challenging to find the difference of operation state before and after Hall failure after stability. The experimental results show that the proposed fault-tolerant strategy can rapidly recover the drive system from the fault in a single Hall fault case. Based on the above fault diagnosis experimental results, the comparison of fault diagnosis results between M 1 and M 2 are summarized in Table 6. It can be found that the proposed fault diagnosis strategy is equipped with the superior fault diagnosis performance compared with Method 2.

Fault-Tolerant Control Experimental Results
After the Hall fault was diagnosed, it is necessary to reconstruct the fault signal and generate the compensated signal to realize fault-tolerant control. The experiments are carried out to verify the validity of the proposed Hall fault-tolerant control strategy. (1) Single Hall fault-tolerant control experimental results: As seen from Figure 16a, the experiment assumes the fault of the Hall signal H a occurs at t = 0.27 s. Meanwhile, when the fault is diagnosed, the Hall signal reconstruction strategy can ensure the regular operation of the motor. As seen in Figure 16a, the ideal signal can replace the original normal Hall signal. Figure 16b,c showed that the motor speed fluctuated when the fault occurred, and the fluctuation range is 25 rpm. Fortunately, the motor is always in a stable state under the proposed strategy. From Figure 16d, the instantaneous current at the fault point is 2.25 A. The control strategy quickly stabilizes the current after a failure, and it is challenging to find the difference of operation state before and after Hall failure after stability. The experimental results show that the proposed fault-tolerant strategy can rapidly recover the drive system from the fault in a single Hall fault case.  (2) Double Hall fault-tolerant control experimental results: Figure 17a shows that the Hall signal Ha and Hb failed at t = 0.3 s and t = 0.32 s, respectively. It is apparent that the double Hall signal fault occurred at t = 0.32 s. As shown in Figure 16b, the motor speed fluctuated within the fluctuation range of 30 rpm. The detailed speed curves at the fault point can be seen in Figure 17c. The busbar current curve is shown in Figure 17d. To all appearances, the maximum instantaneous current is 2.11 A at the double Hall fault point. After adopting the fault-tolerant control strategy proposed in this paper, the motor speed and current of the system tend to be stable. Hence, we can know that the fault-tolerant control can effectively troubleshoot the double Hall fault problem. (2) Double Hall fault-tolerant control experimental results: Figure 17a shows that the Hall signal H a and H b failed at t = 0.3 s and t = 0.32 s, respectively. It is apparent that the double Hall signal fault occurred at t = 0.32 s. As shown in Figure 16b, the motor speed fluctuated within the fluctuation range of 30 rpm. The detailed speed curves at the fault point can be seen in Figure 17c. The busbar current curve is shown in Figure 17d. To all appearances, the maximum instantaneous current is 2.11 A at the double Hall fault point. After adopting the fault-tolerant control strategy proposed in this paper, the motor speed and current of the system tend to be stable. Hence, we can know that the fault-tolerant control can effectively troubleshoot the double Hall fault problem. The experiment results demonstrated that the proposed fault-tolerant control strategy can reconstruct the Hall signal in case of the single or double Hall failure and make the drive system restore the stable operation rapidly. Meanwhile, the large current fluctuations are inexistent, and the reliability of the drive system is enhanced.

Conclusions
This paper focuses on the real-time fault diagnosis and fault-tolerant control strategy for Hall sensors in PMBLDC motor drives. Firstly, the Hall sensor faults are classified into three types based on the different sectors of the rotor when the fault occurs in Section 2. In Section 3, a real-time fault diagnosis strategy based on the EFSM and STA speed observer is proposed for the Hall sensor failure of the PMBLDC motor. Meanwhile, the Hall signal compensation controller is also present in Section 3, designed to realize the fault-tolerant control. The proposed method is simple to be implemented in engineering.
Furthermore, a 35-W PMBLDC motor experimental platform is set up in Section IV. According to the experimental results, the proposed fault diagnosis takes less time to diagnose the Hall fault than the method in [29]. Further, the proposed fault-tolerant control strategy can ensure the stable operation of the motor under Hall sensor failure situations with failures of single or double Hall sensors.
Finally, with the application background of the electric brake system, the proposed method will be applied to the unmanned aerial vehicle (UAV) brake system in future works. The successful application of the strategy is of great significance to improve the operational reliability of UAVs. The experiment results demonstrated that the proposed fault-tolerant control strategy can reconstruct the Hall signal in case of the single or double Hall failure and make the drive system restore the stable operation rapidly. Meanwhile, the large current fluctuations are inexistent, and the reliability of the drive system is enhanced.

Conclusions
This paper focuses on the real-time fault diagnosis and fault-tolerant control strategy for Hall sensors in PMBLDC motor drives. Firstly, the Hall sensor faults are classified into three types based on the different sectors of the rotor when the fault occurs in Section 2. In Section 3, a real-time fault diagnosis strategy based on the EFSM and STA speed observer is proposed for the Hall sensor failure of the PMBLDC motor. Meanwhile, the Hall signal compensation controller is also present in Section 3, designed to realize the fault-tolerant control. The proposed method is simple to be implemented in engineering.
Furthermore, a 35-W PMBLDC motor experimental platform is set up in Section 4. According to the experimental results, the proposed fault diagnosis takes less time to diagnose the Hall fault than the method in [29]. Further, the proposed fault-tolerant control strategy can ensure the stable operation of the motor under Hall sensor failure situations with failures of single or double Hall sensors.
Finally, with the application background of the electric brake system, the proposed method will be applied to the unmanned aerial vehicle (UAV) brake system in future works.
The successful application of the strategy is of great significance to improve the operational reliability of UAVs.