Professional Documents
Culture Documents
1
What is a Digital Filter?
2
Desired features
3
Examples of filtering operations
Noise suppression
Bandwidth limiting
• communication
radio or TV signal transmitted over
specific channel has to have a limited
bandwidth to prevent interference with
neighbouring channels
Specific operations
• differentiation
• integration
• Hilbert transform
7
Linear time-invariant (LTI) digital filters.
Time-invariant:
xn yn
LTI xn-k LTI
Linear: defined
yn-k by the principle of linear superposition
10
Elements of a Digital Filter – Adders and Multipliers
Adders:
x 1n + yn=x1n+x2n
x2 n
Multipliers:
a
xn yn=axn
x alternative for multiplier
xn Z yn= xn+1
1/3
xn + yn
Order:
Z-1
number of second-order filter
delays &
advances
needed to Nonrecursive filter – output is a
function of only the input sequence
13
implement
Example: first-order recursive filter
xn + yn
Z-1
a
one delay
Example of feedback first-order
implemented in a
digital filter
slightly alternative
representation
16
Second method in time domain: unit-sample response
Linear convolution
∞
yn=
xk hn-k
k=- ∞
18
Causal LTI system
Impulse response:
hn = 0 for n <0
Thus
∞ ∞
Yn = =
xk hn-k hk xn-k
k=0
k=- ∞
19
Essentials of the z-transform
20
Essentials of the z-transform - convolution
Convolution
Indeed,
21
Transfer function of LTI
22
FIR and IIR filters
23
Poles and Zeros
The roots of the numerator polynomial in H(z) are known as the zeros, and
the roots of the denominator polynomial as poles. In particular, factorize
H(z) top and bottom:
24
Linear Digital Filter in Matlab
The format is
y = filter( b, a, x);
where
b = [b0 b1 b2 ... bM ]; a = [ 1 a1 a2 a3 ... aN ];
y = filter( b, a, [1 zeros(1,P)]);
Or step response,
y = filter( b, a, [ones(1,P)]);
25
z-transform and DTFT
DTFT
26
Frequency Response of LTI
Fourier transform of hk
where
Fourier transform of hk
Assume
where for
0 otherwise
Frequency response
29
Frequency Response of LTI
30
Frequency response of LTI
Transfer function:
Frequency response:
The complex modulus:
and argument:
linear phase term sum of the angles from the zeros/poles to 3u1nit
circle
Frequency response of LTI
Im(z)
Suppose we have a
system with 2 poles (o)
unit circle and 2 zeros (x)
X
We are going
around the unit
circle with
O O
-1 1
32
Frequency response of LTI
Im(z)
Transfer function:
unit circle
X
D1
C2
O O
-1 1
C1
D2 Frequency response:
X
C 1C 2
= D1D 2
33
Frequency response of LTI
Im(z)
35
Filter specification
• Low-pass
• High-pass
• Band-pass
• Band-stop
36
Ideal Low-pass Filter
37
Ideal High-pass Filter
38
Ideal Band-pass Filter
39
Ideal Band-stop Filter
40
Ideal Filters – Magnitude Response
41
Ideal Filters – Phase Response
Indeed,
Fourier Transform of
delay
42
Ideal Filters – Linear Phase Response
43
Linear / non-linear phase response
phase distortion
44
Ideal Filters – Linear Phase Response
46
Ideal Low- pass Filter Example
47
Filter Design
Let’s have a go …
48
Frequency response of LTI
Remember? Im(z)
Thus when 'is
unit circle close to' a pole, the
magnitude of the response
X rises (resonance).
D1
When 'is
C2 close to' a zero, the
magnitude falls (a null).
O O
-1 1
C1
D2 The phase response –
more difficult to get
X “intuition”.
49
Approximate filter design – rough guidelines
• One needs to put the poles within the unit circle to ensure stability
50
Approximate Low-pass filter
Rule 1: The closer to a pole, the higher the magnitude of the response
Rule 2: The closer to a zero, the lower the magnitude of the response
51
Approximate Low-pass filter
one pole
52
Approximate High-pass filter
53
Approximate High-pass filter
54
Alternative way: Low-pass to High-pass
in time domain
55
Bandpass and Resonator
56
Resonator
This filter is actually more a digital resonator than an bandpass filter; see
its frequency response for r = 0.9 and = /4 - it has a large magnitude
response around 0
57
Band-pass Filter
58
Band-pass Filter
a filter that
contains one or
several deeps/
notches in
its frequency
response
to eliminate 0
Frequencies around the desired null are
also seriously attenuated
60
Notch Filter
Frequencies around seriously attenuated
61
All pass Filter
Used as phase
equalizer
62
Inverse Filter
63
Digital Filter Design Considerations
Four steps:
65