声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1184|回复: 0

[滤波] 关于维纳滤波的疑问

[复制链接]
发表于 2010-12-1 11:19 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
clear;
clf;
load('D:\yy\课程学习\信号\mat\yy.mat');I=yy;%期望信号
observe=awgn(I,20,'measured');%信噪比越高,滤后的波形与与原来波形偏差越小
noise=observe-I;%产生噪声
L=200;%滤波器长度
N=950;%信号点数
rxx1=xcorr(observe,L);
rxx=rxx1(L+2:2*L+1)';
rxy1=xcorr(observe,I,L);
rxy=rxy1(L+2:2*L+1)';
rxx_matrix=toeplitz(rxx(1:L));
hoptx=rxx_matrix\rxy;
afterf = filter(hoptx,1,observe);        %滤波后的信号
nx=sum(abs(I).^2);
eminx=nx-rxy'*hoptx;%最小均方误差

subplot(3,1,1)
plot(I);
title('期望信号');

subplot(3,1,2)
plot(noise);
title('噪声信号');

subplot(3,1,3)
plot(observe,'red');
%axis([0 1000,0 250]);
title('观测信号');
hold on;
plot(I,'blue');
hold off;

figure;
subplot(3,1,1);
plot(afterf,'red');
%axis([0 1000,0 250]);
title('滤波后的信号与观测信号');
hold on;
plot(I,'blue');
hold off;

subplot(3,1,2);
z=afterf-I;%滤波后的噪声
plot(z);
m=size(z);
title('滤波后信号与未加噪信号的差值');

averz=sum(abs(z(1,:)))/m(2);%滤波后信号与未加噪信号的平均差值
avers=sum(abs(noise(1,:)))/950;
aver=sum((z-noise).^2);

%------------信噪比---------
Ps1=sum(abs(x(1,:)).^2);%signal power
Pn1=sum(abs(noise(1,:)).^2);%noise power
snr1=10*log10(Ps1/Pn1);
%Ps2=sum(abs(afterf(1,:)).^2);
Pn2=sum(abs(z(1,:)).^2);
snr2=10*log10(Ps1/Pn2);
这是我编写的维纳滤波程序,但是出来的结果发现滤波后噪声更大了……有谁能指点下呀,不胜感激!
回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-19 07:12 , Processed in 0.100362 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表