Table of Contents
Fetching ...

Spectral Derivatives

Pavel Komarov

TL;DR

The paper surveys spectral-derivative techniques, detailing how differentiation can be carried out efficiently in the Fourier domain and how to extend these ideas to Chebyshev bases for nonperiodic data. It covers discrete and continuous transforms, interpolation schemes, and the subtleties of endpoint handling and Gibbs phenomena, then presents Chebyshev-derivative strategies via Fourier reduction and series recurrence. Practical aspects include multidimensional extensions, domain mappings, and noise-robust filtering, with explicit caveats about Runge effects and edge sensitivity in polynomial bases. The result is a comprehensive framework for accurate, efficient spectral differentiation across domains and representations, with attention to numerical stability and applicability to real data with noise.

Abstract

One of the happiest accidents in all math is the ease of transforming a function to and taking derivatives in the Fourier frequency domain. But in order to exploit this extraordinary fact without serious artefacting, and in order to be able to use a computer, we need quite a bit of extra knowledge and care. This document sets out the math behind the spectral-derivatives Python package. I touch on fundamental signal processing and calculus concepts as necessary and build upwards.

Spectral Derivatives

TL;DR

The paper surveys spectral-derivative techniques, detailing how differentiation can be carried out efficiently in the Fourier domain and how to extend these ideas to Chebyshev bases for nonperiodic data. It covers discrete and continuous transforms, interpolation schemes, and the subtleties of endpoint handling and Gibbs phenomena, then presents Chebyshev-derivative strategies via Fourier reduction and series recurrence. Practical aspects include multidimensional extensions, domain mappings, and noise-robust filtering, with explicit caveats about Runge effects and edge sensitivity in polynomial bases. The result is a comprehensive framework for accurate, efficient spectral differentiation across domains and representations, with attention to numerical stability and applicability to real data with noise.

Abstract

One of the happiest accidents in all math is the ease of transforming a function to and taking derivatives in the Fourier frequency domain. But in order to exploit this extraordinary fact without serious artefacting, and in order to be able to use a computer, we need quite a bit of extra knowledge and care. This document sets out the math behind the spectral-derivatives Python package. I touch on fundamental signal processing and calculus concepts as necessary and build upwards.

Paper Structure

This paper contains 34 sections, 69 equations, 6 figures, 2 algorithms.

Figures (6)

  • Figure : An example of the Gibbs phenomenon, from kutz. Using more modes allows the solution to fit better in the middle of the domain but makes peaks at the edges more extreme.
  • Figure : Relationship of Chebyshev domain and Fourier Domain, from dedalus. Notice the cosines are horizontally flipped. The authors use $n$ instead of $k$, which is common for Chebyshev polynomials (e.g. trefethen8), but I prefer $k$ to enumerate basis modes, for consistency.
  • Figure : The Runge phenomenon, demonstrated in (a) and (b), mitigated in (c) and (d), from kutz
  • Figure : Illustration of implicit function manipulations in the first two steps of the algorithm. The edges of the aperiodic function can be made to match by "periodic extension", but this operation alone only fixes discontinuity; corners are created at 0 and $\pi$, resulting in Gibbs phenomenon when we frequency transform. Warping stretches corners into smooth transitions.
  • Figure : Typical energy spectrum of a noisy signal, before and after sampling. $f_s$ is a sampling rate of our choosing.
  • ...and 1 more figures