Lecture 19: Filter design

1 / 22
About This Presentation
Title:

Lecture 19: Filter design

Description:

Magnitude (dB) Hamming. Rectangular. Windowed sinc rectangular window. Using other windows ... Evaluate the response using 53, 20 and 12 bit precision. ... –

Number of Views:389
Avg rating:3.0/5.0
Slides: 23
Provided by: Oerst
Category:

less

Transcript and Presenter's Notes

Title: Lecture 19: Filter design


1
Lecture 19Filter design
  • Svetoslav NikolovØrstedDTU, Building 349

2
Today
  • Causality
  • Linear phase filters
  • Filter design using window functions
  • Filter design using windowed sinc function
  • Design IIR using SPtool.

3
Filter causality
  • Frequency response H(?) cannot be 0, except at a
    finite set of points
  • H(?) cannot be constant in any finite range of
    ?
  • Transition from stop- to pass-band cannot be
    infinitely sharp
  • Real and imaginary parts are related via Hilbert
    transform.

4
Characteristics of practical filters
Fdatool demo!
5
Linear phase filters
Input signal
Non-linear phase
Demo non-linear phase
Linear phase
6
Symmetric and Antisymmetric FIR filters
7
Shapes of window functions
8
Rectangular window
61 coefficients
31 coefficients
9
Hamming window
Hamming
Rectangular
10
Windowed sinc rectangular window
11
Using other windows
Rectangular window
Hamming window
12
Example
  • Design a 15 coefficient causal law-pass filter
    with a bandwidth of B Hz and sampling rate of 4B
    Hz. Calculate the amplitude of the actual
    transfer function.
  • Apply a Hamming filter on the designed filter and
    determine the resulting frequency response.

13
Example result 1
i 014 b sinc((i-7)/2)/2 freqz(b,1)
14
Example result 2
i 014 b sinc((i-7)/2)/2 b
b.hamming(15)' freqz(b,1)
15
Design of optimum linear phase filter
f 0 400 600 900 1100 2500/2500 m 0 0 1 1
0 0 b remez(31, f, m) freqz(b,1,400, 5000)
16
Recursive filters
  • Chebyshev (???????, Chebychev, Tcsheysheff,
    Tchebichef) filters are based on a mathematical
    strategy for achieving a faster roll-off by
    allowing a ripple in frequency response.
  • Butterworth filter has a ripple of 0 .
  • Filters with ripple in pass-band are type 1, and
    with ripple in the stop-band are type 2 (seldom
    used).
  • Elliptic filters have ripples both in pass- and
    stop-band

17
Designing recursive filters in Matlab
  • Use Matlab to design an 8th order elliptic
    lowpass filter with a cutoff freq. of 300 Hz, 0.5
    dB ripple in pass band and a minimum stop-band
    attenuation of 50 dB for use with a signal
    sampled at 4 kHz.
  • Evaluate the response using 53, 20 and 12 bit
    precision.
  • Implement it as a cascade of second order
    sections.

18
Example with elliptic filter
b, a ellip(8, .5, 50, 300/2000) z, p, k
ellip(8, .5, 50, 300/2000) zplane(b,a) b12
round(b211)/211 a12 round(b211)/211 zpl
ane(b12,a12)
53-bit precision (double)
19
12-bit coefficients
b, a ellip(8, .5, 50, 300/2000) z, p, k
ellip(8, .5, 50, 300/2000) zplane(b,a) b12
round(b211)/211 a12 round(b211)/211 zpl
ane(b12,a12)
12-bit precision
20
The transfer function
53 bit
subplot(3,1,1) h,f freqz(b,a, 512, 4000) m
20log10(abs(h)) plot(f,m) axis(0 2000 -80
20) ylabel ('H(f) dB')
20 bit
12 bit
21
Using 4 2nd-order sections
m zp2sos(z,p,k) m12 round (m211)/211 fig
ure subplot(2,2,1) zplane(m12(1,13),
m12(1,46))
22
Summary
  • Symmetric FIR filters have a linear phase.
  • A simple method to design them is to use
    windowing functions in combination with a
    truncated sinc.
  • Recursive filters have better performance, but
    the phase is not linear and are subject to
    stability issues with integer coefficients.
Write a Comment
User Comments (0)
About PowerShow.com