Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

02 - Spectral Windowing Techniques and Error Control

Introduction

In practical measurements, we always face constraints of finite resources:

  • Finite time: measurement window
  • Finite bandwidth: effective frequency band
  • Finite complexity: discrete sampling points

These limitations inevitably introduce errors. But errors are not uncontrollable—through clever choice of window functions, we can minimize errors under given resource constraints.

The core tool of this chapter is PSWF/DPSS window functions:

  • PSWF (Prolate Spheroidal Wave Functions): continuous case
  • DPSS (Discrete Prolate Spheroidal Sequences): discrete case

They are functions with optimal energy concentration under time-frequency dual constraints, making them ideal choices for spectral windowed readout.

Triple Decomposition of Errors

According to euler-gls-extend/error-controllability-finite-order-pswf-dpss.md, the total error can be decomposed into three independent parts:

Type One: Main Leakage (Band-limiting Leakage)

Physical picture:

Imagine a signal’s spectrum; we only measure within . Energy outside the band “leaks” and cannot be captured.

graph LR
    A["True Spectrum<br/>Φ(ω)"] --> B["Band-Limited Window<br/>W(ω)"]
    B --> C["Captured Energy<br/>λ_0"]
    B --> D["Leaked Energy<br/>1-λ_0"]

    style C fill:#e8f5e8
    style D fill:#ffe8e8

Mathematical definition:

Let be the optimal window function (frequency-domain form of PSWF), be the band-limiting projection operator:

Then the main leakage is:

where is the largest eigenvalue of PSWF.

Theorem 1 (Extremal Window Uniqueness):

Under constraints of time limit and band limit , the window function that maximizes energy concentration is unique (up to phase) and satisfies:

Proof: See Appendix A.1 (based on Sturm-Liouville theory and oscillation theorem).

Type Two: Cross-Term (Multiplicative Cross-term)

Physical picture:

When a signal is multiplicatively modulated (e.g., multiplied by a window function), convolution occurs in the frequency domain. A signal originally band-limited may thus “spread” beyond the band.

Example:

Signal band-limited to , multiplied by window function :

Frequency domain:

Even if is compactly supported on , may extend to a wider range.

Theorem 2 (Hankel-HS Exact Formula):

For , band-limiting projection , define multiplication operator , then:

where:

Geometric meaning:

is the measure of the “Hankel block”: for frequency shift , it measures the complement of the overlap length between and .

Upper bound estimate:

For optimal window :

The first term (Hankel-HS) can be computed exactly, the second term (leakage) is known.

Engineering implementation:

def hankel_hs_norm(x_hat, W):
    """Compute Hankel-HS norm"""
    delta = np.fft.fftfreq(len(x_hat)) # frequency shift
    sigma_W = np.minimum(2*W, np.abs(delta))
    hs_sq = np.sum(np.abs(x_hat)**2 * sigma_W)
    return np.sqrt(hs_sq)

Type Three: Sum-Integral Difference (Euler-Maclaurin Remainder)

Physical picture:

In discrete measurements, we use summation instead of integration:

The difference is the EM remainder.

Theorem 3 (EM Remainder Upper Bound):

For (-th derivative in ), the EM remainder satisfies:

If is band-limited to and localized in a region of length , then:

Threshold values (to achieve precision):

Order Threshold:
21.645
31.017
41.004

cancellation phenomenon:

Note that:

  • BPW inequality:
  • EM constant denominator:

They completely cancel! This automatically holds under cycles normalization .

Experimental choice:

Given , choose the minimum such that is below tolerance.

Construction and Properties of PSWF/DPSS

Continuous PSWF

Definition:

Fix time limit , band limit , define integral operator:

Its eigenvalue problem:

defines PSWF.

Properties:

  1. Orthogonality: are orthogonal in
  2. Ordering:
  3. Energy concentration: is the frequency-domain energy fraction of within
  4. Optimality: The subspace spanned by the first PSWFs has the maximum total energy concentration among all -dimensional subspaces

Eigenvalue asymptotics:

Define Shannon number:

Then:

  • When , (nearly perfect)
  • When , (exponential decay)

Effective degrees of freedom:

Physical meaning: Under constraints of time limit and band limit , the number of reliably encodable independent modes .

Discrete DPSS

Definition:

Sequence of length , normalized bandwidth , Toeplitz matrix:

Diagonal elements: .

Eigenvalue problem:

DPSS: , energy concentration .

Discrete Shannon number:

Properties:

Parallel to PSWF, but on discrete grid. Particularly suitable for digital signal processing.

Non-Asymptotic Eigenvalue Upper Bound

Theorem 5 (KRD Upper Bound):

Let (continuous) or (discrete), then the principal eigenvalue satisfies:

Minimum integer threshold:

Define as the minimum integer such that the right-hand side .

Precision Application
3351.8Engineering level
4266.0Precision measurement
5078.5Ultra-precision

Window-shape independent:

This is a non-asymptotic, explicit upper bound, independent of specific window function shape, requiring only !

Topological Integer Main Term: Spectral Flow Projection Pair Index

Topological Origin of Sum-Integral Difference

Frequency-domain smooth multiplier , define:

Modulation group:

Relative projection:

Theorem 4 (Spectral Flow Projection Pair Index):

If (trace class), strongly continuous, then:

where .

Physical meaning:

The difference between sum and integral , under appropriate regularization, equals some spectral flow—this is a topological invariant, necessarily an integer!

Integer main term + analytic tail term:

The first term (spectral flow) is robust to smooth perturbations, the second term (EM remainder) is controlled by Theorem 3.

Experimental Error Budget Workflow

Step 1: Determine Resource Constraints

  • Time window: (measurement duration)
  • Frequency band: (instrument bandwidth)
  • Number of samples: (ADC bits, sampling rate)

Step 2: Compute Shannon Number

Step 3: Look Up Error Upper Bound

According to and target precision , consult Theorem 5’s table:

  • If , then main leakage
  • Otherwise, increase or or

Step 4: Compute Cross-Term

If there is multiplicative modulation (e.g., window function, foreground removal), compute Hankel-HS:

If is narrowband and pre-filtered, .

Step 5: Estimate EM Remainder

Choose order such that .

Compute or estimate (usually from signal prior constraints).

Step 6: Total Error Budget

If meets requirements, the scheme is feasible; otherwise optimize parameters.

Workflow Diagram

graph TB
    A["Determine Resources<br/>T, W, N"] --> B["Compute Shannon Number<br/>N_0"]
    B --> C{"N_0 ≥ N_0*(ε)?"}
    C -->|No| D["Increase Resources"]
    D --> A
    C -->|Yes| E["Compute Cross-Term<br/>Ξ_W"]
    E --> F["Estimate EM Remainder"]
    F --> G["Total Error<br/>ε_total"]
    G --> H{"Meets Requirements?"}
    H -->|No| I["Optimize Parameters"]
    I --> A
    H -->|Yes| J["Execute Measurement"]

    style J fill:#e8f5e8

Case Study: FRB Windowed Upper Bound

Background

Fast Radio Bursts (FRB) traverse cosmological distances, phase accumulation:

where is the refractive index correction (e.g., vacuum polarization).

Windowing Strategy

  • Observation band: GHz (CHIME)
  • Frequency resolution: MHz
  • Number of channels:

Shannon number:

Main leakage upper bound ():

Far exceeds requirements! Actual limitation comes from systematic errors.

Systematic Modeling

Foreground: Galactic dispersion, ionosphere, instrument response

Basis functions:

Windowed residual:

Error Decomposition

  1. Main leakage: (negligible)
  2. Cross-term: after foreground removal
  3. EM remainder: dense sampling

Total budget: (dominated by systematics)

Upper Bound Result

If observed residual , then:

For Gpc, GHz, mrad:

This is far better than QED one-loop prediction (see Chapter 5), so only an upper bound can be given.

Case Study: δ-Ring Spectral Measurement

Background

Spectral equation of δ-ring:

Measure , extract .

