fft normalization and parseval

28 ビュー (過去 30 日間)
yasser
yasser 2014 年 5 月 25 日
回答済み: yasser 2014 年 5 月 26 日
h=complex(randi([-1 1],128,1),randi([-1 1],128,1));
h=h/std(h); % no h is normalized to unit pow thus var(h)=1
t=128*ifft(h);
k=var(t);
f=fft(t)/128
g=var(f);
my problem is that k(power in time ) not = g(power in freq) also i have done normalizatoin so that parseval therom applies
any help please

採用された回答

Matt J
Matt J 2014 年 5 月 25 日
編集済み: Matt J 2014 年 5 月 25 日
also i have done normalizatoin so that parseval therom applies
No, you haven't, I'm afraid. For a length-N fft, the proper normalization is
Y=fft(X)/sqrt(N);
XX=sqrt(N)*ifft(Y);
For example,
>> X=rand(1,10);
>> Y=fft(X)/sqrt(10); XX= sqrt(10)*ifft(Y);
>> norm(X), norm(Y), norm(XX)
ans =
2.3117
ans =
2.3117
ans =
2.3117
  2 件のコメント
Matt J
Matt J 2014 年 5 月 25 日
yasser Commented
@Matt J thanks but please provide a ref for your normalization factor as i saw lots of codes doing as i did without the sqrt issue
Matt J
Matt J 2014 年 5 月 25 日
編集済み: Matt J 2014 年 5 月 25 日
As you can see from the formula in the FFT documentation
the formula for the transform that MATLAB uses is non-orthogonal by a factor of sqrt(N). Normalizing by N and 1/N is what is needed when using FFTs to compute Fourier Series coefficients, see the formulas here

サインインしてコメントする。

その他の回答 (2 件)

George Papazafeiropoulos
George Papazafeiropoulos 2014 年 5 月 25 日
In the following code:
var1=128;
h=complex(randi([-1 1],var1,1),randi([-1 1],var1,1));
h=h/std(h); % no h is normalized to unit pow thus var(h)=1
t=var1*ifft(h);
k=var(t)
f=fft(t)/var1;
g=var(f)
you have specified var1=128. Try to increase var from 128 to larger values. The two results will eventually converge.

yasser
yasser 2014 年 5 月 26 日
@Matt J please what do u mean by formula for the transform that MATLAB uses is non-orthogonal by a factor of sqrt(N)

カテゴリ

Help Center および File ExchangeDetection についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by