<< Chapter < Page Chapter >> Page >
You have seen that the strength of a link can not be easily predicted as a function of the distance between sender andreceiver, especially indoors. You will now discover the relationship between the RSSI of a link and its probability. Wedefine link probability as the portion of the messages sent by the sender which are successfully received at the receiver. You will see that link probability isstrongly correlated to the RSSI.

The experimental setup goes as follows. You will use to boards, a sender and a receiver. The sender continuously sends bursts of 100 messages, each containing a counter which increases from 1 to 100. Out of those 100 sent messages, the receiver may only receive 40. It will count the number of received messages until the counter reaches 100, or until the counter loops back to a smaller value. When this happens, the receiver outputs the number of received messages, i.e. the probability of the link.

At the same time as the receiver counts the number of the received messages, it calculates the average RSSI over those 100 messages, which it outputs togetherwith the link probability. Finally, to allow for the receiver to output these statistics (which takes some time), after each burst of 100 messages, the sender sends 20messages with counter set to 101.

To implement this:

  • Reprogram two boards with the code taken from the listing below Alternatively, this code is available in the downloadable source code . Open source_code/iar_v4.11/lab_ezwsn.eww with IAR. The project corresponding to this section is called txrx_probability . .
  • Attach one board to the host computer, and read the output from COMx using PuTTY;
  • Power the second board from the battery unit and press the button; this will cause that board to transmit the bursts of 100 messages. You can read the statistics using PuTTY.
  • Reprogram the sender node by changing line P1IFG&= ~0x04; by P1IFG |= 0x04; . This causes a continuous stream of messages. Power the newly programmed node on the battery pack and press the button; the red LED flashes.
  • On the receiver side, verify with PuTTY that you are receiving continuously. Close PuTTY.
  • Open Cygwin, and enter cat /dev/comx>probability.txt . This logs the output in a file.
  • Walk away with either node to record data for low RSSI values. Press (Ctrl+C) in Cygwin to stop the logging process.
  • Start XLaunch . In Cygwin, type export DISPLAY=127.0.0.1:0.0 .
  • In Cygwin, enter gnuplot , then plot "probability.txt" using 1:2 . This plots the probability as a function of the RSSI, make sure to obtain a graph similar to the one in the figure below.

#include "mrfi.h" uint8_t counter, num_received, bool_counting;int16_t cumulative_rssi; mrfiPacket_t packet;void print_probability(int16_t cumulative_rssi, uint8_t number) {char output[] = {" 000 0.00\n"};if (cumulative_rssi<0) { output[0]='-'; cumulative_rssi=-cumulative_rssi;} output[1]= '0'+((cumulative_rssi/100)%10); output[2]= '0'+((cumulative_rssi/10)%10); output[3]= '0'+ (cumulative_rssi%10); output[5]= '0'+((number/100)%10); output[7]= '0'+((number/10)%10); output[8]= '0'+ (number%10); TXString(output, (sizeof output)-1);} int main(void){ BSP_Init();P1REN |= 0x04; P1IE |= 0x04;MRFI_Init(); P3SEL |= 0x30;UCA0CTL1 = UCSSEL_2; UCA0BR0 = 0x41;UCA0BR1 = 0x3; UCA0MCTL = UCBRS_2;UCA0CTL1&= ~UCSWRST; MRFI_WakeUp();MRFI_RxOn(); __bis_SR_register(GIE+LPM4_bits);} void MRFI_RxCompleteISR(){ P1OUT ^= 0x02;MRFI_Receive(&packet); counter = packet.frame[9]; if (counter==101) {if (bool_counting == 1) { print_probability(cumulative_rssi/num_received,num_received);} bool_counting=0;num_received=0; cumulative_rssi=0;} else { bool_counting=1;num_received++; cumulative_rssi+=Mrfi_CalculateRssi(packet.rxMetrics[0]); }} #pragma vector=PORT1_VECTOR__interrupt void interrupt_button (void) {P1IFG&= ~0x04; P1OUT ^= 0x01;mrfiPacket_t packet; packet.frame[0]=8+3; for (counter=1;counter<101;counter++){ packet.frame[9]=counter; MRFI_Transmit(&packet, MRFI_TX_TYPE_FORCED); }for (counter=0;counter<20;counter++){ packet.frame[9]=101; MRFI_Transmit(&packet, MRFI_TX_TYPE_FORCED); }}

Some keys to understand the code:

  • Line 55. When the button is pressed, the board continuously sends bursts of 100 messages followed by 20 "guard" messages.
  • Line 61. The format of a packet is presented in 4.2. Simple Tx/Rx . packet.frame[0] is the length field, which sets the payload length at 3 bytes (minimum accepted value).
  • Line 63. packet.frame[9] is the first byte of the payload.
  • Line 43. bool_counting indicates whether the statistics have already been printed out (without this semaphore, as there are 20 guard messages, the statistics would be printed out 20 times)

As shown in hte figure below, link probability is closely correlated to RSSI. The theory tells us that, at very low RSSI, link probability is very close to 0; at very high RSSI it isclose to 1. Between those extremes, there is a linear slope, shown as an overlay in the figure below.

success_vs_rssi

Questions & Answers

What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
Adin
why?
Adin
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
Praveena Reply
what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
Damian Reply
absolutely yes
Daniel
how to know photocatalytic properties of tio2 nanoparticles...what to do now
Akash Reply
it is a goid question and i want to know the answer as well
Maciej
characteristics of micro business
Abigail
for teaching engĺish at school how nano technology help us
Anassong
Do somebody tell me a best nano engineering book for beginners?
s. Reply
there is no specific books for beginners but there is book called principle of nanotechnology
NANO
what is fullerene does it is used to make bukky balls
Devang Reply
are you nano engineer ?
s.
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
Tarell
what is the actual application of fullerenes nowadays?
Damian
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
Tarell
what is the Synthesis, properties,and applications of carbon nano chemistry
Abhijith Reply
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
NANO
so some one know about replacing silicon atom with phosphorous in semiconductors device?
s. Reply
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
Do you know which machine is used to that process?
s.
how to fabricate graphene ink ?
SUYASH Reply
for screen printed electrodes ?
SUYASH
What is lattice structure?
s. Reply
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
Sanket Reply
what's the easiest and fastest way to the synthesize AgNP?
Damian Reply
China
Cied
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!





Source:  OpenStax, Ezwsn: experimenting with wireless sensor networks using the ez430-rf2500. OpenStax CNX. Apr 26, 2009 Download for free at http://cnx.org/content/col10684/1.10
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Ezwsn: experimenting with wireless sensor networks using the ez430-rf2500' conversation and receive update notifications?

Ask