Main Content

iirlpnorm

Least P-norm optimal IIR filter

Syntax

[num,den] = iirlpnorm(n,d,f,edges,a)
[num,den] = iirlpnorm(n,d,f,edges,a,w)
[num,den] = iirlpnorm(n,d,f,edges,a,w,p)
(num,窝)= iirlpnorm (n, d, f,边缘,w, p,dens)
(num,窝)= iirlpnorm (n, d, f,边缘,w, p,dens,initnum,initden)
[num,den,err] = iirlpnorm(...)
[num,den,err,sos,g] = iirlpnorm(...)

Description

[num,den] = iirlpnorm(n,d,f,edges,a)returns a filter having a numerator ordernand denominator orderdwhich is the best approximation to the desired frequency response described byfandain the least-pth sense. The vectoredgesspecifies the band-edge frequencies for multi-band designs. An unconstrained quasi-Newton algorithm is employed and any poles or zeros that lie outside of the unit circle are reflected back inside.nanddshould be chosen so that the zeros and poles are used effectively. See theHintssection. Always usefreqzto check the resulting filter.

[num,den] = iirlpnorm(n,d,f,edges,a,w)uses the weights inwto weight the error.whas one entry per frequency point (the same length asfanda) which tellsiirlpnormhow much emphasis to put on minimizing the error in the vicinity of each frequency point relative to the other points.fandamust have the same number of elements, which may exceed the number of elements inedges. This allows for the specification of filters having any gain contour within each band. The frequencies specified inedgesmust also appear in the vectorf. For example,

[num,den] = iirlpnorm(5,12,[0 .15 .4 .5 1],[0 .4 .5 1],... [1 1.6 1 0 0],[1 1 1 10 10])

is a lowpass filter with a peak of 1.6 within the passband.

[num,den] = iirlpnorm(n,d,f,edges,a,w,p)wherepis a two-element vector [pmin pmax] allows for the specification of the minimum and maximum values ofpused in the least-pth algorithm. Default is [2 128] which essentially yields the L-infinity, or Chebyshev, norm.Pminandpmaxshould be even. Ifpis'inspect', no optimization will occur. This can be used to inspect the initial pole/zero placement.

(num,窝)= iirlpnorm (n, d, f,边缘,w, p,dens)specifies the grid densitydensused in the optimization. The number of grid points is(dens*(n+d+1)). The default is 20.denscan be specified as a single-element cell array. The grid is not equally spaced.

(num,窝)= iirlpnorm (n, d, f,边缘,w, p,dens,initnum,initden)allows for the specification of the initial estimate of the filter numerator and denominator coefficients in vectorsinitnumandinitden.initnumshould be of length n+1, andinitdenshould be of length d+1. This may be useful for difficult optimization problems. The pole-zero editor in Signal Processing Toolbox™ software can be used for generatinginitnumandinitden.

[num,den,err] = iirlpnorm(...)returns the least-pthapproximation error,err.

[num,den,err,sos,g] = iirlpnorm(...)returns the second-order section representation in the matrixsosand gaing. For numerical reasons it may be beneficial to usesosandgin some cases.

Examples

Least Pth-Norm Optimal IIR Filter Design

Design a Lowpass Filter with a Peak of 4.015 dB in Passband

[num,den] = iirlpnorm(5,12,[0 .15 .4 .5 1],[0 .4 .5 1],...[1 1.6 1 0 0],[1 1 1 10 10])
num =1×60.0028 0.0036 0.0018 0.0005 0.0001 0.0000
den =1×131.0000 -6.6498 22.6915 -51.5423 85.9098 -109.9888 110.4802 -87.5412 54.2750 -25.7000 8.8451 -1.9963 0.2255

显示fvtool级反应

fvtool(num,den)

Figure Magnitude Response (dB) contains an axes object. The axes object with title Magnitude Response (dB) contains an object of type line.

Hints

  • This is a weighted least-pthoptimization.

  • Check the radii and locations of the poles and zeros for your filter. If the zeros are on the unit circle and the poles are well inside the unit circle, try increasing the order of the numerator or reducing the error weighting in the stopband.

  • Similarly, if several poles have a large radii and the zeros are well inside of the unit circle, try increasing the order of the denominator or reducing the error weighting in the passband.

References

Antoniou, A.,Digital Filters: Analysis, Design, and Applications, Second Edition, McGraw-Hill, Inc. 1993.

Extended Capabilities

Version History

Introduced in R2011a