Sunteți pe pagina 1din 6

JOURNAL OF TELECOMMUNICATIONS, VOLUME 7, ISSUE 2, MARCH 2011

40

MATLAB Implementation of Multiuser


Code Division Multiple Access
A. A. Patel, A. D. Patel

AbstractSome of the difficulties in the study of new generation wireless mobile systems are lack of practical
implementation for various strategies like, multiuser code division multiple accesses, assigning radio resources using DS-
SS, use of orthogonal codes etc. In this paper we are going to discuss some of the above stated problems with their
implementation issues. CDMA is a scheme by which multiple users are assigned radio resources using DS-SS
techniques. Although all users are transmitting in the same RF band, individual users are separated from each other via
the use of orthogonal codes. Capacity is defined as the total number of simultaneous users the system can support, and
quality is defined as the perceived condition of a radio link assigned to a particular user. We have use MATLAB as a
simulation tool and result shows how multi-user CDMA performs under certain circumstances.

Index TermsMulti-user CDMA, Hadamard code, Walsh code, Orthogonal code, MATLAB

frequency spectrum is imperative. Static Multi


1. INTRODUCTION access is very old and common technique.
Wireless communication is one of the most Under a static allocation, a users portion of
emerging areas in the field of voice and data the channel may be idle when another user
transmission. The fast growing cellular could use it. In such instances, a dynamic
industry provides higher and higher capacities allocation strategy is desirable. Furthermore,
for more and more subscribers each year. After when the set of active users change with time,
a long discussion about the best method for some method is needed to dynamically
multiple accesses, CDMA (Code -Division reallocate the channels to the various users as
Multiple Access) has emerged as one of the they come and go. Random multi access
best multiple access schemes. In CDMA methods allow users to transmit whenever
communication systems, all the subscribers they want without considering orthogonality
share the common channel. Unlike TDMA with other users. The need for random multi
(Time-Division Multiple Access) and FDMA access arises in various scenarios like, if the
(Frequency-Division Multiple Access), where number of potential users is much larger than
each user is assigned a unique time slot or the number of active users and when data
channel, users in CDMA experience direct from individual users are so busty that the
interference from the other users [1]. control overhead of the DAMA protocol is
unacceptable. [5]
1.1 Multi Access System
1.2 Code Division Multiple Access
Sharing of the uplink channel can be provided
by one or more of the following multi access: (CDMA) Cellular System
These systems provide multiple accesses while
Static Multi access using the same frequencies for all the users at
Demand Assigned Multi access the same time. This is made possible by using
Random Multi access a technique called Spread-Spectrum
Techniques. A CDMA system with orthogonal
The choice of a multi access protocol depends codes is an example of static channel sharing.
upon the traffic characteristics of the network. That is, the user signals are completely
Dynamic multi access methods are separated by orthogonal codes as they are
differentiated from the static multi access separated in frequency and time in FDMA and
methods by virtue of their ability to allocate TDMA systems, respectively. When semi-
channels and channel resources to individual orthogonal codes are used in a CDMA system,
users on demand. In order to accommodate interference occurs among active users just as
the demand for wireless communication collision occurs in a random multi access
services, efficient use of limited available channel. Thus a CDMA system has some

2011 JOT
http://sites.google.com/site/journaloftelecommunications/
JOURNAL OF TELECOMMUNICATIONS, VOLUME 7, ISSUE 2, MARCH 2011
41

characteristics of a random multi access below once and invert diagonally as shown in
channel. While random multi access channels the above example. For the given seed,
generally require retransmission in case of
collisions, CDMA systems allow detection of
0 0
individual users even in the presence of multi H 2 =
access interference without necessitating 0 0
retransmission. Consequently, a larger number
of users can be accommodated in a CDMA Therefore, to derive a set of four orthogonal
system by allowing multiple access Walsh sequences W0, W1, W2, and W3, we
interference (MAI) in the uplink channel. Since only need to generate a Hadamard matrix of
the number of semi-orthogonal codes is not order 4 [2], or
fixed, CDMA systems are said to be of soft
capacity. [5]
0 0 0 0
1.3 Orthogonal Codes H2 H 2 0 1 0 1
Two general categories of spreading sequences H4= =
have been used: PN (pseudo noise or H2 H 2 0 0 1 1
pseudorandom number) sequences and
0 1 1 0
orthogonal codes. PN sequences are the most
common ones used in FHSS systems and DSSS
systems not employing CDMA. In DSSS
CDMA systems, both PN and orthogonal 2. RELATED WORK
codes have been used. In this article, I'll The first cellular networks were based on
examine orthogonal sequences. When the DS- analog radio transmission technologies such as
CDMA system can be guaranteed to be Advance Mobile Phone System (AMPS). [7]
synchronous, it is preferable to use orthogonal
sequences for spreading. This results in the
complete elimination of MAI.

