ImageVerifierCode 换一换
格式:DOCX , 页数:11 ,大小:62.02KB ,
资源ID:3628285      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/3628285.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(数字信号处理实验六.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

数字信号处理实验六.docx

1、数字信号处理实验六 实验六 Q7-1clf;Fp = 4000;Fs = 8000;Wp = 2*pi*Fp; Ws = 2*pi*Fs;N1, Wn1 = buttord(Wp, Ws, 0.5, 40,s);b1,a1 = butter(N, Wn, s);N2 Wn2= cheb1ord(Wp, Ws, 0.5, 40,s);b2,a2=cheby1(N,0.5,Wn,s)N3 Wn3= cheb2ord(Wp, Ws, 0.5, 40,s);b3,a3=cheby2(N,0.5,Wn,s)N4 Wn4= ellipord(Wp, Ws, 0.5, 40,s);b4,a4=ellip(N

2、,0.5,40,Wn,s)%b,a = cheby1(N,Wn,s);wa = 0:(3*Ws)/40000:3*Ws;h1 = freqs(b1,a1,wa);h2 = freqs(b2,a2,wa);h3 = freqs(b3,a3,wa);h4 = freqs(b4,a4,wa);subplot(2,2,1)plot(wa/(2*pi), 20*log10(abs(h1);gridxlabel(Frequency, Hz);ylabel(Gain, dB);title(buttord Gain response);axis(0 3*Fs -60 5);subplot(2,2,2)plot

3、(wa/(2*pi), 20*log10(abs(h2);gridxlabel(Frequency, Hz);ylabel(Gain, dB);title(cheb1ord Gain response);axis(0 3*Fs -60 5);subplot(2,2,3)plot(wa/(2*pi), 20*log10(abs(h3);gridxlabel(Frequency, Hz);ylabel(Gain, dB);title(cheb2ord Gain response);axis(0 3*Fs -60 5);subplot(2,2,4)plot(wa/(2*pi), 20*log10(a

4、bs(h4);gridxlabel(Frequency, Hz);ylabel(Gain, dB);title(ellipord Gain response);axis(0 3*Fs -60 5);disp(N1的值)disp(N1)disp(N2的值)disp(N2)disp(N3的值)disp(N3)disp(N4的值)disp(N4)巴特沃兹:9阶 切比雪夫I,II:5阶 椭圆滤波器:4阶Q7-5clfWs = 0.4 0.6; Wp = 0.2 0.8; Rp = 0.4; Rs = 50;% Estimate the Filter OrderN1, Wn1 = buttord(Wp,

5、 Ws, Rp, Rs); % Design the Filternum,den = butter(N1,Wn1,stop); % Display the transfer functiondisp(Numerator Coefficients are );disp(num);disp(Denominator Coefficients are );disp(den);% Compute the gain responseg, w = gain(num,den); % Plot the gain responseplot(w/pi,g);grid axis(0 1 -60 5);xlabel(o

6、mega /pi); ylabel(Gain in dB);title(Gain Response of a Butterworth Bandstop Filter);传输函数的表达式为:,设计不符合指标,通带边界频率不符合要求。Q7-6clfWs = 0.4; Wp = 0.2; Rp = 0.5; Rs = 40;N1, Wn1 = cheb1ord(Wp, Ws, Rp, Rs); num,den = cheby1(N1,0.5,Wn1); disp(Numerator Coefficients are );disp(num);disp(Denominator Coefficients

7、are );disp(den);g, w = gain(num,den); plot(w/pi,g);grid axis(0 1 -60 5);xlabel(omega /pi); ylabel(Gain in dB);title(Gain Response of a Butterworth Bandstop Filter);传输函数的表达式为:,设计符合指标。Q7-13clfN=kaiord(2000,2500,0.005,0.005,10000)disp(N)计算所得阶数为46,ceil的作用是返回大于或等于指定表达式的最小整数。nargin的作用是输入参数个数。Q7-20clfb=fir

8、1(200,0.4)disp(b)g,w=gain(b,1)plot(w/pi,g)Grid阶数为46时:当阶数为200时:符合设计要求。Q7-25clffpts=0 0.25 0.3 0.45 0.5 1mval=0.4 0.4 1 1 0.8 0.8b=fir2(95,fpts,mval)w =0:8*pi/511:2*pi;h = freqz(b,1, w);plot(w/pi,abs(h);grid% disp(b)% g,w=gain(b,1)% plot(w/pi,g)% gridQ8-1Wp = 0.4 0.5; Ws = 0.1 0.8; Rp = 1; Rs = 30;N1,

9、 Wn1 = buttord(Wp, Ws, Rp, Rs);num,den = butter(N1,Wn1);disp(Numerator coefficients are );disp(num);disp(Denominator coefficients are );disp(den);impres = direct2(num,den,1 zeros(1,4*N1);p,d = strucver(impres,2*N1);disp(Actual numerator coeffs are ); disp(p);disp(Actual denominator coeffs are ); dis

10、p(d);disp(N1)g, w = gain(num,den); plot(w/pi,g);grid Numerator coefficients are 0.0571 0 -0.1143 0 0.0571Denominator coefficients are 1.0000 -0.5099 1.2862 -0.3350 0.4479Actual numerator coeffs are 0.0571 -0.0000 -0.1143 0.0000 0.0571Actual denominator coeffs are 1.0000 -0.5099 1.2862 -0.3350 0.4479

11、Q8-2Wp = 0.4 0.5; Ws = 0.1 0.8; Rp = 1; Rs = 30;N1, Wn1 = buttord(Wp, Ws, Rp, Rs);num,den = butter(N1,Wn1);disp(Numerator coefficients are );disp(num);disp(Denominator coefficients are );disp(den);impres = filter(num,den,1 zeros(1,4*N1);p,d = strucver(impres,2*N1);disp(Actual numerator coeffs are );

12、 disp(p);disp(Actual denominator coeffs are ); disp(d);disp(N1)g, w = gain(num,den); plot(w/pi,g);grid Numerator coefficients are 0.0571 0 -0.1143 0 0.0571Denominator coefficients are 1.0000 -0.5099 1.2862 -0.3350 0.4479Actual numerator coeffs are 0.0571 -0.0000 -0.1143 0.0000 0.0571Actual denominat

13、or coeffs are 1.0000 -0.5099 1.2862 -0.3350 0.4479Q8-9clf;k = 0:50;w2 = 0.7*pi;w1 = 0.2*pi;x1 = 1.5*cos(w1*k); x2 = 2*cos(w2*k);x = x1+x2;N, Wn = ellipord(0.25, 0.55, 0.5, 50);num, den = ellip(N,0.5, 50,Wn);disp(N)g, w = gain(num,den); plot(w/pi,g);grid 通带边界为0.25,阻带边界为0.55,通带波纹为0.5,最小阻带衰减为50,正弦序列频率分

14、别为0.7和0.2。Q8-10clf;k = 0:50;w2 = 0.7*pi;w1 = 0.2*pi;x1 = 1.5*cos(w1*k); x2 = 2*cos(w2*k);x = x1+x2;N, Wn = ellipord(0.25, 0.55, 0.5, 50);num, den = ellip(N,0.5, 50,Wn);disp(N)g, w = gain(num,den); % Plot the gain responseplot(w/pi,g);grid % y = filter(num,den,x);% subplot(2,1,1);% stem(k,x); grid; axis(0 50 -4 4);% xlabel(Time index n); ylabel(Amplitude);% title(Input Sequence);% subplot(2,1,2);% stem(k,y); grid; axis(0 50 -4 4);% xlabel(Time index n); ylabel(Amplitude);% title(Output Sequence);输入信号经过滤波器后产生正弦信号,由于滤波器存在输入延迟,所以初始部分不是正规的正弦信号。

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1