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

Similar documents
(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


4. Design of Discrete-Time Filters

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

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

Design of FIR Filters

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

Advanced Digital Signal Processing Part 5: Digital Filters

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

EEM478-DSPHARDWARE. WEEK12:FIR & IIR Filter Design

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

F I R Filter (Finite Impulse Response)

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

Digital Signal Processing

Digital Filters FIR and IIR Systems

EE 470 Signals and Systems

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

Experiment 4- Finite Impulse Response Filters

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

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

3F3 Digital Signal Processing (DSP)

Digital Filtering: Realization

Digital Processing of Continuous-Time Signals

Digital Processing of

Narrow-Band and Wide-Band Frequency Masking FIR Filters with Short Delay

ELEC3104: Digital Signal Processing Session 1, 2013

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

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

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

Multirate Digital Signal Processing

Lecture 17 z-transforms 2

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

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

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

EE 422G - Signals and Systems Laboratory

Digital Signal Processing

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

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

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

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

8: IIR Filter Transformations

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

Optimal FIR filters Analysis using Matlab

2.1 BASIC CONCEPTS Basic Operations on Signals Time Shifting. Figure 2.2 Time shifting of a signal. Time Reversal.

Electrical & Computer Engineering Technology

FIR Filter Design using Different Window Techniques

Signals and Systems Using MATLAB

Design of IIR Digital Filters with Flat Passband and Equiripple Stopband Responses

DESIGN OF FIR AND IIR FILTERS

EC6502 PRINCIPLES OF DIGITAL SIGNAL PROCESSING

Analog Lowpass Filter Specifications

Performance Analysis of FIR Digital Filter Design Technique and Implementation

ijdsp Workshop: Exercise 2012 DSP Exercise Objectives

Continuous-Time Analog Filters

Signal Processing Toolbox

CG401 Advanced Signal Processing. Dr Stuart Lawson Room A330 Tel: January 2003

Copyright S. K. Mitra

UNIT II IIR FILTER DESIGN

Digital Signal Processing

CHAPTER -2 NOTCH FILTER DESIGN TECHNIQUES

Continuous-Time Signal Analysis FOURIER Transform - Applications DR. SIGIT PW JAROT ECE 2221

ECE 203 LAB 2 PRACTICAL FILTER DESIGN & IMPLEMENTATION

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

Spring 2014 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Evans. Homework #2. Filter Analysis, Simulation, and Design

Gibb s Phenomenon Analysis on FIR Filter using Window Techniques

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

EELE 4310: Digital Signal Processing (DSP)

FIR Filters Digital Filters Without Feedback

Bibliography. Practical Signal Processing and Its Applications Downloaded from

(i) Understanding the basic concepts of signal modeling, correlation, maximum likelihood estimation, least squares and iterative numerical methods

Understanding Digital Signal Processing

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

Signal processing preliminaries

Digital Signal Processing for Audio Applications

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

Concordia University. Discrete-Time Signal Processing. Lab Manual (ELEC442) Dr. Wei-Ping Zhu

FIR Filters in Matlab

System analysis and signal processing

CS3291: Digital Signal Processing

LECTURER NOTE SMJE3163 DSP

Frequency-Response Masking FIR Filters

Final Exam Practice Questions for Music 421, with Solutions

ECE 421 Introduction to Signal Processing

FIR window method: A comparative Analysis

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

Designing Filters Using the NI LabVIEW Digital Filter Design Toolkit

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

Chapter 7 Filter Design Techniques. Filter Design Techniques

Biosignal filtering and artifact rejection. Biosignal processing I, S Autumn 2017

ASN Filter Designer Professional/Lite Getting Started Guide

Digital Filter Design using MATLAB

Octave Functions for Filters. Young Won Lim 2/19/18

Final Exam Solutions June 14, 2006

Electric Circuit Theory

Florida International University

ECE503: Digital Filter Design Lecture 9

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

CHAPTER 2 FIR ARCHITECTURE FOR THE FILTER BANK OF SPEECH PROCESSOR

EE 311 February 13 and 15, 2019 Lecture 10

Transcription:

DIGITAL FILTERS!! Finite Impulse Response (FIR)!! Infinite Impulse Response (IIR)!! Background!! Matlab functions 1!! Only the magnitude approximation problem!! Four basic types of ideal filters with magnitude responses as shown below (Piecewise flat) 2

!! These filters are unealisable because (one of the following is sufficient)!! their impulse responses infinitely long noncausal!! Their amplitude responses cannot be equal to a constant over a band of frequencies Another perspective that provides some understanding can be obtained by looking at the ideal amplitude squared. 3!! Consider the ideal LP response squared (same as actual LP response) 4

!! The realisable squared amplitude response transfer function (and its differential) is continuous in!! Such functions!! if IIR can be infinite at point but around that point cannot be zero.!! if FIR cannot be infinite anywhere.!! Hence previous defferential of ideal response is unrealisable 5!! A realisable response would effectively need to have an approximation of the delta functions in the differential!! This is a necessary condition 6

!! For example the magnitude response of a digital lowpass filter may be given as indicated below 7!! In the passband we require that with a deviation!! In the stopband we require that with a deviation 8

Filter specification parameters!! - passband edge frequency!! - stopband edge frequency!! - peak ripple value in the passband!! - peak ripple value in the stopband 9!! Practical specifications are often given in terms of loss function (in db)!!!! Peak passband ripple db!! Minimum stopband attenuation db 10

!! In practice, passband edge frequency and stopband edge frequency are specified in Hz!! For digital filter design, normalized bandedge frequencies need to be computed from specifications in Hz using 11!! Example - Let khz, khz, and khz!! Then 12

!! The transfer function H(z) meeting the specifications must be a causal transfer function!! For IIR real digital filter the transfer function is a real rational function of!! H(z) must be stable and of lowest order N or M for reduced computational complexity 13!! FIR real digital filter transfer function is a polynomial in (order N) with real coefficients!! For reduced computational complexity, degree N of H(z) must be as small as possible!! If a linear phase is desired then we must have:!! (More on this later) 14

!! Advantages in using an FIR filter - (1) Can be designed with exact linear phase (2) Filter structure always stable with quantised coefficients!! Disadvantages in using an FIR filter - Order of an FIR filter is considerably higher than that of an equivalent IIR filter meeting the same specifications; this leads to higher computational complexity for FIR 15 16

!! The transfer function is given by!! The length of Impulse Response is N!! All poles are at.!! Zeros can be placed anywhere on the z- plane 17 For phase linearity the FIR transfer function must have zeros outside the unit circle 18

!! To develop expression for phase response set transfer function (order n)!! In factored form!! Where, is real & zeros occur in conjugates 19!! Let where!! Thus 20

!! Expand in a Laurent Series convergent within the unit circle!! To do so modify the second sum as 21!! So that!! Thus!! where 22

!! are the root moments of the minimum phase component!! are the inverse root moments of the maximum phase component!! Now on the unit circle we have and 23!! hence (note Fourier form) 24

!! Thus for linear phase the second term in the fundamental phase relationship must be identically zero for all index values.!! Hence!! 1) the maximum phase factor has zeros which are the inverses of the those of the minimum phase factor!! 2) the phase response is linear with group delay (normalised) equal to the number of zeros outside the unit circle 25!! It follows that zeros of linear phase FIR trasfer functions not on the circumference of the unit circle occur in the form 26

!! For Linear Phase t.f. (order N-1)!!!! so that for N even: 27!! for N odd:!! I) On we have for N even, and +ve sign 28

!! II) While for ve sign!! [Note: antisymmetric case adds rads to phase, with discontinuity at ]!! III) For N odd with +ve sign 29!! IV) While with a ve sign!! [Notice that for the antisymmetric case to have linear phase we require The phase discontinuity is as for N even] 30

!! The cases most commonly used in filter design are (I) and (III), for which the amplitude characteristic can be written as a polynomial in 31 (i) Start with ideal infinite duration (ii) Truncate to finite length. (This produces unwanted ripples increasing in height near discontinuity.) (iii) Modify to Weight w(n) is the window 32

Commonly used windows!! Rectangular!! Bartlett!! Hann!! Hamming!!!! Blackman!!!! Kaiser 33!! Kaiser window! Transition width (Hz) 2.12 1.5/N 30 4.54 2.9/N 50 6.76 4.3/N 70 8.96 5.7/N 90 Min. stop attn db 34

! Lowpass filter of length 51 and 35! In this approach we are given need to find and! This is an interpolation problem and the solution is given in the DFT part of the course! It has similar problems to the windowing approach 36

!! Amplitude response for all 4 types of linear-phase FIR filters can be expressed as where 37!! Modified form of weighted error function where 38

!! Optimisation Problem - Determine which minimise the peak absolute value of over the specified frequency bands!! After has been determined, construct the original and hence h[n] 39 Solution is obtained via the Alternation Theorem The optimal solution has equiripple behaviour consistent with the total number of available parameters. Parks and McClellan used the Remez algorithm to develop a procedure for designing linear FIR digital filters. 40

Kaiser s Formula:!! ie N is inversely proportional to transition band width and not on transition band location 41!! Hermann-Rabiner-Chan s Formula: where with 42

!! Formula valid for!! For, formula to be used is obtained by interchanging and!! Both formulae provide only an estimate of the required filter order N!! If specifications are not met, increase filter order until they are met 43!! Fred Harris guide: where A is the attenuation in db!! Then add about 10% to it 44

MATLAB Resources!! Filter design toolbox (FIR and IIR)!! Functions!! Filter!! Filtfilt!! Rand and randn!! Xcorr!! Freqz, invfreqz, fvtool!! Poly, roots, conv, polyval, 45 This page is left blank 46

Standard approach (1) Convert the digital filter specifications into an analogue prototype lowpass filter specifications (2) Determine the analogue lowpass filter transfer function (3) Transform by replacing the complex variable to the digital transfer function 1!! This approach has been widely used for the following reasons: (1) Analogue approximation techniques are highly advanced (2) They usually yield closed-form solutions (3) Extensive tables are available for analogue filter design (4) Very often applications require digital simulation of analogue systems 2

!! Let an analogue transfer function be where the subscript a indicates the analogue domain!! A digital transfer function derived from this is denoted as 3!! Basic idea behind the conversion of into is to apply a mapping from the s-domain to the z-domain so that essential properties of the analogue frequency response are preserved!! Thus mapping function should be such that!! Imaginary ( ) axis in the s-plane be mapped onto the unit circle of the z-plane!! A stable analogue transfer function be mapped into a stable digital transfer function 4

!! To obtain G(z) replace s by f(z) in H(s)!! Start with requirements on G(z) G(z) Stable Real and Rational in z Order n L.P. (lowpass) cutoff Available H(s) Stable Real and Rational in s Order n L.P. cutoff 5!! Hence is real and rational in z of order one!! i.e.!! For LP to LP transformation we require!! Thus 6

!! The quantity is fixed from!! ie on!! Or!! and 7!! Transformation is unaffected by scaling. Consider inverse transformation with scale factor equal to unity!! For!! and so 8

!! Mapping of s-plane into the z-plane 9!! For with unity scalar we have or 10

!! Mapping is highly nonlinear!! Complete negative imaginary axis in the s-plane from to is mapped into the lower half of the unit circle in the z-plane from to!! Complete positive imaginary axis in the s- plane from to is mapped into the upper half of the unit circle in the z-plane from to 11!! Nonlinear mapping introduces a distortion in the frequency axis called frequency warping!! Effect of warping shown below 12

!! To transform a given lowpass transfer function to another transfer function that may be a lowpass, highpass, bandpass or bandstop filter (solutions given by Constantinides)!! has been used to denote the unit delay in the prototype lowpass filter and to denote the unit delay in the transformed filter to avoid confusion 13!! Unit circles in z- and -planes defined by!! Transformation from z-domain to -domain given by,!! Then 14

!! From, thus, hence!! Therefore must be a stable allpass function 15!! To transform a lowpass filter with a cutoff frequency to another lowpass filter with a cutoff frequency, the transformation is!! On the unit circle we have which yields 16

!! Solving we get!! Example - Consider the lowpass digital filter which has a passband from dc to with a 0.5 db ripple!! Redesign the above filter to move the passband edge to 17!! Here!! Hence, the desired lowpass transfer function is 18

