Lecture 10a Infinite Impulse Response (IIR) Filters.

Slides:



Advertisements
Similar presentations
Chapter 15 Infinite Impulse Response (IIR) Filters
Advertisements

Design of Digital IIR Filter
Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering.
Chapter 14 Finite Impulse Response (FIR) Filters.
Digital Signal Processing IIR Filter IIR Filter Design by Approximation of Derivatives Analogue filters having rational transfer function H(s) can be.
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 7 Digital Filter Design Wang Weilian School of Information Science and Technology Yunnan University.
Infinite Impulse Response (IIR) Filters
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.
AMI 4622 Digital Signal Processing
IIR Filter Design: Basic Approaches Most common approach to IIR filter design: (1)Convert specifications for the digital filter into equivalent specifications.
Chapter 15 Infinite Impulse Response (IIR) Filters.
Frequency Response of Discrete-time LTI Systems Prof. Siripong Potisuk.
Lecture 9 FIR and IIR Filter design using Matlab
Lecture 9: Structure for Discrete-Time System XILIANG LUO 2014/11 1.
EE513 Audio Signals and Systems Digital Signal Processing (Systems) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
DSP. What is DSP? DSP: Digital Signal Processing---Using a digital process (e.g., a program running on a microprocessor) to modify a digital representation.
Discrete-Time and System (A Review)
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
Signal Processing First CH 8 IIR Filters The General IIR Difference Equation 2 feedback term recursive filter FIR part No. of coeff. = N+M+1.
Prof. Nizamettin AYDIN Digital Signal Processing 1.
Chapter 6 Digital Filter Structures
Nov '04CS3291: Section 61 UNIVERSITY of MANCHESTER Department of Computer Science CS3291: Digital Signal Processing Section 6 IIR discrete time filter.
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.
Professor A G Constantinides 1 Interpolation & Decimation Sampling period T, at the output Interpolation by m: Let the OUTPUT be [i.e. Samples exist at.
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
EE513 Audio Signals and Systems Complex Oscillator Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Copyright 2004 Ken Greenebaum Introduction to Interactive Sound Synthesis Lecture 20:Spectral Filtering Ken Greenebaum.
Digital filters Honza Černocký, ÚPGM. Aliases Numerical filters Discrete systems Discrete-time systems etc. 2.
IIR Digital Filter Design
Copyright © 2003 Texas Instruments. All rights reserved. DSP C5000 Chapter 15 Infinite Impulse Response (IIR) Filter Implementation.
Chapter 7. Filter Design Techniques
1 Digital Signal Processing Digital Signal Processing  IIR digital filter structures  Filter design.
Lecture 10b Adaptive Filters. 2 Learning Objectives  Introduction to adaptive filtering.  LMS update algorithm.  Implementation of an adaptive filter.
Copyright © 2003 Texas Instruments. All rights reserved. DSP C5000 Chapter 17 DTMF generation and detection Dual Tone Multiple Frequency.
Digital Signal Processing
Z Transform The z-transform of a digital signal x[n] is defined as:
Nov '03csDSP61 CS3291: Section 6 IIR discrete time filter design Introduction: Many design techniques for IIR discrete time filters have adopted ideas.
GROUP MEMBERS ELISHBA KHALID 07-CP-07 TAHIRA SAMEEN 07-CP-31.
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
Finite Impulse Response Filtering EMU-E&E Engineering Erhan A. Ince Dec 2015.
Chapter 5. Transform Analysis of LTI Systems Section
Real-time Digital Signal Processing Digital Filters.
Chapter 4 Structures for Discrete-Time System Introduction The block diagram representation of the difference equation Basic structures for IIR system.
Application of digital filter in engineering
Digital Signal Processing
IIR Filter design (cf. Shenoi, 2006)
EEE4176 Applications of Digital Signal Processing
Discrete-time Systems
EE Audio Signals and Systems
Chapter 8 Design of Infinite Impulse Response (IIR) Digital Filter
Quick Review of LTI Systems
Chapter 17 Goertzel Algorithm
Lect5 A framework for digital filter design
Everything You Ever Wanted to Know About Filters*
Chapter 6 Discrete-Time System
Everything You Ever Wanted to Know About Filters*
Signal Processing First
Chapter 7 Finite Impulse Response(FIR) Filter Design
Chapter 15 Infinite Impulse Response (IIR) Filters
Lecture 24 Time-Domain Response for IIR Systems
IIR Digital Filter Design
Presentation transcript:

Lecture 10a Infinite Impulse Response (IIR) Filters

2 Learning Objectives  Introduction to the theory behind IIR filters:  Properties.  Coefficient calculation.  Structure selection.  Implementation in Matlab, C.  Chaissiang R - DSP Applications Using C and the TMS320C6x DSK, Chapter 5 Chaissiang R - DSP Applications Using C and the TMS320C6x DSK, Chapter 5 Chaissiang R - DSP Applications Using C and the TMS320C6x DSK, Chapter 5

3Introduction  Infinite Impulse Response (IIR) filters are the first choice when:  Speed is paramount.  Phase non-linearity is acceptable.  IIR filters are computationally more efficient than FIR filters as they require fewer coefficients due to the fact that they use feedback or poles.  However feedback can result in the filter becoming unstable if the coefficients deviate from their true values.

4 Properties of an IIR Filter  The general equation of an IIR filter can be expressed as follows:  a k and b k are the filter coefficients.

5 Properties of an IIR Filter  The transfer function can be factorised to give:  Where:z 1, z 2, …, z N are the zeros, p 1, p 2, …, p N are the poles. p 1, p 2, …, p N are the poles.

6 Properties of an IIR Filter  The transfer function can be factorised to give:  For the implementation of the above equation we need the difference equation:

7 Properties of an IIR Filter IIR Equation IIR structure for N = M = 2

8 Design Procedure  To fully design and implement a filter five steps are required: (1)Filter specification. (2)Coefficient calculation. (3)Structure selection. (4)Simulation (optional). (5)Implementation.

9 Filter Specification - Step 1

10 Coefficient Calculation - Step 2  There are two different methods available for calculating the coefficients:  Direct placement of poles and zeros.  Using analogue filter design.  Both of these methods are described.

11 Placement Method  All that is required for this method is the knowledge that:  Placing a zero near or on the unit circle in the z-plane will minimise the transfer function at this point.  Placing a pole near or on the unit circle in the z-plane will maximise the transfer function at this point.  To obtain real coefficients the poles and zeros must either be real or occur in complex conjugate pairs.

12 Placement Method  Example - Placement method:  Link: zeropole.exe zeropole.exe

13 Analogue to Digital Filter Conversion  This is one of the simplest method.  There is a rich collection of prototype analogue filters with well-established analysis methods.  The method involves designing an analogue filter and then transforming it to a digital filter.  The two principle methods are:  Bilinear transform method (Bilinear Theory.pdf). Bilinear Theory.pdfBilinear Theory.pdf  Impulse invariant method.

14 Bilinear Transform Method  Practical example of the bilinear transform method:  The design of a digital filter to approximate a second order low-pass analogue filter is required.  The transfer function that describes the analogue filter is:  The digital filter is required to have:  Cut-off frequency of 6kHz.  Sampling frequency of 20kHz.

15 Bilinear Transform Method  Matlab code for calculating coefficients: a = tan(pi*2/8) % cut-off 2kHz, fsample 8 kHz, input < 580 mVpp b = (1 + 2^0.5 + (a*a)) b00 = (a*a)/b b01 = 2*b00 b02 = b00 a01 = 2*(a^2 -1)/b a02 = (1 + a^2 - (2^0.5)*a)/b bb = [b00 b01 b02]; aa = [1 a01 a02]; figure(1) freqz(bb,aa,512,8000) fid = fopen('IIR_coef_float.txt', 'w'); fprintf(fid,'%0.4f,%0.4f,%0.4f\n',bb); fprintf(fid,'%0.4f,%0.4f\n',aa); fclose(fid);

16 Bilinear Transform Method  Output from Matlab code:  bb = [0.2929, , ]  aa = [1, e-016, ]  Converting these to Q15 format we get:  b = (bb * 2 15 ) HEX = [0x257D, 0x4AFB, 0x257D]  a = (bb * 2 15 ) HEX = [0x7FFF, 0x0, 0x15F6]  Note that 1 ~ (0x7FFF) DEC  Use: q152dec.m or dec2q15.m functions q152dec.mdec2q15.mq152dec.mdec2q15.m

17 Realisation Structures - Step 1  Direct Form I:  Difference equation:  This leads to the following structure…

18 Realisation Structures - Step 2  Direct Form I:

19 Realisation Structures - Step 3  Direct Form II canonic realisation:  Where:  Taking the inverse of the z-transform of P(z) and Y(z) leads to:

20 Realisation Structures - Step 4  Direct Form II canonic realisation:

21 Implementation - Step 5 void IIR_Isr (void) { short a1 = 0x0; short a2 = 0x15f6; short b0 = 0x257d; short b1 = 0x4afd; short b2 = 0x257d; static short d01=0, d02=0, d00; short xn, y0; int prod1, prod2, prod3, prod4, prod5, input, output; input = mcbsp0_read(); // Read the input sample from the serial port y0 = 0; input &= 0xffff; xn = (short) (input & 0x000ffff); prod1 = _mpy(d02,a2)>>15; prod2 = _mpy(d01,a1)>>15; d00 = xn + (short)(prod1 + prod2); prod3 = _mpy(d01,b1); prod4 = _mpy(d02,b2); prod5 = _mpy(d00,b0); y0 = (short)((prod3+prod4+prod5)>>15); d02 = d01; d01 = d00; output = y0; mcbsp0_write(output& 0xfffffffe); // Write the signal to the serial port return; } ‘C’ code

22 IIR Code  Code location:  Lecture 10 - Infinite Impulse Response Filters  Projects:  Fixed Point in C:\IIR_C_Fixed\ IIR_C_Fixed

Lecture 10a Infinite Impulse Response (IIR) Filters - End -