Investigation and Optimization of Grounding Grid Based on Lightning Response by Using ATP-EMTP and Genetic Algorithm

A large number of electromagnetic transient studies have been analyzed for finding the overvoltage behavior of power system. A grounding grid of power system is so important for reducing the effect of overvoltage phenomena during a short-circuit event. Two sections are important in grounding system behavior: soil ionization and inductive behavior; this paper focuses on the inductive manner of grounding grid. The grounding grid is considered as a conductor segment; each conductor segment acts as a grounding unit. In this paper, the transient methodology is introduced to investigate the lightning effect on grounding body at each point of grounding grid in normal and optimized conditions. Genetic algorithm is applied for regular and irregular grounding grid to obtain best values of mesh size with the lower ground potential rise (GPR) as compared with the normal condition for more safety. The grounding grid is a combination of inductance, resistance, and capacitance. This model is suitable for practical applications related to fault diagnosis. Several voltages on different positions of grounding grid are described in this paper using ATP-EMTP and genetic algorithm. The computer simulation shows that the proposed scheme is highly feasible and technically attractive.


Introduction
In daily life, electricity plays a vital role. Electrical power system consists of generation, transmission, and distribution. It is very important to secure this transmission and distribution for the safety of customers. For more safety, the grounding system at specific points has been predicted in a power grid. A number of articles had been discussed about human safety in the surroundings of grounding system or other electrical devices [1][2][3]. There are two important sections for improving performance at the grounding grid, firstly reducing fault current and secondly optimizing the grid configuration. Reducing fault current is so difficult or impractical in the grounding grid [4,5]. Then, the modification of grounding grid configuration is frequently used, which can be reached by changing of the grid mesh and adding vertical grounding rods for getting more efficiency [6][7][8]. The behavior of grounding grids under lightning stroke is explained with more details and analysis in [9]. The purpose of the ground system is twofold: the first is to provide safety against electric shock, which can cause harm to people and the second is to provide the proper operating level for the power system when a fault occurs. For managing safety in a ground grid against fault, problems like lightning need to be simulated with the different software; for example, TRAGSYS is used to simulate and to analyze the transient on transformer terminals by taking into account the grounding effects [10]. ETAP software was proposed for ground grid mesh designing by using the latest IEEE 81 2013 standard for ground grid mesh data [11]. The rigorous electromagnetic model was suggested for analyzing the lightning surge efficiency of grounding grids. The result of the proposed model shows that values of the grounding grid impulse coefficients are nearly linear dependent on the side length of square grids [12]. The author at [13] proposed the external charge method to design for grounding grids. For estimation of grounding grid parameters, boundary element method is used. The advantages of these methods are the ability to calculate parameters of complex groundings in homogeneous and double-layered soil with parallel boundaries of discontinuity of the soil electrical conductivity under lightning stroke [14][15][16]. In some papers, the transient electromagnetic (TEM) method is used to draw the configuration of a substation for optimization of grounding grid under lightning stroke [17][18][19].
In this paper, we achieve to figure out the configuration of grounding grids using ATP-EMTP. Firstly, we show a simulation of grounding in ATP-EMTP under lightning stroke in normal computation. Secondly, genetic algorithm is suggested to a system for optimization of grounding grids. The complete configuration of grounding grids will be clearly and accurately shown on the map. Surface voltages and mesh size before and after optimization will be investigated under lightning stroke in a grounding grid. Each stroke lasts normally less than one millisecond, and the separation time between the strokes is typically a few tens of milliseconds.

Analytical Lightning Current in ATP-EMTP
When lightning attaches to the substation, two current waves distribute in the substation. The first one is moving upwards to reach a maximum value of lightning current, and the second one goes down towards zero value. The speed of the lightning current in the first section as shown in Figure 1 is very close to the speed of light, and in the second section, it gradually decreases with the speed less than that of light (usually 1/3 to 2/3 of the speed of light). The analytical expression is usually adopted to represent the injected current i o (t) in the Heidler function, defined as where I is a control of the current amplitude, τ 1 is the front time constant, τ 2 is the decay time constant, and n is an exponent having values between 1.1 to 20. Figure 1 shows the example of the lightning current curve when the lightning happens.

Grounding Grid in Power System
The substation grounding system comprises a grid (earth mat) formed by a horizontal buried conductor. The functions of grounding systems or earth mat include the following: (1) To ensure safety to personnel in substations against electrical shocks (2) To provide the ground connection for connecting the neutrals of star-connected transformer winding to earth (neutral earthing) (3) To discharge the overvoltages from overhead ground wires or the lightning mats to earth (4) To provide a path for discharging the charge between phase and ground by means of earthing switches (5) To provide earth connections to structures and other noncurrent carrying metallic objects in the substation (equipment grounding) Figure 2 shows the general arrangement of an earth electrode system at an electrical substation.    foundations and inside fenced areas and so on. Figure 3 shows the three-dimensional view of the earthing system.

Computation Test Cases
The proposed model representation of grounding electrodes includes properly arranged size of inductances and resistances. Figure 4 shows the parameter model of elementary grounding electrode segment.
The longitudinal resistance "R" and self-inductance "L" for each elementary cell is obtained by using the following classical expressions: where "l" is the length of the elementary cell, "r" is the radius of the electrode, "ρ cu " is the resistivity of the material, and "h" is the buried depth, and the magnetic permeability of the material has been assumed equal to the vacuum permeability, μ 0 = 4 ⋅ π ⋅ 10 −7 [21]. An equivalent circuit of the ground rod is shown in Figure 5. The resistance, inductance, and capacitance of the under transient phenomenon are calculated by [22] where "ρ" is solid resistivity (Ω-m), "l i " is the total length of ground rod (m), "d" is the diameter of the ground rod (m), and "ε r " is the relative permittivity of solid. Also, stoke current pulse has a peak value of I m = 30 kA, and a zero to peak time is 4 μs.
16-grounding-mesh model is simulated by implementing all data in ATP-EMTP. Randomly, three points are selected for analyzing the effect of the grounding grid when lightning happens in the substation. Figure 6 shows the 16-mesh model of regular grounding.
The grid is hit by lightning current pulse I m = 30 kA as shown in Figure 7. The dimensions of the grid have a 60 × 60 m 2 and 15 × 15 m 2 mesh and are buried in soil with 30 Ωm resistivity.
As shown in Figure 8, three selected points are investigated. Figure 9 shows the ground potential rise (GPR) at points A, B, and C in ATP-EMTP. It can be seen that voltages in points are different when lightning happens in the grounding system.
The next case study included in this paper is for analyzing irregular grounding grid when lightning hit in the system.

Complexity
16-grounding-irregular-mesh model is designed and simulated in ATP-EMTP. In this case, three points are selected for analyzing the effect of the grounding grid randomly, when lightning happens in the substation earlier discussed in Figure 6. Figure 10 shows the 16-irregular-mesh grounding grid. The dimension of the grid has a 60 × 60 m 2 , 11 × 12 m 2 , 11 × 18 m 2 , and 12 × 19 m 2 meshes and is buried in soil with 30 Ωm resistivity.
The length of elementary cells of the irregular mesh is listed below. Based on the (2) and (3), all the longitudinal resistance "R" and self-inductance "L" for each elementary cell of the irregular mesh are obtained as shown below.   4 Complexity Figure 11 shows the GPR at points A, B, and C as shown in Figure 10. As it can be seen, voltages in points are different with the irregular ground grid when lightning hit the grounding grid.
Reducing maximum voltage of regular and irregular grounding grid after lightning hit in the system is so important for safety. For that reason, it is better to change the size of the mesh with the same total area of the grounding grid. For obtaining best mesh size, it is suggested to use algorithm methods. Few algorithm methods are applied in the lightning field in the power system [23,24]. But in this case, for optimization of mesh size and reduction of maximum ground potential rise, genetic algorithm is suggested.

Minimization of GPR Using Genetic Algorithm
For designing an optimal grounding grid with more safety, genetic algorithm [25,26] is applied in ATP-EMTP. The representation of each possible grid is made by means of a string of bits V. This string is made of two substrings V x and V y with lengths N x and N y , respectively. Each substring represents the conductors arranged in each possible direction. N x and N y are the maximum numbers of wires parallel to the y-and x-axes, respectively, forming the grid. Hence, the minimum possible distance between any two wires parallel to the y-axis is and to the x-axis is where L x and L y are the total dimensions of the grid. Each bit corresponds to one possible situation of a wire in the grounding grid. If the grid has a conductor in the i position, the respective bit value is 1. Otherwise, the bit value is 0 (see Figure 12).

Complexity
First of all, a population is generated in a random way. Starting from this population and by means of the basic crossover and mutation operators, the following new populations are generated. In each generation, all the individuals are analyzed to evaluate their fitness as optimum solution to the problem. The model used in the analysis of the grounding grids is independent of the genetic algorithm. In this case, a typical method for studying grounding systems at low frequency is used. This method, named "Combined Integration/ Matrix Method" is based on subdividing the conductors of the grounding grid into smaller segments. The density of leaking current in each segment may be considered constant. So, a matrix relationship between the currents and the corresponding potentials in all the segments can be calculated. The elements of the abovementioned matrix are obtained by integration. If the grid is assumed equipotential, the values of the leaking currents can be calculated. Knowing the leaking currents, the potential at any point on the earth's surface can be calculated. In order to take into account the effect of the boundary ground air, the traditional method of images is used.
The objective function to be minimized is GPR. The constraints of step and touch voltages which must be strictly observed could be introduced by assigning a null value to the fitness function for the grids which do not meet them [27]. Genetic parameters, for example, population size, crossover rate, and mutual rate, are the entities that assist in tuning the genetic algorithm performance. All of the data is applied in ATP-EMTP for optimization of the grounding grid. The genetic algorithm defined new mesh size for reducing GPR in the grounding grid.
For new mesh size, new R and L should be defined in ATP-EMTP using (2) and (3), new data obtained for grounding grid shown in below equations. After applying the genetic algorithm in ATP-EMTP, the mesh size in the regular ground grid is changed to a new value but the total area of the grounding grid is the same. Figure 13 shows the new value of mesh size in the regular grounding grid system. Figure 14 shows the ground potential rise (GPR) at points A, B, and C in ATP-EMTP after applying genetic algorithm with new mesh sizes. It can be seen that voltages in points are less than those in Figure 9 when lightning hits the grounding grid system. As the size of mesh changes, the value of GPR decreases. For obtaining best results, a genetic algorithm is applied in the grid using ATP-EMTP. Decreasing GPR causes increasing safety in the grounding grid. Also, voltage dead time is reduced by genetic algorithm optimization in comparison with normal conditions. Table 1 shows the values of GPR before and after optimization of a genetic algorithm using ATP-EMTP when the grounding grid mesh sizes are regular.
As shown in Table 1 at point A, the maximum GPR is reduced from 67.85 kV to 66.5 kV, at point B from 45.27 kV to 43.5 kV, and at point C from 28.5 kV to 27.35 kV, respectively. Also for voltage, the dead time at point A is decreased from 9.17 V to 9.085 V, at point B from 9.42 V to 9.34 V, and at point C from 7.035 V to 6.967 V, respectively.
In the other case study for irregular grounding grid, after applying the genetic algorithm in ATP-EMTP, all elementary cells of irregular mesh changed in optimum value that is written below.

Complexity
Based on (2) and (3), all the new longitudinal resistance "R" and self-inductance "L" for each elementary cell of the irregular mesh after optimizing are obtained below.  Figure 15 shows the GPR at points A, B, and C that is determined in Figure 10.
It can be seen that voltages in points are different with irregular ground grid after applying the genetic algorithm in ATP-EMTP when lightning hit the grounding grid. All sizes of meshes are optimized but the total area of the grounding grid is the same as the original size. Table 2 shows the values of GPR before and after optimization of a genetic algorithm using ATP-EMTP when grounding grid mesh sizes are irregular.
As shown in Table 2 at point A, the maximum GPR is reduced from 59.095 kV to 54.51 kV, at point B from 39.04 kV to 35.48 kV, and at point C from 21.06 kV to 19.4 kV, respectively. Also for voltage, the dead time at point A is decreased from 11.54 V to 9.28 V, at point B from 12.78 V to 10.24 V, and at point C from 9.4 V to 6.9 V, respectively.

Conclusions
This paper proposed the transient methodology to investigate the lighting stroke effect on grounding grid by calculating various voltages at different nodes using ATP-EMTP toolbox and optimizing ground grid size by using a genetic algorithm. The simulation result acknowledges the behavior and impedance of grounding based on mesh size grid when lightning happened.
Grounding grid data is simulated in ATP-EMTP for investigation of lightning effect; also, to measure GPR and mesh grid size, both are simulated in the ATP-EMTP for checking surface voltage at the grounding grid. Achieving the best result of GPR and mesh grid size is a target for more safety. For getting this condition, genetic algorithm is applied in ATP-EMTP. Also after optimization, there is a minor change in the value of grid impedance but the amplitude of mesh size is so important for reducing GPR. Analysis and optimization result of regular and irregular grounding shows that irregular grounding is safe than regular grounding grid. The total GPR in irregular grounding grid is lower than that in regular grounding grid in terms of safety condition. Changing amplitude of mesh changed the value of GPR. GPR and grounding mesh size are optimized up to an optimum value by using genetic algorithm than normal condition without optimization. Also, irregular grounding grid system is better than regular grounding grid; it should be recommended.

Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
The authors declare that there is no conflict of interests regarding the publication of this paper.