Fourier Series Basics

The idea that any periodic waveform is a sum of sine waves — a DC term plus a fundamental and its harmonics. From the Fourier series formula f(t) = a₀/2 + ∑(aₙ cos nωt + bₙ sin nωt), to building a square wave, waveform symmetry, the frequency spectrum and the Gibbs phenomenon.

Complete Learning Path — Fourier Series

From what a Fourier series is, to the formula, harmonics, synthesis, symmetry, the spectrum, Gibbs and real uses

What is a Fourier Series?

A Fourier series is a way of writing any repeating waveform as a sum of simple sine and cosine waves. No matter how jagged a periodic signal looks — a square wave, a sawtooth, a distorted mains current — it is exactly equal to a constant level plus a sine at the base frequency plus a series of higher-frequency sines called harmonics.

The idea, published by Joseph Fourier in 1822, is one of the most useful in all of engineering: it lets us swap a complicated wave for a handful of pure sinusoids that we already know how to analyse. Because a circuit's response to a sine wave is easy to work out, we can analyse each harmonic separately and add up the results.

Animation of a Fourier series building a square wave from a fundamental sine plus its 3rd, 5th and higher odd harmonics
A Fourier series in action: start with the fundamental sine, keep adding odd harmonics, and the sum sharpens into a square wave. Every repeating wave can be built this way.
∑ sines
Any periodic wave
a₀/2
DC average term
Harmonic frequencies
1822
Fourier's insight
The one-line idea

Time domain → frequency domain. A Fourier series takes a wave drawn against time and re-describes it as a list of frequencies (harmonics) and how much of each is present. Same signal, two points of view.

The Fourier Series Formula

The trigonometric Fourier series has three parts: a DC term, a sum of cosine harmonics, and a sum of sine harmonics.

The trigonometric Fourier series formula f of t equals a0 over 2 plus sum of an cosine n omega t plus bn sine n omega t, with each term labelled
The trigonometric Fourier series. a₀/2 is the DC average, aₙ and bₙ are the coefficients (the weight of each harmonic), and nω gives the harmonic frequencies.

f(t) = a₀/2 + ∑n=1 ( aₙ cos nωt + bₙ sin nωt )

ω = 2πf is the angular frequency of the fundamental; n is the harmonic number (1, 2, 3…)

Often it is tidier to combine each cosine-and-sine pair into a single sine (or cosine) with an amplitude and a phase. That gives the amplitude–phase form, which maps directly onto the harmonic bars you see in a spectrum:

f(t) = C₀ + ∑ Cₙ sin( nωt + φₙ )

Cₙ = √(aₙ² + bₙ²) is the harmonic amplitude; φₙ is its phase angle

Reading the formula

Think of it as a recipe: a₀/2 sets the baseline, then for every harmonic n you stir in a measured amount of cos nωt and sin nωt. The coefficients aₙ, bₙ are the "how much" of each ingredient.

The Fundamental & Its Harmonics

Every term in the series is a sine wave at an integer multiple of one base frequency. The n = 1 term is the fundamental; everything above it is a harmonic.

A periodic signal split into its Fourier components: a DC level, the fundamental sine, the 2nd harmonic at twice the frequency and the 3rd harmonic at three times the frequency
The building blocks: a DC level, the fundamental (1×f), the 2nd harmonic (2×f) and the 3rd harmonic (3×f). Add them back together and you get the original signal.
TermOrder nFrequencyRole
DC component00 HzThe average level (a₀/2)
Fundamental1fSets the period T = 1/f
2nd harmonic22fFirst overtone
3rd harmonic33fAdds detail / sharpens edges
nth harmonicnnfFiner and finer structure

The fundamental fixes the repetition rate of the whole wave (its period). Harmonics never change the period — they only reshape the wave within it, because each harmonic completes a whole number of cycles per fundamental period.

Building a Square Wave (Fourier Synthesis)

The classic demonstration: a square wave is nothing but odd harmonics of a sine, with amplitudes falling as 1/n. Adding them one at a time is called Fourier synthesis.

square(t) = (4/π) [ sin ωt + ⅓ sin 3ωt + ⅕ sin 5ωt + ⅙ sin 7ωt + … ]

only odd harmonics (1, 3, 5, 7…), each scaled by 1/n

With just the fundamental you get a plain sine. Add the 3rd harmonic and the tops start to flatten. Add the 5th, 7th and beyond and the edges grow steeper until the shape is unmistakably square. The animation in the hero above shows exactly this progression.

