A hybrid fault-tolerant control strategy for four-wheel independent drive vehicles

In this paper, a hybrid fault-tolerant control strategy is putted forward to improve the stability of the four-wheel independent drive (4WID) electric vehicle with motor failures. To improve the handling performance of the vehicle with in-wheel motor failures, the faults of in-wheel motors are analyzed and modeled. Then, a model reference adaptive fault observer was designed to observe the faults in real-time. Based on the observation results, there are designed a model predictive control (MPC) based high-performance active fault-tolerant control (AFTC) strategy and a sliding mode control based high-robust passive fault-tolerant control (PFTC) strategy. However, the fault observation results may not always be accurately. For this circumstance, a hybrid fault-tolerant control strategy was designed to make the control method find a balance between optimality and robustness. Finally, a series of simulations are conducted on a hardware-in-loop (HIL) real-time simulator, the simulation results show that the control strategy designed in this paper is effectiveness.


Introduction
Compared with the traditional vehicle, a four-wheel independent drive (4WID) electric vehicle's driving system is very efficient, its torque output response is much quicker and precise, and every wheel can be controlled independently. These characteristics make it possible to apply advanced control theory to vehicles, which enhances handling performance. 1 4WID vehicles have four in-wheel motors, and their electric systems are quite complex. There are some evidences that 4WID vehicles have a higher failure rate than traditional vehicles. 2 Classifying the factors that cause failures, they can be divided into four types 3,4 : (1) Drive motor failure: the fault is mainly demagnetization caused by high temperature after high load, under these circumstances, the motor would no longer provide the torque we desired, resulting in a change in the state of the vehicle. (2) Controller and sensor failure: if the internal IGBT components of the controller are malfunctioning, the connectors are in poor contact, or the sensors cannot return the correct value. The output current and voltage of the controller would drop, also the output current waveform may deviate, these would lead to a deviation between the actual output and the desired output. (3) Communication failure: the communication between Micro Control Units (MCUs) mainly relies on the CAN networks, the delay and frame loss of the network affect the coordinated operation between the MCUs, the output of the motor may deviate. Generally, a driving wheel fails (scenarios are shown in Figure 1(a)), which means that at least one in-wheel motor cannot achieve the desired torque, the vehicle handling performance becomes unpredictable and unstable, and the yaw stability of the vehicle may change. 5 As shown in Figure 1(b), the malfunctioning vehicle cannot follow the reference path well with no additional adaptive fault-tolerant strategy. However, it is a 4WID electric vehicle, if one or two wheels (not the same side) fail, the faulty wheel can still provide partial driving forces, the faulty vehicle can still maintain its handling performance. 6 Fault-tolerant control (FTC) strategies have been widely used on spacecraft. FTC could improve the performance of malfunctioning systems. At present, faulttolerant strategies can be divided into two categories: passive fault-tolerant control (PFTC) strategies and active fault-tolerant control (AFTC) strategies. 7 The essence of PFTCs is to enhance the robustness of the system and make the system insensitive to external disturbances. When the vehicle drive system malfunctions, the value of the vehicle's state response will deviate from the predicted value calculated by the vehicle controller e(k) =x(k) À x(k). In paper, 8 an adaptive Proportion Integration Differentiation (PID) based PFTC strategy was designed, in which active front wheel steering was used to compensate for driving system failure, and the experimental results showed that the strategy was effective at low speeds. In order to expand the controllable speed range, an HN method based optimal control strategy was proposed. 9 Generally, malfunctioning drive wheels still have some drive capacity. 10 Utilizing the remaining drive capacity of the failed wheel and taking the output uncertainty into account, a control strategy used the Lyapunov function can be designed. 11 However, this strategy was sensitive to unpredictable disturbances and was effective only for limited malfunctions. In paper, 12 a linear parameter varying (LPV) model was used to represent all possible modes of a malfunctioning 4WID vehicle. On this basis, Wang and Wang 13 established an LPV vehicle model, and used linear matrix inequality (LMI) theory to obtain the best control gain values. Compared with the traditional PFTC strategy, this strategy was more robust and more effective. AFTC strategies can actively modify the parameters to adapt to changes or disturbances caused by malfunctions. 14 Hu et al. 8 proposed an active fault observation method to estimate in-wheel motor faults in which the adhesion coefficient of each wheel was estimated, and wheels with abnormal estimates were considered as malfunction wheel. Zhang et al. 15 proposed a two-step observer that step 1 was to locate which side the malfunctioning wheel was on, and step 2 was to locate which wheel was malfunctioning. After the faults were determined, fault-tolerant strategies should be applied to vehicles. Shutting down the malfunctioning wheel and its opposite wheel may stabilize the vehicle, 8 but this was obviously not a good solution. Anwar and Chen proposed a new fault-tolerant control strategy. In this strategy, there was no need to turn off the faulty wheel, but to increase the input power of the faulty wheel, so that the faulty wheel could output the desired torque. 16 Based on fuzzy control theory, Liu et al. 17 proposed a multiple model based fuzzy fault-tolerant control strategy, which evaluated vehicle state responses and automatically selected the most suitable model as a control reference. To take sensor faults into account, Oudghiri et al. 18 proposed a multiple LMI model based control strategy, in which both actuator and sensor faults taken into account. Active fault-tolerant control strategies were efficient. However, in some cases there may be some unknown disturbances that degrade the performance of the strategy: traditional model based optimal methods were efficient. However, these methods are model based, the accuracy of the model had a lot of impact on the control effect. 19 The more accurate the model, the better effect the control. If the motor is malfunctioning, there would be an error between the model and the actual vehicle, the control value obtained by the model-based methods would be wrong and would not meet the needs of maintaining vehicle performance. In these cases, the robustness of active strategies should be strengthened, or a highly robust (or highly adaptive) passive strategy should be used instead. 20 In order to improve the handling performance of a vehicle with driving system malfunctions, and to overcome the limitations of traditional FTCs, a hybrid fault-tolerant control strategy combined with both PFTC and AFTC was designed. A seven-degree of freedom (7-DOF) vehicle model was established as a reference model to describe the driving system failure, and an adaptive model reference observer was designed to estimate the malfunctions in real-time. A hierarchical FTC strategy was designed, that contains two parts: (1) a model predictive control (MPC) based AFTC and (2) a sliding-mode based PFTC. This hybrid FTC strategy works in AFTC mode if the fault observer is working properly, otherwise, the FTC mode would be switched to PFTC mode automatically.
The rest of this paper is structured as follows. In section II, a 7DOF vehicle model was established, the failures of in-wheel motors were analyzed and modeled, and an adaptive fault observer was designed. In section III, both PFTC and AFTC strategies were designed, and a hybrid FTC strategy was designed. Simulations and hardware-in-loop (HIL) experiments were applied in section IV, followed by concluding remarks in section V.

Fault modeling and analysis
In this chapter, a seven degree of freedom vehicle model with in-wheel motor failures was established. Based on this model, the in-wheel motor output responses and the vehicle dynamic responses can be calculated. Then, compared the model responses with the real vehicle responses, the in-wheel motor fault factors can be estimated.

Vehicle modeling
The 7-DOF vehicle model that contains the longitudinal movement, the lateral movement, the yaw movement, and the rotation of four wheels was established in this chapter. The model has a failure factor that represents the failure, so the model can reflect the vehicle dynamics response under the motor failure situation.
As shown in Figure 2, combined with a Pacejka tire model, 21 a 7-DOF vehicle model 22 can be formulated: The rotation dynamics of each wheel can be calculated by The most common failure of in-wheel motors is magnetic degradation caused by over temperature, which reduces the output torque, and may cause some torque offset. 5 This failure of each wheel can be represented by s:t: However, the most common failures are a reduction in output caused by demagnetization, rather than an offset. 5 Equation (6) can be simplified, the relationship between the desired output and the real output can be simplified: Thus, F x of each wheel can be calculated: A Simulink/Carsim co-simulation with sinewave steer input was conducted, the results are shown in Figure 3.
Compared the response of the 7-DOF vehicle model with the Carsim vehicle model, the 7-DOF model established could reflect the dynamic response of the vehicle.
Although there were some gaps in the yaw rate and the slip angle while the tire forces were saturated, the 7-DOF model could still reflect the dynamic responses of the vehicle. The 7-DOF vehicle model established is effective.

