Distortion - Why ONLY harmonics? - Page 1
Forum section: electronics / rf-microwave

author: Aaron73
author_rank: Newbie
timestamp: October 04, 2019, 01:44:45 pm
content: I appreciate that distorting a sinusoidal waveform through a non-linear device (diode, non-linear amplifier etc) creates harmonics.WHY is it that ONLY harmonics (and the fundamental, of course) are created?Before you answer, I appreciate that different devices will cause different harmonic characteristics and orders of harmonics (IE, every multiple, evens only, odds only etc). What I am missing is WHY it is only the harmonics that are produced.Thanks for looking at my question - this is really bugging meCheers,Aaron.

author: Marco
author_rank: Super Contributor
timestamp: October 04, 2019, 02:10:29 pm
content: Math. The n+1 cycle of the nonlinear response is identical to the n'th, it has the same fundamental frequency as the input sine. A signal with a given fundamental frequency can be decomposed into harmonics.To get something other than the harmonics the fundamental frequency would have to be different.

author: radiolistener
author_rank: Super Contributor
timestamp: October 04, 2019, 04:26:29 pm
content: Quote from: Aaron73 on October 04, 2019, 01:44:45 pmnon linear element works as a multiplier. Two signals are multiplied. There is simple math behind it:cos(w1) * cos(w2) = cos(w1+w2)/2 + cos(w1-w2)/2as you can see, it produces two new frequency products.

author: mark03
author_rank: Frequent Contributor
timestamp: October 04, 2019, 04:32:04 pm
content: Putting this another way, any periodic signal, whether sinusoidal, sawtooth, triangular, etc. has aline spectrum. It has no spectral energy at all, except at the fundamental and harmonics. (Technically, this requires that the signal has always existed and always will exist, infinitely far into the past and future. But it is a useful approximation in what we call "steady state.") If there were energy at some other frequency, the signal would not be periodic.Now, if you run a periodic signal through a non-linear device, the output signal must be periodic too. If it were not, it would imply that the non-linear device was itself changing over time.

author: mark03
author_rank: Frequent Contributor
timestamp: October 04, 2019, 04:41:24 pm
content: Quote from: radiolistener on October 04, 2019, 04:26:29 pmIn this example the output frequencies w1+w2 and w1-w2 are not, in general, harmonics of w1 or w2. But that is because the example is a time-varying system. (The mixer does not possess the property of having an impulse response.)I understood the OP to be asking mainly about time-invariant, memoryless devices, but I could be wrong.

author: mark03
author_rank: Frequent Contributor
timestamp: October 04, 2019, 04:51:50 pm
content: Looking at this in yet another [more mathy] way, restrict attention to memoryless systems, i.e.v_out = f(v_in)Any function f() can be approximated to an arbitrary degree of accuracy using a polynomialf(x) = a0 + a1*x + a2*x^2 + a3*x^3 + ...So, if we let x = cos(w) (a sinusoidal input), it follows that the output, foranyfunction f(), will be a sum of sinsuoids raised to various powers. If you remember your trig identities, sine or cosine raised to a power always gives you harmonics. (The "double angle formulas" are the simplest example.) Thus the output will always consist of the fundamental w plus harmonics of w, no matter what f() is. I think this is what @radiolistener was trying to say.

author: DaJMasta
author_rank: Super Contributor
timestamp: October 04, 2019, 07:22:39 pm
content: The math is the answer, but the explanation of it being an explicitly periodic signal is the non-math explanation that makes the most sense to me. When measuring distortion, you're looking for the change in a periodic signal, your nonlinear elements can introduce random noise or periodic signals leaking through from other things, but any changes to the incoming signal (the distortion we're measuring) has to be be periodic and has to be locked to the input phase - there is no stable circuit that outputs a non-periodic signal with a periodic input (ideal envelope detectors I suppose have no spectral content output with a fixed periodic input). Since the measurement is the change relative to the input, any spectral content not phase locked to the input signal isn't classified as distortion.

author: StillTrying
author_rank: Super Contributor
timestamp: October 04, 2019, 09:41:37 pm
content: Forget all the maths.For the shape of every distorted cycle of the fundamental to still be identical to each other, the added sine waveshave to bean exact multiple of the fundamental frequency, otherwise the added sine waves would bechangingripples drifting along the fundamental.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 05, 2019, 08:02:21 am
content: What elsecouldit be?!For example, a two-tone test can produce harmonics of both, plus products of mixed orders of each (IMD). In general, you get mixing products of whatever the input is made of. But if the input is just one frequency, it can only mix with itself (and DC, I guess), giving only harmonics.Incidentally:Quote from: mark03 on October 04, 2019, 04:51:50 pmIf we had a stateful system (i.e., with memory), it can be pretty much anything. It can be subharmonics (e.g. frequency dividers, counters), it can be completely new and unrelated frequencies (e.g. oscillators), it can be mixing products of all of the above (e.g., injection locked oscillators, chaotic oscillators; full-on computers?).These are still not "throw up your hands" cases, but the complexity increases rapidly in this direction, and a general method is not applicable -- we have to dig into the particulars of some case, and hope that it submits to analysis in a nice way.Example: a frequency counter is such a class of system. But despite that, its behavior is quite usefully prescribed, and straightforward under a suitable framework. Namely: we might resolve the analog front end into a gain(frequency) system, followed by an A-D converter (i.e., a comparator), then combinatorial and sequential digital logic (counters and display). A full analog description of the system would be absolutely bonkers (at minimum, we need differential equations for each flip-flop in the system!), but despite the huge discrepancy between continuous differential equations and discrete logic, we can make such a simplification; and indeed, this is so by design!Tim

