CDMA Tutorial: Basics, Walsh & PN Sequence Codes, PHY Layer

cdma
wireless communication
pn sequence
walsh code
phy layer

Code Division Multiple Access (CDMA) is a widely used digital communication technology that allows multiple users to share the same frequency band simultaneously by assigning unique codes to each user. Unlike other multiple access techniques like Time Division Multiple Access (TDMA) and Frequency Division Multiple Access (FDMA), CDMA spreads the signal across a wide frequency spectrum. This makes it more resistant to interference and provides better spectral efficiency. CDMA is commonly used in mobile networks and satellite communication, offering advantages in terms of capacity, security, and signal quality.

This tutorial covers CDMA basics, including PN sequence codes, Walsh codes, and the CDMA Physical layer for both the Base Station and Mobile Subscriber.

Technical Specifications of CDMA Cellular Systems

Both base stations (BSs) and mobile subscribers (MSs) work together using CDMA technology. This ensures that multiple users can share the same frequency band with minimal interference while providing high-quality, secure communication.

The base station in a CDMA cellular system is responsible for managing communications between mobile subscribers and the core network. It performs various functions, including signal transmission, reception, and power control. Mobile subscribers communicate with the base station using specific hardware and protocols that allow for mobile connectivity while maintaining call quality and data services.

Following are the specifications of BS and MS:

  1. Frequency Band:

    • Uplink: 824–849 MHz (USA), 890–915 MHz (Europe)
    • Downlink: 869–894 MHz (USA), 935–960 MHz (Europe)
  2. Channel Bandwidth:

    • 1.25 MHz (Standard for CDMA2000) or 5 MHz (for WCDMA in 3G systems)
  3. Transmit Power:

    • For Base Station: Between 20W to 50W depending on the cell size and location (urban/rural areas)
    • For Mobile Subscriber: Between 200 mW to 1W for mobile handsets (Power control adjusts according to proximity to the base station)
  4. Antenna Configuration:

    • Multiple sector antennas for spatial diversity (e.g., 3-sector, 6-sector configurations)
    • Support for MIMO (Multiple Input, Multiple Output) antennas in newer systems
  5. Modulation Techniques:

    • QPSK (Quadrature Phase Shift Keying), BPSK (Binary Phase Shift Keying)
  6. Spread Spectrum Technique:

    • Direct Sequence Spread Spectrum (DSSS) with unique pseudo-random codes for each user
    • Spreading factor for Mobile Subscriber: 128 chips per symbol in CDMA2000, 256 chips per symbol for higher data rates in 3G systems
  7. Power Control:

    • Fast closed-loop power control to mitigate interference and optimize signal quality
  8. Handoff Support:

    • Soft handoff (simultaneous connection to multiple base stations)
    • Hard handoff (switching from one base station to another without overlap)
  9. Channel Access Method:

    • Code Division Multiple Access (CDMA), using unique spreading codes for each user to avoid interference
  10. Voice/Data Capacity:

    • Up to 55 simultaneous voice users per sector (CDMA2000)
    • Data rates up to 2 Mbps (EV-DO and CDMA2000 1xEV-DO for higher-speed data services)
  11. Security Features:

    • Authentication algorithms
    • Encryption (A5/3 encryption for securing data transmission)

cdma tutorial fig1

In CDMA, the path from the Base Station (BTS) to the Mobile Subscriber Station is called the forward link, and the path from the Mobile Subscriber Station to the BTS is called the reverse link.

PN Sequence Codes and Walsh Codes

There are two main types of codes used in CDMA: PN sequence codes and Walsh codes.

PN Sequence Codes

PN sequence codes are used in the reverse link. These codes differentiate various mobile subscribers at the base station as they are unique to each mobile subscriber. There are access and traffic channels used from the mobile to the Base station in CDMA.

A PN sequence is a sequence of binary numbers which appears to be random but is periodic in nature. For example, a 3-bit PN sequence can be generated with the LFSR (Linear Feedback Shift Register) shown below.

cdma tutorial fig2

