PS403 - Digital Signal processing

Similar documents
ECE 410 DIGITAL SIGNAL PROCESSING D. Munson University of Illinois Chapter 12

Chapter 7: IIR Filter Design Techniques

DIGITAL SIGNAL PROCESSING UNIT III INFINITE IMPULSE RESPONSE DIGITAL FILTERS. 3.6 Design of Digital Filter using Digital to Digital

Signals and Systems. Lecture 11 Wednesday 22 nd November 2017 DR TANIA STATHAKI

PS403 - Digital Signal processing

EE482: Digital Signal Processing Applications

Poles and Zeros in z-plane

Discrete-Time David Johns and Ken Martin University of Toronto

Discrete Time Systems

Cast of Characters. Some Symbols, Functions, and Variables Used in the Book

Filter Analysis and Design

Filters and Tuned Amplifiers

Chapter 7: Filter Design 7.1 Practical Filter Terminology

EE 521: Instrumentation and Measurements

DIGITAL SIGNAL PROCESSING. Chapter 6 IIR Filter Design

Digital Signal Processing IIR Filter Design via Bilinear Transform

/ (2π) X(e jω ) dω. 4. An 8 point sequence is given by x(n) = {2,2,2,2,1,1,1,1}. Compute 8 point DFT of x(n) by

Like bilateral Laplace transforms, ROC must be used to determine a unique inverse z-transform.

Lecture 9 Infinite Impulse Response Filters

ELEG 305: Digital Signal Processing

Digital Signal Processing Lecture 8 - Filter Design - IIR

Digital Filters Ying Sun

Lecture 14: Windowing

Lecture 7 Discrete Systems

All-Pole Recursive Digital Filters Design Based on Ultraspherical Polynomials

Design of IIR filters

Stability Condition in Terms of the Pole Locations

Lecture 2 OKAN UNIVERSITY FACULTY OF ENGINEERING AND ARCHITECTURE

UNIT - III PART A. 2. Mention any two techniques for digitizing the transfer function of an analog filter?

INFINITE-IMPULSE RESPONSE DIGITAL FILTERS Classical analog filters and their conversion to digital filters 4. THE BUTTERWORTH ANALOG FILTER

Lecture 16: Filter Design: Impulse Invariance and Bilinear Transform

z-transforms Definition of the z-transform Chapter

Digital Control & Digital Filters. Lectures 21 & 22

Digital Signal Processing

Homework Assignment 11

Let H(z) = P(z)/Q(z) be the system function of a rational form. Let us represent both P(z) and Q(z) as polynomials of z (not z -1 )

V. IIR Digital Filters

Digital Signal Processing

Electronic Circuits EE359A

MITOCW watch?v=jtj3v Rx7E

ECE503: Digital Signal Processing Lecture 5

Digital Signal Processing

ECGR4124 Digital Signal Processing Exam 2 Spring 2017

UNIVERSITI SAINS MALAYSIA. EEE 512/4 Advanced Digital Signal and Image Processing

Butterworth Filter Properties

UNIVERSITY OF OSLO. Please make sure that your copy of the problem set is complete before you attempt to answer anything.

Optimum Ordering and Pole-Zero Pairing of the Cascade Form IIR. Digital Filter

Discrete Time Systems

Design of Narrow Stopband Recursive Digital Filter

Laplace Transform Analysis of Signals and Systems

Ch. 7: Z-transform Reading

Peaking and Shelving Filter Properties

Lecture 3 - Design of Digital Filters

Damped Oscillators (revisited)

E : Lecture 1 Introduction

Grades will be determined by the correctness of your answers (explanations are not required).

Analysis of Finite Wordlength Effects

-Digital Signal Processing- FIR Filter Design. Lecture May-16

Multimedia Signals and Systems - Audio and Video. Signal, Image, Video Processing Review-Introduction, MP3 and MPEG2

Multidimensional digital signal processing

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EC2314- DIGITAL SIGNAL PROCESSING UNIT I INTRODUCTION PART A

LINEAR-PHASE FIR FILTERS DESIGN

IT DIGITAL SIGNAL PROCESSING (2013 regulation) UNIT-1 SIGNALS AND SYSTEMS PART-A

IIR digital filter design for low pass filter based on impulse invariance and bilinear transformation methods using butterworth analog filter

Quadrature-Mirror Filter Bank

Grades will be determined by the correctness of your answers (explanations are not required).

Lecture 7 - IIR Filters

Optimal Design of Real and Complex Minimum Phase Digital FIR Filters

ECSE 512 Digital Signal Processing I Fall 2010 FINAL EXAMINATION

