Nuhertz

FIR Filters


Flash Menu

Go Direct to:

Introduction Sin(X)/X Compensation FIR Window Filters
Remez Filter FIR Communications Filters FIR Analog Approximations
Optimization Options   .

On Other Pages: IIR Digital Filters


Introduction

FIR, or Finite Impulse Response, filters have the distinctive trait that their impulse response lasts for a finite duration of time as opposed to IIR, or Infinite Impulse Response, filters whose impulse response is infinite in duration. This trait is due to the fact that there are no feedback paths in the filter. All Z transform terms are in the numerator. Z transforms written in the Z**-1 notation only contain a "1" in the denominator. Z transforms written in the Z**+1 notation, as in Filter Solutions, only have a Z**N in the denominator, where N is the number of states in the filter. Filter Solutions 5.2.2 or later is recommended for FIR Filters

FIR filters offer several advantages over IIR filters:

FIR filters also come with some disadvantages as well:

Filter Solutions allows up to 1000 taps to create your FIR filter.

Back to Top

 

Sin(x)/x Compensation
To compensate for Sin(X)/X due to sampling, the option exists to insert an approximate X/Sin(X) into the FIR Z transform to offset the effect of sampling. Filter Solutions offers 1st, 2nd, and 3rd order compensations that maintain the FIR characteristic of the filter and approximate X/Sin(X) that are valid for frequencies up to half the sample rate. You may view the effect of this compensation by viewing the magnitude response of a high pass or band stop filter at half the sample rate. The graph below shows Filter Solutions' 3rd order compensation against the ideal compensation. More detailed information is available in the Filter Solutions Help file.

FIR Sin(x)/X Compensation
FIR 3rd Order Sin(X)/X Compensation.
Sample Rate = 20 Hz

Back to Top

 

FIR Window Filters

The FIR filters Rectangular, Bartlett, Hanning, Hamming, Blackman, Kaiser, and Dolph-Chebyshev are all Window FIR filters. The name "Window" comes from the fact that these filters are created by scaling a sinc (SIN(X)/X) pattern with a window to produce the desired frequency effect. All Filter Solutions FIR Window filters create the same sinc pattern, which is the Fourier Transform of a square pulse. The FIR selection then determines the window to use to scale the sinc pattern and thereby create the desired filter. If you look closely at the windows shown below, they are all similar, but unique. The Kaiser and Dolph-Chebyshev are adjustable. It is the uniqueness of each window that creates a unique FIR Window filter.

 

This is a sinc pattern for the 29 tap low pass filter depicted in the subsequent table. It is used in the initial step of creating the FIR filter. The number of taps is the order of the filter plus 1 to account for the 0 term. The value of the taps at the sinc curve is scaled by the window and then is installed directly into the Z transform numerator.

Sync Pattern
29 Tap Sinc Pattern for FIR Window filter

 

This table depicts the various window functions supported by Filter Solutions. The above sinc pattern, H(n), is scaled by one of the below windows, W(n), to create the final Z transform numerator. Each "n" on the X axis becomes a Z**n in the Z Transform. The references to N in the equations refers to the total number of taps in the filter, 29 in this example.

Window 29 Tap Frequency Response
Sample Rate = 10Hz, Cutoff = 1 Hz
Rectangular Window
Unity window
Rectangular Frequency Response
Bartlett Window
Triangular shaped window.
Bartlett Frequency Response
Hanning Window
Simple cosine based window.
W(n) = [1-COS(2PI * n/(N-1))]/2
Hanning Frequency Response
Hamming Window
Cosine plus offset based window with a small bias
W(n) = .54 - .46*COS(2PI * n/(N-1))
Hamming Frequency Response
Blackman Window
Complex cosine offset based window
W(n) = .42 - .50*COS(2PI * n/(N-1)) + .08*COS(4PI * n/(N-1))
Blackman Frequency Response
Blackman-Harris Window
Complex cosine offset based window
W(n) = .35875 - .48829*cos(n/(N+1)) + .14128*cos(2.*n/(N+1))-.01168*cos(3.*n/(N+1))
Blackman-Harris Frequency Responce
Kaiser Window
Window based on hyperbolic Bessel functions

The Kaiser Constant causes the width of the bell to change inversely with the constant. The traces here use a constant of 7.

The Kaiser Constant is usually placed between 1 and 12.

Kaiser Frequency Response
Dolph-Chebyshev Window
Window calculated from the inverse Fourier transform of circular and hyperbolic Chebyshev functions.

The stop band attenuation is partially controllable as a direct input to the Dolph-Chebyshev window equations. The traces here use a stop band attenuation of 70dB. The frequency response at the right achieved about 65-75 dB attenuation.

Dolph-Chebyshev Frequency Response

Back to Top

 

Remez Filter

The Remez Filter is by far the most computationally intensive FIR filter offered by Filter Solutions. It is not a window filter, but is generated with iterative error-reducing algorithms designed to reduce the passband error. In addition to allowing stop band ratio and frequency definition, the Remez filter allows the "Ripple Ratio" to be defined as well. The ripple ratio is defined to be the arithmetic passband ripple divided by twice the arithmetic stop band ripple. The Remez filter always contains an odd number of taps. If an even number is entered, Filter Solutions will reduce the tap count by one, and create the filter with an odd number of taps.

The following frequency trace is a Remez filter with 27 taps, 1Hz pass band frequency, ripple ratio of 50, and stop band frequency of 1.9 Hz.

 

Remez Frequency Response
27 Tap Remez Filter

Back to Top

 

FIR Communications Filters

The FIR filters of Raised Cosine, Root Raised Cosine, Cosine, Sine, and Matched are generally for use in communications applications, and supported only in the low pass form.


Raised Cosine Filter

The ideal raised cosine filter frequency response consists of unity gain at low frequencies, a raised cosine function in the middle, and total attenuation at thigh frequencies. The width of the middle frequencies are defined by the roll off factor constant Alpha, (0<Altpha<1). In Filter Solutions, the pass band frequency is defined as the 50% signal attenuation point.

When the pass band frequency of a raised cosine filter is set to half the sample rate, then the impulse response Nyquist's first criteria is satisfied in that the impulse response is zero for T = NTs, where N is an integer, and T is the sample rate.

Mathematically, the frequency response may be written as:

Raised Cosine Equation


The ideal raised cosine filter frequency response is shown below:

Raised Cosine Frequency Response
Ideal Raised Cosine Frequency Response

 

Root Raised Cosine Filter

The ideal root raised cosine filter, frequency response consists of unity gain at low frequencies, the square root of raised cosine function in the middle, and total attenuation at thigh frequencies. The width of the middle frequencies are defined by the roll off factor constant Alpha, (0<Alpha<1). In Filter Solutions, the pass band frequency is defined as the .707 half power point.

The root raised cosine filter is generally used in series pairs, so that the total filtering effect is that of a raised cosine filter.


Mathematically, the frequency response may be written as:

Root Raised Cosine Equation

 

The ideal root raised cosine filter frequency response is shown below:

Root Raised Cosine Frequency Response
Ideal Root Raised Cosine Frequency Response


Cosine Filters

The ideal cosine filter, sometimes referred to as a duobinary filter, frequency response consists of a cosine function at low frequencies, and total attenuation at thigh frequencies. In Filter Solutions, the pass band frequency is set to the infinite attenuation point. Nyquist's first criteria may be satisfied by the cosine filter when used in conjunction with bipolar signaling.

Mathematically, the frequency response of the cosine filter may be written as:

Cosine Equation


The ideal cosine filter frequency response is shown below:

Cosine Frequency Response
Ideal Cosine Filter Frequency Response


Sine Filters

The ideal sine filter frequency, sometimes referred to as a modified duobinary filter, response consists of a sine function at low frequencies, and total attenuation at thigh frequencies. In Filter Solutions, the pass band frequency is set at the infinite attenuation point. Nyquist's first criteria may be satisfied by the sine filter when used in conjunction with bipolar signaling. The sine filter has the advantage over a cosine filter in that the PSD is null at DC.

Mathematically, the frequency response of the cosine filter may be written as:

Sine Equation


The ideal sine filter frequency response is shown below:

Sine Frequency Response
Ideal Sine Filter Frequency Response


Matched Filters

In addition to FIR matched filters, Filter Solutions supports passive, active, and digital IIR matched filters. It is possible, however, to create much more accurate FIR matched filters than those other methods.

The distinguishing characteristic of a Matched Filter is the step response approximating a ramp, and the impulse response approximates a pulse. The purpose of the Matched Filter is to maximize the signal to noise ratio and to minimize the probability of undetected errors received from a signal.

Filter Solutions allows you to define your Matched Filter by setting the rise time of the ramp. Filter Solutions will automatically set your sample rate to the value needed to create your matched filter with the order and rise time you define. The proper use of the matched filter is to set the rise time to be equal to the pulse width of the pulses in a bit stream.

The ideal matched filter step and impulse response is shown below.

Matched Time Response
Ideal Matched Filter Time Response

Back to Top

 

FIR Analog Approximations

Filter Solutions supports FIR approximations of all supported analog filters. This is advantageous when only a limited number of bits for precision are available to create a desired IIR filter. IIR filters, especially those of Standard Form implementation, are more susceptible to finite precision error than FIR filters. IIR filters may go unstable if not enough precision is available to build the desired filter. FIR filters never go unstable. FIR filter coefficients are always between +1 and –1, which may allow for greater ease when computing with fixed point arithmetic.

The FIR filter is created by directly encoding the sampled analog filter impulse response directly into the FIR Z transform. Filter Solutions allows you to enter the desired sample rate and FIR tap number to create an FIR approximation.

Back to Top

 

Optimization Options

High pass, band pass, and band stop FIR filters are all derived from low pass FIR filters. The translation from the low pass filter provides some flexibility in optimizations for the final filter design. Two optimization options are provided. One option optimizes high pass and band pass filters for infinite attenuation at 0Hz (zero hertz), and the other option optimizes for increased attenuation in the stop band. Neither option is considered better or worse. The requirements of your filter application will determine which one to use.

 

Optimization Option 1
Option 1: Infinite Attenuation at DC
Optimization Option 2
Option 2: Increased Attenuation in the Finite Stop Band