Robust Fault Detection Algorithm for the Smart Anti-pinch Window of Pure Electric Vehicles

In order to effectively solve the risk of safety on power window, an improved pinch detection algorithm based on the fault detection observer estimation is proposed for an anti-pinch window control system. In designing a residual generator, the proposed fault detection algorithm makes use of the pinch torque rate information by establishing the mathematical model of DC, considered as a fault under the pinched condition. By comparing the residual signal with the pre-designed threshold, the occurrence of pinch is detected. The fault detection observer takes into account robustness against disturbances and sensitivity to faults, simultaneously, both of which are regarded as optimization problems. In this study, the mixed H-/H∞ performance index and reference model fault detection method are advanced to solve the optimization problem in the Linear Matrix Inequality (LMI) which transforms a mathematical problem. The simulation results of the detection time obtained from the two methods are 0.15 and 0.07s, respectively, proving that the use of the fault detection algorithm is effective for an anti-pinch window. The co-simulation based on CANoe-MATLAB is proposed to verify the algorithm again. Moreover, under the premise of strong robustness, the reference model method is superior to the mixed H-/H∞ performance.


INTRODUCTION
In the automotive industry, electronic systems are not only used to provide customer comfort in various vehicles, but also to put forward new requirements for vehicles, such as power windows (Ma et al., 2008).A power window automatically rises and falls.Despite its convenience, power windows bring security issues, such as the possibility of hurting the body part located in the path of the window (Hye et al., 2008).Numerous accidents caused by a power window due to the lack of safety precaution have been reported.Therefore, an anti-pinch window control system is paid much attention.This system effectively solves the security risks and allows the window to work normally without affecting the comfort of the passengers.
The conventional methods in detecting pinching conditions are generally divided into two categories.On the one hand, the differential type pinch estimator is based on the assumptions that the sharp decline of velocity in the pinch condition and the window move at a constant speed in smooth operating conditions.However, this algorithm is realistically inadequate because the friction torque of window frames in the closed panel of vehicles usually has different characteristics.The amount of computation required in this pinch estimator is small, but its performance is degraded in the presence of measurement noises.On the other hand, the absolute pinch estimated response time is based on the changes in the motor control current, which compensates for the pinch torque and angular velocity (Buja et al., 1995;Syed and Wells, 1993).However, this advantage does not guarantee the robustness of an abnormal vibration under real driving conditions.Furthermore, this approach requires additional current sensors to avoid false positives (Syed and Wells, 1993).Thus, such a method cannot be a universal solution because the detection of the pinching condition depends entirely on the engineer's inspiration to determine the current restrictions.Previous studies have proposed a type of algorithm that recognizes a pinched condition from a detected change in window velocity; another type recognizes a pinched condition when the applied motor torque exceeds a predetermined limit, requiring an additional current sensor to avoid false alarm (Zhang and Wang, 2011;Angelo et al., 2006;Henry and Zolghadri, 2005).However, these are likewise not considered as general solutions because their performance relies on the validity of a current limit.The use of the change in motor control current to detect the pinched condition in compensating for the low response time of the pinch torque as well as the window velocity are discussed in Doh and Ryoo (2008).All the changes of the DC motor are detected by sensors, such as Hall sensors and current sensors, as mentioned in the above references.These methods are poor on timeliness.In Yang et al. (2005) proposed the detection of current amplitude method, which they described as having anti-pinch measures without sensors, but often making detection errors.
Model-based fault detection has received much attention in recent years, especially the design of the fault detection observer.The problem is treated in different ways.For instance, the unknown input observer (Isermann, 2005), H∞/H2 filter (Adil et al., 2010), multiple-observer (Niaki and Nezhad, 2009) and Linear Matrix Inequality (LMI) approaches have been reported.The main methods of the model-based fault detection are as follows: Method I: to provide a performance index that will transfer the fault diagnosis to an optimization question.The frequently-used performance indices are as follows: ||T||∞ is the maximum singular value of the transfer function matrix, ||T||-is the minimum singular value of the transfer function matrix and T rf , T rd are the transfers of the fault and the disturbance, respectively.σ i (T rf (jw)) is the nonzero singular value of T rf ,.
Method II: to utilize a reference model that will be used to describe the ideal residual r.The reference model should achieve both robustness and detection performance, described in the following as: where, T rf , T rd are the transfer functions of the fault and the disturbance, respectively.r f (s) is the residual, f (s) is the fault and d (s) is the disturbance.The realistic model is different from the reference model.Thus, the optimization problem used to synthesize the residual generator is formulated as a robust H∞ filtering problem.The criterion is: , r e = r-r f .The optimization criterion J w is the worst-case distance between the residual r and the ideal residual r f , normed by the size of the inputs.The J w is the gain from w to r e .
The aim of this study is to design a fault detection obverse for the anti-pinch window on pure electric vehicles.Next, the details of the devise for the robust fault detection observer based on the two methods will be discussed.

PROBLEM STATEMENTS
Consider the linear time-invariant system of the following form.
The uncertain Linear and Time-Invariant (LTI) dynamic system is described by the state-space model (Zheng and Wu, 2009): In the above, x is the state vector; u is the control input; y is the measurement vector; v and n are the unknown finite energy disturbance and white noise, respectively; and f is the fault input vector.A, B, C, D, B v , B n , D v , Dn, B f and D f are matrices with appropriate dimensions.
Generally speaking, a fault detection system consists of two parts: a residual generator and a residual evaluator.First, a residual generator based on the fault detection filter is outlined as follows: The state and measurement vector r is the residual signal and L represents the observer gain matrix.Using (1) and (2), the following form is obtained: The dynamics of the residual signal r depends on not only v, n and f, but also on the state e.However, r is completely decoupled from the input u.Equation (3) can then is expressed in the form of a transfer function: where, T rv , T rn and T rf are the transfer functions from v, n, f to r, respectively.Fault detection can be described by the relationship between the input v, n, f and the output r.Next, a further analysis of Eq. (4) based on the two methods mentioned above will be presented.

ANALYTICAL MODEL OF FAULT DETECTION ALGORITHM
Sate-space model for the pinch torque rate estimator: For the fault detection is based on analytical model, we firstly estimate the accurate state-space model for the anti-pinch control system which is shown in the Fig. 1.The nomenclature of the linearized motor is given below: w (angular velocity speed), u (driving voltage), I (armature current), T m (rotational torque), T d (disturbance torque), T c (control torque), L m (armature inductance), R m (armature resistance), J (moment inertia), B (viscous friction coefficient), K e (back electromotive force coefficient), K t (torque coefficient).
The transfer function from the rotational torque to the angular velocity is given by: The disturbance torque is classified into vibration torque T v , pinch torque T p and load torque T w .Therefore, the rotational torque is written as follows: The vibration torque varies with the road condition, adding difficulty in defining velocity as a finite mathematic model.To solve this problem, velocity is classified it into energy-bounded disturbance.The motor angular velocity speed is rewritten as: Since the electrical dynamics of the motor is faster than the mechanical one, the control torque is approximated as follows: The viscous friction coefficient B has less influence on the torque, so it is neglected.By choosing the angular velocity speed as a single state, the motor control torque speed is reorganized as: where, T p and T w are modeled as single states for the estimator design: Since motor parametric uncertainty causes a bias error in the model estimation, only using the torque estimation in the previous result is not suitable for Fig. 1: Linearized motor model realistic conditions.The torque rate must be augmented as an additional state and seen as a rank disturbance: Thus, the state-space model for the design of pinch estimator is generated: The parameters of the DC are obtained by the experiments.The process is described as follows: • Armature resistance test: The test is operated under the motor stall and the result is 0.85 Ω.
• EMF coefficient test: The voltage of the armature in the inductor becomes a stable value after an adjustment time that reflects the inductor; the adjustment time is 1.2 ms from the waveform of the voltage changes.Therefore, the inductance is 0.649 mH.The stable value of the angular velocity speed is 99.7 rad s-1 and the EMF coefficient is obtained from the linear approximation between the voltage and the angular velocity speed.Moreover, K e is equal to K t .• Moment inertia test: After putting the step voltage signal on the motor and measuring the corresponding speed curve, the T n is obtained as 9.3×10-3s under the 5% deviation of the adjustment time.Based on the formula J = K e ×K t ×T n /R m , the moment inertia is 1.586×10-4 kg/m 2 .
Motor parameters are given in Table 1.The data obtained by experiments are then placed into matrices A, B, C and D of the model, designed as follows: where, B v , D v , B n and D n are the distribution matrices of the unknown finite energy disturbance and the white noise.B f , D f are the distribution matrices of the possible fault, designed as follows: Fault detection algorithm based on the H-/H∞ performance index: Given the analysis of the residual generation in (4), the robust fault detection observer is designed based on the H-/H∞ performance index.
Definition 1: Given the three scalars β>0, γ1>0, γ2>0, the observer ( 2) is called an H-/H∞ fault detection observer if the following are established: Conditions ( 5) and ( 6) represent the worst case criterion for the effect of disturbances on the residual r, whereas condition (7) stands for the worst case criterion for the sensitivity of r to the fault.Clearly, these three criteria capture the most significant features of the fault detection observer.
Next, the bounded real lemma will be introduced to transfer the H-/H∞ performance index to the LMI problem.
Lemma 1: (bounded real lemma): For the system T (s) with a state-space realization {A, B, C, D}, the following statements are equivalent: ||T(s) ||∞<γ1 the LMI According to Definition 1 and Lemma 1, the optimization problem consisting of Eq. ( 5), ( 6) and ( 7) is expressed by the following LMI inequality matrices: T rd and T rf are the transfer functions from d, f to r, respectively, whereas d = [v n] T .Generating a residual signal with the best sensitivity to the fault and robustness to the disturbance is the purpose of fault detection.To achieve the best features of the residual, the following conditions (8) and ( 9) are represented by: 0 Condition (8) represents the worst case criterion for the effect of disturbances on the residual r, whereas condition (9) stands for the worst case criterion for the sensitivity of r to the fault.Clearly, these two criteria capture the most significant features of the fault detection observer.
In condition (9), the H-is not a system norm.Thus, for the static fault detection observer, the reference residual model W F (s) is introduced to describe the desired behavior for the residual vector r and to define the r F as the reference residual: The criterion is: where, w = [u T f T d T ], r e = r-r f .The optimization criterion J w is the worst case distance between the residual r and the ideal residual r f , normed by the size of the inputs.The J w is the gain from w to the r e : Minimizing J involves minimizing the infinite norm of Eq. ( 11), which meets: Thus, T rd (s) and W F (s)-T rf (s) are as small as possible and the following is obtained: By the triangle inequality, the following is generated: From the equations above, the following relation is obtained: In Equation ( 13), the left reduces the effect of d to the residual and the latter makes the fault approaching the reference signal, which then ensures sensivity.Thus, design has the following formulas: Which meet the request of the index in ( 8) and (9)?The above process is depicted in Fig. 2.
The minimum singular value of the original maximum problem, namely the H-index, is changed into an H∞ model matching problem.Next, the fault detection observer estimation for an anti-pinch window based on reference residual model will be discussed.
The reference residual model is assumed to be in the following form Zhong et al. (2007): Here,  � = [e T x T F ]T.In using ( 3) and ( 15), the following form is obtained: Two lemmas are given, as follows: Lemma 2: put forward a system, as follows: A is asymptotically stable.||T(s)|| ∞ <γ, if and only if a matrix P = P T >0 exists satisfying: The following three conditions hold: • For system (1), H∞ is a filter • The observer gain is L = R-1Z • The system ( 13) is asymptotically stable and satisfies ||r e || 2 < γ||w|| 2 , namely, the index J<γ The coefficient matrix of the reference model is solved as follows: Lemma 4: the existence condition of the fault detection filter is transferred into a solvability problem of the linear matrix inequalities.Equation ( 17) presents linear matrix inequalities on the scalar γ.It is optimized as a variable γ by solving the following optimization problem to get an H∞ filter: For method I, the threshold is designed as follows: ||r|| 2,t >J th , alarm, with faults, ||r|| 2,t < J th , no faults, disturbance affect.The residual evaluation function ||r|| 2,t is determined by: When f = 0, the fault-free case residual function is: v is the finite energy signal where the energy bound d = 27.386 is measured, n is white noise signal with variance σ = 1.5.Thus, the threshold is determined as: For method II, Eq. ( 4) shows the feature of the residual as: When no fault occurs, a certain load torque is observed in the window control system.According to the theory of fault detection, with the absence of fault and the input voltage being a constant value case, Truu (s) + Trdd (s) = 0, the Eq. ( 19) is obtained in the normal state: In solving the steady-state value of residual signal in normal and taking the average value of it as Jr, the residual strikes at a certain range and the threshold for the average of 20% margin is selected, namely, the threshold meeting the equation (Jr-Jth)/Jr = 20%.

