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: Data analysis using FFT
Replies: 1   Last Post: Feb 12, 2013 7:18 PM

 Derek Goring Posts: 3,922 Registered: 12/7/04
Re: Data analysis using FFT
Posted: Feb 12, 2013 7:18 PM

On Wednesday, February 13, 2013 12:44:09 PM UTC+13, John Ng wrote:
> Dear all,
>
>
>
> I have a system that generates a time series, called data1.
>
>
>
> Now, I make certain change to the system, and obtain time series data2.
>
>
>
> I want to quantify the effect of the change that I made to the system. And this is what I have done:
>
>
>
> samplingT=.001;
>
> N1=length(data1);
>
> pos1fft1 = fft(data1, N1);
>
> Pd1=abs(pos1fft1)/N1;
>
>
>
> N2=length(data2);
>
> pos1fft2 = fft(data2, N2);
>
> Pd2=abs(pos1fft1)/N2;
>
>
>
> coef=pos1fft2 -pos1fft1 ;
>
> pow=Pd2-Pd1;
>
>
>
> So, between coef and pow, which is better representation of the change I made to the system? Or none of them? Please advise!
>
>
>
> John

Well, pow will be a bad representation because you've made a coding error in calculating Pd2.
Also, unless N1=N2, the evaluation of coef and pow will not work because the transforms will be different sizes.
Otherwise, coef is obviously better than pow because it contains more information (phase differences as well as amplitude differences).
But, of course, you need to figure out how to interpret the complex numbers that coef contains.............

Note that if data1 and data2 are real, you only need to consider pos1fft1(1:N1/2) and pos1fft2(1:N2/2) because the other half is simply the complex conjugate.