Design of IIR filters

Similar documents
Digital Signal Processing IIR Filter Design via Bilinear Transform

Digital Control & Digital Filters. Lectures 21 & 22

Filter Analysis and Design

Digital Signal Processing

Lecture 16: Filter Design: Impulse Invariance and Bilinear Transform

EE482: Digital Signal Processing Applications

An Iir-Filter Example: A Butterworth Filter

Digital Signal Processing Lecture 8 - Filter Design - IIR

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

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

DIGITAL SIGNAL PROCESSING. Chapter 6 IIR Filter Design

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

Lecture 9 Infinite Impulse Response Filters

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

Multirate signal processing

ELEG 305: Digital Signal Processing

Filter Design Problem

V. IIR Digital Filters

Chapter 7: IIR Filter Design Techniques

Lecture 8 - IIR Filters (II)

MITOCW watch?v=jtj3v Rx7E

Discrete-Time David Johns and Ken Martin University of Toronto

2.161 Signal Processing: Continuous and Discrete Fall 2008

Stability Condition in Terms of the Pole Locations

Digital Signal Processing

EE 521: Instrumentation and Measurements

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

Lecture 7 Discrete Systems

Analog and Digital Filter Design

Lecture 3 - Design of Digital Filters

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

Lecture 8 - IIR Filters (II)

Chapter 5 Frequency Domain Analysis of Systems

ELEG 5173L Digital Signal Processing Ch. 5 Digital Filters

INF3440/INF4440. Design of digital filters

Filters and Tuned Amplifiers

PS403 - Digital Signal processing

The Approximation Problem

2.161 Signal Processing: Continuous and Discrete Fall 2008

EECE 301 Signals & Systems Prof. Mark Fowler

Chapter 7: Filter Design 7.1 Practical Filter Terminology

1 1.27z z 2. 1 z H 2

Chapter 5 Frequency Domain Analysis of Systems

Quadrature-Mirror Filter Bank

Computer-Aided Design of Digital Filters. Digital Filters. Digital Filters. Digital Filters. Design of Equiripple Linear-Phase FIR Filters

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

The Approximation Problem

LINEAR-PHASE FIR FILTERS DESIGN

2.161 Signal Processing: Continuous and Discrete

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

Lectures: Lumped element filters (also applies to low frequency filters) Stub Filters Stepped Impedance Filters Coupled Line Filters

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

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

Digital Signal Processing

FROM ANALOGUE TO DIGITAL

DSP. Chapter-3 : Filter Design. Marc Moonen. Dept. E.E./ESAT-STADIUS, KU Leuven

Filter structures ELEC-E5410

ESE 531: Digital Signal Processing

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

Today. ESE 531: Digital Signal Processing. IIR Filter Design. Impulse Invariance. Impulse Invariance. Impulse Invariance. ω < π.

Lecture 8: Signal Reconstruction, DT vs CT Processing. 8.1 Reconstruction of a Band-limited Signal from its Samples

DSP-CIS. Chapter-4: FIR & IIR Filter Design. Marc Moonen

EE 354 Fall 2013 Lecture 10 The Sampling Process and Evaluation of Difference Equations

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

Multirate Digital Signal Processing

Discrete-time first-order systems

UNIVERSITY OF OSLO. Faculty of mathematics and natural sciences. Forslag til fasit, versjon-01: Problem 1 Signals and systems.

Review of Discrete-Time System

The Approximation Problem

Responses of Digital Filters Chapter Intended Learning Outcomes:

APPLIED SIGNAL PROCESSING

EE 225D LECTURE ON DIGITAL FILTERS. University of California Berkeley

Time Series Analysis: 4. Linear filters. P. F. Góra

LTI Systems (Continuous & Discrete) - Basics

Design of Stable IIR filters with prescribed flatness and approximately linear phase

Discrete Time Systems

Butterworth Filter Properties

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

ECE503: Digital Signal Processing Lecture 5

Matched Second Order Digital Filters

Transform Representation of Signals

Electronic Circuits EE359A

! Introduction. ! Discrete Time Signals & Systems. ! Z-Transform. ! Inverse Z-Transform. ! Sampling of Continuous Time Signals

