File:G712 butterworth.svg
Summary
| Description |
English: Butterworth filter approximation for CCITT G712 specification |
| Date | |
| Source | Own work |
| Author | Fcorthay |
| SVG development |
Source code
This graphics has been realized with the help of the following Octave script:
#-------------------------------------------------------------------------------
# Specifications
#
fs = 40E3;
fPass = 3000;
rPass = 0.125;
fStop1 = 4000;
rStop1 = 14;
fStop2 = 4600;
rStop2 = 32;
pointNb = 1000;
AdbMin = 40;
makeGraphics = 1;
figureIndex = 0;
#-------------------------------------------------------------------------------
# Denormalized filter function
#
order = 13;
wLog = 2*pi*logspace(2, 5, pointNb);
fc = 0.87;
[num, den] = butter(order, 2*pi, 's');
while ( length(num) < length(den) )
num = [0, num];
endwhile;
for index = 1:order+1
num(index) = num(index) * (fPass/fc)^(index-1);
den(index) = den(index) * (fPass/fc)^(index-1);
endfor
Adb = 20*log10(abs(freqs(num, den, wLog)));
Adb(Adb < -AdbMin) = -AdbMin;
figureIndex = figureIndex+1;
figure(figureIndex);
semilogx(wLog/(2*pi), Adb);
hold on;
semilogx([wLog(1)/(2*pi), fPass, fPass], -[rPass, rPass, AdbMin], 'r');
semilogx([fStop1, fStop1, fStop2, fStop2, wLog(length(wLog))/(2*pi)], ...
-[0 , rStop1, rStop1, rStop2, rStop2 ], 'r');
hold off;
axis([wLog(1)/(2*pi), wLog(length(wLog))/(2*pi), -AdbMin, 0]);
grid;
xlabel('frequency [Hz]');
ylabel('amplitude [dB]');
if (makeGraphics != 0)
print -dsvg g712_butterworth.svg
endif
Licensing
I, the copyright holder of this work, hereby publish it under the following licenses:
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
| Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License. |
You may select the license of your choice.