Datei:Processing losses for 3 window functions.svg

Originaldatei (SVG-Datei, Basisgröße: 531 × 540 Pixel, Dateigröße: 63 KB)
Diese Datei und die Informationen unter dem roten Trennstrich werden aus dem zentralen Medienarchiv Wikimedia Commons eingebunden.
Beschreibung
BeschreibungProcessing 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. |
|||
Datum | ||||
Quelle | Eigenes Werk | |||
Urheber | Bob K | |||
Genehmigung (Weiternutzung dieser Datei) |
Ich, der Urheber dieses Werkes, veröffentliche es unter der folgenden Lizenz:
|
|||
Andere Versionen |
Diese Datei wurde von diesem Werk abgeleitet: Processing losses for 3 window functions.gif |
|||
SVG‑Erstellung InfoField | ![]() Der Quelltext dieser SVG-Datei ist W3C-invalid wegen eines Fehlers. V Diese W3C-invalide Vektorgrafik wurde mit GNU Octave erstellt. |
|||
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)
|
Kurzbeschreibungen
In dieser Datei abgebildete Objekte
Motiv
Einige Werte ohne einen Wikidata-Eintrag
25. März 2019
image/svg+xml
Dateiversionen
Klicke auf einen Zeitpunkt, um diese Version zu laden.
Version vom | Vorschaubild | Maße | Benutzer | Kommentar | |
---|---|---|---|---|---|
aktuell | 23:07, 28. Jan. 2020 | ![]() | 531 × 540 (63 KB) | Bob K | change frame background from white to gray |
04:34, 26. Mär. 2019 | ![]() | 718 × 761 (126 KB) | Bob K | version created by export from figure (instead of print function) is more true to programmed dimensions | |
22:08, 25. Mär. 2019 | ![]() | 512 × 384 (66 KB) | Bob K | move an x-axis label to the right hand side | |
21:55, 25. Mär. 2019 | ![]() | 512 × 384 (66 KB) | Bob K | User created page with UploadWizard |
Dateiverwendung
Keine Seiten verwenden diese Datei.
Globale Dateiverwendung
Die nachfolgenden anderen Wikis verwenden diese Datei:
- Verwendung auf en.wikipedia.org
- Verwendung auf es.wikipedia.org
Metadaten
Diese Datei enthält weitere Informationen (beispielsweise Exif-Metadaten), die in der Regel von der Digitalkamera oder dem verwendeten Scanner stammen. Durch nachträgliche Bearbeitung der Originaldatei können einige Details verändert worden sein.
Breite | 149.86mm |
---|---|
Höhe | 152.4mm |