Sei sulla pagina 1di 9

Definition:

A filter is a frequency selective system.


Types:
✓ Finite duration unit impulse response (FIR) filter: The impulse response
sequence is of finite duration. i.e., it has a finite number of non-zero terms. FIR
filters are usually implemented using non-recursive structures (no feedback -only
zeros). The response of the FIR filter depends only on the present and past input
samples.
✓ Infinite duration unit impulse response (IIR) filter: The IIR system has an
infinite number of non-zero terms. i.e., impulse response sequence is of infinite
duration. IIR filters are usually implemented using recursive structures (feedback-
poles and zeros). The IIR filter the present response is a function of the present and
past values of the excitation as well as past values of the response.
Advantages of FIR filters over IIR filters:
✓ FIR filters are always stable
✓ FIR filters with exactly linear phase can easily be designed.
✓ FIR filters can be realized in both recursive and non-recursive structures
✓ FIR filters are free of limit cycle oscillations, when implemented on a finite word
length digital system.
✓ Excellent design methods are available for various kinds of FIR filters.
Disadvantages of FIR filters:
✓ The implementation of narrow transition band FIR filters is very costly as it requires
considerably more arithmetic operations and hardware components such as
multipliers, adders and delay elements.
✓ Memory requirement and execution time are very high.
Advantages of IIR filters:
✓ IIR filter has lesser number of side lobes in the stop band than a FIR filter with the
same number of parameters. For this reason, if some phase distortion is tolerable,
an IIR filter is preferable.
✓ The implementation of IIR filter involves fewer parameters, less memory
requirements and lower computational complexity.
Characteristic of FIR filters with linear phase:
****Shows that time delay and phase delay are constant with linear phase.
The transfer function of a FIR filter is given by
𝑁−1

𝐻(𝑧) = ∑ ℎ(𝑛)𝑧 −𝑛 … … … … … … … … … … . . (1)


𝑛=0

Where ℎ(𝑛) is the impulse response of the filter. The frequency response [Fourier
transform of ℎ(𝑛)] is given by
𝑁−1

𝐻(𝜔) = ∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛 … … … … … … … … … … . . (2)


𝑛=0

Which is periodic in frequency with period 2𝜋 i.e., 𝐻(𝜔) = 𝐻(𝜔 + 2𝜋𝑘), 𝑘=


0, 1, 2, . . . . . ..

i.e., ∑𝑁−1
𝑛=0 ℎ(𝑛)[𝑐𝑜𝑠𝜔𝑛 − 𝑗𝑠𝑖𝑛𝜔𝑛] = ± |𝐻(𝜔)|[𝑐𝑜𝑠𝜃(𝜔) + 𝑗𝑠𝑖𝑛𝜃(𝜔)]

This gives us
𝑁−1

∑ ℎ(𝑛)𝑐𝑜𝑠𝜔𝑛 = ±|𝐻(𝜔)|𝑐𝑜𝑠𝜃(𝜔)
𝑛=0

And
𝑁−1

− ∑ ℎ(𝑛)𝑠𝑖𝑛𝜔𝑛 = ±|𝐻(𝜔)|𝑠𝑖𝑛𝜃(𝜔)
𝑛=0

Therefore,
∑𝑁−1
𝑛=0 ℎ(𝑛)𝑠𝑖𝑛𝜔𝑛 𝑠𝑖𝑛𝜃(𝜔) 𝑠𝑖𝑛𝛼𝜔
= =
∑𝑁−1
𝑛=0 ℎ(𝑛)𝑐𝑜𝑠𝜔𝑛 𝑐𝑜𝑠𝜃(𝜔) 𝑐𝑜𝑠𝛼𝜔
i.e.,
𝑁−1

∑ ℎ(𝑛)[𝑠𝑖𝑛𝜔𝑛𝑐𝑜𝑠𝛼𝜔 − 𝑐𝑜𝑠𝜔𝑛𝑠𝑖𝑛𝛼𝜔] = 0
𝑛=0

Since 𝐻(𝜔) is complex it can be expressed as


𝐻(𝜔) = ±|𝐻(𝜔)|𝑒 𝑗𝜃(𝜔)
Where |𝐻(𝜔)| is the magnitude response and 𝜃(𝜔) is the phase response.
𝜃(𝜔) 𝑑𝜃(𝜔)
We define the phase delay of a filter 𝜏𝑝 = − and group delay 𝜏𝑔 = −
𝜔 𝑑𝜔

