[ieee 2013 ieee international conference on distributed computing in sensor systems (dcoss) -...

8
Automatic Sensor drift detection and correction using Spatial Kriging and Kalman filtering Dheeraj Kumar, Sutharshan Rajasegarar, Marimuthu Palaniswami Department of Electrical and Electronic Engineering The University of Melbourne VIC - 3010, Australia Email: {dheerajk@student., sraja@, palani@} unimelb.edu.au Abstract—Internet-of-Things (IoT) is a concept referring to interconnected people and objects and smart city is one of the many applications of IoT. Wireless Sensor Network (WSN) is a specific technology that helps to create “Smart Cities”. It aims at creating a distributed network of intelligent sensor nodes which can measure various parameters for efficient management of the city. The data thus collected through a range of sensors is processed and is delivered wirelessly in real-time to the citizens or the appropriate authorities. Since the application framework for smart city application is huge, it would require a large number of different types of sensors for its implementation and the project could be viable only if we use low resolution, low precision but inexpensive sensors. The sensors in sensor network can suffer from random or systematic errors. Most common problem with inexpensive sensors used in WSNs for smart city applications is of drift and bias. They can be calibrated at the time of deployment, but they develop drift, which is the slow change in the reading of sensor from actual value as time progresses. In this paper we have proposed a framework to automatically detect and correct the drift of the sensor nodes to keep the WSN usable. Kriging based interpolation of the sensor readings of neighboring sensors is used to predict actual value at the sensor node and the measured drift is then kalman filtered to get correct drift estimates. We have demonstrated the results of this algorithm on real sensor data obtained from Intel Research Berkeley Laboratory deployment and shown that our system is able to detect and correct smooth drift and bias generated in the sensors. We have also shown that our system is robust with respect to the number of sensor nodes drifting and significantly outperforms the traditional averaging based interpolation methods. I. I NTRODUCTION The Internet-of-Things (IoT) [1] refers to uniquely iden- tifiable objects and their interconnection in a internet like structure. As internet today connects personal computers and mobile phones to each other, IoT visualizes all the objects however small or huge may they be, to connect to each other over internet for a complete transformation of our daily life as things can communicate with each other, notify and can take corrective actions as and when required. IoT is one of the main thought behind implementation of “Smart City” [2], which is a combination of different dimensions like smart transport, smart environment and smart living. A smart city takes advantage of Information and Communication Technologies (ICT) to solve complex problems that cities today are facing because of a large influx of population in the cities. These problems include smart parking, environment monitoring, effective transportation and effective uninterrupted power supply. The ICT infrastructure that provides the optimal solution for different problems, derive it’s data from a network of wireless sensor nodes, spread across the city. A Wireless Sensor Network (WSN) consists of a large number of spatially distributed sensory devices used for the monitoring of various environmental and physical variables such as temperature, humidity, pollution level and water quality. Having the po- tential of being useful in so many applications, it has now become one of the major research area [3]. Recent advances in microprocessor technology and fabrication have lead to a dramatic reduction in physical size and power consumption of such devices. Similar have been the trend with sensing devices, battery and communication hardware [4]. Initially the development of wireless sensor networks was motivated by military applications such as battlefield surveillance, but today such networks are also used in many industrial and consumer applications, such as industrial process monitoring, control and machine health monitoring. With the increase in the number of applications of WSNs, they are being deployed in harsh environmental conditions, where they are left unattended for a long duration of time and the applications like military surveillance, environmental monitoring or smart city management requires accuracy and reliability of the data. However if the sensors are used for a long time, they start to develop drift. Drift is a low frequency change in the sensor value over time. Apart from drift, sensors also suffer from bias, which is sensor output for zero input. In order to maintain the accuracy and hence keep the WSN operational, drifting sensor nodes should be re-calibrated from time to time. Manual calibration is possible only if the number of sensor nodes is small, in that case too, it’s extremely time consuming and expensive. Considering the applications where these WSNs are used, sometimes because of sheer volume of the number of sensors and sometimes because of inaccessible location it is not possible to manually calibrate the drifting sensors. Therefore there is a need to identify the drifting sensors and calibrate them automatically [5]. In this paper we have addressed the problem of detection and correction of drift and bias errors in a sensor network using the data from the neighboring sensors, which would measure correlated data. For the smart city applications, WSNs are usually employed to monitor physical variables such as temperature, humidity and pollution levels, which have a continuous but slowly changing spatio-temporal profile, hence there is a high correlation between neighboring sensors [6]. Based on the predicted value of the physical variable, sensors are measuring, it is possible to detect for the drifting sensors 2013 IEEE International Conference on Distributed Computing in Sensor Systems 978-0-7695-5041-1/13 $26.00 © 2013 IEEE DOI 10.1109/DCOSS.2013.52 183

Upload: marimuthu

Post on 13-Dec-2016

217 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: [IEEE 2013 IEEE International Conference on Distributed Computing in Sensor Systems (DCOSS) - Cambridge, MA, USA (2013.05.20-2013.05.23)] 2013 IEEE International Conference on Distributed

Automatic Sensor drift detection and correctionusing Spatial Kriging and Kalman filtering

Dheeraj Kumar, Sutharshan Rajasegarar, Marimuthu PalaniswamiDepartment of Electrical and Electronic Engineering

The University of MelbourneVIC - 3010, Australia

Email: {dheerajk@student., sraja@, palani@} unimelb.edu.au

Abstract—Internet-of-Things (IoT) is a concept referring tointerconnected people and objects and smart city is one of themany applications of IoT. Wireless Sensor Network (WSN) is aspecific technology that helps to create “Smart Cities”. It aims atcreating a distributed network of intelligent sensor nodes whichcan measure various parameters for efficient management ofthe city. The data thus collected through a range of sensors isprocessed and is delivered wirelessly in real-time to the citizens orthe appropriate authorities. Since the application framework forsmart city application is huge, it would require a large number ofdifferent types of sensors for its implementation and the projectcould be viable only if we use low resolution, low precision butinexpensive sensors. The sensors in sensor network can sufferfrom random or systematic errors. Most common problem withinexpensive sensors used in WSNs for smart city applications is ofdrift and bias. They can be calibrated at the time of deployment,but they develop drift, which is the slow change in the reading ofsensor from actual value as time progresses. In this paper we haveproposed a framework to automatically detect and correct thedrift of the sensor nodes to keep the WSN usable. Kriging basedinterpolation of the sensor readings of neighboring sensors is usedto predict actual value at the sensor node and the measured driftis then kalman filtered to get correct drift estimates. We havedemonstrated the results of this algorithm on real sensor dataobtained from Intel Research Berkeley Laboratory deploymentand shown that our system is able to detect and correct smoothdrift and bias generated in the sensors. We have also shown thatour system is robust with respect to the number of sensor nodesdrifting and significantly outperforms the traditional averagingbased interpolation methods.

I. INTRODUCTION

The Internet-of-Things (IoT) [1] refers to uniquely iden-tifiable objects and their interconnection in a internet likestructure. As internet today connects personal computers andmobile phones to each other, IoT visualizes all the objectshowever small or huge may they be, to connect to eachother over internet for a complete transformation of our dailylife as things can communicate with each other, notify andcan take corrective actions as and when required. IoT isone of the main thought behind implementation of “SmartCity” [2], which is a combination of different dimensionslike smart transport, smart environment and smart living. Asmart city takes advantage of Information and CommunicationTechnologies (ICT) to solve complex problems that citiestoday are facing because of a large influx of population inthe cities. These problems include smart parking, environmentmonitoring, effective transportation and effective uninterruptedpower supply. The ICT infrastructure that provides the optimal

solution for different problems, derive it’s data from a networkof wireless sensor nodes, spread across the city. A WirelessSensor Network (WSN) consists of a large number of spatiallydistributed sensory devices used for the monitoring of variousenvironmental and physical variables such as temperature,humidity, pollution level and water quality. Having the po-tential of being useful in so many applications, it has nowbecome one of the major research area [3]. Recent advancesin microprocessor technology and fabrication have lead to adramatic reduction in physical size and power consumptionof such devices. Similar have been the trend with sensingdevices, battery and communication hardware [4]. Initiallythe development of wireless sensor networks was motivated bymilitary applications such as battlefield surveillance, but todaysuch networks are also used in many industrial and consumerapplications, such as industrial process monitoring, control andmachine health monitoring.

With the increase in the number of applications of WSNs,they are being deployed in harsh environmental conditions,where they are left unattended for a long duration of timeand the applications like military surveillance, environmentalmonitoring or smart city management requires accuracy andreliability of the data. However if the sensors are used for along time, they start to develop drift. Drift is a low frequencychange in the sensor value over time. Apart from drift, sensorsalso suffer from bias, which is sensor output for zero input.In order to maintain the accuracy and hence keep the WSNoperational, drifting sensor nodes should be re-calibrated fromtime to time. Manual calibration is possible only if the numberof sensor nodes is small, in that case too, it’s extremely timeconsuming and expensive. Considering the applications wherethese WSNs are used, sometimes because of sheer volume ofthe number of sensors and sometimes because of inaccessiblelocation it is not possible to manually calibrate the driftingsensors. Therefore there is a need to identify the driftingsensors and calibrate them automatically [5].

In this paper we have addressed the problem of detectionand correction of drift and bias errors in a sensor networkusing the data from the neighboring sensors, which wouldmeasure correlated data. For the smart city applications, WSNsare usually employed to monitor physical variables such astemperature, humidity and pollution levels, which have acontinuous but slowly changing spatio-temporal profile, hencethere is a high correlation between neighboring sensors [6].Based on the predicted value of the physical variable, sensorsare measuring, it is possible to detect for the drifting sensors

2013 IEEE International Conference on Distributed Computing in Sensor Systems

978-0-7695-5041-1/13 $26.00 © 2013 IEEE

DOI 10.1109/DCOSS.2013.52

183

Page 2: [IEEE 2013 IEEE International Conference on Distributed Computing in Sensor Systems (DCOSS) - Cambridge, MA, USA (2013.05.20-2013.05.23)] 2013 IEEE International Conference on Distributed

and correct them for better accuracy and to increase the WSNoperating life cycle. We have used Kriging based prediction[7] techniques to predict the ground truth value at a particularsensor location using the sensor readings from neighboringsensors. A Kalman filter is then used to filter the drift correctedsensor value to obtain predicted value.

Rest of the paper is organized as follows. Section IIprovides a brief literature survey and describes the related workbeing done in this field. In section III, we describes the prob-lem statement in detail. In section IV and V we describe theKriging interpolation method for sensor drift estimation andKalman filter based drift correction respectively. Complexityanalysis for the proposed algorithm is given in section VIbefore results and conclusion in section VII and VIII.

II. RELATED WORK

Sensor drift problem have been studied in the area ofartificial olfaction (e-nose) using prediction-error models [8]and system identification theory [9], however these methodsare sensor and process dependent and can not be generalized.Hines et. al. [10] proposes use of signal processing techniquelike baseline technique, but it is not capable of handlingrandom drift effect with noise. Other works include the useof multivariate statistical methods [11], self organizing maps[12], Independent Component Analysis (ICA) [13], nonlinearstate-space perturbation model [14] and Papoulis–GerchbergMethod [15].

Bias and drift correction problem is also studied extensivelyfor multi radar tracking problem, where images from differentradars (pointing at different angles) are combined together toobtain exact location of the object of interest and also the biasof the sensors. In radar target tracking literature, this problemis known as “Registration problem” [16].

A general approach for the problem of sensor drift de-tection and correction is to apply a known stimulus to thesensor, measure the sensor value and then derive suitablecorrection. Another way for drift detection is to use a pre-checked sensor to find the correct value and then find outthe correction term. But these methods are time consumingand require human intervention at each stage and can not beemployed for large sensor network required for the applicationof smart city. Balzano and Nowak [17] assumed the driftproduced in the sensors to be linear with certain gain andoffset, and then corrected the drift using subspace matchingfor offset and gain. Though this method reduced the needof human intervention for determining drift from time totime, it can be used only in controlled environment wheredrift is indeed linear, not for robust WSNs. Another blindcalibration method have been proposed for densely deployedWSNs observing same phenomenon [18]. They assumed thesignals to be highly correlated in spatial domain, and based onthe data, derived a function relating the bias to the amplitudeof the sensor reading. Source model based approach wasused in [19] to calibrate light sensors using physical andgeometrical constraints of light source, without the need tomeasure ground truth value every time. Kalman Filter was usedin [20] to estimate the true value of moisture sensor using theraw readings. Distributed Iterative Kriging Algorithm (DIKA)was used in [21] for spatial interpolation for distributed

WSNs whereas Spatio-temporal kriging was used for soil watercontent prediction [22].

Drift aware WSN was introduced by Maen et. al. [23]. In[5], Kalman Filter and Interacting Multiple Model algorithm(IMM) were used to detect and track smooth and unsmoothdrifts respectively in a dense sensor network, for which nearbysensors are assumed to measure same readings and average ofthe neighboring sensors’ reading was used as an estimate of theground truth. In [24], the system was modified to incorporatesparsely spaced sensor network and Support Vector Regression(SVR) algorithm was first trained on the network for spatialand temporal correlation and was later used to predict theground truth values for measuring sensor drift. This systemneeds prior training for efficient working and if the sensorsstart drifting during the training period, can produce erroneousresults.

In this paper we have tackled the problem of automatic driftcorrection using kriging based interpolation for sensor valueprediction, which take into effect the relative positions of thesensors and provides a better estimate of the value of a physicalvariable at a location based on the neighboring sensor values.Predicted sensor value is then used to estimate the sensordrift by subtracting it from actual sensor reading and thisdrift estimate is then kalman filtered [25] to obtain predicteddrift value. This drift value is remembered in the sensor nodeand taken into effect while transmitting the corrected sensorreading. the results of kriging based methods are comparedwith previously proposed averaging based method, and theyshow considerable improvement in the system performance.

III. PROBLEM DESCRIPTION

Consider a network of wireless sensors placed randomlyin an operational environment as shown in Figure 1. Eachsensor measures variables like temperature, humidity and lightintensity. Since these physical variables do not vary too muchfrom node to node or with time, we consider the sensormeasurement to be a slowly varying function of space andtime.

0 5 10 15 20 25 30 35 40 450

5

10

15

20

25

30

35

Length

Wid

th

Fig. 1: Location of the sensors for an example WSN

Consider for an application of humidity monitoring ina locality for the smart-city project, Humidity sensors aredeployed at different locations within the locality. Since thelocality is quite large, we need lots of sensors, hence can notafford to use expensive high precision sensors, instead we usecheap low precision sensors. As the WSN is operational, some

184

Page 3: [IEEE 2013 IEEE International Conference on Distributed Computing in Sensor Systems (DCOSS) - Cambridge, MA, USA (2013.05.20-2013.05.23)] 2013 IEEE International Conference on Distributed

nodes tend to drift from its original value and start transmittingerroneous values and since the network is distributed over alarge area, it is practically impossible to manually check forthe drifting sensors and correct them, which leaves the WSNuseless after some point of time.

What we need for a application like this is a slightly lessaccurate but more reliable network. hence we need a networkconsisting of cheap sensor nodes, which is capable of detectingthe drifting nodes on its own and correct them appropriatelyand transmit the corrected value, within the acceptable errorrange. This could dramatically increase the network lifetimewithout having much financial burden.

The sensor drift that we have considered in this work issmooth bidirectional drift, which changes slowly and can varyboth in positive or negative direction. In addition to drift wehave also considered bias in the senor reading which can bepositive and negative. The main difference between drift andbias is that bias is present in the sensor reading from thebeginning, when it is installed and remain constant throughoutits operation, whereas a sensor can generate drift at any pointof time and it keeps on changing with time. Figure 2 showsthe examples of drift and bias that we have considered in thisexperiment.

0 50 100 150 200 250−30

−25

−20

−15

−10

−5

0

5

10

15

Time (Hours)

Drif

t−B

ias

Fig. 2: Example of Smooth drift and Bias

Consider a sensor network as shown in Figure 1. Let usassume that we have installed Humidity sensors in all theselocations. Though the analysis we are doing is for humiditysensor, it can be generalized to any sensor network sufferingfrom drift and bias. Let H be the ground truth value ofhumidity, which would vary with location and time. Let thevalue of ground truth humidity value at ith sensor at time kbe Hi,k. At each instant k, the node i in the sensor networkmeasures the reading ri,k for the true humidity value Hi,k.Each node keeps a track of the value of its drift at time instantk, di,k, and reports a drift corrected value xi,k to its neighbors.If all nodes are perfect and there is no drift or bias, ri,k , xi,k

and Hi,k should all be equal.

xi,k = ri,k − di,k (1)

In order to predict the value of drift generated in eachsensor node at a given point of time, di,k , each node find apredicted value xi,k for the humidity as a function of correctedvalue of humidity from the neighboring nodes.

xi,k = f(Neighboring data) (2)

The aim is to find the most suitable function in Equation2, so that we can get the most accurate estimate of thehumidity value at node i at time k and then correct the sensorreading, ri,k to get drift corrected value xi,k . Note that the driftgenerated during initial period of the deployment of sensorswould be negligible, but as the network ages, it would start todrift more and more.

Various methods such as averaging in densely deployednetwork or Support Vector Regression (SVR) algorithms havebeen used previously by Maen et. al. [5] [23] [26] [27][24] for finding the xi,k . In this paper we have proposed theuse of Kriging as an interpolation algorithm. Kriging belongsto the family of linear least squares estimation algorithms,used to interpolate the value of a random field. We have usedKriging algorithm for zero order polynomial regression modeland exponential correlation method for predicting xi,k fromxi,k of neighboring nodes. In the second stage, a Kalman filterhas been used to correct the calculated drift di,k recursively toarrive at a corrected measurement xi,k . The process is beingshown in block diagram form in Figure 3

�x1,k

...

�xj,k

...

�xn,k

j �= i

Kriging �xi,k Kalman Filter

�ri,k

�di,k

ri,k − di,k�xi,k

Fig. 3: Block Diagram for drift estimation and correction atnode i

Next we would describe the kriging method that we haveused for interpolation of humidity values to obtain drift esti-mation.

IV. SENSOR VALUE PREDICTION USING KRIGING

Kriging is a group of geostatistical techniques to interpolatethe value of a random field at an unobserved location fromobservations of its value at nearby locations. It belongs to thegroup of linear least square estimation algorithms. Given a setof n sensor nodes at the locations given by S = [s1, s2, ..., sn],and having the humidity value H = [h1, h2, ..., hn], a krigingestimator predicts the value of humidity, h∗ at some otherlocation s∗ as a linear combination of h1, h2, ..., hn.

h∗ = m∗ +

n∑k=1

λk[hk −mk] (3)

where m∗ and mk are average value (mean) of humidity at s∗and sk respectively and λk is the weight assigned to sensornode at sk. the linear weights λk are chosen such that thekriging variance given by Equation 5 is minimized.

185

Page 4: [IEEE 2013 IEEE International Conference on Distributed Computing in Sensor Systems (DCOSS) - Cambridge, MA, USA (2013.05.20-2013.05.23)] 2013 IEEE International Conference on Distributed

(σ∗)2 = V ar(h∗ − h) (4)

=

n∑i=1

n∑j=1

λiλjc(hi, hj) + V ar(h)

−2

n∑i=1

λic(hi, h) (5)

where h is the actual value of humidity at s∗ and c(hi, hj)is covariance function of hi and hj . The above calculation issubject to unbiased condition on measured humidity value.

E[h∗ − h] =

n∑i=1

λiμi − μ∗ = 0 (6)

where μi and μ∗ are mean of hi and h∗ respectively.

Depending on the properties of the variable under consid-eration, different type of kriging apply which determine thelinear constraints on the scaling factors λi under the unbiasedcondition. The humidity at unknown location, h is decomposedin two components, residual, R(h) and trend, m(h). Theresidual component, R(h) is treated as a random variable withzero mean and stationary covariance. The residual covariancefunction is usually derived from input semivariogram model[28]. A semivariogram is one of the significant functions toindicate spatial correlation in observations measured at samplelocations. It is commonly represented as a graph that showsthe difference in measure with distance between all pairs ofsampled locations. various types of popular semivariogrammodels are linear, spherical, exponential and Gaussian.

The Kriging method that we have used in this work is“Simple Kriging”, where we assume trend component to be aconstant and known mean m(h) = m. We aim to experimentwith the other forms of kriging in the future.

h∗ = m+n∑

k=1

λk[hk −m] (7)

Figure 4 shows an example of humidity prediction surfacegenerated using kriging from humidity measurement fromsome sensors placed at different locations (shown by dots) andthe RMS error for this predictor is shown in Figure 5. Thedata points are taken from Intel Research Berkeley Laboratorydeployment.

Next, we would describe the Kalman filter used to obtaincorrected drift values from the raw estimation made fromkriging.

V. DRIFT ESTIMATION USING KALMAN FILTERING

The Kalman filter addresses the general problem of tryingto estimate the state of a discrete-time controlled process x ∈Rn that is governed by the linear stochastic difference equation

xk = Axk−1 +Buk−1 + wk−1 (8)

with a measurement z ∈ Rm given by

zk = Hxk + vk (9)

010

2030

40

010

2030

30

32

34

36

38

40

LengthWidth

Hum

idity

31

32

33

34

35

36

37

38

39

Fig. 4: Kriging interpolation of humidity values

010

2030

40

010

2030

0

0.5

1

1.5

2

2.5

LengthWidthR

MS

Err

or

0.5

1

1.5

2

Fig. 5: RMS error for Kriging interpolation of humidity values

The random variables wk and vk represent the process andmeasurement noise respectively. They are assumed to beindependent, white, and with normal probability distributions.

wk ∼ N(0, Q) (10)

vk ∼ N(0, R) (11)

where Q and R are process and measurement noise covariancerespectively.

We define x−k ∈ Rn to be our a priori state estimate atstep k given knowledge of the process prior to step k, andxk ∈ Rn to be our a posteriori state estimate at step k givenmeasurement zk. We can then define a priori and a posterioriestimate errors as

e−k ≡ xk − x−k (12)

ek ≡ xk − xk (13)

The a priori estimate error covariance is then

P−k = E[e−k e−�

k ] (14)

and the a posteriori estimate error covariance is

Pk = E[eke�

k ] (15)

In deriving the equations for the Kalman filter, we begin withthe goal of finding an equation that computes an a posterioristate estimate xk as a linear combination of an a priori estimatex−k and a weighted difference between an actual measurementzk and a measurement prediction Hx−k .

xk = x−k +K(zk −Hx−k ) (16)

186

Page 5: [IEEE 2013 IEEE International Conference on Distributed Computing in Sensor Systems (DCOSS) - Cambridge, MA, USA (2013.05.20-2013.05.23)] 2013 IEEE International Conference on Distributed

The difference zk −Hx−k is called the measurement residual,which reflects the discrepancy between the predicted measure-ment Hx−k and the actual zk measurement. The matrix K ischosen to be the blending factor that minimizes the a posteriorierror covariance. One form of K that minimizes a posteriorierror covariance (Pk) is

Kk =P−k H�

HP−k H� +R(17)

The Kalman filter estimates a process by using a formof feedback control. The filter estimates the process state atsome time and then obtains feedback in the form of noisymeasurements. As such, the equations for the Kalman filterfall into two groups: time update equations and measurementupdate equations. The time update equations are responsiblefor projecting forward the current state and error covarianceestimates to obtain the a priori estimates for the next timestep. The measurement update equations are responsible forthe feedback, for incorporating a new measurement into thea priori estimate to obtain an improved a posteriori estimate.The time update equations can also be thought of as predictorequations, while the measurement update equations can bethought of as corrector equations. Indeed the final estimationalgorithm resembles that of a predictor-corrector algorithm forsolving numerical problems. This process is shown in Figure6

TimeUpdate(Predict)

�MeasurementUpdate(Correct)

Fig. 6: Kalman filter cycle (Time & Measurement update)

The specific time update equations are given by

x−k = Axk−1 +Buk−1 (18)

P−k = APk−1A� +Q (19)

and measurement update equations are given by

Kk =P−k H�

HP−k H� +R(20)

xk = x−k +Kk(zk −Hx−k ) (21)

Pk = (I −KkH)P−k (22)

In order to predict smooth drift, di,k at each sensor nodeat time instant k, measurement ri,k is done by sensor nodei. Since the sensor node is aware of its drift at previous timeinstant k−1, it makes an estimate of its drift at time instant k,

which is denoted by di,k . It is the estimate of the sensor driftfor node i at time instant k, based on the drift, di,k−1 of thesensor at time instant k−1. Based on this estimate of the drift,each node corrects its measured reading to obtain correctedreading, xi,k and send it to its neighbors. Each node collectsthe corrected reading of all its neighbors and predicts thevalue of the physical variable xi,k at its location using kriginginterpolation. Based on this value it modifies the estimate ofdrift at time instant k.

To estimate the value of drift for a node we have used themathematical model given by

di,k = di,k−1 + vi,k vi,k ∼ N(0, Qi,k) (23)

This model justifies our initial smooth drift hypothesis. Herevi,k is the Gaussian noise having Qi,k as the state covariancematrix (process noise). The measurements zi,k are taken to be

zi,k = ri,k − xi,k (24)

as there is a noise associated with the measurement at eachnode, we can write

ri,k = Hi,k + di,k + wi,k wi,k ∼ N(0, Ri,k) (25)

here Hi,k is ground truth value of humidity and wi,k is theGaussian noise having Ri,k as the state covariance matrix(measurement noise).

Equation 23 and Equation 25 form a kalman filter predictand measurement equations (Equation 8 & Equation 9) andit’s solution is given by

di,k = di,k−1 +Pi,k−1 +Qi,k

Pi,k−1 +Qi,k +Ri,k

(zi,k − di,k) (26)

Pi,k = (Pi,k−1 +Qi,k)(1−Pi,k−1 +Qi,k

Pi,k−1 +Qi,k +Ri,k

) (27)

VI. COMPLEXITY ANALYSIS

The proposed algorithm can be implemented in two ways,one in centralized fashion, where the central node would col-lect the data of all the nodes, perform the kriging interpolation,find out sensor drift and keep a record of it and modify thesensor reading to obtain actual humidity value. In this method,there would be no communication overhead for the nodes asthey would be just transmitting the measured reading to thecentral node. There would be some computational overhead forthe central node as it has to perform kriging interpolation andkalman filtering, but considering the environmental physicalvariables does not change rapidly and we do not require avery fast sampling rate (For these experiment we have takena sampling time period of 10 minutes), this will not effectthe performance of the system for real time applications. Forkriging interpolation, there are algorithms [29] which providecomplexity of O(N3) and kalman filtering can be performed inlinear time. Figure 7 shows the time taken to perform kriginginterpolation for humidity values as a function of number ofnodes taken for kriging interpolation using DACE toolkit [30]for MATLAB.

For de-centralized algorithm, where each node keeps atrack of its drift and correct it on it’s own, there would becommunication overhead of O(N2) as each node have to

187

Page 6: [IEEE 2013 IEEE International Conference on Distributed Computing in Sensor Systems (DCOSS) - Cambridge, MA, USA (2013.05.20-2013.05.23)] 2013 IEEE International Conference on Distributed

0 10 20 30 40 50 600.025

0.03

0.035

0.04

0.045

0.05

0.055

0.06

No. of nodes

Tim

e ta

ken

(Sec

.)

Fig. 7: Time complexity for Kriging interpolation

transmit it’s reading to other nodes and also there would becomputational overhead of O(N2) for kriging interpolationwhereas kalman filtering can be performed in constant time.

VII. RESULTS AND DISCUSSION

The experiments were carried out on the real sensor datagathered from a deployment of wireless sensors in the IntelResearch Berkeley Laboratory (IBRL) [31]. This data wascollected at Intel Berkeley Research lab between February28th and April 5th, 2004. The sensor network consists of54 sensor nodes (Figure 8) which collected timestampedtopology information, along with humidity, temperature, lightand voltage values once every 31 seconds.

Fig. 8: Sensor nodes in the IBRL deployment. Nodes areshown in black with their corresponding node-IDs.

We have considered the data of all the nodes except node5, 15 and 18, as the data corresponding to these nodes wastoo noisy. We took our analysis interval to be 10 minutes andtake average of all the data samples falling in a 10 minutewindow to obtain humidity, temperature, light and voltagereadings. The data was considered for 1500 such 10 minuteintervals (around 11 days). We have carried out experimentsfor humidity value of all the parameters recorded.

Drift having process noise variance Q of 1 was added torandomly chosen sensors (refer Equation 23). Drift startingtime was also chosen randomly between 1 and 125 hours. Inaddition to drift, bias in the range of (-10,10) was also added torandom number of sensors. Gaussian noise of variance 0.1 wasalso added to measured humidity value of different sensors toaccount for measurement noise (R = 0.1). Note that for this

experiment, whose results are given below, we have introduceddrift and bias in randomly chosen (separately for drift and bias)30 sensor nodes each. Figure 9 shows an example of sensorreadings for drifting and biasing sensors.

The simulations were performed in MATLAB, and DACEtoolkit [30] was used for kriging interpolation. The krigingperformed was simple kriging with exponential correlationfunction. Based on prediction of humidity at a particular nodeusing kriging interpolation of the corrected humidity values ofall other nodes, sensor drift value is estimated for that nodeat that instant of time. Estimated drift value is then modifiedusing kalman filtering. Based on grid search we found that theparameters Qi,k and Ri,k of kalman filter (Refer Equation 26& 27), that work best are 1 and 0.0001 respectively for all iand k.

Figure 10 shows comparison of actual drift vs measureddrift after kalman filtering.

In order to compare our method with the averaging basedprediction method [5], [26], we have also carried outexperiments in which we have replaced the kriging part inabove procedure with the averaging of corrected values ofneighboring sensors to predict the value of humidity at aparticular node for drift estimation. Kriging based interpolationworks better than the averaging based interpolation as shownin Figure 11.

Figure 12 shows comparison of Root Mean Square (RMS)error of each node over entire duration of the experiment forkriging based method and averaging based method.

0 10 20 30 40 50 600

5

10

15

20

25

Sensor node

RM

S e

rror

Kriging based interpolationAveraging based interpolation

Fig. 12: RMS error for Kriging and averaging based interpo-lation

In order to check the robustness of the system, we runthe experiment for different number of nodes drifting andbiasing. Figure 13 shows the comparison of average RMSerror for all the nodes for kriging based interpolation methodand averaging based interpolation method for different numberof nodes biasing and drifting.

VIII. CONCLUSION

In this paper we have proposed a framework to auto-matically detect and correct the drift of sensors in a sensornetwork using kriging based interpolation and kalman filter.This framework is extremely crucial for smart city applicationsinvolving the use of a large number of inexpensive sensorsspread over a large area to monitor environmental variables.

188

Page 7: [IEEE 2013 IEEE International Conference on Distributed Computing in Sensor Systems (DCOSS) - Cambridge, MA, USA (2013.05.20-2013.05.23)] 2013 IEEE International Conference on Distributed

0 50 100 150 200 250−10

0

10

20

30

40

50

60

70

Time (Hours)

Hum

idity

Measured sensor dataActual humidity valueSensor drift

(a) Drifting sensor

0 50 100 150 200 2500

10

20

30

40

50

60

Time (Hours)

Hum

idity

Measured sensor dataActual humidity valueSensor bias

(b) Biasing sensor

0 50 100 150 200 250−30

−20

−10

0

10

20

30

40

50

Time (Hours)

Hum

idity

Measured sensor dataActual humidity valueSensor drift+bias

(c) Drifting & biasing sensor

0 50 100 150 200 250

0

10

20

30

40

50

Time (Hours)

Hum

idity

Measured sensor dataActual humidity valuezero drift

(d) Sensor without drift or bias

Fig. 9: Sensor reading compared to actual humidity values

0 50 100 150 200 250−30

−25

−20

−15

−10

−5

0

5

10

15

Time (Hours)

Drif

t

Actual driftMeasured drift

(a) Drifting sensor

0 50 100 150 200 250−30

−25

−20

−15

−10

−5

0

5

10

15

Time (Hours)

Drif

t

Actual driftMeasured drift

(b) Sensor having no drift

Fig. 10: Actual and measured sensor drift for kriging based interpolation

0 50 100 150 200 2500

20

40

60

80

100

Time (Hours)

Hum

idity

ActualMeasuredCorrectedAbsolute error

(a) Kriging based interpolation

0 50 100 150 200 2500

20

40

60

80

100

Time (Hours)

Hum

idity

ActualMeasuredPredictedAbsolute error

(b) Averaging based interpolation

Fig. 11: Actual, measured and corrected humidity values

189

Page 8: [IEEE 2013 IEEE International Conference on Distributed Computing in Sensor Systems (DCOSS) - Cambridge, MA, USA (2013.05.20-2013.05.23)] 2013 IEEE International Conference on Distributed

0 10 20 30 40 50

010203040500

5

10

15

20

25

No. of nodes driftingNo. of nodes biasing

Ave

rage

RM

S e

rror

KrigingAveraging

5

10

15

20

Fig. 13: Average RMS error for Kriging and averaging basedinterpolation for different number of nodes drifting and biasing

As the area of scope of these applications is huge, this methodprovides a clear advantage over averaging based interpolationschemes as the sensor nodes are not close enough to get anestimate of sensor value just by averaging. Also this methodis a advantage over SVR learning based methods as this doesnot involve any training phase and is robust. This method isable to estimate the drift as well as bias in the sensor readingand correct it with reasonable error and hence keep the sensornetwork usable for a long period of time.

IX. ACKNOWLEDGEMENT

We acknowledge the support from Australian ResearchCouncil (ARC) Research Network on Intelligent Sensors,Sensor Networks and Information Processing (ISSNIP), ARCLinkage project grant (LP120100529) and the ARC LinkageInfrastructure, Equipment and Facilities scheme (LIEF) grant(LF120100129).

REFERENCES[1] K. Ashton, “That ‘internet of things’ thing,” RFID Journal, 2009.[2] I. G. Smith, The Internet of Things 2012 - New Horizons. Halifax,

UK: IERC - Internet of Things European Research Cluster, 2012.[3] D. Estrin, L. Girod, G. Pottie, and M. Srivastava, “Instrumenting the

world with wireless sensor networks,” IEEE International Conferenceon Acoustics, Speech, and Signal Processing, vol. 4, pp. 2033 – 2036,2001.

[4] A. Ruzzelli, R. Tynan, M. O’Grady, and G. O’Hare, “Advances inwireless sensor networks,” Encyclopedia of Mobile Computing & Com-merce, (EMCC), vol. 1, 2006.

[5] M. Takruri, S. Challa, and R. Chakravorty, “Recursive bayesian ap-proaches for auto calibration in drift aware wireless sensor networks,”Journal of Networks, vol. 5, pp. 823–832, 2010.

[6] B. Krishnamachari and S. Iyengar, “Distributed bayesian algorithms forfault-tolerant event region detection in wireless sensor networks,” IEEETranaction of Computers, vol. 53, pp. 241–250, 2004.

[7] G. Matheron, “The theory of regionalized variables and its applications,”Statens Kogsforsnings Institute, Stockholm, Sweden, 1960.

[8] M. Holmberg, F. Winquist, I. Lundstrom, F. Davide, C. DiNatale, andA. D’Amico, “Drift counteraction for an electronic nose,” Sensors andActuators B: Chemical, vol. 35, p. 528–535, 1996.

[9] M. Holmberg, F. Davide, C. Di Natale, A. D’Amico, F. Winquist, andI. Lundstrom, “Drift counteraction in odor recognition applications:Lifelong calibration method,” Sensors and Actuators B: Chemical,vol. 42, p. 185–194, 1997.

[10] E. Hines, E. Llobet, and J. Gardner, “Electronic noses: A reviewof signal processing techniques,” Circuits, Devices and Systems, IEEProceedings, vol. 146, pp. 297 – 310, 1999.

[11] T. Artursson, T. Eklov, I. Lundstrom, P. Martensson, M. Sjostrom,and M. Holmberg, “Drift correction for gas sensors using multivariatemethods,” Journal of Chemometrics, vol. 14(5-6), pp. 711–723, 2000.

[12] M. Zuppa, C. Distante, P. Siciliano, and K. Persaud, “Drift counteractionwith multiple self-organising maps for an electronic nose,” Sensors andActuators, B: Chemical, vol. 98, pp. 305–317, 2004.

[13] C. Natalea, E. Martinellia, and A. D’Amico, “Counteraction of environ-mental disturbances of electronic nose data by independent componentanalysis,” Sensors and Actuators B: Chemical, vol. 82(2-3), pp. 158–165, 2002.

[14] T. Vincent and P. Khargonekar, “A class of nonlinear filtering problemsarising from drifting sensor gains,” IEEE Transactions on AutomaticControl, vol. 44(3), pp. 509–520, 1999.

[15] D. Huang and H. Leung, “Reconstruction of drifting sensor responsesbased on papoulis–gerchberg method,” IEEE Sensors Journal, vol. 9(5),pp. 595–604, 2009.

[16] N. Okello and G. Pulford, “Simultaneous registration and tracking formultiple radars with cluttered measurements,” IEEE Signal ProcessingWorkshop on Statistical Signal and Array Processing, pp. 60 – 63, 1996.

[17] L. Balzano and R. Nowak, “Blind calibration of sensor networks,”ACM/IEEE International conference on Information processing in sen-sor networks, pp. 79–88, 2007.

[18] V. Bychkovskiy, S. Megerian, D. Estrin, and M. Potkonjak, “A collabo-rative approach to in-place sensor calibration,” International Workshopon Information Processing in Sensor Networks (IPSN), pp. 301–316,2003.

[19] J. Feng, S. Megerian, and M. Potkonjak, “Model-based calibration forsensor networks,” Sensors, vol. 2, pp. 737–742, 2003.

[20] L. Balzano, “Addressing fault and calibration in wireless sensor net-works,” Master’s thesis, University of California, Los Angeles, Califor-nia, 2007.

[21] G. Hernandez-Penaloza and B. Beferull-Lozano, “Field estimation inwireless sensor networks using distributed kriging,” IEEE InternationalConference on Communications (ICC), pp. 724–729, 2012.

[22] J. Snepvangers, G. Heuvelink, and J. Huisman, “Soil water contentinterpolation using spatio-temporal kriging with external drift,” ScienceDirect, vol. 112, pp. 253–271, 2003.

[23] M. Takruri and S. Challa, “Drift aware wireless sensor networks,” IEEEInternational conference on information fusion, 2007.

[24] M. Takruri, S. Rajasegarar, S. Challa, C. Leckie, and M. Palaniswami,“Online drift correction in wireless sensor networks using spatio-temporal modeling,” International Conference on Information Fusion,pp. 1–8, 2008.

[25] G. Welch and G. Bishop, “An introduction to the kalman filter,”SIGGRAPH Course, 2001.

[26] M. Takruri, K. Aboura, and S. Challa, “Distributed recursive algorithmfor auto calibration in drift aware wireless sensor networks,” Innovationsand Advanced Techniques in Systems, Computing Sciences and SoftwareEngineering, p. 21–25, 2008.

[27] M. Takruri, S. Challa, and R. Chakravorty, “Auto calibration in driftaware wireless sensor networks using the interacting multiple modelalgorithm,” Mosharaka International Conference on Communications,Computers and Applications, 2008.

[28] G. Matheron, “Principles of geostatistics,” Economic Geology, vol. 58,p. 1246–1266, 1963.

[29] B. Srinivasan, R. Duraiswami, and R. Murtugudde, “Efficient krigingfor real-time spatio-temporal interpolation,” Conference on Probabilityand Statistics in the Atmospheric Sciences, pp. 228–235, 2010.

[30] H. Nielsen, S. Lophaven, and J. Søndergaard, “Dace - a matlab krigingtoolbox,” 2002.

[31] Intel lab data. [Online]. Available: http://db.csail.mit.edu/labdata/labdata.html

190