×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

interpolating in time domain to improve FFT frequency resolution

interpolating in time domain to improve FFT frequency resolution

interpolating in time domain to improve FFT frequency resolution

(OP)
Im trying to interpolate time domain data to improve the FFT resolution. Im not sure what Im doing wrong but Im getting a larger amount of bins but not decreasing the frequency spacing between the bins. I think Im doing something wrong or otherwise have made a mistake in theory. It should be simple.


%create a 1MHz sinewave
Fs = 1/1.0000e-09 % Sampling frequency
T = 1/Fs; % Sample time
L = 2500; % Length of signal
t = (0:L-1)*T; % Time vector
x = 15*sin(2*pi*1000000*t)
figure, plot (t, x)


%%FFT before interpolation
Fs = 1/( t(2) - t(1));
L = size(t,2);
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
f = Fs/2*linspace(0,1,NFFT/2+1);
test= fft(x ,NFFT)/L;
figure,plot(f,2*abs(test(1:NFFT/2+1)))
ind =find (f>= 1000000,1)
freq_res = (f(2)-f(1))



%interpolate the sinewave by 100
new_t = t(1):(t(2)-t(1))/100:max(t);
new= interpn( t, x , new_t, 'bicubic'); %TX

%%FFT before interpolation
Fs2 = 1/( new_t(2) - new_t(1));
L2 = size(new_t,2);
NFFT2 = 2^nextpow2(L2); % Next power of 2 from length of y
f2 = Fs2/2*linspace(0,1,NFFT2/2+1);
test= fft(new ,NFFT2)/L2;
figure,plot(f2,2*abs(test(1:NFFT2/2+1)));
ind2 =find (f2>= 1000000,1)
freq_res = (f2(2)-f2(1))

I was hoping by interpolating the 1MHz sinewave by 1000 I would get a frequency improvement of 1000. Yet, in both, the frequency resolution is approximately the same. Isnt the FFT resolution roughly equal to the sampling frequency divided by the number of samples. I know we are increasing the number of samples, but isn't interpolation similar to sampling at higher frequency?
Replies continue below

Recommended for you

RE: interpolating in time domain to improve FFT frequency resolution

Frequency resolution is equal to 1/T, where (in your code), T is the length of the block (in seconds). Doesn't depend on the number of points in the block, just the length of it. Your interpolation will increase the Nyquist frequency and the total number ofnpoints in the FFT, but the resolution is still fixed by T. You need to measure over a longer time.

- Steve

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close