You are here: Symbol Reference > SignalUtils Namespace > Functions > SignalUtils.FirInit Function
DSP Master VCL
ContentsIndex
PreviousUpNext
SignalUtils.FirInit Function

Initialize a FIR filter.

Pascal
procedure FirInit(const FirTaps: TVec; var FirState: TFirState; UpSample: integer = 1; UpDelay: integer = 0; DownSample: integer = 1; DownDelay: integer = 0); overload;

Initialize the FIR filter by initializing the FirState variable. FirTaps must hold the filter impulse. FirState variable must be initialized with zeros. UpSample and DownSample define the sampling frequency change by an integer factor. UpDelay defines the initial FIR filter delay when upsampling and DownDelay defines the initial FIR filter delay when downsampling. IF Upsample or DownSample are different from 1, a multirate FIR filter is initialized. Multirate FIR filters avoid computing samples which will be discarded, because of the sampling rate change. The multirate filter first performs the upsampling and then the downsampling. Fir filters convolve an impulse response with the signal [1] p. 165: 

 

       M-1
y[i] = Sum( h[k]*x[i-k] )
       k=0

x.. input signal.
h.. impulse response
y.. output signal

Convolution can also be written as: y[i] = h[k] ( * ) x[i]
In frequency domain, convolution becomes multiplication:

Y[I] = X[I]*H[I]

Y.. frequency spectrum of the output signal.
X.. frequency spectrum of the input signal.
H.. frequency spectrum of the impulse response

Impulse response for typical filter types can be designed with OptimalFir.remez, KaiserImpulse, OptimalFir.RemezImpulse and SavGolayImpulse

References:  

[1] Understanding digital signal processing, Richard G. Lyons, Prentice Hall, 2001.

Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!