Chapter 6 Infinite Impulse Response Filter Design.

Slides:



Advertisements
Similar presentations
Chapter 15 Infinite Impulse Response (IIR) Filter Implementation
Advertisements

Design of Digital IIR Filter
Digital Signal Processing IIR Filter IIR Filter Design by Approximation of Derivatives Analogue filters having rational transfer function H(s) can be.
Nonrecursive Digital Filters
ECE 8443 – Pattern Recognition EE 3512 – Signals: Continuous and Discrete Objectives: Filters and Difference Equations Signal Flow Graphs FIR and IIR Filters.
EE513 Audio Signals and Systems Digital Signal Processing (Synthesis) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Signal and System IIR Filter Filbert H. Juwono
CHAPTER 7 Digital Filter Design Wang Weilian School of Information Science and Technology Yunnan University.
Filtering Filtering is one of the most widely used complex signal processing operations The system implementing this operation is called a filter A filter.
Infinite Impulse Response (IIR) Filters
1 BIEN425 – Lecture 13 By the end of the lecture, you should be able to: –Outline the general framework of designing an IIR filter using frequency transform.
ECE651 Digital Signal Processing I Digital IIR Filter Design.
So far We have introduced the Z transform
Digital Signal Processing – Chapter 11 Introduction to the Design of Discrete Filters Prof. Yasser Mostafa Kadah
Unit 9 IIR Filter Design 1. Introduction The ideal filter Constant gain of at least unity in the pass band Constant gain of zero in the stop band The.
LINEAR-PHASE FIR FILTERS DESIGN
AGC DSP AGC DSP Professor A G Constantinides 1 Digital Filter Specifications Only the magnitude approximation problem Four basic types of ideal filters.
EE313 Linear Systems and Signals Fall 2010 Initial conversion of content to PowerPoint by Dr. Wade C. Schwartzkopf Prof. Brian L. Evans Dept. of Electrical.
Practical Signal Processing Concepts and Algorithms using MATLAB
EE513 Audio Signals and Systems Digital Signal Processing (Systems) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
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.
Chapter 7 IIR Filter Design
Filter Design Techniques
EE Audio Signals and Systems Digital Signal Processing (Synthesis) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
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.
Chapter 8 Design of infinite impulse response digital filter.
Copyright ©2010, ©1999, ©1989 by Pearson Education, Inc. All rights reserved. Discrete-Time Signal Processing, Third Edition Alan V. Oppenheim Ronald W.
Lecture 10: IIR Filter Designs XILIANG LUO 2014/11 1.
BIEN425 – Lecture 14 By the end of the lecture, you should be able to:
Dan Ellis 1 ELEN E4810: Digital Signal Processing Topic 8: Filter Design: IIR 1.Filter Design Specifications 2.Analog Filter Design 3.Digital.
1 Digital Signal Processing. 2 Digital Signal Processing Topic 8: Filter Design: IIR 1. Filter Design Specifications 2. Analog Filter Design 3. Digital.
2/17/2007DSP Course-IUST-Spring Semester 1 Digital Signal Processing Electrical Engineering Department Iran University of Science & Tech.
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
Chapter 9-10 Digital Filter Design. Objective - Determination of a realizable transfer function G(z) approximating a given frequency response specification.
1 Conditions for Distortionless Transmission Transmission is said to be distortion less if the input and output have identical wave shapes within a multiplicative.
Lecturer: Dr Igor Khovanov Office: D207 Syllabus: Biomedical Signal Processing. Examples of signals. Linear System Analysis. Laplace.
Lecture 5 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)1 BME 452 Biomedical Signal Processing Lecture 5  Digital filtering.
Copyright © 2003 Texas Instruments. All rights reserved. DSP C5000 Chapter 15 Infinite Impulse Response (IIR) Filter Implementation.
EE422 Signals and Systems Laboratory Infinite Impulse Response (IIR) filters Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Chapter 7. Filter Design Techniques
1 Digital Signal Processing Digital Signal Processing  IIR digital filter structures  Filter design.
First-Order System Revisited
Nov '03csDSP61 CS3291: Section 6 IIR discrete time filter design Introduction: Many design techniques for IIR discrete time filters have adopted ideas.
FILTER DESIGN Ideal Filter Magnitude Response NumericLogaritmic.
Digital Signal Processing Lecture 6 Frequency Selective Filters
Finite Impulse Response Filtering EMU-E&E Engineering Erhan A. Ince Dec 2015.
 What is Filter ? A Filter is an electrical network that can transmit signal within a specified frequency range. This Frequency range is called PASS BAND.
Professor A G Constantinides 1 Digital Filter Specifications We discuss in this course only the magnitude approximation problem There are four basic types.
Digital Signal Processing
IIR Filter design (cf. Shenoi, 2006)
UNIT - 5 IIR FILTER DESIGN.
Lecture: IIR Filter Design
Speech Signal Processing
IIR Filters FIR vs. IIR IIR filter design procedure
Infinite Impulse Response (IIR) Filters
Chapter 6 IIR Digital Filter Design
EE Audio Signals and Systems
Chapter 8 Design of Infinite Impulse Response (IIR) Digital Filter
ME2300 DIGITAL SIGNAL PROCESSING [Slide 6] IIR Filter Design BY DREAMCATCHER
3.4 Frequency-domain Filters
Infinite Impulse Response Filters
Usıng the impulse sampling method Prepared by: Dr. Erhan A. INCE
Chapter 7 Finite Impulse Response(FIR) Filter Design
Chapter 7 Finite Impulse Response(FIR) Filter Design
DIGITAL SIGNAL PROCESSING WITH MATLAB
Presentation transcript:

Chapter 6 Infinite Impulse Response Filter Design

Objectives Describe the general concepts and approaches in IIR filter design. Demonstrate the design of digital oscillators by pole location. Demonstrate the design of sharp notch filters by pole-zero location. Describe the characteristics of the four types of classical prototype analog filters Demonstrate the design of analog filter prototypes with MATLAB®. Derive and describe the bilinear transformation. Demonstrate the bilinear transformation method of IIR filter design. Demonstrate the use of MATLAB functions for IIR design of filters with the response of classical analog filters. Demonstrate the effect of coefficient quantization on the performance of IIR filters.

Concepts in IIR Filter Design The frequency response of a DSP filter is the value of the z-domain transfer function on the unit circle The location of the poles and zeros determines the shape of the transfer function in the complex plane The poles must be inside the unit circle for stability

Typical IIR Filter Designs Digital Oscillators Notch Filters Digital Equivalents of Classical Analog Prototypes: –Butterworth –Chebyshev I –Chebyshev II –Elliptic or Cauer

Digital Oscillators Oscillator with frequency Ω 0 H(z) Impulse Digital Sinusoid X(z) Y(z)

Digital Oscillator Transfer Function Ω 0 is the oscillator digital frequency in radians A is the amplitude of the resulting sinusoid Often called a “two-pole resonator” because the transfer function has 2 poles at +/- Ω 0 exactly on the unit circle (“meta-stable”) For Hertzian frequencies use Ω = 2πf/f s

Oscillator Design Example Design an oscillator with a frequency of 200 Hz in a system operating with a sampling frequency of 8 kHz. The MATLAB solution is: >> f=200; >> fs=8000; >> omega=2*pi*f/fs; >> b=[0,sin(omega)]; >> a=[1,-2*cos(omega),1]; >> fvtool(b,a) % Use fvtool to display various results

Oscillator Design Example Results At a sampling frequency of 8 kHz each sample is ms. 40 samples = 5 ms = the period of a 200 Hz sine function.

Oscillator Design Example Results Pole locations = ±Ω 0 = ±2π (200/8000) = ± radians

Notch Filters Notch filters are designed by “pole/zero location” The zeros are located at the Ω notch frequencies Poles are placed close to the zeros locations, just inside the unit circle, to control the notch width. A gain factor is included to hold the filter gain to unity at all other frequencies Notch filters for multiple frequencies can be designed by cascading filters or, equivalently, by convolving the “a” and “b” coefficient vectors of individual filters

Notch Filter Transfer Function The following is the transfer function for a notch filter for a notch frequency Ω 0 and -3 dB width ΔΩ (or quality factor Q). The parameter r is the pole radius. The gain factor is g 0. Note the trade-off between pole radius and notch width.

Notch Filter Design Example Design a notch filter in MATLAB with a notch frequency of Ω 0 = π/4 and a Q factor of 20 >> omega=pi/4; >> Q=20; >> delta_omega=omega/Q; >> r=1-delta_omega/2; >> g=abs(1-2*r*cos(omega)+r^2)/(2*abs(1-cos(omega))); % The g0 factor >> bn=g*[1,-2*cos(omega),1]; % The b coefficients of the notch filter >> an=[1,-2*r*cos(omega),r^2]; %The a coefficients of the notch filter >> fvtool(bn,an)

Design Example Results

Note the zeros on the unit circle and corresponding poles just inside the unit circle at Ω 0 = π/4

Analog Filter Prototypes

Filter Specifications

Transfer Functions Analog Filter: Digital Filter:

MATLAB Prototype Filter Design Commands [B,A] = BUTTER(N,Wn) [B,A] = CHEBY1(N,R,Wn) [B,A] = CHEBY2(N,R,Wn) [B,A] = ELLIP(N,Rp,Rs,Wn) –N = filter order –R = pass band ripple (cheby1) or stop-band ripple (cheby2) in dB. (Rp and Rs respectively for the elliptic filter) –Wn = cut-off frequency (radians/sec for analog filters or normalized digital frequencies for digital filters) –[B,A] = filter coefficients, s-domain (analog filter) or z- domain (digital filter)

Analog Design Example Design an order 4 Elliptic analog filter with a cutoff frequency of 10 Hz, a maximum pass-band ripple of 1 dB, and a minimum stop-band attenuation of -20 dB. >> cutoff=2*pi*10; % Set the filter parameters >> order=4; >> Rp=1; >> Rs=20; >> [b,a]=ellip(order,Rp,Rs,cutoff,'s'); % Note the “s” option for an analog filter >> W=linspace(0,2*pi*20); % Create a 100 point linear frequency vector 0 to 20 Hz >> [H,f]=freqs(b,a,W); % The freqs command returns the complex value of the transfer function for the frequency vector W (copied into the vector f) >> plot(f/(2*pi),abs(H)) % Plot the magnitude of H versus the frequency in Hertz >> title('Order 4 Elliptic Filter with 10 Hz Cutoff Frequency') >> xlabel('Frequency, Hz') >> ylabel('Magnitude Response')

Analog Design Example Results

Digital Design of Analog Prototypes The Bilinear Transformation The bilinear transformation maps the complex variable “s” in the analog transfer function to the complex variable “z” in the digital transfer function

Bilinear Transformation Mapping

“Pre-Warping” Equation

Design Steps for a DSP Implementation of an Analog Design Determine the desired cut-off frequency for the digital filter, Ω 0 Compute the equivalent cut-off frequency for the analog filter, ω 0, using the pre- warping equation. Design the analog filter (i.e., find its a and b coefficient vectors) Using the bi-linear transformation (s →z), compute the coefficients of the digital filter

MATLAB IIR Design Tools General Design Approach The MATLAB method for IIR filter design is a two command process; first, to determine the order and critical frequencies, second to compute the filter coefficients. For the a Butterworth filter: [N, Wn] = BUTTORD(Wp, Ws, Rp, Rs) [B,A] = BUTTER(N,Wn,'type') where the option “type” can be either “high” or “stop” if specified. The command parameters are: –Wp = Ω pass-band edges in units of π –Ws = Ω stop-band edges in units of π –Rp = pass-band ripple in dB –Rs = stop-band ripple in dB

Design Example Filter Specifications: –Butterworth response –Pass-band edges = 400 Hz and 600 Hz –Stop-band edges = 300 Hz and 700 Hz –Pass-band ripple = 1 dB –Stop-band attenuation = -20 dB –Sampling Frequency = 2000 Hz

MATLAB Code for Design Example >> fs=2000; >> Wp=[2*400/fs,2*600/fs]; % Normalized digital frequencies of pass-band edges >> Ws=[2*300/fs,2*700/fs]; % Normalized digital frequencies of stop-band edges >> [N,Wn]=buttord(Wp,Ws,1,20); % The “order” command >> [B,A]=butter(N,Wn); % The “filter” command >> fvtool(B,A)

Design Example Results Band Edges (-1dB and -20 dB)

Design Example Chebyshev II High-Pass Filter Filter specifications: –Chebyshev II response (stop-band ripple) –Pass-band edge = 1000 Hz –Stop-band edge = 900 Hz –Pass-band ripple = 1 dB –Stop-band attenuation = -40 dB –Sampling frequency = 8 kHz

MATLAB Code for Design Example >> fs=8000; >> Wp=[2*1000/fs]; % Pass-band edge normalized digital frequency >> Ws=[2*900/fs]; % Stop-band edge normalized digital frequency >> [N,Wn]=cheb2ord(Wp,Ws,1,40); % The “order” command >> [B,A]=cheby2(N,40,Wn,'high'); % cheby2 is the “filter” command. In this command % the syntax requires the stop-band attenuation % as the second parameter >> fvtool(B,A)

Design Example Results

Comparison of an Elliptic Filter with a Parks-McClellan Design Filter Specification: –Low-pass response –Pass-band edge = 475 Hz –Stop-band edge = 525 Hz (i.e., a transition width of 50 Hz) –Pass-band ripple less than 0.01 in absolute terms ( = 20log10(1-.01) = dB) –Stop-band attenuation greater than -40 dB (= 0.01 ripple in absolute terms) –Sampling frequency = 2000 Hz

Finding the Order of a P-M Design [N,Fo,Ao,W] = FIRPMORD(F,A,DEV,Fs) B = FIRPM(N,Fo,Ao,W) –N = order –F = band edges, Ω in units of π, or in Hz if Fs is specified –A = amplitudes corresponding to the bands defined by the edges in F [length(F) must be 2*length(A)-2] –DEV = deviation (ripple) in each band defined by F in absolute units (not dB) –Fs = sampling frequency in Hz

P-M Design to Specifications >> F = [475,525]; >> A = [1,0]; >> DEV = [.01,.01]; >> Fs = 2000; >> [N,Fo,Ao,W] = firpmord(F,A,DEV,Fs); >> B = firpm(N,Fo,Ao,W); >> fvtool(B,1) >> N N = 78

P-M Design Results

Elliptic Filter Design to Specifications >> fs=2000; >> fpass=475; >> fstop=525; >> Wp=2*fpass/fs; >> Ws=2*fstop/fs; >> Rp=.0873; >> Rs=40; >> [N,Wn]=ellipord(Wp,Ws,Rp,Rs); >> [Be,Ae]=ellip(N,Rp,Rs,Wn); >> fvtool(Be,Ae) >> N N = 7

Elliptic Filter Design Results

Coefficient Quantization The poles of an IIR filter must remain within the unit circle in the complex plane for stability Quantization and round-off errors can move the poles and create an unusable design

Effect of Coefficient Quantization Chebyshev II High-pass Filter Double Precision vs. 16 bits >> B16=quantize(B,16); >> A16=quantize(A,16);

Summary IIR filters can be design by pole-zero location –Digital oscillators: poles on the unit circle –Notch filters: zeros on the unit circle with nearby poles to control notch width Classic analog filters can be designed using the bilinear transformation IIR filters have the advantage of smaller filter order for a given frequency response. IIR filters have the disadvantages of possible instability due to coefficient quantization effects and non-linear phase response.