From Wikipedia, the free encyclopedia
Size of this preview: 600 × 600 pixelsFull resolution (1,600 × 1,600 pixels, file size: 212 KB, MIME type: image/png)
Acoustic weighting curves A, B, C, and D, usually used in acoustic measurements to approximate the human hearing response. (A and C are by far the most popular.)
[edit] Instructions
See Wikipedia graph-making tips.
Generated in gnuplot with the following script (after a lot of trial and error):
set samples 1001
set terminal postscript enhanced portrait color solid lw 2 "Times-Roman" 20
set output "weighting.ps"
# Define the four curves
kA = 7.397057228624818216e9
GA(s) = kA*s**4 / ((s+129.4)**2 * (s+676.7) * (s+4636) * (s+76655)**2)
dBA(f) = 20 * log10(abs(GA(2 * {0.0,1.0} * pi * f)))
kB = 5.991853998223556E+9
GB(s) = kB*s**3 / ((s+129.4)**2 * (s+995.9) * (s+76655)**2)
dBB(f) = 20 * log10(abs(GB(2 * {0.0,1.0} * pi * f)))
kC = 5.917976426561615E+9
GC(s) = kC*s**2 / ((s+129.4)**2 * (s+76655)**2)
dBC(f) = 20 * log10(abs(GC(2 * {0.0,1.0} * pi * f)))
kD = 91104.31968347535
GD(s) = kD*s * (s**2 + 6532 * s + 4.0975e7) / ((s+1776.3) * (s+7288.5) * (s**2+21514*s+3.8836e8))
dBD(f) = 20 * log10(abs(GD(2 * {0.0,1.0} * pi * f)))
# Height-to-width ratio and grid lines
set size square
set grid
# Set x axis to logarithmic scale
set logscale x 10
# Set range of x axis from 10 Hz to 40 khz
set xrange [10:39999]
# Create x-axis tic marks once per decade (multiple of 10)
set xtics 10
set xlabel "Frequency (Hz)"
set ylabel "Gain (dB)"
# Put legend in bottom right corner
set key 5000,-55
# Plot all four from 10 Hz to 20 kHz and with titles as above
plot \
(x>2e4)? 0/0 : dBA(x) title "dB(A)", \
(x>2e4)? 0/0 : dBB(x) title "dB(B)", \
(x>2e4)? 0/0 : dBC(x) title "dB(C)", \
(x>2e4)? 0/0 : dBD(x) title "dB(D)"
To convert the PostScript file to PNG:
- Open it in the GIMP (make sure you have ghostscript installed! - Windows instructions)
- Enter 500 under Resolution (it doesn't say "DPI" but I think that's what it means)
- Uncheck Try bounding box (since the bounding box cuts off the edge, unfortunately. You can try with the bounding box first.)
- Enter large values for Width and Height
- Check Color
- Check Strong anti-aliasing for both graphics and text
- Crop off extra whitespace (Shift+C if you can't find it in the toolbox)
- Possibly need to rotate it: Click Image → Transform → Rotate 90 degrees clockwise
Filters → Blur → Gaussian blur at 2.0 px (No need to blur if you use strong anti-aliasing during conversion. I see no significant difference between end results.)
- Image → Scale Image...
- Width and Height at 25%
- Cubic interpolation
- You can view at normal size if you want by pressing 1, Ctrl+E
- Save as Weighting curves.png
Functions are from the weighting filter article (which in turn are from a website). Normalizing constants were determined in Maxima from something like this:
kA*s**4 / ((s+129.4)**2 * (s+676.7) * (s+4636) * (s+76655)**2);
ev(%,s=%I*2*%PI*f);
abs(%);
ev(%,f=1000);
solve(%=1,kA);
float(%);
or just
float(solve(ev(abs(ev(%,s=%I*2*%PI*f)),f=1000)=1,kA));
It might look a little better if the range of the D curve were limited, as in http://www.extron.com/technology/img/loudnesscontrol_ts_3-lg.jpg
Created by User:Omegatron using gnuplot, possibly with post-processing in the GIMP (PNG) or Inkscape (SVG)
I, the copyright holder of this work, hereby publish it under the following licenses:
You may select the license of your choice.
|
(In short, this means that you can copy and modify the image freely as long as you provide attribution; preferably in the form of a link back to this page.)
File history
Click on a date/time to view the file as it appeared at that time.
| Date/Time | Dimensions | User | Comment |
current | 20:42, 1 July 2005 | 1,600×1,600 (212 KB) | Omegatron | |
File links
The following pages on the English Wikipedia link to this file (pages on other projects are not listed):