1 Digital Signal Processing Digital Signal Processing  IIR digital filter structures  Filter design.

Slides:



Advertisements
Similar presentations
Design of Digital IIR Filter
Advertisements

Chapter 8. FIR Filter Design
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 6 Infinite Impulse Response Filter Design.
CHAPTER 7 Digital Filter Design Wang Weilian School of Information Science and Technology Yunnan University.
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.
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
AGC DSP AGC DSP Professor A G Constantinides 1 Digital Filter Specifications Only the magnitude approximation problem Four basic types of ideal filters.
EEE422 Signals and Systems Laboratory Filters (FIR) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Relationship between Magnitude and Phase (cf. Oppenheim, 1999)
Unit III FIR Filter Design
1 Diagramas de bloco e grafos de fluxo de sinal Estruturas de filtros IIR Projeto de filtro FIR Filtros Digitais.
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.
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.
Copyright ©2010, ©1999, ©1989 by Pearson Education, Inc. All rights reserved. Discrete-Time Signal Processing, Third Edition Alan V. Oppenheim Ronald W.
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 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.
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
Design of FIR Filters. 3.1 Design with Least Squared Error Error Criterion.
Summary of Widowed Fourier Series Method for Calculating FIR Filter Coefficients Step 1: Specify ‘ideal’ or desired frequency response of filter Step 2:
Digital Filter Structures
1 Teaching Innovation - Entrepreneurial - Global The Centre for Technology enabled Teaching & Learning, MGI,India DTEL DTEL (Department for Technology.
FILTER DESIGN Ideal Filter Magnitude Response NumericLogaritmic.
DISP 2003 Lecture 5 – Part 1 Digital Filters 1 Frequency Response Difference Equations FIR versus IIR FIR Filters Properties and Design Philippe Baudrenghien,
Digital Signal Processing Lecture 6 Frequency Selective Filters
Lecture 09b Finite Impulse Response (FIR) Filters
Chapter 6. Digital Filter Structures and Designs Section
Finite Impulse Response Filtering EMU-E&E Engineering Erhan A. Ince Dec 2015.
EEE4176 Application of Digital Signal Processing
Professor A G Constantinides 1 Digital Filter Specifications We discuss in this course only the magnitude approximation problem There are four basic types.
IIR Filter design (cf. Shenoi, 2006)
UNIT - 5 IIR FILTER DESIGN.
Lecture: IIR Filter Design
EEE422 Signals and Systems Laboratory
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 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
Quick Review of LTI Systems
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 Finite Impulse Response(FIR) Filter Design
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:

1 Digital Signal Processing Digital Signal Processing  IIR digital filter structures  Filter design

2 Basic IIR Digital Filter Structure  An N-th order IIR digital transfer function is characterised by 2N+1 unique coefficients, and in general, requires 2N+1 multipliers and 2N two input adders for implementation  Direct form IIR filter: Filter structures in which the multiplier coefficients are precisely the coefficients of the transfer function  Consider, a 3 rd order IIR filter with transfer function  We can implement H(z) as a cascade  where

3 Basic IIR Digital Filter Structure  The filter section H 1 (z) can be seen to be an FIR filter and can be realised:  Time domain representation of H 2 (z) is given by

4 Direct Form IIR Digital Filter Structure  Cascade of the two structures leads to H(z) and is known as direct form I structure  It is noncanonic as it uses 6 delays to realise 3 rd order transfer function  Its transpose (direct form I t )

5 Direct Form IIR Digital Filter Structure  Various other noncanonic direct form structures can be derived by simple block diagram manipulations  Observe in the direct form structure (on the right), signal variables in nodes 1 and 1’ are the same, so the two top delays can be shared  Likewise, the middle and bottom two delays can be shared  We get direct form II and its transpose (direct form II t ) is also shown  Now, it is canonic

6 Cascade form IIR Digital Filter Structure  By expressing the numerator and the denominator polynomials of the transfer function as a product of polynomials of lower degree, a digital filter can be realised as a cascade of low-order filter sections  Consider, for example, H(z)=P(z)/D(z) expressed as  Examples of cascade realisations obtained by different pole-zero pairings  Examples of cascade realisations obtained by different ordering of sections

7 Cascade form IIR Digital Filter Structure  There are altogether a total of 36 different cascade realisations of H(z) based on pole-zero pairings and orderings  Due to finite wordlength effects, each such realisation behaves differently  Usually, the polynomials are factored into a product of 1 st order and 2 nd order polynomials:  For a first order,

8  Consider an example:  The direct form II and cascade realisations are Cascade form IIR Digital Filter Structure How? Hint: try to remember a general form for direct form II and then reuse it!

9 Parallel Form IIR Digital Filter Structures  A partial-fraction expansion of the transfer function in z -1 leads to the parallel form I structure  Assuming simple poles, the transfer function H(z) can be expressed as  In the above for a real pole,  A direct partial fraction expansion of the transfer function in z leads to the parallel form II structure  In the above for a real pole,  We’ll see some examples……….

10  A partial fraction expansion of  in z -1 yields Parallel Form IIR Digital Filter Structures Parallel form I

11  A partial fraction expansion of  in z yields Parallel Form IIR Digital Filter Structures Parallel form II

FIR filter design  We have briefly explored the design of FIR filters in Lecture 5  We’ll look at it again here using MATLAB  We’ll use the window method to design FIR filters 12

13 Ideal filter and impulse response  An ideal LPFIts impulse  What is the problem – we can’t have infinite coefficient length  So, we need to truncate 13 Inverse DFT Similar to 

14  Let us use a rectangular window  We can see that the shape of the LPF has changed  This is know as Gibbs phenomenon – oscillatory behaviour in the magnitude responses caused by truncating the ideal impulse response function (i.e. the rectangular window has an abrupt transition to zero)  Gibbs phenomenon can be reduced by  Using a window that tapers smoothly at each end  Providing a smooth transition from passband to stopband in the magnitude specifications 14 Ideal filter and impulse response DFT

15 Filter length  The filter length (i.e. order) affects the magnitude response  Length increase, number of ripples in both passband and stopband increases but with a corresponding decrease in the ripple widths  That is as N increase, it gets closer to the ideal LPF  But height of largest ripples remain the same independent of length  Similar oscillatory behaviour could be observed in the magnitude responses of the truncated versions of other types of ideal filters 15 Infinite N N=25 N=13

16 Common window functions  Some common window functions  Low pass filter frequency response  N=51 and Magnitude response of window functions with M=25

17 FIR filter design  Step 1 - Specify the ideal or required frequency response, H D (w)  Step 2 - Obtain impulse response, h D (n) of the desired filter by evaluating the inverse Fourier transform  Important note: we’ll look at h D (n) for standard filter designs in the next slide  Step 3 - Select a window function and then the number of filter coefficients  Step 4 - Obtain values of w(n) for the chosen window function and the values of the actual FIR coefficients, h(n), by multiplying h D (n) with w(n) h(n)=h D (n) w(n)

FIR filter design (Steps 1 and 2) 18 We can make use of available h D (n)

19 FIR filter design (step 3) – window?  First problem in step 3 - which window function?  The ratio of the main lobe/side lobe can be used  Example, the frequency response of Hamming and Blackman windows  Main lobe centred at ω=0  Other ripples are called side lobes

FIR filter design (step 3) – window?  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 small  so to increase the stopband attenuation, we need to decrease the sidelobe amplitude  Most of the time, these two requirements are contradictory  Example: LPF with length=51 and cut-off at /2 20

21 FIR filter design (step 3) – length?  Second problem in step 3 – number of filter coefficients?  To obtain good (i.e. sharper) transition band  reduce main lobe width  increase the filter length  But increased filter length means increased computational complexity  Eg: Frequency response of Hamming window with length 101 and 201 are shown below 21

FIR filter design (step 3) – length?  Using the same window as in the previous slide  LPF with Hamming window, with normalised cut-off=0.3 22

23  To select the ‘suitable’ order i.e. the length  The lowest order that can meet the requirements  There are several methods:  Kaiser, Bellanger, Hermann  Kaiser’s formula:  Actual location of transition band is immaterial  Bellanger’s formula:  Hermann’s formula is more complex so we will not consider here (but generally it gives slightly more accurate value for the order) 23 FIR filter design (step 3) – order selection

24 Example – Kaiser’s formula  Estimate the order of a linear-phase lowpass FIR filter with the following specifications: passband edge F p =1.8 kHz, stopband edge F s =2 kHz, peak passband ripple  p =0.1 dB, minimum stopband attenuation  s =35 dB and sampling rate F T =12 kHz.  Get the peak ripple values:  p =0.0115,  s =  Using the Kaiser’s formula:  which gives  Since N must be an integer, we round up the value to give N=99  As the order is odd, a Type 2 FIR filter can be designed. To design a Type 1 FIR filter, N should be increased to 100  In Matlab, you can use kaiserord function but it only gives an approximation  Normally, you should check to see if the filter specifications are met, if not change N 24

25 Another example  A requirement exists for an FIR digital filter to meet the following specifications:  Passband: Hz  Transition width: 50 Hz  Passband ripple: 0.1 dB  Stopband attenuation: 60 dB  Sampling frequency: 1 kHz  Obtain the filter coefficients  Solution - The peak ripple values are  p =0.0115,  s =0.001  Using Kaiser’s formula:  which give N= So, we could take N=50 (type 1, odd length)  Note that the passband information is not used to obtain N, so it will be the same even if we shift the passband or even if we use it for highpass, stopband etc  If the transition bands are not same then we use the smaller transition band  bigger transition band requires smaller N, so the smaller transition band requires a higher order and is more important for the order selection

A common mistake  Example: Obtain the FIR coefficients for a highpass filter with Fc=600 Hz with FT=2000 Hz  Assume we start with N=100  Use the known impulse response for HPF  Problem  The phase is completely non-linear  The magnitude response is not good 26

27  To obtain linear phase response  Coefficients must be symmetry/antisymmetry  So say, change N=201  Linear phase response achieved  But there are still ripples (Gibbs phenomenon) A common mistake – solution 1

28  Let us use a window, say Hamming  Less ripple in the magnitude response (in the passband)  Why is the cut-off frequency in the plot at 0.6  rad/sample?  We used 0.3 to obtain the impulse response function, right? A common mistake – solution 2

Taking the example further 29  Let us actually use the filter after designing it!  It could be improved – using higher N and improved window such as Kaiser window

Using MATLAB fir1 function 30  Using MATLAB, filter coefficients can easily obtained using fir1 function!  Hamming window is used by default  For the same input x in the previous slide, let us design a bandpass filter to extract only the component at 650 Hz

Improved FIR filter design 31  The windows such as Hanning, Hamming etc are known as fixed window designs as the  ripple values are fixed)  FIR filter design can also be improved using adjustable window functions such as Dolph-Chebyshev and Kaiser that provide control over  by means of an additional parameter characterising the window  The basis of FIR filter design is to obtain the set of minimal number of coefficients for the required response  So, computer based optimisation methods have been invented  Parks-McClellan algorithm can be used to obtain the FIR coefficients (in MATLAB, we can design this filter using ‘remez’ function)  Normally, improved design over the standard window based method  Known as computer based FIR filter design  The only other FIR design method is frequency sampling method  But knowledge of the window based method is sufficient for this course  Note: Kaiser order and Kaiser window are two different matters, though we normally use them together

