This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

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? (MATLAB).

Creation

Syntax

allpole = dsp.AllpoleFilter
allpole = dsp.AllpoleFilter(Name,Value)

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 (MATLAB).

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 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 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 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 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 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 object. This property is nontunable.

Dependencies

This property applies when you set the OutputDataType property to Custom.

Usage

For versions earlier than R2016b, use the step function to run the System object algorithm. The arguments to step are the object you created, followed by the arguments shown in this section.

For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

Syntax

y = allpole(x)

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 filter
fvtoolVisualize frequency response of DSP filters
impzImpulse response of discrete-time filter System object
infoInformation about filter System object
coeffsFilter coefficients
costEstimate cost for implementing filter System objects
grpdelayGroup delay response of discrete-time filter System object
phasezUnwrapped phase response for filter
stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object

Examples

expand all

Use an Allpole filter to apply a lowpass filter to a waveform with two sinusoidal frequencies.

Note: This example runs only in R2016b or later. If you are using an earlier release, replace each call to the function with the equivalent step syntax. For example, myObject(x) becomes step(myObject,x).

 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 = dsp.SpectrumAnalyzer('SampleRate',8e3,...
    'PlotAsTwoSidedSpectrum',false,...
    'OverlapPercent', 80,'PowerUnits','dBW',...
    'YLimits', [-150 50]);

while ~isDone(src)
      input = src();
      filteredOutput = allpole(input);
      sink(filteredOutput);
      sa(filteredOutput)
 end

 filteredResult = sink.Buffer;
 fvtool(allpole,'Fs',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

Introduced in R2012b