Say the initial output bit pattern is ‘001’. The same pattern repeats after 2312^3 - 1 or 7 patterns.

There are two types of PN sequences used in CDMA: a 15-bit pattern and a 42-bit pattern.

PN Sequence Properties:

  1. The difference between the number of 0s and 1s is always equal to 1 in any PN sequence.

  2. The correlation value of any two PN codes is determined by the following equation:

    (No. of like bits - No. of unlike bits)(Total no. of bits)\frac{\text{(No. of like bits - No. of unlike bits)}}{\text{(Total no. of bits)}}

    Consider a PN sequence with the pattern 1110010. If both patterns are the same without any delay, then the correlation value is 707=1\frac{7-0}{7} = 1, which is the maximum value. For a bit change in these PN codes leading to a bit pattern equal to 0111001, it will give a correlation value of 347=17\frac{3-4}{7} = -\frac{1}{7}. Hence, it is easy to get back the data of the Mobile/Base station if the PN code is known.

  3. For an N bit code, there will be N ones or zero runs. 12\frac{1}{2} of the run will be of length 1, 14\frac{1}{4} of the run will be of length 2, 18\frac{1}{8} of the run will be of length 3, and so on.

Walsh Codes

Walsh codes are also known as Hadamard Transforms. A few of the codes are mentioned below.

Walsh codes are orthogonal to each other. They differentiate each channel on the forward link from the 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 the pilot channel, W32 is used for the sync channel, W1 to W7 are used for the paging channel, and the rest of the 64 Walsh codes are used for the traffic channels in the IS-95 version of CDMA. There are 256 Walsh codes in the CDMA-2000 version.

A Walsh code of length nn will have nn rows of an n×nn \times n matrix. For Example:

W2=[0001]W_2 = \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} W4=[0000010100110110]W_4 = \begin{bmatrix} 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 \\ 0 & 1 & 1 & 0 \end{bmatrix}

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, a PN sequence is used.
  2. Walsh codes are orthogonal to each other, as mentioned above.

CDMA Physical Layer for Mobile Subscriber

The following figure depicts all the modules used in the CDMA Physical layer for a Mobile Subscriber. As shown, the green modules are not used in the access channel path, while they are used in the traffic channel path.

CDMA Physical layer Mobile subscriber

cdma tutorial fig3

CDMA Physical Layer for Base Station

The figure below depicts the CDMA Physical layer used in a CDMA Base station. As shown, various channels follow different physical layer architectures.

CDMA Physical layer Base Station

cdma tutorial fig3

Conclusion

CDMA stands as a robust and efficient communication technology that has significantly influenced wireless communications. Its ability to accommodate multiple users within the same frequency band, coupled with its resistance to interference, has made it a foundational technology for cellular systems and satellite networks.

By understanding the basics of CDMA, including its spread spectrum techniques, advantages, and applications, one can appreciate its role in enabling high-quality, secure communication. As mobile networks continue to evolve, CDMA remains a crucial concept in both historical and future advancements in wireless technologies.

This CDMA tutorial is very useful for beginners who would like to explore the concept of Walsh codes and PN sequence codes in the CDMA physical layer of base stations and mobile subscribers (i.e., mobile phones).

CDMA MATLAB Code for Simulation

CDMA MATLAB Code for Simulation

Explore CDMA (Code Division Multiple Access) with this MATLAB source code. Simulate CDMA transmission and reception, including BER analysis over AWGN.

cdma
matlab
simulation
Multicarrier CDMA: A Comprehensive Introduction

Multicarrier CDMA: A Comprehensive Introduction

Explore Multicarrier CDMA, combining CDMA and OFDM for high data rates and spectrum efficiency in mobile communication systems. Learn about its principles and applications.

cdma
ofdm
wireless communication
CDMA: Advantages and Disadvantages

CDMA: Advantages and Disadvantages

Explore the benefits and drawbacks of CDMA technology, including its robustness, security, capacity, and limitations like orthogonality and the near-far problem.

cdma
cellular technology
wireless communication