# Interference-Robust Transmission in Wireless Sensor Networks
## 4 Proposed Transmission Scheme  
Exploiting the above investigation, we consider the performance improvement of low-power WSNs in the presence of interference. We determine the initial payload size based on the interference characteristics estimated by Equation (20). Exploiting Equation (23), we adjust the transmission rate \(R\) and the transmission time \(T\) in response to the change of channel and interference condition, respectively. Algorithm 1 summarizes the proposed scheme. ```
1:Initialize \(R\gets R_{\text{init}}\) using \(\tilde{\gamma}\)
2:Initialize \(L\gets L_{\text{init}}\) using \(\tilde{t}_{\text{idle}}\) and \(R\)
3:\(L\leftarrow\text{median}\left(L_{\text{min}},L,L_{\text{max}}\right)\)
4:\(T\gets L/R\)
5:Initialize \(I_{T}\gets 1\) and \(\tilde{S}_{\text{new}},\tilde{S}_{\text{old}}\gets 0\)
6:while\(L_{\text{bulk}}\)-bit data are not delivered do
7:for\(i=1\):\(W\)do
8: Transmit a data packet with \(R\) and \(L\)
9:if an ACK packet is received then
10:\(n_{\text{fail}}\gets 0\)
11:\(\tilde{S}_{\text{new}}\leftarrow\tilde{S}_{\text{new}}+T/(T+\beta^{\prime})\)
12: Update \(R\) using \(\tilde{\gamma}\)
13:\(L\leftarrow\text{median}\left(L_{\text{min}},RT,L_{\text{max}}\right)\)
14:\(T\gets L/R\)
15:else
16:\(n_{\text{fail}}++\)
17:if\(n_{\text{fail}}>N_{\text{fail}}\)then
18:\(R\gets R_{1}\)
19:\(L\leftarrow\text{median}\left(L_{\text{min}},RT,L_{\text{max}}\right)\)
20:\(T\gets L/R\)
21:endif
22:endif
23:endfor
24: Update \(T\) by Algorithm 2
25:\(L\leftarrow\text{median}\left(L_{\text{min}},RT,L_{\text{max}}\right)\)
26:\(T\gets L/R\)
27:endwhile
```  
**Algorithm 1**Overall process of the proposed scheme  
We initially determine the payload size by estimating the average idle period of interference. We define the interference estimation interval by the dedicated interval within the first data communication interval of a pair of scheduled nodes. With the use of an energy-type detector for the channel sensing, the transmitter node can estimate the channel occupancy of interference signal as:  
\[\tilde{\rho}=\frac{1}{N_{s}}\sum\limits_{j=1}^{N_{t}}I\left\{y_{j}>\lambda\right\} \tag{24}\]  
where \(I\left\{\cdot\right\}\) is an indicator function, \(y_{j}\) is the energy of the \(j\)-th received sample, \(\lambda\) is a threshold level and \(N_{s}\) is the total number of samples for the measurement. It can be shown that the average busy period of interference can be estimated as:  
\[\tilde{t}_{\text{busy}}=\frac{1}{N_{\text{busy}}}\sum\limits_{j=1}^{N_{\text{ busy}}}n_{\text{busy},j}T_{s} \tag{25}\]where \(N_{\rm busy}\) is the number of busy periods, \(n_{\rm busy,j}\) is the length of the \(j\)-th busy period and \(T_{s}\) is the channel sensing interval. Finally, the average idle period of interference can be estimated as:  
\[\tau_{\rm idle}=\tau_{\rm busy}\left(\frac{1}{\beta}-1\right). \tag{26}\]  
As an example, when \(N_{s}=10\) and \(T_{s}=320\) us, assume that the result of channel sensing is {O,O,X,X,X,O,X,X,X,X,X}, where \"O\" and \"X\" denote the presence and the absence of interference, respectively. Then, it is estimated that the channel occupancy of interference signal is 0.3; the average busy period of interference is 480 usand the average idle period of interference is 1.12 ms, since \(N_{\rm busy}\ =\ 2\), \(n_{\rm busy,1}\ =\ 2\) and \(n_{\rm busy,2}=1\). The initial payload size can be determined as:  
\[L_{\rm init}=-\frac{\beta_{m}}{2}+\sqrt{\left(\frac{\beta_{m}}{2}\right)^{2}+ \beta_{m}R_{m}\tau_{\rm idle}} \tag{27}\]  
where the initial transmission rate can independently be determined in what follows. The transmitter node determines the transmission rate based on the estimated SNR. It determines the transmission rate of the next data packet based on the received signal strength (RSS) of the ACK packet received most recently. It can determine the initial transmission rate from the RSS of received packets.