Abstract

The increasing interest in systems able to provide users with immersive services (e.g., domotics, context-aware applications, and immersive distance learning tools) has encouraged the development of cheap and effective platforms aimed at tracking objects and people within a certain space. In this context, wireless sensor networks (WSNs) can play a very important role, since specialized sensors can be fruitfully exploited in order to generate/receive signals by means of which the WSN can derive the position of nodes joined to the objects to be tracked. The paper presents an original localization platform that exploits a single-hop WSN, based on a Microchip MCU and a Cypress RF device, to track its moving nodes. Specifically, the nodes of the network are divided into three sets: the first set consists of anchor nodes that, according to the commands from the sink (the central node of the WSN), generate ultrasonic pulses. These pulses are received by the second set of (moving) nodes, which estimate the pulse time trip and communicate it to the sink. Finally, the last set is constituted by general purpose nodes that collect any kind of data from the surrounding field. The sink gathers all the data, computes the position of moving nodes, and transfers information to external users on the Internet. The algorithms adopted to manage the network and to localize moving nodes are discussed. A working prototype based upon the hardware platform, software, and protocol described in this paper has been deployed and tested, and some results are shown. Simulation results of the localization system are presented to show system scalability.

1. Introduction

Nowadays, more and more systems have localization as a key element to speed up work or to provide advanced services to users: in the so-called context-aware systems, for example, to have knowledge of the position is a basic feature around which all services are developed.

Moreover, localization functionalities are a fundamental component in immersive communications, at least in all situations involving user mobility; in some cases, users are represented by robots moving within a certain zone [13]. As pointed out, for example in [4], there are four common tasks in immersive visualization, namely, localization, orientation, navigation, and representation. Actually, many works on virtual immersive environments focus on the task of having a user localize a specific target (e.g., an audio source) [46]. However, equally important in such environments is often the symmetric problem of localization of the user on the part of the surrounding ambient technology (see, e.g., [7, 8]).

The problem of localization has been commonly solved by using different approaches, which rely upon the environment where the system has to operate. When the application is deployed in a wide outdoor environment, GPS is the most ordinary approach: it works well when receivers are in wide areas, but it can be useless in a more complex environment, such as narrow city streets or indoor spaces [9].

Other solutions have been developed to overcome these deficiencies: radio power maps and theoretical, or empirical, power-decrease laws are often used to estimate the distance from known fixed positions, for example by measuring received power from IEEE access points or cellular base stations. For indoor applications, also the approaches based on received power do not provide enough accuracy, owing to environmental complexity. Improvements are obtained when other techniques are adopted: solutions based on ultrasonics give better results than radio approaches and turn out to be cheaper too.

When high precision is the goal, systems are usually based on high-end technological devices [10] or very complex infrastructures, which make the deployment expensive and difficult, especially indoor. Wiring takes most of the effort: solutions based on wireless communications can easily overcome this trouble and therefore can speed up system deployment.

Wireless sensor networks (WSNs) embody the idea of flexibility and easiness. They are composed of several simple devices, the nodes, which communicate by radio and cooperate to reach a goal. WSNs are commonly used to monitor very wide areas: nodes measure some quantity, for example temperature, and send data toward a specific node, called sink, which is the interface between the WSN and other networks. Specific protocols have to be developed to configure the network, by flooding topological information, and to route data from sensors to the sink. To overcome long distances, protocols must allow multihop transmissions. Nodes send packets to the sink by means of other nodes, but they must also be as simple as possible to save batteries and to cope with limited computational and storage capabilities of the nodes. WSNs can be organized as meshes, by exploiting multihop protocols, but also clusters or hierarchical structures can be adopted during network design.

Localization, in an indoor environment, can be well faced by using WSNs [11]: a subset of the nodes forms the fixed infrastructure, while the others are attached to what has to be localized. The availability of cheap single-chip computers and miniaturized radio-transceivers makes easy to design small-dimension nodes, which can be installed everywhere without many difficulties.

The approach presented in the paper mixes two different technologies, namely, radio and ultrasonics, which are jointly used in a novel integrated system of localization measurement and data collection. Time-of-flight measurements are performed by means of ultrasonic devices, which provide better precision for this task with respect to radio propagation. A wireless packet network based on polling is adopted for measurement (and other sensor data) collection. Decoupling the two tasks allows a more effective system design and the adoption of the best technology for each of them.

The paper is organized as follows. Section 2 describes the structure of the WSN, the nodes, and the algorithms implemented. Measurements done on the communication channel and localization precision results are shown in Section 3, while Section 4 shows the results of simulations performed with the localization system. Finally, in the last section, conclusions are drawn and future improvements to the system designed are proposed.

