# Sensor Fault Diagnosis Observer for an Electric Vehicle Modeled as a Takagi-Sugeno System

Authors: S. Gómez-Peñate; F. R. López-Estrada; G. Valencia-Palomo; R. Osornio-Ríos; J. A. Zepeda-Hernández; C. Ríos-Rojas; J. Camas-Anzueto
Journal: Journal of Sensors
 (2018)

---

## Abstract

A sensor fault diagnosis of an electric vehicle (EV) modeled as a Takagi-Sugeno (TS) system is proposed. The proposed TS model considers the nonlinearity of the longitudinal velocity of the vehicle and parametric variation induced by the slope of the road; these considerations allow to obtain a mathematical model that represents the vehicle for a wide range of speeds and different terrain conditions. First, a virtual sensor represented by a TS state observer is developed. Sufficient conditions are given by a set of linear matrix inequalities (LMIs) that guarantee asymptotic convergence of the TS observer. Second, the work is extended to perform fault detection and isolation based on a generalized observer scheme (GOS). Numerical simulations are presented to show the performance and applicability of the proposed method.


---

## Body

## 1. Introduction

In recent years, there has been a substantial increase in the number of electric vehicles (EV), due to the increase of pollution byCO2 emissions to the environment. Recent studies show that currently there are more than 800 million cars circulating every day, which represent a distribution of 400 to 800 vehicles per 1000 inhabitants [1]. As a result, vehicles are responsible for a high percentage of global energy consumption and greenhouse gas emissions. This tendency shows an accelerated growth of vehicles per inhabitants, and, while the energy consumption in other sectors decreases, the consumption due to the continuous use of transport vehicles grows [2]. On the other hand, new sensor systems and actuators on EV are increasing in complexity, and the probability for a fault taking place is high [3].For example, recently, a Tesla driver died in a crash while using the autopilot mode because the car’s sensor system failed to distinguish a large white 18-wheel truck and trailer crossing the highway. This accident caused a severe crisis in the EV industry. Therefore, safety, reliability, and energy-saving optimization systems are a demand of the new growing industry. In line with this demand, this work is dedicated to propose a method to detect and isolate sensor faults in an electric vehicle.An important stage in the design of the diagnosis system is the mathematical model that represents the dynamic characteristics of the EV, which is expressed by a set of nonlinear differential equations depending on exogenous nonstationary parameters [4], for example, slopes or poor conditions of the road. However, typical models of EV consider a simplified representation given by linear models, in which it is not possible to consider these nonstationary parameters [5–7]. Nonetheless, it is possible to obtain better representations when nonstationary exogenous parameters, such as the road slope, could be measured online, such that the desired diagnosis system, which also depends on these measurable parameters, is better and less conservative [8]. In typical linear time-invariant systems, it is not possible to consider these variations. However, a viable alternative is Takagi-Sugeno models that consider nonlinearities and varying parameters as part of the mathematical modeling [9, 10], which increases the physical representativity of a real physical system.The main advantage of a TS model is its capability of describing nonlinear dynamics through a collection of local linear models that are interpolated by nonlinear functions [11]. These functions are known as weighting functions and depend on exogenous variables that can be measurable (e.g., system inputs, outputs, exogenous nonstationary parameters, velocity, and the slope of the terrain) or unmeasurable (e.g., state variables, magnetic flux, and slip angle of the tires) [12, 13]. In this work, weighting functions are considered measurable. Additionally, an important property of this type of models is that the weighting functions are convex, which allows to extend some of the tools and methods developed for linear systems to TS systems. In particular, it has been shown that a TS dynamic model obtained through the nonlinear sector transformation approach can describe the overall behavior of a highly complex nonlinear system with a high degree of accuracy [11, 14]. As a result, its applicability in designing controllers, diagnosis systems, and observers, among others, has become of high importance; see, for instance, [15–17] and references therein. Applications on vehicles can be found in the literature; for example, in [4], a predictive control strategy using a TS model is presented to control the velocity in an EV, and the authors in [18] proposed a linear parameter varying (LPV) controller in order to control the tracking of the longitudinal velocity and the yaw velocity of the EV. In [19], a TS fuzzy model is used to represent the nonlinear behavior of an electric power steering (EPS) system, and stabilization conditions for nonlinear EPS system with both constrained and saturated control input cases are proposed in terms of linear matrix inequalities. Some works related to fault diagnosis can be consulted in the following references: in [20], an observer design strategy is presented to estimate the lateral dynamics of a vehicle and the curvature of the road. The nonlinear model of vehicle dynamics is transformed into an exact TS model with weighting functions depending on unmeasured states. In [21], a TS observer is designed to detect faults and estimate states in an induction motor, in order to implement a fault-tolerant control. Recently, in [22], an observer was designed to estimate the lateral dynamics of a motorcycle represented as a quasi-LPV system. It is important to note that, in the works reported in [4, 18, 21], the slope of the road is considered constant or close to zero; nevertheless, in real driving conditions, this parameter is not constant and has a great impact on the vehicle performance and battery consumption. Unlike previous papers, this work considers the slope of the road in order to obtain an improved sensor fault diagnosis system.In this paper, we propose the design of an observer-based fault diagnosis for an electric vehicle. The main contributions of this paper are listed as follows: (i) a Takagi-Sugeno model is developed, whose weighting functions depend on the longitudinal velocity and the slope of the terrain in order to increase the operation range of the diagnostic system; (ii) sufficient conditions are proposed in order to guarantee the asymptotic convergence of the observer that is deduced through a quadratic Lyapunov function and a set of linear matrix inequalities (LMIs); finally, (iii) a bank of observers based on a generalized observer scheme is proposed to detect and isolate sensor faults. The combination of both techniques results in a scheme for detecting faults in the traveled-distance and speed sensors at different operating and slope conditions.The paper is organized as follows: in Section2, the longitudinal model of the electric vehicle is presented; in Section 3, a TS model that uses the velocity and the slope as premise variables is developed; the conditions of the designed observer for the TS model of the EV are formulated in Section 4; the numerical simulation results are presented in Section 5. Finally, conclusions and perspectives of this work are presented in Section 6.


