## 3 Proposed Fault Diagnosis Method
### Diagnostic Model Based on Principal Component Analysis  
Based on PCA, the idea of fault separation is to build two spatial models through a large number of normal offline data, and then detect the detected data, separate the correct data and fault data separately. In measuring the normal data, we usually use the Squared prediction error \((SPE)\) and [PERSON]'s \(T^{2}\) (hereinafter referred to as statistics \(T^{2}\)) to identify whether there is an abnormality [27]. The \(SPE\) indicator measures the variation of the sample vector in the residual space projection:  
\[SPE=\left\|(I-PP^{T})x\right\|^{2}\leq\delta_{\alpha}^{2}. \tag{10}\]  
In Formula (10), \(\delta_{\alpha}^{2}\) represents the control limit when the confidence level is \(\alpha\), the calculation formula is as follows: \(\delta_{\alpha}^{2}=g\chi_{j;\alpha}^{2}\), \(g=\frac{\theta_{\alpha}}{\theta_{1}}\), \(h=\frac{\theta_{\alpha}^{2}}{\theta_{2}^{2}}h_{0}=1-2\frac{\theta_{1}\theta_{2 }}{3\theta_{1}^{2}}\), \(\theta_{i}=\sum\limits_{j=A+1}^{m}\lambda_{j}^{i}(i=1,2,3)\). \(\chi_{j;\alpha}\) is the distribution critical value of degree of freedom \(h\) and confidence \(\alpha\). The occurrence of faults is reflected in the statistical index exceeding the statistical control limit, and the change of correlation between data are reflected in the change of SPE value. Fault detection based on SPE is shown in Figure 3. \(\delta\) is the radius of control domain, the red dot represents the data point, and the distance from the data point to the \(\beta\)-axis is SPE of residual space. If this distance is maintained in a controllable domain, it indicates that no fault occurs, and, if the data point falls outside the domain, it is considered that a fault occurs. \(T^{2}\) statistics measure the change of variables in the principal element space:  
\[T^{2}=x^{T}P\Lambda^{-1}P^{T}x\leq T_{\alpha}^{2}. \tag{11}\]  
Figure 2: Projection of data on principal and residual subspaces. In Formula (11), \(\Lambda=diag\left\{\lambda_{1},...,\lambda_{A}\right\}\), \(T_{\alpha}^{2}\) represents the \(T^{2}\) control limit when the confidence degree is \(\alpha\). Although both SPE and \(T^{2}\) indicators are used for process fault detection, it is important to point out that the two indicators are complementary. The SPE indicator measures the degree of correlation change between normal process variables and shows abnormal process conditions. The \(T^{2}\) indicator measures the distance of an existing sample from the origin of the principal subspace. Since the principal subspace contains most of the change in the signal when the process is normal, and the residual subspace mainly represents noise, the control limit defined by \(T^{2}\) is usually much larger than that defined by SPE [28]. Therefore, smaller faults easily exceed the control limits of the SPE. If the \(T^{2}\) indicator of a sample exceeds the control limit, its SPE indicator does not exceed its control limit, that is, it does not destroy the relationship between variables. This situation may be a fault, or the process scope may change. After the completion of the fault data detection, the need to separate the variable that caused the fault. In the process of fault diagnosis of a traffic detector, it is most likely to find out which sensor occurs when the data anomaly is found. The fault separation method used in this paper is a fault separation method based on the SPE contribution graph. The calculation method is as follows [28]:  
\[SPE=\left\|\widetilde{C}x\right\|^{2}=\sum_{i=1}^{m}Cont_{i}^{SPE}. \tag{12}\]  
In Formula (12), \(Cont_{i}^{SPE}=\left(\widetilde{c}_{i}^{T}\widetilde{C}x\right)^{2}\), \(Cont_{i}^{SPE}\) represents the contribution value of each variable to the statistic \(SPE\) for the data matrix \(X\) to be picked up. \(\widetilde{C}=I-PP^{T}\), \(\zeta_{i}\) represents the \(i-th\) column of the identity matrix \(I_{m}\). Figure 3 shows the geometric schematic of fault detection based on SPE index.