# A Cross-Layer Optimized Opportunistic Routing Scheme for Loss-and-Delay Sensitive WSNs
## 5 The Design of the COOR Scheme
### Transmission Power Optimization
According to Equation (18), there are a total of \(\rho(l+r)d_{\theta}d_{x}\) nodes in the region \(A_{l+r,k}\), and each node will send packets \(\mathcal{Q}^{S}(l+r)\). At the same time, each data packet is received \(N\) times and each time it is successfully received with probability \(p_{l+r}\). Therefore, the total number of packets received by the region \(A_{l,k}\) is \(\rho(l+r)d_{\theta}d_{x}\cdot\mathcal{Q}^{S}(l+r)\cdot N\), averaging to \(\rho ld_{\theta}d_{x}\) nodes, and the number of received packets of node \(n_{l}\) can be obtained by:  
\[S_{l,k}=pld_{\theta}d_{x} \tag{18}\]0  
The data packets sent by node \(n_{l}\) are divided into two parts: (1) Self-generated (2) Assist the outer node to forward. Because it is a round of sending time, the number of data packets generated by each node is always \(1\). In the second case, the total number of packets to be forwarded is \(\rho(l+r)d_{\theta}d_{x}\cdot\mathcal{Q}^{S}(l+r)\), and each packet is successfully received by the region \(A_{l,k}\) at the probability of \((1-p_{l+r})^{N}\). Consequently, the average number of data packets sent by node \(n_{l}\) in a round of sending is:  
\[S_{l,k}=pld_{\theta}d_{x} \tag{18}\]1  
The node \(n_{l}\) sends CTS messages mainly considering three kinds of situations: (1) Replying to the last hop node to receive data. (2) Preparing to receive communication information of the node in the same area \(A_{l,k}\). (3) Preparing to receive the ACK messages sent by the next hop node. In the first circumstance, the number of CTS packets to be sent is equal to the number of packets it receives. As for the third circumstance, the number of CTS packets in this part is the same as the data volume of the current node to send. The second circumstance is a little more complicated for it is related to the priority of current node \(n_{l}\) in the candidate set. In the basic network, since the performance and status of each node in the region \(A_{l,k}\) are regarded as same, it can be considered that the probability at each priority in each transmission is the same \((1/N)\). When the node is at the \(i\)th priority in current transmission, it needs to consider the reception condition of the first \((i-1)\)th priority nodes in turn. Specifically, the communication between candidate nodes won't stop until one of them claim its successful reception. In this condition (the \(i\)th priority), the CTS packets node \(n_{l}\) sends is expressed as:\[S_{l,k}=pld_{\theta}d_{x} \tag{18}\]2  
The \(j\)th term here indicates that the nodes of the previous \((j-1)\)th priority all failed to receive, and the \(j\)th priority node succeeded. Generally, the probability of its occurrence is \(p_{l+r}(1-p_{l+r})^{j-1}\), and there are \(j\) CTS packets that the node needs to send (response \(j\) times). While if the first \(i-1\) priority nodes all fail to receive, then the node \(n_{l}\) will send a total of \(i-1\) CTS packets (in response to the previous \(i-1\) nodes). The following is a simplification of the expression (23):  
\[S_{l,k}=pld_{\theta}d_{x} \tag{18}\]3  
Assume that:  
\[S_{l,k}=pld_{\theta}d_{x} \tag{18}\]4  
Obviously, it can be obtained:  
\[S_{l,k}=pld_{\theta}d_{x} \tag{18}\]5  
The subtraction of two equations above:  
\[S_{l,k}=pld_{\theta}d_{x} \tag{18}\]6  
Plugging \(n=i-1\) into the Equation (23):  
\[S_{l,k}=pld_{\theta}d_{x} \tag{18}\]7  
\[S_{l,k}=pld_{\theta}d_{x} \tag{18}\]8  
The result can be given by using the sum formula of the geometric progression:  
\[S_{l,k}=pld_{\theta}d_{x} \tag{18}\]9  
In summary, the total number of CTS packets sent by a node can be obtained:  
\[s=\frac{1}{2}(l+d_{x})^{2}d_{\theta}-\frac{1}{2}l^{2}d_{\theta}\]0  
\[s=\frac{1}{2}(l+d_{x})^{2}d_{\theta}-\frac{1}{2}l^{2}d_{\theta}\]1  
The ACK messages sent by node \(n_{l}\) are mainly used to confirm whether it has successfully received the data packets sent by the last hop to the other candidate nodes with lower priority in a single transmission.