| Filter Design Toolbox | ![]() |
Construct a an overlap-add FIR polyphase interpolator filter object
Syntax
Description
hm = mfilt.fftfirinterp(l,num,bl)
returns a discrete-time FIR filter object that uses the overlap-add method for filtering input data.
The number of FFT points is given by [bl+ceil(length(num)/l)-1]. It is to your advantage to choose bl such that the number of FFT points is a power of two--using powers of two can improve the efficiency of the FFT and the associated interpolation process.
Input Arguments
The following table describes the input arguments for creating hm.
mfilt.fftfirinterp Object Properties
Every multirate filter object has properties that govern the way it behaves when you use it. Note that many of the properties are also input arguments for creating mfilt.fftfirinterp objects.The next table describes each property for an mfilt.fftfirinterp filter object.
Examples
Interpolation by a factor of 8. Notice that this object removes the spectral replicas in the signal after interpolation.
l = 8; % Interpolation factor hm = mfilt.fftfirinterp(l); % We use the default filter n = 8192; % Number of points hm.blocklength = n; % Set block length to number of points fs = 44.1e3; % Original sampling frequency: 44.1 KHz n = 0:n-1; % 0.1858 secs of data x = sin(2*pi*n*22e3/fs); % Original signal, sinusoid at 22 KHz y = filter(hm,x); % Interpolated sinusoid xu = l*upsample(x,8); % Upsample to compare--the spectrum % does not change [px,f]=periodogram(xu,[],65536,l*fs);% Power spectrum of original % signal [py,f]=periodogram(y,[],65536,l*fs); % Power spectrum of % interpolated signal plot(f,10*log10(([fs*px,l*fs*py]))) legend('22 KHz sinusoid sampled at 44.1 KHz',... '22 KHz sinusoid sampled at 352.8 KHz') xlabel('Frequency (Hz)'); ylabel('Power Spectrum');
See Also
mfilt.firinterp, mfilt.holdinterp, mfilt.linearinterp, mfilt.firfracinterp, mfilt.cicinterp, mfilt.cicinterpzerolat
| mfilt.cicinterpzerolat | mfilt.firdecim | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |