File:Moving-avereage-freq-responses-2-to-16-samples-normalized.svg

From testwiki
Jump to navigation Jump to search
Original file (SVG file, nominally 755 × 625 pixels, file size: 394 KB)

This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

Summary

Description
English: Frequency response in dB of moving average filters. Frequency plotted relative to sampling frequency fs
Date
Source Own work
Author Em3rgent0rdr

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Plot is generated in GNU Octave 9.3.0 using the following script:

fs_fraction = 0:.0001:.5;
omega = fs_fraction * pi / .5;

H2 = (1/2)*(1-exp(-i*omega*2))./(1-exp(-i*omega));
H4 = (1/4)*(1-exp(-i*omega*4))./(1-exp(-i*omega));
H8 = (1/8)*(1-exp(-i*omega*8))./(1-exp(-i*omega));
H16 = (1/16)*(1-exp(-i*omega*16))./(1-exp(-i*omega));

function y1 = db20(x1)
  y1 = 20*log10(x1);
end

plot(fs_fraction,[db20(abs(H2));db20(abs(H4));db20(abs(H8));db20(abs(H16))])
axis([0, .5, -40, 0])
xticks([0 1/16, 2/16, 3/16, 4/16, 5/16, 6/16, 7/16, 8/16])
xticklabels({'0','fs/16','fs/8','fs*3/16','fs/4','fs*5/16','fs*3/8','fs*7/16','fs/2'})
ylabel('Magnitude (dB)','FontSize',12)
xlabel('Frequency relative to sampling frequency fs','FontSize',12)
legend({'2-sample moving average','4-sample moving average','8-sample moving average','16-sample moving average'},'FontSize',12)

Captions

Frequency response in dB of moving average filters. Frequency plotted relative to sampling frequency fs

22 January 2025

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current07:56, 22 January 2025Thumbnail for version as of 07:56, 22 January 2025755 × 625 (394 KB)wikimediacommons>Em3rgent0rdrtry again

The following page uses this file: