V. IIR Digital Filters

Similar documents
Lecture 9 Infinite Impulse Response Filters

Design of IIR filters

Discrete-Time David Johns and Ken Martin University of Toronto

EE482: Digital Signal Processing Applications

Digital Control & Digital Filters. Lectures 21 & 22

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

Chapter 7: IIR Filter Design Techniques

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

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

2.161 Signal Processing: Continuous and Discrete Fall 2008

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

Lecture 8 - IIR Filters (II)

PS403 - Digital Signal processing

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

An Iir-Filter Example: A Butterworth Filter

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

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

Digital Signal Processing IIR Filter Design via Bilinear Transform

Lecture 3 - Design of Digital Filters

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

ELEG 305: Digital Signal Processing

Digital Signal Processing Lecture 8 - Filter Design - IIR

MITOCW watch?v=jtj3v Rx7E

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

DIGITAL SIGNAL PROCESSING. Chapter 6 IIR Filter Design

Lecture 16: Filter Design: Impulse Invariance and Bilinear Transform

2.161 Signal Processing: Continuous and Discrete

Lecture 8 - IIR Filters (II)

Filter Analysis and Design

EE Experiment 11 The Laplace Transform and Control System Characteristics

Analog and Digital Filter Design

EE 521: Instrumentation and Measurements

1 1.27z z 2. 1 z H 2

2007 Syllabus: Decimation, Interpolation, Sampling rate conversion, Filter design and Implementation of sampling rate conversion.

Transform Representation of Signals

Problem Set 9 Solutions

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

Digital Signal Processing

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

Lecture 7 Discrete Systems

24 Butterworth Filters

GATE EE Topic wise Questions SIGNALS & SYSTEMS

2.161 Signal Processing: Continuous and Discrete

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

Discrete Time Signals and Switched Capacitor Circuits (rest of chapter , 10.2)

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

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

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

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

Laplace Transform Analysis of Signals and Systems

ECE 350 Signals and Systems Spring 2011 Final Exam - Solutions. Three 8 ½ x 11 sheets of notes, and a calculator are allowed during the exam.

Homework Assignment 11

Massachusetts Institute of Technology

Need for transformation?

Chapter 5 Frequency Domain Analysis of Systems

EC Signals and Systems

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

Oversampling Converters

Digital Signal Processing

Module 4. Related web links and videos. 1. FT and ZT

Discrete Time Signals and Switched Capacitor Circuits (rest of chapter , 10.2)

(Refer Slide Time: 02:11 to 04:19)

Stability Condition in Terms of the Pole Locations

Chapter 7: Filter Design 7.1 Practical Filter Terminology

Question Bank. UNIT 1 Part-A

Time Response Analysis (Part II)

Recursive, Infinite Impulse Response (IIR) Digital Filters:

