Multirate Digital Signal Processing

Similar documents
Multirate signal processing

Quadrature-Mirror Filter Bank

Filter structures ELEC-E5410

Stability Condition in Terms of the Pole Locations

MULTIRATE SYSTEMS. work load, lower filter order, lower coefficient sensitivity and noise,

Basic Multi-rate Operations: Decimation and Interpolation

Digital Signal Processing Lecture 8 - Filter Design - IIR

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

ECSE 512 Digital Signal Processing I Fall 2010 FINAL EXAMINATION

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

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

1 1.27z z 2. 1 z H 2

Digital Signal Processing

Chapter 5 Frequency Domain Analysis of Systems

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

The basic structure of the L-channel QMF bank is shown below

Filter Analysis and Design

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

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

Introduction to Digital Signal Processing

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

Design of Coprime DFT Arrays and Filter Banks

Chapter 7: IIR Filter Design Techniques

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

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.

Filter Design Problem

UNIVERSITY OF OSLO. Please make sure that your copy of the problem set is complete before you attempt to answer anything.

Digital Signal Processing

ESE 531: Digital Signal Processing

R13 SET - 1

Analysis of Finite Wordlength Effects

Discrete-Time Signals: Time-Domain Representation

! Downsampling/Upsampling. ! Practical Interpolation. ! Non-integer Resampling. ! Multi-Rate Processing. " Interchanging Operations

Digital Signal Processing

Discrete-Time Signals: Time-Domain Representation

Chapter 5 Frequency Domain Analysis of Systems

DISCRETE-TIME SIGNAL PROCESSING

Digital Signal Processing IIR Filter Design via Bilinear Transform

ELEG 5173L Digital Signal Processing Ch. 5 Digital Filters

On the Frequency-Domain Properties of Savitzky-Golay Filters

ESE 531: Digital Signal Processing

Perfect Reconstruction Two- Channel FIR Filter Banks

Exercises in Digital Signal Processing

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

Digital Signal Processing

Discrete-Time David Johns and Ken Martin University of Toronto

Digital Signal Processing Lecture 10 - Discrete Fourier Transform

Responses of Digital Filters Chapter Intended Learning Outcomes:

The Discrete-Time Fourier

MULTIRATE DIGITAL SIGNAL PROCESSING

Homework: 4.50 & 4.51 of the attachment Tutorial Problems: 7.41, 7.44, 7.47, Signals & Systems Sampling P1

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

ELEG 305: Digital Signal Processing

4.1 Introduction. 2πδ ω (4.2) Applications of Fourier Representations to Mixed Signal Classes = (4.1)

Review of Discrete-Time System

Lecture 19 IIR Filters

DSP Algorithm Original PowerPoint slides prepared by S. K. Mitra

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

-Digital Signal Processing- FIR Filter Design. Lecture May-16

EE 521: Instrumentation and Measurements

Design of IIR filters

DIGITAL SIGNAL PROCESSING. Chapter 6 IIR Filter Design

Discrete-Time Signals & Systems

LAB 6: FIR Filter Design Summer 2011

EE482: Digital Signal Processing Applications

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

Image Acquisition and Sampling Theory

Review: Continuous Fourier Transform

Fourier Series Representation of

Z-Transform. 清大電機系林嘉文 Original PowerPoint slides prepared by S. K. Mitra 4-1-1

ELEN 4810 Midterm Exam

Periodic (Uniform) Sampling ELEC364 & ELEC442

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

6.003: Signals and Systems. Sampling and Quantization

Digital Speech Processing Lecture 10. Short-Time Fourier Analysis Methods - Filter Bank Design

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

Basic Design Approaches

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

Stationarity condition for. Fractional sampling filters

Lecture 7 Discrete Systems

Multi-rate Signal Processing 3. The Polyphase Representation

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

Digital Signal Processing. Midterm 1 Solution

