# Combining Kalman Filtering with ZigBee Protocol to Improve Localization in Wireless Sensor Network

Authors: Bouchra El Madani; Anne Paule Yao; Abdelouahid Lyhyaoui
Journal: ISRN Sensor Networks
 (2013)

---

## Abstract

We propose a low-cost and low-power-consumption localization scheme for ZigBee-based wireless sensor networks (WSNs). Our design is based on the link quality indicator (LQI)—a standard feature of the ZigBee protocol—for ranging and the ratiometric vector iteration (RVI)—a light-weight distributed algorithm—modified to work with LQI measurements. To improve performance and quality of this system, we propose three main ideas: a cooperative approach, a coefficient delta (δ) to regulate the speed of convergence of the algorithm, and finally the filtering process with the extended Kalman filter. The results of experiment simulations show acceptable localization performance and illustrate the accuracy of this method.


---

## Body

## 1. Introduction

Many advances in wireless communication technologies and electronic systems miniaturisation have contributed to the implementation of wireless sensor networks (WSNs). These networks have recently received a lot of attention due to a wide range of potential applications especially in the field of localization. In fact, localization is the process of estimating the location of each sensor node in wireless sensor network. Localization can be applied to various domains such as environmental monitoring, human and object tracking, and human interfacing. Thus, the wide variety of techniques of localization is characteristic of many applications and services offered. A specific service matches with a location system, that is to say a set of methods, algorithms, standards, and own strategies.The aim of this work is to provide a first characterization of a ZigBee-based wireless sensor network (WSN) for localization of people and objects in confined spaces. The main aspects for the success of this localization application are low cost, due to the potentially high number of nodes required for covering a huge surface; efficient energy management, in order to provide the system with a reasonable operation time; independence from additional hardware which can raise costs and reduce mobility and robustness of mobile devices.Several approaches based on the communication between sensors nodes have been proposed and developed over the years to achieve localization in WSNs [1–3]. Most of these techniques rely on wireless technologies, for example, WLAN, RFID, ZigBee, and UWB, and several signal metrics have been investigated like basic node to node distance, angle, or numbers of hops [4, 5]. There are many different parameters that have been used as indicator of distance between nodes, for example, angle of arrival (AOA) [6], time of arrival (TOA) [7], time difference of arrival (TDOA) [8], and received signal strength (RSS) [5, 9, 10]. Normally, the nodes used in a wireless sensor network have very little resources and need techniques that utilize small resources without the need for extra hardware. Therefore, signal-strength-based methods which generally employ measurements of received signal strength indicator (RSSI), provided by most wireless network devices, present a good solution.In virtue of that, our localization model is based on signal-strength-based methods which employ RSSI measurements, and these methods require neither additional material nor increments in energy consumption, size, or cost [4]. Furthermore, one of the several existing algorithms is the ratiometric vector iteration (RVI) [11]. This method takes into account the limitations of WSN nodes concerning computational capacity and energy use, achieving a good localization precision with low communication overhead. Therefore, RVI appears as a very convenient option for our localization system satisfying cost, energy, and hardware constraints of this problem. Moreover, instead of the usual RSSI used in this localization algorithm, we will use the link quality indicator (LQI) measurement, which is a standard feature of the ZigBee protocol, for distance estimation. There are few reports of LQI measurements being used for estimating distances in WSNs [12] which validate this choice.One maneuver tracking technique is the extended Kalman filter (EKF). The EKF is an adaptive estimation algorithm that estimates the target track as it trains a WSN on line to reduce the error between the a priori target motion model and the actual target dynamics. The weights of WSN are trained in a similar method to the state estimation/parameter estimation Kalman filter techniques [13].In this paper, we present the design of the localization scheme that meets our requirements and satisfies our conditions. We provide analysis to show the suitability of the RVI using LQI technique for WSN localization with cooperative approach and the addition of a new parameter delta (δ) to improve performance of the algorithm, and then we use the extended Kalman filter to correct the predicted position with measurement.The rest of the paper is organized as follows. In Sections2 and 3, we describe the different techniques and methods used. The results are discussed in Section 4. We summarize and conclude the work in Section 5.


