You are on page 1of 29

Communication Systems :CDMA

TABLE OF CONTENTS

Nu Topic Page
m Number
1 INTRODUCTION 2
i. History 2
ii. Objective 3
2 LITERATURE REVIEW
i. Theory in modulation (a) 4
ii. Theory in modulation (b) 4
iii. Block Diagram 5
3 METHODOLOGY
i. Question 6
ii. Answer 7
4 RESULTS AND DISCUSSION
i. Matlab Answer (Figure) 8
ii. Matlab Coding 22

5 CONCLUSION
6 APPENDIX

1 Communications System | CDMA


Communication Systems :CDMA

1.0 INTRODUCTION
Code division multiple access (CDMA) is a channel access method used by various radio
communication technologies. It should not be confused with the mobile phone standards called
cdmaOne and CDMA2000 (which are often referred to as simply CDMA), which use CDMA as
an underlying channel access method.

One of the basic concepts in data communication is the idea of allowing several transmitters to
send information simultaneously over a single communication channel. This allows several users
to share a band of frequencies (see bandwidth). This concept is called Multiple Access. CDMA
employs spread-spectrum technology and a special coding scheme (where each transmitter is
assigned a code) to allow multiple users to be multiplexed over the same physical channel. By
contrast, time division multiple access (TDMA) divides access by time, while frequency-division
multiple access (FDMA) divides it by frequency. CDMA is a form of spread-spectrum
signalling, since the modulated coded signal has a much higher data bandwidth than the data
being communicated. An analogy to the problem of multiple access is a room (channel) in which
people wish to talk to each other simultaneously. To avoid confusion, people could take turns
speaking (time division), speak at different pitches (frequency division), or speak in different
languages (code division). CDMA is analogous to the last example where people speaking the
same language can understand each other, but other languages are perceived as noise and
rejected. Similarly, in radio CDMA, each group of users is given a shared code. Many codes
occupy the same channel, but only users associated with a particular code can communicate.

2.0 HISTORY

CDMA is a military technology first used during World War II by English allies to foil German
attempts at jamming transmissions. The allies decided to transmit over several frequencies,
instead of one, making it difficult for the Germans to pick up the complete signal. Because
Qualcomm created communications chips for CDMA technology, it was privy to the classified
information. Once the information became public, Qualcomm claimed patents on the technology
and became the first to commercialize it.

2 Communications System | CDMA


Communication Systems :CDMA

3.0 OBJECTIVE

Basically, our main objective here is to underline the understanding of CDMA. What are the
CDMA actually and the application of it. We also need to familiar with use of multiplexing in
wireless environments. The most important thing is how to do the calculations by using Matlab
and compare their answer with our manual answer.

4.0 LITERATURE REVIEW :

CDMA in general simply means communication with different codes. For example, in a large
room with a lot of people, two people can talk in Chinese if nobody else understands Chinese.
Another two people talk in English if they are the only ones who understand English and so on.
In other words, the common channel (space of the room), can easily allow communication
between several couples but in different languages (codes).

 Theory in Modulation (a) :

But in a specific way, CDMA is a multiplexing technique used with Spread Spectrum such a
narrowband message signal is multiplied by a very huge bandwidth spreading signal (pseudo-
noise). Users will use same carrier frequency and may transmit simultaneously. Users also have
their own pseudorandom codeword which is approximately orthogonal to other codewords.
Receiver performs time correlation operation to detect only specific codeword, other codewords
apeear as noise due to decorrelation.

code

Channel 1 to
Channel N

Frequency

Time

3 Communications System | CDMA


Communication Systems :CDMA

Code Division Multiple Access is an effective wireless access technology for supporting variable
and high data rate transmission services that has been adopted in third generation of wireless
systems. The basic concept is multiple accesses which are to allow several transmitters to send
information simultaneously over a single communication channel. It is a form of multiplexing
and therefore to optimize the available bandwidth. CDMA employs the spread-spectrum
technology and uses a special coding scheme (pseudo-random code) where each transmitter is
assigned a code to allow multiple users to be multiplexed over a same physical channel. Many
codes occupy the same channel but only users that are associated with a particular code can
communicate. What a spread spectrum technique does is to spread the bandwidth of the data
uniformly for the same transmitted power. In CDMA the data for transmission is combined via
bitwise XOR(exclusive OR). The data signal with pulse duration of T b is XOR’ed with the code
signal with pulse duration Tc. Therefore the bandwidth of the data signal is 1/ Tb and the
bandwidth of the spread spectrum signal are 1/ T c. Since Tc is much smaller than Tb the
bandwidth of the spread spectrum is much larger than the bandwidth of the original signal. The
ratio Tb/ Tc is called as spreading factor or processing gain and it is to determine a certain extent
the upper limit of the total number of users supported simultaneously by a base station.

 Theory in
