10
ENB7060 TELECOMMUNICATIONS B LABORATORY SHEET 6 ___________________________________________________________________________ _______________ 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 Marks Assigned Part I 30 Part II 30 Part III 30 Conclusions + Discussion 10 Multiple Access Techniques/ Spread Spectrum and CDMA

ENB7060userspages.uob.edu.bh/.../Courses_files/ENB7060_lab6.docx · Web viewAnswers should include EXPLICIT design procedures, functions, and control parameters of each block, as

  • Upload
    dodien

  • View
    219

  • Download
    1

Embed Size (px)

Citation preview

Page 1: ENB7060userspages.uob.edu.bh/.../Courses_files/ENB7060_lab6.docx · Web viewAnswers should include EXPLICIT design procedures, functions, and control parameters of each block, as

ENB7060TELECOMMUNICATIONS B

LABORATORY SHEET 6

__________________________________________________________________________________________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

Marks Assigned

Part I 30Part II 30Part III 30Conclusions + Discussion 10Total 100

Multiple Access Techniques/ Spread Spectrum and CDMA

Page 2: ENB7060userspages.uob.edu.bh/.../Courses_files/ENB7060_lab6.docx · Web viewAnswers should include EXPLICIT design procedures, functions, and control parameters of each block, as

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 h];b=[a a;a -1*(a)];c=[b b;b -1*(b)];d=[c c;c -1*(c)];e=[d d;d -1*(d)];W=[e e;e -1*(e)]; u=W(10,:);v=W(2,:);z=W(60,:); subplot(2,1,1) %AutocorraletionN=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)%CrosscorraletionN=length(v)for m=0:(N-1) shifted_v=[v(m+1:N) v(1:m)]; corr(m+1)=(sum(u.*shifted_v))endcorr1=flipud(corr)plot(corr1)%%%

Page 3: ENB7060userspages.uob.edu.bh/.../Courses_files/ENB7060_lab6.docx · Web viewAnswers should include EXPLICIT design procedures, functions, and control parameters of each block, as

Part II

Page 4: ENB7060userspages.uob.edu.bh/.../Courses_files/ENB7060_lab6.docx · Web viewAnswers should include EXPLICIT design procedures, functions, and control parameters of each block, as

Q1. Generate and verify the following PN code and find the autocorrelation for it.

Page 5: ENB7060userspages.uob.edu.bh/.../Courses_files/ENB7060_lab6.docx · Web viewAnswers should include EXPLICIT design procedures, functions, and control parameters of each block, as

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

Page 6: ENB7060userspages.uob.edu.bh/.../Courses_files/ENB7060_lab6.docx · Web viewAnswers should include EXPLICIT design procedures, functions, and control parameters of each block, as

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).

Page 7: ENB7060userspages.uob.edu.bh/.../Courses_files/ENB7060_lab6.docx · Web viewAnswers should include EXPLICIT design procedures, functions, and control parameters of each block, as

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.

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

+

+

User II Rx.

User I Rx.

AWGN Channel

Data from User II

Data from User I

Page 8: ENB7060userspages.uob.edu.bh/.../Courses_files/ENB7060_lab6.docx · Web viewAnswers should include EXPLICIT design procedures, functions, and control parameters of each block, as

Discussion and Conclusion