# Structural Methodologies for Distributed Fault Detection and Isolation
## 3 MSO-Based Distributed Fault Detection and Isolation
### MSO Set Selection for Distributed Fault Detection  
For the situation in which the global model is known, \(M=\{m_{1},m_{2},...,m_{l}\}\) in Equation (3) is the set of all system measurements. Let us assume we can generate \(r\) MSO sets given \(M\): \(\mathcal{MSO}=\{MSO_{1},MSO_{2},\ldots,MSO_{r}\}\). Our goal is to design an algorithm that selects \(\mathcal{MSO}_{i}\subseteq\mathcal{MSO}\) in a way that requires a minimum number of additional measurements \(M_{o}\subseteq M,M_{i}\cap M_{o}=\emptyset\), i.e., measurements from the system not belonging to subsystem \(S_{i}\), to make all its faults globally detectable and isolable, if possible. Note that this is equivalent to the set-covering problem, which is NP-complete. In the past, heuristic search methods have been adopted for solving this problem, for example a Temporal Causal Graph (TCG) approach was used in [13]. In this paper, the problem is formulated as a Binary Integer Linear Programming (BILP) problem [23]:  
\[ \begin{array}{ll}\min&c^{T}x\\ s.t.&Ax\leq b\\ &\exists x_{b}\subset x\\ &\forall x_{k}\in x_{b}\Rightarrow x_{k}\in\{0,1\},\end{array}  \tag{4}\]  
where vector \(c\) represents the cost weights, matrix \(A\) and vector \(b\) define linear constraints, \(x\) represents the variables, \(x_{b}\) represents the binary variables, and \(x_{k}\in x_{b}\) represents a scalar binary variable [24]. There are several tools available for solving this problem, e.g., branch and bound algorithms [25] and branch and cut algorithms [26] (see, for example, [[http://www.mathworks.com/help/optim/ug/mixed-integer-linear-programming-algorithms.html](http://www.mathworks.com/help/optim/ug/mixed-integer-linear-programming-algorithms.html)]([http://www.mathworks.com/help/optim/ug/mixed-integer-linear-programming-algorithms.html](http://www.mathworks.com/help/optim/ug/mixed-integer-linear-programming-algorithms.html)) in the MATLABTM linear integer programming toolbox). To formulate the problem (3) as a BILP problem, a binary variable \(x(k)\): \(1\leq k\leq l\) is defined for measurement \(m_{k}\) in the system as follows:  
\[x(k)=\left\{ \begin{array}{ll}1&\text{if}\quad m_{k}\in M_{i}\cup M_{o}\\ 0&\text{if}\quad m_{k}\
otin M_{i}\cup M_{o},\end{array} \right. \tag{5}\]  
where \(M_{o}\) is the answer to Problem (3). An additional binary \(x(k+l)\): \(1\leq k\leq r\), is used for MSO set \(MSO_{k}\) in the system as follows. \[x(k+l)=\left\{ \begin{array}{ll}1&\text{if}\quad MSO_{k}\in\mathcal{MSO}_{i} \\ 0&\text{if}\quad MSO_{k}\
otin\mathcal{MSO}_{i}.\end{array} \right. \tag{6}\]  
Minimizing the number of measurements used from the other subsystems, this is formulated in the following cost function \(c\) as:  
\[c(k)=\left\{ \begin{array}{ll}0&\text{if}\quad\quad m_{k}\in M_{i}\\ 1&\text{if}\quad m_{k}\in M\backslash M_{i}\\ 0&\text{if}\quad l<k\leq l+r,\end{array} \right. \tag{7}\]  
where \(l\) is the number of system measurements and \(r\) is the number of MSO sets in the system. To determine the set of measurements and selected MSO sets in each distributed diagnoser, a BILP algorithm with \(l+r\) binary variables should be solved for the subsystem. Consider subsystem \(S_{i}\) with local faults \(F_{i}\) and the set of system faults, \(F\). Each local fault \(f_{j}\in F_{i}\) has to be locally detectable. Given Definition 8, local detectability of all the faults \(f_{j}\in F_{i}\) is achieved using the following constraints in the optimization problem (4). \[A(j,k)=\left\{ \begin{array}{ccc}0&\text{if}&k<l\\ -1&\text{if}&f_{j}\in MSO_{k-l}\\ 0&\text{otherwise.}\end{array} \right. \tag{8}\]  
By considering \(b(j)=-1\) for \(1\leq j\leq g\), where \(g\) is the number of faults in \(F_{i}\), the solution will contain at least one MSO set to detect each fault. The following constraint is added:  
\[A(j+g,k)=\left\{ \begin{array}{ccc}0&k<l\\ -1&f_{j}\in MSO_{k-l},f_{h}\
otin MSO_{k-l}\\ 0&\text{otherwise.}\end{array} \right. \tag{9}\]  
is used to isolate \(f_{j}\in F_{i}\) from another fault \(f_{h}\in F\).