There maybe a bug in fourier simulation scope

hello,

when I was doing a simple filter simulation, I found that the First-order Fourier coefficients(i.e 1000Hz, base frequency) of the output voltage was different with or without the red section. As shown in the picture.

But the red section was not involved in the simulation, the result was different with or without that, why?

I look forward to hearing from you!

fourier.plecs (9.84 KB)

Without the red part, the solver is allowed to make a step every 500 ns. With the red part, the solver makes a step every 83 ns, or six times as often (because the solver is automatically forced to make at least 12 steps per period in the presence of a sine wave generator). So the result of your second simulation is more precise.

You could achieve the same effect by reducing the maximum step size or the relative tolerance or by increasing the refine factor in the simulation parameters.

The Fourier analysis is correct in both cases, it just operates on different data.