|
power spectrum estimation 有幾種方式,
7 b" H# x( ]# ~2 d, B. HPeroidogram
. M7 {2 Y$ x( V4 @Modified periodogram) ^! q @0 ?7 h- H. I: O5 \
Bartlett method( [+ T; I* h3 ~! i7 A
Welch method
; G' ?. t. {$ ~$ zBlackman-Tukey method
# I6 s& f3 u2 j; P
* ^1 ]; U+ b1 a$ R# ^1 n若用simple Peroidogram m file 方式如下,estimated 跟 actual 會有Bias
/ B: m$ W0 P+ {) L1 w4 Vx : input sequence
& M! l8 d0 ?$ g' Yn1 : starting index, x(n1)
! }1 m. A6 V Wn2 : ending index, x(n2)' G9 N2 b$ G/ b j+ C
1 k+ G2 a2 Q* \+ v4 R( w
function Px = per(x,n1,n2)3 k2 Q* C* ?: {1 x' F. ~$ a: G: {
x = x(;2 `! ?& ]2 g- i
if nargin == 1: ?$ e2 D7 ^" G, f+ b5 F
n1 = 1; n2 = length(x); end;
' m* c$ ` {5 \/ d. \Px = abs(fft(x(n1:n2),1024)).^2/(n2-n1+1);
( r3 b4 e* P- T" o1 O, Q. [4 `Px(1) = Px(2); |
|