Signals and Systems. Problem Set: The z-transform and DT Fourier Transform

EECE 301 Signals & Systems Prof. Mark Fowler

SIGNAL PROCESSING. B14 Option 4 lectures. Stephen Roberts

APPLIED SIGNAL PROCESSING

Design IIR Butterworth Filters Using 12 Lines of Code

Digital Signal Processing Lecture 9 - Design of Digital Filters - FIR

From Continuous-Time Domain to Microcontroller Code

Experiment 13 Poles and zeros in the z plane: IIR systems

Fourier Series Representation of

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF INFORMATION TECHNOLOGY. Academic Year

Question Bank. UNIT 1 Part-A

EEL3135: Homework #4

Speaker: Arthur Williams Chief Scientist Telebyte Inc. Thursday November 20 th 2008 INTRODUCTION TO ACTIVE AND PASSIVE ANALOG

Problem Set 9 Solutions

Some of the different forms of a signal, obtained by transformations, are shown in the figure. jwt e z. jwt z e

Lecture 19 IIR Filters

Introduction to Digital Signal Processing

Electronic Circuits EE359A

Lecture 5 - Assembly Programming(II), Intro to Digital Filters

CHAPTER 2 RANDOM PROCESSES IN DISCRETE TIME

Discrete-Time Signals and Systems. Frequency Domain Analysis of LTI Systems. The Frequency Response Function. The Frequency Response Function

LAB 6: FIR Filter Design Summer 2011

Research Article Design of One-Dimensional Linear Phase Digital IIR Filters Using Orthogonal Polynomials

A.1 THE SAMPLED TIME DOMAIN AND THE Z TRANSFORM. 0 δ(t)dt = 1, (A.1) δ(t)dt =

Coefficients of Recursive Linear Time-Invariant First-Order Low-Pass and High-Pass Filters (v0.1)

SIGNALS AND SYSTEMS LABORATORY 4: Polynomials, Laplace Transforms and Analog Filters in MATLAB

Other types of errors due to using a finite no. of bits: Round- off error due to rounding of products

Lecture 18: Stability

( ) John A. Quinn Lecture. ESE 531: Digital Signal Processing. Lecture Outline. Frequency Response of LTI System. Example: Zero on Real Axis

How to manipulate Frequencies in Discrete-time Domain? Two Main Approaches

2.161 Signal Processing: Continuous and Discrete Fall 2008

Transcription:

PS403 - Digital Signal processing 6. DSP - Recursive (IIR) Digital Filters Key Text: Digital Signal Processing with Computer Applications (2 nd Ed.) Paul A Lynn and Wolfgang Fuerst, (Publisher: John Wiley & Sons, UK) We will cover in this section Infinite Impulse Response (FIR) filter design

Infinite Impulse Response (Recursive) Digital Filters Where FIR filters are non-recursive, I 2 R filters are recursive We already know that I 2 R filters depend on previous outputs y[n-m], M = 1, 2, 3, and current/previous values of the input x[n-m], m=0,1,.. We also know that they are concomitantly more computationally efficient than FIR filters and so why don t we just recast all FIR filters as IIR filters which can have 100s of coefficients? Answer: 1. Recursive filters can become unstable at particular frequencies if poorly designed 2. Recursive designs do not generally yield zero/linear phase characteristics

Infinite Impulse Response (Recursive) Digital Filters Design Method 1 We follow a procedure much the same as that outlined in chapter 4. We place poles and zeros at locations where we infer that the frequency response will be close to the desired one - Bit hit and miss though! As before we evaluate H(Ω) using a computer code. H Ω ( ) = K. % ' ' ' ' & n= M n= 0 n= N n= 0 { exp( jω) Z } n { exp( jω) P } n ( * * * * )

Infinite Impulse Response (Recursive) Digital Filters As before H(Ω) can be built form a superposition of 1 st and 2 nd Order systems (transfer functions) - Cascade Canonic Form i.e, we assess individually the effect of each pole and zero on H(Ω) Case 1. Real poles and zeros A real pole at Z = α will contribute to H(Ω) a factor: F 1 Ω ( ) = { exp( jω) α} = CosΩ α ( ) + jsinω

Infinite Impulse Response (Recursive) Digital Filters So the magnitude transfer function for the filter becomes: F ( 1 Ω) = { 1 2αCosΩ + α 2 } 1/ 2 F 1 in this case contributes to the denominator of H(Ω) or H(Ω). A real zero @ Z=α makes and identical contribution to the numerator of H(Ω) or H(Ω) and an n th order pole or zero yields a corresponding contribution raised to the power of n.

Infinite Impulse Response (Recursive) Digital Filters Case 2. Complex conjugate poles or zero pairs As before we use a polar coordinates (r, ±θ). A pole pair at (r, ±θ) yields a factor: F 2 Ω { }. exp jω ( ) = exp( jω) rexp( jθ) { ( ) rexp( jθ) } = exp( 2 jω) 2rCosθ exp( jω) + r 2 to the denominator of H(Ω). The magnitude or gain part of the frequency transfer function can be written as before: ( ) = Cos2Ω 2rCosθCosΩ + r 2 F 2 Ω {( ) 2 + ( Sin2Ω 2rCosθSinΩ) 2 } 1/ 2

Infinite Impulse Response (Recursive) Digital Filters Complex conjugate zero pairs make similar contribution to the numerator of H(Ω) As before the poles and zeros of H(Z); P n and Z n gives: ( ) = K. ( Z Z 1) ( Z Z 2 ) Z Z 3 ( Z P 1 )( Z P 2 ) Z P 3 H Z ( )... ( )... Using Z exp( jω); H( Z) H( Ω) Yielding the spectrum of the I 2 R filter ( ) = H Z H(Ω) ( ( ) Z 1 )( exp( jω) Z 2 ) exp jω ( exp( jω) P 1 )( exp( jω) P 2 ) exp jω K. exp jω ( ( ) Z 3 )... ( ) P 3 ( )...

Infinite Impulse Response (Recursive) Digital Filters The trick is to obtain a H A (Ω) as close as possible to the H D (Ω) with as few Z=plane poles and zeros as possible. As we know poles and zeros located close to the unit circle yield sharp peaks and nulls in the frequency transfer function H(Ω). Program no. 20 evaluate filter responses using the cascade Canonic form from user specified values of α or (r, ±θ), F 1 (Ω) and F 2 (Ω) respectively. From products of these 1 st and 2 nd order transfer functions the overall H(Ω) is computed. Cf: Figure 6.1 (a) Real Pole; a = 0.9, i.e. @ Z = 0.9 (b) Real 2nd order zero @ Z=-0.8, i.e., a cascaded LPF (c) A complex conjugate pole pair at r = 0.975, θ = ±150 O (d) A complex conjugate zero pair at r = 1.000, θ = ±50 O

Infinite Impulse Response (Recursive) Digital Filters Multiplying each of the frequency responses (or gains) in Figure 6.1a,b,c,d yields the total gain curve - Figure 6.2b The composite pole-zero plot is shown in Figure 6.2a Example - Graphical method for IIR filter design. Design a bandpass filter with centre frequency Ω 0 = π/2 and bandwidth 2Ω 1 = π/40 @ -3dB points. It must also have zero gain at Ω=0 & π. For centre frequency Ω 0 = π/2 we place complex conjugate pole pairs close to r =1 and θ = 90 0. At the -3dB points the gain H(Ω) must have dropped to 0.707 by definition.

Infinite Impulse Response (Recursive) Digital Filters H(Ω) 1 0.707 At the -3dB points the gain is 0.707 π/2 π/40 Ω C d A (1-r) r x B Place a pole a distance r from the Origin so that the pole lies a distance 1-r from the unit circle 0

Infinite Impulse Response (Recursive) Digital Filters Consider a pole located a distance r from the origin of the unit circle and lying on the positive y-axis. The shortest distance to the unit circle is 1-r (Point A) and corresponds the point of peak gain (response). The points B and C are chosen to lie at angular positions of ΔΩ = ±π/80 on either side of the vertical axis! Points B and C are also chosen to yield a pole vector that is 2 times 1-r. In this way we ensure that the gain at points B and C drops to 0.707 or -3dB. Note that as the pole gets closer to the unit circle, 1-r decreases, therefore d decreases and as a result the bandwidth 2Ω 1 decreases.

Infinite Impulse Response (Recursive) Digital Filters C d (1-r) A d B x d 2 + ( 1 r) 2 = 2( 1 r) 0 2Ω 1 Bandwidth 2Ω 1 corresponds to a distance 2d along the unit circle. In order that pole length is 2 times 1-r, we require that AX = AB = AC or in other words d = 1-r So 2Ω 1 (radians) = 2d/radius of unit circle = 2d. Therefore 2Ω 1 =2 (1 - r) radians which in turn means that 2 (1 - r) = π/40 and hence r = 0.96!

Infinite Impulse Response (Recursive) Digital Filters Finally we require true nulls H(Ω) at Ω = 0 and π, i.e., we place zeros at Z = +1 and Z = -1 x Im Z-Plane Re x Placing the above pole-zero values into Program 20, the maximum gain Equals 26.15. So we set K = 1/(26.15) or K = 0.03824 for unity gain at Ω = π

Infinite Impulse Response (Recursive) Digital Filters So we can immediately write down the Z-T for the filter as: ( ) = Y ( Z ) X( Z) = 0.03824( Z 1) ( Z +1) ( ) { ( )} H Z { Z 0.961exp j π 2 } Z 0.961exp j π 2 = 0.03824 ( Z 2 1) Z 2 + 0.9235 y[ n + 2] + 0.9235y[ n] = 0.03824{ x[ n + 2] x[ n] } y[ n] = 0.9235y[ n 2] + 0.03824{ x[ n] x[ n 2] } H(Ω) for this filter is plotted on figure 6.4(b) - Evaluate h[n]!!

Infinite Impulse Response (Recursive) Digital Filters Example 6.2: Narrow band Notch / Band-Reject filter Ζ 1 Im P 1 Z x Z-Plane Ω x Re Ω 0 Notice that for most values of Ω, vector magnitudes Z 1 ~ P 1 And so the gain H(Ω) ~ unity!! However in the vicinity of Ω = Ω 0 the Zero vector becomes much shorter than the pole vector and hence H(Ω) becomes sharply peaked with a zero gain at Ω = Ω 0

Infinite Impulse Response (Recursive) Digital Filters Take the EKG example from Chapter 1 - We wish to reject the 50 Hz mains interference in a system where The sampling rate is 1kHz and hence 50 Hz = 20 samples/cycle. Need a bandstop filter with a -3dB bandwidth, 2Ω 1 = 10 Hz. For an adequately sampled signal; Ω = π = 2 samples/ cycle π = 500 Hz and hence Ω 0 = 50 Hz = 0.1 π From before we have then that: ( ) π 2 1 r = 10 π, r =1 500 100 = 0.96858 Zeros at (r, ± θ) = (1.00000, ±0.1 π) Poles at (r, ± θ) = (0.96858, ±0.1 π)

Infinite Impulse Response (Recursive) Digital Filters So the corresponding Z-transform of the impulse response for Such a Notch filter is: ( ) = Y ( Z ) X( Z) = Z exp( j π 10) ( ) H Z = = { }{ Z exp( j π 10) } { Z 0.96858exp j π 2 }{ Z 0.96858exp( j π 10) } Z 2 2ZCos π 10 Z 2 1.93716ZCos π 10 Z 2 1.9021Z +1 Z 2 1.84239 + 0.93815 ( ) +1 ( ) + 0.93815 y[ n + 2] 1.84239y[ n +1] + 0.93815y[ n] = x[ n + 2] 1.9021x[ n +1] + x[ n] y[ n] =1.84239y[ n 1] 0.93815y[ n 2] + x[ n] 1.9021x[ n 1] + x[ n 2]

Infinite Impulse Response (Recursive) Digital Filters y[ n] =1.84239y[ n 1] 0.93815y[ n 2] + x[ n] 1.9021x[ n 1] + x[ n 2] This should look familiar - look back at Figure 1.4. Coefficients almost exactly the same. So we end where we started!!

Infinite Impulse Response (Recursive) Digital Filters y[ n] =1.84239y[ n 1] 0.93815y[ n 2] + x[ n] 1.9021x[ n 1] + x[ n 2] This should look familiar - look back at Figure 1.4. Coefficients almost exactly the same. But not quite.!!

Filters derived from Analog Filter Designs Analog filter design goes back to before the 1930s As a result there exists a wealth of designs that one could mine in order to make digital equivalents that would carry over their particular physical features into the digital domain We know that the fundamental operation and characteristics of analog circuits and systems are usually described by a differential equation We also know that such systems are by definition continuous with continuous variables like V, I & t

Filters derived from Analog Filter Designs We also know that we can transform such differential equations into polynomial expressions of the continuous variable s using the Laplace Transform So we can write the transfer function for any filter as the Laplace Transform of its impulse response, i.e., H(s) We know, by analogy with the Z-Transform for a filter, the H(s) will in general be a ratio of two polynomials in s So we can write H(s) as...

Filters derived from Analog Filter Designs Apart from the gain factor K one can see that, just like the Z-Transform, the analog filter is characterised by zeros and poles in the complex s-plane... We know that s = jω where ω is the contunous quantity angular frequency and can take any value from 0 - It is also clear that H(s) has a similar form to H(Z)... We also know that Z = jω where Ω is in units of radians or samples per cycle and can take any value from 0 - π

Filters derived from Analog Filter Designs So if we want to transform an analog filter characterised by H(s) into a digital filter characterised by H(Z) we need to be able to find a function that can take the infinite angular frequency range 0 < ω < and compress it into the finite range angular (sample/cycle) range 0 < Ω < π The transformation which permits us to do so is the socalled Bilinear Transformation given by:

Filters derived from Analog Filter Designs So the BL has a zero at Ω = 0 rads and a pole at π rads To see how it might be useful in converting a H(s) to a H(Z) take a look at its Fourier Transform by letting Z -> e jω Which we can rewrite as:

Filters derived from Analog Filter Designs So finally we can write: So we se that F(Ω) is purely imaginary and is periodic The magnitude of F(Ω) varies from 0 è as Ω varies from 0 π

Filters derived from Analog Filter Designs Now imagine that the Laplace Transform (LT) for a desirable analog filter is given by: The Fourier Transform (FT) is given by: And the complete response curve (transmission) is obtained by letting ω vary from 0 to

Filters derived from Analog Filter Designs If you substitute jω by jtan(ω) exactly the same values of H(ω) will be obtained if now you let Ω vary from 0 to π That is to say the BL transformation will yield a digital filter H(Ω) with a response (transmission) over the range: 0 < Ω < π which reproduces that of an analog filter over the range: 0 < ω <

Filters derived from Analog Filter Designs Example: Butterworth and Chebychev filters... These can be low pass, high pass or bandpass filter As before an ideal filter has unity transmission in the pass band, zero transmission in the stopband(s) and infinitely narrow transition(s) from pass to stop bands... The Butterworth filter approximates this ideal with what is called a Maximally Flat pass band characteristic (Fig. 6.6) For example, for a low pass filter, the Butterworth filter pass band gain falls off gradually with increasing ω, dropping to 1/ 2 (-3bB) at ω = ω 1

Filters derived from Analog Filter Designs The Butterworth filter frequency transfer function magnitude is given by: The related Chebychev (equi-ripple type) filter has a frequency transfer function given by the expression:

Filters derived from Analog Filter Designs Where ω 1 is the nominal cutoff frequency The passband ripple δ = 1 (1 + ε 2 ) -1/2 The zero and first order Chebychev polynomials are given by: C 0 (x) = 1 and C 1 (x) = x Second and higher order Chebychev polynomials are computed by evaluating: Cn(x) 2xC n-1 (x) C n-2 (x)

Filters derived from Analog Filter Designs So, in principle we should now be able to make their digital counterparts by replacing jω by F(Ω) = j Tan (Ω/2) in the Laplace Transform H(s) for each filter type.. This means that we substitute ω by Tan (Ω/2) in H(ω) for each filter... Note that the relationship between ω and Ω is clearly non linear in this transformation and so sweeping along the Ω axis for the digital filter leads to a warping of the ω scale Substituting ω by Tan (Ω/2) in H(ω) we get...

Filters derived from Analog Filter Designs Digital Butterworth (Magnitude) Transfer Function: Digital Chebychev (Magnitude) Transfer Function:

Filters derived from Analog Filter Designs All that remains is to find that Z-plane poles and zeros so that the difference equations for each digital filter can be derived and applied. These are not trivial and will have to be written into computer code for calculation and application A Butterworth low pass digital filter of n th order has n poles arranged on a circular locus in the Z (Complex) plane and a n th order zero at Z = -1 The (complex) poles (P m ) are given by those values of P m that lie within the unit circle and are given by the following expression for the real and imaginary parts:

Filters derived from Analog Filter Designs For the Butterworth filter: Where m = 0, 1, 2,...(2n 1) Note: For n even, (mπ/n) is replaced by (2m + 1) π/2n

Filters derived from Analog Filter Designs For the Chebychev filter: Where m = 0, 1, 2,...(2n 1) Note: For n even, (mπ/n) is replaced by (2m + 1) π/2n

Filters derived from Analog Filter Designs So in practice you would have to write a code to determine the Z-plane poles and zeros From these you can construct H(Z) for the Butterworth or Chebychev filter You can then determine the filter difference equation: Y[n] = f(x[n]) You can now compute the output y[n] for any arbitrary input signal (data) x[n] for a digital version of two wellestablished analog filter types You can repeat for any analog filter by computing its H(s) from the differential equation describing its behaviour...

Go now and extend your knowledge of DSP to non-linear, adaptive, statistical,.. Design Build Apply Innovative in basic sciences, industrial processes, data products, finance and associated companies and enterprises..