Search/

Request a free quote

Online Circuit Simulator

Square wave harmonics and THD example

We typically respond within one business day.

Harmonics of a square wave. The Harmonics section under the scope takes the wave apart.

Square wave harmonics and THD example

Open this example in the simulator

What does this circuit show?

V1 is a 60 Hz square wave between -5 V and +5 V across R1. Open Harmonics under the scope to see its spectrum.

What should you notice?

Only odd harmonics appear: the 3rd is a third of the fundamental, the 5th a fifth, and the even ones are missing. THD reads about 48 %.

Why does it happen?

The Fourier series of a square wave of peak Vp is (4Vp/π)(sin ωt + sin 3ωt/3 + sin 5ωt/5 + ...). The fundamental is 4 × 5/π = 6.37 V, and THD = √(π²/8 - 1) = 48.3 % when every harmonic is counted.

What can you try?

Change V1 into a sine (an AC source of the same peak). THD drops to nearly 0 and only the fundamental is left.

What is a common mistake?

Expecting the 2nd harmonic to be the largest after the fundamental. A wave with half-wave symmetry, like this one, has no even harmonics at all.

From our engineering work

Get your project started

We typically respond within one business day.

Request a free quoteor call (866) 621-6920

Newsletter

Engineering notes from Dreiym

New articles on power systems, corrosion and forensic engineering, by email when we publish. Free account included: keep your calculator work, reports and exports in one place.

Latest article: DC Arc Flash in Battery, UPS and PV Systems: How the Hazard Is Assessed

One email per new article. Unsubscribe in one click.

You are subscribed: new articles come to you by email.

Manage in My account