Type to search, in English or Thai

  1. Home
  2. Lessons in English
  3. Fourier series (in Thai)
  4. What is a Fourier series?

// Fourier series · Lesson 1 · What Is a Fourier Series?

What Is a Fourier Series? Every Periodic Wave Is a Sum of Sines

The square wave from a function generator, the output voltage of an inverter, the current a computer draws from the wall socket: none of them is a sine wave. Yet any shape that repeats itself can always be written as a sum of sine waves. That is Joseph Fourier's idea, and it is the language electrical engineers use whenever they talk about harmonics, filters and power quality. This page builds the picture first; the calculations come in the next lessons.

By Ajarn ModUpdated
The 30-second version
  • A periodic signal x(t+T)=x(t)x(t + T) = x(t) has a fundamental frequency f0=1/Tf_0 = 1/T.
  • x(t)=a0+∑n=1∞[ancos⁡nω0t+bnsin⁡nω0t]x(t) = a_0 + \sum_{n=1}^{\infty}\big[a_n\cos n\omega_0 t + b_n \sin n\omega_0 t\big] with ω0=2πf0\omega_0 = 2\pi f_0.
  • Term number nn is the n-th harmonic, at frequency nf0nf_0. A 50 Hz supply therefore has harmonics at 150, 250, 350 Hz …
  • A plot of An=an2+bn2A_n = \sqrt{a_n^2 + b_n^2} against nn is the spectrum: what the FFT on a scope or a power analyzer shows you.
LevelBasic high school · year 1Intermediate engineering BScAdvanced MSc · research

The idea: sine waves are the building blocks of every periodic wave Basic

Think of a chord on a guitar. What you hear is several notes sounding at once, and your ear can still tell which notes are in it. A Fourier series does the same thing to an electrical signal: it tells you which sine-wave frequencies a repeating waveform is made of, how big each one is, and how far each one is shifted in phase.

There is only one condition: the signal must be periodic. The waveform has to repeat itself exactly every TT seconds. That means the only sine waves allowed in the mix are the ones that fit a whole number of times into that period, namely f0,2f0,3f0,…f_0, 2f_0, 3f_0, \dots, and nothing in between.

F1 Periodic signal & fundamental frequency

x(t+T)=x(t),f0=1T,ω0=2πf0=2πTx(t + T) = x(t), \qquad f_0 = \frac{1}{T}, \qquad \omega_0 = 2\pi f_0 = \frac{2\pi}{T}

TT is the shortest time after which the shape repeats. For the 50 Hz mains: f0=50f_0 = 50 Hz, T=20T = 20 ms, ω0=314.16\omega_0 = 314.16 rad/s.

F2 Harmonic frequencies

fn=nf0,ωn=nω0,n=1,2,3,…f_n = n f_0, \qquad \omega_n = n\omega_0, \qquad n = 1, 2, 3, \dots

n=1n = 1 is the fundamental, n=2n = 2 the second harmonic, and so on. A frequency that is not a whole multiple of f0f_0 is called an interharmonic; it has no place in a Fourier series.

F3 Fourier series (trigonometric form)

x(t)=a0+∑n=1∞[ ancos⁡(nω0t)+bnsin⁡(nω0t) ]x(t) = a_0 + \sum_{n=1}^{\infty} \Big[\, a_n \cos(n\omega_0 t) + b_n \sin(n\omega_0 t) \,\Big]

a0a_0 is the average (DC) value; ana_n and bnb_n say how much cosine and sine at frequency nf0nf_0 the signal contains. How to find them: T6 (in Thai) or the Fourier series calculator. · Some textbooks write a0/2a_0/2 instead of a0a_0. This series uses a0a_0 = the average over one period, because you can read it straight off as a DC voltage.

F4 Amplitude–phase form (one sine per harmonic)

x(t)=a0+∑n=1∞Ancos⁡(nω0t+φn),An=an2+bn2x(t) = a_0 + \sum_{n=1}^{\infty} A_n \cos(n\omega_0 t + \varphi_n), \qquad A_n = \sqrt{a_n^2 + b_n^2}

A cosine and a sine of the same frequency combine into a single sinusoid (harmonic addition, see applications of trigonometry). AnA_n is the amplitude (peak value) of the n-th harmonic. The angle φn\varphi_n is treated in C3 (in Thai).

−101tT/2Tsquaref₀ (n = 1)3f₀ × ⅓5f₀ × ⅕sum of 3
A square wave (dashed) and sine waves at f0f_0, 3f03f_0 and 5f05f_0, with sizes 1,13,151, \tfrac13, \tfrac15 of the first one. The sum of just these three (orange) is already getting square corners.

Synthesis: adding sines until you get a square wave Basic

A square wave that swings between ±A\pm A has the series x(t)=4Aπ[sin⁡ω0t+13sin⁡3ω0t+15sin⁡5ω0t+⋯]x(t) = \tfrac{4A}{\pi}\big[\sin\omega_0 t + \tfrac13 \sin 3\omega_0 t + \tfrac15 \sin 5\omega_0 t + \cdots\big]: odd harmonics only, with sizes falling off as 1/n1/n. Where the formula comes from is worked out in example T-1 (in Thai). For now, take it on trust and check with your own eyes that the terms really add up to a square. The synthesis lab (Thai interface) lets you add one harmonic at a time; the Fourier series calculator gives the coefficients of any waveform you type in.

Example F-1 · Three terms

Using harmonics 1, 3 and 5 of a ±1\pm1 V square wave, find the value at t=T/4t = T/4 and at t=T/8t = T/8, and the percentage of the power these three terms carry

  1. At t=T/4t = T/4 the angle is ω0t=π/2\omega_0 t = \pi/2: sin⁡π2=1\sin\tfrac{\pi}{2} = 1, sin⁡3π2=−1\sin\tfrac{3\pi}{2} = -1, sin⁡5π2=1\sin\tfrac{5\pi}{2} = 1

    x5 ⁣(T4)=4π(1−13+15)=1.2732×0.8667=1.1035 Vx_5\!\left(\tfrac{T}{4}\right) = \frac{4}{\pi}\Big(1 - \tfrac13 + \tfrac15\Big) = 1.2732 \times 0.8667 = 1.1035\ \text{V}
  2. At t=T/8t = T/8 the angle is π/4\pi/4: sin⁡45∘=0.7071\sin 45^\circ = 0.7071, sin⁡135∘=0.7071\sin 135^\circ = 0.7071, sin⁡225∘=−0.7071\sin 225^\circ = -0.7071

    x5 ⁣(T8)=4π(0.7071+0.70713−0.70715)=1.0204 Vx_5\!\left(\tfrac{T}{8}\right) = \frac{4}{\pi}\Big(0.7071 + \tfrac{0.7071}{3} - \tfrac{0.7071}{5}\Big) = 1.0204\ \text{V}
  3. The power (RMS²) of the square wave is A2=1A^2 = 1. Harmonic nn carries An2/2A_n^2/2 (P5):

    12(4π)2(1+19+125)=0.8106×1.1511=0.9331\frac{1}{2}\Big(\frac{4}{\pi}\Big)^2\Big(1 + \tfrac19 + \tfrac1{25}\Big) = 0.8106 \times 1.1511 = 0.9331

At T/4 the three-term sum overshoots by 10 %, at T/8 by 2 %, yet those three terms already carry 93.3 % of the total power. The fundamental alone carries 81.1 %; the rest is what makes the corners sharp.

Check in the lab: set N = 5 and read “power included”: 93.31 % ✓

Notice: the more harmonics you add, the sharper the corners get, but the spike next to each jump never goes away. It always reaches about 9 % of the size of the jump. This is the Gibbs phenomenon, explained in convergence and Parseval (in Thai).

The language of harmonics: terms you need to know Basic

Electrical work uses these words every day: in power-quality reports, in drive datasheets and on the screen of a meter.

F5 DC component = the average value

a0=1T∫0Tx(t) dta_0 = \frac{1}{T}\int_{0}^{T} x(t)\,dt

A pure sine wave has a0=0a_0 = 0. A rectified wave, or a 0-to-5 V pulse train, has a0≠0a_0 \neq 0. DC is the “zeroth” harmonic.

F6 Odd, even and triplen harmonics

odd: n=1,3,5,…even: n=2,4,…triplen: n=3,9,15,…\text{odd: } n = 1, 3, 5, \dots \quad \text{even: } n = 2, 4, \dots \quad \text{triplen: } n = 3, 9, 15, \dots

