File:Spectral leakage from two 8-point Hamming windows.png

Summary

Description
English: Comparing the discrete-time Fourier transforms of "symmetric" and "periodic" windows. The Hamming form was chosen for its non-zero end-points, one of which is discarded in the periodic version, resulting in an improved (narrower) main lobe.
Date
Source Own work
Author Bob K
Permission
(Reusing this file)
I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Spectral%20leakage%20from%20two%208-point%20Hamming%20windows.png
Category:Self-published work
PNG development
InfoField
Octave/gnuplot source
InfoField
click to expand

This graphic was created by the following Octave script: <source lang='Matlab'> graphics_toolkit gnuplot pkg load signal

N = 8; symmetric = .54 - .46*cos(2*pi*(0:N-1)/(N-1));  % 8-point Hamming window periodic = .54 - .46*cos(2*pi*(0:N-1)/N);  % 8-points of a 9-point window

L=64*N; dr = 60;

H = abs(fft([symmetric zeros(1,L-N)])); H = fftshift(H); H = H/max(H); H = 20*log10(H); H = max(-dr,H); x = N*[-L/2:L/2-1]/L;

figure plot(x, H, 'color', 'blue', 'linewidth', 2) hold on ylim([-dr 0])

H = abs(fft([periodic zeros(1,L-N)])); H = fftshift(H); H = H/max(H); H = 20*log10(H); H = max(-dr,H); plot(x, H, 'color', 'red', 'linewidth', 2);

set(gca,'XTick', -N/2:N/2-1) grid on ylabel('decibels') xlabel('DFT bins')

text(2, -23, '\leftarrow Symmetric', 'color', 'blue','FontSize', 14) text(.30, -26, 'Periodic \rightarrow', 'color', 'red','FontSize', 14) title('"Spectral leakage" from two 8-point Hamming windows','FontSize', 14) </syntaxhighlight>

Category:Digital signal processing Category:Window function Category:Created with GNU Octave Category:Images with Octave source code Category:Images with Gnuplot source code
Category:CC-Zero Category:Created with GNU Octave Category:Digital signal processing Category:Images with Gnuplot source code Category:Images with Octave source code Category:PNG created with Octave Category:Self-published work Category:Window function