Fault observer modeling
In this chapter, a model reference adaptive observer was established to obtain the failure factors. The reference model the parameters were updated in real time, making the reference model response converge to the actual vehicle response. Then, the fault values can be obtained. For in-wheel motor failure factors, the wheel speed values and the vehicle responses along XYZ axles can be chosen as reference outputs.
Assuming that, all the required vehicle states can be obtained by sensors or Kalman filters, 23 according to equation (9), we have: Similarly, observationsk i calculated by the reference model can be obtained: Thuŝ Then If a Lyapunov function is chosen as Then we can derive the equation with respect to time t: A Lyapunov control law can be chosen aŝ Obviously, if L.0, there will be _ V t ð Þ\0, which means the control law is able to control the value of ðk i À k i Þ to approach 0.
Since the disturbances and the measurement errors cannot be ignored, and these disturbances would affect the stability and accuracy of the observer, the credibility of fault observation results needs to be evaluated. Assuming that, the value of F xi can be obtained in simulations and experiments, equation (10) can be rewritten ask The error e ki between the estimated faultk i and the real fault k 0i can be defined by Combined with equations (10) and (17): If k i = k 0i , which means there is no fault, thus: If k i 6 ¼ k 0i , which means there must be malfunctions in the driving system, thus According to equations (18) and (22), the following conclusions can be obtained: (1) If e ki j j. 2Rd i T ui , there is a malfunction in the driving system, if k i Àk 0i k 0i ł 4Rd i T ui the fault can be considered as an error and be ignored. (2) The recognition threshold k i Àk 0i k 0i can be reduced as the driving force T ui increases, but in most cases T ui is not large enough, so the vehicle model must be more accurate to improve the observation. After a series of simulations, it can be seen that if k i Àk 0i k 0i ł 4Rd i T ui and 4Rd i T ui are small enough, the observation value of k i is acceptable only if the vehicle runs at a steady-state. Otherwise, the last acceptable value of k i should be kept. During this saturation, the error in k i can be tolerated by the FTC controller.

Controller design
In this section, a hybrid fault-tolerant control (FTC) strategy was designed, and the system structure is shown in Figure 4. After the fault information was obtained by the observer, the faults were assessed by a strategy selector, and the control method (AFTC or PFTC) with better performance would be activated to take over control.

AFTC strategy
In this chapter, a model predictive control (MPC) 24 strategy based upper layer yaw stability controller and a PID based longitudinal motion controller were established. Additionally, a tire force distributor with multiple constraints was also established. These two strategies constitute the AFTC strategy. By adjusting the control system parameters in real time and modifying the outputs to cover the faults, the stability of a vehicle with motor failures can be improved. Motion control (upper layer). The longitudinal driving force deviation caused by faults can be corrected by a PID controller. The value of the throttle can be represented by a 2 À1, 1 ½ , where a ø 0 represents the positive longitudinal driving force, and a\0 represents the negative longitudinal driving force. Then the total longitudinal force that drives the vehicle can be calculated by For lateral control, an MPC based strategy was designed. This strategy is highly adaptable and easily adjust its structure. Since the calculation time for each step is very small, the vehicle status would not change significantly, the value of tire forces and other vehicle parameters can be considered as constants. The vehicle model can be simplified as a two-degree of freedom (2-DOF) bicycle model. 25 To calculate the required wheel torque outputs, the reference vehicle response form is as follows: Converting equation (24) to a discrete form: where Du n ð Þ = u n ð Þ À u n À 1 ð Þ, x n ð Þ = b n ð Þ, r n ð Þ ½ , and u n ð Þ = d n ð Þ + d afs (n), DM n ð Þ Â Ã are the states at time n. Assuming that, at time n, the predictive vehicle states at time n + p can be represented by x n + pjk ð Þ , with prediction horizon p steps and control horizon q steps. The prediction output at time n + p can be calculated as The target states matrix can be represented by The optimization function can be defined as By optimizing the function J u , the optimal output sequence DU can be obtained, and u(n) can be obtained.
Wheel torque distribution (lower layer). A lower-level torque distributor distributes the additional yaw movement DM to every wheel. In this chapter, the tire forces and motor output characteristics and multiple constraints (such as tire force limitations and longitudinal driving force requirements) were used to construct the cost function. By minimizing the cost function, the output of each wheel can be obtained. Further, to avoid the faults expansion caused by overload, the motor load rates should be taken into consideration. 25 The motor load rates and the tire load rates can be defined by F yi in equation (30) cannot be controlled directly, equation (30) can be simplified as Since the torque of each wheel has an upper limit, the additional yaw movement and the longitudinal driving forces must be constrained. The optimization function and its constraints can be defined by s:t: By minimizing equation (32), the final output value T ui can be obtained.

PFTC strategy
In this chapter, a PFTC strategy was, which was like the AFTC strategy established in the previous section, but a PFTC strategy uses a sliding mode control strategy rather than an MPC method, which is much more robust and much more adaptive. When the observation results are not accurate, this PFTC strategy should still maintain vehicle stability. The main goal of a PFTC strategy is to minimize the yaw rate error and the slip angle error. It can be divided into three parts: yaw rate control, slip angle control, and synergetic control.
Yaw rate control. The yaw rate error and its differential can be defined by Then, the sliding mode surface of yaw rate control can be defined as where c 1 .0, c 2 .0. If there are s r ! 0, _ s r ! 0, we have e r ! 0, _ e r ! 0. Thus where P=c 2 Then D _ M r can be calculated, as the reaching law was chosen as a saturation reaching law. By integrating equation (38), the external yaw movement DM can be obtained.
D _ M r =À I P + e r sat s r ð Þ ½ ð38Þ sat s r ð Þ= 1s r . z r j j 1 z r j j s r s r j jł z r j j À1s r \ z r j j Slip angle control. Above all, the sliding mode surface of the slip angle control can be defined as where Q = c 4 By adapting a saturation reaching law, we have Synergetic control. During sharp turning, there will be a slip angle at the vehicle mass center, if the additional yaw moment equals to zero. Theoretically, the slip angle can be calculated by equation (24). Usually, the vehicle steering characteristic is under steer, which means in some saturations (sharp turn, etc.) the yaw rate does not increase linearly according to the increase of the front wheel steer angle, 26 at this time, the slip angle of the vehicle will get larger. To maintain the under steer or the neutral steering characteristics, the slop angle value should be emphasized for control. Otherwise, the tire force saturation is not high, the vehicle steering characteristics effect little on the slip angle value, the slip angle changes linearly according to the value calculated by equation (24). To obtain a better control effect, the yaw rate should be chosen as the main control reference. The final external yaw movement can be calculated by Convergence analysis. To guarantee the robustness of the PFTC control method, its convergence must be analyzed. For example, the convergence of the yaw rate control was analyzed, a Lyapunov function can be defined as Combined with equation (37): _ L = s r _ s r = s r Àe r sat s r ð Þ+ Dd ð Þ = js r j( À e r + Dd), s r .jz r j s r À e r s r jz r j + Dd , js r j ł jz r j js r j( À e r + Dd), s r \jz r j Assuming that, the malfunctioning wheel would no longer provide any torque (extreme condition), the FTC system should be robust enough to maintain vehicle stable. The disturbance of the yaw movement under extreme conditions can be calculated by It is obvious that if e r . dT max 2 R, then _ L\0, which means the FTC system could maintain the vehicle stable when a wheel fails. Similarly, the convergence of other control strategies can also be proven.

Hybrid FTC strategy
In the previous sections, an AFTC strategy and a PFTC strategy were established. PFTCs are robust and adaptive, they are effective regardless of whether the fault factor is precise or not. AFTCs need accurate fault observation results, incorrect fault estimation results would lead to unpredictable risks, which also means that the vehicle yaw stability drops. For this reason, the advantages of both AFTC and PFTC strategies should be exploited, their disadvantages need to be avoided.
After the fault factors were observed and be evaluated. Hybrid FTC strategies are effective. However, there are two situations: Situation 1, the fault estimation result is accurate, the AFTC strategy should be activated. Situation 2, the fault estimation result is not accurate, the PFTC strategy should be activated. However, to avoid the risks caused by the control output fluctuating, the switching process (AFTC to PFTC, or PFTC to AFTC) should be optimized, so that a delay link of mode switching is added to the control flow.
The hybrid FTC system control flow is shown in Figure 5. Assuming that the observation starts at the movement t(n), if the fault observation result at time t(n À 1) was accurate and reliable, but not accurate or unreliable at time t(n) (the method of distinguishing trustworthy and untrustworthy was introduced in Part B of Chapter 2, formula (22)). Once the observation results were considered unreliable, the delay block in the control flow should be activated. During this procedure, the AFTC strategy should keep working for up to 2 s with the latest updated fault factors. If the observation result was always unreliable within 2 s, the control strategy should be switched to PFTC.