If the negative half-cycle is the positive half-cycle turned upside down, only odd harmonics exist (S4). · Triplen harmonics (odd multiples of 3) add up in the neutral conductor (H10).

F7 Line spectrum: looking at a signal in the frequency domain

x(t)  ⟷  { a0; (A1,φ1); (A2,φ2); … }at0, f0, 2f0, …x(t) \;\longleftrightarrow\; \{\, a_0;\ (A_1, \varphi_1);\ (A_2, \varphi_2);\ \dots \,\} \quad \text{at} \quad 0,\ f_0,\ 2f_0,\ \dots

A periodic signal has energy only at the frequencies nf0nf_0, so its spectrum is a set of separate bars, spaced f0=1/Tf_0 = 1/T apart. Instruments usually show the RMS value An/2A_n/\sqrt2, or the size as a % of the fundamental.

v20 ms40 msScope: you see the shapef%50 Hz150 Hz250 Hz100 %30 %15 %FFT / analyzer: you see the mix
One signal, two views. Left: the time domain (what a scope shows). Right: the frequency domain (what an FFT or a power analyzer shows). A 50 Hz voltage with a 3rd and a 5th harmonic.
Order nat 50 Hzat 60 HzTypical sources in electrical systems
0 (DC)0 Hz0 Hzhalf-wave rectification, equipment that has failed on one side
1 (fundamental)50 Hz60 Hzthe utility supply; almost all the real power is here
2100 Hz120 Hztransformer inrush current, asymmetric loads
3150 Hz180 Hzcomputer SMPS, LED lamps, saturated transformers → hot neutral
5, 7250, 350 Hz300, 420 Hz6-pulse three-phase rectifiers, VFDs, UPS (rectifiers, in Thai)
11, 13550, 650 Hz660, 780 Hz6-pulse (next pair) and 12-pulse rectifiers
around mfm_fkHzkHzswitching of PWM inverters (inverters, in Thai)

Reading off the coefficients without integrating Basic

If a signal is already written as a sum of sinusoids, it is its own Fourier series: just rearrange it to match F3. If it is a power of a sine, the power-reduction formulas from trigonometry turn it into a sum straight away.

Example F-2 · Read it directly

v(t)=12+5cos⁡(100πt)−2sin⁡(300πt)v(t) = 12 + 5\cos(100\pi t) - 2\sin(300\pi t) V. Find the period, f0f_0, a0a_0, ana_n, bnb_n and the RMS value

  1. The angular frequencies present are 100π100\pi and 300π300\pi rad/s. The largest frequency that both are whole multiples of is ω0=100π\omega_0 = 100\pi → f0=50f_0 = 50 Hz, T=20T = 20 ms.

  2. Compare with F3: a0=12a_0 = 12, a1=5a_1 = 5, b3=−2b_3 = -2; every other coefficient is zero (there is no 2nd harmonic).

  3. RMS from Parseval (P6): DC counts in full, each sinusoid as A/2A/\sqrt2

    Vrms=122+522+222=144+12.5+2=12.59 VV_{rms} = \sqrt{12^2 + \tfrac{5^2}{2} + \tfrac{2^2}{2}} = \sqrt{144 + 12.5 + 2} = 12.59\ \text{V}

f0=50f_0 = 50 Hz · a0=12a_0 = 12 V · a1=5a_1 = 5 V · b3=−2b_3 = -2 V · Vrms=12.59V_{rms} = 12.59 V

Example F-3 · Non-linearity creates harmonics

Feed x=sin⁡ωtx = \sin\omega t into a device whose output is y=x2y = x^2, and into one whose output is y=x3y = x^3. Which harmonics come out?

  1. Power-reduction formula from trigonometry (in Thai):

    sin⁡2ωt=12−12cos⁡2ωt\sin^2\omega t = \tfrac12 - \tfrac12\cos 2\omega t
  2. sin⁡3ωt=34sin⁡ωt−14sin⁡3ωt\sin^3\omega t = \tfrac34\sin\omega t - \tfrac14\sin 3\omega t

  3. Read off: x2x^2 has a0=12a_0 = \tfrac12, a2=−12a_2 = -\tfrac12 · x3x^3 has b1=34b_1 = \tfrac34, b3=−14b_3 = -\tfrac14

Squaring (not symmetric) creates DC and even harmonics. Cubing (odd symmetry) creates odd harmonics only. That is why a saturated transformer core (odd characteristic) produces a 3rd harmonic, while a diode (one-sided) produces even harmonics. See S7 (in Thai).

Why electrical engineers need Fourier series Basic

The same principle works from the circuits lab all the way to the substation. Every job in this table has its own lesson in the series (in Thai).

FieldThe question Fourier answersRead on
Power qualityWhat is the THD? Does it pass IEEE 519? Why is the power factor low although cos φ looks fine?power & harmonics
Office buildingsWhy do the neutral and the transformer run hot when the load is not even full?H10
FactoriesWhy do power-factor capacitors fail, and what % detuning reactor is needed?mitigation
Power electronicsWhere are the harmonics of a PWM inverter, and at what frequency should the filter sit?inverters
Power suppliesHow big is the ripple of a buck converter, and how high in MHz does its EMI reach?DC-DC converters
Signal filtersWhat comes out when a square wave goes through an RC filter, and why are the corners rounded?circuit analysis
InstrumentsHow do the FFT on a scope and a power analyzer compute their numbers, and why are they sometimes wrong?DFT & FFT
Control systemsPredicting limit cycles from the fundamental alone (describing function)U1
A teacher's view: a technician can read THD off a meter. An engineer has to be able to say where that number comes from, what to change in the circuit to bring it down, and by how much it will fall. Every one of those answers comes from Fourier's three-line formula.

What a Fourier series can and cannot handle Intermediate

  • Works: periodic signals in steady state that meet the Dirichlet conditions. Every real electrical signal does, even with jumps and sharp corners (P1).
  • Not periodic, such as a single pulse: use the Fourier transform, which gives a continuous spectrum. See the signals lab (in Thai).
  • Transients, such as the moment a switch closes: use the Laplace transform, then apply Fourier to the steady-state part.
  • Unrelated frequencies, such as 50 Hz plus 173 Hz: the sum has no short period. 173 Hz is called an interharmonic, and standard-compliant meters group it separately (D8).

A little history: Joseph Fourier put forward the idea in his work on heat conduction (1807) and published Théorie analytique de la chaleur in 1822. The question of when the series actually converges was answered later by Dirichlet. More in the history of the Fourier and Laplace transforms.

What to learn next Basic

The rest of the series is in Thai for now; formulas, figures and numbers read the same in any language.

  1. Finding the coefficients step by step: needs integration (by parts) and trigonometry
  2. Symmetry: cuts the work in half or more
  3. Complex form and the spectrum and Parseval's theorem: the bridge to RMS and THD
  4. Table of waveforms: ready-made results for real work
  5. Applications: circuits → power → rectifiers → inverters → buck converters → mitigation
  6. Measuring: FFT and the virtual analyzer lab
  7. Related, in English: Fourier series calculator · What is a Taylor series? · Laurent series vs Taylor series

Frequently asked questions

What is a Fourier series, in one sentence?

It writes a signal that repeats every period TT as a constant (DC) plus sines and cosines whose frequencies are whole multiples of f0=1/Tf_0 = 1/T. Each of those sinusoids is called a harmonic.

What frequency is the 3rd harmonic of a 50 Hz supply?

The n-th harmonic is at nf0n f_0, so a 50 Hz supply has its 3rd harmonic at 150 Hz, the 5th at 250 Hz and the 7th at 350 Hz. On a 60 Hz system the 3rd harmonic is at 180 Hz.

How is a Fourier series different from the Fourier transform and the Laplace transform?

A Fourier series is for periodic signals and gives a line spectrum at the frequencies nf0nf_0. The Fourier transform is for non-periodic signals and gives a continuous spectrum. The Laplace transform uses s=σ+jωs = \sigma + j\omega and suits transient responses that start at time 0. Harmonics in a power system are a steady-state problem, so they are handled with the Fourier series.

Why does the supply in a building full of computers have high harmonics?

A switch-mode power supply without PFC draws its current in sharp pulses near the voltage peaks. Broken down with a Fourier series, that current is rich in odd harmonics, especially the 3rd, which adds up in the neutral conductor.

Ajarn Mod · Teerawut Savangboon
Lecturer in Electrical Engineering, Dhonburi Rajabhat University, Samut Prakan, Thailand · Profile