## 2. Materials and Methods

### 2.1. ZigBee Wireless Sensor Network

The entire system consisted of a pervasive wireless sensor network based on the ZigBee protocol. It was composed of several miniaturized ZigBee boards, the Jennic JN5139 wireless microcontrollers [14]. Two different models are used: the Les JN5139-Z01-M00/M01 with integrated antenna for M00 or SMA connector for M01 and the high-power Les JN5139-Z01-M02 with a Titanis omnidirectional SMA antenna from Antenova. The JN5139 is a low-cost, low-power device (1.2 μA in sleep mode) with a 32-bit processor and a 2.4 GHz IEEE802.15.4/ZigBee compliant transceiver. The JN5139’s transceiver provides an LQI measure which is employed for distance estimation.Then, the ZigBee network has three types of devices, namely, the network coordinator (implemented with a JN5139-Z01-M02 device) connected through a UART interface to a PC in which data was registered and the localization algorithm was executed; the anchor nodes or routers (implemented with JN5139-Z01-M02 devices) which were placed in fixed and known locations; the mobile node (implemented with a JN5139-Z01-M00/01 device) which was worn by the user and the problem consists in determining its location.The anchors nodes are deployed such as the distance between them isD=35%Dmax, where  Dmax  is the communication range of the devices. This, in order to improve the communication robustness to obstacles, terrain irregularities and other disturbances. Thus, with a maximal communication range of 100 m for ZigBee sensor nodes [1, 14], the anchors are distributed with a separation D=35 m. Also, this configuration guarantees that the sensor node is always simultaneously within the range of at least three anchors. The throughput is estimated at 250 kb/s. And it is possible to deploy a high number of nodes, until 65000 nodes.


### 2.2.  Distance Estimation: LQI

The link quality indicator (LQI) is a parameter offered by the physical layer (PHY) of IEEE 802.15.4. The aim of the LQI is to represent the quality of a link, as perceived by the receiver of a frame at the moment of frame reception. Hence, the LQI is a good candidate for consideration as an input to routing metrics. In fact, the ZigBee standard even recommends its use [1].Moreover, many radio chips that implement proprietary radio technologies provide the received signal strength indicator (RSSI) which is the strength of a received radiofrequency (RF) signal and also provide a correlation value that is based on the first eight symbols of the incoming packet. Then, the LQI value may be obtained by combining the correlation and RSSI values and represented as an integer ranging from 0 to 255.In fact, many efforts have been devoted to the comparison of the LQI and the RSSI as parameters for link quality estimation under different conditions. And, as summarized in Table1, all these studies agree that the average LQI has a greater correlation with the link delivery ratio (LDR) or with the packet error rate (PER) than the RSSI [12]; that leads necessarily to a better approach of the distance between nodes. Consequently, we will use the LQI for link quality estimation.Table 1
Summary of experiment results reported in various papers.
Work
Correlation coefficient
Average LQI and LDR/PER
Average RSSI and LDR/PER
1
0.73
0.43
2
0.90
0.56
3
0.80
0.55To estimate distances in a WSN starting from LQI measurements, a suitable model was required. A simpler exponential model [11] was used and expressed as follows:
(1)rij=adijα+ni.
Equation (1) shows exponential model proposed by Lee et al. for estimating distances from LQI measurements.The LQI obtained between nodesi and j,  rij, was given by the received power at a reference distance a, a white Gaussian noise ni, the path loss exponent  α, and the distance between nodes i and j, dij. The exponential model is particularly adaptable because it is permitted to be free from dependence on a, whose calibration is a challenging task, by disregarding the noise and considering a relative distance ratio rij/rik  (j≠k). This simplifies the model calibration procedure.


### 2.3. Localization Algorithm

