dsp.AllpoleFilter
IIR Filter with no zeros
Description
The dsp.AllpoleFilter
object filters each channel of the input using
allpole filter implementations.
To filter each channel of the input:
Create the
dsp.AllpoleFilter
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Description
returns an
allpole filter System object™, allpole
= dsp.AllpoleFilterallpole
, which independently filters each channel of
the input over successive calls to the algorithm. This System object uses a specified allpole filter implementation.
returns an allpole filter System object, allpole
= dsp.AllpoleFilter(Name,Value
)allpole
, with each property set to the specified
value.
Properties
Unless otherwise indicated, properties are nontunable, which means you cannot change their
values after calling the object. Objects lock when you call them, and the
release
function unlocks them.
If a property is tunable, you can change its value at any time.
For more information on changing property values, see System Design in MATLAB Using System Objects.
Structure
— Filter structure
Direct form
(default) | Direct form transposed
| Lattice AR
Specify the filter structure as one of | Direct form
|
Direct form transposed
| Lattice AR
. Analysis
methods are not supported for fixed-point processing if the structure is Direct
form
or Direct form transposed
. This property is
nontunable.
Denominator
— Filter denominator coefficients
[1 0.1]
(default) | row vector
Specify the denominator coefficients as a numeric row vector.
Tunable: Yes
Dependencies
This property is applicable when the Structure property is set to one of
Direct form
| Direct form transposed
.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
Complex Number Support: Yes
ReflectionCoefficients
— Lattice filter coefficients
[0.2 0.4]
(default) | row vector
Specify the lattice filter coefficients as a numeric row vector.
Tunable: Yes
Dependencies
This property is applicable when the Structure
property is
set to Lattice AR
.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
Complex Number Support: Yes
InitialConditions
— Initial conditions for the filter states
0
(default) | scalar | vector | matrix
Specify the initial conditions of the filter states.
You can specify the initial conditions as a scalar, vector, or matrix. If you specify a scalar value, this System object initializes all delay elements in the filter to that value. You can also specify a vector whose length equals the number of delay elements in the filter. When you do so, each vector element specifies a unique initial condition for the corresponding delay element. The object applies the same vector of initial conditions to each channel of the input signal.
You can also specify a matrix with the same number of rows as the number of delay elements in the filter and one column for each channel of the input signal. In this case, each element specifies a unique initial condition for the corresponding delay element in the corresponding channel.
Tunable: Yes
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
Complex Number Support: Yes
CoefficientsDataType
— Denominator coefficients word- and fraction-length designations
Same word length as input
(default) | Custom
Specify the denominator coefficients fixed-point data type as one of Same
word length as input
| Custom
. This property is
nontunable.
ReflectionCoefficientsDataType
— Reflection coefficients word- and fraction-length designations
Same word length as input
(default) | Custom
Specify the reflection coefficients fixed-point data type as one of Same
word length as input
| Custom
. This property is
nontunable.
Fixed-Point Properties
ProductDataType
— Product word- and fraction-length designations
Full precision
(default) | Same as input
| Custom
Specify the product fixed-point data type as one of | Full
precision
| Same as input
| Custom
|. This property is nontunable.
AccumulatorDataType
— Accumulator word- and fraction-length designations
Full precision
(default) | Same as input
| Same as product
| Custom
Specify the accumulator fixed-point data type to one of | Full
precision
| Same as input
| Same as
product
| Custom
|. This property is nontunable.
OutputDataType
— Output word- and fraction-length designations
Same as input
(default) | Same as accumulator
| Custom
Specify the output fixed-point data type as one of | Same as
accumulator
| Same as input
| Custom
|. This property is nontunable.
StateDataType
— State word- and fraction-length designations
Same as accumulator
(default) | Same as input
| Custom
Specify the state fixed-point data type as one of | Same as
input
| Same as accumulator
|
Custom
. This property is nontunable.
CustomCoefficientsDataType
— Custom denominator word- and fraction-lengths
numerictype ([],16,15)
(default) | numerictype
Specify the denominator coefficients fixed-point type as an autosigned numerictype
(Fixed-Point Designer) object. This property is nontunable.
Dependencies
This property is applicable when the CoefficientsDataType
property is Custom
.
CustomReflectionCoefficientsDataType
— Custom reflection coefficients word- and fraction-lengths
numerictype ([],16,15)
(default) | numerictype
Specify the denominator coefficients fixed-point type as an autosigned numerictype
(Fixed-Point Designer) object. This property is nontunable.
Dependencies
This property is applicable when the
ReflectionCoefficientsDataType
property is
Custom
.
CustomProductDataType
— Custom Product word- and fraction-lengths
numerictype ([],32,30)
(default) | numerictype
Specify the product fixed-point type as an autosigned scaled numerictype
(Fixed-Point Designer) object. This property is nontunable.
Dependencies
This property applies when you set the ProductDataType
property to Custom
.
CustomAccumulatorDataType
— Custom accumulator word- and fraction-lengths
numerictype([],32,30)
(default) | numerictype
Specify the accumulator fixed-point type as an autosigned scaled numerictype
(Fixed-Point Designer) object. This property is nontunable.
Dependencies
This property applies when you set the AccumulatorDataType
property to Custom
.
CustomStateDataType
— Custom state word- and fraction-lengths
numerictype([],16,15)
(default) | numerictype
Specify the state fixed-point type as an autosigned scaled numerictype
(Fixed-Point Designer) object. This property is nontunable.
Dependencies
This property applies when you set the StateDataType
property to Custom
.
CustomOutputDataType
— Custom output word- and fraction-lengths
numerictype([],16,15)
(default) | numerictype
Specify the output fixed-point type as an autosigned scaled numerictype
(Fixed-Point Designer) object. This property is nontunable.
Dependencies
This property applies when you set the OutputDataType
property to Custom
.
Usage
Syntax
Description
Input Arguments
x
— Data input
vector | matrix
Data input, specified as a vector or a matrix. This object also accepts variable-size inputs. Once the object is locked, you can change the size of each input channel, but you cannot change the number of channels.
When the input data is of a fixed-point type, it must be signed. The allpole filter object operates on each channel of the input signal independently over successive calls to the algorithm.
Data Types: single
| double
| int8
| int16
| int32
| uint8
| uint16
| uint32
| fi
Complex Number Support: Yes
Output Arguments
y
— Filtered output
vector | matrix
Filtered output, returned as a vector or a matrix. The size, data type, and complexity of the output signal matches that of the input signal.
Data Types: single
| double
| int8
| int16
| int32
| uint8
| uint16
| uint32
| fi
Complex Number Support: Yes
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Specific to dsp.AllpoleFilter
freqz | Frequency response of discrete-time filter System object |
filterAnalyzer | Analyze filters with Filter Analyzer app |
impz | Impulse response of discrete-time filter System object |
info | Information about filter System object |
coeffs | Returns the filter System object coefficients in a structure |
cost | Estimate cost of implementing filter System object |
grpdelay | Group delay response of discrete-time filter System object |
outputDelay | Determine output delay of single-rate or multirate filter |
phasez | Phase response of discrete-time filter System object (unwrapped) |
Examples
Lowpass Filter a Waveform with Two Frequencies
Use an Allpole filter to apply a lowpass filter to a waveform with two sinusoidal frequencies.
t = (0:1000)./8e3; xin = sin(2*pi*1e3*t)+sin(2*pi*3e3*t); src = dsp.SignalSource(xin', 4); sink = dsp.SignalSink; allpole = dsp.AllpoleFilter; tt = (-25:25)'; xsinc = 0.4*sinc(0.4*tt); asinc = lpc(xsinc,51); allpole.Denominator = asinc; sa = spectrumAnalyzer('SampleRate',8e3,... 'Method','welch',... 'PlotAsTwoSidedSpectrum',false,... 'OverlapPercent',80,'SpectrumUnits','dBW',... 'YLimits',[-150 50]); while ~isDone(src) input = src(); filteredOutput = allpole(input); sink(filteredOutput); sa(filteredOutput) end
filteredResult = sink.Buffer; filterAnalyzer(allpole,SampleRates=8000)
Algorithms
This object implements the algorithm, inputs, and outputs described on the Allpole Filter block reference page. The object properties correspond to the block parameters.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
Only the
Denominator
property is tunable for code generation.See System Objects in MATLAB Code Generation (MATLAB Coder).
Version History
Introduced in R2012b
See Also
Functions
freqz
|filterAnalyzer
|impz
|info
|coeffs
|cost
|grpdelay
|outputDelay
Objects
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)