Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LT SPICE FFT problem

Status
Not open for further replies.

Electronworks

New Member
Hi

I am designing an audio amplifier with LT SPICE. If I do an FFT of the output, I get a lot of harmonics appearing. Lo-Fi you might say..

However, if I disconnect the sinewave input and put a probe on the (completely unloaded) sinewave output, I still get the same harmonic content (second and third harmonics especially, but lots of high order harmonics up in the MHz region).

Any idea what I am doing wrong? Surely i should just get a single spur at 1kHz for a 1kHz input, or has theory changed since I leant it all....?

Please help

Thanks:confused:
 
Are we talking about a single stage or multiple stages? What is the amplitude of the harmonics relative to the test input? What are the stage gains and the overall gain?

You do realize that a FET input is very high impedance. A high impedance input will pick all kinds of noise from stray inductance and capacitance. I don't find your result particularly unusual or surprising surprising. I'm pretty sure even the golden ears can't hear Megahertz harmonics. In fact wasn't it the rich harmonic content of the pentode amplifier that gave the sound it's warmth?
 
Last edited:
Hi

Thanks for this, but in SPICE the input impedance of the probe should not matter. Essentially what I have done is disconnect the amplifier from the source signal and all I am doing is measuring the source FFT.

This should be a perfect sinewave - it is SPICE.

To answer your questions, my input is 0dB (obviously), my second harmonic is -70dB, my 3rd harmonic is -40dB.

Picture is attached.

Again, I would expect, in a theoretically perfect system (which SPICE is meant to replicate) that a sinewave just gives a spur at the fundamental.

I cannot measure the distortion of an amplifier if my 'perfect' sinewave input has got harmonics.....

Any further comments would be greatly welcomed
 

Attachments

  • distortion.JPG
    distortion.JPG
    67.7 KB · Views: 573
You have to suppress the compression of the output data points that LTSpice normally does to make the RAW file smaller. Doing so will generate a huge RAW file. You may want to also turn off the data saving for all nodes and currents, and only save the ones you really want to look at.
 
Hi

Thanks for this, but in SPICE the input impedance of the probe should not matter. Essentially what I have done is disconnect the amplifier from the source signal and all I am doing is measuring the source FFT.

This should be a perfect sinewave - it is SPICE.

To answer your questions, my input is 0dB (obviously), my second harmonic is -70dB, my 3rd harmonic is -40dB.

Picture is attached.

Again, I would expect, in a theoretically perfect system (which SPICE is meant to replicate) that a sinewave just gives a spur at the fundamental.

I cannot measure the distortion of an amplifier if my 'perfect' sinewave input has got harmonics.....

Any further comments would be greatly welcomed
I wasn't referring to the impedance of the probe, but to the impedance of the stage(s) you are trying to measure.

40 dB down for the third sounds pretty good; what are you aiming for?

I question your assumption of SPICE aiming to be theoretically perfect. Quite the contrary it is meant to give an indication of real device behavior. In any case I recommend the LTSPICE Yahoo group. Helmut and Mike will surely point you in the right direction.
 
Last edited:
I wasn't referring to the impedance of the probe, but to the impedance of the stage(s) you are trying to measure.

40 dB down for the third sounds pretty good; what are you aiming for?

I question your assumption of SPICE aiming to be theoretically perfect. Quite the contrary it is meant to give an indication of real device behavior. In any case I recommend the LTSPICE Yahoo group. Helmut and Mike will surely point you in the right direction.
He is measuring the source, not "stages".
 
You can reduce the apparent harmonic distortion by setting the maximum timestep to a tiny fraction of the period. This will increase your simulation time. I tried 100ns timestep on 1kHz and got 3rd harmonic distortion down to about -60dB.
 
You can reduce the apparent harmonic distortion by setting the maximum timestep to a tiny fraction of the period. This will increase your simulation time. I tried 100ns timestep on 1kHz and got 3rd harmonic distortion down to about -60dB.

Also, add the directive ".options plotwinsize=0" to the schematic. That drops all harmonics below -170db. Also, make sure that the FFT is taken on whole cycles of the sine wave...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top