Worked example — amplitude of each harmonic

If the fundamental of a square wave has amplitude A₁ = 1.0, then:

3rd = 1/3 ≈ 0.333, 5th = 1/5 = 0.20, 7th = 1/7 ≈ 0.143, 9th = 1/9 ≈ 0.111. The harmonics shrink quickly, which is why the first few already give a recognisable square.

Different waves, different recipes

A triangle wave also uses only odd harmonics but they fall much faster (as 1/n²), so it looks smooth. A sawtooth uses all harmonics (1/n). The recipe of harmonics is what makes each waveform look the way it does.

Finding the Coefficients (a₀, aₙ, bₙ)

The coefficients tell you how much of each harmonic a signal contains. They are found by integrating the signal against a cosine or sine over one period — a process called analysis.

aₙ = (2/T) ∫T f(t) cos nωt dt   ·   bₙ = (2/T) ∫T f(t) sin nωt dt

a₀ = (2/T) ∫T f(t) dt is twice the average, so a₀/2 is the DC level; T is the period

Each integral acts like a filter that picks out just one harmonic: multiplying by cos nωt and averaging over a period leaves only the part of the signal at that exact frequency, because different harmonics are orthogonal — their products average to zero over a full period. That orthogonality is the mathematical reason the whole method works.

You rarely integrate by hand

For measured signals, instruments and software use the FFT (fast Fourier transform) to compute the coefficients numerically. The integrals matter for understanding why a spectrum looks the way it does, but the FFT does the heavy lifting in practice.

Waveform Symmetry: A Powerful Shortcut

Before computing anything, look at the symmetry of the wave. Symmetry cancels whole families of terms, saving huge amounts of work.

Three panels showing even symmetry giving cosine terms only, odd symmetry giving sine terms only, and half-wave symmetry giving odd harmonics only
Symmetry decides which terms survive: even symmetry → cosines only, odd symmetry → sines only, half-wave symmetry → odd harmonics only.

Even symmetry

f(−t) = f(t). Mirror image about the vertical axis. Only cosine terms survive (all bₙ = 0).

Odd symmetry

f(−t) = −f(t). Point symmetry about the origin. Only sine terms survive (all aₙ = 0).

Half-wave symmetry

f(t+T/2) = −f(t). Second half inverts the first. Only odd harmonics survive.

No even harmonics

Most power-electronic waves have half-wave symmetry, so the even harmonics vanish — matching real harmonic spectra.

The Frequency Spectrum (Line Spectrum)

Plot the harmonic amplitudes as bars and you get the frequency spectrum — the same signal seen in the frequency domain instead of against time.

Line spectrum of a square wave: a tall fundamental bar then 3rd, 5th, 7th and higher odd harmonics with amplitudes falling as one over n
The line spectrum of a square wave: bars only at the odd harmonics, heights falling as 1/n. A pure sine would show a single bar at the fundamental.

The spectrum makes the character of a wave obvious at a glance. A pure sine is a single line. A square or sawtooth shows a whole comb of harmonics. This is precisely the view used to measure Total Harmonic Distortion (THD), where the harmonic bars are compared against the fundamental.

Series vs. transform

A Fourier series (periodic signals) gives a discrete line spectrum. A Fourier transform (non-periodic signals) gives a continuous spectrum. Same core idea, applied to different kinds of signal.

The Gibbs Phenomenon

Real hardware and real calculations use only a finite number of harmonics. Near a sharp jump, that always produces a tell-tale overshoot of about 9% — the Gibbs phenomenon.

Gibbs phenomenon: a Fourier partial sum overshoots a square wave edge by about 9 percent, and the overshoot remains as harmonics increase from 5 to 15 to 45
As the number of harmonics rises (5 → 15 → 45) the ripple narrows, but the overshoot at each jump stubbornly stays near 9%. That is the Gibbs phenomenon.

The overshoot happens because a sum of smooth, continuous sines can never perfectly reproduce an instantaneous jump. Adding harmonics squeezes the ripple into a narrower region around the edge, but the peak height of the spike does not shrink below about 9% of the jump. It is a fundamental limit worth remembering whenever you reconstruct or filter a signal.

Why the Fourier Series Matters in Electrical Engineering

Almost every electrical waveform repeats, so the Fourier series is everywhere in power and signal work.

Harmonics & THD

Distorted mains current is read harmonic-by-harmonic to compute THD and check power quality.

PWM & inverters

The spectrum of a PWM waveform shows the wanted fundamental plus switching harmonics to filter out.

