IIR Filter with no zeros
The AllpoleFilter object filters each channel of the input using Allpole filter implementations.
To filter each channel of the input:
HAllpole = dsp.AllpoleFilter returns an Allpole filter System object™, HAllpole, which independently filters each channel of the input over successive calls to the step method. This System object uses a specified Allpole filter implementation, and it supports variable-size input.
HAllpole = dsp.AllpoleFilter('PropertyName',PropertyValue, ...) returns an Allpole filter System object, HAllpole, with each property set to the specified value.
Specify the filter structure.
Filter denominator coefficients
Specify the denominator coefficients as a real or complex numeric row vector. This property is applicable when the Structure property is set to one of Direct form | Direct form transposed. The default value of this property is [1 0.1]. This property is tunable.
Lattice filter coefficients
Specify the lattice filter coefficients as a real or complex numeric row vector. This property is applicable when the Structure property is set to Lattice AR. The default value of this property is [0.2 0.4]. This property is tunable.
Initial conditions for the filter states
Specify the initial conditions of the filter states. The default value is 0.
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. This property is tunable.
Process input as frames or as samples
Set this property to true to enable frame-based processing. When this property is true, the Allpole filter treats each column as an independent channel. Set this property to false to enable sample-based processing. When this property is false, the Allpole filter treats each element of the input as an individual channel. The default is true. This property is nontunable.
Denominator coefficients word- and fraction-length designations
Specify the denominator coefficients fixed-point data type as one of Same word length as input | Custom. The default is Same word length as input. This property is nontunable.
Reflection coefficients word- and fraction-length designations
Specify the reflection coefficients fixed-point data type as one of Same word length as input | Custom. The default is Same word length as input. This property is nontunable.
|clone||Create Allpole filter with same property values|
|fvtool||Open filter visualization tool|
|getNumInputs||Number of expected inputs to step method|
|getNumOutputs||Number of outputs of step method|
|isLocked||Locked status for input attributes and nontunable properties|
|phasez||Unwrapped phase response|
|release||Allow property value and input characteristics changes|
|reset||Reset internal states of Allpole filter|
|step||Filter input with Allpole filter object|
Note: In AllpoleFilter, analysis methods are not supported for fixed-point processing if the structure is Direct form or Direct form transposed.
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); hSR = dsp.SignalSource(xin', 4); hLog = dsp.SignalSink; hallpole = dsp.AllpoleFilter; tt = (-25:25)'; xsinc = 0.4*sinc(0.4*tt); asinc = lpc(xsinc,51); hallpole.Denominator = asinc; h = dsp.SpectrumAnalyzer('SampleRate',8e3,... 'PlotAsTwoSidedSpectrum',false,... 'OverlapPercent', 80,'PowerUnits','dBW',... 'YLimits', [-150 50]); while ~isDone(hSR) input = step(hSR); filteredOutput = step(hallpole,input); step(hLog,filteredOutput); step(h,filteredOutput) end filteredResult = hLog.Buffer; fvtool(hallpole,'Fs',8000)
This object implements the algorithm, inputs, and outputs described on the Allpole Filter block reference page. The object properties correspond to the block parameters.
Both this object and its corresponding block let you specify whether to process inputs as individual samples or as frames of data. The object uses the FrameBasedProcessing property. The block uses the Input processing parameter. See Set the FrameBasedProcessing Property of a System object for more information.