# Modeling Time Requirements of CPS in Wireless Networks

^{*}

## Abstract

**:**

## 1. Introduction

- A Schedulability and Scalability algorithm capable of determining whether a subscription can be handled by a given network topology considering the CPS time constraints;
- The introduction of a network unreliability abstraction factor (modeled as a margin of safety) that impacts the scalability and schedulability analysis by applying a time reservation restraint to the acceptance of subscriptions while enabling the achievement of higher network loads (and therefore use) when compared to the conservative worst-case analysis;
- An Evaluation of the proposed algorithm against simulations considering a wide-range network load with three case studies;
- A discussion about the use of the simulations to adjust the margin of safety to fit the network capacity, thus improving utility.

## 2. Network Model

**Publish-Subscribe:**nodes and gateways interact using a publish-subscribe policy, with gateways sending interest messages $i(type,region,interval,period,expiry)$ to express interest on a given $type$ of data, produced in a given $region$ of space, during a given time $interval$. Nodes matching these criteria periodically send reply messages every $period$ units of time. Data is assumed to be valid from the perspective of applications until they expire at time instant $expiry$. Response messages $r(type,origin,timestamp,expiry,data)$ carry the requested data along with information about its $type$, $origin$, a $timestamp$, and an $expiry$ (the concept of message expiry is discussed below).**Periodic Behavior:**all traffic in the network originates from periodic responses to known interest messages. Event-driven applications are not allowed and control messages are either known beforehand and can be accounted for, or are modeled as a reservation of network capacity. The periodic responses respect the Interest $period$ during the Interest time $interval$.**Expiry:**data carried by the network is only valid during a given time period, expressed by the expiry of the containing response message ($r.expiry$). Messages on routing queues are kept ordered by $r.expiry$, so messages closer to expiration are routed first. Expired messages are discarded.

## 3. Algorithm

Algorithm 1 Network Load |

1: procedure $\mathbf{Analyze}\phantom{\rule{3.33333pt}{0ex}}$($\mathcal{I}$, $\mathcal{N}$, $MOS$, ${M}_{rate}$, ${t}_{mac}$) |

2: ${\mathcal{I}}^{\prime}\leftarrow \mathcal{I}$ ordered by $min(i.period,i.expiry)$ ascendant, where $i\in \mathcal{I}$ |

3: ${\mathcal{N}}^{\prime}\leftarrow \mathcal{N}$ ordered by $hops(n,sink)$ descendent, where $n\in \mathcal{N}$ |

4: ${R}_{rate}\leftarrow 0$ |

5: $result.load$ = 0 |

6: $result.accept$ = true |

7: $result.{I}_{u}\leftarrow \varnothing $ |

8: for each $i\in {\mathcal{I}}^{\prime}$ do |

9: $i.threshold$ = $min(i.period,i.expiry)$ |

10: for each $n\in {\mathcal{N}}^{\prime}$ do |

11: $n.{p}_{rx}$ = $n.{p}_{wait}$ = $n.{p}_{elapsed}$ = 0 |

12: $n.responses$ = 0 |

13: for each $ii\in {\mathcal{I}}^{\prime}$ | $ii.index$ <= $i.index$ do |

14: if $n\ne sink$ and $ii.region.contains\left(n\right)$ then |

15: $n.responses$ += $\lfloor (i.period/ii.period)\rfloor $ |

16: if $ii.index$ = $i.index$ then |

17: ${R}_{rate}$ += $(1/i.period)$ |

18: end if |

19: end if |

20: end for |

21: end for |

22: for each $n\in {\mathcal{N}}^{\prime}$ do |

23: $n.{p}_{tx}$ = $n.{p}_{rx}$ + $n.responses$ |

24: $n.{p}_{elapsed}$ += $n.{p}_{wait}$ + $n.{p}_{tx}$ |

25: if $n\ne sink$ then |

26: $n.next\_hop=n.route\left(sink\right)$ |

