Main Content

dsp.AllpassFilter

单部分或级联的Allpass过滤器

Description

dsp.AllpassFilter对象使用Allpass过滤器实现来过滤输入的每个通道。将此对象导入simulink金宝app®,,,,use the MATLAB®System block.

笔记

细胞阵列支持金宝appallpassce效率,,,,WDFCoefficients, 和LatticeCoefficients已被删除。使用n-by-1或n-by-2数字阵列。有关更多信息,请参阅兼容性的考虑

要过滤输入的每个通道:

  1. Create thedsp.AllpassFilterOBJect and set its properties.

  2. Call the object with arguments, as if it were a function.

要了解有关系统对象如何工作的更多信息,请参阅What Are System Objects?

Creation

Description

全部pass= DSP.AllPassFilterreturns an allpass filter System object™,全部pass,通过使用默认结构和系数独立过滤输入信号的每个通道。

例子

全部pass= DSP.AllPassFilter((名称,价值returns an allpass filter System object,全部pass,,,,with each property set to the specified value.

Properties

expand all

Unless otherwise indicated, properties arenontunable,,,,which means you cannot change their values after calling the object. Objects lock when you call them, and the发布function unlocks them.

If a property istunable,您可以随时更改其价值。

For more information on changing property values, see使用系统对象在MATLAB中的系统设计

You can specify the internal allpass filter implementation structure as one of |最小乘数|Lattice|Wave Digital Filter。Each structure uses a different set of coefficients, independently stored in the corresponding object property.

指定真实的Allpass多项式滤波器系数。将此属性指定为n——- - - - - -1orn——- - - - - -2矩阵n一阶或二阶Allpass部分。这default value defines a stable second-order allpass filter with poles and zeros located at ±π/3 in the Z plane.

可调:Yes

Dependencies

此属性仅适用于结构属性设置为最小乘数

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64

Specify the real allpass coefficients in the Wave Digital Filter form. Specify this property as either an——- - - - - -1orn——- - - - - -2矩阵n一阶或二阶Allpass部分。所有元素的绝对值必须小于或等于1。此值是默认值的转换版本allpassce效率,,,,Computed usingallpass2wdf(allpassceficients)。这se coefficients define the same stable second-order allpass filter as when结构is set to“最小乘数”

可调:Yes

Dependencies

仅在结构属性设置为Wave Digital Filter

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64

Specify the real or complex allpass coefficients as lattice reflection coefficients. Specify this property as either a row vector (single-section configuration) or a column vector. This value is a transformed and transposed version of the default value ofallpassce效率,,,,Computed using转置(TF2LATC([1 H.Allpassceefficients])))))。这se coefficients define the same stable second-order allpass filter as when结构is set to'格子'

可调:Yes

Dependencies

This property is applicable only if the结构属性设置为Lattice

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64
复杂的数字支持:金宝appYes

Indicate if last section is first order or second order. When you setTrailingFirstOrderSectiontotrue,最后一节被认为是一阶,也是最后一行的第二个元素n——- - - - - -2矩阵is ignored. When you setTrailingFirstOrderSectionto错误的,最后一部分被认为是二阶。

用法

Description

例子

y= allpass(Xfilters the input signalXusing an allpass filter to produce the outputy。Each column ofX随着时间的推移,将其独立过滤为单独的通道。

输入参数

expand all

数据输入,,,,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.

Data Types:single|double
复杂的数字支持:金宝appYes

Output Arguments

expand all

过滤输出,返回为矢量或矩阵。输出信号的大小,数据类型和复杂性匹配输入信号的大小。

Data Types:double|single
复杂的数字支持:金宝appYes

对象功能

要使用对象函数,请将系统对象指定为第一个输入参数。例如,释放名称的系统对象的系统资源OBJ,,,,use this syntax:

释放(OBJ)

expand all

弗雷克斯 Frequency response of discrete-time filterSystem object
fvtool 可视化DSP过滤器的频率响应
impz 离散时间过滤器的脉冲响应System object
信息 有关过滤器的信息System object
系数 返回过滤器System objectCoefficients in a structure
Cost Estimate cost of implementing filterSystem object
grpdelay 离散时间过滤器的组延迟响应System object
step RunSystem object算法
发布 释放资源并允许更改System object属性值和输入特征
reset Reset internal states ofSystem object

Examples

全部收缩

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

构建Allpass过滤器

Fs = 48000;% in HzFL = 1024;apf1 = dsp.allpassfilter('AllpassCoefficients',,,,。。。[[-0.710525516540603 0.208818210000029]); APF2 = dsp.AllpassFilter('AllpassCoefficients',,,,。。。[[-0.940456403667957 0.6;。。。-0.324919696232907 0],。。。'TrailingFirstOrderSection',,,,true);

Construct the Transfer Function Estimator to estimate the transfer function between the random input and the Allpass filtered output

tfe = dsp.transferfunctionEstimator(“FrequencyRange',,,,。。。'onesided',,,,'SpectralAverages',2);

Construct the ArrayPlot to plot the magnitude response

AP = dsp.ArrayPlot(“ plottype',,,,'线',,,,'ylimits',[-80 5],。。。'YLabel',,,,“大小(db)”,,,,'SampleIncrement',,,,Fs/FL,。。。'xlabel',,,,“频率(Hz)”,,,,'Title',,,,“大小响应”,,,,。。。“ Showlegend”,,,,true,'ChannelNames',,,,{“大小响应”});

Filter the Input and show the magnitude response of the estimated transfer function between the input and the filtered output

tic;尽管toc < 5 in = randn(FL,1); out = 0.5.*(APF1(in) + APF2(in)); A = TFE(in, out); AP(db(A));结尾

算法

expand all

Allpass过滤器的传输函数由

H (( z = C (( n + C (( n 1 z 1 + 。。。 + z n 1 + C (( 1 z 1 + 。。。 + C (( n z n

Cis allpass polynomial coefficients vector. The order,n,,,,of the transfer function is the length of vectorC

在最小乘数形式和波浪数字形式中,Allpass过滤器被实现为二阶(Biquad)部分或一阶部分的级联。当系数指定为n——- - - - - -2矩阵,,,,each row of the matrix specifies the coefficients of a second-order filter. The last element of the last row can be ignored based on the trailing first-order setting. When the coefficients are specified as ann——- - - - - -1矩阵,,,,each element in the matrix specifies the coefficient of a first-order filter. The cascade of all the filter sections forms the allpass filter.

In the lattice form, the coefficients are specified as a vector.

这se 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 single-section or a multiple-section (cascaded) filter. The different sections can have different orders, but they are all implemented according to the same structure.

兼容性的考虑

expand all

Errors starting in R2018b

References

[[1这是给予的Regalia, Philip A. and Mitra Sanjit K. and Vaidyanathan, P. P. (1988) “The Digital All-Pass Filter: AVersatile Signal Processing Building Block.”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.Upper Saddle River, NJ: Prentice Hall, 2001.

Extended Capabilities

Introduced in R2013a