Multirate DSP, part 1: Upsampling and downsampling

Similar documents
Multirate DSP, part 3: ADC oversampling

Multirate Digital Signal Processing

Multirate Filtering, Resampling Filters, Polyphase Filters. or how to make efficient FIR filters

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems.

Optimal Design RRC Pulse Shape Polyphase FIR Decimation Filter for Multi-Standard Wireless Transceivers

Chapter 9. Chapter 9 275

Interpolated Lowpass FIR Filters

Electrical & Computer Engineering Technology

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

Digital Processing of Continuous-Time Signals

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

Digital Processing of

Islamic University of Gaza. Faculty of Engineering Electrical Engineering Department Spring-2011

Chapter 2: Digitization of Sound

Design Of Multirate Linear Phase Decimation Filters For Oversampling Adcs

MULTIRATE DIGITAL SIGNAL PROCESSING

ECE 429 / 529 Digital Signal Processing

SAMPLING AND RECONSTRUCTING SIGNALS

F I R Filter (Finite Impulse Response)

Lecture 3 Review of Signals and Systems: Part 2. EE4900/EE6720 Digital Communications

Sampling and Reconstruction of Analog Signals

Team proposals are due tomorrow at 6PM Homework 4 is due next thur. Proposal presentations are next mon in 1311EECS.

ECE 6560 Multirate Signal Processing Chapter 13

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

Concordia University. Discrete-Time Signal Processing. Lab Manual (ELEC442) Dr. Wei-Ping Zhu

! Multi-Rate Filter Banks (con t) ! Data Converters. " Anti-aliasing " ADC. " Practical DAC. ! Noise Shaping

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

Design and Implementation of Efficient FIR Filter Structures using Xilinx System Generator

arxiv: v1 [cs.it] 9 Mar 2016

1. Find the magnitude and phase response of an FIR filter represented by the difference equation y(n)= 0.5 x(n) x(n-1)

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

Mitch Gollub Jay Nadkarni Digant Patel Sheldon Wong 5/6/14 Capstone Design Project: Final Report Multirate Filter Design

Digital Signal Processing

Discrete-Time Signal Processing (DTSP) v14

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

H 1 (z)= 0.1. X(z)= (1 0.5z 1 )(1 + 2z 1 ) H 1 (z)+h 2 (z)= 1. H 1 (ω) 2 + H 2 (ω) 2 = 1. y(n)= A + B( 1) n. 4. Consider the two filters:

Noise removal example. Today s topic. Digital Signal Processing. Lecture 3. Application Specific Integrated Circuits for

BEHAVIORAL MODELING FOR SAMPLING RECEIVER AND BASEBAND IN SOFTWARE-DEFINED RADIO SERGI ORRIT PRAT

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

Module 9: Multirate Digital Signal Processing Prof. Eliathamby Ambikairajah Dr. Tharmarajah Thiruvaran School of Electrical Engineering &

Multirate Signal Processing Lecture 7, Sampling Gerald Schuller, TU Ilmenau

ESE 531: Digital Signal Processing

Convention Paper 8648

Window Method. designates the window function. Commonly used window functions in FIR filters. are: 1. Rectangular Window:

ECE 5650/4650 Exam II November 20, 2018 Name:

Moving from continuous- to discrete-time

Two-Dimensional Wavelets with Complementary Filter Banks

Discrete Fourier Transform (DFT)

GEORGIA INSTITUTE OF TECHNOLOGY. SCHOOL of ELECTRICAL and COMPUTER ENGINEERING. ECE 2026 Summer 2018 Lab #8: Filter Design of FIR Filters

Copyright S. K. Mitra

ELT Receiver Architectures and Signal Processing Fall Mandatory homework exercises

CMPT 318: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

Continuous vs. Discrete signals. Sampling. Analog to Digital Conversion. CMPT 368: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

EE 230 Lecture 39. Data Converters. Time and Amplitude Quantization

Discretization of Continuous Controllers

!"!#"#$% Lecture 2: Media Creation. Some materials taken from Prof. Yao Wang s slides RECAP

Experiment 4- Finite Impulse Response Filters

ESE 531: Digital Signal Processing

Sampling of Continuous-Time Signals. Reference chapter 4 in Oppenheim and Schafer.

LOW SAMPLING RATE OPERATION FOR BURR-BROWN

Music 270a: Fundamentals of Digital Audio and Discrete-Time Signals

Analog Lowpass Filter Specifications

DIGITAL SIGNAL PROCESSING. Chapter 1 Introduction to Discrete-Time Signals & Sampling

Module 3 : Sampling and Reconstruction Problem Set 3

Implementation of CIC filter for DUC/DDC

ESE 531: Digital Signal Processing

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

EEM478-WEEK8 Finite Impulse Response (FIR) Filters

Implementation of Decimation Filter for Hearing Aid Application

Final Exam Practice Questions for Music 421, with Solutions

4. Design of Discrete-Time Filters

SMS045 - DSP Systems in Practice. Lab 1 - Filter Design and Evaluation in MATLAB Due date: Thursday Nov 13, 2003

CG401 Advanced Signal Processing. Dr Stuart Lawson Room A330 Tel: January 2003

Sampling and Signal Processing

Summary Last Lecture

Lecture Outline. ESE 531: Digital Signal Processing. Anti-Aliasing Filter with ADC ADC. Oversampled ADC. Oversampled ADC

Signals. Continuous valued or discrete valued Can the signal take any value or only discrete values?

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

EDISP (English) Digital Signal Processing

Analysis on Multichannel Filter Banks-Based Tree-Structured Design for Communication System

Multirate Signal Processing

ESE 531: Digital Signal Processing

Experiment 6: Multirate Signal Processing

The Case for Oversampling

Infinite Impulse Response (IIR) Filter. Ikhwannul Kholis, ST., MT. Universitas 17 Agustus 1945 Jakarta

An Efficient and Flexible Structure for Decimation and Sample Rate Adaptation in Software Radio Receivers

ECE 6560 Multirate Signal Processing Analysis & Synthesis Notes

Final Exam Solutions June 14, 2006

Design of Cost Effective Custom Filter

Multirate Signal Processing

All-Digital Aggregator for Multi-Standard Video Distribution

Interpolation Filters for the GNURadio+USRP2 Platform

Signal processing preliminaries