SIMULATION AND ANALYSIS
MATLAB simulation results: When the fault occurs, the angular velocity, torque and torque rate change as shown in Fig. 3 to 5.These are calculated from the output of the Hall-sensors in the DC motor with four magnets at the motor shaft.Overall, the results below show that the angular velocity is smaller than the normal one at the delay time of 2.7s.Moreover, the torque and the torque rate appear abruptly at the pinch condition; the torque rate changes dramatically.In the following emergent, they are identified from the above analysis by considering the torque rate as a criterion of pinch detection, which improves the reliability of pinch detection even in the presence of disturbance and noise.
The simulation toolbox is used to build the robust fault diagnosis system model based on the Method I shown in Fig. 6.The main uncertain factors of the antipinch window control system are the vibration torque uv, model uncertainty uTD and the disturbance from traction torque when the window lifts.These factors are attributed as the finite energy disturbance v.In the simulation, v is the impulse signal with the delay is 0s, amplitude is 50 and width is 0.3s.Moreover, the noise from the test of the angular velocity speed, simulated by a band-limited white noise with power of 0.00014, has a sample frequency of 0.01.According to the test, the window height is 435 mm and the rising time is 5s.Thus, the average rate of increase is 87 mm s-1.The anti-pinch design is for 4 mm to 200 mm and fault detection is achieved 2.7 s after the window lifts.The fault occurs with the anti-pinch.In the simulation, f is the impulse signal, the delay is 2.7s, amplitude is 1 and the width is 1s. Figure 7 to 9 show the simulation results of Method I.
The normal residual is shown in Fig. 7.The residual signal r changes little at the beginning due to the disturbance.The range is below the threshold.The change of r caused by noise is not obvious during the entire simulation.Figure 7 shows that the residual signal is robust to disturbance v and noise n.
The fault residual signal is shown in Fig. 8.The residual signal r has a visible change at 2.7s of delay time and the range of change exceeds the bound of threshold of 0.4721.In this case, the system alarms for fault.However, the change of r is small to the finite energy v and white noise n.This change does not exceed the threshold.The results in Fig. 8 further prove that the residual signal is sensitive to signal f, as well as robust to the disturbance signals v and n.In summary, the design residual generator detects the fault under the pinch condition, which can full prove this method is effective and achieve our requirement.For the purpose of obtaining the fault detection time, Fig. 9 shows the residual evaluation function.The dash-dot line signifies the residual evaluation with fault, the "--" line signifies the normal state and the beeline is the threshold.The test result indicates that the pinch condition is successfully detected using the predetermined threshold level.That is, if the residual evaluation is over the threshold, the engineers can make the decision of taking precautions.Clearly, after the fault occurs at 0.15s, the residual exceeds the J th , whereas in the normal state, it is below J th .The The simulation toolbox is used to build a robust fault diagnosis system model of an anti-pinch window based on Method II, where the input is angular velocity and output is residual signal, as shown in Fig. 10.The model is based on the residual generator.Figure 11 shows the normal residual when the window lifts without fault.After 0.2s, the residual reaches the steady-state value, taking the average of the residual signal between 0.2s to 4.5s.Based on the former analysis, the threshold is designed as 0.8*-1.03823(the average value) = -0.8306.
The residual signal is shown in Fig. 12, when the force from the external obstacles is large.After the pinch occurs at 2.7s, detection occurs at 70 ms, which is timely with a 20% margin, as shown in the figure.Taken together, the simulation results provide undeniable evidence that the residual has high sensitivity to fault and has reached the requirements.
In comparing the analyses from the simulation results above with Method I, the simulation model of Method II is proven simple as it does not need to set the noise, disturbance and fault simulation value.Moreover, the input is the real-time angular velocity, which is more adequate in reality.In Method I, detection time is taken from the residual evaluation function, which is directly read out in Method II.The most striking results that emerged from the data are that the detection time of Method II is less than that for Method I (70 and 150 ms, respectively).
However, the thinking and solving processes of Method 1 is easier than those in Method II; the Hproblem does not need to be transferred as an H∞ optimization problem because it is directly solved with the multi-objective optimization H∞/H-performance index.Compared with the former methods mentioned in the instruction, the torque rate, not the motor control current and the angular velocity, is considered as the fault to generate a residual that is effectively detected.Moreover, the torque rate guarantees the robustness of the method.Further, in the fault detection method, the main factors that affect the detection are disturbance v and noise n.These make the algorithm simple.However, the method is still less appropriate for the actual situation due to the multiple causes for the pinch condition.This is a shortcoming of the proposed method.

