MODULE 7: DIGITAL FILTERS
EXAMPLES
PRACTICAL EXAMPLE OF DIGITAL FILTERING:
Find the FIR filter output for a sinusoidal input:
πn π 7 πn
x (n)=4+3 cos ( − )+3 cos( )
3 2 8
¿
The filter coefficients are given to be b k =[1 , 2 ,1]
SOLUTION
a) From the filter coefficients, it is clear that the impulse response
is:
h(n)=δ (n)+ 2 δ(n−1)+ δ (n−2)
Thus, the z-transform of the system function will be:
−1 −2
H ( z )=z {h(n) }=1+2 z + z
Thus, the frequency response of the system is:
jω jω −j2ω
H (z=e )=1+2 e + e
H (e jw )=e− jω e jω +2 e− jω+e− j 2ω =e− jω (e jw + 2+ e− jω )
Where e jω +e− jω =2 cosω
jω − jω jω jω
H (e )=e (2+2 cosω)=¿ H (e )∨¿ H (e )
¿∨H (e jω )∨¿ 2+ 2 cosω;< H ( e jω )=−ω
So, the magnitude of each component of the input is scaled
by ¿ H ¿ and the phase is added to the phase of ¿ H (e jω )
jω
y (n)=x ( n). H (e )
Firstly, y 1 (n)=x 1 (n) .∨H (e jω )∨¿ H (e jω )
For:
x 1 (n)=4 ; ω=0
∴∨H (e jω )∨¿ at ω=0 will be:
, ¿ 2+2 cosω=2+2 cos 0=4
jω
∴< H (e )at ω=0 will be :
¿−ω=0
Thus, y 1 (n)=(4 × 4 )< 0=16
Secondly,
jω jω πn π
y 2 (n)=x 2 (n)∨H ( e )∨¿ H ( e )∧x 2 (n)=3 cos ( − )
3 2
π
¿ H (e )∨¿ at ω=
jω
will be:
3
π
2+2 cosω=2+2 cos =3
3
π
¿ H (e jω ) at ω= will be:
3
−π
−ω=
3
πn π π πn π π
Thus, y 2 (n)=(3 ×3)<( − − )=9cos ( − − )
3 2 3 3 2 3
π (n−1) π
y 2 (n)=9 cos { − }
3 2
Thirdly,
jω jω 7π
y 3 (n)=x 3 (n)∨H (e )∨¿ H ( e )∧x 3 (n)=3 cos ( )
8
7π
¿ H (e jω )∨¿ at ω= will be:
8
7π
2+2 cosω=2+2 cos =0.152
8
7π
¿ H (e ) at ω=
jω
will be:
8
−7 π
−ω=
8
7 πn 7 π 7 π ( n−1)
Thus, y 3 (n)=(3 ×0.152)<( − )=0.456 cos ( )
8 8 8
7 π (n−1)
y 3 (n)=0.456 cos { }
8
EXAMPLES
PRACTICAL EXAMPLE OF DIGITAL FILTERING:
Find the FIR filter output for a sinusoidal input:
πn π 7 πn
x (n)=4+3 cos ( − )+3 cos( )
3 2 8
¿
The filter coefficients are given to be b k =[1 , 2 ,1]
SOLUTION
a) From the filter coefficients, it is clear that the impulse response
is:
h(n)=δ (n)+ 2 δ(n−1)+ δ (n−2)
Thus, the z-transform of the system function will be:
−1 −2
H ( z )=z {h(n) }=1+2 z + z
Thus, the frequency response of the system is:
jω jω −j2ω
H (z=e )=1+2 e + e
H (e jw )=e− jω e jω +2 e− jω+e− j 2ω =e− jω (e jw + 2+ e− jω )
Where e jω +e− jω =2 cosω
jω − jω jω jω
H (e )=e (2+2 cosω)=¿ H (e )∨¿ H (e )
¿∨H (e jω )∨¿ 2+ 2 cosω;< H ( e jω )=−ω
So, the magnitude of each component of the input is scaled
by ¿ H ¿ and the phase is added to the phase of ¿ H (e jω )
jω
y (n)=x ( n). H (e )
Firstly, y 1 (n)=x 1 (n) .∨H (e jω )∨¿ H (e jω )
For:
x 1 (n)=4 ; ω=0
∴∨H (e jω )∨¿ at ω=0 will be:
, ¿ 2+2 cosω=2+2 cos 0=4
jω
∴< H (e )at ω=0 will be :
¿−ω=0
Thus, y 1 (n)=(4 × 4 )< 0=16
Secondly,
jω jω πn π
y 2 (n)=x 2 (n)∨H ( e )∨¿ H ( e )∧x 2 (n)=3 cos ( − )
3 2
π
¿ H (e )∨¿ at ω=
jω
will be:
3
π
2+2 cosω=2+2 cos =3
3
π
¿ H (e jω ) at ω= will be:
3
−π
−ω=
3
πn π π πn π π
Thus, y 2 (n)=(3 ×3)<( − − )=9cos ( − − )
3 2 3 3 2 3
π (n−1) π
y 2 (n)=9 cos { − }
3 2
Thirdly,
jω jω 7π
y 3 (n)=x 3 (n)∨H (e )∨¿ H ( e )∧x 3 (n)=3 cos ( )
8
7π
¿ H (e jω )∨¿ at ω= will be:
8
7π
2+2 cosω=2+2 cos =0.152
8
7π
¿ H (e ) at ω=
jω
will be:
8
−7 π
−ω=
8
7 πn 7 π 7 π ( n−1)
Thus, y 3 (n)=(3 ×0.152)<( − )=0.456 cos ( )
8 8 8
7 π (n−1)
y 3 (n)=0.456 cos { }
8