# Optimizing Retransmission Threshold in Wireless Sensor Networks
## 1 Introduction  
Wireless Sensor Networks (WSNs) have been increasingly deployed for a wide variety of real-time applications, such as industrial Internet-of-Things, emergency response, critical infrastructure monitoring and process measurement and control. In real-time applications, deadline misses in data transmission may bring about irreparable damage [1; 2; 3]. For mission-critical tasks, not only the packet delivery deadline should be met, but also the transmission reliability is supposed to be guaranteed. Therefore, providing reliable and timely data delivery in WSNs is crucial to the success of the mission. In supporting mission critical-tasks, data delivery is required to be timely and reliable, but it is challenging for desirable Quality of Service (QoS). Due to the transmission uncertainties, wireless link dynamics and the queueing dynamics, wireless link qualities in sensor networks can vary at a wide range of timescales [5; 6], which also results in node failures and connectivity varying over time [7]. In practical sensor networks, the sensor node may need multiple retransmissions for successfully forwarding a packet at each hop. A maximum number of retransmissions, _i.e._, retransmission threshold,is usually set for each node to prevent transmitting a packet over a bad link unlimitedly, and the packet will be eventually dropped by the sender after the maximum number of transmission retries. The success of a packet delivery is probabilistic, and thus, the WSNs are rendered unreliable. QoS supported by the underlying networks aims to meet end users' satisfaction with the services that the system provides [8]. The QoS provisioning in data delivery can be measured in the form of performance metrics, such as delay, packet loss rate and throughput. There exists a tradeoff among the QoS requirements, such as transmission reliability and deliver delay. Thus, the soft QoS supported can be accomplished, in which the soft QoS refers to achieving the QoS requirements with probability. Many efforts have been made to improve transmission reliability and deliver delay in WSNs, including quality measurement of forwarding data [5; 9; 10] and real-time routing protocol designing [11; 12; 13]. The main methodology applied in the existing works is to exploit a delivery path based on the QoS-aware forwarding quality metrics to improve the performance of packet transmission. However, there exist limited studies on the optimization of the retransmission threshold for each node in a delivery path, which imposes a significant effect on the probability of a packet being successfully transmitted within specified deadline. Most protocols set the same retransmission threshold for all sensor nodes in advance without considering the delay requirement and link quality, so that the delivery performance in terms of latency and reliability is decreased. We use an example inspired by the one in [14] to show the impact of retransmission threshold on the performance, illustrated in Figure 1.  
The number associated with each link is the probability for a packet being successfully delivered to the next node through the link, denoted by \(p_{suc}\), which means that on average, \(1/p_{suc}\) transmission trials are needed to successfully deliver a packet through the link. The integer variable \(A\) denotes the number of packets in the buffer waiting to be served. The delivery path for the first packet is \(S\to B\to C\to D_{1}\), and the path for the second packet is \(S\to E\to D_{2}\). We assume that one transmission takes 10 ms, and the deadline of delivering the first packet from node \(S\) to node \(D_{1}\) is 90 ms. For delivering the packet to node \(D_{1}\) before the deadline, the summation of transmission trials along the path must be no more than nine, that is the result of 90 ms divided by one transmission time of 10 ms. Traditional protocols set the same retransmission threshold for each relay node in advance.