# Fault Diagnosis System of Power Grid Based on Multi-Data Sources
## 3 Realization of Fault Diagnosis Real-Time Processing System
### Fault Diagnosis and Information Missing Analysis
The recurrence formula of the probability of \(CBy\_z\) tripping to remove the fault is:  
\[G(y\_z)\ =\ (1\ -\ G[y\_(z-1)]CB.p)p(y\_z) \tag{5}\]  
In Equation (5), initial condition is that \(G(y\_1)=p(y\_1)\). When \(Vy\) fault occurs, the recurrence formula of the probability of \(Py\_z\_x\) action to remove fault is:  
\[G(y\_z\_x)\ =\ CB.p(1\ -\ G[y\_(z-1)]CB.p)p(y\_z\_x) \tag{6}\]  
The refuse-operation information of related circuit breakers can usually be known. When a circuit breaker refuses to trip and the fault is removed by next-level protection, the circuit breaker node should be skipped when calculating the probability. For example, when calculating \(G(\)B1\_CB4\_RBP\_L2\_B3\()\) in the simple grid fault shown in Figure 3, CB5 should be considered as the first circuit breaker node on the B1-CB4-L2-CB5 path. \(G(\)B1\_CB4\_RBP\_L2\_B3\()\) = CB. \(p\)\(\times\) RBP. \(p\) = 0.9312. Protection may be involved in multiple branches (such as longitudinal differential protection). It is assumed that the protection, which should act arranged in the \(t\)-th position is \(Py\_t\). In the branches \(Py\_t\) is involved in, \(n\) related circuit breakers trip under the control of \(Py\_t\) action, and \(k\) related circuit breakers refuse to trip. The probability of \(Py\_t\) action to remove the fault is:  
\[G(y\_t)\ =\ CB.p^{n}(1\ -\ CB.p)^{k}\prod\
olimits_{i=1}^{t-1}(1\ -\ p_{Py\_i})p_{Py\_t} \tag{7}\]  
When \(Vy\) fails, the joint action of \(ym\) protections causes the tripping of the related circuit breakers to remove the fault. The probability of \(Vy\) fault can be calculated by the transfer function \(f(\cdot)\) and is defined as fault correctness of \(Vy\) (namely \(p_{Vy}\)). \[p_{Vy}\ =\ 1\ -\ \prod\
olimits_{i=1}^{ym}(1\ -\ Gi) \tag{8}\]  
The calculation method of \(Gi\) is determined by protection \(i\). When \(i\) is involved in multiple branches, \(Gi\) is calculated according to Equation (7). When \(i\) is involved in only one branch, \(Gi\) is calculated by Equations (3)-(6). According to relevant models and data in references [17; 18], this article sets 0.8 as the boundary value to determine whether the element is faulty. When the fault correctness of the element is greater than or equal to 0.8, the element is judged to be faulty. What needs to be noted is that 0.8 is only the reference value set in this article, and calculation changes should be made according to the actual probability during engineering application. Elements whose fault correctness is lower than 0.8 are not without failures. This system will output their fault correctness as the probability of failure. The essence of \(Vy\) fault correctness \(p_{Vy}\) is the conditional probability of \(Vy\) fault when the operating information of protections and circuit breakers related to \(Vy\) are known. According to the Bayesian theorem, when the fault diagnosis is completed, the posterior probability of the action of the protection _Px_ (namely action expectation of _Px_: _EPx_) can be calculated according to Equations (9)-(11). \[S_{Ni-Px}=\left\{ \begin{array}{cc}0&(Ni\;fault\;removed\;by\;protection\;with\; priority\;higher\;than\;Px)\\ p_{Px}p_{Ni}&(Protection\;resection\;with\;priority\;higher\;than\;Px\;failed\;to\;remove\;Ni\;fault) \end{array} \right. \tag{9}\]  
\[AS_{Ni-Px}=(1-\sum_{k=1}^{i-1}AS_{Ni-Px})S_{Ni-Px} \tag{10}\]  
\[E_{Px}=\sum_{N\subseteq Px.tree}\sum_{i=1}^{Ni}AS_{Ni-Px} \tag{11}\]  
In Equations (9)-(11), _Ni_ denotes the _i_-th _V_e_ class node in the _N_-th branch of the protection range tree of _Px_ (the smaller \(i\) value, the closer to the root node), and the initial condition is that \(AS_{N1-Px}=S_{N1-Px}\). In Equation (11), the _AS_ value of each _V_e_ class node can only be calculated once and cannot be repeated. Action information of protection _Px_ is transformed into the actual action value _Tpx_. When _Px_ acts, _Tpx_ = 1, when _Px_ does not act, _Tpx_ = 0.