# RF Wireless World

## Home of RF and Wireless Vendors and Resources

One Stop For Your RF and Wireless Need

## CDMA Tutorial

### Introduction:

This CDMA tutorial describes CDMA basics by explaining PN Sequence codes, Walsh codes,CDMA Physical layer for Base Station and Mobile Subscriber. CDMA is the short form of Code Division Multiple Access. It is the technique by which same frequency and time interval is used by Mobile subscribers/ Base Stations by way of unique digital codes. There are two main types of codes used in CDMA, PN sequence codes and walsh codes.

In CDMA Base Station (BTS) to Mobile Subscriber Stations path is called forward link and Mobile subscriber stations to BTS path is called reverse link.

### PN Sequence codes

PN sequence codes are used in reverse link. These codes differentiates various mobile subscribers at base station as they are unique to all mobile subscribers. There are access and traffic channels used from mobile to Base station in CDMA. PN sequence is a sequence of binary numbers which appears to be random but it is periodic in nature. For example, 3 bit PN sequence is generated with the LFSR(Linear Feedback Shift Register) shown below.

Say initial output bit pattern is '001' . The same pattern repeats after 2^3-1 or 7 patterns. There are two types of PN sequences used in CDMA, 15 bit pattern and 42 bit pattern.

PN sequence properties: 1. Difference of number of 0's and 1's always be equal to 1 in any PN sequence.
2. Correlation value of any two PN codes is determined by following equation.
(No. of like bits- No. of unlike bits) / (Total no. of bits)
Consider PN sequence of pattern 1110010, If both the patterns are same without any delay then correlation value is 7-0/7, leads to 1 i.e. maximum value.
For a bit change in this PN codes leads to bit pattern equal to 0111001 and it will give correlation value of 3-4/7 i.e. -1/7. Hence it is easy to get back the data of the Mobile/Base station if the PN code is known.
3. For N bit code, there will be N ones or zero runs. 1/2 of run will be of length 1, 1/4 of run will be of length 2, 1/8 of run will be of length 3 and so on.

### Walsh codes

Walsh code is called Hadamard Transform. Few of the codes are mentioned below. Walsh codes are orthogonal to each other, Walsh codes differentiates each channel on forward link from Base station to Mobile Subscribers. They are unique for all the channels. There are pilot, sync, paging and traffic channels on this forward link path. W0 is used for pilot channel, W32 is used for sync channel, W1 to W7 are used for paging channel and rest of the 64 Walsh codes are used for traffic channels in IS 95 version of CDMA. There are 256 Walsh codes in CDMA-2000 version. Following figure is of CDMA Physical layer for Mobile Subscriber. Walsh code of length n will have n rows of n x n matrix.

For Example W2= [0 0
0 1]

W4=[0 0 0 0
0 1 0 1
0 0 1 1
0 1 1 0]

Walsh Codes properties 1. Cross correlation between two different Walsh codes is not zero; hence it cannot be used if good synchronization is not available. Instead PN sequence is used.
2. Walsh codes are orthogonal to each other as mentioned above.

### CDMA Physical layer for Mobile Subscriber

Figure depicts all the modules used in CDMA Physical layer, as shown green modules are not used in access channel path, while the same are used in traffic channel path.

### CDMA Physical layer for Base station

Figure depicts CDMA Physical layer used in CDMA Base station, as shown various channels follow different physical layer architecture.