You are on page 1of 18

FILTERS

Introduction
A FILTER is an electrical device which selects the appropriate frequency and rejects the others.

Types of Filter

There are four types of filters:

 Low Pass filter


 High Pass filter
 Band Pass filter
 Band Stop filter

The figures below show ideal characteristics of the above filters:

FIG 1. AN IDEAL LOW PASS FILTER


FIG 2. AN IDEAL HIGH PASS FILTER

FIG 3. AN IDEAL BAND PASS FILTER


FIG 4. AN IDEAL BAND STOP FILTER

Transfer Function of an Ideal Low Pass Filter

A low pass filter passes relatively low frequency components in the signal but stops the high frequency
components .The so called cut off frequency divides the pass band and the stop band .In other words
frequency components higher than cut off frequency will be stopped a low pass filter.

The behaviour of so called low pass frequency can be summarised by the transfer function h(n) .

1 𝜋
𝑕 𝑛 =( ) −𝜋 𝐻(𝑒 𝑗𝜔 )𝑒 𝑗𝑛𝜔 𝑑𝜔 (1)
2𝜋

For Low Pass Filter 𝐻 𝑒 𝑗𝜔 = 1 from -𝜔𝑐 TO 𝜔𝑐


𝜔𝑐
1
⇒𝑕 𝑛 = 1 . 𝑒𝑗𝑛𝜔 . 𝑑𝜔
2𝜋
−𝜔𝑐

1
⇒𝑕 𝑛 = (𝑒𝑗𝑛𝜔𝑐 − 𝑒−𝑗𝑛𝜔𝑐 )
2𝜋𝑗𝑛

𝜔
⇒ 𝑕 𝑛 = ( 𝜋𝑐 ) (𝑠𝑖𝑛 𝑛𝜔𝑐 /𝑛𝜔𝑐 ) (2)
Since the transfer function is valid for negative values of n and it is not absolutely summable

𝑕(𝑛) ≮ ∞

Since h(n) is of the form sin(x)/x which is not absolutely summable ,therefore unstable

, hence the system is non causal.

Therefore not realizable.

Transfer Function of an Ideal High Pass Filter

A high pass filter passes relatively high frequency components in the signal but stops the low frequency
components .The so called cut off frequency divides the pass band and the stop band .In other words
frequency components lower than cut off frequency will be stopped a high pass filter. The behaviour of so
called high pass frequency can be summarised by the transfer function h(n) .
1 −𝜔 𝑐 1 𝜋
𝑕 𝑛 = (2𝜋 ) −𝜋 𝐻(𝑒 𝑗𝜔 )𝑒 𝑗𝑛𝜔 𝑑𝜔 + (2𝜋 ) 𝜔𝑐
𝐻(𝑒 𝑗𝜔 )𝑒 𝑗𝑛𝜔 𝑑𝜔

𝐻 𝑒 𝑗𝜔 = 1

For High Pass Filter from -𝜋 TO - 𝜔𝑐 and 𝜔𝑐 TO 𝜋.

1
⇒𝑕 𝑛 = 𝑒 𝑗𝑛𝜋 − 𝑒 −𝑗𝑛𝜋 + 𝑒 −𝑗𝑛 𝜔 𝑐 – 𝑒 𝑗𝑛 𝜔 𝑐
2𝜋𝑗𝑛

𝜔
⇒ 𝑕 𝑛 = −( 𝜋𝑐 ) (𝑠𝑖𝑛 𝑛𝜔𝑐 /𝑛𝜔𝑐 ) (3)

Since the transfer function is valid for negative values of n and it is not absolutely summable

𝑕(𝑛) ≮ ∞

Since h(n) is of the form sin(x)/x which is not absolutely summable ,therefore unstable

, hence the system is non causal.

Therefore not realizable.

For a filter to be realizable ,it must be linear time-invariant , absolutely summable and causal in nature.

Since ideal characteristics cannot be realized , actual filter must have pass band ,stop band and
transition band .Transition band character determines the quality of the filter. The narrower it is ,the
better is the filtering sharper is the rejection of unwanted frequency.

