## 2 Grounding Grid Boundary Voltage Calculation  
Electrical impedance tomography (EIT) has the advantages of being non-invasive, simple in structure, easy to operate and low in cost. The forward problem to be solved is the boundary voltage under a known conductivity distribution. In this paper, the finite element method (FEM) is used to decompose the grounding grid detection area into multiple grid elements and discretize them into triangular units. Taking the grounding grid model \(3\times 3\) as an example, the total calculation area is an area of 18 m \(\times\) 18 m, including the grounding grid and the surrounding soil area. The cross-sectional area of each branch is 0.5 m \(\times\) 0.05 m, the length is 5 m and the distance between adjacent nodes is 4 m. In order to ensure accurate simulation of the grounding grid, the calculation area is discretized into 31,757 triangular elements with a minimum element size of 0.01288 m\({}^{2}\). The mesh is finer at the nodes and around the electrode area to better capture the potential distribution. The mesh diagram after segmentation is shown in Figure 1. The node coordinate information of the triangle is then used to solve the interpolation point of the function. Finally, the linear expression is solved through the equivalent variation theory. In a two-dimensional quasi-static field, the boundary problem of the grounding grid field can be equivalent to a variational problem. The total area \(S\) of the field is converted into the sum of the areas of the subdivided triangular units, and the boundary problem can be written as follows:  
\[ \begin{array}{l}F(\phi)=\int_{s}\frac{1}{2}\sigma\Bigg{[}\bigg{(}\frac{ \partial\phi}{\partial x}\bigg{)}^{2}+\bigg{(}\frac{\partial\phi}{\partial y }\bigg{)}^{2}\Bigg{]}dxdy\\ =\sum\limits_{n=1}^{n_{0}}\int_{s_{n}}\frac{1}{2}\sigma\Bigg{[}\bigg{(}\frac{ \partial\phi_{n}}{\partial x}\bigg{)}^{2}+\bigg{(}\frac{\partial\phi_{n}}{ \partial y}\bigg{)}^{2}\Bigg{]}dxdy\end{array}  \tag{1}\]  
Figure 1: Schematic diagram of grounding grid model segmentation. Among them, \(\sigma\) represents the conductivity, \(\phi\) represents the potential distribution in the electric field, \(n_{0}\) represents the total number of segmented units and \(s_{n}\) represents the area of the nth segmented unit. By solving the unit coefficient matrix, all unit coefficient matrices are merged into the total coefficient matrix \(K\)[22]. The linear finite element equations of the measured area can be expressed as follows:  
\[K\phi=0 \tag{2}\]  
Assume that the current injected into and out of the grounding grid is \(I\), and the nodes correspond to the m and n nodes of the finite element model, respectively, while other nodes are not processed. To establish a reference potential, a node is chosen as the ground node and its potential is set to 0. At this time, the above equation can be written as follows:  
\[ \begin{bmatrix}K_{11}&K_{12}&\cdots&0&\cdots&K_{1N}\\ K_{21}&K_{22}&\cdots&0&\cdots&K_{2N}\\ \vdots&\vdots&&\vdots&&\vdots\\ K_{m1}&K_{m2}&\cdots&0&\cdots&K_{mN}\\ \vdots&\vdots&&\vdots&&\vdots\\ K_{m1}&K_{m2}&\cdots&0&\cdots&K_{mN}\\ \vdots&\vdots&&\vdots&&\vdots\\ K_{11}&K_{12}&\cdots&1&\cdots&K_{lN}\\ \vdots&\vdots&&\vdots&&\vdots\\ K_{N1}&K_{N2}&\cdots&0&\cdots&K_{NN}\\ \end{bmatrix}\begin{bmatrix}\phi_{1}\\ \phi_{2}\\ \phi_{m}\\ \phi_{n}\\ \phi_{n}\\ \phi_{l}\\ \phi_{n}\\ \phi_{l}\\ \phi_{l}\\ \vdots\\ \phi_{N}\\ \end{bmatrix} = \begin{bmatrix}0\\ 0\\ \vdots\\ I\\ \vdots\\ -I\\ \vdots\\ 0\\ \vdots\\ \vdots\\ 0\\ \end{bmatrix}  \tag{3}\]  
Then, the Gaussian elimination method is used to calculate the node potential of the subdivided unit \(U(\rho)=[\phi_{1}\phi_{2}\ldots\ldots\phi_{N}]\). Based on the finite element method, this paper uses COMSOL Multiphysics 6.1 and MATLAB R2024a software to jointly simulate and establish a simulation model of \(3\times 3\) and \(2\times 3\) grounding grids with different corrosion positions, numbers and corrosion degrees.