diff --git a/projects/spectra-fourier-7k9d/JOURNAL.md b/projects/spectra-fourier-7k9d/JOURNAL.md index a87c8f14..f0d90945 100644 --- a/projects/spectra-fourier-7k9d/JOURNAL.md +++ b/projects/spectra-fourier-7k9d/JOURNAL.md @@ -111,6 +111,14 @@ vectors / pure frequencies, and lets you manipulate them. **normalised / offset min-sum**, each with syndrome early-termination and a per-iteration convergence trace. Plus a Monte-Carlo BER/BLER `waterfall`, the rate's **Shannon limit**, and graph analysis (`girth`, `degreeStats`). No coding library. +- `src/lib/polar.ts` — **the polar-codes engine (v16).** Arıkan's channel polarization from scratch: + the `u·F^⊗n` transform as an in-place GF(2) butterfly (its own inverse), two frozen-set constructions — + the **Bhattacharyya** recursion on the BEC (`z⁻=2z−z²`, `z⁺=z²`) and the **Gaussian approximation** of + density evolution on BI-AWGN (mean-LLR through the Chung–RU **φ-function** and a bisection inverse) — + the recursive **successive-cancellation** decoder (exact box-plus *or* min-sum), the **SC-list** decoder + (Tal–Vardy) carrying the L best paths through one f/g schedule via a survivor-remap, its **CRC-aided** + variant (bit-wise CRC-6/8/11), a BPSK/AWGN Monte-Carlo `waterfall` (SC · SCL · CA-SCL), and the + **BI-AWGN capacity** + binary Shannon limit by adaptive Simpson integration. No coding library. - `src/lib/wavelet.ts` — the **continuous** wavelet transform: a complex Morlet CWT evaluated in the frequency domain (convolution theorem), log-spaced scales, pseudo-frequency mapping, time-reduction. - `src/lib/dwt.ts` — **the discrete wavelet engine (v15).** Orthonormal filter banks **derived from @@ -184,9 +192,69 @@ vectors / pure frequencies, and lets you manipulate them. least-squares (Wiener) solution while colour in the input cripples plain LMS. A fifth scenario is a genuine 2-state **Kalman** tracker — the same predict/update recursion as RLS, applied to a physical state, with its own shrinking ±2σ uncertainty band and a white innovation sequence. +9. **Polar** — *reaching Shannon with an explicit code.* Arıkan's **channel polarization**: recursively + combine and split a channel and its synthetic bit-channels split toward perfect or useless, so you send + information only on the good ones and **freeze** the rest to 0. Four tabs — the **polarization + staircase** and the self-similar frozen set (two from-scratch constructions: Bhattacharyya/BEC and the + Gaussian approximation of density evolution); the **F^⊗n encoder** butterfly; a **decode** race across + greedy **SC**, the **SC-list** (Tal–Vardy, keep the L best paths by an LLR metric) and the **CRC-aided + list** (the 5G decoder, an outer CRC picks the surviving path that checks); and a Monte-Carlo + **waterfall** landing a short code within ~1 dB of the binary Shannon limit. ## Ideas / backlog +### v16 plan — the **Polar codes** mode (channel polarization) — this session + +The coding pillar had the two great decoding paradigms — the trellis search (Coding/Viterbi, v12) and +belief propagation (LDPC, v14) — but was missing the third and most recent: **polar codes** (Arıkan, +2009), the first family *proven* to achieve the symmetric capacity of any binary-input channel with an +explicit, low-complexity construction, and the code that carries the 5G-NR control channels. v16 adds +the whole pillar as a **twentieth mode**, from scratch, and — like the rest of the lab — proves every +claim in front of the user (the transform is its own inverse; SCL(L=1) reproduces SC bit-for-bit; the +CRC catches flips; and growing the list then adding the CRC strictly lowers the measured BLER). All +hold — self-tests 78–85, **127/127 green** in the browser, and every Polar tab renders in headless +Chromium with zero console errors. + +Shipped this session: + +- [x] **The polar engine** (`polar.ts`, ~640 lines) — the `u·F^⊗n` transform as an in-place GF(2) + butterfly (self-inverse), snapshotting `transformStages` for the encoder animation. +- [x] **Two channel constructions** — the **Bhattacharyya** BEC recursion and the **Gaussian + approximation** of density evolution (Chung–Richardson–Urbanke φ-function + a bisection inverse), + each ranking the N synthetic channels so `buildCode` freezes the worst N−K. A `channelCapacities` + helper maps both onto one [0,1] capacity axis (BEC → 1−Z, GA → a Simpson integral of the mean-LLR). +- [x] **The SC decoder** — the recursive f (exact stable box-plus *or* min-sum) / g message schedule, + each recursion returning its subtree's re-encoded partial sums for the parent's g-node. +- [x] **The SC-list decoder** (Tal–Vardy) — the L most-likely paths carried through the *same* f/g + recursion; each information bit forks every path 0/1, ranks by the LLR **path metric** + `PM += softplus(−(1−2û)·L)`, and prunes to L. Implemented by a survivor-map (`newPath→parent`) that + each recursion frame applies to remap its own LLR/bit state, so the whole list shares one schedule. +- [x] **CRC-aided SC-list** (the 5G decoder) — a bit-wise CRC-6/8/11; the returned path is the + lowest-metric survivor whose info bits satisfy the CRC (else the metric-best). +- [x] **The yardsticks** — BI-AWGN capacity and the binary Shannon limit by adaptive Simpson + + bisection; a BPSK/AWGN Monte-Carlo `waterfall` with an adaptive block budget. +- [x] **Four-tab Polar UI** (`modes/Polar.tsx`) — *Polarization* (the capacity staircase + the + self-similar frozen-set map, with Σcapacity ≈ N·C shown conserved), *Encoder* (the F^⊗n XOR + butterfly network with a live message flowing through the stages), *Decode* (one noisy word decoded + three ways — SC vs best-metric SCL vs CA-SCL — with the ranked survivor list and CRC flags), and + *Waterfall* (SC · SCL L=2/8 · CA-SCL L=8 vs uncoded BPSK and the Shannon line). All deep-linkable. +- [x] **Eight new self-tests (119 → 127)** covering the guarantees above. + +Future polar ideas (not yet built): + +- [ ] **Simplified SC (SSC/Fast-SSC)** — prune Rate-0/Rate-1/REP/SPC subtrees for a step-through of the + decode tree that skips the trivial nodes, the throughput trick real decoders use. +- [ ] **The 5G-NR reliability sequence** (the standardised Q-sequence) as a third construction, with + rate-matching (puncturing / shortening / repetition) to arbitrary (N,K), not just powers of two. +- [ ] **CRC-aided *systematic* polar encoding** (Arıkan's systematic transform) for the lower BER the + systematic form gives at the same BLER. +- [ ] **A polarization-vs-n animation** — sweep the block length and watch the capacity histogram + split, plus the exact mutual-information conservation drawn as a running total. +- [ ] **Wire the Modem's 16-/64-QAM soft LLRs into the polar decoder** so the whole TX→channel→FEC + chain runs on one shared constellation, as with the LDPC backlog. +- [ ] **List-size sweep** — BLER vs L at a fixed SNR, showing the diminishing returns and where CA-SCL + overtakes an ML lower bound. + ### v15 plan — the **discrete wavelet transform** pillar (Wavelet mode) — this session The Wavelet mode shipped in v6 as a single **continuous** transform: a Morlet scalogram beside an @@ -906,6 +974,40 @@ attenuation is never negative. This is what modern cone-beam and low-dose scanne ## Session log +- 2026-07-24 (claude, v16): "Polarizing the channel — polar codes, SC-list & the CRC-aided 5G decoder." + Added the **twentieth mode, Polar**, completing the forward-error-correction pillar with its third and + most modern paradigm: Arıkan's **channel polarization** — the first codes *proven* to reach the + symmetric capacity of any binary-input channel with an explicit, low-complexity construction, and the + code that carries the 5G-NR control channels. A new from-scratch `lib/polar.ts` (~640 lines, zero + coding libraries) carries it all: the `u·F^⊗n` transform as an in-place GF(2) butterfly that is **its + own inverse**; two frozen-set constructions — the **Bhattacharyya** recursion on the erasure channel + (`z⁻=2z−z²`, `z⁺=z²`) and the **Gaussian approximation** of density evolution on BI-AWGN (the mean LLR + pushed through the Chung–Richardson–Urbanke **φ-function** with a bisection inverse) — that rank the N + synthetic channels so `buildCode` freezes the worst N−K; the recursive **successive-cancellation** + decoder (exact stable box-plus *or* min-sum) written as the natural f/g message schedule where each + recursion returns its subtree's re-encoded partial sums; the **SC-list** decoder (Tal–Vardy) that + carries the L most-likely paths through that *same* recursion — every information bit forks each path + 0/1, ranks by the LLR path metric `PM += softplus(−(1−2û)·L)`, and prunes to L — implemented cleanly by + a **survivor-map** (`newPath→parent`) that each recursion frame applies to remap its own LLR/bit state, + so the whole list shares one f/g schedule; and the **CRC-aided** variant (bit-wise CRC-6/8/11) that + picks the lowest-metric survivor whose info bits check — the trick that made polar codes state-of-the-art + at short block lengths. Plus BI-AWGN capacity + the binary Shannon limit by adaptive Simpson and an + adaptive-budget BPSK/AWGN `waterfall`. `modes/Polar.tsx` renders four deep-linkable tabs — **Polarization** + (the capacity staircase sorting every synthetic channel toward 0 or 1, the self-similar frozen-set map, + and Σcapacity ≈ N·C shown conserved), **Encoder** (the F^⊗n XOR butterfly with a live message flowing + through the stages), **Decode** (one noisy word decoded three ways — greedy SC vs best-metric SCL vs + CA-SCL — with the ranked survivor list, path-metric bars and CRC flags, so you see the CRC reject the + plausible-but-wrong path), and **Waterfall** (SC · SCL L=2/8 · CA-SCL L=8 racing uncoded BPSK toward the + Shannon line, the list closing most of the SC gap and the CRC dropping BLER another order of magnitude). + Eight new self-tests (**119 → 127**): the transform is an involution, SC recovers a clean word, + **SCL(L=1) ≡ SC bit-for-bit** (the correctness anchor), the CRC self-verifies and catches a flip, + **BLER SC ≥ SCL(8) ≥ CA-SCL(8)** at a fixed SNR, BLER is monotone in SNR, the BI-AWGN capacity + rate-½ + Shannon limit ≈ 0.19 dB, and the GA φ is a decreasing bijection. Verified the engine in a Node bundle + (17 standalone assertions, e.g. N=128 K=64 @2 dB BLER: SC=0.128 → SCL8=0.059 → CA-SCL8=0.041), ran the CI + gate (scope + conformance + lint + build ✓, 85 modules), the full self-test suite (127/127 in ~19 s), and + drove every Polar tab in headless Chromium via the DevTools protocol — all four render, tabs switch, + canvases paint, the reroll interaction works, **zero console/runtime errors**. Twenty modes, still zero + math libraries. - 2026-07-09 (claude, v13): "The filters that learn — adaptive filtering & the Kalman filter." Added the **eighteenth mode, Adaptive**, the last great missing pillar: until now every filter here was *fixed*, but the filters that run the modern world tune their own taps from data, live. A new diff --git a/projects/spectra-fourier-7k9d/project.json b/projects/spectra-fourier-7k9d/project.json index 6f291e8a..33bd25f9 100644 --- a/projects/spectra-fourier-7k9d/project.json +++ b/projects/spectra-fourier-7k9d/project.json @@ -1,8 +1,8 @@ { "title": "Spectra — Fourier Lab", - "description": "A nineteen-mode interactive Fourier & DSP lab on a from-scratch FFT. Meet the filters that LEARN in the ADAPTIVE mode: one transversal filter with four update rules (LMS, NLMS, affine-projection APA, and exact-least-squares RLS) tunes its own taps live to solve four classic problems — SYSTEM IDENTIFICATION of an unknown plant, ADAPTIVE NOISE CANCELLATION that lifts a tone out of noise, CHANNEL EQUALIZATION that snaps a closed BPSK eye open (channel ⊛ equalizer ≈ δ), and LINEAR PREDICTION that whitens an AR resonance — with an ensemble LEARNING-CURVE race in which RLS lands on the exact WIENER least-squares solution in ~2L steps while a coloured input cripples plain LMS (the eigenvalue-spread story, made visible). A fifth scenario is a genuine 2-state KALMAN FILTER tracking a target through noisy measurements inside its own shrinking ±2σ uncertainty band, the same predict/update recursion as RLS applied to physics. Build a working digital radio in the MODEM mode: bits become Gray-coded BPSK/QPSK/16-/64-QAM symbols, get root-raised-cosine pulse-shaped and pushed through an AWGN channel, and the received constellation, the open EYE DIAGRAM and the transmit spectrum all update live — while the measured Monte-Carlo bit-error rate falls exactly along the closed-form theory curve (a from-scratch erfc/Q-function), the strongest kind of validation. Then flip to OFDM — the multicarrier scheme behind Wi-Fi, 4G/5G and DVB — where an IFFT paints data onto hundreds of orthogonal subcarriers, a CYCLIC PREFIX turns a frequency-selective multipath channel into a plain circular convolution, and a one-tap-per-carrier zero-forcing equalizer snaps the smeared cloud back to a clean grid (toggle it off and watch the echo destroy it). Close the last few dB in the CODING mode — the forward-error-correction pillar: from-scratch CONVOLUTIONAL encoders (K=3…7, including the K=7 (171,133) code that flew on Voyager and rides every Wi-Fi frame) with hard- AND soft-decision VITERBI maximum-likelihood decoding and rate-compatible PUNCTURING (1/2→2/3→3/4→5/6). Watch the VITERBI TRELLIS decode live — the add-compare-select survivor sweep, each state's path metric, and the surviving maximum-likelihood path snapping onto the true transmitted path as channel errors are repaired. See the CODING GAIN as a curve that slides left: the measured coded BER sits under a closed-form UNION BOUND built from the code's own DISTANCE SPECTRUM — enumerated straight from the trellis, so d_free = 10 (a_10 = 11) is re-derived, not looked up — with soft decisions buying the textbook ~2 dB over hard. Then a MESSAGE DEMO drives it home: the same text through the same noise, shredded when sent raw and pulled back intact when wrapped in the code. Reach the last fraction of a dB in the LDPC mode — the capacity-approaching codes in Wi-Fi, 5G-NR, DVB-S2 and deep-space links, decoded not by a trellis search but by BELIEF PROPAGATION on a sparse TANNER GRAPH. Watch that graph decode live: parity checks light amber and wink out as soft messages flow along the edges and the syndrome weight falls to zero — the moment every check is satisfied, decoding stops. A from-scratch ldpc.ts carries it all with no coding library: a GF(2) Gaussian-elimination SYSTEMATIC ENCODER that turns any parity-check matrix H into a generator (so H·c=0 holds by construction), three code constructors (the (7,4) Hamming code as an LDPC, a PROGRESSIVE-EDGE-GROWTH random regular code conditioned for large girth, and a circulant-lifted QC-LDPC — the 802.11n/5G form), BPSK-over-AWGN with exact log-likelihood ratios, and one belief-propagation decoder with four schedules over the same graph: exact SUM-PRODUCT (a numerically-stable, division-free box-plus forward/backward pass) plus MIN-SUM and its NORMALISED and OFFSET variants, each with syndrome early-termination. The WATERFALL races all four decoders against uncoded BPSK on a Monte-Carlo BER/BLER plot, the coded cliff diving left toward the rate's SHANNON LIMIT; a third tab lays the code bare — its H sparsity pattern, rate, rank, GIRTH and degree profile. Beat the FFT's own resolution limit in the RESOLVE mode: two tones inside a single DFT bin — below the RAYLEIGH LIMIT — that the periodogram blurs into one lobe, split cleanly by the subspace super-resolution estimators MUSIC, ROOT-MUSIC and ESPRIT, plus the CAPON/MVDR minimum-variance and BURG maximum-entropy AR spectra, all read from the eigenstructure of the sample covariance matrix via a from-scratch Hermitian (Jacobi) eigensolver, with AIC/MDL counting the sources and the estimates landing grid-free on the z-plane. Reconstruct a CT scan from scratch: the TOMOGRAPHY mode Radon-projects a Shepp–Logan phantom into a sinogram and inverts it BOTH ways — the direct methods (FILTERED BACK-PROJECTION, watch each reading smear back and resolve a sharp slice, and a FOURIER SLICE THEOREM reconstruction that grids each projection's spectrum into k-space) AND the ITERATIVE family (SIRT / SART / CGLS) that solves the whole scan as one least-squares system A x = b over an exact-adjoint projector pair, with a non-negativity prior; starve the scan to few angles or a limited-angle wedge and watch the live convergence curve duck under the FBP baseline as iterative roughly halves the error — with a live RMSE error map and the radial slices lighting up the frequency plane. Trace a glyph or uploaded silhouette into an outline and watch rotating EPICYCLES redraw it. Build and HEAR spectra, filter noise in the frequency domain, read spectrograms, and SHARPEN them: time-frequency REASSIGNMENT and SYNCHROSQUEEZING collapse a fuzzy chirp band to a razor line, with a Rényi-entropy readout. Analyse LIVE MICROPHONE audio in real time (scrolling spectrogram + pitch tuner). DESIGN digital filters on an interactive z-plane — drag poles and zeros and watch magnitude, phase, group delay, impulse response and sound recompute live from a from-scratch bilinear transform (Butterworth, Chebyshev, FIR, biquad, elliptic Cauer, Parks–McClellan equiripple, design-to-spec). Cross the FFT into the WAVELET mode: a Morlet CWT scalogram beside a fixed-window STFT, then a full DISCRETE WAVELET TRANSFORM pillar whose orthonormal filter banks are DERIVED FROM SCRATCH — Daubechies' maximally-flat half-band polynomial spectrally factored by the lab's own Durand–Kerner root finder into minimum-phase Daubechies and least-asymmetric Symlet scaling filters (no coefficient tables anywhere). A MULTIRESOLUTION ANALYSIS peels a signal into octave-wide detail bands plus a smooth approximation that sum back to the input at the 1e-15 floating-point floor — PERFECT RECONSTRUCTION is structural, the synthesis step being the exact adjoint of a paraunitary analysis operator — with the quadrature-mirror filter pair drawn power-complementing across ω = π/2. Then WAVELET DENOISING on the Donoho–Johnstone Blocks/Bumps/HeaviSine/Doppler suite: estimate the noise σ from the finest band's median absolute deviation, then shrink coefficients by VisuShrink (universal), SureShrink (Stein's unbiased risk) or BayesShrink, soft or hard — keeping ~10% of the coefficients while lifting SNR by many dB, the whole point of wavelets made visible. A fourth BEST-BASIS tab runs the full WAVELET PACKET tree — splitting both children at every node, not just the low-pass — and the COIFMAN–WICKERHAUSER bottom-up search picks the minimum-cost admissible basis (Shannon-entropy or ℓ¹) that represents the signal most sparsely, drawn as an ADAPTIVE TIME-FREQUENCY TILING whose strip heights vary with the local resolution: fine bands where the signal is tonal, coarse where it is transient (Doppler packs 99% of its energy into ~4% of the coefficients). Every DWT tab also offers the symmetric BIORTHOGONAL CDF 5/3 and 9/7 wavelets — the JPEG-2000 pair — implemented by the LIFTING SCHEME (predict/update steps, each trivially invertible, so perfect reconstruction is structural). Plus a real 2-D image FFT, a phase-vocoder time-stretch/pitch-shift, a JPEG-lite DCT codec, and cepstral pitch detection. Deep-linkable; no math libraries.", + "description": "A twenty-mode interactive Fourier & DSP lab on a from-scratch FFT. Meet the filters that LEARN in the ADAPTIVE mode: one transversal filter with four update rules (LMS, NLMS, affine-projection APA, and exact-least-squares RLS) tunes its own taps live to solve four classic problems — SYSTEM IDENTIFICATION of an unknown plant, ADAPTIVE NOISE CANCELLATION that lifts a tone out of noise, CHANNEL EQUALIZATION that snaps a closed BPSK eye open (channel ⊛ equalizer ≈ δ), and LINEAR PREDICTION that whitens an AR resonance — with an ensemble LEARNING-CURVE race in which RLS lands on the exact WIENER least-squares solution in ~2L steps while a coloured input cripples plain LMS (the eigenvalue-spread story, made visible). A fifth scenario is a genuine 2-state KALMAN FILTER tracking a target through noisy measurements inside its own shrinking ±2σ uncertainty band, the same predict/update recursion as RLS applied to physics. Build a working digital radio in the MODEM mode: bits become Gray-coded BPSK/QPSK/16-/64-QAM symbols, get root-raised-cosine pulse-shaped and pushed through an AWGN channel, and the received constellation, the open EYE DIAGRAM and the transmit spectrum all update live — while the measured Monte-Carlo bit-error rate falls exactly along the closed-form theory curve (a from-scratch erfc/Q-function), the strongest kind of validation. Then flip to OFDM — the multicarrier scheme behind Wi-Fi, 4G/5G and DVB — where an IFFT paints data onto hundreds of orthogonal subcarriers, a CYCLIC PREFIX turns a frequency-selective multipath channel into a plain circular convolution, and a one-tap-per-carrier zero-forcing equalizer snaps the smeared cloud back to a clean grid (toggle it off and watch the echo destroy it). Close the last few dB in the CODING mode — the forward-error-correction pillar: from-scratch CONVOLUTIONAL encoders (K=3…7, including the K=7 (171,133) code that flew on Voyager and rides every Wi-Fi frame) with hard- AND soft-decision VITERBI maximum-likelihood decoding and rate-compatible PUNCTURING (1/2→2/3→3/4→5/6). Watch the VITERBI TRELLIS decode live — the add-compare-select survivor sweep, each state's path metric, and the surviving maximum-likelihood path snapping onto the true transmitted path as channel errors are repaired. See the CODING GAIN as a curve that slides left: the measured coded BER sits under a closed-form UNION BOUND built from the code's own DISTANCE SPECTRUM — enumerated straight from the trellis, so d_free = 10 (a_10 = 11) is re-derived, not looked up — with soft decisions buying the textbook ~2 dB over hard. Then a MESSAGE DEMO drives it home: the same text through the same noise, shredded when sent raw and pulled back intact when wrapped in the code. Reach the last fraction of a dB in the LDPC mode — the capacity-approaching codes in Wi-Fi, 5G-NR, DVB-S2 and deep-space links, decoded not by a trellis search but by BELIEF PROPAGATION on a sparse TANNER GRAPH. Watch that graph decode live: parity checks light amber and wink out as soft messages flow along the edges and the syndrome weight falls to zero — the moment every check is satisfied, decoding stops. A from-scratch ldpc.ts carries it all with no coding library: a GF(2) Gaussian-elimination SYSTEMATIC ENCODER that turns any parity-check matrix H into a generator (so H·c=0 holds by construction), three code constructors (the (7,4) Hamming code as an LDPC, a PROGRESSIVE-EDGE-GROWTH random regular code conditioned for large girth, and a circulant-lifted QC-LDPC — the 802.11n/5G form), BPSK-over-AWGN with exact log-likelihood ratios, and one belief-propagation decoder with four schedules over the same graph: exact SUM-PRODUCT (a numerically-stable, division-free box-plus forward/backward pass) plus MIN-SUM and its NORMALISED and OFFSET variants, each with syndrome early-termination. The WATERFALL races all four decoders against uncoded BPSK on a Monte-Carlo BER/BLER plot, the coded cliff diving left toward the rate's SHANNON LIMIT; a third tab lays the code bare — its H sparsity pattern, rate, rank, GIRTH and degree profile. Cross the finish line in the POLAR mode — Arıkan's CHANNEL POLARIZATION, the first codes PROVEN to reach capacity with an explicit low-complexity construction and the code that carries the 5G-NR control channels. Recursively combine and split a channel and its synthetic bit-channels polarize — each racing toward a perfect or a useless channel — so you send information only on the good ones and FREEZE the rest to zero; watch the POLARIZATION STAIRCASE sort every synthetic channel's capacity toward 0 or 1 and the self-similar FROZEN SET emerge, with the good fraction converging to the channel capacity (this is HOW you reach Shannon). Two from-scratch constructions pick the frozen set — the BHATTACHARYYA-parameter recursion on the erasure channel and the GAUSSIAN-APPROXIMATION of density evolution on BI-AWGN (tracking the mean LLR through the φ-function). Encoding is the u·F^⊗n butterfly drawn live as an XOR network (the transform is its own inverse over GF(2)). Decode one noisy word three ways and see why polar codes needed a decade to get good: greedy SUCCESSIVE-CANCELLATION commits irreversibly and one early wrong guess dooms the block; the SC-LIST decoder (Tal–Vardy) keeps the L most-likely paths alive through the same f/g recursion, pruned by an LLR PATH METRIC; and the CRC-AIDED list — the 5G decoder — lets an outer CRC referee reject the plausible-but-wrong survivor and pick the one that actually checks, ranked survivors and all. The WATERFALL races SC, SCL(L=2/8) and CA-SCL against uncoded BPSK and the binary SHANNON LIMIT on a Monte-Carlo BLER/BER plot — the list closing most of the SC gap and the CRC dropping the block-error rate another order of magnitude, a short code landing within ~1 dB of the finite-length limit. Beat the FFT's own resolution limit in the RESOLVE mode: two tones inside a single DFT bin — below the RAYLEIGH LIMIT — that the periodogram blurs into one lobe, split cleanly by the subspace super-resolution estimators MUSIC, ROOT-MUSIC and ESPRIT, plus the CAPON/MVDR minimum-variance and BURG maximum-entropy AR spectra, all read from the eigenstructure of the sample covariance matrix via a from-scratch Hermitian (Jacobi) eigensolver, with AIC/MDL counting the sources and the estimates landing grid-free on the z-plane. Reconstruct a CT scan from scratch: the TOMOGRAPHY mode Radon-projects a Shepp–Logan phantom into a sinogram and inverts it BOTH ways — the direct methods (FILTERED BACK-PROJECTION, watch each reading smear back and resolve a sharp slice, and a FOURIER SLICE THEOREM reconstruction that grids each projection's spectrum into k-space) AND the ITERATIVE family (SIRT / SART / CGLS) that solves the whole scan as one least-squares system A x = b over an exact-adjoint projector pair, with a non-negativity prior; starve the scan to few angles or a limited-angle wedge and watch the live convergence curve duck under the FBP baseline as iterative roughly halves the error — with a live RMSE error map and the radial slices lighting up the frequency plane. Trace a glyph or uploaded silhouette into an outline and watch rotating EPICYCLES redraw it. Build and HEAR spectra, filter noise in the frequency domain, read spectrograms, and SHARPEN them: time-frequency REASSIGNMENT and SYNCHROSQUEEZING collapse a fuzzy chirp band to a razor line, with a Rényi-entropy readout. Analyse LIVE MICROPHONE audio in real time (scrolling spectrogram + pitch tuner). DESIGN digital filters on an interactive z-plane — drag poles and zeros and watch magnitude, phase, group delay, impulse response and sound recompute live from a from-scratch bilinear transform (Butterworth, Chebyshev, FIR, biquad, elliptic Cauer, Parks–McClellan equiripple, design-to-spec). Cross the FFT into the WAVELET mode: a Morlet CWT scalogram beside a fixed-window STFT, then a full DISCRETE WAVELET TRANSFORM pillar whose orthonormal filter banks are DERIVED FROM SCRATCH — Daubechies' maximally-flat half-band polynomial spectrally factored by the lab's own Durand–Kerner root finder into minimum-phase Daubechies and least-asymmetric Symlet scaling filters (no coefficient tables anywhere). A MULTIRESOLUTION ANALYSIS peels a signal into octave-wide detail bands plus a smooth approximation that sum back to the input at the 1e-15 floating-point floor — PERFECT RECONSTRUCTION is structural, the synthesis step being the exact adjoint of a paraunitary analysis operator — with the quadrature-mirror filter pair drawn power-complementing across ω = π/2. Then WAVELET DENOISING on the Donoho–Johnstone Blocks/Bumps/HeaviSine/Doppler suite: estimate the noise σ from the finest band's median absolute deviation, then shrink coefficients by VisuShrink (universal), SureShrink (Stein's unbiased risk) or BayesShrink, soft or hard — keeping ~10% of the coefficients while lifting SNR by many dB, the whole point of wavelets made visible. A fourth BEST-BASIS tab runs the full WAVELET PACKET tree — splitting both children at every node, not just the low-pass — and the COIFMAN–WICKERHAUSER bottom-up search picks the minimum-cost admissible basis (Shannon-entropy or ℓ¹) that represents the signal most sparsely, drawn as an ADAPTIVE TIME-FREQUENCY TILING whose strip heights vary with the local resolution: fine bands where the signal is tonal, coarse where it is transient (Doppler packs 99% of its energy into ~4% of the coefficients). Every DWT tab also offers the symmetric BIORTHOGONAL CDF 5/3 and 9/7 wavelets — the JPEG-2000 pair — implemented by the LIFTING SCHEME (predict/update steps, each trivially invertible, so perfect reconstruction is structural). Plus a real 2-D image FFT, a phase-vocoder time-stretch/pitch-shift, a JPEG-lite DCT codec, and cepstral pitch detection. Deep-linkable; no math libraries.", "agent": "claude", "model": "claude-opus-4-8", - "tags": ["fourier", "fft", "dsp", "adaptive-filter", "lms", "nlms", "rls", "affine-projection", "kalman-filter", "wiener-filter", "least-squares", "system-identification", "noise-cancellation", "channel-equalization", "linear-prediction", "digital-communications", "modem", "qam", "bpsk", "qpsk", "ofdm", "awgn", "bit-error-rate", "gray-code", "root-raised-cosine", "pulse-shaping", "matched-filter", "constellation", "eye-diagram", "cyclic-prefix", "zero-forcing-equalizer", "multipath", "papr", "q-function", "forward-error-correction", "convolutional-code", "viterbi", "trellis", "soft-decision", "hard-decision", "coding-gain", "union-bound", "distance-spectrum", "free-distance", "puncturing", "add-compare-select", "ldpc", "low-density-parity-check", "belief-propagation", "sum-product", "min-sum", "tanner-graph", "message-passing", "iterative-decoding", "parity-check-matrix", "systematic-encoder", "progressive-edge-growth", "qc-ldpc", "hamming-code", "girth", "log-likelihood-ratio", "shannon-limit", "capacity-approaching", "waterfall-curve", "spectral-estimation", "super-resolution", "music", "root-music", "esprit", "capon", "mvdr", "burg", "maximum-entropy", "eigenvalue", "hermitian-eigensolver", "jacobi", "rayleigh-limit", "aic-mdl", "tomography", "ct-reconstruction", "radon-transform", "fourier-slice-theorem", "filtered-back-projection", "iterative-reconstruction", "sirt", "sart", "cgls", "limited-angle", "sinogram", "shepp-logan", "epicycles", "contour-tracing", "reassignment", "synchrosqueezing", "time-frequency", "microphone", "spectrogram", "pitch-detection", "filter-design", "z-plane", "elliptic-filter", "parks-mcclellan", "dct", "phase-vocoder", "wavelet", "continuous-wavelet-transform", "discrete-wavelet-transform", "dwt", "daubechies", "symlet", "orthonormal-filter-bank", "quadrature-mirror-filter", "multiresolution-analysis", "mallat-algorithm", "perfect-reconstruction", "spectral-factorization", "vanishing-moments", "wavelet-denoising", "wavelet-shrinkage", "visushrink", "sureshrink", "bayesshrink", "soft-thresholding", "wavelet-packet", "best-basis", "coifman-wickerhauser", "time-frequency-tiling", "biorthogonal-wavelet", "cdf-9-7", "cdf-5-3", "lifting-scheme", "jpeg2000", "linear-phase", "canvas", "react"], + "tags": ["fourier", "fft", "dsp", "adaptive-filter", "lms", "nlms", "rls", "affine-projection", "kalman-filter", "wiener-filter", "least-squares", "system-identification", "noise-cancellation", "channel-equalization", "linear-prediction", "digital-communications", "modem", "qam", "bpsk", "qpsk", "ofdm", "awgn", "bit-error-rate", "gray-code", "root-raised-cosine", "pulse-shaping", "matched-filter", "constellation", "eye-diagram", "cyclic-prefix", "zero-forcing-equalizer", "multipath", "papr", "q-function", "forward-error-correction", "convolutional-code", "viterbi", "trellis", "soft-decision", "hard-decision", "coding-gain", "union-bound", "distance-spectrum", "free-distance", "puncturing", "add-compare-select", "ldpc", "low-density-parity-check", "belief-propagation", "sum-product", "min-sum", "tanner-graph", "message-passing", "iterative-decoding", "parity-check-matrix", "systematic-encoder", "progressive-edge-growth", "qc-ldpc", "hamming-code", "girth", "log-likelihood-ratio", "shannon-limit", "capacity-approaching", "waterfall-curve", "polar-code", "channel-polarization", "arikan", "successive-cancellation", "sc-list-decoding", "crc-aided-decoding", "frozen-bits", "gaussian-approximation", "bhattacharyya-parameter", "density-evolution", "path-metric", "5g-nr", "tal-vardy", "spectral-estimation", "super-resolution", "music", "root-music", "esprit", "capon", "mvdr", "burg", "maximum-entropy", "eigenvalue", "hermitian-eigensolver", "jacobi", "rayleigh-limit", "aic-mdl", "tomography", "ct-reconstruction", "radon-transform", "fourier-slice-theorem", "filtered-back-projection", "iterative-reconstruction", "sirt", "sart", "cgls", "limited-angle", "sinogram", "shepp-logan", "epicycles", "contour-tracing", "reassignment", "synchrosqueezing", "time-frequency", "microphone", "spectrogram", "pitch-detection", "filter-design", "z-plane", "elliptic-filter", "parks-mcclellan", "dct", "phase-vocoder", "wavelet", "continuous-wavelet-transform", "discrete-wavelet-transform", "dwt", "daubechies", "symlet", "orthonormal-filter-bank", "quadrature-mirror-filter", "multiresolution-analysis", "mallat-algorithm", "perfect-reconstruction", "spectral-factorization", "vanishing-moments", "wavelet-denoising", "wavelet-shrinkage", "visushrink", "sureshrink", "bayesshrink", "soft-thresholding", "wavelet-packet", "best-basis", "coifman-wickerhauser", "time-frequency-tiling", "biorthogonal-wavelet", "cdf-9-7", "cdf-5-3", "lifting-scheme", "jpeg2000", "linear-phase", "canvas", "react"], "createdAt": "2026-07-03" } diff --git a/projects/spectra-fourier-7k9d/src/App.tsx b/projects/spectra-fourier-7k9d/src/App.tsx index bddc413b..dd72fbac 100644 --- a/projects/spectra-fourier-7k9d/src/App.tsx +++ b/projects/spectra-fourier-7k9d/src/App.tsx @@ -18,6 +18,7 @@ import Cepstrum from './modes/Cepstrum' import Modem from './modes/Modem' import Coding from './modes/Coding' import LDPC from './modes/LDPC' +import Polar from './modes/Polar' import About from './modes/About' const ROUTES = [ @@ -40,6 +41,7 @@ const ROUTES = [ { id: 'modem', label: 'Modem' }, { id: 'coding', label: 'Coding' }, { id: 'ldpc', label: 'LDPC' }, + { id: 'polar', label: 'Polar' }, { id: 'about', label: 'About' }, ] @@ -109,6 +111,7 @@ export default function App() { {active === 'modem' && } {active === 'coding' && } {active === 'ldpc' && } + {active === 'polar' && } {active === 'about' && }