1
𝛼= 𝑐𝑜𝑟𝑟𝑒𝑠𝑝𝑜𝑛𝑑𝑠 𝑡𝑜 𝜔𝑐 = 3 𝑑𝐵 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦(𝐩𝐚𝐬𝐬𝐛𝐚𝐧𝐝 𝐟𝐫𝐞𝐪𝐮𝐞𝐧𝐜𝐲)
2

𝛽 = 0.0001 = 10−3 𝑐𝑜𝑟𝑟𝑒𝑠𝑝𝑜𝑛𝑑𝑠 𝑡𝑜 𝜔𝑠 = 60 𝑑𝐵 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦 𝑠𝑡𝑜𝑝𝑏𝑎𝑛𝑑 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦


LTI Discrete Signals

LTI signals as the name suggests are those signals that are linear and time invariant.

Consider an LTI signal

𝑦 𝑛 + 𝑏1 𝑦 𝑛 − 1 + ⋯ _𝑏𝑁 𝑦 𝑛 − 𝑁 = 𝑎0 𝑥 𝑛 − 1 + ⋯ . +𝑎𝑁 𝑥(𝑛 − 𝑁)

Taking Fourier transform on both sides

𝑌 𝑒 𝑗𝜔 + 𝑏1 𝑒 −𝑗𝜔 𝑌 𝑒 𝑗𝜔 + ⋯ + 𝑏𝑁 𝑒 −𝑗𝜔 𝑌 𝑒 𝑗𝜔 = 𝑎0 𝑋 𝑒 𝑗𝜔 + ⋯ + 𝑎𝑁 𝑒 −𝑗𝜔𝑁 𝑋 𝑒 𝑗𝜔

𝑌 𝑒 𝑗𝜔
𝐻 𝑒 𝑗𝜔 = 𝑋 (4)
𝑒 𝑗𝜔

𝑎0 + 𝑎1 𝑒 𝑗𝜔 … 𝑎𝑀 𝑒 −𝑗𝜔𝑀
=
1 + 𝑏1 𝑒 −𝑗𝜔 … 𝑏𝑁 𝑒 −𝑗𝜔𝑁

Where 𝐻 𝑒 𝑗𝜔 represents the frequency response

 HINT : if the first term of the denominator isn’t one then divide

Now if this includes the unit circle (R.O.C) then

𝐻 𝑧 Where z= 𝑒 𝑗𝜔
𝑃 𝑧 𝑃 𝑧
𝐻 𝑒 𝑗𝜔 = 𝑄 (𝑄 = 𝑟𝑎𝑡𝑖𝑜𝑛𝑎𝑙 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛) (5)
𝑧 𝑧

M-Point Moving Average System (FIR System)

An M-point moving average filter takes the average of the inputs in the present, immediate past and
immediate future and gives the output as a mean. M point implies that it takes the mean of (M-1)/2 values
of the input from the immediate past and future each plus the present value, bringing the total points of
sampling to M.

𝑀−1
1
𝑦 𝑛 = 𝑥 𝑛−𝑘
𝑀
𝑘=0

1
𝑦 𝑛 = [𝑥 𝑛 + 𝑥 𝑛 − 1 + ⋯ . +𝑥 𝑛 − 𝑀 − 1 ]
𝑀
1
𝑌 𝑧 = [𝑌 𝑧 + 𝑧 −1 𝑋 𝑧 + ⋯ . 𝑧 − 𝑀−1 𝑋 𝑧 ]
𝑀
1 𝑀−1 −𝑛
𝐻 𝑧 =𝑀 𝑛=0 𝑧 (6)

Because of the pole –zero cancelation the pole which is formed as can be seen from the equation is
cancelled by a zero so an M point moving average filter is an FIR filter. if a pole is introduced then it
must lie inside the unit circle to ensure stability.

FIR Filters

The FIR filters are of non recursive type whereby the present output sample depends on the present
input sample and previous input samples

Low Pass Filter

A low pass filter accepts the lower frequency signals and rejects the higher frequency signals. The
Transfer Function of an ideal FIR low pass filter is given below:

