# A Review of Power System Fault Diagnosis with Spiking Neural P Systems
## 2 Power System Fault Diagnosis with Spiking Neural P Systems
### Fault Section Estimation of Power Systems
: _An extended spiking neural P system (ESNPS) [130] of degree \(m\geq 1\), is a \((m+5)\)-tuple \(\Pi=(O,\sigma_{1},\ldots,\sigma_{m+2},\text{syn},I_{0})\), where:_  
_(1) The neurons \(\sigma_{i},1\leq i\leq m\), are of the form \(\sigma_{i}=(1,R_{i},P_{i})\), where \(R_{i}=\{r_{i}^{1},r_{i}^{2}\},r_{i}^{1}=\{a\to a\},r_{i}^{2}=\{a\to\lambda\}\). \(P_{i}=\{p_{i}^{1},p_{i}^{2}\}\) is a finite set of probabilities and the probability \(p_{i}^{j}\) is associated with rule \(r_{i}^{j}\) for \(1\leq j\leq 2\) such that \(p_{i}^{1}+p_{i}^{2}=1\);_  
_(2) \(\sigma_{m+1}=\sigma_{m+2}=(1,\{a\to a\})\);_  
_(3) \(\text{syn}=\{(i,j)|(i=m+2\wedge 1\leq j\leq m+1)\vee(i=m+1\wedge j=m+2)\}\);_  
_(4) \(I_{0}=\{\sigma_{1},...,\sigma_{m}\}\) is a finite set of output neurons, and the output of the system is denoted by a spike train which is formed by concatenating the outputs of the neurons \(\sigma_{1},...,\sigma_{m}\)._  
The neurons \(\sigma_{m+1}\) and \(\sigma_{m+2}\) work as a supplier of spikes to the neurons \(\sigma_{1},\sigma_{2},\ldots,\sigma_{m}\). Moreover, after firing at each step, the neurons get reloaded by receiving one spike from each other and the process continues. The neurons \(\sigma_{1},\sigma_{2},\ldots,\sigma_{m}\) contain one firing rule with probability \(p_{i}^{1}\) and one forgetting rule with probability \(p_{i}^{2}\). When the first rule is applied, the output of the \(i\)th neuron is 1 with a probability \(p_{i}^{1}\) associated with it. When the second rule is applied, the output of the neuron is 0 with a probability \(p_{i}^{2}\). So a spike train of 0's and 1's is obtained at any given time. Furthermore, the output of the system can be controlled by adjusting the probabilities \(p_{1}^{1},\ldots,p_{m}^{1}\). OSNPS is a combination of family of ESNPS where a guider is associated with each rule inside each of the neurons in ENPS to adjust the selection probabilities of the rules. The OSNPS is a combination of \(H\) ESNPS, i.e., \(ESNPS_{1},\ldots,ESNPS_{H}\) and each of these ESNPS has the structure mentioned in [130]. A guider algorithm is also added with the OSNPS models to adjust the probabilities associated with the rules present in the neurons. The pseudocode of the guider algorithm can be referred to [130]. Furthermore, the process of solving FSE problem and identifying the fault sections using the OSNPS model can be explained by the sketch shown in Figure 1:  
Now in order to find the fault section, a fault section estimation algorithm (FSE algorithm) based on OSNPS is introduced. FSE algorithm is different from the reasoning algorithms discussed in [82; 84; 88; 89; 125; 129]. These reasoning algorithms are used for obtaining the truth value of the proposition neurons which do not have any truth value associated with them. In FSE algorithm, \(m\) (number of neurons in every ESNPS), \(M\) (iteration), \(p_{j}^{a},1\leq j\leq m\) ( learning probabilities), \(\Delta\) (learning rate) and \(H\) (numbers of ESNPS) are given as input and a global optimal value \(G_{best}\) (a \(m\)-vector representing the status of the sections) is obtained as an output. Furthermore, if \(G_{best}=1\), then it is considered that the \(i\)th section is faulty. In the reasoning algorithms in [82; 84; 88; 89; 125; 129], matrices are used to represent the synaptic connections between the neurons. In FSE algorithm, instead of the connection matrices, fitness function (\(E(S)\)), probability matrix (\(P_{R}\)) are used to obtain the required output.