## 3 Signal Processing Methods
### Proposed Multivariate Singular Spectral Analysis (MSSA) Filter  
The scan signals of the Hall sensor array are considered as multivariate signals. Let \(\mathbf{V}(p,L)\) having a size of \(P\times L\) denotes for the 2D scanned magnetic matrix of the Hall sensor array; where \(P\) is the number of Hall sensors, \(L\) is the scan length indexes. The MSSA process has four steps, as shown in the block diagram of Figure 2.  
_Step 1--Embedding_: Each signal of a Hall sensor \(V_{d}\) is constructed into a trajectory matrix \(\mathbf{E_{p}}\) (embedding matrix) by sliding and stacking, as expressed in Equation (10); where the sliding window has a length of \(N\) and the stacking has a length of \(M\) that satisfied a condition: \(M=L{-}M+1\)[17]. The length of sliding window \(N\) should be chosen, such that it contains as much information of multiple corrosion as possible, but sufficient resolution (number of eigenvalues) for separation of noise and  
Figure 2: Block diagram of the multivariate singular spectral analysis (MSSA) algorithm.  
corrosion signal. The embedding matrixes of all the Hall sensor signals are stacked to build a full embedding matrix \(\mathbf{E}\), as expressed in Equation (11).  
\[E_{p}=\left[\begin{array}{cccc}V_{p}(1)&V_{p}(2)&\cdots&V_{p}(N)\\ V_{p}(2)&V_{p}(3)&\cdots&V_{p}(N+1)\\ \vdots&\vdots&\vdots&\vdots\\ V_{p}(M)&V_{p}(M+1)&\cdots&V_{p}(L)\end{array}\right] \tag{10}\]  
\[\mathbf{E}=\left[\mathbf{E}_{1},\mathbf{E}_{2},\ldots,\mathbf{E}_{p}\right] \tag{11}\]  
_Step 2--Decomposition_: The embedding matrix \(\mathbf{E}\) could be decomposed into subspace matrixes by the singular vector decomposition (SVD) method. The idea is to project the embedding matrix \(\mathbf{E}\) into the orthogonal eigenvectors. The eigenvectors could be found by the SVD method on the covariance matrix \(\mathbf{C}\) of the embedding matrix \(\mathbf{E}\). The covariance matrix \(\mathbf{C}\) is computed as Equation (12) and the SVD decomposition is expressed in Equation (13); where columns in \(\mathbf{U}\) and \(\mathbf{V}\) are called left and right eigenvector; the diagonal of matrix \(\mathbf{S}\) is the eigenvalues (\(\lambda_{i}\), \(1\leq i\leq M\)), which are sorted in descending order. The higher eigenvalue represents a higher intensity of the Hall sensor array signal. The embedding matrix \(\mathbf{E}\) is then decomposed into subspace matrixes, as expressed in Equation (14).  
\[\mathbf{C}=\frac{1}{\textbf{PN}}\mathbf{E}\mathbf{E}^{\textbf{T}} \tag{12}\]  
\[\mathbf{C}=\textbf{U}\textbf{S}\textbf{V}^{\textbf{T}} \tag{13}\]  
\[\mathbf{E}=\mathbf{E}_{1}+\mathbf{E}_{2}+\cdots+\mathbf{E}_{\textbf{M}} \tag{14}\]  
_Step 3--Reconstruction_: The subspace matrix \(\mathbf{E}^{i}\) (\(1\leq i\leq M\)) in Equation (14) could be used to reconstruct the input signal by diagonal averaging the elements. Assume \(M^{*}=\text{min}\) (\(M\), \(N\)), \(N^{*}=\text{max}\) (\(M\), \(N\)) and \(\textbf{H}_{p}^{i}\) (\(1\leq p\leq P\)) is a submatrix of \(\mathbf{E}^  
and \(w_{i}=min\{i,M,L-i+1\}\). The lower value of w-correlation means the two series are easier to be separated because they have low correlation.  
\[\mathbf{W}=\frac{(\mathbf{X},\mathbf{Y})_{w}}{\|\mathbf{X}_{w}\|\|\mathbf{Y}_{w}\|} \tag{16}\]