Modulation (b) :

Assume we have 4 different stations 1,2,3 and 4 connected to the same channel. The data from
station 1 are d1, from station 2 are d2 and so on. The code assigned to station 1 is c1, to station 2
is c2 and so on. Assume that the assigned codes have two properties :

- Multiply each code with another code, we get o

4 Communications System | CDMA


Communication Systems :CDMA

- Multiply each code by itself, we get 4.

So, the data sent is d1.c1 + d2.c2 + d3.c3 + d4.c4 .

For better explanation, see the block diagram below :

 Block Diagram

d1
d2

1 2

d2.c2
d1.c1

d1.c1 + d2.c2 + d3.c3 + d4.c4

DATA –COMMON CHANNEL

d3.c3 D4.c4

3 4

d3
d4

5 Communications System | CDMA


Communication Systems :CDMA

5.0 METHODOLOGY
Calculation

i)

assumption :

0 = -1v

1= +1v

A0 = [ 1 1 1 0 1 0 0 0 ] = +1 +1 +1 -1 +1 -1 -1 -1

A1 = [ 0 0 0 1 0 1 1 1 ] = -1 -1 -1 +1 -1 +1 +1 +1

B0 = [ 1 0 1 1 1 0 1 1 ] = +1 -1 +1 +1 +1 -1 +1 +1

B1 = [ 1 0 1 1 1 0 1 1 ] = +1 -1 +1 +1 +1 -1 +1 +1

ii)

prove orthogonal :

A0 * B0 = (+1) + (-1) + (+1) + (-1) + (+1) + (+1) + (-1) + (-1) = 0

A1 * B1 = (-1) + (+1) + (-1) + (+1) + (-1) + (-1) + (+1) + (+1) = 0

iii)

iv) transmitter signal for slot 0 and slot 1 :

transmitter signal = data bit * spreading code

transmitter signal A0 = [+1 +1 +1 +1 +1 +1 +1 +1]*[+1 +1 +1 -1 +1 -1 -1 -1 ] = [ +1 +1 +1 -1 +1 -1 -1


-1 ]

transmitter signal A1 = [-1 -1 -1 -1 -1 -1 -1 -1]*[-1 -1 -1 +1 -1 +1 +1 +1 +1 ] = [+1 +1 +1 -1 +1 -1 -1 -1 ]

transmitter signal B0 = [+1 +1 +1 +1 +1 +1 +1 +1]*[+1 -1 +1 +1 +1 -1 +1 +1 ] =[+1 -1 +1 +1 +1 -1 +1


+1]

transmitter signal B1 = [+1 +1 +1 +1 +1 +1 +1 +1]*[+1 -1 +1 +1 +1 -1 +1 +1 ] = [+1-1+1+1+1-1+1+1]

so :

transmitter signal for slot 0 :

6 Communications System | CDMA


Communication Systems :CDMA

A0 + B0 = [+1 +1 +1 -1 +1 -1 -1 -1 ] + [+1 -1 +1 +1 +1-1 +1 +1 ] = [ +2 0 +2 0 +2 -2 0 0 ]

Transmitter signal for slot 1 :

A1 + B1 = [+1 +1 +1 -1 +1 -1 -1 -1 ] + [+1-1+1+1+1-1+1+1] = [ +2 0 +2 0 +2 -2 0 0 ]

V)

For slot 0 :

Transmitter signal for slot 0 * spreader A0 = input data A0

[ +2 0 +2 0 +2 -2 0 0 ] * [+1 +1 +1 -1 +1 -1 -1 -1 ] = [+2 0 +2 0 +2 +2 0 0]

