Multiple Sensor Fault Detection Algorithm for Fault Tolerant Control of BLDC Motor

: A direct redundancy-based fault tolerant control system (FTCS) is proposed for the operation of a brushless DC (BLDC) motor in the case of multiple sensor failures. The presented method expands on the previously published work that dealt with the failure of a single Hall-effect sensor. In this paper, a novel algorithm is developed along with the new experimental scheme and the FTCS can deal with the failure of up to two Hall-effect sensors. The fault tolerant control (FTC) algorithm is based on three conditions and is designed to deal with any scenario of the sensor faults. Simulation was performed and presented experimental results show effectiveness and validation of the method. The method can be implemented with ease, is fast and does not require high end processors. result, motor speed appears to be morethan double within electrical 90°, which is evident from Equation (1) above. Therefore, it is assumed that it is not possible under normal operation of the motor, and hence the fault detection by condition-one. All the fault cases of the Hall-effect sensor P1 edge appearing before Hall-effect sensor S1 will be detected by condition-one. For the event when the P1 edge appears after S1 and before P2, such a case is sensed by comparing the transition times of P1 to P2. Under normal operation and in counter-clockwise direction, transition time of P1 will always be greater than P2, however, malfunctioning of the sensor P1 may result in the edge to occur earlier than P2, and hence the fault detection by condition-two. Similarly, a P1 edge between P2 and S3 is also detected by analogous condition to condition-two. Cases detected by condition-two may cause incorrect commutation of motor phase currents of less than electrical 30° and are depicted in Figure 3c. A damaged sensor may not trigger an edge or the transition happens after S3, and before the expected time, may be detected by condition-three. Condition-three distinguishes the fault by detecting a sudden decrease in the motor velocity, as is evident from Equation (2). The two fault cases of condition-three are illustrated in Figure 3d. Fault detection by condition-three may cause fault currents of a maximum of electrical 60°. All the fault cases shown in Figure 3 are regarding the rising edge, however, for the falling edge, the method will be the same as rising edge. Hall-effect sensor P2 fault cases are depicted in Figure 4 and the fault detection logic is the same as explained for the Hall-effect sensor P1. Author Contributions: Conceptualization, M.A.; methodology, M.A.; validation, M.A.; resources, J.H.; writing—original draft preparation, M.A.; writing—review and editing, M.A. and J.H.; visual-ization, M.A.; supervision, J.H.; funding acquisition, J.H.


Introduction
Nowadays, there is increased drive towards more and more electric transportation and initiatives are taking place around the globe. In a modern electric vehicle, there are numerous electric motors [1], however, permanent magnet synchronous motor (PMSM) used for propulsion of the vehicle is very important. A propulsion motor needs to be highly reliable and robust [2]. Furthermore, PMSMs find application in aerospace industry [3], automotive industry [4], and consumer appliances [5]. Higher efficiency, high power density, low maintenance costs, wide speed range, robustness and high reliability are a few of the features a PMSM offers [1,6,7]. For high reliability, robustness and applications where human safety is crucial, these require intelligent systems such as a fault tolerant control system (FTCS). Therefore, recently, there has been increased focus towards FTCS for PMSM faults [2,8,9].
Brushless DC (BLDC) is a type of PMSM, and for the control of motor, often discrete Hall-effect sensors provide the required rotor position. The Hall-effect sensor position feedback information is used for electronic 120 • commutation of the BLDC motor phases [10]. As a position sensing element, a Hall-effect sensor may fail any time during the life of the motor. Therefore, when one of the Hall-effect sensors becomes faulty or damaged, motor operation is severely affected and after two sensor failures, the motor comes to a complete stop. Such a scenario may result in very dangerous and life-threatening situations in the aerospace or automotive industries and such situations must be avoided at all costs. In order to maintain the motor operation with the damaged sensor, FTCS is required. The FTCS keeps the motor operating and functional till the maintenance can be performed or the damaged part can be replaced [11]. A BLDC motor system may suffer from various types of faults such as winding-related, inverter-related or position sensor-related faults. For the winding-and inverter-related faults, often motor design or inverter design is augmented. However, position sensor fault can completely be remedied using intelligent control system. For that purpose, there are several articles on FTC of position sensor fault. In the study of [12], a combinational circuit is designed for fault diagnosis and identification of one Hall-effect sensor. A BLDC motor Furthermore, in case of a multiple sensor fault, it is not possible to start the motor in a known direction, hence the method cannot be used for the applications where frequent stops are required, such as electric scooters. The authors in [23] describe Hall-effect sensor faults by stating three different approaches: The first method discusses the state-sensitive technique where the last three states of sensors are kept in memory and the controller continuously compares the current state with the stored pattern and if a changed sequence is detected, that means that there is a fault. The second approach describes the use of the sensor transition order, by saving the last two transitions in memory. A modification in transition sequence points to a sensor fault. The third method works by following a conditions-based approach which, in some situations, can also result in wrong fault type diagnosis. Such a fault is rectified after further rotation of the motor. All the three methods are modest; however, they rely on an assumption that the motor is continuously running when the fault occurs, which, in certain applications, is not the case. Moreover, at some occasions, the FTC requires up to 10 ms for the remedial strategy to be adopted and for these 10 ms, an incorrect commutation sequence causes transient currents which, consequently, result in huge speed variations. A fault tolerant control algorithm is devised; simulation and experimental results are discussed as well. A virtual Hall-effect sensor signal is created off each of the other two Hall sensors; furthermore, each pair of Hall sensor signals is checked for fault and compared with the other pair of Hall sensor signals. The sensor maintains constant value as the rotor rotates, and is diagnosed and identified as the failed sensor. For compensation, the virtually generated signal is replaced with the faulty sensor's signal. The algorithm does not work at very low speeds and suggests implementation as a standalone subsystem [24]. Hall-effect sensor fault is detected by an acceleration threshold and identification of a damaged sensor is performed using comparative statements [25]. Comparative statements rely on the point that under healthy motor action, the sensor value is required to transition between high and low levels. Nevertheless, the case is not discussed when fault occurs while the threshold is not triggered or in the event the sensor retains the value of 0 or 1, permanently. Moreover, the techniques that depend on the motor parameters such as sensorless algorithms, are favorable in terms of cost savings and decrease the overall component count; however, such methods suffer from changes in motor parameter values. Sensorless algorithms are very complex and computation heavy, thus, requiring high-end digital signal processors (DSP). Moreover, sensorless methods work well for the motors with salient rotor, while for non-salient motors, sensorless control results are not good at low speeds or with load variations [26]. This paper proposes a new algorithm based on a direct redundant idea to deal with the fault of up to two Hall-effect sensors. The single sensor FTCS presented in [13] fails when double sensor fault is considered; therefore, here, a novel algorithm is devised to deal with the double sensor faults. Furthermore, a completely new experimental scheme is devised to validate the algorithm. Section 2 explains the effects of the damaged sensor, sensor faults and remedy of the faults; Section 3 explains the algorithm; MATLAB/Simulink simulation is performed in Section 4; experimental results are presented in Section 5; Section 6 is on the comparison of the presented method with the other published techniques and the conclusion is in Section 7.

Single Hall-Effect Sensor FTCS
Earlier, authors have published the work on single sensor FTCS based on direct redundant sensors [13]. The direct redundant sensors consist of a set of primary and a set of secondary sensors as shown in Figure 1. Primary are for the main motor operation while the secondary sensors offer fast fault detection, motor startup in case of the sensor failure and increased availability of torque. the secondary sensors offer fast fault detection, motor startup in case of the sen and increased availability of torque.

Multiple Hall-Effect Sensor FTCS
For control of a BLDC motor, a rotor position feedback device is essential. for various applications, Hall-effect sensors are used. Under normal operation tor, Hall-effect devices provide the required rotor position information, howe aftermath of sensor failures, this information is lost and the motor cannot co regular operation. Figure 2a shows the motor response when one of the Hall-eff is damaged and Figure 2b shows the motor phase currents after the malfunct Hall-effect sensors. Hall-effect sensor, P1, fault causes the motor speed to dro rpm to 358 rpm, which is 36% reduction in motor speed. Furthermore, the curr tudes approximately double while Phase-U and Phase-W only conduct unidirec rents. Figure 2b shows that motor stops completely after two Hall-effect sens and P2 malfunction and remain zero permanently. A double sensor fault causes U leg of the bridge to not gain any signal at all, and thus, Phase-U current rem permanently. Therefore, after Hall-effect sensor faults, a FTC system is required the motor operation. A double Hall-effect sensor fault here is assumed that se occur in succession, i.e., Hall-effect sensor P1 malfunctions at time and Hall sor P2 faults later on at time during the motor operation, such that there is t to be remedied.

Multiple Hall-Effect Sensor FTCS
For control of a BLDC motor, a rotor position feedback device is essential. Therefore, for various applications, Hall-effect sensors are used. Under normal operation of the motor, Hall-effect devices provide the required rotor position information, however, in the aftermath of sensor failures, this information is lost and the motor cannot continue the regular operation. Figure 2a shows the motor response when one of the Hall-effect sensors is damaged and Figure 2b shows the motor phase currents after the malfunction of two Hall-effect sensors. Hall-effect sensor, P1, fault causes the motor speed to drop from 563 rpm to 358 rpm, which is 36% reduction in motor speed. Furthermore, the current amplitudes approximately double while Phase-U and Phase-W only conduct unidirectional currents. Figure 2b shows that motor stops completely after two Hall-effect sensors, i.e., P1 and P2 malfunction and remain zero permanently. A double sensor fault causes the Phase-U leg of the bridge to not gain any signal at all, and thus, Phase-U current remains zero permanently. Therefore, after Hall-effect sensor faults, a FTC system is required to sustain the motor operation. A double Hall-effect sensor fault here is assumed that sensor faults occur in succession, i.e., Hall-effect sensor P1 malfunctions at time t 1 and Hall-effect sensor P2 faults later on at time t 2 during the motor operation, such that there is time for P1 to be remedied.
Fault detection and identification logic for Hall-effect sensor P1 is explained and the possible fault cases of one sensor fault are shown in Figure 3. Figure 3a shows the healthy Hall-effect sensor P1 with respect to the rest of the sensor transitions. The first sensor fault is detected mainly by three conditional statements in the main program. Condition-one (conditions are described later in Section 3) compares the speed computed by the edges of the Hall-effect sensor P1 to motor speed computed in sector-5, as shown in Figure 3b. Motor speed is calculated by the equations. Fault detection and identification logic for Hall-effect sensor P1 is explained and the possible fault cases of one sensor fault are shown in Figure 3. Figure 3a shows the healthy where ω h , ω sect , p, ∆T x , ∆T y is mechanical speed calculated by electrical 180 • edges, speed calculated by electrical 30 • edges, rotor pole pairs, sector time, healthy sensor time, x can be H or F, and y can be S or F, respectively. S is for sector time and F is for fault time; with F, the motor speed will be ω f lt . Now, an erroneous P1 edge causes the time related to electrical 180 • to be very short, and as a result, motor speed appears to be morethan double within electrical 90 • , which is evident from Equation (1) above. Therefore, it is assumed that it is not possible under normal operation of the motor, and hence the fault detection by condition-one. All the fault cases of the Hall-effect sensor P1 edge appearing before Hall-effect sensor S1 will be detected by condition-one. For the event when the P1 edge appears after S1 and before P2, such a case is sensed by comparing the transition times of P1 to P2. Under normal operation and in counter-clockwise direction, transition time of P1 will always be greater than P2, however, malfunctioning of the sensor P1 may result in the edge to occur earlier than P2, and hence the fault detection by condition-two. Similarly, a P1 edge between P2 and S3 is also detected by analogous condition to condition-two. Cases detected by condition-two may cause incorrect commutation of motor phase currents of less than electrical 30 • and are depicted in Figure 3c. A damaged sensor may not trigger an edge or the transition happens after S3, and before the expected time, may be detected by condition-three. Condition-three distinguishes the fault by detecting a sudden decrease in the motor velocity, as is evident from Equation (2). The two fault cases of condition-three are illustrated in Figure 3d. Fault detection by condition-three may cause fault currents of a maximum of electrical 60 • . All the fault cases shown in Figure 3 are regarding the rising edge, however, for the falling edge, the method will be the same as rising edge. Hall-effect sensor P2 fault cases are depicted in Figure 4 and the fault detection logic is the same as explained for the Hall-effect sensor P1.   (b) Fault case when P1 sensor gives too high speed reading; (c) P1 erroneous edge occurs between S1 and P2; an edge in sector 10 will be similar case as well; (d) P1 transition earlier than expected time, and after S3 edge and remains permanently 1, a case of no edge will be similar as well.
Electronics 2021, 10, 1038 7 of 18 edge occurs between S1 and P2; an edge in sector 10 will be similar case as well; (d) P1 transition earlier than expected time, and after S3 edge and remains permanently 1, a case of no edge will be similar as well.
where ℎ , , , ∆ , ∆ is mechanical speed calculated by electrical 180° edges, speed calculated by electrical 30° edges, rotor pole pairs, sector time, healthy sensor time, can be H or F, and can be S or F, respectively. S is for sector time and F is for fault time; with F, the motor speed will be . Now, an erroneous P1 edge causes the time related to electrical 180° to be very short, and as a result, motor speed appears to be morethan double within electrical 90°, which is evident from Equation (1) above. Therefore, it is assumed that it is not possible under normal operation of the motor, and hence the fault detection by condition-one. All the fault cases of the Hall-effect sensor P1 edge appearing before Hall-effect sensor S1 will be detected by condition-one. For the event when the P1 edge appears after S1 and before P2, such a case is sensed by comparing the transition times of P1 to P2. Under normal operation and in counter-clockwise direction, transition time of P1 will always be greater than P2, however, malfunctioning of the sensor P1 may result in the edge to occur earlier than P2, and hence the fault detection by condition-two. Similarly, a P1 edge between P2 and S3 is also detected by analogous condition to condition-two. Cases detected by condition-two may cause incorrect commutation of motor phase currents of less than electrical 30° and are depicted in Figure 3c. A damaged sensor may not trigger an edge or the transition happens after S3, and before the expected time, may be detected by condition-three. Condition-three distinguishes the fault by detecting a sudden decrease in the motor velocity, as is evident from Equation (2). The two fault cases of condition-three are illustrated in Figure 3d. Fault detection by condition-three may cause fault currents of a maximum of electrical 60°. All the fault cases shown in Figure 3 are regarding the rising edge, however, for the falling edge, the method will be the same as rising edge. Hall-effect sensor P2 fault cases are depicted in Figure 4 and the fault detection logic is the same as explained for the Halleffect sensor P1.   (c) Faulty P2 edge occurs between S2 and P3; P2 transitions after P3 and before S1 will be a similar case, and (d) P2 fails subsequent to S1 and prior than the expected time and remains permanently high.
Fault detection, identification and compensation explained here was for counterclockwise (CCW) rotation of the motor, however, for the clockwise (CW) direction, the same method may be used with only the transition order in reverse. Moreover, the method does not depend on load variations since this method only relies on sensor edges.

