1 Introduction

Generally, autonomous vehicles use various environment and internal sensors, such as radar, lidar, camera, GPS, and IMU to obtain information concerning obstacles, pedestrians, and surrounding vehicles, including motorcycles, for their behavior control. However, if the measured signals of the sensors are faulty, such as those pertaining to relative displacement, velocity, and acceleration, fatal road accidents can occur. Therefore, a fault detection and diagnostic algorithm that can be used to avoid fatal accidents needs to be developed and validated for the commercialization of autonomous vehicles. To solve this problem, various studies on the development of such a fail-safe algorithm have been conducted by different research institutions in universities and automobile companies.

Tan et al. (Tan and Edwards 2002) proposed two methods for sensor fault detection and reconstruction using the sliding mode observer and a number of simulation results. Jeong et al. (2015) designed and validated a sensor and actuator fault diagnostic algorithm according to the Kalman filter-based observer using various combinations of sensors, such as steering, yaw rate, and wheel speed. Loureiro et al. (2014) proposed a bond graph model-based fault diagnosis and fault tolerant control algorithm for heavy autonomous vehicles that carry containers. Kim et al. (2016) proposed a model-based fault detection and isolation algorithm for current and position sensors of the individual in-wheel motors of electric vehicles. Garoudja et al. (2017) developed a fault detection and diagnostic algorithm for a photovoltaic system based on a statistical approach. Wang et al. (2017) reviewed and summarized recent research developments on the spectral kurtosis (SK), kurtogram, adaptive SK, and protrugram, as well as corresponding applications in the fault detection and diagnosis of rotating machines. Behere and Torngren (2016) developed a functional reference for autonomous driving. The proposed functionality was described at the logical level and the architectural components are divided into three parts: perception, decision, and control. Jo et al. (2015) proposed a development methodology that enables the design and development of an autonomous car by showing the implementation process intuitively. Sargolzaei et al. (2016) developed a neural network-based fault detection technique that can detect and track fault injection on adaptive cruise control in real time. Zinoune et al. (2015) proposed fault detection, isolation, and adaptation (FDIA) in navigation systems on board passenger vehicles for preventing malfunctions in advanced driving assistance and autonomous driving systems. Stavrou et al. (2016) developed a model-based algorithm for detecting and identifying actuator faults on differential-drive mobile robots in an indoor environment. Davoodi et al. (2017) developed an algorithm for a simultaneous fault detection, isolation, and tracking control scheme using a single dynamic observer. Furthermore, Li et al. (2017) proposed phase space reconstruction and an extreme learning machine based sensor fault diagnosis algorithm for an autonomous underwater vehicle. The performance was evaluated by predicting the sensor output to achieve fault diagnosis.

This paper proposes a probabilistic fault detection and diagnostic algorithm for an acceleration sensor and radar, in order to ensure the safety of the longitudinal control for autonomous vehicles. The algorithm is designed based on measurements such as relative displacement, velocity, and acceleration values. The upper and lower boundaries for the fault detection of the acceleration sensor were derived using the sliding mode observer, based on the longitudinal kinematic model. A driver’s probabilistic longitudinal acceleration distribution derived from actual test data was used for to derive the acceleration limits. Based on the longitudinal kinematic model, the predictive fault diagnostic algorithm was developed to detect and diagnose fault signals in radar sensors. The proposed algorithm was designed to detect and diagnose fault signals, such as an offset fault. This is because fault signals, such as those that hold and turn off the power, can be autonomously detected by the sensor. The stochastic-based quantitative analysis for the fault diagnosis was conducted using the fault index for driving-health monitoring and fault level determination. An overall fail-safe architecture for autonomous vehicles was also proposed in this paper for future research. The performance evaluation of the proposed probabilistic fault detection and diagnostic algorithm was conducted on the MATLAB/SIMULINK environment using the actual driving data of the preceding and subject vehicles. The data was obtained from a radar installed in the front of the subject vehicle. The radar used in this study for front vehicle recognition is the Delphi ESR radar. The scanning rate of the radar is 20 Hz (50 ms). The radar signal is received through the Controller Area Network (CAN) (100 Hz sampling rate) of the test vehicle. In order to obtain relative displacement and velocity between the preceding vehicle and the subject vehicle, the raw data of the radar’s output was converted from polar coordinate values to Cartesian coordinate values since the raw data of the output includes the distance range, angle, and range rate of 64 tracks.

