Keywords: Spectral leakage from three 8-point triangular windows.png en Comparing the discrete-time Fourier transforms of symmetric and periodic windows The triangular form was chosen for its non-zero end-points one of which is discarded in the periodic version with a noticeable performance degradation Parameter L is the width of the base of the triangle in units of the sample interval Parameter N is 8 2016-04-11 own Bob K other versions Octave script <source lang Matlab > pkg load signal graphics_toolkit gnuplot clc M 7200; window triang M '; row vector N 8; window size in samples dx M/ N+1 ; decimation factor for 9 hops 10 samples symmetric9 window 1+ 1 8 dx ; sample symmetrically periodic9 window 1+ 5 7 5 dx ; sample asymmetrically dx M/N; decimation factor for 8 hops 9 samples symmetric8 window 1+ 5 7 5 dx ; sample symmetrically Compare equivalent noise bandwidths info only ENBW_symmetric9 N sum symmetric9 2 /sum symmetric9 2 ENBW_symmetric8 N sum symmetric8 2 /sum symmetric8 2 ENBW_periodic9 N sum periodic9 2 /sum periodic9 2 Plot the points figure plot 0 7 symmetric9 'color' 'blue' ' ' hold on plot 0 7 symmetric8 'color' 'green' ' ' plot 0 7 periodic9 'color' 'red' ' ' Now compute and plot the DTFTs M 64 N; dr 80; H abs fft symmetric8 zeros 1 M-N ; H fftshift H ; H H/max H ; H 20 log10 H ; H max -dr H ; x N -M/2 M/2-1/M; figure plot x H 'color' 'green' 'linewidth' 2 hold on ylim -dr 0 H abs fft periodic9 zeros 1 M-N ; H fftshift H ; H H/max H ; H 20 log10 H ; H max -dr H ; plot x H 'color' 'red' 'linewidth' 2 ; H abs fft symmetric9 zeros 1 M-N ; H fftshift H ; H H/max H ; H 20 log10 H ; H max -dr H ; plot x H 'color' 'blue' 'linewidth' 2 ; set gca 'XTick' -N/2 N/2-1 grid on ylabel 'decibels' xlabel 'DFT bins' text -1 51 -52 '\leftarrow L N+1 symmetric' 'color' 'blue' 'FontSize' 14 text 1 56 -20 3 '\leftarrow L N symmetric' 'color' 'green' 'FontSize' 14 text -3 46 -20 3 'L N+1 periodic' 'color' 'red' 'FontSize' 14 title ' Spectral leakage from three 8-point triangular windows' 'FontSize' 14 </source> cc-zero Digital signal processing |