Analog and Digital Filter Design

Similar documents
EE482: Digital Signal Processing Applications

Digital Signal Processing

Digital Signal Processing

Design of IIR filters

Electronic Circuits EE359A

Filter Analysis and Design

Digital Signal Processing Lecture 8 - Filter Design - IIR

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

Digital Control & Digital Filters. Lectures 21 & 22

DIGITAL SIGNAL PROCESSING. Chapter 6 IIR Filter Design

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

Lecture 9 Infinite Impulse Response Filters

APPLIED SIGNAL PROCESSING

Electronic Circuits EE359A

Notes on L (Optimal) Filters

V. IIR Digital Filters

Filters and Tuned Amplifiers

Chapter 7: IIR Filter Design Techniques

Stability Condition in Terms of the Pole Locations

Lecture 16: Filter Design: Impulse Invariance and Bilinear Transform

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

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

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

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

Lecture 3 - Design of Digital Filters

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

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

Chapter 7: Filter Design 7.1 Practical Filter Terminology

Filter Design Problem

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

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

Digital Signal Processing IIR Filter Design via Bilinear Transform

INF3440/INF4440. Design of digital filters

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

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

Lecture 19 IIR Filters

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

The Approximation Problem

2.161 Signal Processing: Continuous and Discrete Fall 2008

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

Second-order filters. EE 230 second-order filters 1

Digital Signal Processing:

Analysis of Finite Wordlength Effects

LINEAR-PHASE FIR FILTERS DESIGN

Op-Amp Circuits: Part 3

Butterworth Filter Properties

ON THE USE OF GEGENBAUER PROTOTYPES IN THE SYNTHESIS OF WAVEGUIDE FILTERS

PS403 - Digital Signal processing

MITOCW watch?v=jtj3v Rx7E

All-Pole Recursive Digital Filters Design Based on Ultraspherical Polynomials

EE 508 Lecture 11. The Approximation Problem. Classical Approximations the Chebyschev and Elliptic Approximations

FIR BAND-PASS DIGITAL DIFFERENTIATORS WITH FLAT PASSBAND AND EQUIRIPPLE STOPBAND CHARACTERISTICS. T. Yoshida, Y. Sugiura, N.

Filter structures ELEC-E5410

DFT & Fast Fourier Transform PART-A. 7. Calculate the number of multiplications needed in the calculation of DFT and FFT with 64 point sequence.

2. Typical Discrete-Time Systems All-Pass Systems (5.5) 2.2. Minimum-Phase Systems (5.6) 2.3. Generalized Linear-Phase Systems (5.

1 1.27z z 2. 1 z H 2

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

Design IIR Butterworth Filters Using 12 Lines of Code

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

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 )

Basic Design Approaches

OPERATIONAL AMPLIFIER APPLICATIONS

Lecture 2 OKAN UNIVERSITY FACULTY OF ENGINEERING AND ARCHITECTURE

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

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

The general form for the transform function of a second order filter is that of a biquadratic (or biquad to the cool kids).

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

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

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

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

ELEG 5173L Digital Signal Processing Ch. 5 Digital Filters

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

The Approximation Problem

2.161 Signal Processing: Continuous and Discrete Fall 2008

EE 521: Instrumentation and Measurements

Digital Signal Processing

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

DEPARTMENT OF EI DIGITAL SIGNAL PROCESSING ASSIGNMENT 1

EE 508 Lecture 15. Filter Transformations. Lowpass to Bandpass Lowpass to Highpass Lowpass to Band-reject

ECSE 512 Digital Signal Processing I Fall 2010 FINAL EXAMINATION

Matched Second Order Digital Filters

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

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

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

EE123 Digital Signal Processing

Exercise s = 1. cos 60 ± j sin 60 = 0.5 ± j 3/2. = s 2 + s + 1. (s + 1)(s 2 + s + 1) T(jω) = (1 + ω2 )(1 ω 2 ) 2 + ω 2 (1 + ω 2 )

An Iir-Filter Example: A Butterworth Filter

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

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

Homework Assignment 11

