I have been test the circuits for amplifiers and got somewhat stuck in understanding the results for the FFT's harmonics.

With a standard type B I was able to get this graph for the harmonics for this circuit

Class B amp In here I seem to get quite a few harmonics and a high distortion. If I was to add a diode (so it becomes a class AB) then it changes to this: enter image description here Second Harmonics onward seem to have become really low. If I was to finally adjust the drop off and connect an op amp i get the final result: enter image description here

for the circuit

enter image description here

Any way I can make sense scientifically from the results? Only obvious result I found was the reduction of appearant harmonics the less distortion we end up getting.(assuming its because we are getting rid of 2ndary sine waves turning it into a pure-er sin wave). What else am I supposed to know?

  • \$\begingroup\$ Only obvious result I found was the reduction of appearant harmonics the less distortion Yeah, duh ! Harmonics and distortion is practically the same thing. You need to learn about Taylor expansion: en.wikipedia.org/wiki/Taylor_series which can describe (an amplifier's) transfer function in a polynomial. The coefficients of that polynomial are the harmonic frequencies as described by Fourier: en.wikipedia.org/wiki/Fourier_transform \$\endgroup\$ Commented Feb 2, 2017 at 6:56
  • \$\begingroup\$ The amount of distortion an amplifier has is very much related on its architecture (circuit) and biasing, if it has feedback or not (yours does not so it has a lot of distortion). Distortion is also signal related, a larger signal will distort more than a smaller signal. \$\endgroup\$ Commented Feb 2, 2017 at 7:00
  • \$\begingroup\$ "What else am I supposed to know?" - ask a friend because why would anyone here know. \$\endgroup\$
    – Andy aka
    Commented Feb 2, 2017 at 8:20
  • \$\begingroup\$ The reason why I asked about it is because I didn't get many information from searching about the harmonics. But I guess them being directly related to the distortion is the only result I can make use of I guess \$\endgroup\$ Commented Feb 2, 2017 at 9:45

2 Answers 2


Examine the output waveform, then think about what harmonics would be required to reproduce it. For example, here's what adding 66% of 3rd harmonic and 25% of 5th harmonic looks like:-

enter image description here

And here's the LTSpice FFT for that waveform:-

enter image description here

Just two odd harmonics with the right amplitude and phase were enough to create a waveform very similar to typical class B 'crossover' distortion. With the addition of a few more higher harmonics you could precisely match the output of your amp. What this means is that (in the frequency domain) your amplifier creates those harmonics.

As you assumed, any deviation from a pure sine wave produces harmonics, and the greater the distortion the higher the harmonic content. You can also get some idea of which harmonics will be produced by examining the shape of the distorted waveform.

Even harmonics only occur when the wave is non-symmetrical ie. positive and negative halves are different. Since a class B amp has symmetrical output it only produces odd harmonics.

Sharper deviations produce higher harmonics. Class B crossover distortion puts a 'flat spot' in the middle of the waveform. This can be audible even when it is very small, because the sharp transition creates higher harmonics that the human ear can easily distinguish. And since a fixed amount of signal voltage is required to get past that 'flat spot', smaller signals suffer from higher distortion.

Class A amplifiers have a smooth transition in the center but compress the wave shape at higher amplitudes, usually more on one half than the other. This creates low order even and odd harmonics that are less audible even at quite high distortion levels. It is also hard to make out in the waveform until the amount of distortion is very high, because our eyes are not good at seeing subtle deviations from a sine wave.

NOTE: to get better FFT plots in LTSpice you should set a longer simulation time, eg. 1 second instead of 10ms. This will make the peaks sharper and reduce artifacting. You can also change the vertical scale to get rid of the noise floor, and make the frequency scale linear so the harmonics occur at equal distances.


Now lets use more realistic VDD+ and VDD- supplies, instead of the ideal SPICE. On each of the 2 power lines, install 100,000uF in series with 100nanoHenry to ground{4" of wire}. This resonates at radian freq of 1/sqrt(L*C) or 1/sqrt(0.1F * 1e-7H) or 1/sqrt(1e-8) = 10^+4 radians/sec or 1,590 Hertz, a very audible frequency. To lightly decouple the SPICE sources, install 0.1 ohms from +15v to its filter cap, and install 0.1 ohms from -15v to its filter cap.

Now rerun the sims, and examine both the TIME OUTPUT and the Frequency Plot. Notice how large the 1,590 Hertz ringing is?

How to dampen this, to prevent ringing, that is to have no additional zero-crossings? Use a resistor of value R = sqrt(L/C); our sqrt(0.1uH/0.1Farad) becomes sqrt(0.000 001) or 0.001 Ohm; a milliohm of resistance is a mere 2 squares of copper foil, thus is easily dampened by unavoidable wiring/trace resistance.

How about 1uF and 0.1uH? Fring(MHz) is sqrt(25,330/Luh*Cpf) or sqrt(25,330/0.1*1,000,000) = sqrt(25,330/100,000) = sqrt(0.2533) = 0.5MHz. How much R to dampen? use sqrt(L/C) = sqrt(0.1uH/1uF) = sqrt(0.1) = 0.316 ohms, which is big enough the parasitic R in wires/traces/vias will not suffice.

Where does Rdamp = aqrt(L/C) come from? $$Fring=1/[ 2*pi*sqrt(L*C)]$$ $$Zinductor = 2*pi*Fring*L$$ and we want approximately Q of 1, where $$Zinductor = Rdamp$$ Substitute left equation into right equation, and replace Zinductor by Rdamp. $$Rdamp = 2*pi*L/[2*pi*sqrt(L*C)]$$ Now cancel the '2*pi', and replace the 'L' on top with sqrt(L*L) $$Rdamp =sqrt(L*L)/sqrt(L*C) = sqrt(L/C)$$

Here is the lightly damped VDD ringing: 0.1Farad, 0.1uH, 0.1MilliOhm ESR[Q=10] Output is time-related to input, but is not harmonically related. Input is 1.6 amps across the 0.1MilliOhm ESR.  2 ClassB half-sins as Current Surges, producing 1.59KHz non-harmonic output This below is OUTPUT waveform only, showing lower amplitude because only ONE ClassB transient provides the energy to ring. single ClassB input (not show), with 1.59KHz ringing

Note the period of ringing is 1.59KHz. In this waveform, generated by Signal Wave Explorer using canned example (params can be varied) "Power Supply Filter Example Step #2" (Step#1 merely generates 0.16 amp ClassB half-sin transient), the Q=10 VDD ringing will slowly decay, starting at 2uVpeakpeak.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.