Infinite Impulse Response (IIR) Filters Uses both the input signal and previous filtered values y[n] = b 0 x[n] + b 1 x[n-1] + b 2 x[n-2] + … + a 1 y[n-1]

Slides:



Advertisements
Similar presentations
ECON 397 Macroeconometrics Cunningham
Advertisements

Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering.
ECE 8443 – Pattern Recognition EE 3512 – Signals: Continuous and Discrete Objectives: Response to a Sinusoidal Input Frequency Analysis of an RC Circuit.
Lecture 7: Basis Functions & Fourier Series
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
Signal and System IIR Filter Filbert H. Juwono
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
CHE 185 – PROCESS CONTROL AND DYNAMICS
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.
ELEN 5346/4304 DSP and Filter Design Fall Lecture 7: Z-transform Instructor: Dr. Gleb V. Tcheslavski Contact:
AMI 4622 Digital Signal Processing
Laplace Transforms Important analytical method for solving linear ordinary differential equations. - Application to nonlinear ODEs? Must linearize first.
Transformations Definition: A mapping of one n-dimensional space onto another k-dimensional space, which could be itself. – Example: Mapping a three dimensional.
Lecture 14: Laplace Transform Properties
EE-2027 SaS, L18 1/12 Lecture 18: Discrete-Time Transfer Functions 7 Transfer Function of a Discrete-Time Systems (2 lectures): Impulse sampler, Laplace.
Z-Transform Fourier Transform z-transform. Z-transform operator: The z-transform operator is seen to transform the sequence x[n] into the function X{z},
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.
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.
UNIT - 4 ANALYSIS OF DISCRETE TIME SIGNALS. Sampling Frequency Harry Nyquist, working at Bell Labs developed what has become known as the Nyquist Sampling.
Properties of the z-Transform
The z-Transform Prof. Siripong Potisuk. LTI System description Previous basis function: unit sample or DT impulse  The input sequence is represented.
Chapter 7 IIR Filter Design
Chapter 6 Digital Filter Structures
CHAPTER 4 Laplace Transform.
Fourier Series. Introduction Decompose a periodic input signal into primitive periodic components. A periodic sequence T2T3T t f(t)f(t)
CHAPTER 4 Laplace Transform.
Chapter 5 Z Transform. 2/45  Z transform –Representation, analysis, and design of discrete signal –Similar to Laplace transform –Conversion of digital.
1 Z-Transform. CHAPTER 5 School of Electrical System Engineering, UniMAP School of Electrical System Engineering, UniMAP NORSHAFINASH BT SAUDIN
Course Outline (Tentative) Fundamental Concepts of Signals and Systems Signals Systems Linear Time-Invariant (LTI) Systems Convolution integral and sum.
Department of Computer Eng. Sharif University of Technology Discrete-time signal processing Chapter 3: THE Z-TRANSFORM Content and Figures are from Discrete-Time.
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
Z TRANSFORM AND DFT Z Transform
Extends Euclidean space algebra to higher dimensions
Chapter 6: Frequency Domain Anaysis
THE LAPLACE TRANSFORM LEARNING GOALS Definition
EEE 503 Digital Signal Processing Lecture #2 : EEE 503 Digital Signal Processing Lecture #2 : Discrete-Time Signals & Systems Dr. Panuthat Boonpramuk Department.
Chapter 9-10 Digital Filter Design. Objective - Determination of a realizable transfer function G(z) approximating a given frequency response specification.
ES97H Biomedical Signal Processing
Digital Signal Processing
Signal and Systems Prof. H. Sameti Chapter 10: Introduction to the z-Transform Properties of the ROC of the z-Transform Inverse z-Transform Examples Properties.
Chapter 7 The Laplace Transform
Course Outline (Tentative) Fundamental Concepts of Signals and Systems Signals Systems Linear Time-Invariant (LTI) Systems Convolution integral and sum.
Motivation for the Laplace Transform
Z Transform The z-transform of a digital signal x[n] is defined as:
Lecture 2: Linear Discrete Systems 1. Introduction The primary new component of discrete or digital systems is the notion of time discretization. No longer.
Dr. Tamer Samy Gaafar Lec. 2 Transfer Functions & Block Diagrams.
1 Fourier Representation of Signals and LTI Systems. CHAPTER 3 UniMAP.
DISP 2003 Lecture 5 – Part 1 Digital Filters 1 Frequency Response Difference Equations FIR versus IIR FIR Filters Properties and Design Philippe Baudrenghien,
Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts.
Class 3 Linear System Solution Using the Laplace Transform
Review of DSP.
Properties of the z-Transform
Laplace Transforms Chapter 3 Standard notation in dynamics and control
Review of DSP.
CHAPTER 5 Z-Transform. EKT 230.
EE Audio Signals and Systems
Chapter 8 Design of Infinite Impulse Response (IIR) Digital Filter
UNIT II Analysis of Continuous Time signal
The sampling of continuous-time signals is an important topic
The Z-Transform of a given discrete signal, x(n), is given by:
Research Methods in Acoustics Lecture 9: Laplace Transform and z-Transform Jonas Braasch.
UNIT-I SIGNALS & SYSTEMS.
Z TRANSFORM AND DFT Z Transform
Discrete-Time Signal processing Chapter 3 the Z-transform
Review of DSP.
Laplace Transforms Important analytical method for solving linear ordinary differential equations. - Application to nonlinear ODEs? Must linearize first.
Laplace Transforms Important analytical method for solving linear ordinary differential equations. - Application to nonlinear ODEs? Must linearize first.
Presentation transcript:

Infinite Impulse Response (IIR) Filters Uses both the input signal and previous filtered values y[n] = b 0 x[n] + b 1 x[n-1] + b 2 x[n-2] + … + a 1 y[n-1] + a 2 y[n-2] + a 3 y[n-3] + … The b k coefficients comprise the FIR part; filtering the input signal The a k coefficients comprise the IIR part; additional filtering using previously filtered values This concept has overlap with neural networks, a popular algorithm that statistically “learns” Sometimes called recursive filters

IIR Filter Code public static double[] convolution(double[] signal, double[] b, double[] a) { double[] y = new double[signal.length + b.length - 1]; for (int i = 0; i < signal.length; i ++) { for (int j = 0; j < b.length; j++) { if (i-j>=0) y[i] += b[j]*signal[i - j]; } if (a!=null) { for (int j = 1; j < a.length; j ++) { if (i-j>=0) y[i] -= a[j] * y[i - j]; } } return y; }

Characteristics of Recursive Filters Advantages –Powerful filtering with very few parameters –Execute very fast Example 1: b 0 =.15 and a 1 =.85 Example 1: b 0 = 0.93 b 1 = a 1 = 0.86 Input Signal Example 1 output Example 2 output

Low and High Pass Recursive Filter Low Pass: b 0 = 1-x, a 1 = x High Pass: b 0 = (1+x)/2, b 1 = -(1+x)/x, a 1 = x 0≤x≤1, which controls the low and high pass boundaries

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, 2011.

IIR Disadvantages float x = 1 for (int i=0; i<N; i++) { float a=Math.random(); float b=Math.random(); x = x + a; x = x + b; x = x - a; x = x - b; } Loops  Error  Do you see the flaws in the above program? Can be unstable: y n = x n + y n-1 //running sum Additive errors propagate (round off drift) Possible non-linear group delay

IIR Moving Average Filter Illustration (Sum of seven previous samples) y[50] = x[47]+x[48]+x[49]+x[50]+x[51]+x[52]+x[53] y[51] = x[48]+x[49]+x[50]+x[51]+x[52]+x[53]+x[54] = y[50] + x[54] – x[47] Example: {1,2,3,4,5,4,3,2,1,2,3,4,5}; M = 4 –Starting filtered values: {¼, ¾, 1 ½, 2 ½, … } –Next value: y 4 = 2 ½ + (5 – 1)/4 = 3 ½ Filter of degree (length) M –Centered Version: y n = y n-1 + x n+(M-1)/2 - x n-(M-1)/2 – 1 –Non Centered Version: y n = y n-1 + x n /M –x n-M /M Two additions per point no matter the filter length Note: Integers work best with this approach to avoid round off drift

Transforms Procedure –Transform the problem into a different domain –Execute a simpler algorithm in the transformed space –Transform back to get the solution DSP Example: We need a well-defined way to determine IIR filter coefficients that result in a filter that performs properly Image Processing : Mapping a three dimensional image into two dimension Some problems are difficult (or impossible) to solve directly

Laplace Transform The Fourier domain is a one dimensional space; each point represents a sinusoid of a particular frequency The Laplace domain (S- Domain) is a two dimensional space of complex numbers; each point represents sinusoids of a particular frequency that either amplifies with higher y-axis values or degrades with lower y-axis values Works with continuous functions. Positive frequency sinusoid Negative frequency sinusoid Fourier Domain Laplace Domain Positive frequency sinusoid that amplifies at a positive rate Positive frequency sinusoid that exponentially decay (attenuates) Imaginary axis Real axis

The S-Domain 1.Each S-Domain point models a basis function 2.The top half is a mirror image of the bottom Real axis Imag axis Note: The waveforms are counterintuitive since filters convolute from the current time backward. Attenuating waves, actually produces unstable filters

Laplace Transform Example The Fourier transform is the Laplace Transform when σ=0

Laplace Transform Consider a process whose characteristics change over time Some function governs the changing behavior of the process We observe the process as a signal measured at points of time We want to predict the outputs, when the input system interacts with a filtering system process. We can model this problem with a differential equation, where time is the independent variable: a 1 y ’’’(t) + a 2 y’’(t) + a 3 y’(t) = b 1 x’(t) +b 2 x 2 x(t) A technique for solving differential equations

Laplace Transform Definition s is a complex number (σ+jω) where σ controls the degree of exponential decay and ω controls the frequency of the basis function e -st = e -(σ+jω)t = e -jωt / e σt The denominator controls the decay rate The numerator controls the frequency The integral starts if we are not interested in negative time (time past) dt

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, Impact of σ, ω values on the resulting basis function Assuming σ is negative

Poles and Zeroes The integrations causes S-plane some points to: –Evaluate to 0 (these are zeroes) –Evaluate to ∞ (these are poles) Pole and zero points determine IIR filter coefficients Note: Designing a filter comes down to picking the pole and zero points on the S-plane dt

An S-domain Plot Note The poles are the peaks The zeroes are the valleys Note: The third dimension is the magnitude of ∫ f(t)e -st dt at s = (σ+jω)

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, 2011.

Time domain impulse response

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, Attenuating impulse response Amplifying impulse response

The Low Pass Filter Illustration Transform the rectangular time domain pulse into the frequency domain and Into the s-domain

S-domain for a notch filter Fourier frequencies are the points where the real value is zero Notation x = pole ○ = zero

The z-transform Z-transform is the discrete cousin to the Laplace Transform Laplace Transform (s = σ+jω) – Extends the Fourier Transform, uses integrals and continuous functions – s = e -(σ+jω)t becomes the Fourier transform when ω = 0 – Fourier points fall along the imaginary axis – S-domain stable region is on the negative half of the domain Z-Transform (z = re -2 π k/t s ) – Extends the Discrete Fourier Transform, uses sums and discrete samples – z = e -j2πk/t s becomes the Discrete Fourier Transform (t s =sample size) – Four transform points fall along the unit circle – Z-domain stable domain are those within the unit circle Z{x[n]} =

Compare S-plane to Z-plane (cont.) Filter design S: analog filters; Z: IIR filters Equations S: differential equations, Z: difference equations Filter Points S: rectangular along i axis, Z: polar around unit circle Frequencies S: -∞ to ∞ (frequency line). Z: 0 to 2 π (frequency circle) Plots S and Z: Upper and lower half are mirror images Looking down vertically from the top of the domain Note: the Lines to left of s-plane correspond to circles within the unit circle in the z-plane Negative frequencies Positive frequencies

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, 2011.

Analog Filter Example σ=(A-3)/2RC; ω=±(A 2 +6A-5) ½ /2RC Sallen-Key Filters on a circle of 1/RC radius A = amplification R= resistance C = capacitance

ButterWorth Filters ButterWorth poles are equally spaced around the left side of a circle

Example Low Pass Filters Butterworth poles are equally spaced on a circle Chebshev poles are equally spaced on an ellipse Elliptic poles are on an ellipse; zeroes added to the stopband north and south of the poles

Examples rφPolesa1a ±0.54j ±0.67j ±0.76j ±0.78j x x x x x x x x FreqBandwthrφPoles F ±0.116j F ±0.719j F ±0.874j x x x x x x There are tables of pole/zero points and their effects

Pole Placement Poles characterized by: – Amplitude: height of the resonance – Frequency: placement in the spectrum – Bandwidth: Sharpness of the pole Place pole at re iφ – Amplitude and bandwidth shrink as r approaches the origin 3-db down (half power) estimate = -2 ln(r) or 2(1-r)/r ½ – ω controls the resonant frequency  When ω ≠0, IIR coefficients will be complex numbers  IIR coefficients real if there are conjugate pairs (re iφ,re -iφ )  If r < 0.5, the relationship between φ and frequency breaks down because the pole “skirts” cause results to be less precise

Transfer Function 1.IIR Definition: y n = b 0 x n + b 1 x n-1 +…+ b M x n-M + a 1 y n-1 +…+ a N y n-N 2.Z transform both sides: Y z =Z{b 0 x n +b 1 x n-1 +…+b M x n-M +a 1 y n-1 +…+a N y n-N } 3.Linearity Property: Y z = Z{b 0 x n }+Z{b 1 x n-1 }+…+Z{b M x n-M }+Z{a 1 y n-1 }+…+Z{a N y n-N } 4.Time delay property (Z{x n-k } = x z z -k ) Y z = b 0 X z + b 1 X z z -1 +…+b n-M X z z -M + a 1 Y z z -1 +…+a N Y z z -N 5.Gather Terms Y z - a 1 Y z z -1 -…- a N Y z z -N = b 0 X z + b 1 X z z -1 +…+ b n-M X z -M Y z (1- a 1 z -1 -…- a N z -N ) = X z (b 0 + b 1 z -1 +…+ b n-M z -M ) 6.Divide to get transfer function Y z /X z = H z = (b 0 + b 1 z -1 +…+ b n-M z -M )/(1- a 1 z -1 -…- a N z -N ) Y z = X z (Y z /X z ) = X z (H z ) // H z is the transform function for the filter 7.Perform Inverse Z transform: y[n] = x[n] * filter[n] // where * is convolution Because Z domain multiplication is time domain convolution A polynomial equation that defines filter coefficients for particular Z,S domain setting Starting with the IIR definition, derive Z-Transform Transfer Function Z{x[n]} =

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, 2011.

Transfer Function Example Suppose – b 0 =0.389, b 1 =-1.558, b 2 =2.338, b 3 =-1.558, b 4 =0.389 – a 1 =2.161, a 2 =-2.033, a 3 =0.878, a 4 = Transfer Function H[z] = z z z z -4 / ( z z z z -4 ) = 0.389z z z z / (z z z z ) Find the roots = (z-z 1 )(z-z 2 )(z-z 3 )(z-z 4 ) / (z-p 1 )(z-p 2 )(z-p 3 )(z-p 4 ) Note: The bottom form tells us where the zeroes and poles are

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, 2011.

Notch Filter Z 1 = 1.00 e i(π/4), Z 2 = 1.00 e i(-π/4) P 1 =0.9e i(π/4), P 2 =0.9e i(-π/4) Z 1 = i Z 2 = i P 1 = i P 2 = i 1.Convert to rectangular form 2.Multiply the complex polynomials 3.Collect terms 4.Use the coefficients for the filter Note: Compare to the s-plane example

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, Second-order low pass IIR filter examples

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, 2011.

Linear filters can be combined into parallel or serial systems

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, Note: It’s easier to design multiple two tap systems than a larger multiple tap system

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, Original Gain: (b 0 +b 1 )/(1 - a 1 ) = / (1-0.87) = Do normalize gain, divide coefficients by 3.64