SlideShare a Scribd company logo
1 of 44
Download to read offline
Design of IIR Filters

          Elena Punskaya
   www-sigproc.eng.cam.ac.uk/~op205


                            Some material adapted from courses by
                            Prof. Simon Godsill, Dr. Arnaud Doucet,
                       Dr. Malcolm Macleod and Prof. Peter Rayner




                                                                      1
IIR vs FIR Filters




                     2
IIR as a class of LTI Filters

Difference equation:



                            Transfer function:




To give an Infinite Impulse Response (IIR), a filter must be
recursive, that is, incorporate feedback N ≠ 0, M ≠ 0
        the recursive (previous output) terms feed back
        energy into the filter input and keep it going.

(Although recursive filters are not necessarily IIR)
                                                               3
IIR Filters Design from an Analogue Prototype


• Given filter specifications, direct
  determination of filter coefficients is too
  complex

• Well-developed design methods exist for
  analogue low-pass filters

• Almost all methods rely on converting an
  analogue filter to a digital one


                                                 4
Analogue filter Rational Transfer Function


(                )




                                                 5
Analogue to Digital Conversion
                          Im (z)




                                   Re (z)




                                        6
Impulse Invariant method




                           7
Impulse Invariant method: Steps



1. Compute the Inverse Laplace transform to
   get impulse response of the analogue filter

2. Sample the impulse response (quickly
   enough to avoid aliasing problem)

3. Compute z-transform of resulting sequence


                                                 8
Example 1 – Impulse Invariant Method

Consider first order analogue filter

                           = 1-

Corresponding impulse response is

                   δ   -          v
               The presence of delta term prevents sampling of
               impulse response which thus cannot be defined
               Fundamental problem: high-pass and band-stop
               filters have functions with numerator and
               denominator polynomials of the same degree and
               thus cannot be designed using this method
                                                             9
Example 2 – Impulse Invariant Method

Consider an analogue filter



Step 1. Impulse response
of the analogue filter

Step 2. Sample the impulse
response

Step 3. Compute z-
transform

    The poles are mapped as
                                              10
Impulse Invariant Method

Indeed, in the general case the poles are mapped as
                             k
                       k

since any rational transfer function with the numerator
degree strictly less than the denominator degree can be
decomposed to partial fractions


                                 k



and similarly it can be shown

                                         k


     k                                                    11
Impulse Invariant Method: Stability


Since poles are mapped as:
                     k
                k




stable analogue filter is transformed into
stable digital filter

                             <1
                         k




                                          12
Summary of the Impulse Invariant Method




                                          13
Summary of the Impulse Invariant Method


• Advantage:
  – preserves the order and stability of the
    analogue filter

• Disadvantages:
  – Not applicable to all filter types (high-pass,
    band-stop)
  – There is distortion of the shape of
    frequency response due to aliasing

                            not in common use
                                                     14
Matched z-transform method




                             15
Example of Impulse Invariant vs Matched z transform
                     methods




                                               16
Backward Difference Method

The analogue-domain variable s represents differentiation.
We can try to replace s by approximating differentiation operator in the
digital domain:




Thus,
           y(t) =                 y(n) ≈

                                   Y(z) ≈                    X(z)
  Which suggests the s-to-z transformation:


                                              delay
                                              backward difference operator17
Backward Difference Operator




                               18
Backward Difference method - Stability




                           - 0.5 = 0.5                      - 0.5 = 0.5

                                         The Left half s-plane onto the
                                         interior of the circle with radius
                                         0.5 and centre at 0.5 in the z-
                                         plane

Stable analogue filters become stable digital filters.
However, poles are conned to a relatively small set of frequencies,
no highpass filter possible!                                              19
Summary of the Backward Difference method


• Since the imaginary axis in the s domain are
  not mapped to the unit circle we can expect
  that the frequency response will be
  considerably distorted

• An analogue high-pass filter cannot be
  mapped to a digital high-pass because the
  poles of the digital filter cannot lie in the
  correct region

             method is crude and rarely used

                                                  20
Bilinear transform

• Bilinear transform is a correction of the backwards
  difference method

• The bilinear transform (also known as Tustin's
  transformation) is defined as the substitution:



•   It is the most popular method

• The bilinear transform produces a digital filter whose
  frequency response has the same characteristics
  as the frequency response of the analogue filter (but
  its impulse response may then be quite different).

                                                           21
