| Filter Design Toolbox | ![]() |
Design a constrained least P-norm optimal IIR filter
Syntax
[num,den] = iirlpnormc(n,d,f,edges,a) [num,den] = iirlpnormc(n,d,f,edges,a,w) [num,den] = iirlpnormc(n,d,f,edges,a,w,radius) [num,den] = iirlpnormc(n,d,f,edges,a,w,radius,p) [num,den] = iirlpnormc(n,d,f,edges,a,w,radius,p,dens) [num,den] = iirlpnormc(n,d,f,edges,a,w,radius,p,... dens,initnum,initden)
Description
[num,den] = iirlpnormc(n,d,f,edges,a)
returns a filter having a numerator order n and denominator order d which is the best approximation to the desired frequency response described by f and a in the least-pth sense. The vector edges specifies the band-edge frequencies for multi-band designs. A constrained Newton-type algorithm is employed. n and d should be chosen so that the zeros and poles are used effectively. See the "Hints" section. Always check the resulting filter using freqz.
[num,den] = iirlpnormc(n,d,f,edges,a,w)
uses the weights in w to weight the error. w has one entry per frequency point (the same length as f and a) which tells iirlpnormc how much emphasis to put on minimizing the error in the vicinity of each frequency point relative to the other points. f and a must have the same number of elements, which can exceed the number of elements in edges. This allows for the specification of filters having any gain contour within each band. The frequencies specified in edges must also appear in the vector f. For example,
designs a lowpass filter with a peak of 1.6 within the passband.
[num,den] = iirlpnormc(n,d,f,edges,a,w,radius)
returns a filter having a maximum pole radius of radius where 0<radius<1. radius defaults to 0.999999. Filters having a reduced pole radius may retain better transfer function accuracy after you quantize them.
[num,den] = iirlpnormc(n,d,f,edges,a,w,radius,p)
where p is a two-element vector [pmin pmax] allows for the specification of the minimum and maximum values of p used in the least-pth algorithm. Default is [2 128] which essentially yields the L-infinity, or Chebyshev, norm. pmin and pmax should be even. If p is the string 'inspect', no optimization will occur. This can be used to inspect the initial pole/zero placement.
specifies the grid density [num,den] = iirlpnormc(n,d,f,edges,a,w,radius,p,dens)
dens used in the optimization. The number of grid points is (dens*(n+d+1)). The default is 20. dens can be specified as a single-element cell array. The grid is not equally spaced.
[num,den] = iirlpnormc(n,d,f,edges,a,w,radius,p,dens,... allows for the specification of the initial estimate of the filter numerator and denominator coefficients in vectors
initnum,initden)
initnum and initden. This may be useful for difficult optimization problems. The pole-zero editor in the Signal Processing Toolbox can be used for generating initnum and initden.
See Also
freqz, filter, iirgrpdelay, iirlpnorm, zplane
References
Antoniou, A., Digital Filters: Analysis, Design, and Applications, Second Edition, McGraw-Hill, Inc. 1993.
| iirlpnorm | iirnotch | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2008 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |