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

📄 active noise control.m

📁 Let X1,X2,...X10 be independent uniformly distributed Random vari- ables over [0 1] andY = X1 + X2
💻 M
字号:
%ACTIVE NOISE CONTROL USING FIR WEINER FILTER
clear;
clc;
t=[0:1/80:1];
phi=rand(1);
x=0.5*cos(2*pi*10*t+phi);
v=wgn(81,1,0);
p=wgn(1,1,0);
v1(1,81)=0;v2(1,81)=0;
v1(1)=0.8*p+v(1);v2(1)=0.6*p+v(1);
n=(2:1:81);
v1(n)=0.6*v(n-1)+v(n);
v2(n)=0.8*v(n-1)+v(n);
y=x+v1;
% plot(v(1:50),'gx-');
% hold all
% plot(v1(1:50),'r*-');
% plot(v2(1:50),'bo-');
% hold off
% legend('v','v1','v2');          
Rv2v2=[1.64 0.8;0.8 1.64];
rv1v2=[1.48 0.6];
Rv2v2inv=inv(Rv2v2);
h=Rv2v2inv*rv1v2';
v1est=conv(h,v2);
xest=y-v1est(1:81);
plot(y(1:50),'r*-');
hold all
plot(x(1:50),'gx-');
plot(xest(1:50),'bo-');
hold off
legend('noisy sequence','original sequence','estimated sequence');
xlabel('time');
ylabel('signal amplitude');
title('Fig 3.2 Active noise control');

⌨️ 快捷键说明

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