Design Article

Collective Filter Evaluation of an FSD Filter-Based Resampling Algorithm

Marek Blok

1/15/2002 12:00 AM EST


 

 
ABOUT THE AUTHOR

Marek Blok received an MSc degree in Information Systems from Technical University of Gdansk in 1994. Since then, he has been with the Faculty of Electronics, Telecommunications and Informatics at the Technical University of Gdansk engaged in DSP algorithm research and development. Since 1998 he has been preparing a Ph.D. thesis concerning fractional sample delay filters designing.
 
This article presents a collective filter for the overall performance evaluation of a resampling algorithm based on fractional sample delay (FSD) filters. The problem with a resampling algorithm is, for each output sample, you need an FSD filter with a different delay, and filter quality depends on a desired delay. That requirement makes resampling-algorithm evaluation very difficult and, so far, there's no simple method to perform the evaluation. However, when input and output frequencies are commensurate, the number of needed filters is limited. In such cases, you can use the proposed performance evaluation method. Fortunately, in most practical cases the resampling ratio is rational and the required number of filters doesn't exceed a few hundred. Moreover, the proposed method is very simple to use and allows for easy comparison of overall performance of the resampling algorithm based on FSD filters with different impulse response length or designed in different ways.

Nowadays, engineers must frequently connect two different digital systems—often, such systems use different sampling rates, for example CDs (44.1 kHz) and DATs (48 kHz). To avoid digital-analog conversion followed by analog-signal sampling, you must use a digital resampling algorithm.

Digital-signal resampling finds a new set of samples of the analog signal x(t) when we have only a set of samples acquired with a previous sampling rate. Thus, on the basis of a sequence



where Tp1 = 1/ fp1 > 0 denotes the sampling interval, a new set of samples



is assessed.

Figure 1 presents a classic sampling rate converter by an arbitrary rational factor L/M, where the integer factors L and M are related to the input/output sampling rates:



The term gcd(x, y) denotes the greatest common divisor of x and y.

In the classic approach, the input signal x1[n] is upsampled by the integer factor L by means of zero-insertion. Between two consecutive samples of the input sequence x1[n], L-1 zero-valued samples are inserted, resulting in an L-times higher sampling rate. As the zero-insertion causes spectrum replication, the interpolation filter with normalized cutoff frequency at 0.5/L is needed to remove replicas. The M-fold downsampler following the low-pass filter H keeps every Mth sample of the filtered sequence and removes M-1 in-between samples. Thus, the output sequence x2[m] sampling rate is (L/M)th of that of x1[n]. As the downsampling operation can result in aliasing when L < M, the interpolation/decimation filter H should have a cutoff frequency of 0.5/M.



Figure 1:  The sampling rate conversion by a factor of L/M.


Variable Delay FSD Filter-Based Resampling Method
A resampling algorithm based on the FSD filters is more universal. The algorithm allows for an implementation of any resampling ratio. You replace the interpolation/decimation filter with FSD filters that you can easily design in real time, and you can do all computations at the output sampling rate.

Let n and m be the indices of the input sample, x1[n], and output sample, x2[m], respectively. Thus nTp1 is the instant of the occurrence of the input sample and mTp2 is the instant of the occurrence of the respective sample at the converter output. Then the time instant for the output sample is



where nn[m] stands for the index of the nearest sample of the input sequence x1[n] to the mth sample of the output sequence x2[m]



such that the fractional delay



You can estimate x2[m] using an FSD filter with delay e[m]



where he[m][n] is a symmetrically numbered finite impulse response of a Nth-order FSD filter (even-order in this example) approximating frequency response





Figure 2:  Demonstration of the sample rate conversion by a factor 3/2 for Tp1 = 1. In this figure, o represents samples of the signal before resampling x1[n], while x represents samples of the signal after resampling x2[m].

You can readily update the resampling algorithm (Figure 2) parameters:



and



so you can use the algorithm for any resampling ratio. In addition, these parameters recur with a period L. L is also the number of needed different FSD filters. You can design these filters beforehand and store them in memory, thus simplifying implementation.

Along with its easy implementation, the algorithm this article describes has one important disadvantage—its performance evaluation is very difficult. For each output sample, you use a different FSD filter. The quality of this filter depends on its delay, making evaluation of the resampling algorithm very difficult.


The Collective Filter
The author bases the derivation of the FSD-based resampling-algorithm performance-evaluation concept on the polyphase implementation of the classic approach (Figure 1). In the classic resampling algorithm, polyphase decomposition of the interpolation/decimation filter leads to its computationally efficient implementation.

Let's consider the polyphase resampling algorithm presented in Figure 3.



Figure 3:  The polyphase implementation of a classic sample rate conversion algorithm (see Figure 1)

You can obtain the impulse response hm[n] of the mth polyphase filter Hm through polyphase decomposition of the interpolation/decimation filter impulse response hI[n].



Thus, all computations are performed at the input sampling rate and the shaded part of the algorithm in Figure 3 only selects the output sample.

You can consider every polyphase filter as a filter approximating an FSD filter with group delay



where tN = (N-1)/2 is the bulk delay of the interpolation/decimation filter. You can also use polyphase filters in the FSD filter-based resampling method. Moreover, when you replace polyphase filters with the FSD filters used in the FSD-based resampling algorithm, the resulting algorithm is equivalent to the FSD filter-based algorithm.

Therefore, the FSD filter-based algorithm is simply a computationally efficient implementation of the classic resampling approach (Figure 1) using the interpolation/decimation filter with the impulse response comprising all FSD filters used in resampling.



where he[m][n] is the impulse response of the Mth-order FSD filter. You must arrange the FSD filters to satisfy the condition



Now, you can reduce the performance evaluation of the considered resampling method to the collective filter analysis, similar to the case with the classic algorithm.


Examples
The frequency response of a collective filter carries all information about resampling algorithm performance. As the construction of a collective filter is simple, the FSD filter-based resampling analysis is very easy.



Figure 4:  The magnitude response of the collective filters for interpolation by a factor L=5 for FSD filters of the length N=11 optimal in Chebyshev sense with 65% approximation bandwidth (red line), maximally flat (blue line) and truncated sinc (magenta line). The black line represents the signal spectra with its replicas.

Selection of the proper FSD filter design method is not an easy task. On the basis of a collective filter, you can test the overall performance of the resampling algorithm with respect to the influence of different FSD filter-design methods. Figure 4 presents a comparison of three collective filters composed of FSD filters with length N=11: truncated sinc, maximally flat, and optimal in the Czebyshev sense with 65% approximation bandwidth. The black line represents the signal spectrum and its replicas to help interpret the influence of the frequency response of the collective filter on the resampled signal. Maximally flat filters give us the best attenuation at k/L (k = 1, 2), but attenuation at (k+0.5)/L is the lowest and, additionally, bins at these frequencies are the widest. For band-limited signals when attenuation should be about 70 dB, the optimal in Chebyshev sense filters offers the widest band. The maximally flat filters are the best for narrow-band signals, and the truncated sinc filter has the smallest transition bandwidth but with generally poor stop-band attenuation.



Figure 5:  The magnitude response of the collective filters for sample rate conversion from CD (44.1kHz) to DAT (48kHz) (L=160) for FSD filters of the length N=51 optimal in Chebyshev sense with 90% approximation bandwidth (red line), maximally flat (blue line), and truncated sinc (magenta line).

Figure 5 presents an example for CD (44.1 kHz) to DAT (48.0 kHz) conversion. In this case, L=160 and M=147 and the approximation bandwidth of the optimal in Chebyshev sense filter is now 90%. Filter length was increased to 51 samples so the collective filter for optimal FSD filters has 90 dB attenuation. Generally, except for the much narrower bandwidth of the collective filter, you can apply all conclusions from the previous example to this case.





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