You are on page 1of 2

TLT5606 Spread Spectrum Techniques – Spring 2011

Matlab Exercises #2, Thursday 17.2.2011, 14-16, TC221

You can find solution templates in


http://www.cs.tut.fi/kurssit/TLT-5606/matlab.html

1. The first task is to generate DS-CDMA data. First, some background is


given: Starting from continuous-time base-band single-user data in AWGN
(additive white gaussian noise)

y(t) = Abs(t) + σn(t), t ∈ [0, T ] (1)

where s(t) is the DS-SS waveform


N
X
s(t) = (−1)ci pTc (t − (i − 1)Tc ) (2)
i=1

we perform chip matched filtering to get sampled data:


Z lTc
yl = pTc (t − (l − 1)Tc )y(t)dt, l = 1, ..., N (3)
lTc −Tc

The discrete-time data is thus

y = Abs + σn (4)

where

y = [y1 y2 · · · yN ]T
s = [s1 s2 · · · sN ]T = [(−1)c1 (−1)c2 · · · (−1)cN ]T
n = [n1 n2 · · · nN ]T , ni ∼ N (0, 1)

The SNR (after despreading) thus equals N A2 /σ 2 .


This generalizes to the multi-user synchronous data:
K
X
y= Ak bk sk + σn (5)
k=1

where the chip sequence of user k equals

sk = [sk,1 sk,2 · · · sk,N ]T (6)

Now, your task is the following: Generate multi-user base-band discrete-


time data in AWGN for one symbol period, assuming the following pa-
rameters:

1
• K = 3 users
• Ak ∼ U(0, 1) (uniform distribution),
• bk ’s independent binary random variables,
• sk are Gold codes of length N = 31 (You can download a matrix
containing 3 Gold codes from: ”http://www.cs.tut.fi/kurssit/TLT-
5606/G.mat”, Save the file in you working directory using the browser
and load it in Matlab (load G.mat). You will see a variable G in your
command window. )
• SNR (wrt. weakest user) equals 20 dB.

2. The second task is to implement a conventional code acquisition scheme.

(a) Take the multi-user data from previous exercises.


(b) Plot the delay spectrum for each user. By a delay spectrum we here
understand

dk (τ ) = |sk (τ )T y|2 , τ = 0, 1, 2, ..., N − 1 (7)

where the cyclic shift of a chip sequence is defined as

sk (τ ) = [sk,τ +1 sk,τ +2 · · · sk,N sk,1 sk,2 · · · sk,N −τ ]T (8)

(c) To gain statistical reliability draw the average spectra based on mul-
tiple independent symbols (under the same channel conditions).

3. The last task is to examine the effect of (fixed) multipaths on delay spec-
trums of the users. The fixed multipath model is given as simple general-
ization of (5):
XK XL
y= Ak,l bk sk (τk,l ) + σn (9)
k=1 l=1

where L is the number of paths and Ak,l and τk,l are received amplitude
and delay of k-th user’s l-th path, respectively.

(a) Modify the earlier multi-user data generation in accordance with (9).
You can assume integer path delays (that is, integer multiples of the
chip duration) drawn randomly from {0, . . . , N − 1} (use randint
command). Take the other parameters parameters as defined in the
first task.
(b) Repeat the second task with multipath data.

You might also like