Incorrect THD in LTSPICE XVII Simulation?

I am testing the THD at the output of a pure sine wave voltage source and am getting the following result, but I expected 0% THD.

Can anybody tell me why I get this result?

Thank you in advance for your insights!

N-Period=1
Fourier components of V(tst)
DC component:4.97553e-005

Harmonic Frequency Fourier Normalized Phase Normalized
Number [Hz] Component Component [degree] Phase [deg]
1 2.000e+04 9.934e-01 1.000e+00 0.10° 0.00°
2 4.000e+04 9.921e-05 9.986e-05 96.29° 96.19°
3 6.000e+04 6.657e-03 6.701e-03 -162.99° -163.09°
4 8.000e+04 9.831e-05 9.896e-05 102.57° 102.48°
5 1.000e+05 1.772e-03 1.784e-03 -131.09° -131.19°
6 1.200e+05 9.683e-05 9.747e-05 108.82° 108.73°
7 1.400e+05 1.750e-03 1.762e-03 -112.93° -113.03°
8 1.600e+05 9.480e-05 9.543e-05 115.03° 114.93°
9 1.800e+05 2.028e-03 2.042e-03 -88.61° -88.71°
Total Harmonic Distortion: 0.744260%(0.822770%)
 

Attachments

  • THD.PNG
    THD.PNG
    4.8 KB · Views: 189
In your second post, the distortion goes down to 0.108709%(0.118400%)

Here is a way to get it down to 0.000306%(0.000000%):

Test.PNG
View attachment Test.asc

You can trade off accuracy with speed of simulation. For example, if .param fff=2**20, THD=0.000001%(0.008777%), but the simulation takes longer to run. With more complicated circuits this does become an issue.

Have fun.
 
Last edited: