| Signal Processing Toolbox | ![]() |
Interpolation FIR filter design
Syntax
Description
b designs a linear phase FIR filter that performs ideal bandlimited interpolation using the nearest = intfilt(r,l,alpha)
2*l nonzero samples, when used on a sequence interleaved with r-1 consecutive zeros every r samples. It assumes an original bandlimitedness of alpha times the Nyquist frequency. The returned filter is identical to that used by interp.
b or = intfilt(r,n,'Lagrange')
designs an FIR filter that performs b = intfilt(r,n,'l')
nth-order Lagrange polynomial interpolation on a sequence interleaved with r-1 consecutive zeros every r samples. b has length (n + 1)*r for n even, and length (n + 1)*r-1 for n odd.
Both types of filters are basically lowpass and are intended for interpolation and decimation.
Examples
Design a digital interpolation filter to upsample a signal by four, using the bandlimited method:
The filter h1 works best when the original signal is bandlimited to alpha times the Nyquist frequency. Create a bandlimited noise signal:
Now zero pad the signal with three zeros between every sample. The resulting sequence is four times the length of x:
Interpolate using the filter command:
y is an interpolated version of x, delayed by seven samples (the group-delay of the filter). Zoom in on a section to see this:
intfilt also performs Lagrange polynomial interpolation of the original signal. For example, first-order polynomial interpolation is just linear interpolation, which is accomplished with a triangular filter:
h2 = intfilt(4,1,'l') % Lagrange interpolation
h2 =
0.2500 0.5000 0.7500 1.0000 0.7500 0.5000 0.2500
Algorithm
The bandlimited method uses firls to design an interpolation FIR equivalent to that presented in [1]. The polynomial method uses Lagrange's polynomial interpolation formula on equally spaced samples to construct the appropriate filter.
See Also
decimate, downsample, interp, resample, upsample
References
[1] Oetken, Parks, and Schüßler, "New Results in the Design of Digital Interpolators," IEEE Trans. Acoust., Speech, Signal Processing, Vol. ASSP-23 (June 1975), pp. 301-309.
| interp | invfreqs | ![]() |