The bilinear transform


 The bilinear transform




• Note 1.       Although the ratio could have been written
  (z-1)/(z+1), that causes unnecessary algebra later,
  when converting the resulting transfer function into a
  digital filter;

• Note 2.      In some sources you will see the factor
  (2/T) multiplying the RHS of the bilinear transform;
  this is an optional scaling, but it cancels and does not
  affect the final result.

                                                         22
Where is the Bilinear Transform coming from?




                                           23
Properties of the Bilinear Transform



To derive the properties of the bilinear transform, solve
for z, and put




                                           (1 + a ) + ω 2
              1 + s 1 + a + jω
                                                    2
                                        2
           z=      =           ; hence z =
                                           (1 − a )2 + ω 2
              1 − s 1 − a − jω



                                                             24
Properties of the Bilinear Transform
Look at two important cases:
1. The imaginary axis, i.e. =0. This corresponds to the
   boundary of stability for the analogue filter’s poles.
   With =0, we have




   the imaginary (frequency) axis in the s-plane maps to
   the unit circle in the z-plane
2. With <0, i.e. the left half-plane in the s-plane we have


    left half s-plane maps onto the interior of the unit circle   25
Properties of the Bilinear Transform

Thus the bilinear transform maps the Left half s-plane onto the interior of the unit
circle in the z-plane:
s-plane
                                                      z-plane

                                                                1




                                                                            1




This property allows us to obtain a suitable frequency response for the digital
                                                                             26
filter, and also to ensure the stability of the digital filter.
Properties of the Bilinear Transform



    z-1
s = z +1
                   -1
           =       +1

               (                         )
           =




                                             27
Properties of the Bilinear Transform

Hence the Bilinear Transform preserves the following
  important features of the frequency response:


1. the Ω↔ ω mapping is monotonic, and
2. Ω= 0 is mapped to ω = 0, and Ω = ∞ is mapped to ω =
   π (half the sampling frequency). Thus, for example, a
   low-pass response that decays to zero at Ω = ∞
   produces a low-pass digital filter response that decays
   to zero at ω = π.
3. Mapping between the frequency variables is


                                                        28
Properties of the Bilinear Transform




If the frequency response of the analogue filter at frequency Ω is H(jΩ),
then the frequency response of the digital filter at the corresponding
frequency ω = 2 arctan(ω) is also H(j Ω). Hence -3dB frequencies
become -3dB frequencies, minimax responses remain minimax, etc.
                                                                     29
Proof of Stability of the FIlter


Suppose the analogue prototype H(s) has a stable pole at            , i.e.




Then the digital filter        is obtained by substituting




                                   ,
Since H(s) has a pole at                          has a pole at
because


However, we know that                    lies within the unit circle. Hence the filter
is guaranteed stable provided H(s) is stable.
                                                                               30
Frequency Response of the Filter
The frequency response of the analogue filter is




The frequency response of the digital filter is




Hence we can see that the frequency response is warped by a function


    Analogue Frequency                                  Digital Frequency        31
                                                                            31
Design using the bilinear transform

The steps of the bilinear transform method are as follows:


     “Warp” the digital critical (e.g. band-edge or quot;cornerquot;) frequencies ωi , in
1.
     other words compute the corresponding analogue critical frequencies Ω i =
     tan(ωi/2).


2.   Design an analogue filter which satisfies the resulting filter response
     specification.


3.   Apply the bilinear transform


     to the s-domain transfer function of the analogue filter to generate the required
     z-domain transfer function.                                                         32
                                                                                32
Example: Application of Bilinear Transform




Design a first order low-pass digital filter with -3dB frequency of 1kHz
and a sampling frequency of 8kHz using a the first order analogue low-pass
filter



which has a gain of 1 (0dB) at zero frequency, and a gain of -3dB ( = √0.5 )
at Ω c rad/sec (the quot;cutoff frequency quot;).




                                                                               33
Example: Application of Bilinear Transform


• First calculate the normalised digital cutoff frequency:
                                          3dB cutoff frequency

                                           sampling frequency

• Calculate the equivalent pre-warped analogue filter cutoff
  frequency (rad/sec)

• Thus, the analogue filter has the system function




                                                                 34
Example: Application of Bilinear Transform

Apply Bilinear transform




                                         Normalise to unity for
                                         recursive implementation

As a direct form implementation:
                                     Keep 0.2929 factorised to save
                                     one multiply




                                                        35
Example: Magnitude Frequency Response




               ωc = π/4
Note that the digital filter response at zero frequency equals 1, as for the analogue
filter, and the digital filter response at ω = π equals 0, as for the analogue filter at
Ω = ∞. The –3dB frequency is ωc = π/4, as intended.                                        36
Example: Pole-zero diagram for digital design

Note that:
• The filter is stable, as expected
• The design process has added an extra zero compared to the prototype
         - this is typical of filters designed by the bilinear transform.
                               Imag(z)




                                                  1
                    -1
                                                      Re(z)
                      O                  X




                                                                            37
Example: Pole-zero diagram for digital design

There is a Matlab routine BILINEAR which computes the
bilinear transformation.


The example above could be computed, for example, by typing
[NUMd,DENd] = BILINEAR([0.4142],[1 0.4142],0.5)



which returns
NUMd =
 0.2929   0.2929
DENd =
 1.0000 -0.4142

                                                          38
Designing high-pass, band-pass and band-stop filters

 • The previous examples we have discussed
   have concentrated on IIR filters with low-pass
   characteristics.

 • There are various techniques available to
   transform a low-pass filter into a high-
   pass/band-pass/band-stop filters.

 • The most popular one uses a frequency
   transformation in the analogue domain.

                                                39
Designing filters uding frequency transformation




                                              40
Frequency transformations




                            41
Example. Frequency transformation




                                    42
Example. Frequency transformation




                                    43
Thank you!



             44

More Related Content

What's hot

Ssb generation method
Ssb generation methodSsb generation method
Ssb generation methodjahirpatel
 
Pipelining approach
Pipelining approachPipelining approach
Pipelining approachGopinathD17
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filtersop205
 
DIGITAL SIGNAL PROCESSING
DIGITAL SIGNAL PROCESSINGDIGITAL SIGNAL PROCESSING
DIGITAL SIGNAL PROCESSINGSnehal Hedau
 
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter DesignDSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter DesignAmr E. Mohamed
 
Schmitt trigger circuit
Schmitt trigger circuitSchmitt trigger circuit
Schmitt trigger circuittaranjeet10
 
FILTER DESIGN
FILTER DESIGNFILTER DESIGN
FILTER DESIGNnaimish12
 
Fir filter design (windowing technique)
Fir filter design (windowing technique)Fir filter design (windowing technique)
Fir filter design (windowing technique)Bin Biny Bino
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filterA. Shamel
 
DSP_FOEHU - Lec 10 - FIR Filter Design
DSP_FOEHU - Lec 10 - FIR Filter DesignDSP_FOEHU - Lec 10 - FIR Filter Design
DSP_FOEHU - Lec 10 - FIR Filter DesignAmr E. Mohamed
 
Basics of digital filters
Basics of digital filtersBasics of digital filters
Basics of digital filtersSmile Hossain
 
Differential amplifier
Differential amplifierDifferential amplifier
Differential amplifiersarunkutti
 
DSP_FOEHU - Lec 07 - Digital Filters
DSP_FOEHU - Lec 07 - Digital FiltersDSP_FOEHU - Lec 07 - Digital Filters
DSP_FOEHU - Lec 07 - Digital FiltersAmr E. Mohamed
 
Introduction to DSP.ppt
Introduction to DSP.pptIntroduction to DSP.ppt
Introduction to DSP.pptDr.YNM
 
Decimation in time and frequency
Decimation in time and frequencyDecimation in time and frequency
Decimation in time and frequencySARITHA REDDY
 

What's hot (20)

Chebyshev filter
Chebyshev filterChebyshev filter
Chebyshev filter
 
Ssb generation method
Ssb generation methodSsb generation method
Ssb generation method
 
Pipelining approach
Pipelining approachPipelining approach
Pipelining approach
 
Sampling Theorem
Sampling TheoremSampling Theorem
Sampling Theorem
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filters
 
DIGITAL SIGNAL PROCESSING
DIGITAL SIGNAL PROCESSINGDIGITAL SIGNAL PROCESSING
DIGITAL SIGNAL PROCESSING
 
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter DesignDSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
 
Schmitt trigger circuit
Schmitt trigger circuitSchmitt trigger circuit
Schmitt trigger circuit
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filter
 
FILTER DESIGN
FILTER DESIGNFILTER DESIGN
FILTER DESIGN
 
Fir filter design (windowing technique)
Fir filter design (windowing technique)Fir filter design (windowing technique)
Fir filter design (windowing technique)
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filter
 
DSP_FOEHU - Lec 10 - FIR Filter Design
DSP_FOEHU - Lec 10 - FIR Filter DesignDSP_FOEHU - Lec 10 - FIR Filter Design
DSP_FOEHU - Lec 10 - FIR Filter Design
 
Butterworth filter
Butterworth filterButterworth filter
Butterworth filter
 
Basics of digital filters
Basics of digital filtersBasics of digital filters
Basics of digital filters
 
Differential amplifier
Differential amplifierDifferential amplifier
Differential amplifier
 
Properties of dft
Properties of dftProperties of dft
Properties of dft
 
DSP_FOEHU - Lec 07 - Digital Filters
DSP_FOEHU - Lec 07 - Digital FiltersDSP_FOEHU - Lec 07 - Digital Filters
DSP_FOEHU - Lec 07 - Digital Filters
 
Introduction to DSP.ppt
Introduction to DSP.pptIntroduction to DSP.ppt
Introduction to DSP.ppt
 
Decimation in time and frequency
Decimation in time and frequencyDecimation in time and frequency
Decimation in time and frequency
 

Similar to Design of IIR filters

DSP_FOEHU - Lec 11 - IIR Filter Design
DSP_FOEHU - Lec 11 - IIR Filter DesignDSP_FOEHU - Lec 11 - IIR Filter Design
DSP_FOEHU - Lec 11 - IIR Filter DesignAmr E. Mohamed
 
Finite word length of IIR filters Limit cycles due to product round-off error...
Finite word length of IIR filters Limit cycles due to product round-off error...Finite word length of IIR filters Limit cycles due to product round-off error...
Finite word length of IIR filters Limit cycles due to product round-off error...Praveen Kumar
 
Chapter 6 - Modelling and Control of Converters.pdf
Chapter 6 - Modelling and Control of Converters.pdfChapter 6 - Modelling and Control of Converters.pdf
Chapter 6 - Modelling and Control of Converters.pdfbenson215
 
ECE 626 project report Switched Capacitor
ECE 626 project report Switched CapacitorECE 626 project report Switched Capacitor
ECE 626 project report Switched CapacitorKarthik Rathinavel
 
Introduction, concepts, and mathematics of IIR filters.ppt
Introduction, concepts, and mathematics of IIR filters.pptIntroduction, concepts, and mathematics of IIR filters.ppt
Introduction, concepts, and mathematics of IIR filters.pptdebeshidutta2
 
Wavelet Based Image Compression Using FPGA
Wavelet Based Image Compression Using FPGAWavelet Based Image Compression Using FPGA
Wavelet Based Image Compression Using FPGADr. Mohieddin Moradi
 
Ch7 frequency response analysis
Ch7 frequency response analysisCh7 frequency response analysis
Ch7 frequency response analysisElaf A.Saeed
 
MAE 593 Final ProjectReport
MAE 593 Final ProjectReportMAE 593 Final ProjectReport
MAE 593 Final ProjectReportnsapre
 
Active filters
Active filtersActive filters
Active filtersfaisal_18
 
Implementation of Digital Filters
Implementation of Digital FiltersImplementation of Digital Filters
Implementation of Digital Filtersop205
 
Digital control systems (dcs) lecture 18-19-20
Digital control systems (dcs) lecture 18-19-20Digital control systems (dcs) lecture 18-19-20
Digital control systems (dcs) lecture 18-19-20Ali Rind
 
Op amp applications filters cw final (2)
Op amp applications filters cw final (2)Op amp applications filters cw final (2)
Op amp applications filters cw final (2)JUNAID SK
 
Oscillators
OscillatorsOscillators
Oscillators12nitin
 
Fir and iir filter_design
Fir and iir filter_designFir and iir filter_design
Fir and iir filter_designshrinivasgnaik
 

Similar to Design of IIR filters (20)

DSP_FOEHU - Lec 11 - IIR Filter Design
DSP_FOEHU - Lec 11 - IIR Filter DesignDSP_FOEHU - Lec 11 - IIR Filter Design
DSP_FOEHU - Lec 11 - IIR Filter Design
 
