ElectronicsInfolineLearnAll schools

Harmonics

15 min read

Quick Answer

Harmonics are sinusoidal components at whole-number multiples of a repeating signal's fundamental frequency. Any periodic waveform other than a pure sine carries them, and their pattern of sizes is what makes one shape differ from another at the same frequency. A symmetrical square wave carries odd harmonics only.

Intuition

Same note, two instruments

A flute and a violin can play the same note, and nobody mistakes one for the other. The note is the same because both instruments repeat their vibration the same number of times each second. Everything else about the sound differs: the violin is thick and edged, the flute clean and hollow.

Each instrument is producing a mixture of pure tones. The lowest tone in the mixture repeats at the note's own rate and is called the fundamental. Above it, quieter, sit tones at exactly two, three, four and more times that rate. Those are the harmonics. A flute is weak in some of them where a violin is strong, and the ear reads that difference as the character of the instrument.

Electrical signals work the same way. A sine wave is the single-tone case, with nothing above the fundamental at all. Any other repeating shape — a square wave from a logic output, a ramp from a sweep generator, the lumpy current a power supply pulls from the mains — is a fundamental with a set of harmonics added on top, travelling along the wire as one waveform. The trace on a screen and the list of harmonics behind it describe the same signal, and either one can be worked out from the other.

Carrying both descriptions is useful because circuits and cables handle frequencies one at a time. A path that passes the fundamental happily may throw the harmonics away, and the shape arriving at the far end is then not the shape that set off. Common waveforms sorts the shapes out; this lesson takes them apart.

Practitioner

Numbering and sizing the multiples

Harmonics are numbered from the fundamental, which is harmonic number one. The second harmonic sits at twice the fundamental frequency, the third at three times it, and so on for as far up as the signal carries anything:

Worked example — Where the multiples of a one-kilohertz tone land

A signal repeats at 1.0 kHz, so that is its fundamental.

Its second harmonic falls at 2.0 kHz, its third at 3.0 kHz and its fifth at 5.0 kHz. The repetition rate alone fixes those positions, whatever the waveform looks like. What the shape decides is how much, if anything, each position carries.

For a symmetrical square wave the answer is known in closed form. Only the odd-numbered harmonics appear, and each one's amplitude falls in proportion to one over its harmonic number:

Worked example — Sizing the odd harmonics of a square wave

A square wave swings symmetrically to 5.0 V either side of zero.

Its fundamental has an amplitude of 6.37 V, the third harmonic 2.12 V, the fifth 1.27 V and the seventh 0.91 V. Nothing at all sits at the second, the fourth or the sixth.

The first of those figures usually gets read twice. The fundamental stands above the square wave's own peak, by a factor of 1.27. What has to respect the peak is the sum, not any single term in it: the fundamental overshoots the flat top on its own, and the odd harmonics above it subtract across the flat sections while adding near the edges, so the total comes back to a level line. Restore them all and the result never leaves the peak; remove any one and what remains is no longer square.

Line spectrum of a 5 volt peak square wave at 1 kHz showing odd harmonics only, with the fundamental standing above the wave's own peak, each further odd line falling in proportion to one over the harmonic number, and the even positions carrying nothing

A plot of amplitude against frequency, as opposed to against time, is a spectrum. A spectrum analyser produces one from a live signal, and many oscilloscopes will compute one from a captured trace. Reading it comes down to which lines are present and how quickly they fall away.

Anything expected to pass a square wave needs bandwidth well above the repetition rate, since the corners are assembled from harmonics far up the spectrum. Put a low-pass filter in the path and it strips them off, rounding the edges by exactly as much as the missing lines account for. The same rounding appears when the limit belongs to the instrument, so oscilloscope measurements on fast edges have to establish which of the two is responsible before the trace means anything.

Engineer

What symmetry allows and forbids

A square wave has a structural property worth naming: shift it along in time by half of one period and what comes back is the same wave inverted. Half-wave symmetry, as that is called, decides on its own which harmonics can be present.

The harmonic numbered n completes n half-cycles of its own across half of the fundamental's period. For even n that is a whole number of complete cycles, so the shift returns it unchanged, and a component that comes back unchanged while the whole waveform has inverted would have to equal its own negative. Zero is the only quantity that does. For odd n the shift lands on an odd number of half-cycles, which inverts the component and matches what the waveform did. Odd harmonics are permitted and even ones are not, and reaching that needs no arithmetic on the square wave itself.

Symmetry settles which lines appear. Smoothness settles how fast they die away.

A square wave crosses between its two levels in no time at all, and building a genuine discontinuity out of smooth sines draws on arbitrarily high frequencies. The amplitudes fall only as one over the harmonic number, which is a slow decay: the third still stands at 33.3 % of the fundamental and the fifth at 20.0 %. A triangle wave has no jump, only a change of slope at each turning point, and its odd harmonics fall as one over the square of the number, so its third sits at 11.1 % of its own fundamental. The smoother the waveform, the faster its spectrum collapses. A sawtooth makes the instructive exception: it has a jump like the square wave, so its amplitudes fall as one over the number, but its second half is not the inverse of its first, so it forfeits the symmetry above and carries every harmonic, the even ones included.

Components at different frequencies do not interfere with one another over a whole cycle, so their powers simply add. Each harmonic's RMS value is its amplitude divided by the square root of two, an operation RMS value works through properly. For the square wave the fundamental alone accounts for 81.1 % of the total, and the fundamental with the third and the fifth together account for 93.3 %. Everything from the seventh upward supplies the remainder, a long tail of small terms that still matters at the edges, where all of them arrive together.

Total harmonic distortion compresses that tail into one figure: the combined RMS value of everything above the fundamental, as a fraction of the fundamental. An ideal square wave scores 48.3 %, a reminder that the measure only means anything against an expectation. It says how far a signal has departed from the pure tone it was supposed to be, and a square wave was never supposed to be one.

The description has limits, and they are easy to walk past. It applies to a periodic signal, strictly to one that has been repeating forever. A single pulse, a burst of a few cycles, or a tone whose amplitude is being changed spreads its energy continuously across frequency instead of gathering it into lines, and the Fourier transform rather than the series is what handles that; Fourier series sets out where the boundary falls.

The amplitudes are also only half of the description. Each harmonic has a phase as well, fixing where in the cycle it starts, and the same set of amplitudes assembled with different phases gives a waveform that looks nothing like a square wave yet shows an identical spectrum. Hearing is largely indifferent to that; a circuit driving a load is not. Adding the components back up also recovers the original waveform only where whatever they pass through treats each of them independently. Linear is the word for that condition, and a non-linear stage breaks the arithmetic by manufacturing frequencies of its own.

The one-over-n law itself belongs to an idealisation with vertical edges. A real transition takes time, and above roughly the reciprocal of the rise time a real square wave's harmonics fall away far faster than the ideal series predicts. The idealised figures hold while the transitions occupy a small fraction of the period.

Professional

Where harmonics become a problem

Most of the trouble harmonics cause is thermal, and it begins with the shape of the current a rectifier draws. A full-wave rectifier feeding a reservoir capacitor conducts only while the incoming voltage exceeds what the capacitor already holds, so it takes short high bursts near each peak and nothing in between. That current repeats at the supply frequency and is nothing like a sine, so it is loaded with odd harmonics. On a 50 Hz supply the fifth of them sits at 250 Hz, with the seventh, eleventh and thirteenth at their own multiples above it.

Nothing above the fundamental delivers useful power to the load, because the supply voltage has almost no content at those frequencies for the harmonic currents to work against. The currents are real all the same. Cables and transformer windings heat according to the total RMS current they carry, so a distorted current heats them harder than its useful portion alone would suggest. Transformer losses climb faster still, since core loss grows with frequency and so does conductor resistance, the current crowding toward the surface as the frequency rises. Seen from the meter the effect is a depressed power factor with no phase shift behind it, the distortion contribution that power factor separates from the displacement contribution, and AC power supplies the vocabulary for both.

The third, ninth and fifteenth harmonics, the odd multiples of three, behave unlike any of the others in a three-phase system. They are the triplen harmonics.

Worked example — Third-harmonic current in a three-phase neutral

Three phases each carry 10 A of third-harmonic current, on top of whatever they carry at the fundamental.

The three fundamental currents sit a third of a cycle apart and cancel in the neutral when the load is balanced. The three third-harmonic currents do not. Triple that spacing and all three land back in step, so they add arithmetically, and 30 A flows in a conductor often sized on the assumption that it would carry almost nothing.

A neutral chosen to match the phase conductors, on the reasonable-sounding argument that a balanced load leaves it nearly empty, can end up the hottest conductor in the installation once the load is a floor full of switching supplies. It is not normally given overcurrent protection of its own either. Three-phase basics covers why the fundamentals cancel in the first place.

IEEE 519 concerns harmonic limits at the point of common coupling, where an installation meets the supply network. Which numbers apply depends on the installation and on the edition in force, so look up the version that governs the site; a remembered table is no substitute. At the equipment end the answer is a power factor correction front end that draws a near-sinusoidal current by design, which large switching supplies have carried for years.

On the digital side the same physics arrives as radiated emission. A clock at 16 MHz puts its ninth harmonic at 144 MHz, and a fast edge anywhere on the board carries content well above that. Emissions testing therefore sweeps far above any oscillator in the product. CISPR and FCC Part 15 are the standards families that govern conducted and radiated emissions; the limits set for equipment intended for residential use differ from those meant for industrial use, and conformity is demonstrated by test against whichever standard applies in the market. What a designer controls is the harmonic content itself: slow the edges as far as the timing tolerates, keep current loops small, and where the clock allows it, spread the clock slightly so its energy is smeared across a band instead of standing in one line. EMI and EMC develops the mechanisms.

