FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > DSP

DSP comp.dsp newsgroup, mailing list

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-27-2007, 10:55 PM
gct
Guest
 
Posts: n/a
Default Spread Spectrum Modulation?

I'm trying to simulate a spread spectrum signal (a spread version of a pur
tone). But I'm not quite clear on how to apply the code to the signal. M
data is 16-bit integer but the code produces a bit at a time. So do I tak
1 6 PN bits and XOR it with each element of the signal? Confused.
Reply With Quote
  #2 (permalink)  
Old 07-27-2007, 11:48 PM
John
Guest
 
Posts: n/a
Default Re: Spread Spectrum Modulation?

On Jul 27, 4:55 pm, "gct" <smcal...@gmail.com> wrote:
> I'm trying to simulate a spread spectrum signal (a spread version of a pure
> tone). But I'm not quite clear on how to apply the code to the signal. My
> data is 16-bit integer but the code produces a bit at a time. So do I take
> 1 6 PN bits and XOR it with each element of the signal? Confused.


If the PN code bit is zero, multiply the signal sample by -1.
Otherwise don't.

John

Reply With Quote
  #3 (permalink)  
Old 07-27-2007, 11:59 PM
Tim Wescott
Guest
 
Posts: n/a
Default Re: Spread Spectrum Modulation?

gct wrote:
> I'm trying to simulate a spread spectrum signal (a spread version of a pure
> tone). But I'm not quite clear on how to apply the code to the signal. My
> data is 16-bit integer but the code produces a bit at a time. So do I take
> 1 6 PN bits and XOR it with each element of the signal? Confused.


You're confused enough that you're confusing me.

I _think_ you're talking about direct sequence spread spectrum, I
_think_ the 'tone' you're talking about is coded digital data, and I
_think_ you think you clock the sequence at the same rate as your data.

What you _do_ with direct sequence spread spectrum is to generate a
pseudo-random sequence of bits at a much higher rate than the bandwidth
of your unspread signal, then modulate the signal with the bits.
Usually this is done by transmitting the signal straight through on a
'1' and inverting it's phase on a '0' (or visa versa), although you
could cook up fancier schemes.

The result is a signal that, to the casual observer, has a high
bandwidth with no particular spectral concentration. If you demodulate
it with the right method and sequence, however, you reconstitute the
original signal ready for demodulation.

Dunno if this helps -- try doing a web search on "direct sequence spread
spectrum".

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply With Quote
  #4 (permalink)  
Old 07-28-2007, 12:11 AM
gct
Guest
 
Posts: n/a
Default Re: Spread Spectrum Modulation?

>gct wrote:
>> I'm trying to simulate a spread spectrum signal (a spread version of

pure
>> tone). But I'm not quite clear on how to apply the code to the signal

My
>> data is 16-bit integer but the code produces a bit at a time. So do

take
>> 1 6 PN bits and XOR it with each element of the signal? Confused.

>
>You're confused enough that you're confusing me.
>
>I _think_ you're talking about direct sequence spread spectrum, I
>_think_ the 'tone' you're talking about is coded digital data, and I
>_think_ you think you clock the sequence at the same rate as your data.
>
>What you _do_ with direct sequence spread spectrum is to generate a
>pseudo-random sequence of bits at a much higher rate than the bandwidth
>of your unspread signal, then modulate the signal with the bits.
>Usually this is done by transmitting the signal straight through on a
>'1' and inverting it's phase on a '0' (or visa versa), although you
>could cook up fancier schemes.
>
>The result is a signal that, to the casual observer, has a high
>bandwidth with no particular spectral concentration. If you demodulate
>it with the right method and sequence, however, you reconstitute the
>original signal ready for demodulation.
>
>Dunno if this helps -- try doing a web search on "direct sequence sprea


>spectrum".
>
>--
>
>Tim Wescott
>Wescott Design Services
>http://www.wescottdesign.com
>
>Do you need to implement control loops in software?
>"Applied Control Theory for Embedded Systems" gives you just what i

says.
>See details at http://www.wescottdesign.com/actfes/actfes.html
>


No you're right. I should have been more specific. I'm doing DSSS an
I've got the code written for generating my PN codes and such, I jus
wasn't sure how to apply the code to the data, since all the examples I'v
seen use binary signals. Thanks!
Reply With Quote
  #5 (permalink)  
Old 07-28-2007, 07:58 PM
[email protected]
Guest
 
Posts: n/a
Default Re: Spread Spectrum Modulation?

On Jul 27, 6:11 pm, "gct" <smcal...@gmail.com> wrote:
> No you're right. I should have been more specific. I'm doing DSSS and
> I've got the code written for generating my PN codes and such, I just
> wasn't sure how to apply the code to the data, since all the examples I've
> seen use binary signals. Thanks!


The whole point of DSSS is that it replaces your bitstream with a
sequence of chips at a higher frequency, thus spreading the signal's
spectrum. To apply the spreading code, upsample your baseband symbols
by the length of the spreading code, then element-wise multiply the
upsampled vector by your spreading code, repeating the spreading code
periodically every data bit. For example:

Data: 1001
Spreading code: 1101

Convert these quantities into a baseband representation for your
modulation scheme (I assume BPSK):

BPSK symbols: 1 -1 -1 1
Upsampled symbols: 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 1 1
Spreading code symbols: 1 1 -1 1

Spread symbols: 1 1 -1 1 -1 -1 1 -1 -1 -1 1 -1 1 1 -1 1

The last line shows the 16 chips that now correspond to the 4 bits of
data. The chip rate is 4 times the bitrate.

Jason

Reply With Quote
  #6 (permalink)  
Old 07-30-2007, 03:35 PM
Mark
Guest
 
Posts: n/a
Default Re: Spread Spectrum Modulation?


> What you _do_ with direct sequence spread spectrum is to generate a
> pseudo-random sequence of bits at a much higher rate than the bandwidth
> of your unspread signal, then modulate the signal with the bits.
> Usually this is done by transmitting the signal straight through on a
> '1' and inverting it's phase on a '0' (or visa versa), although you
> could cook up fancier schemes.
>
>


I realize that was a simplified explination..., if you literally
switch from phase inversion to no phase inversion as described above,
you will create a very wide spectrum with many sidelobes. I think you
have to apply baseband filtering (i.e RRC) to the spreading sequence
just like you do for the data sequence in order to control the
sidelobes.

Mark


Reply With Quote
  #7 (permalink)  
Old 07-30-2007, 05:39 PM
gct
Guest
 
Posts: n/a
Default Re: Spread Spectrum Modulation?

>
>> What you _do_ with direct sequence spread spectrum is to generate a
>> pseudo-random sequence of bits at a much higher rate than th

bandwidth
>> of your unspread signal, then modulate the signal with the bits.
>> Usually this is done by transmitting the signal straight through on a
>> '1' and inverting it's phase on a '0' (or visa versa), although you
>> could cook up fancier schemes.
>>
>>

>
>I realize that was a simplified explination..., if you literally
>switch from phase inversion to no phase inversion as described above,
>you will create a very wide spectrum with many sidelobes. I think you
>have to apply baseband filtering (i.e RRC) to the spreading sequence
>just like you do for the data sequence in order to control the
>sidelobes.
>
>Mark
>
>
>


OK here's what I'm doing. I'm taking my waveform (it's just a pure tone)
and upsample it to my chip rate. Then I do a element-wise product, flippi
g the sign when I have a one in my PN code. From my tests I've taken
tone at 1MHz and applied the spreading code and I get a nice flat spectru
from DC to 2MHz (chiprate is 2MHz). Does this sound right to everyone?
I'm seeing the sidelobes mentioned above, but they're 30dB down. Sinc
this is only going to be used for testing, I'm not gonna worry too muc
about them.
Reply With Quote
  #8 (permalink)  
Old 07-30-2007, 05:54 PM
Tim Wescott
Guest
 
Posts: n/a
Default Re: Spread Spectrum Modulation?

Mark wrote:
>> What you _do_ with direct sequence spread spectrum is to generate a
>> pseudo-random sequence of bits at a much higher rate than the bandwidth
>> of your unspread signal, then modulate the signal with the bits.
>> Usually this is done by transmitting the signal straight through on a
>> '1' and inverting it's phase on a '0' (or visa versa), although you
>> could cook up fancier schemes.
>>
>>

>
> I realize that was a simplified explination..., if you literally
> switch from phase inversion to no phase inversion as described above,
> you will create a very wide spectrum with many sidelobes. I think you
> have to apply baseband filtering (i.e RRC) to the spreading sequence
> just like you do for the data sequence in order to control the
> sidelobes.
>
> Mark
>
>

Indeed. I was going to mention that, but I wanted to get the basics
across first.

You can, in fact, modulate your signal in just about any way that a PSK
signal can modulate a carrier. As long as there is no inter-"symbol"
interference (interchip interference?) you won't destroy any information.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply With Quote
  #9 (permalink)  
Old 07-30-2007, 06:07 PM
gct
Guest
 
