|
power spectrum estimation 有幾種方式,2 E* [7 L" s3 k& c1 q& e: w8 e, }
Peroidogram
1 \" W, V& D. E% o9 N! ^. Q1 YModified periodogram A: [. ]. @7 k g: S( a2 w
Bartlett method9 e3 I, W' h" }$ F
Welch method
. K% ?) B6 ~" ]% h2 f; `. bBlackman-Tukey method" a" z0 N5 u- Z$ D8 d; k
, _. X, `# p6 M# @) L若用simple Peroidogram m file 方式如下,estimated 跟 actual 會有Bias: v2 }0 @) q( P
x : input sequence. Y; Z( |4 a" [4 J ~ P4 x
n1 : starting index, x(n1)
, t9 y' Z7 t9 B- @n2 : ending index, x(n2)' f, [3 X; g$ ~( p, S
3 z2 g! E: b9 ~$ y+ jfunction Px = per(x,n1,n2)2 }2 l9 |: f3 e
x = x(;
" g, J) ~2 G2 e/ j3 e& Hif nargin == 1
% A" Z- z2 i, d* _% ` n1 = 1; n2 = length(x); end;/ C: A9 {$ s" }0 h9 E5 Z
Px = abs(fft(x(n1:n2),1024)).^2/(n2-n1+1);; ]( o6 W6 s# |7 h S z4 x
Px(1) = Px(2); |
|