# A Hybrid Trust Model against Insider Packet Drop Attacks in Wireless Sensor Networks
## 5 Performance Evaluation
### Goals, Metrics, and Methodology
#### 5.1.4 Performance Evaluation Metrics  
We compared the pure GRP, the beta GRP, and our proposed hybrid GRP in terms of the following performance evaluation metrics:  
1. _Detection completion time (DCT): DCT_ is defined as the simulation time (seconds) when all attackers are detected by victim nodes whose packets are dropped by the attackers. _DCT_ evaluates how quickly a trust model detects attackers.
2. _Detection rate (DR) and false alarm rate (FAR)_: As shown in Table 2, node \(i\) classifies node \(j\) into either _trustworthy_ or _untrustworthy_ based on node _j_'s trust value at node \(i\). Node \(i\) may either correctly detect an attacker as an untrustworthy node (_Hit_) or fail in detecting it (_Miss_). _DR_ is the probability that an attacker is being considered as an untrustworthy node. On the other hand, a trust model may misclassify a normal node (nonattacker) into an untrustworthy node (_False alarm_). We get _FAR_ as the number of false alarms divided by the number of normal nodes, as defined in [36]. Unlike _DR_ (\(0\leq DR\leq 1\)), _FAR_ can be over 1.0 since a node can be falsely detected multiple times by its neighbors. We use _DR_ and _FAR_ to evaluate the detection accuracy of a trust model.
3. _Packet delivery rate (PDR): PDR_ is the probability that a data packet is successfully delivered to the base station. A reliable, trust-based routing will deliver most of the data packets to the destination even in the presence of inside packet drop attackers in the network. We use _PDR_ to evaluate the _reliability_ of a trust-based routing.  
\begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{**Given Node Is**} & \multicolumn{2}{c}{**Decision Result**} \\ \cline{2-3}  & **Untrustworthy** & **Trustworthy** \\ \hline
**Attacker** & Hit (Detection) & Miss \\ \hline
**Normal node** & False alarm & Correct rejection \\ \hline \hline \end{tabular}
\end{table}
Table 2: Detection and false alarm.  
Figure 4: Implementation of packet drop attack models in the OPNET Modeler.  
_Total energy consumption (\(E_{T}\)) and energy efficiency (\(e_{S}\))_: For the energy consumption analysis, we considered the total amount of energy consumed by transmitting and receiving data packets, \(E_{T}\) (\(J\)). To get \(E_{T}\), we use the first order radio model [37]. In this model, the amount of energy required to send a \(k\) bit packet over distance \(d\), \(E_{T}\), and to receive a \(k\) bit packet, \(E_{Rx}\), is:  
\[E_{Tx}(k,d)=E_{elec}\times k+E_{amp}\times k\times d^{2} \tag{17}\]  
\[E_{Rx}(k,d)=E_{elec}\times k \tag{18}\]  
where \(E_{elec}\) is the energy dissipation of the radio to run the transmitter and receiver circuitry and is 50 nJ/bit, and the transmit amplifier \(E_{amp}\) is 100 pJ/bit/m\({}^{2}\). By using Equations (17) and (18), we obtain the total energy consumption for data packet delivery \(E_{T}\) by summing \(E_{Tx}\) and \(E_{Rx}\) for all nodes in the network. In addition, to see how efficiently a routing works in terms of energy, we used the energy efficiency \(e_{S}\) (mJ) defined as:  
\[e_{S}=\frac{E_{T}}{N_{S}} \tag{19}\]  
where \(N_{S}\) is the total number of packets successfully delivered to the base station. The energy efficiency \(e_{S}\) indicates the average energy consumption to successfully deliver one data packet to the destination.  
_Other metrics (\(N_{T}\), \(N_{A}\), and \(N_{NA}\))_: \(N_{T}\) is the total number of data packets generated by all source nodes, \(N_{A}\) is the total number of data packets dropped due to attacks, and \(N_{NA}\) is the total number of packets dropped due to other network problems (non-attacks), such as collision or noise.