polyphase
Polyphase decomposition of multirate filter
Description
Examples
Polyphase Matrix of an FIR Interpolator
When you create a multirate filter that uses polyphase decomposition, the polyphase
function lets you analyze the component filters individually by returning the components as rows in a matrix. First, create an interpolate-by-three filter.
hs = dsp.FIRInterpolator
hs = dsp.FIRInterpolator with properties: InterpolationFactor: 3 NumeratorSource: 'Property' Numerator: [0 -1.2906e-04 -2.2804e-04 0 5.5461e-04 8.0261e-04 0 -0.0015 -0.0020 0 0.0034 0.0043 0 -0.0067 -0.0083 0 0.0121 0.0145 0 -0.0205 -0.0241 0 0.0332 0.0388 0 -0.0530 -0.0620 0 0.0861 0.1027 0 -0.1540 -0.1976 0 ... ] (1x72 double) Use get to show all properties
In this syntax, the matrix p
contains all of the subfilters, one filter per matrix row.
p = polyphase(hs)
p = 3×24
0 0 0 0 0 0 0 0 0 0 0 0 1.0000 0 0 0 0 0 0 0 0 0 0 0
-0.0001 0.0006 -0.0015 0.0034 -0.0067 0.0121 -0.0205 0.0332 -0.0530 0.0861 -0.1540 0.4088 0.8247 -0.1976 0.1027 -0.0620 0.0388 -0.0241 0.0145 -0.0083 0.0043 -0.0020 0.0008 -0.0002
-0.0002 0.0008 -0.0020 0.0043 -0.0083 0.0145 -0.0241 0.0388 -0.0620 0.1027 -0.1976 0.8247 0.4088 -0.1540 0.0861 -0.0530 0.0332 -0.0205 0.0121 -0.0067 0.0034 -0.0015 0.0006 -0.0001
Finally, to analyze the component filters individually, use one of the analysis functions on the corresponding polyphase component vector. For example, to plot the impulse response of the first component filter, use impz
on the first vector of the polyphase matrix.
impz(p(1,:))
Input Arguments
sysobj
— Input filter
filter System object
Input filter, specified as one of the following filter System objects:
arithType
— Arithmetic type
'double'
(default) | 'single'
| 'Fixed'
Specify the arithmetic used in computing the polyphase matrix. When you
specify 'double'
or 'single'
, the
function performs double- or single-precision analysis. When you specify
'fixed'
, the arithmetic changes depending on the
setting of the CoefficientDataType
property and whether
the System object is locked or unlocked.
Details for Fixed-Point Arithmetic
System Object State | Coefficient Data Type | Rule |
---|---|---|
Unlocked | 'Same as input' | The function assumes that the coefficient data type is signed, 16 bit, and autoscaled. The function performs fixed-point analysis based on this assumption. |
Unlocked | 'Custom' | The function performs fixed-point analysis based on the
setting of the
CustomCoefficientsDataType
property. |
Locked | 'Same as input' | When the input data type is 'double'
or 'fixed' , the function assumes that the
coefficient data type is signed, 16-bit, and autoscaled. The
function performs fixed-point analysis based on this
assumption. |
Locked | 'Custom' | The function performs fixed-point analysis based on the
setting of the
CustomCoefficientsDataType
property. |
When you do not specify the arithmetic for non-CIC structures, the function uses double-precision arithmetic if the filter System object is in an unlocked state. If the System object is locked, the function performs analysis based on the locked input data type. CIC structures only support fixed-point arithmetic.
Output Arguments
p
— polyphase matrix
matrix
Polyphase matrix p
of the multirate filter. Each row in
the matrix corresponds to a polyphase branch. The first row of matrix
p
represents the first polyphase branch, the second
row the second polyphase branch, and so on to the last polyphase branch. The
number of columns in p
corresponds to the number of
filter taps per polyphase branch.
Version History
Introduced in R2011aR2024b: Support for dsp.VariableFIRDecimator
and dsp.VariableFIRInterpolator
Objects
Starting in R2024b, the polyphase
analysis function supports
the dsp.VariableFIRDecimator
and dsp.VariableFIRInterpolator
objects.
R2024a: polyphase
function with no output arguments returns polyphase matrix
When you call the polyphase
function with no output
arguments, the function returns the polyphase matrix of the multirate filter. In
previous releases, the polyphase
function with no output
arguments launched Filter Visualization Tool with all the polyphase subfilters to
allow you to analyze each component subfilter individually.
You do not need to make any changes to your code. However, to analyze the individual subfilters, use one of the functions in the Filter Analysis category on the individual polyphase component vectors.
For example, here is the code to plot the impulse response of the first polyphase
component subfilter of the default dsp.FIRInterpolator
filter
without using the Filter Visualization Tool.
firI = dsp.FIRInterpolator
firI = dsp.FIRInterpolator with properties: InterpolationFactor: 3 NumeratorSource: 'Property' Numerator: [0 -1.2906e-04 -2.2804e-04 0 5.5461e-04 … ] (1×72 double)
polyComp = polyphase(firI) impz(polyComp(1,:))
See Also
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)