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 ?
bye
zoheb
mir murtuza ali wrote:
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
hi ed,
That was really nice of you to help me and wow your way to doing it, is
just
great. I will do the same thing too. Thanks for being so nice to allow
me to
share the code, but I want to work on it by myself. I am not a very good
programmer and I think if I keep working on Gnuradio I will improve my
skill
at programming. But if I am stuck I will send a mail on this discussion
board to ask for suggestions.
Thanks once again to you and all on this group
Ali
On Wed, Sep 17, 2008 at 10:05 AM, Ed Criscuolo