Team proposals are due tomorrow at 6PM Homework 4 is due next thur. Proposal presentations are next mon in 1311EECS.

Similar documents
ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

Advanced Digital Signal Processing Part 5: Digital Filters

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters


(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

Lecture 3 Review of Signals and Systems: Part 2. EE4900/EE6720 Digital Communications

Digital Filters IIR (& Their Corresponding Analog Filters) Week Date Lecture Title

B.Tech III Year II Semester (R13) Regular & Supplementary Examinations May/June 2017 DIGITAL SIGNAL PROCESSING (Common to ECE and EIE)

The University of Texas at Austin Dept. of Electrical and Computer Engineering Midterm #1

Problem Point Value Your score Topic 1 28 Filter Analysis 2 24 Filter Implementation 3 24 Filter Design 4 24 Potpourri Total 100

Problem Point Value Your score Topic 1 28 Discrete-Time Filter Analysis 2 24 Improving Signal Quality 3 24 Filter Bank Design 4 24 Potpourri Total 100

DIGITAL FILTERS. !! Finite Impulse Response (FIR) !! Infinite Impulse Response (IIR) !! Background. !! Matlab functions AGC DSP AGC DSP

EECS 452 Midterm Exam (solns) Fall 2012

IIR Filter Design Chapter Intended Learning Outcomes: (i) Ability to design analog Butterworth filters

DSP Laboratory (EELE 4110) Lab#10 Finite Impulse Response (FIR) Filters

ECE438 - Laboratory 7a: Digital Filter Design (Week 1) By Prof. Charles Bouman and Prof. Mireille Boutin Fall 2015

EEM478-WEEK8 Finite Impulse Response (FIR) Filters

Signals. Continuous valued or discrete valued Can the signal take any value or only discrete values?

EEM478-DSPHARDWARE. WEEK12:FIR & IIR Filter Design

Final Exam. EE313 Signals and Systems. Fall 1999, Prof. Brian L. Evans, Unique No

HW 1 is due on tuesday. PPI is due on Thurs ( to hero by 5PM) Lab starts next week.

F I R Filter (Finite Impulse Response)

Digital Filtering: Realization

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY DIGITAL SIGNAL PROCESSING UNIT 3

The University of Texas at Austin Dept. of Electrical and Computer Engineering Final Exam

Filters. Phani Chavali

ECE 429 / 529 Digital Signal Processing

Copyright S. K. Mitra

Digital Filters FIR and IIR Systems

EECS 452 Midterm Closed book part Winter 2013

Multirate DSP, part 1: Upsampling and downsampling

SMS045 - DSP Systems in Practice. Lab 1 - Filter Design and Evaluation in MATLAB Due date: Thursday Nov 13, 2003

EE 470 Signals and Systems

Narrow-Band Low-Pass Digital Differentiator Design. Ivan Selesnick Polytechnic University Brooklyn, New York

Part B. Simple Digital Filters. 1. Simple FIR Digital Filters

Lecture 17 z-transforms 2

EECS 452 Midterm Exam Winter 2012

4. Design of Discrete-Time Filters

Problem Point Value Your score Topic 1 28 Discrete-Time Filter Analysis 2 24 Upconversion 3 30 Filter Design 4 18 Potpourri Total 100

1. Find the magnitude and phase response of an FIR filter represented by the difference equation y(n)= 0.5 x(n) x(n-1)

Noise removal example. Today s topic. Digital Signal Processing. Lecture 3. Application Specific Integrated Circuits for

EECS 452 Practice Midterm Exam Solutions Fall 2014

y(n)= Aa n u(n)+bu(n) b m sin(2πmt)= b 1 sin(2πt)+b 2 sin(4πt)+b 3 sin(6πt)+ m=1 x(t)= x = 2 ( b b b b

Digital Signal Processing

Electrical & Computer Engineering Technology

CS3291: Digital Signal Processing

Experiment 4- Finite Impulse Response Filters

EC6502 PRINCIPLES OF DIGITAL SIGNAL PROCESSING

Digital Processing of

Signal Processing Summary

Final Exam Solutions June 14, 2006

GEORGIA INSTITUTE OF TECHNOLOGY. SCHOOL of ELECTRICAL and COMPUTER ENGINEERING. ECE 2026 Summer 2018 Lab #8: Filter Design of FIR Filters

CHAPTER 2 FIR ARCHITECTURE FOR THE FILTER BANK OF SPEECH PROCESSOR

Signals and Filtering

Design of FIR Filters

Digital Processing of Continuous-Time Signals

GUJARAT TECHNOLOGICAL UNIVERSITY

ECE 5650/4650 Exam II November 20, 2018 Name:

Digital Signal Processing

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems.

Signal processing preliminaries

Massachusetts Institute of Technology Department of Electrical Engineering & Computer Science 6.341: Discrete-Time Signal Processing Fall 2005

Multirate Digital Signal Processing

SCUBA-2. Low Pass Filtering

APPLIED SIGNAL PROCESSING

MULTIRATE IIR LINEAR DIGITAL FILTER DESIGN FOR POWER SYSTEM SUBSTATION

Signal Processing for Speech Applications - Part 2-1. Signal Processing For Speech Applications - Part 2

ECE503: Digital Filter Design Lecture 9

Corso di DATI e SEGNALI BIOMEDICI 1. Carmelina Ruggiero Laboratorio MedInfo

On the Most Efficient M-Path Recursive Filter Structures and User Friendly Algorithms To Compute Their Coefficients

1 PeZ: Introduction. 1.1 Controls for PeZ using pezdemo. Lab 15b: FIR Filter Design and PeZ: The z, n, and O! Domains

Review of Filter Types

Performance Analysis of FIR Filter Design Using Reconfigurable Mac Unit

LECTURER NOTE SMJE3163 DSP

FINITE IMPULSE RESPONSE (FIR) FILTERS

Final Exam Solutions June 7, 2004

Designing Filters Using the NI LabVIEW Digital Filter Design Toolkit

Design and comparison of butterworth and chebyshev type-1 low pass filter using Matlab

UNIT II IIR FILTER DESIGN

Appendix B. Design Implementation Description For The Digital Frequency Demodulator

ELEC3104: Digital Signal Processing Session 1, 2013

Digital Filters. Linearity and Time Invariance. Implications of Linear Time Invariance (LTI) Music 270a: Introduction to Digital Filters

ijdsp Workshop: Exercise 2012 DSP Exercise Objectives

Subtractive Synthesis. Describing a Filter. Filters. CMPT 468: Subtractive Synthesis

EE 311 February 13 and 15, 2019 Lecture 10

Aparna Tiwari, Vandana Thakre, Karuna Markam Deptt. Of ECE,M.I.T.S. Gwalior, M.P, India

On-Chip Implementation of Cascaded Integrated Comb filters (CIC) for DSP applications

FPGA Implementation of High Speed FIR Filters and less power consumption structure

Infinite Impulse Response (IIR) Filter. Ikhwannul Kholis, ST., MT. Universitas 17 Agustus 1945 Jakarta

PROBLEM SET 5. Reminder: Quiz 1will be on March 6, during the regular class hour. Details to follow. z = e jω h[n] H(e jω ) H(z) DTFT.

Signals and Systems Lecture 6: Fourier Applications

Digital Filters IIR (& Their Corresponding Analog Filters) 4 April 2017 ELEC 3004: Systems 1. Week Date Lecture Title

Infinite Impulse Response Filters

f o Fig ECE 6440 Frequency Synthesizers P.E. Allen Frequency Magnitude Spectral impurity Frequency Fig010-03

Chapter 9. Chapter 9 275

EE 422G - Signals and Systems Laboratory

Window Method. designates the window function. Commonly used window functions in FIR filters. are: 1. Rectangular Window:

ece 429/529 digital signal processing robin n. strickland ece dept, university of arizona ECE 429/529 RNS

Design and Simulation of Two Channel QMF Filter Bank using Equiripple Technique.

Lab 4 Digital Scope and Spectrum Analyzer

Transcription:

Lecture 8 Today: Announcements: References: FIR filter design IIR filter design Filter roundoff and overflow sensitivity Team proposals are due tomorrow at 6PM Homework 4 is due next thur. Proposal presentations are next mon in 1311EECS. See last slide. Please keep the lab clean and organized. Last one out should close the lab door!!!! We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. D. Knuth EECS 452 Fall 2014 Lecture 8 Page 1/32 Thurs 10/4/2012

Proposal presentations: Mon Sept 29 Schedule Presentations will occur from 6PM to 10:00PM in EECS 1311. Your team spokesperson must sign the team up for a 30 minute slot (20 min presentation). All team members must take part in their team s presentation. You may stay for any or all other portions of the presentation meeting. Team should arrive at least 20 minutes before their time slot. Team must use powerpoint or other projectable media for your presentations. The presentation must cover each section of the proposal. You should put your presentation on a thumb drive and/or email copy to hero before the meeting. EECS 452 Fall 2014 Lecture 8 Page 2/32 Thurs 10/4/2012

Digital filters: theory and implementation We have seen the need for several types of analog filters in A/D and D/A Anti-aliasing filter Reconstruction (anti-image) filter Equalization filter Anti-aliasing and reconstruction require cts time filters Discrete time filters are used for spectral shaping post-digitization. There will be round-off error effects due to finite precision. EECS 452 Fall 2014 Lecture 8 Page 3/32 Thurs 10/4/2012

Different types of filter transfer functions öeeñfö äçïé~ëë öeeñfö ÜáÖÜé~ëë M Ñ M Ñ öeeñfö Ä~åÇé~ëë öeeñfö Ä~åÇ=êÉàÉÅí EåçíÅÜF M Ñ M Ñ EECS 452 Fall 2014 Lecture 8 Page 4/32 Thurs 10/4/2012

Matlab s fdatool for digital filter design Figure: Lowpass, highpass, bandpass, bandstop (notch) in Matlab s fdatool EECS 452 Fall 2014 Lecture 8 Page 5/32 Thurs 10/4/2012

FIR vs IIR Digital filters Output depends on current and previous M input samples. y[n] = b 0 x[n] + b 1 x[n 1] + b 2 x[n 2] + + b M x[n M]. This is a FIR moving sum filter. Output depends on current input and previous N filter outputs. y[n] = x[n] a 1 y[n 1] a 2 y[n 2] a N y[n N]. This is an IIR all-pole or autoregressive filter. Output depends on current and previous M input samples and the previous N filter outputs. y[n] = b 0 x[n] + b 1 x[n 1] + b 2 x[n 2] + + b M x[n M] a 1 y[n 1] a 2 y[n 2] a N y[n N]. This is the general pole-zero IIR digital filter equation. EECS 452 Fall 2014 Lecture 8 Page 6/32 Thurs 10/4/2012

Filter design procedure Specification of filter requirements. Selection of FIR or IIR response. Calculation and optimization of filter coefficients. Realization of the filter by suitable structure. Analysis of finite word length effects on performance. Implementation. Testing/validation. The above steps are generally not independent of each other. Filter design is usually an iterative process. The FIR IIR response selection step is a major design choice. EECS 452 Fall 2014 Lecture 8 Page 7/32 Thurs 10/4/2012

FIR block diagram (again) 0 Y = (b 0 + b 1z 1 + b 2z 2 + + b M z M )X = b 0X + b 1(z 1 X) + b 2(z 2 X) + + b M (z M X) Y X = b0 + b1z 1 + b 2z 2 + + b M z M 2 This is sometimes referred to as the direct form (DF). This implements well in a DSP with one or two MAC units. Can do all the MACs accumulating into a bitrich accumulator. Once all the sums are formed truncate/round then saturate and finally use/store the result. Well suited to a pipelined implementation EECS 452 Fall 2014 Lecture 8 Page 8/32 Thurs 10/4/2012

Transposed FIR block diagram Y = (b 0 + b 1z 1 + b 2z 2 + + b M z M )X = b 0X + (b 1X)z 1 + (b 2X)z 2 + + (b M X)z M ñ Ä M ò JN ó Y X = b0 + b1z 1 + b 2z 2 + + b M z M This is sometimes referred to as the transposed direct form (TDF) or the broadcast form. Ä N Ä O ò JN Well suited for cascade implementation. Ä jjn ò JN Ä j EECS 452 Fall 2014 Lecture 8 Page 9/32 Thurs 10/4/2012

FIR Direct form hardware implementation Xilinx Application Note XAPP219 (v1.2) October 25, 2001 EECS 452 Fall 2014 Lecture 8 Page 10/32 Thurs 10/4/2012

FIR Transpose form hardware implementation Xilinx Application Note XAPP219 (v1.2) October 25, 2001 EECS 452 Fall 2014 Lecture 8 Page 11/32 Thurs 10/4/2012

Run time complexity? Q. How many MULT and ADD operations are needed to calculate y[n] = b 0 x[n] + b 1 x[n 1] + + b N 1 x[n N]? A. Could be as high as N ADDs and N + 1 MULTs. However simplifications can occur May be able to group certain operations to reduce computations. Some coefficients may be equal, e.g., b 0 = b 1 =... = b N y[n] = b 0 (x[n] + x[n 1] +... + x[n N]) Only a single MULT required. Values of coefficients or data may be integer powers of two, e.g. b n = 2 qn. In this case MULTs can be performed by register shifts. EECS 452 Fall 2014 Lecture 8 Page 12/32 Thurs 10/4/2012

The running average filter Running average filter (b 0 = b 1 = b 2 = = b N = 1/(N + 1)) has transfer function H(z) = 1 + z 1 + + z N. N + 1 This is the sum of a geometric series so has closed form H(z) = 1 z (N+1) 1 z 1 1 N + 1 Expressing this in (digital) frequency domain (z = e j2πf ) gives H(f) = 1 e j2π(n+1)f 1 e j2πf 1 N + 1 = e jπnf sin[π(n + 1)f] sin(πf) 1 N + 1. Because of the periodicity of e j2πf we need only focus on range 1/2 f < 1/2. Note that H(f) has linear phase EECS 452 Fall 2014 Lecture 8 Page 13/32 Thurs 10/4/2012

Running average filter magnitude 1 sin(πpf/fs) P sin(πf/fs) magnitude, P=2 magnitude, P=4 magnitude, P=8 0.8 0.6 0.4 0.2 0 0.5 0.4 0.3 0.2 0.1 0 0.1 0.2 0.3 0.4 0.5 0.8 0.6 0.4 0.2 1 0-0.5-0.4-0.3-0.2-0.1 0 0.1 0.2 0.3 0.4 0.5 0.8 0.6 0.4 0.2 1 Number of FIR filter coefficients: P = N + 1. Distance to first zero: 1/P. Nominal bandwidth: 1/P. First side peak at: 3/(2P ). First lobe level: P db 4 1.4 8 3.0 16 3.3 3.5 0-0.5-0.4-0.3-0.2-0.1 0 0.1 0.2 0.3 0.4 0.5 f/f s EECS 452 Fall 2014 Lecture 8 Page 14/32 Thurs 10/4/2012

More general FIR filter design Recall our equiripple design example (Lecture 2): Low pass filter. f s =48000 Hz. Bandpass ripple: ±0.1 db. Transition region 3000 Hz to 4000 Hz. Minimum stop band attenuation: 80 db. EECS 452 Fall 2014 Lecture 8 Page 15/32 Thurs 10/4/2012

fdatool s solution EECS 452 Fall 2014 Lecture 8 Page 16/32 Thurs 10/4/2012

fdatool s magnitude, phase and group delay EECS 452 Fall 2014 Lecture 8 Page 17/32 Thurs 10/4/2012

Impulse response (coefficient values) The filter impulse response has a delayed peak Delay of peak is approximately 1.7 msecs Delay corresponds to 80 integer units (1/2 of total length of filter). Note that the impulse response is symmetric about the peak EECS 452 Fall 2014 Lecture 8 Page 18/32 Thurs 10/4/2012

FIR filters can be designed with linear phase Objective: design FIR filter whose magnitude response H(f) meets constraints. Can design filter to have linear phase over passband. There are four FIR linear-phase types depending upon whether the number of coefficients is even or odd, whether the coefficients are even or odd symmetric. EECS 452 Fall 2014 Lecture 8 Page 19/32 Thurs 10/4/2012

Linear phase and FIR symmetry Given M-th order FIR filter h[n]. Assume that h[n] has even or odd symmetry about an integer m: Even symmetry condition: There exists an integer m such that h[m n] = h[n]. Odd symmetry condition: There exists an integer m such that h[m n] = h[n]. Then h[n] is a linear phase FIR filter with transfer function. H(f) = H m (f) e j2πfm+jφ where H m (f) is the transfer function associated with h m [n] = h[n + m] and φ = 0 if even symmetric while φ = π/2 if odd symmetric. Why? Because, H m (f) is the DTFT of a sequence {h m [n]} n that is symmetric about n = 0. Note: Symmetry condition cannot hold for (causal) IIR filters. EECS 452 Fall 2014 Lecture 8 Page 20/32 Thurs 10/4/2012

IIR filters H(z) = B(z) A(z) = b0 + b1z 1 + + b M z M 1 + a 1z 1 + + a N z N = (b 0 + b 1z 1 + + b M z M ) 1 1 + a 1z 1 + + a N z N = 1 1 + a 1z 1 + + a N z N (b0 + b1z 1 + + b M z M ) Without loss of (much) generality we will set M = N. EECS 452 Fall 2014 Lecture 8 Page 21/32 Thurs 10/4/2012

Comments on IIR Most authors use b i s as the numerator coefficients and a i s as the denominator coefficients. Writing the transfer function numerator first suggests implementing the zeros (the FIR part) first followed by the poles. Such a implementation is called direct form 1. Writing the transfer function denominator first suggests implementing the poles (the IIR or feedback part) first followed by zeros. Such an implementation is called direct form 2. EECS 452 Fall 2014 Lecture 8 Page 22/32 Thurs 10/4/2012

Direct forms 1 and 2 Direct Form 1 (DF1) H(z) = B(z) 1 A(z) Direct Form 2 (DF2) H(z) = 1 A(z) B(z) 0 0 n, d, d, n, n,1 d,1 d,1 n,1 n,2 d,2 d,2 n,2 n, 2 2 d, 2 d, n, 2 n, d, d, n, n, d, d, n, EECS 452 Fall 2014 Lecture 8 Page 23/32 Thurs 10/4/2012

Canonical direct form 2 0 0 d, n, d,1 n,1 d,2 n,2 2 2 d, n, 2 2 2 2 - d, n, d, n, a) Non-canonical Direct Form 2. b) DF2 in canonical form. EECS 452 Fall 2014 Lecture 8 Page 24/32 Thurs 10/4/2012

Comments on canonical form Have assumed N = M. If M > N then append a FIR filter of the necessary size. If M < N then set the appropriate b values equal to zero. The canonical form is canonical in the sense that it uses the minimum number of delay stages. We will often simply assume that direct form 2 filters are in canonical form. EECS 452 Fall 2014 Lecture 8 Page 25/32 Thurs 10/4/2012

Stability and minimum phase The transfer function (TF) is stable if the zeros (the transfer function poles) of 1 + a 1 z 1 + + a N z N lie within the unit circle in the z-plane. The locations of the zeros of b 0 + b 1 z 1 + + b M z M do not affect the stability of the TF. The zeros can lie anywhere on the z-plane. A TF that has all of its numerator zeros inside of the unit circle is said to have minimum phase. Minimum phase TFs are useful when designing inverse filters, e.g. FM pre-emphasis and de-emphasis. EECS 452 Fall 2014 Lecture 8 Page 26/32 Thurs 10/4/2012

IIR in Z-domain and time domain Fig. 6.14 from Lyons, Understanding DSP EECS 452 Fall 2014 Lecture 8 Page 27/32 Thurs 10/4/2012

IIR vs FIR. Which is better? All pole IIR lowpass filter (requires 5 multiply-adds): y[n] = 1.194y[n 1] 0.436y[n 2]+0.0605x[n]+0.121x[n 1]+0.0605x[n 2] Fig. 6.14 from Lyons, Understanding DSP EECS 452 Fall 2014 Lecture 8 Page 28/32 Thurs 10/4/2012

