File:Frequency spectrum of a sinusoid and its quantization noise floor.gif
Page contents not supported in other languages.
Appearance
Size of this preview: 800 × 406 pixels. Other resolutions: 320 × 162 pixels | 864 × 438 pixels.
Original file (864 × 438 pixels, file size: 11 KB, MIME type: image/gif, 0.1 s)
This is a file from the Wikimedia Commons. Information from its description page there is shown below. Commons is a freely licensed media file repository. You can help. |
Summary
DescriptionFrequency spectrum of a sinusoid and its quantization noise floor.gif |
English: This is a comparison of quantizing a sinusoid to 64 levels (6 bits) and 256 levels (8 bits). The additive noise created by 6-bit quantization is 12 dB greater than the noise created by 8-bit quantization. When the spectral distribution is flat, as in this example, the 12 dB difference manifests as a measurable difference in the noise floors. |
|||
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:
|
|||
GIF development InfoField | This GIF graphic was created with GNU Octave. |
|||
Octave/gnuplot source InfoField | click to expand
This graphic was created by the following Octave script: graphics_toolkit gnuplot
N = 256; % sams_per_fft;
window = blackmanharris(N)/sum(blackmanharris(N));
A = -N/2; % left limit of plots
B= N/2-1; % right limit of plots
%
Fs = N; % sams_per_sec;
HzPerBin = Fs/N;
freq_bin = 9+1/sqrt(2); % any signal frequency not harmonically related to Fs
freq_Hz = freq_bin*HzPerBin;
%
L = 120000; % amount of data to average
n = 1:L;
x = exp(j*2*pi*freq_Hz/Fs*n); % non-quantized signal
sig8 = round(2^8 * x)/2^8;
sig6 = round(2^6 * x)/2^6;
%
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;
%
amplitude8 = zeros(1,N);
amplitude6 = zeros(1,N);
%
% Loop over all the available blocks
for j1 = 1 : num_ffts
amplitude8 = amplitude8 + abs(fft( sig8(samples) .* window ));
amplitude6 = amplitude6 + abs(fft( sig6(samples) .* window ));
samples = samples + sams_per_offset;
end
%
amplitude8 = 20*log10(fftshift(amplitude8/num_ffts));
amplitude6 = 20*log10(fftshift(amplitude6/num_ffts));
%
abscissa = A:B;
figure (1, 'color', .95*[1 1 1])
subplot(2,1,1);
h = area(abscissa, amplitude6(abscissa +N/2+1), ...
'FaceColor', [.871 .49 0], 'edgecolor', [.871 .49 0]);
set(h,'BaseValue',-90)
set(gca, 'YTick', [0 -40 -68 -90])
set(gca, 'XTick', [])
set(gca, 'YGrid','on', 'color', 'white')
xlim([A B])
ylim([-90 2])
text(A, 10, '6 bits')
xlabel('\leftarrow frequency \rightarrow', 'fontsize', 10)
ylabel('decibels', 'fontsize', 10)
title('Spectral view of a sinusoid and its quantization noise-floor','fontsize', 12);
% Move subplot downward to prevent title being cropped by gnuplot bug.
set(gca, "position", get(gca, "position") - [0 0 0 0.02])
%
subplot(2,1,2);
h = area(abscissa, amplitude8(abscissa +N/2+1), ...
'FaceColor', [.871 .49 0], 'edgecolor', [.871 .49 0]);
set(h,'BaseValue',-90)
set(gca, 'YTick', [0 -40 -80])
set(gca, 'XTick', [])
set(gca, 'YGrid','on', 'color', 'white')
xlim([A B])
ylim([-90 2])
text(A, 10, '8 bits')
xlabel('\leftarrow frequency \rightarrow')
ylabel('decibels', 'fontsize', 10)
|
Items portrayed in this file
depicts
author name string<\/a>"}},"text\/plain":{"en":{"":"author name string"}}},"{\"value\":\"Bob K\",\"type\":\"string\"}":{"text\/html":{"en":{"P2093":"Bob K","P4174":"Bob K<\/a>"}},"text\/plain":{"en":{"P2093":"Bob K","P4174":"Bob K"}}},"{\"value\":{\"entity-type\":\"property\",\"numeric-id\":4174,\"id\":\"P4174\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"":"Wikimedia username<\/a>"}},"text\/plain":{"en":{"":"Wikimedia username"}}},"{\"value\":{\"entity-type\":\"property\",\"numeric-id\":2699,\"id\":\"P2699\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"":"URL<\/a>"}},"text\/plain":{"en":{"":"URL"}}},"{\"value\":\"http:\\\/\\\/commons.wikimedia.org\\\/wiki\\\/User:Bob_K\",\"type\":\"string\"}":{"text\/html":{"en":{"P2699":"http:\/\/commons.wikimedia.org\/wiki\/User:Bob_K<\/a>"}},"text\/plain":{"en":{"P2699":"http:\/\/commons.wikimedia.org\/wiki\/User:Bob_K"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P170 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
copyrighted, dedicated to the public domain by copyright holder<\/a>"}},"text\/plain":{"en":{"P6216":"copyrighted, dedicated to the public domain by copyright holder"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P6216 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
Creative Commons CC0 License<\/a>"}},"text\/plain":{"en":{"P275":"Creative Commons CC0 License"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P275 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
4 April 2014
original creation by uploader<\/a>"}},"text\/plain":{"en":{"P7482":"original creation by uploader"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P7482 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 14:29, 4 April 2014 | 864 × 438 (11 KB) | Bob K | User created page with UploadWizard |
File usage
The following pages on the English Wikipedia use this file (pages on other projects are not listed):
Global file usage
The following other wikis use this file:
- Usage on sl.wikipedia.org
Metadata
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
If the file has been modified from its original state, some details may not fully reflect the modified file.
GIF file comment | Created with GIMP |
---|