📡 Polar Codes — Channel Capacity

Polar codes (Arıkan 2009) achieve Shannon capacity for binary-input symmetric channels. Channel polarization: recursive G_N = F^⊗n combines weak and strong synthetic channels. Successive cancellation decoder.

AlgorithmsInteractive
Synthetic channel capacities · P pause · R reset · I toggle view

How it Works

Polar codes apply the Arıkan kernel recursively: G_N = F^⊗n where F=[[1,0],[1,1]]. This creates N synthetic bit-channels from N copies of the physical channel W. As N→∞, each synthetic channel's capacity I(W_N^(i)) polarizes to either 0 or 1. The fraction with capacity →1 equals I(W), the physical channel capacity.

Kernel: F = [[1,0],[1,1]] G_N = B_N · F^⊗n (B_N = bit-reversal permutation) Encoded: x_1^N = u_1^N · G_N SC update: LLR_n(i) = f(LLR_{n-1}(2i-1), LLR_{n-1}(2i)) f(a,b) = 2·atanh(tanh(a/2)·tanh(b/2)) g(a,b,u) = (-1)^u · a + b

Frozen bits occupy the K worst synthetic channels (lowest capacity/highest noise). Information bits occupy the K best. The successive cancellation decoder processes bits left-to-right, using the LLR butterfly structure.

Frequently Asked Questions

What are polar codes?

Polar codes, invented by Erdal Arıkan in 2009, are the first provably capacity-achieving codes for binary-input symmetric channels. They exploit channel polarization to create a mix of near-perfect and near-useless synthetic channels.

What is channel polarization?

Channel polarization is the phenomenon where combining N copies of a channel recursively produces N synthetic channels that polarize: some have capacity near 1 (reliable) and others near 0 (noisy). As N grows, the fraction with capacity near 1 approaches the original channel capacity.

What is the polar code construction matrix?

The generator matrix is G_N = F^⊗n where F = [[1,0],[1,1]] is the kernel and ⊗n denotes the n-th Kronecker power (N=2^n). The encoded codeword is x = u·G_N where u is the input word with frozen bits set to 0.

What are frozen bits?

Frozen bits are input positions assigned to the worst (most noisy) synthetic channels. They are set to known values (typically 0) at the encoder and used as side information by the decoder. Information bits occupy the best synthetic channels.

How does successive cancellation decoding work?

Successive cancellation (SC) decoding estimates bits one by one from u_1 to u_N. At each step, the decoder uses previously decoded bits and channel LLRs to compute the likelihood ratio for the current bit, then makes a hard decision (or forces a frozen bit to 0).

What is the BER of polar codes vs LDPC?

At short block lengths, polar codes with SC decoding have slightly worse BER than LDPC or turbo codes. SCL decoding with CRC improves performance significantly, matching or exceeding LDPC for moderate block lengths.

Where are polar codes used in practice?

Polar codes are used in 5G NR (New Radio) for the control channel (PBCH, PDCCH, PUCCH). They were standardised by 3GPP in Release 15 (2017), making them the first capacity-achieving codes in a commercial wireless standard.

What is the AWGN channel capacity formula?

The AWGN channel capacity is C = (1/2)log₂(1 + SNR) bits per channel use. For BPSK with noise variance σ², SNR = E_s/N_0 = 1/(2σ²).

What is the polarization rate?

The polarization rate describes how fast synthetic channel capacities converge to 0 or 1. For the standard F kernel, the exponent is E = 0.5. Better kernels can achieve higher exponents, improving finite-length performance.

What is SCL decoding?

Successive Cancellation List (SCL) decoding maintains a list of L candidate codeword paths simultaneously. A CRC outer code selects the correct candidate from the list, dramatically improving BER at the cost of O(L·N log N) complexity.

About this simulation

This simulation recursively applies Arıkan's polarization step to N=2ⁿ synthetic channels, watching a single noisy channel split into a mix of near-perfect and near-useless copies, then assigns the K best ones to carry information bits while freezing the rest to zero. Switch between the polarization bar chart, a live BER-vs-SNR sweep, and the butterfly diagram that shows exactly how the recursive combining structure wires the input bits to the transmitted codeword.

🔬 What it shows

A bar chart of synthetic channel capacities with bright bars marking information-bit positions and dim bars marking frozen bits, a dashed Shannon-limit reference line, an animated BER-vs-Eb/N0 curve, and a butterfly diagram of the recursive combining network.

🎮 How to use

Set block length exponent n (giving N=2ⁿ), code rate R, and Eb/N0 with the sliders, switch the View dropdown between Channel Polarization, BER Curve, and Butterfly Diagram, click Simulate to recompute, and Run BER to animate a full BER sweep across SNR values.

💡 Did you know?

Polar codes were the first codes ever proven mathematically to achieve Shannon capacity as N grows — and just eight years after Arıkan's 2009 paper, they were adopted by 3GPP for 5G NR control-channel coding, making them one of the fastest theory-to-deployment stories in coding theory history.

Frequently asked questions

Why do only some bars in the polarization chart reach near capacity 1?

Each polarization step splits a channel into a "worse" copy (W⁻, more erasure-prone) and a "better" copy (W⁺, less erasure-prone) via the recursive combine-and-split rule — after n steps, this repeated splitting drives most synthetic channels toward either capacity ≈1 or ≈0, which is exactly the polarization effect the bar heights are visualizing.

How does the simulation decide which bit positions are frozen?

It sorts all N synthetic channels by capacity and assigns the top K (matching your chosen code rate R×N) as information channels, freezing the rest to 0 — this is precisely the polar code construction rule, and raising the code rate slider visibly shifts more bars from dim (frozen) to bright (information) in the chart.

Why does raising Eb/N0 dramatically shrink the BER curve?

A higher Eb/N0 lowers the equivalent erasure probability fed into the channel polarization computation, which pushes more synthetic channels toward capacity 1 and fewer toward 0 — since BER is estimated as the average error probability over just the information channels, a better underlying SNR directly means fewer weak channels get used for real data.

What does the butterfly diagram actually represent?

Each stage of red-to-blue connections represents one recursive application of the 2×2 Arıkan kernel F=[[1,0],[1,1]], and the crossing pattern (each node paired with a partner N/2^(stage+1) positions away) is exactly how input bits u combine additively (mod 2) to produce the final codeword x — this is the same structure an actual polar encoder implements in hardware.

Why does increasing block length n change the polarization pattern's sharpness?

Each additional polarization step doubles the number of synthetic channels and applies the split rule again to every existing channel, so more recursion pushes capacities further toward the extremes of 0 and 1 — larger n therefore produces a more sharply bimodal bar chart, which is the theoretical mechanism behind polar codes' capacity-achieving guarantee as N→∞.