The remaining paper is organized as follows. Section 2 describes the overall fail-safe architecture for autonomous vehicles. Section 3 explains the probabilistic fault diagnostic algorithm and Sect. 4 describes the actual data-based performance evaluation. Finally, concluding remarks are provided in Sect. 5.

2 Overall fail-safe architecture for autonomous vehicles

The proposed fail-safe architecture for autonomous vehicles in this study consists of three components, from a functional perspective: perception, decision, and control. The overall architecture of the fail-safe system for autonomous vehicles is described in Fig. 1.

Fig. 1
figure 1

Overall architecture of the functional perspective-based fail-safe system for autonomous vehicles

Faults are classified into four types: sensor, internal, algorithm, and actuator. Because the algorithm fault is not related to the external fault signal, fault detection and diagnosis cannot be applied to the algorithm fault. In the perception component, unpredictable fault signals in the sensors used were detected and diagnosed by the detection and diagnostic algorithm. Based on the diagnosed fault signals, the fault level was determined in the decision part for the appropriate control action. In the control part, proper control actions, such as emergency braking, ceding control, and emergency stop, were activated based on the determined fault level in order to avoid fatal accidents. In this paper, the fault detection and diagnostic algorithm for perception was proposed as the first stage of the research on the functional perspective fail-safe system for autonomous vehicles. The following section, Sect. 3, describes the fault detection and diagnostic algorithm.

3 Fault detection and diagnostic algorithm for longitudinal safety control

In this study, the driving condition encountered by an autonomous vehicle when following another vehicle (preceding vehicle) was considered because driving while following a vehicle is more dangerous than driving without a preceding vehicle. The driving condition considered in this study is illustrated in Fig. 2.

Fig. 2
figure 2

Driving condition of an autonomous vehicle with a preceding vehicle

The sliding mode observer was used for the probabilistic fault detection by reconstructing the relative acceleration using a longitudinal kinematic model. This model, used for fault detection, is shown in the following equation:

$$\frac{d}{dt}\left[ {\begin{array}{*{20}c} {x_{1} } \\ {x_{2} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} 0 & 1 \\ 0 & 0 \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {x_{1} } \\ {x_{2} } \\ \end{array} } \right] + \left[ {\begin{array}{*{20}c} 0 \\ 1 \\ \end{array} } \right]\left( {a_{p} - a_{s} } \right).$$
(1)

where \(x_{1}\) and \(x_{2}\) are the states, such as relative displacement (indicated as clearance in Fig. 2) and relative velocity, obtained by the front radar, respectively. \(a_{p}\) and \(a_{s}\) represent the accelerations of the preceding vehicle and subject vehicle, respectively. In order to formulate the sliding mode observer, the output (\(y\)) is defined as follows, using the observation matrix, \(C = \left[ {\begin{array}{*{20}c} 1 & 1 \\ \end{array} } \right]\).

$$y = C\left[ {\begin{array}{*{20}c} {x_{1} } \\ {x_{2} } \\ \end{array} } \right]$$
(2)

The observer equation, as defined below, is used for the reconstruction of the relative acceleration in order to derive the upper and lower limits that were used for the acceleration fault detection and diagnosis.

$$\dot{\hat{x}} = A\hat{x} + Gv$$
(3)

where \(x\) represents the state vector, and matrices A and G are identical to the matrices in Eq. (1). \(\hat{x}\) represents the estimated states, and \(v\) is the discontinuous injection term for relative acceleration reconstruction. In order to secure the convergence stability of the sliding mode observer, coordinate transformation was conducted. The equation of the coordinate transformation is as follows.

$$x_{c} = T_{c} x$$
(4)

In the sliding mode observer, the transformation matrix is basically defined using the observation matrix and its null space matrix, as follows.

$$T_{c} = \left[ {\begin{array}{*{20}c} {null(C)} & C \\ \end{array} } \right]^{T}$$
(5)

The transformed state space equation of Eq. (1), using \(T_{c}\) and the partitioned error dynamics, can be derived as follows.

$$\dot{x}_{c} = T_{c} AT_{c}^{ - 1} x_{c} + T_{c} B\left( {a_{p} - a_{s} } \right)$$
(6)
$$\begin{aligned} \dot{e}_{1} = A_{c,11} e_{1} + A_{c,12} e_{y} + G_{c,1} v \hfill \\ \dot{e}_{y} = A_{c,21} e_{1} + A_{c,22} e_{y} + G_{c,2} v \hfill \\ \end{aligned}$$
(7)

where \(x_{c}\) represents the transformed state. The output error, \(e_{y}\), can be placed on the sliding surface, \(S = \left\{ {e_{y} :e_{y} = 0} \right\}\), by defining the discontinuous injection term.

$$v = \rho sign(e_{y} )$$
(8)

In the above, \(\rho\) represents the magnitude of the injection term. Using the defined injection term based on the appropriate \(\rho\), the output error can be converged along the sliding surface by the eta-reachability condition (Shtessel 2014). Because the output error can converge to zero, the equivalent output injection term can be derived using Eq. (7) as follows.

$$v_{eq} = - G_{c,2}^{ - 1} A_{c,21} e_{1}$$
(9)

In order to check the stability of the error term, \(e_{1}\), the eigen value of the element (1,1) of the partitioned system matrix \(T_{c} AT_{c}^{ - 1}\) in Eq. (6) is computed as shown below.

$$A_{c,11} - G_{c,1} G_{c,2} A_{c,21} = - 1$$
(10)

The quantity of the element (1,1) of the system matrix \(T_{c} AT_{c}^{ - 1}\) always has a value of − 1, indicating that the error dynamics for the state estimation are definitely stable. Based on the designed sliding mode observer, the performance evaluation for the reconstruction of the relative acceleration was conducted using actual driving data Li et al. (2017). Figures 3 and 4 show the evaluation results of the relative acceleration reconstruction using actual driving data. It can be seen that the errors for the state and output estimations have converged to zero in finite time.

Fig. 3
figure 3

Evaluation results for relative acceleration reconstruction based on actual driving data (case 1)

Fig. 4
figure 4

Evaluation results for relative acceleration reconstruction based on the actual driving data (case 2)

Fig. 5
figure 5

Probability distribution of the longitudinal acceleration derived from actual driving data

The sliding mode observer algorithm constructed in this study uses the final output data of the radar for reconstruction because the effect of the radar’s sensing delay is negligible. Although the effect of the radar’s sensing delay is not considered at this research stage, optimization of the algorithm by considering the sensing delay is considered as a future work. In order to derive the upper and lower limits of acceleration for fault detection, the longitudinal acceleration of the subject vehicle was computed using the following equation.

$$a_{s} = a_{p} - a_{rel,r}$$
(11)

where \(a_{rel,r}\) is the acceleration value, reconstructed based on the designed sliding mode observer. In this study, the probabilistic longitudinal acceleration distribution was derived from the actual driving data of the acceleration of the preceding vehicle because this acceleration cannot be obtained without a vehicle-to-vehicle (V2 V) communication system or estimation algorithm. However, the preceding vehicle’s longitudinal acceleration can be estimated using relative velocity and displacement with the assumption that there are no fault signals in relative values. Therefore, the actual driving data is based on urban driving conditions, and 16 sets of driving data were used for the derivation of the distribution at this research stage. The experiments for data measurement were conducted under a relatively low traffic congestion condition and various speed conditions (0–25 m/s). Table 1 summarizes these actual driving data.

Table 1 Driving data used for acceleration distribution

Based on the analyzed acceleration data, it was found that the average and standard deviations of the entire acceleration data are 0.0728 and 0.6698 m/s2, respectively. Using Eq. (11) and the derived information from the acceleration distribution, the upper and lower limits for fault detection can be computed using the following equations.

