Forum: GNU Radio [benchmark_ofdm]

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
883a906b53a396f436df7fa2007fc9b4?d=identicon&s=25 Rita Arencibia (rita_listas)
on 2009-04-07 19:34
(Received via mailing list)
Hi,
I'm using benchmark_ofdm tx and rx in 2.4 GHz. I'm trying to transmit a
fixed size of payload everytime (1328 Bytes). My problem is I don't know
what values I must put in the parameters: fft-length, occupied-tones,
cp-length. I know that fft-length is the total number of subcarriers, cp
the
cyclic prefix, occupied-tones number of subcarriers used for data. I
have
been running modifications of these benchmarks, and the best performance
I
get is when the values of these parameters are: fft-length 512, cp 128,
occupied tones 300. In this case, the 80 % of paquetes I receive are
right.
How can I calculate the apropiate values ? Must I used the parameter
"-s"
for fixed the packet size to the one I want, 1328? what happen with the
"-i"
and "-d" in the transmitter and the receiver?

Thank you
--
View this message in context:
http://www.nabble.com/-benchmark_ofdm--tp22934256p...
Sent from the GnuRadio mailing list archive at Nabble.com.
B22e1b01ee2edc1bdd77eeb90fd4d5b4?d=identicon&s=25 Martin Braun (Guest)
on 2009-04-08 10:01
(Received via mailing list)
On Tue, Apr 07, 2009 at 10:32:20AM -0700, Rita's pfc wrote:
>
> Hi,
> I'm using benchmark_ofdm tx and rx in 2.4 GHz. I'm trying to transmit a
> fixed size of payload everytime (1328 Bytes). My problem is I don't know
> what values I must put in the parameters: fft-length, occupied-tones,
> cp-length. I know that fft-length is the total number of subcarriers, cp the

Hi,
just to be clear: fft-length is not the total number of subcarriers, it
is, as the name says, the FFT length. If these were identical, it would
be pretty difficult to filter out the OFDM signal as it would uniformly
fill the Nyquist band.
Sorry if this is what you meant, it jusn't wasn't quite clear to me.

> cyclic prefix, occupied-tones number of subcarriers used for data. I have
> been running modifications of these benchmarks, and the best performance I
> get is when the values of these parameters are: fft-length 512, cp 128,
> occupied tones 300. In this case, the 80 % of paquetes I receive are right.
> How can I calculate the apropiate values ? Must I used the parameter "-s"
> for fixed the packet size to the one I want, 1328? what happen with the "-i"
> and "-d" in the transmitter and the receiver?

The packet length and the OFDM settings are not directly connected -
that is, in principle, you can have any combination (although that does
not always make sense). In theory, GNU Radio works well with any OFDM
setting, so all you have to do is adapt the settings according to your
data transmission requirements (bit rate, channel characteristics etc.).

I haven't got a working setup at my fingertips right now, but -s should
be the right thing to do. However, note that the benchmark_ofdm* code
uses the GNU radio packet module, which itself does stuff to your data,
so perhaps your signal does not look exactly as you expected it to be.

On a side note, when I was playing around with the OFDM benchmark code,
I never achieved a brilliant packet error rate, 80% was close to the
best I achieved - but I never tore the code apart to check for the
cause.

Good luck,
MB
39cf6a1e5fe9a6486f87b749a72948d8?d=identicon&s=25 karim (Guest)
on 2009-04-08 15:51
(Received via mailing list)
Hi,
I need to implement a simple transmitter that uses QPSK as the
demodulation mode. It should read data (characters) from a file and
transmit them as they are without preamble or anything.

What's the simplest and fastest way to do it.
I checked the benchmark_tx.py it adds a preamble and a lot of data
before the actual payload which I don't need.

Thanks
Karim
A183460a6345f698900d4394de8212ce?d=identicon&s=25 Jason Uher (Guest)
on 2009-04-08 16:14
(Received via mailing list)
> I checked the benchmark_tx.py it adds a preamble and a lot of data before
> the actual payload which I don't need.

I assume you are trying to do some BER measurements?  There is an
example called digital-bert that will do that (bert=bit error rate
tester).

If you have some other goal in mind, I would suggest examining the
digital_benchmark_*.py files and extracting the blocks you need into a
new python file that simply modulates and sends (basically skip the
packet_{sink|source}).  Keep in mind that there would be no
synchronization at the receiver with such a setup and that when you
repack the bytes there may be an offset that you have to account for
during processing.


Jason
28a4af15b4d496d7900593255ea9c8a3?d=identicon&s=25 Ed Criscuolo (Guest)
on 2009-04-08 16:30
(Received via mailing list)
karim wrote:
> Hi,
> I need to implement a simple transmitter that uses QPSK as the
> demodulation mode. It should read data (characters) from a file and
> transmit them as they are without preamble or anything.
>
> What's the simplest and fastest way to do it.
> I checked the benchmark_tx.py it adds a preamble and a lot of data
> before the actual payload which I don't need.