Simulation and results
To evaluate the effectiveness of the proposed FTC strategies, simulations on a hardware-in-loop simulator shown in Figure 6 were conducted (the main simulation parameters are shown in Table 1). A Carsim vehicle model ran in a NI real-time desktop computer, the FTC strategies ran in a raspberry PI 3b based rapid  controller, the faults were injected by a signal generator. Four simulation scenarios with reference to ISO 7401-2011 standard were conducted: a fault observation simulation, an AFTC simulation, a PFTC simulation and a hybrid FTC simulation. Some of the simulation results were compared with a traditional MPC strategy. 27

Fault observation simulation
In this simulation, the observer and the AFTC strategy were tested in a straight lane accelerating scenario. A road with m = 0:8 was set, and the vehicle accelerated from 30 km/h at a constant throttle pedal value (40%) and d = 0°. A fault (k 1 = 0:3) was injected at the first second. Simulation results are shown in Figure 7. Figure 7(a) shows that the fault observer could identify the faults in real-time. In the later part of the simulation, the fault observation result error was slightly larger which was caused by the model mismatch and the instantaneous changes of the vehicle state (tire forces, suspension bounces). However, since the FTC strategies were robust, this error could be tolerated. The curves of vehicle speeds at a given throttle were shown in Figure 7(b), the vehicle with AFTC had better acceleration capabilities. In Figure 7(c), the vehicle with

AFTC and PFTC simulation
In this simulation, the effectiveness of both AFTC and PFTC was tested. A road with m = 0:8 was set, the vehicle ran at 100 km/h, with k 1 = 0:3 injected at the first second, and a sinewave steering wheel angle was applied at the fifth second. Simulation results are shown in Figure 8.
In Figure 8(a) and (b), to make the vehicle states converge to the reference states, an additional front wheel steering angle and an additional yaw movement were applied to the vehicle. In Figure 8(c), both AFTC and PFTC were effective, and due to the additional front wheel steering angle, the AFTC strategy was efficient.

Hybrid FTC simulation
In this simulation, a double lane change (DLC) test scenario was conducted. A multipoint preview driver model was applied to a vehicle that ran at 120 km/h, and a malfunction (k 1 = 0:3) was added to the leftfront wheel at the first second. Simulation results are shown in Figure 9.
As shown in Figure 9(a) and (b), at time t 1 and t 2 , the reliabilities of the fault observation results were changed. At time t 1 the evaluator found that the fault observation results were no longer reliable, the system kept working in AFTC mode and waited for reliable fault factors. However, the fault observer provided no more reliable fault factors, so the system mode changed into PFTC mode at time t 2 : In Figure 9(e) and (f), the controller outputs the additional yaw moment in the same direction as the front wheel steer angle to help the vehicle maintain stable, an additional front wheel angle opposite to the basic front wheel steer angle was output to prevent the vehicle from losing control. From Figure 9(c), the hybrid FTC method maintains the vehicle stable under the scenario that causes the uncontrolled vehicle to lose control. In Figure 9(d), the hybrid FTC performed better and more efficient, improved the handling performance of the malfunctioning vehicle. From Figure 9(e) and (f), when the control strategy jumped from AFTC to PFTC, or jumped from PFTC to AFTC, the control amount fluctuated. However, the vehicle is an inertial system, this fluctuation had little effect on the vehicle states.

Conclusion
In this paper, a hybrid fault-tolerant control strategy was designed to improve the handling performance and the yaw stability of a vehicle with in-wheel motor  Motor load rate of each wheel (e.g. L 1 represents the load rate of left front wheel) j i Tire load rate of each wheel (e.g. j 1 represents the tire rate of left front wheel) L Gain factor R Wheel radius R c Rolling resistance factor R v Rolling resistance factor T i Driving torque provided by wheels (e.g. T 1 represents the driving torque provided by the left front wheel) T imin Minimum driving torque provided by wheels (e.g. T 1min represents the minimum driving torque provided by the left front wheel) T imax Maximum driving torque provided by wheels (e.g. T 1max represents the maximum driving torque provided by the left front wheel) T ui The desired torque to be provided by wheels (e.g. T u1 represents the desired torque to be provided by the left front wheel)