Hence ; (+2)+(0)+(+2)+(0)+(+2)+(+2)+(0)+(0) = 8/8 = 1

Transmitter signal for slot 0*spreader B0 = input data B0

[ +2 0 +2 0 +2 -2 0 0 ] ]*[+1 -1 +1 +1 +1 -1 +1 +1 ]= [+2 0 +2 0 +2 +2 0 0 ]

Hence ; (+2)+(0)+(+2)+(0)+(+2)+(+2)+(0)+(0) = 8/8 = 1

For slot 1 :

Transmitter signal for slot 1*spreader A1 = input data A1

[ +2 0 +2 0 +2 -2 0 0 ] *[-1 -1 -1 +1 -1 +1 +1 +1 +1 ] = [-2 0 -2 0 -2 -2 0 0 ]

Hence ; (-2) + (0) + (-2) + (0) + (-2) +(-2) + (0) + (0) = -8 / 8 = -1

Transmitter signal for slot 1* spreader B1 = input data B1

[ +2 0 +2 0 +2 -2 0 0 ] *[+1 -1 +1 +1 +1 -1 +1 +1 ] = [+2 0 +2 0 +2 +2 0 0 ]

Hence ; (+2)+(0)+(+2)+(0)+(+2)+(+2)+(0)+(0) = 8/8 = 1

7 Communications System | CDMA


Communication Systems :CDMA

6.0 RESULT AND DISCUSSION


The following are the results by using Matlab simulation.

Figure 1: Data for input User A Slot 0

8 Communications System | CDMA


Communication Systems :CDMA

Figure 2: Data for input User A Slot 1

9 Communications System | CDMA


Communication Systems :CDMA

Figure 3: Data for input User B Slot 0

10 Communications System | CDMA


Communication Systems :CDMA

Figure 4: Data for input User B Slot 1

11 Communications System | CDMA


Communication Systems :CDMA

Figure 5: Data for chip sequence User A Slot 0

12 Communications System | CDMA


Communication Systems :CDMA

13 Communications System | CDMA


Communication Systems :CDMA

Figure 6: Data for chip sequence User A Slot 1

Figure 7: Data for chip sequence User B Slot 0

14 Communications System | CDMA


Communication Systems :CDMA

Figure 8: Data for chip sequence User B Slot 1

15 Communications System | CDMA


Communication Systems :CDMA

Figure 9: Transmitted Data User A Slot 0

16 Communications System | CDMA


Communication Systems :CDMA

Figure 10: Transmitted Data User A Slot 1

17 Communications System | CDMA


Communication Systems :CDMA

Figure 11: Transmitted Data User B Slot 0

18 Communications System | CDMA


Communication Systems :CDMA

Figure 12: Transmitted Data User B Slot 1

19 Communications System | CDMA


Communication Systems :CDMA

Figure 13: Overall Output for Slot 0

20 Communications System | CDMA


Communication Systems :CDMA

Figure 14: Overall Output for Slot 1

21 Communications System | CDMA


Communication Systems :CDMA

MATLAB SIMULATION CODE

A0 = [1,1,1,0,1,0,0,0]
A1 = [0,0,0,1,0,1,1,1]
B0 = [1,0,1,1,1,0,1,1]
B1 = [1,0,1,1,1,0,1,1]

a=1,b=-1

figure(1)%graph for data input channel A0


clf('reset')
axis([-1 9 -3 3])

line([0,1],[a(1),a(1)],'Marker','.','LineStyle','-')
line([1,1],[a(1),a(1)],'Marker','.','LineStyle','-')
line([1,2],[a(1),a(1)],'Marker','.','LineStyle','-')
line([2,2],[a(1),a(1)],'Marker','.','LineStyle','-')
line([2,3],[a(1),a(1)],'Marker','.','LineStyle','-')
line([3,3],[a(1),a(1)],'Marker','.','LineStyle','-')
line([3,4],[a(1),a(1)],'Marker','.','LineStyle','-')
line([4,4],[a(1),a(1)],'Marker','.','LineStyle','-')
line([4,5],[a(1),a(1)],'Marker','.','LineStyle','-')
line([5,5],[a(1),a(1)],'Marker','.','LineStyle','-')
line([5,6],[a(1),a(1)],'Marker','.','LineStyle','-')
line([6,6],[a(1),a(1)],'Marker','.','LineStyle','-')
line([6,7],[a(1),a(1)],'Marker','.','LineStyle','-')
line([7,7],[a(1),a(1)],'Marker','.','LineStyle','-')
line([7,8],[a(1),a(1)],'Marker','.','LineStyle','-')

