Filter Design Toolbox    
mfilt.firfracinterp

Construct a direct-form FIR polyphase fractional interpolator filter object

Syntax

Description

hm = mfilt.firfracinterp(l,m,num) returns a direct-form FIR polyphase fractional interpolator mfilt object. l is the interpolation factor. It must be an integer. If not specified, l defaults to 3.

m is the decimation factor. Like l, it must be an integer. If you do not specify m in the calling syntax, it defaults to 1. If l is also not specified, m defaults to 2.

num is a vector containing the coefficients of the FIR lowpass filter used for interpolation. If omitted, a low-pass Nyquist filter of gain l and cutoff frequency of /max(l,m) is used by default.

By specifying both a decimation factor and an interpolation factor, you can interpolate your input signal by noninteger amounts. The fractional interpolator first interpolates the input, then decimates to result in an output signal whose sample rate is l/m of the input rate. For proper interpolation, you specify l to be greater than m. By default, the resulting decimation factor is 3/2 when you do not provide l and m in the calling syntax.

Input Arguments

The following table describes the input arguments for creating hm.

Input Argument
Description
l
Interpolation factor for the filter. l specifies the amount to increase the input sampling rate. It must be an integer. When you do not specify a value for l it defaults to 3.
num
Vector containing the coefficients of the FIR lowpass filter used for interpolation. When num is not provided as an input, firfracinterp uses a lowpass Nyquist filter with gain equal to l and cutoff frequency equal to /max(l,m) by default.
m
Decimation factor for the filter. m specifies the amount to reduce the sampling rate of the input signal. It must be an integer. When you do not specify a value for m it defaults to 1. When you do not specify l as well, m defaults to 2.

mfilt.firfracinterp 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.firfracinterp objects.The next table describes each property for an mfilt.firfracinterp filter object.

Name
Values
Description
FilterStructure

Reports the type of filter object, such as a decimator or fractional integrator. You cannot set this property--it is always read only and results from your choice of mfilt object.
Numerator

Vector containing the coefficients of the FIR lowpass filter used for interpolation.
RateChangeFactors
[l,m]
Reports the decimation (m) and interpolation (l) factors for the filter object. Combining these factors results in the final rate change for the signal.
NonProcessedSamples
0
Shows the values of the samples that were not processed during the filtering operation. Note that this is not the number of samples that were not processed.
ResetBeforeFiltering
'off' or 'on'
Determine whether the filter states get restored to their starting values for each filtering operation. The starting values are the values in place when you create the filter if you have not changed the filter since you constructed it. ResetBeforeFiltering returns to the default values any state that the filter changes during processing. States that the filter does not change are not affected.
States
Matrix
Stored conditions for the filter, including values for the interpolator and comb states.
NumSamplesProcessed
Integer
Returns the number of samples processed during filtering. As a check, the number of samples reported processed plus the number of nonprocessed samples should be the total number of input samples.

Examples

To convert a signal from 32 KHz to 48 KHz requires fractional interpolation. This example uses the mfilt.firfracinterp object to upsample an input signal. Setting = 3 and = 2 returns the same mfilt object as the default mfilt.firfracinterp object.

See Also

mfilt.firsrc, mfilt.firfracdecim, mfilt.interp, mfilt.decim


  mfilt.firfracdecim mfilt.firinterp 

Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS