# A Practical Neighbor Discovery Framework for Wireless Sensor Networks
## 5 Methods of Adjusting Duty Cycle
### Energy Management Methods  
As shown in Equation (4), node \(u_{i}\)'s lifetime is \(Lf_{i}=\frac{P_{\text{stop}}}{P_{\text{stop}}\theta}\) if it sticks to duty cycle \(\theta\) all the time. To extend the lifetime, it could reduce the duty cycle when the remaining energy is depleting. We propose two methods to adjust the duty cycle. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Algorithms** & **DC 1** & **DC 2** & **Latency** & **Asymmetric?** \\ \hline Quorum [24] & \(\theta\) & \(\theta\) & \(\frac{4}{\theta^{2}}\) & No \\ LL-Optimal [33] & \(\theta\) & \(\theta\) & \(\frac{1}{\theta^{2}}\) & No \\ Disco [16] & \(\theta_{1}\) & \(\theta_{2}\) & \(\frac{4}{\theta_{1}\theta_{2}}\) & Yes \\ U-Connect [18] & \(\theta_{1}\) & \(\theta_{2}\) & \(\frac{9}{\theta_{1}\theta_{2}}\) & Yes \\ Searchlight [13] & \(\theta_{1}\) & \(\theta_{2}\) & \(\frac{2}{\theta_{1}\theta_{2}}\) & Yes \\ C-Torus [35] & \(\theta_{1}\) & \(\theta_{2}\) & \(\frac{9}{\theta_{1}\theta_{2}}\) & Yes \\ BlindDate [26] & \(\theta_{1}\) & \(\theta_{2}\) & \(\frac{9}{\theta_{1}\theta_{2}}\) & Yes \\ Hedis [15] & \(\theta_{1}\) & \(\theta_{2}\) & \(\frac{4}{\theta_{1}\theta_{2}}\) & Yes \\ Todis [15] & \(\theta_{1}\) & \(\theta_{2}\) & \(\frac{9}{\theta_{1}\theta_{2}}\) & Yes \\ Hello [22] & \(\theta_{1}\) & \(\theta_{2}\) & \(\frac{(\alpha_{1}+1)(\alpha_{1}+1)}{\alpha_{1}\alpha_{2}\alpha_{1}\alpha_{2}}\) & Yes \\ \hline \hline \end{tabular}  
* [label=(0)]  
\end{table} 
Table 2: Algorithms comparison for two neighbors. **Piece-wise Reducing (PWR) Method**: Generate \(m\) different energy levels as \(P_{max}=\hat{P}_{1}>\hat{P}_{2}>\ldots\hat{P}_{m}>0\) and \(m\) corresponding duty cycle levels as \(\hat{\theta}_{1}>\hat{\theta}_{2}>\ldots>\hat{\theta}_{m}\) in advance. When the remaining energy drops down to \(\hat{P}_{j}\), the node adjusts the duty cycle to \(\hat{\theta}_{j}\). For simplicity, denote \(\hat{P}_{m+1}=0\) and node \(u_{i}\) selects duty cycle at time \(t\) as:  
\[\theta_{i}(t)=\hat{\theta}_{j},\ if\ P_{i}(t)\in(\hat{P}_{j+1},\hat{P}_{j}]. \tag{6}\]  
The lifetime of node \(u_{i}\) is computed as:  
\[Lf_{i} =\sum_{j=1}^{m}\frac{\hat{P}_{j}-\hat{P}_{j+1}}{p_{n}\cdot\hat{ \theta}_{j}}. \tag{7}\]  
The PWR method can extend the node's lifetime as compared to Equation (4), but it has to generate different levels of energy and duty cycles beforehand. We propose another method which is much easier to implement. **Periodical Reducing (PDR) Method**: Node \(u_{i}\) selects an initial duty cycle \(\hat{\theta}_{0}\) when it starts (with energy \(P_{max}\)). The node adjusts the duty cycle every \(\hat{T}\) time slots according to the remaining energy, where \(\hat{T}\) is a fixed constant. Supposing that the remaining energy at time \(t\) is \(P_{i}(t)\), the duty cycle is reduced as:  
\[\frac{P_{i}(t)}{\theta_{i}(t)}=\frac{P_{max}}{\hat{\theta}_{0}}. \tag{8}\]  
When the remaining energy is very low (\(P_{i}(t)\leq P_{min}\) where \(P_{min}\) is a small constant), the node has to fix the duty cycle as \(\hat{\theta}_{min}=\frac{P_{min}}{P_{max}}\). \(\hat{\theta}_{0}\). In order to compute the lifetime, it is necessary to compute the number of times that the node adjusts the duty cycle. Suppose after \(m\) periods of length \(\hat{T}\), the remaining energy is no larger than \(P_{min}\), and the following equations are derived:  
\[\left\{ \begin{array}{ll}\hat{P}_{0}=P_{max},&\hat{\theta}_{0}=\hat{\theta} _{0},\\ \hat{P}_{1}=\hat{P}_{0}-\hat{T}\cdot\hat{\theta}_{0}\cdot p_{n},&\hat{\theta}_ {1}=\frac{\hat{P}_{1}}{\hat{P}_{0}}\cdot\hat{\theta}_{0},\\ \vdots&\vdots\\ \hat{P}_{i}=\hat{P}_{i-1}-\hat{T}\cdot\hat{\theta}_{i-1}\hat{p}_{n},&\hat{ \theta}_{i}=\frac{\hat{P}_{i}}{\hat{P}_{0}}\cdot\hat{\theta}_{0},\\ \vdots&\vdots\\ \hat{P}_{m}=\hat{P}_{m-1}-\hat{T}\cdot\hat{\theta}_{m-1}\cdot p_{n},&\hat{ \theta}_{m}=\frac{P_{min}}{\hat{P}_{0}}\cdot\hat{\theta}_{0}.\end{array} \right. \tag{9}\]  
Combine these to give:  
\[