ELEN E4810: Digital Signal Processing Topic 9: Filter Design: FIR

Slides:



Advertisements
Similar presentations
Equiripple Filters A filter which has the Smallest Maximum Approximation Error among all filters over the frequencies of interest: Define: where.
Advertisements

Filtering Filtering is one of the most widely used complex signal processing operations The system implementing this operation is called a filter A filter.
Ideal Filters One of the reasons why we design a filter is to remove disturbances Filter SIGNAL NOISE We discriminate between signal and noise in terms.
LINEAR-PHASE FIR FILTERS DESIGN
Chapter 8 FIR Filter Design
Parks-McClellan FIR Filter Design
AGC DSP AGC DSP Professor A G Constantinides 1 Digital Filter Specifications Only the magnitude approximation problem Four basic types of ideal filters.
EEE422 Signals and Systems Laboratory Filters (FIR) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
ELEN 5346/4304 DSP and Filter Design Fall Lecture 11: LTI FIR filter design Instructor: Dr. Gleb V. Tcheslavski Contact:
Relationship between Magnitude and Phase (cf. Oppenheim, 1999)
Dan Ellis 1 ELEN E4810: Digital Signal Processing Topic 6: Filters - Introduction 1.Simple Filters 2.Ideal Filters 3.Linear Phase and FIR filter.
1 Lecture 2: February 27, 2007 Topics: 2. Linear Phase FIR Digital Filter. Introduction 3. Linear-Phase FIR Digital Filter Design: Window (Windowing)
Practical Signal Processing Concepts and Algorithms using MATLAB
1 Diagramas de bloco e grafos de fluxo de sinal Estruturas de filtros IIR Projeto de filtro FIR Filtros Digitais.
1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase.
Filter Design Techniques
Zhongguo Liu_Biomedical Engineering_Shandong Univ. Biomedical Signal processing Chapter 7 Filter Design Techniques Zhongguo Liu Biomedical.
DSP-CIS Chapter-4: FIR & IIR Filter Design Marc Moonen Dept. E.E./ESAT, KU Leuven
MATLAB for Signal Processing The MathWorks Inc. Natick, MA USA Filter Design.
IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.
Digital Signal Processing FIR Filter Design
Copyright ©2010, ©1999, ©1989 by Pearson Education, Inc. All rights reserved. Discrete-Time Signal Processing, Third Edition Alan V. Oppenheim Ronald W.
1 Chapter 7 Filter Design Techniques (cont.). 2 Optimum Approximation Criterion (1)  We have discussed design of FIR filters by windowing, which is straightforward.
Dan Ellis 1 ELEN E4810: Digital Signal Processing Topic 9: Filter Design: FIR 1.Windowed Impulse Response 2.Window Shapes 3.Design by Iterative.
1 Lecture 3: March 6, 2007 Topic: 1. Frequency-Sampling Methods (Part I)
Lecture 11: FIR Filter Designs XILIANG LUO 2014/11 1.
1 Chapter 7 FIR Filter Design Techniques. 2 Design of FIR Filters by Windowing (1)  We have discussed techniques for the design of discrete-time IIR.
Dan Ellis 1 ELEN E4810: Digital Signal Processing Topic 8: Filter Design: IIR 1.Filter Design Specifications 2.Analog Filter Design 3.Digital.
Fundamentals of Digital Signal Processing. Fourier Transform of continuous time signals with t in sec and F in Hz (1/sec). Examples:
Chapter 7 Finite Impulse Response(FIR) Filter Design
1 Introduction to Digital Filters Filter: A filter is essentially a system or network that selectively changes the wave shape, amplitude/frequency and/or.
FIR Filter Design & Implementation
Advisor : 高永安 Student : 陳志煒
Chapter 9-10 Digital Filter Design. Objective - Determination of a realizable transfer function G(z) approximating a given frequency response specification.
Chapter 7. Filter Design Techniques
1 Digital Signal Processing Digital Signal Processing  IIR digital filter structures  Filter design.
Design of FIR Filters. 3.1 Design with Least Squared Error Error Criterion.
Two-Dimensional Filters Digital Image Processing Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng Kung University.
ECE 8443 – Pattern Recognition EE 3512 – Signals: Continuous and Discrete Objectives: FIR Filters Design of Ideal Lowpass Filters Filter Design Example.
6.0 Time/Frequency Characterization of Signals/Systems
The IIR FILTERs These are highly sensitive to coefficients,
The IIR FILTERs These are highly sensitive to coefficients which may affect stability. The magnitude-frequency response of these filters is established.
Optimum Approximation of FIR Filters Quote of the Day There are three kinds of lies: lies, damned lies, and statistics. Benjamin Disraeli Content and Figures.
DISP 2003 Lecture 5 – Part 1 Digital Filters 1 Frequency Response Difference Equations FIR versus IIR FIR Filters Properties and Design Philippe Baudrenghien,
Chapter 6. Digital Filter Structures and Designs Section
Finite Impulse Response Filtering EMU-E&E Engineering Erhan A. Ince Dec 2015.
Lecture 13 Outline: FIR Filter Design: Freq. Response Matching, Causal Design, Windowing Announcements: Reading: “4: FIR Discrete-Time Filters” pp
EEE4176 Application of Digital Signal Processing
DSP-CIS Part-II / Chapter-4 : Filter Design Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven
2/17/2007DSP Course-IUST-Spring Semester 1 Digital Signal Processing Electrical Engineering Department Iran University of Science & Tech.
Professor A G Constantinides 1 Digital Filter Specifications We discuss in this course only the magnitude approximation problem There are four basic types.
IIR Filter design (cf. Shenoi, 2006)
Lecture 14 Outline: Windowing in FIR Filter Design
EEE422 Signals and Systems Laboratory
J McClellan School of Electrical and Computer Engineering
Fourier Series FIR About Digital Filter Design
LINEAR-PHASE FIR FILTERS DESIGN
Filter Design by Windowing
لجنة الهندسة الكهربائية
Lecture 13 Outline: Windowing in FIR Filter Design
MMSE Optimal Design: The Least Squares method
Ideal Filters One of the reasons why we design a filter is to remove disturbances Filter SIGNAL NOISE We discriminate between signal and noise in terms.
Lecture 16a FIR Filter Design via Windowing
Frequency Response (FR) Transfer Function (TF)
Chapter 7 FIR Digital Filter Design
Chapter 7 Finite Impulse Response(FIR) Filter Design
Tania Stathaki 811b LTI Discrete-Time Systems in Transform Domain Ideal Filters Zero Phase Transfer Functions Linear Phase Transfer.
Chapter 9 Advanced Topics in DSP
Finite Impulse Response Filters
Chapter 7 Finite Impulse Response(FIR) Filter Design
Presentation transcript:

