## 2 Materials and Methods
### Implementation of Fault Diagnosis  
PCA is a multivariate statistical process control method. It can effectively reduce the dimension of high-dimensional data. Dimensionality reduction is very important to find the inherent laws of high-dimensional data so that more variable indicators can be represented by fewer comprehensive indicators. In geometry, the coordinate system formed by the samples is projected into a new coordinate space through linear combination, and the new coordinate axis represents the direction with the largest variance [20]. The fault diagnosis of the algorithm is realized based on PCA. The three-way sensor of the monitor can be considered as three characteristics.  
The basic theory is that \(\mathfrak{S}\) is assumed to represent a measurement sample containing \(m\) sensors. Each sensor has \(n\) independent sampling data to construct a measurement data matrix, where each column represents a measured variable, and each row represents a sample. Perform covariance decomposition on the data matrix and choose the number of pivots. The following formula is obtained:  
\[\mathfrak{S}\approx\frac{\mathbf{X}^{T}\cdot\mathbf{X}}{n-1}=\mathbf{V}\cdot\mathbf{\Lambda} \cdot\mathbf{V}^{T}=\left[\mathbf{P}\cdot\overline{\mathbf{P}}\right]\cdot\mathbf{\Lambda} \cdot\left[\mathbf{P}\cdot\overline{\mathbf{P}}\right]^{T} \tag{1}\]  
where \(\mathbf{\Lambda}\) is a diagonal matrix, which is also the eigenvalue matrix of \(\mathfrak{S}\), and the elements on its diagonal satisfy \(\lambda_{1}\geq\lambda_{2}\geq\cdots\geq\lambda_{m}\). \(\mathbf{V}\) is the eigenvector matrix of \(\mathfrak{S}\) with the dimension \(m\times m\). \(\mathbf{P}\) is the first column \(A\) of \(\mathbf{V}\), containing the information about all of the pivots. \(\overline{\mathbf{P}}\) is the remaining \(m\)-\(A\) columns of \(\mathbf{V}\), containing the non-pivot information.  
Decompose the original data to obtain the principal subspace and the residual subspace. Therefore, the eigenvalue decomposition of \(\mathbf{X}\) can be decomposed as follows:  
\[\mathbf{X}=\mathbf{X}+\mathbf{E}=\mathbf{T}\cdot\mathbf{P}+\mathbf{E} \tag{2}\]  
Among them, \(\mathbf{T}_{n\times A}=\mathbf{X}_{n\times m}\cdot\mathbf{P}_{m\times A}\) is the main subspace; \(\mathbf{E}=\mathbf{X}-\hat{\mathbf{X}}\) is the residual subspace; \(\hat{\mathbf{X}}=\mathbf{T}\cdot\mathbf{P}^{T}\) is the score matrix; \(\mathbf{P}_{m\times A}\) is the load matrix, which is composed of the first \(A\) eigenvectors of \(\mathbf{S}\).  
\(Q\) statistic: Prediction squared error. That is, the SPE statistic, which indicates the square of the Euclidean distance of the residual space projection vector \(e\) on this space. The calculation method is:  
\[Q=\|e\|^{2} \tag{3}\]  
When the sensor is normal, the value of the \(Q\) statistic should be in a fixed range. Once the sensor fails, the projection of the temperature data at this time in the residual space must be enlarged, causing the calculated value of the Euclidean distance to be higher than the limited range. Its fixed range threshold is \(Q_{a}\), which can be calculated from the last \(n-1\) eigenvalues:  
\[Q_{a}=\theta_{1}\Bigg{[}\frac{c_{a}\sqrt{2\theta_{2}{h_{0}}^{2}}}{\theta_{2}} +1+\frac{\theta_{2}{h_{0}}({h_{0}}-1)}{{\theta_{1}}^{2}}\Bigg{]}^{\frac{1}{{ h_{0}}}} \tag{4}\]  
where  
\[{h_{0}}=1-\frac{2\theta_{1}\theta_{3}}{3\theta_{2}} \tag{5}\]  
\[\theta_{i}=\sum\limits_{j=k+1}^{n}\lambda_{j}^{i},i=1,2,3 \tag{6}\]  
where \(k\) is the main element and \(\lambda_{i}\) is the \(i\)th eigenvalue of the covariance matrix \(R\).  
By setting the confidence level to 90%, analyze whether the projection change of the data in the residual space exceeds the threshold. That is, whether \(Q\) is higher than \(Q_{a}\) in diagnosing whether the sensor is faulty.