You are on page 1of 31

10/5/2012

10/5/2012 S. THAI SUBHA CHAPTER-IV 1

Design of analog filters to digital filters


Impulse invariance transformation
Bilinear Transformation
Design of Butterworth filters
Design of Chebyshev filters

10/5/2012 S. THAI SUBHA CHAPTER-IV 2

1
10/5/2012

Digital Filters are designed by considering all the


infinite samples of impulse response.
Digital filters is a linear time-invariant discrete
time systems.
FIR filter Non recursive type, output depends on
present input & previous input samples.
IIR filter Recursive type output depends on the
present input, past input & output samples.

10/5/2012 S. THAI SUBHA CHAPTER-IV 3

Impulse response is useful because:


(i) any signal can be viewed as the sum of a number of
shifted and scaled impulses, hence the response a
linear filter to a signal is the sum of the responses to
all the impulses that constitute the signal,
(ii) an impulse input contains all frequencies with
equal energy, and hence it excites a filter at all
frequencies and
(iii) impulse response and frequency response are
Fourier transform pairs.

10/5/2012 S. THAI SUBHA CHAPTER-IV 4

2
10/5/2012

Advantages of digital filters:


No component ageing.
High immune to noise.
No problems of impedance matching.
Operated under wide range of frequencies.
Coefficients of digital filters can be altered to
obtain desired characteristics.
Multiple filtering is possible only in digital filters.

10/5/2012 S. THAI SUBHA CHAPTER-IV 5

Disadvantages of digital filter:


Quantization error arises due to finite word
length in the representation of signals &
parameters.

10/5/2012 S. THAI SUBHA CHAPTER-IV 6

3
10/5/2012

The digital filters designed by selecting only N samples of


the impulse response are called FIR filters.

The digital filters designed by selecting all infinite


samples of the impulse response are called IIR filters.

10/5/2012 S. THAI SUBHA CHAPTER-IV 7

FIR filters
A non-recursive filter has no feedback and its input-output
relation is given by

The response of such a filter to an impulse consists of a


finite sequence of M+1 samples, where M is the filter order.
Hence, the filter is known as a Finite-Duration Impulse
Response (FIR) filter.
Other names for a non-recursive filter, all-zero filter, feed-
forward filter.
10/5/2012 S. THAI SUBHA CHAPTER-IV 8

4
10/5/2012

IIR Filters
A recursive filter has feedback from output to input,
and in general its output is a function of the previous
output samples and the present and past input samples
as described by the following equation

when a recursive filter is excited by an impulse, the


output persists forever. Thus a recursive filter is also
known as an Infinite Duration Impulse Response (IIR)
filter.
Other names for an IIR filter - feedback filters, pole-
zero filters.

10/5/2012 S. THAI SUBHA CHAPTER-IV 9

10/5/2012 S. THAI SUBHA CHAPTER-IV 10

5
10/5/2012

IIR Filter FIR Filter


All the infinite samples of impulse Only N samples of impulse response are
response are considered. considered.
The impulse response cannot be directly The impulse response can be directly
converted to digital filter transfer converted to digital filter transfer
function. function.
The design involves analog filter design The digital filter can be directly designed
and then transforming analog filter to to achieve the desired specifications.
digital filter.
The specifications include the desired The specifications include the desired
characteristics for magnitude response characteristics for both magnitude and
only. phase response .
IIR filter can become unstable (if the poles FIR filter is always stable
of the IIR filter are outside the unit circle)

10/5/2012 S. THAI SUBHA CHAPTER-IV 11

Requirements of analog filter to be stable and


casual:
Analog filter transfer function Ha(s) should be a
rational function of s and the coefficients of s
should be real.
The poles should lie on the left half of s - plane.
Number of zeros should be less than or equal to
number of poles.

10/5/2012 S. THAI SUBHA CHAPTER-IV 12

6
10/5/2012

Requirements of digital filter to be stable and


casual:
Digital filter transfer function H(z) should be a
rational function of z and the coefficients of z
should be real.
The poles should lie on the left half of z - plane.
Number of zeros should be less than or equal to
number of poles.

10/5/2012 S. THAI SUBHA CHAPTER-IV 13

The impulse response h(n) for a realizable


filter is, h(n) = 0, for n 0 & for stability it

must satisfy the condition, h(n) < n =0

The design of an IIR filter for the given


specifications is to find filter coefficients.

10/5/2012 S. THAI SUBHA CHAPTER-IV 14

7
10/5/2012

Impulse invariant transformation


Bilinear transformation

Impulse invariant transformation:


In this method the IIR filter is designed such that the
unit impulse response h(n) of digital filter is the
sampled version of the impulse response of analog
filter.

10/5/2012 S. THAI SUBHA CHAPTER-IV 15

Impulse invariant transformation

Many to one mapping which leads to aliasing


Im(z) j
z-plane

s-plane

-1 1 Re(z)

z = esT
s = +j

10/5/2012 S. THAI SUBHA CHAPTER-IV 16

8
10/5/2012

There are infinite number of s-plane poles that map to


the same location in the z-plane. They must have the
same real parts and imaginary parts that differ by some
integer multiple of 2/T.
This is the big disadvantage of impulse invariant
mapping. The s-plane poles having imaginary parts
greater, than /T or less than - /T causes aliasing when
sampling analog signals.
Due to the presence of aliasing, the impulse invariant
method is appropriate for the design of low pass &
bandpass filter only,S.but
10/5/2012
not suitable for HPF.
THAI SUBHA CHAPTER-IV 17

Design steps:
1. For the given specifications, find Ha(s) the transfer function
of an analog filter.
2. Select the sampling rate of the digital filter, T seconds per
sample.
3. Express the analog filter transfer function as the sum of
N
single pole filters. c
H a (s) = k
k =1 s p k

4. Compute the z-transform of the digital filter by using the


formula, N
ck
H(z) = p k T 1
k =1 1 e z
10/5/2012 S. THAI SUBHA CHAPTER-IV 18

9
10/5/2012

The bilinear transformation is a conformal mapping that


transforms the j axis into the unit circle in the z-
plane only once, thus avoiding aliasing of frequency
components.
All the points in the LHP s-plane are mapped inside
the unit circle of z-plane and all the points in the
RHP of s-plane are mapped into corresponding
points outside the unit circle in the z-plane.

10/5/2012 S. THAI SUBHA CHAPTER-IV 19

Frequency warping

10/5/2012 S. THAI SUBHA CHAPTER-IV 20

10
10/5/2012

2
= tan
T 2
For small values of , = 2 =
T 2 T
= T
For low frequencies the relationship between and
are linear, as a result the digital filter have the same
amplitude response as the analog filter.
For high frequencies the relationship between and
becomes non-linear & distortion is introduced in
the frequency scale of the digital filter to that of the
analog filter. Warping effect.
10/5/2012 S. THAI SUBHA CHAPTER-IV 21

The warping effect can be eliminated by prewarping the


analog filter.
The effect of non-linear compression at high frequencies
can be compensated by prewarping.
When the desired magnitude response is piece-wise
constant over frequency, this compression can be
compensated by introducing a suitable prescaling or
prewarping the critical frequencies by using the formula,
2
= tan
T 2
10/5/2012 S. THAI SUBHA CHAPTER-IV 22

11
10/5/2012

Advantages of bilinear transformation:


1. One to - one mapping.
2. Stable continuous systems can be mapped into
realizable, stable digital systems.
3. No aliasing.
Disadvantages:
1. Highly non-linear, producing frequency
compression at high frequencies.

10/5/2012 S. THAI SUBHA CHAPTER-IV 23

Design steps:
1. Find prewarping analog frequencies using
2
= tan
T 2

2. Using analog frequency, find H(s) of the analog


filter.
3. Select the sampling rate of the digital filter, T = 1sec
per sample.
1
4. Substitute, s = 2 1 z 1 into the transfer function
found in step 2.T 1 + z
10/5/2012 S. THAI SUBHA CHAPTER-IV 24

12
10/5/2012

Ex. 5.12(RB): For the analog transfer function


2
H (s) =
(s + 1)(s + 2)
Determine H(z) using impulse invariance method.
Assume T = 1 sec.
Solution:
2
H (s) =
(s + 1)(s + 2)
Applying partial fractions, 2 2
H (s) =
(s + 1) (s + 2)
2 2
=
(s (1)) (s (2))

10/5/2012 S. THAI SUBHA CHAPTER-IV 25

N N
ck ck
H a (s) =
k =1 s p k
H(z) = p k T 1
k =1 1 e z

2 2
H (s) =
(s (1)) (s (2))

(s p k ) (1 e pkT
z 1 )
Here , p k p 1 , p 2
p 1 = 1; p 2 = 2 ; T = 1sec

10/5/2012 S. THAI SUBHA CHAPTER-IV 26

13
10/5/2012

2 2
H(z) = 1 1

1 e z 1 e 2 z 1
2 2
= 1

1 0.3678z 1 0.1353z 1
Simplifying,

0.465z 1
H(z) =
1 0.503z 1 + 0.0497z 2

10/5/2012 S. THAI SUBHA CHAPTER-IV 27

Ex. 5.11(RB): Apply bilinear transformation to


2
H(s) =
(s + 1)(s + 2)
with T = 1sec and find H(z).
Solution:
Substitute,
2 1 z 1
s=
T 1 + z 1
2
H(z) =
(s + 1)(s + 2) s = 2 1 z 1
T 1+ z 1
10/5/2012 S. THAI SUBHA CHAPTER-IV 28

14
10/5/2012

2
H(z) =
1 z1 1 z1
2 1 +1 2 1 + 2
1+ z
1+ z

=
(1+ z )1 2

6(1 z )
1 1
3

10/5/2012 S. THAI SUBHA CHAPTER-IV 29

Designing IIR digital filter involves the design of


equivalent analog filter & then converting analog
filter to digital filter.
First analog Butterworth IIR filter transfer function is
determined using the specifications.
Then, analog transfer function is converted to a digital
filter transfer function using,
Impulse invariance transformation
Bilinear transformation

10/5/2012 S. THAI SUBHA CHAPTER-IV 30

15
10/5/2012

Analog Butterworth filter:


The magnitude response of LPF is given by,
2 1
H a () = 2N

1 +
c
The magnitude response of the Butterworth filter is
said to be maximally flat.

10/5/2012 S. THAI SUBHA CHAPTER-IV 31

H ( j )
1.0
1 p (dB)
1 + 2

s (dB)

1
1 + 2

p s
10/5/2012 S. THAI SUBHA CHAPTER-IV 32

16
10/5/2012

Find order of the filter,


100.1s 1
log 0.1 p
log
N 10 1
s 1
log log
k
p
parameter specifying allowable passband
- parameter specifying allowable stopband
1 1
= p = s
2
1+ 1 + 2
10/5/2012 S. THAI SUBHA CHAPTER-IV 33

Obtain cut-off frequency,


p p
c = =
(10 0.1 p
)
1
1
2N
( )
1
2N

With the order of the filter, obtain the transfer


function H(s), by substituting s by s
c

Convert analog transfer function Ha(s) to digital


function H(z), using either impulse invariance
method or bilinear transformation method.

10/5/2012 S. THAI SUBHA CHAPTER-IV 34

17
10/5/2012

How to obtain the poles(denominator)


of the transfer function?
To obtain the poles which lies on LHS of the s-plane,
(2k 1)
s k = e jk ; where k = +
2 2N
When N = 1; k = 1
(2 1)
s1 = e j1 ; where 1 = + =
2 2
s1 = e j = 1
Denominator: [s - (-1)] = (s+1)

10/5/2012 S. THAI SUBHA CHAPTER-IV 35

How to obtain the poles(denominator)


of the transfer function?
( 2k 1)
s k = e j k ; where k = +
2 2N
When N = 2; k = 1, 2
( 2 1) 3
s 1 = e j1 ; where 1 = + =
2 4 4
s 1 = 0 . 707 + j0 . 707
( 4 1) 5
s 2 = e j 2 ; where 2 = + =
2 4 4
s 2 = 0 . 707 j0 . 707

Den. [s - (-0.707+j0.707)] [s - (-0.707-j0.707)]


= (s2+1.414s+1)
10/5/2012 S. THAI SUBHA CHAPTER-IV 36

18
10/5/2012

List of Butterworth polynomials:


N Denominator of H(s)
1 (s+1)
2 s 2 + 2s + 1
3 (s+1)(s2+s+1)
4 (s2+0.76537s+1)(s2+1.8477s+1)

10/5/2012 S. THAI SUBHA CHAPTER-IV 37

For the given specifications design an analog


Butterworth filter,
0.9 H ( j) 1, for 0 0.2
H( j) 0.2, for 0.4

Solution:
p = 0.2; s = 0.4 0.9

1
= 0 . 9 = 0 .4843
1 + 2
1 0.2
= 0 . 2 = 4 .899
2
1+
10/5/2012 S. THAI SUBHA CHAPTER-IV
0.2 0.4 38

19
10/5/2012


log
N 3.34
s
log

p
N=4

1
H(s) =
(s + 0.76537s + 1)(s 2 + 1.8477s + 1)
2

10/5/2012 S. THAI SUBHA CHAPTER-IV 39

Find the cut-off frequency:


p
c = 1 = 0.24
N

obtain the transfer function H(s), by substituting s


by s = s
c 0.24
1
H(s) =
s 2 s s
2
s
+
0.76537
+ 1 + 1.8477 + 1
0.24 0.24 0.24 0.24
0.323
H(s) =
(s 2 + 0.577s + 0.0576 2 )(s 2 + 1.393s + 0.0576 2 )
10/5/2012 S. THAI SUBHA CHAPTER-IV 40

20
10/5/2012

Design an analog Butterworth filter that has a -2dB


passband attenuation at a frequency of 20rad/sec an
atleast -10dB stopband attenuation at 30rad/sec.
Solution:

100.1 s 1
log 0.1
N 10 p 1 3.37 N = 4

log s

p

10/5/2012 S. THAI SUBHA CHAPTER-IV 41

1
H(s) =
(s + 0.76537s + 1)(s 2 + 1.8477s + 1)
2

p
c = = 21.3868
(10 0.1 p
1) 1
2N

obtain the transfer function H(s), by


substituting s by s = s
c 21.3868

0.20921 10 6
H(s) = 2
(s + 16.3686s + 457.394)(s 2 + 39.5176s + 457.394)
10/5/2012 S. THAI SUBHA CHAPTER-IV 42

21
10/5/2012

Ex. 5.32RB: Design Butterworth filter using the


impulse invariance method for the following
specifications: 0.8 H(e j ) 1, 0 0.2

H(e j ) 0.2, 0.6


Solution:
Given, 1
= 0 . 8 = 0 . 75
1 + 2
1
= 0 . 2 = 4 . 899
1 + 2
s = 0.6rad; p = 0.2rad; Assume T = 1sec.
s s T s 0.6
= = = =3
p p T p 0.2
10/5/2012 S. THAI SUBHA CHAPTER-IV 43

4.899
log log
N
0.75
1.71
s log 3
log

p
N=2
For N = 2, the transfer function of normalized Butterworth
filter is, 1
H(s) =
s 2 + 2s + 1

10/5/2012 S. THAI SUBHA CHAPTER-IV 44

22
10/5/2012

Obtain cut-off frequency, p 0 .2


c = 1 = 1 = 0.231
( ) N
(0.75) N
H a (s) = H (s) s s
c

0.5266
=
s 2 + 1.03s + 0.5266
0.5266
=
(s + 0.51 + j0.51)(s + 0.51 j0.51)
Applying partial fractions,
j0.516 j0.516
Ha (s) =
s (0.51 j0.51) s (0.51+ j0.51)
10/5/2012 S. THAI SUBHA CHAPTER-IV 45

Using impulse invariance method,


N N
ck ck
If H a (s) = , then H( z) = p T 1
k =1 s p k k =1 1 e z k

j0.516 j0.516
H(z ) = 0.51 j0.51 1
0.51+ j0.51 1
1 e z 1 e z
j0.516 j0.516
= 0.51 j0.51 1
0.51 j0.51 1
1 e e z 1 e e z
j0.516(1 e e z ) j0.516(1 e 0.51e j0.51z 1 )
0.51 j0.51 1
=
(1 0.6e j0.51z 1 )(1 0.6e j0.51z 1 )
j0.516 - j0.516e-0.51e j0.51z 1 j0.516 + j0.516e-0.51e j0.51z 1
=
1 + 0.36e - j0.51e j0.51z 2 0.6e j0.51z 1 0.6e j0.51z 1
10/5/2012 S. THAI SUBHA CHAPTER-IV 46

23
10/5/2012

j0.3096[0.873 + j0.488]z 1 j0.3096[0.873 j0.488]z 1


=
[ ]
1 0.6 e - j0.51 + e j0.51 z 1 + 0.36e j0.51e j0.51z 2

0.3022
H(z) =
1 - 1.047z -1 + 0.36z 2

10/5/2012 S. THAI SUBHA CHAPTER-IV 47

Ex. 5.33: Design a Butterworth filter using the bilinear


transformation for the above problem.
Solution:
s = 0.6rad; p = 0.2rad. Assume T = 1sec .
Prewarping the frequencies we get,
s p
s = 2 tan = 2.752; p = 2 tan = 0.6498
2 2
1 1
= 0 . 8 = 0 . 75 ; = 0 . 2 = 4 .899
2
1+ 1 + 2
1 s
= = 4 . 235
k p
10/5/2012 S. THAI SUBHA CHAPTER-IV 48

24
10/5/2012

4.899
log log
N
0.75
1.3
1 log(4.235)
log
k
N=2
For N = 2, the transfer function of normalized Butterworth filter is,

1
H(s) =
s 2 + 2s + 1

10/5/2012 S. THAI SUBHA CHAPTER-IV 49

Obtain cut-off frequency, = p = 0.2 = 0.75rad / sec


c 1 1
( ) N
(0.75) 2

H a (s) = H(s) s s
c

0.5625
= 2
s + 1.06s + 0.5625

For a bilinear transformation,


H(z) = H a (s) s = 2 1 z 1 ;
T 1+ z 1

Assume T = 1sec.
10/5/2012 S. THAI SUBHA CHAPTER-IV 50

25
10/5/2012

0.5625(1 + z -1 ) 2
H (z) =
4(1 z -1 ) 2 + 2.12(1 z -2 ) + 0.5625(1 + z -1 ) 2
0.084(1 + z -1 ) 2
=
1 1.028z -1 + 0.3651z -2

10/5/2012 S. THAI SUBHA CHAPTER-IV 51

Design of Chebyshev filter:


Order of the filter:
cosh -1
N

cosh -1 s

p
Values of a and b minor axis and major axis
respectively,

a = p
[ 1
N
1
N ]
; b = p
[ 1
N + N
1
]
2 2
0.1 p
where, = -1 + -2 + 1; = 10 1

10/5/2012 S. THAI SUBHA CHAPTER-IV 52

26
10/5/2012

Calculate the poles of Chebyshev filter which lie on an


ellipse by using the formula,
Sk = a cos k + jb sin k ; k = 1,2,...N
2k 1
where, k = + ; k = 1,2,...N
2 2 N
Find the denominator polynomial of the transfer function
using the above poles.

10/5/2012 S. THAI SUBHA CHAPTER-IV 53

The numerator value of the transfer function depends


on the value of N.
For odd N, sub. s = 0 in the denominator polynomial & find
the value which is the numerator of the transfer function.
For even N, sub. s = 0 in the denominator polynomial &
divide the value by 1 + 2 which is the numerator of the
transfer function.

10/5/2012 S. THAI SUBHA CHAPTER-IV 54

27
10/5/2012

Ex. 5.34: Design a Chebyshev filter for the following


specification using (a) Bilinear transformation (b) impulse
invariance method. 0.8 H (e j ) 1, 0 0.2

H(e j ) 0.2, 0.6


Solution: (a). Using bilinear transformation
s = 0.6rad; p = 0.2rad. Assume T = 1sec .
Prewarping the frequencies,
s
s = 2 tan = 2.752; p = 2 tan p = 0.6498
2 2
1 1
= 0 . 8 = 0 . 75 ; = 0 . 2 = 4 .899
2
1+ 1 + 2
1 s
= = 4 . 235
k p
10/5/2012 S. THAI SUBHA CHAPTER-IV 55


cosh -1
N = 2.564 = 1.208
2.122
cosh -1 s

p
N=2
To find a & b:

= -1 + -2 +1 = 3

a =
[
p
N
1
N
1

= 0.3752
]
2

b = p
1
[
N + N
1

= 0.75
]
2
10/5/2012 S. THAI SUBHA CHAPTER-IV 56

28
10/5/2012

To find the poles:


s k = a cos k + jb sin k ; k = 1,2,...N
2k 1
where, k = + ; k = 1,2,...N
2 2 N
3
1 = + = = 135;
2 4 4
3 5
2 = + = = 225.
2 4 4
s1 = 0.2653 + j0.53 & s 2 = 0.2653 j0.53
Denominator of H(s):
(s + 0.2653 j0.53)(s + 0.2653 + j0.53)
= (s + 0.2653) + (0.53)
2 2
10/5/2012 S. THAI SUBHA CHAPTER-IV 57

For even N, sub. s = 0 in the denominator polynomial & divide


the value by 1 + 2 which is the numerator of the transfer
function.
(s + 0.2653 )
2 2
+ (0 .53 )
s =0
Den . polynomial :
2
1+

10/5/2012 S. THAI SUBHA CHAPTER-IV 58

29
10/5/2012

= -1 + -2 +1 = 3
10/5/2012 S. THAI SUBHA CHAPTER-IV 59

10/5/2012 S. THAI SUBHA CHAPTER-IV 60

30
10/5/2012

0.263
H (s) =
(s + 0.257 + j0.515)(s + 0.257 j0.515)
Applying partial fractions,
j0.257 j0.257
H (s) =
(s + 0.257 + j0.515) (s + 0.257 j0.515)
N N
ck ck
If H a (s) = , then H (z) = p k T 1
k =1 s p k k =1 1 e z

P1 = 0.257 j0.515
P2 = 0.257 + j0.515
10/5/2012 S. THAI SUBHA CHAPTER-IV 61

j0.257 j0.257
H (z) =
0.257 j0.515 1 0.257 j0.515 1
1 e e z 1 e e z

=
[
j0.257 1 e 0.257 j0.515 1
e ] [
z j0.257 1 e 0.257 e j0.515 z 1 ]
[ ][
1 0.77e j0.52 z 1 1 0.77e j0.52 z 1 ]
j0.515 1 j0.515 1
j0.198e z + j0.198e z
= 2 1
1 + 0.5929z 1.34z

=
[ ]
j0.198z 1 e j0.515 e j0.515 j0.198z 1 [2 j sin 0.52]
=
1 + 0.5929z 2 1.34z 1 1 + 0.5929z 2 1.34z 1
0.1967z 1
H(z) =
1 + 0.5929z 2 1.34z 1

10/5/2012 S. THAI SUBHA CHAPTER-IV 62

31

You might also like