27: $n.next\_hop.{p}_{rx}$ += n.${p}_{tx}$ |

28: $n.next\_hop.{p}_{elapsed}$ += $n.{p}_{elapsed}$ |

29: end if |

30: for each $w\in ({N}_{Rn}-\{n.next\_hop\})$ do |

31: $w.{p}_{wait}$ += $n.{p}_{tx}$ |

32: end for |

33: end for |

34: ${t}_{elapsed}$ = $sink.{p}_{elapsed}\ast {t}_{mac}$ |

35: $free$ = $i.threshold$ - ${t}_{elapsed}$ |

36: $result.load$ = $(2\ast {R}_{rate})$/${M}_{rate}$ |

37: if ($free$/$i.threshold$) < $MOS$or$result.load$ > $1.0$ then |

38: $result.accept$ = false |

39: $result.{I}_{u}\leftarrow result.{I}_{u}\cup i$ |

40: end if |

41: end for |

42: return $result$ |

43: end procedure |

## 4. Case Study

#### 4.1. SmartData and Trustful Space-Time Protocol

#### 4.2. Experimental Setup

#### 4.3. Results

## 5. Discussion

## 6. Related Works

#### 6.1. Schedulability

#### 6.2. Scalability

## 7. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Derler, P.; Lee, E.; Sangiovanni-Vincentelli, A. Modeling Cyber-Physical Systems. Proc. IEEE
**2012**, 100, 13–28. [Google Scholar] [CrossRef] - Hu, L.; Xie, N.; Kuang, Z.; Zhao, K. Review of Cyber-Physical System Architecture. In Proceedings of the 15th International Symposium on Object/Component/Service-Oriented Real-Time Distributed Computing Workshops, Shenzhen, China, 11 April 2012. [Google Scholar] [CrossRef]
- Mo, L.; You, P.; Cao, X.; Song, Y.; Kritikakou, A. Event-Driven Joint Mobile Actuators Scheduling and Control in Cyber-Physical Systems. IEEE Trans. Ind. Inf.
**2019**, 15, 5877–5891. [Google Scholar] [CrossRef] - Khan, M.U.; Li, S.; Wang, Q.; Shao, Z. CPS Oriented Control Design for Networked Surveillance Robots With Multiple Physical Constraints. IEEE Trans. Comput. Aided Des. Integr. Circuits Syst.
**2016**, 35, 778–791. [Google Scholar] [CrossRef] - Kannengiesser, U.; Müller, H. Multi-level, Viewpoint-Oriented Engineering of Cyber-Physical Production Systems: An Approach Based on Industry 4.0, System Architecture and Semantic Web Standards. In Proceedings of the 2018 44th Euromicro Conference on Software Engineering and Advanced Applications (SEAA), Prague, Czech Republic, 29–31 August 2018; pp. 331–334. [Google Scholar] [CrossRef]
- Wang, Z.; Song, H.; Watkins, D.W.; Ong, K.G.; Xue, P.; Yang, Q.; Shi, X. Cyber-physical systems for water sustainability: challenges and opportunities. IEEE Commun. Mag.
**2015**, 53, 216–222. [Google Scholar] [CrossRef][Green Version] - Iyer, G.; Agrawal, P.; Cardozo, R.S. Analytic model and simulation study for network scalability in smart utility networks. In Proceedings of the 2013 IEEE Innovative Smart Grid Technologies-Asia (ISGT Asia), Bangalore, India, 10–13 November 2013. [Google Scholar] [CrossRef]
- Lee, E. The Past, Present and Future of Cyber-Physical Systems: A Focus on Models. Sensors
**2015**, 15, 4837–4869. [Google Scholar] [CrossRef] [PubMed] - Benhai, Z.; Yuan, Y.; Hongyan, M.; Dapeng, Y.; Libo, X. Research on optimal ELSF real-time scheduling algorithm for CPS. In Proceedings of the 2016 Chinese Control and Decision Conference (CCDC), Yinchuan, China, 28–30 May 2016; pp. 6867–6871. [Google Scholar] [CrossRef]
- Li, F.; Liu, C.; Yu, G.; Chen, Z. A Scheduling Algorithm of Events with Uncertain Timestamps for CPS. In Proceedings of the 2017 3rd International Conference on Big Data Computing and Communications (BIGCOM), Chengdu, China, 10–11 August 2017; pp. 313–319. [Google Scholar] [CrossRef]
- Prieto, M.; Pernía, A.; Nuño, F.; Díaz, J.; Villegas, P. Development of a Wireless Sensor Network for Individual Monitoring of Panels in a Photovoltaic Plant. Sensors
**2014**, 14, 2379–2396. [Google Scholar] [CrossRef] [PubMed] - Boussard, M.; Bui, D.T.; Douville, R.; Justen, P.; Sauze, N.L.; Peloso, P.; Vandeputte, F.; Verdot, V. Future Spaces: Reinventing the Home Network for Better Security and Automation in the IoT Era. Sensors
**2018**, 18, 2986. [Google Scholar] [CrossRef] [PubMed][Green Version] - Horvath, P.; Yampolskiy, M.; Koutsoukos, X. Efficient Evaluation of Wireless Real-Time Control Networks. Sensors
**2015**, 15, 4134–4153. [Google Scholar] [CrossRef] [PubMed][Green Version] - Frohlich, A.A.; Resner, D. Data-Centric Cyber-Physical Systems Design with Smartdata. In Proceedings of the 2018 Winter Simulation Conference (WSC), Gothenburg, Sweden, 9–12 December 2018. [Google Scholar] [CrossRef]
- Resner, D.; Fröhlich, A.A. TSTP MAC: A Foundation for the Trustful Space-Time Protocol. In Proceedings of the 14th IEEE/IFIP International Conference on Embedded and Ubiquitous Computing (EUC 2016), Paris, France, 24 August 2016. [Google Scholar]
- Ozen, S.; Oktug, S. Adaptive sink selection for WSNs using forwarder set based dynamic duty cycling. In Proceedings of the 2014 Eleventh Annual IEEE International Conference on Sensing, Communication, and Networking Workshops (SECON Workshops), Singapore, 30 June–4 July 2014; pp. 7–12. [Google Scholar] [CrossRef]
- Zhang, D.; Dong, E. A Virtual Coordinate-Based Bypassing Void Routing for Wireless Sensor Networks. IEEE Sens. J.
**2015**, 15, 3853–3862. [Google Scholar] [CrossRef] - Fröhlich, A.A.; Scheffel, R.M.; Kozhaya, D.; Veríssimo, P.E. Byzantine Resilient Protocol for the IoT. IEEE Internet Things J.
**2019**, 6, 2506–2517. [Google Scholar] [CrossRef] - Harbin, J.; Burns, A.; Davis, R.I.; Indrusiak, L.S.; Bate, I.; Griffin, D. The AirTight Protocol for Mixed Criticality Wireless CPS. ACM Trans. Cyber-Phys. Syst.
**2020**, 4, 1–28. [Google Scholar] [CrossRef][Green Version] - Burns, A.; Harbin, J.; Indrusiak, L.; Bate, I.; Davis, R.; Griffin, D. AirTight: A Resilient Wireless Communication Protocol for Mixed-Criticality Systems. In Proceedings of the 2018 IEEE 24th International Conference on Embedded and Real-Time Computing Systems and Applications (RTCSA), Hakodate, Japan, 28–31 August 2018; pp. 65–75. [Google Scholar] [CrossRef][Green Version]
- Nayak, N.G.; Dürr, F.; Rothermel, K. Time-sensitive Software-defined Network (TSSDN) for Real-time Applications. In Proceedings of the 24th International Conference on Real-Time Networks and Systems, New York, NY, USA, 19–21 October 2016; pp. 193–202. [Google Scholar] [CrossRef]
- Ting, K.; Liu, T.; Tibbets, L.; Figueira, S. CapPlan—A Network Capacity Planning Tool for LambdaGrids. In Proceedings of the International conference on Networking and Services (ICNS’06), Silicon Valley, CA, USA, 16–21 July 2006; p. 65. [Google Scholar] [CrossRef]
- Zats, S.; Su, R.; Watteyne, T.; Pister, K.S. Scalability of Time Synchronized wireless sensor networking. In Proceedings of the IECON 2011—37th Annual Conference of the IEEE Industrial Electronics Society, Melbourne, Victoria, Australia, 7–10 November 2011. [Google Scholar] [CrossRef]
- Agamy, A.F.; Mohamed, A.M. Performance Modeling of WSN with Bursty Delivery Mode. CoRR
**2017**, abs/1702.03907. [Google Scholar] - Younis, M.; Akkaya, K. Strategies and Techniques for Node Placement in Wireless Sensor Networks: A Survey. Ad Hoc Netw.
**2008**, 6, 621–655. [Google Scholar] [CrossRef]

Scenario 1 | |
---|---|

Interest | selected nodes/period |

${I}_{1,1}$ | 115 nodes w/$900\phantom{\rule{3.33333pt}{0ex}}\mathrm{s}$ |

${I}_{1,2}$ | 115 nodes w/$600\phantom{\rule{3.33333pt}{0ex}}\mathrm{s}$ |

${I}_{1,3}$ | 115 nodes w/$300\phantom{\rule{3.33333pt}{0ex}}\mathrm{s}$ |

${I}_{1,4}$ | 115 nodes w/$60\phantom{\rule{3.33333pt}{0ex}}\mathrm{s}$ |

${I}_{1,5}$ | [11..115] nodes w/$60\phantom{\rule{3.33333pt}{0ex}}\mathrm{s}$ |

Set | Period | Set | Period |
---|---|---|---|

${S}_{1}$ | 900 s | ${S}_{8}$ | 0.4×60 s, ${S}_{4}$ |

${S}_{2}$ | 600 s, ${S}_{1}$ | ${S}_{9}$ | 0.5×60 s, ${S}_{4}$ |

${S}_{3}$ | 300 s, ${S}_{2}$ | ${S}_{10}$ | 0.6×60 s, ${S}_{4}$ |

${S}_{4}$ | 60 s, ${S}_{3}$ | ${S}_{11}$ | 0.7×60 s, ${S}_{4}$ |

