## 4 Simulation Results
### Network Load and Packet Errors  
Usually, only a part of the nodes are active in WSNs, e.g. nodes that detect an event, while the other nodes route data. To reflect this behavior, the network load was tested with 12 source nodes, which is 25% of the total node count.  
Figure 12 and Figure 13 shows the end-to-end reliability with different offered loads and packet error rates in ZigBee and TUTWSN, respectively. Because either protocol does not include a mechanism to ensure end-to-end reliability, the goodput is below 100% when packet errors occur. In ZigBee, the hidden node problem decreases the goodput slightly.  
The difference between the goodput of 0%-15% PERs is small with both protocols. With the 30% PER, goodput decreases drastically. This is consistent with the earlier observation that the synchronization losses increase significantly at 20%-30% PERs, thus causing packet drops.  
When the offered load exceeds the network capacity, the network congess and the packets are dropped due to full buffers. This happens after 140 B/s load with ZigBee and after 60 B/s load with TUTWSN. However, with the used configuration, both protocols have the theoretical capacity of 2 pkt/s when only one node is utilizing the medium. In ZigBee, this value was calculated based on the average backoff times (BE=5) and data, acknowledgment, and interframe times. TUTWSN has worse performance because of the inflexibility of the TDMA-based channel access. Each member node is assigned with one slot per access cycle even if they have nothing to send, which wastes capacity. Additionally, the CSMA-based channel access in ZigBee benefits when several nodes compete over the medium.  
Increasing the number of competing nodes in ZigBee has two effects. First, the collision probability increases as two nodes may select the same backoff time. In the simulated topology, nodes have 1-4 neighbors. Thus, only a few neighbors compete over the medium, which keeps the collision probability small. Also, as the backoff exponent was increased, the hidden node problem that would otherwise decrease the throughput is not significant. Second, since several nodes independently randomize their backoff times, the average backoff time between transmissions is reduced proportionally to the number of the competing nodes. That is, idle times are reduced which increases the utilization of the medium and thus the throughput.  
When packet errors occur, capacity is lost due to missed beacons and retransmissions which causes the network to congest earlier. TUTWSN suffers from high PERs, because the simple channel reservation scheme used in the simulations fails in requesting additional reservations due to packet errors. As a result, a node must wait for a reserved slot until the next active period, which wastes capacity.  
The availability in ZigBee and TUTWSN with 12 source nodes and 40 s traffic generation interval (5.5 B/s aggregate load) is presented in Figure 14 and Figure 15, respectively. To express the effect of different PERs, the figure does not include all availability percentages as in Figure 4. Instead, the time intervals required reach the 90%, 99%, and 99.9% availabilities are presented.  
In both protocols, 90% availability is obtained with 100 s interval, while 99% availability requires 200 s interval. The behavior is due to poisson generated traffic that causes variation between data generation intervals. Between 0%-15% PERs, the availability does not decrease notably, because MAC layer retransmissions are enough to compensate the packet errors and links break rarely. The reception interval that is required to reach 90% availability does not notably increase until the PER is higher than 25%. For 99% and 99.9% availability, the corresponding PER thresholds are 25% and 15%. Clearly, the traditional 3 retransmission attempts typically used in MAC protocols are not enough to provide sufficient availability when the PER is larger than 15%-20%.