File:Multirate upsampling (interpolation) filter.svg
From WikiProjectMed
Jump to navigation
Jump to search
Size of this PNG preview of this SVG file: 800 × 560 pixels. Other resolutions: 320 × 224 pixels | 640 × 448 pixels | 1,024 × 717 pixels | 1,280 × 896 pixels | 2,560 × 1,792 pixels | 900 × 630 pixels.
Original file (SVG file, nominally 900 × 630 pixels, file size: 43 KB)
This file is from a shared repository and may be used by other projects. The description on its file description page there is shown below.
This SVG image contains embedded raster graphics.[1] Such images are liable to produce inferior results when scaled to different sizes (as well as possibly being very inefficient in file size). If appropriate to do so, they should be replaced with images created using vector graphics. Note: This template is only supposed to be used if the SVG file mixes vector and raster graphics. If the SVG file only contains raster graphics {{FakeSVG}} is supposed to be used. See also {{TopoSVG}}. |
Summary
DescriptionMultirate upsampling (interpolation) filter.svg |
English: Depiction of one dot product, resulting in one output sample (in green), computed by a multirate filter. This illustrates the formula at Upsampling by an integer factor, for the case L=4, n=9, j=3. Three (L-1) conceptual "inserted zeros" are depicted between each pair of input samples. Omitting them from the calculation is what distinguishes a multirate filter from a monorate filter. |
|||
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:
|
|||
SVG development InfoField | This W3C-invalid vector image was created with LibreOffice. |
|||
Gnu Octave source InfoField | click to expand
This graphic was created with the help of the following Octave script: pkg load signal
graphics_toolkit gnuplot
M = 1000;
darkgreen = [33 150 33]/256;
interpolation_factor = 4;
% Generate M+1 samples of a Gaussian window (filter type not important)
filter = .3*exp(-.5*(((0:M)-M/2)/(.4*M/2)).^2);
% Sample the window.
N=24;
sam_per_hop = M/N;
window_dots = filter(1+(0:N)*sam_per_hop);
normalize = sum(window_dots)/interpolation_factor;
window_scale_factor = 0.5;
sam_per_hop = sam_per_hop*window_scale_factor;
%------------------------------------------------------------------
figure("position", [100 200 900 600])
% Plot the continuous filter function
xoffset = sam_per_hop*15;
yoffset = 0.1;
plot(xoffset+(0:M)*window_scale_factor, yoffset+filter, "linestyle",":", "linewidth",1, "color","black")
set(gca, "xaxislocation", "origin")
xlim([0 M])
ylim([-.06 .45]) % allows space for negative samples (in case I change the signal)
set(gca, "ygrid","off");
set(gca, "xgrid","on");
set(gca, "ytick",[0], "fontsize",14);
xticks = [0:4*sam_per_hop:M];
set(gca, "xtick",xticks)
set(gca,"xticklabel",[0:length(xticks)])
% Plot the filter coefficients
hold on
plot(xoffset+(0:N)*sam_per_hop, yoffset+window_dots, "color","red", ".", "markersize",10)
% Create signal to be interpolated
samples_per_cycle = 4*M;
signal = .2*sin(2*pi*(0:M)/samples_per_cycle);
signal_dots = signal(1:sam_per_hop:end);
% Simulate "inserted zeros", for display
signal_dots(2:4:end) = 0;
signal_dots(3:4:end) = 0;
signal_dots(4:4:end) = 0;
% Plot the data
L = length(signal_dots);
plot((0:L-1)*sam_per_hop, signal_dots, "color","blue", ".", "markersize",10)
% Compute dot product, and plot it
dot_product = sum(window_dots(24:-4:4).*signal_dots(17:4:37))/normalize;
x = 27*sam_per_hop;
plot(x, dot_product, "color",darkgreen, ".", "markersize",14)
plot([x,x],[0,.45]); % vertical line
% xlabel('\leftarrow n \rightarrow', "fontsize",16)
text(465, -.05, '\leftarrow n \rightarrow', "fontsize",16)
text(18, .1, "X[n]", "fontsize",16, "color","blue")
title("Multirate interpolation filter", "fontsize",16, "fontweight","normal");
|
Items portrayed in this file
depicts
21 December 2019
image/svg+xml
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 13:44, 24 December 2019 | 900 × 630 (43 KB) | commons>Bob K | add a vertical line for filter delay arrow to point at |
File usage
There are no pages that use this file.
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.
Width | 254mm |
---|---|
Height | 177.8mm |