# A neural data-driven algorithm for smart sampling in wireless sensor networks

- Luca Mesin
^{1}Email author, - Siamak Aram
^{1}and - Eros Pasero
^{1}

**2014**:23

https://doi.org/10.1186/1687-1499-2014-23

© Mesin et al.; licensee Springer. 2014

**Received: **23 October 2013

**Accepted: **25 January 2014

**Published: **6 February 2014

## Abstract

Wireless sensor networks (WSN) take on an invaluable technology in many applications. Their prevalence, however, is threatened by a number of technical difficulties, especially the shortage of energy in sensors. To mitigate this problem, we propose a smart reduction in data communication by sensors. Indeed, in case we have a solution to this end, the components of a sensor, including its radio, can be turned off most of the time without noticeable influence on network operation. Thus, reducing the acquired data, the sensors can be idle for longer and power can be saved. The main idea in devising such a solution is to minimize the correlation between the data communicated. In order to reduce the measurements, we present a data prediction method based on neural networks which performs an adaptive, data-driven, and non-uniform sampling. Evidently, the amount of possible reduction in required samples is bounded by the extent to which the sensed data is stationary. The proposed method is validated on simulated and experimental data. The results show that it leads to a considerable reduction of the number of samples required (and hence also a power saving) while still providing a good approximation of the data.

## Keywords

## 1 Introduction

Wireless sensor networks (WSN) have received a great attention in recent years. They have a wide variety of applications such as event detection, target tracking, environment sensing, elder people monitoring, and security [1–8]. A WSN is usually made up of a large number of sensors that communicate their sensed information to other nodes. Sensors are often supplied with scarce energy resources. Hence, energy saving is crucial to the operation of WSNs, and devising methods for efficient power consumption is central to the research in this area.

Studies show that the communication component of a sensor consumes more power than the computational unit and that power consumption is in minimum in the sleep state of the radio communication [9].

Many approaches were proposed to reduce the power consumption of a sensor network, but the following three main techniques are the most important among them [9, 10]: duty cycling, data-driven approaches, and mobility. Since duty cycling patterns are unaware of data which are gathered from sensor nodes, data-driven approaches are more appropriate to reduce the energy consumption of the WSNs.

The microcontroller can switch on the sensors only during the measurement, reducing the power consumption [4, 5]. Nevertheless, unneeded communications could sporadically happen because of transferring unnecessary data. Reducing extra communications is a way to save energy which can be followed by data-driven techniques. While ‘energy-efficient data acquisition’ schemes are mainly concerned with decreasing power consumption relevant to the sensing subsystem, ‘data reduction’ schemes focus on unneeded samples.

In this paper, data prediction is employed. This work has been partially presented in IEEE WSCAR 2014 [11, 12]. An innovative method is proposed and tested on simulated and experimental data. A neural algorithm is considered to forecast sensor measurements and their uncertainties to allow the system to reduce communications and transmitted data. In particular, a multilayer perceptron (MLP) network [13] is used. The central control unit selects when and from which sensor to acquire a new sample, without scheduling a periodical sampling. In the period between two acquisitions, there are no transmissions in order to save energy.

## 2 Methods

### 2.1 Algorithm for efficient sampling

To reduce the number of acquired data, we predicted them and estimated the uncertainty of the prediction. An additional measurement was required from a sensor when the associated uncertainty went above a threshold.

*U*was defined in terms of two contributions. The first was the dispersion of the predictions, indicated in the following as

*U*

_{1}and defined as the range of the estimations provided by the MLP from the 100 random trials. The second contribution

*U*

_{2}was the estimated rate of prediction error:

*p*

_{ j }and

*m*

_{ j }indicate the jth predicted and measured value, respectively (so that |

*p*

_{ j }-

*m*

_{ j }| is the prediction error),

*τ*

_{ j }is the time sample in which the jth measurement is taken (so that

*τ*

_{ j }-

*τ*

_{j - 1}is the time delay between the jth and the previous measurement). Thus,

*U*

_{2}is the mean of the last two estimated ratios between the prediction error and the time delay from the last measurement (so that the estimated rate of increase of prediction error has a memory term). A convex combination of the two contributions was considered as the definition of the uncertainty

where the parameter α (with 0 < α < 1) weights the importance of the two mentioned contributions. In the following, the same algorithm is tested on different datasets (refer to Section 2.2). For such general applications, there is no reason to give more importance to one of the two contributions in Equation 2, so that α is considered 0.5 in the following. However, for specific applications, a different weight could be optimal.

A new acquisition was required from a sensor when the uncertainty of the predicted measurement was larger than a threshold (which was chosen as sensor specific). Thus, the MLP was used to estimate when and from which sensor to acquire a measurement. This allows to reduce the number of measurements and, consequently, also the power consumption (as there is a decline on communication, the energy is saved by decreasing the number of transmissions). After acquiring a measurement from a sensor, its present and past data were updated by interpolating the acquired measurements and their uncertainties were updated according to the accuracy of the sensor.

### 2.2 Data test bed

Both simulated and experimental data were used to test the algorithm.

#### 2.2.1 Simulated data

where *t* is the time (in the range of 0 to 200 s, sampled at 20 Hz), *f*(*t*) is a square wave varying between 0.5 and 1.0 Hz with period 20 s and *a*(*t*) = 4 + sin(0.15*πt*). The signals were quantized in order to have resolution 0.05 (also considered as the accuracy of the measurement). The two signals *x*_{1} and *x*_{2} were first used separately, then together.

*y*

_{1}of the solution [

*y*

_{1}

*y*

_{2}

*y*

_{3}] of a Lorenz system in chaotic regime [14]:

The signals were quantized in order to have resolution 0.1.

#### 2.2.2 Experimental data

Two different experimental data were considered. The first dataset was constituted of meteorological data acquired every 15 min from four sensors, measuring temperature, pressure, wind velocity, and humidity, located at the Turin-Caselle airport, for 100 days from June to August 2010 (refer to [15] for details).

## 3 Result

In Figure 3, the sinusoidal and the chaotic signals are considered. As expected, the prediction of the sinusoid is simpler than that of the chaotic signal; for this reason, more measurements are selected by the algorithm to sample appropriately the second signal (as shown in panel A).

## 4 Discussion

This paper investigates the possibility of reducing the amount of communications and subsequently the power consumption of a sensor network by a smart sampling of data. Since reading from a bluetooth-based acquisition system is one of the most expensive task in terms of power consumption in WSNs, energy saving can be obtained by timely replacing read data with predicted data. Reducing the number of measurements could be beneficial also in general networks, in order to save power or memory. An innovative and general method is discussed in this paper to determine when and which sensor to interrogate. It is based on a data prediction approach. Data prediction is also applied in [16], where data are predicted and streamed only when the mismatch with respect to the acquired measurement is higher than a threshold. A similar approach is used in [17], where Kalman filters are applied for the prediction. These methods are more useful to conserve bandwidth than to reduce battery consumption. Indeed, the sensors waste energy to perform the prediction and a continuous sampling, so that they cannot be switched off, but the computational load and cost of each node are increased. On the other hand, only the base station is used in [18] to perform the prediction, not the nodes. However, the sensors are periodically interrogated to test if the predicted value is sufficiently accurate. Another method to reduce power consumption of a WSN is data aggregation [19]. It is an application-specific technique that is considered in most cases in which data are transferred between intermediate or neighboring nodes.

The proposed algorithm estimates a prediction uncertainty for each sensor in the network during the monitoring. A specific sensor is interrogated when its uncertainty is above a threshold, which can be selected by the user (allowing, for example, to fit better a specific dataset or to impose a deeper undersampling of a sensor). The algorithm to estimate the sensor uncertainties is based on a tool for data forecasting. It is used to estimate the rate of increasing of the prediction error and the future dispersion of the predictions due to the uncertainty contained in the available data (due to the finite precision of the sensors or the errors cumulated by iterating the prediction). Two contributions (related to the predicted errors and to the dispersion of the predictions) are given the same weight and linearly combined for the estimation of the uncertainty associated to the sensor.

- 1.
The performance of the proposed method on non-stationary signals

- 2.
The ability of integrating the information from correlated measurements

- 3.
The management of chaotic versus periodic signals

Our method adapted the sampling rate to the properties of a non-stationary signal, so that more samples were required for the portions of the signal with higher frequency. Moreover, when applied to two correlated signals, the method improved the performances with respect to the case in which it was applied on the two signals separately. Finally, the method required more samples to describe a chaotic system than a simple periodic one. All these results are in line with our expectations and confirm the reliability of the proposed method.

Two applications to experimental data are also provided. When applied to meteorological data, the method was able to reduce the number of acquired samples with low estimation errors. More samples were recorded from the sensor monitoring the wind velocity, which provided a very erratic signal, with respect to temperature, pressure, and humidity, which showed regular and correlated variations. Notice that only a representative application is here considered: for practical applications, as only average information on wind velocity is usually of interest, subsequent measured or estimated samples could be averaged, reducing further the data to be effectively transmitted. This outdoor application is in line with the results of the application of our method to indoor environmental data from a WSN.

