Lab sheet 6

advertisement
ENB7060
TELECOMMUNICATIONS B
LABORATORY SHEET 6
Multiple Access Techniques/ Spread Spectrum and
CDMA
__________________________________________________________________________________________
Name:- (Type Your Name Here)
Student ID :- (Type Your Student ID Here)
Objective
The main objectives of this experiment is to generate spreading codes, calculate the autocorrelation
and cross correlation of different spreading codes and to perform simulations of CDMA systems using
communication toolbox in matlab and Simulink.
Learning Outcome:
This lab assignment satisfies the learning outcome #2, which is,
2. Examine multiuser systems in modern telecommunications systems
Marking Scheme
Part I
Part II
Part III
Conclusions + Discussion
Total
Marks
Assigned
30
30
30
10
100
PartI
Q1. Run the following code and describe the output of the code and show how it
calculates the auto and cross correlation functions. Verify the results with the textbook.
Change the spreading code length to 16 bits for and obtain the auto and cross
correlation.
Program (1). Auto-correlation and cross-correlation calculations for Hadamard
orthogonal codes
H=-1;
h=-1*H;
a=[H H;H
b=[a a;a
c=[b b;b
d=[c c;c
e=[d d;d
W=[e e;e
h];
-1*(a)];
-1*(b)];
-1*(c)];
-1*(d)];
-1*(e)];
u=W(10,:);
v=W(2,:);
z=W(60,:);
subplot(2,1,1)
%Autocorraletion
N=length(u)
for m=0:(N-1)
shifted_u=[u(m+1:N) u(1:m)];
corr(m+1)=(sum(u.*shifted_u))
end
corr1=flipud(corr)% %
plot(corr1)
subplot(2,1,2)
%Crosscorraletion
N=length(v)
for m=0:(N-1)
shifted_v=[v(m+1:N) v(1:m)];
corr(m+1)=(sum(u.*shifted_v))
end
corr1=flipud(corr)
plot(corr1)
%%%
Part II
Q1. Generate and verify the following PN code and find the autocorrelation for it.
Part III
CDMA simulation using Simulink
Q1.
Design a baseband direct sequence spread spectrum transmitter and receiver as shown in
Figure1. You are required to simulate your model using a SIMULINK model, so that the output of the
binary and PN sequence generators give the ouput depicted in Figure2. Using 4-bits PN sequence
generator. Further, you are required to add AWGN to the model and to display the original bit stream,
spread sequence, spread data from the transmitter output and the received bit steam on a scope. NOTE
Answers should include EXPLICIT design procedures, functions, and control parameters of each
block, as well as the simulation parameters of your SIMULINK MODEL.
(a) Baseband Direct Sequence Spread Spectrum Transmitter
(b) Direct Sequence Spread Spectrum Receiver
Figure1. DS-SS system
Figure2. Data bits and Spreading sequence
Figure3. Simulink model for spreading/ dispreading technique
Q2. Repeat the design of baseband direct sequence spread spectrum transmitter and receiver with
different PN sequence code length. (change the length of the spread sequences).
Q3.
Extend the model generated in Fig 4 to include two users. Display the original bit streams,
spreading sequences as well as the received bit streams for both users. You might change the length of
the spread sequences.
Data from
User I
User I
Rx.
+
Data from
User II
+
AWGN
Channel
User II
Rx.
Figure 4
Q4.
Extend the model generated in Q3 by simulating (3 users) instead of two and with BPSK
modulation. Show the perfect dispreading of PN sequence of the three users in BER. (Extend the built
in model in matlab as in Fig 5.with two users).
Fig 5. Two users CDMA model
Discussion and Conclusion
Download