$$a_{s,upper} = a_{p, + 3\sigma } - a_{rel,r}$$
(12)
$$a_{s,lower} = a_{p, - 3\sigma } - a_{rel,r}$$
(13)

The upper and lower limits were computed using three standard deviations (\(\sigma\)) that represent 99.7% of the sample population. If the longitudinal acceleration measured by the internal sensor of the autonomous vehicle is a value between the upper and lower limits, the algorithm decides that there is no fault in the acceleration sensor. However, if the measured value is outside the bounds of the computed limits, the algorithm decides that there is a fault in the acceleration sensor. Figures 6 and 7 describe the fault detection results based on the actual driving data.

Fig. 6
figure 6

Acceleration limits: normal driving (case 1, with \(3\sigma\))

Fig. 7
figure 7

Acceleration limits: normal driving (case 2, with \(3\sigma\))

As can be observed in Figs. 5 and 6, the measured vehicle acceleration always has a value between the upper and lower limits because there are no fault signals in the acceleration sensor. In this study, the predictive fault detection and diagnostic algorithm for measurements of the relative displacement and velocity were proposed based on the longitudinal kinematic model and measured vehicle acceleration. The proposed algorithm is based on the relative displacement and velocity, both of which can be predicted using the measured acceleration. Moreover, the equation for prediction can be derived from the longitudinal kinematic model, as follows.

$$\left[ {\begin{array}{*{20}c} {x_{1} \left( {k + 1} \right)} \\ {x_{2} \left( {k + 1} \right)} \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} 1 & {\Delta t} \\ 0 & 1 \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {x_{1} \left( k \right)} \\ {x_{2} \left( k \right)} \\ \end{array} } \right] + \left[ {\begin{array}{*{20}c} 0 \\ {\Delta t} \\ \end{array} } \right]\left( {a_{p} - a_{s} } \right)$$
(14)

where \(\Delta t\) is the discretization time for the state prediction. Because the longitudinal acceleration of the preceding vehicle cannot be obtained exactly without V2 V communication, the statistically derived acceleration distribution was used for the computation of the predicted state of the upper and lower limits. Using the state vector, the predicted state can be written as follows (\(x\)).

$$x(N) = A^{N} x(0) + \sum\limits_{i = 1}^{N} {A^{N - i} Bu(i - 1)}$$
(15)

where \(N\) represents the prediction step; A and B represent the system and input matrices in Eq. (14), respectively; \(x(0)\) and \(u\) represent the current state vector and input, defined as \(a_{p} - a_{s}\), respectively. The fault detection and diagnosis were conducted by comparing the measured displacement with the relative displacement, and the relative velocity with the predicted states, based on Eq. (15). The measured data were compared with the predicted states, which represent the current state in the stored data. Figure 8 shows the predicted and stored states for comparison with the measured states.

Fig. 8
figure 8

Predicted and stored states for comparison with the measured states

The limits of the states for fault detection were computed using the derived acceleration distribution. When the measured states have values between the predicted upper and lower limits, the detection algorithm decides that there is no fault. However, if one or more results of the measured states have values outside the predicted limits, the detection algorithm decides that there are unexpected fault signals in the measured states. Figure 9 describes the concept of the fault detection for relative displacement and relative velocity.

Fig. 9
figure 9

Fault detection concepts for relative values

In order to diagnose the fault in the radar, an index that represents the fault ratio was proposed in this study. The proposed fault ratio is a ratio with respect to the stored and predicted states. Specifically, the fault ratio can be computed using the following equation.

$$R_{f} = \frac{{N_{f} }}{N}$$
(16)

where \(N_{f}\) represents the number of faults diagnosed by the predictive algorithm. Figure 10 describes the concept of the fault ratio proposed in this study.

Fig. 10
figure 10

Fault ratio concept

Based on the proposed fault detection and diagnostic algorithms, the following section describes the actual human driving data-based performance evaluation with rational fault signals.

4 Actual data-based performance evaluation

