數字訊號處理實驗(四):數字濾波器結構
目錄
一、實驗目的:
使用相互連線的基本結構塊的結構表示,是線性時不變數字濾波器的硬體或軟體實現中的第一步。本實驗掌握用Mat lab對FIR和IIR傳輸函式的分解方法,從而實現傳輸函式的級聯和並聯。
二、實驗內容及要求:
1. 數字濾波器的級聯結構:
修改程式P6.1,生成如下因果無限衝激響應傳輸函式的級聯實現,畫出級聯實現的結構圖。
2. 數字濾波器的並聯結構:
修改程式P6.2,生成如下因果無限衝激響應傳輸函式的並聯實現,畫出並聯實現的結構圖。
三、實驗結果及問題回答:
1. 數字濾波器的級聯結構:
實驗程式:
clear all
format rat;
num = input('分子係數向量 = ');
den = input('分母系數向量 = ');
[z,p,k] = tf2zp(num,den);%由傳遞函式轉換為零極點增益
sos = zp2sos(z,p,k)%由零極點增益轉換為二次分式
實驗結果:
分子係數向量 = [3 8 12 7 2 -2]
分母系數向量 = [16 24 24 14 5 1]
sos =
3/16 -1/16 0 1 1/2 0
1 2 2 1 1/2 1/4
1 1 1 1 1/2 1/2
2. 數字濾波器的並聯結構:
實驗程式:
clear all
format short;
num = input('分子係數向量 = ');%[2 10 23 34 31 16 4]
den = input('分母系數向量 = ');%[36 78 87 59 26 7 1]
[r1,p1,k1] = residuez(num,den);
[r2,p2,k2] = residue(num,den);
disp('並聯 I')
disp('留數:');disp(r1);
disp('極點:');disp(p1);
disp('常量:');disp(k1);
disp('並聯 II')
disp('留數:');disp(r2);
disp('極點:');disp(p2);
disp('常量:');disp(k2);
disp('並聯I 的複共軛對,對應框圖係數');
disp('並聯I-First:');
R1 = [r1(1) r1(2)];P1 = [p1(1) p1(2)];
[b1 a1] = residuez(R1, P1, 0);%並聯I用residuez
disp('分子');disp(real(b1));
disp('分母');disp(real(a1));
disp('並聯I-Second:');
R1 = [r1(3) r1(4)];P1 = [p1(3) p1(4)];
[b1 a1] = residuez(R1, P1, 0);%並聯I用residuez
disp('分子');disp(real(b1));
disp('分母');disp(real(a1));
disp('並聯I-Third:');
R1 = [r1(5) r1(6)];P1 = [p1(5) p1(6)];
[b1 a1] = residuez(R1, P1, 0);%並聯I用residuez
disp('分子');disp(real(b1));
disp('分母');disp(real(a1));
disp('並聯II 的複共軛對,對應框圖係數');
disp('並聯II-First:');
R2 = [r2(1) r2(2)];P2 = [p2(1) p2(2)];
[b2 a2] = residue(R2, P2, 0);%並聯I用residue
disp('分子');disp(real(b2));
disp('分母');disp(real(a2));
disp('並聯II-Second:');
R2 = [r2(3) r2(4)];P2 = [p2(3) p2(4)];
[b2 a2] = residue(R2, P2, 0);%並聯I用residue
disp('分子');disp(real(b2));
disp('分母');disp(real(a2));
disp('並聯II-Third:');
R2 = [r2(5) r2(6)];P2 = [p2(5) p2(6)];
[b2 a2] = residue(R2, P2, 0);%並聯II用residue
disp('分子');disp(real(b2));
disp('分母');disp(real(a2));
實驗結果:
分子係數向量 = [2 10 23 34 31 16 4]
分母系數向量 = [36 78 87 59 26 7 1]
並聯 I
留數:
-0.5556 - 2.2785i
-0.5556 + 2.2785i
-0.5952 - 0.7561i
-0.5952 + 0.7561i
-0.8214 + 4.3920i
-0.8214 - 4.3920i
極點:
-0.3333 + 0.4714i
-0.3333 - 0.4714i
-0.5000 + 0.2887i
-0.5000 - 0.2887i
-0.2500 + 0.4330i
-0.2500 - 0.4330i
常量:
4
並聯 II
留數:
1.2593 + 0.4976i
1.2593 - 0.4976i
0.5159 + 0.2062i
0.5159 - 0.2062i
-1.6964 - 1.4537i
-1.6964 + 1.4537i
極點:
-0.3333 + 0.4714i
-0.3333 - 0.4714i
-0.5000 + 0.2887i
-0.5000 - 0.2887i
-0.2500 + 0.4330i
-0.2500 - 0.4330i
常量:
0.0556
並聯I 的複共軛對,對應框圖係數
並聯I-First:
分子
-1.1111 1.7778 0
分母
1.0000 0.6667 0.3333
並聯I-Second:
分子
-1.1905 -0.1587 0
分母
1.0000 1.0000 0.3333
並聯I-Third:
分子
-1.6429 -4.2143 0
分母
1.0000 0.5000 0.2500
並聯II 的複共軛對,對應框圖係數
並聯II-First:
分子
2.5185 0.3704
分母
1.0000 0.6667 0.3333
並聯II-Second:
分子
1.0317 0.3968
分母
1.0000 1.0000 0.3333
並聯II-Third:
分子
-3.3929 0.4107
分母
1.0000 0.5000 0.2500
並聯 I型
並聯II型