## 3 Incipient Fault Detection Method Based on LOPV and KL Divergence
### The Complete Incipient Fault Detection Process  
The complete incipient fault detection method based on LOPV and KL divergence consists of two parts: the preprocessing process and the monitoring process:  
Figure 2: The idea of hypothesis testing to detect incipient faults for each \(Y_{k}\).  
**The preprocessing process:**  
1. \(Z\)-score normalization is performed on the normal data matrix \(X\) to obtain \(\overline{X}\).
2. The reference mean vector \(\mu_{x}\) and the reference covariance matrix \(\Sigma_{x}\) for the normal data matrix \(\overline{X}\) are calculated.
3. PCA is performed on the normal matrix \(\overline{X}\) and the matrix \(V\) of all \(m\) PVs is retained.
4. Data matrices \(\overline{X}_{1},\cdots,\overline{X}_{i},\cdots,\overline{X}_{r}(\overline{ X}_{i}\in\overline{X},i\in[1,r])\) are extracted from the normal matrix \(\overline{X}\) using sliding windows with the length of \(n_{1}\). The mean vector\(\mu_{Xi}\) and the covariance matrix \(\Sigma_{Xi}\) for each \(\overline{X}_{i}\) are calculated and stored.  
**The monitoring process:**  
1. The on \(-\) line data matrix \(Y_{k}\) is extracted using a sliding window with the length of \(n_{1}\).
2. \(Z-\) score normalization is performed on the on \(-\) line data matrix \(Y_{k}\) to obtain \(\overline{Y}_{k}\).
3. The mean vector\(\mu_{Yk}\) and the covariance matrix \(\Sigma_{Yk}\) of the matrix \(\overline{Y}_{k}\) are calculated.
4. The vector of mean drift \(\Delta\mu_{Yk}/\|\Delta\mu_{Yk}\|\)between \(\overline{Y}_{k}\)and\(\overline{X}\) secalculated.
5. Equation (18) is used to find the initial vector of the iteration of the optimization problem \(w_{0}\).
6. The optimization problem in Equation (16) is solved to obtain the local optimum PV \(w_{k}\) of the online data matrix \(\overline{Y}_{k}\).
7. Equation (13) and Equation (14) are used to obtain the vector \(h_{X}(w_{k})\).
8. The fault detection threshold \(\varepsilon_{k}\) is determined using Equation (19).
9. The KL divergence \(h(w_{k})\) of\(\overline{X}\) and \(\overline{Y}_{k}\) after being projected on the local optimum PV \(w_{k}\) is calculated by using Equation (13).
10. If \(h(w_{k})>\varepsilon_{k}\) was, then assuming that \(Y_{k}\) is faulty is correct. Otherwise, \(Y_{k}\) is normal. Let \(k=k+1\), the next sliding window \(Y_{k+1}\) will be tested from steps 1 to 10.  
It should be noted that the above incipient fault detection method based on LOPV and KL divergence is suitable for systems with high requirements for incipient fault detection and sufficient computational resources. When the system has insufficient computational resources, the sliding window interval can be increased to reduce the frequency of solving the optimization problem. For example, the optimization problem can be solved every hour or daily. The LOPV obtained by solving the optimization problem can be added to the matrix \(V\) which contains \(m\) PVs obtained by the PCA method, \(V=V\cup LOPV\). Then, the new \(V\) that contains \(m+1\) PVs is used to detect incipient faults.  
Another method to reduce the computational requirements is to set detection thresholds lower for existing fault detection methods based on PCA and KL divergence, so that the optimization problem is solved when a sliding window of on-line data exceeds the detection threshold of one PV. Then, \(V=V\cup LOPV\), increase the detection thresholds and use the new \(V\) to detect faults. Users can flexibly select the sliding window interval or detection thresholds based on actual monitoring needs and resource constraints.