# Integrated Evaluation of Reliability and Power Consumption of Wireless Sensor Networks
## 4 Models
### Reliability Model  
The Reliability Model [18] is used to assess the reliability of a WSN as defined in activity _Evaluate Reliability Models_ of Figure 3. Similar to the previous models, there is a step-by-step to create it. The Reliability Model is made by path models that represent a path between a sensor node and the sink node; and small blocks (called basic blocks) that represent the sensor nodes or communication links. This model is created based on the results of the WSN power consumption assessment, as defined in the _Validation_ phase of the methodology presented in Figure 3.  
The failure points in WSNs are the communication link and the sensor node. For that reason, these two points are modelled as RBD blocks as shown in Figure 10.  
Figure 8: Consumption Simplified Model of the application.  
Figure 9: Overview of the Consumption Sensor Node Model.  
In particular, the _Sensor Node_ is a sequence of blocks, namely Application (_App_), Operating System (OS), Middleware (_Middleware_), Platform (_Hardware_), Radio (_Radio_) and Battery Level (_Battery_). If one of them fails, the block _Sensor Node_ fails (see Section 2.2). Each block has a reliability associated, which is defined by the user (e.g., Application) or by simulation (e.g., Battery Level and Radio).  
The reliability model of a path (called _Reliability Path Model_) consists of a sequence of basic blocks as shown in Figure 11. A path has at least two sensor nodes: one sensor node is the source (first block), and the other is the target (last block). If there are more sensor nodes (multihop), they are placed between the first and last blocks. Besides, it is worth observing that the _Reliability Path Model_ depends on the routing algorithm adopted as it determines whether the path is single hop or multihop; and the sink node is always the target (last block).  
For example, Figure 10(a) shows a path from the sensor nodes \(A\) (source) to \(C\) (target), in which sensor node \(B\) routes the packet between the source and the target. The model of this path is shown in Figure 10(b): a model in series because the communication is sequential. If another sensor node routes a packet between the source and the destination (simultaneously), we need a parallel structure.  
After modelling all paths, the next step is to model a region. A region includes one or more sensor nodes. If the region has only one sensor node, its path model is considered the Reliability Model. Otherwise, in the case the region includes more than one node, it is needed to combine the path models of these sensor nodes: the combination process checks if a particular sensor node belongs to different paths.  
For example, Figure 11(a) illustrates a region and its paths to the sink node. This region uses a protocol that creates clusters (e.g., LEACH), has three sensor nodes (\(A\), \(B\) and \(C\)) and has a cluster head (\(D\)). Thus, all sensor nodes in this region must transmit their packets to the cluster leader. This means that all paths have one sensor node in common and this situation should be represented in the Reliability Model (Figure 11(b)). If this node fails, the whole region fails regardless of the path.  
Figure 11: Path Model.  
Figure 10: Basic blocks of the reliability model.  
In some specific scenarios, a region can not be modelled by a series-parallel composition in RBD. In such cases, the method SDP [19] should be applied to evaluate the reliability of the WSN region.