# How to determine which Fouriers Series terms to use to approximate a signal?

I have a signal (a time-series of air temperature values) that I can approximate quite well with a Fourier series. However, the number of terms in the series grows rapidly, to the point that 30 - 40 terms are needed for a good fitting.

So I was trying to understand how can I select only the Fourier series coefficients that convey the most information about the signal, and discard the others.

I could simply choose values of the series parameters a and b above a certain threshold value, but I do think this is not the right way to go.

I need to limit the number of terms because this approximate function will later be used for further elaborations, and the function must be input manually in the code (suggestions on how this task can be automated would be appreciated too).

I am not trying to predict future temperature or anything like that, I just need a function that can reproduce temperature oscillations with minimum period of ~12 hours.

• Ah, I wouldn't have dared thinking I was right. I think I should rather take the parameters with highest power as in sqrt(A^2 + B^2), Regarding the data entry effort, I plan to do this Fourier analysis for at least 12 months, each one very likely requiring a different number of parameters. So the effort may be considerable. – Fabio Capezzuoli Mar 12 '18 at 13:27