Professional Documents
Culture Documents
a
j 0
j y[ n j ] bi x[ n i ]
i 0
a
j 0
j z Y ( Z ) bi z i X ( z )
j
i 0
Y (Z ) b Z i
i
H (Z ) i 0
Q
X (Z )
j
a
j 0
Z j
i
b Z i
H (Z ) i 0
Q
1 a jZ j
j 1
2. Constant multiplier
3. Signal multiplier
4. Delay
5. Advance
x (n ) b0 y (n )
b0 1 2
x (n ) y (n )
z-1
z-1 a1
a1
5 3
z-1
a2 a2 z-1
4
y( n) b0 x( n) a1 y( n 1) a2 y( n 2)
September 26, 2021
CSE 447: Digital Signal Processing
Digital filter structure
Advantages of block diagram representation
o Easy to write down the computational algorithm by inspection
o Easy to analyze the block diagram to determine the explicit
relation between the output and input
o Easy to manipulate a block diagram to derive other
“equivalent” block diagrams yielding different computational
algorithms
o Easy to determine the hardware requirements
o Easier to develop block diagram representations from the
transfer function directly
i
b Z i
H (Z ) i 0
Q
1 a jZ j
j 1
Q
1 P
y (n) ( bi x[n i ] a j y[n j ])
a0 i 0 j 1
The order of such an IIR filter is called Q if aQ≠0
September 26, 2021 CSE 447: Digital Signal Processing
IIR Filter Structures
i
b Z i
H (Z ) i 0
Q
1 a jZ j
j 1
i 0
Q
and H 2( Z ) 1 a j Z j
j 1
CSE 447: Digital Signal Processing
IIR Filter Structures
P Q
Direct form I
y (n) bi x[n i ] a j y[n j ]
i 0 j 1
b0 y1 ( n) y 2 ( n)
x (n ) y (n )
z-1 b1 -a1 z-1
x ( n 1) y ( n 1)
z-1 b2 -a2 z-1
x ( n 2) y( n 2)
bM-1
x ( n P 1) -aN-1
z-1 y ( n Q 1)
bM
x(n P) -aN z-1
y (n Q)
Figure: Direct form I Structure of the IIR system
CSE 447: Digital Signal Processing
IIR Filter Structures
Direct form I
Example:
Determine the Direct Form I structure of the IIR Filter
described by the following difference equation;
y(n) = 0.5y(n-1) –0.76y(n-2) + 0.63y(n-3) + x(n) + 0.875x(n-1)
Solution:
1.Compute the Transfer Function, H(z).
Y(z) = 0.5z-1Y(z) –0.76z-2Y(z) + 0.63z-3Y(z) + X(z) +
0.875z-1X(z)
H(z) = Y(z) / X(z) = (1 + 0.875z-1) / (1 -0.5z-1 + 0.76z-2
-0.63z-3)
2. Now, draw Direct Form I structure based on the Transfer
Function, H(z)
3. The Direct Form I IIR Filter Structure is shown below:
CSE 447: Digital Signal Processing
IIR Filter Structures
Direct form I
Example:
Determine the Direct Form I structure of the IIR Filter
described by the following difference equation;
y(n) = 0.5y(n-1) –0.76y(n-2) + 0.63y(n-3) + x(n) + 0.875x(n-1)
Solution:
Direct form II
b0
x (n ) y (n )
z-1 b1 a1 z-1
z-1 b a2 z-1
2
bP-1
z-1 b
P
aQ-1 z-1
Figure: Direct form II Structure of
the IIR system aQ
CSE 447: Digital Signal Processing
IIR Filter Structures
Direct form II
Example:
Determine the Direct Form II (Canonic) structure of the IIR
Filter described by the following difference equation;
y(n) = 0.5y(n-1) –0.76y(n-2) + 0.63y(n-3) + x(n) + 0.875x(n-1)
Solution:
Draw the structure based on the transfer function obtain from
previous example.
H(z) = ∑h(n)z-n
Solution 1:
3. Construct direct form structure for the system as shown below;
Definition of filters
o Filter is required in the digital signal processing to filter
the raw input signals to the desired frequency and suppress
noise in signal processing.
h(n) = hd(n)w(n)
Hanning
w(n) = 0.5 -0.5cos(2πn/N), 0 ≤ n ≤ N
0, elsewhere
September 26, 2021
CSE 447: Digital Signal Processing
Design of digital filters
4. FIR Filter Design by Window Method
Hamming
w(n) = 0.54 – 0.46cos(2πn/N), 0 ≤ n ≤ N
0, elsewhere
Blackman
w(n) = 0.42 - 0.5cos(2πn/N) + 0.08cos(4πn/N), 0 ≤ n ≤ N
0, elsewhere
Solution:
1. From the spec given, δs = 0.01, thus αs = -40 dB.
2. From the window parameter, the stopband attenuation is
close to Hanning Window, thus it is preferable to use
Hanning Window for this design.
September 26, 2021
CSE 447: Digital Signal Processing
FIR filter design example 1
3. Now, calculate the Transition Band or Width, ∆f: From the
given spec, ∆ω = ωs – ωp = 0.02π,
Thus, ∆f = ∆ω / 2 = 0.01
4. By using Hanning Window,
N∆f = 3.1
Thus, N = 3.1 / ∆f = 3.1 / 0.01 = 310
5. Next, determine the Cut-Off Frequency, ωc
ωc = ωs + ωp / 2 = 0.21 π + 0.19 π = 0.40 π / 2 = 0.2 π
6. Calculate the delay, α
α = N/2 = 310 / 2 = 155
7. Finally, the Impulse Response of the FIR Filter that meet the
spec is: hd (n) = sin [0.2 π(n-155)]/(n-155)π
September 26, 2021
CSE 447: Digital Signal Processing
FIR Filter Design Example 2
Design the Bandpass Filter to meet the following
specification:
passband frequency = 900-1100 Hz
passband ripple = < 0.87 dB
stopband attenuation > 30 dB
sampling frequency = 15 kHz
Transition frequency = 450 Hz
Use Optimal Method to find suitable Filter Coefficients.
20 log10 ( s p ) 13
N 1
The suitable Filter length, N = 28 14.6f / Fs
The Filter Coefficient can be determined by:
20 log (0.057719) 13
1
hd (n) = sin [0.015π(n-14)]/(n-14)π, 0 ≤ n ≤ N-1
10
14.6(0.03)
28
Frequency Parameters;
• Sampling frequency = Fs
• Selectivity Factor, k = Ωp / Ωs
• The Filter Order, N is defined as: N ≥log d / log k
Solution :
1. Calculate d and k,
d = sqrt[((1-δp)-2 -1)/ (δs -2 – 1)] = 0.0487 k = Ωp / Ωs = 0.6
2. Calculate Filter Order, N
N ≥log d / log k = log (0.0487)/log (0.6) = 5.9
Thus, N = 6
Solution :
3. To determine the cut-off frequency, Ωc
fp[(1-δp)-2 – 1]-1/2N = 6770
fs[δs-2 – 1]-1/2N = 6819
6770 ≤ Ωc ≤ 6819
4. The pole position are: sk = Ωc ej[π/2+(2k+1)π/12], k = 0,1,…,5
5. The Transfer Function is :
Ha(s) = 1 / [s6 + 3.8637s5 + 7.4641s4 + 9.1416s3 + 7.4641s2 + 3.8637s + 1
Solution :
2. Calculate the Filter Order, N
N ≥ log (16/d2) / log(1/q) ≥ 3.7 = 4
3. System transfer function is;
H(s)= 0.006128 s^8 - 0.008248 s^7 + 0.02362s^6 -
0.02211 s^5 + 0.03505 s^4 - 0.02211 s^3 +
0.02362 s^2 - 0.008248 s + 0.006128