Briefly, create a flowgraph as follows:

Start with your data stream as a stream of unsigned bytes, such as
reading from a file.

Run through gr_packed_to_unpacked_bb with two bits per chunk.

Run though gr_chunks_to_symbols_bc with the following symbol table:
         0,0 => -1-j
         0,1 => -1+j
         1,1 => +1+j
         1,0 => +1-j

Upsample to the desired sample rate with your favorite
interpolator/filter combination.

Multiply by around 2000 to get some amplitude.

Sink to the usrp



You realize, of course, that without any kind of preamble or
sync marker, it will be difficult to demodulate this correctly.
In addition, QPSK will have a 1-of-4 ambiguity in the received
phase constellation.  The usual solution to this is to use
some sort of sync marker that can be unambiguously recognized
irrespective of any phase offset.

Hope this helps.  Good luck!

@(^.^)@  Ed
39cf6a1e5fe9a6486f87b749a72948d8?d=identicon&s=25 Karim El Defrawy (Guest)
on 2009-04-08 20:58
(Received via mailing list)
Jason Uher wrote:
>> I checked the benchmark_tx.py it adds a preamble and a lot of data before
>> the actual payload which I don't need.
>
> I assume you are trying to do some BER measurements?  There is an
> example called digital-bert that will do that (bert=bit error rate
> tester).
>

Actually I am not. I just want to transmit the data using QPSK and
capture it by an oscilloscope. I want to see how I can control the
frequency offset, phase and amplitude by playing with these parameters
at the transmitter and how this will affect the sent signal.

There are small errors introduced by the radio and I want to study
those.


> If you have some other goal in mind, I would suggest examining the
> digital_benchmark_*.py files and extracting the blocks you need into a
> new python file that simply modulates and sends (basically skip the
> packet_{sink|source}).  Keep in mind that there would be no
> synchronization at the receiver with such a setup and that when you
> repack the bytes there may be an offset that you have to account for
> during processing.
>

At this point I don't care about demodulation, but you are right. I
probably will later.

Thanks a lot Jason. I will start doing that too.
39cf6a1e5fe9a6486f87b749a72948d8?d=identicon&s=25 Karim El Defrawy (Guest)
on 2009-04-08 21:04
(Received via mailing list)
Thanks a lot Eric.

That's very useful. Yes, you are right about the preamble.
At this stage I am just doing the transmitter, later I will worry about
how to correctly receive it and will probably add a preamble.
39cf6a1e5fe9a6486f87b749a72948d8?d=identicon&s=25 karim (Guest)
on 2009-04-09 19:03
(Received via mailing list)
Hi,
I am trying to use the dqpsk modulator block to modulate some data and
then take the output and separate it to real and imag. This is the code,
  it runs but the sinks are empty and have no data. What am I doing
wrong?

I also get this when I run it:
 >>> gr_fir_ccf: using SSE
What does it mean?

My code is below.
Cheers,
Karim

#no GUI
#source: stream from file_source
#connect with DQPSK: input: byte stream, output:complex
#change it to 2 parts:imagine and Real
#connect with gr.complex_to_real or gr.complex_to_imag
#display data in sink1 (real) and sink2 (imag)

class my_top_block(gr.top_block):

   def __init__(self):
     gr.top_block.__init__(self)

     src_data = (1,0,1,0,1,0,1,0)
     src = gr.vector_source_b (src_data)

     #input: unsigned char, output: complex
     qpsk = blks2.dqpsk_mod(2,.35,True, False, False)
     self.connect (src,qpsk)

     real = gr.complex_to_real()
     imag = gr.complex_to_imag()
     self.connect(qpsk,real)
     self.connect(qpsk,imag)

     sink1 = gr.vector_sink_f()
     sink2 = gr.vector_sink_f()

     self.connect(real,sink1)
     self.connect(imag,sink2)

     print "Data in sink1 is: ",sink1.data()

     print "Data in sink2 is: ",sink2.data()


if __name__ == '__main__':
     try:
         my_top_block().run()
     except KeyboardInterrupt:
         pass
745d8202ef5a58c1058d0e5395a78f9c?d=identicon&s=25 Eric Blossom (Guest)
on 2009-04-09 19:26
(Received via mailing list)
On Thu, Apr 09, 2009 at 09:46:43AM -0700, karim wrote:
> Hi,
> I am trying to use the dqpsk modulator block to modulate some data and
> then take the output and separate it to real and imag. This is the code,
>  it runs but the sinks are empty and have no data. What am I doing wrong?

You're printing the contents of the vector sinks in your
initialization code, before the graph has started running.

Try printing their contents after my_top_block().run() returns.

Eric


> I also get this when I run it:
> >>> gr_fir_ccf: using SSE
> What does it mean?

