WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2007-Jun-18 11:14:44

vikasg
Member
Registered: 2007-Jun-16
Posts: 14

RSSI & TxRate

I am trying to adapt the transmission rate based upon received RSSI. So how can I (using which function) manipulate the transmit rate?
I am having a setup in which Tx and Rx are with in a range of 1.5 meter. and the received RSSI which is 1023 for every packet ( using WarpRadio_RSSIData() function). Is it correct or there is some other way of finding the RSSI?

Last edited by vikasg (2007-Jun-18 11:16:16)

Offline

 

#2 2007-Jun-18 12:38:58

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: RSSI & TxRate

We need to know more about your setup to help. What hardware design are you using (i.e. is it the latest OFDM reference design)? How are you trying to adjust the transmit rate- by changing the modulation scheme (i.e. QPSk vs. 16-QAM to change the PHY datarate), or the inter-packet times of transmitted packets?

Offline

 

#3 2007-Jun-18 17:43:28

vikasg
Member
Registered: 2007-Jun-16
Posts: 14

Re: RSSI & TxRate

I have been using the hardware design given in warpmac_labs at  http://warp.rice.edu/bigFiles/warpmac_labs.zip.

I am trying to explore ways to improve transmission rate and so would like to try all possible methods- modulation scheme etc.

1. Could you suggest me methods and possible C files by which I could manipulate the transmission rate?

2. Moreover is the RSSI value 1023 a valid number as on the internet, I have found much lower ranges of values of RSSI

[ I am using the following code to print the RSSI value whenever any packet is received i.e. in receiveGoodPacket() and receiveBadPacket():   

     short y = WarpRadio_RSSIData(XPAR_RADIO_CONTROLLER_0_BASEADDR,FIRST_RADIO | SECOND_RADIO);
     printf("RSSI = %d    \n",y);
]

3. I believe that the at the present, the code is such that the radio transmits at a constant rate. Is that correct? Are there any adaptation codes built for WARP which can adjust the transmission rate based on error rate or rate of time-outs (on ACKs)?

Offline

 

#4 2007-Jun-19 15:53:52

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: RSSI & TxRate

First, I would strongly encourage you to use the hardware platform included in the latest OFDM reference design. The version of the PHY from the workshop labs is older and not entirely compatible with the latest WARPMAC framework and MAC code.

1) The current version of the PHY supports BPSK, QPSK and 16-QAM modulation. The transmitter and receiver must both be configured to use the same modulation schemes; the receiver does not currently support extracting this information from the header. We're working on an updated PHY that supports this.

2) RSSI takes values in [0,1023] (it's a 10-bit ADC output). We've seen real-world values in approximately [100,900]. A value of 1023 (i.e. all ones) is likely a symptom of a bug somewhere in the code or hardware. The workshop labs are based on older radio controller, bridge and OFDM cores, so it's difficult to say exactly what the problem is. Again, I'd suggest using the latest design.

3) The reference code doesn't include any auto-adaptation, though this functionality can be built in C code on top of WARPMAC and our MAC implementations.

Offline

 

#5 2007-Jun-25 14:04:34

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: RSSI & TxRate

The new OFDM PHY with support for per-packet modulation selection is part of the new OFDM Reference Design.

Offline

 

#6 2007-Jun-26 17:00:00

vikasg
Member
Registered: 2007-Jun-16
Posts: 14

Re: RSSI & TxRate

Could you please suggest, which C functions to use for altering the inter-packet times... I tried but didn't find any such function.
Thank you.

Offline

 

#7 2007-Jun-27 01:50:09

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: RSSI & TxRate

In our reference designs, packets are transmitted whenever they arrive on the Ethernet interface. The wireless MAC will also re-transmit a packet if no ACK is received. You'll have to customize the MAC code to implement whatever packet transmission timing you want. You can use an opb_timer or usleeps to time & trigger events, if needed.

Offline

 

#8 2007-Jun-28 18:22:16

vikasg
Member
Registered: 2007-Jun-16
Posts: 14

Re: RSSI & TxRate

