An Improved Magnetic Field Method to Locate the Grounding Conductor

The location of the grounding grid conductors is critical for performing corrosion diagnosis and maintenance work. An improved magnetic field differential method to locate the unknown grounding grid based on truncation errors and the round-off errors analysis is presented in this paper. It was proven that a different order of the magnetic field derivative can be used to determine the position of the grounding conductor according to the peak value of the derivative. Due to the accumulative error of higher differentiation, the truncation error and rounding error were used to analyze to accumulative error and to determine the optimal step size to measure and calculate the higher differentiation. The possible range and probability distribution of the two kinds of errors at each order are described, and the index of peak position error was derived, which can be used to locate the grounding conductor in the power substation.


Introduction
The grounding grid is an important piece of equipment that provides a common reference ground for various electrical equipment in the substation, quickly discharges the fault current in the event of a ground fault in the system, improves the ground potential distribution in the substation field, and ensures the safety of primary and secondary equipment and personnel under fault conditions [1,2]. The material of the grounding grid of the power system is mainly copper, which does not easily suffer from soil corrosion. In recent years, in Europe and the United States, steel gradually began to replace copper as the grounding grid material, but the steel grounding grid in operation for a relatively short period of time has not suffered serious corrosion. However, in China, India and other countries, since the conductors of the grounding grid are mostly made of steel, with the increase of the operation period, corrosion is prone to occur due to improper welding construction and the influence of geological conditions, and the conductors may become thinner or even broken [3][4][5], resulting in the grounding performance becoming reduced and the safety difficult to guarantee [6,7].
The grounding grid is buried in soil about 0.8 m deep underground, making it difficult to excavate and replace [8]. Therefore, predicting corrosion defects of the grounding grid based on information that can be obtained above the ground is important for guiding operation and maintenance [9][10][11] and has important engineering significance. In grounding grid research, generally, the optimization design of the grounding grid and the grounding performance of the grounding grid are studied [12,13]. In addition, many scholars have carried out research on grounding grid fault diagnosis, mainly based on electrical network theory [14][15][16] and electromagnetic field theory [17][18][19][20][21][22][23][24][25][26][27][28][29]. The method based on electrical network theory equivalently treats the branches of the grounding grid as pure resistances, injects current into the grounding grid, measures the conductor branch or node voltage of the grounding grid, studies and establishes a fault prediction diagnosis model, and uses optimization algorithms for solving [30][31][32][33]. These methods are based on the known topological structure of the grounding grid to perform grounding grid fault diagnosis. However, when diagnosing the grounding grid of a substation with a long history, sometimes the grounding grid drawing is missing or the actual structure of the grounding grid has a large error from the existing drawing due to reconstruction. In order to obtain the structure of the grounding grid, the grounding grid topology detection methods based on electromagnetic induction principle are widely used, mainly including the electrical source detection method (magnetic field method) [18][19][20][21][22][23][24][25][26] and the magnetic source detection method [27][28][29].
The magnetic source detection method uses a transmitting coil placed on the ground to pass a certain frequency of current. The induced currents generated by underground metal bodies under the excitation of the primary magnetic field produce changing magnetic fields in the surrounding space, called secondary magnetic fields. The position and orientation of underground metal conductors can be obtained by measuring the secondary magnetic field information received by the surface receiving coils. Magnetic source detection methods are divided into the frequency domain electromagnetic method and the time domain electromagnetic method according to different excitation and response characteristics. The time domain electromagnetic method is also called the transient electromagnetic method [27]. However, detection methods based on magnetic sources are greatly affected by metal structures.
The magnetic field method injects a sinusoidal current of a specific frequency into the grounding grid through the two upper guide wires of the grounding grid, measures the magnetic induction intensity generated by the current-carrying conductor of the grounding grid on the earth's surface, and analyzes the distribution characteristics and laws of the magnetic induction intensity to determine the structure and fault states of the grounding grid [25]. Knowing the distribution of the magnetic field generated by the conductor of the current-carrying grounding grid on the surface, the inverse problem equation of the magnetic field can be established to solve the topological structure of the grounding grid. However, the inverse problem is usually ill-conditioned, it is difficult to obtain a unique solution or a stable solution, and complex regularization is required. The analysis method based on the magnetic field differential can avoid the solution of the inverse problem [34][35][36][37], but the error introduced in the numerical differential calculation may make the position of the grounding grid conductor deviate, and the selection of an appropriate measurement step is of great importance for the accurate determination of the conductor position.
In order to improve the reliability of the magnetic field differential method, this paper analyzed the range and probability distribution of the truncation error and rounding error produced by the numerical differential of the magnetic field method, derived the expressions of the mathematical expectation and variance of the differential main peak position error, and finally used Monte Carlo simulation to calculate the local optimal measurement step size under the second and fourth order differentials so that the magnetic field differential method reduced the total error and improved the accuracy of conductor positioning.

Magnetic Field Differentiation Method
The grounding grid is composed of regularly connected horizontal grounding conductors. The branch position information can be obtained by analyzing the distribution of the magnetic field generated by the current-carrying conductor branch. The rough outline of the grounding grid topology can be obtained by measuring the magnetic flux density distribution on the ground surface. However, due to the wide influence range of the magnetic field and the influence of the superposition of the magnetic field, it is not possible to accurately locate the conductor using the original magnetic field distribution characteristics. The magnetic field differential method can enhance the peak characteristics of the magnetic field through high-order differential and can improve the positioning accuracy of the grounding grid conductor. The magnetic field differentiation method is described below using a single current-carrying conductor model.
The infinitely long conductor is placed on the x-axis through the coordinate origin, as shown in Figure 1; the conductor is buried horizontally in a single layer of uniform soil with a magnetic permeability µ; the buried depth is h; the current flowing through the conductor is I; and the direction of the current is vertical outward in the y-z plane. For point P on the ground surface, the vertical distance from the current-carrying conductor is ρ, and the angle between the line segment OP and the z-axis is θ. distribution on the ground surface. However, due to the wide influence range of the magnetic field and the influence of the superposition of the magnetic field, it is not possible to accurately locate the conductor using the original magnetic field distribution characteristics. The magnetic field differential method can enhance the peak characteristics of the magnetic field through high-order differential and can improve the positioning accuracy of the grounding grid conductor. The magnetic field differentiation method is described below using a single current-carrying conductor model.
The infinitely long conductor is placed on the x-axis through the coordinate origin, as shown in Figure 1; the conductor is buried horizontally in a single layer of uniform soil with a magnetic permeability µ; the buried depth is h; the current flowing through the conductor is I; and the direction of the current is vertical outward in the y-z plane. For point P on the ground surface, the vertical distance from the current-carrying conductor is ρ, and the angle between the line segment OP and the z-axis is θ. According to the principle of potential continuity, the potential on both sides of the interface between the conductor and the soil is equal, and the resistivity of the conductor is significantly smaller than that of the soil. Therefore, the current density in the soil is significantly smaller than that inside the conductor, and the influence of the soil leakage current is negligible. Neglecting the leakage current of the conductor in the soil, the magnetic flux density generated by the current-carrying conductor at point P can be expressed by Ampere's loop theorem as follows: According to the principle of potential continuity, the potential on both sides of the interface between the conductor and the soil is equal, and the resistivity of the conductor is significantly smaller than that of the soil. Therefore, the current density in the soil is significantly smaller than that inside the conductor, and the influence of the soil leakage current is negligible. Neglecting the leakage current of the conductor in the soil, the magnetic flux density generated by the current-carrying conductor at point P can be expressed by Ampere's loop theorem as follows: where e φ is the unit vector in the direction perpendicular to the unit vector e ρ , and e ρ is the unit vector in the direction of the line OP. From the geometric relationship, it can be concluded that the magnetic flux density B y (y) parallel to the ground generated by the current-carrying conductor at point P is: Equation (2) describes the distribution of magnetic flux density in the horizontal direction generated by a single current-carrying conductor, which is called the shape function. For a grid-shaped grounding grid, the magnetic flux density distribution in the horizontal direction on the ground surface of the grounding grid can be equivalent to the superposition of the shape functions of each current-carrying branch of the grounding grid.
The higher the differential order of the shape function, the more complex its expression. Considering that the even-order derivative has the main peak characteristic, this paper calculated only the second-order differential and fourth-order differential of the shape function.
When I = 1 A, h = 1 m, the curves of the shape function B y (y), the second-order differential B (2) y (y), and the fourth-order differential B where φ e is the unit vector in the direction perpendicular to the unit vector e ρ , and e ρ is the unit vector in the direction of the line OP. From the geometric relationship, it can be concluded that the magnetic flux density By(y) parallel to the ground generated by the current-carrying conductor at point P is: Equation (2) describes the distribution of magnetic flux density in the horizontal direction generated by a single current-carrying conductor, which is called the shape function. For a grid-shaped grounding grid, the magnetic flux density distribution in the horizontal direction on the ground surface of the grounding grid can be equivalent to the superposition of the shape functions of each current-carrying branch of the grounding grid.
The higher the differential order of the shape function, the more complex its expression. Considering that the even-order derivative has the main peak characteristic, this paper calculated only the second-order differential and fourth-order differential of the shape function.
( ) When I = 1 A, h = 1 m, the curves of the shape function By(y), the second-order differential B (2) y (y), and the fourth-order differential B (4) y (y) of the shape function are shown in Figure 2.  The main peak width in Table 1 is the width between the two zero points (or 1% of the main peak value) of the main peak. The side peak width is the width between the two zero points (or 1% of the main peak value) of the side peak adjacent to the main peak. The Widess resolution R w is the ratio of the energy of the main peak maximum b 2 M of the function to the total energy of the function E: where b M is the maximum of the shape function where b is the shape function. From the comparison of the data in Table 1, it can be seen that, with the second-order and fourth-order derivatives of B y (y), the width of the main peak and the width of the side peaks gradually decrease, the total number of peaks and the Widess resolution gradually increase, and the signal recognition ability enhances. According to Equations (4) and (5), the positions of the main peaks of functions B (2) y (y) and B (4) y (y) are the same as those of the current-carrying conductors and are both at y = 0. Therefore, the positions of the main peaks of the second-order derivatives or fourth-order derivatives of the magnetic flux density B y (y) can be used to determine the locations of the grounding grid branches in the measurement area and thus to map the grounding grid topology.

Simulation of Current-Carrying Grounding Gird
As shown in Figure 3, a 2 × 2 grid of flat steel (cross-sectional area of 4 cm × 3 mm) was laid with a grid spacing of 5 m. The current of 1 A was injected from node 4 and flowed out from node 3. A Cartesian coordinate system x-y-z was established with node 1 as the origin of the coordinate axis, and the positive direction of the z-axis was perpendicular to the x-y plane upward. Below the plane z = h, there was a single layer of homogeneous soil with magnetic permeability µ. The magnetic permeability of the soil was approximated by taking the permeability µ 0 in a vacuum. The resistivity of the conductor was significantly larger than that of the soil, and the soil leakage current had a negligible effect on the simulation results of the magnetic flux density. Therefore, we set a typical value of 80 Ω·m for the soil resistivity.
Through the shape function of a single current-carrying conductor, it can be known that the peak values of the horizontal components B x and B y of the magnetic flux density can reflect the conductor position in different directions; thus, the modulus of the magnetic flux density is more important than its direction for the positioning of the conductors. |B x | + |B y | can reflect all current-carrying conductors in the x-y direction. In order to study the magnetic flux density generated by the current-carrying grounding grid, the simulation was performed using MATLAB based on the finite element method. The magnetic flux density |B x (x,y)| + |B y (x,y)| generated by the current-carrying grid branch was detected in the horizontal plane at a distance of h = 0.5 m from the x-y plane, while |B y (y)| was detected on the survey line at the position x = 6 m, and the results are shown in Figures 4 and 5.     The results of the simulation are shown in Table 2. The grid spacing defined in the simulation is 5 m, and the errors of the grid spacing according to functions |By(y)|, |B (2) y (y)|, and |B (4) y (y)| are 2.18%, 0.75%, and 0.28%, respectively.

