Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How does spread spectrum work?

Status
Not open for further replies.

rgamma

Member level 1
Joined
Jul 15, 2011
Messages
33
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,504
I really don't understand how spread spectrum works. Can someone please direct me to a matlab simulation where i have two or more data sequences spread by two codes and again recovered at the receiver? I've been trying to simulate it, but i'm having a lot of difficulties.
 

Do you mean DSSS or FHSS ? I think you mean DSSS but anyway, a MATLAB simulation will not make you understand spread spectrum.

Spread spectrum means spreading the signal's spectrum over a much larger bandwidth, if you have a signal with narrowband and convolved it with a wideband signal, the resultant is a spreaded narrowband signal that occupies much BW than its original baseband BW. This convolution is a multiplication in the time domain and the wideband signal used to spread is called a code; a random set of ones and zeros with very small bit/chip duration.

How do we recover the spreaded signal? You simply multiply the received wideband signal by the same code again, assume the code was [1 -1 1 -1 -1], the signal in baseband is s(t), then you have s(t) * [1 -1 1 -1 -1], by multiplying by the same code; s(t) * [1 -1 1 -1 -1] * [1 -1 1 -1 -1] = s(t) * [1 1 1 1 1] = s(t).

The reason for spreading is providing a secure form of communications and a novel way for multiple access.
 
  • Like
Reactions: rgamma

    rgamma

    Points: 2
    Helpful Answer Positive Rating
Get your hands on "The ARRL Spread Spectrum Sourcebook" ISBN 978-0872593176. It will tell you much more than Matlab ever will.
 

Basically what i don't understand is this: In DSSS, we multiply a signal with a much faster signal. So, how exactly are two signals recovered at the receiver if both are sent at the same carrier frequency, by BPSK modulation?
 

From a time domain point of view, each serial bit is cut into a prime number of "chips" at the "chipping rate". At a given point in the spreading code a sequence of chips gives a '1' bit, and the inverted sequence gives a '0' bit. Noise may cause near misses which still decode to '0' and '1'. Other sequences of chips indicate you don't have the right spreading code or you are out of sync.

So the composite signal is sent as a single serial stream with bandwidth corresponding to the chipping rate. Since the spreading code is known to the receiver, the chips can be XORed with the composite serial stream and LP filtered to reconstruct the original serial stream. The tough part is slipping the receiver code by the transmit code until they are in sync.
 
  • Like
Reactions: rgamma

    rgamma

    Points: 2
    Helpful Answer Positive Rating
Yeah, but how can two different signals at the same frequency spread by different codes not interfere with each other. Thats my main doubt. Please tell me what happens in the channel. Thanks.
 

Signals from two identical transmitters, differing only in their spreading codes, WILL interfere with each other. If the codes are perfectly orthogonal (mutually random) statistically half the chips will collide which drops your S/N by half.
If you have enough S/N margin to begin with, and as long as the duty cycle of each transmitter is low then collisions will be rare and retransmissions and error correction codes will fill in the holes, so to the end user it seems as if the two signals do not interfere. But nature never gives something for nothing.
 
Last edited:
  • Like
Reactions: rgamma

    rgamma

    Points: 2
    Helpful Answer Positive Rating
the codes are chosen to be low ambiguity -- they have low crosscorrelations over the time/frequency variations expected. In such cases, the patterns minimally effect each other. when codes are orthogonal, they should not interfere. in practice they might due to variations in time/frequency, as well as any non-idealities of the receiver.

eg, the codes +1, -1, +1, -1 and +1, -1, -1, +1 are orthogonal. if you have:
+A+B, -A-B, +A-B, -A+B transmitted, and do correlations against the two codes, you will get an amplitude of 4*A for the 1010 filter, and 4*B for the 1001 filter.
 
  • Like
Reactions: rgamma

    rgamma

    Points: 2
    Helpful Answer Positive Rating
I really don't understand how spread spectrum works. Can someone please direct me to a matlab simulation where i have two or more data sequences spread by two codes and again recovered at the receiver? I've been trying to simulate it, but i'm having a lot of difficulties.

Dear rgamma,
Have a look on the attached tutorial of spread spectrum, it's very interesting & simplifies your simulation using Matlab.
Best regards.


Do not upload a file which is already available on the net, put its link instead. Your file is replaced with its link on the net sss-mag.com/pdf/Ss_jme_denayer_intro_print.pdf
 
Last edited by a moderator:
  • Like
Reactions: rgamma

    rgamma

    Points: 2
    Helpful Answer Positive Rating
Hi guys , i have problem very similar or say related to this discussion. I want to generate a signal whose frequency response looks like a rectangle in the frequency domain for example between (200kHz-250KHz) and is equal to zero for the rest of the spectrum. So my plan is
1) create a random vector.
2) modulate it with BPSK.
3) modulate a carrier with this signal (bandpass).
4) now apply DS-SS to get the frequency a rectangular shape with in the desired range
5) create a rayleighchan in matlab and subject the signal to multipath fading.

is there a better way?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top