# Automated Methodology for Dependability Evaluation of Wireless Visual Sensor Networks
## 3 Problem Formulation and Background
### Area Coverage  
The formalism of how to compute the total area viewed by visual nodes is discussed in this section.  
Consider a wireless visual sensor network being defined as \(wvsn=\{\{Snk\}\cup VS\cup SS\}\), where \(Snk\) is the sink node (base station), \(VS=\{vs_{i}|i=1,\ldots,n\}\) is a set of visual sensor nodes and \(SS=\{ss_{j}|j=1,\ldots,m\}\) is a set of scalar sensor nodes. Visual nodes are responsible for monitoring the area of interest \(\mathbb{A}\), while scalar nodes can be used as routers (relaying nodes) to support the deliveryof visual information to the sink node [14]. Figure 1 shows a WVSN with visual nodes \(V1\), \(V2\) and \(V3\) that can reach the sink by assistance of the scalar nodes S1, S2, \(S3\) and S4.  
In a typical WVSN, each visual node has an embedded camera with a viewing angle \(\theta\) and an orientation \(\alpha\) (see Figure 2). The camera also defines a sensing radius \(R\) that is an approximation of the camera's Depth of Field (DoF) [34; 51]. For simplification, the Field of View (FoV) of any visual sensor is defined as the area of an isosceles triangle composed of three vertices, \(A\), \(B\) and \(C\), being \((A_{x},A_{y})\) the Cartesian coordinates of the camera. The coordinates of vertices \(B\) and \(C\) can be obtained by Equation (1) and the FoV of any visual sensor _vs_ (FoVvs) can be computed using trigonometry, as expressed in Equation (2) [14; 34]:  
\[\begin{split} B_{x}&=A_{x}+R\cos\left(\alpha\right),\\ B_{y}&=A_{y}+R\sin\left(\alpha\right),\\ C_{x}&=A_{x}+R\cos\left(\left(\alpha+\theta\right) \text{ mod }2\pi\right),\\ C_{y}&=A_{y}+R\sin\left(\left(\alpha+\theta\right) \text{ mod }2\pi\right),\\ \end{split} \tag{1}\]  
\[\text{FoV}_{\text{vs}}=\frac{R_{\text{vs}}^{2}\cdot\sin\left(\theta_{\text{vs }}\right)}{2}. \tag{2}\]  
Figure 3a shows the monitored area \(\mathbb{A}\) and the FoV of four visual nodes. The coverage area ca is the sum of all FoV, considering properly the overlapped area, as shown in Figure 3b. In this case, the coverage area can be computed according to the Inclusion-Exclusion Principle, which is a counting technique from combinatorial mathematics. That principle computes the number of objects in a union of sets, for the most general of circumstances in which the sets are free to overlap without restriction [52; 53]. It is stated in Theorem 1, and so the coverage area can be computed according to Definition 1.  
Figure 1: Area monitoring by visual sensors [14].  
Figure 2: Field of View (FoV) of a visual sensor [34].  
**Theorem 1** (Inclusion-Exclusion Principle).: _Suppose \(n\in\mathbb{N}\) and \(A_{i}\) is a finite set for \(1\leq i\leq n\). It follows that [52; 53; 54]_  
\[\left|\bigcup_{i=1}^{n}A_{i}\right|=\sum_{\emptyset\
eq Q\subseteq\{1,2,\ldots,n \}}\left(-1\right)^{|Q|-1}\cdot\left|\bigcap_{q\in Q}A_{q}\right|. \tag{3}\]  
Proof.: See [52].  
Considering a covered region \(\mathbb{A}\) as a set of points and the cardinality of that set as the area of that region, then the Inclusion-Exclusion Principle can be adjusted and the resulting coverage area can be computed according to Definition 1.  
**Definition 1** (Coverage Area).: _Let \(\mathbb{A}\) be a monitoring area, \(VS=\{vs_{i}|i=1,\ldots,n\}\) a set of visual nodes covering \(\mathbb{A}\) and \(Area(p)\) the area of the polygon \(p\), which defines a covered region. The coverage area of \(VS\) is defined as:_  
\[CA\left(VS\right)=\sum_{\emptyset\
eq Q\subseteq VS}\left(-1\right)^{|Q|-1} \cdot Area\left(\bigcap_{vs_{q}\in Q}vs_{q}\cap\mathbb{A}\right). \tag{4}\]  
As mentioned before, the coverage area computed by Definition 1 is used as metric to identify whether a coverage failure occurred. Thus, this metric will help to determine which network elements cannot fail so that the application still meets its requirements.