# A Novel Theoretical Probabilistic Model for Opportunistic Routing with Applications in Energy Consumption for WSNs

^{1}

^{2}

^{3}

^{4}

^{5}

^{6}

^{7}

^{8}

^{9}

^{10}

^{*}

## Abstract

**:**

## 1. Introduction

`‘Opportunistic’`[30], providing the full routing scheme, probability of successful transmission, expected number of transmissions, receptions and broadcasts, as well as their respective estimations via MC simulations for a given model.

## 2. Network Definition and Preliminary Discussions

#### Possible Routes

`routes()`function available in the proposed R package. The results provided by this function in a particular example can be found in the Appendix A section, which corroborates the findings in this section.

## 3. Full Stochastic Opportunist Model

#### 3.1. Probability of Successful Transmission

#### 3.2. Expected Number of Transmissions

#### 3.3. Expected Number of Receptions

#### 3.4. Expected Number of Broadcast Transmissions

## 4. Opportunistic Model Considering Random Probabilities

## 5. Comparison with Existing Methods in the Literature

## 6. Validation of the Model

#### 6.1. Precisely Known Probabilities on an OR Model

#### 6.2. Random Probabilities on an OR Model

## 7. Energy Consumption for WSN Opportunist Network

#### Numerical Example

## 8. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Appendix A

#### Appendix A.1. Opportunistic R Package Tutorial

`Opportunistic`package must be accessed using the R software, which can be downloaded at https://cloud.r-project.org/, or to be compiled online directly from cloud services as RStudio cloud accessed on 30 October 2021, https://rstudio.cloud/ or the well-known Google Colab accessed on 30 October 2021, https://colab.to/r, where is it necessary to create an account for the latter two. First, the

`Opportunistic`R package must be installed. For this, one can use the following code in the R console

`> install.packages(“Opportunistic”)`

`>`represents the prompt in the command line and must not be entered by the user. Then, load the package as

`> library(Opportunistic)`

`routes(p,delta)`,

`Expected(p)`and

`MonteCarlo(p,M)`. To use these functions, the vector of probabilities $\mathbf{p}$ of length N must be provided. The first function returns the different possible routes, their frequency as well as their respective probabilities (mathematical expressions and values) when considering uncertain probabilities lying on the interval

`p`±

`delta`. All results are based on the theory developed in Section 2.1. The last two functions return the probability of successful transmissions and the expected number of transmissions, receptions and broadcasts. The first function (

`routes`), provides these measures for all nodes using expressions (4), (5), (7) and (10). The second one provides its MC estimates for the last node only. The latter also provides a progress bar so the user can estimate the processing time. By default,

`delta`is considered to be zero (no uncertainty) and $M={10}^{5}$ when the number of Monte Carlo realizations is not declared.

> routes(p,delta = 0.05) | ||||

Freq Probability p - delta p + delta | ||||

route 1 | 1 | p1^5 | 0.32768 | 0.59049 |

route 2 | 4 | p1^3*p2 | 0.34304 | 0.56133 |

route 3 | 3 | p1*p2^2 | 0.35912 | 0.53361 |

route 4 | 3 | p1^2*p3 | 0.288 | 0.4455 |

route 5 | 2 | p2*p3 | 0.3015 | 0.4235 |

route 6 | 2 | p1*p4 | 0.184 | 0.297 |

route 7 | 1 | p5 | 0 | 0.1 |

Total | 16} | |||

> True = Expected(p) | ||||

###########################################Opportunistic Model - Theoretical results########################################### |

Number of Hops N: | 5 | ||||

Probabilities: | 0.85, | 0.72, | 0.5, | 0.28, | 0.05 |

1 | 2 | 3 | 4 | 5 | |

Success Probability | 0.85 | 0.922 | 0.958 | 0.974 | 0.979 |

Exp Transmissions | 1.00 | 2.850 | 6.143 | 11.773 | 21.135 |

Exp Receptions | 0.85 | 2.293 | 4.631 | 8.362 | 14.226 |

Exp Broadcast | 1.00 | 1.850 | 3.293 | 5.631 | 9.362 |

> Estimated = MonteCarlo(p,M=10^6)###########################################Opportunistic Model - Monte Carlo results########################################### | |||||

Number of Hops N: | 5 | ||||

Probabilities: | 0.85, | 0.72, | 0.5, | 0.28, | 0.05 |

Simulations M: | 1e+06 | ||||

|===========================================| 100% | |||||

Monte Carlo | |||||

Probability System | 0.979 | ||||

Exp Transmissions | 21.129 | ||||

Exp Receptions | 14.220 | ||||

Exp Broadcast | 9.358 |

## References

- Black, U. OSI: A Model for Computer Communications Standards; Prentice-Hall, Inc.: Hoboken, NJ, USA, 1991. [Google Scholar]
- Heimlicher, S.; Baumann, R.; May, M.; Plattner, B. The Transport Layer Revisited. In Proceedings of the 2nd International Conference on Communication Systems Software and Middleware, Bangalore, India, 7–12 January 2007; pp. 1–8. [Google Scholar]
- Biswas, S.; Morris, R. Opportunistic Routing in Multi-hop Wireless Networks. ACM Sigcomm Comput. Commun. Rev.
**2004**, 34, 69–74. [Google Scholar] [CrossRef] [Green Version] - Biswas, S.; Morris, R. ExOR: Opportunistic Multi-hop Routing for Wireless Networks. ACM Sigcomm Comput. Commun. Rev.
**2005**, 35, 133–144. [Google Scholar] [CrossRef] - Zhang, J.; Huang, H.; Min, G.; Miao, W.; Wu, D. Social-Aware Routing in Mobile Opportunistic Networks. IEEE Wirel. Commun.
**2021**, 28, 152–158. [Google Scholar] [CrossRef] - Wei, C.; Zhi, C.; Fan, P.; Letaief, K.B. AsOR: An energy efficient multi-hop opportunistic routing protocol for wireless sensor networks over Rayleigh fading channels. IEEE Trans. Wirel. Commun.
**2009**, 8, 2452–2463. [Google Scholar] [CrossRef] - Mao, X.; Tang, S.; Xu, X.; Li, X.Y.; Ma, H. Energy-Efficient Opportunistic Routing in Wireless Sensor Networks. IEEE Trans. Parallel Distrib. Syst.
**2011**, 22, 1934–1942. [Google Scholar] [CrossRef] [Green Version] - Landsiedel, O.; Ghadimi, E.; Duquennoy, S.; Johansson, M. Low power, low delay: Opportunistic routing meets duty cycling. In Proceedings of the ACM/IEEE 11th International Conference on Information Processing in Sensor Networks (IPSN), Beijing, China, 16–20 April 2012; pp. 185–196. [Google Scholar] [CrossRef] [Green Version]
- Spachos, P.; Chatzimisios, P.; Hatzinakos, D. Energy Aware Opportunistic Routing in Wireless Sensor Networks. In IEEE Globecom Workshops; IEEE: New York, NY, USA, 2012; pp. 405–409. [Google Scholar] [CrossRef]
- Schaefer, G.; Ingelrest, F.; Vetterli, M. Wireless Sensor Networks. In Proceedings of the Wireless Sensor Networks: 6th European Conference, EWSN 2009, Cork, Ireland, 11–13 February 2009; Roedig, U., Sreenan, C.J., Eds.; Springer: Berlin/Heidelberg, Germany, 2009. Chapter Potentials of Opportunistic Routing in Energy-Constrained Wireless Sensor Networks. pp. 118–133. [Google Scholar] [CrossRef] [Green Version]
- Kumaram, S.; Srivastava, S.; Sharma, D.K. Neural network-based routing protocol for opportunistic networks with intelligent water drop optimization. Int. J. Commun. Syst.
**2020**, 33, e4368. [Google Scholar] [CrossRef] - Jadhav, P.; Satao, R. A Survey on Opportunistic Routing Protocols for Wireless Sensor Networks. In Proceedings of the International Conference on Communication, Computing and Virtualization (ICCCV) 2016, Amsterdam, The Netherlands, 26–27 February 2016; Volume 79, pp. 603–609. [Google Scholar]
- Ramanathan, R.; Hansen, R.; Basu, P.; Rosales-Hain, R.; Krishnan, R. Prioritized Epidemic Routing for Opportunistic Networks. In Proceedings of the 1st International MobiSys Workshop on Mobile Opportunistic Networking (MobiOpp’07), New York, NY, USA, 11 June 2007; pp. 62–66. [Google Scholar] [CrossRef]
- Boukerche, A.; Darehshoorzadeh, A. Opportunistic Routing in Wireless Networks: Models, Algorithms, and Classifications. ACM Comput. Surv.
**2014**, 47, 22:1–22:36. [Google Scholar] [CrossRef] - Bhorkar, A.A.; Naghshvar, M.; Javidi, T.; Rao, B.D. Adaptive Opportunistic Routing for Wireless Ad Hoc Networks. IEEE/ACM Trans. Netw.
**2012**, 20, 243–256. [Google Scholar] [CrossRef] - Dhurandher, S.K.; Singh, J.; Woungang, I.; Kumar, R.; Gupta, G. Message trust-based secure multipath routing protocol for opportunistic networks. Int. J. Commun. Syst.
**2020**, 33, e4364. [Google Scholar] [CrossRef] - Bacanli, S.S.; Turgut, D. Energy-efficient unmanned aerial vehicle scanning approach with node clustering in opportunistic networks. Comput. Commun.
**2020**, 161, 76–85. [Google Scholar] [CrossRef] - Fu, X.; Pace, P.; Aloi, G.; Yang, L.; Fortino, G. Topology optimization against cascading failures on wireless sensor networks using a memetic algorithm. Comput. Netw.
**2020**, 177, 107327. [Google Scholar] [CrossRef] - Khalid, K.; Woungang, I.; Dhurandher, S.K.; Singh, J.; JPC Rodrigues, J. Energy-efficient check-and-spray geocast routing protocol for opportunistic networks. Information
**2020**, 11, 504. [Google Scholar] [CrossRef] - Dhurandher, S.K.; Singh, J.; Obaidat, M.S.; Woungang, I.; Srivastava, S.; Rodrigues, J.J. Reinforcement learning-based routing protocol for opportunistic networks. In Proceedings of the ICC 2020-2020 IEEE International Conference on Communications (ICC); IEEE: New York, NY, USA, 2020; pp. 1–6. [Google Scholar]
- Rahmani, A.M.; Tehrani, Z.H.; Souri, A. Evaluation of energy consumption in routing protocols for opportunistic networks. Telecommun. Syst.
**2021**, 1–33. [Google Scholar] [CrossRef] - Khalid, K.; Woungang, I.; Dhurandher, S.K.; Singh, J. Reinforcement learning-based fuzzy geocast routing protocol for opportunistic networks. Internet Things
**2021**, 14, 100384. [Google Scholar] [CrossRef] - Rubido, N.; Grebogi, C.; Baptista, M.S. Resiliently evolving supply-demand networks. Phys. Rev. E
**2014**, 89, 012801. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Li, Y.; Zhang, Z.L. Random Walks on Digraphs: A Theoretical Framework for Estimating Transmission Costs in Wireless Routing. In Proceedings of the IEEE INFOCOM, San Diego, CA, USA, 14–19 March 2010; pp. 1–9. [Google Scholar] [CrossRef] [Green Version]
- Darehshoorzadeh, A.; Sanchez, M.I.; Boukerche, A. Modeling and Analysis of Opportunistic Routing in Multi-hop Wireless Networks. In Proceedings of the IEEE 22nd International Symposium on Modelling, Analysis & Simulation of Computer and Telecommunication Systems, Paris, France, 9–11 September 2014; pp. 337–344. [Google Scholar] [CrossRef]
- Darehshoorzadeh, A. Opportunistic Routing in Wireless Mesh Networks. Ph.D. Thesis, Universitat Politecnica de Catalunya, Barcelona, Spain, 2012. [Google Scholar]
- Cerdà-Alabern, L.; Pla, V.; Darehshoorzadeh, A. On the Performance Modeling of Opportunistic Routing. In Proceedings of the Second International Workshop on Mobile Opportunistic Networking, Pisa, Italy, 22–23 February 2010; pp. 15–21. [Google Scholar] [CrossRef]
- Luo, J.; Hu, J.; Wu, D.; Li, R. Opportunistic Routing Algorithm for Relay Node Selection in Wireless Sensor Networks. IEEE Trans. Ind. Inform.
**2015**, 11, 112–121. [Google Scholar] [CrossRef] - Ripley, B.D. The R project in statistical computing. MSOR Connect. Newsl. Ltsn Maths Stats Netw.
**2001**, 1, 23–25. [Google Scholar] [CrossRef] [Green Version] - Galarza, C.E.; Palma, J.M. Package
`‘Opportunistic’`:Routing Distribution, Broadcasts, Transmissions and Receptions in an Opportunistic Network, 2nd ed.; 2017; online document 30 October 2021; Available online: https://cran.r-project.org/web/packages/Opportunistic/index.html (accessed on 30 October 2021). - Heimlicher, S.; Karaliopoulos, M.; Levy, H.; May, M. End-to-end vs. Hop-by-hop Transport Under Intermittent Connectivity. In Proceedings of the 1st International Conference on Autonomic Computing and Communication Systems, Rome, Italy, 28–30 October 2007; Autonomics ’07. pp. 20:1–20:10. [Google Scholar]
- Palma, J.M.; Carvalho, L.D.; Goncalves, A.P.; Galarza, C.E.; De Oliveira, A.M. Application of Control Theory Markov Systems to Minimize the Number of Transmissions in a Multi-hop Network. In Proceedings of the 2015 Asia-Pacific Conference on Computer Aided System Engineering, Quito, Ecuador, 14–16 July 2015; pp. 296–301. [Google Scholar] [CrossRef]
- Grimmett, G.R. Percolation, 1st ed.; Springer Science & Business Media: Berlin/Heidelberg, Germany, 1999; Volume 321. [Google Scholar]
- Weiss, N.; Holmes, P.; Hardy, M. A Course in Probability; Pearson Addison Wesley: Boston, MA, USA, 2006. [Google Scholar]
- Cacciapuoti, A.S.; Caleffi, M.; Paura, L. A theoretical model for opportunistic routing in ad hoc networks. In Proceedings of the 2009 International Conference on Ultra Modern Telecommunications Workshops, St. Petersburg, Russia, 12–14 October 2009; pp. 1–7. [Google Scholar] [CrossRef]
- Duran-Faundez, C.; Palma, J.M.; Orellana-Romero, E.; Melin, P. Effect of packet sampling time on a colony of mobile routing robots for communication link maintenance using IEEE 802.15. 4 devices. In Proceedings of the 10th International Conference on Modeling, Optimization and Simulation, Nancy, France, 5–7 November 2014. [Google Scholar]
- Palma, J.M.; Duran-Faundez, C.; De P. Carvalho, L.; Morais, C.; Oliveira, R.C.L.F.; Rubio, E.; Herman, K. Protocol for Energy-Efficiency in Networked Control Systems Based on WSN. Sensors
**2018**, 18, 2590. [Google Scholar] [CrossRef] [PubMed] [Green Version]

