# Fourier coefficient and resolution in simulators

I post below two fourier graphs of the same signal, simulated for two different transient durations:

The time domain function is a sine with 60Hz frequency.

1. Transient duration 40ms gives the following fourier graph:

1. Transient duration of 300ms gives the following Fourier graph:

I had expected the fundamental frequency used to calculate the coefficients to be 60Hz, the main frequency of the time domain function.

But the simulator uses the transient duration as a period to compute first the fundamental frequency and then calculates the Fourier coefficient.

Is that convenient event though the sine function is periodic?

In the simulator window, there is something called Resolution/Frequency; what is the link between this resolution and the formula used to calculate the coefficients of a Fourier series?

NB: the simulator is Simplis/Simetrix for power electronics.

From your 2nd picture, I see a 120 Hz peak, and since you're using the tag, I guess you're probing the waveform after the rectifier. In the end, the best results with FFT are when there is a fixed number of periods involved. It also helps for the signal to be in its steady-state. In your case it should be n/60. For your first attempt, you used 40 ms, which means there were 0.04*60=2.4 periods involved. That results in a lot of leakage (unless you used a window). For the second case you have 0.3*60=18 periods, which is a multiple of 1/60, thus you get a clean FFT. The longer the time sequence, the lower the minimum frequency in the spectrum. The higher the points, the higher the maximum frequency. It doesn't matter what program you're using, these are the rules of the Fourier transform.