## 2. Nonlinear Model of the Electric Vehicle

Figure1 shows the general scheme of an EV, which is constituted mainly by an energy source (battery bank), a power inverter, an electric motor, and a transmission system coupled to the wheels. Considering Newton’s second law and the translational equilibrium principle, the longitudinal dynamics can be represented by (see Figure 2) [2]
(1)mvdx2tdt=Ftt−Fat−Frt−Fgt,where mv (kg) is the total mass of the vehicle, x2t (m/s) is the speed of the vehicle, Ftt (N) is the traction force on the wheels, Fat (N) is the aerodynamic force, Frt (N) is the rolling resistance, Fgt (N) is the slope resistance due to the vehicle’s weight and the road slope, and t (s) is the time.Figure 1
Scheme of an electric vehicle.Figure 2
Longitudinal forces acting on an electric vehicle.Thetraction force is given by
(2)Ftt=ηktgrrwIbatt,where η=Im/Ibat is the efficiency of the power converter, kt=Tm/Im (N·m/s2) is the motor constant, Im (A) is the motor current, Tm (N·m) is the motor torque, Ibatt (A) is the battery current, gr (m) is the transmission gear ratio, and rw (m) the radius of the wheel.It is important to note that, for this case, the motor currentIm is not available and the battery provides the electric current to generate all the traction power, so that the battery current Ibatt is considered as the system input.Theaerodynamic force is given by
(3)Fat=12ρaAfCdx22t,where ρa (kg/m3) is the air density (ρa=1.225 kg/m3 under standard conditions), Af (m2) is the frontal area, and Cd (—) is the aerodynamic drag coefficient.Therolling resistance is given by
(4)Frt=Crmvgcosαt,where Cr (—) is the rolling resistance coefficient and αt (rad) is the slope of the road that depends on the position of the EV. However, in this work, it is considered time dependent without losing generality. The coefficient of rolling friction is complex and depends on the speed of the vehicle and the conditions of the tires and the terrain.Finally, thegravitational force due to the slope of the road and to the weight of the vehicle is
(5)Fgt=mvgsinαt.It is important to note that most of the reported work [4, 18, 21] consider that the vehicle is traveling on a road with a slope equal to zero or constant, which reduces the complexity of the mathematical model due to the fact that Frt and Fgt becomes constant. Nonetheless, in real driving conditions, the vehicles have smooth and abrupt slope changes. These changes can be measured with appropriate sensors, for example, using inertial measurement units (IMUs). By considering typical linear models, it is not always possible to include the slope dynamics in the model. However, variation of this parameter makes the nonlinear system a candidate to be represented by a TS model. In this case, the slope dynamics can be included as an exogenous nonstationary parameter, which increases accuracy of the model representation with respect to the real physical system [23].Substituting (2)–(5) into (1), the differential equation, which represents the longitudinal dynamics, is given by
(6)mvdx2tdt=ηktgrrwIbatt−12ρaAfCdxt22−Crmvgcosαt−mvgsinαt.For this mathematical model, the internal frictions, rotational inertias of the power train, and the inertia of the electric motor are neglected because they are small compared to the mass of the vehicle. The vehicle displacementx1t can be computed as
(7)dx1tdt=x2t.Finally, the nonlinear model affine to the input is given by(8)ẋt=x2t−ρaAfCdx22t2mv+0ηktgrmvrwIbatt+0−Crgcosαt−gsinαt,yt=Cx1t,x2tT,where yt is the system output. In the following section, the TS model for the nonlinear model (8) is developed.


## 3. Takagi-Sugeno Model of the Electric Vehicle

A TS model describes a nonlinear system using a collection of local linear time invariant (LTI) models, which are interpolated by nonlinear functions known as weighting functions. The general form of a TS model is given by(9)ẋt=∑i=1kμiξtAixt+Biut+Δi,yt=Cxt,where xt∈Rn, ut∈Rm, and yt∈Rp are the state, input, and output vectors, respectively; Ai∈Rn×n, Bi∈Rn×m, Δi∈Rn, and C∈Rp×n are known matrices of appropriated dimensions; and k is the number of local models.The weighting functionsμiξt depend on ξt, which can represent the system states, measured inputs, or an exogenous measured signal, for example, the slope of the road. The weighting functions satisfy the convex sum:
(10)∑i=1kμiξt=1,∀i∈1,2,…,k,μiξt≥0,∀t.There are three methods for obtaining a TS model. When it is not possible to obtain analytical models by physical principles, the most appropriate method is system identification [24]. This method considers a structure of the TS model and its weighting functions. Then, the problem is reduced to identify the parameters of the subsystems defined as local linear models and the parameters of the activation functions using numerical optimization algorithms. However, when the analytical equations of the nonlinear system is available, a TS model can be obtained by linearizing around different selected operation points [25]. Nonetheless, the main drawback of this method is that is not easy to find such operating points, which are usually computed by heuristic methods. Finally, the most appropriate method is called the nonlinear sector transformation [26], which is based on the following idea: consider a simple nonlinear system ẋ=fxt, with f0=0, where the goal is to find a global sector such that ẋ=fxt∈a1,a2xt; see Figure 3(a). This approach guarantees an accurate approximation of the nonlinear system; however, it is difficult to find a global sector to enclose the nonlinear terms, and generally, a local sector is considered. This is reasonable since the variables of the physical system are always bounded. Figure 3(b) shows the local nonlinear sector, where two lines define a local sector between ξ¯<xt<ξ¯. The model TS represents the nonlinear system in the local region, given by ξ¯<xt<ξ¯.Figure 3
Nonlinear sector transformation approach.
(a)
(b)In order to derive a TS model, the nonlinear model of the EV in (8) is represented in matrix format, as follows:
(11)ẋt=010−12mvρaAfCdx2tx1tx2t+0ηktgrmvrwIbatt+0−Crgcosαt−gsinαt.Two premise variables are considered, the nonlinear termx2t and the slope of the road αt. For x2t, a minimum velocity of 0 m/s and a maximum of 16.66 m/s (approximately 60 km/h) are considered; and for αt, the minimum and maximum slopes of −π/9 and π/9 (−20 and 20, resp.) are considered, such that
(12)0≤x2t≤16.66,−π9≤at≤π9.The premise variables are selected as(13)ξ1t=−12mvρaAfCdx2t,ξ2x=−Crgcosat−gsinat.The premise variables are replaced in (11),
(14)ẋt=010ξ1tx1tx2t+0ηktgrmvrwIbatt+0ξ2t,with the defined dimensions, and the premise variables are limited as follows:
(15)ξ¯1≤ξ1t≤ξ−1,ξ¯2≤ξ2t≤ξ−2.These premise variables comply with (10), such that
(16)ζ1t=ξ1t−ξ¯1ξ−1−ξ¯1,ζ2t=1−ζ1t,ζ3x=ξ2t−ξ¯2ξ−2−ξ¯2,ζ4t=1−ζ3t.The nonlinear model of the EV represented by the TS approach is expressed as(17)ẋt=∑i=14μiξtAixt+But+Δi,where
(18)μ1t=ζ1tζ3t,μ2t=ζ1tζ4t,μ3t=ζ2tζ3t,μ4t=ζ2tζ4t,with
(19)A1=001ξ1,B=0ηktgrmvrw,Δ1=0ξ2,A2=001ξ1,Δ2=0ξ2,A3=001ξ1,Δ3=0ξ2,A4=001ξ1,Δ4=0ξ2.


