#### 2.2. Bias Current Calculation Method

The grounding current forms a potential in the substation grounding system near the grounding electrode, where the Earth acts as part of the DC path. The DC current flows into the alternating current (AC) system near the grounding electrode through the transformer neutral point, which causes a DC bias in the transformer [

20]. Therefore, the problem becomes a circuit calculation. Previous works generally used the neutral-point DC current to characterize the severity of the transformer DC bias [

21]. However, the neutral-point DC current cannot reflect the DC current in the series windings of the autotransformers (

Figure 1). The autotransformer equivalent circuit is generally modelled as in

Figure 1. This paper proposes the use of the transformer effective bias current to describe the influence of the grounding current on the transformers, and to determine the optimal CBD and RCLD configuration. The effective bias current

I_{e} on autotransformer

T (

Figure 1) is defined considering its magnetic flux, as follows:

I_{e} can be calculated according to the autotransformer equivalent circuit (

Figure 1), as follows:

where

I_{h} and

I_{m} are the DC currents flowing into the autotransformers from the HV and medium voltage (MV) sides, respectively;

k_{T} is the ratio of the HV to MV sides of the autotransformer;

V_{h},

V_{m}, and

V_{s} are the potentials of HV node

h, MV node

m, and neutral-point node

s, respectively, with the reference point being

s; and

y_{hm} and

y_{ms} are the admittance of the series winding and common winding, respectively. Equations (5)–(7) are obtained from the autotransformer equivalent circuit. Equation (4) means that the transformer effective bias current

I_{e} is the sum of the DC current at both the HV side

I_{h} and at the MV side

I_{m}, which should be multiplied by the ratio of turns to convert to the HV side. According to the theory of the node admittance matrix, the current can be converted into the product of voltage and conductance.

**V**_{a} is the node voltage matrix, and the matrix

**Φ**_{a} is the corresponding conductivity of each winding after being converted to the HV side. The derivation process is based on the circuit shown in

Figure 1.

For an ordinary transformer that is not an autotransformer, there is no electrical link between the HV side and the MV side; thus, the effective bias current is the neutral-point current. The effective bias current,

I_{E}, in an ordinary transformer,

t, (

Figure 2) is defined as follows:

where

V_{k} and

V_{o} are the potentials of HV node

k and neutral point node

o, respectively, and

y_{ko} is the admittance of the winding.

When a DC current is injected into the ground through an electrode, a potential distribution forms around the electrode. The bias currents are through toward the transformers (through transmission lines) when their neutral-point potentials are different. Only the resistances need to be considered for a DC circuit. When the CBD is not installed at the neutral point,

d, of one transformer, the current,

I_{d}, injected into

d is as follows:

where

V_{d} represents the ground potential at node

d caused by the grounding electrode, and

R_{d} is the ground resistance corresponding to node

d. The relationship between the node voltage vector,

**V**, and the node injection current vector,

**I**, is as follows:

The common winding current will be 0 if a capacitance device is installed at the neutral point of autotransformer

T, but the series winding current will not be 0. Then,

I_{e} is given by the following:

where

y_{hm} is the series winding conductance. If the neutral point of autotransformer

T is not equipped with a capacitance device,

I_{e} is given by the following:

If a resistance device is installed, the capacitance of the autotransformers and ordinary transformers will change, as follows:

where

r is the resistance installed at the transformer neutral point. The matrix

**Φ** is defined to represent the full-network substation effective bias current

**I**_{eff}, as follows:

where

**Φ** is related to the transformer parameters and whether the neutral point is equipped with a blocking device. In the same substation, the bias current in one transformer will flow to other transformers if only one transformer has an installed CBD, which will aggravate the DC bias of the other transformers. Therefore, when installing DC blocking devices for each substation, all of the main transformers in this substation are assumed to be blocked. Then,

**I**,

**Φ**, and

**Y** will change, and the effective bias current of each transformer will change accordingly. Assuming that

S CBDs and RCLDs are installed in the system, the effective bias current of the substation is given by the following:

where

**Φ**_{s} and

**Y**_{s} represent the changes in

**Φ** and

**Y** after the blocking devices are installed in substation

s.

#### 2.3. Combination Optimization Configuration Method for Capacitance and Resistance Devices

When suppressing the DC bias by installing CBD and RCLD devices at the neutral points of the transformers, the priority is to ensure that the effective bias current of all of the transformers in the power system does not exceed a set limit. On this basis, the minimum number of devices necessary that must be installed in the entire network can be determined. The objective function is given by the following:

where

S represents the number of installed CBDs or RCLDs,

A_{lim} is the set limit, and

T_{i} is the blocking device. The constraint is defined as follows:

An exhaustive method can be used to solve the above optimal configuration problem when only a few substations exist in the target system. In other words, according to the constraints, all of the configuration schemes can be exhausted to find the global optimal solution. However, the computational cost of the exhaustive method increases rapidly with the increasing number of substations, eventually making the problem impossible to solve. Thus, the problem should be solved using a discrete optimization to rationally select the substation where the device should be installed, considering that numerous substations exist in the equivalent model. In this case, an artificial intelligence method can be adopted, such as genetic [

22,

23,

24], particle swarm [

25,

26], or simulated annealing algorithms [

27,

28]. After researching various model algorithms, we found that a genetic algorithm is particularly suitable for this discrete optimization problem, because it can effectively manage any form of objective function and constraint. A genetic algorithm can also effectively search global information with probabilistic meaning. In this paper, the resistance continuity problem is neglected when selecting the RCLD, and a resistance value of 3 Ω is directly selected and optimized together with the CBD, to illustrate that combination optimization is better than single optimization.

Genetic algorithms evolve better approximate solutions from generation to generation, according to the principle of survival of the fittest after the initial population emerges. In each generation, individuals are selected according to their fitness in the problem domain. The population representing the new solution set is generated by combining crossovers and mutations with genetic operators of natural genetics, and the individual of the new population is closer to the optimal solution. This paper also amends the traditional roulette selection method (

Figure 3) to improve the selecting ability of the selection operator. The population size is set as

N, and the probability of each individual being selected is

P_{1},

P_{2},…,

P_{N}, where the sum of the selected probabilities is 1. Each round of selections produces a uniform random number between [0, 1] as the selection pointer, and an individual is selected based on where the pointer falls. After

n rounds of selection, the probability of individual selection in round

p (0 <

p <

n) is compared, and the individual with the greatest probability is selected. The

p value can be adjusted freely according to the actual situation during the selection operator process. This improved roulette selection method not only reduces the errors caused by the randomness, but also maintains the diversity of the population. The overall process is described in

Figure 4. First, a random matrix is generated, which is uniformly distributed between [0, 1] and mutually identical to the population matrix. Each element value in the population matrix is determined by each corresponding element value in the random matrix. The elements on each chromosome in the population matrix represent whether the corresponding substation installs a device, as well as what kind of device to install. The initial population size is 80, and the maximum number of iterations is set to 200. Moreover, the crossover probability and mutation probability are 0.9 and 0.2, respectively, where the crossover probability determines whether a crossover operation is performed, and the mutation probability determines whether a mutation occurs in the child. This variation is directly reflected in the transition from the original installation to the other two installations. The new individuals are generated by crossover and mutation, according to the rule that, if the number of installations cannot decrease, the experienced crossover and mutation will be invalid.