y(n)= Aa n u(n)+bu(n) b m sin(2πmt)= b 1 sin(2πt)+b 2 sin(4πt)+b 3 sin(6πt)+ m=1 x(t)= x = 2 ( b b b b

Lab 4 Digital Scope and Spectrum Analyzer

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY DIGITAL SIGNAL PROCESSING UNIT 3

ece 429/529 digital signal processing robin n. strickland ece dept, university of arizona ECE 429/529 RNS

Design Digital Non-Recursive FIR Filter by Using Exponential Window

Optimal FIR filters Analysis using Matlab

Design and Simulation of Two Channel QMF Filter Bank using Equiripple Technique.

Transcription:

Multirate DSP, part 1: Upsampling and downsampling Li Tan - April 21, 2008 Order this book today at www.elsevierdirect.com or by calling 1-800-545-2522 and receive an additional 20% discount. Use promotion code 92562 when ordering. Offer expires 06/30/2008. Valid only in North America. Part 2 shows how to change the sampling rate by a non-integer factor. It also looks at multistage decimation and polyphase filters. It will be published Monday, April 28. This chapter investigates basics of multirate digital signal processing, illustrates how to change a sampling rate for speech and audio signals, and describes the polyphase implementation for the decimation filter and interpolation filter. Next, the chapter introduces the advanced analog-to-digital conversion system with the oversampling technique and sigma-delta modulation. Finally, the chapter explores the principles of undersampling of bandpass signals. 12.1 Multirate Digital Signal Processing Basics In many areas of digital signal processing (DSP) applications such as communications, speech, and audio processing rising or lowering of a sampling rate is required. The principle that deals with changing the sampling rate belongs essentially to multirate signal processing (Ifeachor and Jervis, 2002; Porat, 1997; Proakis and Manolakis, 1996; Sorensen and Chen, 1997). As an introduction, we will focus on sampling rate conversion; that is, sampling rate reduction or increase. 12.1.1 Sampling Rate Reduction by an Integer Factor The process of reducing a sampling rate by an integer factor is referred to as downsampling of a data sequence.we also refer to downsampling as ''decimation'' (not taking one of ten). The term ''decimation'' used for the downsampling process has been accepted and used in many textbooks and fields. To downsample a data sequence x(n) by an integer factor of M, we use the following notation: y(m) = x(mm), (12.1) where y(m) is the downsampled sequence, obtained by taking a sample from the data sequence x(n) for every M samples (discarding M 1 samples for every M samples). As an example, if the original sequence with a sampling period T = 0.1 second (sampling rate = 10 samples per sec) is given by x(n):8 7 4 8 9 6 4 2 2 5 7 7 6 4 and we downsample the data sequence by a factor of 3, we obtain the downsampled sequence as

y(m):8 8 4 5 6, with the resultant sampling period T = 3 0.1 = 0.3 second (the sampling rate now is 3.33 samples per second). Although the example is straightforward, there is a requirement to avoid aliasing noise. We will illustrate this next. From the Nyquist sampling theorem, it is known that aliasing can occur in the downsampled signal due to the reduced sampling rate. After downsampling by a factor of M, the new sampling period becomes MT, and therefore the new sampling frequency is f sm = 1/(MT) = f s /M, (12.2) where f s is the original sampling rate. Hence, the folding frequency after downsampling becomes f sm /2 = f s /(2M). (12.3) This tells us that after downsampling by a factor of M, the new folding frequency will be decreased M times. If the signal to be downsampled has frequency components larger than the new folding frequency, f > f s /(2M), aliasing noise will be introduced into the downsampled data. To overcome this problem, it is required that the original signal x(n) be processed by a lowpass filter H(z) before downsampling, which should have a stop frequency edge at f s /(2M) (Hz). The corresponding normalized stop frequency edge is then converted to be Ω stop = 2π (f s /(2M)) T = π/m radians. (12.4) In this way, before downsampling, we can guarantee that the maximum frequency of the filtered signal satisfies f max < f s /(2M), (12.5) such that no aliasing noise is introduced after downsampling. A general block diagram of decimation is given in Figure 12-1, where the filtered output in terms of the z-transform can be written as W(z) = H(z)X(z), (12.6) where X(z) is the z-transform of the sequence to be decimated, x(n), and H(z) is the lowpass filter transfer function. After anti-aliasing filtering, the downsampled signal y(m) takes its value from the filter output as: y(m) = w(mm). (12.7) The process of reducing the sampling rate by a factor of 3 is shown in Figure 12-1. The corresponding spectral plots for x(n), w(n), and y(m) in general are shown in Figure 12-2.

Figure 12-1. Block diagram of the downsampling process with M = 3: Figure 12-2. Spectrum after downsampling. Downsampling example To verify this principle, let us consider a signal x(n) generated by the following: x(n) = 5 sin ((2π 1000n)/8000) + cos ((2π 2500n)/8000), (12.8)

with a sampling rate of f s = 8,000 Hz, the spectrum of x(n) is plotted in the first graph in Figure 12-3a, where we observe that the signal has components at frequencies of 1,000 and 2,500 Hz. Now we downsample x(n) by a factor of 2, that is, M = 2. According to Equation (12.3), we know that the new folding frequency is 4000/2 = 2000 Hz. Hence, without using the anti-aliasing lowpass filter, the spectrum would contain the aliasing frequency of 4 khz 2.5 khz = 1.5 khz introduced by 2.5 khz, plotted in the second graph in Figure 12-3a. Figure 12-3A. Spectrum before downsampling and spectrum after downsampling without using the anti-aliasing filter. Now we apply a finite impulse response (FIR) lowpass filter designed with a filter length of N = 27 and a cutoff frequency of 1.5 khz to remove the 2.5-kHz signal before downsampling to avoid aliasing. How to obtain such specifications will be discussed in a later example. The normalized cutoff frequency used for design is given by Ω c = 2π 1500 (1/8000) = 0.375π. Thus, the aliasing noise is avoided. The spectral plots are given in Figure 12-3b, where the first plot shows the spectrum of w(n) after anti-aliasing filtering, while the second plot describes the spectrum of y(m) after downsampling. Clearly, we prevent aliasing noise in the downsampled data by sacrificing the original 2.5-kHz signal. Program 12-1 gives the detail of MATLAB implementation.

Figure 12-3B. Spectrum before downsampling and spectrum after downsampling using the antialiasing filter. (Click to enlarge)

Program 12-1. MATLAB program for decimation. Now we focus on how to design the anti-aliasing FIR filter, or decimation filter. We will discuss this topic via the following example. Example 12.1. Given a DSP downsampling system with the following specifications, determine the FIR filter length, cutoff frequency, and window type if the window method is used: Sampling rate = 6,000 Hz Input audio frequency range = 0 800 Hz Passband ripple = 0.02 db Stopband attenuation = 50 db Downsample factor M = 3, Solution: Specifications are reorganized as: Anti-aliasing filter operating at the sampling rate = 6000 Hz Passband frequency range = 0 800 Hz Stopband frequency range = 1 3 khz Passband ripple = 0.02 db Stopband attenuation = 50 db Filter type = FIR. The block diagram and specifications are depicted in Figure 12-4. Figure 12-4. Filter specifications for Example 12.1. The Hamming window is selected, since it provides 0.019 db ripple and 53 db stopband attenuation. The normalized transition band is given by Δf = (f stop f pass )/f s = (1000 800)/6000 = 0.033. The length of the filter and the cutoff frequency can be determined by N = 3.3/Δf = 3.3/0.033 = 100. We choose the odd number, that is, N = 101, and f c = (f pass + f stop )/2 = (800 + 1000)/2 = 900 Hz. Sampling Rate Increase by an Integer Factor 12.1.2 Sampling Rate Increase by an Integer Factor

Increasing a sampling rate is a process of upsampling by an integer factor of L. This process is described as follows: y(m) = { x(m/l) m = nl, 0 otherwise, (12.9) where n = 0, 1, 2,, x(n) is the sequence to be upsampled by a factor of L, and y(m) is the upsampled sequence. As an example, suppose that the data sequence is given as follows: x(n):8 8 4 5 6 After upsampling the data sequence x(n) by a factor of 3 (adding L 1 zeros for each sample), we have the upsampled data sequence w(m) as: w(m): 8 0 0 8 0 0 4 0 0 5 0 0 6 0 0 The next step is to smooth the upsampled data sequence via an interpolation filter. The process is illustrated in Figure 12-5a. Figure 12-5A. Block diagram for the upsampling process with L = 3. Similar to the downsampling case, assuming that the data sequence has the current sampling period of T, the Nyquist frequency is given by f max = f s /2. After upsampling by a factor of L, the new sampling period becomes T/L, thus the new sampling frequency is changed to be f sl = Lf s. (12.10) This indicates that after upsampling, the spectral replicas originally centered at f s, 2f s, are included in the frequency range from 0 Hz to the new Nyquist limit Lf s =2 Hz, as shown in Figure 12-5b. To remove those included spectral replicas, an interpolation filter with a stop frequency edge of f s =2 in Hz must be attached, and the normalized stop frequency edge is given by

Ω stop = 2π (f s /2) (T/L) = π/l radians. (12.11) Figure 12-5B. Spectra before and after upsampling. After filtering via the interpolation filter, we will achieve the desired spectrum for y(n), as shown in Figure 12-5b. Note that since the interpolation is to remove the high-frequency images that are aliased by the upsampling operation, it is essentially an anti-aliasing lowpass filter. Upsampling example To verify the upsampling principle, we generate the signal x(n) with 1 khz and 2.5 khz as follows: x(n) = 5 sin ((2π 1000n)/8000) + cos ((2π 2500n)/8000), with a sampling rate of f s = 8,000 Hz. The spectrum of x(n) is plotted in Figure 12-6. Now we upsample x(n) by a factor of 3, that is, L = 3. We know that the sampling rate is increased to be 3 8000 = 24,000 Hz. Hence, without using the interpolation filter, the spectrum would contain the image frequencies originally centered at the multiple frequencies of 8 khz. The top plot in Figure 12-6 shows the spectrum for the sequence after upsampling and before applying the interpolation filter.

Figure 12-6. (Top) The spectrum after upsampling and before applying the nterpolation filter; (bottom) the spectrum after applying the nterpolation filter. Now we apply an FIR lowpass filter designed with a length of 53, a cutoff frequency of 3,250 Hz, and a new sampling rate of 24,000 Hz as the interpolation filter, whose normalized frequency should be Ω c = 2π 3250 (1/24000) = 0.2708π. The bottom plot in Figure 12-6 shows the spectrum for y(m) after applying the interpolation filter, where only the original signals with frequencies of 1 khz and 2.5 khz are presented. Program 12-2 shows the implementation detail in MATLAB. Now let us study how to design the interpolation filter via Example 12.2.

(Click to enlarge) Program 12-2. MATLAB program for interpolation. Example 12.2. Given a DSP upsampling system with the following specifications, determine the FIR filter length, cutoff frequency, and window type if the window design method is used: Sampling rate = 6,000 Hz Input audio frequency range = 0 800 Hz Passband ripple = 0.02 db Stopband attenuation = 50 db Upsample factor L = 3 Solution: The specifications are reorganized as follows: Interpolation filter operating at the sampling rate = 18,000 Hz Passband frequency range = 0 800 Hz Stopband frequency range = 3 9 khz Passband ripple = 0.02 db Stopband attenuation = 50 db Filter type = FIR. The block diagram and filter frequency specifications are given in Figure 12-7.

Figure 12-7. Filter frequency specifications for Example 12.2. We choose the Hamming window for this application. The normalized transition band is Δf = (f stop f pass )/f sl = (3000 800)/18000 = 0.1222. The length of the filter and the cutoff frequency can be determined by N = 3.3/Δf = 3.3/0.1222 = 27, and the cutoff frequency is given by f c = (f pass + f stop )/2 = (3000 + 800)/2 = 1900 Hz. Part 2 shows how to change the sampling rate by a non-integer factor. It also looks at multistage decimation and polyphase filters. It will be published Monday, April 28. Related articles Design: Basics of ADCs and DACs, part 1 Design: Comment: What is a DSP engineer? Paper: Q5 Upsampling / Sample Rate Conversion Technology Printed with permission form Academic Press, a division of Elsevier. Copyright 2007. "Digital Signal Processing, Fundamentals and Applications" by Li Tan. For more information about this title and other similar books, please visit www.elsevierdirect.com.