Fig 5 Low Pass Filter


Fig 6.
1
𝐻 𝑧 = 𝑧 (1 + 𝑧 −1 ) (7)

Changing to frequency response


1
𝐻 𝑒 𝑗𝜔 = 2 (1 + 𝑒 −𝑗𝜔 ) 0<𝜔 < 𝜋

1 𝜔=0 1
= = normalizing factor
0 𝜔=𝜋 2

−𝑗𝜔
𝜔
⇒ 𝐻 𝑒 𝑗𝜔 = 𝑒 2 cos 2

where
−𝑗𝜔
Phase = 𝑒 2

𝜔
Magnitude = cos 2

The function goes from 0 to 𝜋


1 𝜔𝑐 𝜋
= cos = cos 4
2 2

𝜋
⇒ 𝜔𝑐 =
2

In case of elementary filters the response is poor because of the large bandwidth hence the filters a
cascaded in order to attain sharper values.

𝜔𝑐 𝑀 1
(cos ) =
2 2
1
𝜔𝑐 1 3
⇒ cos =
2 2

⇒ 𝜔𝑐 = 0.3

HIGH PASS FILTER

Fig 7. High Pass Filter

As can be seen from the figure a High Pass Filter accepts signals of high frequency range and rejects
signals of lower frequency range.

The Transfer Function of an ideal High pass filter is given below


1
𝐻 𝑧 = 2 (1 − 𝑧 −1 ) (8)

The frequency response taking z on unit circle is


1
𝐻 𝑒 𝑗𝜔 = 2 1 − 𝑒 −𝑗𝜔 (9)

−𝑗𝜔 𝑗𝜔 −𝑗𝜔
1
= 2𝑗 𝑒 2 (𝑒 2 − 𝑒 2 )

−𝑗𝜔 𝜔
⇒ 𝐻 = 𝑗𝑒 2 sin
2
In case of a low pass filter replace z by –z to get high pass filter

If the alternate coefficients are positive and negative the filter is high pass filter
BAND PASS FILTER

Fig 8

A Band Pass filter accepts signals within a given frequency range and rejects all other signals.

The Transfer function of a Band Pass filter is given below:

𝐻 𝑧 = 𝐴(1 + 𝑧 −1 )(1−𝑧 −1 ) (10)

The frequency response is obtained by taking z on the unit circle:

𝐻 𝑒 𝑗𝜔 = 𝐴 1 + 𝑒 −𝑗𝜔 (1 − 𝑒 −𝑗𝜔 )

= 𝐴 1 − 𝑒 −2𝑗𝜔

𝑒 𝑗𝜔 − 𝑒 −𝑗𝜔
= 2𝐴𝑗𝑒 −𝑗𝜔 ( )
2𝑗

= 2𝑗𝑒 −𝑗𝜔 sin 𝜔


1
= 𝑗𝑒 −𝑗𝜔 sin 𝜔 (A=2)

Here the sinusoidal term is the magnitude response and the exponential term is the phase function.
BAND STOP FILTER

A Band Stop Filter accepts the signals beyond a frequency range and rejects all signals within the
given frequency range.

The Transfer Function of a Band Stop filter is given below:


1
𝐻 𝑧 = 2 1 + 𝑧 −2 (11)

The frequency response taking z on the unit circle is as follows:


1
𝐻 𝑒 𝑗𝜔 = 2 (1 + 𝑒 −2𝑗𝜔 ) (12)

1 −𝑗𝜔 𝑗𝜔
= 𝑒 𝑒 + 𝑒 −𝑗𝜔
2

= 𝑒 −𝑗𝜔 cos 𝜔

Here the cosine term is the magnitude response and the exponential term is the phase function.

ALL PASS FILTER

An All Pass Filter is defined as a system that has a constant magnitude response for all frequencies. It
accepts signals of all frequency ranges. The simplest form of All Pass Filter is a pure delay system.
For an All Pass filter of order N the Transfer Function is given by the equation:

𝐻 𝑧 = 𝑧 −𝑁 (13)

𝐻 𝑒 𝑗𝜔 = 𝑒 −𝑗𝜔𝑁

𝜑 = −𝑁𝜔

⇒𝜑∝𝜔

The phase is linearly varying with the frequency. The gradient is negative.

Group delay is a negative gradient of phase shift

𝑑𝜑
𝑇𝑔= −
𝑑𝜔
=N (constant)

[whole frequency comes to a N sample delay]

The requirements for a filter design

 Group delay mast be constant


 Piecewise linearity of phase
IIR FILTER

IIR filters are recursive in nature whereby the present output sample depends on the present input sample,
past input samples ant output samples.

We can obtain an IIR filter from an FIR filter by introducing a pole on H(z)
1+𝑧 −1
𝐻 𝑧 = 1−∝𝑧 −1 ∝ <1 (14)

We can obtain an IIR filter from an FIR filter by introducing a pole on H(z). The poles are to be
introduced near points of the unit circle corresponding to frequencies that are to be emphasized. The
zeroes are placed near the frequencies to be deemphasized. The single pole introduced in the following
example is placed at location .

LOW PASS FILTER

The transfer function of an IIR Low Pass Filter is given by introducing a single pole at .

1+𝑒 −𝑗𝜔
𝐻 𝑒 𝑗𝜔 = 1−∝𝑒 −𝑗𝜔 (15)

Fig 9:Frequecy Response

At 𝜔 = 0
2
𝐻 1 = 1−∝
1−∝
Normalizing factor = 2

1−∝ 1+𝑧 −1
𝐻 𝑧 = 2 1−∝𝑧 −1

𝑗𝜔
1−∝ 1 + 𝑒 −𝑗𝜔
𝐻 𝑒 =
2 1 −∝ 𝑒 −𝑗𝜔
2
𝑗𝜔 2 1−∝ (1 + cos 𝜔)
𝐻 𝑒 =
2 (1 − 2 ∝ cos 𝜔 +∝2 )

2 2
1−∝
𝑑 𝐻 𝑒 𝑗𝜔 1 − 2 ∝ cos 𝜔 +∝2 − sin 𝜔 − 1 + cos 𝜔 (2𝛼 sin 𝜔)
= 2 =0
𝑑𝜔 1 − 2 ∝ cos 𝜔 +∝2 2

Putting the value of 𝐻 𝑒 𝑗𝜔 = 1/ 2 ,we get value of 3-dB frequency 𝜔𝑐

2
2 1−∝ (1 + cos 𝜔𝑐 )
1/ 2 =
2 (1 − 2 ∝ cos 𝜔𝑐 +∝2 )

⇒ (1 − 2 ∝ cos 𝜔𝑐 +∝2 ) = 1 + 𝛼 2 − 2𝛼 (1 + cos 𝜔𝑐 )


2𝛼
cos 𝜔𝑐 = 1+𝛼 2 (16)

𝛼 = (1 ± sin 𝜔𝑐 )/ cos 𝜔𝑐

Therefore 𝛼 < 1
𝜋 0
At 𝜔𝑐 = , 𝑤𝑒 𝑔𝑒𝑡 0 𝑓𝑜𝑟𝑚.
2

By applying L’hospital’s rule ,we get α=0.Therefore IIR becomes FIR.

HIGH PASS FILTER

1−𝑒 −𝑗𝜔
H(z) = 𝐻 𝑒 𝑗𝜔 = 1+∝𝑒 −𝑗𝜔 (17)

Low Pass Filter

1 − 𝑒 −𝑗𝜔
𝐻 𝑒 𝑗𝜔 =
1 +∝ 𝑒 −𝑗𝜔
At 𝜔 = 0
2
𝐻 1 = 1+∝

1+∝
Normalizing factor = 2
1+∝ 1−𝑧 −1
𝐻 𝑧 = (18)
2 1+∝𝑧 −1

1+∝ 1 − 𝑒 −𝑗𝜔
𝐻 𝑒 𝑗𝜔 =
2 1 +∝ 𝑒 −𝑗𝜔
2
𝑗𝜔 2 1+∝ (1 − cos 𝜔)
𝐻 𝑒 =
2 (1 + 2 ∝ cos 𝜔 +∝2 )

