## 5 Performance Evaluation
### Results  
Figure 10 presents the performance of this mechanism in terms of reliability. If the mechanism can maintain PLR below a certain threshold (1% for critical applications) in the case of variable PER, then it can maintain the communication reliability. As the proposed mechanism considers service differentiation, it is enabled to provide different PLRs for different groups of sensors (critical and non-critical). As we can see from Figure 10, the PLR of the critical data and the non-critical data for PER between 1%-18% is very similar to the MP's mechanism. This is because of the PER between 1%-18%; the proposed mechanism follows the same packet coding schema as the MP's mechanism (no extra encoded packets are generated for PER between 1% to 18%; see Figures 7a and 4). However, in the proposed mechanism for the PER higher than 18%, both the non-critical and the critical data experience better PLR compared to the MP's mechanism. As for the PER higher than 18%, the proposed mechanism provides the destination with some extra encoded packets in order to provide sufficient redundancy, so that the destination can receive the critical data with a PLR under 1% or \(10^{-2}\) (an acceptable level). As shown in Figure 10, the proposed mechanism shows better PLR or reliability compared to the MP's mechanism and the no-coding scheme for PER up to 90%. However, it can provide health monitoring applications with an acceptable level of PLR for the critical data when the PER varies between 1% to about 52%. The reason for this behavior is explained in Section 4.3.2. Moreover, as we can see from Figure 10, for the critical data, the PLR fluctuates a bit with the PER, especially in the range of 20%-60%. One of the main reasons for this could be the strict and lower PER threshold ranges for critical applications and their corresponding extra encoded packet actions. For instance, around 28%-29% PER, the PLR increases, and it is detected and extra encoded packet action taken close to 30% PER, which decreases the PLR. This continues approximately up to 60% PER, and after that, the PLR increases and goes beyond the acceptable range. For 60% and above PER, no extra encoded packets are applied in the considered network scenario; hence, the PLR rises along with the PER. A high level of reliability, especially in the case of high PER, can make the proposed mechanism a reliable one during the security attacks. Though PLR is a QoS issue, it has the potential to pose a serious security threat in WBSNs. In WBSNs environment [31], attackers can harm the system by simply presenting a low level of noise to the channel and causing a lot of packet losses. They even can block the whole system by causing infinite retransmissions. The interesting point in the reliability performance of this mechanism is that this mechanism generates extra encoded packets only in order to support the high priority data, but still, the non-critical data experience a better PLR. This is because of the XoR (\(\oplus\)) coding schema that makes relation between different types of packets. For example, consider the scenario where S1 is labeled as the critical sensor and S6 is labeled as non-critical. Furthermore, consider that the channel is suffering from high values of PER and that both the S1 and S6 data are lost during the transmissions. However, as this mechanism provides the destination with few extra encoded packetsrelated to S1's data, the destination can recover the S1 data (P1). Moreover, Relay 1 always sends an XoRed packet that includes the data of S1 and S6 (\(P1\oplus P6\)). Thus, when the personal server (destination) receives the \(P1\oplus P6\), by having P1, it can recover the P6, too, as \(P6=P1\oplus(P6\oplus P1)\). The number of required retransmissions \(N_{rtx}\) is a parameter that can be used to determine how much an error recovery mechanism improves QoS in terms of energy consumption and data delivery delay [10,11].