### 3.1. Validation of the Takagi-Sugeno Model

The model parameters considered in this paper were presented in [27], whose values are displayed in Table 1. Initial conditions x0=0,6.5 and an input current Ibatt as shown in Figure 4 are considered to validate the TS model. The systems responses are displayed in Figure 4. As can be observed, the nonlinear system and the proposed TS model have the same behavior, and the mean square error between the two responses is 1.23×10−21%, which demonstrates that the TS model represents the dynamic characteristics of the nonlinear system. In the next section, a fault diagnosis method based on a generalized observer scheme is proposed to detect and isolate sensor faults.Table 1
Parameters of the electric vehicle [27].
Parameter
Value
Unit
m
150
kg
η
0.97
—
kt
0.0604
N·m/A
gr
8.5
m
rw
0.24
m
ρa
1.225
kg/m3
CdAf
0.1031
m2
Cr
0.00081549
—
g
9.81
m/s2Figure 4
Comparison between the general nonlinear model and the TS model in response to variations of the input current.
(a)
(b)


## 3.1. Validation of the Takagi-Sugeno Model

The model parameters considered in this paper were presented in [27], whose values are displayed in Table 1. Initial conditions x0=0,6.5 and an input current Ibatt as shown in Figure 4 are considered to validate the TS model. The systems responses are displayed in Figure 4. As can be observed, the nonlinear system and the proposed TS model have the same behavior, and the mean square error between the two responses is 1.23×10−21%, which demonstrates that the TS model represents the dynamic characteristics of the nonlinear system. In the next section, a fault diagnosis method based on a generalized observer scheme is proposed to detect and isolate sensor faults.Table 1
Parameters of the electric vehicle [27].
Parameter
Value
Unit
m
150
kg
η
0.97
—
kt
0.0604
N·m/A
gr
8.5
m
rw
0.24
m
ρa
1.225
kg/m3
CdAf
0.1031
m2
Cr
0.00081549
—
g
9.81
m/s2Figure 4
Comparison between the general nonlinear model and the TS model in response to variations of the input current.
(a)
(b)


## 4. Sensor Fault Diagnosis

The fault diagnosis approach proposed in this paper is based on the generalized observer scheme. This method considers a reduced order TS observer for each of the measured outputs as shown in Figure5. For the particular case of the EV, two TS observers are considered. Both observers consider the same input (the current Ibatt), but each observer is dedicated to estimate only one output. That is, the first observer is dedicated to estimate the vehicle displacement y1t, and the second observer the EV velocity y2t. The main idea is to perform fault diagnosis by the evaluation of two residual signals, which are the difference between the measured and estimated outputs given by the observers.Figure 5
General scheme of the observer bank to detect sensor faults.Each observer has the following form:(20)x^̇t=∑i=14μiξtAix^t+But+Δi+Giyt−y^t,y^t=Cx^t,where x^t is the estimated state vector, y^t is the estimated output vector, and Gi∈Rn×p are the observer gain matrices to be computed. The design problem is then to find Gi such that limt→0et=limt→0xt−x^t≈0. Furthermore, the observer (20) needs to achieve the well-known observability conditions.The estimation error between (20) and (17) is computed as
(21)et=xt−x^t.The error dynamics is given by(22)ėt=ẋt−x^̇t.Replacing (17) and (20) in (22), the following is obtained:
(23)ėt=∑i=14μiξtAi−GiCet.From the above expression, it follows that if the state estimation (23) error converges asymptotically to zero, the estimated state vector converges asymptotically to the real state vector; then, the problem is reduced to find the matrices Gi that satisfies condition (23). To achieve this goal, the following theorem is proposed.Theorem 1.
The observer TS (20) asymptotically converges to (17) if there exist matricesP=PT>0,Mi, satisfying the following matrix inequality:
(24)AiTP−MiTC+PAi−MiC<0,∀i∈1,…,4.
The gains of the observer are determined asGi=P−1Mi.Proof.
The stability conditions for the derivative of the error (23) can be obtained using the quadratic Lyapunov function Vxt=eTtPet and V̇tx<0, where P=PT>0, whose derivative is
(25)V̇xt≔eTtPėt+ėTtPet<0,and replacing (23) into (25) gives
(26)V̇xt≔∑i=14μiξteTtAiTP−PTGiTCT+PAi−PGiCet<0.
As can be observed from (26), it is sufficient that the following expression has to be negative to satisfy the Lyapunov condition:
(27)AiTP−PTGiTCT+PAi−PGiC<0.
Nonetheless, expression (27) contains nonlinear terms PG and PTG. In order to eliminate these terms, it is considered that Mi=PGi. Then by substituting this term in (27), the LMI (24) is obtained. This completes the proof.


### 4.1. Fault Diagnosis Scheme

Note that in order to perform fault diagnosis, two observers need to be designed according to Theorem1. Then, each observer takes the following form:
(28)x^̇t=∑i=14μiξtAix^t+But+Δi+Gi,pypt−y^pt,y^pt=Cpx^t,p∈1,2.Two normalized residual signals are computed and evaluated as follows:(29)r1t=y1t−y^1t,r2t=y2t−y^2t,such that if rpt is less than a predefined threshold, then the system is working under nominal conditions; but if rp>th, then the system is working on faulty conditions. For example, if the fault occurs in sensor 1, the residual r1t is insensitive, but r2t changes its value. On the other hand, for a fault occurring in sensor 2, the residual r2t remains insensitive, but r1t changes its values (see Figure 5). This scheme produces a decoupled sensor fault detection and isolation. Nevertheless, it should be noted that it is not possible to detect simultaneous faults, which will be addressed in future contributions by considering a different diagnosis scheme.


## 4.1. Fault Diagnosis Scheme