In analog signal work harmonics measure how badly a stage has misbehaved. A linear amplifier handed a sine returns a sine; drive it into its rails and the flattened tops are a square wave in the making, carrying harmonics that were in neither the input nor the amplifier before the clip. The shape of the non-linearity decides which ones appear. A symmetric transfer curve, clipping equally top and bottom, produces odd-order harmonics; an asymmetric one adds even-order terms as well. Manufacturers quote the result as total harmonic distortion at a stated output level and frequency, and those stated conditions matter as much as the number, since distortion in an audio amplifier IC climbs steeply as the output approaches the rails.

Harmonics are not always a nuisance. Radio transmitters have long generated a high frequency by driving a stage hard on purpose and filtering out the wanted multiple, and a distortion pedal is valued for the harmonics it adds and for nothing else.

Measuring any of this needs an instrument that is honest about shape. An averaging multimeter scales a rectified average by a constant chosen for a sine, so it misreports a distorted current and gives no hint that it has; a true-RMS instrument does the arithmetic and gets it right within its bandwidth and crest-factor limits. A spectrum analyser, or an oscilloscope with a transform function, shows the individual lines and turns a vague complaint about the current into a harmonic number.

Common mistakes

  • Calling any unwanted frequency a harmonic — a harmonic sits at an exact whole-number multiple of the fundamental. A tone at an unrelated frequency is a spur or an intermodulation product, with a different cause and a different fix.
  • Expecting the fundamental to fit inside the waveform — a square wave's fundamental exceeds the wave's own peak. The harmonics above it pull the total back down across the flat sections, so no single component has to stay within the envelope.
  • Reading even harmonics as normal — half-wave symmetry suppresses them, so finding them in a signal meant to be symmetrical usually points at a duty error, a DC offset, or clipping that is harder on one polarity than the other.
  • Sizing a three-phase neutral for the phase current — triplen harmonics arrive in step on all three phases and add there. With enough switching supplies on the load the neutral can carry more than any line conductor.
  • Trusting an averaging meter on a distorted current — its scaling constant assumes a sine and gets applied to whatever arrives. Reach for a true-RMS instrument, then check its bandwidth and crest-factor limits before believing it.
  • Treating the amplitude spectrum as the whole description — every harmonic carries a phase too, and rearranging the phases while leaving the amplitudes untouched produces a completely different waveform.

Frequently asked questions

What are harmonics?

Sinusoidal components at whole-number multiples of a repeating signal's fundamental frequency. A signal repeating a thousand times a second has harmonics at two thousand, three thousand and upward, and the pattern of amplitudes across those positions is what separates one waveform shape from another.

Why does a square wave have only odd harmonics?

Its second half is the exact inverse of its first. An even harmonic completes a whole number of its own cycles across that half period and returns unchanged, which cannot match a waveform that has inverted, so its amplitude must be zero. Odd harmonics invert over the same interval and survive.

Can the fundamental really be larger than the waveform's peak?

For a square wave it is. The waveform is the sum of all its components and not any one of them, and the odd harmonics subtract from the fundamental across the flat sections while adding near the edges. The sum stays within the peak even though the first term on its own does not.

What is the difference between harmonics and total harmonic distortion?

Harmonics are the components themselves. Total harmonic distortion is one number summarising them, the combined RMS value of everything above the fundamental as a fraction of the fundamental. It compresses a whole spectrum into a single figure and loses track of which harmonic was responsible.

Do harmonic currents carry useful power in a mains installation?

Almost none. The supply voltage is close to a pure sine, so there is little voltage at the harmonic frequencies for those currents to work against. They still heat every conductor they pass through, so they count against the installation as loss and as something a standard sets limits on.

Knowledge check

A 60 Hz supply carries a distorted current. Where does the fifth harmonic of that current sit? (Show answer)
At 300 Hz. Harmonic frequencies are whole-number multiples of the fundamental, so the fifth lands at five times 60 Hz.
A symmetrical square wave has a peak of 12 V. How large is its fundamental? (Show answer)
15.3 V, above the square wave's own peak. The harmonics stacked above the fundamental subtract from it across the flat sections, so the total comes out level.
Why does a symmetrical square wave contain no even harmonics? (Show answer)
Shifting it by half a period turns it into its own inverse. An even harmonic completes a whole number of its own cycles in that interval and comes back unchanged, and the only quantity equal to its own negative is zero. Odd harmonics invert instead, which is consistent, so they survive.
Three phases each carry 10 A of third-harmonic current. What flows in the neutral? (Show answer)
30 A. Triplen harmonics arrive in step on all three phases, so they add in the neutral instead of cancelling there the way the balanced fundamentals do.
An amplifier is driven hard enough to clip. What appears in its output spectrum that was absent from its input? (Show answer)
Harmonics of the input tone. Clipping is a non-linear operation, and a non-linear stage manufactures components at multiples of what it was fed. A symmetric clip favours the odd-numbered ones.