Explanation of Program Flowchart of the FTCS
Flowchart for the logic of the main program is shown in Figure 5. At the start of each cycle, the program checks whether a transition occurred. Transition is detected by sensing sensor output level change. Afterwards, transition time is stored and individual sector speed is calculated. The edge time and sector speeds are subsequently utilized by the three conditions to detect the individual sensor faults. Upon detection and identification of the   (b) Sensor P2 sensor causes incorrect speed reading; (c) Faulty P2 edge occurs between S2 and P3; P2 transitions after P3 and before S1 will be a similar case, and (d) P2 fails subsequent to S1 and prior than the expected time and remains permanently high.
Fault detection, identification and compensation explained here was for counterclockwise (CCW) rotation of the motor, however, for the clockwise (CW) direction, the same method may be used with only the transition order in reverse. Moreover, the method does not depend on load variations since this method only relies on sensor edges.

Explanation of Program Flowchart of the FTCS
Flowchart for the logic of the main program is shown in Figure 5. At the start of each cycle, the program checks whether a transition occurred. Transition is detected by sensing sensor output level change. Afterwards, transition time is stored and individual sector speed is calculated. The edge time and sector speeds are subsequently utilized by the three Electronics 2021, 10, 1038 9 of 18 conditions to detect the individual sensor faults. Upon detection and identification of the damaged sensor, the respective sensor condition is set. Additionally, the malfunctioned Hall-effect sensor signal is replaced by a controller generated compensation signal, since one of the sensors is damaged, therefore, speed is not calculated for the faulty sensor and the compensated speed is used. The program logic is similar for fault detection, identification and compensation of Hall-effect sensor P2, as well.
, 1038 9 of 18 damaged sensor, the respective sensor condition is set. Additionally, the malfunctioned Hall-effect sensor signal is replaced by a controller generated compensation signal, since one of the sensors is damaged, therefore, speed is not calculated for the faulty sensor and the compensated speed is used. The program logic is similar for fault detection, identification and compensation of Hall-effect sensor P2, as well. A MATLAB/Simulink simulation model was used for testing the main program logic, which was designed and published in earlier work of the authors [13].

Validation of the Algorithm by a MATLAB/Simulink Simulation
An open loop MATLAB/Simulink simulation of the motor is performed as the drive system used during the experiments is open loop control as well. Block diagram of the simulation is shown in Figure 6. The reference speed is converted to the input of the inverter by the PI controller. Therefore, motor phase currents are controlled by the Halleffect sensor commutation table. Hence, the motor speed is controlled. A double sensor fault is simulated where the sensor remains high after the fault and causes an electrical 30° transient currents. The motor used in the simulation is ideal and thus, the current drawn is close to zero. However, the fault transients are shown causing electrical 30° of the irregular currents for each of the sensor faults and are shown in Figure 7. The momentary changes in the motor speed caused by the faults are depicted in Figure 8. The speed A MATLAB/Simulink simulation model was used for testing the main program logic, which was designed and published in earlier work of the authors [13].

Validation of the Algorithm by a MATLAB/Simulink Simulation
An open loop MATLAB/Simulink simulation of the motor is performed as the drive system used during the experiments is open loop control as well. Block diagram of the simulation is shown in Figure 6. The reference speed is converted to the input of the inverter by the PI controller. Therefore, motor phase currents are controlled by the Halleffect sensor commutation table. Hence, the motor speed is controlled. A double sensor fault is simulated where the sensor remains high after the fault and causes an electrical 30 • transient currents. The motor used in the simulation is ideal and thus, the current drawn is close to zero. However, the fault transients are shown causing electrical 30 • of the irregular currents for each of the sensor faults and are shown in Figure 7. The momentary changes in the motor speed caused by the faults are depicted in Figure 8. The speed bumps are approximately of 2 rpm. Moreover, if translated to change in a sector's width at 540 rpm, the additional width in terms of electrical degrees results in 0.1111 • . Such a small change in the sector width is inconsequential since speed computation based on the Hall-effect sensors is inherently noisy. Therefore, it does not affect the motor response severely. After that, a comparison of motor speed acceleration is performed with the faulty and healthy sensors. The speed comparison elaborates the effects of the control error and the speed error. Moreover, the results of the speed comparison simulation are shown in Figure 9. Here, it is noteworthy that the speed error is very small and therefore, the curves can be considered the same. Furthermore, since the speed calculated using Hall-effect sensors is noisy, thus, this very small error is not noticeable in the experimental results which are discussed in the next section. and healthy sensors. The speed comparison elaborates the effects of the control error and the speed error. Moreover, the results of the speed comparison simulation are shown in Figure 9. Here, it is noteworthy that the speed error is very small and therefore, the curves can be considered the same. Furthermore, since the speed calculated using Hall-effect sensors is noisy, thus, this very small error is not noticeable in the experimental results which are discussed in the next section.  and healthy sensors. The speed comparison elaborates the effects of the control error and the speed error. Moreover, the results of the speed comparison simulation are shown in Figure 9. Here, it is noteworthy that the speed error is very small and therefore, the curves can be considered the same. Furthermore, since the speed calculated using Hall-effect sensors is noisy, thus, this very small error is not noticeable in the experimental results which are discussed in the next section.

Experimental Results and Discussion
In order to validate and verify the presented Hall-effect sensor FTC system for motor operation, experiments are performed.

Experimental Results and Discussion
In order to validate and verify the presented Hall-effect sensor FTC system for motor operation, experiments are performed.

Experimental Results and Discussion
In order to validate and verify the presented Hall-effect sensor FTC system for motor operation, experiments are performed. Table 1 describes the equipment used during the experiments.  Figure 10 shows the experimental scheme and the setup for the validation of the FTC system. The FTC algorithm for the Hall-effect sensor failures is implemented into the dSPACE box 1202. Six Hall-effect sensor signals from the motor are fed directly to the dSPACE box input channels, where the algorithm continuously search for sensor faults.  ControlDeskNG5.5 Figure 10 shows the experimental scheme and the setup for the validation of the FTC system. The FTC algorithm for the Hall-effect sensor failures is implemented into the dSPACE box 1202. Six Hall-effect sensor signals from the motor are fed directly to the dSPACE box input channels, where the algorithm continuously search for sensor faults. For the case of implementation on a micro controller, input capture channels can be used [27]. The output channels of dSPACE box provide three Hall-effect signals, which are fed to the motor driver for the motor operation. In case of fault of Hall-effect sensors, the FTC algorithm detects, identifies and compensates the faulty signals by internally generating virtual signals replacing the faulty sensor signals. Experiments were performed both at constant speed and at transient operation of the motor as well. The proposed method shows equally effective results for both the cases. Figure 11 shows experiment results of the multiple sensor fault and compensation. Figure 11a shows the overall response of the system to the double sensor fault, while, Figure 11b shows the zoomed view of P1 sensor fault, detection and compensation. Halleffect sensor P1 remains zero permanently and is detected by the following edge of Halleffect sensor S2. From the instant of the fault and to the detection of the fault, the motor currents are incorrect and wrong commutation lasts for electrical 30°. Afterwards, the motor currents are compensated and regular motor operation continues. Hall-effect sensor P2 fault response is similar, therefore, is not shown as zoomed view. A fault where Hall- For the case of implementation on a micro controller, input capture channels can be used [27]. The output channels of dSPACE box provide three Hall-effect signals, which are fed to the motor driver for the motor operation. In case of fault of Hall-effect sensors, the FTC algorithm detects, identifies and compensates the faulty signals by internally generating virtual signals replacing the faulty sensor signals. Experiments were performed both at constant speed and at transient operation of the motor as well. The proposed method shows equally effective results for both the cases. Figure 11 shows experiment results of the multiple sensor fault and compensation. Figure 11a shows the overall response of the system to the double sensor fault, while, Figure 11b shows the zoomed view of P1 sensor fault, detection and compensation. Hall-effect sensor P1 remains zero permanently and is detected by the following edge of Halleffect sensor S2. From the instant of the fault and to the detection of the fault, the motor currents are incorrect and wrong commutation lasts for electrical 30 • . Afterwards, the motor currents are compensated and regular motor operation continues. Hall-effect sensor P2 fault response is similar, therefore, is not shown as zoomed view. A fault where Halleffect sensor P1 or P2 may remain 0 or 1 permanently, will result in similar system response as shown in Figure 11. Figure 11b show that due to the fault Phase-V conducts for electrical 150 • while Phase-W conducts for electrical 210 • . Transient currents last till the fault is compensated. FTCP1 is the controller generated compensation signal to replace Hall-effect sensor P1. Figure 11b shows that the fault causes the FTCP1 signal to have a low that lasts for electrical 210 • , while the high lasts for electrical 150 • . However, after the compensation, the signal periods become normal and symmetric.
A fault that causes the speed reading to be recorded more than double, compared to the last sector speed, is detected momentarily and does not cause any incorrect commutation. Moreover, motor phase currents show no signs of fault, as if fault never happened. The experimental results are shown in Figure 12. P1 and P2 sensor faults cause a sudden sharp increase in the motor speed within a very small electrical rotation. Thus, the fault is detected and compensated momentarily.
Results of the experiment showing faults detected by the comparison of the transition times are shown in Figure 13. P1 sensor fault is similar to the earlier explained case while P2 sensor fault show the system response for when P2 edge lies between the sensors P3 and S1. Motor currents start to increase after the P2 fault and subsequently drop to normal after detection and compensation of the fault at the sensor S1 edge. The fault in such a case can cause transient currents for up to electrical 30 • .
A malfunction of a Hall-effect sensor will result in a fault that is detected by either of the three conditions mentioned in Figure 5. Therefore, the resulting system response will be similar to  Furthermore, the experiments were performed at 560 rpm with a 3-polepair (PP) PMSM. At 560 rpm electrical 60 • corresponds to 6 ms and electrical 60 • is the maximum for the fault to be remedied. With the swift system response, there was no noticeable change in the speed readings. Thus, speed plots were omitted. effect sensor P1 or P2 may remain 0 or 1 permanently, will result in similar system response as shown in Figure 11. Figure 11b show that due to the fault Phase-V conducts for electrical 150° while Phase-W conducts for electrical 210°. Transient currents last till the fault is compensated. FTCP1 is the controller generated compensation signal to replace Hall-effect sensor P1. Figure 11b shows that the fault causes the FTCP1 signal to have a low that lasts for electrical 210°, while the high lasts for electrical 150°. However, after the compensation, the signal periods become normal and symmetric.
(a) Figure 11. Cont. A fault that causes the speed reading to be recorded more than double, compared to the last sector speed, is detected momentarily and does not cause any incorrect commutation. Moreover, motor phase currents show no signs of fault, as if fault never happened. The experimental results are shown in Figure 12. P1 and P2 sensor faults cause a sudden sharp increase in the motor speed within a very small electrical rotation. Thus, the fault is detected and compensated momentarily. Results of the experiment showing faults detected by the comparison of the transition times are shown in Figure 13. P1 sensor fault is similar to the earlier explained case while P2 sensor fault show the system response for when P2 edge lies between the sensors P3 and S1. Motor currents start to increase after the P2 fault and subsequently drop to normal after detection and compensation of the fault at the sensor S1 edge. The fault in such a case can cause transient currents for up to electrical 30°.  Figure 13. Hall-effect sensor P2 transition after P3 and before S1: (a) P1 and P2 faults are shown, where P1 fault is similar to Figure 11; (b) P2 fault is shown as zoomed-in.
A malfunction of a Hall-effect sensor will result in a fault that is detected by either of the three conditions mentioned in Figure 5. Therefore, the resulting system response will be similar to Figures 11-13.
Furthermore, the experiments were performed at 560 rpm with a 3-polepair (PP) PMSM. At 560 rpm electrical 60° corresponds to 6 ms and electrical 60° is the maximum Figure 13. Hall-effect sensor P2 transition after P3 and before S1: (a) P1 and P2 faults are shown, where P1 fault is similar to Figure 11; (b) P2 fault is shown as zoomed-in.