Filter design

Knowing which harmonics are present tells you exactly where a filter must cut.

Circuit analysis

Analyse each harmonic through the circuit's reactance, then add the responses back up.

Audio & signals

Tone, timbre and communications signals are all described by their harmonic content.

DSP & the FFT

The FFT — the fast digital Fourier series — underpins modern signal processing.

Key Terms at a Glance

The essential Fourier vocabulary students and engineers search for.

Fourier series

Periodic wave as a sum of harmonic sines.

Fundamental

The n = 1 term at base frequency f.

Harmonic (n)

Component at n×f.

Coefficients

a₀, aₙ, bₙ — weight of each term.

Spectrum

Amplitude vs harmonic order.

Gibbs

≈9% overshoot at a jump.

Frequently Asked Questions

Quick, clear answers to the questions people ask most about the Fourier series.

What is a Fourier series in simple terms?

It is a way of building any repeating waveform out of simple sine and cosine waves. A signal equals a constant average level (the DC term) plus a fundamental sine and a set of harmonics at 2×, 3×, 4× the fundamental frequency. Add the right amount of each and you can reconstruct square, triangle and sawtooth waves from pure sines.

What is the formula for a Fourier series?

The trigonometric form is f(t) = a₀/2 + ∑ (aₙ cos nωt + bₙ sin nωt), summed from n = 1 to infinity. Here a₀/2 is the DC level, ω = 2πf is the fundamental's angular frequency, n is the harmonic number, and aₙ, bₙ are the Fourier coefficients.

What is the difference between the fundamental and harmonics?

The fundamental is the n = 1 term at the base frequency f, which sets the period of the whole wave. Harmonics are the higher terms (n = 2, 3, 4…) at 2f, 3f, 4f. The fundamental usually carries most of the energy; the harmonics add the detail that shapes the wave.

How does a Fourier series build a square wave?

An ideal square wave is the sum of only the odd harmonics, with amplitudes falling as 1/n: sin ωt + ⅓ sin 3ωt + ⅕ sin 5ωt + …. As you add more odd harmonics the sum grows flatter tops and steeper edges and approaches a perfect square.

What are the Fourier coefficients a₀, aₙ and bₙ?

They say how much of each component is present. a₀ is twice the average (so a₀/2 is the DC level), aₙ is the amount of the cosine harmonic n, and bₙ the amount of the sine harmonic n. Each is found by integrating the signal times the matching cosine or sine over one period, scaled by 2/T.

How does waveform symmetry simplify a Fourier series?

Even functions (f(−t)=f(t)) have only cosine terms, so every bₙ=0. Odd functions (f(−t)=−f(t)) have only sine terms, so every aₙ=0. Waves with half-wave symmetry (a half-period shift inverts them) contain only odd harmonics. Spotting symmetry first saves a lot of calculation.

What is the frequency spectrum of a waveform?

It is a bar chart of the Fourier series — one line per harmonic, its height equal to that harmonic's amplitude. It shows the signal in the frequency domain. A square wave's spectrum has bars only at the odd harmonics, falling as 1/n; a pure sine is a single bar.

What is the Gibbs phenomenon?

It is the overshoot that appears when a Fourier series with a finite number of harmonics tries to reproduce a sharp jump, such as a square-wave edge. The partial sum overshoots by about 9%. Adding more harmonics narrows the ripple but never removes the spike.

What is the difference between a Fourier series and a Fourier transform?

A Fourier series applies to periodic signals and gives discrete harmonics (a line spectrum). A Fourier transform applies to non-periodic signals and gives a continuous spectrum. The series is the special case used for repeating waveforms like AC power and switching waveforms.

Why is the Fourier series important in electrical engineering?

Because most electrical waveforms repeat. It underpins harmonics and THD in power systems, the spectrum of PWM and inverter waveforms, filter design, and circuit analysis with non-sinusoidal signals — letting engineers treat a complex repeating wave as a set of simple sines.

Conclusion & Key Takeaways

The Fourier series is the bridge between the time domain and the frequency domain: any periodic wave is a sum of harmonic sines.

Sum of sines

Any periodic wave = DC + harmonics.

f(t) = a₀/2 + ∑(aₙcos + bₙsin)

The trigonometric series.

Fundamental + harmonics

n = 1 base, n = 2,3… detail.

Square = odd 1/n

Synthesis from sines.

Symmetry shortcuts

Even→cos, odd→sin.

Spectrum & Gibbs

Line spectrum; 9% overshoot.

Continue Learning