In order to avoid mutual interference on the


forward link, Walsh codes are used to separate
individual users while they simultaneously
occupy the same RF band. Walsh codes as
used in IS-95 are a set of 64 binary orthogonal
sequences. These sequences are orthogonal to
each other, and they are generated by using Figure 1: Evolution of Cellular Systems
the Hadamard matrix. Recursion is used to
generate higher order matrices from lower 2.1 Early Uses
order ones; that is, 1. One of the early applications for code
division multiplexingpredating, and distinct
from cdmaOneis in GPS.
HN HN 2. The Qualcomm standard IS-95, marketed as
H =
H N
2N
cdmaOne.
HN 3. The Qualcomm standard IS-2000, known as
CDMA2000. This standard is used by several
H
Where, N contains the same but inverted mobile phone companies, including the Global
elements of HN. star satellite phone network.

The main purpose of Walsh codes in CDMA is 2.2 Ongoing Research On CDMA
to provide orthogonality among all the users 1. Increase capacity by joint decoding
in a cell. Each user traffic channel is assigned a (multiuser detection & interference
different Walsh code by the base station. cancellation)
2. Applying CDMA to other applications:
Rule of Thumb: For generating the matrix is optical CDMA, adhoc networks, dense
for a given seed repeat it over right once and wireless LANs

2011 JOT
http://sites.google.com/site/journaloftelecommunications/
JOURNAL OF TELECOMMUNICATIONS, VOLUME 7, ISSUE 2, MARCH 2011
42

3. MultiCDMA: multiple antenna CDMA, M1(t) * W1(t) = -1 +1 -1 +1 +1 -1 +1 -1 -1 +1 -1+1


multicarrier CDMA, multicode CDMA [5]
Similarly for the M2 (t) and M3 (t)

3. MATLAB IMPLEMENTATION
M2(t) * W2(t) = -1 -1 +1 +1 -1 -1 +1 +1 +1 +1 -1 -1
MATLAB has evolved over a period of years
M3(t) * W3(t) = +1 -1 -1 +1 -1 +1 +1 -1 -1 +1 +1 -1
with input from many users.
In university environments, it is the standard
instructional tool for introductory and The spread-spectrum signals for all three
advanced courses in mathematics, messages, M1 (t) * W1 (t), M2 (t) * W2 (t), and
engineering, and science. In industry, M3 (t) * W3 (t), are combined to form a
MATLAB is the tool of choice for high composite signal C (t); that is,
productivity research, development, and
analysis. [4].
C(t) = M1(t) * W1(t) + M2(t) * W2(t) + M3(t) * W3(t)
The resulting C (t) is
C(t) = -1 -1 -1 +3 -1 -1 +3 -1 -1 +3 -1 -1

C (t) is the composite signal that is transmitted


in the single RF band. If there are negligible
errors during the transmission process, the
receiver intercepts C (t). In order to separate
Figure 2: generation of CDMA transmitted signals out the original messages M1 (t), M2 (t), and
M3 (t) from the composite signal C (t), the
Channelization is done in following steps: receiver multiplies C (t) by the assigned Walsh
code for each message [3]:
Generate Walsh Codes
Generate Codes for each message
C(t)W1(t) = 1 -1 1 3 1 -1 -3 -1 1 3 1 -1
Transmitted Signal
Retrieval of message C(t)W2(t) = 1 1 -1 3 1 1 3 -1 1 -3 -1 1
C(t)W3(t) = 1 -1 -1 -3 1 -1 3 1 1 3 -1 1
Suppose that there are three different users,
and each user wishes to send a separate C(t)W1(t) =1 -1 1 3 1 -1 -3 -1 1 3 1 -1
message. The separate messages are: M1(t) = 4 -4 4

M 1 = [+ 1 1 + 1]
C(t)W2(t) = 1 1 -1 3 1 1 3 -1 1 -3 -1 1
M 2 = [+ 1 +1 1] M2(t) = 4 4 -4
M 3 = [ 1 +1 + 1]
C(t)W3(t) = 1 -1 -1 -3 1 -1 3 1 1 3 -1 1
There respective codes are as follows:
M3(t) = -4 4 4

W 0 = [ 1 1 1 1]
m(t) = 1 if M(t) > 0
W 1 = [ 1 + 1 1 + 1] m(t) = -1 if M(t) < 0
W 2 = [ 1 1 + 1 + 1]
m(t) 1 -1 1
W 3 = [ 1 + 1 + 1 1]
m(t) 1 1 -1
The signal to be transmitted is calculated to be m(t) -1 1 1
M (t) * W (t). This is shown:

M1(t) = +1 -1 +1 3.1 Mathematical Terms


If original signal is d (t) of power Ps, and the
M1(t) = +1 +1 +1 +1 -1 -1 -1 -1 +1 +1+1 +1
code sequence is given by g(t), the resultant
W1(t) = -1 +1 -1 +1 -1 +1 -1 +1 -1 +1 -1+1 modulated signal is,

2011 JOT
http://sites.google.com/site/journaloftelecommunications/
JOURNAL OF TELECOMMUNICATIONS, VOLUME 7, ISSUE 2, MARCH 2011
43

s (t ) = 2 P S d (t ) g (t ) rcv(t ) = 2 Ps d (t )
The multiplication of the data sequence with In CDMA we do modulation twice. First with
the spreading sequence is the first modulation. a binary sequence g(t), the properties of which
Then the signal is multiplied by the carrier we will discuss below and then by a carrier.
which is the second modulation. The carrier The binary sequence modulation ahead of the
here is analog. carrier modulation accomplishes two
functions,

s(t ) = 2 PS d (t ) g (t ) sin(2 fct ) 1. It spread the signal and


2. It introduces a form of encryption because
the same sequence is needed at the receiver to
Here, s(t)=Spreaded signal which is demodulate the signal.
transmitted, sin (2fct) = carrier analog signal,
Where, fc = carrier frequency and t = time. In IS-95, we do this three times, once with a
code called Walsh, then with a code called
On the receive side, we multiply this signal Short Code and then with one called Long
again with the carrier. What we get is this. code. [6]

s(t ) = 2PS d (t ) g (t )sin 2 (2 fct ) 4. RESULTS


By the trigonometric identity The steps for getting the result from MATLAB
code is given below.
sin 2 (2 fct ) = 1 cos(4 fct ) Lets generate the hadamard code,

We get hadamard(n); /* inbuilt function for


generation of hadamard
matrix, n is power of 2 */
rcv(t) = 2Psd(t)g(t)(1 cos(4 fct)) zeros (n,n); /* Initialize matrix */

/* converting physical value to binary */


Where, rcv (t) =received signal at
receiver
for i=1:n
for j=1:n
Where the underlined part is the double
h (i,j)=(c(i,j)+1)/2;
frequency extraneous term, which we filter out
end;
and we are left with just the signal.
end;

rcv(t ) = 2 Ps d (t ) g (t ) Then XOR the input data with hadamard code,

Now we multiply this remaining signal with if d12(m1) = -1 then


g(t), the code sequence and we get, a2(:,m1) = h2;
else
a2(:,m1) = (-1)*h2;
rcv(t ) = 2 Ps d (t ) g (t ) g (t ) Here d12 is data variable, when data is -1,
output is as it is otherwise negative, h2 is
Now from having used a very special kind of walsh code and a2 is output.
sequence, we say that correlatation of g(t) with
itself (only when perfectly aligned) is a certain Now perform addition off all signals which we
scalar number which can be removed, and we will get from above procedure.
get the original signal back.
A=a2sym+a3sym+....... + aNsym

2011 JOT
http://sites.google.com/site/journaloftelecommunications/
JOURNAL OF TELECOMMUNICATIONS, VOLUME 7, ISSUE 2, MARCH 2011
44

-1
Performance of multiuser CDMA
10
Now add the noise, data1
data2

EbNovec =0:1:20; /* noise vector */ -2


10
sn=length(EbNovec); /* noise vector
length */

BER
for i=1:sn
-3

EbNo = EbNovec(i); 10

snr=EbNo; /* signal to noise ratio */


r = awgn(A,snr); /* generating noise -4
10
0 2 4 6 8 10 12 14

through inbuilt function */ EbNo (dB)

rth=zeros(1,spred2); Figure 4: Result of BER versus Eb\No for two users


Performance of multiuser CDMA
r1=zeros(1,spred2); 10
-1

data1
for m=1:spred2 data2
data3
data4
data5
if r(m)<0.5 then 10
-2
data6
data7
rth(m)=-1;

BER
else
rth(m)=1; 10
-3

r1(m)=(rth(m)+1)/2;

here, 0.5 is considered as threshold, if r(m) is -4


10
less then threshold then output is -1 otherwise 0 2 4 6 8
EbNo (dB)
10 12 14 16

1.
Figure 5: Result of BER versus Eb\No for multi- users
Now perform XOR operation with the result
which you are getting from above code and
then find out the error from the result. Then 5. CONCLUSION
plot the graph. The error finding and plotting The interested student can follow the
code is also given below. procedure given in this paper to understand
the behavior of multiuser CDMA. Also one
ber2(i)=numerrs2/spred2; can use the xilinx spartan II Board for the
disp(['EbNo = ' num2str(EbNo) ' dB, ' transmission. The switches of the board can be
num2str(numerrs2) ...' errors, used as input to the system. On the other hand
BER2 = ' num2str(ber2(i))]) the same board can be used to receive the
Here BER = Bit Error Rate signals. The LEDs of second board or seven
The plotted graph may look like this, segment display will act as a output device.
-1
Performance of multiuser CDMA This can be achieved by synchronizing these
10
data1 two boards.

-2
10
REFERENCES
[1] David Tse and Pramod Viswanath, Fundamental of
BER

-3
10 wireless communication, Cambridge university press,
2005.
-4
[2] G. Giunta, Basic note on Spread Spectrum CDMA
10
signals, reviewed for the Academic course of Digital
Signal Processing of the Third University of Rome, May
-5
10 2000.
0 2 4 6 8 10 12 14
EbNo (dB) [3] Qualcomm CDMA University, Engineering
Figure 3: Result of BER versus Eb\No for single user Introduction to CDMA.
[4] Gang Xu, Implementation Issues of Multi-user
Detection in CDMA Communication Systems, and the
department of Master of Science Electrical and

2011 JOT
http://sites.google.com/site/journaloftelecommunications/
JOURNAL OF TELECOMMUNICATIONS, VOLUME 7, ISSUE 2, MARCH 2011
45

Computer Engineering, Rice University, Houston, Texas,


May 1999.
[5] Zartash Afzal Uzmi, Simplified Multiuser Detection for
Cdma Systems, the Department of Electrical
Engineering and the Committee on Graduate Studies of
Stanford University, July 2002.
[6] Robert Chao, Yung Lu, Multi-user Detection in CDMA
MIMO Systems with Timing Mismatch, Department of
Electrical and Computer Engineering in Queens
University Kingston, Ontario, Canada January 2004.
[7] K. S. Gilhousen, I. M. Jacobs, R. Padovani, A. J. Viterbi, L.
A. Weaver, Jr, and C. E. Wheatley III, On the capacity of
a cellular CDMA system, IEEE Trans. Vehicular Tech.,
vol. 40, no. 2, pp. 303-311, May 1991.

A. A. Patel (Amisha A. Patel) M.E. Communication


Engineering. The work presented here is the study of
some topics from her dissertation thesis.

A. D. Patel (Ashish D. Patel) M.E. Computer


Engineering. He is associated with SVMIT engineering
college for more than five years. He has publish about 5
papers in different areas of computer and
communication in various international / national
journals and conferences.

2011 JOT
http://sites.google.com/site/journaloftelecommunications/

S-ar putea să vă placă și