Você está na página 1de 3

Introduction to Spread Spectrum Communications

Mini-Project #1
Due February 19, 2008
In class

Note: You may use outside references including books and notes but you may not
obtain assistance from another person.

I pledge that I have neither given nor received any assistance on this assignment.

(signed)

__________________________________________ ________________________
Name (print) Student Number
1. (20 points) Create a Matlab program (C or other programming language is also
acceptable) that will generate an m-sequence d of any length given the tap polynomial g
and the initial state of the register r.
(a) Test your code by generating a length 63 m-sequence using the taps specified
in the table below.
(b) Show that the sequence is indeed an m-sequence by identifying the number of
runs of ones and zeros of length 1 to 6.
(c) Plot the autocorrelation function of your sequence. Plot the theoretical
autocorrelation function and compare the two.

2. (20 points) Create a random binary sequence of length 63 using the rand() function
in Matlab.
(a) Determine the number of runs of ones and zeros and compare with the m-
sequence generated in problem 1.
(b) Determine the autocorrelation function of the sequence and compare with the
function plotted in 1(c). Plot both on one graph.
(c) Repeat (a) and (b) 1000 times and find the average values for the random
code. List the average values and the values for an m-sequence in a table and plot
the average autocorrelation function (Note: Do not plot 1000 autocorrelation
functions). How do the averages compare to the m-sequence?

3. (20 points) Using the function created in problem 1, generate two m-sequences of
length N = 63.
(a) Determine whether or not they are a preferred pair by plotting and examining
their cross-correlation. If they are not a preferred pair, try another pair from the
table below until a preferred pair is found. Provide a detailed justification as to
why you believe that this pair is a preferred pair.
(b) Using the preferred pair found in (a) generate 10 different Gold Codes. Plot
the cross-correlation of each code with one of the codes (i.e., plot 9 cross-
correlation functions.)
(c) Check the cross-correlation values found in (b). What are the theoretical
values for Gold Codes? Do they match?

Table1: Primitive Polynomials of Degree r


Degree Octal Representation of Generator Polynomial
g =[gr gr-1 …g1 g0]
2 [7]
3 [13]
4 [23]
5 [45], [75], [67]
6 [103], [147], [155]
7 [211], [217], [235], [367], [277], [325], [203], [313],[345]
8 [435], [551], [747], [453], [545], [537], [703], [543]
4. (30 points)
(a) Create a set of 65 Gold codes of length 63. Plot the cross-correlation function
between any two codes in the set. Do they agree with theory? Determine the cross-
correlation values between all pairs in the set. Plot a histogram of the cross-correlation
values. (You will probably want to use Matlab to do this.) How do the values compare
with the Welch bound? Plot the auto-correlation function of any two codes in the set.
How do they compare with m-sequences? Determine the auto-correlation values for all
codes in the set. Plot a histogram of the auto-correlation values.

(b) Repeat part (a) using 8 codes from the small set of Kasami sequences. How do the
auto-correlation and cross-correlation values compare with Gold codes?

(c) Repeat part (a) for random codes. (Use the rand() function in Matlab to create the
codes.) How do the auto-correlation and cross-correlation values compare with Gold
codes and Kasami sequences?

5. (10 points) A Matlab .mat file is posted on the class website titled MP1_5.mat. The
file has one vector representing a sampled complex baseband spread spectrum signal plus
noise. Knowing that the sampling rate is 8MHz, determine the type of spread spectrum
waveform (DS or FH or hybrid), spreading waveform type (e.g., m-sequence), the chip
rate, and pulse shape.

Você também pode gostar