MRCecil
Member
Typical of you, AG: you comment on some side issue. What I'm trying to resolve here is how to computer THD, not whether some particular amplifier sucks or not. (The whole point of the exercise being to attempt to make this amplifier suck less.)
Determining THD in LTSpice is simply a matter of placing a .four spice directive on the schematic. Here is how to do that:
First, click on the toolbar .op icon on the far right and enter the directive using this format;
.four <fund. freq> <number of harm.> <source trace> example- .four 1e3 50 V(out) which is 1khz fundamental 50 harmonics + fundamental evaluated at V(out)
The number of harmonics can be omitted with a default value of nine.
Next place the directive on the schematic, then go ahead and run the sim.
Last, right click on the plot pane, go down to the bottom of the dropdown and select View then Spice Error log. The results will be displayed there. If you want to look at several locations for a given sim, just add the traces to the directive.