Documentation |
Interpolated FIR filter from filter specification
[h,g] = ifir(l,type,f,dev)
[h,g,d] = ifir(l,type,f,dev)
[...] = ifir(...,str)
hd = ifir(d)
hd = design(d,'ifir',designoption1,value1,designoption2,value2,...)
[h,g] = ifir(l,type,f,dev) designs a periodic filter h(z^{l}), where l is the interpolation factor. It also finds an image-suppressor filter g(z), such that the cascade of the two filters forms an efficient implementation that meets the desired response. This response is specified by type, with band edge frequencies contained in vector f. This is done while not exceeding the maximum deviations or ripples (linear) specified in vector dev.
type is a string with 'low' for lowpass designs or 'high' for highpass designs. f is a two-element vector with passband and stopband edge frequency values. For narrowband lowpass filters and wideband highpass filters, l×f(2) is less than 1. For wideband lowpass filters and narrowband highpass filters, specify f so that l×(1–f(1)) is less than 1.
dev is a two-element vector that contains the peak ripple or deviation (linear) allowed for both the passband and the stopband.
The ifir design algorithm achieves an efficient design in the sense that it reduces the total number of multipliers required. To do this, the design problem is broken into two stages. In the first stage, the filter is upsampled to achieve the stringent specifications without using many multipliers. In the second stage, the filter removes the images created when upsampling the previous filter.
[h,g,d] = ifir(l,type,f,dev) returns a delay d that is connected in parallel with the cascade of h(z^{l}) and g(z) for both wideband lowpass and highpass filters. This is necessary to obtain the desired response.
[...] = ifir(...,str) uses the string specified in str to choose the algorithm level of optimization used. Possible values for str are 'simple', 'intermediate' (default) or 'advanced'. str provides for a tradeoff between design speed and filter order optimization. The 'advanced' option can result in substantial filter order reduction, especially for g(z).
hd = ifir(d) designs an FIR filter from design object d, using the interpolated FIR method. ifir returns hd as a cascade of two filters that act together to meet the specifications in d. The resulting filter is particularly efficient, having a low number of multipliers. However, if ifir determines that a single-stage filter is more efficient than the default two-stage design, it returns hd as a single-stage filter. ifir creates only linear phase filters. Generally, ifir uses an advanced optimization algorithm to create highly efficient FIR filters.
ifir returns hd as a single-rate dfilt object or a multirate mfilt object, based on the filter specifications you provide.
hd = design(d,'ifir',designoption1,value1,designoption2,value2,...) returns an interpolated FIR filter using the design options you specify.
To determine the available design options, use designopts with the specification object and the design method as input arguments:
designopts(d,'method')