Integrated Fault Diagnosis Algorithm for Motor Sensors of In-Wheel Independent Drive Electric Vehicles

An integrated fault-diagnosis algorithm for a motor sensor of in-wheel independent drive electric vehicles is presented. This paper proposes a method that integrates the high- and low-level fault diagnoses to improve the robustness and performance of the system. For the high-level fault diagnosis of vehicle dynamics, a planar two-track non-linear model is first selected, and the longitudinal and lateral forces are calculated. To ensure redundancy of the system, correlation between the sensor and residual in the vehicle dynamics is analyzed to detect and separate the fault of the drive motor system of each wheel. To diagnose the motor system for low-level faults, the state equation of an interior permanent magnet synchronous motor is developed, and a parity equation is used to diagnose the fault of the electric current and position sensors. The validity of the high-level fault-diagnosis algorithm is verified using Carsim and Matlab/Simulink co-simulation. The low-level fault diagnosis is verified through Matlab/Simulink simulation and experiments. Finally, according to the residuals of the high- and low-level fault diagnoses, fault-detection flags are defined. On the basis of this information, an integrated fault-diagnosis strategy is proposed.


Introduction
Following the recent increase in international oil prices and environmental issues, studies on the introduction of environment-friendly vehicles such as fuel-cell and electric vehicles have increasingly become popular. Among these vehicles, the in-wheel independent drive electric vehicles contain motors installed inside the wheels, which feature enhanced system efficiency and driving performance [1][2][3][4].
However, because the motor is installed inside the wheel, it is vulnerable to numerous faults due to exposure to harsh conditions such as physical impact, rapid temperature change, and variation in humidity. Therefore, to improve vehicle safety, fault diagnosis of the drive motor has become increasingly important.
The fault-detection methods can be mainly classified into hardware and analytic redundancies. Hardware redundancy uses an identical sensor or actuator to easily cope with the fault, which is an advantage over analytic redundancy. However, additional costs and installation space are required. In automobiles, analytic redundancy, which considers the information and system dynamics with respect to the system, is often adopted instead of hardware redundancy. Furthermore, in the present study, analytic redundancy is used to perform fault diagnosis without additional sensors [5].
Numerous studies regarding fault diagnosis of the drive motor are currently being conducted. In some studies, the position sensor value of the motor is estimated using a sensor-less method and

High-Level Fault Diagnosis
For the high-level fault diagnosis of the vehicle dynamics, a planar two-track non-linear model, which can realize the longitudinal and lateral forces in each wheel, is used considering the characteristics of the in-wheel system that each wheel drives independently. By analyzing the influence of the drive motor fault on the entire vehicle, a correlation between each sensor and the realized residual is derived.

Planar Two-Track Model
A planar two-track non-linear model, which displays the longitudinal and lateral forces of each wheel, is shown in Figure 1. From the center of gravity, the dynamics of various two-track non-linear models in a single coordinate system is developed [32,33]. However, in the current study, the dynamic equations of the longitudinal, lateral, and yaw directions are used. They are expressed as follows: . . .
where v x is the longitudinal vehicle speed, v y is the lateral vehicle speed, . ψ is the yaw rate, F x is the longitudinal force, F y is the lateral force, m is the vehicle mass, l f ,r is the distance between the mass center and each axle (front and rear), t f ,r is the vehicle tread, δ f is the front tire steering angle, and I z is the yaw inertia.

High-Level Fault Diagnosis
For the high-level fault diagnosis of the vehicle dynamics, a planar two-track non-linear model, which can realize the longitudinal and lateral forces in each wheel, is used considering the characteristics of the in-wheel system that each wheel drives independently. By analyzing the influence of the drive motor fault on the entire vehicle, a correlation between each sensor and the realized residual is derived.

Planar Two-Track Model
A planar two-track non-linear model, which displays the longitudinal and lateral forces of each wheel, is shown in Figure 1. From the center of gravity, the dynamics of various two-track non-linear models in a single coordinate system is developed [32,33]. However, in the current study, the dynamic equations of the longitudinal, lateral, and yaw directions are used. They are expressed as follows:

Non-Linear Simple Tire Model
In this study, to calculate the longitudinal and lateral forces of the two-track model, the linear and non-linear intervals are simulated to be as close as possible to the actual condition while using the non-linear simple tire model, which is relatively easy to tune. The non-linear simple tire model is realized using the hyperbolic tangent function, and the mathematical equations describing the longitudinal and lateral forces are expressed as follows:

Non-Linear Simple Tire Model
In this study, to calculate the longitudinal and lateral forces of the two-track model, the linear and non-linear intervals are simulated to be as close as possible to the actual condition while using the non-linear simple tire model, which is relatively easy to tune. The non-linear simple tire model is realized using the hyperbolic tangent function, and the mathematical equations describing the longitudinal and lateral forces are expressed as follows: where k x,y and ε x,y refer to the tuning factors whereas κ and α refer to the longitudinal slip and tire-side slip angle, respectively. The longitudinal slip and tire-side slip angle for each wheel are expressed as follows [34]: where ω w is the wheel velocity.
In addition, vertical force F z is obtained using weight transfer, which is calculated using the longitudinal and lateral accelerations. The results are expressed as follows [34]: where m s is the vehicle sprung mass, l is the wheel base, h s is the sprung mass height, t f ,r is the vehicle tread, a x is the longitudinal acceleration, a y is the lateral acceleration, k f is the lateral weight-shift distribution on the front wheel, and k r is the lateral weight-shift distribution on the rear wheel. Figure 2 shows the comparison of the CarSim and simple tire models described in Equation (5). CarSim is a commercially available simulation tool that predicts the performance of vehicles in response to driver controls in a given environment [35][36][37].
where y x k , and y x,  refer to the tuning factors whereas  and  refer to the longitudinal slip and tire-side slip angle, respectively.
The longitudinal slip and tire-side slip angle for each wheel are expressed as follows [34]: where w  is the wheel velocity.
In addition, vertical force z F is obtained using weight transfer, which is calculated using the longitudinal and lateral accelerations. The results are expressed as follows [ Figure 2 shows the comparison of the CarSim and simple tire models described in Equation (5). CarSim is a commercially available simulation tool that predicts the performance of vehicles in response to driver controls in a given environment [35][36][37].

Wheel Dynamics
Using the motor drive torque and wheel velocity, we can express the wheel dynamics as follows: .
where T m refers to the motor drive torque, M yrr refers to the rolling resistance, r e f f refers to the effective rolling radius, and I ω refers to the tire inertial moment.

Residual
Residual is a model error. In an ideal case, the residual should only be influenced by the faults to be detected.
The residual, which includes the target for diagnosis T m , can be expressed as follows: M yrr is practically difficult to calculate. However, M yrri can be ignored using an adaptive residual threshold under the assumption that the size of M yrr is less than the other components when the motor is driven.

Longitudinal Force Estimation
When Equation (10) is examined in terms of the residual, F x , which is calculated from the model, is used. However, in the linear interval of F x , the gradient differs depending on the terrain type. Therefore, calculation of an exact value is difficult. Hence, using the longitudinal dynamics and the non-linear simple tire model, gradient coefficient k x in the linear interval of F x can be estimated to calculate F x more accurately.
Henceforth, we assume that the signs of the longitudinal slips of each wheel while driving are the same and that the longitudinal force is larger than the lateral force.
The expanded longitudinal dynamics without considering lateral force is expressed as follows: Using the non-linear simple tire model, expanded F x,total in Equation (11) can be expressed as follows: In the linear interval of F x , gradient coefficient k x can be expressed as follows by rearranging the terms in Equation (12): With k x , a more accurate longitudinal force can be estimated to increase the accuracy of the residual fault diagnosis. Hence, the longitudinal force can be written as 2.6. Analysis of the Correlation between Each Sensor and the Residual To configure the fault-diagnosis algorithm and to confirm the possibility of fault separation, the correlation between each sensor and residual needs to be analyzed.
The sensor information used for estimating the longitudinal force is expressed as follows: Equation (15) indicates that F x is obtained using sensor signals δ f , .
ψ, v x , v y , F z , and ω w . v y in Equation (15) can be obtained using Equations (2) and (5), whereas F z can be obtained using Equation (8), i.e., Finally, the correlation between each sensor and the residual can be expressed as follows using Equation (10): Figure 3 shows the correlation between each sensor and the residual.

Analysis of the Correlation between Each Sensor and the Residual
To configure the fault-diagnosis algorithm and to confirm the possibility of fault separation, the correlation between each sensor and residual needs to be analyzed.
The sensor information used for estimating the longitudinal force is expressed as follows: Equation (15) indicates that y v in Equation (15) can be obtained using Equations (2) and (5), whereas z F can be obtained using Equation (8), i.e., Finally, the correlation between each sensor and the residual can be expressed as follows using Equation (10): Figure 3 shows the correlation between each sensor and the residual. The residuals obtained from Equation (19) and Figure 3 can be independently configured for each wheel and are listed as follows Table 1.   The residuals obtained from Equation (19) and Figure 3 can be independently configured for each wheel and are listed as follows Table 1.
The term "X" in Table 1 refers to the correlation between the residual r i (i = 1 ∼ 4) and each sensor. In other words, by assuming that the other sensor information is normal, the fault of the drive motor T m in each wheel can be detected and separated. If dynamic sensors such as the yaw-rate, longitudinal and lateral acceleration, and wheel-speed sensors, fail, the residual r i (i = 1 ∼ 4) cannot diagnose the motor sensor fault. Therefore, for the fault separation in the other sensors, fault residual redundancy is required. In this study, Equations (2), (3) and (5) are used to add the residuals of . ψ and v y while obtaining the residual of v x using the Global Positioning System (GPS). In addition, using Equation (4), the residual of the longitudinal force can be substituted.
In order to isolate motor sensor faults and vehicle dynamics sensor faults, additional residuals should not be affected by the fault of the drive motor T m . Therefore, it is necessary to separate the vehicle dynamics sensor faults using a linear model instead of a complex model.
Using the linear bicycle model [38], the estimations of . ψ and v y can be expressed as follows: . v y,est where C α f and C αr are cornering stiffness (F y = C α α).
Using Equation (20), the residual can be substituted as follows: Using the acceleration sensor dynamics [39] and Equation (20), the residual can be substituted as follows: The equation substituted by the residual of v x using GPS is expressed as follows: In order to distinguish between wheel sensor failure and motor failure, the additional residual is configured as wheel dynamics only.
Assuming k x is a known value, Equation (4) can be expressed as In addition, Equation (25) can also be substituted by the residuals using Equation (19), as shown below.
When the residuals derived from the above are summarized, r i (i = 1 ∼ 4) were diagnosed using a planar two-track model to detect the failure of each wheel motor. r i (i = 5 ∼ 8) were diagnosed using a linear bicycle model to diagnose vehicle dynamics failure without being affected by motor failure. r i (i = 9 ∼ 12) are additional residuals that are used to separate the wheel sensor and motor fault. Residuals that are newly added to the list in Table 1 are listed in Table 2.  Table 2 confirms that the other sensors are also capable of separating the faults using additional residuals.

Adaptive Threshold
The vehicle and tire models used in the present study show behavior similar to that of actual models in a normal state. However, in a transient state, the inaccuracy of the models increases. Therefore, the value of the residual, which is designed by including the inaccuracy, can be different from zero even when no fault exists. Such residual deviation is influenced by the intensity of the input signal and frequency. Therefore, to realize a fault-diagnosis algorithm that is robust against model inaccuracy, the method of adaptive threshold is used. Figure 4 shows the generation of adaptive threshold values according to the input value [40].
The fault-diagnosis algorithm uses vehicle models that do not fully correspond with the real processes due to model uncertainties. The generated residual then deviates from zero even without a fault. If the threshold is not well set, it may generate false alarms through normal fluctuations of the variable. Obviously, setting Th too high reduces the sensitivity to faults, and setting Th too low increases the false alarm rate. Usually, Th is empirically set by considering the maximum influence of the model uncertainties. In particular, in the transient state, these model uncertainties more frequently occur. Therefore, adaptive threshold is introduced to avoid these problems. The deviation in the residual depends on the amplitude and frequencies of the input excitation. The adaptive threshold method uses its variation. It uses a high-pass filter to enlarge the threshold (where the deviation and amplitude of the input have an effect) and a low-pass filter to smoothen the threshold, as shown in  deviation in the residual depends on the amplitude and frequencies of the input excitation. The adaptive threshold method uses its variation. It uses a high-pass filter to enlarge the threshold (where the deviation and amplitude of the input have an effect) and a low-pass filter to smoothen the threshold, as shown in Figure 3. Time constants 1 T and 3 T are selected according to the dominant time constant of the system process.

Simulation Result
To verify the proposed fault-diagnosis algorithm, Carsim and Matlab/Simulink are used. Among the vehicle models available in Carsim, "E-Class sedan" is considered as the subject. The simulation is conducted at a starting velocity of 20 km/h on a straight line with the throttle set at constant values of 0.2 and 0.5.
During the simulation, the Motor fault signal is applied at an interval of 5-7 s. The fault signal triggers reduction in the torque in the rear right (RR) wheel drive motor by 30%.

Simulation Result
To verify the proposed fault-diagnosis algorithm, Carsim and Matlab/Simulink are used. Among the vehicle models available in Carsim, "E-Class sedan" is considered as the subject. The simulation is conducted at a starting velocity of 20 km/h on a straight line with the throttle set at constant values of 0.2 and 0.5.
During the simulation, the Motor fault signal is applied at an interval of 5-7 s. The fault signal triggers reduction in the torque in the rear right (RR) wheel drive motor by 30%.
From the simulation results shown in Figure 5, we can confirm that the estimated longitudinal forces of each wheel, derived from the longitudinal force equation and simple tire model, are almost similar to the actual Carsim value. As the longitudinal wheel slip increases, the residual also increases; therefore, the threshold value can also be set high, which proves the robustness of the model. The fault-diagnosis results according to a fault application from 5 to 7 s can also be separated.

Simulation Result
To verify the proposed fault-diagnosis algorithm, Carsim and Matlab/Simulink are used. Among the vehicle models available in Carsim, "E-Class sedan" is considered as the subject. The simulation is conducted at a starting velocity of 20 km/h on a straight line with the throttle set at constant values of 0.2 and 0.5.
During the simulation, the Motor fault signal is applied at an interval of 5-7 s. The fault signal triggers reduction in the torque in the rear right (RR) wheel drive motor by 30%.  From the simulation results shown in Figures 5, we can confirm that the estimated longitudinal forces of each wheel, derived from the longitudinal force equation and simple tire model, are almost similar to the actual Carsim value. As the longitudinal wheel slip increases, the residual also increases; therefore, the threshold value can also be set high, which proves the robustness of the model. The fault-diagnosis results according to a fault application from 5 to 7 s can also be separated.
The following simulations were performed by adding vehicle dynamics sensors faults. The fault signal is applied from 1 to 1.5 s to the yaw rate sensor with an offset of 0.05 rad/s. An offset of g (=9.8 m/s) for the longitudinal dynamics sensor is applied from 2 to 2.5 s, and an offset of g for the lateral dynamics sensor is applied from 3 to 3.5 s. The fault signal of the front left-wheel speed sensor is applied from 4 to 4.5 s with an offset of 1 km/h. The following simulations were performed by adding vehicle dynamics sensors faults. The fault signal is applied from 1 to 1.5 s to the yaw rate sensor with an offset of 0.05 rad/s. An offset of g (=9.8 m/s) for the longitudinal dynamics sensor is applied from 2 to 2.5 s, and an offset of g for the lateral dynamics sensor is applied from 3 to 3.5 s. The fault signal of the front left-wheel speed sensor is applied from 4 to 4.5 s with an offset of 1 km/h.
From the simulation results shown in Figure 6, when vehicle dynamic sensors fail, the estimated longitudinal forces of each wheel are influenced by faults. Similarly, the residual r i (i = 1 ∼ 4) of fault diagnosis algorithm in [30,31] cannot diagnose faults. However, the additional residuals enable diagnosis even in the case of vehicle dynamics sensor faults through Table 2.  [30,31] cannot diagnose faults. However, the additional residuals enable diagnosis even in the case of vehicle dynamics sensor faults through Table 2.

Low-Level Fault Diagnosis
The drive motor for an electric vehicle should satisfy various performance requirements, including structural robustness, high power and torque density, wide operating velocity range, excellent environmental resistance (seismic, heat, and corrosion), and highly efficient driving control, considering the driving characteristics. IPMSM is one of the motors that satisfy the above requirements. The IPMSM is structurally stable because a permanent magnet is built inside the rotor, and it has excellent magnetic saliency, thus possessing a weak field control for a wide range of operating velocities. In addition, its power and torque density are excellent, which enable highly efficient driving [41,42]. Therefore, in the present study, the IPMSM is chosen as the drive motor of the in-wheel independent drive electric vehicle used in the fault-diagnosis experiments.

Low-Level Fault Diagnosis
The drive motor for an electric vehicle should satisfy various performance requirements, including structural robustness, high power and torque density, wide operating velocity range, excellent environmental resistance (seismic, heat, and corrosion), and highly efficient driving control, considering the driving characteristics. IPMSM is one of the motors that satisfy the above requirements. The IPMSM is structurally stable because a permanent magnet is built inside the rotor, and it has excellent magnetic saliency, thus possessing a weak field control for a wide range of operating velocities. In addition, its power and torque density are excellent, which enable highly efficient driving [41,42]. Therefore, in the present study, the IPMSM is chosen as the drive motor of the in-wheel independent drive electric vehicle used in the fault-diagnosis experiments.

IPMSM Model
where v d and v q are the d-q axis applied voltages, i d and i q are the d-q axis currents, ω r is the rotor speed, R is the armature winding resistance, L d and L q are the d-q axis inductances, and φ m is the magnetic flux linkage.  [30,31] cannot diagnose faults. However, the additional residuals enable diagnosis even in the case of vehicle dynamics sensor faults through Table 2.

Low-Level Fault Diagnosis
The drive motor for an electric vehicle should satisfy various performance requirements, including structural robustness, high power and torque density, wide operating velocity range, excellent environmental resistance (seismic, heat, and corrosion), and highly efficient driving control, considering the driving characteristics. IPMSM is one of the motors that satisfy the above requirements. The IPMSM is structurally stable because a permanent magnet is built inside the rotor, and it has excellent magnetic saliency, thus possessing a weak field control for a wide range of operating velocities. In addition, its power and torque density are excellent, which enable highly efficient driving [41,42]. Therefore, in the present study, the IPMSM is chosen as the drive motor of the in-wheel independent drive electric vehicle used in the fault-diagnosis experiments.    Equation (31) shows the conversion of the three-phase fixed coordinate system into a two-phase rotating coordinate system. In a three-phase motor system, in most cases, owing to their costs, two-phase electric current sensors are used instead of three-phase electric current sensors. Using the current balance equation i a + i b + i c = 0 to delete term i c from Equation (31) yields the following result:

Current and Position Sensor Fault Diagnosis
The fault of the electric current sensor can be diagnosed using the parity equation [43]. The space equation to obtain the parity equation is expressed by Equation (33).
where x ∈ n denotes the state vector, u ∈ m is the vector of the measured input signals, y ∈ p is the vector of the measured plant output signals, and d ∈ n d and f ∈ n f are vectors of unknown input signals. f represents the faults one desires to detect, whereas d represents unknown disturbances that should not be detected. When used as a transfer equation, Equation (33) can be converted to The residual can be obtained by the algorithm shown in Figure 7 using the transfer function expressed in Equation (34).
When the residual shown in Figure 8 is mathematically expressed, the result is expressed as Equation (35). The residual can be obtained from the difference between the two vectors, which are obtained by multiplying the input and output vectors with design vectors V ru (s) and V ry (s), respectively. The residual r(s) is independent of the known input vector but depends on the fault vector [32].
When the above method is applied to the IPMSM, the basic form of Equation (35) can be expressed as follows:

r(s) = V ru (s)u(s) + V ry (s)y(s) = V ru (s)u(s) + V ry (s) H yu (s)u(s) + H yd (s)d(s) +
To create a residual that is influenced only by the fault signal, the coefficients of u(s) and d(s) should be zero. Therefore, V ru (s) and V ry (s) that satisfy Equation (36) should be obtained.
When the above method is applied to the IPMSM, the basic form of Equation (35) can be expressed as follows: .
We assume that only the fault of the electric current sensor is considered and that the disturbance is low (E x = E y = 0). Equation (37) is converted into the form of a transfer function similar to Equation (35) when we assume that ω r is a pseudo constant [44].
Then, the resulting equation would be as follows: 1 K R + sL q n p ω r L q −n p ω r L d R + sL q H yd (s) = 0 (38) where K = (R + sL d )(R + sL q ) + n p 2 ω r 2 L d L q .
When Equation (38) is applied to Equation (37), V ry (s) and V ru (s) can be obtained as follows: Finally, the residual derivation, i.e., Equation (39), can be used to derive the following: Now, coordinate conversion will be conducted to independently separate the residual from the faults in the electric current sensor at a and b.
From the above mathematical expressions, we confirm that residuals r 13 and r 14 are influenced by the faults of electric current sensors i a_ f and i b_ f , respectively. Because the fault-diagnosis algorithm mentioned above considers only the fault of the electric current sensor, to confirm the possibility of fault separation regarding the position sensor of the residual in Equation (31), the correlation between each sensor and the residual will be analyzed.
Using Equations (40) and (41), the sensor information that influences r 13 and r 14 can be expressed as follows: The expressions for Equations (42) and (43) are listed in Table 3. Assuming that only a single fault occurs, Table 3 lists the possibility of separation of electric current sensor faults i a and i b from fault θ of the position sensor using the combination of r 13 and r 14 .

Simulation Result
The proposed algorithm is implemented using Matlab/Simulink. The IPMSM control system model is selected among the AC6 100-kW drive samples of Matlab/Simulink. The motor model parameters of the example are listed in Table 4.  Figure 9 shows the fault signals of each sensor. The fault signal is applied from 0.5 to 0.7 s to the a-phase electric sensor with 100-A offset. From 1 to 1.2 s, the gain value of the b-phase electric sensor doubles and an offset of 0.1 rad/s of the position sensor is applied from 1.5 to 1.7 s.
Pole pairs ( p n ) 4 (-) Figure 9 shows the fault signals of each sensor. The fault signal is applied from 0.5 to 0.7 s to the a-phase electric sensor with 100-A offset. From 1 to 1.2 s, the gain value of the b-phase electric sensor doubles and an offset of 0.1 rad/s of the position sensor is applied from 1.5 to 1.7 s.      Figure 12 shows the d-q axis electric currents of the IPMSM control system.    Figure 12 shows the d-q axis electric currents of the IPMSM control system.   According to the simulation results described above, when faults occur in the electric and positions sensor, the faults are influenced by the electromagnetic torque, input voltage, and electric current. Similarly, a fault in one part of the control system can influence the other parts. Figure 13 shows r 13 and r 14 from the proposed algorithm during the fault simulation.  When Figure 13 is considered as the fault table listed in Table 3

Experimental Result
The validity of the algorithm is verified through experiments. Figure 14 shows the test environment. The motor parameters of the experiments are listed in Table 5. When Figure 13 is considered as the fault table listed in Table 3, r 13 significantly deviates from zero in case of an a-phase electric current sensor fault; meanwhile, r 14 significantly deviates from zero in case of a b-phase electric current sensor fault. In case of a position sensor fault, both r 13 and r 14 significantly deviate from zero. Assuming that only a single fault occurs, residuals r 13 and r 14 can be used to detect and separate the faults in the a-and b-phase electric current sensors and the position sensor.

Experimental Result
The validity of the algorithm is verified through experiments. Figure 14 shows the test environment.
can be used to detect and separate the faults in the a-and b-phase electric current sensors and the position sensor.

Experimental Result
The validity of the algorithm is verified through experiments. Figure 14 shows the test environment. The motor parameters of the experiments are listed in Table 5. Figure 14. Experimental test environment. Figure 14. Experimental test environment.
The motor parameters of the experiments are listed in Table 5.  Figure 15 shows the fault signals of each sensor. The fault signal is applied from 0.5 to 0.7 s to the a-phase electric sensor with 5-A offset. From 1.5 to 1.7 s, the gain value of the b-phase electric sensor doubles while 0.1-rad offset is applied from 2.5 to 2.7 s.   Figure 15 shows the fault signals of each sensor. The fault signal is applied from 0.5 to 0.7 s to the a-phase electric sensor with 5-A offset. From 1.5 to 1.7 s, the gain value of the b-phase electric sensor doubles while 0.1-rad offset is applied from 2.5 to 2.7 s.  Figure 16 shows the rotor speed of the PMSM control system according to the reference speed. Figure 17 shows the d-q axis input voltages of the PMSM control system. Figure 18 shows the d-q axis electric currents of the PMSM control system.        According to the test results described above, when faults occur in the electric and position sensors, the faults are influenced by the input voltage and electric current. Similarly, a fault in one part of the control system can influence the other parts. When Figure 19 is considered as the fault table listed in Table 3   According to the test results described above, when faults occur in the electric and position sensors, the faults are influenced by the input voltage and electric current. Similarly, a fault in one part of the control system can influence the other parts. Figure 18 shows r 13 and r 14 from the proposed algorithm during the test. When Figure 19 is considered as the fault table listed in Table 3, r 13 significantly deviates from zero in case of an a-phase electric current sensor fault; meanwhile, r 14 significantly deviates from zero in case of a b-phase electric current sensor fault. In case of a position sensor fault, both r 13 and r 14 significantly deviate from zero. Assuming that only a single fault occurs, residuals r 13 and r 14 can be used to detect and separate the faults in the a-and b-phase electric current sensors and the position sensor.

Integrated Fault-Diagnosis Algorithm
The purpose of the integrated diagnosis is to use the combined high-and low-level fault diagnoses to achieve dual monitoring to specifically classify the fault factors and to distinguish the faults through system performance analysis. The low-level fault diagnosis directly defines the target fault of the individual systems and individually creates residuals to immediately and specifically recognize the f L 1,i = 0 and f L 2,i = 0 f (H i ) = 1 Intolerable and not isolatable f L 1,i = 1 or f L 2,i = 1 f (H i ) = 0 Tolerable and isolatable Table 6 lists the final fault diagnosis derived from the simultaneous observations of the fault-diagnosis flags of the high-and low-level fault diagnoses. When the high-level fault diagnosis fault-detection flag f (H i ) is one, it means that the fault is finally diagnosed. Using the corresponding low-level fault diagnosis fault-detection flags f (L 1,i ) and f (L 2,i ), specific faults can be determined. When f (H i ) is zero and f (L 1,i ) or f (L 2,i ) is one, because no reduction in the entire system performance occurs, the fault is determined to be tolerable. In other words, the system does not need to be shut down or reconfigured because it can trigger false alarm due to unexpected sensor noise or disturbance to the low-level fault diagnosis. On the other hand, if f (H i ) is one whereas f (L 1,i ) and f (L 2,i ) are zero, this means that an abnormality occurs from the subject, which is not defined in the low-level fault diagnosis. In this case, we can determine that the risk factor can be recognized by the high level-fault diagnosis. Similarly, the integrated fault-diagnosis method can provide dual monitoring of faults between the high-and low-level fault-diagnosis systems, further enhancing the robustness and stability of the diagnosis procedure. In addition, the integration enables more specific classification of the triggered faults.

Conclusions
This paper proposed a high-level fault diagnosis of vehicle dynamics and low-level fault diagnosis of the motor system by considering the drive motor of in-wheel independent drive electric vehicles. Simulations were performed to confirm the usefulness of the algorithm. In addition, an integrated fault-diagnosis algorithm, which combines both the above methods, was proposed to prevent false alarm, ensure robustness, and perform more specific classification of faults. Such an integrated fault-diagnosis method cannot only be applied to the drive motor of the in-wheel independent drive electric vehicles but can also be extended to other sub-systems, further enhancing the robustness and stability of the electric vehicle system.