Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

there maybe a bug in fourier simulation scope

0 votes
253 views

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!

asked Nov 11, 2022 by fire (73 points)

1 Answer

0 votes
 
Best answer
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.
answered Nov 14, 2022 by Oliver Schwartz (618 points)
selected Nov 24, 2022 by fire
...