Numerical Differential Error Analysis
When performing the position measurement of the grounding grid conductor, due to the limitations of the measurement equipment size, measurement time consumption, and other factors, it was not possible to measure a sufficient number of data points at the substation; thus, the horizontal component of the magnetic flux density measured on a certain survey line was a discrete sequence. When the differential method is used to locate the grounding conductor, a numerical calculation method is required. However, since the measured information did not contain the function expression and the noise introduced in the measurement process was unavoidable, the calculation result obtained by the The results of the simulation are shown in Table 2. The grid spacing defined in the simulation is 5 m, and the errors of the grid spacing according to functions |B y (y)|, |B (2) y (y)|, and |B (4) y (y)| are 2.18%, 0.75%, and 0.28%, respectively.

Numerical Differential Error Analysis
When performing the position measurement of the grounding grid conductor, due to the limitations of the measurement equipment size, measurement time consumption, and other factors, it was not possible to measure a sufficient number of data points at the substation; thus, the horizontal component of the magnetic flux density measured on a certain survey line was a discrete sequence. When the differential method is used to locate the grounding conductor, a numerical calculation method is required. However, since the measured information did not contain the function expression and the noise introduced in the measurement process was unavoidable, the calculation result obtained by the difference quotient did not have high reliability, and the accuracy of the difference quotient result depends on the step size of the difference, i.e., the measurement interval. Sometimes, a small difference step size may lead to a large calculation error [38]. Therefore, it is necessary to analyze the sources of error in the process of numerical differentiation. In the following, the error situation of the magnetic field differential is analyzed from the perspective of truncation error and rounding error.
The formula for the central difference quotient commonly used In numerical differentiation can be expressed as: where d is the differential step size. (7) after performing Taylor expansion at x = x 0 , the truncation error is: where , and a is the center of the interval over which the maximum From the perspective of truncation error, the smaller the step size d, the more accurate the calculation result of numerical differentiation.
Considering the truncation error in the process of magnetic field differentiation, for the current-carrying grid shown in Figure 3, the survey line x = x 0 is selected, the coordinates of the measurement starting point are (x 0 , y 0 ), and the position of the k-th measurement point along the survey line on the y-axis is noted as y k = y 0 + kd, where d is the measurement interval. The nth order difference quotient of the y-direction component of the magnetic flux density B y (y) can be expressed as: where the order n ≥ 1, when n = 1, B t (y k ) = B(y k ). The truncation error due to numerical differentiation can be expressed as the difference between the difference quotient and the differential quotient: When performing numerical difference calculations, the difference of two approximately equal numbers can result in a significant loss of valid numbers. The input point f (x + d) of the difference quotient is denoted asf (x + d), and the error between the input pointf (x + d) and the real value f (x + d) is denoted as ε.
The error between the real value of the nth-order derivative f (n) (x) of function f (x) and its numerical calculation result can be expressed as: where a ∈ (x − d, x + d). If ε m = max{|ε 1 |, |ε 2 |} is defined, the upper bound E rmax of the rounding error can be expressed as: Therefore, from the perspective of rounding error, a step size d that is too small will result in a large rounding error.

Peak Position Error Analysis
In order to accurately locate the grounding grid conductor, it is necessary to determine an optimal measurement interval d. The mathematical expectation M(d) and variance D(d) of the peak deviation can be used to describe the degree of the conductor positioning error, which is derived below.
First, consider the impact of the randomness of the measurement points on the position error of the main peak. The survey line x = x 0 is selected, the coordinates of the measurement starting point are (x 0 , y 0 ), and the position of the k-th measurement point along the survey line on the y-axis is noted as y k = y 0 + kd, where d is the measurement interval. The probability density function of the truncation error E t (y k ) at y k is p t = 1/d; thus, the randomness of E(y k ) is determined by the rounding error.
Let the probability density of the rounding error E r at a measurement point be p r , and p r under the same measurement step d and order n is not affected by the location of the measurement point; thus, p r is a function of E r , where E r is a uniformly distributed random variable on [−E rmax , E rmax ]. Then: At the n-th order, E r is obtained by accumulating the two rounding errors E r1 and E r2 of the n-1 order, and then p (n) ) can be expressed as: When n = 1~4, the distribution of p(n) r with respect to E r is shown in Figure 6.

