⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 新建 文本文档.txt

📁 卡尔曼滤波的MATLAB程序,卡尔曼滤波的MATLAB程序
💻 TXT
📖 第 1 页 / 共 5 页
字号:
kalman 滤波的 matlab 程序 



clear 
N=200; 
w(1)=0; 
w=randn(1,N) 
x(1)=0; 
a=1; 
for k=2:N; 
x(k)=a*x(k-1)+w(k-1); 
end 

V=randn(1,N); 
q1=std(V); 
Rvv=q1.^2; 
q2=std(x); 
Rxx=q2.^2; 
q3=std(w); 
Rww=q3.^2; 
c=0.2; 
Y=c*x+V; 

p(1)=0; 
s(1)=0; 
for t=2:N; 
p1(t)=a.^2*p(t-1)+Rww; 
b(t)=c*p1(t)/(c.^2*p1(t)+Rvv); 
s(t)=a*s(t-1)+b(t)*(Y(t)-a*c*s(t-1)); 
p(t)=p1(t)-c*b(t)*p1(t); 
end 

t=1:N; 
clear 
N=200; 
w(1)=0; 
w=randn(1,N) 
x(1)=0; 
a=1; 
for k=2:N; 
x(k)=a*x(k-1)+w(k-1); 
end 

V=randn(1,N); 
q1=std(V); 
Rvv=q1.^2; 
q2=std(x); 
Rxx=q2.^2; 
q3=std(w); 
Rww=q3.^2; 
c=0.2; 
Y=c*x+V; 

p(1)=0; 
s(1)=0; 
for t=2:N; 
p1(t)=a.^2*p(t-1)+Rww; 
b(t)=c*p1(t)/(c.^2*p1(t)+Rvv); 
s(t)=a*s(t-1)+b(t)*(Y(t)-a*c*s(t-1)); 
p(t)=p1(t)-c*b(t)*p1(t); 
end 

t=1:N; 
clear 
N=200; 
w(1)=0; 
w=randn(1,N) 
x(1)=0; 
a=1; 
for k=2:N; 
x(k)=a*x(k-1)+w(k-1); 
end 

V=randn(1,N); 
q1=std(V); 
Rvv=q1.^2; 
q2=std(x); 
Rxx=q2.^2; 
q3=std(w); 
Rww=q3.^2; 
c=0.2; 
Y=c*x+V; 

p(1)=0; 
s(1)=0; 
for t=2:N;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(k)=a*x(k-1)+w(k-1); 
end 

V=randn(1,N); 
q1=std(V); 
Rvv=q1.^2; 
q2=std(x); 
Rxx=q2.^2; 
q3=std(w); 
Rww=q3.^2; 
c=0.2; 
Y=c*x+V; 

p(1)=0; 
s(1)=0; 
for t=2:N; 
p1(t)=a.^2*p(t-1)+Rww; 
b(t)=c*p1(t)/(c.^2*p1(t)+Rvv); 
s(t)=a*s(t-1)+b(t)*(Y(t)-a*c*s(t-1)); 
p(t)=p1(t)-c*b(t)*p1(t); 
end 

t=1:N; 
clear 
N=200; 
w(1)=0; 
w=randn(1,N) 
x(1)=0; 
a=1; 
for k=2:N; 
x(k)=a*x(k-1)+w(k-1); 
end 

V=randn(1,N); 
q1=std(V); 
Rvv=q1.^2; 
q2=std(x); 
Rxx=q2.^2; 
q3=std(w); 
Rww=q3.^2; 
c=0.2; 
Y=c*x+V; 

p(1)=0; 
s(1)=0; 
for t=2:N; 
p1(t)=a.^2*p(t-1)+Rww; 
b(t)=c*p1(t)/(c.^2*p1(t)+Rvv); 
s(t)=a*s(t-1)+b(t)*(Y(t)-a*c*s(t-1)); 
p(t)=p1(t)-c*b(t)*p1(t); 
end 

t=1:N; 
clear 
N=200; 
w(1)=0; 
w=randn(1,N) 
x(1)=0; 
a=1; 
for k=2:N; 
x(k)=a*x(k-1)+w(k-1); 
end 

V=randn(1,N); 
q1=std(V); 
Rvv=q1.^2; 
q2=std(x); 
Rxx=q2.^2; 
q3=std(w); 
Rww=q3.^2; 
c=0.2; 
Y=c*x+V; 

p(1)=0; 
s(1)=0; 
for t=2:N; 
p1(t)=a.^2*p(t-1)+Rww; 
b(t)=c*p1(t)/(c.^2*p1(t)+Rvv); 
s(t)=a*s(t-1)+b(t)*(Y(t)-a*c*s(t-1)); 
p(t)=p1(t)-c*b(t)*p1(t); 
end 

t=1
N=200; 
w(1)=0; 
w=randn(1,N) 
x(1)=0; 
a=1; 
for k=2:N; 
x(k)=a*x(k-1)+w(k-1); 
end 

V=randn(1,N); 
q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 
p1(t)=a.^2*p(t-1)+Rww; 
b(t)=c*p1(t)/(c.^2*p1(t)+Rvv); 
s(t)=a*s(t-1)+b(t)*(Y(t)-a*c*s(t-1)); 
p(t)=p1(t)-c*b(t)*p1(t); 
end 

t=1:N; 
clear 
N=200; 
w(1)=0; 
w=randn(1,N) 
x(1)=0; 
a=1; 
for k=2:N; 
x(k)=a*x(k-1)+w(k-1); 
end 

V=randn(1,N); 
q1=std(V); 
Rvv=q1.^2; 
q2=std(x); 
Rxx=q2.^2; 
q3=std(w); 
Rww=q3.^2; 
c=0.2; 
Y=c*x+V; 

p(1)=0; 
s(1)=0; 
for t=2:N; 
p1(t)=a.^2*p(t-1)+Rww; 
b(t)=c*p1(t)/(c.^2*p1(t)+Rvv); 
s(t)=a*s(t-1)+b(t)*(Y(t)-a*c*s(t-1)); 
p(t)=p1(t)-c*b(t)*p1(t); 
end 

t=1:N; 
clear 
N=200; 
w(1)=0; 
w=randn(1,N) 
x(1)=0; 
a=1; 
for k=2:N; 
x(k)=a*x(k-1)+w(k-1); 
end 

V=randn(1,N); 
q1=std(V); 
Rvv=q1.^2; 
q2=std(x); 
Rxx=q2.^2; 
q3=std(w); 
Rww=q3.^2; 
c=0.2; 
Y=c*x+V; 

p(1)=0; 
s(1)=0; 
for t=2:N; 
p1(t)=a.^2*p(t-1)+Rww; 
b(t)=c*p1(t)/(c.^2*p1(t)+Rvv); 
s(t)=a*s(t-1)+b(t)*(Y(t)-a*c*s(t-1)); 
p(t)=p1(t)-c*b(t)*p1(t); 
end 

t=1
N=200; 
w(1)=0; 
w=randn(1,N) 
x(1)=0; 
a=1; 
for k=2:N; 
x(k)=a*x(k-1)+w(k-1); 
end 

V=randn(1,N); 
q1=std(V); 
Rvv=q1.^2; 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -