You are on page 1of 42

Chapter 9 Analysis and Design of Digital Filter

Introduction

What designs have we done in this course?


What do we mean by filters here?
What do we mean by filters design?
Given specifications (requirements) => H(z)

Let’s see how we can implement a digital filter (processor) if its H(z) is given?

Structures of Digital Processors

1. Direct-Form Realization
r

Y ( z)
L z i
i

H ( z)   i 0
m
1 k j z j
X ( z)
j 1
r m
 y (nT )   Li x(nT  iT )  k j y (nT  jT )
i 0 j 1

The function is realized!


What’s the issue here?

Count how many memory elements


we need!

Can we reduce this number?


If we can, what is the concern?
r
 Li z  i  r  1
H ( z)  i 0
m
   Li z  i  m
1   k j z i  1   k j z  j
i 0

j 1 H1 ( z ) j 1
 
H 2 ( z)
 Y ( z)  H ( z) X ( z)  H1 ( z) H 2 ( z) X ( z)

Denote V ( z )  H 2 ( z) X ( z)  Y ( z)  H1 ( z)V ( z)
Implement H2(z) and then H1(z) ?

Why H2 is implemented?
(1)
V ( z)  X ( z)  k1z 1V ( z)    km z mV ( z)
(2)
(1  k1 z 1    k m z  m )V ( z )  X ( z )
1
V ( z)  m
X ( z)
1  k j z j
j 1

H2 is realized!

Can you tell why H1 is realized?

What can we see from this


realization? Signals at A j and B j : always the same
 Direct Form II Realization
1  0.3z 1  0.6 z 2  0.7 z 3
Example H ( z ) 
(1  0.2 z 1 )3
1  0.3z 1  0.6 z 2  0.7 z 3
Solution: H ( z ) 
1  0.6 z 1  0.12 z  2  0.008 z  3

Important: H(z)=B(z)/A(z) (1) A: 1+…. (2) Coefficients in A: in the feedback channel

2. Cascade Realization
Factorize 1  0.3z 1  0.6 z 2  0.7 z 3  (1  a1 z 1 )(1  a 2 z 2 )(1  a3 z 3 )
1  0.3z 1  0.6 z 2  0.7 z 3 1  a1 z 1 1  a 2 z 1 1  a3 z 1
H ( z)    
(1  0.2 z 1 ) 3 10
.2
z1
10
.21
z 10
.21
z
H (1) ( z ) H ( 2) ( z ) H ( 3) ( z )

General Form

i 1 (1  ai z 1 ) j 1 (1  b j z 1 )(1  b j z 1 )
N1 N2 * *
M
H ( z )  kz
 (1  ck z 1 )l 1 (1  d l * z 1 )(1  d l * z 1 )
D 1 D 2
k 
 
1  
 
1 qi z 1 1 (b j  b j * ) z 1  b j b j * z 2
1 c k z 1 1 ( d l  d l * ) z 1  d l d l * z 2

Apply Direct II for each!

3. Parallel Realization (Simple Poles)

M D1
1 D2
1  el z 1
H ( z )   Ai z i   Bk 1
  Cl
i 0
   k 1 1 C z l 1 (1  d l z 1 )(1  d l z 1 )
*
k    
If r  m realize the realize the complex
real poles congugate poles

Example 9-1
(1  z 1 )3
H ( z) 
1 1
(1  z 1 )(1  z 1 )
2 8
cascade and parallel realization!
Solution:

(1) Cascade:
1  z 1 1  z 1
H ( z)  (1  z 1 )
1 1
(1  z 1 ) (1  z 1 )
2 8

(2) Parallel
(1  z 1 )3 ( z  1)3
H ( z)  
1 1 1 1 1 1
(1  z )(1  z ) z ( z  )( z  )
2 8 2 8
In order to make deg(num)<deg(den)
H ( z) ( z  1) 3 Partial-Fraction
 Expansion for s
z 1 1
z 2 ( z  )( z  )
2 8
A B C D
 2  
z z z 1/ 2 z 1/ 8

z 2 ( z  1)3 (1)3
A  lim zH ( z )  2   16
z 0 z ( z  1 / 2)( z  1 / 8) z  0 ( 1 )( 1 )
2 8
H ( z) ( z  1)3 4
C  lim ( z  1 / 2)  lim 2 
z 1 / 2 z z 1 / 2 z ( z  1 / 8) 3
H ( z) ( z  1)3 343
D  lim ( z  1 / 8)  lim 2 
z 1 / 8 z z 1 / 8 z ( z  1 / 2) 3

z = anything other than 0, ½, 1/8, 1 B = -112


For example, z=2

A H ( z) 13 4
lim H ( z )  lim(  B)  
z 0 z 0 z z 3 15 45
4 
lim zH ( z )  lim( A  Bz ) 2 8
z 0 z 0 A  16
  4
d (H ( z) z) z2 4
lim B
z 0 dz C  4/3
  8 / 9
  z
1 3 / 2
d  ( z  1) 3
 2
 B  lim 
z  0 dz 1 1  D

 343 / 3 343 8

 ( z  )( z  )  1
 2 8  z 15 / 8 3 15
 112 8
4 8 343 8
B  2[
4   ]  112
45 9 3 15
 j
Example -2: System having a complex conjugate pole pair at z  ae

Transfer function
z2 1
H ( z)  
( z  ae  j )( z  ae  j ) (1  ae j z 1 )(1  ae  j z 1 )
z2 1
 2 
z  2a(cos  ) z  a 2 1  2a(cos  ) z 1  a 2 z  2

1
H (e j 2r ) 
1  2a(cos )e  j 2r  a 2e  j 4r
How do we calculate the amplitude response
| H (e j 2r ) | and H (e j 2r ) ?
How the distance between the pole and the unit circle influence |H| and
H ?

How the distance between the pole


and the unit circle influence H ?
1 a

How the pole angle  influence


H and H ?

See Fig. 9-7


Discrete-Time Integration

A method of Discrete-time system Design: Approximate continuous-time system

t
Integrator y (t )   x( )d  a simple system
0
  system input
Output

Discrete-time approximation of this system: discrete-time Integrator

1. Rectangular Integration
t t0  t t
y(t )   x( )d   x( )d   x( )d  y(t 0 )   x( )d
0 0 t0 t0

change of y from t0 to t : y(t0 , t )

t = nT, t0 = nT- T
nT
 y(nT )  y(nT  T )   x( )d
nT T

 y(nT  T )  y(nT  T , nT )
Constant (  [nT  T , nT ])

T small enough => x( )  x(nT  T )


nT nT
 x( )d   x(nT  T )d
nT T nT T
nT
y(nT) : System output  x(nT  T )  d Constant
nT T
x(nT) : System input , to be
integrated  Tx(nT  T )

y (nT )  y (nT  T )  Tx (nT  T )


A discrete-time integrator: rectangular integrator

 Y ( z )  z 1Y ( z )  z 1TX ( z )
Y ( z) z 1T
 H ( z)  
X ( z ) 1  z 1
2. Trapezoidal Integration Constants
nT nT x(nT  T )  x(nT )
nT T
x( )d  
nT T 2
d

T
 ( x(nT  T )  x(nT ))
2
T T
y (nT )  y (nT  T )  x(nT )  x(nT  T )
2 2
T
or y ( nT )  y ( nT  T )  Tx ( nT  T )  [ x(nT )  x(nT  T )]
2

difference
between
two
dicretetime
int egrators

T T
 Y ( z )  z 1Y ( z )  X ( z )  z 1 X ( z )
2 2
T 1  z 1
H ( z) 
2 1  z 1
3. Frequency Characteristics

3.1 Rectangular Integrator


z 1T
H r ( z) 
1  z 1
jT Te  jT Te  jT / 2 Te  jT / 2
Frequency Response H r (e )  
1  e  jT e jT / 2  e  jT / 2 2 j sin T / 2
j 2r Te jr 
  s  2
1 

H r (e )  T 
Or
2 j sin r  /  s  r 
 
  T  2r 
 
Amplitude Response
T 1
Ar (r )  0r (sin r  0)
2 sin r 2
Phase Response
 1
 r (r )  e  jr  j  r  0r
2 2
3.2 Trapezoidal Integrator
T 1  z 1
H t ( z) 
2 1  z 1
Frequency Response
j 2r T 1  e  j 2r T e jr  e  jr
H t (e )  
2 1  e  j 2r 2 e jr  e  jr
T 2 cos r T cos r
 
2 2 j sin r 2 j sin r
T cos r 1
Amplitude: At (r )  0r
2 sin r 2
Phase:
 1  sin r  0 
 t (r )   0r   
2 2  cos r  0 
3.3 Versus Ideal Integrator
Ideal (continuous-time ) Integrator
1
H ( j )    2f  2rf s
j
1
H (r ) 
j 2rf s
1 
A(r )  (r )  
2rf s 2
when T=1 second (Different plots and relationships will result if T is different.)
 Low Frequency Range T  1 (2r  1)
(Frequency of the input is much lower than the sampling frequency:
It should be!)
cos r 1 T 1 1
  At (r )  
sin r r 2 r 2rf s
1 1 T 1
  Ar (r )  
sin r r 2r 2rf s

 High Frequency: Large error (should be)

Example 9-4 Differential equation (system)


dy
 x(t )  y (t )
dt
Determine a digital equivalent.

