RSSI Aided Cartographic Indoor Tracking System using Wireless Sensor Network

- It is widely accepted that Global Positioning System (GPS) has become the de facto standard for outdoor positioning and tracking applications. Weak signal reception and missing line-of-sight between the user and the satellites in the GPS have provided incentive to develop indoor localization systems. The work presents an indoor tracking system based on the Received Signal Strength Indicator (RSSI) and the cartographic technique. The output is improvised with the help of trilateration and Least Linear Square (LLS) technique. Zigbee along with an Arduino microcontroller is used as a hardware module. The RSSI-based techniques does not require additional hardware to be implemented also the RSSI value can be read without being part of the network by just listening to the network packets. The main application is monitoring the movement of people inside big buildings like public libraries and museums. The proposed system can also be used in dimly lit or in dark environment where CCTV cameras will not come in handy.


INTRODUCTION
A. Wireless Sensor Network WSN has become a vital research topic in computing and automation. Low cost and low power sensor nodes are used widely in all application areas. WSNs enable connectivity without use of wires to sensors and actuators in general. Sensor networks can be classified according to the kind of application (industrial, medical, home, etc.), network parameters (topology, range, etc.) and the control (centralized, distributed, etc.). The WSN uses IEEE802.15. 4 and ZigBee standard for short range wireless communication between sensor nodes. IEEE 802.15.4 is a wireless standard that defines the physical (PHY) and medium access control (MAC) layers while ZigBee standard adds network (NWK) and application (APL) layer specifications on top of 802.15.4 to form a ZigBee stack. In a WSN, each device can communicate directly or through neighbour devices with other devices in the network. Connections between nodes are dynamically updated and optimized.
A WSN can adapt to one of the three topologies: Star, Tree and Mesh. There are three types of devices in it: ZigBee coordinator (ZC), ZigBee router (ZR) and ZigBee end device (ZED). ZC forms the root of the network tree and might bridge to other networks. There is exactly one ZC in each network since it is the device that starts the network communication. The ZR acts as an intermediate router, passing data from other devices as well as running an application function. The ZED contains just enough functionality to talk to the parent node (either the coordinator or a router) and it cannot relay data from other devices.

B. RSSI based Location estimation
There are number of ways to locate an object in 2D or 3D space. The positioning method used depends both on how suitable the technique is for a particular situation and also the hardware technology that is being used. Received Signal Strength Indication (RSSI) which indicates the signal power at receiving end, is used toestimate distance between two WSN nodes. RSSI is chosen because it is relatively cheap and easy to implement compared to other techniques. In DIGI XBee PRO modules, absolute values are reported in -dBm of the last received packet. It is possible to measure the received signal strength on a device using X-CTU software. The RSSI value can also be determined in hardware using RSSI module pin. The RSSI range for XBee PRO module is specified in dBm (-39 to -100) i.e. -39dBm is reported when the distance between two nodes is minimum (0m) and -100dBm is reported with maximum distance between them (200m). The RSSI can be used to develop a coarse but simple method of location estimation without the need for any additional hardware. A location monitoring system can be developed with moderate performance with a WSN. The fundamental idea of localization can be summarized as follows. A tracked node with unknown location emits a signal called beacon, which is received by the fixed anchor nodes. The anchor nodes measure one of the following parameters, the received signal strength (RSS), the time of arrival (ToA), or the angle of arrival (AoA) of the received signal .These measurements are used as inputs to an algorithm that determines the approximate location of the tracked node. Measuring RSSI is very simple and the ZigBee nodes are capable of measuring RSSI for last received packet. Determining the precise time of arrival requires a very accurate real time clock. Finding the angle of arrival requires more number of antennae, hardware modification and can increase the complexity and the cost. Hence majority of the RF-based positioning algorithms use only the RSSI to estimate the location because of its simplicity and minimum or no hardware requirement.

II. EXPERIMENTAL SETUP
DIGI Corporation-ZigBee mesh network is deployed here to build a low cost and user friendly indoor position monitoring for a home automation application. It comprises of an unknown node (node to be tracked) which acts as beacon node and three anchor nodes with predetermined location. The unknown node sends beacon signals to three fixed reference nodes where RSSI value is obtained individually. The position is estimated according to the obtained RSSI value.

A. Hardware configuration
The decision of what hardware to be used is influenced by the positioning method that is used. Arduinos are used as the hardware base, due to their low cost, easy to use, extensible, open-source nature. The Arduino was capable of using the wireless Xbee module using the ZigBee wireless protocol, which has built in support for measuring RSSI. This is the goto hardware combination among the Arduino community for wireless applications, and there were a number of papers positively evaluating the Xbee's usefulness in wireless positioning systems.
The DIGI ZigBee modules interface to an internal microcontroller based host device through UART. The ZigBee modules have small buffer registers to store serial data which arrives from the host and RF data which originates from other modules. The ZigBee modules operate in ISM (Industrial Scientific and Medical) 2.4 GHz band at 250 kbps baud rate using Q-PSK modulation. To form a WSN network, a coordinator selects an unused operating channel among 16 frequency channels and assigns a personal area network (PAN) -ID. To perform RSSI based position monitoring unknown node is used as beacon node. Three XBee PRO RF series-2 modules with whip antenna (wire antenna) serve as anchor nodes. The whip antenna is like single piece of wire sticking up from the body of the radio module and offers Omni-directional radiation. It features the maximum transmission distance in all directions when its wire is straight and perpendicular to the module. Since RSSI value only is needed for localization processing no additional hardware circuitry is needed. Fig.1. Unknown node -node which is to be tracked

B. Software configuration
The WSN test bed provides a simple user interface to be used for configuring the network, writing application programs, managing the network services and utilizing all resources. Also it has provisions to build custom web interface for the user requirements. The zigbee configuration software X-CTU is an open source, easy and user friendly software which allows the user to configure zigbee in three different modes : transparent, API and AT. The RSSI of the last received packet is displayed in the XCTU software in the range test tab.

III. DETERMINING RSSI
The RSSI value of the transmitted signal (from the unknown node whose position is to be determined) at the receiver can be measured in two ways namely:

A. Using Range Test
Range test is an inbuilt software application that makes the user to determine the RSSI value of the transmitted signal at the receiver with ease. For this purpose user should make sure that the Zigbees being used are communicating properly. The change in RSSI with respect to change in distance can be displayed to the user in the form of a graphical user interface with a level indicator as well as a numerical display.

B. Using AT Command
The ZigBee can report the received signal strength (RSSI) valuein a number of ways. One way is to poll the unit using the ATDB command. The ZigBee will report RSSI level as a hexadecimal value indicating the magnitude. This value when converted to decimal and made negative, is the signal strength from -40 to -100 dBm. The more negative the signal strength (in dBm), the weaker the signal. Therefore, -50dBm is better than -60 dBm). This is done by following the below steps:


The Terminaltab is used to transmit and receive data.  The ZigBee is configured into command mode and the ATDBcommand is entered for the RSSI level.
IV.DEALING WITH WIRELESS SPECTRUM INTERFERENCE The RF spectrum and available channels for the ZigBee protocol(802.15.4) and Wi-Fi (802.11b/g) overlap.
Interference from Wi-Fi devices was thus a problem that is needed to be addressed.Therefore we set the channel that we used to overlap as little aspossible with the Wi-Fi spectrum. channels, two channels of them are at the edges and another two are close to the centre frequency of the Wi-Fi channel. In fact, the interference level on the two channels close to the centre is higher than those on the edges. The interference with Wi-Fi, caused by ZigBee, is smaller than the interference with ZigBee, caused by Wi-Fi, it is because ZigBee's bandwidth (2MHz) is much smaller than Wi-Fi's bandwidth (22MHz), so ZigBee is a kind of narrowbandinterference source to Wi-Fi. 802.11b/g/n adopts spread spectrum technology, which can greatly restrain interference signal, in addition, for most ZigBee products the power is conditioned to 0dbm (1mW), which is not enough to pose athreat to Wi-Fi products, its power is far less than that of IEEE 802.11b/g, 20dbm (100mW), they can coexist very well if necessary measures are adopted. (1) For a sphere centered at a point (xa, ya, za) the equation is simplified as shown as in equation (2) d²= (x-x a )² +(y-y a )² +(z-z a )² for more than one sphere the above equation can be generalised as (3) d i ² = (x i -x u )² + (y i -y u )² where i= 1,2,3 (3) In the above equation xi, yi represents known position of anchor nodes and x u ,y u is the position of node to be tracked (unknown node) Solving the above equation we obtain result in the form of (4) Where, b ij is given by (5) In the above equation the distance r j (r i ) that is the distance between the unknown point and the j'th (i'th) anchor node and the distance d ij that is the distance between anchor node Ai and Aj. This is the basic form that now has to be solved using the linear least squares method.

A. Least Linear Square Technique Using QR Factorization
Due to the fact that overdetermined systems of equations with m >> n havenot exact one solution for Ax = b, we have to apply the L2-norm.This isalso called the Euclidean Norm, whichminimizes the sum of the squares. Orthogonal matrices transform vectors in different ways while they keep the length of the vector. Moreover, orthogonal matrices are invariant against the L2-norm, i.e. errors are not increased. The QR-factorization transforms overdetermined linear systems of equations of the form Ax = b in a triangular system with the same solution, because it is:

VI. DISPLAYING THE POSITION
The data is displayed to the user using an user interface created using MATLAB software that takes person's position and displays it as a dot on the screen. This way of displaying provides an easier way to communicate with the user. This display method also allowsdisplaying the position of more than one person simultaneously on a single screen.

VII. RESULTS
The beacon node is allowed to transmit periodically which is received by the anchor node. Since the RSSI value obtained cannot be ported into any other software a lookup table method has been used. The look up table consisting of RSSI Vs Distance is shown in the figure. A graph is plotted for the obtained values.  VIII.CONCLUSIONS Thus two nodes are made to communicate with each other successfully and the RSSI value of the signal at the receiver is obtained for five different distances. A graph showing the variation in RSSI with distance is also plotted. From the graph it is seen that as the distance between the nodes increases the RSSI value at the receiver also increases but this variation cannot be said as a linear one.

IX. FUTURE WORKS
The obtained RSSI value can be compared with the theoretical value (obtained using the formula) in orderto determine the nature of the environment. Variation of RSSI value with respect to the surroundings can also be determined.Using the obtained RSSI value and the predetermined x, y coordinates of the anchor nodes the moving unknown nodes can be tracked with ease. With the position of unknown nodes smart homes (homes with automatic lighting and air cooler adjustment) can be built. Automated human assisting robot can also be designed by accurately locating the position of humans in the indoor environment to serve them.