A fault segment location method for distribution networks based on spiking neural P systems and Bayesian estimation

With the increasing scale of distribution networks and the mass access of distributed generation, traditional centralized fault location methods can no longer meet the performance requirements of speed and high accuracy. Therefore, this paper proposes a fault segment location method based on spiking neural P systems and Bayesian estimation for distribution networks with distributed generation. First, the distribution network system topology is decoupled into single-branch networks. A spiking neural P system with excitatory and inhibitory synapses is then proposed to model the suspected faulty segment, and its matrix reasoning algorithm is executed to obtain a preliminary set of location results. Finally, the Bayesian estimation and contradiction principle are applied to verify and correct the initial results to obtain the final location results. Simulation results based on the IEEE 33-node system validate the feasibility and effectiveness of the proposed method.


Introduction
Since they are directly connected with end-users, distribution networks well reflect the needs of customers in terms of security, stability and economy.When a fault occurs in a distribution network, the ability to locate the fault quickly and accurately plays an important role in its safe operation as well as in the quality of electricity supply for users.In recent years, with the access of distributed generation (DG), distribution networks become complex multi-power structures from the original single-power radial type [1,2].Consequently, when a distribution network with DG fails, the flow of fault current is no longer in a single direction.Hence, the application of traditional fault location methods has certain limitations [3,4].With the increasing scale of power distribution systems and the possible distortion of fault information coming from feeder terminal units (FTUs), fault location of distribution networks has become more challenging.Therefore, a lot of attention has been paid to the improvement of traditional fault location methods and the exploration of new ones for distribution networks with DG [5].
At present, many fault location methods have been proposed, such as traveling wave location, impedance and FTU detection-based fault segment location methods.Two traveling wave-based fault location methods are proposed in [6,7], and while they are fast and accurate, they can be costly and require high sampling rate, leading to complex implementation.In [8,9], fault location methods based on single and double terminal impedances are proposed.The methods are simple in principle, but they can be influenced by the power supply and line impedance in the system.A high-frequency impedance-based fault location method is proposed in [10], but it can only be applied to neutral-to-ground and phase-to-phase faults.In contrast, FTU-based fault location methods are not only simple, but also quick and easy to implement, and thus they are currently very popular.FTU-based fault location methods consist of two types, i.e., matrix algorithm and artificial intelligence.Although the matrix algorithm can improve location speed and accuracy, the accuracy will be affected when the fault information contains distortion.Therefore, artificial intelligence algorithms have gradually attracted more attention.
In recent years, with the rapid development of artificial intelligence, many data-driven and artificial intelligencebased methods have been proposed for fault location, such as expert systems [11,12], neural networks [13,14], Bayesian networks [15,16], cause-effect networks [17,18], fuzzy set theory [18][19][20], Petri nets [20,21], rough set theory [22,23], and the spiking neural P system (SNPS) [23,24].Expert systems are widely used, but their knowledge bases are difficult to design and the reasoning speed is slow.In contrast, neural networks have fast inference speed and good fault tolerance, though they require a large number of training samples, which are hard to obtain.Bayesian networks have clear and intuitive diagnostic models, but it is difficult to obtain prior probabilities with uncertain information.Cause-effect networks have fast inverse reasoning capability, but are susceptible to combinatorial explosion problems and are less fault-tolerant for fault location.Petri networks have the advantage of fast parallel reasoning, but usually suffer from high dimensionality and poor fault tolerance in fault modeling.Although the above methods have their own advantages and application scenarios, the fault segment location for distribution network with DGs still faces many problems, such as large and complex models, high operational dimensionality and poor fault tolerance.Therefore it is necessary to propose new methods to better solve these issues.
SNPS, as a kind of neural-like P system of membrane computing [25], is a bio-inspired artificial intelligence method for fault diagnosis [26,27].It has become a hot research topic for fault diagnosis because of its strong distributed parallel computing, image processing and information processing capabilities.It is suitable for fault identification and solving the problem of fault information redundancy in the location process [28].For example, reference [29] proposes an interval-valued fuzzy SNPS and uses it for transmission grid fault diagnosis.In [30], a new method of transformer fault diagnosis based on learning SNPS with belief AdaBoost is proposed, while [31] proposes a novel fault diagnosis method for smart grids based on memory SNPS considering measurement tampering attacks.These studies show the great potential of SNPSs in solving fault diagnosis problems.Therefore, to improve the fault segment location speed and accuracy of distribution networks with DGs, this paper proposes a fault segment location method for distribution networks based on SNPS and Bayesian estimation.The main contributions of this paper are: • It proposes a novel fault segment location method for distribution networks, a method which is designed based on SNPS and Bayesian estimation.First, the decoupled single-branch networks are modeled by SNPS with excitatory and inhibitory synapses (SNP-SEIs) and then their matrix reasoning algorithms are employed for segment initial localization.After that, if the initial localization result set is not empty, Bayesian estimation will be used to verify and correct the initial localization result; otherwise, the contradiction principle will be used to identify and correct the distortion information and derive the final location results.Consequently, the method can improve fault location accuracy.2 Spiking neural P systems with excitatory and inhibitory synapses