Considering the power consumed by the sensors during transmission and when in the idle state, some considerations could be made on the power that could be saved using our algorithm to reduce the number of measurements (see Appendix 2). Considering the indoor application, a reduction of the 50% of samples (getting an estimation error of about 35%, see Figure 5) allows to decrease the power consumption of about 7.5%; for the outdoor application here considered, data could be reduced to 70% (guaranteeing an estimation error lower than 20%, see Figure 4); thus, by scaling the acquisition and sampling times, a 10% of power saving could be obtained.

The results of the application of our method appear to be promising, even if a basic and general method was considered. Following the same ideas, more sophisticated methods could be developed, in order to better fit specific applications. For example, only the last two (measured or predicted) samples are here considered as the inputs of the prediction algorithm. This choice is due to the general applications discussed here, where four different datasets were processed by the same algorithm. However, different inputs can be chosen (e.g., the average values of data on long periods, often used in meteorological forecasting applications, or delayed samples with an optimally chosen delay, or simply more than two values could be used from each sensor; the methods of time series embedding [20] could be used to support a proper selection of the optimal delay and of the number of delayed values to characterize better each sensor). Moreover, a simple MLP was used for data prediction (see Appendix 1). Different alternative methods could be applied instead but still following the main general ideas of this paper. For example, different neural networks or fuzzy rule-based systems can be used [21]. Also, a single MLP is used here to predict all the measurements of the sensors, but different MLPs could be used, one for each sensor. The method estimates the uncertainty of the predicted measurements as the average of two contributions: different combinations can fit specific applications better. Moreover, a linear increase of the prediction error, including a memory term, is here assumed, but a more sophisticated (nonlinear, adaptive) algorithm can be introduced in the future to estimate better the raise of the prediction error in time.

## 5 Conclusions

This paper introduces an innovative method to make a smart sampling from sensors, in order to avoid unneeded measurements and, consequently, to reduce power consumption. The main innovation is the proposed methodology: using an intelligent system that predicts data and the uncertainty of the estimation in order to select an optimal sampling. Different variants can be proposed in the future to fit specific applications.

## Appendices

### Appendix 1 Prediction algorithm

*τ*. The value of the interpolated measurement in the most recent time and the delayed value of one sample interval are considered for each sensor as the inputs of the MLP. The data are divided into training (60% of data), validation (20% of data), and test sets (20% of data). A single hidden layer is used, which is sufficient to approximate any nonlinear function (universal approximation property, [22]). The neurons in the hidden layer applies a sigmoidal activation function

where $\overrightarrow{\mathit{x}}\left(\mathit{t}\right)$ indicates the set of sensor measurements (acquired or predicted) and $\overrightarrow{\mathit{F}}\left(\cdot \right)$ is the vector function predicting the future values from each sensor.

### Appendix 2 Relation between power saved and reduction ratio

*P*

_{ R }= 108 mW and

*P*

_{NC}= 44 mW, so that their ratio is about

*k*= 2.45:

*P*

_{AVE}is the sum of the power spent during reading

*P*

_{R}or during no communication

*P*

_{NC}weighted by the percentage time spent in the two states (

*T*

_{ON}and

*T*

_{OFF}, respectively)

