## 3 Adaptive Thresholds for Robust Fault Detection
### Residual Evaluation
#### 3.3.1 A Normality Model  
The aim of the normality model is to acquire a priori knowledge about normal data and anomalies from data obtained within a certain time under the normal operation, in order for our decision based on a priori knowledge to be applied in detecting faults for time-series data. As mentioned above, the data of the normal operation is assumed to be in the normal state and we do not have any knowledge about the magnitude or timing of the fault and anomaly occurrence. For this reason, we focus on identifying the peculiarity inherent in the normal data statistically in order to classify the data into two regions for the normal and anomalous data. To identify two regions, we apply a temporary identifier, namely a reference point, and define that the residual is in the anomalous region if the residual within the given time-window is larger than a given reference point. It means that the system can basically agree to accept the residual as normal data under the condition where the residual has the value lower than a given particular reference point within the evaluation interval. Hence, the region with the normal data is only dependent on the given reference point. In addition, to distinguish between soft and transient faults in the anomalous region, we investigate a cumulative frequency (anomaly occurrence) by histogram analysis which is a useful tool to extract a frequency pattern from the incoming residuals in the normal state. To achieve the maximum the flexibility of the normality model, it is assumed that the system agrees to tolerate many soft faults as much as possible in the anomalous regions. Such flexibility represents the maximum limit allowed for soft fault occurrences while driving on the real road. In this regard, the normality model is designed with the worst case analysis and the upper boundaries for soft faults are examined using all of the reference points. In order to define the best-fit normal region at each velocity, we start by examining the number of occurrences of the anomalous data for all residuals. The residuals yielded from the residual generation as a function of time after driving at a certain velocity of Jackal. Given the \(m\) time-series data (residuals) and the \(n\) time-windows, the number of the residuals, denoted as \(\sigma\), is counted whenever the given residual meets the reference point, \(\rho_{(\rho\in\mathbb{R})}\). A subset of time-series data is the time window which is  
Figure 3: Comparison between the estimated and real variables. equal in size, and a set of the time windows is denoted as \(W\). The \(\rho\) is any value in the region where the residual exists, and increases by the offset (\(\psi\)) gradually up to \(\chi_{(\chi\in\mathbb{R})}\) which is the maximum value in the residual region. In this paper, 0.02 is set for the offset increase (\(\psi\)) of the reference point. \(B_{\rho}\) consists of the cumulative frequency of the residual, denoted as \(\sigma_{i}\), that goes beyond the given reference point \(\rho\) for each time window \(i_{(i\in W,\ |W|=n)}\). For all time windows at each reference point, we get \(n\) cumulative frequencies which could be used to classify the anomalous region into transient and soft faults in the residual evaluation. A large cumulative frequency means that there are a large number of soft faults in the defined anomalous region. Among the \(n\) anomalous regions determined by each reference point for all time windows, the worst case analysis is performed by selecting the value representing the maximum quantity of soft faults in the anomalous region. The maximum value \(\sigma_{u(u\in W)}\) of \(B_{\rho}\) indicates the upper boundary at the given reference point. This process is conducted repeatedly until the \(\rho\) reaches the maximum value (\(\chi\)) of it. At each operation \(\
u\), a set of upper boundaries for all reference points, denoted as \(\Phi_{\
u}\), is given by:  
\[