Collective Filter Evaluation of an FSD FilterBased Resampling Algorithm
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.


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 digitalanalog conversion followed by analogsignal sampling, you must use a digital resampling algorithm.
Digitalsignal 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 T_{p1} = 1/ f_{p1} > 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 x_{1}[n] is upsampled by the integer factor L by means of zeroinsertion. Between two consecutive samples of the input sequence x_{1}[n], L1 zerovalued samples are inserted, resulting in an Ltimes higher sampling rate. As the zeroinsertion causes spectrum replication, the interpolation filter with normalized cutoff frequency at 0.5/L is needed to remove replicas. The Mfold downsampler following the lowpass filter H keeps every Mth sample of the filtered sequence and removes M1 inbetween samples. Thus, the output sequence x_{2}[m] sampling rate is (L/M)th of that of x_{1}[n]. As the downsampling operation can result in aliasing when L < m,="" the="" interpolation/decimation="" filter="" h="" should="" have="" a="" cutoff="" frequency="" of="">
Figure 1: The sampling rate conversion by a factor of L/M.
Let n and m be the indices of the input sample, x_{1}[n], and output sample, x_{2}[m], respectively. Thus nT_{p1} is the instant of the occurrence of the input sample and mT_{p2} is the instant of the occurrence of the respective sample at the converter output. Then the time instant for the output sample is
where n_{n}[m] stands for the index of the nearest sample of the input sequence x_{1}[n] to the mth sample of the output sequence x_{2}[m]
such that the fractional delay
You can estimate x_{2}[m] using an FSD filter with delay e[m]
where h_{e[m]}[n] is a symmetrically numbered finite impulse response of a Nthorder FSD filter (evenorder in this example) approximating frequency response
Figure 2: Demonstration of the sample rate conversion by a factor 3/2 for T_{p1} = 1. In this figure, o represents samples of the signal before resampling x_{1}[n], while x represents samples of the signal after resampling x_{2}[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.
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 h_{m}[n] of the mth polyphase filter H_{m} through polyphase decomposition of the interpolation/decimation filter impulse response h_{I}[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 t_{N} = (N1)/2 is the bulk delay of the interpolation/decimation filter. You can also use polyphase filters in the FSD filterbased resampling method. Moreover, when you replace polyphase filters with the FSD filters used in the FSDbased resampling algorithm, the resulting algorithm is equivalent to the FSD filterbased algorithm.
Therefore, the FSD filterbased 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 h_{e[m]}[n] is the impulse response of the Mthorder 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.
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 filterdesign 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 bandlimited 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 narrowband signals, and the truncated sinc filter has the smallest transition bandwidth but with generally poor stopband 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.