Z transform Day 1
Z transform Day 1Z transform Day 1
Z transform Day 1
 
Finite word length of IIR filters Limit cycles due to product round-off error...
Finite word length of IIR filters Limit cycles due to product round-off error...Finite word length of IIR filters Limit cycles due to product round-off error...
Finite word length of IIR filters Limit cycles due to product round-off error...
 
Filter dengan-op-amp
Filter dengan-op-ampFilter dengan-op-amp
Filter dengan-op-amp
 
Chapter 6 - Modelling and Control of Converters.pdf
Chapter 6 - Modelling and Control of Converters.pdfChapter 6 - Modelling and Control of Converters.pdf
Chapter 6 - Modelling and Control of Converters.pdf
 
Simplified Model
Simplified ModelSimplified Model
Simplified Model
 
ECE 626 project report Switched Capacitor
ECE 626 project report Switched CapacitorECE 626 project report Switched Capacitor
ECE 626 project report Switched Capacitor
 
14 activefilters
14 activefilters14 activefilters
14 activefilters
 
Introduction, concepts, and mathematics of IIR filters.ppt
Introduction, concepts, and mathematics of IIR filters.pptIntroduction, concepts, and mathematics of IIR filters.ppt
Introduction, concepts, and mathematics of IIR filters.ppt
 
Wavelet Based Image Compression Using FPGA
Wavelet Based Image Compression Using FPGAWavelet Based Image Compression Using FPGA
Wavelet Based Image Compression Using FPGA
 
Ch7 frequency response analysis
Ch7 frequency response analysisCh7 frequency response analysis
Ch7 frequency response analysis
 
E04632231
E04632231E04632231
E04632231
 
Ece
EceEce
Ece
 
MAE 593 Final ProjectReport
MAE 593 Final ProjectReportMAE 593 Final ProjectReport
MAE 593 Final ProjectReport
 
Active filters
Active filtersActive filters
Active filters
 
Implementation of Digital Filters
Implementation of Digital FiltersImplementation of Digital Filters
Implementation of Digital Filters
 
Digital control systems (dcs) lecture 18-19-20
Digital control systems (dcs) lecture 18-19-20Digital control systems (dcs) lecture 18-19-20
Digital control systems (dcs) lecture 18-19-20
 
Op amp applications filters cw final (2)
Op amp applications filters cw final (2)Op amp applications filters cw final (2)
Op amp applications filters cw final (2)
 
Oscillators
OscillatorsOscillators
Oscillators
 
Fir and iir filter_design
Fir and iir filter_designFir and iir filter_design
Fir and iir filter_design
 

More from op205

3 f6 security
3 f6 security3 f6 security
3 f6 securityop205
 
3 f6 11_softdevmethodologies
3 f6 11_softdevmethodologies3 f6 11_softdevmethodologies
3 f6 11_softdevmethodologiesop205
 
3 f6 8_databases
3 f6 8_databases3 f6 8_databases
3 f6 8_databasesop205
 
3 f6 10_testing
3 f6 10_testing3 f6 10_testing
3 f6 10_testingop205
 
3 f6 9a_corba
3 f6 9a_corba3 f6 9a_corba
3 f6 9a_corbaop205
 
3 f6 9a_corba
3 f6 9a_corba3 f6 9a_corba
3 f6 9a_corbaop205
 
3 f6 9_distributed_systems
3 f6 9_distributed_systems3 f6 9_distributed_systems
3 f6 9_distributed_systemsop205
 
Lecture 7 Software Engineering and Design User Interface Design
Lecture 7 Software Engineering and Design User Interface Design Lecture 7 Software Engineering and Design User Interface Design
Lecture 7 Software Engineering and Design User Interface Design op205
 
Lecture 6 Software Engineering and Design Good Design
Lecture 6 Software Engineering and Design Good Design Lecture 6 Software Engineering and Design Good Design
Lecture 6 Software Engineering and Design Good Design op205
 
Lecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design PatternsLecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design Patternsop205
 
Lecture 4 Software Engineering and Design Brief Introduction to Programming
Lecture 4 Software Engineering and Design Brief Introduction to ProgrammingLecture 4 Software Engineering and Design Brief Introduction to Programming
Lecture 4 Software Engineering and Design Brief Introduction to Programmingop205
 
Lecture 3 Software Engineering and Design Introduction to UML
Lecture 3 Software Engineering and Design Introduction to UMLLecture 3 Software Engineering and Design Introduction to UML
Lecture 3 Software Engineering and Design Introduction to UMLop205
 
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...op205
 
Lecture 1 Software Engineering and Design Introduction
Lecture 1 Software Engineering and Design Introduction Lecture 1 Software Engineering and Design Introduction
Lecture 1 Software Engineering and Design Introduction op205
 
More on DFT
More on DFTMore on DFT
More on DFTop205
 
Digital Signal Processing Summary
Digital Signal Processing SummaryDigital Signal Processing Summary
Digital Signal Processing Summaryop205
 
Basics of Analogue Filters
Basics of Analogue FiltersBasics of Analogue Filters
Basics of Analogue Filtersop205
 
Introduction to Digital Signal Processing
Introduction to Digital Signal ProcessingIntroduction to Digital Signal Processing
Introduction to Digital Signal Processingop205
 
Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transformop205
 
Brief Review of Fourier Analysis
Brief Review of Fourier AnalysisBrief Review of Fourier Analysis
Brief Review of Fourier Analysisop205
 

More from op205 (20)

3 f6 security
3 f6 security3 f6 security
3 f6 security
 
3 f6 11_softdevmethodologies
3 f6 11_softdevmethodologies3 f6 11_softdevmethodologies
3 f6 11_softdevmethodologies
 
3 f6 8_databases
3 f6 8_databases3 f6 8_databases
3 f6 8_databases
 
3 f6 10_testing
3 f6 10_testing3 f6 10_testing
3 f6 10_testing
 
3 f6 9a_corba
3 f6 9a_corba3 f6 9a_corba
3 f6 9a_corba
 
3 f6 9a_corba
3 f6 9a_corba3 f6 9a_corba
3 f6 9a_corba
 
3 f6 9_distributed_systems
3 f6 9_distributed_systems3 f6 9_distributed_systems
3 f6 9_distributed_systems
 
Lecture 7 Software Engineering and Design User Interface Design
Lecture 7 Software Engineering and Design User Interface Design Lecture 7 Software Engineering and Design User Interface Design
Lecture 7 Software Engineering and Design User Interface Design
 
Lecture 6 Software Engineering and Design Good Design
Lecture 6 Software Engineering and Design Good Design Lecture 6 Software Engineering and Design Good Design
Lecture 6 Software Engineering and Design Good Design
 
Lecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design PatternsLecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design Patterns
 
Lecture 4 Software Engineering and Design Brief Introduction to Programming
Lecture 4 Software Engineering and Design Brief Introduction to ProgrammingLecture 4 Software Engineering and Design Brief Introduction to Programming
Lecture 4 Software Engineering and Design Brief Introduction to Programming
 
Lecture 3 Software Engineering and Design Introduction to UML
Lecture 3 Software Engineering and Design Introduction to UMLLecture 3 Software Engineering and Design Introduction to UML
Lecture 3 Software Engineering and Design Introduction to UML
 
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
 
Lecture 1 Software Engineering and Design Introduction
Lecture 1 Software Engineering and Design Introduction Lecture 1 Software Engineering and Design Introduction
Lecture 1 Software Engineering and Design Introduction
 
More on DFT
More on DFTMore on DFT
More on DFT
 
Digital Signal Processing Summary
Digital Signal Processing SummaryDigital Signal Processing Summary
Digital Signal Processing Summary
 
Basics of Analogue Filters
Basics of Analogue FiltersBasics of Analogue Filters
Basics of Analogue Filters
 
Introduction to Digital Signal Processing
Introduction to Digital Signal ProcessingIntroduction to Digital Signal Processing
Introduction to Digital Signal Processing
 
Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transform
 
Brief Review of Fourier Analysis
Brief Review of Fourier AnalysisBrief Review of Fourier Analysis
Brief Review of Fourier Analysis
 

Recently uploaded

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 

Recently uploaded (20)

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 

Design of IIR filters

  • 1. Design of IIR Filters Elena Punskaya www-sigproc.eng.cam.ac.uk/~op205 Some material adapted from courses by Prof. Simon Godsill, Dr. Arnaud Doucet, Dr. Malcolm Macleod and Prof. Peter Rayner 1
  • 2. IIR vs FIR Filters 2
  • 3. IIR as a class of LTI Filters Difference equation: Transfer function: To give an Infinite Impulse Response (IIR), a filter must be recursive, that is, incorporate feedback N ≠ 0, M ≠ 0 the recursive (previous output) terms feed back energy into the filter input and keep it going. (Although recursive filters are not necessarily IIR) 3
  • 4. IIR Filters Design from an Analogue Prototype • Given filter specifications, direct determination of filter coefficients is too complex • Well-developed design methods exist for analogue low-pass filters • Almost all methods rely on converting an analogue filter to a digital one 4
  • 5. Analogue filter Rational Transfer Function ( ) 5
  • 6. Analogue to Digital Conversion Im (z) Re (z) 6
  • 8. Impulse Invariant method: Steps 1. Compute the Inverse Laplace transform to get impulse response of the analogue filter 2. Sample the impulse response (quickly enough to avoid aliasing problem) 3. Compute z-transform of resulting sequence 8
  • 9. Example 1 – Impulse Invariant Method Consider first order analogue filter = 1- Corresponding impulse response is δ - v The presence of delta term prevents sampling of impulse response which thus cannot be defined Fundamental problem: high-pass and band-stop filters have functions with numerator and denominator polynomials of the same degree and thus cannot be designed using this method 9
  • 10. Example 2 – Impulse Invariant Method Consider an analogue filter Step 1. Impulse response of the analogue filter Step 2. Sample the impulse response Step 3. Compute z- transform The poles are mapped as 10
  • 11. Impulse Invariant Method Indeed, in the general case the poles are mapped as k k since any rational transfer function with the numerator degree strictly less than the denominator degree can be decomposed to partial fractions k and similarly it can be shown k k 11
  • 12. Impulse Invariant Method: Stability Since poles are mapped as: k k stable analogue filter is transformed into stable digital filter <1 k 12
  • 13. Summary of the Impulse Invariant Method 13
  • 14. Summary of the Impulse Invariant Method • Advantage: – preserves the order and stability of the analogue filter • Disadvantages: – Not applicable to all filter types (high-pass, band-stop) – There is distortion of the shape of frequency response due to aliasing not in common use 14
  • 16. Example of Impulse Invariant vs Matched z transform methods 16
  • 17. Backward Difference Method The analogue-domain variable s represents differentiation. We can try to replace s by approximating differentiation operator in the digital domain: Thus, y(t) = y(n) ≈ Y(z) ≈ X(z) Which suggests the s-to-z transformation: delay backward difference operator17
  • 19. Backward Difference method - Stability - 0.5 = 0.5 - 0.5 = 0.5 The Left half s-plane onto the interior of the circle with radius 0.5 and centre at 0.5 in the z- plane Stable analogue filters become stable digital filters. However, poles are conned to a relatively small set of frequencies, no highpass filter possible! 19
  • 20. Summary of the Backward Difference method • Since the imaginary axis in the s domain are not mapped to the unit circle we can expect that the frequency response will be considerably distorted • An analogue high-pass filter cannot be mapped to a digital high-pass because the poles of the digital filter cannot lie in the correct region method is crude and rarely used 20
  • 21. Bilinear transform • Bilinear transform is a correction of the backwards difference method • The bilinear transform (also known as Tustin's transformation) is defined as the substitution: • It is the most popular method • The bilinear transform produces a digital filter whose frequency response has the same characteristics as the frequency response of the analogue filter (but its impulse response may then be quite different). 21
  • 22. The bilinear transform The bilinear transform • Note 1. Although the ratio could have been written (z-1)/(z+1), that causes unnecessary algebra later, when converting the resulting transfer function into a digital filter; • Note 2. In some sources you will see the factor (2/T) multiplying the RHS of the bilinear transform; this is an optional scaling, but it cancels and does not affect the final result. 22
  • 23. Where is the Bilinear Transform coming from? 23
  • 24. Properties of the Bilinear Transform To derive the properties of the bilinear transform, solve for z, and put (1 + a ) + ω 2 1 + s 1 + a + jω 2 2 z= = ; hence z = (1 − a )2 + ω 2 1 − s 1 − a − jω 24
  • 25. Properties of the Bilinear Transform Look at two important cases: 1. The imaginary axis, i.e. =0. This corresponds to the boundary of stability for the analogue filter’s poles. With =0, we have the imaginary (frequency) axis in the s-plane maps to the unit circle in the z-plane 2. With <0, i.e. the left half-plane in the s-plane we have left half s-plane maps onto the interior of the unit circle 25
  • 26. Properties of the Bilinear Transform Thus the bilinear transform maps the Left half s-plane onto the interior of the unit circle in the z-plane: s-plane z-plane 1 1 This property allows us to obtain a suitable frequency response for the digital 26 filter, and also to ensure the stability of the digital filter.
  • 27. Properties of the Bilinear Transform z-1 s = z +1 -1 = +1 ( ) = 27
  • 28. Properties of the Bilinear Transform Hence the Bilinear Transform preserves the following important features of the frequency response: 1. the Ω↔ ω mapping is monotonic, and 2. Ω= 0 is mapped to ω = 0, and Ω = ∞ is mapped to ω = π (half the sampling frequency). Thus, for example, a low-pass response that decays to zero at Ω = ∞ produces a low-pass digital filter response that decays to zero at ω = π. 3. Mapping between the frequency variables is 28
  • 29. Properties of the Bilinear Transform If the frequency response of the analogue filter at frequency Ω is H(jΩ), then the frequency response of the digital filter at the corresponding frequency ω = 2 arctan(ω) is also H(j Ω). Hence -3dB frequencies become -3dB frequencies, minimax responses remain minimax, etc. 29
  • 30. Proof of Stability of the FIlter Suppose the analogue prototype H(s) has a stable pole at , i.e. Then the digital filter is obtained by substituting , Since H(s) has a pole at has a pole at because However, we know that lies within the unit circle. Hence the filter is guaranteed stable provided H(s) is stable. 30
  • 31. Frequency Response of the Filter The frequency response of the analogue filter is The frequency response of the digital filter is Hence we can see that the frequency response is warped by a function Analogue Frequency Digital Frequency 31 31
  • 32. Design using the bilinear transform The steps of the bilinear transform method are as follows: “Warp” the digital critical (e.g. band-edge or quot;cornerquot;) frequencies ωi , in 1. other words compute the corresponding analogue critical frequencies Ω i = tan(ωi/2). 2. Design an analogue filter which satisfies the resulting filter response specification. 3. Apply the bilinear transform to the s-domain transfer function of the analogue filter to generate the required z-domain transfer function. 32 32
  • 33. Example: Application of Bilinear Transform Design a first order low-pass digital filter with -3dB frequency of 1kHz and a sampling frequency of 8kHz using a the first order analogue low-pass filter which has a gain of 1 (0dB) at zero frequency, and a gain of -3dB ( = √0.5 ) at Ω c rad/sec (the quot;cutoff frequency quot;). 33
  • 34. Example: Application of Bilinear Transform • First calculate the normalised digital cutoff frequency: 3dB cutoff frequency sampling frequency • Calculate the equivalent pre-warped analogue filter cutoff frequency (rad/sec) • Thus, the analogue filter has the system function 34
  • 35. Example: Application of Bilinear Transform Apply Bilinear transform Normalise to unity for recursive implementation As a direct form implementation: Keep 0.2929 factorised to save one multiply 35
  • 36. Example: Magnitude Frequency Response ωc = π/4 Note that the digital filter response at zero frequency equals 1, as for the analogue filter, and the digital filter response at ω = π equals 0, as for the analogue filter at Ω = ∞. The –3dB frequency is ωc = π/4, as intended. 36
  • 37. Example: Pole-zero diagram for digital design Note that: • The filter is stable, as expected • The design process has added an extra zero compared to the prototype - this is typical of filters designed by the bilinear transform. Imag(z) 1 -1 Re(z) O X 37
  • 38. Example: Pole-zero diagram for digital design There is a Matlab routine BILINEAR which computes the bilinear transformation. The example above could be computed, for example, by typing [NUMd,DENd] = BILINEAR([0.4142],[1 0.4142],0.5) which returns NUMd = 0.2929 0.2929 DENd = 1.0000 -0.4142 38
  • 39. Designing high-pass, band-pass and band-stop filters • The previous examples we have discussed have concentrated on IIR filters with low-pass characteristics. • There are various techniques available to transform a low-pass filter into a high- pass/band-pass/band-stop filters. • The most popular one uses a frequency transformation in the analogue domain. 39
  • 40. Designing filters uding frequency transformation 40