Forum: GNU Radio OFDM SNR

9b100382728bdb55a1e1cb0101f3edf0?d=identicon&s=25 Piotr Potocki (Guest)
on 2014-03-31 13:06
(Received via mailing list)
Attachment: Rx_snr.png (200 KB)
Attachment: Tx_snr.png (400 KB)
Attachment: iq_samples_eq.png (100 KB)
Attachment: iq_samples_no_s.png (300 KB)
Attachment: Tx_snr_run.png (400 KB)
Hi all,

I am trying to estimate SNR in OFDM system using USRP 2. I am using two
URSP's (XVCR 2450). To do that I am using Gnu radio 3.7.2 with slightly
modify OFDM_benchmark_receiver (see img Rx_snr) and transmitter (img
Tx_snr).

1. I want to estimate SNR using IQ samples. But when I receive IQ
samples
on the receiver (img iq_samples_eq) they are all "perfect". So my first
question is, is there some kind of "hard decision" in OFDM Frame
Equalizer?
Without OFDM Frame Equalizer (img iq_samples_no_s)

2. The second problem is, that I need to have a white noise not coloured
noise.
And to to that i need to get rid of the equalizer part of the OFDM Frame
Equalizer. The part of correction frequency shift on the symbols need to
stay.
Do You have some hints how to do that? (Just commented "//" this part ?
// Do the equalizing
      d_eq->reset();
      d_eq->equalize(out, frame_len, d_channel_state);
      d_eq->get_channel_state(d_channel_state);


3. The 3 question is about Constellation Plot in Gnuradio. My system is
based on BPSK so on Constellation Plot I am expecting only the +1, -1
values. The IQ samples are showing me that this is correct +1,-1 so why
on
the plot i have the values (-0.7,-0.7),(0.7,0.7) (img Tx_snr_run) ? Why
Constellation Plot is shifting my values?

4. Last question is about the MPSK SNR Estimator. I am wondering is
there a
possibility to apply this block to OFDM?


My specs of system:
FFT length = 64
Sample rate = 2M
Packet length = 40 ( i tried with different packet length and 40 gave
the
best results)
Modulation = BPSK
Carrier frequency = 2.4 Ghz
Occupied carriers = 52

Best regards,
Piotr Potocki
B4ffbc711addde4c649b1ed526df6157?d=identicon&s=25 Martin Braun (Guest)
on 2014-03-31 15:37
(Received via mailing list)
On 03/31/2014 01:03 PM, Piotr Potocki wrote:
> 1. I want to estimate SNR using IQ samples. But when I receive IQ
> samples on the receiver (img iq_samples_eq) they are all "perfect". So
> my first question is, is there some kind of "hard decision" in OFDM
> Frame Equalizer? Without OFDM Frame Equalizer (img iq_samples_no_s)

Yes -- the current equalizer discards soft information. That's a clear
shortcoming, but I simply haven't had the time to implement a proper
equalizer so far, and if anyone else has, they haven't committed it
upstream.

You can write your own equalizers by subclassing ofdm_equalizer_base.
It's pretty simple, if you already have an algorithm in C++.

> 2. The second problem is, that I need to have a white noise not coloured
> noise.
> And to to that i need to get rid of the equalizer part of the OFDM Frame
> Equalizer. The part of correction frequency shift on the symbols need to
> stay.
> Do You have some hints how to do that? (Just commented "//" this part ?
> // Do the equalizing
>       d_eq->reset();
>       d_eq->equalize(out, frame_len, d_channel_state);
>       d_eq->get_channel_state(d_channel_state);

That should work. The cleaner way would be to add a 'dummy' equalizer
that can be dropped in.
Note that if you leave the equalizer out, you will be able to do nothing
but SNR estimation. I don't know the details of those algorithms by
heart, but some might not work either, since symbols will be phase
rotated.
Maybe you can intercept the channel state PMT in a custom block, modify
that to your needs, and use the ofdm_equalizer_static.

> 3. The 3 question is about Constellation Plot in Gnuradio. My system is
> based on BPSK so on Constellation Plot I am expecting only the +1, -1
> values. The IQ samples are showing me that this is correct +1,-1 so why
> on the plot i have the values (-0.7,-0.7),(0.7,0.7) (img Tx_snr_run) ?
> Why Constellation Plot is shifting my values?

Use the scope sink in XY mode, not the constellation plot. That'll try
and actually rx.

> 4. Last question is about the MPSK SNR Estimator. I am wondering is
> there a possibility to apply this block to OFDM?

If you had a flat fading channel, you could use that after the
serialization. For more usual OFDM channels, probably not, at least not
out-of-the box. There are several papers that modify these algorithms
for OFDM, and I don't think we've implemented any of them.

M
B4ffbc711addde4c649b1ed526df6157?d=identicon&s=25 Martin Braun (Guest)
on 2014-04-12 05:02
(Received via mailing list)
On 04/10/2014 01:33 PM, Piotr Potocki wrote:
> find any other code that is doing this mapping.
> So where the mapping is taking place?

Hm, this won't work, I guess. Line 102 does the actual assignment...

> 2. Unfortunately commentating out this part is not only disabling
> equalization but also the phase correction and frequency correction.
> But i figure out that for SNR estimation i don't need phase and freq
> correction. The downside is that when i am trying to estimate SNR i
> don't receive correct data.

You definitely need the coarse freq offset correction. That also means
fiddling with your phase (which shouldn't matter for SNR estimation).
However, that's done in ofdm_frame_equalizer_vcvc.

And yeah, of course you don't get correct data if you don't equalize.

> 3. Thanks for it the scope sink in XY mode works perfect. And one small
> question, how to make constant X,Y coordinate system (set X value from
> -2 to 2 and Y -2 to 2)?

QT or WX? Have a look at the GRC property dialogues.

> And last question is abut transferring data to Matlab. To estimate SNR i
> need to take the complex value and 'take' them to mag^2.
> But i don't know how to read/open this .dat file in Matlab. First i was
> trying to use block 'complex to mag^2' in gnuradio and then write the
> data to a file (constellation3.dat). And then use Matlab simple function:
> fileID_rx=fopen('constellation3.dat');
> snr=fread(fileID_rx,'double');
> But the results are not correct.

Look at read_float_binary.m, also read the FAQ.


- Martin
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.