2. The Sensor Network

Figure 1 sketches the devised sensor network, whose peripheral elements, the nodes, are the components of a platform devoted to the tracking application. Nodes can be divided in three main sets, according to the role they play within the network. The first set consists of the nodes, called anchor nodes (AN), that must be placed in fixed, suitable (and known) positions; the second set is represented by the moving nodes, here referred to as mobile nodes (MN), which have to be tracked within a certain building or room. Eventually, the last set groups general-purpose nodes (GN), whose goal might be, for instance, the monitoring of some environmental parameter, as temperature. All these nodes directly communicate, via a radio modem (RM), with a central node, called sink, which gathers the data acquired by the peripheral nodes, synchronizes network operations, and acts as a “gateway” to an IP infrastructure.

It should be highlighted that, in our implementation, the hardware platform has been designed with off-the-shelf elements: this allows building very cheap nodes, characterized by good computational and communication capabilities. To this aim, during the design phase, much attention was paid in order to (i) adopt commercial components, (ii) choose integrated circuits providing PDIP (plastic dual inline package) to render any possible part replacement quite simple, (iii) exploit an RF transceiver operating in the free ISM band (2.4 GHz) able to internally spread and serialize/deserialize data to be transmitted, and (iv) keep the size of the node board as small as possible, thus permitting an easy deployment of the WSN.

The anchor, mobile, and general-purpose nodes are based upon the same hardware platform, consisting of a main board, on which all the electronic components are placed. The different “identities” of the nodes are provided by the specific daughter card plugged into the main board. At the moment, two daughter cards have been designed: one, used in the ANs, includes an amplifier and an ultrasonic emission device [12]. The other, employed in the MNs, includes an ultrasonic microphone [12], and a band pass front-end amplifier. The GNs require no daughter cards, at least for the most common data acquisitions.

The functional blocks of a main board are depicted in Figure 2. Its core component is represented by the MCU, a PIC 16f876 [13] (or PIC 18f252, i.e., pin-to-pin compatible with the previous one): the latter communicates, via an SPI (serial peripheral interface), with a radio transceiver, based on the Cypress CYWUSB6935 chip [14]. In our implementation, we adopted the Cypress-based “high-speed multichannel transceiver,” produced by Aurel S.p.A., an Italian medium enterprise, specialized in RF modules' design [15].

All the analog inputs of the MCU, SPI, and PWM (pulse width modulator) lines and other MCU general-purpose signals are available at the connector, into which a daughter card can be plugged. In this manner, it is possible to control and acquire a greater number of signals, as well as to handle special purpose cards, consisting of an ad hoc electronic circuitry, as in the case of the MNs and ANs.

The programming/debugging interface provides an ICD (in-circuit debugging) tap, which allows the user to upload and debug the firmware directly on the MCU. The power unit (PU) monitors the battery status and, if an external power supply is available, the PU controls and regulates the battery charge. The I/O unit is represented by a very simple interface, which permits the MCU to acquire only a very limited number of signals from the field. Although the MCU can handle 8-digital (namely, on-off) inputs, 8-digital outputs, and 4 analog input channels, the on-board circuitry permits to manage only 1 digital input, 1 digital output, and 1 analog input channel: to achieve more I/O capacity a daughter card must be plugged in the main board.

This design choice is motivated by the fact that, in general, it is convenient to decouple the network operation facilities and functionalities, which reside on the main board of a node, from specific capabilities that involve the use of ad hoc components. Furthermore, it should be noted that, in the case of a GN, only a limited number of I/O lines are generally needed to meet data acquisition requirements.

Figure 3 presents the main board of a sensor developed within our research activity. The various protocol layers of the WSN, as well as the driver handling the RF transceiver, the software portions managing the power unit and the signal acquisition and signal conditioning are implemented on the MCU.

As already mentioned, the central element of the network is the sink, which includes two main elements: a network sink controller (NSC), and a sink manager (SM). The hardware and firmware of the former are similar to those of a common sensor node, while the latter consists of a single board ARM (Advanced RISC Machine) computer (booting Linux), produced by Technologic Systems [16].

The NSC actually manages the sensor network and provides a proper synchronization, thus permitting the MNs to estimate their distance from the ANs (see Section 2.4). The SM gathers the MNs' data related to distances (from ANs), and processes them according to a triangulation algorithm. Finally, the SM publishes MNs' positions by exploiting the facilities offered by an SNMP agent or by a Web Service.