Peak Position Error Analysis
In order to accurately locate the grounding grid conductor, it is necessary to determine an optimal measurement interval d. The mathematical expectation M(d) and variance D(d) of the peak deviation can be used to describe the degree of the conductor positioning error, which is derived below.
First, consider the impact of the randomness of the measurement points on the position error of the main peak. The survey line x = x0 is selected, the coordinates of the measurement starting point are (x0, y0), and the position of the k-th measurement point along the survey line on the y-axis is noted as yk = y0 + kd, where d is the measurement interval. The probability density function of the truncation error Et(yk) at yk is pt = 1/d; thus, the randomness of E(yk) is determined by the rounding error.
Let the probability density of the rounding error Er at a measurement point be pr, and pr under the same measurement step d and order n is not affected by the location of the measurement point; thus, pr is a function of Er, where Er is a uniformly distributed random variable on [−Ermax, Ermax]. Then: At the n-th order, Er is obtained by accumulating the two rounding errors Er1 and Er2 of the n-1 order, and then can be expressed as: When n = 1~4, the distribution of p (n) r with respect to Er is shown in Figure 6.  The total error E(y k ) is the sum of the truncation error and rounding error; thus, the probability density function p(E(y k )) at y k can be expressed as: The error at y k is E(y k ) and is denoted as event k; each event k is independent of each other, and the probability density function of events 1, 2, . . . , m being established at the same time is m ∏ k=1 p(E(y k )), where the value range of E(y k ) is as follows: The peak position of the measured and calculated value B C (y) of the n-th order derivative of the magnetic flux density is denoted as y pC . Due to the presence of errors, there is a deviation between y pC and the peak position y pR of the real value B R (y). The deviation ∆y p is the difference between the calculated value and the real value, i.e., ∆y p = y pC − y pR . The probability density function m ∏ k=1 p(E(y k )) is used to derive the mathematical expectation of the main peak position error.
First, consider the mathematical expectation of the offset caused by the error E 1 at y 1 when the errors of other points are constant. Assuming that E 1 takes only s discrete values, E 10 , E 10 + ∆E 1 , E 10 + 2∆E 1 , . . . , E 10 + (s − 1)∆E 1 , it corresponds to the distribution of a total of s function errors on y, and the cumulative expectation is: Extending E 1 from the discrete distribution to the case of continuous distribution, i.e., s → ∞ , the above formula becomes: Equation (19) represents the mathematical expectation of the offset due to the error E 1 at y 1 when the error at other points is constant. Y q = p(E(y 1 ))∆y p1 . ξ(y 1 ) is the result of integrating m ∏ q=1 p(E(y q ))∆y p over E(y q ), i.e., Equation (20) represents the expectation obtained by taking all possible cases of E(y 1 ), E(y 2 ), . . . , E(y m ) at y 1 .
Notice that ∆y p is affected by all y i ; thus, the above equation cannot be expressed in . Finally, consider that y 1 can be varied within the first interval segment [y min , y min + d). In summary, the mathematical expectation M(d) of the main peak deviation can be expressed as: At the same time, the degree of dispersion of Y q should also be considered; thus, the variance D(d) of the main peak position error caused by d can be expressed as:

Simulation Experiment
The time complexity of the algorithm used to calculate the main peak position error expectation M(d) and the main peak position error variance D(d) is exponential time complexity O(k n ). It is difficult to obtain results quickly through computation, but the constructed and described stochastic process and probability distribution are completely accurate models; thus, the Monte Carlo simulation can be used to obtain approximate results of the problem. The method of the Monte Carlo simulation increases the number of trials, and if the test results converge when the number of trials is sufficient, the final converged value is used as the simulation result.
First, the mean peak position error M(d) and the variance of the peak position error D(d) were calculated at a given measurement step d. Taking the current-carrying grid in Figure 3 as an example, the selected survey line was x = 6 m and the measurement step d was 0.05 m. The expectation M(d) and the variance D(d) of the main peak position error at the second-order differential and the fourth-order differential for the three conductors (y = 0 m, y = 5 m, y = 10 m) were calculated using Monte Carlo simulations, and the results are shown in Figure 7.

Simulation Experiment
The time complexity of the algorithm used to calculate the main peak position error expectation M(d) and the main peak position error variance D(d) is exponential time complexity O(kⁿ). It is difficult to obtain results quickly through computation, but the constructed and described stochastic process and probability distribution are completely accurate models; thus, the Monte Carlo simulation can be used to obtain approximate results of the problem. The method of the Monte Carlo simulation increases the number of trials, and if the test results converge when the number of trials is sufficient, the final converged value is used as the simulation result.
First, the mean peak position error M(d) and the variance of the peak position error D(d) were calculated at a given measurement step d. Taking the current-carrying grid in Figure 3 as an example, the selected survey line was x = 6 m and the measurement step d was 0.05 m. The expectation M(d) and the variance D(d) of the main peak position error at the second-order differential and the fourth-order differential for the three conductors (y = 0 m, y = 5 m, y = 10 m) were calculated using Monte Carlo simulations, and the results are shown in Figure 7.  It can be seen from Figure 7 that the error expectation and variance of the main peak position at the three conductor positions (y = 0 m, y = 5 m, y = 10 m) gradually tended to converge as the number of simulation tests increased; thus, the convergence value can be used as the expectation and variance of the main peak position error of the simulation.
Then, Monte Carlo simulations were used to calculate the expectation M(d) and variance D(d) of the main peak position error at three conductor locations (y = 0 m, y = 5 m, y = 10 m) with different measurement steps along the survey line x = 6 m, where the measurement step d takes values from 0.01 m to 1 m. When the number of simulation experiments was 10 4 times, the expectation and variance of the main peak position error for the second-and fourth-order differentials of the magnetic field at each measurement step d are shown in Figure 8. converge as the number of simulation tests increased; thus, the convergence value can be used as the expectation and variance of the main peak position error of the simulation. Then, Monte Carlo simulations were used to calculate the expectation M(d) and variance D(d) of the main peak position error at three conductor locations (y = 0 m, y = 5 m, y = 10 m) with different measurement steps along the survey line x = 6 m, where the measurement step d takes values from 0.01 m to 1 m. When the number of simulation experiments was 10 4 times, the expectation and variance of the main peak position error for the second-and fourth-order differentials of the magnetic field at each measurement step d are shown in Figure 8.
According to Figure 8, the second-order differentiation, the main peak position error expectation, and variance diverged when d was close to 0, and they reached the minimum when d = 0.04 m and gradually increased with the increase of d. At this time, the local optimum value of the measurement step was 0.04 m. Similarly, when the order was 4, the local optimal value of the measurement step was 0.06 m.  Table 3. Step Size, d [m] (d) According to Figure 8, the second-order differentiation, the main peak position error expectation, and variance diverged when d was close to 0, and they reached the minimum when d = 0.04 m and gradually increased with the increase of d. At this time, the local optimum value of the measurement step was 0.04 m. Similarly, when the order was 4, the local optimal value of the measurement step was 0.06 m.
Finally, to confirm the generalizability of the locally optimal step size derived from the x = 6 m survey line, several survey lines were selected at different locations to calculate the main peak position error expectation M(d) and variance D(d) using the Monte Carlo simulation. The survey line x 0 was taken in the range of [0 m, 10 m], and each time x 0 was increased by 2 m. The calculation results are shown in Table 3. Table 3. Local optimal step size at different survey line positions.
x 0 /m 0 2 4 6 8 10 Step If the magnetic field differentiation method is used to locate the grounding grid conductors at the power substation and it is desired to minimize the impact of the numerical differential calculation error on the conductor location, an optimal measurement step needs to be selected. According to the results in Table 3, the measurement step size d = 0.04 m or d = 0.05 m can be selected as the optimal measurement step size.

Substation Field Experiment
In order to verify the effectiveness of the optimal step size selection, a field experiment of substation grounding grid conductor positioning was carried out. In the experiment, three different measurement steps were used to measure the magnetic flux density on the surface along the survey line, and the differential method was used to calculate the second-order and fourth-order differentials of the magnetic flux density at each step.
The schematic diagram of the conductor positioning experiment is shown in Figure 9a. The current output of the excitation source was connected to grounding lead conductors at the diagonal position in the test area. Eight PCB coils formed an array of magnetic field sensors with adjustable spacing. The signal conditioning circuit filtered and amplified the output signal of the magnetic field sensor. An 8-channel, 24-bit ADC (ADS1278) was used to convert the analog signal from the signal conditioning circuit into a digital signal. The ESP32 microcontroller communicated with the ADC through the SPI interface and sent the converted digital signal to the laptop via Wi-Fi. A photo of the experimental site is shown in Figure 9b.  If the magnetic field differentiation method is used to locate the grounding grid conductors at the power substation and it is desired to minimize the impact of the numerical differential calculation error on the conductor location, an optimal measurement step needs to be selected. According to the results in Table 3, the measurement step size d = 0.04 m or d = 0.05 m can be selected as the optimal measurement step size.

Substation Field Experiment
In order to verify the effectiveness of the optimal step size selection, a field experiment of substation grounding grid conductor positioning was carried out. In the experiment, three different measurement steps were used to measure the magnetic flux density on the surface along the survey line, and the differential method was used to calculate the second-order and fourth-order differentials of the magnetic flux density at each step.
The schematic diagram of the conductor positioning experiment is shown in Figure  9a. The current output of the excitation source was connected to grounding lead conductors at the diagonal position in the test area. Eight PCB coils formed an array of magnetic field sensors with adjustable spacing. The signal conditioning circuit filtered and amplified the output signal of the magnetic field sensor. An 8-channel, 24-bit ADC (ADS1278) was used to convert the analog signal from the signal conditioning circuit into a digital signal. The ESP32 microcontroller communicated with the ADC through the SPI interface and sent the converted digital signal to the laptop via Wi-Fi. A photo of the experimental site is shown in Figure 9b.  Figure 10 shows a schematic diagram of survey lines and the topology of part of the substation's grounding grid. The spacing of the ground grid conductors in the experimental area was unevenly distributed. The measurement area is shown in Figure 10, where the red dotted lines indicate the survey lines. Ten survey lines were laid out with a line spacing of 0.5 m. Each line was 20 m long, with a measurement point spacing of 0.02 m, 0.05 m, and 0.10 m. The sensing array was measured along the survey lines to record data at all locations. Two conductors, A and B, whose approximate positions were known, were located below the survey line.  magnetic flux density calculated from the measurement results, respectively. It can be seen from the figure that the calculation result of the second-order differential can improve the Widess resolution and maintain the peak characteristic of the conductor position. However, due to the influence of numerical differential error and random noise in the measurement process, the calculated value of the fourth-order differential did not have good peak characteristics, and it is difficult to distinguish the position information of the conductor from the result.  Figure 11a shows the normalized absolute value of the magnetic flux density measured along the survey line when the measurement step length d = 0.02 m. Figure 11b,c shows the normalized absolute values of the second-and fourth-order differentials of the magnetic flux density calculated from the measurement results, respectively. It can be seen from the figure that the calculation result of the second-order differential can improve the Widess resolution and maintain the peak characteristic of the conductor position. However, due to the influence of numerical differential error and random noise in the measurement process, the calculated value of the fourth-order differential did not have good peak characteristics, and it is difficult to distinguish the position information of the conductor from the result. Figure 12a shows the normalized absolute value of the magnetic flux density measured along the survey line when the measurement step length d = 0.05 m. Figure 12b,c shows the normalized absolute values of the second-and fourth-order differentials of the magnetic flux density calculated from the measurement results, respectively. It can be seen from the figure that the calculation results of the second-order differential and fourth-order differential can both improve the Widess resolution and maintain a good conductor position peak characteristic, and the calculation results reflect the actual position of the conductor.
Combined with the conclusion in Section 3.1, the local optimal measurement step d can be selected as 0.04 m or 0.05 m. Comparing Figures 11c and 12c, it was found that, due to the influence of rounding errors, the fourth derivative of the magnetic flux density when the measurement step d = 0.02 m, compared with d = 0.05 m, the peak characteristic was completely lost, and the conductor was difficult to locate through the differential result. Comparing Figures 11b and 12b, it was found that, due to the influence of rounding errors, the peak characteristic fluctuation of the second derivative of the magnetic flux density was more obvious when the measurement step length d = 0.02 m compared with d = 0.05 m, and the impact of measurement errors on the calculation results was more significant. This result is consistent with the conclusion stated in Section 3.1. Figure 10. Schematic diagram of survey lines and topology.   Figure 12b,c shows the normalized absolute values of the second-and fourth-order differentials of the magnetic flux density calculated from the measurement results, respectively. It can be seen from the figure that the calculation results of the second-order differential and fourthorder differential can both improve the Widess resolution and maintain a good conductor position peak characteristic, and the calculation results reflect the actual position of the conductor.   Figure 12b,c shows the normalized absolute values of the second-and fourth-order differentials of the magnetic flux density calculated from the measurement results, respectively. It can be seen from the figure that the calculation results of the second-order differential and fourthorder differential can both improve the Widess resolution and maintain a good conductor position peak characteristic, and the calculation results reflect the actual position of the conductor.  The measurement and calculation results when the measurement step length d = 0.10 m were close to the situation when d = 0.05 m, which can improve the Widess resolution while maintaining the peak characteristics. The measurement and calculation results under this condition are no longer listed separately.
In addition, the integer multiple decimation of the measurement data under the condition of d = 0.05 m can obtain part of the original measurement data under the condition of a larger measurement step. Numerical differential operation was performed on the extracted data, and its peak characteristics and Widess resolution were close to the case of d = 0.05 m. However, as the extraction multiple increased, the error between the measured value and the actual value of the conductor peak position gradually increased.
In summary, the experimental results are in good agreement with the simulation conclusions in Section 3.1; that is, there exists a local optimum value for the measurement step, and the selection of a suitable measurement step can reduce the error of conductor positioning.

