Maulina Putri Lestari - M0220052 - Tugas 4

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Maulina Putri Lestari (M0220052)

SIGNAL PENGOLAH DIGITAL


(Digital Signal Processing)
Problem 6.7 , 6.22, dan 6.21

TUGAS

Disusun Oleh:
Maulina Putri Lestari (M0220052)

FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM


UNIVERSITAS SEBELAS MARET
SURAKARTA
2023
Maulina Putri Lestari (M0220052)

Problem 6.7
An IIR filter is described by the following system function

1 + 0𝑧 −1 + 𝑧 −2 2 − 𝑧 −1 1 + 2𝑧 −1 + 𝑧 −2
𝐻(𝑧) = ( )+( )+( )
1 − 0,8𝑧 −1 + 0,64𝑧 −2 1 − 0,75𝑧 −1 1 + 0,81𝑧 −2

Determine and draw the following structures.

1. Transposed direct form I


2. Normal direct form II 3
3. Cascade form containing transposed 2nd-order direct-form-II sections
4. Parallel form containing normal 2nd-order direct-form-II sections
5. Lattice-ladder form

Answer

1.

%% (a) Transposed Direct form-I


% Given H(z)
b1 = [2,0,1]; a1 = [1,-0.8,0.64]; [R1,p1,k1] = residuez(b1,a1);
b2 = [2,-1]; a2 = [1,-0.75]; [R2,p2,k2] = residuez(b2,a2);
b3 = [1,2,1]; a3 = [1,0,0.81]; [R3,p3,k3] = residuez(b3,a3);
R = [R1;R2;R3]; p = [p1;p2;p3]; k = k1+k2+k3; [b,a] = residuez(R,p,k)
b =
5.0000 -3.6500 5.4600 -4.2610 2.7748 -1.6059
a =
1.0000 -1.5500 2.0500 -1.7355 1.0044 -0.3888
2. Normal direct form II
Script matlab

%% (a) Transposed Direct form-I


% Given H(z)
b1 = [2,0,1]; a1 = [1,-0.8,0.64]; [R1,p1,k1] = residuez(b1,a1);
b2 = [2,-1]; a2 = [1,-0.75]; [R2,p2,k2] = residuez(b2,a2);
b3 = [1,2,1]; a3 = [1,0,0.81]; [R3,p3,k3] = residuez(b3,a3);
R = [R1;R2;R3]; p = [p1;p2;p3]; k = k1+k2+k3; [b,a] = residuez(R,p,k)
b =
5.0000 -3.6500 5.4600 -4.2610 2.7748 -1.6059
a =
1.0000 -1.5500 2.0500 -1.7355 1.0044 -0.3888
Diagram blok
Maulina Putri Lestari (M0220052)

3. Cassade form containing second order dorect form II sections:


Script matlab:

%% (c) Transposed Cascade form


% Given H(z)
b1 = [2,0,1]; a1 = [1,-0.8,0.64]; [R1,p1,k1] = residuez(b1,a1);
b2 = [2,-1]; a2 = [1,-0.75]; [R2,p2,k2] = residuez(b2,a2);
b3 = [1,2,1]; a3 = [1,0,0.81]; [R3,p3,k3] = residuez(b3,a3);
R = [R1;R2;R3]; p = [p1;p2;p3]; k = k1+k2+k3; [b,a] = residuez(R,p,k)
b =
5.0000 -3.6500 5.4600 -4.2610 2.7748 -1.6059
a =
1.0000 -1.5500 2.0500 -1.7355 1.0044 -0.3888
[b0,B,A] = dir2cas(b,a)
b0 =
5
B =
1.0000 0.5424 0.7734
1.0000 -0.5876 0.6064
1.0000 -0.6848 0
A =
1.0000 -0.0000 0.8100
1.0000 -0.8000 0.6400
1.0000 -0.7500
Diagram blok

4. Paralel form containing second order direct form II sections:


Script matlab:

%% (d) Normal Parallel form


% Given H(z)
b1 = [2,0,1]; a1 = [1,-0.8,0.64]; [R1,p1,k1] = residuez(b1,a1);
b2 = [2,-1]; a2 = [1,-0.75]; [R2,p2,k2] = residuez(b2,a2);
b3 = [1,2,1]; a3 = [1,0,0.81]; [R3,p3,k3] = residuez(b3,a3);
R = [R1;R2;R3]; p = [p1;p2;p3]; k = k1+k2+k3; [b,a] = residuez(R,p,k)
b =
5.0000 -3.6500 5.4600 -4.2610 2.7748 -1.6059
a =
1.0000 -1.5500 2.0500 -1.7355 1.0044 -0.3888
[C,B,A] = dir2par(b,a),
C =
4.1304
B =
-0.2346 2.0000
0.4375 1.2500
0.6667 0
A =
1.0000 -0.0000 0.8100
1.0000 -0.8000 0.6400
1.0000 -0.7500 0
Maulina Putri Lestari (M0220052)