figure(2)%graph for data input A1


clf('reset')
axis([-1 9 -3 3])

line([0,1],[b(1),b(1)],'Marker','.','LineStyle','-')
line([1,1],[b(1),b(1)],'Marker','.','LineStyle','-')
line([1,2],[b(1),b(1)],'Marker','.','LineStyle','-')
line([2,2],[b(1),b(1)],'Marker','.','LineStyle','-')
line([2,3],[b(1),b(1)],'Marker','.','LineStyle','-')
line([3,3],[b(1),b(1)],'Marker','.','LineStyle','-')
line([3,4],[b(1),b(1)],'Marker','.','LineStyle','-')
line([4,4],[b(1),b(1)],'Marker','.','LineStyle','-')
line([4,5],[b(1),b(1)],'Marker','.','LineStyle','-')
line([5,5],[b(1),b(1)],'Marker','.','LineStyle','-')
line([5,6],[b(1),b(1)],'Marker','.','LineStyle','-')
line([6,6],[b(1),b(1)],'Marker','.','LineStyle','-')
line([6,7],[b(1),b(1)],'Marker','.','LineStyle','-')
line([7,7],[b(1),b(1)],'Marker','.','LineStyle','-')
line([7,8],[b(1),b(1)],'Marker','.','LineStyle','-')

figure(3)%graph for data input B0

22 Communications System | CDMA


Communication Systems :CDMA

clf('reset')
axis([-1 9 -3 3])

line([0,1],[a(1),a(1)],'Marker','.','LineStyle','-')
line([1,1],[a(1),a(1)],'Marker','.','LineStyle','-')
line([1,2],[a(1),a(1)],'Marker','.','LineStyle','-')
line([2,2],[a(1),a(1)],'Marker','.','LineStyle','-')
line([2,3],[a(1),a(1)],'Marker','.','LineStyle','-')
line([3,3],[a(1),a(1)],'Marker','.','LineStyle','-')
line([3,4],[a(1),a(1)],'Marker','.','LineStyle','-')
line([4,4],[a(1),a(1)],'Marker','.','LineStyle','-')
line([4,5],[a(1),a(1)],'Marker','.','LineStyle','-')
line([5,5],[a(1),a(1)],'Marker','.','LineStyle','-')
line([5,6],[a(1),a(1)],'Marker','.','LineStyle','-')
line([6,6],[a(1),a(1)],'Marker','.','LineStyle','-')
line([6,7],[a(1),a(1)],'Marker','.','LineStyle','-')
line([7,7],[a(1),a(1)],'Marker','.','LineStyle','-')
line([7,8],[a(1),a(1)],'Marker','.','LineStyle','-')

figure(4)%graph for data input B1


clf('reset')
axis([-1 9 -3 3])

line([0,1],[a(1),a(1)],'Marker','.','LineStyle','-')
line([1,1],[a(1),a(1)],'Marker','.','LineStyle','-')
line([1,2],[a(1),a(1)],'Marker','.','LineStyle','-')
line([2,2],[a(1),a(1)],'Marker','.','LineStyle','-')
line([2,3],[a(1),a(1)],'Marker','.','LineStyle','-')
line([3,3],[a(1),a(1)],'Marker','.','LineStyle','-')
line([3,4],[a(1),a(1)],'Marker','.','LineStyle','-')
line([4,4],[a(1),a(1)],'Marker','.','LineStyle','-')
line([4,5],[a(1),a(1)],'Marker','.','LineStyle','-')
line([5,5],[a(1),a(1)],'Marker','.','LineStyle','-')
line([5,6],[a(1),a(1)],'Marker','.','LineStyle','-')
line([6,6],[a(1),a(1)],'Marker','.','LineStyle','-')
line([6,7],[a(1),a(1)],'Marker','.','LineStyle','-')
line([7,7],[a(1),a(1)],'Marker','.','LineStyle','-')
line([7,8],[a(1),a(1)],'Marker','.','LineStyle','-')

