What are Fir Filters? All You Need to Know

648 views

In the realm of signal processing, filtering stands as a crucial operation aimed at eliminating undesirable components from a signal. Among the diverse array of filters, finite impulse response (FIR) filters occupy a notable position, and this discourse delves into their intricacies. Following a brief elucidation on digital filters as a whole, we delve into the structure and functionality specific to FIR filters. Conclusively, we offer insights into the integration of FIR filters within our measurement software, OXYGEN.

What constitutes digital filters in a broader context?

Digital filters encompass mathematical algorithms designed to manipulate signals, extracting pertinent information while discarding unwanted components, thereby facilitating actions like blocking or passing specific frequency ranges. Essentially, they function as digital systems that transform input sequences into output sequences through a defined process.

Diverse filter classes exist, yet based on their impulse response duration, digital filters can be classified into two primary categories:

  • Infinite impulse response (IIR)
  • Finite impulse response (FIR)

Unlike analog filters, which rely on electronic components like capacitors, coils, and resistors, digital filters are actualized using logic devices such as ASICs or FPGAs, or they manifest as sequential programs executed on signal processors.

What distinguishes IIR from FIR filters?

In essence, the disparity lies in how a filter responds to an input impulse. When the filter’s impulse response diminishes to zero within a finite time span, it’s labeled as an FIR filter (Finite Impulse Response). Conversely, if the impulse response extends indefinitely, it denotes an IIR filter (Infinite Impulse Response). The determination of whether a digital filter’s impulse response reaches zero within a finite time hinges on the method employed to compute output values. In FIR filters, output values are solely contingent upon current and preceding input values, whereas in IIR filters, output values also factor in preceding output values.

The superiority of IIR filters over FIR filters stems from several factors: IIR filters typically demand fewer coefficients for comparable filtering tasks, operate with greater speed, and necessitate less memory. Nonetheless, IIR filters exhibit a significant drawback in their non-linear phase response. Consequently, they are best suited for applications where phase information is irrelevant, such as monitoring signal amplitude. Conversely, FIR filters are preferred for applications necessitating a linear phase response.

How do Finite Impulse Response (FIR) filters operate?

As depicted in Fig. 1, the functional mechanism of an FIR filter is elucidated. Initially, the input data/values x(n) are supplied to the filter via the A/D converter, sequentially processed clock by clock (sample by sample).

The upper row features shift elements (z-1) responsible for shifting the applied data/values at the input by one step per clock cycle. Consequently, in the subsequent example, the value x(n-3) will be positioned three clocks prior to the current value x(n). Positioned centrally are the FIR coefficients denoted as k0 – km. These coefficients effectively function as amplifiers, augmenting the input values by a specified gain “k”. Occupying the bottom row is the summation branch tasked with aggregating the outcomes of all multiplications (integration). The resultant output y(n) reflects the processed signal in accordance with the FIR coefficients and can be mathematically expressed as follows:

Calculation process of a FIR filter

In our white paper, we offer an extensive illustration detailing the process of determining the filter coefficients for an FIR low-pass filter.

FIR Filters within OXYGEN

OXYGEN stands as our user-friendly test and measurement software, encompassing a comprehensive suite of tools for measurement, visualization, and analysis across diverse applications. Among its myriad features, OXYGEN incorporates a broad spectrum of functionalities, including FIR filters.

This intuitive tool enables users to select from four distinct filter types:

Upon selection, users simply input the filter length, specify the desired window function, and indicate whether compensation for signal delay is required. Subsequently, users are primed for operation. For a more in-depth walkthrough on configuring an FIR filter within OXYGEN, please refer to our white paper.