To this aim, the SM continuously communicates with the NSC in order to get any information acquired from the MNs, and to send commands to the ANs, so that they are triggered to generate an ultrasonic pulse. Moreover, the SM collects data acquired from the GNs. The SM stores information from the nodes in an internal real-time database, which is also accessed by the processes involved in the triangulation procedure and in the publishing of data gathered by the GNs. The functional blocks of the sink are depicted in Figure 4.

2.1. Anchor Node

In Figure 5, blocks forming the ultrasonic transmission electronics are depicted. As can be seen, the design has been done as simple as possible to reduce power consumption and dimension. All operations are controlled by the MCU of the main board. Ultrasonic pulses, at the frequency of 40 kHz, are generated by means of the PWM (pulse width modulation) signal produced by the PIC which drives an amplifier/voltage buffer connected directly to the ultrasonic emission device [12].

2.2. Mobile Node

Mobile nodes ultrasonic electronics is composed by the blocks shown in Figure 6. As for anchor nodes, pulse detection is maintained as simply as possible.

The ultrasonic received signal is first filtered with a band pass filter (BPF) at 40 kHz and then amplified 1000 times to get voltages of about 2 volts. Pulse detection is performed by exploiting the MCU external interrupt (INT) facility. When the received signal exceeds a threshold, the interrupt is generated and the delay of the pulse is measured (see Figure 7). The threshold is generated by filtering the PWM signal provided by the MCU: by varying the duty cycle of the PWM, the mean value extracted by the LPF (low pass filter) can be changed. The threshold is determined before an MN begins its operations: its value is chosen above the maximum noise level during a listening window. Proceeding in this way, delay measurement errors are minimized and the system can adapt to different noise levels.

2.3. Communication Protocol

The access protocol implemented is quite simple and can be considered a modified version of a polling algorithm. The basic idea divides the network operation in two different phases. During the former one, called polling phase (PP), the sink cyclically sends ANs the command to force the emission of an ultrasonic pulse train. Then, the sink polls the MNs, in order to receive, from each MN, the time spent by the pulse to reach it. In order to send/receive commands/data to an AN/MN, the sink transmits a POLL-REQuest to an addressed anchor/mobile node, which, in turn, must respond with a POLL-RESponse packet within a certain time interval.

After sending the commands to all the ANs and polling each MN, the second phase, named Aloha phase (AP), starts. The sink periodically broadcasts a beacon (BEAC) and listens to the channel for a certain amount of time. Upon receiving a beacon, a bound GN node may notify (by means of a TX-REQuest) the sink that it has new data acquired from the field, or an unbound node may ask to enter the network by sending a BIND-REQuest packet.

In the former case, the sink polls the GN, thus enabling it to transmit the information acquired; in the latter case, the sink binds the new node and sends it a Bind-RESponse packet, containing a unique identifier, by means of which the sink will poll the sensor in all the following data exchanges. Figure 8 diagrammatically represents different transaction types between sink and sensor nodes.

The various packet types used within the WSN are reported in Figure 9. The packet labeled (a) is transmitted by the sink during the AP; packets (b) and (c) are exchanged by the sink and an unbound node that wants to enter the network. Packets (d) and (e) are used during the polling phases to communicate with ANs, MNs, and GNs; while the last packet (f) is transmitted by a GN to inform the sink it has data to send.

2.4. Synchronization, Measure, and Data Gathering

When the network is set up, mobile nodes' localization can start: Figure 8 shows the operations taking place. The sink node begins by broadcasting a packet, commanding anchor node to send an ultrasonic pulse. Because this packet is broadcast, also mobile nodes receive it: so they use this packet as a time reference to measure time-of-flight (ToF) of the next ultrasonic pulse. ToF measurement of each mobile node ends when it detects the ultrasonic pulse, as shown in Figure 10, or after a hard-coded timeout. Ultrasonic detection is performed by using the hardware described in Section 2.2. Since radio propagation delays can be accounted as zero due to the short node-to-node distances of a singlehop network, only firmware and hardware delays have to be canceled out from the ToF to get a precise distance measurement. These delays are caused by radio packet processing and electronics governing ultrasonic generation [17].

At a fixed time after command transmission, the sink begins the polling phase to collect measurements from every mobile node. Each polled node transmits its own ToF measurement to the sink; the latter records the measurement: when a mobile node has a set made up of at least three measurements, its position can be fixed. The algorithm used to estimate mobile node position is based on trilateration and will be described in Section 2.5.

The polling phase is the most time-consuming one, especially if a great number of mobile nodes have to be localized, because all mobile nodes' measurements have to be gathered. To improve this operation, a position-based approach has been introduced. When the system starts localization, the polling phase is executed by polling all the nodes associated with a sink in an impartial way. However, when nodes' positions are known, polling can be done by using a cleverer approach. Mobile nodes can only detect ultrasonic pulses coming from anchor nodes placed in a small area above them, so that when the sink commands anchor ANj to transmit the ultrasonic pulse, it subsequently polls only mobile nodes which were before localized near ANj. Adopting this technique, which works under the hypothesis of slow movements, only few nodes are polled: therefore the duration of the polling phase is reduced.

2.5. Position Fixing

When at least three time-of-flight measurements of the same mobile node are collected, a trilateration algorithm can be used to estimate node position [18].

Assuming the speed of sound equal to , distances of the mobile node from the anchor nodes are calculated. Heights from the ground are considered fixed, that is, each mobile node's height is known by the system and does not change during time. This hypothesis is easily fulfilled, for example, when mobile nodes are attached to racks, trolleys, or forklift trucks: during network start-up, mobile nodes can transmit their heights to the sink. Further improvements to the implemented algorithm will allow to remove this hypothesis.

The first step of the algorithm is to calculate the intersection points of the three time-of-flight-radius spheres: by projecting everything onto the plane where the mobile node lies (the height from the ground of anchor nodes and of the specific mobile node is used now) we will consider circles instead of spheres. The radius of a circle is tightly related to time-of-flight-radius, so we will use the same notation. Due to errors or inaccuracies during ToF calculation, this first step can give rise to three cases: (i) all the circles intersect, so there are six intersection points, (ii) not all the circles intersect, so there are four intersection points, and (iii) only two circles intersect.

In the latter case, localization is not possible, while in the first two cases, intersections points are processed in the same way during step two of the algorithm. First, the set of the three or two closest points belonging to different intersections is created. Second, the estimated position is evaluated as the center of mass of the three or two points. Figure 11 exactly shows the result when all the time-of-flight-radius spheres intersect. The grey triangle is created by the three closest points of the intersecting circles (marked with triangles) and the estimated position is its center of mass (black dot).

3. Experimental Results

The test activity had two main objectives. The first one aims at evaluating the actual characteristics of the radio-modems adopted for our WSN. Specifically, the goal was to better characterize the coverage area and interference immunity offered by radio devices under different operating conditions. The second group of tests was carried out in order to estimate the accuracy in determining MNs' position achievable with the adopted localization algorithm. Concerning the coverage area and interference immunity, a number of tests were performed on a floor of a building, with several offices and laboratories.

To estimate the coverage area of the radio-transceiver, a set of measurements has been collected on a floor of the building housing our department. The floor is formed by two rows of contiguous offices and laboratories, separated by a passageway. In particular, walls between rooms are built with reinforced concrete, while walls between the passageway and rooms are glass panels: the environment can be considered as quasiopen space. The sink was placed in the middle point of the passageway.

When packets are transmitted by using the maximum power (15 dBm), the coverage area extends to about 25 m in every direction from the node, and allows to cover the entire floor using a single sink. It has been measured that 95% of the floor area is covered also by transmitting at 6 dBm, which allows to save batteries. Furthermore, long-distance measurements, performed under a quasifree space condition, highlighted a maximum transmission range of about 500 m. This proves that, within an open space (e.g., a storeroom, a hangar), a node may be about 150–200 m away from the sink, therefore, as long as the sink is suitably placed, the WSN may cover an area of about 25000 m2.

From the percentages reported in Tables 1, 2, and 3, it can be noted that for some high power levels there is a decrease in the number of received packets: this effect is caused by interferences owing to stronger reflective and scattering effects of walls and objects. The above-considered multipath and shadowing effects are the only ones that generate interference. Increasing the number of nodes has no effects on the number of correctly received packets, since the multiple access scheme is based on polling.

The interference immunity was evaluated by studying the capability of rejecting cochannel and adjacent-channels interferences. The tests were carried out with the help of another radio-transceiver, suitably programmed in order to generate signals at the same frequency or on an adjacent channel. Cochannel tests were performed using different pseudocodes, while during adjacent-channel tests, the main and the interfering signal exploit the same pseudocode. In both cases, a good interference immunity has been proved. Table 4 reports the number of correctly received packets when an interfering signal is present on the same channel, but with a different pseudonoise spreading sequence. Moreover, the effects of an interfering signal on an adjacent channel, with the same pseudonoise spreading sequence, are summarized in Table 5. Both sets of results confirm a good level of immunity to interferences.

Finally, to evaluate the performance of the ultrasonic localization subsystem, a reduced testbed has been adopted. Four ANs have been attached to the ceiling of our laboratory and one MN has been moved inside the area below them. Figure 12 shows the position estimation of a still MN; Figure 13 shows instead the tracking of an MN moving along a path. The position of a motionless node falls in an area of about 1 cm2: this is due to random ToF measurements errors. The tracking of an MN moving along a path shows greater errors, which are however always less than 20 cm.

Owing to the narrow beams of the ultrasonic emission devices and receivers, ceiling height and the height of the MNs affect the ultrasonic coverage area of each AN. Specifically, with a ceiling height of about 3 m, the coverage area of each installed AN is approximately a circle of 2.5 m radius.

4. Simulation Results

To evaluate the performance of the localization system in a working WSN based on the architecture described in the previous sections, some simulations have been conducted. The simulation program has been written in Matlab and the most important parameters involved in simulations are listed in Table 6. Two different strategies can be used to poll ANs.

In the “raster scan” strategy all ANs are polled at every cycle using a raster scheme (i.e., scanning them row by row) before switching to the polling phase dedicated to collect data from mobiles. With the “smart scan” strategy, only those ANs are polled that are in the neighborhood of the previously estimated positions of the MNs. All other anchor nodes are not polled, so the time elapsed between two localizations is reduced. This approach works well when in the WSN field area there are few MNs or when they cluster in small regions. The improvement of the “smart scan” approach vanishes when MNs are equally distributed within the controlled area. To take into account new MN nodes that enter the system, a “raster scan” polling is periodically performed to discover the positions of new nodes.

Figure 14 shows the tracking of 6 MNs moving at different speeds within the area covered by the localization system.

Figures 15, 16, 17, and 18 and Tables 710 show the tracking errors and their statistics for two kinds of simulations: 6 MNs all moving at 1 m/s and 6 MNs moving at 0.1 0.5 0.9 1.25 1.6 2  m/s. As can be seen in the figures, the error is always less than 0.2 m (only two points go over this value).

When a simulation with all nodes moving at equal speed is considered, Tables 7 and 8 show that using the “smart scan” strategy errors are a bit lower than when the “raster scan” strategy is used. Furthermore, within the same simulation time, we get about 60 localizations by using the “smart scan” strategy, while 33 localizations are performed by using only the “raster scan” strategy. The advantage of the “smart scan” polling is that the system can perform a more precise tracking of MNs, because it spends less time during the AN polling phase.

Considering now the simulation with MNs moving at different speed, we can see that we get very small errors for nodes moving slowly, while errors slightly increase for nodes moving faster.

Considering both simulations and real experiments it must be highlighted that refresh rate limits are due to the physical system used to perform localization (i.e., ultrasounds) and not to the communication or channel access protocol. Anchors cannot be polled faster than the time needed by the ultrasonic pulse to travel from the AN to the farthest point of its coverage area. Performance can be probably improved further by polling ANs in smarter ways (e.g., more than one, but not adjacent, AN at the same time), but a lower limit to the polling rate always exists.

5. Conclusions

The paper presented an original WSN, designed and implemented for facing localization needs in an indoor environment. The network operates according to a single-hop transmission scheme: a sink coordinates all the anchor nodes and mobile nodes to localize the latter; furthermore, other nodes with different “identities” (e.g., to measure temperature) are handled by the network.

Measurements have proved that, by using the hardware and the algorithms described here, a sink can control an open-space area of about 25000 m2; moreover, the precision achieved by the ultrasonic localization subsystem is about 2 cm for still MNs and 15 cm for mobile ones.

The precision obtained by measurements is very close to the one provided by simulation: the mean errors along specific paths are between 2 and 5 cm, while the absolute maximum error is limited to about 20 cm. Furthermore, simulations proved that the precision of the system can be slightly improved by adopting a smarter polling strategy. A lower limit for polling rate always exists and is caused by the propagation speed of ultrasonic pulses.

A possible evolution we are considering consists of using a multihop protocol to organize the network in a hierarchical framework. In this way, data coming from sinks are collected by a higher level where nodes act as data concentrators. This approach can be repeated in a pyramidal way to deliver data to a unique control point.

Acknowledgments

This work was partially supported by the Italian Ministry of Education and Research (MIUR), within the framework of the AIBER project. The paper is an extended version of an invited contribution presented at IMMERSCOM 2007, Bussolengo (Verona), Italy.