IIR vs FIR. Which is better?(ctd) Use fdatool: 5th order IIR lowpass filter (requires 10 multiply-adds): 10 tap FIR lowpass filter (requires 10 multiply-adds) Magnitude (db) and Phase Responses Magnitude (db) and Phase Responses 0 0.0164 0 0.145 10 0.770 10 0.8635 20 30 1.557 2.343 Magnitude (db) 20 30 40 1.5819 2.3003 3.0188 Phase (radians) Magnitude (db) 40 50 60 70 3.130 3.917 4.703 5.490 50 3.7372 80 6.277 60 4.4556 90 7.064 0 5 10 15 20 Frequency (khz), 0 5 10 15 20 Frequency (khz) Left: FIR equiripple 10 tap. Right: IIR elliptical 5th order. EECS 452 Fall 2014 Lecture 8 Page 29/32 Thurs 10/4/2012

Comments Both filters have passband cutoff freq f s/10 = 4800 and unity average magnitude response over passband. Both filters have the same number of multiply-adds. IIR has flatter passband, steeper rolloff, and lower sidelobes. Q. So why not always use IIR designs? A. IIR have disadvantages (causal) IIR filters have non-linear phase response. IIR filters can be very sensitive to coefficient quantization. IIR filters can suffer from severe arithmetic overflow at internal nodes. EECS 452 Fall 2014 Lecture 8 Page 30/32 Thurs 10/4/2012

Summary of what we covered today FIR filter forms (Direct Form and Transposed Direct Form) and linear phase IIR filters forms (Direct Form 1, Direct Form 2 and Canonical forms) IIR vs FIR filter designs EECS 452 Fall 2014 Lecture 8 Page 31/32 Thurs 10/4/2012

References Transposed Form FIR Filters, Vikram Pasham, Andy Miller, and Ken Chapman, Xilinx Application Note XAPP219 (v1.2), Oct 25, 2001. Understanding digital signal processing, R. Lyons, 2006. Digital signal processing, Proakis and Manolakis, 3rd Edition. EECS 452 Fall 2014 Lecture 8 Page 32/32 Thurs 10/4/2012