Professional Documents
Culture Documents
Introduction
Let’s see how we can implement a digital filter (processor) if its H(z) is given?
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
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!
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 10
.2
z1
10
.21
z 10
.21
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
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
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 2r )
1 2a(cos )e j 2r a 2e j 4r
How do we calculate the amplitude response
| H (e j 2r ) | and H (e j 2r ) ?
How the distance between the pole and the unit circle influence |H| and
H ?
t
Integrator y (t ) x( )d a simple system
0
system input
Output
1. Rectangular Integration
t t0 t t
y(t ) x( )d x( )d x( )d y(t 0 ) x( )d
0 0 t0 t0
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 ])
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
dicretetime
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
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
Derivation:
(1) Impulse Response of analog filter
m
ha (t ) L ( H a ( s)) k i e sit
1
i 1
(3) Characteristics
(1) H ( z ) z e jT H a ( j ) when T 0
frequency response of digital filter
(2) T 0 H ( z ) z e jT H a ( j )
z-transfer function of digital filter T
(5) Design Equation
G
H ( z) Z {[ L1 ( H a ( s ) X a ( s ))] t nT }
X ( z)
special case X(z)=1, Xa(s) = 1 (impulse)
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
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 : eT 1 T , e2T 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
eT 0.7304 , e2T 0.5335
H (1) 1.0745 good enough
jT
2
(3) | H a ( j ) | versus | H (e )| : T 0.31416 sec ond
20
Using normalized frequency r f / f s / s
1
ya ( nT ) ya (t ) |t nT L1[ 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.
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
~ ~
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 j1T ) 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!
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!
* 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 , j1 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
(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
1. Construction Mechanism
(1) From an analog low-pass filter Ha(s)
s 2 c 2
to analog bandpass filter H a ( )
sb
s 2 c 2
i.e., replace s by to form a bandpass filter
sb
In the low pass filter
1
For example H a ( s) low-pass
s 1
1
band-pass
s 2 c 2
1
sb
After Replacement
2 c 2 2 c 2
Ha ( ) Ha ( j )
jb 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
sb 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
sb (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
Cb
with
C 2 c
2
B2 2
C c
2
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.
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.
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.
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:
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)
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.
So for our 3rd-order Butterworth Low Pass Filter with a corner frequency of 45.2Hz, C = 360nF
and R = 10kΩ