In order to conduct a rational performance evaluation, actual driving data were used. The actual data were obtained by the long range radar installed in front of the automated vehicle and acceleration sensor. Additionally, reasonable fault signals, such as step, hold, and zero, were applied to the data for performance evaluation. All of the simulations were conducted using the actual driving data. Figure 11 describes the model schematics for the performance evaluation.

Fig. 11
figure 11

Model schematics for performance evaluation

It was found that the sliding mode observer can reconstruct the relative acceleration well despite the unpredictable fault signals for the upper and lower limits of the acceleration. Moreover, the applied faults, such as the offset signal, can be detected and diagnosed using the proposed detection and diagnostic algorithm. Figures 1217 show the results of the performance evaluation. x1 and x2 represent the state variables used in Eq. (14) such as relative displacement and velocity between preceding vehicle and subject vehicle. The abscissa (predicted state) and the ordinate (t [s]) in (d) and (e) of Figs. 12, 13, 14, 15, 16, 17 represent the predicted time state (20 steps) and actual time flow, respectively.

Fig. 12
figure 12

Fault diagnosis results in the case of faults in relative values: case 1, offset fault signal

Fig. 13
figure 13

Fault diagnosis results in the case of faults in acceleration: case 1, offset fault signal

Fig. 14
figure 14

Fault diagnosis results in the case of faults in relative values: case 2, offset fault signal

Fig. 15
figure 15

Fault diagnosis results in the case of faults in acceleration: case 2, offset fault signal

Fig. 16
figure 16

Fault diagnosis results in the case of faults in relative values: case 3, offset fault signal

Fig. 17
figure 17

Fault diagnosis results in the case of faults in acceleration: case 3, offset fault signal

The evaluation results of the proposed algorithm demonstrated its positive performance in fault detection and diagnosis under various driving conditions. Three actual driving data were used for the performance evaluation, and offset fault signals were applied to the states (x1 and x2) and acceleration values. The applied fault was detected based on the predictive algorithm, and the fault index was computed for fault diagnosis. The computed fault indices showed reasonable fault diagnosis results. In the case of state x2, the applied fault was not well detected because the \(3\sigma\)-value was used for the state prediction. However, it was shown that state x1 was relatively well detected because x1 represents the integral result of state x1. Additionally, the acceleration faults were well detected based on the reconstructed upper and lower limits of the acceleration. As can be seen in Figs. 13, 15, and 17, the acceleration can be detected only if the magnitude of the applied fault is larger than the magnitude of \(3\sigma\). The following section provides the conclusion derived from this study and a discussion on future studies.

5 Conclusion

This paper described the proposed functional perspective-based probabilistic fault detection and diagnostic algorithm using a longitudinal kinematic model. The sliding mode observer was used to reconstruct the relative acceleration based on the relative displacement and relative velocity measured by radar. The reconstructed relative acceleration was used to compute the upper and lower limits of the longitudinal acceleration with the probabilistic distribution of the acceleration. In order to derive the acceleration distribution, 16 sets of actual driving data were analyzed and used to evaluate the performance of the proposed fault diagnostic algorithm. Moreover, the stochastic predictive algorithm for fault diagnosis was developed for the relative values obtained by radar. Based on the predictive diagnostic algorithm, an index that can represent the fault ratio quantitatively was proposed for the quantitative evaluation of the fault diagnosis. A rational performance evaluation under various driving conditions using actual driving data was conducted in the MATLAB/SIMULINK environment. The results showed that the proposed fault detection and diagnostic algorithm can detect and diagnose the applied fault reasonably and quantitatively. Accordingly, it is expected that the developed fault detection and diagnostic algorithm in this study can be used for the perception function in the fail-safe system of autonomous vehicles. However, because the longitudinal acceleration of the preceding vehicle used for detection and diagnosis is based on a probabilistic distribution from actual driving data, the proposed fault detection algorithm in this study is not optimized. Therefore, the application of the V2 V communication for optimizing fault detection and diagnosis is considered as a future work. Other future work considered is the optimization of the developed fault detection and diagnostic algorithm by considering the effect of sensing delay of radar used in the study.