English 中文(简体)
spike in my inverse fourier transform
原标题:

I am trying to compare two data sets in MATLAB. To do this I need to filter the data sets by Fourier transforming the data, filtering it and then inverse Fourier transforming it.

When I inverse Fourier transform the data however I get a spike at either end of the red data set (picture shows the first spike), it should be close to zero at the start, like the blue line. I am comparing many data sets and this only happens occasionally.

I have three questions about this phenomenon. First, what may be causing it, secondly, how can I remedy it, and third, will it affect the data further along the time series or just at the beginning and end of the time series as it appears to from the picture.

Any help would be great thanks.

alt text

问题回答

When using DFT you must remember the DFT assumes a Periodic Signal (As a Superposition of Harmonic Functions). As you can see, the start point is exact continuation of the last point in harmonic function manner.

Did you perform any Zero Padding in the Spectrum Domain? Anyhow, Windowing might reduce the Overshooting.

Knowing more about the filter and the Original data might be helpful.

If you say spike near zero frequencies, I answer check the DC component.

You seem interested by the shape, so doing

x = x - mean(x)

or

x -= mean(x)

or

x -= x.mean()

(I love numpy!)

will just constrain the dataset to begin with null amplitude at zero-frequency and to go ahead with comapring the spectra s amplitude.

(as a side-note: did you check that you approprately use fftshift and ifftshift? this has always been the source of trouble for me)

Could be the numerical equivalent of Gibbs phenomenon. If that s correct, there s no way to remedy it except for filtering.





相关问题
Least squares optimal scaling

I have two waveforms which are linked by a numerical factor. I need to use optimal scaling (least squares) between the two waveforms to calculate this factor in Matlab. Unfortunately I have no idea ...

How to Get a Quantitative Comparison of Two Signals

I’m trying to implement a Blind Source Separation (BSS) algorithm and I’m running into trouble determining the efficacy of the algorithm. I’m trying to create test cases where I work backwards and ...

数字过滤器设计

采用什么最佳方法选择马特拉布数字过滤器设计特性与全球数据分析仪的过滤器? 更具体地说,如果我有信号,我如何确定哪些过滤价值......。

DSP Algorithms Book [closed]

I m looking for a book similar to "Introduction to Algorithms" by Thomas Cormen geared towards DSP algorithms. Is there anything as thorough as Cormen on the DSP market? EDIT I should say I m ...

Digital Sound Processing in C# (and possibly SilverLight)

I need to do some basic and non basic DSP programming in C#. At its core, it includes the generation of a sin wave deciding its frequency in Hertz. Then I d like to Frequency Modulate it and maybe ...

Basic DSP - level adjustment

I m new to DSP programming, and I m wondering how best to carry out the seemingly basic operation of level adujustment. Say I have an 8 bit number that represents the amplitude I want a signal to be ...

Entertaining a baby with VB.NET

I would like to write a little application in VB.NET that will detect a baby s cry. How would I get started with such an application?

热门标签