Posts: n/a
Default Re: Spread Spectrum Modulation?

>Data: 1001
>Spreading code: 1101
>
>Convert these quantities into a baseband representation for your
>modulation scheme (I assume BPSK):
>
>BPSK symbols: 1 -1 -1 1
>Upsampled symbols: 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 1 1
>Spreading code symbols: 1 1 -1 1
>
>Spread symbols: 1 1 -1 1 -1 -1 1 -1 -1 -1 1 -1 1 1 -1 1
>
>The last line shows the 16 chips that now correspond to the 4 bits of
>data. The chip rate is 4 times the bitrate.
>
>Jason
>


Well my PN code is a 10 bit code, so I'd have to do a 1024X upsample?
That doesn't seem right to me. That'd put me up in the multi-GSPS range.
Can't you just upsample to 2X your chip rate and then elementwise multiple?
Reply With Quote
  #10 (permalink)  
Old 07-30-2007, 06:20 PM
Tim Wescott
Guest
 
Posts: n/a
Default Re: Spread Spectrum Modulation?

gct wrote:
>> Data: 1001
>> Spreading code: 1101
>>
>> Convert these quantities into a baseband representation for your
>> modulation scheme (I assume BPSK):
>>
>> BPSK symbols: 1 -1 -1 1
>> Upsampled symbols: 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 1 1
>> Spreading code symbols: 1 1 -1 1
>>
>> Spread symbols: 1 1 -1 1 -1 -1 1 -1 -1 -1 1 -1 1 1 -1 1
>>
>> The last line shows the 16 chips that now correspond to the 4 bits of
>> data. The chip rate is 4 times the bitrate.
>>
>> Jason
>>

>
> Well my PN code is a 10 bit code, so I'd have to do a 1024X upsample?
> That doesn't seem right to me. That'd put me up in the multi-GSPS range.
> Can't you just upsample to 2X your chip rate and then elementwise multiple?


You want to upsample to the point where you have significantly spread
the spectrum of your signal, regardless of the length of your PN code.
First, because that's how you're going to get the advantages of spread
spectrum, and second, because unless you have a side channel you need a
relatively narrow baseband signal for synchronization to work.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply With Quote
  #11 (permalink)  
Old 07-30-2007, 06:31 PM
gct
Guest
 
Posts: n/a
Default Re: Spread Spectrum Modulation?

>gct wrote:
>>> Data: 1001
>>> Spreading code: 1101
>>>
>>> Convert these quantities into a baseband representation for your
>>> modulation scheme (I assume BPSK):
>>>
>>> BPSK symbols: 1 -1 -1 1
>>> Upsampled symbols: 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 1 1
>>> Spreading code symbols: 1 1 -1 1
>>>
>>> Spread symbols: 1 1 -1 1 -1 -1 1 -1 -1 -1 1 -1 1 1 -1 1
>>>
>>> The last line shows the 16 chips that now correspond to the 4 bits of
>>> data. The chip rate is 4 times the bitrate.
>>>
>>> Jason
>>>

>>
>> Well my PN code is a 10 bit code, so I'd have to do a 1024X upsample?
>> That doesn't seem right to me. That'd put me up in the multi-GSP

range.
>> Can't you just upsample to 2X your chip rate and then elementwis

multiple?
>
>You want to upsample to the point where you have significantly spread
>the spectrum of your signal, regardless of the length of your PN code.
>First, because that's how you're going to get the advantages of spread
>spectrum, and second, because unless you have a side channel you need a
>relatively narrow baseband signal for synchronization to work.
>
>--
>
>Tim Wescott
>Wescott Design Services
>http://www.wescottdesign.com
>
>Do you need to implement control loops in software?
>"Applied Control Theory for Embedded Systems" gives you just what i

says.
>See details at http://www.wescottdesign.com/actfes/actfes.html
>


Ah, OK. So if I want to spread over, say, 10MHz, I need to upsample t
20MSPS and then element-wise apply the spreading code? How does this wor
with a complex signal? Do I just conjugate the samples instead of flippin
the sign?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SNR for spread spectrum signal sunil_ue DSP 0 01-08-2007 07:01 AM
SNR for spread spectrum signal sunil_ue DSP 0 01-08-2007 06:54 AM
Spread Spectrum Cores ?? metal FPGA 3 03-16-2006 09:38 AM
multi-carrier spread spectrum [email protected] DSP 0 02-02-2005 04:48 PM
Spread Spectrum and Multicarrier porterboy DSP 8 12-09-2003 01:28 PM


All times are GMT +1. The time now is 01:47 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved