Table of Contents
Fetching ...

Generalized Fourier Series: An N log2(N) extension for aperiodic functions that eliminates Gibbs oscillations

Narsimha Reddy Rapakaa, Mohamed Kamel Riahi

TL;DR

This paper presents Generalized Fourier Series (GFS), a spectral method that extends Fourier analysis to non-periodic functions by splitting the target into a periodic part, handled efficiently with FFT, and an adaptive, low-rank aperiodic part represented by non-harmonic complex sinusoids. The method leverages endpoint derivative jumps to construct a small set of dynamic modes, yielding high accuracy without domain extension and maintaining linear computational complexity comparable to FFT-based approaches. Numerical evidence across modulated sines, Gaussians, logs, and multi-mode signals demonstrates robust Gibbs suppression, fast convergence, and superior resolution relative to classical approaches such as Eckhoff, Roache, Prony, and finite-difference schemes. The framework promises impactful applications in numerical PDEs, signal processing, and computational physics, with potential extensions to multidimensional problems and more complex geometries.

Abstract

This article introduces the Generalized Fourier Series (GFS), a novel spectral method that extends the clas- sical Fourier series to non-periodic functions. GFS addresses key challenges such as the Gibbs phenomenon and poor convergence in non-periodic settings by decomposing functions into periodic and aperiodic com- ponents. The periodic part is represented using standard Fourier modes and efficiently computed via the Fast Fourier Transform (FFT). The aperiodic component employs adaptive, low-rank sinusoidal functions with non-harmonic modes, dynamically tuned to capture discontinuities and derivative jumps across domain boundaries. Unlike conventional Fourier extension methods, GFS achieves high accuracy without requiring compu- tational domain extensions, offering a compact and efficient representation of non-periodic functions. The adaptive low-rank approach ensures accuracy while minimizing computational overhead, typically involving additional complex modes for the aperiodic part. Furthermore, GFS demonstrates a high-resolution power, with degrees of freedom comparable to FFT in periodic domains, and maintains N log2(N) computational complexity. The effectiveness of GFS is validated through numerical experiments, showcasing its ability to approximate functions and their derivatives in non-periodic domains accurately. With its robust framework and minimal computational cost, GFS holds significant potential for advancing applications in numerical PDEs, signal processing, machine learning, and computational physics by providing a robust and efficient tool for high-accuracy function approximations.

Generalized Fourier Series: An N log2(N) extension for aperiodic functions that eliminates Gibbs oscillations

TL;DR

This paper presents Generalized Fourier Series (GFS), a spectral method that extends Fourier analysis to non-periodic functions by splitting the target into a periodic part, handled efficiently with FFT, and an adaptive, low-rank aperiodic part represented by non-harmonic complex sinusoids. The method leverages endpoint derivative jumps to construct a small set of dynamic modes, yielding high accuracy without domain extension and maintaining linear computational complexity comparable to FFT-based approaches. Numerical evidence across modulated sines, Gaussians, logs, and multi-mode signals demonstrates robust Gibbs suppression, fast convergence, and superior resolution relative to classical approaches such as Eckhoff, Roache, Prony, and finite-difference schemes. The framework promises impactful applications in numerical PDEs, signal processing, and computational physics, with potential extensions to multidimensional problems and more complex geometries.

Abstract

This article introduces the Generalized Fourier Series (GFS), a novel spectral method that extends the clas- sical Fourier series to non-periodic functions. GFS addresses key challenges such as the Gibbs phenomenon and poor convergence in non-periodic settings by decomposing functions into periodic and aperiodic com- ponents. The periodic part is represented using standard Fourier modes and efficiently computed via the Fast Fourier Transform (FFT). The aperiodic component employs adaptive, low-rank sinusoidal functions with non-harmonic modes, dynamically tuned to capture discontinuities and derivative jumps across domain boundaries. Unlike conventional Fourier extension methods, GFS achieves high accuracy without requiring compu- tational domain extensions, offering a compact and efficient representation of non-periodic functions. The adaptive low-rank approach ensures accuracy while minimizing computational overhead, typically involving additional complex modes for the aperiodic part. Furthermore, GFS demonstrates a high-resolution power, with degrees of freedom comparable to FFT in periodic domains, and maintains N log2(N) computational complexity. The effectiveness of GFS is validated through numerical experiments, showcasing its ability to approximate functions and their derivatives in non-periodic domains accurately. With its robust framework and minimal computational cost, GFS holds significant potential for advancing applications in numerical PDEs, signal processing, machine learning, and computational physics by providing a robust and efficient tool for high-accuracy function approximations.
Paper Structure (26 sections, 60 equations, 10 figures, 9 tables, 1 algorithm)

This paper contains 26 sections, 60 equations, 10 figures, 9 tables, 1 algorithm.

Figures (10)

  • Figure 1: Spectral leakage phenomena: Fast Fourier Transform (FFT) of a function $f(t)=0.7 \sin(2 \pi k_1 t) + \sin(2 \pi k_2 t), 0\le t\le 1$; (a) $f(t)$ is periodic with $k_1=5, k_2=12$, (b) $f(t)$ is non-periodic with $k_1=5.3, k_2=12.4$. Here, the sample frequency, $N=128$. (c) $f(t)$ is non-periodic with $k_1=5.3, k_2=12.4$ and is represented with generalized Fourier series with two non-periodic modes $k_1=5.3, k_2=12.4$.
  • Figure 2: A modulated sine function, defined in Eq. \ref{['eqn:modulated_sine']}, is approximated using GFS with $N=64$ mesh points. The decomposition into periodic and aperiodic parts is shown in (a, c), while (b,d) compares the numerical error in the first derivative for GFS and FFT against analytical values for $n=1$ and 2 aperiodic modes, respectively. The FFT shows Gibbs oscillations, resulting in $\mathcal{O}(1)$ error, whereas GFS avoids these oscillations, yielding a significantly lower numerical error by several orders of magnitude.
  • Figure 3: A Gaussian, defined in Eq. \ref{['def:gauss_func']}, is approximated using GFS with $N=64$ grid points, and $n=3$: (a) shows its decomposition into periodic and aperiodic components, while (b) compares the first derivative approximation using GFS and FFT against analytical values. GFS aligns well with the analytical results without exhibiting Gibbs oscillations, unlike FFT, which shows these oscillations.
  • Figure 4: For the Gaussian function defined in Eq. \ref{['def:gauss_func']}, convergence of the numerical error ($L^\infty-$ norm) in first derivative is compared for GFS, a sixth-order finite difference (FD6), FFT, Roache, Eckhoff, and Prony methods. For Roache and Eckhoff methods the jumps $J_m$ are evaluated analytically, and for GFS method $J_m$ are evaluated both analytically and numerically. Here, "$J_m:$ ideal" refers to the case where the jumps $J_m, m=0,1,\hdots,q-1, q=4n,$ are evaluated analytically. GFS is robust and exhibits superior convergence with mesh size $N$ for the same number of jumps ($q$), whether $J_m$ are evaluated analytically or numerically. The Prony method ($M=N/2$) is numerically unstable for large mesh sizes ($N>64$).
  • Figure 5: A function $u(x)=\log(x+\pi+1/2), -\pi\le x \le \pi$, is approximated with GFS using $N=32$ mesh points and $n=3$: Decomposition of $u(x)$ into periodic and aperiodic parts is shown in (a), approximation of the first derivative with GFS and FFT is compared with analytical values in (b); GFS does not exhibit Gibbs oscillations and aligns well with the analytic values while FFT shows Gibbs oscillations.
  • ...and 5 more figures

Theorems & Definitions (1)

  • Remark 1