Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
xn
Input sequence
Digital Filter
Output sequence
yn
Desired features
Desired features depend on the application, for example
Input Signal
Output
generated by sensing
device (microphone)
speech
with reduced
redundancy for more
efficient transmission
3
LTI
yn
xn-k
yn-k
LTI
LTI
yn1
a1xn1+ a2xn2
xn2
LTI
LTI
yn2
scaling &
additivity
properties
a1yn1+ a2yn2
Analysis
We analyse DSP algorithms by determining:
their time-domain characteristics
linear difference equations
filters unit-sample (impulse) response
their frequency-domain characteristics
more general, Z-transform domain
system transfer function
poles and zeros diagram in the z-plane
Fourier domain
frequency response
spectrum of the signal
9
x1n
yn=x1n+x2n
x2n
Multipliers:
xn
yn=axn
alternative for multiplier
xn
Z-1
yn= xn-1
alternative for delay
xn
yn= xn+1
1/3
xn
Order:
number of
delays &
advances
needed to
implement
yn
Z-1
second-order filter
xn
yn
a
Example of feedback
implemented in a
digital filter
Z-1
one delay
first-order
slightly alternative
representation
16
k=-
xk n-k
LTI
hn
k=-
xk n-k
LTI
yn=
k=-
xk hn-k
17
Linear convolution
Linear convolution
yn=
k=-
xk hn-k
Impulse response:
hn = 0
Thus
Yn =
k=-
for n <0
xk hn-k =
hk xn-k
k=0
19
where
is a complex variable
Indeed,
21
22
23
24
where
b = [b0 b1 b2 ... bM ];
a = [ 1 a1 a2 a3 ... aN ];
Or step response,
y = filter( b, a, [ones(1,P)]);
25
26
LTI
yn=
hk xn-k
k=0
Fourier Transform
convolution
Fourier transform of hk
Example
Assume
where
for
0 otherwise
Frequency response
29
=
is called magnitude response of a system
is called phase response of a system
30
and argument:
Suppose we have a
system with 2 poles (o)
and 2 zeros (x)
unit circle
X
We are going
around the unit
circle with
-1
32
Transfer function:
unit circle
X
D1
-1
O
C1
D2
C2
Frequency response:
C1C2
D1D2
33
X
D1
-1
O
C1
C2
C1C2
D1D2
D2
unit circle
X
D1
-1
O
C1
D2
C2
When
'is close
to' a zero, the magnitude
falls (a null).
1
The phase response
more difficult to get
intuition.
35
36
36
Filtering example
Generate a Gaussian random noise sequence:
x=randn(100000,1);
figure(1), plot(x)
figure(2), plot(abs(fft(x)))
freqz(b,a);
a = [1 -0.99 0.9801];
b = [1, -0.1, -0.56];
y=filter(b,a,x);
figure(3), plot(y)
Figure(4), plot(abs(fft(y)))
Use soundsc(x,44100)
and soundsc(y,44100)
and hear the difference!
Selective amplification
of one frequency
37
37
Filter specification
Before a filter is designed and implemented we need to
specify its performance requirements.
There are four basic filter types:
Low-pass
High-pass
Band-pass
Band-stop
Frequency band where signal is passed is passband
Frequency band where signal is removed is stopband
38
39
40
41
42
43
Indeed,
Fourier Transform of
delay
44
45
phase distortion
46
48
49
Filter Design
Lets have a go
50
Im(z)
Thus when
'is
close to' a pole, the
magnitude of the response
rises (resonance).
unit circle
X
D1
-1
O
C1
D2
C2
When
'is close
to' a zero, the magnitude
falls (a null).
1
The phase response
more difficult to get
intuition.
51
One needs to put the poles within the unit circle to ensure stability
52
Rule 2: The closer to a zero, the lower the magnitude of the response
53
54
56
in time domain
57
58
Resonator
This filter is actually more a digital resonator than an bandpass filter; see
its frequency response for r = 0.9 and 0 = /4 - it has a large magnitude
response around 0
59
Band-pass Filter
60
Band-pass Filter
Notch Filter
a filter that
contains one or
several deeps/
notches in
its frequency
response
to eliminate 0
62
Notch Filter
Frequencies around seriously attenuated
63
Used as phase
equalizer
64
Inverse Filter
65
3.
5.
analytic means
simulations
4.
66
67