跳到主要内容

通信系统

大学电气工程知识点 11

本主题的视频课程 打开视频页面
7:13

通信系统

通信是在约束条件下进行的工程实践:频谱必须共享,噪声无法消除,功率也不能浪费。本课程从模拟调制出发,经过噪声和数字通信链路,讲到信息与编码的极限。贯穿始终的习惯是把每个分贝数值重新换算为比值,并核对每一笔功率收支。

英文讲解 · 可切换中英文字幕

11.1

本课程介绍及使用方法

English

This is the eleventh course in University Electrical Engineering: communication systems 通信系统. Course 6 built the tools for signals. This course sends signals across real channels: modulated onto carriers, turned into bits, and protected by codes.

  • Units 11.1–11.3 are analogue: spectra, AM and FM.
  • Units 11.4–11.6 are the digital chain: noise and SNR, PCM, and digital modulation.
  • Unit 11.7 sets the limits: entropy, channel capacity and coding.

One example runs through the whole course: a radio link with a microphone, a transmitter, a noisy channel, a receiver, and a data modem that shares the same wire. Each unit takes one block of that link a step further. Every number is checked the way a communications engineer checks it: every dB value is recomputed as a ratio, every power budget must add up (carrier + sidebands = total), and every bandwidth is tested against the channel it must fit.

词汇 训练
English 中文 拼音
communication systems/kəˌmjuːnɪˈkeɪʃn ˈsɪstəmz/ 通信系统 tōng xìn xì tǒng
11.1

信号、频谱与带宽

English

Why it matters. A radio regulator licenses spectrum in blocks of kilohertz. Whether a signal fits its licence depends on its spectrum, and the spectrum depends on the shape of the waveform.

A bundle of fibre-optic strands fanning out against a dark background, each thin glass strand glowing with a point of blue-white light at its tip
Optical fibre: its enormous bandwidth is why long-distance links carry data as light

The idea, with a picture. A real signal occupies a range of frequencies. A square wave is made of odd harmonics with amplitudes $\dfrac{4}{\pi} \cdot \dfrac{1}{k}$: the 3rd harmonic has 1/3 of the fundamental's amplitude, the 5th has 1/5, and so on. So the bandwidth 带宽 you give it is a design choice: how many of these harmonics you keep. For modulated signals the sideband 边带 structure decides the bandwidth. Mixing with a carrier shifts the spectrum but does not change its shape, so a baseband signal of width $W$ on a carrier occupies $2W$ of radio spectrum.

Left: the odd harmonics of a 1 kHz square wave, amplitudes 1.273, 0.424, 0.255, 0.182 and 0.141; a 5 kHz low-pass edge keeps the 1st and 3rd, about 90% of the power. Right: a message from 0 to 4 kHz, and the same message on a 100 kHz carrier occupying 96 to 104 kHz, 2W = 8 kHz
Left: the harmonics you keep set the bandwidth you need. Right: modulation doubles the width

The derivation. The Fourier series of a square wave with frequency $f_{0}$ and $\omega_{0} = 2\pi f_{0}$ is

$$\frac{4}{\pi}\sum_{k\ \mathrm{odd}} \frac{1}{k}\sin(k\omega_{0}t).$$

A low-pass filter with cutoff $B$ keeps the harmonics with $kf_{0}$ below $B$. Parseval's theorem gives the fraction of the power kept: each harmonic's power is proportional to its amplitude squared. So the fundamental alone carries $1.273^{2}/(1.273^{2} + 0.424^{2} + 0.255^{2} + \ldots) \approx 81\%$ of the power.

Worked example 1 (a 1 kHz square wave through a 5 kHz low-pass).

  1. The filter passes the 1st harmonic (amplitude $4/\pi = 1.273$) and the 3rd ($1.273/3 = 0.424$).
  2. The 5th harmonic (0.255) is at the filter edge and is strongly reduced; count it, and everything above it, as blocked.
  3. The power kept is $(1.273^{2} + 0.424^{2})/(1.273^{2} + 0.424^{2} + 0.255^{2} + \ldots) \approx 90\%$.
  4. You can hear that the corners are rounded, but most of the power is still there. This is why the 300–3400 Hz telephone channel can carry speech that is easy to understand.

