Main Content

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:

  1. Create the dsp.AllpoleFilter object and set its properties.

  2. 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

example

allpole = dsp.AllpoleFilter returns an allpole filter System object™, allpole, which independently filters each channel of the input over successive calls to the algorithm. This System object uses a specified allpole filter implementation.

allpole = dsp.AllpoleFilter(Name,Value) returns an allpole filter System object, allpole, with each property set to the specified value.

Properties

expand all

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.

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.

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

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

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

Specify the denominator coefficients fixed-point data type as one of Same word length as input | Custom. This property is nontunable.

Specify the reflection coefficients fixed-point data type as one of Same word length as input | Custom. This property is nontunable.

Fixed-Point Properties

Specify the product fixed-point data type as one of | Full precision | Same as input | Custom |. This property is nontunable.

Specify the accumulator fixed-point data type to one of | Full precision | Same as input | Same as product | Custom |. This property is nontunable.

Specify the output fixed-point data type as one of | Same as accumulator | Same as input | Custom |. This property is nontunable.

Specify the state fixed-point data type as one of | Same as input | Same as accumulator | Custom. This property is nontunable.

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.

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.

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.

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.

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.

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

Description

example

y = allpole(x) filters the real or complex input signal x using an allpole filter to produce the output y.

Input Arguments

expand all

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

expand all

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)

expand all

freqzFrequency response of discrete-time filter System object
fvtoolVisualize frequency response of DSP filters
impzImpulse response of discrete-time filter System object
infoInformation about filter System object
coeffsReturns the filter System object coefficients in a structure
costEstimate cost of implementing filter System object
grpdelayGroup delay response of discrete-time filter System object
outputDelayDetermine output delay of single-rate or multirate filter
phasezPhase response of discrete-time filter System object (unwrapped)
stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object

Examples

collapse all

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;
 fvtool(allpole,'Fs',8000)

Figure Figure 1: Magnitude Response (dB) contains an axes object. The axes object with title Magnitude Response (dB), xlabel Frequency (kHz), ylabel Magnitude (dB) contains an object of type line.

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

Version History

Introduced in R2012b