"Resampling" means combining interpolation and decimation to change the sampling rate by a rational factor.
Resampling is usually done to interface two systems which have different sampling rates. If the ratio of two system's rates happens to be an integer, decimation or interpolation can be used to change the sampling rate (depending on whether the rate is being decreased or increased); otherwise, interpolation and decimation must be used together to change the rate
A practical and well-known example results from the fact that professional audio equipment uses a sampling rate of 48 kHz, but consumer audio equipment uses a rate of 44.1 kHz. Therefore, to transfer music from a professional recording tape to a CD, the sampling rate must be changed by a factor of:
44100 / 48000=441 / 480=147 / 160
There are no common factors in 147 and 160, so we must stop factoring at that point. Therefore, in this example, we would interpolate by a factor of 147 then decimate by a factor of 160.
The interpolation factor is simply the ratio of the output rate to the input rate. Given that the interpolation factor is L and the decimation factor is M, the resampling factor is L / M. In the above example, the resampling factor is 147 / 160=0.91875
Yes. As always, the Nyquist criteria must be met relative to the resulting output sampling rate, or aliasing will result. In other words, the output rate cannot be less than twice the highest frequency (of interest) of the input signal.
Yes. Since resampling includes interpolation, you need an interpolation filter. Otherwise, the images created by the zero-stuffing part of interpolation will remain, and the interpolated signal will not be "the same" as the original.
Likewise, since resampling includes decimation, you seemingly need a decimation filter. Or do you? Since the interpolation filter is in-line with the decimation filter, you could just combine the two filters by convolving their coefficients into a single filter to use for decimation. Better yet, since both are lowpass filters, just use whichever filter has the lowest cutoff frequency as the interpolation filter.
As hinted at above:
- Determine the cutoff frequency of the decimation filter (as explained in Part 2: Decimation.)
- Determine the cutoff frequency of the interpolation filter (as explained in Part 3: Interpolation)
- Use the lower of the two cutoff frequencies to design the resampling filter.
Yes, but there are a couple of restrictions:
- If either the interpolation or decimation factors are prime numbers, you won't be able to decompose those parts of the resampler into stages.
- You must preserve the Nyquist criteria at each stage or else aliasing will result. That is, no stage can have an output rate which is less than twice the highest frequency of interest.
Just as with interpolation and decimation, the computational and/or memory requirements of the resampling filtering can sometimes be greatly reduced by using multiple stages.
The straight-forward implementation of resampling is to do interpolation by a factor of L, then decimation by a factor of M. (You must do it in that order; otherwise, the decimator would remove part of the desired signal--which the interpolator could not restore.)
No. The problem is that for resampling factors close to 1.0, the interpolation factor can be quite large. For example, in the case described above of changing from the sampling rate from 48 kHz to 44.1 kHz, the ratio is only 0.91875, yet the interpolation factor is 147!
Also, you are filtering the signal twice: once in the interpolator and once in the decimator. However, one of the filters has a larger bandwidth than the other, so the larger-bandwidth filter is redundant.
Just combine the computational and memory advantages that FIR interpolator and decimator implementations can provide. (If you don't already understand those, be sure to read and understand Part 2: Decimation, and Part 3: Interpolation before continuing.)
First, let's briefly review what makes FIR interpolation and decimation efficient:
- When interpolating by a factor of L, you only have to actually calculate 1/L of the FIR taps per interpolator output.
- When decimating by a factor of M, you only have to calculate one output for every M decimator inputs.
So, combining these ideas, we will calculate only the outputs we actually need, using only a subset of the interpolation coefficients to calculate each output. That makes it possible to efficiently implement even FIR resamplers which have large interpolation and/or decimation factors.
The tricky part is figuring out which polyphase filters to apply to which inputs, to calculate the desired outputs, as a function of L and M. There are various ways of doing that, but they're all beyond our scope here.
Right here. Our "multirate_algs" package includes a resampling routine. You can download it from dspGuru's DSP Algorithm Library.
Multirate FAQ Index |
Part 1: Basics |
Part 2: Decimation |
Part 3: Interpolation |
| Home | Up | Previous | © 2001-2004 Iowegian International Corp. Terms of Use and Legal Notices |