Worked example 2 (the radio licence). A 4 kHz music signal is mixed onto a 100 kHz carrier.

  1. The spectrum becomes the carrier plus two mirror-image sidebands, from 96 kHz to 104 kHz: $2W = 8$ kHz of bandwidth.
  2. If the licence allows 8 kHz, amplitude modulation fills it exactly.
  3. If it allows only 4 kHz, you must send one sideband only: single sideband (SSB), which unit 11.2 discusses.
  4. Check: no filter can make the bandwidth smaller than $W$ without removing part of the message. The $2W$ rule comes from the spectrum itself, not from the circuits.

Common mistakes.

  • Giving a "bandwidth" without saying which one: the −3 dB width, the width with 98% of the power, or the width to the first null.
  • Believing that a filter can make a modulated signal narrower than its message bandwidth.
  • Forgetting that a square wave's harmonics fall as $1/k$ in amplitude but as $1/k^{2}$ in power. The higher harmonics carry less power than their amplitudes suggest.

Summary. The spectrum comes from the shape of the waveform. How much of the harmonic tail a low-pass keeps is a design choice, measured as a fraction of the power. Modulation shifts the spectrum and doubles its width: $2W$ is the bandwidth every licence is written for.

词汇 训练
English 中文 拼音
bandwidth/ˈbændwɪdθ/ 带宽 dài kuān
sideband/ˈsaɪdbænd/ 边带 biān dài
11.2

幅度调制

English

Why it matters. AM is the simplest carrier system. Its power budget shows why broadcast engineers moved to other methods, and why the simple envelope detector is still in every AM radio.

A valve radio's tuning dial: each AM station has its own carrier frequency, and the dial selects one band
A valve radio's tuning dial: each AM station has its own carrier frequency, and the dial selects one band

The idea, with a picture. In amplitude modulation 幅度调制 the envelope of the carrier carries the message $x(t)$: $s(t) = A[1 + m \cdot x(t)]\cos(\omega_{c}t)$, where $\omega_{c}$ is the carrier's angular frequency and the modulation index 调制指数 is $m \le 1$. For a unit-amplitude sinusoidal message at $f_m$, the spectrum is the carrier plus two sidebands at $f_{c} \pm f_{m}$. With carrier power $P_{c}$, the power budget is exact: the sidebands carry $(m^{2}/2)P_{c}$, and the total is $P_{c}(1 + m^{2}/2)$.

Left: an AM waveform at m = 0.5 whose envelope follows the message. Right: its spectrum, the carrier at 100 kHz with sidebands at 95 and 105 kHz of relative amplitude 0.25; the power budget is 100 W + 12.5 W = 112.5 W
The envelope is the message; the carrier line carries most of the power

The derivation. Take a single-tone message $x = \cos(\omega_{m}t)$. Writing the product of two cosines as a sum gives

$$s(t) = A\cos(\omega_{c}t) + \frac{mA}{2}\cos((\omega_{c}+\omega_{m})t) + \frac{mA}{2}\cos((\omega_{c}-\omega_{m})t).$$

Each sideband has amplitude $mA/2$, so its power is $(m/2)^{2}$ times the carrier's, and the two together carry $\dfrac{m^{2}}{2}P_{c}$.

Worked example 1 (the budget at m = 0.5). The carrier power is 100 W.

  1. The sidebands carry $\dfrac{0.25}{2} \times 100 = 12.5$ W in total.
  2. The transmitter sends $100 + 12.5 = 112.5$ W, so the efficiency is $12.5/112.5 = 11.1\%$ ✓.
  3. At $m = 1$, the largest index without distortion, the sidebands carry 50 W of a 150 W total: 33.3%.
  4. So at least two thirds of the transmitter power goes into the carrier, which carries no information. Both budgets agree with $P_{c}(1 + m^{2}/2)$.

