Is THD-Simulation with OP-Amps in LTSpice nonsense?

Reduce the simulation time so you're only displaying ~50 cycles or so. Your setting resulted in a solid green band spanning -10 to +10. You also don't need to set your maximum time step to 10nS -- your sims will take forever to run.

I changed your simulation command to: stop time = 3.5m; time to start saving data = 1m and maximium timestep = 1e-6. THD simulated out to a bit more than .002% and the second harmonic's amplitude was about -80dB.

Decreasing the maximum timestep to 500nS only slightly improved the simulated THD.
 
Pet peeve: Time is measured in seconds (s). Conductance is measured in siemens (S). Measuring time in nanosiemens (nS) makes no sense. Just saying.

There's actually a good article about THD simulation in the latest issue of AudioXpress (March, 2025). There's also a thread here about THD simulations in LTspice that could be worth digging up. Basically: Set the maximum time step such that you have a maximum of (period of signal of interest)/(FFT length) between simulation steps. You can also fiddle with the RelTol (relative tolerance) parameter. For example, setting RelTol to 10^-4 gives you a noise floor of -80 dB. If you want to resolve -140 dB, set RelTol to 10^-7.

Of course, the next question is whether THD is even included in the opamp model. There's basically two ways of finding out: 1) Read the documentation for the model. Often this is in the model file itself. 2) Run a simulation under one of the test conditions listed in the data sheet and see if the simulation results match the data sheet performance within a reasonable margin.

THD simulations can still be useful even if it isn't included in the opamp model. If the circuit shows horrid THD then something is fundamentally broken. If, on the other hand, the THD simulates beautifully there's at least a chance that the circuit can perform well in the lab.

Tom
 
Hello Tom,

Thank you for the explanation. Now I understand why Ltspice shows LT1028 OP values that are understandable, but with the OPA1656 model from TI even with V=100 at 20kHz only 0% distortion - which can't be. Which thread did you mean about THD simulation in Ltspice? Unfortunately I can not read the article in AudioXpress, because I don't have a subscription.

Thomas
 

Attachments

  • OP1656 10kHz V100.jpg
    OP1656 10kHz V100.jpg
    118 KB · Views: 28