Co-simulation results on CANoe-MATLAB:
The CAN bus technology has been widely applied in the pure electric vehicles system at present.We verify the anti-pinch algorithm in realistic window system by using CANoe-MATLB interface connected with MATLB/Simulink which has power modeling functions and CANoe which has perfect functions of bus simulation.
CANoe-MATLAB interface can be operated in two different modes: one is offline mode; the other is Hardware-In-the-Loop (HIL) mode.The whole system simulation process is based on HIL mode as shown in Fig. 13.In HIL mode, CANoe runs as MATLAB/Simulink subsidiary mode.When the time Real-Time Workshop we can target CANoe and produce a Windows DLL which can be loaded in CANoe's simulation environment.One DLL must be generated per node.With this approach it is possible to test and verify a design with real (CAN) hardware in a networked environment.The simulation can be used as a simulation of the remainder of the bus in a real-time environment.Several Electronic Control Units (ECUs) can be simulated simultaneously the remaining bus in real time.The simulation results are as follows.The input is the angular velocity and the output is the residual and residual evaluation.
Figure 14 and 15 shows the results of fault detection in Co-simulation of method I.We can see the results are similar as the MATLAB Simulation results.The residual and residual evaluation changes dramatically under the pinch condition which exceeds the threshold as former results.
Figure 16 and 17 shows the results of fault detection in Co-simulation of method II.The former is the residual signal with no pinch; the latter is the residual signal with pinch detection.The results are similar as the MATLAB Simulation results, which validates the effectiveness of this method.
LMI toolbox in MATLAB, the performance indices are γ 1min = 0.0145, γ 2min = 0.05, β max = 1.4883 and the observer gain is L = [183.5130-1.2970-0.1825]T. Fault detection algorithm based on the reference model: Assume we select the reference residual model is the following form Zhong et al. (2007):

Fig. 2 :
Fig. 2: Reference residual model in fault detection The system is asymptotically stable and satisfies ||T zw (s)|| ∞ , where T zw is the transfer function of w to r.Lemma 3: for system (1), γ>0, if positive definite matrices R and X exist, along with K, M, N, T, Y and Z, to satisfy the following LMI: toolbox in MATLAB, the index, the observer gain and the coefficient matrix of the reference model are obtained: In this study, the fault detection decision logic is based on the residual threshold evaluation.The threshold is initially decided based on the normal states of the window.

Fig. 8 :
Fig. 8: Fault residual signal results indicate that in spite of the disturbance and noise, the proposed algothrim detects the pinched condition relatively fast.Moreover, if the road condition is good, the detection time is more satisfactory.The simulation toolbox is used to build a robust fault diagnosis system model of an anti-pinch window based on Method II, where the input is angular velocity and output is residual signal, as shown in Fig.10.The model is based on the residual generator.

Table 1 :
Nominal value of the motor parameters