Worked example 2 (designing the detector). The envelope detector 包络检波器 is a diode with an RC circuit. Its time constant $\tau$ must be long enough to bridge the gaps between carrier peaks, but short enough to follow the fastest falls of the envelope: $1/\omega_{c} \ll \tau \ll 1/\omega_{m}$.

  1. For $f_{c} = 100$ kHz and $f_{m} = 5$ kHz, $\tau$ must lie between $1.6\ \mu$s and $31.8\ \mu$s. $\tau = 10\ \mu$s is well inside both limits ✓.
  2. As $m$ approaches 1, the upper limit becomes smaller: $\dfrac{\sqrt{1-m^{2}}}{m\,\omega_{m}}$.
  3. At $m = 0.9$ it is $\dfrac{\sqrt{0.19}}{0.9} \times \dfrac{1}{2\pi \times 5\,\text{kHz}} = 15.4\ \mu$s, less than half the room there was before.
  4. This is why deep modulation is the first thing to cause distortion in the detector.

Common mistakes.

  • Setting $m > 1$. The envelope folds over, the phase reverses, and the detector output is wrong.
  • Calculating efficiency against the total power in one place and against the carrier power in another. Always state what you divide by.
  • Choosing $\tau$ from the carrier alone. The carrier sets only the lower limit; the highest message frequency and the depth $m$ set the upper one.

Summary. In AM the envelope is the message. The sidebands carry $m^{2}/2 \times P_{c}$, so the efficiency is at most 33%. The detector's time constant must lie between $1/\omega_{c}$ and $\sqrt{1-m^{2}}/(m\,\omega_{m})$.

词汇 训练
English 中文 拼音
amplitude modulation/ˈæmplɪtjuːd ˌmɒdjʊˈleɪʃn/ 幅度调制 fú dù tiáo zhì
modulation index/ˌmɒdjʊˈleɪʃn ˈɪndeks/ 调制指数 tiáo zhì zhǐ shù
envelope detector/ˈenvələʊp dɪˈtektə/ 包络检波器 bāo luò jiǎn bō qì
11.3

角度调制(调频/调相)

English

Why it matters. FM radio stays clear during thunderstorms because it uses extra bandwidth to resist noise. Carson's rule gives the bandwidth it uses, and the SNR formula gives what it gains. Together they show the clearest engineering trade-off in this course.

The idea, with a picture. Frequency modulation puts the message in the instantaneous frequency 瞬时频率, $f_{i} = f_{c} + k_{f}x(t)$, where $k_{f}$ is the modulator's sensitivity. The largest swing is the frequency deviation 频偏 $\Delta f$. Divided by the highest message frequency $f_{m}$, it gives the modulation index $\beta = \Delta f/f_{m}$. Carson's rule 卡森公式, $B \approx 2(\Delta f + f_{m})$, gives the bandwidth that holds almost all of the signal.

An FM waveform in the time domain with the instantaneous frequency traced, beside the spectral lines spaced by fm under a Carson bandwidth
The message bends the instantaneous frequency; Carson's rule fences the spectral spread

The derivation.

  1. Integrating $f_{i}$ gives the phase $\phi(t) = 2\pi f_{c}t + \beta\sin(\omega_{m}t)$.
  2. Expanding $A\cos(\phi)$ with the Jacobi–Anger identity gives spectral lines at $f_{c} \pm kf_{m}$, with sizes set by the Bessel functions $J_{k}(\beta)$.
  3. The significant lines stop near $k \approx \beta + 1$, which gives exactly Carson's $2(\Delta f + f_{m})$.
  4. Carson's rule estimates the bandwidth that holds about 98% of the power. It is not a sharp edge in the spectrum.

Worked example 1 (FM broadcasting). Take $\Delta f = 75$ kHz and $f_{m} = 15$ kHz.

  1. $\beta = 75/15 = 5$, and $B = 2 \times (75 + 15) = 180$ kHz.
  2. Stations are 200 kHz apart, which leaves a 20 kHz guard band ✓.
  3. For narrowband FM ($\beta \ll 1$) the bandwidth falls to about $2f_{m}$, as in a walkie-talkie.
  4. Check the limit: as $\Delta f \to 0$, $\beta \to 0$ and $J_{0} \to 1$. Only the carrier is left, as expected.

Worked example 2 (the cost of the gain). Wideband FM improves the SNR after the detector: $(S/N)_{out} \approx (3\beta^{2}/2)\,(S/N)_{ref}$ when the received signal is strong. The reference $(S/N)_{ref}$ is the received power divided by the noise in the message band $f_{m}$: what baseband transmission at the same power would give.

  1. For $\beta = 5$ the gain is $3 \times 25/2 = 37.5$, which is $10\log_{10}(37.5) = 15.7$ dB.
  2. The cost is 180 kHz of bandwidth: six times the 30 kHz that AM needs for the same 15 kHz audio.
  3. The gain disappears below the FM threshold, at a carrier-to-noise ratio of about 10 dB in the 180 kHz channel. Below it, clicks in the noise and capture effects take over.
  4. In total: 15.7 dB of SNR gain for 7.8 dB ($10\log_{10}6$) more bandwidth.

Common mistakes.

  • Treating Carson's rule as exact. It is an estimate of the 98%-power bandwidth.
  • Confusing $\Delta f$, which belongs to the modulator, with $B$, which belongs to the spectrum.
  • Forgetting phase modulation (PM). It uses the same mathematics with the message in the phase, and its index is $\beta_{PM} = k_{p}A_{m}$ (phase sensitivity times message amplitude), which does not depend on the message frequency. FM is used for broadcasting, while PM is used mainly inside data modems, as phase-shift keying.

Summary. $\beta = \Delta f/f_{m}$ and $B \approx 2(\Delta f + f_{m})$. The wideband SNR gain is $3\beta^{2}/2$, and it exists only above the threshold.

词汇 训练
English 中文 拼音
instantaneous frequency/ˌɪnstənˈteɪnɪəs ˈfriːkwənsi/ 瞬时频率 shùn shí pín lǜ
frequency deviation/ˈfriːkwənsi ˌdiːvɪˈeɪʃn/ 频偏 pín piān
Carson's rule/ˈkɑːsnz ruːl/ 卡森公式 kǎ sēn gōng shì
11.4

噪声与信噪比

English

Why it matters. The running link ends at a noise floor that no amplifier can go below: the thermal noise of the receiver's own parts. Every receiver stage decides how far above that floor the signal arrives.

The idea, with a picture. Every receiver stage adds noise. The noise figure 噪声系数 $F$ measures how much. With $G_{1}$ the gain of the first stage, Friis's formula for a chain of stages is $F = F_{1} + (F_{2}-1)/G_{1} + \ldots$. It says that the first stage matters most: its gain divides the noise added by every later stage.

Two receiver chains with the same two blocks: LNA (F = 1.5, gain 10) then mixer (F = 3) gives F = 1.70, 2.30 dB; mixer first gives F = 3.05, 4.84 dB; below, the thermal floor of -174 dBm/Hz + 10 log10 B, -121.4 dBm in 180 kHz
The same two blocks in the other order are 2.5 dB worse: put the low-noise gain first

The derivation. Each stage's own noise is counted at its input. Every gain in front of that stage divides this noise when it is referred back to the chain's input. So the total is

$$F = F_{1} + \frac{F_{2}-1}{G_{1}} + \frac{F_{3}-1}{G_{1}G_{2}} + \ldots$$

After two stages with good gain, the later terms are very small. The thermal noise floor in a bandwidth $B$ is $-174\ \text{dBm/Hz} + 10\log_{10}B$.

Worked example 1 (the low-noise amplifier first). A low-noise amplifier (LNA) with $F_{1} = 1.76$ dB (a ratio of 1.5) and gain $G_{1} = 10$ dB (a ratio of 10) comes before a mixer with $F_{2} = 4.77$ dB (a ratio of 3).

  1. The chain gives $F = 1.5 + (3-1)/10 = 1.70$, which is 2.30 dB ✓. The mixer's 4.77 dB adds only about 0.5 dB.
  2. Swap the two blocks, assuming the mixer has gain 10 dB (a ratio of 10): $F = 3 + (1.5-1)/10 = 3.05$, which is 4.84 dB. That is 2.5 dB worse with the same parts.
  3. In a 180 kHz FM channel the floor is $-174 + 10\log_{10}(180\,000) = -121.4$ dBm.

Worked example 2 (the link budget). After the path loss, the transmitter delivers $-20$ dBm to the receiver's antenna. The channel is 180 kHz wide.

  1. The input SNR is $-20 - (-121.4) = 101.4$ dB, which is very large.
  2. The receiver's 2.3 dB noise figure raises the floor to $-119.1$ dBm. So the carrier-to-noise ratio after the front end is $-20 - (-119.1) = 99.1$ dB, far above the FM threshold.
  3. The FM gain of unit 11.3 is measured against the message-band reference. The noise in the 15 kHz audio band is $-174 + 10\log_{10}(15\,000) + 2.3 = -129.9$ dBm, so $(S/N)_{ref} = 109.9$ dB.
  4. The demodulator's 15.7 dB raises the SNR after detection to about 125.6 dB, in the linear range. That is far above hi-fi quality; noise is no longer the limit, and stereo processing is.
  5. One budget, used across three units, adds up.

Common mistakes.

  • Adding noise figures in dB. Convert to ratios, combine them, and convert back to dB once.
  • Forgetting that the floor depends on bandwidth: it rises 10 dB for every factor of 10 in $B$.
  • Quoting a noise figure at the wrong reference temperature or impedance. $F$ is defined at 290 K.

Summary. $F_{total} = F_{1} + (F_{2}-1)/G_{1} + \ldots$, so the first stage matters most. The floor is $-174\ \text{dBm/Hz} + 10\log_{10}B$. Every budget can then be added up in dB, once the noise figures have been combined as ratios.

词汇 训练
English 中文 拼音
noise figure/nɔɪz ˈfɪɡə/ 噪声系数 zào shēng xì shù
11.5

脉冲编码调制与基带传输

English

Why it matters. In this unit the running link becomes digital. The microphone's voltage becomes bits, the bits become pulses, and the shape of the pulses decides how fast the wire can carry them.

The idea, with a picture.

  • Quantisation 量化 rounds each sample to one of $2^{n}$ levels, where $n$ is the number of bits. For a full-scale sine wave and an ideal uniform quantiser, the signal-to-quantisation-noise ratio is $SQNR \approx 6.02n + 1.76$ dB.
  • Sampling faster than twice the highest frequency, $f_{s} > 2W$ (the Nyquist rate), and then coding each sample is PCM (pulse-code modulation). It is the basis of the telephone network.
  • At baseband, the raised-cosine 升余弦 filter with roll-off $\alpha$ uses extra bandwidth to give room for timing errors. For a symbol rate $R_{s}$ its bandwidth is $B = (1+\alpha)R_{s}/2$.
Left: a sine wave sampled at regular times, each sample rounded to the nearest of 16 levels and held. Right: raised-cosine spectra for 1 Msymbol/s: alpha = 0 is flat to 0.5 MHz and stops; alpha = 0.35 is flat to 0.325 MHz and rolls off smoothly to 0.675 MHz
Sampling freezes time, quantisation freezes amplitude, shaping fences the spectrum

The derivation.

  1. A uniform quantiser with step $\Delta$ rounds each sample to the nearest level. The error is spread evenly over $[-\Delta/2, \Delta/2]$, so its mean square value is $\Delta^{2}/12$.
  2. A full-scale sine wave has amplitude $2^{n}\Delta/2$, so its power is $(2^{n}\Delta)^{2}/8$.
  3. The ratio of the two is $1.5 \times 2^{2n}$, and $10\log_{10}$ of it is $6.02n + 1.76$ dB.
  4. The 6.02 dB per bit comes from $10\log_{10}4$: one more bit doubles the number of levels, which divides the noise power by 4.

Worked example 1 (the telephone channel). Voice up to 4 kHz is sampled at 8 kHz with 8 bits per sample.

  1. The bit rate is $8\,000 \times 8 = 64$ kbit/s.
  2. $SQNR = 6.02 \times 8 + 1.76 = 49.9$ dB, from 256 levels ✓.
  3. Each extra 1 dB of SQNR costs 1/6 of a bit per sample. The 8-bit choice is the standard compromise for telephone quality.

Worked example 2 (the wire). Take $R_{s} = 1$ Msymbol/s with $\alpha = 0.35$.

  1. $B = 1.35 \times 1/2 = 0.675$ MHz ✓, the number modem datasheets quote.
  2. Reduce the roll-off to $\alpha = 0$ and the bandwidth reaches the ideal $R_{s}/2$. But then the timing must be perfect: any small timing error causes errors.
  3. Manchester coding (the classic Ethernet choice) doubles the bandwidth to give a strong clock signal: its first spectral null is at $2R$, against $R$ for NRZ, where $R$ is the bit rate. NRZ also has a DC component and no clock.
  4. Each line code is a different compromise between bandwidth and clock strength.

