Archivo:Processing losses for 3 window functions.svg
Tamaño de esta previsualización PNG del archivo SVG: 531 × 540 píxeles. Otras resoluciones: 236 × 240 píxeles · 472 × 480 píxeles · 755 × 768 píxeles · 1007 × 1024 píxeles · 2014 × 2048 píxeles.
Ver la imagen en su resolución original ((Imagen SVG, nominalmente 531 × 540 pixels, tamaño de archivo: 63 kB))
Este es un archivo de Wikimedia Commons, un depósito de contenido libre hospedado por la Fundación Wikimedia. Más abajo se reproduce su página de descripción con la información sobre su origen y licencia. |
Resumen
DescripciónProcessing losses for 3 window functions.svg |
English: Comparison of three window functions in terms of their effects on equal-strength sinusoids with additive noise. The noise "floor" is smoothed by averaging many DFTs to reveal the substantial difference in levels, caused by the different window functions. In each case, the sinusoid on the left suffers no scalloping and the one on the right exhibits worst-case scalloping. The rectangular window produces the most scalloping but lowest noise-floor. The Hann window has a higher noise floor but much less potential scalloping, which results in the lowest "worst case processing loss" of these 3 functions. |
|||
Fecha | ||||
Fuente | Trabajo propio | |||
Autor | Bob K | |||
Permiso (Reutilización de este archivo) |
Yo, el titular de los derechos de autor de esta obra, la publico en los términos de la siguiente licencia:
|
|||
Otras versiones |
Este archivo deriva de: Processing losses for 3 window functions.gif |
|||
SVG desarrollo InfoField | El código fuente de esta imagen SVG es inválido por un error. |
|||
Octave/gnuplot source InfoField | click to expand
This graphic was created by the following Octave script: pkg load signal
% Options
frame_background_gray = true;
if frame_background_gray
graphics_toolkit("qt") % has "insert text" option
% graphics_toolkit("fltk") % has cursor coordinate readout
frame_background = .94*[1 1 1];
d = 4; % amount to add to text sizes
else
graphics_toolkit("gnuplot") % background will be white regardless of value below
frame_background = .94*[1 1 1];
d=0;
endif
% (https://octave.org/doc/v4.2.1/Graphics-Object-Properties.html#Graphics-Object-Properties)
% Speed things up when using Gnuplot
set(0, "DefaultFigureColor",frame_background)
set(0, "DefaultAxesFontsize",10+d) % size of numeric tick labels
set(0, "DefaultLineLinewidth",1)
set(0, "DefaultTextFontsize",10+d)
hfig= figure("position",[100 50 574 609]);
N = 256; % sams_per_fft;
window1 = rectwin(N)'/sum(rectwin(N));
window2 = hann(N)'/sum(hann(N));
window3 = blackmanharris(N)'/sum(blackmanharris(N));
%
Fs = N; % sams_per_sec;
HzPerBin = Fs/N;
F1 = -20.0*HzPerBin; % bin -20
F2 = +20.5*HzPerBin; % bin 20.5
%
L = 100000;
n = 1:L;
x = exp(j*2*pi*F1/Fs*n) + exp(j*2*pi*F2/Fs*n);
x = x + (randn(1,L) +j*randn(1,L))*1.4;
%
sams_per_offset = 0.75*N; % overlap = 25%
%
% number of samples available beyond just one FFT
excess_sams = length(x) - N;
%
j1 = floor( excess_sams / sams_per_offset );
sams_per_offset = floor( excess_sams / j1 );
num_ffts = 1 + j1;
%
% define the first block of data
samples = 1:N;
%
amplitude1 = zeros(1,N);
amplitude2 = zeros(1,N);
amplitude3 = zeros(1,N);
%
% Loop over all the available blocks
for j1 = 1 : num_ffts
amplitude1 = amplitude1 + abs(fft( x(samples) .* window1 ));
amplitude2 = amplitude2 + abs(fft( x(samples) .* window2 ));
amplitude3 = amplitude3 + abs(fft( x(samples) .* window3 ));
samples = samples + sams_per_offset;
end
%
amplitude1 = 20*log10(fftshift(amplitude1/num_ffts));
amplitude2 = 20*log10(fftshift(amplitude2/num_ffts));
amplitude3 = 20*log10(fftshift(amplitude3/num_ffts));
%
abscissa = -40:40;
set(gca,"fontsize",8)
subplot(3,1,1);
h = area(abscissa, amplitude1(abscissa +N/2+1), ...
"facecolor", [.871 .49 0], "edgecolor", [.871 .49 0]);
set(h,"basevalue",-20)
set(gca, "xtick", [-20 0 20.5], "xticklabel",[" "; " "; " "], "ygrid","on", "color", "white")
xlim([-40 40])
ylim([-20 2])
ylabel("decibels")
text(-40, 3.5, "Rectangular window")
text(-12.0, -8.1, "X dB")
text(3.6, -8.1, "X - 3.92 dB")
text(-28.7, -22.7, "No scallop loss")
text(9.8, -22.7, "Maximum scallop loss")
title({"Processing losses for sinusoids in additive noise"; ""; ""}, "fontsize",12+d);
%
subplot(3,1,2);
h = area(abscissa, amplitude2(abscissa +N/2+1), ...
"facecolor", [.871 .49 0], "edgecolor", [.871 .49 0]);
set(h,"basevalue",-20)
set(gca, "xtick", [-20 0 20.5], "xticklabel",[" "; " "; " "], "ygrid","on", "color", "white")
xlim([-40 40])
ylim([-20 2])
ylabel("decibels")
text(-40, 3.5, "Hann window")
text(-12.4, -8.1, "X - 1.76 dB")
text(3.6, -8.1, "X - 3.18 dB")
text(-28.7, -22.7, "No scallop loss")
text(20, -22.7, 'frequency \rightarrow')
%
subplot(3,1,3);
h = area(abscissa, amplitude3(abscissa +N/2+1), ...
"facecolor", [.871 .49 0], "edgecolor", [.871 .49 0]);
set(h,"basevalue",-20)
set(gca, "xtick", [-20 0 20.5], "xticklabel",[" "; " "; " "], "ygrid","on", "color", "white")
xlim([-40 40])
ylim([-20 2])
ylabel("decibels")
text(-40, 3.5, "Blackman-Harris")
text(-12.0, -8.1, "X - 3.01 dB")
text(3.6, -8.1, "X - 3.85 dB")
text(-28.7, -22.7, "No scallop loss")
text(9.8, -22.7, "Maximum scallop loss")
% After this call, the cursor units change to a normalized ([0,1]) coordinate system, spanning all plots
annotation("line", [.334 .5], [.906 .906])
annotation("line", [.52 .7], [.87 .87])
annotation("doublearrow", [.388 .388], [.906 .727],...
"head1style","vback1", "head2style","vback1",...
"head1length",5, "head1width",5, "head2length",5, "head2width",5)
annotation("doublearrow", [.545 .545], [.87 .727],...
"head1style","vback1", "head2style","vback1",...
"head1length",5, "head1width",5, "head2length",5, "head2width",5)
annotation("line", [.334 .5], [.602 .602])
annotation("line", [.52 .7], [.589 .589])
annotation("doublearrow", [.388 .388], [.602 .438],...
"head1style","vback1", "head2style","vback1",...
"head1length",5, "head1width",5, "head2length",5, "head2width",5)
annotation("doublearrow", [.545 .545], [.589 .438],...
"head1style","vback1", "head2style","vback1",...
"head1length",5, "head1width",5, "head2length",5, "head2width",5)
annotation("line", [.334 .5], [.3 .3])
annotation("line", [.52 .7], [.292 .292])
annotation("doublearrow", [.388 .388], [.3 .147],...
"head1style","vback1", "head2style","vback1",...
"head1length",5, "head1width",5, "head2length",5, "head2width",5)
annotation("doublearrow", [.545 .545], [.292 .147],...
"head1style","vback1", "head2style","vback1",...
"head1length",5, "head1width",5, "head2length",5, "head2width",5)
|
Elementos representados en este archivo
representa a
Algún valor sin elemento de Wikidata
25 mar 2019
image/svg+xml
Historial del archivo
Haz clic sobre una fecha y hora para ver el archivo tal como apareció en ese momento.
Fecha y hora | Miniatura | Dimensiones | Usuario | Comentario | |
---|---|---|---|---|---|
actual | 21:07 28 ene 2020 | 531 × 540 (63 kB) | Bob K | change frame background from white to gray | |
02:34 26 mar 2019 | 718 × 761 (126 kB) | Bob K | version created by export from figure (instead of print function) is more true to programmed dimensions | ||
20:08 25 mar 2019 | 512 × 384 (66 kB) | Bob K | move an x-axis label to the right hand side | ||
19:55 25 mar 2019 | 512 × 384 (66 kB) | Bob K | User created page with UploadWizard |
Usos del archivo
La siguiente página usa este archivo:
Uso global del archivo
Las wikis siguientes utilizan este archivo:
- Uso en en.wikipedia.org
Metadatos
Este archivo contiene información adicional, probablemente añadida por la cámara digital o el escáner usado para crearlo o digitalizarlo.
Si el archivo ha sido modificado desde su estado original, pueden haberse perdido algunos detalles.
Anchura | 149.86mm |
---|---|
Altura | 152.4mm |