How to reconstruct each frequency components by inverse FFT?

Status
Not open for further replies.

hadesmajesty

Newbie level 4
Joined
Feb 1, 2010
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
How to reconstruct each frequency components by inverse FFT ?
I need a very accurate method.

I have a discrete signal as plotted in Fig.1.

Fig.1.

I first multiply the signal by a Hann window function. Then take FFT in Matlab, and the spectrum is as Fig 2.

.
Fig2.

A smaller scale of amplitude in Fig 3

Fig 3.

According to the location of the peaks, I pick up the signal components, with half band width as 5 bins. I do the IFFT, and divide the results by the Hann window function. It seems this method works well for the first peak, but the cases for the second and third peaks shown in Fig 4 and 5 respectively are not good.


Fig 4.

Fig 5.

My questions are
(1) How to remove the “red noise” around the frequency 0,1,2 in Fig 2 and 3? It seems hard to detrend in my signal.
(2) In Fig 4 and 5, it seems that there are some abnormal oscillations at the left and right edges.
How to remove the edge effects? I need to know exactly the starting points of the second and third peaks in the physical domain.
(3) How to remove the effect of the window function after doing IFFT?

Thank you in advance.
 

The hann window is almost zero at the low and high indexes. If you divide your time-domain signal by that it is like adding time-variant gain to your signal.
If you wish, windowing is just a trick to get a smooth fft.
 

Yes, JoannesPaulus, I agree. But without windowing, the leakage is so large to contaminate the small- amplitude high frequency components. What should I do?
 

Re: How to reconstruct each frequency components by inverse

As a first point, a non-periodic signal, that decreases to zero at the interval boundary obviously won't need windowing.

Secondly, the "windowing reversal" is mainly amplifying artefacts. The IFFT is however already considerably different
from the original waveform, so you should think about what's wrong in your method of manipulating the FFT data. It's
not clear, what you're actually doing here. The FFT waveform only shows magnitude data, which can't represent
the full FFT.

Your intention to "reconstruct each frequency component" is also unclear in part. It seems like you are rather trying to reproduce
a waveform, which is not exactly the same thing.
 

Thank you so much, FvM.
I am an outsider for signal processing, but it is an analytical tool in my research.

(1)"a non-periodic signal, that decreases to zero at the interval boundary obviously won't need windowing. "

The signal at the edge is not exactly zero. And I find windowing gives less leakage and better results, so I do it.

(2)“the "windowing reversal" is mainly amplifying artefacts.”

You are right. At the discrete grid points around 30~50, an artificial vibration is introduced to generate this signal. At the pints 640~the end, the signal is artificially damped down due for certain necessity.

Are the results say, at the grid points between 100~600 still reliable in Fig. 4 and 5? Is there any method to handle "windowing reversal" better?

(3)“It's not clear, what you're actually doing here.”

To produce Fig 4 or 5, I just select the peak locations of the FFT result and the adjacent 5 points on both sides to do IFFT. I am not clear about how to decide the band width. Any suggestions?

(4)“It seems like you are rather trying to reproduce a waveform”

Yes, I want to reproduce the wave forms accurately from the second and third peaks respectively in Fig 2. I need to study how these two signal components generate and develop. How can I do this?

I appreciate any suggestions.
 

Re: How to reconstruct each frequency components by inverse

1. It should be clear, that windowing disturbs the original signal. For the shown waveform, I expect this error to be considerably larger than without windowing. But you have to decide yourself.

2. Windowing reversal is exactly impossible. It involves /0 = ∞ scaling at the boundaries.

3. Do you process complex IFFT data?. You didn't mention it yet.

4. Comparing waveforms 1 and 4, there's obviously a frequency/time base error of about factor 2 in your transformation.
 

Thank you very much for your instant reply, FvM.

“2. Windowing reversal is exactly impossible. It involves /0 = ∞ scaling at the boundaries.”
I read some book, which mentions an “overlapping data segments” method to solve the boundary problems. Do you think it can be applied to such amplitude-varying signal as in Fig 1?

“3. Do you process complex IFFT data?. You didn't mention it yet.”
For the signal u, I obtain U=fft(u) first. Then I plot the result of abs(U) in Fig 2 and 3. I pick up the locations of second peak, with band width 5 grid points on both side (I am not sure the band width) to construct a new vector U2. Finally I obtain u2=ifft(U2). U2 is plotted in Fig 4.
All this is done in matlab. I am not sure the whether the ifft command in matlab is the “complex IFFT data” you mention.

4. Comparing waveforms 1 and 4, there's obviously a frequency/time base error of about factor 2 in your transformation.

Fig 1 is total signal, including all the frequency components. From Fig 2, the amplitude ratio between the second and first peaks is around 0.03/1.2. Comparing waveforms 4 and 1, the ratio of the maximal amplitude between the second wave and the total signal is 3*10^(-4)/0.01. These two numbers, 0.03/1.2 and 3*10^(-4)/0.01 are closed. How can you say “a frequency/time base error of about factor 2”?


Thanks again.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…