Take the 2-minute tour ×
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It's 100% free, no registration required.

Don't have any formal dsp experience - sophomore in college.

Working on constructing a 25 band bark spectrogram for psychoacoustic analysis of audio FFT data. To do this, I'm grouping all FFT frequency bins into their relevant bark band and then averaging (summing them and dividing by the total number) the db values in each band to get the representative value for each band.

Is this the correct way to represent a bunch of db values as a single value?

share|improve this question
6  
"dB values" are really just a way of representing values on a logarithmic scale. Arithmetic-averaging values on a logarithmic scale is equivalent to geometrically averaging the original values (in linear scale). This probably isn't what you want. You probably would like a measure of total power in each band, which you would get by just summing the power spectrum bins across each band. You could divide by the number of bins, but if the bands aren't equal-width, that will add some bias to the result. –  Jason R Feb 19 '13 at 13:04
1  
+1, Could be promoted to an answer! –  pichenettes Feb 19 '13 at 13:56
    
How do I promote to answer? Thanks Jason. –  Newmu Feb 21 '13 at 19:49
add comment

1 Answer

The answer provided by Jason R in the comments --

"dB values" are really just a way of representing values on a logarithmic scale. Arithmetic-averaging values on a logarithmic scale is equivalent to geometrically averaging the original values (in linear scale). This probably isn't what you want. You probably would like a measure of total power in each band, which you would get by just summing the power spectrum bins across each band. You could divide by the number of bins, but if the bands aren't equal-width, that will add some bias to the result.

does a good job of identifying the problem but I'm not sure it is a correct solution (or maybe I'm just reading it wrong). If a summation is to occur, it should occur on the raw magnitudes of the bins (before conversion to dB).

The issue is this

3dB + 3dB != 6dB

to do a summation on the decibel scale is more complex than simply adding the values together. It can be done but if so you should do some reading on the dB scale and the nature of adding relative power. Doing the addition when still in a linear domain is easiest.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.