## 3 Anomaly Detection Process for Battery Cells
### Seening and Identification  
By only retaining \(\sigma_{1}\) in matrix \(\Sigma\), a reconstructed matrix \(D^{{}^{\prime}}\) that contains the most significant information can be obtained. The low-rank matrix derived from the RPCA decomposes matrix \(D^{{}^{\prime}}\), separating all noise and outliers. Normal measurement errors within the data, collected by sensors when suffering from random noise pollution, are assigned lower weights and rankings in matrix \(\Sigma\). In order to eliminate the impact of sensor measurement errors and obtain as much abnormal components as possible in the data matrix composed of battery cell voltages, the singular values \(\sigma_{2}\sim\sigma_{5}\) in \(\Sigma\) are retained while setting the others to 0, resulting in a new singular value matrix \(\Sigma^{{}^{\prime}}\), as shown in Equation (11).  
\[\mathbf{\Sigma}^{\"}=\begin{bmatrix}0&0&0&0&0&\cdots&0\\ 0&\sigma_{2}&0&0&0&\cdots&0\\ 0&0&\sigma_{3}&0&0&\cdots&0\\ 0&0&0&\sigma_{4}&0&\cdots&0\\ 0&0&0&0&\sigma_{5}&\cdots&0\\ \vdots&\vdots&\vdots&\vdots&\vdots&\ddots&\vdots\\ 0&0&0&0&\cdots&0\end{bmatrix} \tag{11}\]  
The reconstructed matrix \(\mathbf{D}^{\"}\) is given by Equation (12).  
\[\mathbf{D}^{\"}=\mathbf{U}\mathbf{\Sigma}^{\"}\mathbf{V}^{T} \tag{12}\]  
Then, the RPCA is used to decompose the matrix \(\mathbf{D}^{\"}\) into a low-rank matrix \(\mathbf{A}^{\"}\) and a sparse matrix \(\mathbf{E}^{\"}\), as shown in Equation (13).  
\[\mathbf{D}^{\"}=\mathbf{A}^{\"}+\mathbf{E}^{\"} \tag{13}\]  
Here, \(\mathbf{D}^{\"}\) contains outliers and a small amount of noise in the matrix \(\mathbf{A}\).  
The average deviation is the average of the absolute values of the deviations of each item from their arithmetic mean in a series. When the sample is a set of curves, the fluctuation of a curve can be evaluated by calculating the average distance of each point between the curve and their average curve. The average deviation is commonly represented as \(A.D.\), given by Equation (14).  
\[A.D.=\frac{\sum\lvert X-\overline{X}\rvert}{n} \tag{14}\]  
Here, \(X\) represents the sample points on the curve, \(\overline{X}\) represents the points on the average curve, and \(n\) is the number of sample points.  
The differences among cell voltages are caused by two reasons: systematic reasons and random errors. If the cell voltages are only influenced by random errors, the statistical distribution should obey the Gaussian distribution. Therefore, the average deviation of battery cell voltages in matrix \(\mathbf{A}^{\"}\) can be considered as the Gaussian distribution, as shown in Equation (15).  
\[N(\mu,\sigma)=\frac{1}{\sqrt{2\pi\sigma}}\exp\left(-\frac{\left(A.D._{i}-\mu \right)^{2}}{2\sigma^{2}}\right) \tag{15}\]  
Here, \(i=1,2,3,\ldots\), represents the \(i\)-th battery cell, \(\mu\) is the mean, and \(\sigma\) is the variance.  
Then, the \(3\sigma\) principle is used as the threshold to screen abnormal battery cells, as shown in Equation (16).  
\[\left\{\begin{array}{l}A.D._{i}\in[\mu-3\sigma,\mu+3\sigma],\text{ normal}\\ A.D._{i}\in(-\infty,\mu-3\sigma),(\mu+3\sigma+\infty),\text{ abnormal}\end{array}\right. \tag{16}\]  
When \(A.D._{i}\) is within the \(3\sigma\) range, the battery cell is considered normal; when \(A.D._{i}\) is outside the \(3\sigma\) range, the battery cell is considered abnormal. Finally, on the basis of the threshold, the serial numbers of the abnormal battery cells can be identified.