Skip to main content

CDMA encoding and decoding

Short answer

At the transmitter, each data bit (±1) is multiplied by a unique spreading code of N chips, spreading the signal, then modulates the carrier. The receiver correlates the received composite signal with the same code over a bit period, dividing by N to recover the original bit. Orthogonal codes (e.g., Walsh) cancel other users; example: two users with 4-chip codes recover correctly.

Explain the implementation of CDMA with its encoding part and decoding part with relevant example.

CDMA (Code Division Multiple Access) lets all users transmit at the same time on the same frequency band. Each user is given a unique spreading code (PN or Walsh code) that is (nearly) orthogonal to other users' codes. The receiver separates users by correlating with the wanted user's code.

Encoding (transmitter)

 data b(t)--(×)--(×)--> to channel  (sum of all users)
  ±1         ^     ^
       code c(t)   carrier cos(ωc t)
       chip rate Rc >> bit rate Rb
  1. Each data bit is represented as +1 (for 1) or −1 (for 0).
  2. Each bit is multiplied by the user's code of N chips, so one bit becomes N chips. Bandwidth spreads by the processing gain G = Rc/Rb = N.
  3. The spread signal modulates the carrier (BPSK/QPSK) and is transmitted. In the air, all users' signals add up.

Decoding (receiver)

 r(t)--(×)--(×)--[∫ over Tb, Σ/N]--[decision]--> data
         ^     ^
   cos(ωc t)   c_k(t) (same code, synchronised)
  1. The received composite signal is down-converted.
  2. It is multiplied chip by chip with the wanted user's code and summed over the bit (correlation), then divided by N.
  3. Because cᵢ·cᵢ = N and cᵢ·cⱼ = 0 for orthogonal codes, the wanted bit appears as ±1 and the others cancel.
  4. A decision device gives 1 if the result > 0 and 0 if < 0.

Example

Two users with 4-chip Walsh codes:

  • User A code c_A = (+1, −1, +1, −1); A sends bit 1 → +1
  • User B code c_B = (+1, +1, −1, −1); B sends bit 0 → −1
 A signal = +1 × c_A = (+1, -1, +1, -1)
 B signal = -1 × c_B = (-1, -1, +1, +1)
 Channel sum r       = ( 0, -2, +2,  0)

 Decode A: r·c_A = 0(+1)+(-2)(-1)+2(+1)+0(-1) = 4
           4/4 = +1  -> bit 1
 Decode B: r·c_B = 0(+1)+(-2)(+1)+2(-1)+0(-1) = -4
           -4/4 = -1 -> bit 0

Both users' bits are recovered correctly from the same channel. Check of orthogonality: c_A·c_B = 1 − 1 − 1 + 1 = 0.

In practice (IS-95), Walsh codes separate users in the forward link, long PN codes separate users in the reverse link, and power control keeps all signals at equal strength to avoid the near–far problem.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Wireless Communication chapter 7 questions →