Spiking neural P systems with excitatory and inhibitory synapses
An SNPS with excitatory and inhibitory synapses (SNP-SEI) of degree m ≥ 1 is a construct of: where.
(1) O = {a} is a set of singleton alphabets, and a denotes a spike.(2) σ 1 , σ 2 , ..., σ m are neurons in the system, and each neuron , where: (3) α i ∈ {−1, 0, 1} is the quantity of electric charges carried by the spike in neuron σ i ; (4) κ i ∈ {0, 1} is the firing threshold value of neuron σ i ; (5) R i = {r 1 , r 2 , r 3 } is a finite set of rules in neuron σ i , which are as follows: (6) where a α i denotes the spike that is consumed for executing the firing rule.ε ∈ {0, 1} denotes the quantity of electric charges carried by the newly produced spike.It means that if and only if the quantity of the electric charges in neuron σ i sat- isfies the firing condition α i ≥ κ i , then the firing rule can be executed.After that, the spike a α i is consumed and a new spike a ε is produced and sent to all the synapses connected to neuron σ i .
It is worth noting that the transmission of quantity of electric charges does not consume time in the system, i.e., the spike immediately reaches the connected synapses. (7) where is a null character indicating that no new electric charge is generated.If the quantity of electric charge satisfies α i < κ i , then the for- getting rule will be executed and no new electric charge is generated.(8) r 3 : t = {t 1 , t 1 } denotes the set of synapses, where t 1 and t 1 denote excitatory and inhibitory syn- apses, respectively.The neurons before and after the excitatory synapses are called pre-excitatory and post-excitatory neurons, respectively.If a pre-excitatory neuron meets its firing condition, then the corresponding excitatory synapses will work.Likewise, the neurons before and after the inhibitory synapses are called pre-inhibitory and post-inhibitory neurons, respectively.If and only if the quantity of electric charges carried by the spike in a pre-inhibitory neuron equals 0, then the corresponding inhibitory synapses will work. (9)syn ⊆ {1, 2, ..., m} × {1, 2, ..., m} denotes the connection relation between neurons, where (i, j) ∈ syn , 1 ≤ i, j ≤ m with i = j.(10) in, out ⊆ {1, 2, ..., m} represent the sets of input and output neurons, respectively.
The SNPSEI contains two kinds of neurons, namely, proposition neurons and rule neurons.The rule neurons include four types, namely, the " general ", " and ", " xnor " and " or " rule neurons.They are shown in Fig. 1, and their definitions and execution rules are described as follows.
(1) Proposition neuron A proposition neuron σ i is represented by a symbol P and a blue hollow circle.If a proposition neuron is an input proposition neuron, then its initial electric charge comes from the environment; otherwise, the electric charge comes from the result of the logic operation of its presynaptic rule neurons.