!! The lowpass-to-lowpass transformation can also be used as highpass-tohighpass, bandpass-to-bandpass and bandstop-to-bandstop transformations 19!! Desired transformation!! The transformation parameter is given by where is the cutoff frequency of the lowpass filter and is the cutoff frequency of the desired highpass filter 20

!! Example - Transform the lowpass filter!! with a passband edge at to a highpass filter with a passband edge at!! Here!! The desired transformation is 21!! The desired highpass filter is 22

!! The lowpass-to-highpass transformation can also be used to transform a highpass filter with a cutoff at to a lowpass filter with a cutoff at!! and transform a bandpass filter with a center frequency at to a bandstop filter with a center frequency at 23!! Desired transformation 24

!! The parameters and are given by where is the cutoff frequency of the lowpass filter, and and are the desired upper and lower cutoff frequencies of the bandpass filter 25!! Special Case - The transformation can be simplified if!! Then the transformation reduces to where with denoting the desired center frequency of the bandpass filter 26

!! Desired transformation 27!! The parameters and are given by where is the cutoff frequency of the lowpass filter, and and are the desired upper and lower cutoff frequencies of the bandstop filter 28

! Filtering operation Time k Given OPERATION 1 signal 0 1 4.0 14.0 2 1.1 ADD 2.5 3-21.6 4.0 + 1.1-21.6-3.6 = -9.3 4-3.6-20.1 5-4.7-28.8 Filtering 2

Filtering + - 3 Filtering! Basic operations required! (a) Delay! (b) Addition! (c) Multiplication (Scaling) 4

Filtering: More general operation INPUT + + + + + + 5 OUTPUT Impulse response! Most general linear form! Recursive or Infinite Impulse Response (IIR) filters 6

A simple first order 7 Transfer function! For FIR 8

For IIR! Stability: Note that 9 Thus there is a pole at! if its magnitude is more than 1 then the impulse response increases without bound! if its magnitude is less than 1 decreases exponentially to zero! Frequency Response: Set and 10

So that! And hence! Compare with transfer function 11 In the initial example or! And thus 12

2-D z-transform! Example : 13! And hence (i) (ii) Separable transforms. Non-separable transforms. 14

2-D filters! Thus we can have! (a) FIR 2-D filters and! (b) IIR 2-D filters 15 Transfer function! For convolution set 16

Filtering a 02 a 01 a 00 a 12 a 11 a 10 a 22 a 21 a 20 Typical N 1 = N 2 = M 1 = M 2 IIR= 2 arrangement. b 02 b 01 b 12 b 11 b 10 b 22 b 21 b 20 17 (a) Separable filters (b) Non-separable filters is not expressible as a product of separate and independent factors 18

1 0 1 0 1 0 1 19 0 20

! Defined as power series! Examples: 1! And since! We get 2

! Define! +ve and > 1! +ve and = 1! +ve and < 1 3! We have! ie! Note that has a pole at on the z-plane. 4

Note:! (i) If magnitude of pole is > 1 then increases without bound! (ii) If magnitude of pole is < 1 then has a bounded variation! i.e. the contour crucial significance.! It is called the Unit circle on the z-plane is of 5 1 1 6

(i) Linearity! The z-transform operation is linear! Z! Where Z, i = 1, 2 (ii) Shift Theorem Z 7! Let!Z...! But for negative i. 8

Examples:! (i) Consider generation of new discrete time signal from via! Recall linearity and shift! (ii) Z write 9! From! With from earlier result Z! We obtain Z 10

! Given F(z) to determine.! Basic relationship is! may be obtained by power series expansion. It suffers from cumulative errors 11! Alternatively! Use for m = -1! otherwise! where closed contour! encloses origin 12

! Integrate to yield Examples! (i) write 13! And hence Pole at (ii) Let of Residue 14 where and! To determine

! From inversion formula! But 15! Hence! Thus 16

Note:! (i) For causal signals for negative i. Thus upper convolution summation limit is in this case equal to k.! (ii) Frequency representation of a discretetime signal is obtained from its z-transform by replacing where T is the sampling period of interest. (Justification will be given later.) 17