[Tinyos-help] [Q] Measuring of round trip time between two motes
Chong Hui Kim
chkim at rtcl.kaist.ac.kr
Tue Dec 26 14:10:04 PST 2006
Maybe, you thought that my purpose was to compute distance between two motes.
I have no interest in deciding distance. Rought distance could be estimated using RSSI.
I want to decide minimum transmission period over the radio to control the small motors remotely.
Hence control value should be transmitted over the radio every control period as soon as quickly.
But in my experiments, when control period is 50ms, 100ms, and 500ms, mean average elapsed time from callling SendMsg.send() to ReceiveMsg.receive() event is about 22ms, but 14ms for 1000ms control period.
For maximum elapsed time is about 35ms for 50ms, 100ms, and 500ms control periodes, but 20ms for 1000ms periods.
For minimum elapsed time is about 10ms for four control periods.
I could not explain why 1000ms control period showed significantly different characteristic.
(Control period means every transmitting period over the radio. It should consider transmitting and receiving time. Since propagation delay is nearly zero, I also think that most of time is spent to back-off time and accessing CC2420 chip via SPI interface.)
----- Original Message -----
From: Aditya Bhave
To: Chong Hui Kim
Sent: Wednesday, December 27, 2006 12:59 AM
Subject: Re: [Tinyos-help] [Q] Measuring of round trip time between two motes
Youre asuming that each sending mote backs off only once. In fact the backoff time goes on increasing as more and more successive collisons are detected by the transmitter (isnt that how BMAC works? ). That should explain why the maximum reqd time is not necessarily 18ms. Hence from the time the TX mote decides to send a signal
Time = Time spent in backoff phase (which cannot be predicted) + time spent in sending the signal over the radio + one-way prop delay (0) + time required to read the receive buffer (2.4ms) at the RX mote + time spent in backoff phase at RX mote (again cannot be predicted) + time spent in sending the Acknowledgment over the radio at RX mote + one-way propagation delay back to sender (0) + time required to read the ACK from the receive buffer at TX mote.
As you can see from above, since the actual prop delay is zero, you will not get correct results. Several motes will possibly appear to be at the same distance from the sender when in fact they are not.
On 12/26/06, Chong Hui Kim <chkim at rtcl.kaist.ac.kr> wrote:
Thank you for your comments.
In my question, there is confused terms of round trip time.
As you commented, round trip time of radio waves is very small. Hence it is negligible.
In my question, round trip time means that hardware control time using SPI for TX and RX, initial and congestion random back-off time in B-MAC, and propagation delay.
In my experiment, round trip time includes propagation delay, initial back-off time, congestion back-off time in B-MAX, and SPI communication time between MSP430 and CC2420. Usually, back-off time is about 6.6ms and reading time of received buffer of CC2420 is about 2.4ms for 8 bytes payload. Hence I thought that maximum required time would be (6.6+2.4) + (6.6+2.4) + negligible round trip propagation time = 18ms. But in experiments it often required about 30ms ~ 38ms.
How do you think about this?
Chong Hui Kim.
----- Original Message -----
From: Aditya Bhave
To: Chong Hui Kim
Sent: Tuesday, December 26, 2006 11:45 PM
Subject: Re: [Tinyos-help] [Q] Measuring of round trip time between two motes
I dont think thats the the right approach. Radio waves travel much too fast and the difference is far too small to be measured using the timer on the motes. (the resolution is not small enough). What do you mean by "control period" and how did u manage to calculate the answer in ms??
To do ranging you can employ one of two methods
1. Radio signal strength indicator (RSSI): Let the TX mote transmit a radio ignal. The strength of the signal received by a mote is related to the distance between it and the TX mote. Ive forgotten the formula but you can look it up.
2. Acoustic ranging: Instead if transmitting a radio wave, measure the time between sending a sound wave and getting a reply sound wave. Sound waves travel much much slower and the time difference can be measured with the motes's timers. You will need a buzzer on the mote for this however,
On 12/24/06, Chong Hui Kim <chkim at rtcl.kaist.ac.kr> wrote:
Dear all,
I have measured round trip time between two motes using Timer B.
I called one mote was TX mote and the other was RX mote.
To measure the round trip time, I read the Timer B register of "TX mote" before call SendMsg.send() the Timer B register of "TX mote" after ReceiveMsg.receive() event, and computed the difference of two time values.
In my experience, I set the control peiord as 50ms, 100ms, 500ms, and 1000ms.
For 50ms, 100ms, and 100ms, average round trip time was 22ms, max time was about 35ms, and min time was about 9.6ms.
For 1000ms, average round trip time was 14.5ms, max time was about 19ms, and min time was 9.6ms.
I found that average and max round trip time decreased for 1000ms period.
How can I explain this result?
Thanks in advance,
Chong Hui Kim.
_______________________________________________
Tinyos-help mailing list
Tinyos-help at Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
--
regards,
Aditya Bhave
--
regards,
Aditya Bhave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20061227/372832ec/attachment.htm
More information about the Tinyos-help
mailing list