discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] spread data in gnuradio


From: Ed Criscuolo
Subject: Re: [Discuss-gnuradio] spread data in gnuradio
Date: Wed, 17 Sep 2008 11:05:59 -0400
User-agent: Thunderbird 2.0.0.9 (Macintosh/20071031)

mir murtuza ali wrote:
hi all

i want to spread binary data read from a file using a PN sequence. The PN sequence is generated by a LFSR. Is there any gnuradio block that can help me do this. The gr.glfsr_source_b generates the sequence continously. If there isn't any block that can help me do this, can you suggest a way to implement a new block for doing this. I thought of a way but that requires a block to have two input streams at different rates which i think is not possible in gnuradio. One stream that reads from the file and the other stream that is actually the output coming from the pn sequence source.

any ideas or suggestions ?


I wrote a simple "digital upsampler" block to do exactly this. It takes in a binary stream at the lower data rate and upsamples it to match the
PN "chip" rate.  It differs from the interpolator blocks in that it
inserts the nearest correct value (1 or 0) instead of simply inserting
zeros.

For example, with a 100KHz data rate and a 400KHz chip rate,
the 100KHz stream

   1 0 1 0 1 0 ...

gets upsampled to the 400KHz stream

   1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 ...

instead of

   1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 ...

The block takes parameters of the input and output frequencies,
and computes the upsample ratio, which can be non-integer.

Once you have the data upsampled to the chip rate, its a simple
matter to take it and the output of the glfsr and run them thru
an XOR block, yielding the PN spread baseband, ready for a
PSK modulator.

I'd be happy to share the code.  What's the preferred way
on this list?

 a) In-line with message
 b) Message attachment
 c) Other

@(^.^)@  Ed




reply via email to

[Prev in Thread] Current Thread [Next in Thread]