Skip to Main Content Skip to Search
Product Documentation

fircls - Constrained least square, FIR multiband filter design

Syntax

b = fircls(n,f,amp,up,lo)
fircls(n,f,amp,up,lo,'design_flag')

Description

b = fircls(n,f,amp,up,lo) generates a length n+1 linear phase FIR filter b. The frequency-magnitude characteristics of this filter match those given by vectors f and amp:

fircls always uses an even filter order for configurations with a passband at the Nyquist frequency (that is, highpass and bandstop filters). This is because for odd orders, the frequency response at the Nyquist frequency is necessarily 0. If you specify an odd-valued n, fircls increments it by 1.

fircls(n,f,amp,up,lo,'design_flag') enables you to monitor the filter design, where 'design_flag' can be

Examples

Design an order 150 lowpass filter:

n=150;
f=[0 0.4 1];
a=[1 0];
up=[1.02 0.01];
lo =[0.98 -0.01];
b = fircls(n,f,a,up,lo,'both');   % Display plots of bands
%  The Bound Violations indicate iterations as
%  the design converges.
fvtool(b)                         % Display magnitude plot

Algorithms

fircls uses an iterative least-squares algorithm to obtain an equiripple response. The algorithm is a multiple exchange algorithm that uses Lagrange multipliers and Kuhn-Tucker conditions on each iteration.

References

[1] Selesnick, I.W., M. Lang, and C.S. Burrus, "Constrained Least Square Design of FIR Filters without Specified Transition Bands," Proceedings of the IEEE Int. Conf. Acoust., Speech, Signal Processing, Vol. 2 (May 1995), pp.1260-1263.

[2] Selesnick, I.W., M. Lang, and C.S. Burrus. "Constrained Least Square Design of FIR Filters without Specified Transition Bands." IEEE Transactions on Signal Processing, Vol. 44, No.8 (August 1996).

See Also

fircls1 | firls | firpm

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS