# How to reduce frequency resolution for high sampling rate and lot of samples?

I'm kinda new in this field, and I have a following situation. There is a 1s long audio signal, with Fs = 96000Hz, and I have 96000 samples accordingly. If I do a single FFT on the entire signal, I get this 1Hz frequency and 48000 points, resulting in a very "fat" logarithmic spectrum, like in the picture below.

How can I reduce resolution and thin out my plot without reducing sampling rate? • Perhaps you can plot only the peak values (apply a threshold of, say, -15dB or so). Of course, you're not really reducing the frequncy resolution in this way. – dsp_user Nov 24 '17 at 14:03

A simple way is to split the data into smaller N sample segments (pick N to suit your desired frequency resolution, then average the power or amplitude of all the FFT spectra:

$$\hat X = \frac{1}{N} \sum^{N-1}_{n=0} X_n X_n^*$$

Where $X_n, n \in \left\{0:N-1\right\}$ is your series of shorter FFT results and $\hat X$ is the averaged power spectra.

If I remember correctly, for noise signals, the variance is reduced by $\frac{1}{N}$.

• Yes, using shorter frames for the FFT will reduce frequency resolution , but I don't think that's what the OP's after. it seems to me that he wants to have a less detailed spectrogram (i.e. peak values only) – dsp_user Nov 24 '17 at 14:40
• This could help, though my client would prefer not to lose peak values. I could ask her to measure shorter recording, which would reduce my frequency resolution, but if that's not possible, I'd want to keep peak even with losing precision of their exact frequency. Kind of like pictures on this link. – nemanja228 Nov 27 '17 at 8:42
• I didn't get from your question that peak values were important. It's an interesting problem because, to get a "thinner" plot you want to reduce the variation, either by averging in time (as I suggest) or across frequency bins (as per the other answer). However, your requirement for also wanting peak values contradicts this. If peaks are caused by tonal components then they would still be present after time averaging... but without more information on what you are trying to achieve, it's hard to give a better answer. – kippertoffee Nov 27 '17 at 13:31
• I played around with the input signal samples and it seems that it's pretty redundant, in a way that analyzing only first 10-20% of the length gives almost the same results, but "thinner" as I needed. Thanks for all the help guys, I guess this will be a satisfying solution :) I'll mark it as answer since it really answers my not precisely formulated question. – nemanja228 Nov 28 '17 at 8:52

If you have already done the long FFT, another possibility is to low pass filter or even just compute a moving average on the long FFT magnitude result vector (before taking the log), until it reaches the “thinness” you desire.

• ... And that (filtering, i.e. convolution in frequency domain) would be the same as windowing in time domain. (Though your moving average would certainly have an interestingly non-easy-on-the-eye sinc window) – Marcus Müller Nov 25 '17 at 11:23