ELEN E4810: Digital Signal Processing Topic 9: Filter Design: FIR Windowed Impulse Response Window Shapes Design by Iterative Optimization Dan Ellis 2003-11-18

1. FIR Filter Design FIR filters Approaches no poles (just zeros) no precedent in analog filter design Approaches windowing ideal impulse response iterative (computer-aided) design Dan Ellis 2003-11-18

Least Integral-Squared Error Given desired FR Hd(ejw), what is the best finite ht[n] to approximate it? Can try to minimize Integral Squared Error (ISE) of frequency responses: best in what sense? = DTFT{ht[n]} Dan Ellis 2003-11-18

Least Integral-Squared Error Ideal IR is hd[n] = IDTFT{Hd(ejw)}, (usually infinite-extent) By Parseval, ISE But: ht[n] only exists for n = -M..M , minimized by making ht[n] = hd[n], -M ≤ n ≤ M not altered by ht[n] Dan Ellis 2003-11-18

Least Integral-Squared Error Thus, minimum mean-squared error approximation in 2M+1 point FIR is truncated IDFT: Make causal by delaying by M points  h't[n] = 0 for n < 0 Dan Ellis 2003-11-18

Approximating Ideal Filters w -p p wc -wc From topic 6, ideal lowpass has: and: (doubly infinite) Dan Ellis 2003-11-18

Approximating Ideal Filters Thus, minimum ISE causal approximation to an ideal lowpass Causal shift 2M+1 points Dan Ellis 2003-11-18

Freq. Resp. (FR) Arithmetic Ideal LPF has pure-real FR i.e. q(w) = 0, H(ejw) = |H(ejw)|  Can build piecewise-constant FRs by combining ideal responses, e.g. HPF: 1 d[n] i.e. H(ejw) = 1 w – HLP(ejw) = 1 for |w| < wc phases were nonzero! wouldn’t work if hLP[n] 1 w = 1 hHP[n] = d[n] - (sinwcn)/pn w -p -wc wc p Dan Ellis 2003-11-18

Gibbs Phenomenon Truncated ideal filters have Gibbs’ Ears: Increasing filter length  narrower ears (reduces ISE) but height the same (11% overshoot)  not optimal by minimax criterion Dan Ellis 2003-11-18

Where Gibbs comes from Truncation of hd[n] to 2M+1 points is multiplication by a rectangular window: Multiplication in time domain is convolution in frequency domain: wR[n] Dan Ellis 2003-11-18

DTFT{wR[n]} periodic sinc... Where Gibbs comes from Thus, FR of truncated response is convolution of ideal FR and FR of rectangual window (pdc.sinc): Hd(ejw) Ht(ejw) DTFT{wR[n]} periodic sinc... Dan Ellis 2003-11-18

doesn’t vary with length Where Gibbs comes from Rectangular window: Mainlobe width ( 1/L) determines transition band Sidelobe height determines ripples  doesn’t vary with length “periodic sinc” Dan Ellis 2003-11-18

