Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Why the number of points doesn't influence IFFT?
Replies: 11   Last Post: Mar 13, 2013 8:08 PM

 Messages: [ Previous | Next ]
 Greg Heath Posts: 6,387 Registered: 12/7/04
Re: Why the number of points doesn't influence IFFT?
Posted: Mar 13, 2013 8:08 PM

"Antigoni " <projects_in_web@yahoo.gr> wrote in message <khphnb\$eo9\$1@newscl01ah.mathworks.com>...
> "Greg Heath" <heath@alumni.brown.edu> wrote in message <khohpn\$km3\$1@newscl01ah.mathworks.com>...
> > "Antigoni " <projects_in_web@yahoo.gr> wrote in message <khnp43\$cv2\$1@newscl01ah.mathworks.com>...
> > > Hi all!
> > >
> > > Suppose you have an equation f(w,x) which involves frequency (w) and space (x) variables and it is solved for various values of these variables between specific ranges. After the solution, I come up with a 2D matrix whose rows represent frequency and columns represent space. I apply an inverse Fourier transform to this matrix using IFFT, in order to construct a matrix in time (rows) and space (columns).
> > > My problem starts when I'm trying to increase the number of points used in frequency dimension. To be more specific, I run two different cases:
> > >
> > > Case A: I solve f(w,x) for 256 points in w and 512 points in x. The range of w is between (-2.5e6 , 2.5e6) Hz, which means that I use a frequency step of df=19607.843. The solution seems ok and when I do the IFFT, everything seems fine. Now I want to increase the points...
> > >
> > > Case B: So, I increase the points in frequency and I solve f(w,x) for 2048 points in w and 512 points in x (are kept constant). The range of w remains the same, although the frequency step is reduced to df=2442.599. The solution in [frequency,space] domain is correct - the number of points is increased along frequency dimension. This means that when I look at a complete period of my signal I have more points along the signal than I had in case A. However, when I apply the IFFT, it seems llike it zooms out the result, keeping the number of points constant along a complete period.
> > >
> > > How can I keep the range constant and increase the accuracy of the output signal from ifft?
> > > Any related answer is welcome.

> >
> > The time/frequency fft relates a time function on
> >
> > t = dt*(0:N-1) = 0:dt:T-dt, dt = 1/Fs, T = N*dt (the period)
> >
> > with the transform on
> >
> > f = df*(0:N-1) = 0:df:Fs-df, df = 1/T = Fs/N
> >
> > Now if Fs remains constant while N is increased and df is decreased:
> >
> > dt = 1/Fs remains constant but T = N*dt =1/df increases.
> >
> > If you want to increase time resolution, you have to increase the maximum frequency
> > of fftshift(fft(x)) which is Fs/2.
> >
> > If you do not have higher frequency measurements, you can always zero pad and get an interpolation of the time function. Make sure half of the zero padding is below -Fs/2 and the other half is above +Fs/2 .
> >
> > Hope this helps
> >
> > Greg

>
> At first, thank you all for your replies. they have been very helpful.
> Although, I have one question for Greg.
>
> What exaclty do you mean by "increasing the maximum frequency of fftshift(fft(x))"? >My problem is when I apply IFFT. How is your recommendation applicable on ifft?

Before taking the ifft, increase the range of f. If you don't have the higher frequency
measurements outside of [-Fs,2, Fs,2], then you cannot increase the time resolution because dt = 1/Fs.

Although you cannot increase the resolution without those high frequency measurements, you can create an interpolated time function via zeropadding the frequency domain.

>Moreover, when I solve my equation (which involves frequency variable), I solve it for >various values of frequency between certain limits, that is [-2.5e6,2.5e6], which is >shifted so zero frequency is in the middle. If I understand well, you mean that I should increase the range [-2.5e6,2.5e6] to higher frequency?

Yes.

Hope this helps.

Greg

Date Subject Author
3/12/13 kavouvi b
3/12/13 kavouvi b
3/12/13 kavouvi b
3/12/13 kavouvi b
3/12/13 kavouvi b
3/12/13 Greg Heath
3/13/13 kavouvi b
3/13/13 kavouvi b
3/13/13 Greg Heath