% conver chip seq to bipolar

N = [-1,-1,-1,-1,-1,-1,-1,-1];
w = A0 + (A0+N);
x= A1 + (A1+N);
y= B0 + (B0+N);
z= B1 + (B1+N);

23 Communications System | CDMA


Communication Systems :CDMA

%Plot graph
hold on
figure(5)%graph for chip sequence A0
clf('reset')
axis([-1 9 -3 3]);
line([0,0],[0,w(1)],'Marker','.','LineStyle','-')
line([0,1],[w(1),w(1)],'Marker','.','LineStyle','-')
line([1,1],[w(1),w(2)],'Marker','.','LineStyle','-')
line([1,2],[w(2),w(2)],'Marker','.','LineStyle','-')
line([2,2],[w(2),w(3)],'Marker','.','LineStyle','-')
line([2,3],[w(3),w(3)],'Marker','.','LineStyle','-')
line([3,3],[w(3),w(4)],'Marker','.','LineStyle','-')
line([3,4],[w(4),w(4)],'Marker','.','LineStyle','-')
line([4,4],[w(4),w(5)],'Marker','.','LineStyle','-')
line([4,5],[w(5),w(5)],'Marker','.','LineStyle','-')
line([5,5],[w(5),w(6)],'Marker','.','LineStyle','-')
line([5,6],[w(6),w(6)],'Marker','.','LineStyle','-')
line([6,6],[w(6),w(7)],'Marker','.','LineStyle','-')
line([6,7],[w(7),w(7)],'Marker','.','LineStyle','-')
line([7,7],[w(7),w(8)],'Marker','.','LineStyle','-')
line([7,8],[w(8),w(8)],'Marker','.','LineStyle','-')

figure(6)%graph for chip sequence A1


clf('reset')
axis([-1 9 -3 3])
line([0,0],[0,x(1)],'Marker','.','LineStyle','-')
line([0,1],[x(1),x(1)],'Marker','.','LineStyle','-')
line([1,1],[x(1),x(2)],'Marker','.','LineStyle','-')
line([1,2],[x(2),x(2)],'Marker','.','LineStyle','-')
line([2,2],[x(2),x(3)],'Marker','.','LineStyle','-')
line([2,3],[x(3),x(3)],'Marker','.','LineStyle','-')
line([3,3],[x(3),x(4)],'Marker','.','LineStyle','-')
line([3,4],[x(4),x(4)],'Marker','.','LineStyle','-')
line([4,4],[x(4),x(5)],'Marker','.','LineStyle','-')
line([4,5],[x(5),x(5)],'Marker','.','LineStyle','-')
line([5,5],[x(5),x(6)],'Marker','.','LineStyle','-')
line([5,6],[x(6),x(6)],'Marker','.','LineStyle','-')
line([6,6],[x(6),x(7)],'Marker','.','LineStyle','-')
line([6,7],[x(7),x(7)],'Marker','.','LineStyle','-')
line([7,7],[x(7),x(8)],'Marker','.','LineStyle','-')
line([7,8],[x(8),x(8)],'Marker','.','LineStyle','-')

figure(7)%graph for chip sequence B0


clf('reset')
axis([-1 9 -3 3])
line([0,0],[0,y(1)],'Marker','.','LineStyle','-')
line([0,1],[y(1),y(1)],'Marker','.','LineStyle','-')
line([1,1],[y(1),y(2)],'Marker','.','LineStyle','-')
line([1,2],[y(2),y(2)],'Marker','.','LineStyle','-')
line([2,2],[y(2),y(3)],'Marker','.','LineStyle','-')
line([2,3],[y(3),y(3)],'Marker','.','LineStyle','-')
line([3,3],[y(3),y(4)],'Marker','.','LineStyle','-')
line([3,4],[y(4),y(4)],'Marker','.','LineStyle','-')

24 Communications System | CDMA


Communication Systems :CDMA

