A Benouhiba

M Ouisse

K Rabenorosoa

N Andreff

INVESTIGATIONS ON AN ADAPTIVE HELMHOLTZ RESONATOR CONCEPT

Helmholtz resonators have been historically one of the first engineered concepts for acoustic control. They can be used either for increasing sound at a specific frequency, or create antiresonances depending on the way they are implemented. In terms of acoustic control for industrial applications, they constitute very efficient solutions for tonal excitations with a fixed frequency. The resonance frequency of the resonator has to be tuned on this frequency, meaning that if any change occurs in the excitation frequency, the control is no longer possible with the resonator. The concept proposed here to overcome this limitation consists in designing a Helmholtz resonator with a variable volume, that can be controlled in real-time. On the basis of waterbomb origami design, multiphysics simulations are performed to define the geometry of the adaptive cavity. After manufacturing, experimental tests are used to validate the models and illustrate the efficiency of the concept.

INTRODUCTION

Helmholtz resonance is the name given to the resonance phenomenon occurring in a cavity linked to the surrounding atmosphere (which is usually air) via a constricted neck or necks. Hermann L. F. von Helmholtz [START_REF] Von | On the Sensations of Tone as a Physiological Basis for the Theory of Music[END_REF] established first its physical and mathematical principles. The most common example for Helmholtz resonators, are bottles and stringed instruments, especially bottles given the fact that they fit the description very well (small opening into a large chamber) [START_REF] Emile | The use of helmholtz resonance for measuring the volume of liquids and solids[END_REF]. As the frequency is controlled by the geometrical properties of the resonator [START_REF] Ronald | Resonant frequencies of cylindrical helmholtz resonators[END_REF][START_REF] Rc Chanaud | Effects of geometry on the resonance frequency of helmholtz resonators[END_REF][START_REF] Ingard | On the theory and design of acoustic resonators[END_REF], controlling the geometry of the device (such as the volume of the cavity), means controlling the frequency at which noise reduction is desired. Following this line of reasoning, creating an adaptive Helmholtz resonator is a valid option. There are several works in the literature that address the subject of tunable Helmholtz resonators and the most effective means of using them in order to control sound and thereby, achieve noise attenuation. De Dedout [START_REF] Bedout | Adaptivepassive noise control with self-tuning helmholtz resonators[END_REF] proposed an adaptive-passive noise control with self-tuning Helmholtz resonators, where a varying cavity volume was achieved, by adding two rigid walls inside the cylindrical resonator cavity. Both walls were linked to each other at the center of the cavity, allowing easily the rotation of the movable wall through a DC motor. Rigid walls being difficult to use to obtain continuously varying volumes, polymers have been at the center of recent works to try to tune the frequency of acoustic resonators. Yu [START_REF] Yu | Tunable acoustic metamaterial with an array of resonators actuated by dielectric elastomer[END_REF] proposed a tunable acoustic metamaterial with an array of (non-Helmholtz) resonators actuated by a dielectric elastomer. Abbad used a similar material to control an elastic resonance of a membraned Helmholtz resonator [START_REF] Abbad | Numerical and experimental investigations on the acoustic performances of membraned helmholtz resonators embedded in a porous matrix[END_REF], but also its volume [START_REF] Abbad | Adaptive helmholtz resonator based on electroactive polymers: modeling, characterization, and control[END_REF]. Following this strategy, relatively small volume variations can be obtained, hence in this work, a new concept is proposed: in order to obtain large volume variations, an origami-based design is investigated.

GEOMETRY OF THE ADAPTIVE HELMHOLTZ RESONATOR

Origami designs offer extreme reconfigurability and a wide range of deployability thanks to their hinges rotation and their facets deformation. This can be exploited to create lightweight devices with controlled characteristics and tunable properties [START_REF] Kamrava | Programmable structures: Programmable origami strings[END_REF]. The origami base chosen here, on the basis of the requirements and state of the art [START_REF] Kuribayashi | Self-deployable origami stent grafts as a biomedical application of ni-rich tini shape memory alloy foil[END_REF][START_REF] Lee | Fabrication of origami wheel using pattern embedded fabric and its application to a deformable mobile robot[END_REF] is the waterbomb (see fig. 1). The origami waterbomb base is a single-vertex origami mechanism with unique characteristics that may prove advantageous in a wide range of applications, one of which is vibro-acoustics. The base shows a high potential as a testbed for smart materials and integrated actuation systems thanks to its straightforward geometry and multiple phases of folding/unfolding motion, that ranges from simple (completely flat) to more complex (3D configurations) [START_REF] Brandon H Hanna | Waterbomb base: a symmetric single-vertex bistable origami mechanism[END_REF]. The cavity is closed with an end part, which was inspired by the mechanism of the umbrella. This last part keeps the cavity closed during the folding and unfolding of the resonator. On the opposite side, a cylinder is used as resonator neck.

MULTIPHYSICS SIMULATIONS

In order to define the optimal design of the adaptive Helmholtz resonator, several multiphysics simulations are performed.

• Analytical expressions of resonance frequency are first used to define the macroscopic volume and neck characteristics to achieve the expected frequency shift;

• acoustic finite elements computations are then used by considering rigid walls on the origami structure, in order to check the effect of the complex geometry on the resonance frequency and absorption properties of the resonator (losses in the neck are included in these computations);

• vibro-acoustic coupled finite elements computations are performed to check the effect of walls resonances on the properties of the resonator (structural losses are considered here);

• PTMM [START_REF] Verdière | Transfer matrix method applied to the parallel assembly of sound absorbing materials[END_REF] computations are used to understand the effect of losses in the constrictions of the origami;

• Nonlinear structural computations using hyperelastic models for the origami walls are finally used to check the foldability and required forces to tune the resonance frequency.

These computations are used to design the final geometry of the Helmholtz resonator, which is manufactured in the lab.

EXPERIMENTAL CHARACTERIZATION

Experiments are performed in an impedance tube, using the various folding states of the origami. Results are presented in Figure 2, in terms of absorption coefficient, for several configurations expressed in terms of maximum external diameter of the origami resonator. As expected, the larger the volume, the lower the resonance frequency. A shift from 138 Hz to 219 Hz can be obtained by unfolding the resonator from 50 mm diameter to 70 mm diameter. The resonance frequency and the maximum absorption level are well captured by the model, however the slight increase of absorption coefficient above 400 Hz is not reproduced and may be due to unperfect gluing/manufacturing/geometry of the tested device. The efficiency of prediction of the frequency and levels around the resonance frequency, compared to experimental tests, illustrates the applicability of the adaptive origami-based Helmholtz resonator for practical applications.

Figure 1 :

 1 Figure 1: View of the waterbomb Helmholtz resonator in the computation configuration (impedance tube)

Figure 2 .

 2 Figure 2. Comparison of experimental tests and simulation results

ACKNOWLEDGEMENTS

This work has been funded by ANR (contract ANR-17-CE08-0035 ETNAA), in collaboration with EIPHI Graduate School (ANR-17-EURE-0002).


Joseph Azar
email: joseph.azar@univ-fcomte.fr

Abdallah Makhoul
email: abdallah.makhoul@univ-fcomte.fr

Raphaël Couturier
email: raphael.couturier@univ-fcomte.fr

Jacques Demerjian
email: jacques.demerjian@ul.edu.lb

Robust IoT Time Series Classification with Data Compression and Deep Learning

Keywords: IoT applications, Energy efficiency, Lossy compression, Data reduction, Time series classification, Deep neural networks, Discrete wavelet transform, lifting scheme

Internet of Things (IoT) and wearable systems are very resource limited in terms of power, memory, bandwidth and processor performance. Sensor time series compression can be regarded as a direct way to use memory and bandwidth resources efficiently. On the other hand, the time series classification has recently attracted great attention and has found numerous potential uses in areas such as finance, industry and healthcare. This paper investigates the effect of lossy compression techniques on the time series classification task using deep neural networks. Furthermore, this paper proposes an efficient compression approach for univariate and multivariate time series that combines the lifting implementation of the discrete wavelet transform with an error-bound compressor, namely Squeeze (SZ), to attain an optimal trade-off between data compression and data quality.

Introduction

The world is becoming increasingly connected and intelligent through the Internet of Things (IoT), which can be defined as a wireless network of smart sensing devices connected to the Internet, ready to collect and transmit data supported by embedded devices or sensor networks. IoT devices are generally composed of five main components: 1) sensors, 2) processor, 3) memory, 4) communication module, and 5) battery. Many of these devices are connected by a gateway functionality that is capable of communicating with the sensors and providing storage and processing capabilities. This gateway could be located in the cloud or at the edge. Time series data collected from IoT devices such as sensors, machines, and wearables, are becoming the most widespread. These data are generated with high velocity from different real-world applications such as healthcare, manufacturing, agriculture, and urban infrastructure [START_REF] Al-Fuqaha | Internet of things: A survey on enabling technologies, protocols, and applications[END_REF] [START_REF] Helbing | Saving human lives: What complexity science and information systems can contribute[END_REF], and transmitted to cloud or edge processing.

One of the main issues with IoT applications is the huge volume of collected data. The on-board signal processing and compression algorithms could be used to avoid this problem and therefore avoid the transmission and storage of large amounts of data. Generally, radio communication dominates energy consumption. Therefore, data compression can significantly decrease communication energy costs by reducing the number of bits to be transmitted and thus increase the lifetime of the device [START_REF] Razzaque | Compression in wireless sensor networks: A survey and comparative evaluation[END_REF]. Consequently, this directly affects the energy consumption and battery life of the devices in addition to the storage requirements of the transmitted data, enabling much less data to be managed.

Data compression algorithms can be divided into two types: lossless and lossy compression. Lossless compression does not involve data loss, while lossy compression leads to data loss. However, the maximum level of compression that can be achieved without loss is limited. This limited compression ratio is unfortunately a big drawback in the context of IoT data and resource constrained devices covered by this paper. On the other hand, lossy techniques cannot re-construct the original data from the compressed data. This does not mean, however, that reconstructed data are of low quality. A good lossy compressor maintains the critical information while dropping, for example, the relatively useless data such as noise.

While on-board lossy compression techniques can increase the lifetime of

IoT devices and enormously reduce the amount of data sent to the gateway, the impact of compression ratios on data analysis can not be neglected. The time series collected from IoT applications are transferred to the edge or cloud for processing. Time Series Classification (TSC) is a major and challenging problem for mining received data. TSC research have found a large number of potential applications in areas such as finance, health care, and industry. Deep Neural Networks (DNNs) are among the promising techniques used recently for TSC [START_REF] Fawaz | Deep learning for time series classification: a review[END_REF]. The main advantage of end-to-end DNN models over state-of-the-art approaches is their lack of heavy preprocessing on raw data.

In an IoT Big Data architecture, time series data pass through different phases. An example of IoT Big Data architecture can be composed of four layers as shown in Figure 1 [START_REF] Rathore | Urban planning and building smart cities based on the internet of things using big data analytics[END_REF]. In the first layer, time series data are generated from different IoT sources and then collected and compressed prior to transmission.

The second layer provides communication between IoT devices and gateways using different communication technologies. The third layer is the main layer of the entire analytical system that processes the data using tools such as Apache Storm and Spark. In this layer, the classification of time series data takes place.

The fourth layer is responsible for the interpretation and use of the generated results. In real world applications, time series data are highly compressed in layer 1 before their processing in layer 3. and discussed in section 7, and the conclusion is presented in section 8.

Most of the proposed compression techniques for

Related work

Different data reduction techniques are proposed in the literature to resolve energy constraints [3][6]. In a recent work, Blalock et al. [START_REF] Blalock | Sprintz: Time series compression for the internet of things[END_REF] presented an efficient high-ratio lossless compression technique for multivariate integer time series, namely Sprintz, with a significantly lower memory and latency than state of the art methods. Compared to different compressors, like SIMD-BP128 [START_REF] Lemire | Decoding billions of integers per second through vectorization[END_REF], FastP-FOR [START_REF] Lemire | Decoding billions of integers per second through vectorization[END_REF], Zstandard (Zstd) [START_REF] Collet | Zstandard-fast real-time compression algorithm[END_REF] and Zlib [START_REF] Deutsch | Zlib compressed data format specification version 3[END_REF], the proposed algorithm achieved strong compression ratio, speed and memory requirements. The authors in [START_REF] Ukil | Iot data compression: Sensor-agnostic approach[END_REF] proposed a dynamic lossy compression approach to extract valuable information from IoT data with constant adaptation and information loss. The proposed technique is based on the lossy Chebyshev compression and yields a compression ratio of up to 3:1. Various compression algorithms have been proposed

rithms like Basis Pursuit and Orthogonal Matching Pursuit on ECG arrhythmia detection using Support Vector Machine (SVM) classifier. The results show that the classification performance remains stable until a compression ratio of 7:1, after which Basis Pursuit outperforms Orthogonal Matching Pursuit on ECG arrhythmia detection. In a similar work [START_REF] Concha | Compressive sensing of time series for human action recognition[END_REF], the authors proposed the compressed sensing of time series for the recognition of human activities. The results show that the use of compressed sensing on the original time series increased the accuracy of classification using Hidden Markov Model from 77% to 95%. The explanation for this increase in classification accuracy is that the compressed sensing has some kind of advantageous dimensionality reduction, which facilitates pattern recognition. In web page classification, the authors in [START_REF] Shen | Webpage classification through summarization[END_REF] used the idea of data reduction to make both summarized and pure data available as inputs for the classifier. Their study showed that human or machine summaries help improve the performance of the web page classification. In [START_REF] Azar | An energy efficient iot data compression approach for edge machine learn-33 ing[END_REF], the authors used a lossy error-bounded compressor to reduce the amount of data transmitted to the edge node. Their results showed that the compression ratio did not affect the classification accuracy of medical data, thus increasing the lifetime of IoT devices and maintaining data quality.

In the following sections, the influence of three compression techniques, namely Compressed Sensing (CS), Discrete Wavelet Transform (DWT), and Squeeze (SZ) proposed in [START_REF] Di | Fast error-bounded lossy hpc data compression with sz[END_REF], on time series classification is studied. Moreover, the proposed data compression approach is presented.

TSC using deep learning

Because time series data have to be properly classified, researchers have proposed numerous approaches based on deep learning models to solve this task.

An empirical study of the latest DNN architectures for TSC was conducted in [START_REF] Fawaz | Deep learning for time series classification: a review[END_REF], which examines the current state of the art of deep learning algorithms for TSC. Although many kinds of DNNs exist, two principal DNN architectures used for TSC have been used in this paper: Convolutional Neural Network (CNN), and Recurrent Neural Network (RNN).

Convolutional Neural Network

CNNs [START_REF] Lecun | Gradient-based learning applied to document recognition[END_REF] For semantic segmentation on images, FCN [START_REF] Long | Fully convolutional networks for seman-tic segmentation[END_REF] has demonstrated impressive The network structure of LSTM-FCN and GRU-FCN proposed in [START_REF] Karim | Lstm fully convolutional networks for time series classification[END_REF] and [START_REF] Elsayed | Deep gated recurrent and convolutional network hybrid model for univariate time series classification[END_REF] respectively quality and efficiency. The FCN used for TSC is constructed by stacking three blocks, each of which consists of a convolutional layer with f filters, followed by a batch normalization layer and a ReLU activation layer as shown in Figure 2-a.

The features are fed into the global average pooling layer after the first three convolutional blocks, largely reducing the number of weights and the final result comes from the softmax layer.

ResNet is a deep CNN that uses shortcut connections between successive convolutional layers for training. The architecture used for TSC consists of 9 convolutional layers, followed by a general average pooling layer as shown in

Recurrent Neural Network

RNN is a network that has loops. The Long Short-Term Memory, or LSTM, is a type of RNN. In the context of deep learning, LSTM has recently been widely used as it is free from the problem of vanishing gradients and offers excellent performances and results. LSTM based networks are suitable for classifying time sequences and replacing many conventional approaches to deep learning.

LSTM-FCN architecture has been proposed in [START_REF] Karim | Lstm fully convolutional networks for time series classification[END_REF]. The authors improved the previously discussed FCN's performance by transferring the time-series into a shuffle layer and subsequently passing it into a LSTM block as shown in Similarly, the authors in [START_REF] Elsayed | Deep gated recurrent and convolutional network hybrid model for univariate time series classification[END_REF] proposed the GRU-FCN architecture, shown in Figure 3-b. The proposed architecture has replaced the LSTM with a Gated Recurrent Unit (GRU), which produces higher classification accuracy.

IoT Time Series Compression

In order to study the impact of data compression on the performance of DNNs for univariate TSC, three compression techniques were considered in this paper: Compressed Sensing (CS), Discrete Wavelet Transform (DWT), and an error-bounded lossy compressor, namely SZ. This section describes these compression techniques.

Compressed sensing

Compressed sensing is a digital signal processing technique capable of effectively acquiring and rebuilding a signal from a smaller number of measurements.

CS can capture and display sparse signals at a rate that is considerably lower than the one normally used in the Shannon sampling theorem.

The basic measurement model for compressed sensing is defined as in Equation 1:

[Y ] M,1 = [φ] M,N [X] N,1 , (1)
where X is the original sparse signal of length N , Y is the compressed signal of length M (M << N ), and φ ∈ R M ×N is the sensing matrix that enables the reconstruction of the signal.

Most signals generally have a low sparsity in the time-domain representation.

The representations of these signals are therefore sparse in the frequency domain or under a certain basis. In that case, X can be represented using ψ as a sparse vector as shown in Equation 2:

[X] N,1 = [ψ] N,N [z] N,1 , (2)
where z is the frequency/spectral domain representation of the original signal X, and ψ is the matrix that converts the signal to the temporal-domain from the spectral-domain. The reconstruction of the signal allows z to be calculated from Y by combining Equation 1and Equation 2 as follows:

[Y ] M,1 = [φ] M,N [ψ] N,N [z] N,1 . (3)
Note that in this paper, ψ is calculated by applying the inverse Discrete Cosine

Transform upon the columns of the identity matrix. Additionally, the l 1 -norm minimization [START_REF] Romberg | Robust uncertainty principles: Exact signal reconstruction from highly incomplete frequency information[END_REF], also known as Basis Pursuit, has been employed to recover the original signal X.

This paper assumes that the data collected are time series of floating point numbers, so the compressed vector Y contains floating point data. In that case, to encode the resulting Y vector, an additional lossless entropy coder is required. This paper utilizes the lossless FPZIP compressor proposed in [START_REF] Lindstrom | Fast and efficient compression of floating-point data[END_REF] for the encoding step.

Discrete Wavelet Transform

DWT has many advantageous properties that are valuable for time series data mining [START_REF] Chaovalit | Discrete wavelet transform-based time series analysis and mining[END_REF]. It transforms and analyzes a time series at multiple resolutions using the so-called wavelets.

The DWT allows a time-frequency representation of a signal. It splits the signal into low-frequency components (approximations) and high-frequency components (details) through the use of filters. The motivation for exploiting the DWT lies in the transformation of redundant samples in the temporal domain to decorrelated coefficients in the time-frequency domain, which allows the compaction of the original samples and their representation with fewer coefficients. Hence, this process facilitates the study of certain features of the original dataset. The application cases of the DWT for time series analysis are excessively various, for example, compression and noise filtering [28][29].

In this paper, the DWT is used for compression by maintaining only a signal's approximation data. These approximations are floating point values that need to be encoded, similar to the compressed sensing method, the FPZIP was considered.

Error-bounded lossy compression

The third compression technique used in this article is a fast error-bounded lossy compressor namely SZ, proposed in [START_REF] Di | Fast error-bounded lossy hpc data compression with sz[END_REF] for High Performance Computing (HPC) applications. This compression scheme is intended to handle the huge quantities of data generated during the implementation of HPC applications.

The SZ technique is based on a prediction method, which corresponds to

Proposed compression approach

In this section, a compression scheme that enables a high compression ratio, denoises input data, and controls compression/decompression error is presented.

It begins by presenting the lifting scheme implementation of the DWT and its capacity to compress and denoise the input signal, and then details the proposed compression scheme.

Faster implementation of the DWT

The conventional method of wavelet transform needs complicated mathematical calculations, making it unfit for resource-constraining devices. Sweldens had proposed the lifting scheme in [START_REF] Sweldens | The lifting scheme: A construction of second generation wavelets[END_REF], a more efficient algorithm for calculating wavelet transforms and building bi-orthogonal wavelets.

The lifting scheme forward transform consists of three operations: split, predict, and update. The split operation divides the signal into even and odd samples. This step is also known as the lazy wavelet transform. In view of the locally correlated structure of the signal, even and odd samples are strongly correlated. The predict step predicts odd samples from even samples. Finally,

The update step guarantees that the smoothed approximation signal has the same average as the initial signal. For a detailed explanation of the lifting procedure, refer to [START_REF] Azar | Using dwt lifting scheme for lossless data compression in wireless body sensor networks[END_REF].

There are many benefits of applying the lifting scheme to IoT devices: (1) It enables a faster implementation of the wavelet transform and is very appealing for real time applications with low energy. (2) It is memory efficient and enables a fully in-place calculation. (3) Very easy to understand, implement, deploy and adapt to various nodes.

The lifting scheme for noise filtering

The data collected from real world applications are usually noisy. Data reduction is the primary reason to implement the DWT. Equally important, eliminating the large variations of data mixed in the collected signal before transmission can be a crucial step in real-time applications as this step is no longer required at the edge of the network. Thus, taking less time to process and classify the transmitted data at the edge/sink. In the first decomposition, the initial signal is divided into approximations and details. The approximations maintain the information of the initial signal, and the details contain the fast varying changes that may be regarded as noise. The second decomposition reapplies the lifting forward transform on the approximations resulting in level two approximations with fewer data points and less noise.

This paper proposes to apply the classification methods on the approximations of the original data. This is driven by the reality that approximations are smaller in size than the original raw data, leading in quicker implementation of the algorithms and reducing data access time. In addition, the DWT's noise filtering capacity isolates important features from the original signal. The meaningful data is thus fed to the deep learning model.

Proposed compression scheme

The data collected from sensors in IoT applications are generally multivariate time series. An M-dimensional multivariate time series, X = [X 1 , X 2 , ..., X M ] comprises of M different univariate time series. In our compression scheme, the The number of levels can be defined by the user depending on the application and the collected data.

Next, the SZ algorithm processes the approximations array. The motive behind the combination of SZ and the lifting scheme is that SZ is a prediction method, and how smooth or jagged the time series affects its output. The benefit of the lifting scheme transformation is that it results in a smoother version of the initial time series that allows the SZ's bestfit curve-fitting to better predict the data in the user-required error. When the data reaches the edge/sink, the time series reconstruction method consists of using the SZ algorithm to decompress the compressed approximation coefficients. Then the wavelet-transform data is introduced into a deep learning model without the need to apply the inverse wavelet transform and recover the original data. This process is illus-trated in Figure 5

Time complexity and compression performance

The time complexity of the DWT lifting scheme is Θ(N log N ), and the time complexity of the SZ algorithm is Θ(N ). Figure 6 In order to test how the use of the DWT can help increasing the compression ratio, 3-axis accelerometer data have been collected over 80 periods (1 period = 30 seconds). The user was at rest for the first 40 periods (sitting on a chair) and walking for the last 40 periods. Figure 7 shows the number of transmitted bytes after the compression of 36864 bytes of accelerometer data using SZ and DWT+SZ methods. The results show that the averages of the transmitted bytes per period are 742 bytes at rest and 1062 bytes at walking using SZ, and 446 bytes at rest and 718 bytes at walking using the proposed approach.

Experimental Results and Analysis

The discussed compression techniques and classification models were tested on 8 UCR univariate time series datasets [START_REF] Chen | The ucr time series classification archive[END_REF], 1 UCI multivariate time series dataset [START_REF] Anguita | A public domain dataset for human activity recognition using smartphones[END_REF] and 3 UEA multivariate time series datasets [START_REF] Bagnall | The UEA multivariate time series classification archive[END_REF]. Table 1 describes these time series and shows their source (ECG, Motion, Sensor, etc.), the size of the training and testing sets, the number of classification classes, the length of the time series and their type (U: univariate, M: multivariate), and the number of multivariate time series features. The results acquired on univariate and multivariate time series are presented in the followings of this section.

Selection of decomposition levels and error-bound

This section discusses the SZ error-bound value selection and the number of decomposition levels for the lifting scheme. The main goal of this paper's study is to come out with an approach that considers the trade-off between the compression ratio and the classification performance. To answer this question, 1: The descriptions of the utilized datasets based on [START_REF] Anguita | A public domain dataset for human activity recognition using smartphones[END_REF], [START_REF] Bagnall | The UEA multivariate time series classification archive[END_REF], and [START_REF] Chen | The ucr time series classification archive[END_REF] an empirical approach was taken, recording the model's classification accuracy trained on each dataset with different SZ error-bound and DWT decomposition level.

Figure 8 shows the outcome of the experiment on two datasets, namely Adiac and NonInvasiveFatalECG Thorax1. For the SZ algorithm, the results show that the classification accuracy for an error bound of 10 -3 remains very similar to that of the model trained on the original dataset, but the compression ratio is low compared to other compression settings. The highest compression ratio was achieved for an error bound of 10 -1 , but the classification performance dropped significantly. Using a 10 -2 error bound resulted in a good balance between classification accuracy and compression ratio. As for the number of decomposition levels, it can be seen that doing more than two wavelet decompositions greatly reduces classification accuracy while one level decomposition keeps the accuracy similar to the one of the original model and two levels decomposition helps to improve the compression ratio at the cost of slightly sacrificing the classification performance.

In this paper the proposed approach is to combine the lifting scheme with SZ. Two combinations were considered in the followings according to the above O ri g

1 0 E -3 1 0 E -2 1 0 E -1
SZ error bound

Univariate time series

The first studies were conducted on univariate time series. Two metrics were considered: compression ratio and classification performance.

Compression ratio

The following compares the compression ratios of the techniques discussed in sections 4 and 5. Different variations of these techniques with different compression ratios were considered as follows:

• SZ E-1: SZ with an absolute error bound of 10 -1 (the decompressed value should be within the range [V -10 -1 , V + 10 -1 ])

• SZ E-2: SZ with an absolute error bound of 10 -2

• SZ E-3: SZ with an absolute error bound of 10 To compare the performance of the aforementioned techniques, the compression ratio (CR) is calculated as follows: The obtained results are shown in Table 2. Table 2 shows the compression ratio of the different compression techniques. It can be seen that the best results are achieved by the SZ method. The closer the absolute error bound value is to zero, the higher the compression ratio is. As for the compressed sensing, the compression ratio depends on M , and on the number of decomposition levels in the case of DWT. Note that CS and DWT outputs are encoded using FPZIP.

CR = original data compressed data (
As for the proposed approach, it can be seen that combining the SZ method with an appropriate error-bound and the DWT helps to achieve a higher compression ratio. For instance, SZ with an absolute error of 10 -2 achieves a compression ratio of 5:1 on the ECG5000 dataset, while the compression ratio has been increased to 9:1 and 12:1 when combining SZ with DWT with one level decomposition and two levels decomposition respectively. The reason behind the improvement in the performance resides in the fact that each decomposition level of the DWT results in a more smoothed and correlated approximation coefficients. As a result, the SZ computes the approximation coefficients instead of all the data points in a time series. Furthermore, the DWT removes the noises from a time series, allowing the SZ method to perform better and to produce better results.

Classification performance

This section compares the four DNN models' classification performances on the compressed univariate time series. The considered experimental adjustments for these models are shown in Table 3.

In this paper, the datasets used contain periodic and non-periodic time se- It can be seen from these figures that the SZ method with an absolute error of 10 -1 does not maintain the quality of the time series. Although it has the highest compression ratio, the classification accuracy of most datasets has been greatly affected. For example, the maximum classification accuracy values obtained on the uncompressed Adiac dataset and the compressed Adiac dataset with SZ E-1 ( Figure 9 ) are 0.83 and 0.64 respectively. This can show the effect of data compression on the classification task. The SZ with absolute errors of 10 -2 and 10 -3 slightly affected the performance of the DNN models.

As for the CS method, the reconstruction quality of the compressed data was not satisfactory. In spite of the fact that the CS method is known to reconstruct a signal perfectly, the signal must be S-sparse, meaning noise-free, in order to be perfectly reconstructed, which is not the case for the time series used and the most real life data collected from IoT devices. This explains the performance decrease of the classifiers when working on reconstructed time series using CS. It can be noticed that the classification performance of the DNN models is highly affected by parameter M . For example, on the uncompressed Adiac dataset, the maximum accuracy achieved is 0.84 versus 0.66 on the reconstructed dataset from 40% of the original data points (CS 40) and 0.4 on the reconstructed dataset from 20% of the original data points (CS 20). On the other hand, the classification performance of the models was slightly affected

Multivariate time series

The compression approach presented can handle both univariate time series and multivariate time series. The followings address the effectiveness of the proposed approach when dealing with multivariate time series in terms of compression ratio, classification performance, and energy efficiency.

Compression ratio

The compression ratio of the different compression techniques achieved on the 3 UEA multivariate time series datasets in addition to the reconstruction time in seconds are shown in Table 4. Compared to the results obtained on the univariate time series, SZ with 10 -1 error-bound and the two combinations of DWT and SZ achieved the highest compression ratio. However, in the case of multivariate time series, DWT L2+SZ E-2 outperformed SZ E-1 for UWave and Wafer datasets, and the compression performance of DWT L1+SZ E-2 became closer to that of SZ E-1. As for the reconstruction time, for the compressed sensing technique, the time needed to reconstruct the compressed data increases with the number of features in a dataset. This can be explained by the fact that CS uses a method of optimization to recover the data, and the more features a dataset has, the greater the process of minimizing the l1-norm. The SZ method's reconstruction time ranged from 0.02 to 0.05 seconds, making it very suitable for applications requiring quick decision-making. As for the DWT, the reconstruction time was not calculated since this paper's proposed solution is to use the approximation coefficients directly for classification without reconstruction of the original data. Another experiment was carried out in which 300 batches of 1000 feature vectors were taken from the HAR [START_REF] Anguita | A public domain dataset for human activity recognition using smartphones[END_REF] dataset, each containing 9 features, and deployed on a Polar M600 wearable. We considered that each batch corresponds to a period of time. The techniques described in the previous section compress the corresponding batch for each period and the resulting number of bytes is recorded. After 300 periods, the average number of output bytes for each com-pression method is calculated with the standard deviation. The obtained results are shown in Figure 11 50 2) the standard deviation of the number of bytes after compression at each period is high for SZ relative to CS and DWT. The latter can be explained by the fact that the compressed data are motion data (accelerometer and gyroscope), and these time series are generally jagged and vary rapidly between different activities (sitting, walking, running, etc). Since SZ is based on a prediction mechanism, its performance depends heavily on the characteristics and variability of the data. For the same reason, using DWT increased the performance of SZ due to each level of decomposition resulting in a smoother version of the data.

Classification performance

The FCN model was used to evaluate the effectiveness of our compression approach on the multivariate datasets. The data processed by the model are tensors with the dimensions (samples, seq len, n channels), where samples is the number of training examples, seq len is the number of steps in the time series, and n channels is the number of columns (features) in the data.

The FCN model was trained on three variants of the data. In the first one, the model processes the original data. In the second and third variants, the model processes the approximations resulting from one level decomposition (seq len = length 2 ) and two levels decomposition (seq len = length 4 ) using the column lifting. Note that the length of each dataset is shown in Table 1 generally gathering data with the default sensing frequency does not consume so much energy. From these outcomes, it can be seen that by implementing the proposed compression scheme, the device's lifetime can be improved by 16% after 2 hours.

Discussion

Various insights can be taken on the basis of the experiments conducted in this study. Recall that the main goal is to propose a compression approach that will help maximize an IoT device's lifetime. It operates on multivariate time series and floating point data efficiently. It can be tailored to any application, sensor or activity and suitable for near real-time applications.

The compressed sensing method with a low value of M showed a good compression ratio but after reconstruction did not maintain the required data features, thus decreasing the quality of the classification. Another weak point for compressed sensing is the reconstruction time, which is highly dependent on the data size and the number of features. Note that compressed sensing works perfectly when the sparsity of the data is high in the time/frequency domain, which is not always the case in IoT applications. On the other hand, the SZ method yielded a high compression ratio and the classification performance remained intact with the appropriate error-bound. One concern about SZ is that its performance depends on the stationarity of the time series as shown in Fig-

ure 11.
The proposed approach of using the discrete wavelet transform as a denoising and smoothing step prior to SZ can be useful for applications where the time series collected are jagged, such as recognition of human activity where high variations can be found between consecutive data points. The proposed approach helped to increase the compression ratio and maintain classification performance when using DWT with one level decomposition. Training a neural network with two levels decomposition approximations decreased the classification accuracy by up to 13% for some datasets. Two things can be recommended to solve this problem: (1) Increasing the size of the training set or testing this approach on datasets such as HAR [START_REF] Chen | The ucr time series classification archive[END_REF] which contain a good amount of training data enabling the model to learn from the compressed time series the necessary features.

(2) Test this approach with wavelets that are more complex than the Haar wavelet. The selection of the corresponding wavelet family is considered for future work.

Conclusion

Considering that IoT devices are generally limited in calculation, storage and energy, data compression can be seen as an effective way to increase the lifetime of these devices. An empirical study has been conducted in this paper to identify appropriate compression ratios, which maintain important information from different time series. Different variations of compression techniques were considered based on an error-bound lossy compressor, namely SZ, the Discrete Wavelet Transform (DWT), and the Compressed Sensing (CS). Additionally, a new compression approach that combines the DWT lifting scheme and SZ has been proposed. The proposed method can manage univariate and multivariate time series effectively, attain a high compression ratio, and can be easily implemented and tailored to various applications.

In order to study the impact of time series compression on the classification task, four newly proposed deep neural networks for time series classification (TSC) were implemented. The experimental results showed that using DWT as a transformation step followed by SZ helps to denoise input data and enables SZ to compress more smooth approximation coefficients resulting in a higher compression ratio.

In addition, this paper suggested to use the frequency-domain coefficients as an entry to the classification models, showing that deep learning models can still learn features from compressed data and attain good classification accuracy.

Figure 1 :

 1 Figure 1: Example of IoT Big Data architecture

Figure 2 :

 2 Figure2: The network structure of FCN and ResNet tested in[START_REF] Wang | Time series classification from scratch with deep neural networks: A strong baseline[END_REF]

Figure 3 :

 3 Figure3: The network structure of LSTM-FCN and GRU-FCN proposed in[START_REF] Karim | Lstm fully convolutional networks for time series classification[END_REF] and[START_REF] Elsayed | Deep gated recurrent and convolutional network hybrid model for univariate time series classification[END_REF]

Figure 2

 2 Figure 2-b.

Figure 3 -

 3 Figure 3-a. The output of the LSTM block is concatenated with the output of the global pooling layer and the final results are obtained from the softmax layer.

  the curve fitting designed specifically to comply with error limitations specified by the user. The SZ compression requires three main steps: linearization of the input array, adaptive curve fitting and compression of unpredictable data. Three prediction models are used in the curve fitting step, based on the neighbouring data values: constant, linear and quadratic. These three models differ by the number of data points needed to fit the original value. The accepted model is that which provides the closest approximation. When no model complies with the predetermined error bound, the data point is denoted as unpredictable and then encoded by binary representation analysis. The Huffman tree is also used to encode the data fitted in the curve fitting step, which are converted into integer quantization factors.

Figure 4 :

 4 Figure 4: Example of two level decomposition of a noisy ECG signal

Figure 5 :

 5 Figure 5: Proposed compression scheme for IoT time series classification

8 :

 8 and Algorithm 1. The input multidimensional array is firstly processed by the forward lifting transform. Based on the provided number of decomposition levels L, the three operations (split, predict, and update) are repeated L times. The results of this operation are one matrix of approximation coefficients A and a set of L matrices of detail coefficients D {d 1 , ..., d L }. The proposed approach consists of discarding the set D, considered as noise, and keeping the approximations only. Then the approximations are converted to 1-D array, SZ's bestfit curve-fitting is applied and finally the unpredictable data points are represented using the IEEE 754 binary representation. The output is a binary array ready to be transmitted to the sink/edge. Algorithm 1 Proposed compression approach Require: input (N-D array), E (error bound), L (decomposition levels), M (num rows), N (num columns) Ensure: output (binary array) 1: output ← [ ] 2: //forward lifting transform 3: for 1 to L do //get the approximations only 9: A ← approx(input) 10: // SZ compression 11: linearization(A) 12: Bestfit Curve-Fitting Compression(A, output) 13: Compressing Unpredictable Data(A,output)

  shows the execution time in seconds of the DWT, SZ, and DWT+SZ methods written in C on a Polar M600 watch for different numbers of floating-point data. The results show that the execution time of the SZ technique is low, and the proposed technique needs around 0.02 Seconds to process 2000 data points, 0.04 Seconds to process 8200 data points, and around 0.13 Seconds to process 33000 data points.

Figure 6 :

 6 Figure 6: Execution time in seconds of the SZ, DWT, and the proposed compression scheme

Figure 7 :

 7 Figure 7: Compression of 36864 bytes of accelerometer data using SZ and DWT+SZ over 80 periods

Figure 8 :

 8 Figure 8: Accuracy vs compression ratio for different SZ error-bound values and DWT decomposition levels. The graphs correspond to Adiac and NonInvasiveFatalECG Thorax1 datasets

- 3 • 2 •

 32 scheme based Haar transform followed by SZ with an absolute error bound of 10 -2

  ries. Periodic time series are like ECG and sinusoidal data, and non-periodic time series are like motion data. Each of the four DNN models was applied 5 times on the different compressed versions of the time series and the average accuracy was recorded. Figures 9 and 10 represent each time series in a radar chart showing the accuracy metric obtained by each of the four NN models implemented with Keras on the compressed variants of the time series. Note that Figure 9 shows the periodic univariate time series and Figure 10 shows the

Figure 9 :Figure 10 :

 910 Figure 9: Accuracy metrics achieved by the four DNN models on the compressed periodic univariate time series

Figure 11 :

 11 Figure 11: Compression of [1000 × 9] batches of the HAR [32] dataset over 300 periods. Next to each compression technique is shown the average number of bytes per period alongside the standard deviation (shown in parenthesis).

Figure 11

 11 Figure 11 indicates two main things: (1) the combination of DWT and SZ improved the compression performance, (2) the standard deviation of the

Figure 12 :

 12 Figure 12: Polar M600 battery level over 120 periods for the four situations: Idle, Sensing, Sensing+compression+transmission, and sensing+transmission

Table

	Dataset	Type	# Classes Length Train size Test size # Features Type
	ECG5000	ECG	5	140	500	4500	1	U
	Adiac	Sinusoidal	37	176	390	391	1	U
	NonInvECGTh1	ECG	42	750	1800	1965	1	U
	NonInvECGTh2	ECG	42	750	1800	1965	1	U
	StarLightCurves	Sensor	3	1024	1000	8236	1	U
	UWaveX	Motion	8	315	896	3582	1	U
	UWaveY	Motion	8	315	896	3582	1	U
	UWaveZ	Motion	8	315	896	3582	1	U
	HAR [32]	Motion	6	128	7352	2947	9	M
	ECG [33]	ECG	2	152	100	100	2	M
	UWave [33]	Motion	8	315	200	4278	3	M
	Wafer [33]	Motion	2	198	298	896	6	M

Table 2 :

 2 Compression ratios achieved by the different data compression techniques on the UCR univariate time series[START_REF] Chen | The ucr time series classification archive[END_REF]

