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

Similar documents
Digital Filters FIR and IIR Systems

Design of FIR Filters

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

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

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


F I R Filter (Finite Impulse Response)

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

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

4. Design of Discrete-Time Filters

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

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

EE 422G - Signals and Systems Laboratory

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

Experiment 4- Finite Impulse Response Filters

Advanced Digital Signal Processing Part 5: Digital Filters

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

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

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

Gibb s Phenomenon Analysis on FIR Filter using Window Techniques

Lecture Schedule: Week Date Lecture Title

Final Exam Practice Questions for Music 421, with Solutions

Multirate Digital Signal Processing

UNIT-II MYcsvtu Notes agk

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

Signals and Systems Lecture 6: Fourier Applications

EECE 301 Signals & Systems Prof. Mark Fowler

Signals and Systems Lecture 6: Fourier Applications

Design of FIR Filter for Efficient Utilization of Speech Signal Akanksha. Raj 1 Arshiyanaz. Khateeb 2 Fakrunnisa.Balaganur 3

Digital Signal Processing

FIR FILTER DESIGN USING A NEW WINDOW FUNCTION

EEM478-DSPHARDWARE. WEEK12:FIR & IIR Filter Design

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

FIR Filters Digital Filters Without Feedback

Digital Filters - A Basic Primer

2) How fast can we implement these in a system

Performance Analysis of FIR Digital Filter Design Technique and Implementation

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

DSP Filter Design for Flexible Alternating Current Transmission Systems

Optimal FIR filters Analysis using Matlab

CS3291: Digital Signal Processing

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

3F3 Digital Signal Processing (DSP)

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

EEO 401 Digital Signal Processing Prof. Mark Fowler

UNIVERSITY OF SWAZILAND

ECE503: Digital Filter Design Lecture 9

DESIGN OF FIR AND IIR FILTERS

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

Digital Processing of Continuous-Time Signals

EC6502 PRINCIPLES OF DIGITAL SIGNAL PROCESSING

ELEC3104: Digital Signal Processing Session 1, 2013

Digital Processing of

ijdsp Workshop: Exercise 2012 DSP Exercise Objectives

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

Digital Filtering: Realization

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)

Signals and Filtering

Experiment 2 Effects of Filtering

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

FIR Filter Design using Different Window Techniques

EE 470 Signals and Systems

Thank you! Estimation + Information Theory. ELEC 3004: Systems 1 June

Digital Filter Design using MATLAB

Design of a Sharp Linear-Phase FIR Filter Using the α-scaled Sampling Kernel

CHAPTER 2 FIR ARCHITECTURE FOR THE FILTER BANK OF SPEECH PROCESSOR

Keywords FIR lowpass filter, transition bandwidth, sampling frequency, window length, filter order, and stopband attenuation.

ECE 421 Introduction to Signal Processing

NOVEMBER 13, 1996 EE 4773/6773: LECTURE NO. 37 PAGE 1 of 5

Brief Introduction to Signals & Systems. Phani Chavali

GUJARAT TECHNOLOGICAL UNIVERSITY

ELEC Dr Reji Mathew Electrical Engineering UNSW

Simulation Based Design Analysis of an Adjustable Window Function

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

Design Digital Non-Recursive FIR Filter by Using Exponential Window

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

Filters. Phani Chavali

Designing Filters Using the NI LabVIEW Digital Filter Design Toolkit

Digital Signal Processing for Audio Applications

ECE 4213/5213 Homework 10

Frequency-Response Masking FIR Filters

CHAPTER -2 NOTCH FILTER DESIGN TECHNIQUES

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

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

Design of IIR Half-Band Filters with Arbitrary Flatness and Its Application to Filter Banks

Electrical & Computer Engineering Technology

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

A comparative study on main lobe and side lobe of frequency response curve for FIR Filter using Window Techniques

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.

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

Discrete Fourier Transform (DFT)

FINITE IMPULSE RESPONSE (FIR) FILTERS

Signals and Systems Using MATLAB

Sampling of Continuous-Time Signals. Reference chapter 4 in Oppenheim and Schafer.

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

Department of Electrical and Electronics Engineering Institute of Technology, Korba Chhattisgarh, India

FIR Filters in Matlab

Design of infinite impulse response (IIR) bandpass filter structure using particle swarm optimization

Digital FIR LP Filter using Window Functions

Outline. Introduction to Biosignal Processing. Overview of Signals. Measurement Systems. -Filtering -Acquisition Systems (Quantisation and Sampling)

Transcription:

http://elec3004.com Digital Filters IIR (& Their Corresponding Analog Filters) 2017 School of Information Technology and Electrical Engineering at The University of Queensland Lecture Schedule: Week Date Lecture Title 1 28-Feb Introduction 2-Mar Systems Overview 2 7-Mar Systems as Maps & Signals as Vectors 9-Mar Systems: Linear Differential Systems 3 14-Mar Sampling Theory & Data Acquisition 16-Mar Aliasing & Antialiasing 4 21-Mar Discrete Time Analysis & Z-Transform 23-Mar Second Order LTID (& Convolution Review) 5 28-Mar Frequency Response 30-Mar Filter Analysis 4-Apr Digital Filters (IIR) & Filter Analysis 6 6-Apr Digital Filter (FIR) 11-Apr Digital Windows 7 13-Apr FFT 18-Apr 20-Apr Holiday 25-Apr 8 27-Apr Active Filters & Estimation 2-May Introduction to Feedback Control 9 4-May Servoregulation/PID 9-May Introduction to (Digital) Control 10 11-May Digitial Control 16-May Digital Control Design 11 18-May Stability 23-May Digital Control Systems: Shaping the Dynamic Response 12 25-May Applications in Industry 30-May System Identification & Information Theory 13 1-Jun Summary and Course Review ELEC 3004: Systems 6 April 2017 2 1

Follow Along Reading: B. P. Lathi Signal processing and linear systems 1998 TK5102.9.L38 1998 Today Chapter 10 (Discrete-Time System Analysis Using the z-transform) 10.3 Properties of DTFT 10.5 Discrete-Time Linear System analysis by DTFT 10.7 Generalization of DTFT to the Z Transform Chapter 12 (Frequency Response and Digital Filters) 12.1 Frequency Response of Discrete-Time Systems 12.3 Digital Filters 12.4 Filter Design Criteria 12.7 Nonrecursive Filters ELEC 3004: Systems 6 April 2017 3 Announcements Lab next week Only on Thursday (April 14) No lab sessions on the other days of the week Thanks! ELEC 3004: Systems 6 April 2017 4 2

Follow Along Reading: B. P. Lathi Signal processing and linear systems 1998 TK5102.9.L38 1998 Today Chapter 10 (Discrete-Time System Analysis Using the z-transform) 10.3 Properties of DTFT 10.5 Discrete-Time Linear System analysis by DTFT 10.7 Generalization of DTFT to the Z Transform Chapter 12 (Frequency Response and Digital Filters) 12.1 Frequency Response of Discrete-Time Systems 12.3 Digital Filters 12.4 Filter Design Criteria 12.7 Nonrecursive Filters ELEC 3004: Systems 6 April 2017 5! ELEC 3004: Systems 6 April 2017 6 3

** FIR Filter Design ** How to get all these coefficients? FIR Design Methods: 1. Impulse Response Truncation + Simplest Undesirable frequency domain-characteristics, not very useful 2. Windowing Design Method + Simple Not optimal (not minimum order for a given performance level) 3. Optimal filter design methods + More optimal Less simple ELEC 3004: Systems 6 April 2017 7 FIR Filter Design & Operation Ex: Lowpass FIR filter Set Impulse response (order n = 21) Determine h(t) h(t) is a 20 element vector that we ll use to as a weighted sum FFT ( Magic ) gives Frequency Response & Phase ELEC 3004: Systems 6 April 2017 8 4

Why is this hard? Looking at the Low-Pass Example Why is this hard? Shouldn t it be easy?? just hit it with some FFT magic and then keep the bands we want and then hit it with some Inverse-FFT supermagic??? Remember we need a system that does this rectangle function in frequency Let s consider what that means It basically suggests we need an Inverse FFT of a rectangle function ELEC 3004: Systems 6 April 2017 9 Fourier Series & Rectangular Functions Ref: http://cnx.org/content/m26719/1.1/ http://www.wolframalpha.com/input/?i=ifft%28sinc%28f%29%29 See: Ref: http://cnx.org/content/m32899/1.8/ http://www.thefouriertransform.com/pairs/box.php Table 7.1 (p. 702) Entry 17 & Table 9.1 (p. 852) Entry 7 ELEC 3004: Systems 6 April 2017 10 5

[2] Fourier Series & Rectangular Functions The function might look familiar This is the frequency content of a square wave (box) Ref: http://www.wolframalpha.com/input/?i=fft%28rect%28t%29%29 http://cnx.org/content/m32899/1.8/ This also applies to signal reconstruction! Whittaker Shannon interpolation formula This says that the better way to go from Discrete to Continuous (i.e. D to A) is not ZOH, but rather via the sinc! ELEC 3004: Systems 6 April 2017 11 FIR and Low Pass Filters However!! a is non-causal and infinite in duration Has impulse response: Thus, to filter an impulse train with an ideal low-pass filter use: And, this cannot be implemented in practice we need to know all samples of the input, both in the past and in the future ELEC 3004: Systems 6 April 2017 12 6

Plan 0: Impulse Response Truncation Maybe we saw this coming Clip off the at some large n Ripples in both passband/stopband and the transition not abrupt (i.e., a transition band). As M, transition band 0 (as expected!) ELEC 3004: Systems 6 April 2017 13 FIR Filters: Window Function Design Method Windowing: a generalization of the truncation idea There many, many window functions: Rectangular Triangular Hanning Hamming Blackman Kaiser Lanczos Many More (see: http://en.wikipedia.org/wiki/window_function) ELEC 3004: Systems 6 April 2017 14 7

Digital Filters Types FIR From H(z): IIR Impulse response function that is non-zero over an infinite length of time. Filter becomes a multiply, accumulate, and delay system: ELEC 3004: Systems 6 April 2017 15 FIR Properties Require no feedback. Are inherently stable. They can easily be designed to be linear phase by making the coefficient sequence symmetric Flexibility in shaping their magnitude response Very Fast Implementation (based around FFTs) The main disadvantage of FIR filters is that considerably more computation power in a general purpose processor is required compared to an IIR filter with similar sharpness or selectivity, especially when low frequency (relative to the sample rate) cutoffs are needed. ELEC 3004: Systems 6 April 2017 16 8

FIR as a class of LTI Filters Transfer function of the filter is Finite Impulse Response (FIR) Filters: (N = 0, no feedback) From H(z): H(ω) is periodic and conjugate Consider ω [0, π] ELEC 3004: Systems 6 April 2017 17 FIR Filters Let us consider an FIR filter of length M Order N=M-1 (watch out!) Order number of delays ELEC 3004: Systems 6 April 2017 18 9

FIR Impulse Response Obtain the impulse response immediately with x(n)= δ(n): The impulse response is of finite length M (good!) FIR filters have only zeros (no poles) (as they must, N=0!!) Hence known also as all-zero filters FIR filters also known as feedforward or non-recursive, or transversal filters ELEC 3004: Systems 6 April 2017 19 FIR & Linear Phase The phase response of the filter is a linear function of frequency Linear phase has constant group delay, all frequency components have equal delay times. No distortion due to different time delays of different frequencies FIR Filters with: Ref: Wikipedia (Linear Phase) ELEC 3004: Systems 6 April 2017 20 10

FIR & Linear Phase Four Types Ref: Wikipedia (Linear Phase) Type 1: most versatile Type 2: frequency response is always 0 at ω=π (not suitable as a high-pass) Type 3 and 4: introduce a π/2 phase shift, 0 at ω=0 (not suitable as a high-pass) ELEC 3004: Systems 6 April 2017 21 Digital Windows! (Preview Edition) ELEC 3004: Systems 6 April 2017 22 11

Some Window Functions [1] 1. Rectangular ELEC 3004: Systems 6 April 2017 23 Windowing and its effects/terminology Lathi, Fig. 7.45 ELEC 3004: Systems 6 April 2017 24 12

Some More Window Functions 2. Triangular window And Bartlett Windows A slightly narrower variant with zero weight at both ends: ELEC 3004: Systems 6 April 2017 25 Some More Window Functions 3. Generalized Hamming Windows Hanning Window Hamming s Window ELEC 3004: Systems 6 April 2017 26 13

Some More Window Functions 4. Blackman Harris Windows A generalization of the Hamming family, Adds more shifted functions for less side-lobe levels ELEC 3004: Systems 6 April 2017 27 Some More Window Functions 5. Kaiser window A DPSS (discrete prolate spheroidal sequence) Maximize the energy concentration in the main lobe Where: I 0 is the zero-th order modified Bessel function of the first kind, and usually α = 3. ELEC 3004: Systems 6 April 2017 28 14

Comparison of Alternative Windows Time Domain Punskaya, Slide 90 ELEC 3004: Systems 6 April 2017 29 Comparison of Alternative Windows Frequency Domain Punskaya, Slide 91 ELEC 3004: Systems 6 April 2017 30 15

Adding Order + Transition and Smoothness Increased Size Punskaya, Slide 94 ELEC 3004: Systems 6 April 2017 31 Summary Characteristics of Common Window Functions Lathi, Table 7.3 Punskaya, Slide 92 ELEC 3004: Systems 6 April 2017 32 16

BREAK ELEC 3004: Systems 6 April 2017 33 Back to! ELEC 3004: Systems 6 April 2017 34 17

Filter Design Using Windows ELEC 3004: Systems 6 April 2017 35 Filter Design Using Windows ELEC 3004: Systems 6 April 2017 36 18

FIR: Rectangular & Hanning Windows Rectangular Hanning Hanning: Less ripples, but wider transition band Punskaya, Slide 93 ELEC 3004: Systems 6 April 2017 37 Windowed FIR Property 1: Equal transition bandwidth Equal transition bandwidth on both sides of the ideal cutoff frequency Punskaya, Slide 96 ELEC 3004: Systems 6 April 2017 38 19

Windowed FIR Property 2: Peak Errors same in Passband & Stopband Punskaya, Slide 96 Peak approximation error in the passband (1+δ 1-δ) is equal to that in the stopband (δ -δ) ELEC 3004: Systems 6 April 2017 39 Windowed FIR Property 3: Mainlobe Width Punskaya, Slide 99 The distance between approximation error peaks is approximately equal to the width of the mainlobe Δw m ELEC 3004: Systems 6 April 2017 40 20

Windowed FIR Property 4: Mainlobe Width [2] The width of the mainlobe is wider than the transition bandwidth Punskaya, Slide 96 ELEC 3004: Systems 6 April 2017 41 Windowed FIR Property 5: Peak Δδ is determined by the window shape Punskaya, Slide 96 peak approximation error is determined by the window shape, independent of the filter order ELEC 3004: Systems 6 April 2017 42 21

Window Design Method Design Terminology Where: ω c : cutoff frequency δ: maximum passband ripple Δω: transition bandwidth Punskaya, Slide 96 Δω m : width of the window mainlobe ELEC 3004: Systems 6 April 2017 43 Passband / stopband ripples ω s and ω p : Corner Frequencies Passband / stopband ripples are often expressed in db: passband ripple = 20 log 10 (1+δ p ) db peak-to-peak passband ripple 20 log 10 (1+2δ p ) db minimum stopband attenuation = -20 log 10 (δ s ) db ELEC 3004: Systems 6 April 2017 44 22

Passband / stopband ripples ω s and ω p : Corner Frequencies Passband / stopband ripples are often expressed in db: passband ripple = 20 log 10 (1+δ p ) db = 20 log 10 (δ p ) db peak-to-peak passband ripple 20 log 10 (1+2δ p ) db 20 log 10 (2δ p ) db minimum stopband attenuation = -20 log 10 (δ s ) db =20 log 10 (δ s ) db ELEC 3004: Systems 6 April 2017 45 Summary of Design Procedure 1. Select a suitable window function 2. Specify an ideal response H d (ω) 3. Compute the coefficients of the ideal filter h d (n) 4. Multiply the ideal coefficients by the window function to give the filter coefficients 5. Evaluate the frequency response of the resulting filter and iterate if necessary (e.g. by increasing M if the specified constraints have not been satisfied). Punskaya, Slide 105 ELEC 3004: Systems 6 April 2017 46 23

Windowed Filter Design Example Design a type I low-pass filter with: ωp =0.2π ωs =0.3π δ =0.01 ELEC 3004: Systems 6 April 2017 47 Windowed Filter Design Example: Step 1: Select a suitable Window Function LP with: ωp =0.2π, ωs =0.3π, δ =0.01 δ =0.01: The required peak error spec: Hanning Window -20log10 (δ) = 40 db Main-lobe width: ω s -ω p =0.3π-0.2π =0.1π 0.1π = 8π / M Filter length M 80 & Filter order N 79 BUT, Type-I filters have even order so N = 80 ELEC 3004: Systems 6 April 2017 48 24

Windowed Filter Design Example: Step 2: Specify the Ideal Response From Property 1 (Midpoint rule) ω c = (ω s + ω p )/2 = (0.2π+0.3π)/2 = 0.25π An ideal response will be: ELEC 3004: Systems 6 April 2017 49 Windowed Filter Design Example: Step 3: Compute the coefficients of the ideal filter The ideal filter coefficients h d are given by the Inverse Discrete time Fourier transform of H d (ω) + Delayed impulse response (to make it causal) Coefficients of the ideal filter (via equation or IFFT): ELEC 3004: Systems 6 April 2017 50 25

Windowed Filter Design Example: Step 4: Multiply to obtain the filter coefficients Multiply by a Hamming window function for the passband: ELEC 3004: Systems 6 April 2017 51 Windowed Filter Design Example: Step 5: Evaluate the Frequency Response and Iterate The frequency response is computed as the DFT of the filter coefficient vector If the resulting filter does not meet the specifications, then: Adjust the ideal filter frequency response (for example, move the band edge) and repeat (step 2) Adjust the filter length and repeat (step 4) change the window (& filter length) (step 4) And/Or consult with Matlab: FIR1 and FIR2 B=FIR2(N,F,M): Designs a Nth order FIR digital filter with ELEC 3004: Systems 6 April 2017 52 26

Windowed Filter Design Example: Consulting Matlab: FIR1 and FIR2 B=FIR2(N,F,M): Designs a Nth order FIR digital filter F and M specify frequency and magnitude breakpoints for the filter such that plot(n,f,m) shows a plot of desired frequency Frequencies F must be in increasing order between 0 and Fs/2, with Fs corresponding to the sample rate. B is the vector of length N+1, it is real, has linear phase and symmetric coefficients Default window is Hamming others can be specified ELEC 3004: Systems 6 April 2017 53 Frequency Response of Discrete-Time Systems ELEC 3004: Systems 6 April 2017 54 27

Frequency Response of Discrete-Time Systems ELEC 3004: Systems 6 April 2017 55 Frequency Response of Discrete-Time Systems ELEC 3004: Systems 6 April 2017 56 28

Frequency Response of Discrete-Time Systems ELEC 3004: Systems 6 April 2017 57 Next Time Digital Windows Review: Chapter 12 of Lathi A signal has many signals [Unless it s bandlimited. Then there is the one ω] ELEC 3004: Systems 6 April 2017 58 29

In Conclusion FIR Filters are digital (can not be implemented in analog) and exploit the difference and delay operators A window based design builds on the notion of a truncation of the ideal box-car or rectangular low-pass filter in the Frequency domain (which is a sinc function in the time domain) Other Design Methods exist: Least-Square Design Equiripple Design Remez method The Parks-McClellan Remez algorithm Optimisation routines ELEC 3004: Systems 6 April 2017 59 30