# Adaptive Segmentation of Streaming Sensor Data on Edge Devices

^{*}

## Abstract

**:**

## 1. Introduction

- the cubic splinelet of type $WSS{R}_{min}$—the special type of splinelet that minimizes the Weighted Sum of Squared Residuals (Section 4.1),
- the algorithm for ${C}^{2}$-continuous $WSS{R}_{min}$-cubic splinelet-based adaptive segmentation of streaming sensor data (Section 4.2 and Section 4.3),
- numerical results which demonstrate the effectiveness of the algorithm (Section 5).

## 2. Related Work

#### 2.1. Data Stream Segmentation

- reconstruction of a sampled noisy signal (to maintain its continuity/smoothness class as a key feature (like non-negativity)) before the network transmission,
- signal compression (in experiments with test signals, we observed the data size reduction from 135 to 208 times, i.e., two orders of magnitude),
- reduction of network traffic (in the entire infrastructure),
- energy savings (in the entire infrastructure—the network communication is energy-intensive, and additionally the signal smoothed on edge devices no longer needs to be pre-processed in the cloud).

#### 2.2. Data Stream Smoothing

- significantly reduces the size of the data needed to be transferred from the edge layer to the cloud,
- reduces delays and speeds up data transmission,
- reduces energy consumption (in the entire infrastructure).

#### 2.3. Data Stream Compression

#### 2.4. Splines

#### 2.5. Possible Application Areas

## 3. Problem Formulation

**Problem**

**statement.**

**Remark**

**1.**

## 4. Proposed Solution

#### 4.1. Cubic Splinelet of Type $WSS{R}_{min}$—The Solution Building Block

**Definition**

**1.**

- $s\left(x\right)$ is ${C}^{2}$-continuous on the interval ${I}_{s}=[0,{x}_{D}]$,
- $s\left(x\right)$ has the following boundary conditions:$${x}_{A}=0:\left\{\begin{array}{c}s\left({x}_{A}\right)={s}_{A}\hfill \\ {s}^{\prime}\left({x}_{A}\right)={s}_{A}^{\prime}\hfill \\ {s}^{\u2033}\left({x}_{A}\right)={s}_{A}^{\u2033}\hfill \end{array}\right.$$
- minimizes the Weighted Sum of Squared Residuals, i.e.,$$\mathrm{WSSR}=\sum _{i=1}^{3}\sum _{{x}_{k}\in {I}_{s}^{\left(i\right)}}{w}_{i}\left({x}_{k}\right){\left[{y}_{k}-{s}^{\left(i\right)}\left({x}_{k}\right)\right]}^{2}\to min$$

**Remark**

**2.**

#### 4.2. Segmentation Heuristic Overview

- What should be the value of ${x}_{D}$ that corresponds to the locally optimal stream segmentation/partitioning?
- What should be the search space for this optimization task?

- the search interval is divided into predefined number of sub-intervals,
- they are then evaluated (see Equation (16) below) by sampling and interpolating (note: this step can be accelerated by memoization/caching),
- the best sub-interval becomes the new search interval.

#### 4.3. The Algorithm

- the sliding window buffer size, h, can be either fixed upfront (e.g., depending on the input signal characteristics and/or real-time constraints), or constantly adapted (e.g., using ML algorithms); a good strategy for the first approach is to use the value of h corresponding to the maximum acceptable buffering delay (latency),
- to increase the readability of the pseudo-code, checking for exceptional/corner cases (e.g., too few data points at the end of the sliding window buffer to build one more segment) was omitted in some places,
- the algorithm presents one possible way of handling the end of the stream (${s}_{Best}^{\left(3\right)}$, was computed with no looking-ahead); again, if necessary, this computation can be more sophisticated (e.g., the stream can be “artificially” extended),
- the number of sub-intervals that a given interval is divided into can be either fixed upfront or variable (e.g., simple dependence on the length of the interval, or ML-based).

**Remark**

**3.**

Algorithm 1. Adaptive segmentation of streaming data (see also Appendix A) |

## 5. Results and Discussion

#### 5.1. Evaluation Process Overview

#### 5.1.1. Test Streams

#### 5.1.2. Performance Descriptors

- Mean Absolute Error:$$\mathit{MAE}(s,f)=\frac{1}{n}\sum _{k=1}^{n}|s\left({x}_{k}\right)-f\left({x}_{k}\right)|$$
- Root Mean Squared Error:$$\mathit{RMSE}(s,f)={\left\{\frac{1}{n}\sum _{k=1}^{n}{\left[s\left({x}_{k}\right)-f\left({x}_{k}\right)\right]}^{2}\right\}}^{1/2}$$
- Normalized Root Squared Error:$$\mathit{NRSE}(s,f)={\left\{\frac{{\sum}_{k=1}^{n}{\left[s\left({x}_{k}\right)-f\left({x}_{k}\right)\right]}^{2}}{{\sum}_{k=1}^{n}{\left[f\left({x}_{k}\right)\right]}^{2}}\right\}}^{1/2}$$
- Mean Absolute Error Quotient (local-to-global algorithm ratio 1):$${Q}_{\mathrm{MAE}}(s,{s}_{R}){|}_{f}=\frac{\mathit{MAE}(s,f)}{\mathit{MAE}({s}_{R},f)}$$
- Root Mean Squared Error Quotient (local-to-global algorithm ratio 2):$${Q}_{\mathrm{RMSE}}(s,{s}_{R}){|}_{f}=\frac{\mathrm{RMSE}(s,f)}{\mathit{RMSE}({s}_{R},f)}$$
- Compression Ratio:$$\mathit{CR}(s,f)=\frac{\mathrm{uncompressed}\text{-}\mathrm{size}\left(f\right)}{\mathrm{compressed}\text{-}\mathrm{size}\left(f\right)}=\frac{\mathrm{size}\left(f\right)}{\mathrm{size}\left(s\right)}=\frac{\mathrm{length}\left({\mathbf{S}}_{in}\right)}{2+\mathrm{length}\left({\mathbf{S}}_{out}\right)}$$Note: due to ${C}^{2}$-continuity of cubic splines we need only $\{4+[\mathrm{length}\left({\mathbf{S}}_{out}\right)-1]\}+\{\mathrm{length}\left({\mathbf{S}}_{out}\right)+1\}=2\phantom{\rule{4pt}{0ex}}[2+\mathrm{length}\left({\mathbf{S}}_{out}\right)]$ values.
- Absolute Error (function):$$\mathit{AE}(x;s,f)=\left|s\right(x)-f(x\left)\right|$$
- Squared Error (function):$$\mathit{SQE}(x;s,f)={\left[s\left(x\right)-f\left(x\right)\right]}^{2}$$

**Remark**

**4.**

#### 5.1.3. Reference Algorithm and Its Limitations

**Remark**

**5.**

#### 5.2. Evaluation Results: Approximation Errors and Compression Ratio

#### 5.3. Evaluation Results: Segment Length Auto-Adaptation

- the lower the noise level, the more distinct the three existing maxima of the density function become (they correspond to the main “building blocks” used by the segmentation algorithm to restore the true signal, which is periodic),
- the higher the noise level, the closer to uniform the segment length distribution becomes, and the longer the segments are (because of a higher error tolerance).

**Remark**

**6.**

## 6. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## Appendix A. Pseudo-Code of the Proposed Algorithm (Full Version)

Algorithm A1. Adaptive segmentation of streaming data (full version). |

## Appendix B. Experimental Verification of the Algorithm (Linear) Time Complexity

**Table A1.**The algorithm time complexity analysis: ${T}_{n}$—measured in terms of the number of representative operations needed to solve Equation (14)—for different sizes (n) of the test streams (${f}_{1}$, ${f}_{2}$, ${f}_{3}$, and ${f}_{4}$).

$\mathit{n}\times {10}^{3}$ | ${\mathit{T}}_{\mathit{n}}$ for ${\mathit{f}}_{1}$ | ${\mathit{T}}_{\mathit{n}}$ for ${\mathit{f}}_{2}$ | ${\mathit{T}}_{\mathit{n}}$ for ${\mathit{f}}_{3}$ | ${\mathit{T}}_{\mathit{n}}$ for ${\mathit{f}}_{4}$ |
---|---|---|---|---|

10 | 1,943,679 | 2,046,967 | 2,025,182 | 2,033,942 |

50 | 9,860,670 | 10,791,466 | 10,472,338 | 10,535,740 |

100 | 19,933,179 | 21,144,273 | 21,093,559 | 21,050,965 |

250 | 50,373,800 | 53,515,682 | 53,311,644 | 52,439,474 |

500 | 100,428,803 | 106,829,071 | 106,302,366 | 104,768,087 |

750 | 150,522,546 | 160,678,013 | 159,405,423 | 157,300,544 |

1000 | 200,772,538 | 213,827,730 | 212,596,453 | 209,684,704 |

**Figure A1.**As Table A1, but in graphical form.

**Table A2.**The algorithm time complexity analysis: linear regression (${T}_{n}=A\phantom{\rule{4pt}{0ex}}n+b$).

Test Stream | A in ${\mathit{T}}_{\mathit{n}}=\mathit{A}\phantom{\rule{4pt}{0ex}}\mathit{n}+\mathit{b}$ | Pearson’s $\mathit{r}(\mathit{n},{\mathit{T}}_{\mathit{n}})$ | ${\mathbf{R}}^{2}$ | F Statistics | p-Value |
---|---|---|---|---|---|

${f}_{1}$ | 200.8676 | 0.9999989 | 0.9999978 | 2,228,045 | $2.561486\times {10}^{-15}$ |

${f}_{2}$ | 214.0141 | 0.9999981 | 0.9999963 | 1,343,737 | $1.239466\times {10}^{-15}$ |

${f}_{3}$ | 212.7101 | 0.9999992 | 0.9999983 | 2,978,702 | $1.239466\times {10}^{-15}$ |

${f}_{4}$ | 209.6683 | 0.9999997 | 0.9999995 | 9,631,370 | $6.593002\times {10}^{-17}$ |

## References

- Shi, W.; Cao, J.; Zhang, Q.; Li, Y.; Xu, L. Edge Computing: Vision and Challenges. IEEE Internet Things J.
**2016**, 3, 637–646. [Google Scholar] [CrossRef] - Azar, J.; Makhoul, A.; Barhamgi, M.; Couturier, R. An Energy Efficient IoT Data Compression Approach for Edge Machine Learning. Future Gener. Comput. Syst.
**2019**, 96, 168–175. [Google Scholar] [CrossRef] [Green Version] - Papaioannou, T.G.; Riahi, M.; Aberer, K. Towards Online Multi-Model Approximation of Time Series. In Proceedings of the 2011 IEEE 12th International Conference on Mobile Data Management, Lulea, Sweden, 6–9 June 2011; pp. 33–38. [Google Scholar] [CrossRef] [Green Version]
- Kolajo, T.; Daramola, O.; Adebiyi, A. Big Data Stream Analysis: A Systematic Literature Review. J. Big Data
**2019**, 6, 47. [Google Scholar] [CrossRef] - Qian, Z.; He, Y.; Su, C.; Wu, Z.; Zhu, H.; Zhang, T.; Zhou, L.; Yu, Y.; Zhang, Z. TimeStream: Reliable Stream Computation in the Cloud. In EuroSys’13: Proceedings of the 8th ACM European Conference on Computer Systems; ACM Press: Prague, Czech Republic, 2013; pp. 1–14. [Google Scholar] [CrossRef]
- Sun, D.; Zhang, G.; Zheng, W.; Li, K. Key Technologies for Big Data Stream Computing. In Big Data-Algorithms, Analytics, and Applications; Li, K., Jiang, H., Yang, L.T., Guzzocrea, A., Eds.; Chapman and Hall/CRC: New York, NY, USA, 2015; pp. 193–214. [Google Scholar] [CrossRef]
- Cho, H.; An, J.; Hong, I.; Lee, Y. Automatic Sensor Data Stream Segmentation for Real-Time Activity Prediction in Smart Spaces. In IoT-Sys’15: Proceedings of the 2015 Workshop on IoT Challenges in Mobile and Industrial Systems; Association for Computing Machinery: New York, NY, USA, 2015; pp. 13–18. [Google Scholar] [CrossRef]
- Laguna, J.O.; Olaya, A.G.; Borrajo, D. A Dynamic Sliding Window Approach for Activity Recognition. In User Modeling, Adaption and Personalization; Springer: Berlin/Heidelberg, Germany, 2011; pp. 219–230. [Google Scholar] [CrossRef]
- Tapia, E.M.; Intille, S.S.; Larson, K. Activity Recognition in the Home Using Simple and Ubiquitous Sensors. In Pervasive Computing; Springer: Berlin/Heidelberg, Germany, 2004; pp. 158–175. [Google Scholar] [CrossRef]
- Hong, X.; Nugent, C.D. Partitioning Time Series Sensor Data for Activity Recognition. In Proceedings of the 2009 9th International Conference on Information Technology and Applications in Biomedicine, Larnaka, Cyprus, 4–7 November 2009; pp. 1–4. [Google Scholar] [CrossRef]
- Wan, J.; O’Grady, M.J.; O’Hare, G.M.P. Dynamic Sensor Event Segmentation for Real-Time Activity Recognition in a Smart Home Context. Pers. Ubiquitous Comput.
**2015**, 19, 287–301. [Google Scholar] [CrossRef] - Okeyo, G.; Chen, L.; Wang, H.; Sterritt, R. Dynamic Sensor Data Segmentation for Real-Time Knowledge-Driven Activity Recognition. Pervasive Mob. Comput.
**2014**, 10, 155–172. [Google Scholar] [CrossRef] - Kohlmorgen, J.; Lemm, S. An On-Line Method for Segmentation and Identification of Non-Stationary Time Series. In Proceedings of the Neural Networks for Signal Processing XI: Proceedings of the 2001 IEEE Signal Processing Society Workshop (IEEE Cat, No. 01TH8584), North Falmouth, MA, USA, 12 September 2001; pp. 113–122. [Google Scholar] [CrossRef]
- Triboan, D.; Chen, L.; Chen, F.; Wang, Z. Semantic Segmentation of Real-Time Sensor Data Stream for Complex Activity Recognition. Pers. Ubiquitous Comput.
**2017**, 21, 411–425. [Google Scholar] [CrossRef] - Bifulco, G.N. Real-Time Smoothing of Car-Following Data through Sensor-Fusion Techniques. Procedia Soc. Behav. Sci.
**2011**, 20, 524–535. [Google Scholar] [CrossRef] [Green Version] - Punzo, V.; Formisano, D.; Torrieri, V. Nonstationary Kalman Filter for Estimation of Accurate and Consistent Car-Following Data. Transp. Res. Rec.
**2005**, 1934, 2–12. [Google Scholar] [CrossRef] - Ma, X.; Andreasson, I. Behavior Measurement, Analysis, and Regime Classification in Car Following. IEEE Trans. Intell. Transp. Syst.
**2007**, 8, 144–156. [Google Scholar] [CrossRef] [Green Version] - Aono, T.; Fujii, K.; Hatsumoto, S.; Kamiya, T. Positioning of Vehicle on Undulating Ground Using GPS and Dead Reckoning. In Proceedings of the 1998 IEEE International Conference on Robotics and Automation (Cat, No.98CH36146), Leuven, Belgium, 20 May 1998; Volume 4, pp. 3443–3448. [Google Scholar] [CrossRef]
- Bae, I.; Ji, U. Outlier Detection and Smoothing Process for Water Level Data Measured by Ultrasonic Sensor in Stream Flows. Water
**2019**, 11, 951. [Google Scholar] [CrossRef] [Green Version] - Kanagal, B.; Deshpande, A. Online Filtering, Smoothing and Probabilistic Modeling of Streaming Data. In Proceedings of the 2008 IEEE 24th International Conference on Data Engineering, Cancun, Mexico, 7–12 April 2008; pp. 1160–1169. [Google Scholar] [CrossRef] [Green Version]
- Feng, X.; Feng, Q.; Li, S.; Hou, X.; Zhang, M.; Liu, S. Wavelet-Based Kalman Smoothing Method for Uncertain Parameters Processing: Applications in Oil Well-Testing Data Denoising and Prediction. Sensors
**2020**, 20, 4541. [Google Scholar] [CrossRef] - Anastasi, G.; Conti, M.; Di Francesco, M.; Passarella, A. Energy Conservation in Wireless Sensor Networks: A Survey. Ad Hoc Netw.
**2009**, 7, 537–568. [Google Scholar] [CrossRef] - Razzaque, M.A.; Bleakley, C.; Dobson, S. Compression in Wireless Sensor Networks: A Survey and Comparative Evaluation. ACM Trans. Sens. Netw.
**2013**, 10, 1–44. [Google Scholar] [CrossRef] - Miettinen, A.P.; Nurminen, J.K. Energy Efficiency of Mobile Clients in Cloud Computing. In HotCloud’10: Proceedings of the 2nd USENIX Conference on Hot Topics in Cloud Computing; USENIX Association: Berkeley, CA, USA, 2010; p. 4. [Google Scholar]
- Habib, C.; Makhoul, A.; Darazi, R.; Couturier, R. Real-Time Sampling Rate Adaptation Based on Continuous Risk Level Evaluation in Wireless Body Sensor Networks. In Proceedings of the 2017 IEEE 13th International Conference on Wireless and Mobile Computing, Networking and Communications (WiMob), Rome, Italy, 9–11 October 2017; pp. 1–8. [Google Scholar]
- Laiymani, D.; Makhoul, A. Adaptive Data Collection Approach for Periodic Sensor Networks. In Proceedings of the 2013 9th International Wireless Communications and Mobile Computing Conference (IWCMC), Sardinia, Italy, 1–5 July 2013; pp. 1448–1453. [Google Scholar]
- Tayeh, G.B.; Makhoul, A.; Laiymani, D.; Demerjian, J. A Distributed Real-Time Data Prediction and Adaptive Sensing Approach for Wireless Sensor Networks. Pervasive Mob. Comput.
**2018**, 49, 62–75. [Google Scholar] [CrossRef] [Green Version] - Azar, J.; Makhoul, A.; Darazi, R.; Demerjian, J.; Couturier, R. On the Performance of Resource-Aware Compression Techniques for Vital Signs Data in Wireless Body Sensor Networks. In Proceedings of the 2018 IEEE Middle East and North Africa Communications Conference (MENACOMM), Jounieh, Lebanon, 18–20 April 2018; pp. 1–6. [Google Scholar]
- Alieksieiev, V. One Approach of Approximation for Incoming Data Stream in IoT Based Monitoring System. In Proceedings of the 2018 IEEE Second International Conference on Data Stream Mining & Processing (DSMP), Lviv, Ukraine, 21–25 August 2018; pp. 94–97. [Google Scholar]
- Azar, J.; Darazi, R.; Habib, C.; Makhoul, A.; Demerjian, J. Using DWT Lifting Scheme for Lossless Data Compression in Wireless Body Sensor Networks. In Proceedings of the 2018 14th International Wireless Communications & Mobile Computing Conference (IWCMC), Limassol, Cyprus, 25–29 June 2018; pp. 1465–1470. [Google Scholar]
- Harb, H.; Makhoul, A.; Abou Jaoude, C. En-Route Data Filtering Technique for Maximizing Wireless Sensor Network Lifetime. In Proceedings of the 2018 14th International Wireless Communications & Mobile Computing Conference (IWCMC), Limassol, Cyprus, 25–29 June 2018; pp. 298–303. [Google Scholar]
- Harb, H.; Makhoul, A.; Abou Jaoude, C. A Real-Time Massive Data Processing Technique for Densely Distributed Sensor Networks. IEEE Access
**2018**, 6, 56551–56561. [Google Scholar] [CrossRef] - Cheng, L.; Guo, S.; Wang, Y.; Yang, Y. Lifting Wavelet Compression Based Data Aggregation in Big Data Wireless Sensor Networks. In Proceedings of the 2016 IEEE 22nd International Conference on Parallel and Distributed Systems (ICPADS), Wuhan, China, 13–16 December 2016; pp. 561–568. [Google Scholar] [CrossRef]
- Deligiannakis, A.; Kotidis, Y.; Roussopoulos, N. Compressing Historical Information in Sensor Networks. In SIGMOD’04: Proceedings of the 2004 ACM SIGMOD International Conference on Management of Data; ACM Press: Paris, France, 2004; p. 527. [Google Scholar] [CrossRef]
- Fragkiadakis, A.; Charalampidis, P.; Tragos, E. Adaptive Compressive Sensing for Energy Efficient Smart Objects in IoT Applications. In Proceedings of the 2014 4th International Conference on Wireless Communications, Vehicular Technology, Information Theory and Aerospace & Electronic Systems (VITAE), Aalborg, Denmark, 11–14 May 2014; pp. 1–5. [Google Scholar] [CrossRef]
- Gaeta, M.; Loia, V.; Tomasiello, S. Multisignal 1-D Compression by F-Transform for Wireless Sensor Networks Applications. Appl. Soft Comput.
**2015**, 30, 329–340. [Google Scholar] [CrossRef] - Di, S.; Cappello, F. Fast Error-Bounded Lossy HPC Data Compression with SZ. In Proceedings of the 2016 IEEE International Parallel and Distributed Processing Symposium (IPDPS), Chicago, IL, USA, 23–27 May 2016; pp. 730–739. [Google Scholar]
- Monceau Du, H.L.D. Elémens de L’architecture Navale, ou Traité Pratique de la Construction des Vaisseaux; Chez Charles-Antoine Jombert: Paris, France, 1758. [Google Scholar]
- Farin, G.; Hoschek, J.; Kim, M.-S. Handbook of Computer Aided Geometric Design; Elsevier: Amsterdam, The Netherlands, 2002. [Google Scholar]
- Schoenberg, I. Contributions to the Problem of Approximation of Equidistant Data by Analytic Functions. Q. Appl. Math.
**1946**, 4, 45–99. [Google Scholar] [CrossRef] [Green Version] - Boor de, C. A Practical Guide to Splines; Applied Mathematical Sciences; Springer: New York, NY, USA, 1978; Volume 27. [Google Scholar]
- Knott, G.D. Interpolating Cubic Splines; Progress in Computer Science and Applied Logic; Birkhäuser: Boston, MA, USA, 2000; Volume 18. [Google Scholar]
- Schoenberg, I.J. Cardinal Spline Interpolation; Siam: Philadelphia, PA, USA, 1973; Volume 12. [Google Scholar]
- Schumaker, L. Spline Functions: Basic Theory; Cambridge University Press: Cambridge, UK, 2007. [Google Scholar]
- Späth, H. One Dimensional Spline Interpolation Algorithms; A K Peters Series; CRC Press, Taylor & Francis Group: New York, NY, USA, 1995. [Google Scholar]
- Milenkovic, V.; Milenkovic, P.H. Tongue Model for Characterizing Vocal Tract Kinematics. In Recent Advances in Robot Kinematics; Springer: Dordrecht, The Netherlands, 1996; pp. 217–224. [Google Scholar]
- Bazaz, S.A.; Tondu, B. Minimum time on-line joint trajectory generator based on low order spline method for industrial manipulators. Robot. Auton. Syst.
**1999**, 29, 257–268. [Google Scholar] [CrossRef] - Carvalho de, J.M.; Hanson, J.V. Real-time interpolation with cubic splines and polyphase networks. Can. Electr. Eng. J.
**1986**, 11, 64–72. [Google Scholar] [CrossRef] - Fan, W.; Lee, C.H.; Chen, J.H. A realtime curvature-smooth interpolation scheme and motion planning for CNC machining of short line segments. Int. J. Mach. Tools Manuf.
**2015**, 96, 27–46. [Google Scholar] [CrossRef] - Guven, O.; Eftekhar, A.; Kindt, W.; Constandinou, T.G. Computationally efficient real-time interpolation algorithm for non-uniform sampled biosignals. Healthc. Technol. Lett.
**2016**, 3, 105–110. [Google Scholar] [CrossRef] [Green Version] - Ogniewski, J. Cubic Spline Interpolation in Real-Time Applications using Three Control Points. In Proceedings of the 27 International Conference in Central Europe on Computer Graphics, Visualization and Computer Vision WSCG 2019, Plzen, Czech Republic, 27–31 May 2019; World Society for Computer Graphics: Plzen, Czech Republic, 2019; pp. 1–10. [Google Scholar]
- Dębski, R. Real-time interpolation of streaming data. Comput. Sci.
**2020**, 21, 513–532. [Google Scholar] [CrossRef] - Kröger, T. On-Line Trajectory Generation in Robotic Systems: Basic Concepts for Instantaneous Reactions to Unforeseen (Sensor) Events; Springer Tracts in Advanced Robotics; Springer: Berlin/Heidelberg, Germany, 2010; Volume 58. [Google Scholar]
- Biagiotti, L.; Melchiorri, C. Trajectory Planning for Automatic Machines and Robots; Springer: Berlin/Heidelberg, Germany, 2008. [Google Scholar]
- Dębski, R.; Sniezynski, B. Pruned Simulation-Based Optimal Sailboat Path Search Using Micro HPC Systems. In Computational Science–ICCS 2021, Lecture Notes in Computer Science; Paszynski, M., Kranzlmüller, D., Krzhizhanovskaya, V., Dongarra, J., Sloot, P., Eds.; Springer: Cham, Switzerland, 2021; Volume 12745, pp. 158–172. [Google Scholar] [CrossRef]
- Vas, Á.; Fazekas, Á.; Nagy, G.; Tóth, L. Distributed Sensor Network for Meteorological Observations and Numerical Weather Prediction Calculations. Carpathian J. Electron. Comput. Eng.
**2013**, 61, 56–63. [Google Scholar] - Wise, R.; Rysdyk, R. UAV Coordination for Autonomous Target Tracking. In AIAA Guidance, Navigation, and Control Conference and Exhibit; American Institute of Aeronautics and Astronautics: Keystone, Colorado, 2006; pp. 1–22. [Google Scholar] [CrossRef] [Green Version]
- Chmaj, G.; Selvaraj, H. Distributed Processing Applications for UAV/Drones: A Survey. In Progress in Systems Engineering. Advances in Intelligent Systems and Computing; Selvaraj, H., Zydek, D., Chmaj, G., Eds.; Springer: Cham, Switzerland, 2015; Volume 366, pp. 449–454. [Google Scholar] [CrossRef]
- Huang, H.; Savkin, A.V.; Li, X. Reactive Autonomous Navigation of UAVs for Dynamic Sensing Coverage of Mobile Ground Targets. Sensors
**2020**, 20, 3720. [Google Scholar] [CrossRef] [PubMed] - Yan, Z.; Jouandeau, N.; Ali, A. A Survey and Analysis of Multi-Robot Coordination. Int. J. Adv. Robot. Syst.
**2013**, 10, 399. [Google Scholar] [CrossRef] - Almeida, L.; Santos, F.; Facchinetti, T.; Pedreiras, P.; Silva, V.; Lopes, L.S. Coordinating Distributed Autonomous Agents with a Real-Time Database: The CAMBADA Project. In Computer and Information Sciences-ISCIS 2004; Hutchison, D., Kanade, T., Kittler, J., Kleinberg, J.M., Mattern, F., Mitchell, J.C., Naor, M., Nierstrasz, O., Pandu Rangan, C., Steffen, B., et al., Eds.; Springer: Berlin/Heidelberg, Germany, 2004; Volume 3280, pp. 876–886. [Google Scholar] [CrossRef]
- López, D.S.; Moreno, G.; Cordero, J.; Sanchez, J.; Govindaraj, S.; Marques, M.M.; Lobo, V.; Fioravanti, S.; Grati, A.; Rudin, K.; et al. Interoperability in a Heterogeneous Team of Search and Rescue Robots. In Search and Rescue Robotics; IntechOpen: Rijeka, Croatia, 2017; Chapter 6; pp. 93–125. [Google Scholar] [CrossRef] [Green Version]
- Pfingsthorn, M.; Birk, A.; Bulow, H. An Efficient Strategy for Data Exchange in Multi-Robot Mapping under Underwater Communication Constraints. In Proceedings of the 2010 IEEE/RSJ International Conference on Intelligent Robots and Systems, Taipei, Taiwan, 18–22 October 2010; pp. 4886–4893. [Google Scholar] [CrossRef] [Green Version]
- Dębski, R. Streaming Hermite interpolation using cubic splinelets. Comput. Aided Geom. Des.
**2021**, 88, 102011. [Google Scholar] [CrossRef]

**Figure 1.**Conceptual diagram of the considered problem: the streaming preprocessor (segmenter) maps a stream of data points to a stream of cubic spline segments, which form a ${C}^{2}$-continuous curve.

**Figure 2.**Signal g (Equation (2), for readability shown only in the interval $[0,500]$) used—after discretization and adding Gaussian noise—to generate the test streams used in the evaluation of the proposed algorithm.

**Figure 3.**The test streams: (

**a**–

**d**) ${f}_{1}$–${f}_{4}$ (for readability shown only in the interval $[0,500]$) generated from signal g using four levels of Gaussian noise (see Equation (27)).

**Figure 4.**Auto-segmentation related limitations of the reference algorithm: approximation mean absolute error (Equation (28)) as a function of input stream length (n) for all test streams, (

**a**–

**d**) ${f}_{1}$–${f}_{4}$. For $n>6\times {10}^{4}$ one needs to specify the number of spline segments (knots) manually.

**Figure 5.**Approximation mean absolute error (Equation (28)) as a function of smooth.spline number of knots (segments) for all test streams, (

**a**–

**d**) ${f}_{1}$–${f}_{4}$ (in all cases: $n={10}^{6}$).

**Figure 6.**Cubic splinelet generated spline vs. smoothing spline: distribution of absolute approximation errors (in the form of a density function) for all test streams, (

**a**–

**d**) ${f}_{1}$–${f}_{4}$.

**Figure 7.**As in Figure 6, but for the squared approximation errors, $SQE$. (

**a**–

**d**) ${f}_{1}$–${f}_{4}$.

**Figure 8.**Output stream, ${\mathbf{S}}_{out}$, segment length auto-adaptation: distribution of cubic-splinelet-segment lengths (in the form of a density function) for all test streams, (

**a**–

**d**) ${f}_{1}$–${f}_{4}$.

**Table 1.**Performance comparative analysis (see Section 5.1.2): cubic splinelet generated spline (denoted as s) vs. smoothing spline (denoted as ${s}_{R}$) for all test streams ${f}_{i}$, where $i=1,2,3,4$.

f | MAE(s,f) | RMSE(s,f) | NRSE(s,f) | QMAE(s,${\mathit{s}}_{\mathit{R}}$) | QRMSE(s,${\mathit{s}}_{\mathit{R}}$) | CR(s,f) |
---|---|---|---|---|---|---|

${f}_{1}$ | 0.029 | 0.037 | 0.021 | 1.110 | 1.243 | 135 |

${f}_{2}$ | 0.136 | 0.170 | 0.098 | 1.033 | 1.070 | 183 |

${f}_{3}$ | 0.402 | 0.502 | 0.279 | 1.019 | 1.040 | 201 |

${f}_{4}$ | 0.933 | 1.165 | 0.560 | 1.013 | 1.028 | 208 |

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**

Dębski, R.; Dreżewski, R.
Adaptive Segmentation of Streaming Sensor Data on Edge Devices. *Sensors* **2021**, *21*, 6884.
https://doi.org/10.3390/s21206884

**AMA Style**

Dębski R, Dreżewski R.
Adaptive Segmentation of Streaming Sensor Data on Edge Devices. *Sensors*. 2021; 21(20):6884.
https://doi.org/10.3390/s21206884

**Chicago/Turabian Style**

Dębski, Roman, and Rafał Dreżewski.
2021. "Adaptive Segmentation of Streaming Sensor Data on Edge Devices" *Sensors* 21, no. 20: 6884.
https://doi.org/10.3390/s21206884