• Rule neurons • A " general " rule neuron is represented by a symbol
R and a rectangle.The neuron has only one input but multiple outputs.If its firing condition is met, then the firing rule will be executed.• An " and " rule neuron is represented by a sym- bol R and a rectangle.The neuron has at least two inputs but only one output.If its firing condition is met, then the firing rule will be executed and a new quantity of electric charge ε will be generated, where ε = min{α 1 , α 2 , ..., α k }. • An " xnor " rule neuron is represented by a sym- bol R and a rounded rectangle.The neuron has at least two inputs but only one output.If its firing condition is met, then the firing rule will be executed and a new quantity of electric charges ε will be generated, where ε=α 1 �α 2 �...�α k , and • An " or " rule neuron is represented by a symbol R and a rectangle.The neuron has at least two inputs but only one output.If its firing condition is met, then the firing rule is executed and a new quantity of electric charge ε will be generated, where ε = max{α 1 , α 2 , ..., α k }.

Matrix reasoning algorithm
To make SNPSEI capable of inferring and processing fault information in a parallel way, a matrix reasoning algorithm is designed, as shown in Algorithm 1.
To improve the readability of Algorithm 1, the vectors and matrices covered are described below.(1) α = (α 1 , ..., α p ) T denotes the quantity of elec- tric charge vector of proposition neurons, where denotes the quantity of elec- tric charge value vector of rule neurons, where ) p×q denote directed synaptic connection matrices from a proposition neuron to a " general ", " and ", " xnor " and " or " rule neurons, respectively.
If there is such a connection, γ ij = 1 ; otherwise γ ij = 0. (4) C P = (γ ji ) q×p denotes the directed synaptic con- nection matrix from a rule neuron to a proposition neuron.If there is such a connection, γ ij = 1 ; other- wise γ ij = 0.
Next, the operators are introduced as follows: (1) Multiplication operator ⊗: The quantity of electric charges of " general " rule neurons is calculated by: (2) Multiplication operator ⊕: The quantity of electric charges of " and " rule neurons is calculated by: (3) Multiplication operator : The quantity of electric charges of " xnor " rule neurons is calculated by: (4) Multiplication operator ⊙: The quantity of electric charges of " or " rule neurons is calculated by: Likewise, the quantity of electric charges of proposition rule neurons is calculated by: (1)

Fault location method
In this section, a fault location method for distribution networks with DGs based on SNPSEI and Bayesian Estimation is proposed, and its flowchart is shown in Fig. 2 with the steps described as follows.
Step (1): Decouple the complex distribution network structure into several single-branch networks according to the equivalent decoupling algorithm proposed in [32].
Step ( 2): Obtain the voltage and current values of fault lines.First of all, fault lines are selected according to the zero sequence power direction protection.Specifically, if a circuit breaker is open, then the corresponding branch is faulty and will be modeled by an SNPSEI; otherwise, it is not at fault and the location process ends.Subsequently, the current and voltage values of the obtained faulty lines are received from the supervisory control and data acquisition system.
Step (3): Execute the matrix reasoning algorithms of SNPSEI-based models based on the voltage and current criterion to obtain the initial set O L i of fault location results, where the collected fault voltage and current direction information is the input of the models.
Step (4): If O L i = ∅ , then the Bayesian estimation is applied via (10) to verify and correct the results in O L i .After the calculation, the segment with the largest probability value in the results is the faulty one.Then, the results are outputted and the location ends.
Step (5): If O L i = ∅ , then the contradiction principle is applied to find and correct the nodes with distorted fault information.After that, the faulty segments are determined via the revised information sequence and the results are outputted.Then, the location ends.

