 Research
 Open access
 Published:
A neural datadriven algorithm for smart sampling in wireless sensor networks
EURASIP Journal on Wireless Communications and Networking volumeÂ 2014, ArticleÂ number:Â 23 (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, datadriven, and nonuniform 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.
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, datadriven approaches, and mobility. Since duty cycling patterns are unaware of data which are gathered from sensor nodes, datadriven 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 datadriven techniques. While â€˜energyefficient 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.
Each available measurement was considered together with its uncertainty, assumed to be equal to the accuracy of the sensor. A MLP was used to perform periodically a forward prediction on 100 realizations of stochastic inputs extracted from a uniform probability distribution with mean and range given by the available data and their uncertainty, respectively (see Appendix 1 for details on the MLP). The prediction was computed as the mean of the obtained 100 estimations. The uncertainty of the prediction 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:
Where 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
Simulated data were deterministic and noise free. Two different simulations were considered. The first one involved the following two signals
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.
As the second set of simulations, two uncorrelated signals were considered and sampled every 0.1 s for 60 min. The first signal is a sinusoid with frequency 0.1 Hz, and the second is defined as the first component 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 TurinCaselle airport, for 100 days from June to August 2010 (refer to [15] for details).
The second dataset was gathered from two sensors of a bluetoothbased acquisition system that measures temperature and humidity. The structure of the WSN is shown in Figure 1. A smartphone communicates and reads data from sensors separately. The bluetooth module F2M03GLA from Free2Move was attached to the device. It consumes about 44 mW when it is waiting for connection and 108 mW during the transmission. Data is received from the UART interface of the microcontroller by the bluetooth module and forwards it to a receiver using the serial port profile (SPP) service. The device is powered by a 3V lithium battery (CR2247 from Motorola) with 1,000 mAh. The sensors were fixed on a carrier, and their location was changed irregularly and sequentially in three different locations in a laboratory: close to a cold or to a warm source and far from heat sources. The sources were sufficient to prompt changes on temperature and humidity up to 5Â°C and 10%, respectively. Data were recorded every 15 s for about an hour.
3 Result
Figures 2 and 3 show the application of the method to simulated signals (see Section 2.2.1). In Figure 2, correlated nonstationary signals are considered. As shown in panel A, the method using the combination of the two signals has a lower slope of the reduction ratio versus estimation error. This indicates higher performances when information is jointly extracted from the two correlated signals. Moreover, the method selects more samples for the portions of the signals with higher frequency (Figure 2B), showing the ability to adapt in time to temporal variations of the signal.
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).
In Figure 4, a representative example application for our algorithm to our first bunch of experimental data is shown (meteorological data, Section 2.2.2). The MLP was trained and validated on the basis of the first 80 days (see Appendix 1). Then, it was applied on the following 20 days considered in Figure 4 (test set). In panel A, we show the results of many applications of the prediction algorithm to the test experimental data, with different thresholds. As expected, by increasing the threshold, the reduction factor increases, at the expense of decreasing the accuracy in estimating the measurements. In panel B, a portion of the test data is shown. Note that the number of samples required from the wind velocity sensor is the highest among the four sensors, reflecting the erratic dynamics of the signal. On the other hand, the sampling of humidity, which has smooth variations correlated with temperature, has the lowest rate.
The second bunch of experimental data used as an example application for our algorithm is shown in Figure 5 (indoor experiment with a WSN, Section 2.2.2). Temperature and humidity values are clearly correlated when measured from the same sensor. Some lower correlations are also visible from data via different sensors, as they are placed close to each other. Figure 5 shows the results of many applications of the prediction algorithm to the test experimental data with different thresholds. Again, by increasing the threshold, the reduction factor increases and the accuracy in estimating the measurements decreases.
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 bluetoothbased 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 applicationspecific 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.
The method was tested on both simulated and experimental data. Simulated data were examined to analyze the algorithm correctness. Different simulations were considered, in order to analyze the following properties:

