Practical issues in Wireless Sensor Network localization ... - IEEE Xplore

2 downloads 0 Views 712KB Size Report
[email protected], [email protected].br, ivan.muller@ufrgs.br, [email protected].br. Edison Pignaton de Freitas. IDE – Halmstad University, Sweden.
Practical Issues in Wireless Sensor Network Localization Systems using Received Signal Strength Indication Paulo Motter, Rodrigo S. Allgayer, Ivan Müller, Carlos Eduardo Pereira Department of Electrical Engineering Federal University of Rio Grande do Sul Porto Alegre, Brazil [email protected], [email protected], [email protected], [email protected]

Abstract—The emergence of Wireless Sensor Networks brought many benefits in different application domains such as collaborative tasks, lower costs, equipment’s autonomy and higher tolerance to failures. These advantages made the number of applications that use this kind of network grow in the past few years. Meanwhile, the possibility of employing these systems to trace the movement of an object, which can be part of the network itself, is of great utility. The present work aims at the study and development of a localization system of mobile nodes for Wireless Sensor Networks. Different methods to obtain the distances between network nodes are studied and received signal strength algorithms are developed to synthesize the data and to show the location of the nodes. Finally, simulations and experiments are presented in order to analyze the viability of the developed proposal. Keywords - Wireless Sensor Networks; Localization; Received Signal Strength Indication; Trilateration.

I.

INTRODUCTION

Advances in microelectronics especially in wireless communication and sensor technologies contributed to the development of the Wireless Sensor Network (WSN) area, by enhancing the capabilities of the sensor nodes used in these systems. WSNs provide the cooperation of sensor nodes spread on a given area of interest to gather data about certain phenomena on it. This feature allows their employment in applications such as environment monitoring, object tracking and surveillance [1]. WSN nodes are usually deployed in harsh environments, where it is difficult to have physical access to them after their deployment. This fact hinders the possibility to replace their energy resources when they are depleted, so an efficient usage of such resources is a great concern in the WSN research field. Another common feature of sensor nodes is their low cost, as they are generally composed by resource constrained hardware. Due to this, they can be massively used providing additional features, such as redundancy which can be explored for fault tolerance and accuracy enhancement [1].

978-1-4244-8064-7/11/$26.00 ©2011 IEEE

Edison Pignaton de Freitas IDE – Halmstad University, Sweden Institute of Informatics Federal University of Rio Grande do Sul Porto Alegre, Brazil [email protected]

There are a number of possible applications using WSN. Being employed in harsh and hostile environments, interacting with other sensor systems, or even cooperating with actuators in an industrial or home automation system, the flexibility in the usage of WSN is an important feature that allows a wide range of applications. Some examples of these applications are military surveillance and borderline control, smart homes and control of herds created in open areas. Besides this, location and tracking systems can be employed as an additional feature of WSN [2]. The use of radio frequency (RF) based WSN as locating systems has a number of advantages in relation to other methods. The Global Positioning System (GPS) [3] has the drawback that it is does not work indoors, while WSN does. Moreover, GPS-based systems consume more energy than WSN-based ones. The use of GPS assumes that all entities in the system are controlled, or at least friendly to the system, which is not true for instance in military and security applications. Other possible employable methods could be mentioned, such as the use of ultrasound and infrared measurements. The main drawback of these methods is the need of line of sight between the sensor nodes considering that it is not possible to guarantee such condition in many environments where WSNs are deployed. These methods demanding line of sight among the nodes are also less energy efficient if compared to RF based triangulation systems. Another advantage of the use of RF to provide information for a locating system lies in the fact that the RF signal is already used for communication, avoiding the need of additional devices. The main goal of this paper is to present the results achieved in the development of a moving objects locating system using WSN fulfilling the following requirements: low cost of the final application, easy deployment and configuration and reasonable accuracy for the target tracking application. Aiming at the accomplishment of these requirements, the IEEE 802.15.4 communication standard [4] is chosen in this work, providing features such as low energy consumption, simple usage and satisfactory communication range. Simulations and

tests on a test bed are performed to evaluate the developed application, proving its usability and allowing the detection of possible enhancements to be developed. This paper is organized as follows: Section II presents related works in the area highlighting the main features that distinguish the proposal of this paper from them. Section III presents methods to measure distance and provide location in a WSN, while Section IV describes the adopted methodology proposed in this work. Simulation results are presented and analyzed in Section V, and the practical results obtained with real sensor devices are presented in Section VI. Finally, Section VII presents the conclusions and future work. II.



DISTANCE MEASUREMENT AND LOCALIZATION IN WSN

The location of a moving node in an environment is based in its distance related to other fixed points, whose locations are known. This distance can be obtained by different methods. The method called direction of arrival utilizes the electromagnetic wave reception angle information together with previously known fixed node coordinates. With these data the method allows the calculation of the mobile node location by triangulation. Its drawback is the need for directional antennas for each reception angle, increasing the hardware cost. The time of arrival and time difference of arrival methods are based on the propagation time between the transmitter and receiver. The first method takes into account the propagation time of one data packet only and the second the difference between two packets. With this data and the wave propagation speed, it is possible to calculate the distance between two nodes. It is also important that the network devices are synchronized in order to compare the propagation time in the

ଵ௠

ܶ௣௥௢௣ ൌ ൌ ൌ ͵Ǥ͵݊‫ݏ‬ ௖ ଷ‫כ‬ଵ଴ఴ ݀௖௟௞ ൌ

ଵȀ௖௟௞ ்೛ೝ೚೛



ସଵǤ଺଻௦Ȁ௖௟௞ ଷǤଷ௦Ȁ௠

ൌ ͳ͵Ǥͺͻ݉Ȁ݈ܿ݇

(1) (2)

According to (1), the radio frequency signal travels one meter in 3.3 ns approximately and this is called ܶ௣௥௢௣ Ǥ Considering a 24 MHz system clock or 41.67 ns/clock, by (2) each clock cycle of a radio signal travels 13.89 meters (݀௖௟௞ ). ܶ௦௘௡ௗ ൌ

RELATED WORKS

Recently many location methods have been developed using different approaches as to obtain the desired results. One of the firsts to be released was the RADAR project [5], which also used received signal strength indicator (RSSI) as the method to measure the distances. The employed communication protocol is the IEEE 802.11, which demands more energy from the network nodes and usually has shorter distance range. Other projects, as the one presented in [6], use the IEEE 802.15.4 and a calibration procedure, but their focus is to find the nearest reference nodes in order to have an approximation of the node location. These related works do not present detailed practical results as here presented. Moreover, they do not consider alternatives to reduce the error, such as the usage of more than 3 reference nodes. A location technique that uses comparisons between preestablished patterns of signal intensity is presented in [7]. This technique implements a complex calibration mechanism, which does not allow its easy reuse in different environments. The work presented here proposes an easy to perform calibration mechanism, which represents an enhanced feature compared to the one in [7]. III.

medium [8]. Concerning the IEEE 802.15.4 standard, the calculations lead to the following conclusions:

ଵ௕௜௧ ଶହ଴௞௕௜௧Ȁ௦

ൌ ͶɊ‫ݏ‬

(3)

The RF sending time (ܶ௦௘௡ௗ .) can be obtained by (3). In the IEEE 802.15.4 standard the data rate reaches 250 kbit/s and this means that one bit is sent each 4 µs, a much greater time when compared with the wave propagation time. These calculations show that the mentioned clock cycle is not suitable to be used in these methods. The RSSI takes into account the radio signal attenuation when it travels through the air. The received power level is used to calculate the link quality indicator (LQI) in monitoring applications. Besides, the LQI is directly related to the distance, decreasing its value when the distance between the transceiver and receiver increases. ܲோ ൌ ்ܲ ቀ

ఒబ ସగௗ





(4)

By the electromagnetic wave propagation studies in the free space, the received power at the receiver (ܲோ ሻis given by (4), considering n as the propagation constant that depends on the medium (typically between two and five), ்ܲ as the power of the signal sent by the transmitter and also a fixed frequency carrier (related to the wavelength ߣ଴). To obtain the difference between the received power and the transmitted power (RSSI), a relation between the power level and the distance can be derived: Ž‘‰

௉ೃ ௉೅



ൌ ʹͲ Ž‘‰ ଵ଴ ቀସగబ ቁ െ ͳͲ݊ Ž‘‰ ଵ଴ ݀

(5)

Simplifying (5) and considering that the first term after the equality is constant, (6) is obtained: ܴܵܵ‫ ܫ‬ൌ െ ͳͲ݊ Ž‘‰ଵ଴ ሺ݀ሻ ൅ ‫ܣ‬

(6)

where d is the distance between the transmitter and receiver (in meters) and A is the received power at one meter distance (in dBm). The n constant varies according to the environment due to different effects from the wave propagation phenomena such as multipath, where waves travel through different paths due to reflections and diffractions. This constant has its value tested in the environment in order to obtain higher precision in the distance calculations. With the distance obtained by the previously presented methods, it is possible to know the object location with the trilateration technique. In this technique, the coordinates of an unknown point are obtained based on reference points. The

triangle geometry is used for the calculations in the same manner of triangulation, with the difference that the last one uses the angles to make the coordinates calculation. A circle containing the possible positions of the mobile node is obtained as the distance from the desired point to the reference node based on RSSI. With two references, the circles intercept each other in two points, reducing the location possibilities. To obtain the exact location of the mobile node in the bi-dimensional Euclidean space, three reference points are needed, so that the interception of the three circles is the desired point.

IV. METHODOLOGY An application model is obtained from the previous developed method and it is tested on a Freescale’s MC13224V development kit [9]. A.

Algorithm description At least three fixed reference nodes are needed to implement the RSSI based location system. The main calculations are done in a computer that receives the network data from a base node (gateway). This node communicates with the PC via a standard USB port. The mobile node can move through the XY plane and the reference nodes are deployed in order to cover the mobile node area with their signal reaching the gateway. The IEEE 802.15.4 RF range limits need to be observed, adding an extra margin for safety reasons (propagation range changes along the time and according to the environment). This scenario is depicted in Figure 2. The three references initial approach keeps the low cost of the system, however regarding the WSN more than three references can be used, increasing the system’s precision.

Figure 1. Localization via trilateration.

Observing Figure 1, the points ܲଵ , ܲଶ and ܲଷ are references whose positions are known. The distances ‫ݎ‬ଵ , ‫ݎ‬ଶ and ‫ݎ‬ଷ from the references to the desired point are known by the RSSI calculation. By the intersection of the two circles of radii ‫ݎ‬ଵ and ‫ݎ‬ଶ there are two possible locations for the mobile node described by A and B. However, by adding the third reference point, which creates the circle of radius ‫ݎ‬ଷ , it is possible to identify the point that corresponds to the correct position, i.e. B. To discover the coordinates of point B, the variables representing its components on the axes. ‫ݔ‬஻ and ‫ݕ‬஻  are considered. The distance between two points in a bidimensional system is given by (7). ݀; ൌ ሺ‫ ݔ‬െ ‫ݔ‬஻ ሻଶ ൅ ሺ‫ ݕ‬െ ‫ݕ‬஻ ሻ;

(7)

Considering also the reference points ܲଵ , ܲଶ and ܲଷ and their distance to the point B, ‫ݎ‬ଵ , ‫ݎ‬ଶ and ‫ݎ‬ଷ , the following system is demonstrated by (8) for the solution of the problem, where the ‫ݔ‬஻ e ‫ݕ‬஻ values are obtained. ሺ‫ݔ‬஻ െ ‫ݔ‬ଵ ሻ; ൅ ሺ‫ݕ‬஻ି ‫ݕ‬ଵሻ; ‫ݎ‬ଵଶ ଶ ቎‫ݎ‬ଶ ቏ ൌ ቎ሺ‫ݔ‬஻ െ ‫ݔ‬ଶ ሻ; ൅ ሺ‫ݕ‬஻ି ‫ݕ‬ଶሻ;቏ ሺ‫ݔ‬஻ െ ‫ݔ‬ଷ ሻ; ൅ ሺ‫ݕ‬஻ି ‫ݕ‬ଷሻ; ‫ݎ‬ଷଶ

Figure 2. Application topology.

Periodical packets are sent by the reference nodes searching for an answer from the mobile node. If the mobile node is within the area, it will answer with a broadcast acknowledgement (ACK) for all deployed reference nodes. Each reference node measures the power level of the received packet and resends this information to the gateway, which reassembles them and sends to the PC. The communication between reference and mobile nodes can be observed in Figure 3.

(8)

The Equation (8) can be rewritten in a matrix form in order to isolate ‫ݔ‬஻ and ‫ݕ‬஻ variables, leading to (9). ‫ݔ‬ଷ െ ‫ݔ‬ଵ ‫ݕ‬ଷ െ ‫ݕ‬ଵ ‫ݔ‬஻ ʹǤ ቂ‫ ݔ‬െ ‫ ݕ ݔ‬െ ‫ ݕ‬ቃ Ǥ ቂ‫ ݕ‬ቃ ൌ ଷ ଶ ଷ ଶ ஻ ൤

ሺ‫ݎ‬ଵ ; െ ‫ݎ‬ଷ ;ሻ െ ሺ‫ݔ‬ଵ ; െ ‫ݔ‬ଷ ;ሻ െ ሺ‫ݕ‬ଵ ; െ ‫ݕ‬ଷ ;ሻ ൨ ሺ‫ݎ‬ଶ ; െ ‫ݎ‬ଷ ;ሻ െ ሺ‫ݔ‬ଶ ; െ ‫ݔ‬ଷ ;ሻ െ ሺ‫ݕ‬ଶ ; െ ‫ݕ‬ଷ ;ሻ

(9) Figure 3. Message exchange between nodes.

The PC software converts the power levels in distances. These distances feed the location algorithm that will compute the free node X and Y coordinates. These coordinates are passed to the upper layer of the software where they are utilized to form a graphical overview of the locations. B.

Calibration In order to obtain more adequate environment parameters, a calibration routine is performed before the final application installation. The wave propagation is perfect only in the vacuum, varying in real environments by means of propagation phenomena such as multipath, scattering, diffraction and fading. Even knowing that the environment characteristics may change, the previous calibration will guarantee better values for parameters of the Equation (6). The RSSI based method has the advantages of easy deployment of the system, easy calibration and reasonable accuracy when compared with other methods such as fingerprinting [7]. These methods can be more accurate, but their portability and calibration demand more work. Within the chosen method, the calibration needs the following steps: x Fixed nodes deployment (reference and gateway) in the final application place; x Placement of a mobile node at a known distance from the reference node. This value supplies the PC software with the necessary data to obtain the power level of the mobile node;

aid of extra reference nodes. The simulations are conducted in the Matlab environment. The first simulation has the objective to evaluate the trilateration algorithm in a perfect condition, i.e., without any noise in the samples, while the second tests the location algorithm when the sampled data has an added noise, decreasing the accuracy and coming closer to the real world conditions. According to [10], the interference modeling can be approximated to a white noise where ܺߪ represents random values in a Gaussian distribution with zero mean and ߪ; variance [11]. This model is called log-normal fading, whose equation is given by (14), where ܲ‫ ܮ‬represents the channel losses and ܲ‫ Ͳ݀ܮ‬, the losses at one meter. ܲ‫ ܮ‬ൌ ܲ‫ܮ‬ௗ଴ ൅ͳͲ݊ Ž‘‰ଵ଴ ݀ ൅ ܺఙ

Considering the proposed log-normal model, the simulation is repeated with the white noise added to the mobile node sinusoidal path. The ܺߪ signal is a Gaussian position with zero mean and one meter variance. Figure 4 depicts the results in which the asterisks represent the node path without noise and the dots represent the path with white noise. It is possible to notice that the noise affects significantly the algorithm results, spreading the calculated points from the original track.

x Repetition. The previous item is repeated as many times as possible in order to increase precision; The calibration function of the software keeps the power levels in a table. For the next step the ten base logarithms of all the distances are calculated to feed a plot of RSSI by log10 (distance). The final result tends to a straight line. To obtain a best fit for a straight line, the least squares method is utilized, according to (10), (11) and (12), where Z is the matrix with the x and b values. This matrix is the vector-column of y values. t is the vector containing the constants [n A] and the total number of points is represented by m. ‹ԡܼ‫ ݐ‬െ ܾ ԡଶ

݊ൌ

൫σ೘ ത ೔సభ ௫೔ Ǥ௬೔ ൯ି௠Ǥ௫ҧ Ǥ௬ ൫σ೘ ೔సభ ௫೔ ;൯ି௠Ǥ௫ҧ ;

‫ ܣ‬ൌ ‫ ݕ‬െ݊‫ݔ‬

(10) Figure 4. Simulation of a sinusoidal path with white noise.

(11) (12)

The result is a straight line (13), where the coefficients are those needed for the correct calculation of (6). ‫ ݕ‬ൌ ݊‫ ݔ‬൅‫ܣ‬ V.

(14)

(13)

SIMULATIONS

To obtain a greater confidence of the proposed trilateration algorithm some simulations are performed. The main goal is to exclude any error in the algorithm to be used in the final location system. Some improvements are also tested with the Figure 5. Position error due to the white noise.

Multiple tests resulted in mean errors of 1.41 meters from the original track (the dashed line of Figure 5) with 4.5 meters peak. Searching for alternatives to minimize the error induced by the noise, the inclusion of extra reference nodes is investigated. This approach leads to redundancy and spurious elimination. Two main methods are developed to calculate the mobile node position with extra reference nodes: several trilateration means (each trilateration using only three reference nodes, after applying the mean of each iteration) and the elimination of the noisiest reference node. In order to compare these methods, the previous mobile node path is simulated again. The trilateration mean method is presented in Figure 6, where the mean error is around of 1.04 meters, with less than 3 meters maximum error. These results are approximately 37% better in comparison to the three reference nodes method.

VI. PRACTICAL RESULTS In order to evaluate the location system in real conditions, several tests are done to obtain results and to compare with other methods. The test bed is a typical indoor environment such as an office, house or factory, characterized by smaller places with objects inside, supposedly leading to errors. First Fresnel zones are observed in order to reduce reflections and multipath. Each antenna is verified to check gain and voltage standing wave ratio (VSWR) and a selection is done to match antennas, otherwise the trilateration method results can be unbalanced, leading to increased location errors. The selected place to perform the test was a room with dimensions 9 x 6 meters with ordinary objects normally found in an office, such as tables and chairs.

Figure 8. Error comparison between Titanis and PIFA antennas.

Figure 6. Position error with four nodes and mean trilateration.

Figure 7 depicts the simulation results when four reference nodes are used, but excluding the lowest power level reference node. The maximum error is less than 3 meters with 1.12 meters mean, a 27% improvement, but still worse than the trilateration mean method (1.04 meters).

Figure 7.

Position error with four nodes excluding the further one.

Omni-directional antennas have better performance in this kind of application as they provide a more homogeneous signal transmission if compared with the Planar Inverted-F Antennas (PIFA). Thus, the first test used five nodes, in which four were equipped with the Titanis [12] omni-directional antennas (one node acting as the mobile node and three as reference points) and one node using a PIFA antenna, acting as the base station, which is a function that requires no particular care in relation to the transmission setup. For the second test, the mobile node had its antenna changed to a PIFA, in order to compare the results, as Figure 8 illustrates. In the case where PIFA antenna is used, the errors are 33% worst. This can be explained due to the non-homogeneity of the irradiation pattern provided by this type of antenna. This fact led to the choice of the omnidirection antennas aiming for better results. Other tests are done in order to compare the results, using 3 and 4 reference nodes, with mean trilateration or excluding the further node. The results are presented in Figure 9 and Table 1. Based upon them, it is possible to notice a decrease in the error by increasing the number of references. By comparing the results obtained with the methods using the mean of four reference nodes to those obtained with the method using three nodes, the enhancement is of 19.5%. However, these results are not as good as the ones obtained with the simulations, which were of 37%. The simulation did also preview that the method which used the mean of the trilaterations would have better results than the one that excludes the worst measurement, but in the practical experiments this difference was not significant, allowing to state that both methods obtain similar results.

one base node to send the data to the PC, which executes the algorithm and graphically presents the mobile node trajectory. A calibration mechanism for the radios was also developed in order to decrease the errors associated with the environmental conditions.

Figure 9. Error with three and four nodes trilateration. Table 1. Type of Calculation 3 nodes Mean of 4 nodes 3 of 4 nodes

Three and four nodes trilateration error. Mean Error 2.21 m 1.85 m 1.84 m

Maximum Error 6.47 m 3.16 m 3.15 m

Minimum Error 0.83 m 0.79 m 0.83 m

Figure 10 shows the mobile node path calculated by the software, using the mean of trilaterations method. The triangles represent real path measured points, while the rhombi represent the respective calculated points. It is possible to observe an error to each measure, but the overall track calculated by the algorithm is very similar to the real one.

Figure 10. Comparison between real and calculated paths.

VII.

CONCLUSIONS

This paper presents a system to locate mobile nodes in a WSN. The proposed approach was submitted to simulation and practical tests, which were conducted using nodes equipped with Freescale’s MC13224 microcontrollers. The project was done by first selecting the RSSI method to be used in the calculation of the distance between nodes, being the result of a study about other possible methods, which indicated that this would be the most suitable one. Than a network topology was defined using at least three reference nodes to measure the received signal strength power, one node as mobile object, and

The evaluation of the developed algorithms was performed in order to search for enhancements before the final implementation in the target devices. Practical experiments confirmed the expected results by providing the tracking of the mobile node while it moved in the area monitored by the sensor nodes. Finally, it is possible to state that the proposal achieved the required goals, providing fairly accurate measurements, allowing the development of a tracking application based in a WSN, with low costs when compared to other possible solutions. Further works aim at the enhancement of the achieved accuracy and a study of possible distribution of the algorithm executed on the PC in order to provide a standalone system. ACKNOWLEDGMENT The authors thanks the CNPq and Capes, the Brazilian governmental research supporting agencies, for the given support to the development of this work. REFERENCES [1]

I. F. Akyildiz, Weilian Su, Y. Sankarasubramaniam, E. Cayirci. “A Survey on Sensor Networks”. IEEE Communications Magazine. August 2002. [2] K. Sohraby, D. Minoldi and T. Znati. Wireless Sensor Networks Technology, Protocols and Applications. 2007. [3] Ublox. GPS Essentials of satellite navigation. Compendium. 2009. [4] 802.15.4, IEEE. IEEE Standard for Information Technology Part 15.4: wireless medium access control (MAC) and physical layer (PHY) specifications for low-rate wireless personal area networks (LRWPANs). 2006. [5] P. Bahl and V. N. Padmanabhan. “RADAR: an in-building RF-based user location and tracking system”. Nineteenth Annual Joint Conference of the IEEE Computer and Communications Societies. 2000. [6] M. Saxena, P. Gupta, B. N. Jain. ”Experimental analysis of RSSI-based location estimation in wireless sensor networks”. Dept. of Comput. Sci., Purdue Univ., West Lafayette, IN. Communication Systems Software and Middleware and Workshops, 2008. [7] K. Kaemarungsi. Design of indoor positioning systems based on location fingerprinting technique. 2005. [8] S. Lanzisera, D. Lin and K. Pister. “RF Time of Flight Ranging for Wireless Sensor Network Localization”. Workshop on Intelligent Solutions in Embedded Systems, 2006. [9] Freescale. MC1322x Advanced ZigBee - Compliant SoC Platform for the 2.4GHz IEEE 802.15.4 Standard. Reference Manual. 2009. www.freescale.com/files/rf_if/doc/data_sheet/MC1322x.pdf. [10] T. S. Rappaport. Wireless Communications: Principles & Practice. [S.l.] : Prentice Hall, 2002. ISBN: 978-0130422323. [11] H. Karl and A. Willig. Protocols and Architectures for Wireless Sensor Networks. [S.l.] : Wiley-Interscience, 2005. ISBN: 978-0470519233. [12] Antenova. Titanis 2.4GHz swivel SMA antenna - Product Specification. 2010.