${S}_{5}$ | 0.1×60 s, ${S}_{4}$ | ${S}_{12}$ | 0.8×60 s, ${S}_{4}$ |

${S}_{6}$ | 0.2×60 s, ${S}_{4}$ | ${S}_{13}$ | 0.9×60 s, ${S}_{4}$ |

${S}_{7}$ | 0.3×60 s, ${S}_{4}$ | ${S}_{14}$ | 1.0×60 s, ${S}_{4}$ |

Scenario 2 | Scenario 3 | ||
---|---|---|---|

Interest | selected nodes/period | Interest | selected nodes/period |

${I}_{2,1}$ | 1 node w/60 s/0.3 s | ${I}_{3,1}$ | 3 nodes w/60 s/0.3 s |

${I}_{2,2}$ | 1 node w/0.3 s/0.3 s | ${I}_{3,2}$ | 3 nodes w/0.3 s/0.3 s |

${I}_{2,3}$ | 4 nodes w/1 s/1 s | ${I}_{3,3}$ | [4..40] nodes w/1 s/1 s |

${I}_{2,4}$ | 7 nodes w/10 s/10 s | ${I}_{3,4}$ | [4..40] nodes w/10 s/10 s |

${I}_{2,5}$ | [1..13] nodes w/1 s/1 s | - | - |

Set | Period | Set | Period |
---|---|---|---|

${S}_{1}$ | 0.3 s | ${S}_{15}$ | 0.2×{1 s}, ${S}_{13}$ |

${S}_{2}$ | 60 s, ${S}_{1}$ | ${S}_{16}$ | 0.3×{1 s}, ${S}_{13}$ |

${S}_{3}$ | 60 s, ${S}_{2}$ | ${S}_{17}$ | 0.4×{1 s}, ${S}_{13}$ |

${S}_{4}$ | 1 s, ${S}_{3}$ | ${S}_{18}$ | 0.5×{1 s}, ${S}_{13}$ |

${S}_{5}$ | 1 s, ${S}_{4}$ | ${S}_{19}$ | 0.6×{1 s}, ${S}_{13}$ |

${S}_{6}$ | 1 s, ${S}_{5}$ | ${S}_{20}$ | 0.7×{1 s}, ${S}_{13}$ |

${S}_{7}$ | 10 s, ${S}_{6}$ | ${S}_{21}$ | 0.8×{1 s}, ${S}_{13}$ |

${S}_{8}$ | 10 s, ${S}_{7}$ | ${S}_{22}$ | 0.9×{1 s}, ${S}_{13}$ |

${S}_{9}$ | 10 s, ${S}_{8}$ | ${S}_{23}$ | 1.0×{1 s}, ${S}_{13}$ |

${S}_{10}$ | 10 s, ${S}_{9}$ | ${S}_{24}$ | 1.1×{1 s}, ${S}_{13}$ |

${S}_{11}$ | 10 s, ${S}_{10}$ | ${S}_{25}$ | 1.2×{1 s}, ${S}_{13}$ |

${S}_{12}$ | 10 s, ${S}_{11}$ | ${S}_{26}$ | 1.3×{1 s}, ${S}_{13}$ |

${S}_{13}$ | 10 s, ${S}_{12}$ | ${S}_{27}$ | 1.4×{1 s} ${S}_{13}$ |

${S}_{14}$ | 0.1×{1 s}, ${S}_{13}$ | ${S}_{28}$ | 1.5×{1 s}, ${S}_{13}$ |

Set | Period | Set | Period | Set | Period |
---|---|---|---|---|---|

${S}_{1}$ | 60 s | ${S}_{17}$ | 0.3 s, 1.1×{1 s, 10 s}, ${S}_{6}$ | ${S}_{33}$ | 0.3 s, 2.7×{1 s, 10 s}, ${S}_{6}$ |

${S}_{2}$ | 60 s, ${S}_{1}$ | ${S}_{18}$ | 0.3 s, 1.2×{1 s, 10 s}, ${S}_{6}$ | ${S}_{34}$ | 0.3 s, 2.8×{1 s, 10 s}, ${S}_{6}$ |

${S}_{3}$ | 60 s, ${S}_{2}$ | ${S}_{19}$ | 0.3 s, 1.3×{1 s, 10 s}, ${S}_{6}$ | ${S}_{35}$ | 0.3 s, 2.9×{1 s, 10 s}, ${S}_{6}$ |

${S}_{4}$ | 0.3 s, ${S}_{3}$ | ${S}_{20}$ | 0.3 s, 1.4×{1 s, 10 s}, ${S}_{6}$ | ${S}_{36}$ | 0.3 s, 3.0×{1 s, 10 s}, ${S}_{6}$ |

${S}_{5}$ | 0.3 s, ${S}_{4}$ | ${S}_{21}$ | 0.3 s, 1.5×{1 s, 10 s}, ${S}_{6}$ | ${S}_{37}$ | 0.3 s, 3.1×{1 s, 10 s}, ${S}_{6}$ |

${S}_{6}$ | 0.3 s, ${S}_{5}$ | ${S}_{22}$ | 0.3 s, 1.6×{1 s, 10 s}, ${S}_{6}$ | ${S}_{38}$ | 0.3 s, 3.2×{1 s, 10 s}, ${S}_{6}$ |

${S}_{7}$ | 0.3 s, 0.1×{1s, 10 s}, ${S}_{6}$ | ${S}_{23}$ | 0.3 s, 1.7×{1 s, 10 s}, ${S}_{6}$ | ${S}_{39}$ | 0.3 s, 3.3×{1s, 10 s}, ${S}_{6}$ |

