Spread Spectrum

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 141

Wireless

Comminication
SPREAD SPECTRUM

Spread Spectrum
The spread spectrum techniques was
developed initially for military and intelligence
requirements.
The essential idea is to spread the information
signal over a wider bandwidth to make
jamming and interception more difficult.
In this chapter, we will look some spread
spectrum techniques and multiple access
technique based on spread spectrum.
Outline
5.1 Concept of Spread Spectrum
5.2 Frequency-Hopping Spread Spectrum
5.3 Direct Sequence Spread Spectrum
5.4 Code Division Multiple Access
5.5 Generation of Spreading Sequences
Concept of Spread Spectrum
General model of spread spectrum digital
communication system.
Analog signal with
a relatively narrow
bandwidth
To increase the
bandwidth of the
signal
Concept of Spread Spectrum
Input is fed into a channel encoder
Produce an analog signal with a relatively narrow bandwidth around
some center frequency.
Further modulated using a sequence of digits known as a
spreading code or spreading sequence.
The spreading code is generated by a pseudonoise, or pseudorandom
number generator.
The effect of this modulation is to increase significantly the bandwidth
(spread the spectrum) of the signal to be transmitted.
At the receiver, the same digit sequence is used to demodulate
the spread spectrum signal.
The signal is fed into a channel decoder to recover the data.
Concept of Spread Spectrum
What can we gain from this apparent waste of
spectrum?
Gain immunity from various kinds of noise and
multipath distortion
Can be used for hiding and encrypting signals.
Only a recipient who knows the spreading code
can recover the encoded information.
Several users can independently use the same
higher bandwidth with very little interference
(CDMA).
Outline
5.1 Concept of Spread Spectrum
5.2 Frequency-Hopping Spread Spectrum
5.3 Direct Sequence Spread Spectrum
5.4 Code Division Multiple Access
5.5 Generation of Spreading Sequences
Frequency-Hopping Spread Spectrum
Basic Approach
FHSS Using MFSK
FHSS Performance
Basic Approach
Frequency-Hopping Spread Spectrum -- FHSS
Signal is broadcast over a seemingly random series
of radio frequencies, hopping from frequency to
frequency at fixed intervals.
A receiver, hopping between frequencies in
synchronization with the transmitter, picks up the
message.
Basic Approach
Advantages
Attempts to jam the signal on one frequency only
knock out a few bits of it.
Would-be eavesdroppers hear only unintelligible
blips

Basic Approach
An example of frequency-hopping signal
A number of channels
are allocated for the
FH signal.
Typically, there are 2
k

carrier frequencies
forming 2
k
channels.
The width of each
channel corresponds to
the bandwidth of the
input signal.
Basic Approach
The transmitter operates in
one channel at a time for a
fixed interval.
During that interval, some
number of bits are transmitted
using some encoding scheme.
The sequence of channels
used is dictated by a spreading
code.
Both transmitter and
receiver use the same code to
tune into a sequence of
channels in synchronization.
Basic Approach

Basic Approach
Typical block diagram for a FH system
Generate
spreading code
Basic Approach
Binary data are fed into a modulator using some modulation
scheme (FSK or BPSK)
Spreading code (generate by PN sourse) serves as an index
into a table of frequencies
Each k bits of the spreading code specifies one of the 2
k
carrier
frequencies. At each k PN bits, a new carrier frequency is
selected.
The signal produced from the initial modulator is modulated
by this frequency.
Produce a new signal with the same shape but now centered on
the selected carrier frequency.
[Example] An FHSS system employs a total
bandwidth of W
s
=400MHz and an individual
channel bandwidth of 100Hz. What is the
minimum number of PN bits required for each
frequency hop?
Basic Approach
The question is: How does the FH spreader
work? (How it move the signal frequency to
the selected frequency?)




Basic Approach
Assuming we are using BFSK as the data
modulation scheme.
Then the output signal from modulator or the
input signal to the FH spreader can be defined
as:
BFSK of frequency carrier ,
signal of amplitude
0 ) 2 cos(
1 ) 2 cos(
) (
2 1
2
1
=
=

=
f f
A
where
binary t f A
binary t f A
t s
d
t
t
Basic Approach
The frequency synthesizer generates a constant-
frequency tone.
The frequency hops among a set of 2
k
frequencies.
The hopping pattern determined by k bits from the PN
sequence.
Assume the duration of one hop is the same as
the duration of one bit.
Ignore phase differences between s
d
(t) and the
spreading signal c(t), or chipping signal.
Basic Approach
If the frequency of the signal generated by the
frequency synthesizer during the ith hop is f
i
, the
product signal p(t) during the ith hop is:



Using the trigonometric identity:

= =
0 ) 2 cos( ) 2 cos(
1 ) 2 cos( ) 2 cos(
) ( ) ( ) (
i 2
i 1
binary t f t f A
binary t f t f A
t c t s t p
d
t t
t t
)) cos( ) )(cos( 2 1 ( ) cos( ) cos( y x y x y x + + =
Basic Approach
We can easily get



The bandpass filter is used to block the difference
frequency and pass the sum frequency, then the
spread spectrum signal is
| |
| |

+ +
+ +
=
0 ) ) ( 2 cos( ) ) ( 2 cos( 5 . 0
1 ) ) ( 2 cos( ) ) ( 2 cos( 5 . 0
) (
i 2 i 2
i 1 i 1
binary t f f t f f A
binary t f f t f f A
t p
t t
t t

+
+
=
0 ) ) ( 2 cos( 5 . 0
1 ) ) ( 2 cos( 5 . 0
) (
i 2
i 1
binary t f f A
binary t f f A
t s
t
t
Basic Approach
Thus, during the ith bit interval, the frequency
of the spread spectrum signal is f
1
+f
i
if the data
bit is 1 and f
2
+f
i
if the data bit is 0.

The central frequency is now moved to f
2
+f
i
or
f
1
+f
i.

Problems
[Problems]
1. How does the FH spreader work when we use
BPSK modulation? (How it move the signal
frequency to the selected frequency when BPSK is
used?)




Basic Approach
Basic Approach
On reception, a signal of the form s(t) just defined
will be received.
The spread spectrum signal is demodulated using the
same sequence of PN-derived frequencies.
Then demodulated to produce the output data.
How does the receiver work?
Basic Approach
Signal s(t) is multiplied by a replica of the spreading
signal to yield a product signal of the form:



Again using the trigonometric identity

+
+
= =
0 ) 2 cos( ) ) ( 2 cos( 5 . 0
1 ) 2 cos( ) ) ( 2 cos( 5 . 0
) ( ) ( ) (
i 2
i 1
'
binary t f t f f A
binary t f t f f A
t c t s t p
i
i
t t
t t
| |
| |

+ +
+ +
=
0 ) 2 cos( ) ) 2 ( 2 cos( 25 . 0
1 ) 2 cos( ) ) 2 ( 2 cos( 25 . 0
) (
2 i 2
1 i 1
'
binary t f t f f A
binary t f t f f A
t p
t t
t t
Basic Approach
At the receiver, the bandpass filter is used to
block the sum frequency and pass the
difference frequency, then a signal of the form
of is yielded.

=
0 ) 2 cos( 25 . 0
1 ) 2 cos( 25 . 0
) (
2
1
'
binary t f A
binary t f A
t s
d
t
t
) (
'
t s
d
Problems
[Problems]
2. How does the FH despreader work when we use
BPSK modulation? (How it move the signal
frequency back to the carrier frequency when BPSK
is used?)




Frequency-Hopping Spread Spectrum
Basic Approach
FHSS Using MFSK
FHSS Performance
FHSS using MFSK
MFSK is a common modulation technique used in
conjunction with FHSS.
Recall: MFSK uses M=2
L
different frequencies to
encode the digital input L bits at a time.
element signal per bits of number
2 elements signal different of number
s frequencie carrier the
1 ) 2 cos( ) ( MFSK
i
=
= =
=
s s =
L
M
f
where
M i t f A t s
L
i
t
FHSS using MFSK
For FHSS, the MFSK signal is translated to a new
frequency every T
c
seconds by modulating the MFSK
signal with the FHSS carrier signal.
The effect is actually to translate the MFSK signal
into the appropriate FHSS channel.
For a data rate of R, the duration of a bit is T=1/R
seconds and the duration of a signal elements is
T
s
=LT seconds.
FHSS using MFSK
If T
c
is greater than or equal to T
s
the
spreading modulation is referred to as slow-
frequency-hop spread spectrum
Otherwise it is known as fast-frequency-hop
spread spectrum.
FHSS using MFSK
[Example 1] If we use the MFSK example from
last chapter.




M=4, which means that four different frequencies are
used to encode the data input 2 bits at a time.
FHSS using MFSK
Each signal element is a discrete frequency tone. The
total MFSK bandwidth is W
d
=Mf
d
.
If we use an FHSS scheme with k=2, there are 4=2
k

different channels, each of width W
d
. The total FHSS
bandwidth is W
s
=2
k
W
d
.
Each 2 bits of the PN sequence is used to select one
of the four channels. That channel is held for a
duration of two signal elements, or four bits
(T
c
=2T
s
=4T)
FHSS using MFSK
PN sequence
Input binary data
Slow FHSS
F
r
e
q
u
e
n
c
y

[Example 2] Using the same MFSK example.
M=4 and k=2. W
d
=Mf
d
and

W
s
=2
k
W
d
.
However in this case, each signal element is
represented by two frequency tones. Then
T
s
=2T
c
=2T.

F
r
e
q
u
e
n
c
y

PN sequence
Input binary data
Fast FHSS
Another two example

time
F
r
e
q
u
e
n
c
y


time
F
r
e
q
u
e
n
c
y

Frequency-Hopping Spread Spectrum
Basic Approach
FHSS Using MFSK
FHSS Performance
FHSS Performance
Typically, a large number of frequencies are used in
FHSS so that W
s
is much larger than W
d
.
Large value of k results in a system that is quite
resistant to jamming.
Suppose MFSK has bandwidth W
d
and noise jammer
has the same bandwidth. If the jammer has a fixed
power S
j
on the signal carrier frequency, then the ratio
of signal energy per bit to noise power density is:
j
d b
d j
b
j
b
S
W E
W S
E
N
E
= =
/
If frequency hopping is used, the jammer must jam all
2
k
frequencies.
For fixed noise power, since W
s
=2
k
W
d
, this reduces
the jamming power density to S
j
/(2
k
W
d
). Then


The gain in signal-to-noise ratio (the processing gain)
is

j
k
d b
d
k
j
b
j
b
S
W E
W S
E
N
E
2 ) 2 /(
'
= =
k
d
s
P
W
W
G 2 = =
[Example] An FHSS system using MFSK with
M=4 employs 1000 different frequencies.
What is the processing gain?
[Example] The following table illustrates the operation
of an FHSS system for one complete period of the
PN sequence.
a. What is the period of the PN sequence?
b. The system makes use of a form of FSK, what form of FSK
is it?
c. What is the number of bits per symbol?
d. What is the number of FSK frequencies?
e. What is the length of PN sequence per hop?
f. Is this a slow or fast FH system?
g. What is the total number of possible hops?

Time
12 13 14 15 16 17 18 19
Input data
0 1 1 1 1 0 1 0
Frequency
f
1
f
3
f
2
f
2
PN sequence 001 001
Time
0 1 2 3 4 5 6 7 8 9 10 11
Input data
0 1 1 1 1 1 1 0 0 0 1 0
Frequency
f
1
f
3
f
27
f
26
f
8
f
10
PN sequence 001 110 011
[Example] The following table illustrates the operation
of an FHSS system for one complete period of the
PN sequence.
a. What is the period of the PN sequence?
b. The system makes use of a form of FSK, what form of FSK
is it?
c. What is the number of bits per symbol?
d. What is the number of FSK frequencies?
e. What is the length of PN sequence per hop?
f. Is this a slow or fast FH system?
g. What is the total number of possible hops?
Time
12 13 14 15 16 17 18 19
Input data
0 1 1 1 1 0 1 0
Frequency
f
9
f
1
f
3
f
3
f
22
f
11
f
3
f
3
PN sequence
011 001 001 001 110 011 001 001
Time
0 1 2 3 4 5 6 7 8 9 10 11
Input data
0 1 1 1 1 1 1 0 0 0 1 0
Frequency
f
1
f
21
f
11
f
3
f
3
f
3
f
22
f
10
f
0
f
0
f
1
f
22
PN sequence
001 110 011 001 001 001 110 011 001 001 001 110
Outline
5.1 Concept of Spread Spectrum
5.2 Frequency-Hopping Spread Spectrum
5.3 Direct Sequence Spread Spectrum
5.4 Code Division Multiple Access
5.5 Generation of Spreading Sequences
Direct Sequence Spread Spectrum
DSSS Using BPSK
DSSS Performance
DSSS Using BPSK
Direct Sequence Spread Spectrum DSSS
Each bit in the original signal is represented by
multiple bits in the transmitted signal, using a
spreading code.
The spreading code spreads the signal across a
wider frequency band in direct proportion to the
number of bits used.
A 10-bit spreading code spreads the signal across a
frequency band that is 10 times greater than a 1-bit
spreading code.
DSSS Using BPSK
One technique with DSSS is to combine the digital
information stream with the spreading code bit stream
using an exclusive-OR (XOR).
The XOR obeys the following rules:
1 0 1 1 1 0 0 1 1 0 0 0 = = = =
DSSS Using BPSK

DSSS Using BPSK
This example shows that
An information bit of one inverts the spreading
code bits in the combination
An information bit of zero causes the spreading
code bits to be transmitted without inversion.
The combination bit stream has the data rate of the
original spreading code sequence, so it has a wider
bandwidth than the information stream.
In this example, the rate of spreading code bit
stream is four times the information rate.
DSSS Using BPSK
A BPSK signal can be expressed as:



To produce the DSSS signal, we multiply the
above by c(t), which is the PN sequence taking
on values of +1 and -1.

+
=
=
0 binary 1
1 binary 1
s(t)
signal NRZ bipolar is ) (
) 2 cos( ) ( BPSK
t s where
t f A t s e
c BPSK
t
) 2 cos( ) ( ) ( t f t c t As e
c DSSS
t =
DSSS Using BPSK
At the receiver, the incoming signal is
multiplied by c(t). Because c(t)c(t)=1, the
original signal is recovered:
BPSK c DSSS
e t c t f t c t As t c e = = ) ( ) 2 cos( ) ( ) ( ) ( t
DSSS Using BPSK
The DSSS signal expression can be interpreted
in two ways, leading two different
implementations.
First multiply s(t) and c(t) together and then
perform the BPSK modulation.
Alternatively, we can first perform the BPSK
modulation on the data stream s(t) to generate the
data signal eBPSK. This signal can then be multiplied
by c(t).
DSSS Using BPSK
Transmitter using the second interpretation:
DSSS Using BPSK
Receiver using the second interpretation:

DSSS Using BPSK
[Example]
DSSS Using BPSK

Direct Sequence Spread Spectrum
DSSS Using BPSK
DSSS Performance
DSSS Performance
The information signal has a bit width of T,
which is equivalent to a data rate of 1/T. the
spectrum of the signal depending on the
encoding technique, is roughly 2/T.
Similarly, the spectrum of the PN signal is
2/Tc.
The amount of spreading that is achieved is a
direct result of the data rate of the PN stream.
DSSS Performance

DSSS Performance
Effectiveness against jamming
Assume a simple jamming signal at the center
frequency of the DSSS system. The jamming
signal is:

The received signal is


) 2 cos( 2 ) ( t f S t s
c j j
t =
noise white additive ) (
signal received ) (
power signal jammer
) ( ) ( ) ( ) (
=
=
=
+ + =
t n
t e
S where
t n t s t e t e
r
j
j DSSS r
DSSS Performance
The despreader at the receiver multiplies er(t) by c(t), so the
signal component due to the jamming signal is:


This is simply a BPSK modulation of the carrier tone. Thus
the carrier power Sj is spread over a bandwidth of
approximately 2/Tc.
The BPSK demodulator following the DSSS despreader
includes a bandpass filter matched to the BPSK with
bandwidth of 2/T.
Most of the jamming power is filtered.
) 2 cos( ) ( 2 ) ( t f t c S t y
c j i
t =
DSSS Performance
As an approximation, the jamming power passed by
the filter is

The jamming power has been reduced by a factor of
(Tc/T) through the use of spread sprectrum.
The gain in signal-to-noise ratio is:

) / ( ) / 2 /( ) / 2 ( T T S T T S F S
c j c j j
= =
bandwidth signal spectrum spread
bandwidth signal
rate bit spreading rate data
=
=
= =
~ = =
c
d
c
d
c c
c
P
W
W
R R where
W
W
R
R
T
T
G
Outline
5.1 Concept of Spread Spectrum
5.2 Frequency-Hopping Spread Spectrum
5.3 Direct Sequence Spread Spectrum
5.4 Code Division Multiple Access
5.5 Generation of Spreading Sequences
Code Division Multiple Access
Basic Principles
CDMA for DSSS
Code Division Multiple Access
CDMA is a multiplexing technique used with
spread spectrum.
Assuming data signal with rate D, break each bit
into k chips according to a fixed pattern that is
specific to each user, called the users code.
The new channel has a chip data rate of kD chips
per second.
Code Division Multiple Access
A simple example with k=6. It is simplest to
characterize a code as a sequence of 1s and -1s.

Code Division Multiple Access
Three users A, B and C, each of which is
communicating with the same base station
receiver R. The code for each user:
C
A
= < 1 -1 -1 1 -1 1>
C
B
= < 1 1 -1 -1 1 1>
C
C
= < 1 1 -1 1 1 -1>
The base station receiver is assumed to know
user A B Cs code.
Code Division Multiple Access
At the receiver
If the receiver receives a chip pattern d=<d
1
d
2
d
3

d
4
d
5
d
6
>
The receiver has user us code C
u
=< c
1
c
2
c
3
c
4
c
5

c
6
>
The receiver performs electronically the following
decoding function

6 6 5 5 4 4 3 3 2 2 1 1
) ( c d c d c d c d c d c d d S
u
+ + + + + =
Code Division Multiple Access
User A:
If A wants to send a 1 bit, A transmits its code as
a chip pattern d=< 1 -1 -1 1 -1 1>.
If A wants to send a 0 bit, A transmits the
complement of its code (1s and -1s reversed) as a
chip pattern d=<-1 1 1 -1 1-1>.
The code for user A is c=C
A
= < 1 -1 -1 1 -1 1>



Code Division Multiple Access
User A:
If A sends a 1 bit,


If A sends a 0 bit


Note that it is always the case that -6S
A
(d)6 no
matter what d is.


6 1 1 ) 1 ( ) 1 ( 1 1
) 1 ( ) 1 ( ) 1 ( ) 1 ( 1 1 ) 1 , 1 , 1 , 1 , 1 , 1 (
= + +
+ + + =
A
S
6 1 ) 1 ( ) 1 ( 1 1 ) 1 (
) 1 ( 1 ) 1 ( 1 1 1 - ) 1 , 1 , 1 , 1 , 1 , 1 (
= + +
+ + + =
A
S
Code Division Multiple Access
Code Division Multiple Access
User A:
The only ds resulting in the extreme values of
6 and -6 are As code and its complement
respectively.
If S
A
produces a +6, received a 1 bit from A
If S
A
produces a -6, received a 0 bit from A
Otherwise we assume that someone else is sending
information or there is an error.

Code Division Multiple Access
If user B is sending and we try to received it with S
A
,
that means we are decoding the received chip pattern
with the wrong code (C
A
).
If B sends a 1 bit, then d= < 1 1 -1 -1 1 1>, c=C
A
= < 1 -
1 -1 1 -1 1>


Since S
A
=0, we know that someone else apart from A is
sending information (in this case is user B).
If B had sent a 0 bit, the decoder would produce a value of
0 for S
A
again.

0 1 ) 1 ( ) 1 ( ) 1 ( 1 1
) 1 ( 1 ) 1 ( ) 1 ( 1 ) 1 ( ) 1 , 1 , 1 - , 1 , 1 , 1 (
= + +
+ + + =
A
S
Transmit (data bit = 0) -1 -1 1 1 -1 -1
Receiver codeword 1 -1 -1 1 -1 1
Multiplication -1 1 -1 1 1 -1 = 0
Code Division Multiple Access
If the decoder is linear and if A and B transmit
signals d
A
and d
B
respectively, at the same
time, then since
equal to 0 when it is decoded by As code.
The code of A and B that have the property
that are called orthogonal
code.

) ( ) ( ) ( ) (
A A B A A A B A A
d S d S d S d d S = + = + ) (
B A
d S
0 ) ( ) ( = =
A B B A
C S C S
Code Division Multiple Access
Combined signal 2 0 -2 0 0 2
Receiver codeword 1 1 -1 -1 1 1
Multiplication 2 0 2 0 0 2 = 6
Transmission from A and B, receiver attempts to recover As transmission
A (data bit = 1) 1 -1 -1 1 -1 1
B (data bit = 1) 1 1 -1 -1 1 1
Combined signal 2 0 -2 0 0 2
Receiver codeword 1 -1 -1 1 -1 1
Multiplication 2 0 2 0 0 2 = 6
Transmission from A and B, receiver attempts to recover Bs transmission
Code Division Multiple Access
Combined signal 0 -2 0 2 -2 0
Receiver codeword 1 1 -1 -1 1 1
Multiplication 0 -2 0 -2 -2 0 = -6
Transmission from A and B, receiver attempts to recover As transmission
A (data bit = 1) 1 -1 -1 1 -1 1
B (data bit = 0) -1 -1 1 1 -1 -1
Combined signal 0 -2 0 2 -2 0
Receiver codeword 1 -1 -1 1 -1 1
Multiplication 0 2 0 2 2 0 = 6
Transmission from A and B, receiver attempts to recover Bs transmission
Code Division Multiple Access
Such code are very nice but there are not many
of them. More common is the case that is
small in absolute value when XY.
Then it is easy to distinguish between the two
cases when X=Y and when XY.
In our example, but
, in the latter case the C
signal would make a small contribution to the
decoded signal.
) (
Y X
C S
0 ) ( ) ( = =
A C C A
C S C S
2 ) ( ) ( = =
B C C B
C S C S
Code Division Multiple Access
Transmit (data bit = 0) -1 -1 1 -1 -1 1
Receiver codeword 1 1 -1 -1 1 1
Multiplication -1 -1 -1 1 -1 1 = -2
Code Division Multiple Access
Combined signal 2 2 -2 0 2 0
Receiver codeword 1 1 -1 1 1 -1
Multiplication 2 2 2 0 2 0 = 8
Transmission from B and C, receiver attempts to recover Cs transmission
Code Division Multiple Access
B (data bit = 1) 1 1 -1 -1 1 1
C (data bit = 0) -1 -1 1 -1 -1 1
Combined signal 0 0 0 -2 0 2
Receiver codeword 1 1 -1 1 1 -1
Multiplication 0 0 0 -2 0 -2 = -4
(f) Transmission from B and C, receiver attempts to recover Bs transmission
B (data bit = 1) 1 1 -1 -1 1 1
C (data bit = 0) -1 -1 1 -1 -1 1
Combined signal 0 0 0 -2 0 2
Receiver codeword 1 1 -1 -1 1 1
Multiplication 0 0 0 2 0 2 = 4
Transmission from B and C, receiver attempts to recover Cs transmission
Code Division Multiple Access
Using the decoder S
u
, the receiver can sort out
transmission from u even when there may be other
users broadcasting in the same cell.
In practice, the CDMA receiver can filter out the
contribution from unwanted users or they appear as
low-level noise.
However the system breaks down:
if there are many users competing for the channel with the
user the receiver is trying to listen to
if the signal power of one or more competing signals is too
high (perhaps because it is very near the receiver)
Code Division Multiple Access
Basic Principles
CDMA for DSSS
CDMA for DSSS
Look at CDMA from the viewpoint of a DSSS system using
BPSK.
CDMA for DSSS
There are n users, each transmitting using a different
orthogonal PN sequence.
For each user, the data stream d
i
(t) is BPSK
modulated to produce a signal with a bandwidth of W
s

and then multiplied by the spreading code c
i
(t) for
that user.
All of the signals, plus noise, are received at the
receivers antenna.
CDMA for DSSS
Suppose that the receiver is attempting to recover the
data of user 1. The incoming signal is multiplied by
the spreading code of user 1 and them demodulated.
The effect of this is to narrow the bandwidth of that
portion of the incoming signal corresponding to user
1 to the original bandwidth of unspread signal, which
is proportional to the data rate.
Because the remainder of the incoming signal is
orthogonal to the spreading code of user 1, that
remainder still has the bandwidth W
s
.
CDMA for DSSS
Thus the unwanted signal energy remains
spread over a large bandwidth and the wanted
signal is concentrated in a narrow bandwidth.
The bandpass filter at the demodulator can
therefore recover the desired signal.
Outline
5.1 Concept of Spread Spectrum
5.2 Frequency-Hopping Spread Spectrum
5.3 Direct Sequence Spread Spectrum
5.4 Code Division Multiple Access
5.5 Generation of Spreading Sequences
Generation of Spreading Sequences
Spreading consists of multiplying the input
data by the spreading sequence, where the bit
rate of the spreading sequence is higher than
that of the input data.
When the signal is received, the spreading is
removed by multiplying with the same
spreading code, exactly synchronized with the
received signal.
Generation of Spreading Sequences
Spreading code:
There should be an approximately equal number of
ones and zeros in the spreading code.
Few or no repeated patterns
In CDMA application, further requirement of lack
of correlation
Two general categories of spreading
sequences:
PN sequences
Orthogonal codes

Generation of Spreading Sequences
PN Sequences
Orthogonal Code
Multiple Spreading
Generation of Spreading Sequences
PN Sequences
PN Properties
LFSR implementation
M-Sequences Properties

PN Sequences
Ideal spreading sequence would be a random
sequence of binary ones and zeros.
It is required that transmitter and receiver must
have a copy of the random bit stream.
A predictable way is needed to generate the
same bit stream at the transmitter and receiver
and also retain the desirable properties of a
random bit stream.
A PN generator can meet this requirement.
PN Sequences
A PN generator will produce a periodic sequence that
eventually repeats but that appears to be random.
PN sequences are generated by an algorithm using
some initial value called the seed.
The algorithm is deterministic and therefore produces
sequences of numbers that are not statistically random.
But if the algorithm is good, the resulting sequences will
pass many reasonable tests of randomness.
Such numbers are often referred to as pseudorandom
numbers, or pseudorandom sequences.
Unless you know the algorithm and the seed, it is
impractival to predict the sequence.

PN Sequences
PN properties:
Randomness
Unpredictability

Two criteria are used to validate that a
sequence of numbers is random
Uniform distribution
Independence



PN Sequences
Uniform distribution:
The distribution of numbers in the sequence should
be uniform
The frequency of occurrence of each of the
numbers should be approximately the same.
For a stream of binary digits, we need to expand
on this definition.
PN Sequences
For a stream of binary digits, two properties are
desired:
Balance property: in a long sequence the fraction of
binary ones should approach .
Run property: a run is defined as a sequence of all 1s or
a sequence of all 0s. The appearance of the alternate
digit is the beginning of a new run. About of the runs
should be of length 1, of length 2, 1/8 of length3, and
so on.

000100110101111

PN Sequences
Independence:
No one value in the sequence can be inferred from
the others.
No such test to prove independence
A number of tests can be applied to demonstrate
that a sequence does not exhibit independence.
General strategy is to apply a number of such tests
until confidence that independence exists is
sufficiently strong.
PN Sequences
In applications such as spread spectrum,
Correlation property is required.
If a period of the sequence is compared term by
term with any cycle shift of itself, the number of
terms that are the same differs from those that are
different by at most 1.
Generation of Spreading Sequences
PN Sequences
PN Properties
LFSR implementation
M-Sequences Properties

LFSR implementation
Linear Feedback Shift Register Implementation: a
circuit consisting of XOR gates and a shift register
implementing the PN generator for spread spectrum
A string of 1-bit storage devices.
Each device has an output line, which indicates the value
currently stored, and an input line.
At discrete time instants, known as clock times, the value in
the storage device is replaced by the value indicated by its
input line.
The entire LFSR is clocked simultaneously, causing a 1-bit
shift along the entire register.
LFSR implementation
The circuit is implemented as follows:
The LFSR contains n bits.
There are from 1 to (n-1) XOR gates.
The presence or absence of a gate corresponds to
the presence or absence of a term in the generator
polynomial (explained subsequently), P(X),
excluding the X
n
term.
LFSR implementation
Two equivalent ways of characterizing the PN
LFSR:
A sum of XOR terms


Generator polynomial
1 1 2 2 1 1 0 0
=
n n n
B A B A B A B A B
n n
n
X X A X A X A X A X P + + + + + =

1
1
2
2
1
1
0
0
) (
LFSR implementation
Fig: Binary Linear Feedback Shift Register Sequence Generator
LFSR implementation
An actual implementation would not have the
multiple circuits; instead, for A
i
=0, the corresponding
XOR circuit is eliminated.
[Example] A 4-bit LFSR:
1 0 3
B B B =

LFSR implementation
Advantages of shift register technique:
The sequences generated can be nearly random
with long periods
LFSRs are easy to implement in hardware and can
run at high speeds (this is important because the
spreading rate is higher than the data rate)
LFSR implementation
Output of n-bit LFSR:
Is periodic with maximum period N=2
n
-1.
All-zeros sequence occurs
if the initial contents of the LFSR are all zero
or the coefficients of B
n
are all zero (no feedback)
When a period of N is given, a feedback
configuration can always be found, the resulting
sequence are called maximal-length sequences, or
m-sequences.
LFSR implementation
Step-by-step operation of
the 4-bit LFSR with an
initial state of 1000
(B
3
=1, B
2
=0, B
1
=0,
B
1
=0).
The values currently
stored in the four shift
register elements

The values that


appear at the output
of the XOR circuit
The value of the
output bit, which is B
0

in this example.

LFSR implementation
The period of the sequence, or the length of the
m-sequence: 2
4
-1=15. the output repeats after
15 bits.
The same periodic m-sequence is generated
regardless of the initial state of the LFSR
(except for 0000).
With each different initial state, the m-
sequence begins at a different point in its
cycle.
LFSR implementation
For any given size of LFSR, a number of
different unique m-sequences can be generated
by using different values for the A
i
.
The table next page shows the sequence length
and number of unique m-sequences that can be
generated for LFSRs of various sizes, also an
example generating polynomial.
LFSR implementation
B
n
for

LFSR implementation
One useful attribute of the generator
polynomial is that it can be used to find
sequence generated by the corresponding
LFSR, by taking the reciprocal of the
polynomial.
[Example] A three bit LSFR with
P(X)=1+X+X
3
, we perform the division
1/(1+X+X
3
).
LFSR implementation
Watch out: The
subtractions are done
modulo 2, or using
the XOR function, in
this case, subtraction
produces the same
result as addition.
LFSR implementation
So the result of 1/(1+X+X
3
) is
1+X+X
2
+(0X
3
)+X
4
+(0X
5
) +(0X
6
)
after which the pattern repeats.
This means that the shift register output is
1110100
Because the period of this sequence is 7=2
3
-1,
this is an m-sequence.

Generation of Spreading Sequences
PN Sequences
PN Properties
LFSR implementation
M-Sequences Properties

M-Sequences
M-sequences have several properties that make
them attractive for spread spectrum
applications:
Property 1. m-sequence has 2
n-1
ones and 2
n-1
-1
zeros.
Property 2. If we slide a window of length n along
the output sequence for N shifts (where N=2
n
-1),
each n-tuple appears exactly once.
1 1 1 0 1 0 0 1 1 1 0 1 0
111, 110, 101, 010, 100, 001, 011
M-Sequences
Property 3. There is one run of ones of length n;
one run of zeros of length n-1; one run of ones and
one run of zeros of length n-2; two runs of ones
and two runs of zeros of length n-3; and in general,
2
n-3
runs of ones and 2
n-3
runs of zeros of length 1.
When n=4, N=15, 0 0 0 1 0 0 1 1 0 1 0 1 1 1 1
1 run of 1s of length 4
1 run of 0s of length 3
1 run of 1s and 1 run of 0s of length 2
2 runs of 1s and 2 runs of 0s of length 1 (2
n-3
=2)
M-Sequences
Correlation is the concept of determining how much
similarity one set of data has with another.
Correlation is defined with a range between -1 and 1
with the following meanings:
Value 1, the second sequence matches the first sequence
exactly
Value 0, there is no relation at all
Value -1, the two sequences are mirror images of each
other.
Other value indicate a partial degree of correlation.


Autocorrelation is the correlation of a sequence with
all phase shifts of itself.


Cross correlation function: the comparison is made
between two sequences from different sources ranther
than a shifted copy of a sequence with itself. It is
defined as:

=

=
N
k
k k
B A
N
R
1
1
) (
t
t
=

=
N
k
k k
B B
N
R
1
1
) (
t
t
M-Sequences
Property 4. For many applications, the 0,1
sequence is changed to a 1 sequence. Tthe
periodic autocorrelation of the resulting sequence
is:


The periodic autocorrelation of a 1 m-sequence
is:
=

=
N
k
k k
B B
N
R
1
1
) (
t
t
( )
otherwise
... 2N, N, 0,
1
1
=

=

N
R t
M-Sequences
M-Sequences
The cross correlation between an m-sequence and
noise is low
This property is useful to the receiver in filtering out noise
The cross correlation between two different m-
sequences is low
This property is useful for CDMA applications
Enables a receiver to discriminate among spread spectrum
signals generated by different m-sequences

Generation of Spreading Sequences
PN Sequences
Orthogonal Code
Multiple Spreading
Orthogonal Code
Orthogonal Code: a ser of sequences in which all
pairwise cross correlations are zero.
An orthogonal set of sequences is characterized by
the following equality:




For CDMA, each user uses one of the sequences in
the set as a spreading code, providing zero cross
correlation among all users.
( ) ( )
duration bit
set the of members th and th the are ,
set the in sequence each of length the
0
1
0
=
=
= =

=
t
| |
t | t |
j i
M where
j i k k
j i
M
k
j i
Generation of Spreading Sequences
Orthogonal Code
Walsh Codes
Variable-length Orthogonal code
Walsh Codes
Walsh codes: the most common orthogonal
codes used in CDMA applications.
A set of Walsh codes of length n consists of the n
rows of an nn Walsh matrix.
The matrix is defined recursively as:



Where n is the dimension of the matrix and the
overscore denotes the logical NOT of the bits in
the matrix.
( )
|
|
.
|

\
|
= =
n n
n n
n
W W
W W
W 0 W
2 1
Walsh Codes
The Walsh matrix has the property that every
row is orthogonal to every other row and to the
logical NOT of every other row.
The next figure shows the Walsh matrices of
dimensions 2, 4 and 8. Recall that to compute
the cross correlation, we replace 1 with +1 and
0 with -1.
Walsh Codes

Generation of Spreading Sequences
Orthogonal Code
Walsh Codes
Variable-length Orthogonal code
Variable-length Orthogonal code
3G mobile CDMA systems are designed to
support users at a number of different data
rates.
Effective support can be provided by using
spreading codes at different rates while
maintaining orthogonality.
Suppose that the minimum data rate to be
supported is Rmin and that all other data rate are
related by power of 2.
Variable-length Orthogonal code
If a spreading sequence of length N is used for the
R
min
data rate, such that each bit of data is spread by
N=2
n
bits of the spreading sequence, then the
transmitted data rate is NR
min
.
For a data rate of 2R
min
, a spreading sequence of
length N/2=2
n-1
will produce the same output rate of
NR
min
.
In general, a code length of 2
n-k
is needed for a bit
rate of 2
k
R
min
.
E.H. Dinan and B. Jabbari, Spreading codes for direct
sequence CDMA and wideband CDMA cellular networks,
IEEE Comm. Mag. 36 (September 1998)
Generation of Spreading Sequences
PN Sequences
Orthogonal Code
Multiple Spreading
Multiple Spreading
When sufficient bandwidth is available, a multiple
spreading techniques can prove highly effective. A
typical approach is:
Spread the data rate by an orthogonal code to provide
mutual orthogonality among all users in the same cell
To further spread the result by a PN sequence to provide
mutual randomness between users in different cells.
In such a two-stage spreading, the orthogonal codes are
referred to as channelization codes, and the PN codes are
referred to as scrambling codes.
Stallings W. Wireless Communications and Networks
chapter 10.
Review Questions
[Review Questions]

You might also like