Table 3 :

 3 Experimental adjustments used in the implementation of the four DNN models non-periodic univariate time series.

		Resnet		LSTM FCN	GRU FCN	FCN
		Epochs Batch Epochs Batch Epochs Batch Epochs Batch
	ECG5000	200	16	400	128	400	128	200	128
	Adiac	1500	16	4500	128	4500	128	1500	128
	NonInvECGTh1	1500	16	4500	128	4500	128	1500	128
	NonInvECGTh2	1500	16	4500	128	4500	128	1500	128
	StarLightCurves	500	16	1000	128	1000	128	500	128
	UWaveX	750	16	2000	128	2000	128	750	16
	UWaveY	750	16	2000	128	2000	128	750	16
	UWaveZ	750	16	2000	128	2000	128	750	16

Table 4 :

 4 Compression ratios and reconstruction time (seconds) achieved by the different data compression techniques on the UEA multivariate time series[START_REF] Bagnall | The UEA multivariate time series classification archive[END_REF]

			ECG	UWave		Wafer
		CR	rec time	CR	rec time	CR	rec time
			(sec)		(sec)		(sec)
	SZ E-1	27	0.02	6.46	0.04	12.9	0.05
	SZ E-2	5.4	0.02	3.36	0.03	4.4	0.05
	SZ E-3	2.5	0.02	2	0.03	2.66	0.05
	CS 40	2.8	15.4	2.7	255	2.64	280.2
	CS 20	5.35	27.4	5.42	300.6	5.29	308.7
	DWT L1	4.6	-	5.37	-	5.4	-
	DWT L2	2.4	-	3	-	2.9	-
	DWT L1+SZ E-2 12.6	0.02	6	0.03	8.37	0.05
	DWT L2+SZ E-2 19.6	0.02	11.2	0.03	15.2	0.05

  .

	Dataset	Input data	Length Accuracy
		original	152	0.87
	ECG	level 1 approximations	76	0.86
		level 2 approximations	38	0.72
		original	315	0.93
	UWave	level 1 approximations	157	0.93
		level 2 approximations	78	0.80
		original	198	0.98
	Wafer	level 1 approximations	99	0.98
		level 2 approximations	49	0.89
		original	128	0.93
	HAR	level 1 approximations	64	0.93
		level 2 approximations	32	0.92

Table 5 :

 5 Classification accuracy achieved by the FCN model on the multivariate time series datasets

Table 5

 5 shows the classification accuracy achieved by the FCN on the four datasets with different input data. The results show that the model was able

Acknowledgment

This work is partially funded with support from the Hubert Curien CE-DRE programme n40283YK and the EIPHI Graduate School (contract "ANR-17-EURE-0002"). Computations have been performed on the supercomputer facilities of the "Mésocentre de calcul de Franche-Comté".

that take advantage of the temporal correlation in the data. A new principle for delta compression was developed by the authors in [START_REF] Stojkoska | Data compression for energy efficient iot solutions[END_REF], which allows the compression of tempo-related data and results in a higher compression ratio and a lower memory capacity than standard delta coding. Dictionary-based compressors have been proposed to benefit from repetitive patterns in the data. In [START_REF] Le | Lossless data compression algorithm to save energy in wireless sensor network[END_REF],

the authors proposed a lossless data compression technique called Differential-Lempel-Ziv-Welch (D-LZW), which consists in finding the difference between two successive data samples before placing the data in the LZW algorithm. The authors compared their approach to bzip2 and gzip, showing better results in compressing electrocardiogram (ECG) data.

With regard to the problem stated in this work, the influence of data reduction on classification performance was investigated in previous studies. In [START_REF] Zareei | Impact of compression ratio and reconstruction methods on ecg classification for e-health gadgets: A preliminary study[END_REF], the authors examined the effect of compressed sensing and reconstruction algo-to learn from compressed data. The results also show that training on level-2 approximations decreased classification performance compared to training on level-1 approximations for ECG, UWave, and Wafer datasets. The model, on the other hand, learned well from the HAR dataset's level-2 approximations. The amount of training data will explain this discrepancy. The training size of the ECG, UWave, and Wafer datasets ranges from 100 to 300, while the training size of the HAR dataset is 7352, as shown in Table 1. The small amount of training data did not help the model to learn from level-2 approximations the necessary structure.

Energy efficiency

The proposed compression scheme was implemented on a Polar M600 wearable using Android NDK toolset in order to test the impact of data compression on energy conservation. The collected data are multivariate time series consisting of 3-axis accelerometer. These time series are transmitted to a local PC using Android (Bluetooth Low Energy) BLE after each period. Figure 12 shows the wearable battery level change over 120 periods (1 period = 1 min) for four distinct situations:

• Yellow line: the wearable device is in the idle state

• Red line: the wearable device is continuously collecting data (motion sensors are turned on)

• Green line: The wearable device is continuously collecting data and compresses and transmits data after each period • Blue line: the wearable device is continuously collecting data, and transmits data after each period (no compression)

The results show that the battery level decreased to 76% when continuously collecting data, to 72% when performing sensing, compression, and transmission, and to 56% when performing sensing and transmission. Note that we set the sensing frequency for testing purposes to the maximum in this experiment,


Gaby Bou Tayeh
email: gaby.boutayeh@univ-fcomte.fr

Joseph Azar
email: joseph.azar@univ-fcomte.fr

Abdallah Makhoul
email: abdallah.makhoul@univ-fcomte.fr

Christophe Guyeux
email: christophe.guyeux@univ-fcomte.fr

Jacques Demerjian
email: jacques.demerjian@ul.edu.lb

A Wearable LoRa-Based Emergency System for Remote Safety Monitoring

Keywords: LoRa, LPWAN, Wireless Sensor Networks, IoT, Healthcare

With the advent of the industrial revolution, human beings have developed drastically over the past decades. By 2020, wireless communications would connect more than twenty-five billion devices. Low Power Wide Area (LPWA) technologies are becoming popular as a result of the fast development of the Internet of Things (IoT) market. In this paper, we propose a wearable LoRa-based system for remote safety monitoring of people performing activities in remote areas with no network coverage. The designed system is supposed to detect possible heart problems and/or a "man-down" situation. It then transmits an emergency alert containing information about the state of the concerned individual and its location via LoRa to the surrounding recipients. The proposed system composed of a GPS enabled IoT device, a smart-watch and a smart-phone, has been validated in a remote area in the city of Belfort in France. The obtained results demonstrate the feasibility of such a system.

I. INTRODUCTION

In recent years, the LoRa (Long Range) and LoRaWan (Long Range Wide-area network) technologies have emerged as the new de facto of providing Wireless connectivity between a network of sensors. Numerous services and applications have been built around them, motivated by the vast benefits and advantages the LPWAN (Low Power Wide Area Network) technology provides, such as their ability to ensure services that cover a large area of multiple kilometers, they could be implementable on devices powered by low energy resources, they provide a practical and low deployment cost. One of the domains that have significantly benefited from these technologies is the healthcare domain. The capability of transmitting data over a long distance while consuming a low amount of energy paved the way for various applications and services to be developed.

A. Background

Lora wireless networks made it possible to monitor poor and dangerous environmental conditions. Applications for safety and environmental monitoring involve efficient, durable, fast response and reliable systems. By introducing a self-powered wearable IoT sensor network that gathers and sends environmental information to the cloud through a LoRa gateway, the authors in [START_REF] Wu | We-safe: A self-powered wearable iot sensor network for safety based on lora[END_REF] proposed a solution for individuals working in difficult environments. The suggested scheme utilizes LoRa technology for wireless transmission to provide the network with a long-range and low-power solution. In [START_REF] Mdhaffar | Iotbased health monitoring via lorawan[END_REF], the authors present a LoRaWan based health monitoring system aimed to transmit sensor data of patients living in rural areas to a central medical center in order to reduce the burden of having to travel to distant facilities to have them examined. The authors in [START_REF] Wu | An internet-of-things (iot) network system for connected safety and health monitoring applications[END_REF] developed a Wireless Body Area Network (WBAN) aimed to improve the safety of construction workers. The latter are equipped with body sensors that collect information such as temperature, humidity, UV, CO2, heart rate, and body temperature. The sensors can communicate with each other to exchange information using BLE, and a dedicated safe node transmits the information through a gateway to a cloud server using the LoRaWan network protocol. In [START_REF] Petjjrvi | Evaluation of lora lpwan technology for remote health and wellbeing monitoring[END_REF], the authors assessed LoRa LPWAN technology for indoor remote health and drew the following findings: 1) The feasibility of LoRaWAN for healthcare applications and indoor communication. 2) Indoor communication connections of over 300 meters are feasible, the communication performance varies strongly and is affected by the equipment and barriers blocking the link. 3) The maximum spreading factor does not always give the most stable communication link. 4) There is always the possibility that packets will be lost regardless of the communication settings used. 5) LoRaWAN is more appropriate for applications that are tolerant to delay and loss.

