## 5 Numerical Results
### Analytical Model Validation  
The proposed analytical model is an approximate model whose accuracy is validated by simulation. The analytical results have been obtained by solving the two 2D-DTMCs and finding their stationary probability distributions. On the other hand, simulation results have been obtained using a customized discrete-event simulation program developed in C language. It mimics the real behavior of the WSN. That is, in each cycle: (i) packets arrive in the queue of an SN according to a given discrete probability distribution; (ii) active SNs contend for channel access. (iii) if a SN wins the contention, it transmits a PF according to the transmission scheme configured in it (SPT or APT); (iv) if a collision occurs, all active SNs of the same class will switch to the _sleep_ mode until the end of the cycle. The simulation results are completely independent from those obtained by the analytical model. The simulation results presented have been obtained as the average of measurements performed over \(10^{8}\) cycles. We have also obtained 95% confidence level intervals for the performance parameters of interest. However, being very small, they have been mostly omitted. For illustration purposes and as examples, confidence intervals have been drawn for the curves of Figures 3 and 4. In the scenario studied in these figures, both classes deploy the SPT scheme (\(F_{1}=F_{2}=1\)), and the queue of C1 and C2 SNs can store a maximum of \(Q_{1}=Q_{2}=10\)_DATA_ packets, respectively. In these figures, black lines correspond to analytical values, while simulation values are represented by their corresponding red 95% confidence level intervals. \begin{table}
\begin{tabular}{l l l l} \hline Cycle time (T) & 60 ms & Propagation delay (\(D_{p}\)) & 0.1 μs \\ \hline \(t_{SYNC}\), \(t_{STS}\), \(t_{CTS}\) and \(t_{ACK}\) & 0.18 ms & _Slot_ time (\(t\)s) & 0.1 ms \\ \hline \(t_{DATA}\) & 1.716 ms & Contention window (W) & 128 slots \\ \hline DATA packet size (S) & 50 bytes & Queue size (Q) & 10 packets \\ \hline update supercycle (\(N_{ex}\)) & 20 cycles & \(N_{env}\) & 80 supercycles \\ \hline Transmission power (\(P_{ex}\)) & 52 mW & Reception power (\(P_{rx}\)) & 59 mW \\ \hline Sleep power consumption (\(P_{sl}\)) & & \(P_{d}=3\) μW & \\ \hline Maximum frame size & & \(F=\{2,5,10\}\) packets & \\ \hline Nodes number & & Packets arrival rate (packets/s) \\ \(N_{1}=5,N_{2}=20\) & & \(\lambda_{1}=\{0.5\},\lambda_{2}=[0.5,4.5]\) & \\ \hline \end{tabular}
\end{table} 
Table 1: Parameters of the scenario under study. Figure 3: Average energy consumed by RN1 per cycle during the _data_ period, and in the _awake_ and _normal_ cycles, when deploying SPT (\(F_{1}=1\)). Please note that the load for C1 SNs is constant (\(\lambda_{1}=0.5\) packets/s), while varies for C2 SNs. The load offered to a single C1 SN is one _DATA_ packet every 33.3 cycles, approximately, for a cycle of \(T=60\) ms. The load offered to the 5 C1 SNs is 5 _DATA_ packets every 33.3 cycles. On the other hand, when \(\lambda_{2}=1\) packet/s, the load offered to a single C2 SN is two _DATA_ packet every 33.3 cycles, approximately, and the load offered to the 20 C2 SNs is 40 _DATA_ packets every 33.3 cycles. Clearly, as \(\lambda_{2}\) approaches 1 packet/s, the load offered to the WSN is larger than the maximum load the WSN can carry, i.e., 33.3 _DATA_ packet every 33.3 cycles. As the offered load approaches the maximum carried load, the performance observed by C2 SNs degrades, as C2 SNs have lower access priority than C1 SNs. Then, as observed in Figure 4, C2 SNs experience a traffic congestion situation, even for traffic loads as small as \(\lambda_{2}=0.5\) packet/s. The energy consumed in _awake_ cycles, \(E_{aw,c}\), is identical for SNs of both classes. However, \(E_{nr,2}\) is larger than \(E_{nr,1}\). Recall that \(E_{nr,c}\) measures the average energy consumed by RN\(c\) while it is in the _sleep_ mode in _normal_ cycles. Please note that C2 SNs experience much more frequent collisions than C1 SNs.