Home /Examples/lib/examples/cdma/LEARNING-NOTES.md

LEARNING-NOTES.md

lib/examples/cdma/LEARNING-NOTES.md · 59 line(s) · markdown

CDMA examples — what to learn here

These examples teach the arithmetic of a radio link, ending with the ideas that are special to CDMA (Code Division Multiple Access): spreading/processing gain and cell capacity. Everything is a numerical illustration — no modem or radio is accessed — so the programs are deterministic and run anywhere.

Read them in order; each adds one idea.

The three cases

LevelFileThe one new idea
BasicBASIC-link-budget.sleelaThe one-line budget: received power = transmit power − path loss (in dB).
ModerateMODERATE-link-margin.sleelaA full budget with antenna gains, cable losses, EIRP, and a margin check that decides if the link closes.
AdvancedADVANCED-processing-gain-capacity.sleelaWhat makes CDMA CDMA: spreading/processing gain and an ideal pole-capacity estimate.

The original CLASSIC-link-budget.sleela is the shortest starter.

What we want you to take away

  1. Radio engineering is addition and subtraction in decibels. Because dB is a logarithmic unit, multiplying powers becomes adding dB values. The whole link budget is a running sum of gains (positive) and losses (negative).
  2. A link "closes" when the margin is non-negative. The moderate example computes received signal minus receiver sensitivity. A positive margin means headroom; a negative margin means you must add power or antenna gain.
  3. CDMA trades bandwidth for sharing. The advanced example shows the defining move: spread a 9.6 kbps voice signal across a 1.2288 Mcps chip stream. The ratio (128, i.e. ~21 dB of processing gain) is what lets many coded users share one frequency, and it directly bounds how many users a cell can hold.

Practical notes for SLeeLa 1.7

Run them

sleela check lib/examples/cdma/MODERATE-link-margin.sleela
sleela run   lib/examples/cdma/MODERATE-link-margin.sleela

Output is deterministic: the basic budget yields −85 dBm, the moderate budget a +25 dB margin ("link closes"), and the advanced example a processing gain of 21.07 dB with an ideal pole capacity near 25.6 users per cell.