Comparison of the FTC Methods
An arduous task is to perform the comparison of all the presented methods in different published papers. For instance, the motor pole pairs, load conditions, microcontroller used, and speed at which experiments are performed vary from one article to the other. Therefore, it is very important to find the common basis on which the comparison can be performed. The common basis for this comparison is the motor rotation in terms of electrical degrees taken by the proposed technique, which is not affected by the above mentioned differences. Furthermore, since the time taken by the FTCS depends on speed, i.e., at low speeds, the time expended by FTCS will be longer than at higher speeds. Therefore, fault detection, identification, isolation, and compensation accomplished in the least number of electrical degrees may be called the most efficient technique and vice versa. Furthermore, only the papers that show experimental results and motor parameters are included in the comparison. In that respect, the authors in [19] ensure the FTC in the shortest possible time; nevertheless, the authors state that in case of excessive acceleration or deceleration, the algorithm needs to be turned off to avoid false alarms. The authors in [18] propose a non-invasive FTC approach by analyzing the motor line voltages, however, the presented design results in maximum electrical degrees to compensate for the fault. The rest of the suggested methods lie between the above mentioned two extremes and are provided in Table 2, with respect to the electrical degrees expended by the FTC technique. a Electrical degrees depend on ε, τ and τ n where ε is threshold coefficient, τ is time interval from the last commutation moment, and τ n is average value of τ. *** Results of this paper.

Conclusions
A direct redundant fault tolerant control system for up to two Hall-effect sensor failures is presented. The method detailed in this paper is an extension of the previously published work on direct redundant fault tolerant control. The presented scheme is based on mainly three conditions to detect Hall-effect sensor fault. All the possible fault cases fall under these conditions. A fault detected due to the sudden speed change will cause electrical 0 • of faulty currents and will swiftly be compensated. Moreover, all the other fault cases will be detected within either electrical 30 • or at most electrical 60 • . The main contribution is the development of the fault tolerant control algorithm. Simulation and experimental results of the designed and working system are presented. The results show effectiveness and validity of the proposed method. Future research can focus on the development of a motor startup method based on direct redundant sensors. Furthermore, the redundant sensors increase the component count, however, they offer fast fault detection, increased availability of torque, and motor startup in case of sensor faults.
This method is not affected by load change, signal noise or sensor offset generated issues since the fault detection and identification relies solely on sensor transitions only. The developed algorithm is general in the sense that it may be applied to any of the two sensors or may be extended to include more sensor failures.