Solution
(1) Block Diagram of the original system
(2) An equivalent
(3) Transfer Function Derivation

T 1  z 1
Y ( z)  ( X ( z )  Y ( z ))
2 1  z 1
 T 1  z 1  T 1  z 1
1   Y ( z)  X ( z)
  1 
 1
 2 1 z  2 1 z
Y ( z) T (1  z 1 )
H ( z)  
Z ( z ) ( T  2)  ( T  2) z 1

Infinite Impulse Response (IIR) Filter Design


(Given H(s)  Hd(z) )
A Synthesis in the Time-Domain: Invariant Design
1. Impulse – Invariant Design
(1) Design Principle
(2) Illustration of Design Mechanism (Not General Case)
Assume:
(1) Given analog filter (Transfer Function)
m
Ki
H a ( s)   (a special case)
i 1 s  si
(2) Sampling Period T (sample ha(t) to generate ha(nT))

Derivation:
(1) Impulse Response of analog filter
m
ha (t )  L ( H a ( s))   k i e  sit
1

i 1

(2) ha(nT): sampled impulse response of analog filter


m m
ha (nT )   ki e  si nT   ki (e  si T ) n
i 1 i 1

(3) z-transform of ha(nT)

Sampled impulse response of analog filter


  m
Z (ha (nT ))   ha (nT ) z n
  k i (e  siT ) n z  n
n 0 n  0 i 1
m  m m
1 ki
  k i  ( e  si T z )  n   k i 
i 1 n 0 i 1 1  e  siT z 1 i 1 1  e  siT z 1

(4) Impulse-Invariant Design Principle


h(nT )  ha (nT )  Z (h(nT ))  Z (ha (nT ))

Digital filter is so designed that its impulse response h(nT)
equals the sampled impulse response of the analog filter ha(nT)

Hence, digital filter must be designed such that


m
ki
z-transfer function Z (h(nT ))  Z (ha (nT ))    s i T 1
i 1 1  e
H (z ) of the digital z
filter. Of course, m
ki
the z-transfer
 H ( z)    s i T 1
i 1 1  e
function of its z
impulse response.
T 0
(5) TZ (h(nT ))  L(ha (t )) (scaling)
z  e jT
m
ki
=> H ( z )  T  si T
i 1 1  e z 1

(3) Characteristics
(1) H ( z ) z  e jT  H a ( j ) when T 0

frequency response of digital filter

(2) T 0 H ( z ) z  e jT  H a ( j )

(3) Design: Optimized for T = 0


Not for T  0 (practical case) (due to the design principle)
(4) Realization: Parallel
1
(5) Design Example H a (s)  T  2s
s 1
Solution: m  1, K1  1, s1  1
m
Ki 1 2
H ( z)  T   siT 1
 2 
i 1 1  e z 1  e 2 z 1 1  e 2 z 1
2. General Time – Invariant Synthesis
(1) Design Principle
(2) Derivation
Given: Ha(s) transfer function of analog filter
Xa(s) Lapalce transform of input signal of analog Filter
T sampling period
Find H(z) z-transfer function of digital filter

(1) Response of analog filter xa(t)


ya (t )  L1[ H a (s) X a (s)]

(2) ya(nT) sampled signal of analog filter output


