Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence...

16
Lecture Notes 11: Direct-Sequence Spread-Spectrum Modulation In this lecture we consider direct-sequence spread-spectrum systems. Unlike frequency-hopping, a direct-sequence signal occupies the entire bandwidth continuously. The signal is obtained by starting with a narrowband signal and directly modulating a high bandwidth signal. As with frequency hopping direct-sequence has advantages when the channel contains a jamming like signal. The jamming could be intentional and hostile, self jamming (multipath), and multiuser jamming. In the remained of this chapter we examine the capabilities of direct-sequence is these three environments. Below we show the transmitter and receiver for a direct-sequence system. The data sequence bt consists of a sequence of data bits of duration T . The data sequence is multiplied with a binary spreading sequence at which has N components called chips per data bit. XI-1 bt at 2P cos ϖ c t st Figure 129: Block Diagram of Direct-Sequence Spread-Spectrum Transmitter bt l b l p T t lT b l 1 1 at l a l p T c t lT c a l 1 1 T c TN Usually a i is a periodic sequence with period L. In some cases for each period of the XI-2 sequence a i one data bit is transmitted, i.e. T LT c . When the sequence a i is periodic the spreading signal is a periodic waveform so that at at lT for any integer l . In other cases LT c T , that is, many data bits are transmitted before the sequence repeats. In this case it is useful to model a i as a sequence of independent, identically distributed binary random variables equally likely to be 1. In any case it is nearly always true that TT c N is an integer. This is usually called the “processing gain.” It is the factor by which the signal is spread. st 2Pa t b t cos 2π f c t The transmitted signal has power P. Below we show a data signal and the result of multiplying by a spreading signal with 31 chips per bit. The sequence was generated by a linear feedback shift register such that ˆ a i mod ˆ a i 3 ˆ a i 5 2 where ˆ a denotes a 0,1 sequence. The actual sequence a is found via the usual transformation of 0 1, 1 1. The initial loading of the shift register is [0 0 0 0 1]. XI-3 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 -2 -1 0 1 2 time/T b(t) Data waveform 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 -2 -1 0 1 2 time/T s(t) User 1 waveform Figure 130: Waveforms bt and atbt The receiver consist of a mixer followed by a filter matched to the spreading code of the transmitter. XI-4

Transcript of Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence...

Page 1: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

Lecture Notes 11: Direct-Sequence Spread-Spectrum Modulation

In this lecture we consider direct-sequence spread-spectrum systems. Unlike

frequency-hopping, a direct-sequence signal occupies the entire bandwidth continuously. The

signal is obtained by starting with a narrowband signal and directly modulating a high

bandwidth signal. As with frequency hopping direct-sequence has advantages when the

channel contains a jamming like signal. The jamming could be intentional and hostile, self

jamming (multipath), and multiuser jamming. In the remained of this chapter we examine the

capabilities of direct-sequence is these three environments.

Below we show the transmitter and receiver for a direct-sequence system. The data sequence

b � t � consists of a sequence of data bits of duration T . The data sequence is multiplied with a

binary spreading sequence a � t � which has N components called chips per data bit.

XI-1

��

��

�b � t �

a � t ����� � � � ���� � �

� 2Pcos � ωct ��s � t �

Figure 129: Block Diagram of Direct-Sequence Spread-Spectrum Transmitter

b � t ��� ∞

∑l�� ∞

bl pT � t� lT �� bl� �� 1� � 1 ��

a � t � � ∞

∑l�� ∞

al pTc � t� lTc �� al� �� 1� � 1 ��

Tc� T � NUsually � ai � is a periodic sequence with period L. In some cases for each period of the

XI-2

��

��

sequence � ai � one data bit is transmitted, i.e. T� LTc. When the sequence � ai � is periodic

the spreading signal is a periodic waveform so that a � t �� a � t� lT � for any integer l. In other

cases LTc� T , that is, many data bits are transmitted before the sequence repeats. In this case

it is useful to model ai as a sequence of independent, identically distributed binary random

variables equally likely to be � 1. In any case it is nearly always true that T � Tc� N is an

integer. This is usually called the “processing gain.” It is the factor by which the signal is

spread.

s � t ��� � 2Pa � t � b � t � cos � 2π fct ��

The transmitted signal has power P. Below we show a data signal and the result of

multiplying by a spreading signal with 31 chips per bit. The sequence was generated by a

linear feedback shift register such that ai� mod � ai� 3� ai� 5� 2 � where a denotes a 0,1

sequence. The actual sequence a is found via the usual transformation of 0 � 1, 1 � � 1. The

initial loading of the shift register is [0 0 0 0 1].

XI-3

��

��

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5−2

−1

0

1

2

time/T

b(t)

Data waveform

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5−2

−1

0

1

2

time/Ts(

t)

User 1 waveform

Figure 130: Waveforms b � t and a � t b � t

The receiver consist of a mixer followed by a filter matched to the spreading code of the

transmitter.

XI-4

Page 2: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

�r � t �� 2 � T cos � ωct �

�� �� � � � Filter

�� �

Z � iT �

t� iT

� 0 � bi� 1� � 1

� 0 � bi� 1� � 1

Figure 131: Direct-Sequence Spread-Spectrum Receiver

XI-5

��

��

