# Adaptive Segmentation of Streaming Sensor Data on Edge Devices
## 1 Introduction  
Sensor signal chain solutions used to rely totally upon cloud infrastructure whenever high-level data processing was required. In most cases, it was effective because the amounts of data to be transferred were small, and possibly existing real-time constraints were not excessive. For contemporary systems, however, this approach is often not acceptable, since the full bandwidth of sampled data will almost always cause network congestion and/or create a significant bottleneck for the aggregation node (e.g., a wireless gateway). The obvious solution can be to compress the data before uploading it. To realize this and to address the above issues, the edge computing approach emerged, which can be treated as a decentralized cloud that brings computing power and thus capabilities of data stream pre-processing and compression closer to data sources such as sensors, Internet of Things (IoT) devices and wearable devices [1, 2]. Locating computing power closer to data sources is indispensable for some applications requiring almost real-time responses, such as for example autonomous vehicles and e-health. Real-time requirements of such applications cannot be met by the regular cloud in the case of numerous sensors because of high latency and ineffective bandwidth [1, 2]. The computing power available in edge devices also opens up new possibilities for advanced data stream pre-processing such as smoothing and/or segmentation. In many instances, certain properties of the input signal--typically represented as a series of data points obtained by sampling--are known and must be considered during the segmentation of the signal. A common example is the signal smoothness, measured by the differentiability class \(C^{\xi}\), with \(C^{2}\) often being the target (\(f\in C^{2}\) if it is twice differentiable. For instance, in robotics or control systems to have a smooth movement, the trajectory must be twice differentiable to give a continuous velocity and acceleration.). With no access to future values, an effective algorithm for the segmentation of streaming data, must be entirely local. Although such algorithms exist (for instance, PLA, PMC-MR, Linear Filter [3]), their outputs are not \(C^{2}\)-continuous. This also refers to cubic Hermite spline-based solutions (segmentations), which are \(C^{1}\)-continuous only. The second group of potential solutions--represented by cubic smoothing splines--gives \(C^{2}\)-continuous outputs, yet the corresponding algorithms are not local since they require the solution of a system of linear equations whose coefficients depend on the whole data set. To the best of our knowledge, there does not exist a streaming algorithm which combines the above properties, i.e., is local and computes \(C^{2}\)-segmentations. Our aim is to propose such an algorithm. The presented algorithm is based on the greedy look-ahead strategy and built upon the concept of a cubic splinelet (see Figure 1). One of its key properties is the real-time simultaneous segmentation, smoothing, and compression of noisy data streams. This means it can be applied to various domains including online compression and/or smoothing of streaming data, real-time IoT analytics, and embedded time-series databases. The main contributions of this paper are the following:  
* the cubic splinelet of type \(WSSR_{min}\)--the special type of splinelet that minimizes the _Weighted Sum of Squared Residuals_ (Section 4.1),
* the algorithm for \(C^{2}\)-continuous \(WSSR_{min}\)-cubic splinelet-based adaptive segmentation of streaming sensor data (Sections 4.2 and 4.3),
* numerical results which demonstrate the effectiveness of the algorithm (Section 5). The remainder of this paper is organized as follows. The next Section 2 contains the related work overview. Following that Section 3, the problem statement is given and then, in Section 4, the proposed solution is described. Next Section 5, the solution is evaluated, and the obtained results are presented and discussed. The last Section 6 contains the conclusion of the study.