ya (nT )  [ L1[ H a (s) X a (s)] t  nT
(3) z-transform of ya(nT)
Z[ ya (nT )]  Z{[L1[ H a (s) X a (s)] t  nT }
(4) Time – invariant Design Principle
y(nT )  ya (nT )  Z ( y(nT ))  Z[ ya (nT )]

Digital filter is so designed
that its output equals the sampled
output of the analog filter

Incorporate the scaling :


Z [ y (nT )]  G
 Z [ ya (nT )]
 
H ( z) X ( z) G T


z-transfer function of digital filter T
(5) Design Equation
G
H ( z)  Z {[ L1 ( H a ( s ) X a ( s ))] t  nT }
X ( z)
special case X(z)=1, Xa(s) = 1 (impulse)

=> H ( z )  GZ{[ L1 ( H a (s))] t nT }


(6) Design procedure
A: Find L1[ H a (s) X a (s)]  ya (t ) (output of analog filter)
B: Find ya (nT )  ya (t ) t  nT
C: Find Z ( ya (nT ))
D: H ( z)  GZ ( ya (nT ))
0.5( s  4)
Example 9-5 H a ( s) 
( s  1)( s  2)
Find digital filter H(z) by impulse - invariance.
Solution of design:
(1) Find L1[ H a (s) X a (s)]  ya (t )
X a ( s)  1
0.5( s  4) 1.5 1
H a ( s)   
( s  1)( s  2) s  1 s  2
ya (t )  L1[ H a ( s) X a ( s)]  1.5et  e2t

(2) Find ya (nT )  ya (t ) t  nT


ya (nT )  1.5(eT )n  (e2T )n

(3) Find Z ( ya (nT ))


1.5 1
Z ( ya (nT ))  T 1
  2T 1
1 e z 1 e z
(4) Find z-transfer function of the digital filter

H ( z )  GZ ( ya ( nT ))
 1.5 1 
 G  T 1
  2T 1 
1  e z 1 e z 
use G = T
1.5T T
H ( z)  T 1
  2T 1
1 e z 1 e z
(5) Implementation

Characteristics

(1) Frequency Response equations:


analog and digital
0.5( j  4)
Analog : H a ( j ) 
(1  j )(2  j )
jT 1.5T T
Digital : H (e ) 
1  eT e jT 1  e 2T e jT
(2) dc response comparison (   0)

0.5  4
Analog: H a ( 0)  1
1 2
1.5T T
Digital: H (e )  H (1)  
j0
T
1 e 1  e  2T
Varying with T (should be)

T  0 : eT  1  T , e2T  1  2T
1.5T T
H (1)   1
1  (1  T ) 1  (1  2T )
2
T  0 : for example T   0.31416s ( f s  20)
20
eT  0.7304 , e2T  0.5335
H (1)  1.0745 good enough
jT
2
(3) | H a ( j ) | versus | H (e )| : T   0.31416 sec ond
20
Using normalized frequency r  f / f s   / s

 0.25488  0.06983 cos 2r


| H (e j 2r ) |
10 2.74925  3.51275 cos 2r  0.77932 cos 4r
16   2 2
| H a ( j )  0.5   2f  2f s r  r
4  5 2   4 T
 H a (r )
(4) H versus H a

(5) Gain adjustment when T  0


T  0 => frequency response inequality
adjust G => H (e jT )  H a ( j ) at a special 
for example   0
jT
If G = T = 0.3142 => H (e ) | 0  1.0745
If selecting G = T/1.0745 => H (e jT ) | 0  1
3. Step – invariance synthesis
1 1
X a ( s)  X ( z) 
s 1  z 1
G
H ( z)  Z {[L1[ H a ( s ) X a ( s )]] |t  nT }
X ( z)
1
 H ( z )  G (1  z 1 ) Z {[L1[ H a ( s )]] |t  nT }
s
0.5( s  4)
Example 9-6 H a ( s )  . Find its step-invariant equivalent.
( s  1)( s  2)
Solution of Design
1 0.5( s  4) 1 1.5 0.5
H a ( s)    
s s( s  1)( s  2) s s  1 s  2

1
ya ( nT )  ya (t ) |t  nT  L1[ H a ( s )] |t  nT  1  1.5e  nT  0.5e  2 nT
s
1
H ( z )  G (1  z ) Z [ ya ( nT )]
1 1.5 0.5
 G (1  z 1 )( 1
  T 1

1 z 1 e z 1  e  2T z 1
Comparison with impulse-invariant equivalent.

Design in the Frequency Domain --- The Bilinear z-transform


1. Motivation (problem in Time Domain Design)
x (t ) xs ( nT )
 

X( f ) Xs( f )   Cn X ( f  nf s )
n  
 Cn X ( f )  [C1 X ( f  f s )  [C1 X ( f  f s )]

Introduced by sampling, undesired!

x(t) bandlimited ( X ( f  f s / 2)  0)

X ( f )  Xs( f )

fs
for | f |
2

X ( f )  X s ( f  fs )
f
for | f | s
2

Consider digital equivalent of an analogy


filter Ha(f): H a ( j )  H a ( j 2f ) )

Ha(f): bandlimited => can find a Hd(z)


Ha(f): not bandlimited => can not find a Hd(z) Such that H d (e jT )  H a ( )
2. Proposal: from  axis to 1 axis
    1  0.5s (  s : given sampling frequency)
(s plane to s1 plane)
Observations: (1) Good accuracy in low frequencies
(2) Poor accuracy in high frequencies
(3) 100% Accuracy at   1   *
a given specific number such that 0.01  s
Is it okay to have poor accuracy in high frequencies? Yes! Input is bandlimited!
What do we mean by good, poor and 100% accuracy?
1
Assume (1) H a ( )  (originally given analogy filter)
j  1
(2) The transform is   0.915244 tan 1
1 1 ~
Then, is a function of 1 . Denote  H a ( 1 ) .
j 0.915 tan  1  1 j 0.915 tan  1  1
Good accuracy:
1 1 1 ~
H a (  0.3)     H a (1  0.3)
j 0.3  1 j 0.915 tan( 0.3)  1 j 0.28  1
Poor Accuracy
1 1 1 ~
H a (  1.5)     H a (1  1.5)
j1.5  1 j 0.915 tan(1.5)  1 j12.9  1
100% Accuracy (Equal)
1 1 1 ~
H a (  0.5)     H a (1  0.5)
j 0.5  1 j 0.915 tan( 0.5)  1 j 0.5  1

~ ~
Is H ( 1 ) bandlimited? That is, can we find a 1 such that H ( 1 ) =0?
Yes, 1   / 2 .  We have no problem to find a digital equivalent
~
H d (e j1T )  H a (1 ) without aliasing!
Let’s use  as a number (for example 0.2) representing any low frequency,
(L)

~
Then, because H a (  0.2) is a good approximation of H a (  0.2) ,
( L) ( L)

H d (e j ( 0.2 )T
)  H a ( ( L )  0.2)
( L)
should be a good approximation.
A digital filter can thus be designed for an analogy filter H a ( ) which is not bandlimted!

Two Step Design Procedure:


Given: analogy filter H a (s)
~
(1) Find an bandlimited analogy approximation ( H a (s1 ) ) for H a (s)
~
(2) Design a digital equivalent ( H d ( z )) for the bandlimited filter H a (s1 ) .
~
Because of the relationship between ( H a (1 ) ) for H a ( ) ,
H d (z ) is also digital equivalent of H a (s) .
The overlapping (aliasing) problem is avoided!
The designed digital filter can approximate H a ( ) (for 1 and  take the
same value) at low frequency.
3.  axis to 1 axis (s plane to s1 plane) transformation
s
Requirement :     1  (  s is given sampling frequency.)
2
Proposed transformation : Variable in 1
Variable in    domain
domain    T
  C tan  1   C tan 1
1 2 2
 s 
2 
Effect of C: Constant
We want the transformation map
  r (for example, r  100rad / s ) to 1   r ( * )
 rT  rT
=>  r  C tan  C   r cot
2 2
i.e. when the sampling period T is given, C is the only parameter
which determines what  will be mapped into 1 axis with the
same value.
c 2
Example: H a ( s)  2
s  2 c s   c 2
c 2
H a ( j )  not bandlimited
( c 2   2 )  j 2 c

If we want to map   2  100 to 1  2  100


 r  200
200T
C  200 cot
2
1
Hence, for any given T or  s  2
T
T 200T T
H a ( jC tan 1 )  H a (( j 200 cot ) tan 1 )
2 2 2
c 2

1T 1T
( c  C 2 tan 2 )  j 2C tan c
2

2 2
s 
is bandlimited as a function of 1 by | 1 | 
2 T
~  T
H a (1 )  H a ( jC tan 1 )  H a ( j ) when 1   at low frequencies.
2
~
Further H a (1   r  200 )  H a ( j  j r  j 200 )
Exactly holds!

How to select r or sampling frequency s at which 1   ?


 rT
(1) should be small?
2
1 2  rT r
why? T    1    1 or  r   s ,
f s s 2 s
(The accuracy should be good at low frequencies)

(2) When r is given or determined by application, s should be large


enough such that r  s to ensure the accuracy in the frequency
range including r
 rT
When  1 :
2
2 2 1
C  r  since cot x  for small x.
 rT T x

4. Design of Digital Filter using bilinear z-transform


~
 A procedure: (1) H a ( j )  H a (1 )
 
(not bandlimited, (bandlimited,
original analog) analog)
~
or H a (s)  H a (s1 )
~
(2) H d ( z )  H a (s1 ) |es1T  z
 
(Transfer replace e s1T by z
function of
digital filter)

* Question: Can we directly obtain Hd(z) from Ha(s) ? Yes! (But how?)

 Bilinear z-transform
sin x e jx  e jx
Preparation : (1) tan x    j jx
cos x e  e jx
T
(2)   C tan 1
2
1T 1T
j j
1T e 2 e 2
Hence,   C tan  C( j) 1T 1T
2 j j
e 2 e 2
Replace j by s , j1 by s1 (   s / j   js, 1   js1 )
e s1T / 2  e  s1T / 2
 js   jC s T / 2
e 1  e  s1T / 2
e s1T / 2  e  s1T / 2 1  e  s1T
 s  C s T /2 C
e 1  e  s1T / 2 1  e  s1T

Replacees1T  z for digital filter


1  z 1
sC  direct transformation from s to z (bypass s1)
Bilinear z – 1  z 1
transformation
c 2
Example H a ( s)  2
s  2 c s   c 2
Digital Filter
c2
H d ( z) 
(1  z 1 ) 2 1  z 1
C2 1 2
 2 1
 c
2

(1  z ) 1 z
c

 c 2 (1  z 1 ) 2
 2
C (1  z 1 ) 2  2 c (1  z  2 )   c (1  z 1 ) 2
2

C: only undetermined parameter in the digital filter.


To determine C: (1) T (s )
(2) r (related to the frequency range of interest)
c 2
Example 9-7 H a ( s )  2
s  2 c s   c 2
c : break frequency
Take  r  c
Consider f c  500Hz (c  2  500)
1
f s  2000 Hz (T   0.0005 sec)
fs
 C determined => Hd(z) determined
0.292893  0.585786 z 1  0.292893 z 2
H d ( z) 
 1  0.171573 z  2

j 2r j 2r j 2r


 H d (e ) , | H d (e ) | , H d (e )
To compare the frequency response with the original analog filter Ha :
f s 4 f c
H a ( j )  H a ( j 2f )  H a ( j 2rf s )  H a ( j8rf c )
( replace s by j8rfc in H a ( s) )
 | H a | , H a
Too low fs => poor accuracy in fc.
Bilinear z-Transform Bandpass Filter

1. Construction Mechanism
(1) From an analog low-pass filter Ha(s)
s 2  c 2
to analog bandpass filter H a ( )
sb
s 2  c 2
i.e., replace s by to form a bandpass filter
sb
In the low pass filter
1
For example H a ( s)  low-pass
s 1
1
band-pass
s 2  c 2
1
sb

Why? Original low-pass


H a ( j )

Low => High Gain
High => Low Gain

After Replacement
  2  c 2  2  c 2
Ha ( )  Ha ( j )
jb b
 2  c 2  2 
high    => high => low gain
b b b
 2  c 2  c 2 / b
low   => high => low gain
b 
(2) From analog to digital
s 2  c 2 1  z 1
Replace s in H a ( ) by C
sb 1  z 1
 H d ( z 1 )
for example
1 1

s 2  c 2 C 2 (1  z 1 )2
1 1 2
 c 2
sb (1  z )
1 digital bandpass filter
1  z 1
b
1  z 1
2. Bilinear z-transform equation
Analog Low-pass Bandpass (analog)
s2  c
2

s 
s b
2
 1  z 1 
 c
2
C 1 
  1 z 
1  z 1 
C 
1  b
1  z 
C 2 (1  z 1 ) 2   c (1  z 1 ) 2
2


C b (1  z  2 )

C 2 (1  z 1 ) 2   c (1  z 1 ) 2
2
Direct Transformation

s (in low-pass) C b (1  z  2 )
 C 2   c 2  1
1  2 2 2 
z  z 2
C 2  c  C   c 
2


C b 1  z 2

1  Bz 1  z 2
s (in low-pass)  A
1  z 2
C 2  c
2
A
Cb
with
C 2  c
2
B2 2
C  c
2

3. How to select ( C,c ,b ) for bandpass filter


(design)
Important parameters of bandpass
(1) center frequency  c
(2) u upper critical frequency
(3) l low critical frequency

Selection of c for bandpass: c 2  ul

Design of ( C,c ,b )


 uT lT
We want  u  C tan , Also want l  C tan
2 2
one parameter C => impossible
 uT lT
 solution  c  C tan
22
tan
2 2
T T
 bandwidth  b  C tan u  C tan l
2 2
Hence, A and B can be determined to perform the transform.

4. Convenient design equation


 uT lT
C 2  C 2 tan tan
A 2 2
T T
C 2 (tan u  tan l )
2 2
T T
1  tan u tan l
 2 2
T T
tan u  tan l
2 2
why no C?
 uT  lT
C 2  C 2 tan tan
B2 2 2
T T
C 2  C 2 tan u tan l
2 2
T T
1  tan u tan l
2 2 2
T T
1  tan u tan l
2 2

1 tan x tan y cos( x  y ) T



1 tan x tan y cos( x  y ) cos( u   l )
 2 2
T
cos( u   l )
2
1 2
1  Bz  z
s A
In low-pass 1  z 2
1 1 1  z 2
 
Example :
s  1  Bz 1  z 2 A(1  Bz 1  z 2 )   (1  z 2 )
A 
1  z 2
5. In the normalized frequency
Reference frequency: sampling frequency fs (s )
 f  l f
ru  u  u rl   l
s fs s fs
1
2f u
 uT fs lT
=>   ru ,  rl
2 2 2
 A  cot  (ru  rl )

=>  B  2 cos  (ru  rl )
 cos  (ru  rl )

1  Bz 1  z 2
s => A
In low-pass 1  z 2
1
Example 9-9 Lowpass H a ( s) 
s 1
Transfer function of bandpass digital filter
1
H d ( z) 1
1  Bz  z  2
A 1
1  z 2
A and B? Determined by design requirements.
 f u  1000Hz
 sampling frequency fs = 5000Hz
 l
f  500 Hz
ru  f u / f s  0.2
 
rl  f l / f s  0.1
A  cot  (0.2  0.1)  3.0776835
 cot  (0.2  0.1)
B2  1.2360680
cot  (0.2  0.1)
1  z 2
 H ( z) 
4.0776835  3.8042261z 1  2.0776835z  2
H (e j 2r ) , | H (e j 2r ) | , H (e j 2r )
Butterworth Filter Design

In the previous filter tutorials we looked at simple first-order type low and high pass filters that
contain only one single resistor and a single reactive component (a capacitor) within their RC
filter circuit design.

In applications that use filters to shape the frequency spectrum of a signal such as in
communications or control systems, the shape or width of the roll-off also called the “transition
band”, for a simple first-order filter may be too long or wide and so active filters designed with
more than one “order” are required. These types of filters are commonly known as “High-order”
or “nth-order” filters.
The complexity or filter type is defined by the filters “order”, and which is dependant upon the
number of reactive components such as capacitors or inductors within its design. We also know
that the rate of roll-off and therefore the width of the transition band, depends upon the order
number of the filter and that for a simple first-order filter it has a standard roll-off rate of
20dB/decade or 6dB/octave.
Then, for a filter that has an nth number order, it will have a subsequent roll-off rate of 20n
dB/decade or 6n dB/octave. So a first-order filter has a roll-off rate of 20dB/decade
(6dB/octave), a second-order filter has a roll-off rate of 40dB/decade (12dB/octave), and a
fourth-order filter has a roll-off rate of 80dB/decade (24dB/octave), etc, etc.
High-order filters, such as third, fourth, and fifth-order are usually formed by cascading together
single first-order and second-order filters.
For example, two second-order low pass filters can be cascaded together to produce a fourth-
order low pass filter, and so on. Although there is no limit to the order of the filter that can be
formed, as the order increases so does its size and cost, also its accuracy declines.

Decades and Octaves


One final comment about Decades and Octaves. On the frequency scale, a Decade is a tenfold
increase (multiply by 10) or tenfold decrease (divide by 10). For example, 2 to 20Hz represents
one decade, whereas 50 to 5000Hz represents two decades (50 to 500Hz and then 500 to
5000Hz).
An Octave is a doubling (multiply by 2) or halving (divide by 2) of the frequency scale. For
example, 10 to 20Hz represents one octave, while 2 to 16Hz is three octaves (2 to 4, 4 to 8 and
finally 8 to 16Hz) doubling the frequency each time. Either way, Logarithmic scales are used
extensively in the frequency domain to denote a frequency value when working with amplifiers
and filters so it is important to understand them.

Since the frequency determining resistors are all equal, and as are the frequency determining
capacitors, the cut-off or corner frequency ( ƒC ) for either a first, second, third or even a fourth-
order filter must also be equal and is found by using our now old familiar equation:
As with the first and second-order filters, the third and fourth-order high pass filters are formed
by simply interchanging the positions of the frequency determining components (resistors and
capacitors) in the equivalent low pass filter. High-order filters can be designed by following the
procedures we saw previously in the Low Pass filter and High Pass filter tutorials. However, the
overall gain of high-order filters is fixed because all the frequency determining components are
equal.

Filter Approximations
So far we have looked at a low and high pass first-order filter circuits, their resultant frequency
and phase responses. An ideal filter would give us specifications of maximum pass band gain
and flatness, minimum stop band attenuation and also a very steep pass band to stop band roll-off
(the transition band) and it is therefore apparent that a large number of network responses would
satisfy these requirements.
Not surprisingly then that there are a number of “approximation functions” in linear analogue
filter design that use a mathematical approach to best approximate the transfer function we
require for the filters design.
Such designs are known as Elliptical, Butterworth, Chebyshev, Bessel, Cauer as well as many
others. Of these five “classic” linear analogue filter approximation functions only
the Butterworth Filter and especially the low pass Butterworth filter design will be considered
here as its the most commonly used function.

Low Pass Butterworth Filter Design


The frequency response of the Butterworth Filter approximation function is also often referred
to as “maximally flat” (no ripples) response because the pass band is designed to have a
frequency response which is as flat as mathematically possible from 0Hz (DC) until the cut-off
frequency at -3dB with no ripples. Higher frequencies beyond the cut-off point rolls-off down to
zero in the stop band at 20dB/decade or 6dB/octave. This is because it has a “quality factor”, “Q”
of just 0.707.
However, one main disadvantage of the Butterworth filter is that it achieves this pass band
flatness at the expense of a wide transition band as the filter changes from the pass band to the
stop band. It also has poor phase characteristics as well. The ideal frequency response, referred to
as a “brick wall” filter, and the standard Butterworth approximations, for different filter orders
are given below.

Ideal Frequency Response for a Butterworth Filter


Note that the higher the Butterworth filter order, the higher the number of cascaded stages there
are within the filter design, and the closer the filter becomes to the ideal “brick wall” response.
In practice however, Butterworth’s ideal frequency response is unattainable as it produces
excessive passband ripple.

Where the generalised equation representing a “nth” Order Butterworth filter, the frequency
response is given as:

Where: n represents the filter order, Omega ω is equal to 2πƒ and Epsilon ε is the maximum pass
band gain, (Amax). If Amax is defined at a frequency equal to the cut-off -3dB corner point
(ƒc), ε will then be equal to one and therefore ε2 will also be one. However, if you now wish to
define Amax at a different voltage gain value, for example 1dB, or 1.1220 (1dB = 20logAmax) then
the new value of epsilon, ε is found by:

 Where:
 H0 = the Maximum Pass band Gain,
Amax.
 H1 = the Minimum Pass band Gain.

Transpose the equation to give:


The Frequency Response of a filter can be defined mathematically by its Transfer
Function with the standard Voltage Transfer Function H(jω) written as:

 Where:
 Vout = the output signal voltage.
 Vin = the input signal voltage.
 j = to the square root of -1 (√-
1)
 ω = the radian frequency (2πƒ)

Note: ( jω ) can also be written as ( s ) to denote the S-domain. and the resultant transfer
function for a second-order low pass filter is given as:

Normalised Low Pass Butterworth Filter Polynomials


To help in the design of his low pass filters, Butterworth produced standard tables of normalised
second-order low pass polynomials given the values of coefficient that correspond to a cut-off
corner frequency of 1 radian/sec.

n Normalised Denominator Polynomials in Factored Form

1 (1+s)

2 (1+1.414s+s2)

3 (1+s)(1+s+s2)
4 (1+0.765s+s2)(1+1.848s+s2)

5 (1+s)(1+0.618s+s2)(1+1.618s+s2)

6 (1+0.518s+s2)(1+1.414s+s2)(1+1.932s+s2)

7 (1+s)(1+0.445s+s2)(1+1.247s+s2)(1+1.802s+s2)

8 (1+0.390s+s2)(1+1.111s+s2)(1+1.663s+s2)(1+1.962s+s2)

9 (1+s)(1+0.347s+s2)(1+s+s2)(1+1.532s+s2)(1+1.879s+s2)

10 (1+0.313s+s2)(1+0.908s+s2)(1+1.414s+s2)(1+1.782s+s2)(1+1.975s+s2)

Filter Design – Butterworth Low Pass


Find the order of an active low pass Butterworth filter whose specifications are given as: Amax =
0.5dB at a pass band frequency (ωp) of 200 radian/sec (31.8Hz), and Amin = 20dB at a stop band
frequency (ωs) of 800 radian/sec. Also design a suitable Butterworth filter circuit to match these
requirements.
Firstly, the maximum pass band gain Amax = 0.5dB which is equal to a gain of 1.0593(0.5dB =
20log A) at a frequency (ωp) of 200 rads/s, so the value of epsilon ε is found by:

Secondly, the minimum stop band gain Amin = 20dB which is equal to a gain of 10 (20dB =
20log A) at a stop band frequency (ωs) of 800 rads/s or 127.3Hz.
Substituting the values into the general equation for a Butterworth filters frequency response
gives us the following:
Since n must always be an integer ( whole number ) then the next highest value to 2.42 is n = 3,
therefore a “a third-order filter is required” and to produce a third-order Butterworth filter, a
second-order filter stage cascaded together with a first-order filter stage is required.
From the normalised low pass Butterworth Polynomials table above, the coefficient for a third-
order filter is given as (1+s)(1+s+s2) and this gives us a gain of 3-A = 1, or A = 2. As A = 1 +
(Rf/R1), choosing a value for both the feedback resistor Rf and resistor R1 gives us values
of 1kΩ and 1kΩ respectively, ( 1kΩ/1kΩ + 1 = 2 ).
We know that the cut-off corner frequency, the -3dB point (ωo) can be found using the
formula 1/CR, but we need to find ωo from the pass band frequency ωp then,
So, the cut-off corner frequency is given as 284 rads/s or 45.2Hz, (284/2π) and using the familiar
formula 1/CR we can find the values of the resistors and capacitors for our third-order circuit.
Note that the nearest preferred value to 0.352uF would be 0.36uF, or 360nF.

Third-order Butterworth Low Pass Filter


and finally our circuit of the third-order low pass Butterworth Filter with a cut-off corner
frequency of 284 rads/s or 45.2Hz, a maximum pass band gain of 0.5dB and a minimum stop
band gain of 20dB is constructed as follows.

So for our 3rd-order Butterworth Low Pass Filter with a corner frequency of 45.2Hz, C = 360nF
and R = 10kΩ

You might also like