# Multirate algorithm for updating the coefficients

“Upsampling” is the process of inserting zero-valued samples between original samples to increase the sampling rate.

(This is called “zero-stuffing”.) Upsampling adds to the original signal undesired spectral images which are centered on multiples of the original sampling rate.

Therefore, interpolation is far more common that upsampling alone.

Yes, so long as the interpolation ratio, L, is not a prime number.

However, this adding-and-summing processing has no effect when the data sample is zero–which we know in advance will be the case for L-1 out of each L input samples of a FIR interpolation filter. The net result is that to interpolate by a factor of L, you calculate L outputs for each input using L different “sub-filters” derived from your original filter.

Here’s an example of a 12-tap FIR filter that implements interpolation by a factor of four.

The coefficients are h0-h11, and three data samples, x0-x2 (with the newest, x2, on the left) have made their way into the filter’s delay line: Since each output is calculated using only N/L coefficients (rather than N coefficients), you get an overall computational “savings” of (N – N/L) per output .

For example, to interpolate by a factor of 15, you could interpolate by 3 then interpolate by 5. For example you could interpolate by 16 in: The result (assuming an ideal interpolation filter) is a signal at L times the original sampling rate which has the same spectrum over the input Nyquist (0 to Fs/2) range, and with zero spectral content above the original Fs/2.

This idea is appealing because, intuitively, this “stairstep” output seems more similar to the original than the zero-stuffed version.