§7.2Wireless Links and Network Characteristics · CDMA

Physical layer Kurose & Ross pp. 536–542 · ~14 min read

  • path loss
  • multipath propagation
  • hidden terminal problem

Where you are

  • Application layer
  • Transport layer
  • Network layer
  • Link layer
  • Physical layer you are here

A radio link loses strength with distance, competes with everything else in its band, and hears itself echo. So its error rate is neither small nor steady, and two senders may be unable to hear each other while still ruining each other’s transmissions.

Words you will meet

  • Path loss — signal strength falling with distance and through matter.

  • Multipath propagation — the same signal arriving several times, by paths of different lengths.

  • SNR (signal-to-noise ratio) — how far the signal stands above the noise, in decibels.

  • BER (bit error rate) — the probability a transmitted bit arrives wrong.

  • Hidden terminal problem — two senders that reach the receiver but not each other.

  • CDMA (Code Division Multiple Access) — sharing a channel by giving each sender a code rather than a slot or a band.

Why this matters

Chapter 6 built its whole multiple-access framework on an assumption it never had to state: on a broadcast link, every node hears every other node. That is what makes carrier sensing possible.

This section demolishes it. Two stations can interfere at a receiver while being completely unable to detect one another — and no amount of listening fixes that.

It also collects the debt from section 6.3.1, which named CDMA as the third channel-partitioning protocol and deferred it to here.

Three ways a radio link is not a wire
Signal strength falls with distancestep 1 of 4
path loss — the same transmission, weaker at every step

Electromagnetic radiation attenuates as it passes through matter — a wall, for instance. Even in free space it disperses, so strength drops as sender and receiver move apart. This is path loss, and it means link quality is a function of where you are standing.

Three impairments and one consequence. The consequence is the reason the next section’s protocol looks nothing like Ethernet’s.

Read all steps as text
  1. Signal strength falls with distanceElectromagnetic radiation attenuates as it passes through matter — a wall, for instance. Even in free space it disperses, so strength drops as sender and receiver move apart. This is path loss, and it means link quality is a function of where you are standing.
  2. Other sources interfereAnything transmitting in the same frequency band competes. A 2.4 GHz cordless phone and an 802.11b LAN share a band, so neither works well while the other is busy. Motors and microwaves add electromagnetic noise too — which is why several later 802.11 standards moved to 5 GHz.
  3. Multipath propagationPortions of the wave reflect off objects and the ground, taking paths of different lengths. Several copies of the same signal arrive at slightly different times and blur it. Moving objects between sender and receiver make the blurring change over time.
  4. So bit errors are common, and they varyAll three together mean a wireless link’s error rate is neither small nor constant. That is why 802.11 uses powerful CRC codes AND a link-level reliable-data-transfer protocol that retransmits corrupted frames — something Ethernet, in section 6.4.2, deliberately does not do.

The consequence is the one to carry forward. Bit errors are more common and less predictable than on a wire, so 802.11 uses powerful CRC (Cyclic Redundancy Check) codes and a link-level reliable-data-transfer protocol that retransmits corrupted frames.

Compare 6.4.2, where Ethernet detects an error and simply discards the frame. On a wire that is a reasonable bargain. On radio it is not.

Signal quality decides everything

The receiver gets a degraded copy of the signal plus background noise. The signal-to-noise ratio measures one against the other, in decibels.

In plain words

A decibel is a ratio on a logarithmic scale, not an amount of power. The book defines SNR as 20 times the base-10 logarithm of the received signal’s amplitude divided by the noise’s.

For everything on this page you need only one fact: a larger SNR makes it easier for the receiver to pull the signal out of the noise.

The book adds, drily, that decibels are a unit “some think is used by electrical engineers primarily to confuse computer scientists”.

Figure 7.3 — bit error rate against signal-to-noise ratio
1e-70.0000010.0000099999999999999990.000099999999999999990.0010.010.10.0008.016.024.032.040.0SNR (dB)bit error rateat 10 dBat 20 dB