line([4,4],[y(4),y(5)],'Marker','.','LineStyle','-')
line([4,5],[y(5),y(5)],'Marker','.','LineStyle','-')
line([5,5],[y(5),y(6)],'Marker','.','LineStyle','-')
line([5,6],[y(6),y(6)],'Marker','.','LineStyle','-')
line([6,6],[y(6),y(7)],'Marker','.','LineStyle','-')
line([6,7],[y(7),y(7)],'Marker','.','LineStyle','-')
line([7,7],[y(7),y(8)],'Marker','.','LineStyle','-')
line([7,8],[y(8),y(8)],'Marker','.','LineStyle','-')

figure(8)%graph for chip sequence B1


clf('reset')
axis([-1 9 -3 3])
line([0,0],[0,z(1)],'Marker','.','LineStyle','-')
line([0,1],[z(1),z(1)],'Marker','.','LineStyle','-')
line([1,1],[z(1),z(2)],'Marker','.','LineStyle','-')
line([1,2],[z(2),z(2)],'Marker','.','LineStyle','-')
line([2,2],[z(2),z(3)],'Marker','.','LineStyle','-')
line([2,3],[z(3),z(3)],'Marker','.','LineStyle','-')
line([3,3],[z(3),z(4)],'Marker','.','LineStyle','-')
line([3,4],[z(4),z(4)],'Marker','.','LineStyle','-')
line([4,4],[z(4),z(5)],'Marker','.','LineStyle','-')
line([4,5],[z(5),z(5)],'Marker','.','LineStyle','-')
line([5,5],[z(5),z(6)],'Marker','.','LineStyle','-')
line([5,6],[z(6),z(6)],'Marker','.','LineStyle','-')
line([6,6],[z(6),z(7)],'Marker','.','LineStyle','-')
line([6,7],[z(7),z(7)],'Marker','.','LineStyle','-')
line([7,7],[z(7),z(8)],'Marker','.','LineStyle','-')
line([7,8],[z(8),z(8)],'Marker','.','LineStyle','-')

%multiply/Modulate

W= w*a
X= x*b
Y= y*c
Z= z*d
%Receiver signal

R1 =W + Y
R2 =X + Z

figure (9)%GRaph for data sent by A0


clf('reset')
axis([-1 9 -3 3])
line([0,0],[0,W(1)],'Marker','.','LineStyle','-')
line([0,1],[W(1),W(1)],'Marker','.','LineStyle','-')
line([1,1],[W(1),W(2)],'Marker','.','LineStyle','-')
line([1,2],[W(2),W(2)],'Marker','.','LineStyle','-')
line([2,2],[W(2),W(3)],'Marker','.','LineStyle','-')

25 Communications System | CDMA


Communication Systems :CDMA

line([2,3],[W(3),W(3)],'Marker','.','LineStyle','-')
line([3,3],[W(3),W(4)],'Marker','.','LineStyle','-')
line([3,4],[W(4),W(4)],'Marker','.','LineStyle','-')
line([4,4],[W(4),W(5)],'Marker','.','LineStyle','-')
line([4,5],[W(5),W(5)],'Marker','.','LineStyle','-')
line([5,5],[W(5),W(6)],'Marker','.','LineStyle','-')
line([5,6],[W(6),W(6)],'Marker','.','LineStyle','-')
line([6,6],[W(6),W(7)],'Marker','.','LineStyle','-')
line([6,7],[W(7),W(7)],'Marker','.','LineStyle','-')
line([7,7],[W(7),W(8)],'Marker','.','LineStyle','-')
line([7,8],[W(8),W(8)],'Marker','.','LineStyle','-')

figure (10)%GRaph for data sent by A1


clf('reset')
axis([-1 9 -3 3])
line([0,0],[0,X(1)],'Marker','.','LineStyle','-')
line([0,1],[X(1),X(1)],'Marker','.','LineStyle','-')
line([1,1],[X(1),X(2)],'Marker','.','LineStyle','-')
line([1,2],[X(2),X(2)],'Marker','.','LineStyle','-')
line([2,2],[X(2),X(3)],'Marker','.','LineStyle','-')
line([2,3],[X(3),X(3)],'Marker','.','LineStyle','-')
line([3,3],[X(3),X(4)],'Marker','.','LineStyle','-')
line([3,4],[X(4),X(4)],'Marker','.','LineStyle','-')
line([4,4],[X(4),X(5)],'Marker','.','LineStyle','-')
line([4,5],[X(5),X(5)],'Marker','.','LineStyle','-')
line([5,5],[X(5),X(6)],'Marker','.','LineStyle','-')
line([5,6],[X(6),X(6)],'Marker','.','LineStyle','-')
line([6,6],[X(6),X(7)],'Marker','.','LineStyle','-')
line([6,7],[X(7),X(7)],'Marker','.','LineStyle','-')
line([7,7],[X(7),X(8)],'Marker','.','LineStyle','-')
line([7,8],[X(8),X(8)],'Marker','.','LineStyle','-')

figure (11)%GRaph for data sent by B0


clf('reset')
axis([-1 9 -3 3])
line([0,0],[0,Y(1)],'Marker','.','LineStyle','-')
line([0,1],[Y(1),Y(1)],'Marker','.','LineStyle','-')
line([1,1],[Y(1),Y(2)],'Marker','.','LineStyle','-')
line([1,2],[Y(2),Y(2)],'Marker','.','LineStyle','-')
line([2,2],[Y(2),Y(3)],'Marker','.','LineStyle','-')
line([2,3],[Y(3),Y(3)],'Marker','.','LineStyle','-')
line([3,3],[Y(3),Y(4)],'Marker','.','LineStyle','-')
line([3,4],[Y(4),Y(4)],'Marker','.','LineStyle','-')
line([4,4],[Y(4),Y(5)],'Marker','.','LineStyle','-')
line([4,5],[Y(5),Y(5)],'Marker','.','LineStyle','-')
line([5,5],[Y(5),Y(6)],'Marker','.','LineStyle','-')
line([5,6],[Y(6),Y(6)],'Marker','.','LineStyle','-')
line([6,6],[Y(6),Y(7)],'Marker','.','LineStyle','-')
line([6,7],[Y(7),Y(7)],'Marker','.','LineStyle','-')
line([7,7],[Y(7),Y(8)],'Marker','.','LineStyle','-')
line([7,8],[Y(8),Y(8)],'Marker','.','LineStyle','-')

26 Communications System | CDMA


Communication Systems :CDMA

figure (12)%Graph for data sent by B1


clf('reset')
axis([-1 9 -3 3])
line([0,0],[0,Z(1)],'Marker','.','LineStyle','-')
line([0,1],[Z(1),Z(1)],'Marker','.','LineStyle','-')
line([1,1],[Z(1),Z(2)],'Marker','.','LineStyle','-')
line([1,2],[Z(2),Z(2)],'Marker','.','LineStyle','-')
line([2,2],[Z(2),Z(3)],'Marker','.','LineStyle','-')
line([2,3],[Z(3),Z(3)],'Marker','.','LineStyle','-')
line([3,3],[Z(3),Z(4)],'Marker','.','LineStyle','-')
line([3,4],[Z(4),Z(4)],'Marker','.','LineStyle','-')
line([4,4],[Z(4),Z(5)],'Marker','.','LineStyle','-')
line([4,5],[Z(5),Z(5)],'Marker','.','LineStyle','-')
line([5,5],[Z(5),Z(6)],'Marker','.','LineStyle','-')
line([5,6],[Z(6),Z(6)],'Marker','.','LineStyle','-')
line([6,6],[Z(6),Z(7)],'Marker','.','LineStyle','-')
line([6,7],[Z(7),Z(7)],'Marker','.','LineStyle','-')
line([7,7],[Z(7),Z(8)],'Marker','.','LineStyle','-')
line([7,8],[Z(8),Z(8)],'Marker','.','LineStyle','-')

figure(13)%Graph for output Slot 0


clf('reset')
axis([-1 9 -3 5])
line([0,0],[0,R1(1)],'Marker','.','LineStyle','-')
line([0,1],[R1(1),R1(1)],'Marker','.','LineStyle','-')
line([1,1],[R1(1),R1(2)],'Marker','.','LineStyle','-')
line([1,2],[R1(2),R1(2)],'Marker','.','LineStyle','-')
line([2,2],[R1(2),R1(3)],'Marker','.','LineStyle','-')
line([2,3],[R1(3),R1(3)],'Marker','.','LineStyle','-')
line([3,3],[R1(3),R1(4)],'Marker','.','LineStyle','-')
line([3,4],[R1(4),R1(4)],'Marker','.','LineStyle','-')
line([4,4],[R1(4),R1(5)],'Marker','.','LineStyle','-')
line([4,5],[R1(5),R1(5)],'Marker','.','LineStyle','-')
line([5,5],[R1(5),R1(6)],'Marker','.','LineStyle','-')
line([5,6],[R1(6),R1(6)],'Marker','.','LineStyle','-')
line([6,6],[R1(6),R1(7)],'Marker','.','LineStyle','-')
line([6,7],[R1(7),R1(7)],'Marker','.','LineStyle','-')
line([7,7],[R1(7),R1(8)],'Marker','.','LineStyle','-')
line([7,8],[R1(8),R1(8)],'Marker','.','LineStyle','-')

figure(14)%Graph for output Slot 1


clf('reset')
axis([-1 9 -3 5])
line([0,0],[0,R2(1)],'Marker','.','LineStyle','-')
line([0,1],[R2(1),R2(1)],'Marker','.','LineStyle','-')
line([1,1],[R2(1),R2(2)],'Marker','.','LineStyle','-')
line([1,2],[R2(2),R2(2)],'Marker','.','LineStyle','-')
line([2,2],[R2(2),R2(3)],'Marker','.','LineStyle','-')
line([2,3],[R2(3),R2(3)],'Marker','.','LineStyle','-')
line([3,3],[R2(3),R2(4)],'Marker','.','LineStyle','-')
line([3,4],[R2(4),R2(4)],'Marker','.','LineStyle','-')

27 Communications System | CDMA


Communication Systems :CDMA

line([4,4],[R2(4),R2(5)],'Marker','.','LineStyle','-')
line([4,5],[R2(5),R2(5)],'Marker','.','LineStyle','-')
line([5,5],[R2(5),R2(6)],'Marker','.','LineStyle','-')
line([5,6],[R2(6),R2(6)],'Marker','.','LineStyle','-')
line([6,6],[R2(6),R2(7)],'Marker','.','LineStyle','-')
line([6,7],[R2(7),R2(7)],'Marker','.','LineStyle','-')
line([7,7],[R2(7),R2(8)],'Marker','.','LineStyle','-')
line([7,8],[R2(8),R2(8)],'Marker','.','LineStyle','-')

We had compared the result of manual calculation and the Matlab simulation. Both seem
converge to a same output. Thus we can deduce that our simulation output is accurate.

From this assignment code division multiplication access (CDMA) , we are given CDMA
encoding with 2 users which is user A and user B. Both of the user utilized a PN code of 8 bits.
In order to answer those question, we are using two method to solve the problem. We use the
calculation method and simulation using MATLAB. So, we can compare our calculation with
our simulation MATLAB result.
We make an assumption, bit 0 as -1v and bit 1 as +1v to find the spreading code for both users.
Next, we manage to prove the orthogonal of user A and user B by multiplying the A0 with A1
(A0*A1) and B0 with B1 (B0*B1)
We also find the transmitted signal for slot 0 and slot 1 by multiplying the data bit and spreading
code for each user. Then, we prove that if the transmitted bit signal is de-spread at the receiver,
the bit value assigned for user A and user B at slot 0 and slot 1 are the same as input data.

28 Communications System | CDMA


Communication Systems :CDMA

7.0 CONCLUSION
By using both methods of MATLAB and calculation, we have come up with the same output.
The objectives are met where we are able to apply this theory on wireless technology.

8.0 APPENDIX
1. http://en.wikipedia.org/wiki/CDMA_Spectral_Efficiency
2. Electronic Communications Systems, Fundamental Through Advanced. Wayne Tomasi.
5th Edition. Prentice Hall.
3. http://en.wikipedia.org/wiki/Code_division_multiple_access
4. Data Communications and Networking , 4th Edition, Behrouz A. Forouzan
5. Wireless Communication Principles and Practice, 2nd Edition, Theodore S Rappaport

6. Two-Layer Spreading CDMA: An Improved Method for Broadband Uplink


Transmission, Xiaoming Peng ; Khiam-Boon Png ; Zhongding Lei ; Chin, F. ; Chi Chung
Ko ; 
Inst. for Infocomm Res., Singapore

29 Communications System | CDMA

You might also like