Common mistakes.

  • Sampling at exactly $2W$. The condition is a strict inequality: at $2W$ there is no room for the anti-alias filter, and any filter ripple causes aliasing.
  • Confusing SQNR with the SNR of the whole analog chain. SQNR counts only the rounding noise.
  • Forgetting that $\alpha = 0$ cannot be built. It is a limit that real filters approach.

Summary. $SQNR = 6.02n + 1.76$ dB; sample at $f_{s} > 2W$; a raised-cosine filter needs $B = (1+\alpha)R_{s}/2$. Line codes trade bandwidth against clock strength.

词汇 训练
English 中文 拼音
quantisation/ˌkwɒntaɪˈzeɪʃn/ 量化 liàng huà
raised-cosine/reɪzd ˈkəʊsaɪn/ 升余弦 shēng yú xián
11.6

数字调制

English

Why it matters. The link's bits must travel on a carrier. The constellation you choose decides how many bits fit into each hertz, and how easily noise moves the symbols to the wrong place.

The idea, with a picture. Bits travel on carriers as constellations 星座图, diagrams with one point per symbol. ASK (amplitude-shift keying) changes the amplitude, PSK (phase-shift keying) changes the phase, and QAM (quadrature amplitude modulation) changes both. More points per symbol give more bits per hertz, but also more sensitivity to noise. This is the main trade-off of the unit.

QPSK and 16-QAM constellations side by side with minimum-distance circles, and the BER-versus-Eb/N0 curves showing the 7 dB energy gap
Equal minimum distance d: 16-QAM packs 2× the bits per symbol for 5× the average energy

The derivation. Compare constellations at the same minimum distance $d$ between points, because $d$ sets the error rate. The average symbol energy is the mean of the squared distances from the origin, $E_{avg} = \overline{r^{2}}$.

  1. QPSK's four points lie on a circle of radius $r = d/\sqrt{2}$, so $E_{avg} = r^{2} = d^{2}/2$.
  2. 16-QAM's grid has 4 inner points, 8 edge points and 4 corner points. The average is $E_{avg} = (4 \times 0.5 + 8 \times 2.5 + 4 \times 4.5)\,d^{2}/16 = 2.5d^{2}$.
  3. That is 5 times as much, or 7.0 dB, for twice the bits per symbol.

Worked example 1 (energy per symbol and per bit).

  1. Per symbol: QPSK needs $0.5d^{2}$ for 2 bits, and 16-QAM needs $2.5d^{2}$ for 4 bits. That is five times the energy, 7.0 dB.
  2. Per bit the difference is smaller: $0.25d^{2}$ against $0.625d^{2}$, a factor of 2.5 or 4.0 dB, because each 16-QAM symbol carries twice as many bits ✓.
  3. Check against published values: the gap in $E_{b}/N_{0}$ (energy per bit over noise density) between 16-QAM and QPSK at a bit error rate of $10^{-6}$ is usually quoted as about 4 dB. The geometry per bit agrees with the measurement.

Worked example 2 (how fast the errors fall). In white Gaussian noise, BPSK's bit error rate (BER) is $Q(\sqrt{2E_{b}/N_{0}})$, where $Q$ is the tail of the normal distribution.

  1. At $E_{b}/N_{0} = 5$ dB (a ratio of 3.16): $\sqrt{2 \times 3.16} = 2.51$, and $Q(2.51) \approx 6 \times 10^{-3}$.
  2. At 9 dB (7.94): $\sqrt{2 \times 7.94} = 3.98$, and $Q(3.98) \approx 3 \times 10^{-5}$.
  3. At 12 dB: about $10^{-8}$.
  4. So 4 dB more lowers the error rate by about two orders of magnitude, and the next 3 dB by about three more. This is why link budgets count every last dB.

Common mistakes.

  • Comparing constellations at equal average energy. The fair comparison is at equal minimum distance, or equal peak energy.
  • Reading $E_{b}/N_{0}$ curves without checking how they are normalised: per bit or per symbol.
  • Forgetting that the bits per symbol grow only as $\log_{2}M$ for $M$ points, while the energy needed grows much faster with $M$.