It means that the FIR block is using hand coded SSE instead of the
"generic" c++ implementation.
883a906b53a396f436df7fa2007fc9b4?d=identicon&s=25 Rita Arencibia (rita_listas)
on 2009-04-13 16:52
(Received via mailing list)
Thank you for your explanation,
I 've been reading documentation about ofdm in 802.11g, and now I know
what
values I must put for the parameters. I added the size of the packet
with
'-s', and it  worked.
Thanks


2009/4/8 Martin Braun <braun@int.uni-karlsruhe.de>
9d122d100144ba7b3fd025b1242e1ad8?d=identicon&s=25 Maduike, Dumezie (Guest)
on 2009-04-14 07:27
(Received via mailing list)
Hello all.  In reference to this post, how does the signal actually get
transmitted through the wireless channel?  Does the qpsk block need to
be connected to a usrp_sink_c() block?

Thanks
Dumezie

----- Original Message -----
From: "Eric Blossom" <eb@comsec.com>
To: "karim" <keldefra@uci.edu>
Cc: discuss-gnuradio@gnu.org
Sent: Thursday, April 9, 2009 12:20:25 PM GMT -06:00 Guadalajara /
Mexico City / Monterrey
Subject: Re: [Discuss-gnuradio] Using the dqpsk modulator

On Thu, Apr 09, 2009 at 09:46:43AM -0700, karim wrote:
> Hi,
> I am trying to use the dqpsk modulator block to modulate some data and
> then take the output and separate it to real and imag. This is the code,
>  it runs but the sinks are empty and have no data. What am I doing wrong?

You're printing the contents of the vector sinks in your
initialization code, before the graph has started running.

Try printing their contents after my_top_block().run() returns.

Eric


> I also get this when I run it:
> >>> gr_fir_ccf: using SSE
> What does it mean?

It means that the FIR block is using hand coded SSE instead of the
"generic" c++ implementation.

>
>     self.connect (src,qpsk)
>     self.connect(imag,sink2)
>         pass
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
39cf6a1e5fe9a6486f87b749a72948d8?d=identicon&s=25 karim (Guest)
on 2009-04-14 13:04
(Received via mailing list)
Eric Blossom wrote:
>
> Eric
>

I added a function to print the sinks after I call my_top_block().run()

But the sinks are still empty. I also tried directing the output of the
qpsk modulator to a file and it's also empty (the code below).



from gnuradio import gr, gru, modulation_utils, blks2
from gnuradio import eng_notation
from gnuradio.eng_option import eng_option
from optparse import OptionParser

import random, time, struct, sys, math


#no GUI
#source: stream from file_source
#connect with DQPSK: input: byte stream, output:complex
#change it to 2 parts:imagine and Real
#connect with gr.complex_to_real or gr.complex_to_imag
#display data in sink1 (real) and sink2 (imag)

class my_top_block(gr.top_block):

   def __init__(self):
     gr.top_block.__init__(self)

     src_data = (1,0,1,0,1,0,1,0)
     src = gr.vector_source_b (src_data)

     #input: unsigned char, output: complex
     qpsk = blks2.dqpsk_mod(2,.35,True, False, False)
     self.connect (src,qpsk)

     real = gr.complex_to_real()
     imag = gr.complex_to_imag()
     self.connect(qpsk,real)
     self.connect(qpsk,imag)

     self.sink1 = gr.vector_sink_f()
     self.sink2 = gr.vector_sink_f()

     self.connect(real,self.sink1)
     self.connect(imag,self.sink2)

     qpsk_file_op=gr.file_sink(gr.sizeof_gr_complex, "qpsk_op.dat")

     self.connect(qpsk,qpsk_file_op)


   def print_data(self):
     print "Data in sink1 is: ",self.sink1.data()
     print "Data in sink2 is: ",self.sink2.data()


if __name__ == '__main__':
     try:
         my_top_block().run()
         my_top_block().print_data()
     except KeyboardInterrupt:
         pass
745d8202ef5a58c1058d0e5395a78f9c?d=identicon&s=25 Eric Blossom (Guest)
on 2009-04-15 22:28
(Received via mailing list)
On Tue, Apr 14, 2009 at 04:03:13AM -0700, karim wrote:
>>
>> Try printing their contents after my_top_block().run() returns.
>>
>> Eric
>>
>
> I added a function to print the sinks after I call my_top_block().run()
>
> But the sinks are still empty. I also tried directing the output of the
> qpsk modulator to a file and it's also empty (the code below).


You may want to spend some time with the most excellent Python 2.X
tutorial:  http://www.python.org/doc

You are creating two instances of my_top_block(), calling run() on the
first one and calling print_data() on the second.

Try this instead:

if __name__ == '__main__':
    try:
        tb = my_top_block()
  tb.run()
        tb.print_data()
    except KeyboardInterrupt:
        pass


Eric
39cf6a1e5fe9a6486f87b749a72948d8?d=identicon&s=25 Karim El Defrawy (Guest)
on 2009-04-15 23:27
(Received via mailing list)
Thanks a lot for the feedback. I got it to work eventually.
This topic is locked and can not be replied to.