Greg’s RF Coordinate Tracker

Gregory Parsons

CSC 714 - Fall 2005

http://www4.ncsu.edu/~gsparson/CSC714/

 

Problem Description

This project will attempt to utilize the Radio Frequency (RF) Signal Strength Detector (SSD) to enable a collection of Telos Motes (rev. B) to autonomously determine each mote’s relative position in a three dimensional space.

 

 

 

The ability to track multiple objects in a three-dimensional space would have numerous possible applications. For example, it could be used to track a machine at work to determine if it is moving beyond its predicted bounds. It would enable sensor networks to be quickly deployed in unfamiliar environments because the network itself could then automatically determine where all the individual sensors have been deployed. It could also be used to determine the perimeter of a large object and thus its size and shape. Finally, it would enable a deployed sensor network to also track movement or deformation of the environment, such as on a bridge or in a tunnel.

 

Problem Solution

Figure 1: Mote RF Network Diagram

 

Network Construction

All motes are initially off except for the base-station mote that is plugged into a PC and initialized appropriately to begin pinging the wireless channel. Every other mote is then turned-on or reset in the order that the token will be passed. Each node will listen to the channel for five token cycles to determine the next usable token slot and then announces which slot it has taken.

 

Network Operation

The base-station is responsible for token creation and passes it on simply by transmitting a single packet with its slot number in the correct field. Upon receiving a packet, every mote will first record the received signal strength from the transmitter. Then, each mote will determine if it has been passed the token by checking to see if the slot number of the transmitter precedes its own.

 

After a complete token cycle, each mote will have a filled array representing the received signal strength at this mote from every other mote. It is this array, squeezed into a single packet, which will be transmitted by each mote during the subsequent token cycle to be collected by the base-station and relayed to the PC. Therefore, after each complete token cycle, the PC will have a freshly generated two-dimensional array representing bi-directional signal strength measurements from every node to every other node. For example, with four motes the array will be 4x4.

 

Distance

Deriving the distance between motes given values collected from the current signal strength register (RSSI) is particularly difficult because of the unusual nature of RF communication. It is suspected that constructive and destructive interference is taking place as the motes are moved about in the environment and the radio waves bounce from various objects to the receiving motes, either constructing (the two waves are in sync, producing a loader signal) or destructing (the two waves are inverted, producing a muted signal). What this means is, several distances produce exactly the same signal strength reading (see Figure 2). My experimentation has not found any work-around for this problem so I have moved on utilizing two straight-line approximations, one for close readings greater than 253, another for far away readings lower than 253 (the two lines just happen to cross at 253).

Figure 2: RSSI Register Reading vs. Distance (ft)

 

Triangulation

Once the signal strength matrix has been properly constructed on the PC, it can begin attempting to derive mote positions. The first three motes attached to the network become the base stations from which trilateration will take place (R1, R2, and R3 in Figure 3 below). The mote attached to the PC, R1, forms the origin of the three dimensional axis. The virtual line from R1 to R2 forms the virtual x-axis and all these base stations form the virtual z-plane (see Figure 3). 

 

Figure 3: Deriving the origins of a three dimensional space

 

The next step is to mathematically derive the positions of the three base station motes. R2 is easy, being on the x-axis, because its x-coordinate is equal to its distance from the origin, which is occupied by R1. Secondly, we must compute the x and y-coordinates of R3 using Equation set #1, shown below. D1,3 represents the distance between R1 and R3 while D2,3 represents the distance between R2 and R3. First, subtract the second equation from the first and solve for i. Then substitute this answer back into the first equation and solve for j. If the answer is the square root of a negative number then no rational answer exists.

 

Equation set #1: Used to derive the position of mote R3 (see Figure 3)

 

Now that the position of all base stations has been calculated, we can begin solving for the position of the numerous target motes (see Figure 3 above). The position of each target mote is solved individually based on its perceived distance from the three base stations using Equation set #2, shown below. Conceptually, this mathematically technique is based on three imaginary spheres with an origin at one of the three base motes and whose radius is equal to the perceived distance between this base mote and the target mote (Rt). Anywhere the three spheres intersect is a possible answer. If any one of the spheres does not intersect, then one of the coordinates generated will be imaginary (square root of a negative number).

 

Equation set #2: Used to derive the relative position of a target mote (Rt)

 

Approach Outline

  1. Use solution from Homework #3 to get serial communication functioning
  2. Use sample code from Dr. Mueller to get wireless communication functioning
  3. Implement a token-ring styled networking architecture with unlimited Nodes
  4. Unify all the above steps to render the necessary data onto the PC
  5. Determine the relationship between distance and signal strength
  6. Implement geometry necessary to triangulate a usable position for every Mote in a three dimensional space

 

Current Status

Currently, all steps have been completed. I have created a novel technique to allow up to 10 Motes to self organize into a token-ring styled networking architecture to ensure complete data collection from every Mote. I have experimented with as many as eight motes on the network at a single time. However, step 5 leaves a lot of room for improvement (see Open Problems below).

 

Solved Issues

My first attempts at using the wireless network available on the Mote architecture was with the GenericComm files. The resultant network worked, but for some reason was unable to properly read the current signal strength register (RSSI). Later, I was successful by switching to the CC2420 library using an available sample application to assist with the wiring of the various modules.

 

Another issue involved overflowing of the RSSI register when the transmitting mote was too close to the receiving mote. This problem has been corrected at the base-station by adding 256 to obviously overflowed readings. This solution is preferable to a previous solution because it does not reduce the transmission power and therefore results in a more accurate resolution when calculating distance.

 

A partially solved issue is the poor resolution of the RSSI register and line-of-sight interference from objects around or perhaps between the transmitter and receiver motes. I have compensated by dramatically increasing the number of data points being collected. First, the network is now measuring each mote connection twice by having the motes take turns sending and receiving to each other and then averaging the two results. This will cut down on transient interference as well as mote-specific variables, such as low batteries. Secondly, more motes have been introduced to the triangulation network, each one exponentially increasing the quantity of usable data points.

 

Future Work

The biggest flaw in this system is the inaccurate nature of using signal strength to determine distance. One possible solution involves taking advantage of the avalanche of data points already being generated by the network but are not currently being utilized. By taking advantage of an increased quantity of data points the error could be tracked down or simply marginalized. This would also make the network accuracy scaleable because each additional mote would exponentially increase the number of data points available and thus the accuracy. Numerous problems could arise while attempting to implement such a system, however. The most glaring would be exponentially increasing computational complexity, as the problem set grows ever deeper. It would be interesting to see at what point the PC becomes the limiting component.

 

A second possible solution to the network’s inaccuracy is potentially making the broadcasting signal strength vary depending on environmental and network conditions. It might result that simply reducing signal strength overall would non-linearly reduce constructive and destructive radio-frequency interference. 

 

Usage

For information on installation and usage of the various elements of this project, see the Readme.txt file here:

http://www4.ncsu.edu/~gsparson/CSC714/Readme.txt

 

The entire project can be downloaded here:

http://www4.ncsu.edu/~gsparson/CSC714/gsparson.zip

 

 

References

Telos mote sample code was utilized extensively in this project,

Telos (rev B) Datasheet - http://www.moteiv.com/products/docs/telos-revb-datasheet.pdf

Wikipedia: Law of Cosines - http://en.wikipedia.org/wiki/Law_of_cosines

Wikipedia: Trigonometric Functions - http://en.wikipedia.org/wiki/Trigonometric_Functions

Wikipedia: Trilateration - http://en.wikipedia.org/wiki/Trilateration