ECE 301 Fall 2011 Division 1 Homework 10 Solutions. { 1, for 0.5 t 0.5 x(t) = 0, for 0.5 < t 1

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

Digital Filter Structures. Basic IIR Digital Filter Structures. of an LTI digital filter is given by the convolution sum or, by the linear constant

ECE-700 Review. Phil Schniter. January 5, x c (t)e jωt dt, x[n]z n, Denoting a transform pair by x[n] X(z), some useful properties are

Optimum Ordering and Pole-Zero Pairing. Optimum Ordering and Pole-Zero Pairing Consider the scaled cascade structure shown below

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science Discrete-Time Signal Processing Fall 2005

Multidimensional digital signal processing

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

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad

INF3440/INF4440. Design of digital filters

EE4-12 EE9-AO2 EE9-SC1 IMPERIAL COLLEGE LONDON DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING EXAMINATIONS 2013

Computer Engineering 4TL4: Digital Signal Processing

EECS 123 Digital Signal Processing University of California, Berkeley: Fall 2007 Gastpar November 7, Exam 2

Examples. 2-input, 1-output discrete-time systems: 1-input, 1-output discrete-time systems:

! Circular Convolution. " Linear convolution with circular convolution. ! Discrete Fourier Transform. " Linear convolution through circular

IB Paper 6: Signal and Data Analysis

Bridge between continuous time and discrete time signals

Transcription:

Multirate Digital Signal Processing Basic Sampling Rate Alteration Devices Up-sampler - Used to increase the sampling rate by an integer factor Down-sampler - Used to decrease the sampling rate by an integer factor 1

Up-Sampler Time-Domain Characterization An up-sampler with an up-sampling factor L, where L is a positive integer, develops an output sequence u n with a sampling rate that is L times larger than that of the input sequence n Block-diagram representation n L u n 2

Up-Sampler Up-sampling operation is implemented by inserting L 1 equidistant zero-valued samples between two consecutive samples of n Input-output relation u n = n / L, n =, ± L, ± 2L, L, otherwise 3

Up-Sampler 1 Figure below shows the up-sampling by a factor of 3 of a sinusoidal sequence with a frequency of.12 Hz obtained using Program 13_1 Input Sequence 1 Output sequence up-sampled by 3.5.5 Amplitude Amplitude -.5 -.5 4-1 1 2 3 4 5 Time inde n -1 1 2 3 4 5 Time inde n

Up-Sampler In practice, the zero-valued samples inserted by the up-sampler are replaced with appropriate nonzero values using some type of filtering process Process is called interpolation and will be discussed later 5

Down-Sampler Time-Domain Characterization An down-sampler with a down-sampling factor M, where M is a positive integer, develops an output sequence yn with a sampling rate that is (1/M)-th of that of the input sequence n Block-diagram representation n M yn 6

Down-Sampler Down-sampling operation is implemented by keeping every M-th sample of n and removing M 1 in-between samples to generate yn Input-output relation yn = nm 7

1 Down-Sampler Figure below shows the down-sampling by a factor of 3 of a sinusoidal sequence of frequency.42 Hz obtained using Program 13_2 Input Sequence 1 Output sequence down-sampled by 3.5.5 Amplitude Amplitude -.5 -.5 8-1 1 2 3 4 5 Time inde n -1 1 2 3 4 5 Time inde n

Basic Sampling Rate Alteration Devices Sampling periods have not been eplicitly shown in the block-diagram representations of the up-sampler and the down-sampler This is for simplicity and the fact that the mathematical theory of multirate systems can be understood without bringing the sampling period T or the sampling frequency F T into the picture 9

Down-Sampler Figure below shows eplicitly the inputoutput sampling rates of the down-sampler n = ( nt ) Input sampling frequency a 1 F T = T M y n = ( nmt ) a Output sampling frequency F ' FT M T = = 1 T ' 1

Up-Sampler Figure below shows eplicitly the inputoutput sampling rates of the up-sampler n = ( nt ) L yn a = = ± ± a ( nt / L), n, L, 2L, K otherwise 11 Input sampling frequency 1 F T = T Output sampling frequency 1 F ' T = LFT = T '

A Simple Multirate Structure n 1 z vn 2 2 v u n 1 z 2 2 + w n w u n yn The operation of the above multirate structure can be analyzed by writing down the relations between various signal variables, and the input as shown in the net slide 12

13 A Simple A Simple Multirate Multirate Structure Structure : : : : : : : : 7 6 5 4 3 2 1 1 6 4 2 1 7 5 3 1 1 8 6 4 2 15 13 11 9 7 5 3 1 1 16 14 12 1 8 6 4 2 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1 n y n v n w n v w n n v n n u u u 1 1 = + = n n w n v n y u u

Basic Sampling Rate Alteration Devices The up-sampler and the down-sampler are linear but time-varying discrete-time systems We illustrate the time-varying property of a down-sampler The time-varying property of an up-sampler can be proved in a similar manner 14

Basic Sampling Rate Alteration Devices 15 Consider a factor-of-m down-sampler defined by yn = nm Its output y 1 n for an input n = n is then given by y n = Mn = Mn 1 1 n 1 n From the input-output relation of the downsampler we obtain y n n = M ( n n) = Mn Mn y 1 n

Up-Sampler Frequency-Domain Characterization Consider first a factor-of-2 up-sampler whose input-output relation in the timedomain is given by n / 2, n =, ± 2, ± 4, K u n =, otherwise 16

Up-Sampler In terms of the z-transform, the input-output relation is then given by u n= n = X ( z) = n z n / 2 z u = n n even n = m= m z 2 m = X ( z 2 ) 17

Up-Sampler In a similar manner, we can show that for a factor-of-l up-sampler X u( z) = X ( z ) On the unit circle, for z = e jω, the inputoutput relation is given by X u ( e j ω ) = L X ( e jωl ) 18

Up-Sampler Figure below shows the relation between jω jω X ( e ) and X u ( e ) for L = 2 in the case of a typical sequence n 19

Up-Sampler As can be seen, a factor-of-2 sampling rate jω epansion leads to a compression of X ( e ) by a factor of 2 and a 2-fold repetition in the baseband, 2π This process is called imaging as we get an additional image of the input spectrum 2

Up-Sampler Similarly in the case of a factor-of-l sampling rate epansion, there will be L 1 additional images of the input spectrum in the baseband Lowpass filtering of u n removes the L 1 images and in effect fills in the zerovalued samples in u n with interpolated sample values 21

Up-Sampler Program 13_3 can be used to illustrate the frequency-domain properties of the upsampler shown below for L = 4 1 Input spectrum 1 Output spectrum.8.8 Magnitude.6.4 Magnitude.6.4.2.2.2.4.6.8 1 ω/π.2.4.6.8 1 ω/π 22

Down-Sampler 23 Frequency-Domain Characterization Applying the z-transform to the input-output relation of a factor-of-m down-sampler y n = Mn we get Y ( z) = Mn z n= n The epression on the right-hand side cannot be directly epressed in terms of X(z)

Down-Sampler 24 To get around this problem, define a new sequence int n : Then Y n = int n, n =, ± M, ± 2M, K, otherwise ( z) = Mn z int n= = int k= k z n = k / M n= = X int Mn z ( z 1/ M n )

Down-Sampler 25 Now, int n can be formally related to n through n = c n n where 1, n =, ± M, ± 2M, K c n =, otherwise A convenient representation of cn is given by 1 = M 1 kn c n W M M where int W M = e k= j2π / M

26 Down Down-Sampler Sampler Taking the z-transform of and making use of we arrive at int n n c n = = = 1 1 M k kn W M M n c n n M k kn M n n z n W M z n n c z X = = = = = ) int ( 1 1 ( ) = = = = = 1 1 1 1 M k k M M k n n kn M W z X M z W n M

Down-Sampler Consider a factor-of-2 down-sampler with an input n whose spectrum is as shown below 27 The DTFTs of the output and the input sequences of this down-sampler are then related as 1 Y ( e jω) = { X ( e jω/ 2) + X ( e jω/ 2)} 2

Down-Sampler ( jω / 2 = j( ω 2π) / 2 Now X e ) X ( e ) implying that the second term X ( e jω/ 2 ) in the previous equation is simply obtained by shifting the first term X ( e jω/ 2 ) to the right by an amount 2π as shown below 28

Down-Sampler The plots of the two terms have an overlap, and hence, in general, the original shape of X ( e jω ) is lost when n is downsampled as indicated below 29

Down-Sampler This overlap causes the aliasing that takes place due to under-sampling There is no overlap, i.e., no aliasing, only if X ( e jω ) = for ω π/ 2 Note: Y ( ω ) is indeed periodic with a period 2π, even though the stretched version of X ( e jω ) is periodic with a period 4π e j 3

Down-Sampler 31 For the general case, the relation between the DTFTs of the output and the input of a factor-of-m down-sampler is given by Y ( e ω 1 M 1 j ) = X ( e j ( ω 2πk ) / M ) M k= e j Y ( ω ) is a sum of M uniformly shifted and stretched versions of X ( e jω ) and scaled by a factor of 1/M

Down-Sampler Aliasing is absent if and only if X ( e j ) = for ω π/ M as shown below for M = 2 X ( ) = for ω π/ 2 e jω ω 32

Down-Sampler Program 13_4 can be used to illustrate the frequency-domain properties of the downsampler shown below for M = 2 1 Input spectrum.5 Output spectrum.8.4 Magnitude.6.4 Magnitude.3.2.2.1.2.4.6.8 1 ω/π.2.4.6.8 1 ω/π 33

Down-Sampler The input and output spectra of a downsampler with M = 3 obtained using Program 13_4 are shown below 1 Input spectrum.5 Output spectrum.8.4 Magnitude.6.4 Magnitude.3.2.2.1 34.2.4.6.8 1 ω/π.2.4.6.8 1 ω/π Effect of aliasing can be clearly seen

Cascade Equivalences A comple multirate system is formed by an interconnection of the up-sampler, the down-sampler, and the components of an LTI digital filter In many applications these devices appear in a cascade form An interchange of the positions of the branches in a cascade often can lead to a computationally efficient realization 35

Up-Sampler and Down-sampler Cascade To implement a fractional change in the sampling rate we need to employ a cascade of an up-sampler and a down-sampler Consider the two cascade connections shown below v 1 n n L M y 1 n v n M 2 n L y 2 n 36

Up-Sampler and Down-sampler Cascade Consider the top cascade shown in the previous slide Here, we have V 1( z) = X ( z ) and 1 M / ( ) 1 1 k Y1 z = V ( z M W M ) M k= Combining the last two equations we get Y 1 ( z) = 1 M 1 k= M X ( z L L / M W kl M ) 37

38 Up-Sampler and Down-sampler Cascade We net consider the bottom cascade shown in Slide 36 Here, we have V 2 ( z) = 1 M 1 k= L M X ( z 1/ M k W M and Y2 ( z) = V2( z ) Combining the last two equations we get Y 2 ( z) = 1 M 1 k= M X ( z L / M W k M ) )

39 Up-Sampler and Down-sampler Cascade It follows from the above that if 1 M / 1 L M kl 1 M ( ) = 1 X z W M M k= M k= ( z) Y ( z) Y1 = 2 X ( z L / M The above equality holds if and only if M and L are relatively prime, i.e. M and L do not have a common factor that is an integer k r > 1, as then WM and WM kl take the same set of values for k =, 1, K, M 1 W k M )

Noble Identities Two other cascade equivalences are shown below Cascade equivalence #1 n M H (z) y n 1 Cascade equivalence #2 n H ( z M ) M y n 1 n L H( z L ) y n 2 4 n H (z) L y n 2

Multirate Structures for Sampling Rate Conversion Sampling Rate Conversion From the sampling theorem it is known that a the sampling rate of a critically sampled discrete-time signal with a spectrum occupying the full Nyquist range cannot be reduced any further since such a reduction will introduce aliasing Hence, the bandwidth of a critically sampled signal must be reduced by lowpass filtering before its sampling rate is reduced by a down-sampler 41

Multirate Structures for Sampling Rate Conversion Likewise, the zero-valued samples introduced by an up-sampler must be interpolated to more appropriate values for an effective sampling rate increase We shall show shortly that this interpolation can be achieved simply by digital lowpass filtering 42

Multirate Structures for Sampling Rate Conversion Since a fractional-rate sampling rate converter with a rational conversion factor can be realized by cascading an interpolator with a decimator, filters are also neede in the design of such multirate systems 43

Basic Structures Since up-sampling by an integer factor L causes periodic repetition of the basic spectrum, the basic interpolator structure for integer-valued sampling rate increase consists of an up-sampler followed by a low-pass filter H (z) with a cutoff at π/ L as indicated below: u n n L H(z) yn 44

Basic Structures The lowpass filter H (z), called the interpolation filter, removes the unwanted images in the spectra of the up-sampled signal u n On the other hand, down-sampling by an integer factor M may result in aliasing 45

Basic Structures Hence, the basic decimator structure for integer-valued sampling rate decrease consists of a lowpss filter H (z) with a cutoff at π/m, followed by the down-sampler as shown below n H (z) M yn 46

Basic Structures Here, the lowpass filter H (z), called the decimation filter, bandlimits the input signal n to ω < π/ M prior to down-sampling, to ensure no aliasing It can be shown that the transpose of a factor-of-m decimator is a factor-of-m interpolator 47

Basic Structures A fractional change in the sampling rate by a rational factor L/M can be achieved by cascading a factor-of-l interpolator with a factor-of-m decimator The interpolator must precede the decimator as shown below to ensure that the baseband of wn is greater than or equal to that of n or yn wn n L H u (z) H d (z) M yn 48

Basic Structures As both the interpolation filter H u (z) and the decimation filter H d (z) operate at the same sampling rate, they can be replaced with a single filter designed to avoid aliasing that may be caused by downsampling and eliminate images resulting from up-sampling n L H (z) M yn 49

Input-Output Relation of the Decimator For the decimator structure shown below, let hn denote the impulse response of the decimation filter H(z) Then and n H(z) v n M yn v n = h n l l l= y n = v Mn 5

Input-Output Relation of the Decimator Combining the last two equations we arrive at the desired input-output relation of the decimator given by y n = h Mn l l l= In the z-domain, the input-output relation of the decimation filter is given by V ( z) = H ( z) X ( z) 51

Input-Output Relation of the Decimator 52 Now the input-output relation of the dowmsampler is given by 1 M k= 1 1/ M k W M Y ( z) = V ( z ) M Combining the last two equations we arrive at the input-output relation of the decimator as 1 M 1 1/ M k 1/ M k Y ( z) = H ( z WM ) X ( z WM ) M k=

Input-Output Relation of the Interpolator 53 For the interpolator structure shown below, let hn denote the impulse response of the decimation filter H(z) Then and u u n n L H(z) yn y n = h n l= u l l Lm = m, m =, ± 1, ± 2,K

Input-Output Relation of the Interpolator Combining the last two equations and making a change of a variable, we arrive at the desired time-domain input-output relation of the interpolator as 54 y n = h n Lm m m= In the z-domain, the input-output relation of the interpolator is thus given by L Y ( z) = H ( z) X ( z )

Input-Output Relation of the Fractional-Rate Converter Here, in the time-domain the inout-output relation is given by y n = h Mn Lm m m= In the z-domain it is given by Y ( z) = 1 M M 1 k= H ( z 1/ M k L / M kl WM ) X ( z WM ) 55

Interpolation Filter Specifications 56 Assume n has been obtained by sampling a continuous-time signal a (t) at the Nyquist rate jω If X a ( jω) and X ( e ) denote the Fourier transforms of a (t) and n, respectively, then it can be shown ω jω j πk X e j 1 ( ) = X 2 a To k= T o where is the sampling period T o

57 Interpolation Filter Specifications Since the sampling is being performed at the Nyquist rate, there is no overlap between the shifted spectras of X ( jω/ To ) If we instead sample a (t) at a much higher rate T = To / L yielding yn, its Fourier jω transform Y ( e ) is related to X a ( jω) through Y ( e jω ) = 1 T k= X a jω j2πk T = L T o k= X a jω j2πk T / L o

Interpolation Filter Specifications 58 On the other hand, if we pass n through a factor-of-l up-sampler generating u n, the relation between the Fourier transforms of n and u n are given by j j L Xu ( e ω ω ) = X ( e ) It therefore follows that if u n is passed through an ideal lowpass filter H(z) with a cutoff at π/l and a gain of L, the output of the filter will be precisely yn

Interpolation Filter Specifications In practice, a transition band is provided to ensure the realizability and stability of the lowpass interpolation filter H(z) Hence, the desired lowpass filter should have a stopband edge at ωs = π/ L and a passband edge ω p close to ω s to reduce the distortion of the spectrum of n 59

Interpolation Filter Specifications 6 ω c If is the highest frequency that needs to be preserved in n, then ω = ω L p c / Summarizing the specifications of the lowpass interpolation filter are thus given by jω L, ω ω L H e = c / ( ), π/ L ω π

Decimation Filter Specifications In a similar manner, we can develop the specifications for the lowpass decimation filter that are given by H ( e jω ) = 1,, ω ω π/ M / M ω π c 61

Filter Design Methods The design of the filter H(z) is a standard IIR or FIR lowpass filter design problem Any one of the techniques outlined in Chapter 7 can be applied for the design of these lowpass filters 62

Filters for Fractional Sampling Rate Alteration For the fractional sampling rate structure shown below, the lowpass filter H(z) has a stopband edge frequency given by π ω s = min, L π M L H(z) M 63

Computational Requirements The lowpass decimation or interpolation filter can be designed either as an FIR or an IIR digital filter In the case of single-rate digital signal processing, IIR digital filters are, in general, computationally more efficient than equivalent FIR digital filters, and are therefore preferred where computational cost needs to be minimized 64

Computational Requirements 65 This issue is not quite the same in the case of multirate digital signal processing To illustrate this point further, consider the factor-of-m decimator shown below vn n H (z) M yn If the decimation filter H(z) is an FIR filter of length N implemented in a direct form, then N 1 v n = h m n m m=

Computational Requirements Now, the down-sampler keeps only every M-th sample of vn at its output Hence, it is sufficient to compute vn only for values of n that are multiples of M and skip the computations of in-between samples This leads to a factor of M savings in the computational compleity 66

67 Computational Requirements Computational Requirements Now assume H(z) to be an IIR filter of order K with a transfer function where ) ( ) ( ) ( ) ( ) ( z D z P z H z X z V = = n K n p n z z P = = ) ( n K n d n z z D = + = 1 1 ) (

Computational Requirements Its direct form implementation is given by w n = d w n d w 2 L 1 1 2 n d K w n K + n v n = p w n + p w n 1 + L+ pk w n K 1 Since vn is being down-sampled, it is sufficient to compute vn only for values of n that are integer multiples of M 68

Computational Requirements 69 However, the intermediate signal wn must be computed for all values of n For eample, in the computation of v M = p w M + p w M 1 + L+ pk w M K 1 K+1 successive values of wn are still required As a result, the savings in the computation in this case is going to be less than a factor of M

Computational Requirements Eample-We compare the computational compleity of various implementations of a factor-of-m decimator Let the sampling frequency be Then the number of multiplications per second, to be denoted as R M, are as follows for various computational schemes F T 7

Computational Requirements 71 FIR H(z) of length N : R M, FIR = N FIR H(z) of length N followed by a downsampler: R = N F M IIR H(z) of order K followed by a downsampler : R = K F + ( K + ) F / M F M, FIR DEC T / IIR H(z) of order K: R = ( 2K + ) F M, IIR 1 M, IIR DEC T 1 T T T

Computational Requirements In the FIR case, savings in computations is by a factor of M In the IIR case, savings in computations is by a factor of M(2K+1)/(M+1)K+1, which is not significant for large K ForM = 1 and K = 9, the savings is only by a factor of 1.9 There are certain cases where the IIR filter can be computationally more efficient 72

Computational Requirements 73 For the case of interpolator design, very similar arguments hold If H(z) is an FIR interpolation filter, then the computational savings is by a factor of L (since vn has L 1 zeros between its consecutive nonzero samples) On the other hand, computational savings is significantly less with IIR filters

Sampling Rate Alteration Using MATLAB The function decimate can be employed to reduce the sampling rate of an input signal vector by an integer factor M to generate the output signal vector y The decimation of a sequence by a factor of M can be obtained using Program 1_5 which employs the function decimate 74

Sampling Rate Alteration Using MATLAB Eample- The input and output plots of a factor-of-2 decimator designed using the Program 13_5 are shown below 2 Input sequence 2 Output sequence 1 1 Amplitude -1 Amplitude -1 75-2 2 4 6 8 1 Time inde n -2 1 2 3 4 5 Time inde n

Sampling Rate Alteration Using MATLAB The function interp can be employed to increase the sampling rate of an input signal by an integer factor L generating the output vector y The lowpass filter designed by the M-file is a symmetric FIR filter 76

Sampling Rate Alteration Using MATLAB 77 The filter allows the original input samples to appear as is in the output and finds the missing samples by minimizing the meansquare errors between these samples and their ideal values The interpolation of a sequence by a factor of L can be obtained using the Program 13_6 which employs the function interp

Sampling Rate Alteration Using MATLAB Eample- The input and output plots of a factor-of-2 interpolator designed using Program 13_6 are shown below 2 Input sequence 2 Output sequence 1 1 Amplitude -1 Amplitude -1 78-2 1 2 3 4 5 Time inde n -2 2 4 6 8 1 Time inde n

Sampling Rate Alteration Using MATLAB 79 The function resample can be employed to increase the sampling rate of an input vector by a ratio of two positive integers, L/M, generating an output vector y The M-file employs a lowpass FIR filter designed using fir1 with a Kaiser window The fractional interpolation of a sequence can be obtained using Program 13_7 which employs the function resample

Sampling Rate Alteration Using MATLAB Eample- The input and output plots of a factor-of-5/3 interpolator designed using Program 13_7 are given below 2 Input sequence 2 Output sequence 1 1 Amplitude -1 Amplitude -1 8-2 1 2 3 Time inde n -2 1 2 3 4 5 Time inde n

Multistage Design of Decimator and Interpolator The interpolator and the decimator can also be designed in more than one stages For eample if the interpolation factor L can be epressed as a product of two integers, L 1 and L 2, then the factor-of-l interpolator can be realized in two stages as shown below n L 1 H 1 (z) L 2 H 2 (z) yn 81

Multistage Design of Decimator and Interpolator Likewise if the decimator factor M can be epressed as a product of two integers, and M 2, then the factor-of-m interpolator can be realized in two stages as shown below M 1 n H 1 (z) M 1 H 2 (z) M 2 yn 82

Multistage Design of Decimator and Interpolator Of course, the design can involve more than two stages, depending on the number of factors used to epress L and M, respectively In general, the computational efficiency is improved significantly by designing the sampling rate alteration system as a cascade of several stages We consider the use of FIR filters here 83

Multistage Design of Decimator and Interpolator Eample- Consider the design of a decimator for reducing the sampling rate of a signal from 12 khz to 4 Hz The desired down-sampling factor is therefore M = 3 as shown below 84

Multistage Design of Decimator and Interpolator Specifications for the decimation filter H(z) are assumed to be as follows: Fp =18Hz, F s = 2Hz, δ =.2, =. 1 p δ s 85

Multistage Design of Decimator and Interpolator Assume H(z) to be designed as an equiripple linear-phase FIR filter Now Kaiser s formula for estimating the order of H(z) to meet the specifications is given by 2log p s 13 N = 1 δ δ 14. 6 f where f = ( Fs Fp) / FT is the normalized transition bandwidth 86

Multistage Design of Decimator and Interpolator 87 The M-file kaiord determines the filter order using Kaiser s formula Using kaiord we obtain N = 188 Therefore, the number of multiplications per second in the single-stage implementation of the factor-of-3 decimator is 12, R M, H = 189 = 723, 6 3

Multistage Design of Decimator and Interpolator We net implement H(z) using the IFIR approach as a cascade in the form of G( z 15 ) F( z) ( z 15 ) G F(z) 3 12 khz 12 khz 12 khz 4 Hz 88 The specifications of the parent filter G(z) should thus be as shown on the right

Multistage Design of Decimator and Interpolator This corresponds to stretching the specifications of H(z) by 15 Figure below shows the magnitude response of G( z 15 ) and the desired response of F(z) 89

Multistage Design of Decimator and Interpolator Note:The desired response of F(z) has a wider transition band as it takes into account the spectral gaps between the passbands of G( z 15 ) Because of the cascade connection, the overall ripple of the cascade in db is given by the sum of the passband ripples of F(z) and G( z 15 ) in db 9

Multistage Design of Decimator and Interpolator This can be compensated for by designing F(z) and G(z) to have a passband ripple of =.1 each δ p On the other hand, the cascade of F(z) and G( z 15 ) has a stopband at least as good as F(z) or G( z 15 ), individually So we can choose =.1 for both filters δ s 91

Multistage Design of Decimator and Interpolator Thus, specifications for the two filters G(z) and F(z) are as follows: G(z): F(z): δ δ p p = =.1, δ =.1, f = s.1, δ =.1, f = s 3 12, 42 12, 92 The filter orders obtained using the M-file kaiord are: Order of G(z) =129 Order of F(z) = 92

Multistage Design of Decimator and Interpolator The length of H(z) for a direct implementation is 189 The length of cascade implementation G( z 15 ) F( z) is 92 + 15 129 + 1 = 228 The length of the cascade structure is higher 93

Multistage Design of Decimator and Interpolator The computational compleity of the decimator implemented using the cascade structure can be dramatically reduced by making use of the cascade equivalence #1 To this end, we first redraw the structure G ( z 15 ) F(z) 3 in the form shown below 94 F(z) G( z 15 ) 3

Multistage Design of Decimator and Interpolator The last structure is equivalent to the one shown below F(z) G( z 15 ) 15 2 The above can be redrawn as indicated below by making use of the cascade equivalence #1 F(z) 15 G(z) 2 12 khz 12 khz 8 Hz 8 Hz 4 Hz 95 Factor-of-15 decimator Factor-of-2 decimator

Multistage Design of Decimator and Interpolator From the last realization we observe that the implementation of G(z) followed by a factor-of-2 down-sampler requires 8 2 mult/sec R M, G = 13 = 52, Likewise, the implementation of F(z) followed by a factor-of-15 down-sampler requires R M 12, 15, F = 93 = 74,4 mult/sec 96

Multistage Design of Decimator and Interpolator The total compleity of the IFIR-based implementation of the factor-of-3 decimator is therefore 52, + 74,4 = 126,4 mult/sec which is about 5.72 times smaller than that of a direct implementation of the decimation filter H(z) 97