This function is monotonically increasing and larger than 1 for positive values of *T*_{ON}. If the time of no communication is much larger than the reading time, the function is close to be linear with angular coefficient *k*/*T*_{OFF}. Considering our experiment, assuming that the reading time is 1 s long and that the reference sampling is at 0.1 Hz, the factor in Equation 9 is varying between 1 and 1.17. For example, as indicated in Section 4, we could have about 7.5% of power saving with a reduction factor of 50%.

## Declarations

### Acknowledgments

This work was supported by the Italian private company Reply, who provided a grant for S. Aram.

## Authors’ Affiliations

## References

- Da Silva RI, Del Duca Almeida V, Poersch AM, Nogueira JMS: Wireless sensor network for disaster management. In
*IEEE Network Operations and Management Symposium: 19-23 Apr 2010*. Osaka: Piscatway: IEEE; 2010:870-873.Google Scholar - Wu D, Wang H: Video surveillance over wireless sensor and actuator networks using active cameras.
*IEEE Trans. Automat. Contr.*2011, 56(10):2467-2472.View ArticleGoogle Scholar - Kim S, Paulos E: Air: sharing indoor air quality measurements and visualizations. In
*Proceedings of the SIGCHI Conference on Human Factors in Computing Systems*. New York: ACM; 2010:1861-1870.Google Scholar - Aram S, Troiano A, Pasero E: Environment sensing using smartphone. In
*IEEE Sensors Applications Symposium (SAS):7–9Feb 2010; Brescia*. Piscataway: IEEE; 2012:1-4.Google Scholar - Aram S, Troiano A, Rugiano F, Pasero E: Low power and bluetooth-based wireless sensor network for environmental sensing using smartphones. In
*Artificial Intelligence Applications and Innovations*. Heidelberg: Springer; 2012:332-340.View ArticleGoogle Scholar - Goldman J, Shilton K, Burke J, Estrin D, Hansen M, Ramanathan N, West R:
*Participatory Sensing: A Citizen-Powered Approach to Illuminating the Patterns that Shape our World*. White Paper: Foresight & Governance Project; 2009.Google Scholar - Chehri A, Fortier P, Tardif PM: Security monitoring using wireless sensor networks. In
*Proceedings of Communication Networks and Services Research: 14-17 May 2007; Frederlcton*. Piscataway: IEEE; 13-17.Google Scholar - Aram S, Troiano A, Rugiano F, Pasero E: Mobile environmental sensing using smartphones, in Eren, H. and Webster, J., Measurement, Instrumentation, and Sensors Handbook.
*Second Edition: Electromagnetic, Optical, Radiation, Chemical, and Biomedical, Measurement. Boca Raton, FL: CRC Press, ch. 73, February 2014*Google Scholar - Anastasi G, Conti M, Di Francesco M, Passarella A: Energy conservation in wireless sensor networks: a survey.
*Ad Hoc Networks*2009, 7(3):537-568. 10.1016/j.adhoc.2008.06.003View ArticleGoogle Scholar - Shwe HY, Jiang XH, Horiguchi S: Energy saving in wireless sensor networks.
*J. Commun. Comput.*2009, 6(5):20-28.Google Scholar - Aram S, Mesin L, Pasero E: Improving lifetime in wireless sensor networks using neural data prediction. In
*2014 World Symposium on Computer Applications & Research - IEEE International Conference on Information and Intelligent Systems:18-20 Jan 2014; Sousse*. Piscataway: IEEE; 2014.Google Scholar - Aram S, Mesin L, Pasero E: A neural data-driven approach to increase wireless sensor networks’ lifetime. In
*2014 World Symposium on Computer Applications & Research – IEEE International Conference on Artificial Intelligence:18-20 Jan 2014; Sousse*. Piscataway: IEEE; 2014.Google Scholar - Etienne B: Optimization for training neural nets.
*IEEE Trans. Neural. Netw*1992, 3(2):232-240. 10.1109/72.125864View ArticleGoogle Scholar - Edward L: Deterministic nonperiodic flow.
*J. Atmos. Sci*1963, 20(2):130-141. 10.1175/1520-0469(1963)020<0130:DNF>2.0.CO;2View ArticleGoogle Scholar - Troiano A, Pasero E, Mesin L: In the field application of a new sensor for monitoring road and runway surfaces.
*Sensors & Transducers*2011, 10(2):71-83.Google Scholar - Kumar V, Cooper BF, Navathe SB: Predictive filtering: a learning-based approach to data stream filtering. In
*Proceedings of the International Workshop Data Management for Sensor Networks*. New York: ACM; 2004:17-23.Google Scholar - Jain A, Chang EY, Wang YF: Adaptive stream resource management using Kalman filters. In
*Proceedings of the 2004 ACM International Conference on Management of Data (SIGMOD2004)*. New York: ACM; 2004:11-22.View ArticleGoogle Scholar - Cordina M, Debono CJ: Maximizing the lifetime of wireless sensor networks through intelligent clustering and data reduction techniques. In
*Proceedings of the 2009 IEEE Wireless Communication and Networking Conference:5–8Apr 2009; Budapest*. Piscataway: IEEE; 2009:1-6.View ArticleGoogle Scholar - Al-Karaki JN, Ul-Mustafa R, Kamal AE: Data aggregation in wireless sensor networks-exact and approximate algorithms. In
*IEEE Workshop on High Performance Switching and Routing*. Piscataway: IEEE; 2004:241-245.Google Scholar - Kantz H, Schreiber T:
*Nonlinear Time-series Analysis*. Cambridge: Cambridge University Press; 1997.Google Scholar - Meenakshi B, Anandhakumar P: Optimization of energy consumption by fuzzy based routing in wireless sensor network.
*IOSR J. of Electronics and Commun. Engineering*2012, 2(1):31-35. 10.9790/2834-0213135View ArticleGoogle Scholar - Simon H:
*Neural Networks: A Comprehensive Foundation*. Upper Saddle River: Prentice Hall; 1999.Google Scholar

## Copyright

This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.