Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Filtering signal with rapid changes with FFT
Date: Tue, 4 Aug 2009 09:45:03 +0000 (UTC)
Organization: STFC Rutherford Appleton Laboratory
Lines: 32
Message-ID: <h58vuv$aee$1@fred.mathworks.com>
References: <h58mu4$2o2$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1249379103 10702 172.30.248.38 (4 Aug 2009 09:45:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 4 Aug 2009 09:45:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 968489
Xref: news.mathworks.com comp.soft-sys.matlab:560670


"juho salminen" <jssalmi3@cc.hut.fi> wrote in message <h58mu4$2o2$1@fred.mathworks.com>...
> Hi guys,
> 
> I'm newbie with signal processing who is trying to implement fft to signal filtering. My problem is following: 
> My signal is sinusoidial Wave with noise added in it. Wave is decreasing as time passes by.
> 
> My current filtering technique is following: I make FFT of signal, take highest peak from FFT, and cut every sample in frequency domain into 0 except highest peak. 
> Then I just make ifft of signal. 
> 
> This technique suits well for stationary sine wave, but when sine's amplitude changes rapidly with time, it seems that when signal is reversed back to time domain, some distortion to amplitudes of reversed signal is introduced. In my application, I need to get amplitudes of signals very accurately!
> 
> Basicly, what I'm trying is to make filter, which would not make any phase delay for signal, and would fit for signals with different frequencies...
> 
> Is there any other ways to do this kind of filter? 
> 
> Could you guys also make some example code also? My signal processing knowledge is basicly 0
> 
> Thanks,
> 
> -Juho

Your basic problem appears to be that the moment you apply amplitude modulation, your signal ceases to be a pure sine wave. 

You are in effect taking your time domain sine wave and multiplying by your amplitude modification distribution. In the frequency domain this is equivelent to convolving the Fourier transform of your sine wave (your spike) with the fourier transform of your modulation distribution - which results in a spectrum that is no longer a spike, but has been somewhat smeared. Thus now you kill every frequency component except for the spike, you are throwing away all of the information regarding your modulation distribution and hence you get what you describe as distortion.

The filter you need is not this very narrow spike that you are currently using, but one that corresponds/approximates to the Fourier transform of your amplitude modulated sine wave.

Without knowing anything about the Modulation distribution, this is about as far as I can help.

Regards

Dave Robinson