Consider the case where L� N, that is there is exactly one period of the spreading sequenceper data bit. (It is easy to see how to modify the results for L � N. For L� N for each data bitwe either transmit a � t � or� a � t � depending on the sign of the data bit with appropriate delays.The matched filter has impulse response given by

h � t �� a � T� t � 0 � t � T

The filter output is given by

Z � t � � �

∞� ∞�

2T

cos � 2π fcτ � r � τ � h � t� τ � dτ

��

t

t� T�

2T

cos � 2π fcτ � r � τ � a � T� � t� τ � � dτ

Thus the filter does a running correlation of the received signal (mixed down to baseband)with the spreading sequence. That is, at each time instance the filter output is the correlationof the received signal over the past T seconds with the spreading signal a � t � . From the belowfigure we can visualize the output of the filter at time t as the integral of the product of thereceived signal with a shifted version of the spreading code. In this sense the matched filterprovides a running correlation of the received signal over the past T seconds with thespreading signal.

XI-6

��

��

Consider the filter output during the time interval 0 � t � T due to the transmitted signalalone,

r � t �� � 2Pa � t � b � t � cos � 2π fct �

Then

Z � t ��� � P � T �

t

t� Ta � τ � b � τ � a � τ� � t� T � � dτ

� � PT b� 11T �

0

t� Ta � τ � a � τ� � t� T � � dτ� � PTb0

1T �

t

0a � τ � a � τ� � t� T � � dτ� � PT b� 1R � t � � � PT b0R � t �

where

R � t � � 1T �

0

t� Ta � τ � a � τ� � t� T � � dτ

� 1T �

T

ta � u� T � a � u� t � du

� 1T �

T

ta � u � a � u� t � du

XI-7

��

��

and

R � t � � 1T �

t

0a � τ � a � τ� � t� T � � dτ

� 1T �

t

0a � τ � a � τ� t � dτ�

The last step in each of the above two equations follows because of the periodicity of the

spreading signal (one period of the spreading signal per data bit).

We can write these correlation functions in terms of the spreading sequences as follows. For

t� kTc� s with 0 � s � Tc.

R � t ��� 1T � � Tc� s � aN� ka0� aN� k 1a1� � � �� aN� 1ak� 1 �� � s � aN� k� 1a0� aN� ka1� � � �� aN� 1ak � �� 1

T � Tc� s � k� 1

∑l� 0

al� k� N � al� sk

∑l� 0

al� k 1� N � al �

� 1T � � Tc� s � C � k� N � � sC � k� 1� N � � �

XI-8

Page 3: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

where

C � k �����������

� ���������

∑N� 1� kl� 0 alal k 0 � k � N� 1

∑N� 1 kl� 0 al� kal 1� N � k � 0�

0 otherwise

Similarly, for kTc � t � � k� 1 � Tc

R � t � � 1T � � Tc� s � a0ak� a1ak 1� � � �� aN� 1� kaN� 1 �� � s � a0ak 1� a1ak 2� � � �� aN� 2� kaN� 1 � �� 1T � � Tc� s � C � k � � sC � k� 1 � � �

Notice that both R � t � and R � t � vary linearly with t for t� kTc� � k� 1 � Tc � for every k.

XI-9

��

��

τ

τ

b� 1

ak ak 1 � � � aN� 2 aN� 1

� r � τ �

a0 a1 � � � ak� 1

kTc

ak

� k � 1 � Tc

ak 1 � � � aN� 2 aN� 1

��

b0

a0

t� T

a0 a1 � � � aN� 2� k aN� 1� k aN� k � � � aN� 2 aN� 1

t

a � τ� � t� T � �

Figure 132: Received Signal

XI-10

��

��

Consider the spreading sequence a� �� 1� 1� 1� � 1� � 1� � 1� 1 � The aperiodic correlation

function is

k � 6 � 5 � 4 � 3 � 2 � 1 0 1 2 3 4 5 6

C � k � � 1 2 1 � 2 � 3 0 7 0 � 3 � 2 1 2 � 1

It is useful to state a few properties of the aperiodic autocorrelation function.

1. The partial or aperiodic autocorrelation functions are symmetric.

C � k �� C �� k ��

2. The full autocorrelation is the sum of two aperiodic or partial autocorrelation functions.

θ � k �� N� 1

∑l� 0

alal k� ��

C � k � � C � k� N �� 0 � k � N� 1

C � k � � C � k� N �� 1� N � k � 0

The function θ � k � is called the autocorrelation function of the sequence a.

3. If we consider the spreading sequences to be a sequence of independent, identically

distributed random variables then the following expectation with respect to the spreading

XI-11

��

��

sequences can be computed. Assume k 0 and n 0. Then

E C � k � C � n � �� E

N� 1� k

∑l� 0

alal k

N� 1� n

∑m� 0

amam n �

� ���� ��

0 k � n

N� � k � k� n � 0

N2 k� n� 0�

For the sequence above the autocorrelation function has the following values.

k � 6 � 5 � 4 � 3 � 2 � 1 0 1 2 3 4 5 6

θ � k � � 1 � 1 � 1 � 1 � 1 � 1 7 � 1 � 1 � 1 � 1 � 1 � 1

The output of the filter with impulse response matched to the spreading sequence is shownbelow for a sequence of length 31.

If two consecutive bits have the same sign (b� 1� b0) then the output of the filter during theinterval [0,T] is given by

Z � t �� � PTb0

T � Tc� s � θ � k � � sθ � k� 1 � �

XI-12

Page 4: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

On the other hand if b� 1 � b0 then the output during the interval 0� T � is given by

Z � t �� � PTb0

T � � Tc� s � θ � k � � sθ � k� 1 � �

where the function θ � k � is called the odd autocorrelation and is defined as

θ � k �� N� 1� k

∑l� 0

alal k� N� 1

∑l� N� k

alal k� C � k �� C � k� N �� 0 � k � N� 1

The odd autocorrelation function differs from the standard autocorrelation function in that

part of the terms in the summation have a negative sign.

XI-13

��

��

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5−40

−30

−20

−10

0

10

20

30

40

time/T

Z(t

)

Data waveform

Figure 133: Output of Matched Filter for a Sequence of Length 31

At the sampling time (t� iT )

Z � iT �� � E �

iT

i� 1 � Ta � τ � a � τ� � i� 1 � T � dτ

XI-14

��

��

This result leads to the correlator implementation of the optimal (for AWGN) receiver. It is

useful (for synchronization) to know the outputs of the matched filter at other times besides

the time that we make a decision. The filter output is sampled at multiples of T . The output at

the sampling times is (s� 0� k� 0)

Z � iT � � � P � T � TcN � bi� 1� � PT bi� 1� � Ebi� 1

XI-15

��

��

Filter output for a length 15 sequence

−1 −0.5 0 0.5 1 1.5 2 2.5

−6

−4

−2

0

2

4

6

XI-16

Page 5: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

Filter output for a length 15 sequence

−1 0 1 2 3 4 5 6 7 8−8

−6

−4

−2

0

2

4

6

8

x(τ)

h(t−τ)

conv(x,h)

x(τ) h(t−τ)

time

XI-17

��

��

Filter output for a length 31 sequence

−1 0 1 2 3 4 5−8

−6

−4

−2

0

2

4

6

8

x(τ)

h(t−τ)

conv(x,h)

x(τ) h(t−τ)

time

XI-18

��

��

Direct-Sequence Spread-Spectrum with Tone Interference

Consider a direct-sequence system with a jammer whose signal is an unmodulated tone at thesame phase and frequency of the direct-sequence user.

�b � t �

a � t ������ � � � � � ��� � � �� 2Pcos � ωct ��s � t �

j � t ��� ��� �r � t �

Figure 134: Block Diagram of Direct-Sequence Spread-Spectrum Transmitter

j � t ��� � 2J cos � ωct �

The jamming signal has power J. The ratio J � P is called the jammer-to-signal power ratio.The received signal is

r � t �� s � t � � j � t ��

The receiver is similar to that for BPSK.

XI-19

��

��

Demodulator

�r � t �� 2 � T cos � ωct �

����� � � � � ����� � � �

a � t �� LPF

�� �

Z � iT �

t� iT

� 0 � bi� 1� � 1

� 0 � bi� 1� � 1

The decision statistic for bit bi is

Z � it � � �

iT

i� 1 � Tr � t ��

2T

a � t � cos � ωct � dt

Z � iT � � � E bi� 1� ηi

where ηi is the output due to the jamming signal. The output due to the jamming signal can be

written as (ignoring double frequency terms)

ηi� � J � T �

iT

i� 1 � Ta � t � dt�

Since

a � t �� iN� 1

∑j� i� 1 � N

ai pTc � t� jTc �� t� � i� 1 � T� iT ��

XI-20

Page 6: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

ηi� �

JT

Tc

iN� 1

∑j� i� 1 � N

ai

� � JTN

iN� 1

∑j� i� 1 � N

ai

Random Sequence Model

If we model the sequence ai as i.i.d. binary random variables then ∑iN� 1j� i� 1 � N ai is a binomial

distributed random variable with mean 0 and variance N. Thus ηi is zero mean with variance

JT � N. The signal-to-noise ratio, SNRout, at the output of the demodulator is then

SNRout� PJ � N

Since the signal-to-noise ratio, SNRin, at the input to the receiver is

SNRin� P � Jthe system is said to have a processing gain of N.

XI-21

��

��

543210-1-2-3-4-50.0

0.1

0.2

0.3

0.4

x

Density

Figure 135: Distribution of Interference for n� 7

XI-22

��

��

543210-1-2-3-4-50.0

0.1

0.2

0.3

0.4

x

Density

Figure 136: Distribution of Interference for n� 31

XI-23

��

��

543210-1-2-3-4-50.0

0.1

0.2

0.3

0.4

x

Density

Figure 137: Distribution of Interference for n� 127

XI-24

Page 7: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

543210-1-2-3-4-50.0

0.1

0.2

0.3

0.4

x

Density

Figure 138: Distribution of Gaussian Interference

XI-25

��

��

Gaussian Approxim ation to Binom ial Density

Density

86420-2-4-6-810 -10

10 -9

10 -8

10 -7

10 -6

10 -5

10 -4

10 -3

10 -2

10 -1

10 0

x

N = 31

N = 127

G aussian

Figure 139: Comparison of Distributions

Error Probability with Tone Interference

XI-26

��

��

The probability of error for the tone jammer (with perfect phase information) is

Pe� Pe � 1� Pe �� 1� P � � E� � JTN ∑ai � 0 �� P � 1� N

∑ai � � �

EJTc

where the sum extends over N values of the index i. For large N, ∑ai � � N is approximately

Gaussian with mean zero and variance 1 (central limit theorem). The error probability can

then be approximated by

Pe � Q

��

EJTc �� Q

��

PJ � N �

Note that the jamming power is effectively reduced by a factor of N.

Another way of expressing the error probability is in terms of an effective jamming noise

power density. Since BPSK with spreading by a factor N has noise bandwidth of 1 � Tc the

XI-27

��

��

effective jamming noise spectral density NJ is defined as

NJ� J1 � Tc

� JTc

Using this in the expression for error probability yields

Pe � Q

��

ENJ �

Notice that this is a factor of 2 (3dB) worse than Gaussian noise of the same spectral density.

The reason is that we have assumed the jammer has perfect phase information so that no

power is wasted in the quadrature component of the signal. If the jammer had a random phase

the performance would be better by 3dB and equivalent to the performance in Gaussian noise

of the same power.

XI-28

Page 8: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

Direct-Sequence Spread-Spectrum with Multipath Interference

Consider a direct-sequence system over a channel with multipath fading the received signal is

modeled as

r � t �� L

∑j� 1

α js � t� τ j � � n � t �

where τ j is the delay of the j-th path, α j is the amplitude and n � t � is white Gaussian noise.

Below we analyze the performance of two different receivers. The first receiver ignores the

multipath interference and uses a filter matched to a single path to make a decision. The

second receiver uses a bank of filters matched to the various paths and combines the filter

outputs to make a decision. The can be implemented by a single filter and a tapped delay line.

Because the structure of the receiver looks like a garden rake it is called the rake receiver. The

rake receiver usually requires amplitude and phase estimation of the various paths and is thus

more complex than a single branch receiver.

Assuming that the receiver is matched to the first path and τ1� 0 the output of the matched

XI-29

��

��

filter is

Z � iT � � �

iT

i� 1 � Tr � t ��

2T

a � t � cos � ωct � dt

Z � iT � � � Ebi� 1� L

∑j� 2

I j

where

I j� α j �

iT

i� 1 � Ts � t� τ j � a � t � � 2 � T cos � 2π fct � dt

� α j �

iT

i� 1 � T

� 2Pcos � 2π fc � t� τi � � b � t� τ j � a � t� τ j � a � t � � 2 � T cos � 2π fct � dt

� α j � P � T cos � 2π fcτ j � �

iT

i� 1 � Tb � t� τ j � a � t� τ j � a � t � dt

Now assume that 0 � τi � T . Then

I j� α j � P � T cos � 2π fcτ j � � i� 1 � T τ j

i� 1 � Tbi� 2a � t� τ j � a � t � dt

� �

iT

i� 1 � T τ j

bi� 1a � t� τ j � a � t � dt �

XI-30

��

��

� α j � PT cos � 2π fcτ j � bi� 2R � τ j � � bi� 1R � τ j � �

where

R � τ �� 1T �

τ

0a � t� τ � a � t � dt

and

R � τ �� 1T �

T

τa � t� τ � a � t � dt

Thus

Z � iT �� � E

bi� 1α1��

L

∑j� 2

α j � bi� 1R � τ j � � bi� 2R � τ j � � cos � 2π fcτ j �� �

Thus the channel experiences some intersymbol interference. If we model the intersymbol

interference as Gaussian noise, the variance of the interference (with random delays andphases) can be determined.

Now consider the case where the delays are uniformly distributed over the interval

Tc� T� Tc � . In most cases the phase variable cos � 2π fcτ j � will be independent of τ j. This istrue because fcτ j� 1. Thus when τ j varies only slightly, fcτ j will vary considerably. Whencomputing averages then we can think of only slightly varying τ j without changing R � τ j � but

XI-31

��

��

causing 2π fcτ j to vary over many multiples of 2π. Thus for each very small range of τ j,

2π fcτ j will vary over many multiples of 2π. Thus when computing the expectation we can

separate out the cos � φ j �� cos � 2π fcτ j � randomness from the R � τ j � , R � τ j � randomness. In

fact, we will treat φ j and τ j as independent random variables.

The output due to the desired signal then is given by

E Z � T � � b0� � 1 �� � Eα1�

The conditional variance Var Z � T � � b0� � 1 � of the the interference is determined as follows.

Let

I j� � E

α j � R � τ j � � bi� 2R � τ j � � cos � 2π fcτ j � �

Then

Var Z � T � � b0� � 1 �� L

∑j� 2

E I2j �� N0

2

E I2j �� Eα2

j

2T � 1� 2 � N � �

T� Tc

τ j� Tc

� R2 � τ j � � R2 � τ j � � dτ j

The averaging above is with respect to the delays of the multipath signal. Substituting in for

XI-32

Page 9: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

the definition of the partial correlation functions we obtain

E I2j �� E

2T � 1� 2 � N � α2j �

T� Tc

τ j� Tc

� R2 � τ j � � R2 � τ j � � dτ j� E

2T � 1� 2 � N � α2j

N� 1

∑k� 2 �

kTc

τ j� k� 1 � Tc

� R2 � τ j � � R2 � τ j � � dτ j

� Eα2j

2T 3 � 1� 2 � N � N� 1

∑k� 2 �

Tc

s� 0

� Tc� s � C � k � � sC � k� 1 � � 2� � Tc� s � C � k� N � � sC � k� 1� N � � 2 ds� Eα j

2T 3 � 1� 2 � N � N� 1

∑k� 2 �

Tc

s� 0

� � Tc� s � 2 C2 � k � � C2 � k� N � �� 2 � Tc� s � s C � k � C � k� 1 � � C � k� N � C � k� 1� N � �� s2 C2 � k� 1 � � C2 � k� 1� N � � �

ds� Eα2jT

3c

6T 3 � 1� 2 � N � N� 2

∑k� 1

C2 � k � � C2 � k� N � � C � k � C � k� 1 �� C � k� N � C � k� 1� N � � C2 � k� 1 � � C2 � k� 1� N � ��

XI-33

��

��

If we define the parameter r as

r� N� 1

∑k� 2

C2 � k � � C2 � k� N � � C � k � C � k� 1 � � C � k� N � C � k� 1� N �� C2 � k� 1 � � C2 � k� 1� N �

then the mean square interference is

Var � Z � T � � b0� � 1 �� ErT 3c

6T 3 � 1� 2 � N � L

∑j� 2

α2j� N0

2

� Er6N3 � 1� 2 � N � L

∑j� 2

α2j� N0

2

The signal-to-noise ratio is defined as the squared mean output divided by the variance and isgiven as

SNR� E2 Z � T � � b0� � 1 �

Var Z � T � � b0� � 1 �� Eα21

Er ∑Li� 2 α2

i6N3 1� 2 � N � � N0

2

For example the spreading sequence of length 7 has parameter r� 82. The length 31

XI-34

��

��

m-sequence has r� 618 and the spreading sequence of length 127 has r� 11106. Consider

the case of negligible background noise. The signal-to-noise ratios for these different

spreading sequences are

SNR� α216N3 � 1� 2 � N �

r ∑Li� 2 α2

i

N SNR � dB �

7 12� 5� 10log10 � α21

∑Li� 2 α2

i

31 23� 5� 10log10 � α21

∑Li� 2 α2

i

127 30� 3� 10log10 � α21

∑Li� 2 α2

i

In the homework it is shown that the signal-to-noise ratio averaged over all possible spreading

sequences increases linearly in N. Notice that the signal-to-noise ratio decreases as the

number of paths increase. This is because the receiver is treating all the paths except one as

interference. The direct-sequence receiver reduces the effect of these interfering paths by a

factor of N because of the processing gain. A receiver which makes uses of these extra paths

is discussed next.

XI-35

��

��

Performance with a Rake Receiver

Now consider the case of a receiver that uses a filter matched to each delay. The usual method

to combine the different filter outputs is by weighting each component by the strength of the

path it is matched to. Below we show a block diagram of such a receiver. The received signal

is first mixed to baseband by a pair of mixers with 90 degrees phase offset for the locally

generated reference. We represent this by a complex mixing. The double lines correspond to

complex signals. The baseband signal is then filtered with a filter matched to the baseband

transmitted signal. The output of the baseband filter enters a tapped delay line. Different

delays are weighted by different amounts. The magnitude of the weighting corresponds to the

magnitude of a particular path while the phase compensates for any phase change so that the

desired multipath component after the gain has zero phase or in other words a purely real part.

Of course there will be some interference from other paths that contribute to the imaginary

part but this will be ignored by the receiver.

XI-36

Page 10: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

� h

t

� DELAY LINE

� �α1 αL

∑ Real[ ] DEC

r � t �

exp �� j2π fct �

Figure 140: Rake Receiver

Below we show the output of a matched filter for a baseband signal with three paths with

delays 0, 0� 3T and 0� 8T with relative amplitudes 1, 0.7 and 0.3. The signal is spread by a

factor of 31. The output of the rake which delays the signal by 0� 8T and weights by 1, delays

by 0� 5T weights by 0.7 and adds these to an undelayed version weighed by 0.3.

XI-37

��

��

0 1 2 3 4 5 6 7 8−1.5

−1

−0.5

0

0.5

1

1.5

time

y1(t

)=x1

(t)*

h(t)

Figure 141: Matched Filter Output

XI-38

��

��

0 1 2 3 4 5 6 7 8

−3

−2

−1

0

1

2

3

time

z1(t

)=y1

(t)*

hr(t

)

Figure 142: Rake Receiver Output

The receiver computes the following decision statistic for bit b0

Z� L

∑j� 1

α jZ j

XI-39

��

��

where

Z j� �

τ j T

τ j

r � t ��

2T

a � t� τ j � cos � ωc � t� τ j � � dt

In the absence of background thermal noise

Z j� α j � Eb0� L

∑l� 1 � l �� j

αl � ET �

τ j T

τ j

b � t� τl � a � t� τl � a � t� τ j � dt cos � ωc � τl� τ j � �

� α j � Eb0� L

∑l� 1 � l �� j

I j � l

The decision statistic Z due to the desired users is

E Z � b0� � 1 �� L

∑j� 1

α2j � E

To compute the variance of the interference we postulate the following model of the delays.The delays are random variables distributed over disjoint intervals of length 2Tc. Furthermore,the minimum separation between delays is also 2Tc. That is min � τ j� τl � � 2Tc. This is doneso that the paths that the receiver is able to lock onto are in fact distinguishable. For exampleconsider the case where τl is uniform over the interval 4 � l� 1 � Tc� 4 � l� 1 � Tc� 2Tc � andassume that 4 � L� 1 � Tc� 2c � T� Tc. Furthermore assume that the delays are independent.

XI-40

Page 11: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

Then the variance of the interference can be calculated as follows. First let I j � l be the effect of

the l-th multipath on Z j. Then

I j � l� αl � E1T �

τ j T

τ j

b � t� τl � a � t� τl � a � t� τ j � dt cos � ωc � τ j� τl � �

For τ j � τl

I j � l� αl � E�

b� 1R � τl� τ j � � b0R � τl� τ j � �

cos � ωc � τl� τ j � �

For τl � τ j

I j � l� αl � E

b0R � τl� τ j� T � � b1R � τl� τ j� T � �

cos � ωc � τl� τ j � �

The variance is

Var � Z �� Var � L

∑j� 1

α jV j �where

V j� L

∑l� 1 � l �� j

I j � l

XI-41

��

��

It is straightforward (but very lengthy) to show that

Var � Z �� L

∑j� 1

α2j � L

∑l� 1 � l �� j

α2l E � � 3N � � 1� 2 � j� l �

N � � N0 � 2 �

Thus the signal-to-noise ratio is

SNR� � ∑Lj� 1 α2

j � 2E

∑Lj� 1 α2

j � ∑Ll� 1 � l �� j α2

l E � � 3N � � 1� 2 � j� l �

N � � N0 � 2 �

If we define

α2� ∑Lj� 1 α2

j � ∑Ll� 1 � l �� j α2

l E � � 2N � � 1� 2 � j� l �

N �

∑Lj� 1 α2

j

then

SNR� ∑Lj� 1 α2

jE

α2E � � 3N � � N0 � 2Notice that if α j is a constant then the signal-to-noise ratio does not decrease as of the number

of paths in the channel increases. This is in contrast to the single filter receiver in which the

performance degrades the more paths there are in the channel.

XI-42

��

��

Direct-Sequence Spread-Spectrum Multiple-Access (DS-SSMA)

In this section we consider the performance a direct-sequence system with multiple-access

interference (also know as code division multiple access (CDMA). Each user is given a code

sequence. The receiver for a particular user demodulates the signal by match filtering the

received signal with a filter that is matched to the transmitted signal of the desired user. We

should point out that this is not the optimal receiver but is one that is currently being used in

practical systems.

In our analysis we would like to determine the average probability of error. The averaging is

respect to the data bits that the other users are transmitting, the relative delays of the other

users and the relative phase of the other users.

There are numerous different modulation formats that can be used in a direct-sequence system

including BPSK, QPSK, MSK. For our purposes we will just consider BPSK.

XI-43

��

��

�b1 � t �

a1 � t �� �� �� 2Pcos � ωct �� � � � Delay τ1 � � � � � ��

�b2 � t �

a2 � t �� �� �� 2Pcos � ωct �� � � � Delay τ2 � � ��

���

���

�bK � t �aK � t �� �� �

� 2Pcos � ωct �� � � � Delay τK

��� ���� + �

Figure 143: Block Diagram of a Direct-Sequence System

bk � t �� ∞

∑l�� ∞

b k �

l pT � t� lT �XI-44

Page 12: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

ak � t �� ∞

∑l�� ∞

a k �

l pTc � t� lTc �

sk � t �� � 2Pak � t � bk � t � cos � 2π fct �

The received signal consist of the delayed versions of all of the users and additive white

Gaussian noise.

r � t �� K

∑k� 1

sk � t� τk � � n � t �At receiver 1 the received signal is first mixed down to baseband by multiplying the received

signal by cos � 2π fct � and then filtered with a filter matched to the spreading sequence of user

1. Equivalently (except with respect to generating timing information) the received signal

after the mixer can be correlated with a local replica of the spreading sequence to produce a

decision statistic. We will assume that the receiver is perfectly synchronized to the transmitted

signal (both timing and phase) so that without loss of generality we can assume that τ1� 0.

XI-45

��

��

�r � t �� 2 � T cos � ωct �

����� � � � h � t ��� a1 � T t � �� �

Z � iT �

t� iT

� 0 � bi� 1� � 1

� 0 � bi� 1� � 1

Figure 144: Direct-Sequence Spread-Spectrum Receiver

The filter for user 1 is matched to the spreading code of user 1. The output of the filter for user

1 contains the desired signal, interference from other users and noise. Below we show the

matched filter output for a single user, two users and three users with spreading sequences of

length 31.

XI-46

��

��

0 1 2 3 4 5 6 7 8−1.5

−1

−0.5

0

0.5

1

1.5

time

y1(t

)=(x

1(t)

+x2

(t)+

x3(t

))*h

1(t)

Figure 145: Matched filter output for a single user with N� 31

XI-47

��

��

0 1 2 3 4 5 6 7 8−1.5

−1

−0.5

0

0.5

1

1.5

time

y1(t

)=(x

1(t)

+x2

(t))

*h1(

t)

Figure 146: Matched filter output for two users with N� 31 with τ2� τ1� 0.

XI-48

Page 13: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

0 1 2 3 4 5 6−40

−30

−20

−10

0

10

20

30

40

time/T

Z(t

)

Figure 147: Matched filter output for two users with N� 31 with τ2� τ1� 0.

XI-49

��

��

0 1 2 3 4 5 6 7 8−1.5

−1

−0.5

0

0.5

1

1.5

time

y1(t

)=(x

1(t)

+x2

(t)+

x3(t

))*h

1(t)

Figure 148: Matched filter output for three users with N� 31 with τ3� τ2�

τ1� 0.

XI-50

��

��

The matched filter output at the sampling time is given by

Z1 � iT ��� �

2T �

iT

i� 1 � Tr � t � a1 � t � cos � 2π fct � dt

��

2T �

iT

i� 1 � T

K

∑k� 1

sk � t� τk � � n � t � � a1 � t � cos � 2π fct � dt

��

2T �

iT

i� 1 � T

s1 � t � � K

∑k� 2

sk � t� τk � � a1 � t � cos � 2π fct � dt� ηi

where ηi is a Gaussian random variable with mean zero and variance N0 � 2.

Z1 � iT ��� �

PT �

iT

i� 1 � T

a1 � t � b1 � t � � K

∑k� 2

ak � t� τk � bk � t� τk � cos � φk ��

a1 � t � dt� ηi

� � Ebi� 1� K

∑k� 2

� E cos � φk � 1T �

iT

i� 1 � Tak � t� τk � bk � t� τk � a1 � t � dt� ηi

� � Ebi� 1� K

∑k� 2

Ik� ηi

XI-51

��

��

where φk� 2π fcτk and

Ik� � E cos � φk � 1T �

iT

i� 1 � Tak � t� τk � bk � t� τk � a1 � t � dt�

The term due to other users can be written in terms of the crosscorrelation of the different

users sequences.

T

0ak � t� τk � bk � t� τk � a1 � t � dt� �

τk

0ak � t� τk � bk � t� τk � a1 � t � dt

� �

T

τk

ak � t� τk � bk � t� τk � a1 � t � dt

� b k �� 1 �

τk

0ak � t� τk � a1 � t � dt

� b k �

0 �

T

τk

ak � t� τk � a1 � t � dt� b k �� 1T Rk � 1 � τk � � b k �

0 T Rk � 1 � τk �

where the functions Rk � 1 and Rk � 1 are given by

Rk � 1 � τ ��� 1T �

τ

0ak � t� τ � a1 � t � dt

XI-52

Page 14: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

Rk � 1 � τ ��� 1T �

T

τak � t� τ � a1 � t � dt

Thus

Ik� � E cos � φk ��

b k �� 1Rk � 1 � τk � � b k �

0 Rk � 1 � τk ���

t

t

b k �� 1

a � k �

N� l� 1 a k �

N� l

� � � a k �

N� 2 a k �

N� 1

τk

ak � t� τk � bk � t� τk �a k �

0 a k �1

� � � a � k �

N� l� 2 a � k �

N� l� 1 a k �

N� l

� � � a k �

N� 2 a k �

N� 1

��b k �

0

a 1 �

0

0

a 1 �

0

Tc

a 1 �

1

2Tc

� � � a 1 �

l� 1

lTc

a 1 �

l

� l � 1 � Tc

a 1 �

l 1

� � � a 1 �

N� 2 a 1 �N� 1

T

a1 � t �

Figure 149: Received Signal

XI-53

��

��

The cross correlation functions Rk � 1 and Rk � 1 can be written in terms of the aperiodic cross

correlation of the spreading sequences given by

Ck � 1 � l �����������

� ���������

∑N� 1� lm� 0 a k �

m a 1 �

m l� 0 � l � N� 1

∑N� 1 lm� 0 a k �

m� la

1 �

m � 1� N � l � 0

0 otherwise�

For l� � τ � Tc �

Rk � 1 � τ � � 1T �

Ck � 1 � l� N � Tc� � τ� lTc � Ck � 1 � l� 1� N �� Ck � 1 � l� N � � �

Rk � 1 � τ � � 1T �

Ck � 1 � l � Tc� � τ� lTc � Ck � 1 � l� 1 � � Ck � 1 � l � � �

The variance of the interference (which has zero mean) can be determined for random phases

φk and random data b k �

0 and b k �� 1 and delays τk and spreading sequences � a k �

i � as

E I2k �� E

12 �

E R2k � 1 � τk � �� E R2

k � 1 � τk � � �

XI-54

��

��

� E2T �

T

0

R2k � 1 � τ � �� R2

k � 1 � τ � � dτ

� E2T

N� 1

∑l� 0 �

l 1 � Tc

lTc

R2k � 1 � τ � �� R2

k � 1 � τ � � dτ

� E2T 3

N� 1

∑l� 0 �

l 1 � Tc

lTc

C2k � 1 � l � � l� 1 � Tc� τ � 2� C2

k � 1 � l� 1 � τ� lTc � 2

� 2Ck � 1 � l� 1 � Ck � 1 � l � τ� lTc � � l� 1 � Tc� τ �� C2k � 1 � l� N � � l� 1 � Tc� τ � 2� C2

k � 1 � l� 1� N � τ� lTc � 2� 2Ck � 1 � l� 1� N � Ck � 1 � l� N � τ� lTc � � l� 1 � Tc� τ � dτ� E6N3

N� 1

∑l� 0

C2k � 1 � l � � C2

k � 1 � l� 1 � � C2k � 1 � l� N � � C2

k � 1 � l� 1� N �� Ck � 1 � l � Ck � 1 � l� 1 � � Ck � 1 � l� N � Ck � 1 � l� 1� N ��

The parameter rk � 1 defined below captures the effect of different spreading sequences on thesignal-to-noise ratio.

rk � 1� N� 1

∑l� 0

C2k � 1 � l � � C2

k � 1 � l� 1 � � C2k � 1 � l� N � � C2

k � 1 � l� 1� N �� Ck � 1 � l � Ck � 1 � l� 1 � � Ck � 1 � l� N � Ck � 1 � l� 1� N �

XI-55

��

��

� N� 1

∑l� 1� N

2C2k � 1 � l � � Ck � 1 � l � Ck � 1 � l� 1 �

� N� 1

∑l� 1� N

2Ck � k � l � C1 � 1 � l � � Ck � k � l � C1 � 1 � l� 1 ��

The last line follows from the identity

N� 1

∑l� 1� N

Ck � i � l � Ck � i � l� m �� N� 1

∑l� 1� N

Ck � k � l � Ci � i � l� m ��

The variance of the multiple-access term becomes

E I2k � 1 �� Erk � 1

6N3�

The signal-to-noise ratio is

SNR1� E2 Z � T � � b

1 �

0

� � 1 �

Var Z � T � � b

1 �

0

� � 1 �� E

E ∑Kk� 2 rk � 1 � � 6N3 � � N0 � 2

If the output of the matched filter due to other users signals is modeled as a Gaussian random

XI-56

Page 15: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

variable and we consider only random spreading sequences then

SNR� � � N0

2E � � K� 13N �� 1

The error probability is then approximated by

Pe � Q � � SNR �

As an example consider the case of three users with sequence of length 31. The sequences forthe different users are m-sequences derived from the following feedback shift registerconnections.

� User 1: a 1 �

i

� a 1 �

i� 3� a 1 �

i� 5 with initial values

a 1 �

0

� 1� a 1 �

1

� 0� a 1 �

2

� 1� a 1 �3

� 1� a 1 �

4

� 1 The actual spreading sequence is obtained

after the usual conversion of 0 to +1 and 1 to -1. a 1 �

i

� �� 1 � a�

1 �

i .

� User 2: a 2 �

i

� a 2 �

i� 1� a 2 �

i� 2� a 2 �

i� 3� a 2 �

i� 5 with initial values

a 2 �

0

� 1� a 2 �

1

� 1� a 2 �

2

� 0� a 2 �

3

� 1� a 2 �

4

� 1 a 2 �i

� �� 1 � a�

2 �

i .

� User 3: a 3 �

i

� a 3 �

i� 1� a 3 �

i� 3� a 3 �

i� 4� a 3 �

i� 5 with initial values

a 3 �

0

� 1� a 3 �

1

� 1� a 3 �

2

� 1� a 3 �

3

� 0� a 3 �

4

� 0 a 3 �

i

� �� 1 � a� 3 �

i .

With these sequences and initial states the signal-to-noise ratio (in the absence of background

XI-57

��

��

noise) is calculated to be SNR� 17� 73dB. If we change the initial values to

a 1 �

0

� 1� a 1 �

1

� 1� a 1 �

2

� 1� a 1 �

3

� 1� a 1 �

4

� 1

a 2 �

0

� 1� a 2 �

1

� 1� a 2 �

2

� 0� a 2 �

3

� 0� a 2 �

4

� 1

a 3 �

0

� 1� a 3 �

1

� 1� a 3 �

2

� 1� a 3 �

3

� 0� a 3 �

4

� 0

then the signal-to noise ratio becomes SNR� 15� 47dB. (These are the initial states that

maximize and minimize the signal-to-noise ratio). On the other hand for random sequences

the signal-to-noise ratio is 16.67dB. Thus by choosing the appropriate starting points of the

spreading sequences (even with a given feedback connection) we can affect the

signal-to-noise ratio. However for large N the difficulty in finding the optimal starting states

become computationally intractable.

XI-58

��

��

Optimal Multiuser Detection

In this section we consider the problem of optimally detecting the data sequences transmittedby K users to minimize the probability of chosing the wrong set of sequences. The setup is thesame as the previous section.

r � t �� K

∑k� 1

� 2Pkak � t� τk � bk � t� τk � cos � 2π fc � t� τk � � � n � t �

where each user could possible have different received power Pk and delay τk. Assume thatthe data sequence of user K is finite and of length J. Assume also that the users are labeledsuch that 0 � τ1 � τ2 � � � � � � τK � T . A critical assumption that we will make is that eachuser employs rectangular pulse shapes. This effectively limits the effect of a single data bit toa time interval of duration T . Thus we will assume that

bk � t �� J� 1

∑m� 0

b k �

m pT � t� mT ��

Another critical assumption is that the receiver knows exactly the delays of all the users aswell as the spreading signals and received powers. Consider the data sequence

b� � b 1 �

0 � b 2 �

0 � � � � � b K �

0 � b 1 �

1 � b 2 �

1 � � � � � b K �

1 � b 1 �

2 � b 2 �

2 � � � � � b K �

2 � � � � � b 1 �

J� 1� b 2 �

J� 1� � � � � b K �

J� 1 � �

XI-59

��

��

Now consider reindexing the data bits according to the above ordering. We will let the index l

designate which data bit from l� 0 to l� JK� 1. The l� 0 data bit corresponds to data bit 0

of user 1. The l� 1 data bit corresponds to data bit 0 of user 2. In general if l� mK� k� 1

where 0 � m � J� 1 then data bit l corresponds to the m-th data bit of the k-th user. The

received signal can be written as

r � t �� JK� 1

∑l� 0

� 2Plcl � t � bl� n � t �

where

cl � t �� � 2Pkak � t� τk � pT � t� mT� τk � cos � 2π fc � t� τk � �

We now define the following correlation values

xl � n� � cl � t � cn � t � dt

Note the following about the correlations.

1.

xl � n� xn � l

XI-60

Page 16: Lecture Notes 11: Direct-Sequence Spread-Spectrum · PDF fileLecture Notes 11: Direct-Sequence Spread-Spectrum Modulation ... The jamming signal has power J. The ratio J P is called

��

��

2.

xl � l j� 0� � j � K

This is due to the fact that the data pulses are rectangular pulses of duration T .

Now the goal is to minimize the probability of choosing the wrong sequence b. To do this weneed to find the sequence b to minimize

� � r � t �� JK� 1

∑l� 0

cl � t � bl � 2dt

Equivalently the receiver should choose the data sequence b to maximize

Λ� 2JK� 1

∑l� 0

bl � r � t � cl � t � dt� JK� 1

∑l� 0

JK� 1

∑n� 0

cl � t � cn � t � dt

� 2JK� 1

∑l� 0

blyl� JK� 1

∑l� 0

JK� 1

∑n� 0

blxl � nbn

where

yl� � r � t � cl � t � dt�The conclusion from the above equation is that the optimal receiver computes the vector

XI-61

��

��

y� � y0� � � � � yJK� 1 � and uses that as a sufficient statistic in order to compute the optimal

decision rule. The vector y can be obtained from a bank of K matched filters, matched to the

individual spreading signals of different users.

Now we can simplify the metric computation as follows.

Λ� 2JK� 1

∑l� 0

blyl� JK� 1

∑l� 0

b2l xl � l� JK� 1

∑l� 0

JK� 1

∑n� 0 � n �� l

blxl � nbn

Λ� 2JK� 1

∑l� 0

blyl� JK� 1

∑l� 0

b2l xl � l� 2

JK� 1

∑l� 0

l� 1

∑n� 0

blxl � nbn

Λ� 2JK� 1

∑l� 0

blyl� JK� 1

∑l� 0

b2l xl � l� 2

JK� 1

∑l� 0

l

∑j� 1

blxl � l� jbl� j

Λ� 2JK� 1

∑l� 0

blyl� JK� 1

∑l� 0

b2l xl � l� 2

JK� 1

∑l� 0

K� 1

∑j� 1

blxl � l� jbl� j

where we have assumed that xl � m� 0 if m � 0 or � l� m � K. The form for Λ is essentially the

same as the form for the metric for MLSE with intersymbol interference. Now it is clear we

can apply (as in the ISI case) dynamic programming (Viterbi Algorithm) to determine the

XI-62

��

��

optimal sequence b. We define the state to be the last K� 1 data bits

σl� � bl� K 1� � � � bl �

λl � σl� σl 1 �� 2yl 1bl 1� b2l xl � l� 2bl 1

K� 1

∑j� 1

xl 1 � l 1� jbl� j

Λ� JK� 1

∑l� 0

λl � σl� σl 1 � � 2b0y0� x0 � 0b20

The complexity of the optimal detector is proportional to the number of states in the Viterbi

algorithm. For binary signaling this is 2K� 1. If the pulses were not time limited to duration T

but of longer duration the memory of the channel would grow and the number of states would

also grow.

XI-63