Welcome to the uracoli Blog

µracoli stands for microcontroller radio communications library and is intended to be a package that demonstrates capabilities and usage of Atmel's IEEE-802.15.4 radio transceivers AT86RF{230,231,212} in combination with AVR 8 bit microcontrollers (e.g. ATmega16, ATmega1281, ATmega128RFA1, ...).

Montag, 24. Mai 2010

Understanding ED/LQI values

I decided this rainy monday afternoon to have a closer look into the relation between LQI and ED values delivered from the radio transceivers.
The test setup consists of one of Daniels brand new Arduino compatible boards with the DE RFA1 module and an ordinary RCB230. The output of the range test application xmpl_radio_range.c was recorded to a logfile. Daniels board was used for recording and did not move. The RCB230 was moved around during test in house and garden. 657 records of this type was logged:
---
:sta 0x0010 seq 230 key 1 lqi 192 ed 0 rxd 585 lost 397
:sta 0x0010 seq 231 key 1 lqi 92 ed 0 rxd 586 lost 397
:sta 0x0010 seq 232 key 1 lqi 172 ed 0 rxd 587 lost 397
:sta 0x0010 seq 233 key 1 lqi 255 ed 0 rxd 588 lost 397
---
Interesting are the columns 8 and 10, which show the values of LQI and ED. With a small python script a dictionary was created, that counts all occuring combinations of LQI and ED values.

{(60, 0): 1, (76, 0): 1, (88, 0): 1, ... }

In total 75 different ED/LQI combinations was observed. The data was fed into matplotlib and the resulting picture looks so:



Now the conclusion of this initial look is, that
a) if the LQI value drops below 255, the ED value is 0
b) for all ED values > 0, the LQI is almost always 255.

Since all ED/LQI pairs came from frames received with valid CRC, the next step in this experiment is to show the dependency of ED/LQI in relation to the packet error rate. ... to be continued

PS: Here is the script, that was used for generating the image:
import sys
from matplotlib import pyplot as pl
f = open(sys.argv[1])
hist = {}
for l in f.readlines():
x = l.split()
lqi = eval(x[7])
ed = eval(x[9])
key=(lqi,ed)
try:
hist[key] += 1
except:
hist[key] = 1

lqi_ed = hist.keys()
lqi_ed.sort()
pl.plot(lqi_ed)
pl.grid(1)
pl.legend("LQI ED".split())
pl.xlabel("LQI/ED pair")
pl.ylabel("LQI/ED value")
pl.show()

Keine Kommentare:

Kommentar veröffentlichen