32 IIR filter design 32  The most common approach to IIR filter design:  Convert the digital filter specifications into an analogue prototype low-pass filter specifications  Determine the analogue low-pass filter transfer function, H a (s)  Transform H a (s) in the desired digital transfer function G(z)  The most widely used transformation is the bilinear transformation that maps the imaginary axis in the s-plane (j) onto the unit circle of the z- plane  So, relation between G(z) and H a (s)  However, this design requires some knowledge of analogue low-pass filters and also s-plane and therefore, we will skip this method and straightaway utilise IIR filter design using MATLAB

33 IIR filter design using MATLAB 33  We have done IIR filter design using MATLAB in Lecture 5  There are several classical IIR filters  Butterworth, Chebyshev Types I and II, Elliptic  MATLAB functions  butter – Butterworth filter with flat passband (no ripples)  ellip – Elliptic filter with ripples (but normally requiring lower order than Butterworth for same transition band)  cheby1 - Chebyshev filter controlling peak-to-peak ripple in the passband  cheby2 - Chebyshev filter controlling the amount of stopband ripple  First step is to estimate the order of the filter given the specifications – using functions: buttord, cheb1ord, cheb2ord, ellipord etc  Next, obtain the coefficients, B and A using functions: buttord, besself, cheby1, cheby2, ellip, etc  Finally, do the filtering using filtfilt function  The frequency response of the filter can be obtained using function freqz(B,A)

34 IIR filter design using MATLAB -example  Design an elliptic IIR low-pass filter with the specifications: F p =0.8 kHz, F s =1 kHz, F T =4 kHz,  p =0.5 dB,  s =40 dB  MATLAB code:  [N,Wn]=ellipord(0.4,0.5,0.5,40)  [B,A]=ellip(N,0.5,40,Wn)

35 IIR filter design using MATLAB -example  To filter a signal, use filtfilt function