DSP II - 5 - Realization of Digital Filters
DSP II - 5 - Realization of Digital Filters
Abbas Hussien
(1)
Let x(n) and y(n) be the digital filter input and output, respectively. Taking z-transform:
Y(Z) = H(Z) X(Z) (2)
Where X(z) and Y(z) are the z-transforms of x(n) and y(n), respectively. If we substitute equation
(1) into H(z) in equation (2), we have
(3)
Taking the inverse of the z-transform of Equation (3), then:
y(n) = b0 x(n) + b1 x(n–1)+…+ bM x(n–M)
– a1 y(n–1) – a2 y(n–2) – … – aN y(n–N) (4)
This difference equation thus can be implemented by a direct-form I realization shown in Fig. (1.A).
Figure (1.B) illustrates the realization of the second-order IIR filter (M = N = 2).
51
Digital Signal Processing II/ 4th Class/ 2020-2021 Dr. Abbas Hussien
Note that the notation used in Figures (1.c) and (1.d) below;
2- Direct-Form II Realization
Considering Equations (1) and (2) with N = M, we can express
(5)
Also, defining a new z-transform function as
(6)
Realization of equation (6) becomes another direct-form II realization, which is demonstrated in
Fig. (2.A). Again, the corresponding realization of the second-order IIR filter is described in
Fig.(2.B).
52
Digital Signal Processing II/ 4th Class/ 2020-2021 Dr. Abbas Hussien
(8)
Respectively. The block diagram of the cascade, or series, realization is depicted in Fig.(3)
(10)
or
(11)
Respectively. The resulting parallel realization is illustrated in the block diagram in Fig.(4).
53
Digital Signal Processing II/ 4th Class/ 2020-2021 Dr. Abbas Hussien
Perform the filter realizations and write the difference equations using the following realizations:
1. Direct form I and direct form II.
2. Cascade form via the first-order sections.
3. Parallel form via the first-order sections.
Solution:
1. To perform the filter realizations using the direct form I and direct form II
Where, a1 = 1.3, a2 = 0.36, b0 = 0.5, b1 = 0, and b2 = − 0.5. Fig.(5 a) shows the direct-form I
realization .
The difference equation for the direct- form I realization is given by
y(n) = 0.5 x(n) – 0.5 x(n–2) – 1.3 y(n-1) –0.36 y(n–2)
The direct-form II realization shown in Fig.(5 b) where, the difference equations for the direct-form
II realization are expressed as:
w(n) = x(n) – 1.3 w(n–1) – 0.36 w(n–2)
y(n) = 0.5 w(n) – 0.5 w(n-2)
Using the H1(Z) and H2(Z), and with the direct-form II realization, we achieve the cascade form
depicted in Fig.(5 c).
54
Digital Signal Processing II/ 4th Class/ 2020-2021 Dr. Abbas Hussien
Notice that the obtained H1(Z) and H2(Z) are not unique selections for realization. For example,
there is another way of choosing them to yield the same H(Z).
3- In order to yield the parallel form of realization, we need to make use of the partial fraction
expansion,
Again, using the direct form II for each section, we obtain the parallel realization in Fig. (10.5d) The
difference equations for the direct-form II realization have three parallel sections, expressed as:
y1(n) = -1.39 x(n)
w2(n) = x(n) – 0.4 w2(n-1)
y2(n) = 2.1 w2(n)
w3(n) = x(n) – 0.9 w3(n-1)
y3(n) = -0.21 w3(n)
y(n) =y1(n) + y2(n) + y3(n)
The output is simply a weighted sum of present and past input values, as shown in Figure.
55
Digital Signal Processing II/ 4th Class/ 2020-2021 Dr. Abbas Hussien
Example (2): Given the FIR filter transfer function , Perform the FIR filter realization
Solution:
From the transfer function, we can identify that b0 = 1, b1 = 1.2, and b2 = 0.36, we find the FIR
realization to be as follows, we determine the DSP equation for implementation as
y(n) = x(n) +1.2x(n-1) + 0.36x(n-2):
56