Next Article in Journal
Algorithm and Methods for Analyzing Power Consumption Behavior of Industrial Enterprises Considering Process Characteristics
Previous Article in Journal
AI-Enhanced Design and Application of High School Geography Field Studies in China: A Case Study of the Yellow (Bohai) Sea Migratory Bird Habitat Curriculum
Previous Article in Special Issue
A Multi-Objective Path-Planning Approach for Multi-Scenario Urban Mobility Needs
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Grounding Grid Electrical Impedance Imaging Method Based on an Improved Conditional Generative Adversarial Network

State Grid Sichuan Electric Power Research Institute, Chengdu 610041, China
*
Author to whom correspondence should be addressed.
Algorithms 2025, 18(1), 48; https://doi.org/10.3390/a18010048
Submission received: 5 December 2024 / Revised: 6 January 2025 / Accepted: 8 January 2025 / Published: 15 January 2025

Abstract

:
The grounding grid is an important piece of equipment to ensure the safety of a power system, and thus research detecting on its corrosion status is of great significance. Electrical impedance tomography (EIT) is an effective method for grounding grid corrosion imaging. However, the inverse process of image reconstruction has pathological solutions, which lead to unstable imaging results. This paper proposes a grounding grid electrical impedance imaging method based on an improved conditional generative adversarial network (CGAN), aiming to improve imaging precision and accuracy. Its generator combines a preprocessing module and a U-Net model with a convolutional block attention module (CBAM). The discriminator adopts a PatchGAN structure. First, a grounding grid forward problem model was built to calculate the boundary voltage. Then, the image was initialized through the preprocessing module, and the important features of ground grid corrosion were extracted again through the encoder module, decoder module and attention module. Finally, the generator and discriminator continuously optimized the objective function and conducted adversarial training to achieve ground grid electrical impedance imaging. Imaging was performed on grounding grids with different corrosion conditions. The results showed a final average peak signal-to-noise ratio of 20.04. The average structural similarity was 0.901. The accuracy of corrosion position judgment was 94.3%. The error of corrosion degree judgment was 9.8%. This method effectively improves the pathological problem of grounding grid imaging and improves the precision and accuracy, with certain noise resistance and universality.

Graphical Abstract

1. Introduction

