为什么filtic / arburg不是我意愿它如何工作?

1视图(30天)
所以我试图构造一个简单的自回归算法,可以预测正弦波的输出样本使用伯格方法。我的问题是,我有一个不连续的开始和结束,也许我是错误的,但我相信它是与初始条件设置不正确的过滤器。
重建的输出是这样的:
正如你所看到的从底部图过滤器从一个初始样本值0.5而不是应该是0.9。
这是我的代码:
%开始伯格方法过程
coef_number = 3;
burg_start_coef = arburg (x_start coef_number);
burg_end_coef = arburg (x_end coef_number);
start_cond = filtic (1 burg_start_coef x_start);
end_cond = filtic (1 burg_end_coef x_end);
start_result =过滤器(1 burg_start_coef 0(柜台),start_cond);
end_result =过滤器(1 burg_end_coef 0(柜台),end_cond);
xfade = 0(1、计数器);
i = 1:计数器
xfade (i) = 0.5 * cos(我*π/柜台)+ 0.5;
结束
start_result = start_result。* xfade;
end_result = end_result。* xfade;
%翻转结束数组这不再是逆转
end_result = fliplr (end_result);
结果= start_result + end_result;
x_predicted (1:3000) = x_corrupted (1:3000);
x_predicted(3001:4000) =结果;
x_predicted (4001 N) = x_corrupted (4001 N);
%绘制初步推断
次要情节(5、1、1)
情节(start_result)
次要情节(5、1、2)
情节(end_result)
次要情节(5、1、3)
情节(xfade)
次要情节(5、1、4)
情节(结果)
次要情节(5、1、5)
情节(x_predicted)
任何帮助将不胜感激,我很新,这些函数。

更多的答案(0)

社区寻宝

找到宝藏在MATLAB中央,发现社区如何帮助你!

开始狩猎!