Conclusions
An improved magnetic field method was proposed to locate unknown grounding grid conductors. The influence of the truncation error and rounding error of the magnetic field differential on the positioning of grounding grid conductors was studied, and the optimal measurement step size under different differential orders was given. By selecting the optimal measurement step size, the accuracy of the magnetic field differential method for locating the conductor of the grounding grid was improved. Through theoretical analysis and experimental verification, the following conclusions were drawn: • A small measurement step causes a large rounding error in the numerical differentiation. With the increase of the measurement step, the truncation error caused by the numerical differentiation increases the error of the conductor positioning.

•
The peak position deviation expectation and variance showed a trend of first decreasing and then increasing with the increase of the measurement step size. The measurement step size under different differential orders had a local optimum value, and the range of the local optimum value was given; this result is verified by simulation and experimental results. • Choosing a reasonable measurement step size for different differential orders helps to improve the positioning accuracy of the grounding grid conductors.
The error analysis method in this paper expands the possibility of using the magnetic field differential method to reduce the error of grounding grid conductor positioning. At the same time, the results of this paper can provide a reference for the structural design of the magnetic field measurement sensor array, and the grounding grid conductor positioning instrument designed by the results of this study will have a higher conductor positioning accuracy, which is beneficial to the fault diagnosis work of large-scale substations.

Conflicts of Interest:
The authors declare no conflict of interest.