资源描述:
《数字信号处理实验报告-离散时间信号通过线性时不变系统》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、一、数字信号处理实验报告实验名称:离散时间信号通过线性时不变系统姓名:专业:年级:学号:指导教师:一、综合设计目的(1)掌握信号通过IIR系统的实现方法。(2)了解直接型和级联型网络结构实现IIR滤波时的量化效应。二、实验原理(1)根据滤波器技术指标计算数字滤波器阶数。(2)根据滤波器技术和通/阻带截止频率计算数字滤波器的系统函数。(3)系统量化对不同结构的敏感程度不同。三、实验过程①对数据一进行处理代码:closeall;clc;clearall;qq=16;[y,fs,bits]=wavread('C:Users
2、ETDesktop×ÛºÏÉè¼ÆÊý¾Ý´ø¸ÉÈŵÄÒôÀÖÐźÅIIRmusic1-1.wav');Wp=2*900;Ws=2*1500;Rp=0.1;Rs=60;Fs=32000;%ÉèÖÃÂ˲¨Æ÷²ÎÊýwp=Wp/Fs;ws=Ws/Fs;%[N,Wpo]=cheb2ord(wp,ws,Rp,Rs);%ÇóÇбÈÑ©·ò2Ð͹éÒ»»¯Ä£ÄâµÍͨÂ˲¨Æ÷µÄ½×Êý%[b,a]=cheby2(N,Rs,Wpo);%Éè¼ÆÂ˲¨Æ÷%[N,Wpo]=cheb1ord(wp,
3、ws,Rp,Rs);%ÇóÇбÈÑ©·ò1Ð͹éÒ»»¯Ä£ÄâµÍͨÂ˲¨Æ÷µÄ½×Êý%[b,a]=cheby1(N,Rp,Wpo);%Éè¼ÆÂ˲¨Æ÷%[N,Wpo]=buttord(wp,ws,Rp,Rs);%Çó°ÍÌØÎÖ˹Ð͹éÒ»»¯Ä£ÄâµÍͨÂ˲¨Æ÷µÄ½×Êý%[b,a]=butter(N,Wpo);%Éè¼ÆÂ˲¨Æ÷[N,Wpo]=ellipord(wp,ws,Rp,Rs);%ÇóÍÖÔ²Ð͹éÒ»»¯Ä£ÄâµÍͨÂ˲¨Æ÷µÄ½×Êý[b,a]=ellip
4、(N,Rp,Rs,Wpo);%Éè¼ÆÍÖÔ²Â˲¨Æ÷[h,w]=freqz(b,a,512);%ÇóÂ˲¨Æ÷µÄ·ùƵÏìÓ¦h=20*log10(abs(h)/max(abs(h)));bqr=intbR(b,qq);aqr=intbR(a,qq);[hr,wr]=freqz(bqr,aqr,512);hr=20*log10(abs(hr)/max(abs(hr)));[sos,g]=tf2sos(b,a);b1=sos(1,1:3);a1=sos(1,4:6);bqr1=intbR(b1,qq);aqr
5、1=intbR(a1,qq);[h1,w1]=freqz(bqr1,aqr1,512);sos1(1,1:6)=[bqr1aqr1];b2=sos(2,1:3);a2=sos(2,4:6);bqr2=intbR(b2,qq);aqr2=intbR(a2,qq);[h2,w1]=freqz(bqr2,aqr2,512);sos1(2,1:6)=[bqr2aqr2];b3=sos(3,1:3);a3=sos(3,4:6);bqr3=intbR(b3,qq);aqr3=intbR(a3,qq);[h3,w1]=freqz(b
6、qr3,aqr3,512);sos1(3,1:6)=[bqr3aqr3];%b4=sos(4,1:3);a4=sos(4,4:6);bqr4=intbR(b4,qq);aqr4=intbR(a4,qq);[h4,w1]=freqz(bqr4,aqr4,512);sos1(4,1:6)=[bqr4aqr4];%b5=sos(5,1:3);a5=sos(5,4:6);bqr5=intbR(b5,qq);aqr5=intbR(a5,qq);[h5,w1]=freqz(bqr5,aqr5,512);sos1(5,1:6)=[b
7、qr5aqr5];%b6=sos(6,1:3);a6=sos(6,4:6);bqr6=intbR(b6,qq);aqr6=intbR(a6,qq);[h6,w1]=freqz(bqr6,aqr6,512);sos1(6,1:6)=[bqr6aqr6];%b7=sos(7,1:3);a7=sos(7,4:6);bqr7=intbR(b7,qq);aqr7=intbR(a7,qq);[h7,w1]=freqz(bqr7,aqr7,512);sos1(7,1:6)=[bqr7aqr7];%b8=sos(8,1:3);a8=s
8、os(8,4:6);bqr8=intbR(b8,qq);aqr8=intbR(a8,qq);[h8,w1]=freqz(bqr8,aqr8,512);sos1(8,1:6)=[bqr8aqr8];%b9=sos(9,1:3);a9=sos(9,4:6);bqr9=intbR(b9,qq);aqr9=intbR(a9,qq);[h9