iir ppt

28
Infinite Impulse Response (IIR) Filters Recursive Filters: yn ayn ayn N bxn bxn N N N () ( ) ... ( ) () ... ( ) 1 0 1 with constant coefficients. a b i j ,..., Advantages: very selective filters with a few parameters; Disadvantages: a) in general nonlinear phase, b) can be unstable.

Upload: jeeva-nantham

Post on 27-Sep-2015

222 views

Category:

Documents


1 download

DESCRIPTION

iir

TRANSCRIPT

  • Infinite Impulse Response (IIR) FiltersRecursive Filters:with constant coefficients. Advantages: very selective filters with a few parameters;Disadvantages:a) in general nonlinear phase,b) can be unstable.

  • Design Techniques: discretization of analog filtersProblem: we need to map the derivative operator s into the time shift operator z,and make sure that the resulting system is still stable.

  • Two major techniques Euler Approximation (easiest), Bilinear Transformation (best).Euler Approximation of the differential operator:take the z-Transform of both sides: approximation of s

  • Example:take the analog filter with transfer function and discretize itwith a sampling frequency .By Eulers approximationThe filter is implemented by the difference equation

  • Problem with Euler Approximation: it maps the whole stable region of the s-plane into a subset of the stable region in the z-planes-planez-planesinceif Re[s]
  • Bilinear Transformation. It is based on the relationshipTake the z-Transform of both sides:which yields the bilinear transformation:

  • Main Property of the Bilinear Transformation: it preserves the stability regions.s-planez-planesince:

  • Mapping of Frequency with the Bilinear Transformation.Magnitude:Phase:where

  • See the meaning of this:it is a frequency mapping between analog frequency and digital freqiency.

  • Example: we want to design a digital low pass filter with a bandwith and a sampling frequency . Use the Bilinear Transformation. Step 1: specs in the digital freq. domain Step 2: specs of the analog filter to be digitized:Solution:or equivalently Step 3: design an analog low pass filter (more later) with a bandwith ; Step 4: apply Bilinear Transformation to obtain desired digital filter.

  • Design of Analog FiltersSpecifications:passbandtransitionbandstopband

  • Two Major Techniques: Butterworth, ChebychevButterworth:Specify from passband, determine N from stopband:

  • Poles of Butterworth Filter:which yields the poles as solutionsand choose the N poles in the stable region.s-plane++++N=2poles

  • Example: design a low pass filter, Butterworth, with 3dB bandwith of 500Hz and 40dB attenuation at 1000Hz.Solution: solve for N from the expression

    poles at

  • Chebychev Filters.Based on Chebychev Polynomials:Property of Chenychev Polynomials:within the interval Chebychev polynomials have least maximum deviation from 0 compared to polynomials of the same degree and same highest order coefficient

  • Why? Suppose there exists with smaller deviation then But: has degree 2

    and it cannot have three roots!!!So: you cannot find a P(x) which does better (in terms of deviation from 0) then the Chebychev polynomial.

  • Chebychev Filter:Since (easy to show from the definition), then

  • Design of Chebychev Filters:Formulas are tedious to derive. Just give the results:Given: the passband, and which determines the ripple in the passband, compute the poles from the formulaes-plane

  • Example: design a Chebychev low pass filter with the following specs: passband with a 1dB ripple, stopband with attenuation of at least 40dB.Step 1: determine . The passband frequency For 1dB ripple, Step 2: determine the order N. Use the formulawith , to obtain

  • Frequency TransformationsWe can design high pass, bandpass, bandstop filters from transformations of low pass filters.Low Pass to High Pass:same value at

  • Low Pass to Band Pass:The tranformationmaps

  • Low Pass to Band Stop

  • How to make the transformation:Consider the transfer functionthen with we obtainwith zeros and poles solutions of also n-m extra zeros at s where

  • IIR filter design using MatlabIn Matlab there are three functions for each class of filters (Butterworth, Chebytchev1, Chebytchev2):BUTTAPCHEB1APCHEB2APPoles and Zeros of Analog Prototype FilterBUTTERCHEBY1CHEBY2Numerator and Denominator from N and BUTTORDCHEBY1ORDCHEBY2ORDN and from specifications

    Example. We want to design an IIR Digital Filter with the following specifications:Pass Band0 to 4kHz, with 1dB ripple;Stop Band> 8kHz with at least 40 dB attenuationSampling frequency 40kHzType of Filter: Butterworth.Using Matlab: >> [N, fc]=butterord(fp, fs, Rp, Rs); % fp, fs=passband and stopband freq relative to Fs/2>> [B, A]=butter(N, fc);% B, A vectors of numerator and denominator coefficients.In our case:[N, fc]=butterord(4/20, 8/20, 1, 40), would yield N=7, fc=0.2291;[B, A]=butter(7, 0.2291), would yield the transfer function B(z)/A(z).

  • Lets verify these numbers:Step 1: specifications in the digital frequency domain:Step 2: specifications for analog filter from the transformation

  • Step 3: choose (say) Butterworh Filterwith and from the ripple specification Step 4: determine order N from attenuation of 40dBwith yields N=7

  • Step 5: finally the cutoff frequency, from the equationWhich yields , corresponding to a digital frequency Step 6: the desired Filter is obtained by the function[num, den] = butter( 7 , 0.6889/)

  • Magnitude and Phase Plots: