Title: Advanced Digital Signal Processing
1 DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF
JOENSUU JOENSUU, FINLAND
- Advanced Digital Signal Processing
- Lecture 7
- FIR Digital Filters
- Alexander Kolesnikov
- 13.10.205
2Z-transform
3Z-transform X(z)
Let x(n) is a discrete set of points
Inverse Z-transform
where z is complex variable, C is closed contour
in the region of convergence includes all
singular points (poles) of X(z).
4Properties of Z-transform
1) Linearity
2) Time-shifting
3) Convolution
5Examples
1)
2)
3)
6 Fourier- and Z- transforms
Discrete-time Fourier-transform
Z-transform
Fourier-transform equals its z-transform at zei?
zei? defines unit circle.
7Filters
Filter
8Types of filters
9Parameters of filters
10Parameters of filter
Rp? passband ripples Rs ? stopband atenuation ?p
? passband frequency ?s ? stopband frequency
11Types of digital filters
- Finite impulse responce (FIR) digital filters
- Infnite impulse responce (IIR) digital filters
12FIR Digital Filters
13Basic equation
Output signal y(n) is convolution of input signal
x(n) with profile function h(n)
14Block scheme
z-1delay element
15Impulse response
Input signal
Output signal
h(n)
n
1 2
M
FIR finite impulse responce
16Example 1 Average of two samples
1/2
0 1
17Example 2 Difference of two samples
1
?1
18Transfer function
- Z-transform of impulse responce function
- Convolution in time-domain
- Multiplication in z-domain
19Transfer function block scheme
20Example 1 Average
Equation
Transfer function
21Example 1
Amplitude-frequency responce Phase-frequency
responce
22Example 1
Lowpass (smooth) linear-phase filter
23Example 2 Differentiator
Equation
Transfer function
24Example 2 Differentiator
Highpass (sharp) linear-phase filter
25Frequency reponce
Amplitude-frequency response
Phase-frequency response
26FIR filter design Frequency sampling
- Specify the desired frequency responce H0(?)
- Estimate the number of filter coefficients M
- Calculate ideal impulse responce function h0(n)
as inverse Fourier - transform of frequency responce H0(?) taken in
K points - H0(0), H0(??), , H0((K ? 1)???).
- Calculate windowing function w(n).
- Multiplay the ideal impulse responce h0(n) to M
values h(n) to windowing function w(n)
h0(n)h0(n)w(n) - Perform Fourier transform of h(n) to calculate
real frequency - responce H (?).
The simplest window function is rectangular
coefficient truncation
27FIR filter design Frequency sampling
- Red points samples of desired
- frequency response
- Black line the actual frequency
- responce of truncated impulse
- responce.
28Frequency sampling Windowing
w kaiser(200,2.5) wvtool(w)
Use another windows Hamming, Hanning, Kaiser,
Blackman, etc.
29FIR filter design Frequency sampling
FS1000 Sampling frequency FBFS/2
Bending frequency (Nyquist freq in MtaLB) N73
Filter length beta5.65 Kaser window
riple param fc1125/FB Left cut-off
freq fc2275/FB Right cut-off freq FCfc1
fc2 Get windowed filter coeffs hnfir1(N-1,FC
,kaiser(N,beta)) Calc freq responce H,ffreq
z(hn,1,512,FS) mag10log10(abs(H)) plot(f,mag)
grid on xlabel('Frequency, Hz') ylabel('Magnitu
de Responce, Db')
30The filter coefficients
M36
31Frequency responce
Passband 125-275 Hz
32Signal filtration 50 Hz
x 10sin(2? f 1t)
f150 Hz
33Signal filtration 200Hz
x 10sin(2? f1t)
f1200 Hz
34Signal filtration 350 Hz
x 10sin(2? f 1t)
f1350 Hz
35Linear-phase filter design optimal method
The Parks-McClellan method is based on Remez
exchange algorithm and Chebyshev approximation
theory to design filters with an optimal fit
between the desired and actual frequency
responses. See remez() and firpm() functions.
36Approximation of frequency responce
FS10000 Sampling freq N41
Filter length Desired magnitude responce M0
0 1 1 0 0 Band edge relative freqs
(2f/fS) F0, 0.1, 0.2, 0.3, 0.4, 1 Calc
filter coeffs bremez(N-1,F,M) or
firpm(N-1,F,M) Calc freq responce
H,ffreqz(b,1,512,FS) mag10log10(abs(H)) pl
ot(f,mag)grid on xlabel('Frequency,
Hz') ylabel('Magnitude Responce, Db')
37The filter coeffficients
M20
38Amplitude- and phase-frequency responces
39More about filters
- Linear-phase filters
- Filter stability
- Filter casuality
- Noise and quantization effects in digital
filters.
- MatLAB
- Unit frequency is the Nyquist frequency
- The Nyquist frequency is half the sampling
frequency.
http//www.dsptutor.freeuk.com/analyser/SA102.html
http//www.dsptutor.freeuk.com/filter/FIRDigitalFi
lterDemo.html