WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2009-May-11 12:54:51

s2haile
Member
Registered: 2008-Jan-23
Posts: 14

OFDM on WARPLAB

Hello,

     Just wondering if anyone had any luck getting an ofdm system to work using warplab. I have been testing this for some time now my results are inconsistent. Here's a quick flow below of what I am doing on MATLAB, which is similar to what is used in the reference design.

Generate STS/LTS -> Generate Data -> Constellation map for data -> IFFT -> Add CP -> Scale to [-1, 1] -> Upsample (by 4)and Pass through Square Root Raised Cosine Filter -> Tx/Rx via WARPLAB -> Pass through Square Root Raised Cosine Filter and Downsample -> Coarse Timing Sync using STS-> Fine Timing Sync using STS&LTS -> CFO estimation and compensation using STS -> FFT -> Channel Estimation -> Equalization & Demodulation

     When I simulate this using a Rayleigh channel model + AWGN my BER values are pretty good and consistent. However on the WARP boards my BER results are pretty inconsistent... on some trials the BER is excellent and on other trials it is pretty bad. I took a look through some of the sample labs and I notice that DQPSK is used as the modulation scheme. I guess dqpsk was used to avoid estimating and compensating for frequency offset and other detrimental effects. Also, I notice in the labs that the transmitted data is always upconverted to a higher frequency before transmission to avoid having a DC offset... in my scheme I zero-pad the DC index but maybe this is not enough? Anyways, let me know if your team has experienced the same problems and of any hints that I can use to determine my problem.

Thanks,
SH

Offline

 

#2 2009-May-11 20:25:16

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

Re: OFDM on WARPLAB

Leaving the DC subcarrier empty should be enough; this is all we do in the real-time PHY.

Are you doing any CFO or phase error correction using pilot tones post-FFT? It's been our experience (in the real-time OFDM design at least) that the CFO estimate from the preamble is noisy, and needs to be refined using CFO estimates derived in the frequency domain.

Also, the oscillators used to derive the RF carriers are much tighter-tolerance on WARP kits than in commercial wireless NICs. The 802.11 standard, for example, allows 20ppm offsets in the reference oscillator (IEEE 802.11-2007 17.3.9.4); the WARP clock board uses a TXCO with tolerance of 2ppm (it costs more, of course; but cost is less important when you're not making millions of laptops :-). I'd suggest adding pilot tones and using their phase offsets to correct the CFO and phase error.

Also be sure you're not setting Rx gains too high or low. Look at the bottom-center plot on pg. 16 of the MAX2829 datasheet. A bad Rx gain choice can degrade the receiver performance significantly, even if the signal isn't clipping much in the ADC.

Offline

 

#3 2010-Jan-23 20:50:25

marslan
Member
Registered: 2009-Jun-09
Posts: 19

Re: OFDM on WARPLAB

Hi all,

I seem to have the inconsistent BER problem as in the previous post.

After following here, I tried to implement an OFDM transmission with Warplab.
I modified the warplab_siso_example.Comm.m file to use the IFFT and FFT functions.
I only need to transmit a single OFDM symbol to measure BER therefore I did not implement symbol syncing.

What I basically do is the following:

1) generate data bits and modulate using dqpsk
2) map these modulated symbols to 64 subcarriers where the first 6, last 5 and the DC carrier is set to 0.
3) apply fftshift and ifft to the carrier-mapped symbols
4) prepend the last 16 carriers as a cyclic prefix
5) prepend the Barker sequence for finding the first data sample
6) Upsampling, baseband to RF conversion and transmission

7) RF to baseband conversion
8) Using the matched filter and Barker sequence to find the first sample
9) Downsampling the output of the matched filter
10) removing the first 16 samples as they were used for the cyclic prefix
11) apply fft and fftshift
12) strip the 52 data carriers
13 demodulate and map to bits

For TxGainRF of 40 and RxGainRF of 2 (as used in the warplab_siso_example_Comm) this setting consistently gives a BER of 0.
However for low-gain settings such as TxGainRF of 10 and RxGainRF of 1, BER ranges from 0 to 0.17.
Is this normal?
I also tried to plot the pwelch function in matlab to see the power spectral density of the transmitted signal but it doesn't resemble
the PSD of a 802.11a OFDM signal.
Did anybody use pwelch to generate PSD in Warplab?
For measuring BER, is it a good idea to tweak the Tx-Rx RfGain values?   

Sorry it seems to be a blast of questions.

Thanks,

Mustafa

Offline

 