Summary. At equal $d$, QPSK needs $d^{2}/2$ and 16-QAM $2.5d^{2}$: 7 dB more per symbol for twice the bits. BPSK's BER is $Q(\sqrt{2E_{b}/N_{0}})$, which falls very steeply, so plan the dB budget before the link is built.

词汇 训练
English 中文 拼音
constellation/ˌkɒnstɪˈleɪʃn/ 星座图 xīng zuò tú
11.7

信息与编码导论

English

Why it matters. The last block sets the limits: how few bits a source really needs, how many bits a channel can carry, and how codes bring real systems close to those limits.

Huffman coding worked through on the word BANANA: the letter counts A 3, N 2 and B 1, the code tree built from them, and the resulting codes A = 0, B = 10, N = 11
Huffman coding: the commonest symbol gets the shortest code, so BANANA needs 9 bits instead of 12

The idea, with a picture. Entropy 熵 $H = -\sum p\log_{2}p$, where $p$ is each symbol's probability, measures a source's average surprise in bits per symbol. The difference between $H$ and a fixed-length code is redundancy. Huffman coding removes that redundancy from the source. Channel codes do the opposite: they add redundancy on purpose, to protect against errors. For a band-limited additive white Gaussian noise channel, the channel capacity 信道容量 is $C = B\log_{2}(1+S/N)$.

The quartile source's Huffman tree with codeword lengths 1,2,3,3, beside the Shannon limit curve C = B·log2(1+S/N) with the dial-up modem point
Left: optimal lengths average exactly the entropy for dyadic probabilities. Right: capacity, approached but never beaten

The derivation. Call a source dyadic when every probability is a power of 1/2. For such a source, Huffman's method of repeatedly merging the two least likely symbols gives each symbol a codeword of exactly $\log_{2}(1/p)$ bits. So the average length equals $H$ exactly. For other sources the average is within one bit of $H$.

Worked example 1 (the quartile source and a Hamming code). The probabilities are 1/2, 1/4, 1/8 and 1/8.

  1. The four terms $p\log_{2}(1/p)$ are 0.5, 0.5, 0.375 and 0.375, so $H = 1.75$ bits ✓, against 2 bits for a fixed-length code. The fixed code is only 87.5% efficient.
  2. Huffman gives lengths 1, 2, 3 and 3, which average exactly 1.75 bits ✓: the source is dyadic, so the limit is reached.
  3. The Hamming code 汉明码 (7,4) adds 3 parity bits to 4 data bits. Its minimum distance is 3, so it corrects any single error.
  4. Data 1011 encodes to 0110011. Flip bit 5, and the syndrome computes to $101_{2} = 5$ ✓: it names the wrong bit.
  5. The rate is 4/7, so 3 of every 7 bits (43%) are redundancy.

Worked example 2 (the modem limit). A 3 kHz telephone line has an SNR of 30 dB (a ratio of 1000).

  1. $C = 3000 \times \log_{2}(1001) = 29.9$ kbit/s. This was the limit for dial-up modems.
  2. The V.90/V.92 modems reached 56 kbit/s downstream only because the exchange end of the link was digital, so that part of the path had much less noise. They do not break the law.
  3. Check how capacity grows: 10 dB more SNR adds only about $\log_{2}(10) \approx 3.3$ bit/s per hertz. Capacity grows in proportion to bandwidth but only with the log of the power.

Common mistakes.

  • Using the wrong log base for $H$. Bits need $\log_{2}$.
  • Believing that Huffman always reaches $H$. It does only for dyadic sources.
  • Reading $C$ as a guarantee. Codes can come close to it, but none can exceed it.

Summary. $H = \sum p\log_{2}(1/p)$, which Huffman reaches for dyadic sources. Hamming (7,4) corrects one error per block, with 43% redundancy. $C = B\log_{2}(1+S/N)$ is the limit for the channel.

词汇 训练
English 中文 拼音
entropy/ˈentrəpi/ 熵 shāng
channel capacity/ˈtʃænl kəˈpæsɪti/ 信道容量 xìn dào róng liàng
Hamming code/ˈhæmɪŋ kəʊd/ 汉明码 hàn míng mǎ

该知识点的互动课程

逐步完成,配合即时检查练习。

更多 大学电气工程 知识点

登录或创建账户

IGCSE, A-Level & AP