Voltage and current criteria
Currently, the fault current crossing alarm signals obtained by the fault indication equipment are usually used as the fault location criterion of the distribution network.Since most of such devices are installed outdoors, they are easily affected by the environment, which may reduce the accuracy and stability of current information.Also, the collected information may be distorted during the communication process.Thus, only using current leads to reduced accuracy of fault location.Consequently, because of the high acquisition stability and low distortion probability of voltage information, this paper introduces voltage distribution characteristics as the fault criteria.In addition, voltage information is combined with current direction information to form a voltage and current dual-criteria model, to improve the fault location tolerance. (

1) Current criterion
In a single-supply system, when the fault resistance increases, the corresponding fault current decreases.Consequently, the fault currents of downstream nodes of the fault point cannot reach the action thresholds of protection.As a result, the numbers 0 and 1 can be used to represent the statuses of switches.However, with the access of a large number of DGs, fault current flows in distribution networks have changed from unidirectional to bidirectional.Therefore, the direction of short-circuit currents provided by the system power supply is specified as positive.The rectification value of the zero sequence current protection is calculated according to: where I I op indicates the zero sequence I section protection, K rel is a reliability factor, which generally takes a value from 1.2 to 1.3, and I 0 max indicates the maximum zero sequence current that flows through the protection in a ground fault.This generally takes a value from 2 to 3 A. The current direction information is represented by the numbers -1, 0 and 1, shown as: (6)  When a single-phase-to-ground fault occurs on feeder lines, the voltage distribution regularities of different grounding modes are not the same.For the center point non-effective grounding mode, the voltage of the faulty phase will become zero and the voltage of the non-faulty phase will rise to the line voltage.For the faulty singlebranch network, the voltage difference between two adjacent nodes of the faulty section varies a lot, while the voltage differences between the other nodes are almost constant.Therefore, this paper specifies that the common nodes with large variation are represented by 1, while the others are represented by 0. The mathematical expression is shown as: where i, j and k denote the three adjacent nodes, respec- tively.u i−j and u j−k denote the voltage differences between two adjacent nodes.

SNPSEI-based model
The network topology of complex distribution networks is characterized by multiple branches and variable operational modes.To simplify the model, this paper first decouples the distribution network containing DGs into several single-branch networks, and then models each singlebranch network by an SNPSEI.Figure 3 shows a singlebranch network, which can be used to build a common model for fault location based on SNPSEI.For the segment L n , its SNPSEI-based model is shown in Fig. 4, where proposition neurons are associated with circuit breakers, isolated switches and segments.Rule neurons are represented by rectangular boxes and rounded rectangular boxes, while excitatory synapses are represented by normal arrows and inhibitory synapses are denoted by hollow arrows.It is worth noting that the SNPSEI-based model of a singlebranch network can be obtained by superposing several segment models.The physical meaning of each symbol in the model is shown in Table 1.

Location result correction based on bayesian estimation
Since most of end instruments and communication devices of distribution networks are outdoors, the collected information may be distorted.To improve the accuracy of (8) fault location, this paper employs the Bayesian estimation method to correct initial location results.First, it is necessary to make the following assumptions [33]: (1) All the segments of a feeder have the same failure probability.
(2) The information of each node has the same distortion probability p , and 0 < p ≪ 1 .From engineer- ing experience and long-term operational data statistics, p is generally taken as 0.05 ∼ 0.2.(3) Each node is configured with independent feeder terminal units, whose operating states do not affect each other.
Then, set initial information sequence as I = [S 1 , S 2 , ..., S n ] .According to the Bayesian conditional probability, the probability P(L i |I) of a fault occurring in the feeder seg- ment L i can be obtained as: where P(L i ) is the priori probability, and P(I|L i ) repre- sents the probability that the fault information sequence collected by the system at the fault time of segment L i is I.
Since P(I) is same for the whole feeder, it is known that the posterior probability of failure in each segment

Fault information correction based on the contradiction principle
If the circuit breakers operate correctly and the initial set of location results is empty, then there is a missed location.To address this issue, this section employs the contradiction principle to correct the fault information.Then the corrected fault information sequence pairs are tested one by one to determine the faulty segments.First, it is specified that for any segment, the nodes close to and far from the main power supply are called the parent and child nodes, respectively.Since all the branches in this paper are single-branch networks, the contradiction principle can be summarized as follows [34] (graphically represented in Fig. 5).
(1) If the child node in the information sequence pair is 1, then its parent node cannot be 0 or − 1; (2) If the child node in the information sequence pair is 0, its parent node cannot be − 1.

