EEE6209 Part A Topic 01
EEE6209 Part A Topic 01
EEE6209 Part A Topic 01
Tel: 25893
Email: c.abhayaratne@sheffield.ac.uk
Office: P/C11
MATLAB
Commands: filter, freqz, pz2tf, tf2pz, fft, plot, help, fir1, fir2, remez, firls
EEE6209
EEE6209
x(n)
y(n)
Digital filter
y(n) T[ x(n)]
EEE6209
Difference Equation
N
(1.1)
k =0
Convolution
y ( n) =
h( k ) x ( n k )
(1.2)
k =
Y ( z) = H ( z) X ( z)
b0 + b1 z 1 + ... + bM z M
H ( z) =
1 + a1 z 1 + ... + a N z N
EEE6209
(1.3)
(1.4)
EEE6209
y ( n) = h( k ) x ( n k )
k =
Frequency response
Denoted by H(j)
H ( j ) = H ( z ) z = e j
b0 + b1e j + ... + bM e jM
=
1 + a1e j + ... + a N e jN
EEE6209
EEE6440
Exercise: 2.1
Consider the difference equation
y(n) = 0.5y(n-1) + x(n) x(n-2)
Find out
Impulse response
Step response
Frequency response
EEE6209
Filter Implementation
The most straightforward way to implement a
digital filter is by convolving the input signal with
the digital filter's impulse response.
All possible linear filters can be made in this
manner.
When the impulse response is used in this way,
filter designers give it a special name: the filter
kernel.
There is also another way to make digital filters,
called recursion.
EEE6209
10
11
12
IIR Filters
Duration length of h(n) is infinite. That means
h(n)0 when n.
IIR filters are recursive. That means at least one
coefficient ak0.
Causal IIR filters can be represented as
k =1
k =0
EEE6209
)(
)
13
FIR Filters
Duration length of h(n) is finite. Length is M+1 <
. That means h(n)=0 when n.
FIR filters are non-recursive. That means all
coefficients ak=0 when k>0 and a0=1.
Causal FIR filters can be represented as
M
k =0
FIR filters are all zero filters. That means all poles
are either 0 finite pole
H ( z ) = b0 + b1 z 1 + ... + bM z M
EEE6209
14
Information in signals
There are many ways that information can be contained
in a signal.
information represented in the time domain,
information represented in the frequency domain
15
Information in signals
In contrast, information represented in the frequency
domain is more indirect.
Many things in our universe show periodic motion.
By measuring the frequency, phase, and amplitude of
this periodic motion, information can often be
obtained about the system producing the motion.
A single sample, in itself, contains no information
about the periodic motion. The information is
contained in the relationship between many points in
the signal.
The frequency response shows how information
represented in the frequency domain is being
changed.
EEE6209
16
Filter parameters
Step response
Fast step response
No overshoot
Linear phase
Frequency response
Fast roll-off
Flat passband
Good stopband attenuation
17
EEE6209
18
Filter Classification
Four main types
Low pass
High pass
Band pass
Band reject
EEE6209
19
H(z)
1
fc
0.5
fc
0.5
G(z)
1
Spectral Inversion
If low pass filter is H(z)
0
0
The high pass filter G(z) = 1 H(z)
in time domain g(n) = (n) h(n)
Parallel filters
h(n)
+
x(n)
y(n)
(n)
EEE6209
20
Spectral reversal
If low pass filter is H(z)
The high pass filter G(z) = H(z+0.5)
in time domain g(n) = (1)n h(n)
H(z)
1
fc
0.5
0.5-fc 0.5
G(z)
1
EEE6209
21
If f1 < f2
Band reject is give by parallel h(n) + g(n)
EEE6209
22
Draw the cascaded/parallel filtering system for Band pass and band reject filtering
EEE6209
23
24
EEE6209
25
26
EEE6209
27
sin(fM )
M sin(f )
An alternative way
zero pad the impulse response to make it a length N filter, where
N is a power of 2
Take the FFT
0 to N/2 points represent the Frequency response from 0 to 0.5 of
the normalised frequency.
EEE6209
28
29
EEE6209
30
EEE6209
31
EEE6209
32
EEE6440
33
34
y[n+1] is computed as
y[n+1] = (x[n-1]+x[n]+x[n+1]+x[n+2]+x[n+3])/5
In other words,
y[n+1] = y[n]+(x[n+3]-x[n-2])/5
35
2) In frequency domain
E.g. ?
3) Custom
E.g. ?
Their implementation
A) Convolution
B) Recursion
EEE6209
36
37
Custom filters
Most filters have one of the four standard frequency
responses: low-pass, high-pass, band-pass or band-reject.
But most of the time, we have to design digital filters with
an arbitrary frequency response, tailored to the needs of
our particular application.
Two important uses of custom filters:
Deconvolution - a way of restoring signals that have undergone an
unwanted convolution, and
Optimal filtering - the problem of separating signals with
overlapping frequency spectra. (lectures by WL)
EEE6209
38
Deconvolution
The detected signal is the
desired signal convolved with an
unwanted kernel.
How do we recover the desired
signal back?
39