# Improved Temporal Fuzzy Reasoning Spiking Neural P Systems for Power System Fault Diagnosis
## 2 ITFRSNP System
### Iftrsnp System-Based General Fault Diagnosis Process
#### 3.3.2 Fault Diagnosis Process  
The suspected fault component search method is used to determine the diagnosis range, and then the fault diagnosis is performed individually for the subnets of the suspected faulty components. Finally, the diagnosis results of each subnet are fused to determine the faulty components. The specific fault diagnosis process used in this study is as follows. 1. After receiving the alarm messages, start the search method for suspected faulty components and set the total number of suspected faulty components as X. Initialize \(x=1\). 2. Select the \(x\)-th suspected faulty component and set the number of CBs connected to it as Y. Initialize \(y=1\). 3. Initialize the general fault diagnosis model with neuron spike values of zero and time-point constraints of \(\varnothing\). The \(y\)-th CB is selected for search. If the \(x\)-th suspected faulty component is a line or transformer, search for the main PR and near-backup PR corresponding to the CB. If the \(x\)-th suspected faulty component is a bus, the bus PR corresponding to the CB is searched. According to the alarm messages, \(\sigma_{p1}\), \(\sigma_{p2}\), \(\sigma_{p4}\), and \(\sigma_{p5}\) in the general fault diagnosis model are assigned spike values and time-point constraints concerning Section 3.1. 4. The number of adjacent lines of the \(y\)-th CB is set as Z. If Z = 0, skip to Step 8; otherwise, initialize \(z=1\). The initial values of \(n_{\text{CB}\text{PR},\text{O}}\), \(n_{\text{CB}\text{PR},\text{C}}\), \(n_{\text{PR},\text{O}}\), and \(n_{\text{PR},\text{C}}\) are 0; the initial values of \(T_{\text{CB}\text{PR},\text{oi}}\) and \(T_{\text{PTR},\text{oi}}\) are \(\varnothing\). Search for CBs at the far end of the \(z\)-th adjacent line. If the CB has an alarm message at \(t_{\text{CB}\text{PR},\text{Z}}\), then \(n_{\text{CB}\text{PR},\text{O}}=n_{\text{CB}\text{PR},\text{O}}+1\), and \(T_{\text{CB}\text{PR}}=T_{\text{CB}\text{PR}}\)\(\cup\)\([t_{\text{CB}\text{PR},\text{Z}}\), \(t_{\text{CB}\text{PR},\text{Z}}]\); otherwise, \(n_{\text{CB}\text{PR},\text{C}}=n_{\text{CB}\text{PR},\text{C}}+1\). Search for the remote backup PR corresponding to the CB at the far end of the \(z\)-th adjacent line, and if this remote backup PR has an alarm message at \(t_{\text{PR},\text{Z}}\), then \(n_{\text{PTR},\text{O}}=n_{\text{PTR},\text{O}}+1\) and \(T_{\text{PTR}}=T_{\text{PTR}}\)\(\cup\)\([t_{\text{FP},\text{Z}}\), \(t_{\text{FP},\text{Z}}]\); otherwise, \(n_{\text{PTR},\text{C}}=n_{\text{PTR},\text{C}}+1\). 6. If \(z<Z\), \(z=z+1\), and return to Step 5; otherwise, substitute \(n_{\text{CB}\text{PR},\text{O}}\), \(n_{\text{CB}\text{PR},\text{C}}\), \(n_{\text{PTR},\text{O}}\), \(n_{\text{PTR},\text{O}}\), \(n_{\text{PTR},\text{C}}\), \(T_{\text{CB}\text{PR},\text{C}}\), and \(T_{\text{PTR}}\) into (21) to yield \(\alpha_{\text{P3}}\), \(T_{\text{P3}}\), \(\alpha_{\text{P6}}\), and \(T_{\text{P6}}\). 7. Based on the parameter definitions in Section 2.3, the inputs (\(a^{0}_{p(xy)}\) and \(T^{0}_{p(xy)}\)) are determined for the general fault diagnosis model corresponding to the \(y\)-th CB subnet of the \(x\)-th suspected faulty component. The reasoning algorithm in Section 2.3 is introduced to obtain the diagnosis result (\(\alpha_{p10(xy)}\) and \(T_{p10(xy)}\) of \(\sigma_{p10}\)) for the \(y\)-th CB subnet. 8. If \(y<Y\), then \(y=y+1\) and return to Step 3; otherwise, the diagnosis results (\(\alpha_{(x)}\) and \(T_{(x)}\)) of the \(x\)-th suspected faulty component are obtained by substituting the diagnosis results of the subnets of this component into the following equations: \[ \begin{cases}\alpha(x)=\underset{y=1}{\overset{Y}{\alpha}}(\alpha p10(xy))\\ T(x)=\underset{y=1}{\overset{Y}{\gamma}}(\alpha p10(xy))\end{cases} \] (28)
9. The measured value \(\  
In Figure 5, B denotes buses, L denotes lines, T denotes transformers, Lp denotes line PR, Bp denotes bus PR, Tp denotes transformer PR, and the subscripts m, p, and s indicate the main, near backup, and remote backup PRs, respectively.