# Distributed Fault Detection and Isolation Approach for Oil Pipelines
## 2 Structural Analysis for Model-Based FDI  
Structural analysis allows for obtaining structural models that are very useful for the design of model-based FDI systems. These structural models can be represented by bipartite graphs. A graph is bipartite if its set of vertices can be separated into two disjoint sets \(\Sigma\) and \(X\) such that each edge has a connection in \(\Sigma\) and another in \(X\). The main assumption is that each component can be represented by a structural model composed of one or more equations; therefore, violation of at least one equation indicates that the system component is faulty. Let the system description consist of a set of \(n_{e}\) equations involving a set of variables partitioned into a set \(Z\) of \(n_{Z}\) known (or measured) variables and a set \(X\) of \(n_{X}\) unknown (or unmeasured) variables. We refer to the vector of known variables as \(z\) and the vector of unknown variables as \(x\). The system may be impacted by the presence of \(n_{f}\) faults that appear as parameters in the equations. The set of faults is denoted by \(F\), and we refer to the vector of faults as \(\mathbf{\upxi}\). **Definition 1** (System). : _A system \(\Sigma(z,x,f)\) or \(\Sigma\), for short, is any set of equations relating \(z\), \(x\) and \(f\). The equations \(e_{k}(z,x)\subseteq\Sigma(z,x,f)\), \(k=1,\ldots,n_{e}\), are assumed to be differential or algebraic in \(z\) and \(x\)._  
**Definition 2** (Structural Model). : _The structural model of the system \(\Sigma(z,x,f)\) is a bipartite graph \(G(\Sigma\cup X\cup Z,A)\), or equivalently to \(G(\Sigma\cup X,\mathcal{A})\), where \(\mathcal{A}\subseteq A\) and \(\mathcal{A}\) is a set of edges such that \(a(i,j)\in\mathcal{A}\) iff variable \(x_{i}\) is involved in equation \(e_{j}\)._  
The _structural model_ of the system \(\Sigma(z,x,f)\), also denoted with some abuse by \(\Sigma(z,x,f)\) or \(\Sigma\) in the following, can be obtained abstracting the functional relations. This abstraction leads to a bipartite graph \(G(\Sigma\cup X\cup Z,A)\), or equivalently to \(G(\Sigma\cup X,\mathcal{A})\), where \(\mathcal{A}\subseteq A\) and \(\mathcal{A}\) is a set of edges such that \(a(i,j)\in\mathcal{A}\) iff variable \(x_{i}\) is involved in equation \(e_{j}\). A model \(\Sigma\) is used to illustrate the concepts. This is composed of fifteen equations, \(e_{1}\) to \(e_{15}\), relating the unknown variables \(x=\{x_{1},x_{2},\ldots x_{10}\}\) and the known variables \(z=\{z_{1},z_{2},\ldots,z_{5}\}\). The representation in a bipartite graph for this system is shown in Figure 1.  
**Definition 3** (Subsystem). : _A subsystem \(\Sigma_{i}(z_{i},x_{i},f_{i})\) or \(\Sigma_{i}\) for short, with \(i=1,\ldots n\), is any set of equations relating \(z_{i}\subseteq z\), \(x_{i}\subseteq x\) and \(f_{i}\subseteq f\), where \(\Sigma=\{\Sigma_{1},\Sigma_{2},\ldots,\Sigma_{n}\}\) with \(\Sigma_{i}\subseteq\Sigma\), \(\bigcup\limits_{i=1}^{n}\Sigma_{i}=\Sigma\), \(\Sigma_{i}\
eq\emptyset\) and \(\Sigma_{i}  
The decomposition of the model \(\Sigma\) into three subsystems, \(\Sigma_{1}=\{e_{1},e_{2},\ldots,e_{7}\}\), \(\Sigma_{2}=\{e_{8},e_{9},\ldots,e_{12}\}\) and \(\Sigma_{3}=\{e_{13},e_{14},e_{15}\}\) is also shown in Figure 1, where \(X_{1}^{L}=\{x_{3},x_{4}\}\), \(X_{2}^{L}=\{x_{7},x_{8}\}\), \(X_{3}^{L}=\{x_{10}\}\) and \(X^{S}=\{x_{1},x_{2},x_{5},x_{6},x_{9}\}\). A key tool for fault diagnosis using structural analysis is the concept of matching. A matching is a causal assignment that links an equation with an unknown variable, where this equation can be used to calculate this unknown variable [23]. **Definition 4** (Matching). : _A matching \(\mathcal{M}\) between \(\Sigma\) and \(X\) is a subset of \(A\) of disjoint edges of a bipartite graph \(G\).