MATLAB中的levinson调用规则,Levinson-Durbin recursion

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

f1546f461499bd87fa6ae3f8e8427d14.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值