At 40.0 dB (move the pointer over the plot to read it anywhere):

  • BPSK — 1 Mbps:1e-9 (12.0)
  • QAM16 — 4 Mbps:2e-9 (22.0)
  • QAM256 — 8 Mbps:1e-7 (35.0)

The book’s Figure 7.3 is itself adapted from Holland 2001 and describes an idealized channel. The curves here are drawn to reproduce the two readings the book states in its own text — at 10 dB and at 20 dB — and their exact shape between those points is schematic. The theory of modulation and coding is explicitly beyond the book’s scope, and so it is beyond this page’s.

Three modulation schemes. Read across at a fixed SNR to compare them, and down a curve to see what more power buys. The y-axis is logarithmic, because the values span seven orders of magnitude.

Three things follow, and the third is the one that shapes real systems.

More power means fewer errors. For a given scheme, a higher SNR gives a lower BER, and a sender can raise the SNR by transmitting harder. But there is little practical gain past a point: going from 10⁻¹² to 10⁻¹³ buys nothing real. And there are two costs — battery, and more interference with other senders.

A faster scheme is a more fragile one. At the same SNR, a modulation technique carrying more bits per second has a higher error rate.

The book’s two readings, side by side
SNRModulationRateBit error rateUsable?

Cells marked ⓘ have an explanation — click to read it.

The same two schemes, at two signal qualities. This is the whole argument for adapting the modulation to conditions rather than picking one.

So pick the scheme to suit the conditions. SNR changes as a device moves or its surroundings change, so the modulation should change too. Adaptive modulation and coding is used in 802.11 and in 4G and 5G — choosing the highest rate whose error rate is still tolerable, and re-choosing as things move.

The hidden terminal problem

Figure 7.4 — two ways collisions become undetectable
(a) An obstacle hides A and C from each otherstep 1 of 3
ABCobstacleboth reach B · neither reaches the other

A is transmitting to B, and so is C. A physical obstruction — a mountain, a building — stops A and C hearing each other. Neither one’s carrier sensing detects the other, and yet their transmissions collide at B.

Two scenarios, one consequence. Both put collisions at the receiver that neither sender can possibly detect.

Read all steps as text
  1. (a) An obstacle hides A and C from each otherA is transmitting to B, and so is C. A physical obstruction — a mountain, a building — stops A and C hearing each other. Neither one’s carrier sensing detects the other, and yet their transmissions collide at B.
  2. (b) Or the signals simply fadeNo obstacle needed. A and C are placed so their signals are too weak to detect each other, yet still strong enough to interfere at B. Fading alone produces the same undetectable collision.
  3. Which breaks the assumption chapter 6 rested onOn a wired broadcast link, every node receives every other node’s transmission. That is what made carrier sensing work. Here it is simply false — and the next section has to build a multiple access protocol without it.

This is what breaks chapter 6

Carrier sensing works because listening tells you whether transmitting now would collide. Both scenarios above make that false.

In (a) an obstacle stops A and C hearing each other. In (b) nothing blocks them at all. Their signals have simply faded below detection by the time they reach each other, while still being strong enough to collide at B.

Either way, a station listens, hears silence, transmits, and destroys somebody else’s frame. Section 7.3.2 has to build a multiple access protocol knowing this.

CDMA: everyone at once, separated by code

Section 6.3.1 named three channel-partitioning protocols and covered two. TDM (Time-Division Multiplexing) gives each node a time slot; FDM (Frequency-Division Multiplexing) gives each a frequency band. CDMA gives each node a code, and then lets them all transmit at the same time over the whole channel.

Each data bit is multiplied by a code that changes much faster than the data — at the chipping rate. One bit slot is divided into M mini-slots, and the code is M values, each +1 or −1. A data bit of 0 is written as −1, which the book calls a mathematical convenience and which turns out to be the whole trick.

Zi,m=dicmdi=1Mm=1MZi,mcmZ_{i,m} = d_i \cdot c_m \qquad\qquad d_i = \frac{1}{M}\sum_{m=1}^{M} Z_{i,m} \cdot c_m

Encoding and decoding are the same multiplication. Multiply by ±1 twice and you are back where you started.