#4 2010-Jan-25 02:12:31

sgupta
Administrator
Registered: 2007-Feb-26
Posts: 104

Re: OFDM on WARPLAB

If I understand your question correctly, it seems like you are lowering the output power and lowering the input amplification and that is causing your BER to increase. If your boards are sufficiently far apart you can see that this will cause a problem. To measure BER you definitely need to find the optimal Tx and Rx gain values as you are mimicking the behavior of automatic gain control. Alternatively, you could try and use v5 of WARPLab that has automatic gain control built in.

Offline

 

#5 2010-Jan-25 03:07:03

marslan
Member
Registered: 2009-Jun-09
Posts: 19

Re: OFDM on WARPLAB

The increase in BER is expected but the problem is that it is not stable.
It has a high variance.

I was using WARPLab_MIMO2x2_MIMO4x4_R05 and the boards are very close (0.5 meters apart).
I wanted to experiment with different number of subcarriers and their effect on BER.
I was measuring BER with 52 subcarriers, 78 subcarriers, 104 subcarriers and so on.
Repeated trials with a given number of subcarriers vary a lot so I cannot make a healthy comparison between them.

So if I use v5, how would I get different BER values at the receiver? Changing the inter-board distance
or is there a way to gradually increase Tx Power without modifying gain settings?

I am not really an expert on these so I hope it sounds meaningful.

Thanks,

Mustafa

Offline

 

#6 2010-Jan-25 14:46:01

sgupta
Administrator
Registered: 2007-Feb-26
Posts: 104

Re: OFDM on WARPLAB

The version of WARPLab you are using has AGC already built-in. AGC works as follows: you give it a target gain and as the signal is being received it will scale the incoming signal to that target. This happens in real-time with the radio chip in the loop. However, you need to provide a preamble at the start of every transmission that the AGC locks to. The method for reading data out remains the same and your script will not change.

As part of WARPLab we release example code that uses the various features. In the example folder warplab_siso_example_txRx_AGC_80211aPreamble.m and warplab_siso_example_TxRxAGC_TonePreamble.m are good places to start to investigate AGC.

Offline

 

#7 2010-Jan-25 16:20:46

marslan
Member
Registered: 2009-Jun-09
Posts: 19

Re: OFDM on WARPLAB

So if I understand correctly,

I have to modify the ofdm script to make use of the AGC.
After that, I can change the target dBm as I want and measure BER for that particular dBm value?

Offline

 

#8 2010-Jan-25 17:57:44

sgupta
Administrator
Registered: 2007-Feb-26
Posts: 104

Re: OFDM on WARPLAB

Yes you must change the script to include AGC. For BER you could also vary the output power of the transmitter instead of the target gain. This way your comparison would be between BER and power on the channel.

Offline

 

#9 2010-Jan-26 03:11:54

marslan
Member
Registered: 2009-Jun-09
Posts: 19

Re: OFDM on WARPLAB

Hi,

I modified my OFDM script to make use of the AGC as we discussed.
AGC training symbols seem to work correctly.
But the inconsistent BER problem still continues.

In the AGC examples, targetdBmAGC is said to be tweaked if the AGC is not setting the gains
correctly. So how do we know when to change the value of targetdBmAGC? How can we make sure
that AGC set correct values so that we don't have to tweak target gain?

Also the examples use three thresholds, since my transmitted signals always fall pretty much into the same
threshold boundary, the returned RX gains determined by AGC are the same.

You were also mentioning about varying the output power of the transmitter instead of the target gain.
How can I do this? Is there a function such as setTxPower just like the one in OFDM ref. design?

All I want to do is to measure and try to match the theoretical SNR vs BER curves so I need to modify the SNR
at the receiver in a controlled manner so that I know what exactly is going on with the BER measurements.

Thanks,

Mustafa

Offline

 

#10 2010-Jan-27 21:09:53

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

Re: OFDM on WARPLAB

The AGC set point should be fixed, and is only a function of the waveform you're sending. You want the radio to produce a baseband Rx signal which fills the ADC range. You should control the SNR by adjusting the Tx power and attenuation between Tx and Rx. The attenuation is either physical attenuators in series with a cable between the two nodes, or the propagation losses for an over-the-air test. It is very difficult to control SNR over-the-air, as it varies with every change in the propagation environment.

Offline

 

#11 2010-Jan-28 02:46:42

marslan
Member
Registered: 2009-Jun-09
Posts: 19

Re: OFDM on WARPLAB

Thanks. I will look into it.

Offline

 

Board footer