2 2
1+∝
𝑑 𝐻 𝑒 𝑗𝜔 1 + 2 ∝ cos 𝜔 +∝2 sin 𝜔 + 1 − cos 𝜔 (2𝛼 sin 𝜔)
= 2 =0
𝑑𝜔 1 + 2 ∝ cos 𝜔 +∝2 2

Putting the value of 𝐻 𝑒 𝑗𝜔 = 1/ 2 ,we get value of 3-dB frequency 𝜔𝑐

2
2 1+∝ (1 − cos 𝜔𝑐 )
1/ 2 =
2 (1 + 2 ∝ cos 𝜔𝑐 +∝2 )

⇒ (1 + 2 ∝ cos 𝜔𝑐 +∝2 ) = 1 + 𝛼 2 + 2𝛼 (1 − cos 𝜔𝑐 )

2𝛼
cos 𝜔𝑐 =
1 + 𝛼2
𝛼 = (1 ± sin 𝜔𝑐 )/ cos 𝜔𝑐

Since 𝛼 < 1 ,therefore


𝛼 = (1 − sin 𝜔𝑐 )/ cos 𝜔𝑐
𝜋 0
At 𝜔𝑐 = , 𝑤𝑒 𝑔𝑒𝑡 0 𝑓𝑜𝑟𝑚.
2

By applying L’hospital’s rule ,we get α=0.Therefore IIR becomes FIR.

BAND PASS FILTER (ORDER 1)

An IIR Band Pass Filter is obtained by introducing 2 poles near the frequencies that need to be
emphasized. The poles occur in complex conjugate pairs. The transfer function of a Band Pass Filter
containing 2 zeroes and 2 nulls is given by:

1−𝑧 −2
𝐻 𝑧 = (19)
1−𝛽 1+𝛼 𝑧 −1 +𝛼𝑧 −2

1 − cos 2𝜔 + 𝑗 sin 2𝜔
𝐻 𝑒 𝑗𝜔 =
1 − 𝛽 1 + 𝛼 cos 𝜔 + 𝛼 cos 2𝜔 + 𝑗 𝛽 1 + 𝛼 sin 𝜔 − 𝛼 sin 2𝜔
1−𝛼 2
2(1 − cos 2𝜔)
2 4
𝐻 𝑒 𝑗𝜔 =
1 + 𝛽 2 1 + 𝛼 2 + 𝛼 2 + 2𝛼 cos 2𝜔 − 2𝛼𝛽 1 + 𝛼 cos 𝜔

𝜔𝑐2 − 𝜔𝑐1 = cos −1 2𝛼/(1 + 𝛼 2 )

This gives the bandwidth of the Band Pass Filter.

BAND STOP FILTER

A Band Stop Filter is obtained by introducing a null in the frequency response of an all pass filter.

Notch frequency

The notch frequency of a Band Stop Filter is the frequency for which the magnitude response becomes
zero and phase changes sign.

Fig 10
( 1−2.𝛽.𝑧 −1 + 𝑧 −2 )
H(z) = (1− 𝛽. 1+𝛼 (20)
.𝑧 −1 +𝛼.𝑧 −2 )

cos𝜔0 = 𝛽

2. 𝛼
𝜔𝑐2 − 𝜔𝑐2 = 𝑐𝑜𝑠 −1 ( )
1 + 𝛼2
2.𝛼
Band Pass Filter, Band Width = 𝑐𝑜𝑠 −1 (1+ 𝛼 2 )

𝜋
𝜔=
2
𝜋
𝐵𝜔 =
4
𝜋
cos𝜔0 = 2

1 2. 𝛼
=( )
2 1 + 𝛼2

1 + 𝛼 2 = 2. 𝛼. 2

𝛼 2 − 2. 2𝛼 + 1 = 20

2. 2 ± 8.4
𝛼=
2
𝑧 2 − 𝛽. 1 + 𝛼 . 𝑧 + 𝛼 = 0

1+ 𝛼 𝛽. 𝑖 + 𝛼
𝑧= 𝛽 ± − 𝛼
2 2

If 𝛽 = 0

z= ±𝑗. 2−1 if 𝛼 = 2−1

= 𝑗. 2+1 if 𝛼= 2+ 1

|z| > 1

Unstable

𝛼= 2 − 1 is acceptable
𝜔
Q=𝐵𝑎𝑛𝑑𝑤𝑖𝑑𝑡 𝑕

If poles are complex,value of quality factor is very good in case of the Band Pass Filter

All Pass Filter

An All Pass Filter allows signals of all frequencies to pass through it. The poles and zeroes occur as
reciprocal pairs. The equation of an All Pass Filter is given by:

A(z).A(z-1 ) = 1 (21)

| A(z) |2 z𝑒 𝑗𝜔 = 1

A(z) = anything

A(z) =k.(1+az-1)/ (1+bz-1)


(1 + a.cos 𝜔 − 𝑎𝑗 .𝑠𝑖𝑛 𝜔 )
= k [(1 + b.cos 𝜔 − 𝑏𝑗 .𝑠𝑖𝑛 𝜔 ) ]
( 1 + a 2 + 2.a.cos 𝜔 )
𝐻 𝑒 𝑗𝜔 |2 = 𝑘 2 (22)
( 1 + b 2 + 2.b.cos 𝜔 )

a.( 1 + a 2 + 2.a.cos 𝜔 )
= 𝑘2 b.( 1 + b 2 + 2.b.cos 𝜔 )

1
𝑎=𝑏 k=b

(a and b cannot be the same since the filter will not remain all pass in nature.)

(𝑏 + 𝑧 −1 )
𝐴 𝑧 = 𝑘.
(1 + 𝑏𝑧 −1 )

For N order All Pass Filter:

−𝑁
𝐷𝑁 . 𝑧 −1
𝐴𝑁 = 𝑧 .( )
𝐷𝑁 . 𝑧

𝐷𝑁 𝑧0 = 0

1
𝐷𝑁 = 0
𝑧0

The poles and zeros aren’t paired.

They form a mirror image. Poles and zeros occur in reciprocal form.

Fig 11

When all the zeros are outside the unit circle then it is known as maximum phase function.

When all the zeros are within the unit circle is minimum phase function

In all other cases it forms a mixed phase function.

Z= 𝑟. 𝑒 𝑗𝜔
| A(z) | = 1 for |z|=1

<1 for |z|>1

>1 for |z|<1

COMB FILTER

In its simplest form a comb filter can be viewed as a notch filter in which the nulls occur periodically
across the frequency band and hence the analogy to a comb. The Transfer Function is given by:
1
H(z) = 2 . ( 1 + 𝑧 −1 ) (23)

1
G(z) = 2 . ( 1 + 𝑧 −1 )

1
= 2 . ( 1 + 𝑒 −𝑗 𝜔 L )

𝑒 −𝑗 𝜔 L /2
= . ( 𝑒 𝑗 𝜔 L/2 + 𝑒 −𝑗 𝜔 L/2 )
2

𝑒 −𝑗 𝜔 L /2 𝜔L
= .2. cos⁡
(2)
2

𝜔L 𝜔L
= 𝑒 −𝑗 𝜔 L/2 . cos⁡
(2) = 0, 𝜋
2

𝜔L
⇒ = 𝑟. 𝜋
2

2.𝜋.𝑟
⇒ 𝜔= r= 0 to N-1
𝐿
Fig:12: Comb Filter

Zero Phase Filter

A Zero phase filter is non-real and hence not realizable. The phase term in the frequency response of such
a filter is zero.

H(n) ={𝛼, 𝛽, 𝛼}

H(z)=𝛽 + 2𝛼𝑐𝑜𝑠𝜔 (24)

Represents pseudo magnitude

Till the value of the magnitude is positive, ω = 0 . When the value changes from positive to negative it
gives a phase for that instant of time.

Not realizable non real time function since it is non causal. To make it causal we can introduce a shift of 1
but then the filter will cease to be a zero phase filter; a phase will be introduced due to the shift.

You might also like