Note that in order to perform fault diagnosis, two observers need to be designed according to Theorem1. Then, each observer takes the following form:
(28)x^̇t=∑i=14μiξtAix^t+But+Δi+Gi,pypt−y^pt,y^pt=Cpx^t,p∈1,2.Two normalized residual signals are computed and evaluated as follows:(29)r1t=y1t−y^1t,r2t=y2t−y^2t,such that if rpt is less than a predefined threshold, then the system is working under nominal conditions; but if rp>th, then the system is working on faulty conditions. For example, if the fault occurs in sensor 1, the residual r1t is insensitive, but r2t changes its value. On the other hand, for a fault occurring in sensor 2, the residual r2t remains insensitive, but r1t changes its values (see Figure 5). This scheme produces a decoupled sensor fault detection and isolation. Nevertheless, it should be noted that it is not possible to detect simultaneous faults, which will be addressed in future contributions by considering a different diagnosis scheme.


## 5. Simulation Results

Numerical simulation results are presented in this section in order to illustrate the applicability of the proposed method. The EV parameters are the same as the ones presented in [27], which are shown in Table 1.Two reduced observers are considered as discussed in the previous sections, whose gains (28) were calculated by solving Theorem 1 in Python with the solver MOSEK [28].The gains for observer 1 are(30)G1,1=G2,1=10.6596,G3,1=G4,1=10.6666.The gains for observer 2 are(31)G2,1=G2,2=1.30611.6082,G2,3=G2,4=1.30421.6041.In order to verify the convergence of both observers, the considered initial conditions arex0=0,6.5 for the system and x^0=0,0 for the observers. For simulation purposes, variations on the slope of the road are considered as displayed in Figure 6(a). Furthermore, when the vehicle is climbing a slope, the motor requires more power, which is provided by the bank of batteries. This can be measured as an increment on the electrical current, which is displayed in Figure 6(b).Figure 6
Variation on the slope of the road (α) and the input current (Ibat).
(a)
(b)In addition, to illustrate the fault detection and isolation method, different faults are considered to affect the two sensors in different time intervals. Sensor can fail for different reasons. Usually this behavior can be observed as additive bias, for example, offsets or calibration problems. These malfunctions can be described by ramp or step functions in order to represent abrupt or slow variation faults, as described in [29, 30]. By considering the previous remark, the fault induced to the displacement sensor, denoted as f1, is defined in (32), and the fault induced to the velocity sensor, denoted as f2, is defined in (33). Both faults are displayed in Figure 7. In this simulation, two types of faults are considered: an abrupt fault in sensor 1 and an incipient fault in sensor 2, defined in (32) and (33), respectively.
(32)f1t=0for0≤t<20,5for50≤t<60,15for60≤t<70,10for70≤t<80,0for80≤t≤200,(33)f2t=0for0≤t<120,0.08t−9.6for120≤t≤200.Figure 7
Normalized residuals vectorsr1t, r2t and induced fault signals f1t,f2t.The normalized residual signals are also shown in Figure7. In both cases, the fault detection turns out to be successful. The fault identification is done by comparing the fault signature with the incident matrix given in Table 2. For example, for the fault affecting the speed sensor, the residual r2 presents some changes at t=120 s, while the residue r1 remains at zero. This particular signature allows to isolate the fault in the speed sensor. A similar analysis can be done for the traveled-distance sensor. The proposed fault diagnosis scheme is effective to detect faults in both sensors even in the presence of variations on the slope of the road.Table 2
Incidence matrix.
Fault
f1
f2
r1t
1
0
r2t
0
1


## 6. Conclusions

In this work, an observer-based fault detection system was designed for an electric vehicle. The EV is represented by a TS model whose weighting functions depend on the velocity and the slope of the road. This representation is more general compared with that of typical models, which consider a constant slope. Sufficient conditions, which guarantee the convergence of the TS observer, and the observer bank were proposed by a set of linear matrix inequalities. Finally, the detection of fault on the velocity and traveled-distance sensor was demonstrated through simulation by the variation of the residues compared to an incidence matrix. A variable slope was considered in order to increase the range of representativity of the nonlinear dynamics. The result shows that the TS fault diagnosis observer can detect and isolate sensor faults for different driving conditions and different types of faults. However, the model can be improved by measuring the mass of the vehicle in order to be considered as a premise variable. Future work will be done in order to consider simultaneous faults and inexact premise variables.



---

*Source: 3291639-2018-03-28.xml*