I. A General Description of Direct Sequence Spreading
I. A General Description of Direct Sequence Spreading
Gene W. Marsh
Channel Channel
Encoder Modulator Channel Demodulator Decoder
Channel Channel
Encoder Modulator Channel Demodulator Decoder
PN Generator PN Generator
1. If you like your bits to be from the set { 0, 1 } , then you can replace bi and ci with 2bi 1 and 2ci 1 ,
below.
Modulator Demodulator
bi { 1, 1}
xi ( t ) zi ( t ) yi ( t ) ri
g(t) Channel g(T t)
T
Fig. 3. The Standard Model
Modulator
bi { 1, 1 }
xij ( t ) zij ( t )
g(t) Channel
Demodulator
cij { 1, 1}
zij ( t ) yij ( t ) r ij sij di
g(Tc t) sij
0 j Lc
Tc
cij { 1, 1}
Page 2 of 16
Direct Sequence Spreadin g
1
c) The time Tc is then known as a chip time, while Rc = ----
T-c is known as
the chip rate or spreading rate.
d) The spreading bits cij are assumed to be i.i.d Bernoulli random variables
1
over { 1, 1} with parameter --2- .
T Rc
e) Clearly, Lc = ----
Tc - = -----
R is the number of chips per bit. This is often
referred to as the bandwidth expansion factor.
Eb 2E b
P ( 'e bi = 1) = P ( di > 0 bi = 1) = Q ----------------- = Q --------
-
N0 N0
------E
2 b
Eb 2Eb
P ( 'e bi = 1 ) = P ( di < 0 bi = 1) = 1 Q ----------------- = Q ---------
N0 N0
----- 2 b- E
Page 3 of 16
Direct Sequence Spreadin g
2Eb
P ( 'e ) = Q --------- (1)
N0
b) In the CDMA system, for each chip, we have
where Ec = g ( t ) 2 dt .
After the multiplier, the sij clearly have mean E sij bi, cij = bi E c and
2
variance 2(sij bi, cij) = (rij bi, cij) . In particular, we should note that
the sij do not depend on the cij at all.
Now, if we sum the Lc chips corresponding to a particular bit, we find
that di is again Normal, with conditional mean and variance given by
2
N0
E di bi = bi Lc Ec and di bi = 2- Lc Ec . The probability of error
-----
is therefore still
2Lc E c 2E b
P ( 'e ) = Q --------------
N0 - = Q --------
N0- (2)
Rc
where E b = Lc Ec = -----E c .
R
c) Therefore, spreading has not cost us anything, except some complexity in
the modulator/demodulator.
(1) In general, this is only true for direct spreading in coherent commu-
nications systems.
(2) It should surprise no one that this is true, since, if you look carefully
at our picture, all we have done is modify the transmit filter, and
then made a matched filter for the receiver.
Page 4 of 16
Direct Sequence Spreadin g
out
5 4 3 2 1
x x x + x x
Page 5 of 16
Direct Sequence Spreadin g
Page 6 of 16
Direct Sequence Spreadin g
1f 1 14 0 12 0 15 1
1d 1 a 0 9 1 18 0
1c 0 5 1 16 0 c 0
e 0 10 0 b 1 6 0
7 1 8 0 17 1 3 1
11 1 4 0 19 1 13 1
1a 0 2 0 1e 0 1b 1
d 1 1 1 f 1 1f 1
a. States are listed sequentially down the columns
(2) The shift around method is shown in Figure 5. This is the pre-
ferred method for implementing an M-sequence in hardware. The
sequence produced by this implementation is shown in Table 1.
Note that the output sequence shown here is the reverse of the one
in Table 1.
4 3 2 1 0 out
x x x x x
+
Fig. 6. A Fibonacci Configuration
Page 7 of 16
Direct Sequence Spreadin g
1f 1 1b 1 2 0 1a 0
f 1 1d 1 1 1 d 1
7 1 e 0 10 0 6 0
3 1 17 1 8 0 13 1
11 1 b 1 4 0 19 1
18 0 15 1 12 0 1c 0
c 0 a 0 9 1 1e 0
16 0 5 1 14 0 1f 1
a. States are listed sequentially down the columns.
Page 8 of 16
Direct Sequence Spreadin g
1 1
Ec = g ( Lc t ) 2 dt = ----
L-c g ( t ) 2 dt = -----E
Lc b
After despreading, the energy has increased by a factor of Lc , as we saw
above. Therefore, we have spread the same energy over a a wider spectrum.
This makes the signal harder to distinguish from the noise background. It is
Page 9 of 16
Direct Sequence Spreadin g
E r ij bi, cj = bi cij E c
2
N0
2
rij bi, cij = 2- Ec + E c
-----
2
2(s ij bi, cij) = (r ij bi, cij)
E di bi = b i L c Ec
N0
di bi = -----
2 2
2- Lc Ec + Lc Ec
2
( L c Ec ) Eb
P ( 'e ) = Q ------------------------------------- = Q ------------------
- (4)
N0 N0
-----
2
- Lc E c + L c E c 2
------ + E c
2
a) Note that we assumed that the two users were lined up in time. In general,
this is not true, but it is the worst case. In that sense, the above is an upper
Page 10 of 16
Direct Sequence Spreadin g
Eb
P ( 'e ) Q --------------------------------------
- (5)
N0
2- + ( N 1 ) Ec
-----
c) It is theoretically possible to approach Shannon capacity using this
approach.
(1) If I remember right, theoretically is the correct word, because the
demodulator needs to demodulate each signal, and subtract off its
effect before it demodulates the next signal.
C. Anti-Jam (AJ) Communications
1. Jamming is the transmission of a signal in order to degrade a communication
system.
2. Design of a communication system which is robust against jamming can be
viewed as a game, where the transmitter tries to minimize the bit error rate,
and the jammer tries to maximize the bit error rate.
3. Often, the jammer is power limited. In this case, what the transmitter wants
to do is to force him to spread his power over the widest possible bandwidth,
so that he wastes as much of his power as possible.
4. Now, consider a channel with no noise, over which we send a BPSK signal.
Suppose the jammer transmits a single loud tone at the carrier frequency. In a
normal system, we can imagine the tone being loud enough that it would
dominate our own signal, and we would demodulate that rather than the
received signal. However, passing it through the despreader modulates that
Page 11 of 16
Direct Sequence Spreadin g
signal, making it look like wide band noise. Our own signal, on the other
hand, becomes despread, making it look like a tone. The spread system per-
forms better than the standard system in such a situation.
5. Direct sequence spreading is not the best or most common technique used for
AJ modems. Most of them use non-coherent FSK and hopping rather than
spreading.
D. Position Location
T
1. To do time tracking for the system above, one takes 2 samples, one at --4- and
3T e l
one at ------
4 . Call them s ij and sij . The time tracking metric is then computed
e
2
l
2
as TM = sij sij . If we are sampling too late, then
0j<L 0j<L
c c
this metric will be positive, and if we are sampling too early, then this metric
will be negative.
2. If we are off by a fraction of a chip, this metric drops appreciably. Therefore,
it is possible to do time tracking down to a fraction of a chip.
1
a) For example, in CDMA cellular, we track to -- 8- of a chip. We could do
better, but this is deemed sufficient.
3. If the spreading sequence is tied to absolute time (more on this below), it is
possible to use this feature to measure the time for a signal to travel from
source to destination. Given several independent transmitters, one can do tri-
angulation.
4. GPS works on a scheme similar to this.
E. Multi-path Mitigation
1. First, realize that we only really need concern ourselves with fading on the
chip level.
a) The wider your signal bandwidth, the less serious the effect of fading.
This is because fades only have a certain bandwidth in the frequency
domain. If your signal is wider than that bandwidth, it is unlikely that a
fade will occur which will crush all of the signal energy.
b) The accepted way to combat fading is with diversity. In this case, direct
sequence spreading gives you time diversity. Since a fade lasts for only a
finite amount of time, it is possible that only a fraction of the chips that
make up one bit will be faded.
2. Consider a case where we have 2 signals arriving with different delays, and
suppose that the difference in the delays, is such that Tc < . Let
Page 12 of 16
Direct Sequence Spreadin g
E r ij bi, cj = bi cij E c
2
N0
rij bi, c ij = ----- 2
2- Ec + E
2
2(s ij bi, cij) = (r ij bi, cij)
E di bi = b i L c Ec
N0
di bi = -----
2 2
2- Lc Ec + Lc E
2
( Lc E c )
P ( 'e ) = Q --------------------------------------
-
N0 2
-----
2 Lc Ec + Lc E
-
L c Ec Eb
P ( 'e) Q ------------------
- = Q ------------------
- (7)
N0 N0
-----
2 - + E c -----
2 - + E c
3. What is the significance of this?
a) Any signal arriving at a time offset greater than one chip looks like white
noise to the current bit. Thus, ISI is controlled.
b) It is possible to demodulate the late path as well. This helps improve our
performance. Thus, the ISI can help you. This is a benefit a narrowband
system cannot provide.
Page 13 of 16
Direct Sequence Spreadin g
V. CDMA Cellular
A. Capacity of the CDMA System2
1. The capacity of the system is determined by the capacity of the mobile-to-
cell link.
a) This is principally because the mobiles must use smaller transmitters,
and cannot synchronize their signals.
2. Let us begin by realizing that the capacity of the system is controlled by the
signal to noise ratio needed to achieve an acceptable link.
a) Since we have a wideband system, it is possible to use powerful coding
techniques with little penalty. Because of this, the CDMA system only
Eb
requires ------ = 7 dB .
N 0 desired
3. Assume the following:
a) The system is interference limited, i.e. that the noise from other users in
our own cell is much greater than the background thermal noise.
b) Assume that we only care about users in our own cell.
c) All signals are power controlled so that the reach the cell with equal
power.3
4. Under these assumptions, we see from (5) that the signal-to-noise ratio is just
Eb Rc
-------------------------
- = R ( N 1) .
-----------------------
( N 1) E c
Eb
a) We need this to be equal to -----
- .
N0 desired
Rc 1
b) Solving gives N -----
R --------------------------
Eb .
------
N0 desired
5. The assumption that we are limited only by the users in our own cell is too
generous. We can mitigate this by appropriate scaling.
a) With an omnidirectional antenna, the number of users is decreased by
about a factor of F = 0.6 .
b) In the actual system, the cells use sectorized antennas. Each sector has a
Page 14 of 16
Direct Sequence Spreadin g
field of view of 120 . Due to overlap between the sectors, this only buys
back a factor of G = 2.55 .
c) Note that both of these numbers are empirical.
6. In a CDMA system, it is possible to have a variable rate transmission, so that
one does not transmit when there is no data.
a) Speech does not occur 100% of the time in a conversation.
b) The amount of dead time varies with the language spoken. For English,
the empirical number is d = 0.4 .
c) By using a variable rate vocoder, and not transmitting during the silent
times, we get to take advantage of this, and our signal to noise ratio
increases appropriately.
7. Therefore, the total capacity of the system is approximately
Rc 1 1
N ----- ----------------------------
R Eb d- F G
-- (8)
------
N0 desired
Page 15 of 16
Direct Sequence Spreadin g
d) If all cells controlling the mobile tell him to increase his power, he does.
Otherwise, he decreases his power.
e) In this way, as a mobile leaves one cell, he will begin to pick up another.
Both cells will tell him to increase his power, so that both can hear.
f) As he moves into the new cell, it will tell him to decrease his output, and
he will. Eventually, the old cell can no longer hear him.
g) This is the basic mechanism for a handoff, but the reality is much more
complicated.
C. A Final Note
1. There is a lot more that can be said about CDMA cellular. Due to time pres-
sure, I will stop here. [4] provides a good general description of what CDMA
cellular is and how it works.
VI. References
[1] John G. Proakis. Digital Communications. McGraw-Hill Book Company, New York,
1983.
[2] Marvin K. Simon, Jim K. Omura, Robert A. Sholtz, Barry K. Levitt. Spread Spectrum
Communications, Volume 1. Computer Science Press, Rockville, Maryland, 1985.
[3] Richard E. Blahut. Theory and Practice of Error Control Codes. Addison-Wesley Pub-
lishing Company, Reading, Massachusetts, 1983
[4] An Overview of the Application of Code Division Multiple Access (CDMA) to Digital
Cellular Systems and Personal Cellular Networks. Document Number EX60-10010.
Qualcomm, Inc., San Diego, CA, May 21, 1992.
Page 16 of 16