In our implementation, we want every node to have information about its optimal transmission rates to all the remaining nodes. For collecting this information, a node (say C) can either overhear communication between two other nodes, say A to B, (so as to find C's optimal txRate to A according to RSSI of these overheard packets) or it can manipulate its txRate to any node according to number of retransmissions for a successful delivery of a packet (to that node).

Which metric would you suggest for the same, RSSI or number of retransmissions or could you please suggest any other metric ?

However we searched for some concrete correlation between RSSI and txRate but didn't find any.

Offline

 

#9 2007-Jun-29 10:25:07

chunter
Administrator
From: Mango Communications
Registered: 2006-Aug-24
Posts: 1212

Re: RSSI & TxRate

Reading RSSI isn't a good metric, since it's an instantaneous measurement of received energy. If you're reading it before transmitting or after a PHY interrupt (likely, since the PowerPC doesn't know when the medium is busy), it's also a measurement of energy during an idle period. As you found, these readings won't correlate with network throughput.

The PHY (as of reference design v04) provides a register that reports the AGC gain values per-packet for exactly this sort of application. This is our best proxy for average SNR on packet timescales. Use this function to read the gain register in the good packet interrupt handler:

ofdm_TxRx_mimo_ReadReg_Rx_Gains(OFDM_BASEADDR)

This will return a 15-bit number, composed of:

bits[14:0] = [ AntB_RFG[1:0] AntB_BBG[4:0] 0 AntA_RFG[1:0] AntA_BBG[4:0] ]

For SISO systems, you only care about the AntA numbers. You combine the two gain values according to this formula:

TotalGain = 15*(RFG-1) + 2*BBG

The result is roughly inversely proportional (in dB) to a received packet's SNR.

How you use this is an open research question and depends entirely on what questions you're trying to answer. One possible use is a protocol like one we have developed at Rice known as Opportunistic Auto Rate (OAR). In any case, please keep us updated on what you find.

Offline

 

#10 2007-Jun-30 15:03:37

Scott
Member
From: Houston, Texas
Registered: 2006-Oct-01
Posts: 19

Re: RSSI & TxRate

Hey Chris,

What library is the function:
ofdm_TxRx_mimo_ReadReg_Rx_Gains(OFDM_BASEADDR)

defined in? Can't see to fins it in the ofdm_TxRX_mimo/ofdm_Tx_mimo/ofdm_Rx_mimo libs included in the CSMA_MAC project...

Thanks!

Offline

 

#11 2007-Jun-30 19:43:13

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: RSSI & TxRate

ofdm_TxRx_mimo_ReadReg_Rx_Gains is a macro, defined in the OFDM core's driver (in /drivers/ofdm_TxRx_mimo_opbw_v1_25_a/src/ofdm_TxRx_mimo.h). This function is new in v04 of the OFDM Reference Design.

Offline

 

#12 2007-Jul-09 14:59:34

Scott
Member
From: Houston, Texas
Registered: 2006-Oct-01
Posts: 19

Re: RSSI & TxRate

chrishunter wrote:

This will return a 15-bit number, composed of:

bits[14:0] = [ AntB_RFG[1:0] AntB_BBG[4:0] 0 AntA_RFG[1:0] AntA_BBG[4:0] ]

For SISO systems, you only care about the AntA numbers. You combine the two gain values according to this formula:

How would you suggest these bit values be picked out from the C-level? Currently I'm looking at using Bit Fields - it seems to be all I can find on the subject, but would you happen to know of a more efficient way of achieving this?

...perhaps masking+bit shifting...

Offline

 

#13 2007-Jul-09 15:16:32

Scott
Member
From: Houston, Texas
Registered: 2006-Oct-01
Posts: 19

Re: RSSI & TxRate

OK - so masking and bit-shifting is the way to go. Ignore my prior inquiry.

Offline

 

#14 2007-Aug-09 13:04:51

Scott
Member
From: Houston, Texas
Registered: 2006-Oct-01
Posts: 19

Re: RSSI & TxRate

Picking up both Instantaneous RSSI + Calculated Gain readings - works great!

Offline

 

#15 2007-Aug-11 07:22:33

vikasg
Member
Registered: 2007-Jun-16
Posts: 14

Re: RSSI & TxRate

We have been trying to make some measurements.

In our experiments, we have been trying to measure total gain and RSSI with varying distance. What we have found is that the total gain does not vary much and RSSI shows a wavy trend. The distances have varied from 50 inches to around 850 inches and we have measured at every 50 inches. The experiment was conducted both outdoors and indoors.

Could you please share some of your results with us and the details of your experiment?  How have you changed the channel conditions? Have you changes the distance between the sender and receiver? We would like to hear from  you.

Thank you.

Offline

 

#16 2007-Aug-12 18:34:23

Scott
Member
From: Houston, Texas
Registered: 2006-Oct-01
Posts: 19

Re: RSSI & TxRate

Hi vikasg,

We have not run anything to that degree or detail yet. We recently just ran a simple test where we blasted noise on our channel in an on/off manner and used a push-button interrupt to read out the RSSI/Total Gain. I'll try to post the code and specific numerical examples tomorrow morning first thing, but the bottom line is that we found "valid" values (higher than 0, less than 1023) that fluctuated accordingly when noise was on/off. The RSSI reading works at anytime, but to get realistic total gain values out, the a node must be in active receiving (in our case, a simple udp stream).

Offline

 

#17 2007-Aug-13 10:57:47

Scott
Member
From: Houston, Texas
Registered: 2006-Oct-01
Posts: 19

Re: RSSI & TxRate

First, here is our code:

int uphandle() {
//    warpmac_setTargetPlus();
    usleep(100);
    unsigned int rxgain = ofdm_TxRx_mimo_ReadReg_Rx_Gains(XPAR_OFDM_TXRX_MIMO_OPBW_0_BASEADDR);
    // pull off the SISO Values
    // from the forums
    /*ofdm_TxRx_mimo_ReadReg_Rx_Gains(OFDM_BASEADDR)
    This will return a 15-bit number, composed of:
    bits[14:0] = [ AntB_RFG[1:0] AntB_BBG[4:0] 0 AntA_RFG[1:0] AntA_BBG[4:0] ]
    For SISO systems, you only care about the AntA numbers. You combine the two gain values according to this formula:
    TotalGain = 15*(RFG-1) + 2*BBG*/
   
    // create the masks
    int AbbgMASK = 31; //0b0000000000011111 = 31 in decimal.
    int ArfgMASK = 96; //0b0000000001100000 = 96 in decimal.
    int ArfgSHIFT = 5;
   
    int Abbg = (rxgain&AbbgMASK);
    int Arfg = (rxgain&ArfgMASK)>>ArfgSHIFT;
   
    int tgain = 15*(Arfg-1) + 2*Abbg;
   
    xil_printf("\r\nAverage RX Gain: %d", tgain);
   
    short rssidat = WarpRadio_v1_RSSIData(FIRST_RADIO);
    xil_printf("\r\nRSSI: %d", rssidat);
   
}

As far as results go - I'll have to get them a bit later today as the workspace is being used to prepare for a demonstration this morning.

Offline

 

#18 2007-Aug-15 01:59:30

vikasg
Member
Registered: 2007-Jun-16
Posts: 14

Re: RSSI & TxRate

Thank you for providing with the details of your experiment. We would be grateful if you could share some of the results and data of the experiment.
Thank you.

Offline

 

#19 2007-Aug-16 15:09:12

Scott
Member
From: Houston, Texas
Registered: 2006-Oct-01
Posts: 19

Re: RSSI & TxRate

So we ran a slightly basic updated experiment, just using a signal generator to blast noise (no distance readings) - the signal generator was about 10 feet away from the node's antenna:

RSSI Value Readings:
(Using 18dBm noise on the signal generator)

Noise off: ~100-200 units
Narrowband Noise On (~12.5 kilosamples/second): 200-300 units (on same channel)
Wideband Noise (12.5 Mega-samples/second) On: ~800 units (on same channel)
Wideband noise 3 channels away ~400 (due to energy leakage)

Offline

 

#20 2009-Jun-19 14:22:05

ardalan
Member
Registered: 2009-Jun-19
Posts: 5

Re: RSSI & TxRate

Chris,

you have posted here: "For SISO systems, you only care about the AntA numbers. You combine the two gain values according to this formula:

TotalGain = 15*(RFG-1) + 2*BBG

The result is roughly inversely proportional (in dB) to a received packet's SNR."

I assume it means that SNR = a(1/TotalGain)? Do we know a? Can we measure/calculate it?

Thank you very much,

Ardalan

Offline

 

#21 2009-Jun-20 16:46:57

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: RSSI & TxRate

A few things:
-The TotalGain is expressed in dB, so you want to subtract, not divide
-One definition would be SNR_dB = RxPower_dBm - NoiseFloor_dBm, where RxPower_dBm is the power received at the antenna and NoiseFloor_dBm is the inherent noise. But you can only digitally measure the voltages driven into the Rx ADC, after the two amplifiers. For accurate results, I would suggest transmitting a signal of known bandwidth and power, driving this into the Rx radio, settings Rx gains so no clipping occurs, and measuring the magnitude of the signals received digitally. Do this for a few points and, knowing the Rx gains for each, you should be able to calculate the Rx power.

Offline

 

Board footer