${S}_{8}$ | 0.3 s, 0.2×{1s, 10 s}, ${S}_{6}$ | ${S}_{24}$ | 0.3 s, 1.8×{1 s, 10 s}, ${S}_{6}$ | ${S}_{40}$ | 0.3 s, 3.4×{1s, 10 s}, ${S}_{6}$ |

${S}_{9}$ | 0.3 s, 0.3×{1s, 10 s}, ${S}_{6}$ | ${S}_{25}$ | 0.3 s, 1.9×{1 s, 10 s}, ${S}_{6}$ | ${S}_{41}$ | 0.3 s, 3.5×{1s, 10 s}, ${S}_{6}$ |

${S}_{10}$ | 0.3 s, 0.4×{1s, 10 s}, ${S}_{6}$ | ${S}_{26}$ | 0.3 s, 2.0×{1 s, 10 s}, ${S}_{6}$ | ${S}_{42}$ | 0.3 s, 3.6×{1s, 10 s}, ${S}_{6}$ |

${S}_{11}$ | 0.3 s, 0.5×{1s, 10 s}, ${S}_{6}$ | ${S}_{27}$ | 0.3 s, 2.1×{1 s, 10 s}, ${S}_{6}$ | ${S}_{43}$ | 0.3 s, 3.7×{1s, 10 s}, ${S}_{6}$ |

${S}_{12}$ | 0.3 s, 0.6×{1s, 10 s}, ${S}_{6}$ | ${S}_{28}$ | 0.3 s, 2.2×{1 s, 10 s}, ${S}_{6}$ | ${S}_{44}$ | 0.3 s, 3.8×{1s, 10 s}, ${S}_{6}$ |

${S}_{13}$ | 0.3 s, 0.7×{1s, 10 s}, ${S}_{6}$ | ${S}_{29}$ | 0.3 s, 2.3×{1 s, 10 s}, ${S}_{6}$ | ${S}_{45}$ | 0.3 s, 3.9×{1s, 10 s}, ${S}_{6}$ |

${S}_{14}$ | 0.3 s, 0.8×{1s, 10 s}, ${S}_{6}$ | ${S}_{30}$ | 0.3 s, 2.4×{1 s, 10 s}, ${S}_{6}$ | ${S}_{46}$ | 0.3 s, 4.0×{1s, 10 s}, ${S}_{6}$ |

${S}_{15}$ | 0.3 s, 0.9×{1s, 10 s}, ${S}_{6}$ | ${S}_{31}$ | 0.3 s, 2.5×{1 s, 10 s}, ${S}_{6}$ | - | - |

${S}_{16}$ | 0.3 s, 1.0×{1s, 10 s}, ${S}_{6}$ | ${S}_{32}$ | 0.3 s, 2.6×{1 s, 10 s}, ${S}_{6}$ | - | - |

© 2020 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 (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Huegel Richa, C.; M. de Lucena, M.; Passig Horstmann, L.; Conradi Hoffmann, J.L.; Fröhlich, A.A.
Modeling Time Requirements of CPS in Wireless Networks. *Sensors* **2020**, *20*, 1818.
https://doi.org/10.3390/s20071818

**AMA Style**

Huegel Richa C, M. de Lucena M, Passig Horstmann L, Conradi Hoffmann JL, Fröhlich AA.
Modeling Time Requirements of CPS in Wireless Networks. *Sensors*. 2020; 20(7):1818.
https://doi.org/10.3390/s20071818

**Chicago/Turabian Style**

Huegel Richa, César, Mateus M. de Lucena, Leonardo Passig Horstmann, José Luis Conradi Hoffmann, and Antônio Augusto Fröhlich.
2020. "Modeling Time Requirements of CPS in Wireless Networks" *Sensors* 20, no. 7: 1818.
https://doi.org/10.3390/s20071818