Discrete DPSS Window

  • Number of measurement points: (scan )
  • Effective bandwidth: (normalized)

Shannon number:

Main leakage ():

Inversion Algorithm

def invert_alpha_delta(k_values, theta_values, L):
    """Invert δ-potential strength from spectral data"""
    def residual(alpha):
        # Spectral equation
        lhs = np.cos(k_values * L) + (alpha / k_values) * np.sin(k_values * L)
        rhs = np.cos(theta_values)
        return np.sum((lhs - rhs)**2)

    result = minimize(residual, x0=1.0)
    return result.x[0]

Ill-Conditioned Domain Avoidance

Define sensitivity:

Ill-conditioned domain:

Strategy: Choose such that measurement points avoid ill-conditioned domain.

Engineering Implementation: Numerical Algorithms

PSWF Computation

Method 1: Direct diagonalization

def compute_pswf(T, W, N=128):
    """Compute first N PSWFs"""
    t = np.linspace(-T, T, 1024)
    dt = t[1] - t[0]

    # Integral operator kernel
    def kernel(s, t):
        return np.sinc(W * (t - s) / np.pi)

    # Construct matrix
    K = np.zeros((len(t), len(t)))
    for i, ti in enumerate(t):
        for j, sj in enumerate(t):
            K[i,j] = kernel(sj, ti) * dt

    # Diagonalize
    eigvals, eigvecs = np.linalg.eigh(K)
    idx = np.argsort(eigvals)[::-1] # descending order
    return eigvals[idx[:N]], eigvecs[:,idx[:N]]

Method 2: Exploit symmetry (fast algorithm)

PSWF is the solution of the prolate spheroidal differential equation, can use special function libraries (e.g., scipy.special.pro_ang1).

DPSS Computation

from scipy.signal import windows

def compute_dpss(N, NW, num_windows=8):
    """Compute DPSS windows"""
    return windows.dpss(N, NW, num_windows, return_ratios=False)

Windowed Readout

def windowed_readout(signal, windows):
    """Extract coefficients using window function family"""
    coeffs = []
    for w in windows:
        c = np.dot(signal, w) / np.linalg.norm(w)**2
        coeffs.append(c)
    return np.array(coeffs)

Reconstruction

def reconstruct(coeffs, windows):
    """Reconstruct signal from windowed coefficients"""
    return np.sum([c * w for c, w in zip(coeffs, windows)], axis=0)

Summary

This chapter establishes a complete error control system for spectral windowing techniques:

Theoretical Foundation

  1. Triple error decomposition: main leakage + cross-term + EM remainder
  2. PSWF/DPSS optimality: maximum time-frequency concentration
  3. Topological integer main term: spectral flow projection pair index

Key Formulas

  • Main leakage:
  • Cross-term:
  • EM remainder:

Experimental Workflow

  1. Determine
  2. Look up main leakage upper bound
  3. Compute cross-term (if modulation exists)
  4. Estimate EM remainder (if discrete sampling)
  5. Total budget feasibility judgment

Application Cases

  • FRB windowed upper bound: Shannon number , main leakage negligible, systematics dominate
  • δ-ring spectral measurement: Shannon number , main leakage extremely small, ill-conditioned domain needs avoidance

The next chapter will focus on the optical implementation of topological fingerprints, showing how to measure discrete invariants such as -steps and parity.

References

[1] Slepian, D., Pollak, H. O., “Prolate spheroidal wave functions, Fourier analysis and uncertainty — I,” Bell Syst. Tech. J. 40, 43 (1961).

[2] Thomson, D. J., “Spectrum estimation and harmonic analysis,” Proc. IEEE 70, 1055 (1982).

[3] Vaaler, J. D., “Some extremal functions in Fourier analysis,” Bull. AMS 12, 183 (1985).

[4] Littmann, F., “Entire approximations to the truncated powers,” Constr. Approx. 22, 273 (2005).

[5] Atkinson, K., Han, W., Theoretical Numerical Analysis, Springer (2009).

[6] euler-gls-extend/error-controllability-finite-order-pswf-dpss.md (source theoretical document)