# Distributed Fault Detection and Isolation Approach for Oil Pipelines
## 4 Case Study: FDI System for Oil Pipeline
### FDI System for Oil Pipeline  
With the mathematical model defined in Section 4, it is now helpful to define the neighbors of each subsystem. For subsystem \(\Sigma_{1}\), the set of first level neighbors is defined as \(\Sigma^{1,1}=\{\Sigma^{1,1}_{2}\}\), the set of second-level neighbors as \(\Sigma^{2,1}=\{\Sigma^{2,1}_{3}\}\) and the set of third level sub-systems as \(\Sigma^{3,1}=\{\Sigma^{3,1}_{4}\}\). For subsystem \(\Sigma_{2}\), the set of first level subsystems is defined as \(\Sigma^{1,2}=\{\Sigma^{1,2}_{1},\Sigma^{1,2}_{3}\}\) and the set of second level subsystems as \(\Sigma^{2,2}=\{\Sigma^{2,2}_{4}\}\). For subsystem \(\Sigma_{3}\), the set of first level subsystems is defined as \(\Sigma^{1,3}=\{\Sigma^{1,3}_{2},\Sigma^{1,3}_{4}\}\) and the set of second level subsystems as \(\Sigma^{2,3}=\{\Sigma^{2,3}_{1}\}\), and, finally for subsystem \(\Sigma_{4}\), the set of first level neighbors is defined as \(\Sigma^{1,4}=\{\Sigma^{1,4}_{3}\}\), the set of second level neighbors as \(\Sigma^{2,4}=\{\Sigma^{2,4}_{2}\}\) and the set of third level subsystems as \(\Sigma^{3,4}=\{\Sigma^{3,4}_{1}\}\). As an example, Figure 6 shows how these levels are defined for subsystem \(\Sigma_{2}\). With this, it is attempted first designing Local Diagnosers by considering only equations within their respective subsystem using Algorithm 1. For subsystem \(\Sigma_{1}\), the set of equations directly impacted by \(\mathtt{f}_{1}=\{f_{Q_{1}}\}\) is \(\Sigma_{E}=\{e_{4}\}\), then the set of unknown variables related is \(x_{E}=\{Q_{1}\}\), and it is found \(\mathcal{R}(x_{E},\Sigma_{1})=\{e_{2},e_{3},e_{4}\}\), and this set is assigned to \(\Sigma_{E}\); with this set of equations, all FMSO sets possible from \(\Sigma_{E}\) are computed; in this case, no FMSO sets are found. Given that \(|\Sigma_{E}|<|\Sigma_{1}|\), the process is done once again. The set of unknown variables of \(\Sigma_{E}\) is assigned to \(x_{E}=\{\Delta H_{1},v_{1},Q_{1}\}\) and is found \(\mathcal{R}(x_{E},\Sigma_{1})=\{e_{1},e_{2},e_{3},e_{4}\}\) and assigned to \(\Sigma_{E}\); with this set of equations, all FMSO sets possible from \(\Sigma_{E}\) are computed, in this case, no FMSO sets are found. Since still \(|\Sigma_{E}|<|\Sigma_{1}|\), the process is done once again. The set of unknown variables of \(\Sigma_{E}\) is assigned to \(x_{E}=\{\Delta H_{1},v_{1},h_{u1},h_{u2},Q_{1}\}\), and it is found that \(\mathcal{R}(x_{E},\Sigma_{1})=\{e_{1},e_{2},e_{3},e_{4},e_{5}\}\) and is assigned to \(\Sigma_{E}\); with this set of equations, all FMSO sets possible from \(\Sigma_{E}\) are computed; in this case, no FMSO sets are found. Finally, as \(|\Sigma_{E}|=|\Sigma_{1}|\), no more loops are computed, and it is concluded then that Local Diagnoser for \(\Sigma_{1}\) can not be computed with only equations from \(\Sigma_{1}\). This procedure is repeated for all subsystems concluding that none of the Local Diagnosers can be computed with only equations from their respective subsystems. Now, the design process is continued with the procedure of Algorithm 2. Following Algorithm 2, let us detail the steps for the procedure design for the Local Diagnoser for subsystem \(\Sigma_{1}\). First, the set of equations impacted by faults \(\mathtt{f}_{1}=\{f_{Q_{1}}\}\) is assigned to \(\Sigma_{E}=\{e_{4}\}\), the level variable is defined \(L=1\) and the variable \(\overline{\Sigma}_{E}\) is set to \(\mathcal{O}\). As \(\overline{\Sigma}_{E}\
eq\Sigma^{1,  
FMSO sets are found, and the selection by computing the BILP problem is found; with this selection, the related analytical redundancy relations are computed. Following the same design process in Algorithm 2 for subsystems \(\Sigma_{2}\), \(\Sigma_{3}\), and \(\Sigma_{4}\), it is found that, for \(\Sigma_{2}\), \(\Sigma_{3}\), subsystems from level 1 are needed to build analytical redundancy relations for complete diagnosis isolation; meanwhile, for subsystem \(\Sigma_{4}\), subsystems from level 2 are needed.