Design Article

Multirate DSP, part 2: Noninteger sampling factors

Li Tan

4/28/2008 3:00 AM EDT

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 1 explains how to upsample and downsample by an integer factor. Part 3 looks at oversampling in analog-to-digital converters. It applies these principles to a sigma-delta ADC and revisits the CD player case study.


12.1.3 Changing Sampling Rate by a Non-Integer Factor L/M
With an understanding of the downsampling and upsampling processes, we now study the sampling rate conversion by a non-integer factor of L/M. This can be viewed as two sampling conversion processes. In step 1, we perform the upsampling process by a factor of integer L following application of an interpolation filter H1(z); in step 2, we continue filtering the output from the interpolation filter via an anti-aliasing filter H2(z), and finally operate downsampling. The entire process is illustrated in Figure 12-8.


Figure 12-8. Block diagram for sampling rate conversion.

Since the interpolation and anti-aliasing filters are in a cascaded form and operate at the same rate, we can select one of them. We choose the one with the lower stop frequency edge and choose the most demanding requirement for passband gain and stopband attenuation for the filter design. A lot of computational saving can be achieved by using one lowpass filter. We illustrate the procedure via the following simulation. Let us generate the signal x(n) by:

x(n) = 5 sin ((2π × 1000n)/8000) + cos ((2π × 2500n)/8000),

with a sampling rate of fs = 8,000 Hz and frequencies of 1 kHz and 2.5 kHz. Now we resample x(n) to 3,000 Hz by a non-integer factor of 0.375, that is,

L/M = 0.375 = 3/8.

Upsampling is at a factor of L = 3 and the upsampled sequence is filtered by an FIR lowpass filter designed with the filter length N = 53 and a cutoff frequency of 3,250 Hz at the sampling rate of 3 × 8000 = 24,000 Hz. The spectrum for the upsampled sequence and the spectrum after application of the interpolation filter are plotted in Figure 12-9a.


Figure 12-9A. (Top) Spectrum after upsampling and (bottom) spectrum after interpolation filtering.

The sequence from step 1 can be filtered via another FIR lowpass filter designed with the filter length N = 159 and a cutoff frequency of 1,250 Hz, followed by downsampling by a factor of M = 8. The spectrum after the antialiasing filter and the spectrum for the final output y(m) are plotted in Figure 12-9b.


Figure 12-9B. (Top) Spectrum after anti-aliasing filtering and (bottom) spectrum after downsampling.

Note that the anti-aliasing filter removes the frequency component of 2.5 kHz to avoid aliasing. This is because after downsampling, the Nyquist limit is 1.5 kHz. As we discussed previously, we can select one filter for implementation. We choose the FIR lowpass with N = 159 and a cutoff frequency of 1,250 Hz because its bandwidth is smaller than that of the interpolation filter. The MATLAB implementation is listed in Program 12-3.

Therefore, three steps are required to accomplish the process:

  1. Upsampling by a factor of L = 3
  2. Filtering the upsampled sequence by an FIR lowpass filter designed with the filter length N = 159 and a cutoff frequency of 1,250 Hz at the sampling rate of 3 × 8000 = 24,000 Hz
  3. Downsampling by a factor of M = 8.


(Click to enlarge)

Program 12-3. MATLAB program for changing sampling rate with a noninteger factor.

Example 12.3.
Given a sampling conversion DSP system with the following specifications, determine the filter length and cutoff frequency for the combined antialiasing filter H(z), and window types, respectively, if the window design method is used:


Figure 12-10A. Sampling conversion in Example 12.3.

Solution: The filter frequency specifications and corresponding block diagram are developed in Figure 12-10b.


Figure 12-10B. Filter frequency specifications for Example 12.3.

Specifications for the interpolation filter H1(z):

  • Passband frequency range = 0–2500 Hz
  • Passband ripples for H1(z) = 0.04 dB
  • Stopband frequency range = 3000–9000 Hz
  • Stopband attenuation = 42 dB

Specifications for the anti-aliasing filter H2(z):

  • Passband frequency range = 0–2500 Hz
  • Passband ripples for H2(z) = 0.02 dB
  • Stopband frequency range = 4500–9000 Hz
  • Stopband attenuation = 46 dB

Combined specifications H(z):

  • Passband frequency range = 0–2500 Hz
  • Passband ripples for H(z) = 0.02 dB
  • Stopband frequency range = 3000–9000 Hz
  • Stopband attenuation = 46 dB.

We use the FIR filter with the Hamming window. Since

Δf = (fstop fpass)/fsL = (3000 – 2500)/18000 = 0.0278,

the length of the filter and the cutoff frequency can be determined by

N = 3.3/Δf = 3.3/0.0278 = 118.8.

We choose N = 119, and

fc = (fpass + fstop)/2 = (3000 + 2500)/2 = 2750 Hz.





SachinH

6/10/2010 1:54 AM EDT

Excellent Article on Resampling.

Sign in to Reply



Please sign in to post comment

Navigate to related information

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)

Feedback Form