2. Window Shapes for Filters Windowing (infinite) ideal response  FIR filter: Rectangular window has best ISE error Other “tapered windows” vary in: mainlobe  transition band width sidelobes  size of ripples near transition Variety of ‘classic’ windows... Dan Ellis 2003-11-18

Window Shapes for FIR Filters big sidelobes! Rectangular: Hann: Hamming: Blackman: double width mainlobe reduced 1st sidelobe triple width mainlobe Dan Ellis 2003-11-18

Window Shapes for FIR Filters Comparison on dB scale: 2p 2M+1 Dan Ellis 2003-11-18

Adjustable Windows Have discrete main-sidelobe tradeoffs... Kaiser window = parametric, continuous tradeoff: Empirically, for min. SB atten. of a dB: modified zero-order Bessel function required order transition width Dan Ellis 2003-11-18

Windowed Filter Example Design a 25 point FIR low-pass filter with a cutoff of 600 Hz (SR = 8 kHz) No specific transition/ripple req’s  compromise: use Hamming window Convert the frequency to radians/sample: w 2p 8 kHz p 4 kHz 0.15 p 600 Hz H(ejw) Dan Ellis 2003-11-18

Windowed Filter Example Get ideal filter impulse response: Get window: Hamming @ N = 25  M = 12 (N = 2M+1) Apply window: M Dan Ellis 2003-11-18

3. Iterative FIR Filter Design Can derive filter coefficients by iterative optimization: Gradient descent / nonlinear optimiz’n desired response H(ejw) Goodness of fit criterion  error e Filter coefs h[n] Update filter to reduce e Estimate derivatives e/h[n] Dan Ellis 2003-11-18

Error Criteria error measurement exponent: 2  least sq’s region error weighting desired response actual response exponent: 2  least sq’s   minimax = W(w)·[D(ejw) – H(ejw)] Dan Ellis 2003-11-18

Minimax FIR Filters Iterative design of FIR filters with: equiripple (minimax criterion) linear-phase  symmetric IR h[n] = (–)h[-n] Recall, symmetric FIR filters have FR with pure-real i.e. combo of cosines of multiples of w (type I) M n a[0] = h[M] a[k] = 2h[M - k] Dan Ellis 2003-11-18

Mth order polynomial in cosw Minimax FIR Filters Now, cos(kw) can be expressed as a polynomial in cos(w)k and lower powers e.g. cos(2w) = 2(cosw)2 - 1 Thus, we can find a’s such that Mth order polynomial in cosw a[k]s are simply related to a[k]s Mth order polynomial in cosw Dan Ellis 2003-11-18

Mth order polynomial in cosw Minimax FIR Filters Mth order polynomial in cosw An Mth order polynomial has at most M - 1 maxima and minima: has at most M-1 min/max (ripples) 1 5th order polynomial in cosw 3 2 4 Dan Ellis 2003-11-18

Alternation Theorum Key ingredient to Parks-McClellan: is the unique, best, weighted-minimax order 2M approx. to D(ejw) has at least M+2 “extremal” freqs over w subset R error magnitude is equal at each extremal: peak error alternates in sign:  Dan Ellis 2003-11-18

Alternation Theorum Hence, for a frequency response: If e(w) reaches a peak error magnitude e at some set of extremal frequences wi And the sign of the peak error alternates And we have at least M+2 of them Then optimal minimax (10th order filter, M = 5) Dan Ellis 2003-11-18

Alternation Theorum By Alternation Theorum, M+2 extrema of alternating signs  optimal minimax filter But has at most M-1 extrema  need at least 3 more from band edges 2 bands give 4 band edges  can afford to “miss” only one Alternation rules out transition band edges, thus have 1 or 2 outer edges Dan Ellis 2003-11-18

Alternation Theorum For M = 5 (10th order): 8 extrema (M+3, 4 band edges) - great! 7 extrema (M+2, 3 band edges) - OK! 6 extrema (M+1, only 2 transition band edges)  NOT OPTIMAL Dan Ellis 2003-11-18

Parks-McClellan Algorithm To recap: FIR CAD constraints D(ejw), W(w)  e(w) Zero-phase FIR H(w) = Skakcoskw  M-1 min/max Alternation theorum optimal  ≥M+2 pk errs, alter’ng sign Hence, can spot ‘best’ filter when we see it – but how to find it? ~ Dan Ellis 2003-11-18

Parks-McClellan Algorithm ~ ~ Alternation  [H(w)-D(w)]/W(w) must = ±e at M+2 (unknown) frequencies {wi}... Iteratively update h[n] with Remez exchange algorithm: estimate/guess M+2 extremals {wi} solve for a[n], e (  h[n] ) find actual min/max in e(w)  new {wi} repeat until |e(wi)| is constant Converges rapidly! Dan Ellis 2003-11-18

Parks-McClellan Algorithm In Matlab, >> h=remez(10, [0 0.4 0.6 1], [1 1 0 0], [1 2]); filter order (2M) band edges ÷ p desired magnitude at band edges error weights per band Dan Ellis 2003-11-18