For FIR filter with linear phase, we can define 𝜃(𝜔) = −𝛼𝜔, −𝜋 ≤𝜔 ≤𝜋
Where 𝛼 is constant phase delay in samples.
𝑑𝜃(𝜔) 𝑑
𝜏𝑔 = − =− (−𝛼𝜔) = 𝛼
𝑑𝜔 𝑑𝜔
𝜃(𝜔) 𝛼𝜔
𝑎𝑛𝑑 𝜏𝑝 = − = =𝛼
𝜔 𝜔
𝜏𝑔 = 𝜏𝑝 = 𝛼 which means that 𝛼 is independent of frequency. (Showed)
****Shows that FIR filters will have constant phase and group delays when the
𝑵−𝟏
impulse response is symmetrical about 𝜶 = .
𝟐

We have
𝑁−1

∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛 = ±|𝐻(𝜔)|𝑒 𝑗𝜃(𝜔)


𝑛=0

i.e., ∑𝑁−1
𝑛=0 ℎ(𝑛)[𝑐𝑜𝑠𝜔𝑛 − 𝑗𝑠𝑖𝑛𝜔𝑛] = ± |𝐻(𝜔)|[𝑐𝑜𝑠𝜃(𝜔) + 𝑗𝑠𝑖𝑛𝜃(𝜔)]

This gives us
𝑁−1

∑ ℎ(𝑛)𝑐𝑜𝑠𝜔𝑛 = ±|𝐻(𝜔)|𝑐𝑜𝑠𝜃(𝜔)
𝑛=0

And
𝑁−1

− ∑ ℎ(𝑛)𝑠𝑖𝑛𝜔𝑛 = ±|𝐻(𝜔)|𝑠𝑖𝑛𝜃(𝜔)
𝑛=0

Therefore,
∑𝑁−1
𝑛=0 ℎ(𝑛)𝑠𝑖𝑛𝜔𝑛 𝑠𝑖𝑛𝜃(𝜔) 𝑠𝑖𝑛𝛼𝜔
= =
∑𝑁−1
𝑛=0 ℎ(𝑛)𝑐𝑜𝑠𝜔𝑛 𝑐𝑜𝑠𝜃(𝜔) 𝑐𝑜𝑠𝛼𝜔
i.e.,
𝑁−1

∑ ℎ(𝑛)[𝑠𝑖𝑛𝜔𝑛𝑐𝑜𝑠𝛼𝜔 − 𝑐𝑜𝑠𝜔𝑛𝑠𝑖𝑛𝛼𝜔] = 0
𝑛=0

i.e.,
𝑁−1

∑ ℎ(𝑛) sin(𝛼 − 𝑛) 𝜔 = 0
𝑛=0

This will be zero when


𝑁−1
ℎ(𝑛) = ℎ(𝑁 − 1 − 𝑛) and 𝛼 = , 𝑓𝑜𝑟 0 ≤ 𝑛 ≤ 𝑁 − 1
2

This shows that FIR filters will have constant phase and group delays when the impulse
𝑁−1
response is symmetrical about 𝛼 = . (Showed)
2

Example: The following transfer function characterizes an FIR filter (𝑵 = 𝟗).


Determine the magnitude response and show that the phase and group delays are
constant.
𝑵−𝟏

𝑯(𝒛) = ∑ 𝒉(𝒏)𝒛−𝒏
𝒏=𝟎

Solution:
The transfer function of the filter is given by
N−1

H(z) = ∑ h(n)z −n
n=0

H(z) = h(0) + h(1)𝑧 −1 + h(2)𝑧 −2 + h(3)𝑧 −3 + h(4)𝑧 −4 + h(5)𝑧 −5 + h(6)𝑧 −6


+ h(7)𝑧 −7 + h(8)𝑧 −8
The phase delay
𝑁−1 9−1
𝛼= = =4
2 2
Since 𝛼 = 4 . The transfer function can be expressed as:
H(z) = 𝑧 −4 [h(0)𝑧 4 + h(1)𝑧 3 + h(2)𝑧 2 + h(3)𝑧1 + h(4)𝑧 0 + h(5)𝑧 −1 + h(6)𝑧 −2
+ h(7)𝑧 −3 + h(8)𝑧 −4 ]
Since ℎ(𝑛) = ℎ(𝑁 − 1 − 𝑛)
H(z) = 𝑧 −4 [h(0)(𝑧 4 + 𝑧 −4 ) + h(1)(𝑧 3 + 𝑧 −3 ) + h(2)(𝑧 2 + 𝑧 −2 ) + h(3)(𝑧1
+ 𝑧 −1 ) + h(4)]
The frequency response is obtained by replacing z with 𝑒 𝑗𝜔 .
H(z) = 𝑒 −𝑗4𝜔 [h(0)(𝑒 𝑗4𝜔 + 𝑒 −𝑗4𝜔 ) + h(1)(𝑒 𝑗3𝜔 + 𝑒 −𝑗3𝜔 ) + h(2)(𝑒 𝑗2𝜔 + 𝑒 −𝑗2𝜔 )
+ h(3)(𝑒 𝑗𝜔 + 𝑒 −𝑗𝜔 ) + h(4)]

H(z) = 𝑒 −𝑗4𝜔 [ℎ(4) + 2 ∑ ℎ(𝑛)cos(4 − 𝑛)𝜔]


𝑛=0
H(z) = 𝑒 −𝑗4𝜔 |𝐻(𝜔)|
Where |𝐻(𝜔)| is the magnitude response and 𝜃(𝜔) = −5𝜔 is the phase response. The
phase delay
𝜃(𝜔)
𝜏𝑝 = − =5
𝜔
And the group delay
𝑑𝜃(𝜔) 𝑑(−5𝜔)
𝜏𝑔 = − =− =5
𝑑𝜔 𝑑𝜔
Thus, the phase delay and the group delay are the same and constants.
Frequency response of linear phase FIR filter when impulse response is
symmetrical and N is even.
The frequency response of FIR filter, with impulse response ℎ(𝑛) of length N is:
𝑁−1

𝐻(𝜔) = ∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛


𝑛=0

For symmetrical impulse response with even number of samples, the center of
symmetry lies between 𝑛 = (𝑁/2) − 1 and 𝑛 = 𝑁/2. Hence 𝐻(𝜔) is expressed as:
(𝑁/2)−1 𝑁−1
−𝑗𝜔𝑛
𝐻(𝜔) = ∑ ℎ(𝑛)𝑒 + ∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛
𝑛=0 𝑛=𝑁/2

Let 𝑚 = 𝑁 − 1 − 𝑛 ∴𝑛 =𝑁−1−𝑚
When 𝑛 = 𝑁/2 𝑚 = 𝑁 − 1 − 𝑁/2 = 𝑁/2 − 1
When 𝑛 = 𝑁 − 1 𝑚 = 𝑁 − 1 − (𝑁 − 1) = 0
Therefore, the above equation for 𝐻(𝜔) can be written as:
(𝑁/2)−1 (𝑁/2)−1

𝐻(𝜔) = ∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛 + ∑ ℎ(𝑁 − 1 − 𝑚)𝑒 −𝑗𝜔(𝑁−1−𝑚)


𝑛=0 𝑚=0

Replacing m by n, we get
(𝑁/2)−1 (𝑁/2)−1

𝐻(𝜔) = ∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛 + ∑ ℎ(𝑁 − 1 − 𝑛)𝑒 −𝑗𝜔(𝑁−1−𝑛)


𝑛=0 𝑛=0

By the symmetry condition, ℎ(𝑁 − 1 − 𝑛) = ℎ(𝑛)


Hence 𝐻(𝜔) can be written as:
(𝑁/2)−1 (𝑁/2)−1

𝐻(𝜔) = ∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛 + ∑ ℎ(𝑛)𝑒 −𝑗𝜔(𝑁−1)−𝑗𝜔(−𝑛)