Z-TRANSFORMS. Solution: Using the definition (5.1.2), we find: for case (b). y(n)= h(n) x(n) Y(z)= H(z)X(z) (convolution) (5.1.

ELEN E4810: Digital Signal Processing Topic 11: Continuous Signals. 1. Sampling and Reconstruction 2. Quantization

E : Lecture 1 Introduction

Chapter 7. Digital Control Systems

Transform analysis of LTI systems Oppenheim and Schafer, Second edition pp For LTI systems we can write

Module 4 : Laplace and Z Transform Problem Set 4

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

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

Problem Value

Review of Linear Time-Invariant Network Analysis

Use: Analysis of systems, simple convolution, shorthand for e jw, stability. Motivation easier to write. Or X(z) = Z {x(n)}

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

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

Review of Discrete-Time System

Introduction to DSP Time Domain Representation of Signals and Systems

DEPARTMENT OF EI DIGITAL SIGNAL PROCESSING ASSIGNMENT 1

/ (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

ESE 531: Digital Signal Processing

Quadrature-Mirror Filter Bank

Chapter 5 Frequency Domain Analysis of Systems

Digital Signal Processing

Review: Continuous Fourier Transform

DESIGN OF CMOS ANALOG INTEGRATED CIRCUITS

Discrete Time Systems

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


SIDDHARTH GROUP OF INSTITUTIONS:: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE)

It is common to think and write in time domain. creating the mathematical description of the. Continuous systems- using Laplace or s-

APPLIED SIGNAL PROCESSING

CHAPTER 2 RANDOM PROCESSES IN DISCRETE TIME

Final Exam January 31, Solutions

Z-Transform. x (n) Sampler

EECE 301 Signals & Systems Prof. Mark Fowler

Transcription:

Digital Signal Processing 5 March 5, V. IIR Digital Filters (Deleted in 7 Syllabus). (dded in 7 Syllabus). 7 Syllabus: nalog filter approximations Butterworth and Chebyshev, Design of IIR digital filters from analog filters, Bilinear transformation method, Step and Impulse invariance techniques, Spectral transformations, Design examples: nalog-digital transformations Contents: 5. Introduction 5. The normalized analog, low pass, Butterworth filter 5.3 Time domain invariance 5.4 Bilinear transformation 5.5 Nonlinear relationship of frequencies in bilinear transformation 5.6 Digital filter design The Butterworth filter 5.7 nalog design using digital filters 5.8 Frequency transformation 5.9 The Chebyshev filter 5. The Elliptic filter DSP-5 (IIR) of 55 Dr. Ravi Billa

5. Introduction Nomenclature With a in the linear constant coefficient difference equation, a y(n) + a y(n ) + + a N y(n N) b x(n) + b x(n ) + + b M x(n M), a we have, H(z) M i i N i b z i a z i i This represents an IIR filter if at least one of a through a N is nonzero, and all the roots of the denominator are not canceled exactly by the roots of the numerator. In general, there are M finite zeros and N finite poles. There is no restriction that M should be less than or greater than or equal to N. In most cases, especially digital filters derived from analog designs, M N. Systems of this type are called N th order systems. This is the case with IIR filter design in this Unit. When M > N, the order of the system is no longer unambiguous. In this case, H(z) may be taken to be an N th order system in cascade with an FIR filter of order (M N). When N, as in the case of an FIR filter, according to our convention the order is. However, it is more meaningful in such a case to focus on M and call the filter an FIR filter of M stages or (M+) coefficients. 8 Example The system H(z) ( z ) ( z ) is not an IIR filter. Why (verify)? IIR filter design n analog filter specified by the Laplace transfer function, H a (s), may be designed to either frequency domain or time domain specifications. Similarly, a digital filter, H(z), may be required to have either () a given frequency response, or () a specific time domain response to an impulse, step, or ramp, etc. nalog design using digital filters, ω i Ω i T nother possibility is that a digital filter may be required to simulate a continuous-time (analog) system. To simulate an analog filter the discretetime filter is used in the /D H(z) D/ structure shown below. The /D converter can be thought of roughly as a sampler and coder, while the D/ converter, in many cases, represents a decoder and holder followed by a low pass filter (smoothing filter). The /D converter may be preceded by a low pass filter, also called an anti-aliasing filter or pre-filter. Equivalent nalog Filter x a (t) x(n) y(n) /D H(z) D/ x a (nt) y a (nt) y a (t) (/T) samples/sec (/T) samples/sec We will usually be given a set of analog requirements with critical frequencies Ω, Ω,, Ω N in radians/sec., and the corresponding frequency response magnitudes K, K,, K N in db. The sampling rate /T of the /D converter will be specified or can be determined from the input signals under consideration. DSP-5 (IIR) of 55 Dr. Ravi Billa

The general approach for the design is to first convert the analog requirements to digital requirements and then design the digital filter using the bilinear transformation. The conversion of the analog specifications to digital specifications is through the formula ω i Ω i T. To show that this is true, suppose that the input to the equivalent analog filter is x a (t) sin i t. The output of the /D converter with sampling rate /T becomes x(n) x a (nt) sin i nt sin ( i T) n sin i n Thus, the magnitude of the discrete-time sinusoidal signal is the same as the continuous time sinusoid, while the digital frequency ω i is given in terms of the analog frequency Ω i by ω i Ω i T. Thus, the specifications for the digital filter become ω, ω,, ω N with the corresponding frequency response magnitudes K, K,, K N. The digital frequency, ω, is in units of radians. The procedure is conceptually shown in figure below. Equivalent nalog Specs Ω, Ω,, Ω N K, K,, K N i i T K i K i Digital Filter Specs,,, N K, K,, K N Digital Design (Perhaps Bilinear) H(z) There are various techniques for designing H(z):. Numerical approximation (numerical solution) to the derivative operation or the integration operation (this latter results in the bilinear transformation aka bilinear z-transformation BZT).. Time domain invariance, e.g., impulse invariance and step-invariance methods. The focus is on the low pass analog filter because once designed it can be transformed into an equivalent quality high pass, band pass or band stop filter by frequency transformation. The Butterworth, Chebyshev and elliptic filters are used as a starting point in designing digital filters. We approximate the magnitude part of the frequency response, not the phase. Butterworth and Chebyshev filters are actually special cases of the more difficult elliptic filter. Because a constant divided by an N th order polynomial in Ω falls off as Ω N it will be an approximate low pass function as Ω varies from to. Therefore, an all-pole analog filter H(s) /D(s) is a good and simple choice for a low pass filter form and is used in both the Butterworth and the type I Chebyshev filters. Moreover, for a given denominator order, having the numerator constant (order zero) gives (for a given number of filter coefficients) the maximum attenuation as Ω. DSP-5 (IIR) 3 of 55 Dr. Ravi Billa

5. The normalized analog, low pass, Butterworth filter s a lead-in to digital filter design we look at a simple analog low pass filter an RC filter, and its frequency response. Example 5.. Find the transfer function, H a (s), impulse response, h a (t), and frequency response, H a (jω), of the following system. + Input x(t) R kω C μf + Output y(t) Solution This is a voltage divider. The transfer function is given by Y ( s) sc RC 5 H a (s) X ( s) R sc s RC s 5 Taking the inverse Laplace transform gives the impulse response, 5 h a (t) 5 e t u( t) The frequency response is 5 j tan ( / 5) H a (jω) H a ( s) e s j j 5 ( /5) The cut-off frequency is Ω c 5 rad/sec. The gain at Ω is. H a (jω).77 Ω c 5 Ω, rad./sec. The MTLB plots of frequency response of H a (jω) 5 ( j 5) are shown below. We use the function fplot. The analog frequency, Omega (Ω), extends from to ; however, the plots cover the range to 6π rad/sec. subplot(,, ), fplot('abs(5/(5+j*omega))', [-6*pi, 6*pi], 'k'); xlabel ('Omega, rad/sec'), ylabel(' H(Omega) '); grid; title ('Magnitude') % subplot(,, ), fplot('angle(5/(5+j*omega))', [-6*pi, 6*pi], 'k'); xlabel ('Omega, rad/sec'), ylabel('phase of H(Omega)'); grid; title ('Phase') DSP-5 (IIR) 4 of 55 Dr. Ravi Billa

H(Omega) Phase of H(Omega) Magnitude.8.6.4. -5 - -5 5 5 Omega, rad/sec Phase - - -5 - -5 5 5 Omega, rad/sec If we adjust the values of the components R and C so that RC, we would have H a (s) which is a normalized filter with cut-off frequency Ω c rad/sec and gain of at Ω. s Such a normalized LP filter could be transformed to another LP filter with a different cut-off frequency of, say, Ω c rad/sec by the low pass to low pass transformation s s /. The transfer function then becomes H a (s) s s s ( s /) which still has a dc gain of. The gain of this filter could be scaled by a multiplier, say, K, so that H a (s) K s which has a dc gain of K and a cut-off frequency of Ω c rad/sec. The frequency response of the normalized filter H a (s) /( s ) is H a (jω) ( j ). The corresponding MTLB plots are shown below using the function plot. Omega is a vector, consequently we use./ instead of / etc. Omega -6*pi: pi/56: 6*pi; H./(.+ j.*omega); subplot(,, ), plot(omega, abs(h), 'k'); xlabel ('Omega, rad/sec'), ylabel(' H(Omega) '); grid; title ('Magnitude') subplot(,, ), plot(omega, angle(h), 'k'); xlabel ('Omega, rad/sec'), ylabel('phase of H(Omega)'); grid; title ('Phase') DSP-5 (IIR) 5 of 55 Dr. Ravi Billa

H(Omega) Phase of H(Omega) Magnitude.5 - -5 - -5 5 5 Omega, rad/sec Phase - - - -5 - -5 5 5 Omega, rad/sec Butterworth filter The filter H a (s) 5/( s 5) is a first order Butterworth filter with cut-off frequency Ω c 5 rad/sec. Its magnitude response is given by H(jΩ) / 5 Omega : pi/56: 5; H./sqrt(.+ (Omega/5).^); plot(omega, H, 'k'); legend (' st Order, Cut-off 5 rad/sec'); xlabel ('Omega, rad/sec'), ylabel(' H(Omega) '); grid; title ('Magnitude') DSP-5 (IIR) 6 of 55 Dr. Ravi Billa

H(Omega) Magnitude st Order, Cut-off 5 rad/sec.9.8.7.6.5.4 5 5 Omega, rad/sec DSP-5 (IIR) 7 of 55 Dr. Ravi Billa

Frequency response analysis The frequency response analysis in the analog frequency (Ω) domain is given by the following equations which may be used to illustrate, qualitatively, the effect of LP, HP or BP analog filters on a signal. Y(s) H(s) X(s) Y(jΩ) H(jΩ) X(jΩ) H( j) e j H ( j) j X ( j) X ( j) e Y () H () X () and Y () H () + X () H( j) X ( j) e j H ( j) X ( j X(s) H(s) Y(s) Similarly, if we have a digital filter H(z) the frequency response analysis in the digital frequency (ω) domain is given by the following equations which may be used to illustrate, qualitatively, the effect of LP, HP or BP digital filters on a signal. Y(z) H(z) X(z) Y(jω) H(jω) X(jω) H( j) e X ( j) e j H ( j) j X ( j) Y () H () X () and Y() H() + X () H( j) X ( j) e j H ( j) X ( j X(z) H(z) Y(z) DSP-5 (IIR) 8 of 55 Dr. Ravi Billa

H(r) The N th order Butterworth filter In general the magnitude response of the N th order Butterworth filter with cut-off frequency Ω c is given by H(jΩ) / N c With the normalized frequency variable defined as r / c, the MTLB segment below plots the magnitude response for st, 3 rd, and th order filters, that is, N, 3, and, respectively. Note that as the filter order increases the response becomes flatter on either side of the cut-off; and the transition (cut-off) becomes sharper. r :.: 3; H./sqrt(.+ r.^); H3./sqrt(.+ r.^6); H./sqrt(.+ r.^); plot (r, H, r, H3, 'r', r, H, 'k'); legend (' st Order', '3 rd Order', ' th Order'); xlabel ('Normalized frequency, r'), ylabel(' H(r) '); grid; title ('Magnitude').9.8.7 Magnitude st Order 3rd Order th Order.6.5.4.3...5.5.5 3 Normalized frequency, r DSP-5 (IIR) 9 of 55 Dr. Ravi Billa

Writing down the N th order filter transfer function H(s) from the pole locations Let us look at some analog Butterworth filter theory. () H(jΩ) decreases monotonically with Ω. No ripples. / N c () Poles lie on the unit circle in the s-plane (for the Chebyshev filter, in contrast, they lie on an ellipse). (3) The transition band is wider (than in the case of the Chebyshev filter). (4) For the same specifications the Butterworth filter has more poles (or, is of higher order) than the Chebyshev filter. This means that the Butterworth filter needs more components to build. H(jΩ).77 Direction of increasing order of filter Ω c Ω, rad./sec. The normalized analog Butterworth filter has a gain of H(jΩ) at Ω, and a cut-off frequency of Ω c rad/sec. Given the order, N, of the filter we want to be able to write down its transfer function from the pole locations on the Butterworth circle. Example 5.. Given the order N of the filter, divide the unit circle into N equal parts and place poles on the unit circle at (36 /N) apart. The H(s) will be made up of the N poles in the left half plane only. Remember complex valued poles must occur as complex conjugate pairs. There will jω s-plane ζ Radius Ω c be no poles on the imaginary axis. Since the N poles must lie on the left half semicircle, when N is odd the odd pole must be at s. Thus, for N, there is one pole, s, and H(s) is given by DSP-5 (IIR) of 55 Dr. Ravi Billa

H(s) s s s ( ) s Example 5..3 Filter order N so that N 4 and 36 /4 9. The pole plot is shown above. The poles are at s j and s j, jω s-plane Radius Ω c ζ so that Denominator is So Dr. H(s) H(s) ( s s )( s s s s s ) s j s j s s j s s j Example 5..4 Filter order N 3, so that N 6 and 36 /6 6. Poles are at 3 3 s,, 3, j, and j s + s + jω s-plane s s 3 s ζ s 3 s * Radius Ω c DSP-5 (IIR) of 55 Dr. Ravi Billa

Denominator is So H(s) Dr. s ( s ) s j 3 j 4 H(s) s s s 3 s s j 3 s s s Example 5..5 Filter order N 4, so that N 8 and 36 /8 45. Poles are at s ( cos.5 j sin.5 ) ( cos j sin ) ( cos 67.5 j sin 67.5 ) ( cos j sin ) Wrong placement jω s-plane jω Correct s-plane ζ ζ H(s) ( s cos ) j sin ( s cos ) j sin H(s) s.848 s s.765 s DSP-5 (IIR) of 55 Dr. Ravi Billa

Determining the order and transfer function from the specifications typical magnitude response specification is sketched below. The magnitudes at the critical frequencies Ω and Ω are and B, respectively. Typically Ω is in the pass band or is the edge of the pass band and Ω is in the stop band or is the edge of the stop band. For illustrative purposes we have arbitrarily H(jΩ) Transition band Pass band Stop band.77 B.5 Ω Ω Ω, rad./sec. taken.77 (thus Ω is the cut-off frequency, but this need not be the case) and B.5. The log-magnitude specification is diagrammed below. Note that ( log ) K db and ( log B) K db. Thus the analog filter specifications are log H ( j) K for all Ω Ω log H ( j) K for all Ω Ω db ( log H(jΩ) ) Ω Ω Ω K K With the magnitude H(jΩ) given by the Butterworth function, H(jΩ) / N c and using the equality condition at the critical frequencies in the above specifications the order, N, of the filter is given by DSP-5 (IIR) 3 of 55 Dr. Ravi Billa

K / log K / N (3.6, Ludeman) log The result is rounded to the next larger integer. For example, if N 3. by the above calculation then it is rounded up to 4, and the order of the required filter is N 4. In such a case the resulting filter would exceed the specification at both Ω and Ω. The cut-off frequency Ω c is determined from one of the two equations below. Ω c or Ω c (3.7 Ludeman) N K / N K / The equation on the left will result in the specification being met exactly at Ω while the specification is exceeded at Ω. The equation on the right results in the specification being met exactly at Ω and exceeded at Ω. Note that the design equation for N may be written in the alternative form K / log K / N log Example 5..6 What is the order and transfer function of the analog Butterworth filter that satisfies the following specification? rad/sec 6 rad/sec K db K 3 db Solution The order N is given by K / ( ) /. log K / log N ( 3) / log 3 log log log 6 6.589.589.589 log log 999 log 999 log log 6 log 6 6 log.598 3.586 log.3333333 3.76 4 (.477) Now, as in an earlier example, locate 8 poles uniformly on the unit circle, making sure to satisfy all the requirements and write down the transfer function, H (s), of the normalized Butterworth filter (with a cut-off frequency of rad/sec), (s) s.848 s s.765 s H DSP-5 (IIR) 4 of 55 Dr. Ravi Billa

Next, determine the cutoff frequency c that corresponds to the given specifications and the order N 4 determined above c N K / (4) ( )/ 8.6 36.8 rad/sec. 8446 Finally, we make the substitution s (s / 36.8) in H(s) and thereby move the cutoff frequency from rad/sec to 36.8 rad/sec resulting in the transfer function H a (s) H (s) ( s) a s ( s / 36.8 ) H s.848 s s.765 s s( s / 36.8 ) ( s / 36.8).848( s / 36.8) ( s / 36.8).765( s / 36.8) (36.8) s.848(36.8) s 36.8 s.765(36.8) s 36.8 (side) The more general N th order Butterworth filter has the magnitude response given by H ( j) / N The parameter ε has to do with pass band attenuation and is the pass band edge frequency (not necessarily the same as the 3 db cut-off frequency c ). MTLB takes ε in which case c. See DSP-HW. [See Cavicchi, Ramesh Babu]. (End of side) 4 5.3 Time domain invariance Given an analog filter s response to a specific input we require that the response of the digital filter (to be designed) to the digital version of the analog input should be the same as the analog response at sampling instants. If the input is an impulse function the corresponding design is called an impulse invariant design, if the input is a step function the corresponding design is called a step invariant design. Impulse-invariant design If h a (t) represents the response of an analog filter H a (s) to a unit impulse δ(t), then the unit sample response of a discrete-time filter used in an /D H(z) D/ structure is selected to be the sampled version of h a (t). That is, we are preserving the response to an impulse. Therefore the discrete-time filter is characterized by the system function, H(z), given by H(z) ʓ{h(n)} ʓ h ( t) a t nt If we are given an analog filter with system function H a (s) the corresponding impulse-invariant digital filter, H(z), is seen from above to be H(z) ʓ L H a ( s) t nt, where L means Laplace inverse Note that at this point we have not specified how H a (s) was obtained, but rather we have shown how to obtain the digital filter H(z) from any given H a (s) using impulse invariance. DSP-5 (IIR) 5 of 55 Dr. Ravi Billa

Example 5.3. [Low pass filter] For the analog filter H a (s) find the H(z) corresponding s to the impulse invariant design using a sample rate of /T samples/sec. Solution The analog system s impulse response is h a (t) L t e u(t). The s corresponding h(n) is then given by h(n) nt h ( t) e u(nt) a t nt T e u(n) DSP-5 (IIR) 6 of 55 Dr. Ravi Billa n a n u(n) T where, as previously, we have set e a. The discrete-time filter, then, is given by the z- transform of h(n) T n z z H(z) ʓ{h(n)} ʓ e u(n) T z e z a T e z az T which has a pole at z e a. In effect, the pole at s α in the s-plane is mapped to a pole at T z e a in the z-plane. (HW What is the difference equation?) Y ( z) Y ( z)( az ) X (z) X ( z) az y ( n) a y( n ) x(n) y (n) x ( n) a y( n ) st Relationship between the s-plane and the z-plane ( z e ) We can extend the above procedure to the case where H a (s) is given as a sum of N terms with distinct poles as N k H a (s) s k k For this case the impulse invariant design, H(z), is given by N N N H(z) ʓ k k z k L T k k T k s k k z e k e z t nt where L means Laplace inverse. We observe that a pole at s k in the s-plane gives rise to a pole at z e kt in the z-plane and the coefficients in the partial fraction expansion of H a (s) and H(z) are equal. If the analog filter is stable, corresponding to k being in the left half plane, then the magnitude of e kt will be less than unity, so that the corresponding pole of the digital filter is inside the unit circle, and as a result the digital filter also is stable. While the poles in the s-plane map to poles in the z-plane according to the relationship z e s T, it is important to recognize that the impulse invariance design procedure does not correspond to a mapping (transformation) of the s-plane to the z-plane by that relationship or in fact by any relationship. (n example of a transformation is where we actually make a z substitution, say, s which, of course, is the bilinear transformation). For example, T z the zeros of H a (s) do not map to zeros of H(z) according to this relation. See also matched z- transform later. st We can explore the relationship z e keeping in mind that it only applies to poles and that it is not a transformation. Set s ζ + jω and z e T T e j so that r T e and ω ΩT. j r e in z st e to get j r e e ( j) T

The above relations can be used to show that poles in the left half of the primary strip in the s-plane map into poles within the unit circle in the z-plane as shown in the figure for s s. st e Mapping of poles, z s-plane pole z-plane pole s ζ + jω st j z e r e r ω jω s / π + jω s / π jω s / π jω s / π e T For s ζ + jω we have r and ω Ω T. However, poles at s and s 3 (which are a distance Ω s from s ) also will be mapped to the same pole that s is mapped to. In fact, an infinite number of s-plane poles will be mapped to the same z-plane pole in a many-to-one relationship. These frequencies differ by Ω s πf s π/t (F s is the sampling frequency in Hertz). This is called aliasing (of the poles) and is a drawback of the impulse-invariant design. The analog system poles will not be aliased in this manner if, in the first place, they are confined to the primary strip of width Ω s πf s π/t in the s-plane. In a similar fashion poles located in the right half of the primary strip in the s-plane will be mapped to the outside of the unit circle in the z-plane. Here again the mapping of the s-plane poles to the z-plane poles is many-to-one. jω s-plane Im s j3π/t z-plane Ω s jω s / jπ/t Ω T Re s ζ +jω σ Primary strip, width Ω s π/t s 3 jπ/t j3π/t Owing to the aliasing, the impulse invariant design is suitable for the design of low pass and band pass filters but not for high pass filters. st (Omit) Matched z-transform In this method we apply the mapping z e not only to the poles but also to the zeros of H a (s). s a result the observations made above are valid for the matched z-transform method of filter design. DSP-5 (IIR) 7 of 55 Dr. Ravi Billa

Frequency response of the equivalent analog filter Going back to the impulse invariant design of the first order filter, how does the frequency response of the /D H(z) D/ structure using this H(z) compare to the frequency response of the original system specified by H a (s)? X(s) x(t) H a (j) H a (s) Y(s) y(t) X(s) x(t) H eq (j) /D H(z) D/ Y(s) y(t) z z Note H a (s) and H(z) with a e T. For the analog filter we have T s z e z a j tan H a (jω) s ( / ) e s j j H a (jω), < Ω < For future reference note that H a (j) /. To obtain the equivalent frequency response of the /D H(z) D/ structure one must first find the frequency response of the discrete-time filter specified by H(z). This is given by H(e j j e ) H( z) j z e j T e e, π < ω < π (because periodic) The analog frequency response of the equivalent analog filter is then determined by replacing ω by ΩT. Note, however, that since the digital frequency, ω, is restricted to ( π, π), the analog frequency, Ω, is correspondingly is restricted to ( π/t, π/t). We get jt j e H eq (jω) H( e ) T jt T j T e e e T e, ΩT < π or Ω < π/t j T Denominator e T e e T T T (cos T jsin T ) ( e cos T ) je sin T So H eq (jω), Ω < π/t T T ( e cos T ) je sin T H eq (jω), Ω < π/t T T e e cos T Note that H eq (j). T e a We can plot H eq (jω) and H a (jω) for, say, and different values of T say T. and T, remembering that H eq (jω) is periodic, the basic period going from π/t < Ω < π/t. Ideally the two plots should be very close (in shape, over the range of frequencies of interest) but it will be found that the smaller the value of T, the closer the two plots are. Thus T. will result in a closer match than T. Therefore, using the impulse invariant design, good results are obtained provided the time between samples (T) is selected small enough. What is small enough may be difficult to assess when the H a (s) has several poles; and when it is found, it may be so small that implementation may be costly. In general, other transformational methods such as the bilinear allow designs with sample rates that are less than those required by the impulse invariant method and also allow flexibility with respect to selection of sample rate size. DSP-5 (IIR) 8 of 55 Dr. Ravi Billa

H a (jω) π π Ω H eq (jω) For T, valid for Ω < π/ π For T., valid for Ω < π π Ω Example 5.3. [Impulse invariant design of nd order Butterworth filter] Obtain the impulse invariant digital filter corresponding to the nd 4 order Butterworth filter H a (s) s s 4 with sampling time T sec. Solution Note that we are using T sec. simply for the purpose of comparing with the bilinear design done later with T sec. It is important to remember that in bilinear design calculations the value of T is immaterial since it gets cancelled in the design process; but in impulse invariant design there is no such cancellation, so the value of T is critical (the smaller, the better). 4 4 H a (s) s s 4 s s 4 s The expression in braces is in familiar form and can be converted to its impulse invariant digital filter equivalent. See 3(c) in HW. s Step invariant design Here the response of the digital filter to the unit step sequence, u(n), is chosen to be samples of the analog step response. In this way, if the analog filter has good step response characteristics, such as small rise-time and low peak over-shoot, these characteristics would be preserved in the digital filter. Clearly this idea of waveform invariance can be extended to the preservation of the output wave shape for a variety of inputs. p a (t) t (Omit) Problem Given the analog system H a (s), let h a (t) be its impulse response and let p a (t) be its step response. The system H a (s) is given to be continuous-time linear time-invariant. Let also DSP-5 (IIR) 9 of 55 Dr. Ravi Billa

h(n) be the unit sample response, p(n) be the step response, and, H(z) be the system function, of a discrete-time linear shift-invariant filter. Then, (a) If h(n) h a (nt), does p(n) h a ( kt)? n k (b) If p(n) p a (nt), does h(n) h a (nt)? Solution (a) If h(n) h a (nt), does p(n) h a ( kt)? We know that u(n) (k) n k n k This is seen to be true by writing it out in full as u(n) δ( ) + δ( +) + + δ( ) + δ() + δ() + + δ(n) where n is implicitly some positive integer. Take, for instance, n 3; then, from the above equation u(3) δ(), all the other terms being zero. In other words u(n) is a linear combination of unit sample functions. nd, since the response to δ(k) is h(k), therefore, the response to u(n) is a linear combination of the unit sample responses h(k). That is, n p(n) h ( k) h a ( kt) k n k Therefore, the answer to the above question is, Yes. (b) If p(n) p a (nt), does h(n) h a (nt)? Since δ(n) u(n) u(n ), the response of the digital system, H(z), to the input δ(n) is h(n) p(n) p(n ) p a (nt) p a (nt T) h a (nt) Therefore, the answer to the above question is, No. Example 5.3.3 [LP filter] [Step Invariance] [Problem 5.4b, O & S] Consider the continuoustime system H a (s) with unit step response pa (t). Determine the system function, H(z), i.e., s the z-transform of the unit sample response h(n) of a discrete-time system designed from this system on the basis of step-invariance, such that p(n) p a (nt), where n p(n) h ( k) and p a (t) h k t Solution Since p a (t) h a ( ) d we have t a ( ) d H s L[p a (t)] P a (s) a ( ) K K + s s ( s ) s s where K and K are the coefficients of the partial fraction expansion, given by DSP-5 (IIR) of 55 Dr. Ravi Billa

Therefore, K P a (s) s s / s / s and K s s t p a (t) e u( t) t e u(t) from which we write p (n) p a (nt) and hence P (z) etc. Equivalently, we may reason as follows. The correspondence between s-plane poles and z-plane poles is s e T z Thus we get P(z) as below T ( / ) ( / ) z z zz e z( z ) P(z) T T T e z e z z z e T ( z ) z e z e T T ( z )( z e ) However, what we need is H(z). Since δ(n) u(n) u(n ), and we know the response to u(n), therefore, the response to u(n) u(n ) is given by h(n) p(n) p(n ), and taking the z- transform of this last equation, H(z) P (z) z P( z) ( z z ) P( z) P( z) z z z e T T z ( z )( z e ) e T T ( z e ) lternatively, we may also obtain the transfer function as the ratio of output and input transforms, H(z) P(z)/U(z). Frequency-response analysis s we did in the case of the impulse-invariant design, here also we can compare H a (j) with H eq (j). For the system H a (s) the frequency response is s already evaluated as H a (jω). We need the frequency response, H eq (j), of the equivalent analog filter when the above H(z) is used in a /D H(z) D/ structure. Start with the above H(z) and set z e j to get j H ( e ) H( z) j z e e T T ( z e ) j e T j T ( e e ) j For the equivalent analog filter we get H eq (jω) by setting ω ΩT in H ( e ). z e 5.4 Bilinear transformation One approach to the numerical solution of an ordinary linear constant-coefficient differential equation is based on the application of the trapezoidal rule to the first order approximation of an integral (or integration). Consider the following equivalent pair of equations DSP-5 (IIR) of 55 Dr. Ravi Billa

dy x(t) dy dt x ( t) dt Here dy area shown shaded and is given by x( n) x( n ) y(n) y(n ) T where we have used the trapezoidal rule to compute the area under a curve. x(t) x((n )T) x(nt) (n )T nt t Taking the z transform of the above we get T Y(z) z Y(z) X ( z)( z ) Rearranging terms gives Y ( z) T z X ( z) z z T z Thus the continuous time system y(t) x ( t) dt represented by the following block diagrams x(t) y(t) X(s) is replaced in the discrete-time domain by the following block. H(z) s Y(s) x(n) X(z) z T z y(n) Y(z) In other words, given the Laplace transfer function H a (s), the corresponding digital filter is given ( z ) by replacing s with, or T ( z ) H(z) H ( s) ( z ) a s T ( z ) This is called bilinear transformation (both numerator and denominator are first order polynomials), also known as bilinear z-transformation (BZT). DSP-5 (IIR) of 55 Dr. Ravi Billa

Here again, note that at this point we have not specified how H a (s) was obtained, but rather we are showing how to obtain the digital filter H(z) from any given H a (s) using bilinear transformation. Example 5.4. [LP filter] [Bilinear] Design a digital filter based on the analog system H a (s), using the bilinear transformation. Give the difference equation. Use T sec. s Solution H(z) H ( ) ( z ) a s s T ( z ) z ( ) ( ) z T z Example [Ludeman, p. 78] pply bilinear transformation to the nd order Butterworth filter 4 H a (s) with T sec. Obtain () H(z), () the difference equation and s s 4 j (3) H ( e ). Solution z ( z ) () With T second, s T becomes s, and z z H(z) H ( s ) ( z ) 4 a s ( z ) ( z ) ( z ) 4 ( ) ( ) z z z z 3.4435.5857865 z () The difference equation is obtained from Y ( z) z z H(z) X ( z) 3.4435.5857865 z Cross-multiply and take inverse z-transform to get 3.4435 y(n) +.5857865 y(n ) x(n) + x(n ) + x(n ) By rearranging and scaling y(n) can be realized as y(n).9893 [x(n) + x(n ) + (n )].7579 y(n ) (3) Frequency response e e H 3.4435.5857865e j j ( z) j z e j Numerator N () N( ) D( ) j j j j j e e e ( e e ) ( cos ) e j Denominator D () 3.4435 +.5857865 j e ( cos ) j e ( + B cos ) j B sin ω + B e j DSP-5 (IIR) 3 of 55 Dr. Ravi Billa

( B cos ) ( Bsin ) j ( cos ) H ( e ) ( B cos ) ( B sin ) The magnitude of the frequency response is j ( cos ) H ( e ) ( B cos ) ( B sin ) j Plot log H ( e ) vs ω for ω to π. j e sin tan B Bcos Relationship between the s- and z-planes The bilinear transformation is ( z ) ( st / ) s or z T ( z ) ( st / ) We can map a couple of points on the jω axis by setting s jω, so that ( jt / ) z ( jt / ) sin tan B j Bcos e j / Thus Ω maps to z and Ω /T maps to z j e as shown in figure below. The transformation has the following properties:. The entire j axis of the s-plane goes on to the unit circle of the z-plane.. The entire left half of the s-plane is mapped into the inside of the unit circle of the z-plane. (In contrast, in impulse invariant design the poles in the left halves of infinitely many strips of width s in the s-plane are mapped into the inside of the unit circle in the z-plane.) So a stable analog filter, with all of its poles in the left half plane, would be transformed into a stable digital filter with all of its poles in the unit circle. The frequency response is evaluated on the j axis in the s-plane and on the unit circle in the z-plane. While the frequency responses of the analog filter and digital filter have the same amplitudes there is a nonlinear relationship between corresponding digital and analog frequencies. jω s-plane, s ζ+jω Unit circle Im z-plane j (for Ω /T) Left half plane j/t j + j j/t ζ (Ω + ) (Ω ) (Ω + ) Re (Ω ) j (for Ω /T) DSP-5 (IIR) 4 of 55 Dr. Ravi Billa

DSP-5 (IIR) 5 of 55 Dr. Ravi Billa 5.5 Nonlinear relationship of frequencies in bilinear transformation In the bilinear transformation the analog and digital frequencies are non-linearly related. Setting s jω and z j e in s T z z, we get jω T j j e e T ) ( ) ( / / / / / / j j j j j j e e e e e e T )/ ( )/ ( / / / / j j j j e e j e e j or Ω T / cos / sin T tan or ω tan T First we sketch Ω (the analog frequency) as a function of ω (the digital frequency) as given by Ω T tan to show qualitatively the distortion of the frequency scale that occurs due to the nonlinear nature of the relationship. Equally spaced pass bands are pushed together or warped on the higher frequency end of the digital frequency scale. This effect is normally compensated for by pre-warping the analog filter before applying bilinear transformation. ω Ω ) / tan( T Unequal

Because of warping the relationship between Ω and Ω on the one hand and ω and ω on the other is not linear. The digital frequencies ω and ω are pushed in towards the origin (ω ). In this process Ω is transformed to ω. ω π π ω tan T / π ω (Periodic) ω Ω ω K K H(ω) π H(Ω) K (Nonperiodic) K Ω Ω Ω If the bilinear transformation is applied to the system H a (s) with critical frequency c, the digital filter will have a critical frequency ω c tan c T /. If the resulting H(z) is used in an /D H(z) D/ structure, the equivalent critical frequency (of the equivalent analog filter) is obtained by replacing ω c with ceq T: ω c Ω ceq T tan c T or Ωceq tan c T T tan T / c T/, then we have If ( c T/) is so small that c c T ceq c T If this condition is not satisfied, then the warping of the critical frequency (in the bilinear design) is compensated for by pre-warping. 5.6 Digital filter design The Butterworth filter DSP-5 (IIR) 6 of 55 Dr. Ravi Billa

Before taking up design we reproduce below some of the material relating filter specifications to the filter order and the cut-off frequency. typical magnitude response specification is sketched below. The magnitudes at the critical frequencies Ω and Ω are and B, respectively. For illustrative purposes we have H(jΩ) Transition band Pass band Stop band.77 B.5 Ω Ω Ω, rad./sec. arbitrarily taken.77 (thus Ω is the cut-off frequency, but this need not be the case) and B.5. The log-magnitude specification is diagrammed below. Note that ( log ) K and ( log B) K. Thus the analog filter specifications are log H ( j) K for all Ω Ω log H ( j) K for all Ω Ω db ( log H(jΩ) ) Ω Ω Ω K K With the magnitude H(jΩ) given by the Butterworth function, H(jΩ) / N c and using the equality condition at the critical frequencies in the above specifications the order, N, of the filter is given by DSP-5 (IIR) 7 of 55 Dr. Ravi Billa

K / log K / N (3.6, Ludeman) log The result is rounded to the next larger integer. For example, if N 3. by the above calculation then it is rounded up to 4, and the order of the required filter is N 4. In such a case the resulting filter would exceed the specification at both Ω and Ω. The cut-off frequency Ω c is determined from one of the two equations below. Ω c or Ω c (3.7 Ludeman) N K / N K / The equation on the left will result in the specification being met exactly at Ω while the specification is exceeded at Ω. The equation on the right results in the specification being met exactly at Ω and exceeded at Ω. Example 5.6. [4., Ludeman] Design and realize a digital low pass filter using the bilinear transformation method to satisfy the following characteristics: (a) monotonic pass band and stop band (b) 3. db cut off frequency of.5 rad. (c) Magnitude down at least 5 db at.75 rad. db ( log H(jω) ) 3. π/ 3π/4 π ω 5 Note that the given frequencies are digital frequencies. The required frequency response is shown. We use bilinear transformation on an analog prototype. Step Pre-warp the critical digital frequencies.5 and.75 using T sec. That is, we find the analog frequencies and that correspond to and : tan.5 tan. rad / sec T tan.75 tan 4.884 rad / sec T DSP-5 (IIR) 8 of 55 Dr. Ravi Billa

Step Design LP analog filter with critical frequencies and that satisfy log H a (j ) 3. db K, and log H a (j ) 5 db K The Butterworth filter satisfies the monotonic property and has an order N and critical frequency Ω c determined by Eq. 3.6 and 3.7 of Ludeman K / log K / N and Ω c N K / log Plugging in numerical values, 3./ log 5/ N log 3.6 log.387.486 (.387) 4.88. Ω c 4 3./ 4 rad / sec Note in this case that Ω c Ω. Therefore, the required pre-warped, normalized, unit bandwidth, analog filter of order using the Butterworth Table 3.b (or the Butterworth circle) is.94 H a (s) (with a cut off frequency rad / sec) s s Since we need a cut-off frequency of Ω c rad/sec, we next use the low pass to low pass transformation s s/ in order to move the cut-off frequency from to rad/sec. H a (s) s s (s / ) (s / ) ss / 4 (with a cut-off frequency rad/sec.) s s 4 Step 3 pplying the bilinear transformation to H a (s) with T will transform the pre-warped analog filter into a digital filter with system function H(z) that will satisfy the given digital requirements: H(z) H ( s) a ( z ) s z z z 3.44.585 z ( z z ) 4 ( z z ) 4 j j HW: Obtain the difference equation. Plot H ( e ) and H( e ) vs. Bilinear transformation: Cancellation of sampling time in warping and pre-warping The digital specifications are the set of critical frequencies {ω, ω,, ω N } and the corresponding set of magnitude requirements {K, K,, K N }. When an analog filter is used as the prototype for DSP-5 (IIR) 9 of 55 Dr. Ravi Billa

the bilinear transformation method the relationship between digital and analog frequencies is nonlinear and governed by Ω tan T and ω tan T Therefore, to get the proper digital frequency, we must design an analog filter with analog critical frequencies Ω i : i,,, N given by i Ω i tan, i,,, N T This operation will be referred to as pre-warping. The corresponding analog magnitude requirements are not changed and remain the same as the corresponding digital requirements. n analog filter H a (s) is then designed to satisfy the pre-warped specifications given by Ω, Ω,, Ω N and K, K,, K N. The bilinear transformation is then applied to H a (s), i.e., H(z) H ( s) ( z ) a s T ( z ) s the T in the Ω i equation and the T in the bilinear transform cancel in the procedure described above for low pass filter design, it is convenient to just use T in both places. This is easily seen since if the Ω i comes from an analog-to-analog transformation of an H a (s) with a unit radian ( z ) cut-off frequency, we have s (s/ Ω i ), and when the bilinear transformation s is T( z ) used the cascade of transformations is given by ( z ) ( z ) s T ( z ) i ( z ) i i T ( z ) tan ( z ) tan T This does not contain a T. Thus it is immaterial what value of T is used as long as it is the same in both steps (which it is). The procedure for the design of a digital filter using the bilinear transformation consists of: Step : Pre-warping the digital specifications Step : Designing an analog filter to meet the pre-warped specs Step 3: pplying the bilinear transformation In the process T is arbitrarily set to, but it can be set equal to any value (e.g., T ), since it cancels in the design. The design process is shown by the figure below. Digital specs ω, ω,, ω N K, K,, K N Pre-warp T Ω i (/T) tan (ω i /) Pre-warped nalog specs Ω, Ω,, Ω N K, K,, K N Design nalog Filter H a (s) Desired H(z) Bilinear transformation T z s T z DSP-5 (IIR) 3 of 55 Dr. Ravi Billa

Example 5.6. [fter Prob. 5.6, O & S] Design a digital low pass filter with pass band magnitude characteristic that is constant to within.75 db for frequencies below.63 and stop band attenuation of at least db for frequencies between.4 and. db ( log H(jω) ).75.63π.4π π ω Use bilinear transformation. Determine the transfer function H(z) for the lowest order Butterworth design which meets these specifications. Draw the cascade form realization. Step : Pre-warp.63,.4 with T sec. tan.63 tan.873 rad / sec T tan.4 tan.5 rad / sec T Step : Design H a (s).75/ log / N log.9.873 log.367.73 (.367).5. 873.873 Ω c rad/sec N K /.75/.87 Let the left-half plane poles be denoted s, * s, s, * s, s 3, and * s 3. H a (s) * s s s s * * s s s s s s s s 3 3 5.75 6 Since Ω c the LP to LP transformation s (s/) results in the same H a (s) as given above. Step 3: H(z) H ( s) ( ) a z s z DSP-5 (IIR) 3 of 55 Dr. Ravi Billa

* * * s s s s ( z ) s s ( ) s s s z s s ( s 3 s s3 z s z Example 5.6.3 [] Determine H(z) for a Butterworth filter satisfying the following constraints. Use the impulse invariance technique. j.5 H ( e ), for ω π / z j H ( e )., for 3π /4 ω π.77 H(ω) z ). π/ 3π/4 π ω db ( log H(ω) ) π/ 3π/4 π ω 3 3.98 Solution The critical frequencies are ω π/, ω 3 π/4. Use ω ΩT to determine the analog frequencies and. Note T is not given. Take T, so that ω Ω. Ω. (This corresponds to the pre-warping step of the bilinear transformation with Ω ( / T ) tan( / ) ). We have ω Ω., so that the critical frequencies are K 3. db ω π/ rad/sec. ( ω c ) K 3.98 db ω 3π/4 rad/sec. The order of the filter is given by DSP-5 (IIR) 3 of 55 Dr. Ravi Billa

K / 3./ log K / log N 3.98/ / log log 3 / 4 3.8 3.99 4 (.76) c is already known to be / rad/sec. The 4 th order normalized Butterworth filter (with unit bandwidth) is H a (s) (normalized) 4 3 s.63s 3.44 s.63s log 5.3 log 3 Using the low pass to low pass analog transformation s ( s / c) or s (s /.57) we get the Butterworth filter satisfying the required specs: H a (s) 4 3 s s s s.63 3.44.63.57.57.57.57 For the impulse invariant design we need the poles of H a (s), so the above form is not much help. We need to use the factored form: H a (s) (normalized) ( s.76536s )( s.84776s ) nd with s (s /.57), we have H a (s) s s s s.76536.84776.57.57.57.57 Put this into partial fraction form. We need the poles individually since we need to use the relation (s s ) (z e s T ), with T of course to get H(z) from the H a (s). Once we get the H a (s) we can then combine complex conjugate pole pairs to biquadratic form and then implement as a parallel form with two biquadratics in it. lternatively, memorize relations 3(c) and 3(d). This latter gives the biquadratics directly. This same problem will next be solved using the bilinear transformation to show the difference. Step : Pre-warping according to Ω tan with T gives T ( / ) Ω tan tan rad / sec Ω Step : Design H a (s) (3 / 4) tan 4.88 rad / sec tan DSP-5 (IIR) 33 of 55 Dr. Ravi Billa

3./ log 3.98/ N log 4.88 Ω c? N K / Step 3: H(z) H ( s) ( ) a z s z? Example 5.6.4 Design a low pass digital filter by applying impulse invariance to an appropriate Butterworth continuous-time filter. The digital filter specs are: db Log H(),. Log H() 5 db,.3 Solution First convert the digital frequencies to analog frequencies. The mapping between and is linear in the absence of aliasing. We shall use T with T. Thus the specs become db Log H a (),. Log H a () 5 db,.3 db ( log H ) K db.π.3π π ω K 5 db K / log K / N log ( ) / log ( 5) /. log.3.59 log 3.68 log.6666 DSP-5 (IIR) 34 of 55 Dr. Ravi Billa

Ω c.589 log 3.68 log.85.76.79. 76 (.387).. K /.589. 589 N Let the left-half plane poles be denoted s, * s, s, * s, s 3, and * s 3. H a (s) * s s s s * * s s s s s s s s Since Ω c.73 the LP to LP transformation s (s/.73) results in To be completed H a (s) * * * s s s s s s s s s s3 s s3 s s. 73 3 5.885 6..73 rad/sec.8935 Example 5.6.5 [3] [The Butterworth circle and the bilinear transformation] Refer to Oppenheim & Schafer, Sec. 5..3 and Sec. 5... The bilinear transformation is given by ( z ) ( st / ) s or z T ( z ) ( st / ) This last equation is used to map the poles on the Butterworth circle in the s-plane into poles on the Butterworth circle in the z-plane. For the normalized Butterworth filter with a cut-off frequency of rad/sec., the Butterworth circle in the s-plane has unit radius. If the cut-off frequency is Ω c instead of, then the circle has a radius of Ω c. This is the case in the example on pp. -4 of Oppenheim & Schafer where the order N of the filter is 3, the radius of the Butterworth circle in the s-plane is Ω c, and Ω c T ½ which corresponds to a sampling frequency of twice the cut-off frequency (Figure 5.4). For the two poles at s Ω c and s Ω c and Ω c T ½ we get ( ct / ) (/ 4) s Ω c : z 3/5 ( ct / ) (/ 4) ( ct / ) (/ 4) s Ω c : z 5/3 ( ct / ) (/ 4) Both of these z-plane poles are on the real axis as shown in figure below. 3 jω jω c s-plane Unit circle Im j z-plane 3/5 Ω c ζ 5/3 Re Radius Ω c Butterworth circle in the s-plane Butterworth circle in the z-plane DSP-5 (IIR) 35 of 55 Dr. Ravi Billa

The other s-plane poles are similarly mapped to z-plane poles, though the algebra involved is a little more. Note that the three poles in the left-half of the s-plane are mapped into the inside of the unit circle in the z-plane. 5.7 nalog design using digital filters When we are required to simulate an analog filter using the /D H(z) D/ structure, the specifications consist of the analog frequencies{ω, Ω,, Ω N }, the corresponding magnitudes {K, K,, K N } and the sampling time T. We convert to digital specs using the relation ω i Ω i T. Example 5.7. [Bilinear] [4., p. 8, Ludeman] Design a digital filter H(z) that when used in an /D-H(z)-D/ structure gives an equivalent low-pass analog filter with (a) 3. db cut-off frequency of 5Hz, (b) monotonic stop and pass bands, (c) magnitude of frequency response down at least 5 db at 75 Hz, and (d) sample rate of samples/sec. Solution Step First we convert the analog Ω s to digital ω s using i i T. Ω F 5 rad/sec., Ω F 75 5 rad/sec., K 3. db K 5 db Thus ω Ω T ω Ω T 5.5 rad, K 3. db.75 rad, K 5 db Step Pre-warping. Use T. (In Steps and 3 we could have used T / but the two occurrences of T would cancel out). tan T. rad/sec. and tan 4.88 rad/sec. T Step Design H a (s), i.e., determine the low pass Butterworth filter (see earlier example). 3./ log 5/ N log 3.6 log.387.486.94 (.387) 4.88. Ω c 4 3./ 4 rad / sec Do analog low pass to low pass transformation s (s/ω c ), i.e., s (s/) in order to move the cutoff frequency from to rad/sec. This gives the H a (s) with pre-warped specs and Ω c rad/sec. H a (s) s s ( s / ) ( s / ) ss / 4 (with a cut-off frequency rad/sec.) s s 4 DSP-5 (IIR) 36 of 55 Dr. Ravi Billa

( z ) Step 3 pplying the bilinear transformation s to H T a (s) with T will transform ( z ) the pre-warped analog filter into a digital filter with system function H(z) that will satisfy the given requirements: 4 z z H(z) H a ( s) ( z ) s ( z ) ( z ) ( z ) 4 3.44.585z z z Example 5.7. [] Derive the Butterworth digital filter having the following specs: Pass band: to 44 rad/sec. Maximum ripple in pass band: db Stop band: beyond 5975 rad/sec. Minimum attenuation in stop band: 6 db Sampling frequency: khz db ( log H ) db..99 π ω 6 db Solution Even though pass band ripple may suggest a Chebyshev filter we shall comply with the request for a Butterworth filter. We use bilinear transformation. nalog frequency specs are given. Convert them to digital by using the relation ω ΩT and T (/) sec. Ω 44 rad/sec. becomes ω Ω T 44/. rad Ω 5975 rad/sec. becomes ω Ω T 5975/.99 rad Now, starting from these digital specs the design proceeds in 3 steps as usual. Step Pre-warp the critical digital frequencies and using T sec., to get. tan T tan tan.. rad/sec..99 tan tan tan. 65.59 rad/sec. T DSP-5 (IIR) 37 of 55 Dr. Ravi Billa

Step Design an analog low pass filter with critical frequencies and to satisfy log H a (j ) db K, and log H a (j ) 6 db K The Butterworth filter of order N and cut-off frequency Ω c is given by equations (3.6) and (3.7) of Ludeman: K / / log K / N log.59 6/ log 6. log log log.45.59 7 log.59. 6.587.837 3.934 4.674.. Ω c N K / 8 / 8.59..6 rad/sec.. 845 Therefore the required pre-warped Butterworth (analog) filter using Table 3.b (Ludeman) and the analog low-pass to low pass transformation from Table 3., s (s/ω c ), that is, s (s/.6), is H a (s) 4 3 s.63 s 3.44 s.63s s ( s /.6) Example 5.7.3 [] Design a digital LPF using bilinear transformation with the following specifications, and a Butterworth approximation: db at 5 rad/sec., 3 db at rad/sec., Sampling frequency per sec. db ( log H ) K.5. ω K 3 DSP-5 (IIR) 38 of 55 Dr. Ravi Billa

Solution Convert the analog specs to digital using ΩT, with T / sec. The critical frequencies are ω Ω T 5/.5 rad; K db ω Ω T /.rad; K 3 db Now apply Steps, and 3 of the bilinear transformation design process. Example 5.7.4 [3] Design a digital filter that will pass a Hz signal with attenuation less than db and suppress 4 Hz signal down to at least 4 db from the magnitude of the Hz signal. db ( log H ) K π 8π Ω 4 db K 44 Solution ll the specs are given in the analog domain. The sampling period T is not specified. Since Hz is in the pass band and 4 Hz in the stop band we shall use some multiple of 4 Hz, say, Hz as the sampling frequency. Thus T /. We shall employ the impulse invariance method. Step Convert the analog specs to digital by using ω ΩT FT. Thus Ω. rad/sec., and Ω. 4 8 rad/sec. so that ω T (/). rad., and ω 8T 8 (/).4 π rad. Step Convert the digital frequencies and back to analog frequencies. Since we are using impulse invariance this involves using the same formula ω ΩT and we get the same analog frequencies as before, viz., Ω rad/sec., and Ω 8 rad/sec. (Note that the value of T is irrelevant up to this point. We could have used a value of T in Steps and, resulting in awkward values for the ω s, like and 8 when we expect values between and ; but this is not a problem for the design). Step Determine the order of the analog Butterworth filter. DSP-5 (IIR) 39 of 55 Dr. Ravi Billa

K / / log K / N log.585 44/ log 58.8 log log.6 8 4.633.4 3.848 4 Cut off frequency Ω c is determined next: Ω c N K / 8 / 8 6.79.585.9355 Step 3 The normalized filter H a (s) of order 4 is H a (s) ( s.848s ) ( s.765s ) We may break it down into partial fractions now (before making the transformation s (s/ω c ). s B Cs D H a (s) + s.848s s.765s Determine, B, C, and D and then substitute s (s/ω c ). lternatively, we can get the individual pole locations from the Butterworth circle. H a (s) ( s.94 j.383)( s.94 j.383)( s.383 j.94)( s.383 j.94) s s * + * s s + C s s C * + * s s Determine, *, C and C *. Next find H a ( s) which is the analog prototype. From this we s ( s / c ) can find the H(z) by mapping the s-plane poles to z plane poles by the relation: (s s ) (z s T e ). Here at last we must specify T; we could use T /. In general, the smaller the value of T the better. z H a (z) + * z z st * + C + C * z s T s T * z e s T z e z e z e If we were to use the bilinear transformation use some value of T like / (justifying it on the basis of the sampling theorem) in ω ΩT in Step. Example 5.7.5 [Low pass filter] Design a digital low pass filter to approximate the following transfer function: H a (s) s s Using the BZT (Bilinear z-transform) method obtain the transfer function, H(z), of the digital filter, assuming a 3 db cut-off frequency of 5 Hz and a sampling frequency of.8 khz. Solution This problem is a slight variation from the pattern we have followed so far in that it specifies one critical frequency (cut-off frequency) and the filter order instead of two critical frequencies with the filter order unknown. Step Convert the analog specs to digital Ω c F c 5 3 rad/sec. DSP-5 (IIR) 4 of 55 Dr. Ravi Billa