CDMA — two senders, one band, at the same time

Click any data bit to flip it. Each bit becomes 4 chips; the two senders transmit at the same time, in the same band, and the channel carries their sum.

Sender 1code (+1, −1, +1, −1)
+1
-1
+1
-1
-1
+1
-1
+1
+1
-1
+1
-1
Sender 2code (+1, +1, −1, −1)
-1
-1
+1
+1
+1
+1
-1
-1
-1
-1
+1
+1

What is actually on the channel — the sum, and nobody’s signal

0
-2
+2
0
0
+2
-2
0
0
-2
+2
0
ReceiverSentRecovered from the sum
Sender 1+1 −1 +1+1 -1 +1
Sender 2−1 +1 −1-1 +1 -1

Both senders recovered exactly what they sent, from a channel carrying neither of their signals. The codes are orthogonal, which is what makes it work.

Both senders transmit simultaneously across the whole channel. Click any data bit and watch its chips invert, then look at the grey row: that is what is actually on the air, and it is neither sender’s signal. Both receivers pull their own bits back out of it.

Codes here are a Walsh set of length 4, so they are guaranteed orthogonal. The book’s Figure 7.5 uses one 8-chip code for a single sender; this shows the multi-sender case the book states but does not draw. The chip values are the book’s own arithmetic, verified against Figure 7.5 in tools/check-cdma-ch07.mjs.

In plain words

Look at the grey row. That is what is on the air, and it is neither sender’s signal — a run of 2s, 0s and −2s with no visible structure.

Both receivers recover their own bits from exactly that row. Nothing filtered anything out; the interfering signals simply add, and multiplying the sum by your own code makes everyone else’s contribution cancel.

The book’s example: three senders transmit 1 and a fourth transmits −1 in the same mini-slot, so everybody receives 2.

”If the senders’ codes are chosen carefully”

The book uses that phrase and then moves on. It is doing a great deal of work.

Carefully means orthogonal: multiply any two different codes together, element by element, add up the result, and get zero. That is exactly what makes the other senders vanish when a receiver applies its own code.

Choose codes that are not orthogonal and the arithmetic still runs — it just returns the wrong bits. tools/check-cdma-ch07.mjs asserts both halves: that orthogonal codes recover perfectly through interference, and that non-orthogonal ones demonstrably fail. The condition is load-bearing, not decoration.

Everyday picture

A room where everyone speaks at once, each in a different language. The air carries one meaningless noise. But a listener who knows only Portuguese somehow hears only the Portuguese speaker.

Where the picture stops. Languages are not orthogonal — a listener really does get distracted by other conversations, and similar languages interfere. CDMA’s codes are chosen so the cancellation is exact, which is a stronger property than any human language has.

Check yourself

Check yourself

0 of 7 answered
  1. 1.Why does 802.11 retransmit corrupted frames when Ethernet does not?

  2. 2.predictAt an SNR of 10 dB, QAM16 gives 4 Mbps at a bit error rate of 10⁻¹. Is that a good trade?

  3. 3.A sender can lower its error rate by transmitting with more power. What are the costs?

  4. 4.In Figure 7.4(b) there is no obstacle at all, yet A and C still cannot detect each other. Why not?

  5. 5.predictThree senders transmit +1 and a fourth transmits −1 in the same CDMA mini-slot. What do the receivers see?

  6. 6.The book says CDMA works "if the senders' codes are chosen carefully". What does carefully mean?

  7. 7.Why is a data bit of 0 written as −1 in CDMA?

What to remember

  • Three impairments: path loss, interference, multipath propagation. Together they make the error rate high and variable, which is why 802.11 uses CRC codes and retransmits where Ethernet only detects and discards.
  • Higher SNR, lower BER, and a faster modulation is more fragile. At 10 dB, QAM16’s 4 Mbps is unusable; at 20 dB it beats BPSK outright. Hence adaptive modulation, re-choosing as conditions change.
  • The hidden terminal problem: two senders reach the receiver but not each other, through an obstacle or through fading alone. That breaks the assumption carrier sensing rests on, and section 7.3 must work without it.