## 4 Platform Design
### Communication Protocol Design
Communication protocols with unscheduled channel access are well known in the literature [77]. In the following, we will analyze if we can completely remove the receiver from the sensor nodes to achieve multiple cost reductions. Without receive capabilities, the sensor nodes have no means to know if a message reached its destination or was lost. Thus, sufficient communication redundancy should be built into the protocol to keep message loss to acceptable levels for the application. It should be noted that the application is more tolerant to the potential loss of low-priority periodic health status messages than to high-priority and delay-sensitive fire alerts. Higher transmission redundancy may increase the delivery probability of the messages, but it also increases the energy consumption of the node and the probability of collisions. Thus, protocol design should consider the effects of redundancy on message loss and on the delay of the detection of faulty nodes that are no longer able to transmit their status, for various network sizes. For this purpose, we have set up a network simulation model in SystemC [90] as follows. The sensor nodes were modeled as transmitters that periodically send a health status (heartbeat) message. The transmission period is affected by a static error that is initialized randomly in the range \(+10\)-\(+30\)%, corresponding to the error range of the watchdog timer of the microcontroller that was used to control the timing on the sensor node. The gateway node was modeled as a receiver implementing LPLto listen for incoming messages from the sensor nodes. The wakeup period for RF sampling was set slightly shorter than the length of a message, 0.3 s (including the preamble). Normally, the radio receivers can correctly decode the strongest of two overlapping messages if the amplitude difference exceeds the receiver signal-to-noise ratio, thus losing only one of the two. The same stands for messages that overlap only partially over the preamble. However, for the purpose of the simulation, we opted to pessimistically consider that two overlapping messages are both lost, regardless of the amplitude ratio or the extent of the collision. Figure 2a shows the simulation results for a year of operation for fields with one gateway that receives heartbeats from 10-5000 nodes. The node heartbeat period varies from six minutes to one hour, and we count the number of times that a sensor node is declared missing over one year of operation for different  
time windows in which the gateway expects to receive at least one heartbeat from a node (to avoid cluttering Figure 1(a), we have plotted only the results for three windows, of 45, 101 and 228 min). We see that for a given heartbeat period and gateway window, the erroneous node missing events increase with the number of nodes. This is expected, since more nodes randomly sending heartbeat messages increase the probability of collisions, thus of message loss. We also note an increase of erroneous node missing events with the increase of the sensor node heartbeat period for a given number of sensor nodes in the field and a given gateway window. This result can be counterintuitive, since longer heartbeat periods mean less concurrent messages contending for the communication channel on average, thus lower collision probability. However, considering that the gateway window for receiving a heartbeat message from a sensor is constant, a longer heartbeat period means also that fewer heartbeats are sent within the window, which effectively decreases the protocol redundancy that is needed to overcome message losses typical for unscheduled MACs. We used these simulation results to choose a compromise between the frequency of sensor node heartbeats (which contribute to node energy consumption), the delay after which the gateway detects missing nodes and the frequency of false node missing reports. As we will show in Section 4.2, one heartbeat per hour increases node energy consumption by about one third, which we consider acceptable for this application.