# Structural Methodologies for Distributed Fault Detection and Isolation
## 4 Equation-Based Distributed Fault Detection and Isolation
### Equation-Based Fault Isolation Approach  
In this subsection, it is assumed that the set of minimal equations to make all the faults locally detectable have been derived as described in the previous subsection. It is clear that the locally-detectable faults in each subsystem are locally isolable from the faults in the other subsystems not included in the augmented subsystem.  
Consider local subsystem \(S_{i}=\{V_{i}\), \(M_{i}\), \(E_{i}\), \(F_{i}\}\). If \(f_{i}\in F_{i}\) is locally detectable in \(S_{i}\), then \(f_{i}\) is the locally-isolable form \(f_{j}\) if \(f_{j}\
otin F_{i}\).  
Proof.: Since  
```
1:input: subsystem model \(S_{i}\)
2:input: subsystem model neighbors \(\mathcal{N}_{Si}\)
3:\(E_{d}=\text{Detectability}(S_{i},\mathcal{N}_{Si})\)
4:\(S_{i}=(S_{i}|E_{d})\)
5:for each \(f\in S_{i}\)do
6:\(\tilde{S}_{i}=S_{i}\setminus\left(f\text{ and }e_{f}\right)\)
7:\(E_{d}=\text{Detectability}(\tilde{S}_{i},\mathcal{N}_{Si})\)
8:\(S_{i}=(S_{i}|E_{d})\)
```  
**Algorithm 6** Diagnosability.  
Our proposed approach considers the first order neighboring subsystems of subsystem \(S_{i}\) and augments minimal constraints from them to maximize diagnosability. If the set of first order neighboring subsystems does not have required redundancies to achieve maximum diagnosability, the search process continues to the next higher order of neighboring subsystems, as illustrated in Figure 10. The expansion process will stop when the distributed approach achieves maximum diagnosability, which in the worst case will result in a centralized diagnoser for the whole system. Thus, it is guaranteed that the method will find a distributed set of subsystem diagnosers that achieves the same diagnosability performance as the best centralized diagnoser for the same set of measurements. Algorithm 7 summarizes this approach.  
```
1:input: subsystem \(S_{i}\)
2:input: subsystem model neighbors \(\mathcal{N}_{Si}\)
3: Let \(V_{is\_shared}\) be the set of shared variables in \(S_{i}\)
4:\(DF=\text{Detectable-Faults}(V_{is\_shared},S_{i})\)
5:\(IF=\text{Isolable-Faults}(V_{is\_shared},S_{i})\)
6:\(E_{o}=\text{Diagnosability}(S_{i},\mathcal{N}_{Si})\)
7:if\(D(S_{i}|E_{o})=DF\) and \(I(S_{i}|E_{o})=IF\)then
8:return
9:\(\mathcal{N}_{Si}\) =\(\mathcal{N}_{Si}\cup\) (neighboring subsystems of \(\mathcal{N}_{Si}\))
10:DistributedDiagnosis(\(S_{i},\mathcal{N}_{Si}\))
```  
**Algorithm 7** Distributed diagnosis.  
Figure 10: Expanding the search environment to the higher order connected subsystems.  
The set of equations and measurements that each subsystem in the running example needs from its neighbors to achieve maximum possible detectability and isolability using the equation-based approach are presented in Table 2. Table 2 shows that all the subsystems of the water tank example share measurements with their first order connected subsystems. This is a practical advantage of this algorithm because usually, the subsystems with shared variables are physically closer to each other (corresponding to our definition of nearest neighbors).  
Another advantage of this algorithm is that not only do we not need a global model for detecting and isolating the faults, but also, we do not use the global model in the design process of the supervisory system. This makes the approach suitable for large, complex systems, such as aircraft and power plants where the global systems models are likely to be unavailable or are unknown.