Exercise 1 Measurements using Sensor Nodes (Crickets) Clustersize: 5 nodes Challenges: Installation of Sensor Nodes Observation of Distances and Positions Visualisation of the movements Possible Applications: - Indoor Positioning System 50 0-50 50 0 08 07 06 04-50 -50 01 0 Z 50 100 - Tracking of a moving robot -Gaming Application of Cricket Systems
Exercise Goals - Understanding of wireless positioning - Problematic of Distance Measurements using Time of Arrival - Multipath Effect - Using Matlab for Sensor Input - Problematic of Interfaces (RS323 USB COM-Port) - Visualization of the Data
Cricket System of battery powered Crickets based on Ultrasound and Radio Frequency Signal Time Difference Of Arrival (TDOA) Developed by MIT Producer: Crossbow Technologies 14 Nodes available Cricket Node Range: ca. 10 m Accuracy ca. 1-2 cm Installed Cricket System
Cricket Unit
Measurement Principle and Parameters of the Cricket System Cricket consists of location beacons that are attached to the ceiling of a building, and receivers, called listeners, attached to devices that need location. Each beacon periodically transmits information in an RF message. At the same time, the beacon also transmits an ultrasonic pulse. The listeners listen to beacon transmissions and measure distances to nearby beacons, This active-beacon passive-listener architecture is scalable with respect to the number of users, and preserves user privacy. System Parameters: Beacon frequency 1 Hz RF frequency 436 MHz RF transmit power -3 dbm (coverage in a typical indoor environment) RF data rate 19.2 kbps US frequency 40 KHz US pulse duration 150 µs
Communication with a Cricket Node The listener must be attached to an RS232 serial interface configured as follows: Transmission speed 115200 bits/second Data format 8 bits, no parity Flow control Xon/Xoff ( software ) Stop bits 1 Once the beacon or the listener is attached to a host, commands can be issued using a standard serial port utility such as HyperTerminal or minicom.
Distance Measurement Techniques Time-of-flight (TOF) This technique measures the time t taken for some signal to traverse the path between two points (the reference point and the object). If the speed of the signal is v, the distance d is given by d = v * t. For example, GPS uses the time of flight of RF signals to estimate the distance between GPS satellites and the GPS receiver.
Distance Measurement Techniques Time-Difference-of-Arrival (TDOA) TDOA-based schemes measure the distance between given two points using two signals with different speeds that traverse the same path between the two points. Cricket uses TDOA of RF and ultrasonic signals to measure distance to the reference points. Consider two signals A and B with speeds v A and v B sent simultaneously by a transmitter. If v A > v B, then signal B lags behind signal A as they propagate. Let t denote this time lag at a receiver located at a distance d from the transmitter.
Distance Measurement Techniques At normal room temperature and humidity, the speed of sound, v us 344 m/s, and speed of light, v rf 3 10 8 m/s. v RF << v US, d t v us In completely dry air with no humidity, the speed of sound (in meters per second) depends mostly on the absolute temperature T (in Kelvin). It is given by v US = (20.05 * T [ K]). The speed of sound (and the measured distance) changes by 0.18% by 1 degree 0 C Each Cricket measures temperature; use t = (t A + t B ) / 2. Accuracy of ±1 0 C.
Calibration of Distance Measurements distance measurement error as a function of the distance angle to each other
Communication with a Cricket Node The command format is: <directive> <command> <parameters> <directive> G for get and P for put. Configure a Cricket unit to be a beacon 1. Type P MD 1 <return> (P MD 2 configures cricket at a listener) 2. Type P SP Beacon4 <return> to set the beacon s space ID to Beacon4 (or to any other string). The maximum length of the space ID is 8 bytes. 3. Type G CF <return> to check the current configuration; you should find the new space ID and the beacon setting. 4. Save the new configuration to the flash by sending P SV <return>. If you don t save the configuration, the new settings will only remain until the Cricket unit is powered off.
Get Cricket Configuration G CF<return> Result: Cricket configuration: Software version: 2.0 // Cricket software version Mode: Listener / / Running mode (Listener/Beacon) Unique id: 1:c8:6a:b3:a:0:0:dc // Unique Cricket ID Space id: BEACON6 // User-defined space ID Uptime: 16:32:14 // Uptime of Cricket from last power cycle Ultrasound attenuation time(us): 45000 // Time for ultrasound to attenuate Timer Offset(us): 550 // Offset processing time Minimum beacon interval(ms): 668 // Minimum wait time between messages Maximum beacon interval(ms): 1332 // Maximum wait time between messages
Test distance measurements 1. Connect and turn on a Cricket configured as a listener to your host. 2. Turn on a Cricket configured as a beacon. 3. You should now see distance measurements appear in your terminal every time the listener hears from the beacon. The output has many fields; the DB field gives the distance to the beacon. The default units are centimeters 4. Make sure both Crickets are turned on and the test switch is off Example Message: VR=2.0,ID=01:dd:be:be:09:00:00:95,SP=BE-2,DB=224,DR=6479,TM=6789,TS=455424 If the above steps work, you can now use your Crickets to write and run applications!
Reading of Cricket-Data using Matlab clear; obj = instrfind; if (not (isempty(obj))) delete(obj); end s = serial('com1','baudrate',115200,'databits',8); % serial port 1, usb: > 1 fopen(s); fprintf(s,'p MD 2\n'); out = fscanf(s); out = fscanf(s); j=0; for i=1:2 out = fscanf(s); db =regexp(out, 'DB=(?<db>\d*)', 'names'); %extract the range value id =regexp(out, 'SP=BEACON(?<id>\d*)', 'names'); if (size(db,2)~= 0) range = str2double(db.db); idnum = str2double(id.id); if (idnum > 0) j = j + 1; plotrange(j) = range; fprintf('range=%3i[cm] id=%2i original data: %s\n',range,idnum,out); %plot(plotrange); %drawnow; end end end fclose(s);
Literature Literatur: (digital im www.geometh.ethz.ch > Link students (restricted) - Projektarbeit Basisjahr Cricket v2 User Manual http://cricket.csail.mit.edu/ Wireless Sensor Networks Getting Started Guide, Rev. A, September 2005, Crossbow Technology Nissanka Bodhi Priyantha, The Cricket Indoor Location System, PhD Thesis at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY June 2005 Die gefährlichen Örter der Pseudostreckenortung von Thomas Alexander Wunderlich DGK Nr.190 Lorenz Moser, Weiterentwicklung eines Simulators für die Positionierung in wireless ad hoc Netzwerken, Semesterarbeit, Tutor: Jan Beutel, Supervisor: Prof. Dr. Lothar Thiele, ETHZ, Institut für Technische Informatik und Kommunikationsnetze, 2002