Key focus: Equivalent noise bandwidth (ENBW), is the bandwidth of a fictitious brick-wall filter that allows same amount of noise as a window function. Learn how to calculate ENBW in applications involving window functions and FFT operation.
FFT and spectral leakage
As we know, the DFT operation can be viewed as processing a signal through a set of filter banks with bandwidth Δf centered on the bin (frequency) of interest (Figure 1). To accurately resolve the frequency component in each bin, we desire the resolution bandwidth Δf to be as small as possible. In effect, each filter filter bank is viewed as filter having a brick-wall response with narrow bandwidth. If the signal under study contains several spectral components and broadband noise, the computed amplitude of the DFT output in each bin (filter bank) is significantly affected by the noise contained in the corresponding bandwidth of the filter bank.
In reality, signals are of time-limited nature and nothing can be known about the signal beyond the measured interval. When the time-limited signal slice is subjected to analysis using FFT algorithm (used for computing DFT), the FFT implicitly assumes that the signal essentially repeats itself after the observed interval. This may lead to discontinuities at the edges of each slice, that causes the energy contained in each frequency bin to spill into other bins. This phenomenon is called spectral leakage.
Here is an article with illustrations on – FFT slices and the phenomenon of spectral leakage,
Hence, to suppress the spectral leakage, the signals are multiplied with a window function so as to smooth the discontinuity at the edges of the FFT slices. As a result, the choice of window function affects the amount of signal and noise that goes inside each filter bank. Hence the amount of noise that gets accumulated into each filter bank is affected by the bandwidth of the chosen window function. In effect, the amplitude estimate in each frequency bin is influenced by the amount of accumulated noise contributed by the window function of choice. In other words, the noise floor displayed at the FFT output, varies according to the window of choice.
Equivalent noise bandwidth
Equivalent noise bandwidth (ENBW), often specified in terms of FFT bins, is the bandwidth of a fictitious brick-wall filter such that the amount of noise power accumulated inside the brick-wall filter is same as the noise power accumulated when processing white noise through the chosen window.
In other words, in frequency domain, the power accumulated in the chosen window is given by
Then we wish to find the equivalent noise bandwidth Benbw, such that
where f0 is the frequency at which the power peaks and Pbrick-wall is the power accumulated in the fictitious rectangular window of bandwidth Benbw.
Therefore, the equivalent noise bandwidth Benbw is given by
Translating to discrete domain, the equivalent noise bandwidth can be computed using DFT samples as
where, k0 is the index at which the magnitude of FFT output is maximum and N is the window length. Applying Parseval’s theorem and with a window of length L, Benbw can also be computed using time domain samples as
ENBW is a commonly used metric to characterize the variation in the displayed noise floor if a non rectangular window is used. If noise floor measurements are desired, the ENBW correction factor need to be applied to account for the variation in the noise floor [1].
Following figure illustrates the equivalent noise bandwidth illustrated for Hann window.
Python script
ENBW can be calculated from the time domain samples in a straightforward manner. Following Python 3.0 script calculates the ENBW for some well-known window functions provided as part of Scipy module↗.
#Author : Mathuranathan Viswanathan for gaussianwaves.com
#Date: 13 Sept 2020
#Script to calculate equivalent noise bandwidth (ENBW) for some well known window functions
import numpy as np
import pandas as pd
from scipy import signal
def equivalent_noise_bandwidth(window):
#Returns the Equivalent Noise BandWidth (ENBW)
return len(window) * np.sum(window**2) / np.sum(window)**2
def get_enbw_windows():
#Return ENBW for all the following windows as a dataframe
window_names = ['boxcar','barthann','bartlett','blackman','blackmanharris','bohman','cosine','exponential','flattop','hamming','hann','nuttall','parzen','triang']
df = pd.DataFrame(columns=['Window','ENBW (bins)','ENBW correction (dB)'])
for window_name in window_names:
method_name = window_name
func_to_run = getattr(signal, method_name) #map window names to window functions in scipy package
L = 16384 #Number of points in the output window
window = func_to_run(L) #call the functions
enbw = equivalent_noise_bandwidth(window) #compute ENBW
df = df.append({'Window': window_name.title(),'ENBW (bins)':round(enbw,3),'ENBW correction (dB)': round(10*np.log10(enbw),3)},ignore_index=True)
return df
df = get_enbw_windows() #call the function
df.head(14) #display dataframe
The resulting output is displayed in the following table (dataframe)
As an example, the following plot depicts the difference in the noise floor of FFT output of a noise added sine wave that is processed through Boxcar and Flattop window.
Continue reading on Window function and figure of merits…
Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.
Reference
Similar articles
[1] Understanding Fourier Series
[2] Introduction to digital filter design
[3] Design FIR filter to reject unwanted frequencies
[4] FIR or IIR ? Understand the design perspective
[5] How to Interpret FFT results – complex DFT, frequency bins and FFTShift
[6] How to interpret FFT results – obtaining magnitude and phase information
[7] Analytic signal, Hilbert Transform and FFT
[8] FFT and spectral leakage
[9] Moving average filter in Python and Matlab
[10] Window function – figure of merits
[11] Equivalent noise bandwidth of window functions