# Improved Temporal Fuzzy Reasoning Spiking Neural P Systems for Power System Fault Diagnosis
## 2 ITFRSNP System
### The TFRSNP System  
The ITFRSNP system is defined as follows:  
\[\Pi=(A,N_{p},N_{r},syn,I,O) \tag{3}\]  
where the following are defined:1. \(A=\{a\}\) is a singleton alphabet (\(a\) is called spike). 2. \(N_{p}=\{\sigma_{p1}\), \(\sigma_{p2}\),..., \(\sigma_{pm}\}\) denotes the proposition neuron set, where \(\sigma_{pi}\) (\(1\leq i\leq m\)) is associated with a fuzzy proposition. Each proposition neuron \(\sigma_{pi}\) has the form \(\sigma_{pi}=(\alpha_{pi},\ T_{pi},\theta_{pi},\ \lambda_{pi},\ r_{pi})\), where the following are defined: 1. \(\alpha_{pi}\) (\(\alpha_{pi}\in[0,\ 1]\)) is the spike value in \(\sigma_{pi}\); 2. \(T_{pi}\) (\(T_{pi}\) = [\(t_{pi}\) -, \(t_{pi}\)\({}^{+}\)]) is the time-point constraint in \(\sigma_{pi}\); 3. \(\theta_{pi}\) is an integer representing the number of spikes received by \(\sigma_{pi}\); 4. \(\lambda_{pi}\) is an integer that represents the spike number threshold required for firing \(\sigma_{pi}\); 5. \(r_{pi}\) is a firing/spiking rule of \(\sigma_{pi}\) with the form \(E/a^{\theta}\to a^{\theta}\), where \(\theta\) and \(\beta\) are real numbers in \([0,\ 1]\). 3. \(N_{r}=\{\sigma_{r1}\), \(\sigma_{r2}\),..., \(\sigma_{m}\}\) is the rule neuron set, where \(\sigma_{rj}\) (\(1\leq j\leq n\)) is associated with a fuzzy production rule. \(N_{r}\) contains two types of rule neurons: TIME-type and OR-type. Each rule neuron \(\sigma_{rj}\) has the form \(\sigma_{rj}=(\alpha_{rj},\ T_{rj},\ \rho_{rj},\ \theta_{rj},\ \lambda_{rj},\ r_{rj})\), where: 1. \(\alpha_{rj}\) (\(\alpha_{rj}\in[0,\ 1]\)) is the spike value in \(\sigma_{rj}\); 2. \(T_{rj}\) (\(T_{rj}=[t_{rj}\) -, \(t_{pi}\)\({}^{+}\)]) is the time-point constraint in \(\sigma_{rj}\); 3. \(D_{rj}\) (\(D_{rj}=[\Delta t_{\eta^{-}}\), \(\Delta t_{\eta^{+}}\)\({}^{+}\)]) is the time-distance constraint in \(\sigma_{rj}\), which denotes the time-distance constraint between the propositions of the input and output proposition neurons associated with \(\sigma_{rj}\); 4. \(\theta_{rj}\) is an integer representing the number of spikes received by \(\sigma_{rj}\); 5. \(\lambda_{rj}\) is an integer that represents the spike number threshold required for firing \(\sigma_{rj}\); 6. \(r_{rj}\) is a firing/spiking rule of \(\sigma_{rj}\), with the form \(E/a^{\theta}\)\(\rightarrow\)\(a^{\beta}\), where \(\theta\) and \(\beta\) are real numbers in \([0,\ 1]\). 4. \(syn\subseteq\{N_{p}\times N_{r}\}\cup\{N_{p}\times N_{r}\}\) is a directed graph that indicates the synapses between propositions and rule neurons. Input matrices \(\mathbf{U}_{1}=\{u_{1(i,j)}\}_{m\times n}\) and \(\mathbf{U}_{2}=\{u_{2(i,j)}\}_{m\times n}\) and output matrix \(\mathbf{V}=\{v_{(i,j)}\}_{n\times m}\), where \(u_{1(i,j)}\), \(u_{2(i,j)}\), and \(v_{(i,j)}\in[0,\ 1]\), are used to represent \(syn\). If there is a synapse from proposition neuron \(\sigma_{pi}\) to TIME-type neuron \(\sigma_{rj}\), then \(u_{1(i,j)}=1\); otherwise, \(u_{1(i,j)}=0\). If there is a synapse from proposition neuron \(\sigma_{pi}\) to OR-type neuron \(\sigma_{rj}\), then \(u_{2(i,j)}=1\); otherwise, \(u_{2(i,j)}=0\). If there is a directed arc (synapse) from rule neuron \(\sigma_{rj}\) to proposition neuron \(\sigma_{pi}\), then \(v_{(i,j)}=1\); otherwise, \(v_{(i,j)}=0\). 5. \(I\) and \(O\) are input and output neuron sets, respectively. Graphical models of the proposition neuron, TIME-type rule neuron, and OR-type rule neuron are shown in Figure 1. Their respective interpretations are provided below: 1. The proposition neuron (Figure 1a) describes the operational events of PRs and CBs. When a PR alarm message is received, the spike value in the proposition neuron corresponds to its confidence degree, and the time-point constraint corresponds to its operation time. The proposition neuron can delineate the state and time of the PR and CB operations, which are then inputted into the fault diagnosis model for inference. Moreover, this neuron can record the intermediate and output results of the fault diagnosis. 2.