To satisfy the needs of energy of our localization system, the ratiometric vector iteration (RVI) was chosen as localization algorithm. This method takes into account the limitations of WSN nodes for computing capacity and use of energy, to arrive at good location accuracy with a reduced cost of communication. The algorithm is based on the estimates of distance ratios rather than absolute distances that are often difficult to calculate. By updating the estimation of location of the mobile node in an iterative way, the RVI precisely locates the target with the only participation of three sensors.Also, instead of the usual received signal strength indication (RSSI) as required by the algorithm, since no additional hardware was required for distance estimation, we use the link quality indication (LQI) that has a better approach to estimating the distance in WSNs and which is a standard feature of the ZigBee protocol. Thus, the RVI algorithm was implemented and modified to work with LQI measurements.The localization algorithm implemented, updated in an iterative way, the estimated distance of the mobile node according to the distance between each anchor and the sensor node mobile. From the perspective of refining its estimates, we used a cooperative approach. So, not only distances from anchors but also from neighboring sensors were used in the algorithm to adjust cooperatively their locations and give a more accurate result. The algorithm is given in Algorithm1.Algorithm 1:Localization algorithm RVI with LQI measurements and a co-operative approach.
Estimated location algorithm
// ForSensori, k  Anchors and pNodes
INPUT: link quality indicator Li, estimated distances gi, beacon locations Sk
OUTPUT: estimate of Xj
Initialization: X0=XWC=∑i=1kwiSi∑i=1kwi
Normalization:  gi,j=|SıX𝚥→|∑i=1k|SıX𝚥→|
while  ∥Xj+1-Xj∥<Cth and    V𝚥-1→·V𝚥→<0  do
for  all Anchork and Nodep  do
if  Nodep is visible to Sensori  then
Vj→={cΔj→|Δj→|sij>Ninitet|Δj→|<cwithΔj→=∑i=1k(gi-gi,j)SiXj→|SiXj→|Δj→sinon
end if
end for
Xj+1=Xj+V𝚥→
end whileThus at each iteration the entire move vectorVj  is added to the previous position.  This can drift away the position from the desired solution, filling the process in a local minimum, when the step of the move is too large. Otherwise, the solution is reached with a large number of iterations, when the move vector is too small; in such case, the process needs a great execution time and energy consumption.So, we have proposed the addition of a parameter delta (δ) which will regulate the proportion of the move vector to be added to the previous estimate. Indeed,  δ  controls the amount of move vector used by the sensor to update its position at each iteration following
(2)Xj+1=Xj+(δ·V𝚥→).
Equation (2) shows the update of move vector including δ.


### 2.4. Parameters Calibration

The system of localization used in this paper relies on methods which employ different parameters that we have to fix to the optimal values before executing the algorithm.The path loss exponentα  which has a key role in the relationship between LQI measurements and distance was calibrated following experimentations to find the minimal error when executing the localization algorithm. Then, the curve in Figure 1 shows a minimal error for α=0.30  and a=255.Figure 1
Localization error versus path loss exponentα.Theδ  parameter permits to control the amount of the move vector to the location estimation at each iteration. It corresponds to the speed of convergence of the algorithm. This important parameter may be expressed as a fixed value or more preferably as a decreasing function of the number of iterations. Thus, we get an average of the localization error and the execution delay over 10 executions for each value or function  δ. Figure 2 shows the obtained results for 6 different functions: δ1(i)=(1/(1+i))·δ0; δ2(i)=(1/(1+2i))·δ0; δ3(i)=(1/(1+4i))·δ0; δ4(i)=(1/(1+i2))·δ0; δ5(i)=(1/(1+i3))·δ0; δ6(i)=(1/(1+i4))·δ0, where δ0=0.9. The minimum error was obtained for the following function with i, the number of iterations: δ(i)=(1/(1+i4))·δ0.Localization error and execution delay versusδ  functions.
(a)
(b)Then, we execute our algorithm with the parameters displayed in Table2.Table 2
Design parameters of the localization algorithm.
Parameter
Value
a
255
α
0.3
β
2
C
th
1
e
-
06
δ
(
1
/
(
1
+
i
4
)
)
·
δ
0 with i = iterations number and δ0=0.9
N
init
50


### 2.5. Results

The performance of the proposed localization method was evaluated using a network composed of 9 anchors nodes to properly cover a surface of 140 m × 140 m. The algorithm was implemented in Matlab. We used our system for the localization of, respectively, 10, 20, and 30 different sensor nodes. Figure3 shows the location to reach, the estimated position and the localization error of each of the cases considered in the experiment.Figure 3
Experimental results of the LQI-based localization using our modified RVI algorithm.From Figure3, it can be observed that the algorithm does not reach a very good approximation in the cases which are generally far away from the anchors nodes. After several experimentations, we could round up the precision of the algorithm at an average of 5.75 m with a standard deviation of 1 m.The parameterδ  permits to modify the convergence rate; when it is small, the convergence takes more time. In our experiences, we used a variable  δ  depending of the number of iteration; that leads to a minimal execution time of the algorithm with a good precision. Stop conditions of the algorithm fixed by the parameter Cth and the direction change of the estimations vectors (V𝚥-1→·V𝚥→<0) give an idea about the accuracy of this method, which is pretty good for the localization system. More iteration should lead to a better precision but require more connections and consequently more energy consumption.Results showed that the localization accuracy had a great variability and was lower than expected. Nonetheless, in an average of 66%, the error was below the 5 m, and the convergence of the algorithm took a reduced time of execution (less than 9 s).


## 2.1. ZigBee Wireless Sensor Network

The entire system consisted of a pervasive wireless sensor network based on the ZigBee protocol. It was composed of several miniaturized ZigBee boards, the Jennic JN5139 wireless microcontrollers [14]. Two different models are used: the Les JN5139-Z01-M00/M01 with integrated antenna for M00 or SMA connector for M01 and the high-power Les JN5139-Z01-M02 with a Titanis omnidirectional SMA antenna from Antenova. The JN5139 is a low-cost, low-power device (1.2 μA in sleep mode) with a 32-bit processor and a 2.4 GHz IEEE802.15.4/ZigBee compliant transceiver. The JN5139’s transceiver provides an LQI measure which is employed for distance estimation.Then, the ZigBee network has three types of devices, namely, the network coordinator (implemented with a JN5139-Z01-M02 device) connected through a UART interface to a PC in which data was registered and the localization algorithm was executed; the anchor nodes or routers (implemented with JN5139-Z01-M02 devices) which were placed in fixed and known locations; the mobile node (implemented with a JN5139-Z01-M00/01 device) which was worn by the user and the problem consists in determining its location.The anchors nodes are deployed such as the distance between them isD=35%Dmax, where  Dmax  is the communication range of the devices. This, in order to improve the communication robustness to obstacles, terrain irregularities and other disturbances. Thus, with a maximal communication range of 100 m for ZigBee sensor nodes [1, 14], the anchors are distributed with a separation D=35 m. Also, this configuration guarantees that the sensor node is always simultaneously within the range of at least three anchors. The throughput is estimated at 250 kb/s. And it is possible to deploy a high number of nodes, until 65000 nodes.


## 2.2.  Distance Estimation: LQI

The link quality indicator (LQI) is a parameter offered by the physical layer (PHY) of IEEE 802.15.4. The aim of the LQI is to represent the quality of a link, as perceived by the receiver of a frame at the moment of frame reception. Hence, the LQI is a good candidate for consideration as an input to routing metrics. In fact, the ZigBee standard even recommends its use [1].Moreover, many radio chips that implement proprietary radio technologies provide the received signal strength indicator (RSSI) which is the strength of a received radiofrequency (RF) signal and also provide a correlation value that is based on the first eight symbols of the incoming packet. Then, the LQI value may be obtained by combining the correlation and RSSI values and represented as an integer ranging from 0 to 255.In fact, many efforts have been devoted to the comparison of the LQI and the RSSI as parameters for link quality estimation under different conditions. And, as summarized in Table1, all these studies agree that the average LQI has a greater correlation with the link delivery ratio (LDR) or with the packet error rate (PER) than the RSSI [12]; that leads necessarily to a better approach of the distance between nodes. Consequently, we will use the LQI for link quality estimation.Table 1
Summary of experiment results reported in various papers.
Work
Correlation coefficient
Average LQI and LDR/PER
Average RSSI and LDR/PER
1
0.73
0.43
2
0.90
0.56
3
0.80
0.55To estimate distances in a WSN starting from LQI measurements, a suitable model was required. A simpler exponential model [11] was used and expressed as follows:
(1)rij=adijα+ni.
Equation (1) shows exponential model proposed by Lee et al. for estimating distances from LQI measurements.The LQI obtained between nodesi and j,  rij, was given by the received power at a reference distance a, a white Gaussian noise ni, the path loss exponent  α, and the distance between nodes i and j, dij. The exponential model is particularly adaptable because it is permitted to be free from dependence on a, whose calibration is a challenging task, by disregarding the noise and considering a relative distance ratio rij/rik  (j≠k). This simplifies the model calibration procedure.


## 2.3. Localization Algorithm

To satisfy the needs of energy of our localization system, the ratiometric vector iteration (RVI) was chosen as localization algorithm. This method takes into account the limitations of WSN nodes for computing capacity and use of energy, to arrive at good location accuracy with a reduced cost of communication. The algorithm is based on the estimates of distance ratios rather than absolute distances that are often difficult to calculate. By updating the estimation of location of the mobile node in an iterative way, the RVI precisely locates the target with the only participation of three sensors.Also, instead of the usual received signal strength indication (RSSI) as required by the algorithm, since no additional hardware was required for distance estimation, we use the link quality indication (LQI) that has a better approach to estimating the distance in WSNs and which is a standard feature of the ZigBee protocol. Thus, the RVI algorithm was implemented and modified to work with LQI measurements.The localization algorithm implemented, updated in an iterative way, the estimated distance of the mobile node according to the distance between each anchor and the sensor node mobile. From the perspective of refining its estimates, we used a cooperative approach. So, not only distances from anchors but also from neighboring sensors were used in the algorithm to adjust cooperatively their locations and give a more accurate result. The algorithm is given in Algorithm1.Algorithm 1:Localization algorithm RVI with LQI measurements and a co-operative approach.
Estimated location algorithm
// ForSensori, k  Anchors and pNodes
INPUT: link quality indicator Li, estimated distances gi, beacon locations Sk
OUTPUT: estimate of Xj
Initialization: X0=XWC=∑i=1kwiSi∑i=1kwi
Normalization:  gi,j=|SıX𝚥→|∑i=1k|SıX𝚥→|
while  ∥Xj+1-Xj∥<Cth and    V𝚥-1→·V𝚥→<0  do
for  all Anchork and Nodep  do
if  Nodep is visible to Sensori  then
Vj→={cΔj→|Δj→|sij>Ninitet|Δj→|<cwithΔj→=∑i=1k(gi-gi,j)SiXj→|SiXj→|Δj→sinon
end if
end for
Xj+1=Xj+V𝚥→
end whileThus at each iteration the entire move vectorVj  is added to the previous position.  This can drift away the position from the desired solution, filling the process in a local minimum, when the step of the move is too large. Otherwise, the solution is reached with a large number of iterations, when the move vector is too small; in such case, the process needs a great execution time and energy consumption.So, we have proposed the addition of a parameter delta (δ) which will regulate the proportion of the move vector to be added to the previous estimate. Indeed,  δ  controls the amount of move vector used by the sensor to update its position at each iteration following
(2)Xj+1=Xj+(δ·V𝚥→).
Equation (2) shows the update of move vector including δ.


## 2.4. Parameters Calibration

The system of localization used in this paper relies on methods which employ different parameters that we have to fix to the optimal values before executing the algorithm.The path loss exponentα  which has a key role in the relationship between LQI measurements and distance was calibrated following experimentations to find the minimal error when executing the localization algorithm. Then, the curve in Figure 1 shows a minimal error for α=0.30  and a=255.Figure 1
Localization error versus path loss exponentα.Theδ  parameter permits to control the amount of the move vector to the location estimation at each iteration. It corresponds to the speed of convergence of the algorithm. This important parameter may be expressed as a fixed value or more preferably as a decreasing function of the number of iterations. Thus, we get an average of the localization error and the execution delay over 10 executions for each value or function  δ. Figure 2 shows the obtained results for 6 different functions: δ1(i)=(1/(1+i))·δ0; δ2(i)=(1/(1+2i))·δ0; δ3(i)=(1/(1+4i))·δ0; δ4(i)=(1/(1+i2))·δ0; δ5(i)=(1/(1+i3))·δ0; δ6(i)=(1/(1+i4))·δ0, where δ0=0.9. The minimum error was obtained for the following function with i, the number of iterations: δ(i)=(1/(1+i4))·δ0.Localization error and execution delay versusδ  functions.
(a)
(b)Then, we execute our algorithm with the parameters displayed in Table2.Table 2
Design parameters of the localization algorithm.
Parameter
Value
a
255
α
0.3
β
2
C
th
1
e
-
06
δ
(
1
/
(
1
+
i
4
)
)
·
δ
0 with i = iterations number and δ0=0.9
N
init
50


## 2.5. Results

The performance of the proposed localization method was evaluated using a network composed of 9 anchors nodes to properly cover a surface of 140 m × 140 m. The algorithm was implemented in Matlab. We used our system for the localization of, respectively, 10, 20, and 30 different sensor nodes. Figure3 shows the location to reach, the estimated position and the localization error of each of the cases considered in the experiment.Figure 3
Experimental results of the LQI-based localization using our modified RVI algorithm.From Figure3, it can be observed that the algorithm does not reach a very good approximation in the cases which are generally far away from the anchors nodes. After several experimentations, we could round up the precision of the algorithm at an average of 5.75 m with a standard deviation of 1 m.The parameterδ  permits to modify the convergence rate; when it is small, the convergence takes more time. In our experiences, we used a variable  δ  depending of the number of iteration; that leads to a minimal execution time of the algorithm with a good precision. Stop conditions of the algorithm fixed by the parameter Cth and the direction change of the estimations vectors (V𝚥-1→·V𝚥→<0) give an idea about the accuracy of this method, which is pretty good for the localization system. More iteration should lead to a better precision but require more connections and consequently more energy consumption.Results showed that the localization accuracy had a great variability and was lower than expected. Nonetheless, in an average of 66%, the error was below the 5 m, and the convergence of the algorithm took a reduced time of execution (less than 9 s).


## 3. Extended Kalman Filter

The Kalman filter is an iterative state estimator, and it is widely used to locate an object with noisy measurement. The basic cycle of recursive Kalman filter is depicted in Figure4. However, the formalization of the filter states will dictate its computational and memory efficiency. A formalization of the Kalman filter with excessive states will potentially overburden a sensor system and result in a performance decrease. A trade-off must be made to balance the timely computation of the position and the accuracy which is necessary for the application [15].Figure 4
Cycle recursive Kalman filter.In many cases, interesting dynamic systems are not linear by nature; so, the traditional Kalman filter cannot be applied in estimating the state of such a system. In these kinds of systems, both the dynamic and the measurement processes can be nonlinear or only one of them. In this section, we describe the extended Kalman filter (EKF) [16].The basic filter is well established, if the state transition and the observation models are linear distributions. In this case, if the process to be estimated and/or the measurement relationship to the process are specified by a nonlinear stochastic difference equation, the extended Kalman filter (EKF) can be applied. This filtering is based on linearizing a nonlinear system model around the previous estimate using partial derivatives of the process and measurement function.In the monitoring process, the Kalman filter looks for an object when it moves; that is, it takes the information about the state of the object to time. Then, it uses this information to predict where the object is located in the next frame. The position of the object is then corrected considering the prediction and observation as well [17].


### 3.1. Equation of Extended Kalman Filter

There are different parameters that the EKF can use in modeling the trajectory of a moving target. It is possible to model the motion of a target using just the state of thex and y positions to obtain the position model of the Kalman filter.The extended Kalman filter is suitable to determine thex and y positions of the mobile target with the measured distances to the anchors. Using the trilateration method, the anchor distances  di  with i∈{1,2…,9} are calculated as follows:
(3)di=(x-xi)2+(y-yi)2,
where  (xi,yi)  is the coordination of beacon i.Recall the following equations of the extended Kalman filter:(4)Xk+1=f(Xk,Uk)+ε,Yk=h(Xk)+εobs,(5)Xk*=f(Xk,Uk),(6)Pk*=A·P^k-1·AT+Q,(7)Yk*=h(Xk*),(8)K=Pk*·HT·(H·Pk*·HT+R)-1:Kalmangain(9)X^k=Xk*+K(Yk-Yk*),P^k=Pk*-K·H·Pk*,
where  A  and H are Jacobian matrices with the partial derivatives
(10)Ai,j=∂fi∂xj,Hi,j=∂hi∂xj.
The state vector Xk contains the target position to be estimated as follows:
(11)Xk=(x,y)T.
The optional input control vector Uk is set to zero. The observation vector Yk represents the observations at the given system and defines the entry parameters of the filter, in this case, the results of the range measurements. The process function f relates the state at the previous time step k to the state at the next step  k+1. The measurement function h acts as a connector between Xk and Yk.Referring to the state estimation, the process is characterized by the stochastic random variablesε and εobs representing the process and measurement noise. They are assumed to be independent, white, and normal probably distributed with given covariance matrices Q and  R.The state transition matrixA arises from the respective equations, and the matrix becomes
(12)A=(1001).
The related Jacobian matrix H describes the partial derivatives of h with respect to Xk as follows:
(13)Hk=(∂d1∂x∂d1∂y∂d2∂x∂d2∂y⋮⋮∂d9∂x∂d9∂y)with{∂di∂x=x-xi(x-xi)2+(y-yi)2,∂di∂y=y-yi(x-xi)2+(y-yi)2.
Given that h contains nonlinear difference equations, the parameter  (d1,d2,…,d9)  as well as the matrix H must be calculated newly for each estimation.


### 3.2. Result

We implemented EKF after the estimation of RVI algorithm using the position of targets and their estimates as parameters of extended Kalman filter that overcomes the linearization of the model prediction and measurements.We present in Figures5, 6, and 7 the results of position estimation obtained by our RVI solution and adjusted by the EKF algorithm, for different numbers of sensor nodes. With respect to the number of sensor nodes, we can observe a slight growth in error when this latter increases. In addition it is clear that the use of EKF algorithm contributes favourably in the improvement of the position estimation.Figure 5
Experimental results of the RVI localization and the EKF for 10 different sensor nodes.Figure 6
Experimental results of the RVI localization and the EKF for 20 different sensor nodes.Figure 7
Experimental results of the RVI localization and the EKF for 30 different sensor nodes.Our experiments conclude that the extended Kalman filter model is robust and is capable of handling large erroneous data.


## 3.1. Equation of Extended Kalman Filter

There are different parameters that the EKF can use in modeling the trajectory of a moving target. It is possible to model the motion of a target using just the state of thex and y positions to obtain the position model of the Kalman filter.The extended Kalman filter is suitable to determine thex and y positions of the mobile target with the measured distances to the anchors. Using the trilateration method, the anchor distances  di  with i∈{1,2…,9} are calculated as follows:
(3)di=(x-xi)2+(y-yi)2,
where  (xi,yi)  is the coordination of beacon i.Recall the following equations of the extended Kalman filter:(4)Xk+1=f(Xk,Uk)+ε,Yk=h(Xk)+εobs,(5)Xk*=f(Xk,Uk),(6)Pk*=A·P^k-1·AT+Q,(7)Yk*=h(Xk*),(8)K=Pk*·HT·(H·Pk*·HT+R)-1:Kalmangain(9)X^k=Xk*+K(Yk-Yk*),P^k=Pk*-K·H·Pk*,
where  A  and H are Jacobian matrices with the partial derivatives
(10)Ai,j=∂fi∂xj,Hi,j=∂hi∂xj.
The state vector Xk contains the target position to be estimated as follows:
(11)Xk=(x,y)T.
The optional input control vector Uk is set to zero. The observation vector Yk represents the observations at the given system and defines the entry parameters of the filter, in this case, the results of the range measurements. The process function f relates the state at the previous time step k to the state at the next step  k+1. The measurement function h acts as a connector between Xk and Yk.Referring to the state estimation, the process is characterized by the stochastic random variablesε and εobs representing the process and measurement noise. They are assumed to be independent, white, and normal probably distributed with given covariance matrices Q and  R.The state transition matrixA arises from the respective equations, and the matrix becomes
(12)A=(1001).
The related Jacobian matrix H describes the partial derivatives of h with respect to Xk as follows:
(13)Hk=(∂d1∂x∂d1∂y∂d2∂x∂d2∂y⋮⋮∂d9∂x∂d9∂y)with{∂di∂x=x-xi(x-xi)2+(y-yi)2,∂di∂y=y-yi(x-xi)2+(y-yi)2.
Given that h contains nonlinear difference equations, the parameter  (d1,d2,…,d9)  as well as the matrix H must be calculated newly for each estimation.


## 3.2. Result

We implemented EKF after the estimation of RVI algorithm using the position of targets and their estimates as parameters of extended Kalman filter that overcomes the linearization of the model prediction and measurements.We present in Figures5, 6, and 7 the results of position estimation obtained by our RVI solution and adjusted by the EKF algorithm, for different numbers of sensor nodes. With respect to the number of sensor nodes, we can observe a slight growth in error when this latter increases. In addition it is clear that the use of EKF algorithm contributes favourably in the improvement of the position estimation.Figure 5
Experimental results of the RVI localization and the EKF for 10 different sensor nodes.Figure 6
Experimental results of the RVI localization and the EKF for 20 different sensor nodes.Figure 7
Experimental results of the RVI localization and the EKF for 30 different sensor nodes.Our experiments conclude that the extended Kalman filter model is robust and is capable of handling large erroneous data.


## 4. Results and Discussion

To further show the performance advantages of our proposed method, we compare the accuracy performance of our proposed solution to other solutions that can be deployed to perform localization in the same environment without additional specialized localization hardware. For this comparison, we mainly select four different methods, namely: the original version of the RVI algorithm using RSSI measures, RVI-RSSI, the RVI using LQI, RVI-LQI, the modified RVI-LQI with parameterδ, RVI-LQI-δ, and finally, the RVI-LQI-δ  with EKF, RVI-δ-EKF, respectively. Table 3 presents the localization errors of these methods in addition to those of our methods. The different errors of localization are clear, but the smallest error is obtained for our solution of RVI-δ-EKF.Table 3
Comparison of different methods of localization—error of localization.
Methods
RVI-RSSI
RVI-LQI
RVI-LQI-δ
RVI-δ-EKF
Localization error [m]
28.13
16.92
5.72
0.66


## 5. Conclusions and Future Work

We proposed a very simple method to improve the accuracy of the localization algorithm. With the cooperative approach, the contribution of neighboring sensor nodes in the localization algorithm permits to refine the estimated location. And the addition of a parameterδ, which depends on the number of iterations, allows a better management of iterative updates in the algorithm and then the filtering with extended Kalman filter. Furthermore, the localization system was performed taking key aspects into accounts such as cost, energy consumption, and independence from additional hardware. Then, we obtained a complete localization system with improvements in accuracy, execution time, and cost. However, in a future implementation of this technology, the localization precision and the overall robustness of the system against environmental fluctuation should be improved. We believe that this can be achieved by increasing the reliability of the LQI measures used as input of the localization algorithm by implementing a more adequate method for filtering and prediction of this indicator in noisy and time-varying environments given by changes in air humidity, dew, and temperature.



---

*Source: 252056-2013-03-21.xml*