Summary
Design an oversampled FIR filter with a Kaiser window.
Unit
SignalUtils
Declaration
Function FractionalKaiserImpulse(H: TVec; W: array of TSample; Ripple, Offset, Step: TSample; FilterType: TFilterType; ExtraSample: boolean = True; Gain: TSample = 1; FS: TSample = 2): integer;
Description
Compute a FIR impulse response filter with kaiser window applied and place the result in H. The transition regions are defined with the W array. There must be at least one and at most two transition regions (2 or 4 elements). Filter type is defined with TFilterType. FS is the sampling frequency. The length of the filter (H.Length) is based on the narrowest transition region in combination with the passband Ripple parameter. 20*Log10(Ripple) is also the required attenuation of the stop band in decibel. Gain defines the filter gain and Step defines the step used to compute the oversampling factor: N = Trunc(1/Step). Step and Offset must be between 0 and 1. When offset is 0 and Step is 1, the routine returns the same as KaiserImpulse routine. The resulting H vector contains FIR type impulse response, which can be passed to an interpolation routine. Oversampled FIR filters are used for implementation of fractional delay filters and resampling with an arbitrary sampling frequency.
If Step = 1 then the resulting impulse response can be passed directly to the FirInit and FirFilter routines. If Step <> 1 then the resulting impulse response must be passed to the FractionalFirInit and FractionalFirFilter routines. To design a fractional delay filter set step to 1 and Offset to the desired fractional (non-integer) delay).
If ExtraSample is True an additional sample of the impulse response is be added to the right part of the impulse response. In this case, the filter is first designed with impulse response length of Length+2 and then truncated by 1 on the left side.
The function returns the length of the non-interpolated impulse response.
Categories
FIR filter design routines| Copyright 2008 Dew Research |
http://www.dewresearch.com