增广最小二乘辨识白噪声和有色噪声的区别是什么Word文件下载.docx
- 文档编号:15355876
- 上传时间:2022-10-29
- 格式:DOCX
- 页数:19
- 大小:980.06KB
增广最小二乘辨识白噪声和有色噪声的区别是什么Word文件下载.docx
《增广最小二乘辨识白噪声和有色噪声的区别是什么Word文件下载.docx》由会员分享,可在线阅读,更多相关《增广最小二乘辨识白噪声和有色噪声的区别是什么Word文件下载.docx(19页珍藏版)》请在冰豆网上搜索。
x1=xor(y3,y4);
x2=y1;
x3=y2;
x4=y3;
y(i)=y4;
ify(i)>
0.5,u(i)=-1;
elseu(i)=1;
end
y1=x1;
y2=x2;
y3=x3;
y4=x4;
end
figure
(1);
subplot(2,1,1);
stem(u),gridon
v=randn(1,60);
subplot(2,1,2);
plot(v),gridon;
u,v%显示输入信号和噪声信号
z=zeros(7,60);
zs=zeros(7,60);
zm=zeros(7,60);
zmd=zeros(7,60);
z
(2)=0;
z
(1)=0;
zs
(2)=0;
zs
(1)=0;
zm
(2)=0;
zm
(1)=0;
zmd
(2)=0;
zmd
(1)=0;
c0=[0.10.10.10.10.10.10.1]'
;
p0=10^6*eye(7,7);
E=0.00000000005;
c=[c0,zeros(7,14)];
e=zeros(7,15);
fork=3:
60;
z(k)=1.8*z(k-1)-0.9*z(k-2)+0.8*u(k-1)+0.3*u(k-2)+v(k)+v(k-1)+0.4*v(k-2);
h1=[-z(k-1),-z(k-2),u(k-1),u(k-2),v(k),v(k-1),v(k-2)]'
x=h1'
*p0*h1+1;
x1=inv(x);
k1=p0*h1*x1;
d1=z(k)-h1'
*c0;
c1=c0+k1*d1;
zs(k)=-1.8*z(k-1)+0.9*z(k-2)+0.8*u(k-1)+0.3*u(k-2);
%系统在M序列的输入下的输出响应
zm(k)=[-z(k-1),-z(k-2),u(k-1),u(k-2)]*[c1
(1);
c1
(2);
c1(3);
c1(4)];
zmd(k)=h1'
*c1;
e1=c1-c0;
e2=e1./c0;
e(:
k)=e2;
c0=c1;
c(:
k)=c1;
p1=p0-k1*k1'
*[h1'
*p0*h1+1];
%findp(k)
p0=p1;
ife2<
=Ebreak;
end
end
c,e,%显示被辨识参数及参数收敛情况
z,zs,zm%显示输出采样值、系统实际输出值、模型输出值
%分离变量
a1=c(1,:
);
a2=c(2,:
b1=c(3,:
b2=c(4,:
d1=c(5,:
d2=c(6,:
d3=c(7,:
ea1=e(1,:
ea2=e(2,:
eb1=e(3,:
eb2=e(4,:
ed1=e(5,:
ed2=e(6,:
ed3=e(7,:
figure
(2);
%画第二个图形
i=1:
plot(i,a1,'
r'
i,a2,'
r:
'
i,b1,'
b'
i,b2,'
b:
i,d1,'
g'
i,d2,'
g:
i,d3,'
g+'
)%画出各个被辨识参数
title('
ParameterIdentificationwithRecursiveLeastSquaresMethod'
)
figure(3);
i=1:
%画出第三个图形
plot(i,ea1,'
i,ea2,'
i,eb1,'
i,eb2,'
i,ed1,'
i,ed2,'
r+'
IdentificationPrecision'
figure(4);
subplot(4,1,1);
%画出第四个图形,第一个子图
plot(i,zs(i),'
subplot(4,1,2);
plot(i,z(i),'
)%第二个子图,画出被辨识系统的采样输出响应
subplot(4,1,3);
plot(i,zm(i),'
)%第三个子图,画出模型含有噪声的输出响应
subplot(4,1,4);
)%第四个子图,画出模型去除噪声后的输出响应
(1)程序执行结果:
u=
Columns1through17
1-1-1-1-1111-111-1-11-11-1
Columns18through34
-1-1-1111-111-1-11-11-1-1-1
Columns35through51
-1111-111-1-11-11-1-1-1-11
Columns52through60
11-111-1-11-1
v=
Columns1through10
0.7254-0.06310.7147-0.2050-0.12411.48971.40901.41720.6715-1.2075
Columns11through20
0.71721.63020.48891.03470.7269-0.30340.2939-0.78730.8884-1.1471
Columns21through30
-1.0689-0.8095-2.94431.43840.3252-0.75491.3703-1.7115-0.1022-0.2414
Columns31through40
0.31920.3129-0.8649-0.0301-0.16490.62771.09331.1093-0.86370.0774
Columns41through50
-1.2141-1.1135-0.00681.5326-0.76970.3714-0.22561.1174-1.08910.0326
Columns51through60
0.55251.10061.54420.0859-1.4916-0.7423-1.06162.3505-0.61560.7481
c=
0.100000.10000.0348-0.0983-0.6239-0.4695-1.6520-1.8000-1.8000
0.100000.10000.10000.53580.52920.70291.43730.90000.9000
0.10000-0.0000-0.1590-0.07390.00550.14510.58640.80000.8000
0.100000.20000.06400.54590.81880.74850.29020.30000.3000
0.100000.17150.14950.2697-0.2741-0.27220.75961.00001.0000
0.100000.09370.19840.89040.92641.14640.70381.00001.0000
0.100000.17250.1716-0.4338-0.16140.14530.33010.40000.4000
-1.8000-1.8000-1.8000-1.8000-1.8000-1.8000-1.8000-1.8000-1.8000-1.8000
0.90000.90000.90000.90000.90000.90000.90000.90000.90000.9000
0.80000.80000.80000.80000.80000.80000.80000.80000.80000.8000
0.30000.30000.30000.30000.30000.30000.30000.30000.30000.3000
1.00001.00001.00001.00001.00001.00001.00001.00001.00001.0000
0.40000.40000.40000.40000.40000.40000.40000.40000.40000.4000
0.40000.40000.40000.40000.40000.40000.40000.40
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 增广 最小 辨识 噪声 有色 区别 是什么
![提示](https://static.bdocx.com/images/bang_tan.gif)