Due to lightning, equipment failure and other problems, abnormal currents in substations may increase rapidly. At such times, the buried grounding grid provides a discharge channel for those abnormal currents. At the same time, the grounding grid also serves as a common grounding point for primary and secondary equipment in the substation to ensure the safety of the equipment [1]. In high-voltage substations and power systems, most of the grounding grid materials used are galvanized flat steel or round steel, which are prone to corrosion or fracture to varying degrees, posing a great threat to the safe operation of the power system [2,3]. Traditional detection methods generally require the substation to shut down, and then it is excavated to find the branches of the grounding grid that are corroded or broken. The whole process is cumbersome, the measurement is complex and blind, and it also affects the normal operation of the power system [4]. Electrical impedance tomography (EIT) is one of the main methods for non-invasive detection of grounding grids. It can reconstruct the on-site image of the grounding grid without large-scale excavation [5]. In recent years, many scholars have applied EIT technology to the field of grounding grid corrosion diagnosis and have made certain progress, but it still cannot intuitively display the corrosion status of the grounding grid [6,7]. References [8,9] have achieved good imaging results by optimizing the iterative algorithm of grounding grid impedance imaging, but they cannot accurately display the degree of corrosion. At present, the EIT inverse problem reconstruction algorithm based on deep learning has been widely studied and has shown its unique advantages in large-scale nonlinear reconstruction. The problem solved has a high degree of nonlinearity and it is solved with a fast solution speed thanks to easy access to simulation training datasets [10,11,12].
In the research on grounding grid corrosion imaging, reference [13] proposed a transient electromagnetic method for grounding grid detection using artificial neural networks to perform resistivity imaging, providing fast and accurate calculation capabilities. Reference [14] used laser-induced breakdown spectroscopy (LIBS) combined with machine learning to evaluate the degree of grounding grid corrosion, improving the accuracy of predicting the degree of corrosion. Reference [15] developed a multi-point synchronous temporary grounding wire detection device based on convolutional neural networks to accurately classify the corrosion status of the grounding grid. Most current studies use intelligent algorithms combined with electromagnetic imaging or electrical network theory to image the grounding grid [16,17,18]. The contribution of this paper is to demonstrate the application of impedance imaging theory combined with deep learning algorithms to image the grounding grid, which improves the precision and accuracy of grounding grid corrosion detection, and promote further research on impedance imaging of grounding grids.
Compared with traditional methods and other deep learning models, CGAN performs better in dealing with noise and nonlinearity, resulting in more accurate and stable corrosion pattern reconstruction [19,20,21]. The CGAN is able to learn the complex mapping between the measured voltage and the conductivity distribution from large-scale simulation data. Therefore, this paper proposes a grounding grid electrical impedance imaging method based on an improved CGAN, to improve the precision and accuracy of grounding grid corrosion detection. First, a grounding grid simulation model is established, and the boundary voltage is obtained by solving the forward problem. Then, an improved CGAN algorithm is designed, and the boundary voltage value is input for grounding grid electrical impedance imaging. The generator of this method mainly consists of four modules: the preprocessing module, encoder module, decoder module and attention module. The discriminator is a PatchGAN structure, and the grounding grid electrical impedance image is reconstructed through adaptive training and optimization of the loss function. Finally, the generated image is segmented into branches to detect the corroded branches of the grounding grid and their corrosion degree.
The main contributions of this paper are as follows:
1. This paper innovatively introduces a CGAN framework specifically for grounding grid corrosion detection based on EIT technology, which combines a preprocessing module, encoder module, decoder module and attention module to improve the imaging accuracy.
2. This paper presents a comprehensive analysis of the performance of the proposed model, proving that compared with traditional methods, not only is the reconstruction accuracy significantly improved, but also the degree of grounding grid corrosion can be more accurately judged.
3. The effectiveness of the method proposed in this paper is proven through extensive simulation and experimental data, showing that it also has good noise resistance and stability in an actual grounding grid corrosion detection task.

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 × 3 as an example, the total calculation area is an area of 18   m × 18   m , including the grounding grid and the surrounding soil area. The cross-sectional area of each branch is 0 . 5   m × 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:
F ( ϕ ) = s 1 2 σ ϕ x 2 + ϕ y 2 d x d y = n = 1 n 0 s n 1 2 σ ϕ n x 2 + ϕ n y 2 d x d y
Among them, σ represents the conductivity, ϕ 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 ϕ = 0
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:
K 11 K 12 0 K 1 N K 21 K 22 0 K 2 N K m 1 K m 2 0 K m N K m 1 K n 2 0 K n N K l 1 K l 2 1 K l N K N 1 K N 2 0 K N N ϕ 1 ϕ 2 ϕ m ϕ n ϕ l ϕ N = 0 0 I I 0 0
Then, the Gaussian elimination method is used to calculate the node potential of the subdivided unit U ( ρ ) = [ ϕ 1 , ϕ 2 ϕ 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 × 3 and 2 × 3 grounding grids with different corrosion positions, numbers and corrosion degrees. The simulation example is shown in Figure 2. The conductivity of the normal uncorroded flat steel material is 1 × 10 7   S / m , and the conductivity of the soil part is 5 × 10 3   S / m   . This paper adopts a 16-electrode adjacent excitation model. The electrodes surround the measured area, inject the current in turn and measure the voltage value of the adjacent electrodes, and the injection current density is set to 1   A / m . The principle of adjacent excitation cycle measurement is to select 16 accessible nodes around the measured grounding grid, inject the current from adjacent nodes, P 1 P 2 , P 2 P 3 , …… P 15 P 16 , P 16 P 1 , in turn, and cyclically measure the adjacent potentials of the remaining 13 nodes except the measured node, that is, 208 boundary voltage values are obtained, and then the voltage values are reconstructed through the improved CGAN algorithm.
The conductivity ratio of grounding grid materials under normal conditions and under corrosion conditions is generally within 10 times, so this paper mainly diagnoses the corrosion of grounding grids with conductivity of 1 × 10 6   S / m to 1 × 10 7   S / m . The dataset includes 4500 sets of boundary voltage values obtained by simulation and the corresponding real conductivity distribution images, of which 80% are randomly selected as training sets, 10% as validation sets and 10% as test sets. Each pair consists of a set of boundary voltage measurements and the corresponding true conductivity map. The boundary voltage values are input into the generator to generate a conductivity distribution map, and the corresponding true conductivity distribution map is input into the discriminator to determine whether the generated image is correct or not.
Since the traditional EIT imaging method struggles to effectively reconstruct the regular structure and corrosion conditions of each branch of the grounding grid, this paper uses the color coding method to diagnose the corrosion conditions. The defined real corrosion diagnosis image is shown in Figure 3, which is used to guide the supervised learning of the CGAN to generate the grounding grid electrical impedance imaging map. Taking the 3 × 3 structure as an example, the conductivity value and the color value are linearly mapped, and the conductivity imaging map is smoothly transitioned from blue to yellow. In the figure, the blue area indicates lower conductivity, and the yellow area indicates higher conductivity, which is conducive to image analysis after imaging the CGAN grounding grid in order to solve its corrosion location and corrosion degree.

3. Research on an Improved CGAN Ground Grid Imaging Algorithm

This paper designs an improved CGAN algorithm. The algorithm flow is shown in Figure 4. The generator inputs 208 voltage values obtained by the finite element method, and it generates the conductivity distribution map of the grounding grid through supervised learning. The discriminator inputs the boundary voltage and the generated or real image, and it establishes the L1 combined with CGAN loss function. The generator effect is improved through adversarial training, so that it can directly generate a real grounding grid image without the need for discriminant model reconstruction.

3.1. Improved CGAN Structure

3.1.1. Generator Design

The generator of this method is mainly composed of four modules: the preprocessing module, encoder module, decoder module and attention module. Its structure is shown in Figure 5. First, the input layer receives the boundary voltage value, and the preliminary feature map of the ground grid electrical impedance imaging is obtained after passing through the preprocessing module. Then, the high-level features are extracted for imaging through a U-shaped structure network with a depth of 5 layers. The encoder module of U-Net consists of multiple down-sampling layers, each of which contains two convolutional layers with a convolution kernel size of 4 × 4 . The stride of the first convolutional layer is 1, which is used for fine feature extraction; the stride of the second convolutional layer is 2, which replaces the traditional pooling layer to better preserve the detail information in image reconstruction. In order to speed up network training and prevent overfitting, batch normalization, a dropout layer and a leaky-ReLU activation function are introduced in the encoder. Its batch normalization is as shown in Equation (4):
y = γ x μ σ 2 + ε + β
The decoder module gradually restores the spatial size of the feature map through multiple up-sampling layers and deconvolutional layers. The structure of the deconvolutional network is similar to that of the encoder, using the same convolution kernel size and stride to gradually enlarge the resolution of the feature map and finally generate a ground grid corrosion image. The size of the generated image is consistent with the input to ensure the spatial consistency of the image.
The preprocessing module is responsible for learning the nonlinear mapping relationship between the boundary voltage and the target impedance image to form a preliminary grounding grid impedance image. As shown in Figure 6, the input layer accepts 208 boundary voltage values, and the boundary voltage data sequence is converted into a 13 × 16 matrix through the fully connected layer and the deformation layer for further two-dimensional feature extraction. Its expression is given in Equation (5).
Z = r e s h a p e σ W 1 x + b 1 R 16 × 13
Then, the network extracts high-order features through a four-level convolutional network, and it finally outputs the conductivity imaging topology of the grounding grid through a deformation and fully connected network. In the first layer of the convolution structure, 32 convolution kernels of size 3 × 3 and step size 1 are used. The second, third, and fourth convolutional layers are basically the same, containing 64, 128, and 256 convolution kernels of 3 × 3 size, respectively, gradually obtaining higher-level feature information. The activation function after the convolution operation uses Leaky ReLU. After each convolutional layer, a pooling layer is used to reduce the feature size, and the pooling kernel size is 2 × 2 . The activation function is Equation (6):
f ( x ) = x               ,   i f   x > 0 0.01 x   ,   i f   x 0
Then, the two-dimensional information features extracted by the convolutional neural network are converted into one-dimensional information through the deformation layer, further information features are learned through two layers of fully connected layers and the Tanh function is used for normalization to generate preliminary feature information of the grounding grid. The Tanh function is Equation (7).
f ( x ) = tanh ( x ) = e x e x e x + e x
The attention module fuses the features extracted by the encoder with the features in the decoder to better preserve details and important information. This paper adopts the CBAM (Convolutional Block Attention Module) attention mechanism to independently infer the attention map through the channel attention and spatial attention modules, thereby enhancing the transmission of feature information. As shown in Figure 7, the channel attention mechanism calculates the importance of different channels of the input feature map through global average pooling and maximum pooling, while the spatial attention mechanism assigns weights through the local information of the feature map.
For the input feature map F , the channel attention map M c is calculated as follows:
M c ( F ) = σ ( M L P ( A v g P o o l ( F ) ) + M L P ( M a x P o o l ( F ) ) )
Among them, A v g P o o l and M a x P o o l distributions are the global average pooling and average maximum pooling operations, σ is the sigmoid activation function and M L P is a multi-layer perceptron with shared weights. The spatial attention map M s is calculated by the   7 × 7 convolution kernel, and the specific expression is as follows:
M s F = σ f 7 × 7 A v g P o o l F ; M a x P o o l F
where f 7 × 7 represents the   7 × 7 convolution operation of size, and “;” represents feature concatenation. Finally, by multiplying the input features point by point, CBAM can effectively strengthen the weight distribution of conductivity change features, thereby optimizing the EIT reconstruction effect under the complex distribution of grounding grid corrosion.
X o u t = X + M c ( F ) M s ( F ) X
represents element-wise multiplication.

3.1.2. Discriminator Design

The discriminator uses the PatchGAN structure, which can effectively capture the high-frequency features at the patch (local area) level in the image. Compared with the global discriminator, PatchGAN divides the input image into several small blocks and judges the authenticity of these small blocks one by one to ensure that the model can learn the local texture and high-frequency information in the image [23]. Its expression is Equation (11).
D ( I ) = i L D x ^ i , y i
x ^ i is the i th patch in the image I . D x ^ i is the judgment result of the discriminator on the i th patch, outputting a scalar value indicating the probability that the patch is a real image, and y i is the label of each patch (1 for real images and 0 for generated images).
The discriminator D uses the convolutional network as its core structure. First, it constructs a fully connected layer and a deformation layer to convert the 13 × 16 voltage sequence into a feature map of 64 × 64 , which is combined with the generated image or the real image into a multi-channel feature map and then input into a four-level convolutional network structure. Each layer of the convolutional network consists of convolution, pooling and activation layers. The convolution kernel size is 5 × 5 and the step size is 2, which gradually reduces the spatial dimension of the feature map to extract high-level feature information. The four-level convolutional layers contain 64, 64, 128 and 256 filters, respectively, and a batch normalization layer is used to normalize small batches of data to accelerate the training process and improve the stability of the model. After structured analysis, the data are flattened by the flattening layer, connected to two fully connected layers for further decision-making and mapped by the Sigmoid activation function in the output layer to judge the authenticity of the image. The Sigmoid function is Equation (12):
σ ( x ) = 1 1 + e x

3.2. Objective Function and Training Process

The loss function of the improved CGAN algorithm in this paper is mainly composed of the L1 loss and the adversarial loss. The weighted combination of the two losses constitutes the final total loss value. The L1 loss is defined as the average value of the absolute error between the generated sample and the real sample. Compared with the L2 loss, the L1 loss has better robustness and can generate smoother images, which is more suitable for ground grid corrosion imaging tasks [24]. Considering the objective functions of G and D, the objective function of the network structure proposed in this paper is expressed as follows:
L = λ 1 arg   min G   max D L C G A N D , G + λ 2 L I L C G A N D , G = E x , y ~ p d a t a ( x , y ) [ log D ( x , y ) ] + E x ~ p d a t a ( x ) [ log ( 1 D ( x , G ( x ) ) ) ] L 1 = E ( x , y ) p d a t a ( x , y ) [ y G ( x )   1 ]
In Equation (13), x represents the conditional input image, y is the target real image and p d a ta represents the distribution of data.
The entire training process is shown in Figure 8. During the training process, the training data and test data are first normalized, and then the structural parameters of the generative network and the discriminative network are set, including loss function parameters, activation function parameters, batch size parameters, number of iterations, etc., and initialized. The Adam optimizer is used for network training. The training process is mainly divided into two stages. First, the parameters of the discriminator D are fixed, and the EIT image data generated by G and the true conductivity distribution are combined with the conditional information, respectively, and input into the discriminator D to optimize the parameters of G and improve the image generation ability of the generative network; then, the parameters of the generator G are fixed, and the parameters of D are updated according to the output of G to enhance the ability of the discriminative network to identify true and false samples. The two are optimized alternately to continuously improve the overall performance.

4. Grounding Grid Imaging Results and Evaluation Analysis

4.1. Ground Grid Imaging Results

After the dataset was constructed, 100 rounds of training were conducted. Figure 9 shows the loss curves of the generator and discriminator during the training process. The generator loss is composed of adversarial loss and L1 regularization, while the discriminator loss reflects the performance when distinguishing between real samples and generated samples. The curve shows stable convergence at around 50 rounds of training, indicating that the training is balanced and feature learning is effective, without problems such as mode collapse or over-strengthening of the discriminator.
In order to verify the effectiveness of the algorithm, this paper carried out experimental verification on a large number of test sets of grounding grid boundary voltages, analyzed the potential maps of different corrosion locations and corrosion degrees, and compared the conductivity topology maps obtained by the Tikhonov algorithm, NORSE algorithm, TV algorithm and CGAN imaging algorithm. A representative corrosion model was selected for simulation imaging, and the conductivity of the corrosion site was 2.0 × 10 6   S / m . The imaging effect is shown in Figure 10. According to the definition of conductivity value of image color mapping above, red, yellow and blue in turn represent the decrease of conductivity. The bluer represents lower conductivity, which is usually corrosive location or land. It is not difficult to find that the traditional EIT algorithm struggles to accurately determine the corrosion location due to its morbidity and underdetermination when solving nonlinear inverse problems. The branch edge of the conductivity topology map presented in its imaging is poor, and there are artifacts in the branch. The actual conductivity difference between the corrosion site and the soil cannot be distinguished. It can only roughly reflect the corrosion location, and it is even more difficult to determine the degree of corrosion. Although the imaging of the improved CGAN algorithm proposed in this paper has conductivity color errors and a small amount of noise, it can accurately determine the corrosion location.
The proposed CGAN-based approach introduces moderate complexity during the training phase, and once training is complete, its inference time is significantly faster than that of conventional methods. The significant improvement in reconstruction quality and noise immunity shown in Table 1 justifies the increased complexity, making it a viable approach for corrosion imaging of actual ground grids.
In order to verify the improvement effect of the improved CGAN algorithm, experimental comparisons were made with the generative network using CNN and U-net. Here, 100 rounds of training were conducted under the same conditions. The test set used typical single corrosion and double corrosion models. The imaging effect is shown in Figure 11. The green part of model 1 and 3 represents grounding grid corrosion, and the conductivity of the actual corrosion part is 6.1 × 10 6   S / m and 5.3 × 10 6   S / m . Model 2 is corroded at the blue position, and the conductivity at the actual corrosion position is 2.8 × 10 6   S / m . It can be seen that the improved CGAN imaging algorithm has made great progress in the diagnosis of grounding grid corrosion. Due to the simple structure of the CNN generator model, the image details of the generated image at the corrosion site are not clear enough, the color space information is not captured and there are artifacts at the corrosion site. The generation network composed of U-Net better retains the spatial information and local features, and the generated image quality is better than the traditional CNN. After adding the CBAM attention mechanism, the network can more adaptively select important channel features, improve the generator’s ability to capture the global structure and details of the image and reduce artifacts and distortion.
Due to the inevitable deviations in voltage measurements caused by environmental and equipment factors, this paper introduces sufficient Gaussian noise into the boundary voltage measurement results to evaluate the noise resistance and generalization performance of the algorithm. The noise is added as shown in Equation (14).
X n o i s y = X + N 0 , σ 2
After adding Gaussian noise of different sizes, grounding grid impedance imaging is performed. As shown in Figure 12, the blue part of model 1 represents grounding grid corrosion, and the conductivity of the actual corrosion part is 2.2 × 10 6   S / m . Model 2 is corroded at the green position, and the conductivity at the actual corrosion position is 5.8 × 10 6   S / m .As the noise level increases, particularly when the standard deviation of the noise exceeds 5% of the voltage values, the imaging quality is significantly affected. However, when introducing low to moderate noise, the imaging results remain largely unaffected. Even with moderate levels of noise, the algorithm is still able to accurately detect the corrosion location and corrosion state, demonstrating the robustness and noise resilience of the proposed method. This indicates that the model can maintain a reliable performance under practical, noisy conditions, making it suitable for real-world applications where measurement noise is inevitable.

4.2. Ground Grid Imaging Evaluation Index

In order to intuitively reflect the effectiveness and superiority of this algorithm, this paper analyzes the imaging results of simulation data from a quantitative perspective, using the structural similarity index (SSIM) and peak signal to noise ratio (PSNR) to evaluate the effect of image reconstruction. The equation is as follows:
S ( x , y ) = ( 2 μ x μ y + c 1 ) ( 2 σ x y + c 2 ) ( μ x 2 + μ y 2 + c 1 ) ( σ x 2 + σ y 2 + c 2 )
where u x and σ x represent the mean and standard deviation of the x image, u y and σ y represent the mean and standard deviation of the y image, σ x y represents the covariance of the x and y images, and c 1 and c 2 are constants, usually 6.5025 and 58.5225. The SSIM value is between 0 and 1, where 1 means that the two images are exactly the same.
When solving the PSNR value, you need to first calculate the mean square error (MSE) of each target image, as follows:
M ( i , j ) = 1 m n i = 0 m 1 j = 0 n 1 I i , j K i , j 2
In Equation (16), I i , j and K i , j represent the pixel values of the original image and the contrast image, respectively. Then, the peak signal-to-noise ratio is expressed as follows:
P = 10 log 10 ( M A X 2 M )
M A X is the maximum pixel value of the image, M A X = 2 n 1 ; the higher the image peak signal-to-noise ratio, the better the image quality and the less distortion.
Based on the relatively regular characteristics of the grounding grid branches, this paper segmented the conductivity images after CGAN imaging to better diagnose corrosion. The conductivity value and corrosion degree of the corroded branch can be calculated based on the divided branches. The conductivity value is solved as Equation (18):
σ = 1 N i = 1 N ( k ( C i C min ) + σ min )
N is the total number of branch units, C i is the unit color value, C min is the minimum color reference value, k is the mapping ratio coefficient, σ min is the minimum conductivity value, which is 1 × 10 6   S / m , and σ max is the corrosion upper limit conductivity value, which is 1 × 10 7   S / m . The corrosion degree can be calculated based on the solved conductivity value ξ :
ξ = σ σ min σ max σ min × 100 %
According to the determined corrosion branch and corrosion degree, the judgment accuracy A and judgment error R are obtained:
A = T P T P + F N
R = 1 N i = 1 N ( ξ x ξ y ) 2
T P represents the correctly detected corroded branch, F N represents the missed corroded branch, ξ x represents the calculated corrosion degree and ξ y is the actual corrosion degree.

4.3. Analysis of Ground Grid Imaging Evaluation

The conductivity value of each branch can be calculated by Equation (18), and then the corrosion situation can be further obtained. According to the corrosion situation after imaging of model 3 in Figure 13, it can be concluded that branch 2 and branch 24 are severely corroded. The conductivity of branch 2 is calculated to be 1.8 × 10 6   S / m , and its corrosion degree is 82%. The conductivity of branch 24 is 1.5 × 10 6   S / m , and its corrosion degree is 85%.
To further verify the grounding grid corrosion detection performance of this algorithm on different model test sets, the following figure shows a randomly selected part of the test data. The scatter plot of the measured corrosion degree ξ x at the corroded location and the actual corrosion degree ξ y at the corroded location are shown in Figure 14. It can be concluded that the corrosion degree of the corroded branch of the grounding grid detected by it is basically consistent with the actual one, and the error is small. This verifies that the proposed algorithm is highly accurate in assessing the degree of corrosion and shows that it can reliably detect corrosion in grounding grid systems with small errors, confirming its robustness and practical applicability in real-world scenarios.
Then, the grounding grids were imaged with different grid sizes and single-branch corrosion and double-branch corrosion to study the influence of corrosion position identification accuracy and corrosion degree error. From the results of Table 2, it can be concluded that the improved CGAN imaging method proposed in this paper has the highest accuracy when the corrosion branch is a single branch in the single corrosion case of the 2 × 3 and 3 × 3 grids, and it needs to be improved under the double branch. In the case of double-branch corrosion, the different corrosion degrees lead to subtle changes in potential characteristics, making it difficult to extract features and thus increasing the error in imaging corrosion degree and decreasing the accuracy of corrosion position judgment. Compared with the traditional EIT imaging method, this method still has great advantages and is conducive to the application of grounding grid corrosion diagnosis.
In Table 3, the evaluation index table of different algorithms shows that the average P of the image generated by the improved CGAN is 1.7407 higher than that of the image generated by U-Net, and it is 3.4809 higher than that generated by the CNN. The SSIM value is increased by 0.0445 and 0.0904 compared with U-Net and the CNN. This fully demonstrates the effectiveness of the improved method in better retaining accurate feature representations such as structural details. The increased PSNR and SSIM values indicate that the proposed method and its improved generator can provide more accurate and reliable conductivity images for grounding grid analysis, and thus they may play a greater role in the study of grounding grid conductivity imaging.
The accuracy A of the corrosion branch judgment of each algorithm on the test set is calculated, and the R between the corrosion degree of the corrosion site and the actual degree is obtained, as shown in Table 4. It can be concluded that the improved CGAN imaging algorithm proposed in this paper has an accuracy increase of 9.1% compared with the CNN structure after improving the generation network, and the corrosion degree judgment error is reduced by 15.4%. Compared with the U-Net network, the accuracy is increased by 5.7% and the error is reduced by 8.8%. This shows that the improvements made to the generator network in the CGAN architecture produce more accurate and reliable corrosion detection, and its attention module effectively extracts features, highlighting the effectiveness of this method in improving imaging accuracy and corrosion assessment accuracy, which is more conducive to the research of grounding grid corrosion diagnosis.
This algorithm performs ground grid imaging after adding different Gaussian noises, as shown in Figure 15. Although noise is added to the data, the noise has little effect on the imaging quality, and the accuracy of the model only slightly decreases. This shows that even in the presence of noise, the detection method can still identify the corrosion area well, indicating that the model is noise robust to a certain extent, and the decrease in accuracy is small, indicating that the interference of noise in the imaging results does not significantly affect the final detection performance.

5. Conclusions

In order to solve the morbidity problem of traditional algorithms in grounding grid impedance imaging, this paper proposes a grounding grid impedance imaging method based on the improved CGAN. The input measured boundary voltage value is imaged through the improved CGAN algorithm. The algorithm generator is mainly composed of four modules: the preprocessing module, encoder module, decoder module and attention module. The discriminator is a PatchGAN structure. The grounding grid impedance image is reconstructed through adversarial training and optimization of the objective function. Through simulation experiments of different corrosion positions and different corrosion degrees of the grounding grid, it is proven that this method significantly improves the precision and accuracy of the grounding grid corrosion diagnosis image and obtains the grounding grid image with complete boundaries and clear corrosion conditions.
The accuracy of this method in detecting double-branch corrosion is lower than that of single-branch corrosion. The reason is that there are more types of double-branch corrosion, and it is difficult to extract voltage characteristics. The error in detecting slight corrosion is larger than that in moderate corrosion. Considering that the cause of the problem is that the voltage characteristics in complex and slight cases do not change significantly, error in judging the degree of corrosion occurs.
Future work will integrate feature detail extraction and expand the dataset to improve the model’s weak recognition performance when imaging slight corrosion and multiple corroded branches, optimize the imaging resolution of the CGAN imaging network and more accurately display the corrosion status of the grounding grid. In summary, the method proposed in this paper provides a new idea for grounding grid impedance imaging, which is expected to be applied in grounding grid corrosion diagnosis and inspection.

Author Contributions

Conceptualization, K.Z.; methodology, K.Z.; software, D.L.; validation, D.L.; data curation, Z.X.; investigation, Z.F.; writing—original draft preparation, D.L.; writing—review and editing, K.Z.; visualization, X.B. All authors have read and agreed to the published version of the manuscript.

Funding

The research was funded by the Science and Technology Project of the State Grid Sichuan Electric Power Company: Research on online monitoring technology and system development of grounding grid operation status (52199723001M).

Data Availability Statement

The data supporting the reported results are not publicly available due to privacy or ethical restrictions. Please contact the corresponding author for more information.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of this study; in the collection, analyses or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

References

  1. Hu, H.; Fang, M.; Hu, F.; Zeng, S.; Deng, X. A new design of substation grounding based on electrolytic cathodic protection and on transfer corrosion current. Electr. Power Syst. Res. 2021, 195, 107174. [Google Scholar] [CrossRef]
  2. Wang, Y.; Jiang, J.; Huang, Y.; Wang, J. Design of substation grounding grid in CFETR. Sci. Rep. 2024, 14, 25009. [Google Scholar] [CrossRef]
  3. Zhang, C.; Liao, Y.; Gao, X.; Zhao, J.; Yuan, Y.; Liao, R. Research Advances of Soil Corrosion of Grounding Grids. Micromachines 2021, 12, 513. [Google Scholar] [CrossRef]
  4. Zhao, J.; Meng, X.; Ren, X.; Li, S.; Zhang, F.; Yang, X.; Xu, J.; Yuan, Y. Review on soil corrosion and protection of grounding grids. Materials 2024, 17, 507. [Google Scholar] [CrossRef]
  5. Li, X.; Yang, F.; Ming, J.L.; Jadoon, A.; Han, S. Imaging the corrosion in grounding grid branch with inner-source electrical impedance tomography. Energies 2018, 11, 1739. [Google Scholar] [CrossRef]
  6. Li, X.; Yang, F.; Yu, X.; Dong, M.; Yao, D. Research on the inverse problem of grounding grid fault diagnosis based on inner-source EIT. Trans. China Electrotech. Soc. 2019, 34, 902–909. [Google Scholar]
  7. Hu, J.-Y.; Hu, J.-G.; Lan, D.-L.; Ming, J.-L.; Zhou, Y.-T.; Li, Y.-W. Corrosion evaluation of the grounding grid in transformer substation using electrical impedance tomography technology. In Proceedings of the Annual Conference of the IEEE Industrial Electronics Society, Beijing, China, 29 October 2017. [Google Scholar]
  8. Yan, X.; Huang, S.; Smolik, W.T.; Chen, W.; Yang, S. A detection method for fast electrical impedance imaging of grounding grid based on optimized differential-multigrid-homotopy algorithm. IEEE Trans. Instrum. Meas. 2023, 72, 3528714. [Google Scholar] [CrossRef]
  9. He, L.; Yang, L.; Yan, X.; Chen, W.; Huang, S. Research on the grounding grid electrical impedance imaging algorithm based on improved Tikhonov and Lp regularization. Prog. Electromagn. Res. B 2024, 106, 1–16. [Google Scholar] [CrossRef]
  10. Wang, H.; Liu, K.; Wu, Y.; Wang, S.; Zhang, Z.; Li, F.; Yao, J. Image reconstruction for electrical impedance tomography using radial basis function neural network based on hybrid particle swarm optimization algorithm. IEEE Sens. J. 2021, 21, 1926–1934. [Google Scholar] [CrossRef]
  11. Jeon, D.; Kim, M.K.; Jeong, Y.; Oh, J.E.; Moon, J.; Kim, D.J.; Yoon, S. High-accuracy rebar position detection using deep learning–based frequency-difference electrical resistance tomography. Autom. Constr. 2022, 135, 104116. [Google Scholar] [CrossRef]
  12. Shi, Y.; Li, Y.; Fu, F.; Wang, M.; Yang, B.; Lou, Y.; Tian, Z. A fully connected neural network-based voltage compensation method for accurate reconstruction in brain electrical impedance tomography. Biomed. Signal Process. Control 2023, 86, 105252. [Google Scholar] [CrossRef]
  13. Qin, S.; Wang, Y.; Tai, H.-M.; Wang, H.; Liao, X.; Fu, Z. TEM apparent resistivity imaging for grounding grid detection using artificial neural network. IET Gener. Transm. Distrib. 2019, 13, 3932–3940. [Google Scholar] [CrossRef]
  14. Huang, Z.; Xia, L.; Zhang, H.; Liu, F.; Tu, Y.; Yang, Z.; Wei, W. Evaluation of grounding grid corrosion extent based on laser-induced breakdown spectroscopy (LIBS) combined with machine learning. Comput. Electr. Eng. 2024, 120, 109849. [Google Scholar] [CrossRef]
  15. Yin, L.; Li, Y. Multi-point synchronous temporary grounding wire detection device based on convolutional neural networks. Int. J. Electr. Power Energy Syst. 2024, 158, 109955. [Google Scholar] [CrossRef]
  16. Fu, Z.; Song, S.; Wang, X.; Li, J.; Tai, H.-M. Imaging the topology of grounding grids based on wavelet edge detection. IEEE Trans. Magn. 2018, 54, 6200808. [Google Scholar] [CrossRef]
  17. Noroznia, H.; Gandomkar, M.; Nikoukar, J. Pipeline failure evaluation and prediction using failure probability and neural network based on measured data. Heliyon 2024, 10, e26837. [Google Scholar] [CrossRef]
  18. Adail, A.S.; Saad, M.H.; Said, A. Evaluation of the optimum safety performance of the nuclear reactor compact grounding system under lightning strikes and ground fault. Kerntechnik 2023, 89, 1–14. [Google Scholar] [CrossRef]
  19. Hui, X.; Xu, Y.; Niu, J.; Zhang, W. Rapid evaluation and prediction of cure-induced residual stress of composites based on cGAN deep learning model. Compos. Struct. 2024, 330, 117827. [Google Scholar] [CrossRef]
  20. Yang, B.; Arshad, M.H.; Zhao, Q. Packet-level and flow-level network intrusion detection based on reinforcement learning and adversarial training. Algorithms 2022, 15, 453. [Google Scholar] [CrossRef]
  21. Du, X.; Qi, J.; Kang, J.; Sun, Z.; Wang, C.; Xie, J. Partial discharge data augmentation and pattern recognition method based on DAE-GAN. Algorithms 2024, 17, 487. [Google Scholar] [CrossRef]
  22. Yan, X.; Lyu, Q.; Lin, X.; Chen, W. Research on grounding grid electrical impedance tomography algorithm based on Tikhonov and TV hybrid regularization. Chin. J. Sci. Instrum. 2021, 42, 160–171. [Google Scholar]
  23. Wang, Z.; Zhang, F.; Zhang, T.; Yang, Y.; Fu, Y. High-Resolution Image Generation with Enhanced PatchGAN Discriminator. Pattern Recognit. 2023, 142, 109337. [Google Scholar]
  24. Han, B.; Guo, L.; Wang, J.; Zhang, Z.; Zhang, G.; Jia, S. Fast general normalized convolutional sparse filtering via L1-L2 mixed norm for rotating machinery fault diagnosis. Measurement 2022, 198, 111136. [Google Scholar] [CrossRef]
Figure 1. Schematic diagram of grounding grid model segmentation.
Figure 1. Schematic diagram of grounding grid model segmentation.
Algorithms 18 00048 g001
Figure 2. Simulation diagram of the forward problem of the grounding grid.
Figure 2. Simulation diagram of the forward problem of the grounding grid.
Algorithms 18 00048 g002
Figure 3. Real corrosion diagram of grounding grid.
Figure 3. Real corrosion diagram of grounding grid.
Algorithms 18 00048 g003
Figure 4. Improved CGAN algorithm flow chart.
Figure 4. Improved CGAN algorithm flow chart.
Algorithms 18 00048 g004
Figure 5. Generator structure diagram.
Figure 5. Generator structure diagram.
Algorithms 18 00048 g005
Figure 6. Preprocessing module diagram.
Figure 6. Preprocessing module diagram.
Algorithms 18 00048 g006
Figure 7. Attention module diagram.
Figure 7. Attention module diagram.
Algorithms 18 00048 g007
Figure 8. Training flow chart.
Figure 8. Training flow chart.
Algorithms 18 00048 g008
Figure 9. Generate adversarial training loss graph.
Figure 9. Generate adversarial training loss graph.
Algorithms 18 00048 g009
Figure 10. Comparison of traditional algorithm imaging.
Figure 10. Comparison of traditional algorithm imaging.
Algorithms 18 00048 g010
Figure 11. Comparison of secondary imaging using different algorithms.
Figure 11. Comparison of secondary imaging using different algorithms.
Algorithms 18 00048 g011
Figure 12. Algorithmic imaging after adding different noises.
Figure 12. Algorithmic imaging after adding different noises.
Algorithms 18 00048 g012
Figure 13. Corrosion of each branch of model 3.
Figure 13. Corrosion of each branch of model 3.
Algorithms 18 00048 g013
Figure 14. Comparison of measured corrosion levels.
Figure 14. Comparison of measured corrosion levels.
Algorithms 18 00048 g014
Figure 15. Imaging accuracy after different noises.
Figure 15. Imaging accuracy after different noises.
Algorithms 18 00048 g015
Table 1. Comparison table of algorithm complexity.
Table 1. Comparison table of algorithm complexity.
ModelReasoning Time (s)Performance
Tikhonov6.3Poor quality, sensitive to noise
Noser4.5Moderate quality, limited robustness
TV7.8Good quality, prone to artifacts
CGAN2.3Excellent quality, robust to noise
Table 2. One-shot imaging accuracy and error of different models.
Table 2. One-shot imaging accuracy and error of different models.
ModelAR
2 × 3 (Single corrosion)96.3%7.6%
3 × 3 (Single corrosion)95.5%8.1%
2 × 3 (Double corrosion)91.2%12.6%
3 × 3 (Double corrosion)88.7%15.8%
Table 3. Evaluation index table of different algorithms.
Table 3. Evaluation index table of different algorithms.
Model 1 (2 × 3)Model 2 (3 × 3)
SPSP
CNN0.814616.45240.806516.6654
U-Net0.847618.14680.865418.4514
U-Net-CBAM0.897520.44650.904419.6332
Table 4. Accuracy and diagnostic error of different algorithms.
Table 4. Accuracy and diagnostic error of different algorithms.
AR
CNN85.2%25.2%
U-Net88.6%18.6%
U-Net-CBAM94.3%9.8%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhu, K.; Luo, D.; Fu, Z.; Xue, Z.; Bu, X. Grounding Grid Electrical Impedance Imaging Method Based on an Improved Conditional Generative Adversarial Network. Algorithms 2025, 18, 48. https://doi.org/10.3390/a18010048

AMA Style

Zhu K, Luo D, Fu Z, Xue Z, Bu X. Grounding Grid Electrical Impedance Imaging Method Based on an Improved Conditional Generative Adversarial Network. Algorithms. 2025; 18(1):48. https://doi.org/10.3390/a18010048

Chicago/Turabian Style

Zhu, Ke, Donghui Luo, Zhengzheng Fu, Zhihang Xue, and Xianghang Bu. 2025. "Grounding Grid Electrical Impedance Imaging Method Based on an Improved Conditional Generative Adversarial Network" Algorithms 18, no. 1: 48. https://doi.org/10.3390/a18010048

APA Style

Zhu, K., Luo, D., Fu, Z., Xue, Z., & Bu, X. (2025). Grounding Grid Electrical Impedance Imaging Method Based on an Improved Conditional Generative Adversarial Network. Algorithms, 18(1), 48. https://doi.org/10.3390/a18010048

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop