Package: dsp
Single section or cascaded allpass filter
Note:
MATLAB^{®} code with 
The AllpassFilter
object filters each channel
of the input using Allpass filter implementations. This System object™ supports
code generation. To import this object into Simulink^{®}, use the MATLAB System
block.
To filter each channel of the input:
Define and set up your Allpass filter. See Construction.
Call step
to filter each channel
of the input according to the properties of dsp.AllpassFilter
.
The behavior of step
is specific to each object in
the toolbox.
Note:
Starting in R2016b, instead of using the 
Allpass = dsp.AllpassFilter
returns
an Allpass filter System object, Allpass
, that
filters each channel of the input signal independently using an allpass
filter, with the default structure and coefficients.
Allpass = dsp.AllpassFilter('
returns an Allpass filter System object, PropertyName
',PropertyValue
,
...)Allpass
,
with each property set to the specified value.

Internal allpass filter structure You can specify the internal allpass filter implementation structure
as one of  

Allpass polynomial coefficients Specify the real allpass polynomial filter coefficients. This
property is applicable only when the 

Wave Digital Filter allpass coefficients Specify the real allpass coefficients in the Wave Digital Filter
form. This property is only applicable when the 

Lattice allpass coefficients Specify the real or complex allpass coefficients as lattice
reflection coefficients. This property is applicable only if the 

Indicate if last section is first order Indicate if last section is first order or second order. When
you set 
clone  Create System object with same property values 
isLocked  Locked status for input attributes and nontunable properties 
release  Allow property value and input characteristics changes 
reset  Reset internal states of a System object 
step  Process inputs using allpass filter 
For additional methods, see Analysis Methods for Filter System Objects.
For a complete list of analysis methods supported for the dsp.AllpassFilter
object,
enter dsp.AllpassFilter.helpFilterAnalysis
at the MATLAB command
prompt.
The transfer function of an allpass filter is given by
$$H(z)=\frac{c(n)+c(n1){z}^{1}+\mathrm{...}+{z}^{n}}{1+c(1){z}^{1}+\mathrm{...}+c(n){z}^{n}}$$.
c is allpass polynomial coefficients vector. The order, n, of the transfer function is the length of vector c.
In the minimum multiplier form and wave digital form, the allpass filter is implemented as a cascade of either secondorder (biquad) sections or firstorder sections. When the coefficients are specified as an Nby2 matrix, each row of the matrix specifies the coefficients of a secondorder filter. The last element of the last row can be ignored based on the trailing firstorder setting. When the coefficients are specified as an Nby1 matrix, each element in the matrix specifies the coefficient of a firstorder filter. The cascade of all the filter sections forms the allpass filter.
In the lattice form, the coefficients are specified as a vector.
These structures are computationally more economical and structurally more stable compared to the generic IIR filters, such as df1, df1t, df2, df2t. For all structures, the allpass filter can be a singlesection or a multiplesection (cascaded) filter. The different sections can have different orders, but they are all implemented according to the same structure.
This structure realizes the allpass filter with the minimum
number of required multipliers, equal to the order n
.
It also uses 2n
delay units and 2n
adders.
The multipliers uses the specified coefficients, which are equal to
the polynomial vector c in the allpass transfer
function. In this secondorder section of the minimum multiplier structure,
the coefficients vector, c, is equal to [0.1
0.7
].
This structure uses n
multipliers, but only n
delay
units, at the expense of requiring 3n
adders. To
use this structure, specify the coefficients in wave digital filter
(WDF) form. Obtain the WDF equivalent of the conventional allpass
coefficients using allpass2wdf(allpass_coefficients)
.
To convert WDF coefficients into the equivalent allpass polynomial
form, use wdf2allpass(WDF coefficients)
. In this
secondorder section of the WDF structure, the coefficients vector w is
equal to allpass2wdf([0.1 0.7])
.
This lattice structure uses 2n
multipliers, n
delay
units, and 2n
adders. To use this structure, specify
the coefficients as a vector.
You can obtain the lattice equivalent of the conventional allpass
coefficients using transpose(tf2latc(1, [1 allpass_coefficients]))
.
In the following secondorder section of the lattice structure, the
coefficients vector is computed using transpose(tf2latc(1,
[1 0.1 0.7]))
. Use these coefficients for a filter that
is functionally equivalent to the minimum multiplier structure with
coefficients [0.1 0.7].
[1] Regalia, Philip A. and Mitra Sanjit K. and Vaidyanathan, P. P. (1988) "The Digital AllPass Filter: AVersatile Signal Processing Building Block." Proceedings of the IEEE, Vol. 76, No. 1, 1988, pp. 19–37
[2] M. Lutovac, D. Tosic, B. Evans, Filter Design for Signal Processing Using MATLAB and Mathematica. Prentice Hall, 2001