FIR Filter Design by Frequency Sampling or Interpolation *

Similar documents

Narrow-Band Low-Pass Digital Differentiator Design. Ivan Selesnick Polytechnic University Brooklyn, New York

Hideo Okawara s Mixed Signal Lecture Series. DSP-Based Testing Fundamentals 13 Inverse FFT

An Introduction to the FDM-TDM Digital Transmultiplexer: Appendix C *

Advanced Digital Signal Processing Part 5: Digital Filters

Final Exam Solutions June 14, 2006

Topic 6. The Digital Fourier Transform. (Based, in part, on The Scientist and Engineer's Guide to Digital Signal Processing by Steven Smith)

The University of Texas at Austin Dept. of Electrical and Computer Engineering Midterm #2

The Discrete Fourier Transform. Claudia Feregrino-Uribe, Alicia Morales-Reyes Original material: Dr. René Cumplido

Design of FIR Filters

Digital Filters in 16-QAM Communication. By: Eric Palmgren Fabio Ussher Samuel Whisler Joel Yin

Signals and Systems Using MATLAB

Short Time Fourier Transform *

Notes on the Design of Optimal FIR Filters. By: John Treichler

Digital Signal Processing

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

ELECTRONOTES APPLICATION NOTE NO Hanshaw Road Ithaca, NY Nov 7, 2014 MORE CONCERNING NON-FLAT RANDOM FFT

The University of Texas at Austin Dept. of Electrical and Computer Engineering Final Exam

Pitch Detection Algorithms

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

Wavelet Transform. From C. Valens article, A Really Friendly Guide to Wavelets, 1999

Digital Signal Processing

DIGITAL FILTERS. !! Finite Impulse Response (FIR) !! Infinite Impulse Response (IIR) !! Background. !! Matlab functions AGC DSP AGC DSP

arxiv: v1 [cs.it] 9 Mar 2016

Final Exam Solutions June 7, 2004

ECE438 - Laboratory 7a: Digital Filter Design (Week 1) By Prof. Charles Bouman and Prof. Mireille Boutin Fall 2015

Digital Signal Processing Fourier Analysis of Continuous-Time Signals with the Discrete Fourier Transform

Understanding Digital Signal Processing

4. Design of Discrete-Time Filters

Part One. Efficient Digital Filters COPYRIGHTED MATERIAL

DISCRETE FOURIER TRANSFORM AND FILTER DESIGN

2.1 BASIC CONCEPTS Basic Operations on Signals Time Shifting. Figure 2.2 Time shifting of a signal. Time Reversal.

Laboratory Assignment 5 Amplitude Modulation

A Simple Recursive Digital Filter

IIR Filter Design Chapter Intended Learning Outcomes: (i) Ability to design analog Butterworth filters

Narrow-Band and Wide-Band Frequency Masking FIR Filters with Short Delay

Experiment 4- Finite Impulse Response Filters

F I R Filter (Finite Impulse Response)

ECE 429 / 529 Digital Signal Processing

DSP Laboratory (EELE 4110) Lab#10 Finite Impulse Response (FIR) Filters

B.Tech III Year II Semester (R13) Regular & Supplementary Examinations May/June 2017 DIGITAL SIGNAL PROCESSING (Common to ECE and EIE)

DFT: Discrete Fourier Transform & Linear Signal Processing

Sampling and Signal Processing

EC6502 PRINCIPLES OF DIGITAL SIGNAL PROCESSING

Michael F. Toner, et. al.. "Distortion Measurement." Copyright 2000 CRC Press LLC. <

ESE531 Spring University of Pennsylvania Department of Electrical and System Engineering Digital Signal Processing

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

Bibliography. Practical Signal Processing and Its Applications Downloaded from

Performance Analysis of FIR Digital Filter Design Technique and Implementation

Two-Dimensional Wavelets with Complementary Filter Banks

Final Exam Practice Questions for Music 421, with Solutions

Graphing Sine and Cosine

G(f ) = g(t) dt. e i2πft. = cos(2πf t) + i sin(2πf t)

Keywords FIR lowpass filter, transition bandwidth, sampling frequency, window length, filter order, and stopband attenuation.

Multirate Digital Signal Processing

Discrete Fourier Transform (DFT)

Fourier Signal Analysis

DSP First Lab 08: Frequency Response: Bandpass and Nulling Filters

Data Acquisition Systems. Signal DAQ System The Answer?

FIR window method: A comparative Analysis

Complex Digital Filters Using Isolated Poles and Zeroes

Simulate IFFT using Artificial Neural Network Haoran Chang, Ph.D. student, Fall 2018

Digital Signal Processing

Sinusoids. Lecture #2 Chapter 2. BME 310 Biomedical Computing - J.Schesser

Basic Signals and Systems

Electrical & Computer Engineering Technology

Digital Filters IIR (& Their Corresponding Analog Filters) Week Date Lecture Title

Digital Video and Audio Processing. Winter term 2002/ 2003 Computer-based exercises

Signals and Systems Lecture 6: Fourier Applications

Short-Time Fourier Transform and Its Inverse

Chapter 2. Signals and Spectra

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

System analysis and signal processing

Frequency-Domain Sharing and Fourier Series

Design of IIR Half-Band Filters with Arbitrary Flatness and Its Application to Filter Banks

Optimal FIR filters Analysis using Matlab

Design IIR Band-Reject Filters

Wavelet Transform. From C. Valens article, A Really Friendly Guide to Wavelets, 1999

APPLIED SIGNAL PROCESSING

NON-UNIFORM SIGNALING OVER BAND-LIMITED CHANNELS: A Multirate Signal Processing Approach. Omid Jahromi, ID:

ME scope Application Note 01 The FFT, Leakage, and Windowing

EELE 4310: Digital Signal Processing (DSP)

Signal Processing Toolbox

Frequency Division Multiplexing Spring 2011 Lecture #14. Sinusoids and LTI Systems. Periodic Sequences. x[n] = x[n + N]

Study on Multi-tone Signals for Design and Testing of Linear Circuits and Systems

Chapter 7 Filter Design Techniques. Filter Design Techniques

ELECTRONOTES APPLICATION NOTE NO Hanshaw Road Ithaca, NY August 3, 2017

DIGITAL SIGNAL PROCESSING CCC-INAOE AUTUMN 2015

Chebyshev or Equal Ripple Error Approximation Filters *

Continuous- Time Active Filter Design

Speech, music, images, and video are examples of analog signals. Each of these signals is characterized by its bandwidth, dynamic range, and the

Other Modulation Techniques - CAP, QAM, DMT

ECE 2713 Homework 7 DUE: 05/1/2018, 11:59 PM

ECE503: Digital Filter Design Lecture 9

FIR FILTER DESIGN USING A NEW WINDOW FUNCTION

Amplitude, Reflection, and Period

Digital Signal Processing 2/ Advanced Digital Signal Processing Lecture 11, Complex Signals and Filters, Hilbert Transform Gerald Schuller, TU Ilmenau

Filter Banks I. Prof. Dr. Gerald Schuller. Fraunhofer IDMT & Ilmenau University of Technology Ilmenau, Germany. Fraunhofer IDMT

Dorf, R.C., Wan, Z. Transfer Functions of Filters The Electrical Engineering Handbook Ed. Richard C. Dorf Boca Raton: CRC Press LLC, 2000

Design of infinite impulse response (IIR) bandpass filter structure using particle swarm optimization

Transcription:

OpenStax-CX module: m689 FIR Filter Design by Frequency Sampling or Interpolation * C. Sidney Burrus This work is produced by OpenStax-CX and licensed under the Creative Commons Attribution License 2. Since samples of the frequency response of an FIR lter can be calculated by taking the DFT of the impulse response h (n), one could propose a lter design method consisting of taking the inverse DFT of samples of a desired frequency response. This can indeed be done and is called frequency sampling design. The resulting lter has a frequency response that exactly interpolates the given samples, but there is no explicit control of the behavior between the samples [], [2]. Three methods for frequency sampling design are:. Take the inverse DFT (perhaps using the FFT) of equally spaced samples of the desired frequency response. Care must be taken to use the correct phase response to obtain a real valued causal h (n) with reasonable behavior between sample response. This method works for general nonlinear phase design as well as for linear phase. 2. Derive formulas for the inverse DFT which take the symmetries, phase, and causality into account. It is interesting to notice these analysis and design formulas turn out to be the discrete cosine and sine transforms and their inverses. 3. Solve the set of simultaneous linear equations that result from calculating the sampled frequency response from the impulse response. This method allows unevenly spaced samples of the desired frequency response but the resulting equations may be ill conditioned. Frequency Sampling Filter Design by Inverse DFT The most direct frequency sampling design method is to simply take the inverse DFT of equally spaced samples of the desired complex frequency response H d (ω k ). This is done by ( ) 2π H d k e j2πnk/ () where care must be taken to insure that the real and imaginary parts (or magnitude and phase) of H d (ω k ) satisfy the symmetry conditions that give a real, causal h (n). This method will allow a general complex H (ω) as well as a linear phase. In most cases, it is easier to specify proper and consistent samples if it is the magnitude and phase that are set rather than the real and imaginary parts. For example, it is important that the desired phase be consistent with the specied length being even or odd as is given in Equation 28 from FIR Digital Filters and Equation 24 from FIR Digital Filters. * Version.2: ov 2, 29 :4 pm -6 http://creativecommons.org/licenses/by/2./

OpenStax-CX module: m689 2 Since the frequency sampling design method will always produce a lter with a frequency response that interpolates the specied samples, the results of inappropriate phase specications will show up as undesired behavior between the samples. 2 Frequency Sampling Filter Design by Formulas When equally spaced samples of the desired frequency response are used, it is possible to derive formulas for the inverse DFT and, therefore, for the lter coecients. This is because of the orthogonal basis function of the DFT. These formulas can incorporate the various constraints of a real h (n) and/or linear phase and eliminate the problems of inconsistency in specifying H (ω k ). To develop explicit formulas for frequency-sampling design of linear-phase FIR lters, a direct use of the inverse DFT is most straightforward. When H (ω) has linear phase, () may be simplied using the formulas for the four types of linear-phase FIR lters. 2. Type. Odd Sampling Samples of the frequency response Equation 29 from FIR Digital Filters for the lter where is odd, L =, and M = ( ) /2, and where there is a frequency sample at ω = is given as 2h (n) cos (2π (M n) k/) + h (M). (2) Using the amplitude function A (ω), dened in Equation 28 from FIR Digital Filters, of the form (2) and the IDFT () gives for the impulse response or e j2πmk/ A k e j2πnk/ (3) A k e j2π(n M)k/. (4) Because h (n) is real, A k and (4) becomes [ ] A + 2A k cos (2π (n M) k/). (5) k= Only M + of the h (n) need be calculated because of the symmetries in Equation 27 from FIR Digital Filters. This formula calculates the impulse response values h (n) from the desired frequency samples A k and requires M 2 operations rather than 2. An interesting observation is that not only are (2) and (5) a pair of analysis and design formulas, they are also a transform pair. Indeed, they are of the same form as a discrete cosine transform (DCT). 2.2 Type 2. Odd Sampling A similar development applied to the cases for even from Equation 36 from FIR Digital Filters gives the amplitude frequency response samples as /2 2h (n) cos (2π (M n) k/) (6)

OpenStax-CX module: m689 3 with the design formula of A + /2 k= 2A k cos (2π (n M) k/) (7) which is of the same form as (5), except that the upper limit on the summation recognizes as even and A /2 equals zero. 2.3 Even Sampling The schemes just described use frequency samples at ω = 2πk/, k =,, 2,..., (8) which are equally-spaced samples starting at ω =. Another possible pattern for frequency sampling that allows design formulas has no sample at ω =, but uses equally-spaced samples located at ω = (2k + ) π/, k =,, 2,..., (9) This form of frequency sampling is more dicult to relate to the DFT than the sampling of (8), but it can be done by stretching A k and taking a 2-length DFT []. 2.4 Type. Even Sampling The two cases for odd and even lengths and the two for samples at zero and not at zero frequency give a total of four cases for the frequency-sampling design method applied to linear- phase FIR lters of Types and 2, as dened in the section Linear-Phase FIR Filters. For the case of an odd length and no zero sample, the analysis and design formulas are derived in a way analogous to (2) and (7) to give 2h (n) cos (2π (M n) (k + /2) /) + h (M) () The design formula becomes [ ] 2A k cos (2π (n M) (k + /2) /) + A M cosπ (n M) () 2.5 Type 2. Even Sampling The fourth case, for an even length and no zero frequency sample, gives the analysis formula and the design formula /2 2h (n) cos (2π (M n) (k + /2) /) (2) /2 2A k cos (2π (n M) (k + /2) /) (3) These formulas in (5), (7), (), and (3) allow a very straightforward design of the four frequency-sampling cases. They and their analysis companions in (2), (6), (), and (2) also are the four forms of discrete cosine and inverse-cosine transforms. Matlab programs which implement these four designs are given in the appendix.

OpenStax-CX module: m689 4 2.6 Type 3. Odd Sampling The design of even-symmetric linear-phase FIR lters of Types and 2 in the section Linear-Phase FIR Filters have been developed here. A similar development for the odd-symmetric lters, Types 3 and 4, can easily be performed with the results closely related to the discrete sine transform. The Type 3 analysis and design results using the frequency sampling scheme of (8) are and b= 2h (n) sin (2π (M n) k/) (4) [ M ] 2A k sin (2π (M n) k/) k= (5) 2.7 Type 4. Odd Sampling For Type 4 they are and /2 k= /2 2h (n) sin (2π (M n) k/) (6) 2A k sin (2π (M n) k/) + A /2 sin (π (M n)). (7) 2.8 Type 3. Even Sampling Using the frequency sampling scheme of (9), the Type 3 equations become and 2h (n) sin (2π (M n) (k + /2) /) (8) [ 2A k sin (2π (M n) (k + /2) /) ] (9) 2.9 Type 4. Even Sampling For Type 4 they are /2 2h (n) sin (2π (M n) (k + /2) /) (2)

OpenStax-CX module: m689 5 and /2 2A k sin (2π (M n) (k + /2) /). (2) These Type 3 and 4 formulas are useful in the design of dierentiators and Hilbert transformers [,2,9,3] directly and as the base of the discrete least-squared-error methods in the section Discrete Frequency Samples of Error. 3 Frequency Sampling Design of FIR Filters by Solution of Simultaneous Equations A direct way of designing FIR lters from samples of a desired amplitude simply takes the sampled denition of the frequency response Equation 29 from FIR Digital Filters as A (ω k ) = or the reduced form from Equation 37 from FIR Digital Filters as 2h (n) cosω k (M n) + h (M) (22) where A (ω k ) = M a (n) cos (ω k (M n)) (23) a (n) = { 2h (n) for n M h (M) for n = M otherwise for k =,, 2,..., M and solves the M + simultaneous equations for a (n) or equivalently, h (n). Indeed, this approach can be taken with general non-linear phase design from Indeed, this approach can be taken with general non-linear phase design from H (ω k ) = h (n) e jω kn for k =,, 2,, which gives equations with unknowns. This design by solving simultaneous equations allows non-equally spaced samples of the desired response. The disadvantage comes from the numerical calculations taking considerable time and being subject to inaccuracies if the equations are ill-conditioned. The frequency sampling design method is interesting but is seldom used for direct design of lters. It is sometimes used as an interpolating method in other design procedures to nd h (n) from calculated A (ω k ). It is also used as a basis for a least squares design method discussed in the next section. 4 Examples of Frequency Sampling FIR Filter Design To show some of the characteristics of FIR lters designed by frequency sampling, we will design a Type., length-5 FIR low pass lter. Desired amplitude response was one in the pass band and zero in the stop band. The cuto frequency was set at approximately f =.35 normalized. Using the formulas (5), (7), (), and (3), we got impulse responses h (n), which are use to generate the results shown in Figures Figure 26 and Figure 26. (24) (25)

OpenStax-CX module: m689 6 The Type, length-5 lter impulse response is: h =.99.639 4.494 7 4.494.639.99 (26) The amplitude frequency response and zero locations are shown in Figure 26a.5 Type. Frequency samples with odd spacing.2.4.6.8.5.2.4.6.8.5 Type 2. Frequency samples with odd spacing Type. Frequency samples with even spacing.2.4.6.8.5 Type 2. Frequency samples with even spacing.2.4.6.8 ormalized Frequency Imaginary part of z Imaginary part of z Imaginary part of z Imaginary part of z Zero Locations 2 2 2 2 2 2 2 2 Figure 26: Frequency Responses and Zero Locations of Length-5 and 6 FIR Filters Designed by Frequency Sampling We see a good lowpass lter frequency response with the actual amplitude interpolating the desired values at 8 equally spaced points. otice there is considerable overshoot near the cuto frequency. This is characteristic of frequency sampling designs and is a sort of Gibbs phenomenon" but is even worse than that in a Fourier series expansion of a discontinuity. This Gibbs phenomenon could be reduced by using unequally spaced samples and designing by solving simultaneous equations. Imagine sampling in the pass

OpenStax-CX module: m689 7 and stop bands of Figure 8c from FIR Digital Filters but not in the transitionband. The other responses and zero locations show the results of dierent interpolation locations and lengths. ote the zero at - for the even lters. Examples of longer lters and of highpass and bandpass frequency sampling designs are shown in Figure 26. ote the dierence of even and odd distributions of samples with with or without an interpolation point at zero frequency. ote the results of dierent ideal lters and Type or 2. Also note the relationship of the amplitude response and zero locations.

OpenStax-CX module: m689 8 Type. Length 2 Lowpass FIR Filter.5.2.4.6.8 Type 2. Length 2 Lowpass FIR Filter.5.2.4.6.8 Type. FIR Length 2 Highpass FIR Filter.5.2.4.6.8 Type 2. Length 2 Bandpass FIR Filter.5.2.4.6.8 ormalized Frequency Imaginary part of z Imaginary part of z Imaginary part of z Imaginary part of z Zero Location 2 2 2 2 2 2 2 2 Figure 26: Frequency Response and Zero Locations of FIR Filters Designed by Frequency Sampling

OpenStax-CX module: m689 9 References [] T. W. Parks and C. S. Burrus. Digital Filter Design. John Wiley & Sons, ew York, 987. [2] L. M. Smith and B. W. Bomar. Least squares and related techniques. In Wai-Kai Chen, editor, The Circuits and Filters Handbook, chapter 82.2, page 256282;2572. CRC Press and IEEE Press, Boca Raton, 995.