主要内容

Multistage Halfband IIR Filter Design

这个例子展示了如何设计多级halfband IIR decimators.

类似于FIR多晶过滤器,可以使用有效的多相结构来实现IIR半带删除器和插值器。IIR多相过滤器呈现出几个有趣的属性。这些过滤器需要少量的乘数来实现,它们本质上是稳定的,具有较低的圆噪声灵敏度,并且没有极限周期。

Butterworth and elliptic IIR filters can be designed with a halfband decimator and interpolator response type. Furthermore, it is possible to achieve almost linear phase response using specialized IIR design algorithms.

成本效率案例研究

测量过滤器的计算成本的一种方法是确定每个输入样本(MPI)需要计算多少次数(平均)。考虑一个MPIS计数案例研究:用于以下滤波器规格的FIR与IIR。

Fs = 9.6e3;% Sampling frequency: 9.6 kHzTW = 120;%过渡宽度AST = 80;% Minimum stopband attenuation: 80 dBM = 8;% Decimation factorNyquistDecimDesign = fdesign.decimator(M,'Nyquist',M,TW,Ast,Fs);

Multistage Halfband FIR Design

获得有效的FIR设计的一种方法是使用多阶段多阶段技术。该设计导致三个FIR半频带脱离器中的级联脱离器。半带滤波器非常有效,因为其他每个系数都是零。

MultistageFIRDecim = design(NyquistDecimDesign,“多阶段”,...'HalfbandDesignMethod','equiripple','SystemObject',true); cost(MultistageFIRDecim)
ans =带有字段的结构:数字效率:69个数字:126 MultiplicationsPerinputSample:12.8750 AddeDsperInputSample:12

该方法平均达到12.875 MPI的计算成本。

Multistage Halfband IIR Design

Elliptic filters are the IIR equivalent of optimal equiripple filters. This design results in three IIR halfband decimators in cascade. Elliptic designs produce the most efficient IIR halfband designs.

MultistageIIRDecim = design(NyquistDecimDesign,“多阶段”,...'HalfbandDesignMethod',“椭圆”,'SystemObject',true); cost(MultistageIIRDecim)
ans =带有字段的结构:NumCoefficients: 11 NumStates: 17 MultiplicationsPerInputSample: 2.5000 AdditionsPerInputSample: 5

该方法平均仅达到2.5 mpis的计算成本。

If we overlay the magnitude responses of the FIR and IIR multirate multistages filters, the two filters look very similar and both meet the specifications.

fvFig = fvtool(MultistageFIRDecim,MultistageIIRDecim); legend(fvFig,“多阶段/多阶段FIR多相”,...'Multirate/Multistage IIR Polyphase')

图量响应(DB)包含一个轴对象。带有标题幅度响应(DB)的轴对象包含3个类型线的对象。这些对象代表多阶段/多阶段FIR多相,多阶段/多阶段IIR多相。

仔细检查实际上显示了IIR滤波器的通带波纹,远远超过了FIR滤波器的通道。因此,节省计算成本并不能以降级响应的价格产生。

zoom(fvFig,[0 0.325 -0.0016 0.0016])

图量响应(DB)包含一个轴对象。带有标题幅度响应(DB)的轴对象包含3个类型线的对象。这些对象代表多阶段/多阶段FIR多相,多阶段/多阶段IIR多相。

Quasi-Linear Phase Halfband IIR Designs

通过修改用于实现每个IIR半带滤波器的结构,可以使用IIR过滤器实现几乎线性相设计。该设计还导致级联中的三个半带窃器。但是,每个半带都是以特定方式实现的,该方式包括与Allpass过滤器并行连接的纯延迟。对实现的限制有助于提供准线性相响应。与椭圆设计相比,这是以略有计算成本增加的代价。

iirlinearphaseFilt = Design(NyquistDecimdesign,“多阶段”,...'HalfbandDesignMethod','iirlinphase','SystemObject',true); cost(IIRLinearPhaseFilt)
ans =带有字段的结构:数字效率:25个数字:55 MultiplicationsPerinputSample:4.3750 AddsperInputSample:8.7500

Although not as efficient as the elliptic case, the design is nevertheless more efficient than using FIR halfbands.

小组延迟比较

Overlaying the group delay of the three designs, and focusing on the passband of the filter (the area of interest), we can verify that the latter IIR design achieves quasi-linear phase (almost flat group delay) in that area. In contrast, the elliptic filter, while more efficient (and with a lower group delay overall), has a clearly nonlinear phase response.

fvfig = fvtool(多稳态二十字,多稳态,iirrinearphasefilt,...'分析','grpdelay');Zoom(FVFIG,[0 0.6 0 225]);传奇(fvfig,'Linear-Phase FIR',“非线性相椭圆形IIR”,...'准线性阶段iir')

Figure Group delay contains an axes object. The axes object with title Group delay contains 3 objects of type line. These objects represent Linear-Phase FIR, Nonlinear Phase Elliptic IIR, Quasi-Linear Phase IIR.

固定点的鲁棒性

Polyphase IIR filters can be implemented in different ways. We have already encountered single-rate and multirate cascade allpass in previous sections. Now take a Hilbert transformer for example. A quasi linear-phase IIR Hilbert filter with a transition width of 96Hz and a maximum passband ripple of 0.1 dB can be implemented as a cascade wave digital filter using only 10 MPIS compared to 133 MPIS for an FIR equivalent.

hilbertdesign = fdesign.hilbert('TW,Ap',96,.1,fs);Hilbertiirfilt = Design(Hilbertdesign,'iirlinphase',...'FilterStructure',“ cascadewdfallpass”,...'SystemObject',true); cost(HilbertIIRFilt)
ans =带有字段的结构:NumCoefficients: 10 NumStates: 33 MultiplicationsPerInputSample: 10 AdditionsPerInputSample: 25

Wave digital filters have been proven to be very robust even when poles are close to the unit circle. They are inherently stable, have low roundoff noise properties and are free of limit cycles. To convert our IIR Hilbert filter to a fixed-point representation, we can use therealizemdl命令和固定点工具,以对Simulink®模型的定点转换执行浮点。万博1manbetx

realizemdl(Hilbertiirfilt)

概括

传统上,IIR过滤器被认为比其FIR对应物要高得多,因为它们需要少量的系数才能满足给定的一组规格。

Modern FIR filter design tools utilizing multirate and polyphase techniques have bridged the gap while providing linear-phase response along with good sensitivity to quantization effects and the absence of stability and limit cycles problems when implemented in fixed-point.

However, IIR polyphase filters enjoy most of the advantages that FIR filters have and require a very small number of multipliers to implement.