- 1、本文档共14页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数字信号处理—matlab实现
题目一 : A sinusoid正弦曲线 of frequency频率 ω0=0.1πand duration持续 of 300 samples样本, that is ,0≤n300, is input to a (causal) filter滤波器 with transfer 转移function功能 ,where a=0.97。Adjust调整 the scale factor因子 b such that the filter’s gain增益 at ω0 is unity唯一的。 Determine确定 and plot画出 the input x(n) and the output y(n) of the filter over the interval间隔 0≤n450, by iterating重复 the difference equation相等的 of the filter. At the same time, plot the filter’s magnitude response.响应
程序代码:
w0=0.1*pi;%输入x(n)序列
n=0:299;
x=sin(w0*n);
subplot(3,1,1); stem(n,x,.);
xlabel(n); ylabel(x(n));
a=[1 -0.97]; %求出滤波器的系数a,b (|h(z)|==1)
b=abs(1+a(2)*exp(-j*0.1*pi));
y1=filter(b,a,x);%利用给定的系数a,b对x中的数据滤波,结果放在y1中
N=450;
y=zeros(1,N);
for m=1:300
y(m)=y1(m);
end;
n=[0:length(y)-1];
subplot(3,1,2);
stem(n,y,.);
axis([0,450,-2,2]);
xlabel(n); ylabel(y);
w=0:0.02*pi:2*pi;
Hw=abs(freqz(b,a,w));%求出频率响应
subplot(3,1,3);
plot(w,Hw); grid on;
axis([0,0.5*pi,0,15]);
xlabel(w);ylabel(Hw);
程序图:
题目二: It is desired to extract a constant signal x (n)=s(n)+ ν(n)=s+ ν (n),where ν(n) is zero-mean white Caussian noise of varianceбv2 . (1) First-order IIR smoother; To this end, the following IIR lowpass filter is used:, where the parameter a is restrict to the range 0a1.This can be achieve in two ways. (2) FIR averaging filters: Consider ,for example, the third-order filter H(z)=h0+h1z-1+h2z-2+h3z-3.(提示:当h0,h1,h2,h3四个系数相等时,其噪声抑制效果最佳).
程序代码:
(1)s=3;%常数序列
v=randn(1,100);%噪声序列
x=v+s;%加噪序列
N=0:99;
subplot(311);
plot(N,x)
xlabel(N);ylabel(x);
axis([0 100 0 5]);
a=0.5; b=1-a; m=b; n=[1,-a];
y1=filter(m,n,x);%滤波后的序列
subplot(312);
plot(y1)
xlabel(n);ylabel(y1);
axis([0 100 0 5]); title(a=0.5);
s=3;
v=randn(1,100);
x=v+s; a=0.99; b=1-a; m=b; n=[1,-a];
y2=filter(m,n,x);
subplot(313);
plot(y2)
xlabel(n);ylabel(y2);
title(a=0.99);
程序图:
(2) s=3;%常数序列
v=randn(1,100);%噪声序列
x=v+s;%加噪序列
N=0:99; subplot(411);
plot(N,x)
xlabel(N);ylabel(x); axis([0 100 0 5]);
a=0.1; b=1-a; m=[0.1,0.2,0.3,0.4]; %滤波器系数不同
n=1;
y1=filter(m,n,x);
su
文档评论(0)