Question

I am analyzing a time signal, to which I want to apply the FFT to get the signal components in the frequency domain. However, the problem I seem to have is that I have a relatively short time duration, t_end, for my signal. And due to this my frequency bin size dohm is very large. I would like to get my bin size smaller without increasing my signal duration.

Here is my simplified code:

Fs = 100;           %Sampling frequency
Ts = 1/Fs;          %Sample time
t_end = 50;         %End time
t = 0:Ts:t_end;

A = 5;
B = 3;
C = 4;

for ii = 1:length(t)
    x(ii) = A*cos(4*t(ii))+B*sin(3*t(ii))+C*sin(2*t(ii));       %Random signal
end

xdft = fft(x);                              % Fast Fourier Transfrom
freq = 0:Fs/length(x):Fs/2;                 % The signal is symmetric; the second half is neglected
xdft1 = xdft(1:length(x)/2+1)./length(x);   % Again second half is neglected

Ohm = 2*pi*freq;                            % x-axis transformation to rad/s
dohm = Ohm(2)-Ohm(1);                       % frequency bin size in rad/s
dft = abs(xdft1);                           % Take the absolute value, these are the heave amplitue spectrum values

It seems that the only way to decrease the frequency bin size dohm is to sample the signal for a longer duration, but I unfortunately I am not able to do this in my case. Are there any other options?

Thanks!

Was it helpful?

Solution

No, this is not possible, since frequency_resolution = 1 / window_duration. This is a mathematical limit that you cannot get around. As an example, say you have 1 second of data sampled at 1000 Hz. What a FFT does, is more or less: how much of this signal can be reconstructed with a sine/cosine that has 274 oscillations, how much with one with 275 oscillations, 276, etc. The result of this calculations is the amplitude of the bins at 274, 275 and 276 Hz, so you have a frequency resolution of 1 Hz. If you would measure the same signal for 10 seconds, the FFT could try 2740, 2741 and 2742 oscillations, which corresponds to signals at 274.0, 274.1 and 274.2 Hz, so you have a resolution of 0.1 Hz.

You could try to play with zero-padding in the FFT, but this only gives you 'fake resolution', it produces some sort of smooth interpolation between the points that you would obtain with a standard FFT.

OTHER TIPS

You can zero-pad your data and use a longer FFT to get finer FFT result bin spacing, but this won't really give you much finer resolution between different frequency components, just more interpolated plot points and possibly better peak interpolation (depending on the signal-to-noise ratio).

Frequency resolution is not really (1 / window_duration), as isolated narrow-band spectral frequency peaks well above a low noise floor (and well away from DC and Fs/2) can be measured to a much finer resolution (perhaps to 0.1 / duration) using high-quality interpolation methods with an FFT result, and spectral line pairs can require 2.0/window_duration or more time, depending on the window shape, to resolve as 2 separated peaks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top