Simulation experiments
MATLAB/Simulink 2020a is used here to simulate singlephase-to-ground faults in the neutral point grounding mode through the arc extinguishing coil for a standard 33-node distribution network with DGs.The standard IEEE 33-node distribution network is decoupled into four single-branch networks as shown in Fig. 6, namely

Simulation experiments
In this subsection, simulations of the single fault and double faults are performed for the single-phase-to-ground fault in the neutral point grounding mode through the arc extinguishing coil with and without DG feeder lines.Zero sequence current values and the adjacent node difference are collected for fault resistance values of 10 , 100 and 500 .
(1) Single fault When a single fault occurs in a single-branch network, the zero sequence current value at each node and the voltage difference at adjacent nodes are shown in Tables 2 and  3, respectively.Table 2 shows that the fault zero sequence current value decreases as the corresponding fault resistance value increases.When the fault occurs in the case of DG access, there is still a current flowing downstream of the fault point.Table 3 shows that the voltage difference of adjacent nodes before and after the faulty node changes greatly, while that of other nodes is almost unchanged.Consequently, the fault current and voltage information can be obtained via (6) to (8), as shown in Table 4.
(2) Double faults When double faults occur in a single-branch network, the zero sequence current value at each node and the voltage differences at adjacent nodes are shown in Tables 5 and 6, respectively.From Tables 5 and 6, it can be seen that the variation trends of the zero sequence current magnitude and voltage difference for the double faults are similar to the single one.Data decrease significantly in two places because there are two faulty segments.Similarly, the fault current and voltage  information can be obtained via ( 6) to (8), as shown in Table 7.

Comparative experiment and accuracy test (1) Comparative experiment
Seven cases are considered here and the proposed method is compared with the two in [28] and [35], and the results are shown in Table 8.Case 1 is a single fault with correct fault information, and all the three methods can locate the fault.However, for case 2, that is a double fault with correct information, only the proposed method and the one in [28] can locate successfully.Since both cases 3 and 4 have information distortion, the two methods from [28,35] have different degrees of locating errors while the proposed method is still effective.For case 5, it is a double fault with two node distortion.It can be seen that only the proposed method locates correctly.For cases 6 and 7, the proposed method can consider both the current and voltage information distortions at the same time, while the other two only use the current information distortion.Consequently, only the proposed method can locate the faults accurately.Therefore, it can be concluded from Table 8 that the proposed method can obtain correct location results for all seven cases.Hence it has higher accuracy and effectiveness. (

2) Accuracy test
To further verify the speed and accuracy of the proposed method, the single fault and double faults are generated randomly 100 times.Both correct and distorted fault messages are considered.Then, the localization accuracy and solution time under 100 runs are obtained statistically [36].The accuracy test results are shown in Table 9.It is seen that the accuracy of the proposed     method is 100% with 100 runs for both the single and multiple faults.Therefore, the proposed method is feasible and effective.

Case studies
This subsection uses cases 6 and 7 as examples to illustrate how the proposed method works.
(1) Case 6: L 20 is faulty, while the current information of S 19 is missed and the voltage information of U 22 has failed to declare.Since the circuit breaker CB 0 of main power and CB 1 of DG have acted, a fault occurs in the feeder segment with the DG, which is modeled based on an SNPSEI, as shown in Fig. 7. Based on the fault information, the initial quantity of electric charges of the input neurons can be obtained as: After performing the matrix reasoning algorithm, when g = 0 , the results are: When g = 1 , the results are: When g = 2 , the results are: When g = 3 , the results are: Now, the termination condition is satisfied and the reasoning process ends.The sequence of the output neurons is [0, 0, 0, 1, 0, 1, 0] , and the initial location results indi- cate that faults occur in L 20 and L 22 .Then, the result set O (L 20 ,L 22 ) is tested and corrected using Bayesian estima- tion.The processes are described as follows.
Case 7: L 34 is faulty, while the current information of S 20 is missed and the voltage information of U 34 has failed to declare.This feeder segment is modeled as shown in Fig. 7. Based on the fault information, the initial quantity of electric charges of input neurons can be obtained as: P(I|L (20,22) ) = α 0 = [1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, −1, O 1×37 ] When g = 0 , the results are: When g = 1 , the results are: Now, the termination condition is satisfied and the reasoning process ends.The sequence of the output neurons is [0, 0, 0, 0, 0, 0, 0] , which indicates that there is no faulty segment.However, the action information of circuit breakers indicates that there is a fault occurrence.So, it is necessary to apply the contradiction principle to detect and correct the distorted nodes and find the faulty segment.It is known that the collected current information sequence [S CB 0 , S 1 , S 2 , S 19 , S 20 , S 21 , S 22 , S CB 1 ] is [1, 1, 1, 1, 0, 1, 1, −1] and [0, 1] is detected as a contradic- tory information pair.If S 20 is − 1, then [−1, 1] is also a contradictory information pair; if S 20 is 1, then the con- tradiction is eliminated.Therefore, the distortion node is S 20 , and the correct current information sequence is obtained, namely, [1, 1, 1, 1, 1, 1, 1, −1] .Since [1, −1] sat- isfies the sequence pair when the fault occurs, the faulty segment is thus L 34 .

Conclusions
This paper proposes a fault location method based on SNPSEI and Bayesian estimation for distribution networks considering distortions of fault information.Decoupling of the distribution networks can effectively reduce the modeling dimension of SNPSEI-based models and simplify the computation.In addition, the proposed SNPSEI is used to develop a parallel reasoning algorithm, which can use both the voltage and current information as the criterion, allowing determination of preliminary location results.Bayesian estimation and the information contradiction principle are introduce to verify and correct the location results.Because of the correction functions of the proposed method for both misdiagnosis and missed diagnosis, its fault location accuracy is effectively improved.The comparative simulation results show the effectiveness, feasibility and speed of the proposed method.Since the influence of meteorological factors on distribution networks is increasing, their prediction or location of faults considering such factors will be studied in the future.

Fig. 1
Fig. 1 Graphical representation of neurons.a Proposition neuron, b general rule neuron, c and rule neuron, d xnor rule neuron, and e or rule neuron

Fig. 2
Fig. 2 Flow chart of fault location method for distribution networks based on SNPSEI and Bayesian Estimation

( 9 )3
P(L i |I) = P(L i )P(I|L i ) P(I) Schematic diagram of single branch network

Fig. 4 A
Fig. 4 A universal fault location model of distribution network based on SNPSEI Voltage difference change at node n L n Segment L n is faulty depends only on the magnitude of P(I|L i ) .To indirectly derive the value of P(L i |I) , P(I|L i ) can be calculated by: where N unequality and N equality indicate that the numbers of information sequences are unequal and equal to the actual information sequences collected at the fault time of a segment from set O L i (O L i = ∅) , respectively.
In the simulations, the power supply output voltage is set as 10 kV and the uniform parameters of each segment line are set as: R 1 = 0.013 �/km , R 0 = 0.39 �/km, L 1 = 0.933 mH/km , L 0 = 4.126 mH/km , C 1 = 12.74 μF/ km and C 2 = 7.75 μF/km.The length of each segment line is 1.5 km, and the DG capacity is 0.5 MW.

Fig. 5
Fig. 5 Schematic diagram of the contradiction principle

Fig. 7
Fig. 7 Fault location model based on cases 6 and 7

Table 2
Zero sequence current values of nodes under single fault in N 1

Table 3
Voltage difference values of adjacent nodes under single fault in N 1

Table 4
Simulation positioning results

Table 5
Zero sequence current values of nodes under double faults in N 1

Table 6
Voltage difference values of adjacent nodes under double faults in N 1

Table 7
Simulation positioning results

Table 8
Location results of different methods

Table 9
Accuracy simulation results under 100 failures of this method