Skip to main content

Fourier Series & Signal Analyzer Calculator

Decompose periodic signals into Fourier series, compare harmonics, view waveform reconstruction, and explore frequency spectra with animated, student-friendly visuals.

Background

A Fourier series represents a repeating signal as a sum of sine and cosine waves. This calculator helps students see how harmonics build square, triangle, sawtooth, pulse, and custom-looking periodic signals.

Analyze a periodic signal

Big idea

Fourier series builds a repeating signal by adding sine and cosine waves.

Choose a signal type

Start with a classic waveform, then change the number of harmonics to see the reconstruction improve.

Signal settings

Percent high time. Used for pulse wave.

Harmonic controls

More harmonics usually gives a better reconstruction, but sharp corners create visible ringing called the Gibbs phenomenon.

Quick picks

Options

Result

No result yet. Choose a signal and click Analyze Signal.

The first graph compares the target signal with its Fourier partial sum. The second graph shows harmonic amplitudes.

How to use this calculator

  • Choose a periodic signal: square, triangle, sawtooth, or pulse.
  • Set the amplitude, fundamental frequency, optional DC offset, and duty cycle if using pulse mode.
  • Adjust the number of harmonics to see how the Fourier partial sum approaches the target waveform.
  • Use the spectrum chart to identify which harmonics contribute most to the signal.
  • Read the steps and interpretation to connect the visual pattern to the Fourier series equation.

How this calculator works

  • It builds a Fourier partial sum from the selected waveform’s known sine and cosine coefficients.
  • It samples the target signal and reconstructed signal over one period.
  • It estimates reconstruction error using root mean square error across the sampled points.
  • It draws harmonic magnitudes as a frequency spectrum so students can see how energy spreads across harmonics.
  • For discontinuous signals, it flags overshoot and ringing as a normal Fourier-series effect.

Formula & Equations Used

Fourier series: f(t) ≈ a₀/2 + Σ[aₙcos(nω₀t) + bₙsin(nω₀t)]

Fundamental angular frequency: ω₀ = 2πf₀

Harmonic frequency: fₙ = nf₀

Harmonic magnitude: Cₙ = √(aₙ² + bₙ²)

RMS reconstruction error: RMSE = √mean((target − partial sum)²)

Example Problem & Step-by-Step Solution

Example 1 — Square wave reconstruction

  1. Choose square wave with amplitude A = 1.
  2. Use only odd sine harmonics: bₙ = 4A/(πn) for odd n.
  3. Set harmonics to 15 and compare the purple partial sum with the target waveform.
  4. Notice the ringing near jumps. That overshoot is the Gibbs phenomenon.

Example 2 — Triangle wave spectrum

  1. Choose triangle wave.
  2. Only odd harmonics appear, but their amplitudes shrink roughly like 1/n².
  3. The spectrum bars drop faster than the square-wave bars.
  4. This is why triangle waves look smooth with fewer harmonics.

Example 3 — Pulse wave duty cycle

  1. Choose pulse wave and set duty cycle to 25%.
  2. The calculator includes a DC term because the signal is high for only part of the period.
  3. Change the duty cycle and watch the spectrum reshape.
  4. This connects Fourier series to digital signals, electronics, sound, and communication systems.

Frequently Asked Questions

Q: What is a Fourier series?

A Fourier series represents a periodic signal as a sum of sine and cosine waves at integer multiples of a fundamental frequency.

Q: What are harmonics?

Harmonics are frequencies equal to f₀, 2f₀, 3f₀, and so on. Their amplitudes determine the signal shape.

Q: Why does a square wave need many harmonics?

A square wave has sharp jumps. Sharp edges require high-frequency harmonics, so the reconstruction improves as more harmonics are added.

Q: What is the Gibbs phenomenon?

Gibbs phenomenon is the overshoot and ringing that appears near jump discontinuities in Fourier-series approximations.

All Calculators & ConvertersAll calculators