Tony asked:
Why do you think more cycles would give you a better result?
That's an interesting question.
?
Theoretically, one ought to see identical results from either 1 cycle or 1000 cycles.? But it is sampled data and it's imperfect.? There might be some logic to using many cycles for the? .FOUR calculation, since it should randomize the samples over a cycle better.? Looking at it another way, it averages the calculated amplitudes over many cycles if (a big IF) the calculation over one cycle could be slightly off.
?
I'm hesitant to mention the following because I don't think it has much impact on this, but maybe it does when you are trying to see components that are way down in the mud, so to speak.? The timesteps are not uniform over a simulation.? LTspice sets them quite small at the start, and lets them expand until they reach Maximum Timestep or another factor puts a cap on them.? It briefly throttles the timestep again at the "Time to start saving data", and again at the end of the simulation.? It needs to hit those points exactly, without having an unintentional "timestep too small" error, so it throttles the timestep briefly as it's approaching either point.
?
Now if you are concerned that unequal timesteps might impair your Fourier analysis - which is perhaps not unreasonable when talking about parts-per-billion or so - then you might try to avoid applying the .FOUR both right after "Time to start saving data", and right before the end of the simulation.? The former, you can control.? The latter, you can't.? .FOUR always takes the last samples in a simulation, which theoretically might be ever-so-slightly altered (I hesitate to say "corrupted") because of the throttled timestep.
?
Averaging Fourier over several cycles might mitigate this effect because most of those cycles have uniform timesteps.? At least on paper it would.
?
Again, I emphasize that we're talking about down-in-the-mud concerns here, which might or might not change the results.
?
I haven't seen your full schematic, but did you remember to use .options plotwinsize=0 and set the maximum timestep to a good fraction of a cycle? I normally set Tmax to 1/period/2^n, with n normally between 8 and 16, depending on the expected level of THD with a suitable trade-off in analysis time. Normally Fourier stuff like things in binary multiples, but I understand LTspice's algorithms are much less fussy.
He did all that.? I think he used 2**16 for period-to-maximum-timestep ratio.? He also used the higher NUMDGT.
?
Andy
?