**Figure 2.**Alternative configurations of the opportunistic network model presented in Figure 1.

**Figure 3.**N-hop opportunistic models for $N=1,2,3$. Colors are used to depict that an N-hop opportunistic model has $N-1$ opportunistic submodels embedded.

**Figure 4.**Prior distributions for probabilities ${p}_{i}$’s for a 5-hop opportunistic model considered for a MC simulation study.

**Figure 5.**Estimated ${P}_{s}^{{\scriptscriptstyle \left(N\right)}}$ density and histograms for ${P}_{s}^{{\scriptscriptstyle \left(N\right)}}$, ${T}_{N}$, ${R}_{N}$ and ${T}_{N}^{B}$ when considering random probabilities. True mean values are represented by a blue vertical line.

**Table 1.**Comparison of the true and estimated values for ${P}_{s}^{{\scriptscriptstyle \left(N\right)}}$, $\mathbb{E}\left[{T}_{N}\right]$, $\mathbb{E}\left[{R}_{N}\right]$ and $\mathbb{E}\left[{T}_{N}^{B}\right]$.

Hops | ||||||
---|---|---|---|---|---|---|

1 | 2 | 3 | 4 | 5 | MC | |

${P}_{s}^{{\scriptscriptstyle \left(N\right)}}$ | 0.85 | 0.9223 | 0.9581 | 0.9742 | 0.9792 | 0.9791 |

$\mathbb{E}\left[{T}_{N}\right]$ | 1 | 2.85 | 6.1425 | 11.7731 | 21.135 | 21.129 |

$\mathbb{E}\left[{R}_{N}\right]$ | 0.85 | 2.2925 | 4.6306 | 8.3616 | 14.226 | 14.220 |

$\mathbb{E}\left[{T}_{N}^{B}\right]$ | 1 | 1.85 | 3.2925 | 5.6306 | 9.3616 | 9.3582 |

**Table 2.**Comparison of the true and estimated values for ${P}_{s}^{{\scriptscriptstyle \left(N\right)}}$, $\mathbb{E}\left[{T}_{N}\right]$, $\mathbb{E}\left[{R}_{N}\right]$ and $\mathbb{E}\left[{T}_{N}^{B}\right]$.

${\mathit{P}}_{\mathit{s}}^{\left(\mathit{N}\right)}$ | $\mathbb{E}\left[{\mathit{T}}_{\mathit{N}}\right]$ | $\mathbb{E}\left[{\mathit{R}}_{\mathit{N}}\right]$ | $\mathbb{E}\left[{\mathit{T}}_{\mathit{N}}^{\mathit{B}}\right]$ | |
---|---|---|---|---|

True | 0.9611 | 6.1876 | 4.6808 | 3.3193 |

Estimated | 0.9601 | 6.1900 | 4.6894 | 3.3207 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Galarza, C.E.; Palma, J.; Morais, C.; Utria, J.; Carvalho, L.; Bustos, D.; Oliveira, R.C.L.F.
A Novel Theoretical Probabilistic Model for Opportunistic Routing with Applications in Energy Consumption for WSNs. *Sensors* **2021**, *21*, 8058.
https://doi.org/10.3390/s21238058

**AMA Style**

Galarza CE, Palma J, Morais C, Utria J, Carvalho L, Bustos D, Oliveira RCLF.
A Novel Theoretical Probabilistic Model for Opportunistic Routing with Applications in Energy Consumption for WSNs. *Sensors*. 2021; 21(23):8058.
https://doi.org/10.3390/s21238058

**Chicago/Turabian Style**

Galarza, Christian E., Jonathan M. Palma, Cecilia F. Morais, Jaime Utria, Leonardo P. Carvalho, Daniel Bustos, and Ricardo C. L. F. Oliveira.
2021. "A Novel Theoretical Probabilistic Model for Opportunistic Routing with Applications in Energy Consumption for WSNs" *Sensors* 21, no. 23: 8058.
https://doi.org/10.3390/s21238058