DSPRelated.com
Forums

How to zoom into a certain part of FFT?

Started by Vista June 27, 2007
Hi all,

Suppose I have a signal f(t), t is in [0, +infinity).

And I have its spectrum F(w).

Let's say I found out that its main spectrum has 99.9% in [-B, B].

So I truncate/extract out the portion of F(w), for w in [-B, B], and 
discretized the interval into small grids with step size deltaB.

And I then do the inverse FFT on the above samples of F(w), let's call the 
inverse FFT reconstruction f_hat.

Which part of f(t) does this inverse FFT f_hat represent?

If I want to zoom into a certain part of f(t), how can I use inverse FFT to 
do that?

Let's say I only need [a, b] where 0<a<b< infinity, in the time domain,

I only need to visualize the f(t), for t in [a, b],

how do I sample F(w) and do the inverse FFT?

-------------------------

More generally, I am actually thinking of desing a "spectrum analyzer" with 
zoom-in feactures:

as you can see, first do a coarse level inverse FFT to gain a big picture of 
the f(t) curve, and then allow user to zoom into a particular part of the 
f(t) curve and display it with higher resolution of IFFT.

How to do all of these?

Thanks a lot! 


On Jun 26, 8:06 pm, "Vista" <a...@gmai.com> wrote:
> Suppose I have a signal f(t), t is in [0, +infinity). > > And I have its spectrum F(w). > > Let's say I found out that its main spectrum has 99.9% in [-B, B]. > > So I truncate/extract out the portion of F(w), for w in [-B, B], and > discretized the interval into small grids with step size deltaB. > > And I then do the inverse FFT on the above samples of F(w), let's call the > inverse FFT reconstruction f_hat. > > Which part of f(t) does this inverse FFT f_hat represent?
In order to meaningfully sample F(w), you need to know something about its smoothness, else your sample points might fall into deep gaps in F(w), or some-such. There may also be a theorem saying that the width of some portion of a waveform in one domain is inversely proportional to its width in the other domain. The smaller the wiggles in f(t) you want to see, the wider you need to make [-B, B], which makes sense, since the higher frequency components in F(w) are what produces the densest small wiggles in f(t). If you want a tiny enough window from an ifft (much less than log(n) points), you might be better off directly calculating a segment of the dft. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
On Jun 27, 3:49 pm, "Ron N." <rhnlo...@yahoo.com> wrote:
> On Jun 26, 8:06 pm, "Vista" <a...@gmai.com> wrote: > > > Suppose I have a signal f(t), t is in [0, +infinity). > > > And I have its spectrum F(w). > > > Let's say I found out that its main spectrum has 99.9% in [-B, B]. > > > So I truncate/extract out the portion of F(w), for w in [-B, B], and > > discretized the interval into small grids with step size deltaB. > > > And I then do the inverse FFT on the above samples of F(w), let's call the > > inverse FFT reconstruction f_hat. > > > Which part of f(t) does this inverse FFT f_hat represent? > > In order to meaningfully sample F(w), you need to know > something about its smoothness, else your sample points > might fall into deep gaps in F(w), or some-such. > > There may also be a theorem saying that the width of > some portion of a waveform in one domain is inversely > proportional to its width in the other domain. The > smaller the wiggles in f(t) you want to see, the wider > you need to make [-B, B], which makes sense, since the > higher frequency components in F(w) are what produces > the densest small wiggles in f(t). > > If you want a tiny enough window from an ifft (much > less than log(n) points), you might be better off > directly calculating a segment of the dft. > > IMHO. YMMV. > -- > rhn A.T nicholson d.0.t C-o-M
What you're doing is "band-pass filtering". You'll need to take the sqrt because a spectrum is energy, but you want amplitude for the ifft. But the spectrum contains no information on phase, so what are you going to do about that? Also, you must be aware that you'll have problems with Gibb's phenomenon which causes "ringing" in the inverse Fourier transform. To avoid that you'll need to smoothly taper the spectral cutoffs - I use a tanh function for this.
Vista wrote:
> Hi all, > > Suppose I have a signal f(t), t is in [0, +infinity).
> Which part of f(t) does this inverse FFT f_hat represent?
The part with frequencies inside the bandpass you selected.
> If I want to zoom into a certain part of f(t), how can I use inverse FFT to > do that?
If you want to zoom in on f(t), did you ever think of just zooming in on f(t)? No FT required! Duh! Methinks you have no idea what you are doing.
when you say you want to zoom in on certain parts of f(t), what do you
mean? The data is already in form of samples, you really can't get new
data, since all the information is already in the samples. For example
if your samples represent the signal at T,2T etc, there is no way you
can exactly know what happened at 1.5 T - that data is lost. For your
application, the easiest way would be to display every 10th sample,
for example, to start with. Then, if the user selects a region,
display every 5th sample in that region. If he zooms in further,
display every sample. If he goes closer than this, you need to do some
interpolation.

On Jun 27, 4:06 am, "Vista" <a...@gmai.com> wrote:
> Hi all, > > Suppose I have a signal f(t), t is in [0, +infinity). > > And I have its spectrum F(w). > > Let's say I found out that its main spectrum has 99.9% in [-B, B]. > > So I truncate/extract out the portion of F(w), for w in [-B, B], and > discretized the interval into small grids with step size deltaB. > > And I then do the inverse FFT on the above samples of F(w), let's call the > inverse FFT reconstruction f_hat. > > Which part of f(t) does this inverse FFT f_hat represent?
Just as sampling a non-bandlimited function in the time domain causes time-domain aliasing, the dual occurs in your scenario. You are sampling a non-time-limited function in the frequency domain, which will cause frequency-domain aliasing. -- Oli
On Jun 27, 7:14 pm, Oli Charlesworth <c...@olifilth.co.uk> wrote:
> On Jun 27, 4:06 am, "Vista" <a...@gmai.com> wrote: > > > Hi all, > > > Suppose I have a signal f(t), t is in [0, +infinity). > > > And I have its spectrum F(w). > > > Let's say I found out that its main spectrum has 99.9% in [-B, B]. > > > So I truncate/extract out the portion of F(w), for w in [-B, B], and > > discretized the interval into small grids with step size deltaB. > > > And I then do the inverse FFT on the above samples of F(w), let's call the > > inverse FFT reconstruction f_hat. > > > Which part of f(t) does this inverse FFT f_hat represent? > > Just as sampling a non-bandlimited function in the time domain causes > time-domain aliasing, the dual occurs in your scenario. You are > sampling a non-time-limited function in the frequency domain, which > will cause frequency-domain aliasing. > > -- > Oli
It's very interesting. We've all got different ideas about what Vista is trying to do. The only thing we all agree on is that he/she is going about it the wrong way. Perhaps Vista is a troll, deliberately posing an inane question, then sitting back to watch the fun.
On Jun 26, 11:06 pm, "Vista" <a...@gmai.com> wrote:
> > Suppose I have a signal f(t), t is in [0, +infinity). > > And I have its spectrum F(w). > > Let's say I found out that its main spectrum has 99.9% in [-B, B]. > > So I truncate/extract out the portion of F(w), for w in [-B, B], and > discretized the interval into small grids with step size deltaB. > > And I then do the inverse FFT on the above samples of F(w), let's call the > inverse FFT reconstruction f_hat. > > Which part of f(t) does this inverse FFT f_hat represent? >
It depends on what you mean by "focus". If you mean "set all the unwanted spectral components to zero" and then you IFFT the result, f_hat(nT) represents a filtered version of the original f(nT) over the entire interval represented by the samples of f(nT). If, by "focus", you mean "discard the unwanted spectral components" and then you IFFT the result (containing a smaller number of spectral components), f_hat(nT_prime) represents a decimated and filtered version of the original f(nT), still over the entire interval represented by the samples of f(nT).
Hi folks,

This is not a joke post. I really have this question in my mind for long 
time.

When I truncate/extract out F(w) for w in [-B, B] and use step size deltaB 
to sample it and then do IFFT, what is the portion of f(t) I see? Say f(t) 
for t in [a, b]. What are a and b?

Now suppose I find there is some fine structure in [c, d], which is shown 
from the visual display of f_hat(t), t in [a, b]. And a<c<d<b.

How to do IFFT targeting at f(t) on [c, d] with higher resolution?

And so on and so forth?

Thanks!


"Vista" <abc@gmai.com> wrote in message 
news:f5sk5g$qmm$1@news.Stanford.EDU...
> Hi all, > > Suppose I have a signal f(t), t is in [0, +infinity). > > And I have its spectrum F(w). > > Let's say I found out that its main spectrum has 99.9% in [-B, B]. > > So I truncate/extract out the portion of F(w), for w in [-B, B], and > discretized the interval into small grids with step size deltaB. > > And I then do the inverse FFT on the above samples of F(w), let's call the > inverse FFT reconstruction f_hat. > > Which part of f(t) does this inverse FFT f_hat represent? > > If I want to zoom into a certain part of f(t), how can I use inverse FFT > to do that? > > Let's say I only need [a, b] where 0<a<b< infinity, in the time domain, > > I only need to visualize the f(t), for t in [a, b], > > how do I sample F(w) and do the inverse FFT? > > ------------------------- > > More generally, I am actually thinking of desing a "spectrum analyzer" > with zoom-in feactures: > > as you can see, first do a coarse level inverse FFT to gain a big picture > of the f(t) curve, and then allow user to zoom into a particular part of > the f(t) curve and display it with higher resolution of IFFT. > > How to do all of these? > > Thanks a lot! >
Hi folks,

This is not a joke post. I really have this question in my mind for long 
time.

When I truncate/extract out F(w) for w in [-B, B] and use step size deltaB 
to sample it and then do IFFT, what is the portion of f(t) I see? Say f(t) 
for t in [a, b]. What are a and b?

Now suppose I find there is some fine structure in [c, d], which is shown 
from the visual display of f_hat(t), t in [a, b]. And a<c<d<b.

How to do IFFT targeting at f(t) on [c, d] with higher resolution?

And so on and so forth?

Thanks!


"Vista" <abc@gmai.com> wrote in message 
news:f5sk5g$qmm$1@news.Stanford.EDU...
> Hi all, > > Suppose I have a signal f(t), t is in [0, +infinity). > > And I have its spectrum F(w). > > Let's say I found out that its main spectrum has 99.9% in [-B, B]. > > So I truncate/extract out the portion of F(w), for w in [-B, B], and > discretized the interval into small grids with step size deltaB. > > And I then do the inverse FFT on the above samples of F(w), let's call the > inverse FFT reconstruction f_hat. > > Which part of f(t) does this inverse FFT f_hat represent? > > If I want to zoom into a certain part of f(t), how can I use inverse FFT > to do that? > > Let's say I only need [a, b] where 0<a<b< infinity, in the time domain, > > I only need to visualize the f(t), for t in [a, b], > > how do I sample F(w) and do the inverse FFT? > > ------------------------- > > More generally, I am actually thinking of desing a "spectrum analyzer" > with zoom-in feactures: > > as you can see, first do a coarse level inverse FFT to gain a big picture > of the f(t) curve, and then allow user to zoom into a particular part of > the f(t) curve and display it with higher resolution of IFFT. > > How to do all of these? > > Thanks a lot! >