𝑛=0 𝑛=0
(𝑁/2)−1
𝑁−1 𝑁−1 𝑁−1
= 𝑒 −𝑗𝜔 2 { ∑ ℎ(𝑛)[𝑒 −𝑗𝜔𝑛+𝑗𝜔 2
+ −𝑗𝜔(−𝑛)−𝑗𝜔(𝑁−1)+𝑗𝜔
𝑒 2 ]
𝑛=0

(𝑁/2)−1
𝑁−1 𝑁−1 𝑁−1
= 𝑒 −𝑗𝜔 2 { ∑ ℎ(𝑛)[𝑒 𝑗𝜔( 2
−𝑛)+ −𝑗𝜔(
𝑒 2
−𝑛)
]
𝑛=0

(𝑁/2)−1
𝑁−1 𝑁−1
= 𝑒 −𝑗𝜔 2 { ∑ ℎ(𝑛)2cos(𝜔 ( − 𝑛))]
2
𝑛=0

𝑁
Let 𝑘 = 𝑁/2 − 𝑛 ∴𝑛= −𝑘
2

When 𝑛 = 0 𝑘 = 𝑁/2
When 𝑛 = 𝑁/2 − 1 𝑘 = 𝑁/2 − (𝑁/2 − 1) = 1
Therefore, the above expression for 𝐻(𝜔) becomes
(𝑁/2)
𝑁−1 𝑁 1
𝐻(𝜔) = 𝑒 −𝑗𝜔 2 { ∑ 2ℎ ( − 𝑘) cos 𝜔(𝑘 − )
2 2
𝑘=1

On replacing k by n, we get
(𝑁/2)
−𝑗𝜔
𝑁−1 𝑁 1
𝐻(𝜔) = 𝑒 2 { ∑ 2ℎ ( − 𝑛) cos 𝜔(𝑛 − )
2 2
𝑛=1

This is the expression for frequency response of linear phase FIR filter when impulse
response is symmetrical and N is even. (Showed)
The magnitude function of 𝐻(𝜔) is given by
(𝑁/2)
𝑁 1
|𝐻(𝜔)| = ∑ 2ℎ ( − 𝑛) cos 𝜔(𝑛 − )
2 2
𝑛=1

The phase function of 𝐻(𝜔) is given by


𝑁−1 𝑁−1
< 𝐻(𝜔) = −𝜔 = −𝜔𝛼 𝑤ℎ𝑒𝑟𝑒 𝛼 =
2 2
Frequency response of linear phase FIR filter when impulse response is
antisymmetric and N is odd.
The frequency response of linear phase FIR filter with impulse response ℎ(𝑛) of length
N is:
𝑁−1

𝐻(𝜔) = ∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛


𝑛=0

The impulse response is antisymmetric with center of antisymmetric at 𝑛 = (𝑁 − 1)/2


. also ℎ[(𝑁 − 1)/2] = 0. Hence 𝐻(𝜔) can be expressed as:
𝑁−3
2 𝑁−1
𝑁 − 1 −𝑗𝜔(𝑁−1)
𝐻(𝜔) = ∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛 + ℎ( )𝑒 2 + ∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛
2
𝑛=0 𝑛=(𝑁+1)/2

𝑁−3
2 𝑁−1

𝐻(𝜔) = ∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛 + ∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛


𝑛=0 𝑛=(𝑁+1)/2

Let 𝑚 = 𝑁 − 1 − 𝑚 𝑛=𝑁−1−𝑚
When 𝑛 = (𝑁 + 1)/2 𝑚 = 𝑁 − 1 − (𝑁 + 1/2) = (𝑁 − 3)/2
When 𝑛 = 𝑁 − 1 𝑚 = 𝑁 − 1 − (𝑁 − 1) = 0
(𝑁−3)
2 (𝑁−3)/2

∴ 𝐻(𝜔) = ∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛 + ∑ ℎ(𝑁 − 1 − 𝑚)𝑒 −𝑗𝜔(𝑁−1−𝑚)


𝑛=0 𝑚=0

On replacing m by n, we get
(𝑁−3)
2 (𝑁−3)/2

𝐻(𝜔) = ∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛 + ∑ ℎ(𝑁 − 1 − 𝑛)𝑒 −𝑗𝜔(𝑁−1−𝑛)


𝑛=0 𝑛=0

For antisymmetric impulse response, ℎ(𝑁 − 1 − 𝑛) = −ℎ(𝑛).


Hence the above equation 𝐻(𝜔) can be written as:
(𝑁−3)
2 (𝑁−3)/2

𝐻(𝜔) = ∑ ℎ(𝑛)𝑒 −𝑗𝜔𝑛 + ∑ −ℎ(𝑛)𝑒 −𝑗𝜔(−𝑛)−𝑗𝜔(𝑁−1)


𝑛=0 𝑛=0
(𝑁−3)
2
𝑁−1 𝑁−1 𝑁−1
𝑜𝑟, 𝐻(𝜔) = 𝑒 −𝑗𝜔( 2
)
∑ ℎ(𝑛) (𝑒 −𝑗𝜔𝑛+𝑗𝜔( 2
)
− 𝑒 −𝑗𝜔(−𝑛)−𝑗𝜔(𝑁−1)+𝑗𝜔( )
2 )
𝑛=0
{
(𝑁−3)
2
𝑁−1 𝑁−1 𝑁−1
𝑜𝑟, 𝐻(𝜔) = 𝑒 −𝑗𝜔( 2
)
∑ ℎ(𝑛) (𝑒 𝑗𝜔( 2
−𝑛)
− 𝑒 −𝑗𝜔( 2
−𝑛)
)
𝑛=0
{
(𝑁−3)
2
𝑁−1 𝑁−1
𝑜𝑟, 𝐻(𝜔) = 𝑒 −𝑗𝜔( 2
)
∑ ℎ(𝑛) 2𝑗𝑠𝑖𝑛 (𝜔( − 𝑛))
2
𝑛=0
{
Since 𝑗 = 𝑒 𝑗𝜋/2
(𝑁−3)
2
𝑁−1 𝑁−1
𝑜𝑟, 𝐻(𝜔) = 𝑒 −𝑗𝜔( 2
)
∑ ℎ(𝑛) 2𝑒 𝑗𝜋/2 𝑠𝑖𝑛 (𝜔( − 𝑛))
2
𝑛=0
{
(𝑁−3)
2
𝜋 𝑁−1
𝑗( 2 −𝜔( 2 )) 𝑁−1
𝑜𝑟, 𝐻 (𝜔) = 𝑒 ∑ 2ℎ(𝑛) 𝑠𝑖𝑛 (𝜔( − 𝑛))
2
𝑛=0
{
𝑁−1 𝑁−1
Let 𝑘 = − 𝑛, ∴𝑛= −𝑘
2 2
𝑁−1
When 𝑛 = 0, 𝑘=
2
𝑁−3 𝑁−1 𝑁−3
When 𝑛 =
2
, 𝑘= 2
− 2 =1
(𝑁−1)
2
𝜋 𝑁−1
𝑗( 2 −𝜔( 2 )) 𝑁−1
∴ 𝐻 (𝜔) = 𝑒 ∑ 2ℎ ( − 𝑘) 𝑠𝑖𝑛 (𝜔𝑘)
2
𝑘=1
{
Replacing k by n, we get
(𝑁−1)
2
𝜋 𝑁−1
𝑗( 2 −𝜔( 2 )) 𝑁−1
∴ 𝐻 (𝜔) = 𝑒 ∑ 2ℎ ( − 𝑛) 𝑠𝑖𝑛 (𝜔𝑛)
2
𝑛=1
{
This is the equation for frequency response of linear phase FIR filter when
impulse response is antisymmetric and N odd. (Showed)
The magnitude function is given by
(𝑁−1)/2
𝑁−1
|𝐻(𝜔)| = ∑ 2ℎ( − 𝑛)𝑠𝑖𝑛𝜔𝑛
2
𝑛=1

𝑁
2
𝜋 𝑁−1 𝑁 1
𝑗( −𝜔( ))
∴ 𝐻 (𝜔 ) = 𝑒 2 2 ∑ 2ℎ ( − 𝑘) 𝑠𝑖𝑛 (𝜔(𝑘 − ))
2 2
𝑘=1
({ )
Replacing k by n, we get
𝑁
2
𝜋 𝑁−1 𝑁 1
𝑗( −𝜔( ))
𝐻 (𝜔 ) = 𝑒 2 2 ∑ 2ℎ ( − 𝑛) 𝑠𝑖𝑛 (𝜔(𝑛 − ))
2 2
𝑛=1
({ )
This is the equation for the frequency response of linear phase FIR filter
when impulse response is antisymmetric and N is even. (Showed)

Potrebbero piacerti anche