LoRa's extensive work shows that it has excellent potential for deployment in both indoor and outdoor physical environments as well as monitoring individuals in hazardous environments.

B. Motivation and problem formulation

It has recently become an important task to monitor individuals doing activities or working in risky outdoor settings. Hiking, camping, biking, skiing or other outdoor leisure can lead to a risk of injuries or even death. Even a small accident may be dangerous in case it happened in a remote place or during extreme weather conditions that make it difficult for the injured individual to seek help. The risks that come with recreation activities are numerous such as, slipping on rocks, logs when crossing bodies of water, become separated from the group, getting lost and run out of food and water. other risks involve dehydration, hypothermia, heatstroke, frostbite, back injury, and many others.

For instance, on September 11, 2019, a story went viral on multiple US news outlets. It happened in Arroyo Seco River, where two men found a bottle with a note inside "we are stuck, we are at the waterfall, get help" [START_REF]Two hikers found a message in a bottle and helped rescue a stranded family[END_REF]. They then hiked a couple of miles to alert the authorities. A rescue team went to look for potential victims and eventually found a family stuck at the Arroyo Seco narrows since the waterfall they needed to cross was too strong. Unfortunately, this is not the first and the last story of this kind and this is why multiple studies [START_REF] Schussman | The epidemiology of mountaineering and rock climbing accidents[END_REF] have been conducted to understand the risk of injuries during such activities. For example, as cited in [START_REF] Lack | Rock climbing rescues: causes, injuries, and trends in boulder county, colorado[END_REF] Moreover, according to a study published in [START_REF] Bianchi | Skiing and snowboarding in switzerland: Trends in injury and fatality rates over time[END_REF], taking the 5-year average for 2008 to 2012, annually 60,000 skiers and 17,000 snowboarders on Swiss slopes are injured seriously enough to require medical attention. Moreover, every year 19 people on average died while skiing or snowboarding, whereas the numbers are significantly higher in other countries such as Greece and the US.

This paper focuses on healthcare and outdoor environmental applications. The targeted issue of this work can be formulated as follows. How can LPWAN technologies help track the location and monitor the health conditions of individuals performing activities in distant, dangerous, and non-covered areas with no network access?

C. Contribution

This paper presents a complete system that includes both a hardware and a software solution for the previously presented problematic.

• Hardware: We propose a network architecture composed of three main components that enable the transmission of an alert from a source to a destination over a long distance without the need for GSM coverage. The devices composing the system are unobtrusive (smart-watch, smartphone) and used by the users in their daily life. In addition, The IoT device responsible for transmitting messages with LoRa is tiny and easy to mount and does not cause any discomfort. Moreover, such devices are low cost which makes the proposed system affordable for its users.

• Software:

We propose a system that transmits an emergency alert automatically to the surrounding recipients or to the group to which a person belongs in the event of an emergency.

Moreover, it allows its localization, which could save time and effort to find the individual and can potentially save his life. To do so, on the smart-watch, two algorithms were introduced, the first automatically detects a heart problem and the second automatically detects a mandown state (caused by a fall, knee or ankle break, fainting, etc.).

D. Organization

The rest of the paper is organized as follows: Section II discusses the design and components of the proposed system. Section III presents the software implementation of the algorithms used for emergency detection. Section IV discusses the implementation of the proposed system. Section V discusses the energy consumption and the coverage of the system and Section VI concludes the paper.

II. DESIGN AND COMPONENTS OF THE PROPOSED SYSTEM

In this section, we will describe the proposed system, illustrate its design, and list and explain the role of each of its components. We will first start by briefly explaining the objective of our proposal. As previously mentioned in Section I-B, a significant number of people are at risk of getting injured while performing recreational activities in remote areas. In case of severe injuries and the need for a dedicated rescue team to intervene, the rapidity of notifying this team is a matter of life and death. In a remote area with no GSM coverage, it requires a person to physically head to the rescue personnel that could be located far away in order to notify them that someone is a need of help. Nonetheless re-localizing this person is not an easy task as well. This puts the injured person in great danger. The worst scenario is when someone loses his group, ends up alone and faces an incident, gets injured, faint, etc. It would be impossible for him to notify someone, his only chances are that he gets sighted by someone that could summon the rescue team for him.

In order to resolve these crucial issues, we propose a LoRa based emergency alert system. The proposed system is designed to transmit an alert that includes the GPS location to the surrounding recipients in case of emergency, they could be other nearby people equipped with this system or the rescue command station that is always listening to incoming alerts. The system can detect a heart problem (stroke, abnormal heartbeat) as well as when the wearer of the system stops moving. In both cases, it automatically transmits an alert. The wearer of the system could also manually trigger an alert in case he needed help.

A. The system's components

The first component of the system is the Pytrack sensor shield (Figure 1a). This device is equipped with a super accurate GNSS Glonass GPS and it supports the following location services: GPS, GLONASS, Galileo, and QZSS. It has a relatively small size of 55m x 35mm x 10mm and it weighs 11g. This device will be used to acquire the GPS location of the individual in case of an emergency.

The second component of the system is the LoPy 4 development board (Figure 1b). This device is equipped with Semtech LoRa transceiver SX1276 that has a transmission range that can reach up to 40Km in ideal conditions. The device has a small size of 55mm x 20mm x 3.5mm and it weighs 7g. The algorithm that acquires the GPS location in case of emergency and broadcast the alert will be embedded in this device. The LoPy4 will be attached to the Pytrack using pins which enables it to give instruction commends to the latter and exchange data. The third component of the system is the smart-watch. In our case, we have used the Huwaei watch 2 and the Polar M600. Both are equipped with a 3-axis A + G sensor that will be used to detect the activity of the watch wearer. It also includes a heart rate sensor (PPG) that will be used to collect heart rate measurements and detect any abnormal activity.

Finally, the last component is the smart-phone. The latter is useful for the alert receivers, it displays on the screen the cause of the emergency alongside the location and the direction to the emitter. This enables the recipients to easily localize a victim. In this section, we will explain in depth the functionalities of each component, where it belongs, its role in the hierarchy of the network, and how these different components are interconnected in order to transmit an alert from a source to a destination.

As mentioned earlier, the wearable system is composed of three main devices, the smart-watch, the smart-phone, and the GPS enabled IoT device (Pytrack + LoPy4). The IoT device is associated and connected to the smart-watch and the smartphone via Bluetooth Low Energy (BLE).

The smart-watch: Using its integrated accelerometer and heart rate sensors, it can detect whether the watch wearer has stopped moving for a period of time, or he has a heart problem. The IoT Device: Acquire the GPS coordinates of the system wearer and broadcast an alert using its integrated LoRa transceiver. The smart-phone: Display the received alert alongside the location of the emitter.

Figure 2 illustrates how the system works. Each individual is equipped with an IoT device, a smart-watch, and a smartphone, and it can act as an alert sender or a receiver. Case Sender: Either the Watch automatically detects an emergency or the watch wearer manually triggers an alert. A status description message (e.g.: not moving, heart problem, lost, etc.) is then transmitted via BLE to the IoT device. The IoT device acquires the GPS coordinates, adds the coordinates to the payload, and broadcasts the message via LoRa and waits for an acknowledgment. It keeps re-transmitting the alert every few seconds (e.g.: 30 secs) as long as it did not receive any acknowledgment from nearby devices. Case Receiver: The IoT device is always listening to upcoming messages. If received one, it first transmits an acknowledgment to notify the sender that his message has been detected. It then transmits the message via BLE to the smart-phone, which in turn alerts its user that someone is a need of help while providing its location. The receiver could also be a commend rescue station.

III. SOFTWARE IMPLEMENTATION FOR EMERGENCY DETECTION

This section first introduces the Early Warning Score (EWS) system used to assess the smart-watch pulse samples, then describes the emergency detection algorithms that utilize the EWS system and are implemented for emergency detection on the smart-watch.

A. Early Warning Score System

The use of an EWS system has long been enabled by acute care teams to allow a more auspicious response and assessment of patients who are highly sick or injured. An EWS system is based on a simple scoring scheme that assigns a score to each acute patient-monitored physiological measurement [START_REF] Azar | Using adaptive sampling and dwt lifting scheme for efficient data reduction in wireless body sensor networks[END_REF]. The EWS is used in this work to assess the heart rate samples gathered from the wearable device. For each vital sign, a normal healthy range is defined, and the score assigned reflects how extreme the measured value varies from the standard. The higher the score assigned, the more a collected value is outside the normal healthy range.

In this work, the scoring template for the National EWS (NEWS) used in U.K [START_REF]National early warning score (news) 2, royal college of physicians[END_REF], illustrated in Figure 3, is used to assess the severity level of the pulse in order to detect an emergency situation.

B. Algorithms implementation

This section presents two algorithms to detect heart issues and a man-down state. Three kinds of sensors can be used Fig. 3: National Early Warning Score (NEWS) for such applications using contemporary wearable devices, namely the pulse sensor, motion sensor (accelerometer), and step counter sensor.

The first algorithm implemented on the wearable device is a periodic algorithm that runs after each period of time t (Algorithm 1). The pulse and step counter sensors collect data on an ongoing basis and store the values in the memory. After each period p, the total number of steps taken between p and p -1 in addition to the average heart rate values are used to detect an abnormal situation. Referring to [START_REF]Average steps per minute for different exercises[END_REF], the average number of steps that can be taken in one minute for a low-intensity activity such as walking 3 miles per hour is 100. Having done less than 100 steps in a period with a pulse score of 3 (Figure 3) can reflect the possibility of an unusual situation such as injury or heat stroke. If the user has not done an extensive activity and yet has a pulse score of 3, a notification with vibration will be displayed on the watch for a small amount of time to inform the user about his pulse rate. If he believes his pulse rate is normal and this is a false alarm, the user can dismiss the notification by just shaking his hand. If the user has not responded to the notification, an emergency message will be transmitted to the IoT device.

Algorithm 1 Periodic heart rate monitoring

Require: t (period time in seconds)

1: for each period p do 2:

steps ← number of steps if notification dismissed then end if 12: end for In order to detect a man-down state, Algorithm 2 has been implemented to run continuously in the background. This algorithm uses the accelerometer sensor to detect if the watch is not moving for a predefined amount of time. Same as for Algorithm 1, when the watch is not moving for more than β amount of time, a notification with vibration will be displayed on the watch. If the user does not respond, an emergency message will be sent.

In addition to Algorithms 1 and 2, The user has the choice of sending an emergency message manually using the watch in case of loss. x, y, z ← get accelerometer data end if 27: end for

IV. VALIDATION AND VERIFICATION OF THE PROPOSED

SYSTEM

In this section, the results of an implementation of the system in an area surrounding a lake in the city of Belfort in France is presented. Three persons have been deployed in the testing area, each one of them was equipped with a watch, a smart-phone, and an IoT device. One of the three has been given the role of a victim (we will refer to this person as person A). The other two were deployed at approximately 1.2 km away from the supposed victim and waited for an alert (we will refer to them as B and C respectively). The equipment that has been used in this system validation experiment are shown in Figure 4 and a brief description of the LoRa settings we have used are listed below:

• the used radio frequency is 868MHz;

• the LoPy4 Transmission power is set to 14dBm;

• the loPy4 LoRa antenna has a 2dBi gain;

• the spreading factor (SF) is set to 12;

• the bandwidth (BW) is set to 125KHz;

• the payload size of the alert packet is fixed to 8 Bytes. With these settings, the time on-air (ToA) of our packet, which means the time it takes the packet to reach the receiver, will be approximately 631ms, which is very acceptable in case of emergency. In order to verify the Algorithm 2, person A was asked to perform two tasks:

• standstill to simulate a "man down"state. This enables us to test whether the watch triggers an alarm and whether B and C at the other end are able to detect it and localize A; • A was given the ability to instantly increase his heart rate programmatically with a click of a button in order to simulate a heart problem. A was asked to take a few steps only and increase his heart rate. In both tests, an alarm was successfully detected by B and C, and the location of A has been reported.

Figure 5 illustrates the variations in the acc value described in Algorithm 2 in Section III-B. The latter identifies a mandown state if a certain period of time passes and no important changes in the acc value is detected. This can be seen in the red part of the example shown in Figure 5. A "man down" has been identified starting from sample number 5500 and above since no movement has been detected by the watch.

Figure 6 illustrates abnormal heartbeat detection. It can be seen that the average heart rate rises and can bypass 100 bpm, which is quite normal when the amount of steps taken is big. However, if the score provided by Algorithm 1 is 3 and the amount of steps taken is small, this may be an unusual behavior such as the red dots shown in Figure 6 at the end of the graph. These dots show that a high heart rate is detected while an intense activity is not performed by the user. Figure 7 shows the application that is implemented on the smart-watch. The user can use the button "Alert" to manually trigger one. Figure 8 shows the smart-phone application from the point of view of the receiver. An alert describing the emergency is illustrated in red at the top of the application, the location and a button that draws the direction to the "man down" are also provided.

A. Energy consumption

In this section, an estimation of the operational lifetime of the system is calculated. Both the smart-watch and the IoT device are the main concerns since they are required to be active all the time.

We have measured the battery charge drainage in mAh of the IoT device using the measured current and the electrical For the smart-watch, we ran the application where motion and pulse sensors are continuously collecting data while logging the battery level every 1 minute period. The graph in Figure 9b shows that it takes about 3 hours for the watch to reach half its battery life. Looking at these results we can conclude that the system can operate for 6h approximately. In future work, we aim to optimize the algorithms and improve the energy efficiency of the devices by incorporating adaptive sampling techniques [START_REF] Tayeh | A distributed real-time data prediction and adaptive sensing approach for wireless sensor networks[END_REF].

V. CONCLUSION

In this paper, we propose a decentralized LoRa based emergency alert system that can automatically identify and localize a victim in areas with no network coverage. The system is composed of a smart-watch that is used to monitor the heart rate and the activity of the wearer, a GPS enabled IoT device that transmits an alert via LoRa when triggered by the watch, and finally, a smart-phone that visualize the alert alongside the location and the direction to the victim. Our system has been deployed and tested in a remote area located in the city of Belfort in France. Both the activity detection and the heart rate monitoring algorithms have been validated. Moreover, successful transmission of an alert in case of emergency has been proven to work as intended.

Fig. 1 :

 1 Fig. 1: Components of the GPS enabled IoT device

Fig. 2 :

 2 Fig. 2: Network composition

3 :hr ← average heart rate 4 :

 34 if steps < 100 and score(hr)

Algorithm 2

 2 Man-down state detection using accelerometer sensor Require: T S (sampling period in ms) α (motion threshold) β (maximum inactive time in seconds) 1: acc ← 0 // Change rate 2: last acc ← GRAV IT Y EART H 3: current acc ← GRAV IT Y EART H 4: inactive time ← 0 5: for each period p of time T S do 6:

9 :

 9 current acc ← x 2 + y 2 + z 2 10: delta ← current acc -last acc 11:acc ← acc × 0.9 + delta

Fig. 4 :

 4 Fig. 4: The used equipement

Fig. 5 :Fig. 6 :

 56 Fig. 5: Man-down state detection using motion change

Fig. 7 :

 7 Fig. 7: Captures from the wearable application

Fig. 8 :Fig. 9 :

 89 Fig. 8: Captures from the mobile application

ACKNOWLEDGMENT

This work is partially funded by the EIPHI Graduate School (contract "ANR-17-EURE-0002") and the PHC CEDRE Porjetct RESEAUCORP N: 40283YK.