Chapter 9-10 Digital Filter Design. Objective - Determination of a realizable transfer function G(z) approximating a given frequency response specification.

Slides:



Advertisements
Similar presentations
Chapter 8. FIR Filter Design
Advertisements

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.
Signal and System IIR Filter Filbert H. Juwono
Chapter 6 Infinite Impulse Response Filter Design.
CHAPTER 7 Digital Filter Design Wang Weilian School of Information Science and Technology Yunnan University.
ELEN 5346/4304 DSP and Filter Design Fall Lecture 8: LTI filter types Instructor: Dr. Gleb V. Tcheslavski Contact:
Hossein Sameti Department of Computer Engineering Sharif University of Technology.
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
ECE651 Digital Signal Processing I Digital IIR Filter Design.
So far We have introduced the Z transform
Hossein Sameti Department of Computer Engineering Sharif University of Technology.
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.
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
IIR Filter Design: Basic Approaches Most common approach to IIR filter design: (1)Convert specifications for the digital filter into equivalent specifications.
AGC DSP AGC DSP Professor A G Constantinides 1 Digital Filter Specifications Only the magnitude approximation problem Four basic types of ideal filters.
Relationship between Magnitude and Phase (cf. Oppenheim, 1999)
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 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
Zhongguo Liu_Biomedical Engineering_Shandong Univ. Biomedical Signal processing Chapter 7 Filter Design Techniques Zhongguo Liu Biomedical.
Chapter 7 LTI Discrete-Time Systems in the Transform domain.
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.
Copyright ©2010, ©1999, ©1989 by Pearson Education, Inc. All rights reserved. Discrete-Time Signal Processing, Third Edition Alan V. Oppenheim Ronald W.
1 Lecture 3: March 6, 2007 Topic: 1. Frequency-Sampling Methods (Part I)
Dan Ellis 1 ELEN E4810: Digital Signal Processing Topic 8: Filter Design: IIR 1.Filter Design Specifications 2.Analog Filter Design 3.Digital.
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.
Chapter 4 Digital Processing of Continuous-Time Signals.
1 Conditions for Distortionless Transmission Transmission is said to be distortion less if the input and output have identical wave shapes within a multiplicative.
IIR Digital Filter Design
Chapter 7. Filter Design Techniques
1 Digital Signal Processing Digital Signal Processing  IIR digital filter structures  Filter design.
Chapter 4 LTI Discrete-Time Systems in the Transform Domain
Summary of Widowed Fourier Series Method for Calculating FIR Filter Coefficients Step 1: Specify ‘ideal’ or desired frequency response of filter Step 2:
1 Teaching Innovation - Entrepreneurial - Global The Centre for Technology enabled Teaching & Learning, MGI,India DTEL DTEL (Department for Technology.
The IIR FILTERs These are highly sensitive to coefficients,
DISP 2003 Lecture 5 – Part 1 Digital Filters 1 Frequency Response Difference Equations FIR versus IIR FIR Filters Properties and Design Philippe Baudrenghien,
Finite Impulse Response Filtering EMU-E&E Engineering Erhan A. Ince Dec 2015.
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
Fourier Series FIR About Digital Filter Design
Chapter 6 IIR Digital Filter Design
Chapter 8 Design of Infinite Impulse Response (IIR) Digital Filter
ME2300 DIGITAL SIGNAL PROCESSING [Slide 6] IIR Filter Design BY DREAMCATCHER
LINEAR-PHASE FIR FILTERS DESIGN
Filter Design by Windowing
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.
Usıng the impulse sampling method Prepared by: Dr. Erhan A. INCE
Chapter 7 FIR Digital Filter Design
Quadrature-Mirror Filter Bank
Chapter 7 Finite Impulse Response(FIR) Filter Design
Tania Stathaki 811b LTI Discrete-Time Systems in Transform Domain Simple Filters Comb Filters (Optional reading) Allpass Transfer.
Tania Stathaki 811b LTI Discrete-Time Systems in Transform Domain Ideal Filters Zero Phase Transfer Functions Linear Phase Transfer.
Chapter 7 Finite Impulse Response(FIR) Filter Design
IIR Digital Filter Design
Presentation transcript:

Chapter 9-10 Digital Filter Design

Objective - Determination of a realizable transfer function G(z) approximating a given frequency response specification is an important step in the development of a digital filter If an IIR filter is desired, G(z) should be a stable real rational function Digital filter design is the process of deriving the transfer function G(z)

§9.1 Digital Filter Specifications Usually, either the magnitude and/or the phase (delay) response is specified for the design of digital filter for most applications In some situations, the unit sample response or the step response may be specified In most practical applications, the problem of interest is the development of a realizable approximation to a given magnitude response specification

§9.1 Digital Filter Specifications We discuss in this course only the magnitude approximation problem There are four basic types of ideal filters with magnitude responses as shown below

§9.1 Digital Filter Specifications As the impulse response corresponding to each of these ideal filters is noncausal and of infinite length, these filters are not realizable In practice, the magnitude response specifications of a digital filter in the passband and in the stopband are given with some acceptable tolerances In addition, a transition band is specified between the passband and stopband

§9.1 Digital Filter Specifications For example, the magnitude response |G(e j  )| of a digital lowpass filter may be given as indicated below

§9.1 Digital Filter Specifications As indicated in the figure, in the passband, defined by 0  p, we require that |G(e j  )|  1 with an error  p, i.e., 1-  p  |G(e j  )|  1+  p, |  |   p In the stopband, defined by  s , we require that |G(e j  )|  0 with an error  s i.e., |G(e j  )|   p,  s  |  | 

§9.1 Digital Filter Specifications  p - passband edge frequency  s - stopband edge frequency  p - peak ripple value in the passband  s - peak ripple value in the stopband Since G(e j  ) is a periodic function of , and |G(e j  )| of a real-coefficient digital filter is an even function of  As a result, filter specifications are given only for the frequency range 0  |  | 

§9.1 Digital Filter Specifications Specifications are often given in terms of loss function G(  )=-20log 10 |G(e j  )| in dB Peak passband ripple  p = -20log 10 (1-  p ) dB Minimum stopband attenuation  s = -20log 10 (  s ) dB

§9.1 Digital Filter Specifications Magnitude specifications may alternately be given in a normalized form as indicated below

§9.1 Digital Filter Specifications Here, the maximum value of the magnitude in the passband is assumed to be unity 1/  (1+  2 ) - Maximum passband deviation, given by the minimum value of the magnitude in the passband 1/A - Maximum stopband magnitude

§9.1 Digital Filter Specifications In practice, passband edge frequency F p and stopband edge frequency F s are specified in Hz For digital filter design, normalized bandedge frequencies need to be computed from specifications in Hz using

§9.2 Selection of Filter Type The transfer function H(z) meeting the frequency response specifications should be a causal transfer function For IIR digital filter design, the IIR transfer function is a real rational function of z -1 : H(z) must be a stable transfer function and must be of lowest order N for reduced computational complexity

§9.2 Selection of Filter Type For reduced computational complexity, degree N of H(z) must be as small as possible If a linear phase is desired, the filter coefficients must satisfy the constraint: h[n] =  h[N-n-1] For FIR digital filter design, the FIR transfer function is a polynomial in z -1 with real coefficients:

§9.2 Selection of Filter Type Advantages in using an FIR filter - (1) Can be designed with exact linear phase, (2) Filter structure always stable with quantized coefficients Disadvantages in using an FIR filter - Order of an FIR filter, in most cases, is considerably higher than the order of an equivalent IIR filter meeting the same specifications, and FIR filter has thus higher computational complexity

§9.3 Digital Filter Design: Basic Approaches Most common approach to IIR filter design – (1) Convert the digital filter specifications into an analog prototype lowpass filter specifications (2) Determine the analog lowpass filter transfer function H a (s) (3) Transform H a (s) into the desired digital transfer function G(z)

§9.3 Digital Filter Design: Basic Approaches This approach has been widely used for the following reasons: (1) Analog approximation techniques are highly advanced (2) They usually yield closed-form solutions (3) Extensive tables are available for analog filter design (4) Many applications require digital simulation of analog systems

§9.3 Digital Filter Design: Basic Approaches An analog transfer function to be denoted as H a (s)= P a (s) / D a (s) where the subscript “a” specifically indicates the analog domain A digital transfer function derived from H a (s) shall be denoted as G(z)=P(z)/D(z)

§9.3 Digital Filter Design: Basic Approaches Basic idea behind the conversion of H a (s) into G(z) is to apply a mapping from the s-domain to the z-domain so that essential properties of the analog frequency response are preserved Thus mapping function should be such that –Imaginary (j  ) axis in the s-plane be mapped onto the unit circle of the z-plane –A stable analog transfer function be mapped into a stable digital transfer function

§9.3 Digital Filter Design: Basic Approaches FIR filter design is based on a direct approximation of the specified magnitude response, with the often added requirement that the phase be linear The design of an FIR filter of order N may be accomplished by finding either the length-(N+1) impulse response samples {h[n]} or the (N+1) samples of its frequency response H(e j  )

§9.3 Digital Filter Design: Basic Approaches Three commonly used approaches to FIR filter design - (1) Windowed Fourier series approach (2) Frequency sampling approach (3) Computer-based optimization methods

§9.4 IIR Digital Filter Design: Bilinear Transformation Method Above transformation maps a single point in the s-plane to a unique point in the z- plane and vice-versa Relation between G(z) and H a (s) is then given by Bilinear transformation

§9.4 IIR Digital Filter Design: Bilinear Transformation Method Digital filter design consists of 3 steps: (1) Develop the specifications of H a (s) by applying the inverse bilinear transformation to specifications of G(z) (2) Design H a (s) (3) Determine G(z) by applying bilinear transformation to H a (s) As a result, the parameter T has no effect on G(z) and T = 2 is chosen for convenience

§9.4 IIR Digital Filter Design: Bilinear Transformation Method For z=e j  with T = 2 we have or  =tan(  /2)

§9.4 IIR Digital Filter Design: Bilinear Transformation Method Steps in the design of a digital filter - (1) Prewarp (  p,  s ) to find their analog equivalents (  p,  s ) (2) Design the analog filter H a (s) (3) Design the digital filter G(z) by applying bilinear transformation to H a (s) Transformation can be used only to design digital filters with prescribed magnitude response with piecewise constant values Transformation does not preserve phase response of analog filter

§9.4 IIR Digital Filter Design: Bilinear Transformation Method Applying bilinear transformation to the above we get the transfer function of a first-order digital lowpass Butterworth filter Example - Consider

§9.4 IIR Digital Filter Design: Bilinear Transformation Method Rearranging terms we get where

§9.4 IIR Digital Filter Design: Bilinear Transformation Method for which |H a (j  0 )| = 0 |H a (j0)| = |H a (j  )| = 0  0 is called the notch frequency If |H a (j  2 )| = |H a (j  1 )| =1/  2 then B =  2 -  1 is the 3-dB notch bandwidth Example - Consider the second-order analog notch transfer function

§9.4 IIR Digital Filter Design: Bilinear Transformation Method Then where

§9.4 IIR Digital Filter Design: Bilinear Transformation Method Example - Design a 2nd-order digital notch filter operating at a sampling rate of 400 Hz with a notch frequency at 60 Hz, 3-dB notch bandwidth of 6 Hz Thus  0 = 2  (60/400) = 0.3  B w = 2  (6/400) = 0.03  From the above values we get  =  =

§9.4 IIR Digital Filter Design: Bilinear Transformation Method The gain and phase responses are shown below Thus

§9.4 IIR Digital Filter Design: Bilinear Transformation Method Example - Design a lowpass Butterworth digital filter with  p =0.25 ,  s = 0.55 ,  p  0.5 dB, and  s  15 dB Thus  2 = , A 2 = If |G(e j0 )|=0 this implies 20log 10 |G(e j0.25  )|  log 10 |G(e j0.55  )|  -15

§9.4 IIR Digital Filter Design: Bilinear Transformation Method Prewarping we get  p =tan(  p /2)=tan(0.25  /2)=  s =tan(  s /2)=tan(0.55  /2)= The inverse transition ratio is 1/k =  s /  p = The inverse discrimination ratio is 1/k 1 =  (A 2 -1)/  =

§9.4 IIR Digital Filter Design: Bilinear Transformation Method Thus N=log 10 (1/k 1 )/ log 10 (1/k) = Choose N = 3 To determine  c we use |H a (j  p )| 2 = 1/[1+(  p /  c ) 2N ]=1/(1+  2 )

§9.4 IIR Digital Filter Design: Bilinear Transformation Method We then get  c = (  p )= rd-order lowpass Butterworth transfer function for  c =1 is H an (s)=1/[(s+1)(s 2 +s+1)] Denormalizing to get  c = we arrive at H a (s)= H an (s/ )

§9.4 IIR Digital Filter Design: Bilinear Transformation Method Applying bilinear transformation to H a (s) we get the desired digital transfer function Magnitude and gain responses of G(z) shown below:

§9.5 IIR Highpass, Bandpass, and Bandstop Digital Filter Design First Approach - (1) Prewarp digital frequency specifications of desired digital filter G D (z) to arrive at frequency specifications of analog filter H D (s) of same type (2) Convert frequency specifications of H D (s) into that of prototype analog lowpass filter H LP (s) (3) Design analog lowpass filter H LP (s)

§9.5 IIR Highpass, Bandpass, and Bandstop Digital Filter Design (4) Convert H LP (s) into H D (s) using inverse frequency transformation used in Step 2 (5) Design desired digital filter G D (z) by applying bilinear transformation to H LP (s)

§9.5 IIR Highpass, Bandpass, and Bandstop Digital Filter Design Second Approach - (1) Prewarp digital frequency specifications of desired digital filter G D (z) to arrive at frequency specifications of analog filter H D (s) of same type (2) Convert frequency specifications of H D (s) into that of prototype analog lowpass filter H LP (s)

§9.5 IIR Highpass, Bandpass, and Bandstop Digital Filter Design (3) Design analog lowpass filter H LP (s) (4) Convert H LP (s) into an IIR digital transfer function G LP (z) using bilinear transformation (5) Transform G LP (z) into the desired digital transfer function G D (z) We illustrate the first approach

§9.5 IIR Highpass, Bandpass, and Bandstop Digital Filter Design Design of a Type 1 Chebyshev IIR digital highpass filter Specifications: F p =700Hz, F s = 500Hz,  p =1 dB,  s =32dB, F T =2 kHz Normalized angular bandedge frequencies  p =2  F p / F T = 2  700/2000=0.7   s = 2  F s / F T = 2  500/2000=0.5 

§9.5.1 IIR Highpass Digital Filter Design Analog lowpass filter specifications:  p = 1,  s = ,  p =1 dB,  s =32 dB Prewarping these frequencies we get For the prototype analog lowpass filter choose  p = 1 Using we get  s =

§9.5.1 IIR Highpass Digital Filter Design MATLAB code fragments used for the design [N, Wn] = cheb1ord(1, , 1, 32, ’s’) [B, A] = cheby1(N, 1, Wn, ’s’); [BT, AT] = lp2hp(B, A, ); [num, den] = bilinear(BT, AT, 0.5);

§9.5.2 IIR Bandpass Digital Filter Design Design of a Butterworth IIR digital bandpass filter Specifications:  p1 =0.45 ,  p1 =0.65 ,  s1 =0.3 ,  s2 =0.75 ,  p =1 dB,  s =40 dB Prewarping we get

§9.5.2 IIR Bandpass Digital Filter Design For the prototype analog lowpass filter we choose  p = 1 Width of passband We set We therefore modify so that and exhibit geometric symmetry with respect to

§9.5.2 IIR Bandpass Digital Filter Design Specifications of prototype analog Butterworth lowpass filter:  p = 1,  s = ,  p =1 dB,  s =40 dB Using we get

§9.5.2 IIR Bandpass Digital Filter Design MATLAB code fragments used for the design [N, Wn] = buttord(1, , 1, 40, ’s’) [B, A] = butter(N, Wn, ’s’); [BT, AT] = lp2bp(B, A, , ); [num, den] = bilinear(BT, AT, 0.5);

§9.5.3 IIR Bandstop Digital Filter Design Design of an elliptic IIR digital bandstop filter Specifications:  s1 =0.45 ,  s2 =0.65 ,  p1 =0.3 ,  p2 =0.75 ,  p =1 dB,  s =40 dB Prewarping we get Width of stopband

§9.5.3 IIR Bandstop Digital Filter Design For the prototype analog lowpass filter we choose  s = 1 We therefore modify so that and exhibit geometric symmetry with respect to We set Using we get

§9.5.3 IIR Bandstop Digital Filter Design MATLAB code fragments used for the design [N, Wn] = ellipord( , 1, 1, 40, ’s’); [B, A] = ellip(N, 1, 40, Wn, ’s’); [BT, AT] = lp2bs(B, A, , ); [num, den] = bilinear(BT, AT, 0.5);

§9.6 Fixed Window Functions Using a tapered window causes the height of the sidelobes to diminish, with a corresponding increase in the main lobe width resulting in a wider transition at the discontinuity Hann: W[n[= cos[2  n/(2M+1)], -M  n  M Hamming: W[n[= cos[2  n/(2M+1)], -M  n  M Blackman: W[n[= cos[2  n/(2M+1)] +0.08cos[4  n/(2M+1)]

§9.6 Fixed Window Functions Plots of magnitudes of the DTFTs of these windows for M = 25 are shown below  /  Gain, dB Rectangular window  /  Gain, dB Hanning window  /  Gain, dB Hamming window  /  Gain, dB Blackman window

§9.6 Fixed Window Functions Magnitude spectrum of each window characterized by a main lobe centered at  = 0 followed by a series of sidelobes with decreasing amplitudes Parameters predicting the performance of a window in filter design are: Main lobe width Relative sidelobe level

§9.6 Fixed Window Functions Main lobe width  ML - given by the distance between zero crossings on both sides of main lobe Relative sidelobe level A sl - given by the difference in dB between amplitudes of largest sidelobe and main lobe

§9.6 Fixed Window Functions Observe Thus, Passband and stopband ripples are the same

§9.6 Fixed Window Functions Distance between the locations of the maximum passband deviation and minimum stopband value  ML Width of transition band  s  p  ML

§9.6 Fixed Window Functions To ensure a fast transition from passband to stopband, window should have a very small main lobe width To reduce the passband and stopband ripple , the area under the sidelobes should be very small Unfortunately, these two requirements are contradictory

§9.6 Fixed Window Functions In the case of rectangular, Hann, Hamming, and Blackman windows, the value of ripple does not depend on filter length or cutoff frequency  c, and is essentially constant In addition,  c  where c is a constant for most practical purposes

§9.6 Fixed Window Functions Rectangular window -  ML =4  /(2M+1) A sl =13.3 dB,  s =20.9 dB,   =0.92  /M Hann window -  ML =8  /(2M+1) A sl =31.5 dB,  s =43.9 dB,   =3.11  /M Hamming window -  ML =8  /(2M+1) A sl =42.7 dB,  s =54.5 dB,   =3.32  /M, Blackman window -  ML =12  /(2M+1) A sl =58.1 dB,  s =75.3 dB,   =5.56  /M

§9.6 Fixed Window Functions Filter Design Steps - (1) Set  c =(  p +  s )/2 (2) Choose window based on specified (3) Estimate M using    c / M

§9.7 FIR Filter Design Example Lowpass filter of length 51 and  c =  /  /  Gain, dB Lowpass Filter Designed Using Hann window  /  Gain, dB Lowpass Filter Designed Using Hamming window  /  Gain, dB Lowpass Filter Designed Using Blackman window

§9.7 FIR Filter Design Example An increase in the main lobe width is associated with an increase in the width of the transition band A decrease in the sidelobe amplitude results in an increase in the stopband attenuation

§9.7 FIR Filter Design Example Specifications:  p = ,  s = ,  c =40dB Thus Choose N = 24 implying M =12

§9.7 FIR Filter Design Example Hence h t [n]=sin(0.4  n)/  n, -12  n  12 where w[n] is the n-th coefficient of a length-25 Kaiser window with  =  /  Gain, dB Kaiser Window  /  Gain, dB Lowpass filter designed with Kaiser window