Damped Oscillators (revisited)

Ch. 7: Z-transform Reading

Oversampling Converters

Maximally Flat Lowpass Digital Differentiators

ELEG 305: Digital Signal Processing

The Approximation Problem

Discrete-Time David Johns and Ken Martin University of Toronto

1. FIR Filter Design

Lecture 7 Discrete Systems

SYNTHESIS OF BIRECIPROCAL WAVE DIGITAL FILTERS WITH EQUIRIPPLE AMPLITUDE AND PHASE

Transcription:

Analog and Digital Filter Design by Jens Hee http://jenshee.dk October 208

Change log 28. september 208. Document started.. october 208. Figures added. 6. october 208. Bilinear transform chapter extended. i

Contents Introduction 2 2 Frequency Selective Filters 3 2. Filter specification................................... 3 2.2 Butterworth filters................................... 5 2.2. Filter poles................................... 5 2.2.2 Filter order................................... 6 2.3 Chebyshev filters.................................... 6 2.3. Filter poles................................... 6 2.3.2 Filter order................................... 7 2.4 Inverse Chebyshev filters................................ 8 2.4. Filter zeros and poles.............................. 8 2.4.2 Filter order................................... 9 3 Low pass to High pass transform 0 4 Low pass to Band pass transform 5 The Bilinear transform 2

Chapter Introduction The analog and digital filter design method depends on the type of filter to be designed. Roughly speaking filters fall in two groups: Frequency Selective Filters with approximately piecewise constant frequency weighting and Frequency Weighting Filters where the frequency weighting is some desired curve. The Frequency Selective Filters are often designed using approximating functions, whereas Frequency Weighting Filters are designed using iterative methods. Frequency Selective filter are also sometimes designed using iterative methods for example if a certain phase or group delay is desired. Since Frequency Selective Filters have an approximately piecewise constant frequency weighting they can be designed as analog filters and then transformed to digital filters using the bilinear transform. This is normally not possible for Frequency Weighting Filters since the bilinear transform distorts the frequency axis and thereby the desired frequency response. When transforming an analog filter to a digital filter using the bilinear transform the result is a so called IIR filter(infinite impulse response). Another type of digital filter is the FIR filter (finite impulse response).these filters are usually designed using time domain weighting or iterative methods (e.g. the Remez method). FIR filter design is not covered by this paper. Iterative methods are also excluded from this paper. 2

Chapter 2 Frequency Selective Filters The most common filters of this type are: Low Pass filters, High Pass Filters, Band Pass Filters an Band Stop Filters, where only the magnitude response is specified. These analog filters can be designed using appoximating functions. A prototype LP filter is designed first and it is then converted to the desired type. If a digital filter is to be designed, the analog filter can be transformed to a digital filter using the bilinear transform. It is important to remember that the bilinear transform also in this case distorts the frequency axis, but since the desired frequency response is piecewise constant, this can be handled by adjusting the cut-off frequencies of the analog filter. 2. Filter specification A normalized ideal low pass filter has a magnitude frequency response as shown in Figure 2.. T (jω) 2 ω Figure 2.: Ideal frequency response of low-pass filter This ideal response cannot be achieved in practice and it is therefore necessary to change the 3

T (jω) 2 ɛ 2 ɛ 2 2 ω p ω s ω Figure 2.2: Modified frequency response of low-pass filter specification to an approximate one as shown in Figure 2.2. If the magnitude of the frequency response is written: T (jω) 2 = + K(jω) 2 then the filter specification can be given by the magnitude of K as shown in Figure 2.3. K(jω) 2 ɛ 2 2 ɛ 2 ω p ω s ω Figure 2.3: Modified frequency response of K It is seen that K(jω) 2 must approximate zero in the passband and infinity in the stop band. If therefore the zeros and poles are placed on the imaginary axis, K(ω) can be written: K(ω) = ω k i (ω 2 ω 2 i ) 4

or K(ω) = ω k i(ω 2 ωi 2 ) j(ω 2 ωj 2 ) If the zeroes are placed in the passband and the poles in the stop band, then the specification can be met. The following expressions are used in the next sections: k = f p f s where f p is the passband cut-off frequency and f s is the stop band frequency. k = ap 0 0 0 as 0 where a p is the maximum damping in the passband and a s is the minimum damping in the stop band: K(ω) = ɛf n (ω) 2.2 Butterworth filters 2.2. Filter poles The Butterworth filter is obtained if F n (0) = 0 and the first n derivatives of F n are zero, giving: F n (ω) = ω n and T n (jω) 2 = + ω 2n ɛ is omitted since it only scales the frequency axis. Note that T n (jω) 2 = for ω = independent of n. 2 We now have: and the poles are found by solving: or The poles are now given by: T n (s)t n ( s) = ( s 2 ) n + = 0 s 2n = ( ) n+ + ( s 2 ) n s k = e j v+2kπ 2n, k {0,, 2,..., 2n } where v = 0 for n odd and v = π for n even. The poles in the left half plane of T n (s) are given by: s k = sin( 2k + 2n + π) + j cos(2k π), k {0,, 2,..., n } 2n 5

The denominator polynomials of T n (s) for n =, 2, 3 are: s + s 2 + 2s + s 3 + 2s 2 + 2s + 2.2.2 Filter order If the damping in the passband is a p and the damping in the stop band a s then: giving and a p = 0 log( + ( f p f 0 ) 2n ) a s = 0 log( + ( f s f 0 ) 2n ) ( f p f s ) 2n = k n = log k 2 log k n is rounded up and a lower and upper bound of f 0 is found from the formulas for a p and a s. Since ω 0 = for the poles given above, the poles must be scaled by 2πf 0 in order to give the desired f p and f s. 2.3 Chebyshev filters 2.3. Filter poles For the Butterworth filter the error in the passband increase with frequency. The maximum error can be reduced by letting the error oscillate through the passband. This is obtained by letting the polynomial F above be a Chebyshev polynomial: F n (ω) = C n (ω) = cos(n arccos(ω)) or C n (ω) = cos(nu), To see this is a polynomial, cos(nu) is expanded: ω = cos(u) C n (ω) = cos(nu) = cos n (u) ( n 2) cos n 2 (u) sin 2 (u) + ( n 4) cos n 4 (u) sin 4 (u) +... Since cos 2 (u) + sin 2 (u) =, sin 2 (u) = ω 2 and: C n (ω) = ω n ( n 2)ω n 2 ( ω 2 ) + ( n 4)ω n 4 ( ω 2 ) 2 +... 6

The Chebyshev polynomials all oscillates between ± in the interval - to. They can be found using the recursion: C n+ (ω) = 2C n (ω)ω C n (ω), C 0 (ω) = The first three polynomials are: The zeros are given by: We now have: ω 2ω 2 ω = cos( 2k + π), k {0,, 2,..., n } 2n T n (jω) 2 = + ɛ 2 C 2 n(ω) Note that T n (jω) 2 = for ω = independent of n. +ɛ 2 And T n (s)t n ( s) = + ɛ 2 Cn( 2 s) j The poles in the left half plane of T n (s) are given by: where s k = sinh(u) sin( 2k + 2n + π) + j cosh(u) cos(2k π), k {0,, 2,..., n } 2n u = n sinh ( ɛ ) T (s) is given by: where T (s) = G 0 = k G 0 k (s s k ) s k, nodd 2.3.2 Filter order G 0 = s + ɛ 2 k, neven If the damping in the passband is a p and the damping in the stop band a s then: a p = 0 log( + ɛ 2 ) a s = 0 log( + ɛ 2 C 2 n( f s f p )) k ɛ 2 = 0 ap 0 7

k and k are given in the previous section. Using the Chebyshev approximation: we have: ɛ 2 C 2 n( f s f p ) = 0 as 0 Cn( 2 f s ) = 0 as 0 f p ɛ 2 C n ( k ) = k C n (ω) (ω + ω 2 ) n 2 n = log(2 k ) log(k + k 2 ) n is rounded up and ɛ is given by the formula for a p. Since ω p = for the poles given above, the poles must be scaled by 2πf p in order to give the desired f p and f s. 2.4 Inverse Chebyshev filters 2.4. Filter zeros and poles The Chebyshev filter has ripple in the passband and decays monotonically in the stop band. If a ripple free passband is required and ripple in the stop band is acceptable, then the following polynomial can be used: F n (ω) = C n ( ω ) We then have: Note that T n (jω) 2 = And T n (jω) 2 = ɛ2 C 2 n( ω ) + ɛ 2 C 2 n( ω ) ɛ2 for ω = independent of n. +ɛ 2 T n (s)t n ( s) = ɛ2 C 2 n( j s ) + ɛ 2 C 2 n( j s ) The zeros of T n (s) are all on the imaginary axis and determined by the reciprocals of the zeros of the Chebyshev polynomial: s k = j cos( 2k+ 2n π), k {0,, 2,..., n } In case the order is odd, the zero of the Chebyshev polynomial at ω = 0 is discarded and the number of zeros is n. 8

The poles in the left half plane are the reciprocal of the poles of the Chebyshev filter given in the previous section: where s k = sinh(u) sin( 2k+ 2n 2k+ π) + j cosh(u) cos( 2n u = n sinh ( ɛ ) π), k {0,, 2,..., n } T (s) is given by: where k (s s zk ) T (s) = G 0 k (s s pk ) k s pk G 0 = k s zk 2.4.2 Filter order If the damping in the stop band is a s then: and n = ɛ 2 a s = 0 log( + ɛ ) 2 log(2 k ) log(k + k 2 ) n is rounded up and ɛ is given by the formula for a s. Since ω s = for the poles and zeros given above, the poles and zeros must be scaled by 2πf s in order to give the desired f p and f s. 9

Chapter 3 Low pass to High pass transform The following mapping: ω LP = ω HP can be used to transform a HP filter specification into a LP filter specification. Thereafter the LP filter poles and zeros can be transformed to a HP filter using: s HP = s LP If the LP filter has n poles and m zeros, then high pass filter transfer function must be multiplied by s n m. 0

Chapter 4 Low pass to Band pass transform The following mapping: ω LP = ω BP ω c ω c ω BP, ω 2 c = ω l ω u where ω l and ω u are the two band edges of the passband or the stop band, can be used to transform a BP filter specification into a LP filter specification. Thereafter the LP filter poles and zeros can be transformed to a BP filter using: s BP = ω c 2 ( s LP ± s 2 LP + 4) If the LP filter has n poles and m zeros, then high pass filter transfer function must be multiplied by s n m.

Chapter 5 The Bilinear transform As mentioned above the Bilinear transform can be used for designing a digital filter knowing a corresponding analog filter. But since the frequency axis is distorted the specification of the digital filter must first be converted to the analog filter specification using: F = f s π tan(π f f s ) where F is the frequency used when designing the analog filter,f is the desired frequency and f s is the sampling frequency. Example A bandpass filter is to be realized as a digital filter where: The specification of the analog BP filter is then: f s = 48000Hz f pl = 0000Hz f pu = 4000Hz f su = 6000Hz fc 2 = f p f p2 f sl = f 2 c f su = 8750Hz F pl = 724Hz F pu = 992Hz F su = 26464Hz F sl = 985Hz F pc = 5279Hz 2

F sc = 646Hz It is seen that the center frequency is different for the passband and stop band. This is not allowed using the mapping between BP and LP filter described above. Assuming the center frequency is to be determined by the passband, then using F su = 26464Hz will give a F sl outside the specified band and it is therefore necessary to calculate F su from F sl, leading to F su = 23698Hz. The band pass specification is now transformed to a low pass filter specification and the procedure described above is used to find the poles and zeros of the analog bandpass filter. The final step is to transform poles and zeros to digital form using: z = + s 2f s s 2f s Note that f pl f pu f sl f su for the final digital filter and that f su is lower than required. 3

Program example A programming example written in C# can be found here: https://github.com/grubleren/filterdesign 4