The Laplace Transform

NAME: ht () 1 2π. Hj0 ( ) dω Find the value of BW for the system having the following impulse response.

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

w n = c k v n k (1.226) w n = c k v n k + d k w n k (1.227) Clearly non-recursive filters are a special case of recursive filters where M=0.

Computer Engineering 4TL4: Digital Signal Processing

ECE 301 Fall 2010 Division 2 Homework 10 Solutions. { 1, if 2n t < 2n + 1, for any integer n, x(t) = 0, if 2n 1 t < 2n, for any integer n.

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

A system that is both linear and time-invariant is called linear time-invariant (LTI).

Transform Analysis of Linear Time-Invariant Systems

X. Chen More on Sampling

Time Series Analysis: 4. Digital Linear Filters. P. F. Góra

ECE 8440 Unit 17. Parks- McClellan Algorithm

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science. Fall Solutions for Problem Set 2

# FIR. [ ] = b k. # [ ]x[ n " k] [ ] = h k. x[ n] = Ae j" e j# ˆ n Complex exponential input. [ ]Ae j" e j ˆ. ˆ )Ae j# e j ˆ. y n. y n.

Electronic Circuits EE359A

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 )

There are two main classes of digital lter FIR (Finite impulse response) and IIR (innite impulse reponse).

Transcription:

Design of IIR filters Standard methods of design of digital infinite impulse response (IIR) filters usually consist of three steps, namely: 1 design of a continuous-time (CT) prototype low-pass filter; 2 transformation of the low-pass filter to a CT filter of required kind; 3 discretization. Thus, let us start with a continuous-time impulse response h s (t) that is assumed to have a Laplace transform H c (s) = h c (t)e st dt, with s C, as well as a Fourier transform H c (jω) = H c (s) = s=jω h c (t)e jωt dt, with Ω R. As mentioned before, h c (t) is understood to be the impulse response of a continuous-time, linear, time-invariant system. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 1/47

Design of continuous-time lowpass filters Recall that, for a continuous-time filter with real coefficients, we have H c (jω) 2 = H c (s) H c ( s). s=jω We want H c (jω) 2 to approximate the magnitude-squared response of an ideal lowpass filter { H d (jω) 2 1, 0 Ω Ω c, = 0, Ω > Ω c, where Ω c is a cut-off frequency. Once H c (jω) 2 is computed, the problem is reduced to obtaining a causal and stable system H c (s) through spectral factorization. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 2/47

Design of continuous-time lowpass filters (cont.) The figure below depicts magnitude-squared specifications for lowpass analog filter design. Note that A p and A s are functions of parameters ɛ and A. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 3/47

The Butterworth approximation Classical approximation techniques use a magnitude-squared response of the form H c (jω) 2 = 1 1 + V 2 (Ω), where { V 2 (Ω) 1, for Ω Ω c, V 2 (Ω) 1, for Ω > Ω c. In particular, Butterworth (1930) suggested to use V 2 (Ω) = (Ω/Ω c ) 2N, with N = 1, 2,..., which results in H B (jω) 2 = 1 1 + (Ω/Ω c ) 2N. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 4/47

The Butterworth approximation (cont.) In this case, we have 1, if Ω = 0, H B (jω) 2 = 1/2, if Ω = Ω c, 0, if Ω =. Note that the transition approaches a brick wall, when N. Note also that H(jΩ) 2 is a monotone function of Ω. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 5/47

The Butterworth approximation (cont.) The poles of H B (s)h B ( s) are found by solving 1 + (s/jω c ) 2N = 0 (s/jω c ) 2N = 1 = e j(2k 1)π, with k = 1, 2,..., 2N. The solution yields s k = σ k + jω k = Ω c cos θ k + jω c sin θ k, where for k = 1, 2,..., 2N. θ k = π 2 + 2k 1 2N π, Thus, H B (s)h B ( s) has 2N poles, which are evenly distributed over a circle of radius Ω c in the complex plane. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 6/47

The Butterworth approximation (cont.) A stable system function H B (s) can be formed by choosing the (first) N poles which lie in the left-half plane, resulting in H B (s) = Ω N c (s s 1 )(s s 2 ) (s s N ). Note that the numerator is equal to Ω N c to assure H B (j 0) = 1. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 7/47

Design Procedure Suppose we wish to design a Butterworth lowpass filter specified by parameters Ω p, Ω s, ɛ, and A. Here 1/(1 + ɛ 2 ) and 1/A 2 define the passband and stopband ripple, respectively. Namely, ( ) ( ) 1 1 A p = 10 log 10 1 + ɛ 2 and A s = 10 log 10 A 2. Using the relative specification, we then have 1 1 + (Ω p /Ω c ) 2N 1 1 + ɛ 2 (Ω p /Ω c ) 2N ɛ 2, 1 1 + (Ω s /Ω c ) 2N 1 A 2 (Ω s /Ω c ) 2N A 2 1. The above inequalities can be combined to result in Ω N p A2 1 ɛ Ω N c A2 1 Ω N s. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 8/47

Design Procedure (cont.) Consequently, we obtain the following design equation. Butterworth design equation where α Ω s Ω p, N = ln α, ln β A2 1 10 A s/10 1 β = ɛ 10 A p/10 1. The cut-off frequency Ω c can be chosen anywhere in the interval Ω p (10 Ap/10 1) 1/(2N) Ω c Ω s (10 As/10 1) 1/(2N). In MATLAB, Butterworth filters can be designed using [N, Omegac] = buttord(omegap, Omegas, Ap, As, s ) [B, A] = butter(n, Omegac, s ) Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 9/47

Example We wish to design a Butterworth filter that satisfies 6 db 20 log 10 H(jΩ) 0, 0 Ω 2 rad/sec 20 log 10 H(jΩ) 20 db, 3 rad/sec Ω < Thus, A p = 6 and A s = 20. Therefore, ɛ = 10 0.1 6 = 1.7266 and A = 10 0.05 20 = 10. Using the above values, the filter design can now be completed in the following 5 steps. Step 1: Compute the parameters α and β as given by α = 3/2 = 1.5; β = Step 2: Compute order N using 102 1 1.7266 = 5.7628. N = ln α/ ln β = 4.3195 = 5. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 10/47

Example Step 3: Determine 3 db cutoff frequency Ω c, whose lower and upper values are respectively given by 2(10 6/10 1) 1/10 = 1.7931 and 3(10 20/10 1) 1/10 = 1.8948. It seems reasonable to choose Ω c = 1.8948. (Why?) Step 4: Compute pole locations. s k = 1.8948 cos(0.4π + 0.2πk) + j1.8948 sin(0.4π + 0.2πk), with k = 1, 2, 3, 4, 5. Step 5: Compute the system function H B (s) as given by H B (s) = 5 k=1 1.8948 24.42 = s s k s 5 + 6.13s 4 + 18.8s 3 + 35.61s 2 + 41.71s + 24.42. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 11/47

The Chebyshev approximation The Chebyshev approximation results in equiripple design, which is optimal with respect to the minimax optimization criterion. The Chebyshev lowpass filter approximation is based on H C (jω) 2 = 1 1 + ɛ 2 T 2 N (Ω/Ω c), where T N is the Nth order Chebyshev polynomial. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 12/47

The Chebyshev approximation (cont.) Formally, Chebyshev polynomials are defined as { cos(n cos 1 x), x 1, T N (x) = cosh(n cosh 1 x), x > 1. Since the leading term of T N (x) is 2 N 1 x N, the values of T 2 N (x) grow very fast for x > 1. Thus, in the stopband, we have T 2 N (Ω/Ω c) 1 or, equivalently, H C (jω) 2 1, for Ω > Ω c. Moreover, and H C (j 0) 2 = { 1, if N is odd, 1/(1 + ɛ 2 ), if N is even, H C (j Ω c ) 2 = 1 1 + ɛ 2. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 13/47

The Chebyshev approximation (cont.) For Ω Ω c, H(jΩ) 2 has equiripple behaviour between 1 and 1/(1 + ɛ 2 ). For Ω Ω c, H(jΩ) 2 decreases monotonically toward zero, with the high-frequency roll-off of about 20N db/decade. The Chebyshev filter has 10 log 2 2(N 1) (or about 6(N 1) db) greater attenuation than the Butterworth filter. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 14/47

The Chebyshev approximation (cont.) The poles of H C (s)h C ( s) are obtained by solving T N (s/jω c ) = ±jɛ. Solving the equation yields s k = σ k + j Ω k = (Ω c sinh(φ)) cos θ k + j (Ω c cosh(φ)) sin θ k, where and θ k = π 2 + 2k 1 π, k = 1, 2,..., 2N, 2N φ = (1/N) sinh 1 (1/ɛ). One can see that, as opposed to the case of Butterworth filters, the poles of Chebyshev filters are located on an elliptic curve. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 15/47

The Chebyshev approximation (cont.) To obtain a stable system, we assign to H C (s) the poles located on the left-half plane (σ k < 0), which results in { G N H C (s) = N k=1 (s s k), with G = 1 ( s k ), N even, 1+ɛ 2 1, N odd. k=1 Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 16/47

Design procedure Starting with the specified parameters Ω p, A p, Ω s, and A s, for equiripple response in the passband, we choose Ω c = Ω p. Since H C (j Ω c ) 2 = 1/(1 + ɛ 2 ), the passband constraint is satisfied for all 0 Ω Ω p. In the stopband, we require that 1 1 + ɛ 2 T 2 N (Ω s/ω p ) 1 A 2 T N (Ω s /Ω p ) Since Ω s /Ω p > 1, this inequality is equivalent to cosh(n cosh 1 A2 1 (Ω s /Ω p )). ɛ A2 1. ɛ Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 17/47

Design procedure (cont.) Solving the above inequality produces the key design formulas. Chebyshev I design equation where N cosh 1 β cosh 1 α = ln(β + β2 1) ln(α + α 2 1), α = Ω s A2 1 10 A s/10 1, β = = Ω p ɛ 10 A p/10 1. In MATLAB, Chebyshev I filters can be designed using [N, Omegac] = cheb1ord(omegap, Omegas, Ap, As, s ) [B, A] = cheby1(n, Ap, Omegac, s ) Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 18/47

Example Once again, we design a filter that satisfies 6 db 20 log 10 H(jΩ) 0, 0 Ω 2 rad/sec 20 log 10 H(jΩ) 20 db, 3 rad/sec Ω < This time, however, we will use the Chebyshel I design. As before, we have ɛ = 1.7266 and A = 10. Step 1: Compute the parameters α and β as given by α = 3/2 = 1.5; β = Step 2: Compute order N using N = 102 1 1.7266 ( ln 5.7628 + 5.76282 1 ) ln ( 1.5 + 1.5 2 1 ) = 5.7628. = 2.5321 = 3. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 19/47

Example (cont.) Step 3: Set Ω c = Ω p = 2, and compute a = 2 sinh ( (1/3) sinh 1 (1/1.7266) ) = 0.3693, b = 2 cosh ( (1/3) sinh 1 (1/1.7266) ) = 2.0338. Step 4: Compute pole locations. s 1 = 0.3693 cos(4π/6) + j 2.0338 sin(4π/6) = 0.1847 j1.7613, s 2 = 0.3693 cos(6π/6) + j 2.0338 sin(6π/6) = 0.3693, s 3 = 0.3693 cos(8π/6) + j 2.0338 sin(8π/6) = 0.1847 + j1.7613. Step 5: Compute the filter gain G and the system function H C (s) G = (0.1847 + j1.7613) 0.3693 (0.1847 j1.7613) 1 = 1.1584. H C (s) = 1.1584 3 k=1 1 1.1584 = s s k s 3 + 0.7387s 2 + 3.2728s + 1.1584. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 20/47

Another example Let us design a Chebyshev I filter with F p = 40 Hz, A p = 1 db, F s = 50 Hz, A s = 30 db. using MATLAB. To this end, we use the following script. >> [N, Omegac] = cheb1ord(2*pi*40,2*pi*50,1,30,'s'); N = 7 >> Fc = Omegac/(2*pi); Fc = 40 >> [B, A] = cheby1(n,ap,omegac,'s'); Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 21/47

Another example (cont.) The group delay is more non-linear as compared to the case of a comparable Butterworth filter. Meeting the same specifications would require a Butterworth filter of order 19. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 22/47

The inverse Chebyshev approximation Replacing the frequency variable Ω/Ω c by Ω c /Ω converts the Chebyshev I low-pass filter into a Chebyshev highpass filter. If we subtract the highpass characteristic from unity, we obtain the inverse Chebyshev or Chebyshev II characteristic. H IC (jω) 2 = 1 1 1 + ɛ 2 TN 2(Ω c/ω) = ɛ2 TN 2(Ω c/ω) 1 + ɛ 2 TN 2(Ω c/ω). Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 23/47

The inverse Chebyshev approximation (cont.) The Chebyshev II approximation exhibits equiripple behavior in the stopband and monotonic maximally flat behavior in the passband. This filter has both zeros and poles. Specifically, the poles of the Chebyshev II filter are the reciprocals of those of the Chebyshev I filter, viz. s k = Ω c Ω c =. σ k /Ω c + jω k /Ω c σ k + jω k At the same time, the zeros of the Chebyshev II filter are Ω c ξ k = j, where u k = 2k 1 π, k = 1, 2,..., 2N. cos u k 2N 2 Thus, the zeros and poles of the Chebyshev II filter do not lie on any simple geometric curve. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 24/47

Example The design of Chebyshev II filter is very similar to that of the Chebyshev I filter. In MATLAB, Chebyshev II filters can be built using [N, Omegac] = cheb2ord(omegap, Omegas, Ap, As, s ) [B, A] = cheby2(n, As, Omegac, s ) Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 25/47

Continuous-to-discrete filter transformation Our next step is to transform CT filters to their DT counterparts. Each transformation is equivalent to a mapping function s = f(z) from the s-plane to the z-plane. Any useful mapping should satisfy three desirable conditions: 1. A rational H c (s) should be mapped to a rational H(z). 2. The imaginary axis of the s-plane is mapped on the unit circle of the z-plane, viz. {s = jω Ω R} {z = e jω ω (π, π]}. 3. The left-half s-plane is mapped into the interior of the unit circle of the z-plane, viz. {s R{s} < 0} {z z < 1}. Different procedures give rise to different mapping functions, and, hence, the resulting discrete-time filters are different. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 26/47

Impulse-invariance transformation (IIT) The most natural way to convert a CT filter to a DT filter is by sampling its impulse response h[n] T d h c (nt d ), n Z. This transformation is known as impulse-invariance transformation (IIT), since it preserves the shape of the impulse response. The resulting frequency response is H(e jω ) = ( H c j ω + j 2π ) k. T d T d k If the continuous-time filter is bandlimited, that is, H c (jω) = 0 for Ω π/t d, then, we have H(e jω ) = H c (jω/t d ), ω π. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 27/47

Mapping for the IIT What is the transformation s = f(z) in the case of IIT? To answer this question, we start with a system function H c (s) = N k=1 A k s s k, where the poles are assumed to be distinct. Taking the inverse Laplace transform yields h c (t) = N A k e skt u(t). k=1 Thus, the impulse response of the discrete-time filter is given by h[n] = N ( A k Td e s kt d n ) u[n] = T d k=1 N k=1 A k ( e s k T d ) n u[n]. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 28/47

Mapping for the IIT (cont.) The resulting system function of the discrete-time system is therefore given by H(z) = n N h[n]z n ( ) = T d A k e s k T d n z n. n=0 k=1 Interchanging the orders of summations yields H(z) = N k=1 where we assumed that e s kt d < 1. T d A k 1 e s kt dz 1, Thus, we have a transformation of the form 1 T d s s k 1 p k z 1, with p k = e s kt d. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 29/47

Mapping for the IIT (cont.) Note that the transformation 1 T d = s s k 1 p k z 1 maps the poles of the continuous-time filter to the poles of its discrete-time counterpart. Therefore, the mapping s = f(z) corresponding to impulse invariance is defined by z = e st d. More specifically, since s = σ + jω, we have r = e σ T d and ω = ΩT d. Note that σ < 0 implies 0 < r < 1, while σ > 0 implies r > 1. Since σ = 0 yields r = 1, the imaginary axis s = jω is mapped onto the UC. This map, however, is not one-to-one due to the effect of aliasing. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 30/47

Mapping for the IIT (cont.) Due to periodicity in ω, each horizontal strip of height 2π/T d in the s-plane is mapped into the entire z-pane. In fact, we have H(z) = z=e st d k= ( H c s + j 2πk ). T d Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 31/47

Example Consider a first-order continuous-time filter h c (t) = e 2t u(t) with H c (s) = 1/(s + 2) (and R(s) > 2). The discrete-time filter obtained by the IIT using T d = 0.1 is which results in H(z) = h[n] = 0.1 h c (0.1n) = 0.1 e 0.2n u[n], 0.1 1 e 0.2 z 1 = 0.1, with z > 0.8187. 1 0.8187 z 1 We see that a 1st-order continuous-time system is transformed into a 1st-order discrete-time system. The mapping preserves stability and the lowpass characteristics of the magnitude response. The above system function could also be obtained using [B,A] = impinvar(1,[1,2],10). Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 32/47

Limitations of the IIT Consider the high-pass filter obtained by H c (s) = 1 H c (s) = = 1 1/(s + 2) = (s + 1)/(s + 2). The impulse response of the high-pass filter is h c (t) = δ(t) h c (t) = δ(t) e 2t u(t). The presence of δ(t) renders the IIT approach impractical. Since the delta function appears when N = M, the IIT cannot be used for systems with improper system functions (like high-pass & band-stop filters). Impulse-invariance can be applied to low-pass & band-pass filters that have strictly proper transfer functions. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 33/47

Design procedure Starting with the design parameters ω p, ω s, A p and A s, first compute Ω p = ω p /T d and Ω s = ω s /T d for some T d. Subsequently, design an equivalent continuos-time filter (such as, e.g., Butterworth or Chebyshev I). Finally, map the continuous poles into the discrete poles according to p k = e s kt d, k, to result in H(z). We note that the above design does not depend on a particular value of T d, which therefore may be set arbitrarily. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 34/47

Example >> omegap = 0.25*pi; omegas = 0.4*pi; Ap = 1; As = 30; >> Td = 0.1; Omegap = omegap/td; Omegas = omegas/td; >> [N, Omegac] = cheb1ord(omegap, Omegas, Ap, As, 's'); % N = 5 >> [C, D] = cheby1(n, Ap, Omegac, 's'); >> [B, A] = impinvar(c, D, 1/Td); Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 35/47

Bilinear transformation To avoid the aliasing-related problems of the IIT, a one-to-one mapping from the s-plane to the z-plane is required. One of such mapping is the bilinear transformation given by s = f(z) = 2 T d 1 z 1 1 + z 1. Here, T d is not interpreted as a sampling interval, and can have an arbitrary value. Given H c (s), the bilinear transform is applied as H(z) = H c (s). s= 2 1 z 1 T d 1+z 1 In this case, every zero/pole ν k is transformed according to s ν k = 2(1 T [ dν k /2) T d (1 + z 1 1 1 + T ] dν k /2 ) 1 T d ν k /2 z 1. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 36/47

Bilinear transformation (cont.) One can show that the mapping results in H(z) = G (1 + z 1 ) N M M k=1 (1 z kz 1 ) N k=1 (1 p, kz 1 ) where and z k = 1 + T dξ k /2 1 T d ξ k /2, p k = 1 + T ds k /2 1 T d s k /2, G = β 0(T d /2) N M M k=1 (1 ξ kt d /2) N k=1 (1 s, kt d /2) where β 0 is the gain of the CT filter. In MATLAB, the above transformations are implemented by functions [zd, pd, G] = bilinear(zc, pc, beta0, Fd) [B, A] = bilinear(c, D, Fd) Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 37/47

Example Consider the following CT system: H c (s) = 5(s + 2) 5s + 10 = (s + 3)(s + 4) s 2 + 7s + 12. In this case, we obtain (using T d /2 = 1) z 1 = 1 + ( 2) 1 ( 2) = 1 3, z 2 = 1, p 1 = 1 + ( 3) 1 ( 3) = 1 2, 1 + ( 4) 1 ( 4) = 3 5, as well as G = 5 1 (1 ( 2)) (1 ( 3))(1 ( 4)) = 3 4. Hence, H(z) = 3 (1 + z 1 )(1 + 1/3z 1 ) 4 (1 + 1/2z 1 )(1 + 3/5z 1 ) = 0.75 + z 1 + 0.25z 2 1 + 1.1z 1 + 0.3z 2. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 38/47

Mapping properties In terms of the s variable, we have z = re jω = 2/T d + s 2/T d s = 2/T d + σ + jω 2/T d σ jω. One can then show that: 1) r < 1 if σ < 0, 2) r = 1 if σ = 0, and 3) r > 1 if σ > 0. Thus, the bilinear transformation preserves stability. At the same time, ω and Ω are related as which shows that ω = 2 tan 1 (ΩT d /2) or Ω = (2/T d ) tan(ω/2), Ω = 0 ω = 0 Ω = ω = π Ω = ω = π. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 39/47

Mapping properties (cont.) Therefore, we have the following type of mapping. Since the entire jω axis is mapped onto the UC, the transformation is free of aliasing artifacts. However, the highly nonlinear relation between Ω and ω needs to be treated with precaution. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 40/47

Frequency warping The nonlinear relation between Ω and ω is known as frequency warping. The relation is approximately linear for ω 0.3π. Thus, any shape of magnitude response in this range is preserved. Frequency warping does not distort flat magnitude responses. Frequency warping distorts non-flat magnitude responses. (So, a CT differentiator cannot be converted to a DT one.) Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 41/47

Frequency warping (cont.) Frequency warping distors the location of frequency bands and their width. Therefore, the design specifications for the CT filter have to be determined by prewarping according to Ω k = 2 T d tan ω k 2, where ω k is a required band edge. During the bilinear transformation, the frequencies are properly unwarped, in which case the effect of T d is cancelled. In practice, it is often convenient to use T d = 2. In summary, the use of bilinear transformation should be avoided when designing wideband discrete-time differentiators and linearphase filters. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 42/47

Frequency warping (cont.) Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 43/47

Design procedure Starting with the design parameters ω p, ω s, A p and A s, first set T d = 2 and compute Ω p = tan(ω p /2) and Ω s = tan(ω s /2). Subsequently, design an equivalent continuos-time filter (such as, e.g., Butterworth, Chebyshev I, or Chebyshev II) H c (s). Determine zeros, poles, and gain of H c (s) and map these quantities into corresponding zeros, poles, and gain of H(z). Finally, assemble the desired digital filter system function H(z). Note that all the above procedures are performed by MATLAB function bilinear. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 44/47

Frequency transformations of low-pass filters Frequency transformations are needed to transform low-pass filters to high-pass, band-pass, and band-stop filters. Given a prototype CT low-pass filter H c (s) and its discrete counterpart H(z), one can apply frequency transformation to either H c (s) (continuous) or H(z) (discrete). If the bilinear transformation is used to convert H c (s) into H(z), the frequency transformation can be applied to either of the two. If the IIT is used instead, the frequency transformation should be applied to H(z). (Why?) Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 45/47

Continuous-time frequency transformation The table below shows a typical set of frequency transformations that transform a normalized prototype low-pass filter H c (s) with cutoff frequency Ω c = 1 rad/s to filters with cutoff frequencies Ω c, Ω 1, and Ω 2. Note that the lowpass to bandpass, and lowpass to bandstop transformations double the order of the filter. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 46/47

Discrete-time frequency transformation Discrete-time frequency transformations are usually performed through z 1 G(z 1 ), where with α k < 1. G(z 1 ) = ± N k=1 z 1 α k 1 α k z 1, By properly choosing the values of N and α k, one can obtain a variety of mappings. For specific formulas, see p.678 of the course textbook. In MATLAB, frequency transformations are performed by functions lp2lp, lp2hp, lp2bp, and lp2bs. The FDATool of MATLAB provides a convenient environment for designing a variety of different digital filters. Prof. O. Michailovich, Dept of ECE, Winter 2017 ECE 413: Digital Signal Processing / Section 9 47/47