赞
踩
Estimate the coefficients of an autoregressive process given by
x(n)=0.1x(n-1)-0.8x(n-2)-0.27x(n-3)+w(n).
a = [1 0.1 -0.8 -0.27];
Generate a realization of the process by filtering white noise of variance 0.4.
v = 0.4;
w = sqrt(v)*randn(15000,1);
x = filter(1,a,w);
Estimate the correlation function. Discard the correlation values at negative lags. Use the Levinson-Durbin recursion to estimate the model coefficients. Verify that the prediction error corresponds to the variance of the input.
[r,lg] = xcorr(x,'biased');
r(lg<0) = [];
[ar,e] = levinson(r,numel(a)-1)
ar = 1×4
1.0000 0.0772 -0.7954 -0.2493
e = 0.3909
Estimate the reflection coefficients for a 16th-order model. Verify that the only reflection coefficients that lie outside the 95% confidence bounds are the ones that correspond to the correct model order. See AR Order Selection with Partial Autocorrelation Sequence for more details.
[~,~,k] = levinson(r,16);
stem(k,'filled')
conf = sqrt(2)*erfinv(0.95)/sqrt(15000);
hold on
[X,Y] = ndgrid(xlim,conf*[-1 1]);
plot(X,Y,'--r')
hold off
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。