• WARNING: Tube/Valve amplifiers use potentially LETHAL HIGH VOLTAGES.
    Building, troubleshooting and testing of these amplifiers should only be
    performed by someone who is thoroughly familiar with
    the safety precautions around high voltages.

simulation software

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I use Switcher CAD, aka LTSpice, for distortion all the time. An example of the standard SPICE op code to use is

.FOUR 1000 5 V(Out)

where 1000 is the fundamental frequency, 5 is the number of harmonics (including the fundamental) to report, and V(Out) is the name of the node. Change these to suit your own requirements, place the statement anywhere on your schematic, and after you execute a transient run view the results by clicking on View | SPICE Error Log.

Make sure your signal source frequency is the same as the fundamental specified, and also make sure your time step is small enough to give accurate results.
 
For low level distortion analysis you should use the following settings:

In transient analysis set the time for 11 cycles, start saving data after 1 cycle, maximum timestep of saved data time/FFT no of data point samples in time. For instance for 1kHz, with 8192 FFT samples, maximum timestep is 10ms/8192 or 1.2us.

Tools/Control Panel/Compression, clear check boxes. The waveform compression introduces spurious distortion products, clearing the check boxes removes compression.

If this isn't good enough try Tools/Control Panel/Spice, reduce Reltol, default is 0.001, try 0.0005 or 0.0001, but convergence may be more difficult.

When using FFT Blackman window seems to give the lowest FFT noise floor.

Using these settings should give FFT dynamic range of at least 100dB or so with good frequency resolution, of course your actual circuit probably won't perform the same.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.