Diagram blok

5. Latiice ladder form:


Script matlab
%% Lattice-Ladder form
% Given H(z)
b1 = [2,0,1]; a1 = [1,-0.8,0.64]; [R1,p1,k1] = residuez(b1,a1);
b2 = [2,-1]; a2 = [1,-0.75]; [R2,p2,k2] = residuez(b2,a2);
b3 = [1,2,1]; a3 = [1,0,0.81]; [R3,p3,k3] = residuez(b3,a3);
R = [R1;R2;R3]; p = [p1;p2;p3]; k = k1+k2+k3; [b,a] =
residuez(R,p,k);
[K,C] = dir2ladr(b,a)
K =
-0.3933 0.7034 -0.5916 0.4733 -0.3888
C =
2.7756 -0.0253 1.5817 -0.5787 0.2857 -1.6059

Diagram blok
Maulina Putri Lestari (M0220052)

Problem 6.21
Determine the impulse response of an FIR filter with lattice parameters
K0= 2, K1 = 0.6, K2 = 0.3, K3 = 0.5, K4 = 0.9
Draw the direct form and lattice form structures of this filter.

Answer
% Direct form
% Given Lattice Structure
K = [2,0.6,0.3,0.5,0.9];
b = latc2dir(K)
b =
2.0000 2.7600 2.6220 2.6740 1.8000

1. The block diagram of the direct form is

2. The block diagram of the lattice form is


Maulina Putri Lestari (M0220052)

Problem 6.22
Consider the following system function of an FIR filter
𝐻(𝑧) = 1 − 4𝑧 −1 + 6.4𝑧 −2 − 5.12𝑧 −3 + 2.048𝑧 −4 − 0.32768𝑧 −5
1. Provide block diagram structures in the following forms:
a) Normal and transposed direct forms
b) Cascade of five 1st-order sections
c) Cascade of one 1st-order section and two 2nd-order sections
d) Cascade of one 2nd-order section and one 3rd-order section
e) Frequency-sampling structure with real coefficients
2. The computational complexity of a digital filter structure can be given by the total
number of multiplications and the total number of 2-input additions that are required
per output point. Assume that x(n) is real and that multiplication by 1 is not counted as
a multiplication. Compare the computational complexity of each of these structures.
Answer
1. Block diagram structures in he following form:
a. Normal direct form

Transposed direct form

b. Cassade of five first order sections


Script matlab:

b = [1,-4,6.4,-5.12,2.048,-0.32768];

broots = round(real(roots(b))*10)/10; broots = broots'


Maulina Putri Lestari (M0220052)

Blok diagram:

c. Cassade of one first order sections and two second order sections:
Skip matlab:

% Given FIR filter


b = [1,-4,6.4,-5.12,2.048,-0.32768]; a = 1;
[b0,B,A] = dir2cas(b,a)
Maulina Putri Lestari (M0220052)

Matlab script dir2cas.m:


Maulina Putri Lestari (M0220052)

Hasil Running script:

Diagram block:

d. Cassade of one second order sections and one third order sections:
Matlab script:

% Given FIR filter


b = [1,-4,6.4,-5.12,2.048,-0.32768];
broots = round(real(roots(b))*10)/10; broots = broots';
b1 = poly(broots(1:2)), b2 = poly(broots(3:5))

Running script:
Maulina Putri Lestari (M0220052)

Diagram block

e. Frequency sampling structure with real coefficienst:


Matlab script:
% Given FIR filter
b = [1,-4,6.4,-5.12,2.048,-0.32768];
[C,B,A] = dir2fs(b)

Matlab script dir2fs.m:


Maulina Putri Lestari (M0220052)

Hasil running script:

Diagram blok:
Maulina Putri Lestari (M0220052)

2. The computational complexy:


Structure #of Mults #of Adds
i. Direct 5 5
ii. Cascade-1 5 5
iii. Cascade-2 5 5
iv. Cascade-3 5 5
v. Freq. samp 9 12

You might also like