author: Aaron73
author_rank: Newbie
timestamp: October 05, 2019, 10:17:19 am
content: Thanks to everyone for their contributions - very much appreciated! Some really great responses, indeed. Thank-you.I should have probably stated in my question that I don't have an issue with the maths but a big thanks to everyone that took the time to explain it. I'm sure that others will also appreciate it and get benefit from it.If my thinking is correct and with respect to DaJMasta's comment, distortion through a non-linear device may create a whole range of frequencies (almost noise) but it is only those frequencies that are in phase with the fundamental (IE, the harmonics) that have the ability to continue to exist and at amplitudes many magnitudes of dB above the non-harmonic frequencies. Does this sound correct?To rephrase my original question, "When distorting a SINGLE sine-wave through a non-linear device, do frequencies other than the harmonics get produced, regardless of their power levels?"Thanks again to everyone for helping me with this73!

author: DaJMasta
author_rank: Super Contributor
timestamp: October 05, 2019, 04:21:09 pm
content: No, not inherently. The device you're testing can add other spectral content because it is never an ideal device and there's various effects that can pickup noise and such, but it can't distort a single period impulse to contain spectral content outside of its fundamental.Even a single period of a clean sine wave would have harmonic content unless sampled from a continuous wave - the start and stop of the waveform has a different slope than a continuing one even if directly on the zero crossing, which means it has additional harmonic content just by being in isolation.Maybe think of it this way: every edge or waveform, of any kind, had spectral content that is made up of harmonics of its fundamental. Switching on a DC source from being off creates a pulse with a fundamental frequency based on the lowest harmonic of its rise time - all of the rest of its shape and speed can be defined by odd or even harmonics of that fundamental, whereas picked up interference or whatnot observed on the waveform would show as power at non-harmonics of this fundamental. In that way, anything that changes the shape of this edge (or repetitive signal) can only effect the harmonic content of the signal, because the signal itself is comprised of those harmonics. If the spectral content seen on the output is not harmonics of the input, then it does not constitute distortion of the original signal, it just constitutes noise added to the system (this is actually the difference between THD, which measures only the modification of the input signal, and THD+N which also includes added non-harmonic noise).Now if your signal is white noise, or something like, you have power on the input at basically every frequency, so the output harmonics of the input would also be at every frequency and a measure of harmonic distortion would be fairly meaningless (though you could measure it by time correlating instantaneous peaks on the input with the output, since random noise could still create identifiable signals that could be of some use).

author: ejeffrey
author_rank: Super Contributor
timestamp: October 06, 2019, 02:51:47 am
content: The way to look at it is _if_ the output is periodic, then it by definition only contains harmonics of the period.It's perfectly possible to have aperiodic distortion in which case that wouldn't apply but for a wide class of distortion sources like a simple diode this is the case. If your distortion source doesn't have internal memory or it's own time dependence that is independent of the input then it can't help but be periodic.As a counter example PLLs commonly generate spurs, subharmonics fractional harmonics, and other non harmonic content. That is possible because the PLL has internal memory in the form of dividers as well as a reference oscillator.

author: AG6QR
author_rank: Frequent Contributor
timestamp: October 06, 2019, 05:27:24 am
content: As a counter example, a laboratory signal generator is a non-linear device that takes as input 50Hz or 60Hz AC, and produces as output some arbitrary frequency that is generally not a harmonic of the input. A radio receiver does a similar job, taking radio frequency AC from an antenna (and perhaps that mains frequency AC again) and producing audio output to a speaker, with the frequency of the audio output not being harmonically related to the input frequency.But yes, the typical filter with a few semiconductors works as has already been explained. The output is periodic at the same fundamental frequency as the input, so contains only harmonics.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 06, 2019, 06:48:32 am
content: Which incidentally, if the radio didn't have large capacitors to store energy between line cycles -- its output would necessarily be modulated somehow at 100/120Hz. And so the resulting waveform contains harmonics of both the mains ripple, the received signal, and their mixing products; it acts as a nonlinear device overall. Which is because it is, as it must be. It's only linear in normal operation because of the memory granted by the filter capacitors, letting it sit at one operating point (if the operating point isn't varying over much of the nonlinear curve, it's not very nonlinear; basic calculus).Tim

author: rfeecs
author_rank: Frequent Contributor
timestamp: October 06, 2019, 09:33:28 pm
content: Quote from: Aaron73 on October 05, 2019, 10:17:19 amNo, because Fourier series.But if the device is capable of self oscillation, like a Gunn diode for example, it can generate other frequencies.