1.
The performance of the proposed method on nonstationary 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 nonstationary 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 rulebased 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
A set of MLPs is considered to perform the prediction. Measurements from each sensor were interpolated at a constant time interval Ï„. 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
The number of neurons in the hidden layer is chosen in the range from 20 to 50. The output neurons have linear activation function. Each output neuron is used to predict the measurement of a specific sensor. MLPs are trained by modifying iteratively the weights and the bias in order to reduce the error in predicting the training data, applying the quasiNewton algorithm [13] for a number of iterations in the range of 50 to 400 times. An optimal network is selected choosing the topology (i.e., the number of hidden neurons) and the parameters (synaptic weights and bias, after a specific number of iterations of the optimization algorithm) with best generalization performances (i.e., with minimum error in the validation set). The proper MLP provides a function estimating the relation between the available information (past and present measurements) and the subsequent measurements
where \stackrel{\xe2\u2020\u2019}{\mathit{x}}\left(\mathit{t}\right) indicates the set of sensor measurements (acquired or predicted) and \stackrel{\xe2\u2020\u2019}{\mathit{F}}\left(\xe2\u2039\dots \right) is the vector function predicting the future values from each sensor.
Appendix 2 Relation between power saved and reduction ratio
Consider a sensor measurement. The sensor can be either in a 'Reading' or a 'No Communication' state. The power consumption of the bluetoothbased temperature and humidity acquisition system was measured. The sensor was supplied with a constant voltage of 3 V, and the current was measured using a digital multimeter (DM3051 Digital Multimeter) with a sampling frequency of 10 Hz. As mentioned in Section 2.2.2, P_{ R }â€‰=â€‰108 mW and P_{NC}â€‰=â€‰44 mW, so that their ratio is about kâ€‰=â€‰2.45:
The average power 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)
When our algorithm is applied, the signals are undersampled, so that the average time of the reading state is reduced (of a ratio given by the reduction ratio imposed by the choice of the threshold). The reduction in average power is described by the nonlinear function multiplying the power of the no communication state in the previous equation
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%.
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: 1923 Apr 2010. Osaka: Piscatway: IEEE; 2010:870873.
Wu D, Wang H: Video surveillance over wireless sensor and actuator networks using active cameras. IEEE Trans. Automat. Contr. 2011, 56(10):24672472.
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:18611870.
Aram S, Troiano A, Pasero E: Environment sensing using smartphone. In IEEE Sensors Applications Symposium (SAS):7â€“9Feb 2010; Brescia. Piscataway: IEEE; 2012:14.
Aram S, Troiano A, Rugiano F, Pasero E: Low power and bluetoothbased wireless sensor network for environmental sensing using smartphones. In Artificial Intelligence Applications and Innovations. Heidelberg: Springer; 2012:332340.
Goldman J, Shilton K, Burke J, Estrin D, Hansen M, Ramanathan N, West R: Participatory Sensing: A CitizenPowered Approach to Illuminating the Patterns that Shape our World. White Paper: Foresight & Governance Project; 2009.
Chehri A, Fortier P, Tardif PM: Security monitoring using wireless sensor networks. In Proceedings of Communication Networks and Services Research: 1417 May 2007; Frederlcton. Piscataway: IEEE; 1317.
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
Anastasi G, Conti M, Di Francesco M, Passarella A: Energy conservation in wireless sensor networks: a survey. Ad Hoc Networks 2009, 7(3):537568. 10.1016/j.adhoc.2008.06.003
Shwe HY, Jiang XH, Horiguchi S: Energy saving in wireless sensor networks. J. Commun. Comput. 2009, 6(5):2028.
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:1820 Jan 2014; Sousse. Piscataway: IEEE; 2014.
Aram S, Mesin L, Pasero E: A neural datadriven approach to increase wireless sensor networksâ€™ lifetime. In 2014 World Symposium on Computer Applications & Research â€“ IEEE International Conference on Artificial Intelligence:1820 Jan 2014; Sousse. Piscataway: IEEE; 2014.
Etienne B: Optimization for training neural nets. IEEE Trans. Neural. Netw 1992, 3(2):232240. 10.1109/72.125864
Edward L: Deterministic nonperiodic flow. J. Atmos. Sci 1963, 20(2):130141. 10.1175/15200469(1963)020<0130:DNF>2.0.CO;2
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):7183.
Kumar V, Cooper BF, Navathe SB: Predictive filtering: a learningbased approach to data stream filtering. In Proceedings of the International Workshop Data Management for Sensor Networks. New York: ACM; 2004:1723.
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:1122.
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:16.
AlKaraki JN, UlMustafa R, Kamal AE: Data aggregation in wireless sensor networksexact and approximate algorithms. In IEEE Workshop on High Performance Switching and Routing. Piscataway: IEEE; 2004:241245.
Kantz H, Schreiber T: Nonlinear Timeseries Analysis. Cambridge: Cambridge University Press; 1997.
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):3135. 10.9790/28340213135
Simon H: Neural Networks: A Comprehensive Foundation. Upper Saddle River: Prentice Hall; 1999.
Acknowledgments
This work was supported by the Italian private company Reply, who provided a grant for S. Aram.
Author information
Authors and Affiliations
Corresponding author
Additional information
Competing interests
The authors declare that they have no competing interests.
Authorsâ€™ original submitted files for images
Below are the links to the authorsâ€™ original submitted files for images.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 2.0 International License (https://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
About this article
Cite this article
Mesin, L., Aram, S. & Pasero, E. A neural datadriven algorithm for smart sampling in wireless sensor networks. J Wireless Com Network 2014, 23 (2014). https://doi.org/10.1186/16871499201423
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/16871499201423