## 2 Materials and Methods
### Methodology
#### 2.2.1 Application of the Autocorrelation Function  
First of all, according to the results presented in Figure 2, the autocorrelation function should be applied. In fact, the number of periods of interest for the construction of the past and future matrices was defined by using the autocorrelation function of the root summed squares of all variables in the training dataset in a confidence bound of \(\pm 5\%\)[34]. The purpose of the application of the autocorrelation function was to identify significant time intervals. In fact, the autocorrelation function detects the duration of the period during which a signal is self-correlated. The results of the application of the autocorrelation function are shown in Figure 3.  
By examining Figure 3 and the results obtained from the application of the autocorrelation function, it was possible to observe that the time intervals of interest considered 59 periods. This is the value of \(p\) and \(f\) that was considered in all the implemented tests, starting from the one presented in Table 1.  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **FAR** & **MDR** \\ \hline \(T^{2}\) & 16.5\% & 80\% \\ \(Q\) & **4.5\%** & **3\%** \\ \hline \hline \end{tabular}
\end{table}
Table 1: KPCA results without the proposed methodology.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **TP** & **TN** & **FP** & **FN** \\ \hline \(T^{2}\) & 23 & 481 & 95 & 88 \\ \(Q\) & 108 & 550 & 26 & 3 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Results analysis without the proposed methodology.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Accuracy** & **Precision** & **Sensitivity** \\ \hline \(T^{2}\) & 73.3\% & 19.49\% & 20.7\% \\ \(Q\) & 95.77\% & 80.59\% & 97.29\% \\ \hline \hline \end{tabular}
\end{table}
Table 3: Accuracy, precision, and sensitivity without the proposed methodology.  
2.2.2. Creation of Past and Future Matrices Based on the Results of the Autocorrelation Function  
The calculation of the past and future matrices is used as input for the training phase of the KPCA and then as input for the actual testing and monitoring phase. In this phase, the authors computed both past and future matrices since various tests were subsequently implemented. The tests were necessary to determine whether it was appropriate to only use the past matrices of the datasets for the application of the KPCA or a combination of past and future matrices. The past and future matrices were calculated as presented in the next section of this paper.  
Firstly, two data matrices were generated starting from the measured data \(y_{t}\)\(\in\)\(R^{n}\), with \(n\) representing the process variables and \(t\) representing the sampling time. This is possible by expanding each sampling, including \(p\) past samples and \(f\) future samples. After the definition of these two parameters, which should have the same value, the future and the past sample vectors \(y_{f,t}\)\(\in\)\(R^{fn}\) (2) and \(y_{p,t}\)\(\in\)\(R^{pn}\) (3) were constructed.  
\[y_{f,t}=\left[y_{\ t+1},\ y_{\ t+2},\ \ldots,\ y_{t+f-1}\ \right]^{\mathrm{T}} \tag{2}\]  
\[y_{p,t}=\left[y_{t-1},\ y_{\ t-2},\ \ldots,\ y_{t-p}\ \right]^{\mathrm{T}} \tag{3}\]  
To avoid the influence of variables with bigger absolute values on fault detection, \(y_{f,t}\) and \(y_{p,t}\) were normalized to mean zero vectors \(\hat{y}_{f,t}\) and \(\hat{y}_{p,t}\). The latter at different sampling times were then rearranged to create the future observations matrix \(\hat{Y}_{f}\)\(\in\)\(R^{fnXN}\) (4) and the past observations matrix \(\hat{Y}_{p}\)\(\in\)\(R^{pnXN}\) (5).  
\[\hat{Y}_{f}=\left[\hat{Y}_{f,t+1},\hat{Y}_{f,t+2},\ldots,\hat{Y}_{f,t+N}\right] \tag{4}\]  
\[\hat{Y}_{p}=\left[\hat{Y}_{p,t+1},\hat{Y}_{p,t+2},\ldots,\hat{Y}_{p,t+N}\right] \tag{5}\]  
In (4) and (5) \(N\)\(=\)\(m\)\(-\)\(p\)\(-\)\(f\)\(+\)\(1\), with \(m\) representing the number of total samples in \(y_{t}\)  
Figure 3: Autocorrelation analysis of the training dataset.