ProSoundWeb Community

Please login or register.

Login with username, password and session length
Advanced search  

Pages: [1]   Go Down

Author Topic: Some Thoughts on Frequency Response Averaging  (Read 604 times)

Frank Koenig

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 886
Some Thoughts on Frequency Response Averaging
« on: September 29, 2019, 01:03:24 pm »

We often want to combine multiple frequency response measurements both to determine individual speaker settings or to align larger installations. Taking the simple average of the log magnitudes (magnitudes expressed in dB) is simple and appealing as we perceive sound pressure on a logarithmic scale and averaging should split the pain evenly between all listening positions. The shortcoming of this approach, which is discussed by McCarthy in "Sound Systems: Design and Optimization", is that dips are generally less audible than peaks and a narrow dip at one measurement location, often due to a cancellation of multiple arrivals there, disproportionately pulls down the average at that frequency. We would like a method for combining frequency response magnitudes that underweights dips in an individual measurement location that do not occur in the preponderance of other locations. McCarthy suggests "optical averaging", which is to eyeball the overlapping log magnitude plots and to look for a "trend line" through the thick part near the top. I've been trying to think of a deterministic way to do something like this that is suitable for (computer) automation.

It occurred to me that rather than to average the log magnitudes one might take the log of the average magnitudes. This underweights the dips as desired.

In the following we're concerned with the combination of measurements at a particular frequency -- a "point process". Although it's kind of roundabout, let's start with the log magnitudes of N measurements expressed in dB, since that's what we're accustomed to. Call these x(i) where the index, i, goes from 0 to N-1.

Let y be the combined log magnitudes and mean(*) be the average over i. The conventional average is

y = mean(x(i))

An alternative is to back out the magnitudes and take the log of the mean

y = 20 * log10(mean(10^(x(i) / 20)))

We can introduce a parameter P and let

y = P * log10(mean(10^(x(i) / P)))

where P > 0

For P = 20 nothing has changed and we are just averaging sound pressures. As P approaches 0, y approaches the max(x(i)). In other words, the combination is the highest response of any individual measurement at that frequency.

We note that, unlike in the case of  the average of the log magnitudes, the normalization of the individual magnitudes matters. In the former case all the peaks and dips contribute equally irrespective of the overall gain of each measurement -- the whole average is just shifted up or down. In the latter case the gains clearly matter and we need to be mindful of how we normalize each measurement. So far I just subtract the average of each measurement over some specified range of frequencies.

In the example below there are three heavy back curves. The lowest is the conventional average. The middle is the average of the sound pressures (P = 20), and the highest is P = 1, which approximates the max. The averages are smoothed after averaging which accounts for some traces exceeding the average for P = 1.

--Frank


Logged
"Nature abhors a vacuum tube." -- John Pierce, Bell Labs

drew gandy

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 271
  • Chicago and burbs
Re: Some Thoughts on Frequency Response Averaging
« Reply #1 on: September 29, 2019, 11:42:07 pm »

... is that dips are generally less audible than peaks and a narrow dip at one measurement location, often due to a cancellation of multiple arrivals there, disproportionately pulls down the average at that frequency.

Quote
I've been trying to think of a deterministic way to do something like this that is suitable for (computer) automation.

Interesting.  The idea of meaningful averages is definitely something that I've wondered about, especially for sound system coverage/tuning measurements.  Making the computer spit out better information would be cool.     
Unfortunately, I think there might be two distinct pieces to this:
A) Dips from cancellations cause anomalies when we try to average responses.  Averaging isn't really the right math for dealing with this.  Averaging a number of "samplings" isn't quite the same as getting the "power response" of the room.   
B) Although we've had this general understanding that narrow dips are less audible than narrow peaks, I don't think that's the entire story.  I think there may be some temporal aspects to this.  Transients, for lack of a better term, might not behave in quite the expected way compared to more steady state sounds.  And harmonics of "acoustical events" are another aspect of this puzzle. 

All this to say that softening the dips does seem like a good starting place but I'm concerned that it might not be as helpful as expected. 
That said, my hat is off and I'm curious about where you will go next.

Quote
We note that, unlike in the case of  the average of the log magnitudes, the normalization of the individual magnitudes matters. In the former case all the peaks and dips contribute equally irrespective of the overall gain of each measurement -- the whole average is just shifted up or down. In the latter case the gains clearly matter and we need to be mindful of how we normalize each measurement.

I would think that normalizing might be one of the hardest things to get right here.  Just narrowing the bandwidth and then taking an average is probably not enough for an automated process.  Your meat computer (thanks John) is probably pretty good at sorting out if you got it right or not on a case by case basis but once the real computer does this all inside a beige metal box (I'm aging myself) it might not come out quite right.  But these are just armchair comments from me.  By all means, press on! 
Logged
Remember, you can talk yourself into (or out of) anything.  That's how the human brain works...

Chris Grimshaw

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1271
  • Sheffield, UK
    • Grimshaw Audio
Re: Some Thoughts on Frequency Response Averaging
« Reply #2 on: September 30, 2019, 03:38:00 am »

I like the concept, although I think I'd try adding something using standard deviations. ie, higher standard deviation means your variable P tends towards 1. That way, you've got the average value when all the responses are fairly similar, but tends towards the higher values when there are large variations in the SPL measurements at that frequency.

It does add an extra computing step, but a modern PC should cope just fine.

Chris
Logged
Sheffield-based sound engineering.
www.grimshawaudio.com

Mark Wilkinson

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 924
Re: Some Thoughts on Frequency Response Averaging
« Reply #3 on: September 30, 2019, 10:37:14 am »

I was a math minor in undergrad, but I can barely remember what log means anymore .... :( 
so I just try to gain a layman's understanding of what Smaart or whatever software I'm using, offers in terms of averaging.  :)

If I understand correctly, Smaart  offers 3 types of spatial averaging, which are basically:
Simple dB averaging with the peak-to-null imbalance you discuss.
Power averaging, which is the average of squared linear magnitudes converted back to dB.  Needs normalization like your method. Better for the null problem.
And coherence weighted dB averaging, which is the default method. I don't know how the coherence weighting technically works, but it's supposed to have an advantage handling non-casual noise compared to straight power averaging. So better with squelching reverb, high noise floor, etc.

Pages 19-20 if interested...https://www.rationalacoustics.com/download/Smaart-v8-User-Guide.pdf

I think the biggest part of my layman's education is just trying to stay completely aware of what and why I'm trying to measure to begin with.
And then what the measurements can and can't tell me.

The contrast between the measurements a speaker builder needs and what a system/room tuner needs, is really interesting i think..
Maybe my best visualization tool for trying to understand measurements..



Logged

Frank Koenig

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 886
Re: Some Thoughts on Frequency Response Averaging
« Reply #4 on: October 01, 2019, 02:51:41 pm »

Thanks all for the thoughtful replies. This is really helpful and encouraging as otherwise I'm just a geezer in vacuum ??? I've been using the term "average" somewhat loosely in places. What I've proposed here is certainly not an average of the log magnitudes, in the usual statistics sense. Going forward I'll say "combining" responses unless I really mean average.

I failed to mention the other trick I have available that is the "trimmed mean", which happens to be a built-in function in R. It provides a parameter that allows outliers to be trimmed. At one extreme the function returns the average and at the other the median. How useful this really is I don't know. It may be if the data are good we don't need it and if some measurements are crap it's obvious and we weed them out by hand.

As for looking at properties of the distribution of magnitudes at a given frequency, such as variance, that's where I started. The current approach is an attempt to avoid all that with something that's simple and maybe good enough. But that's not to say that doing some serious statistical thing might not be better. I agree that normalization needs a careful look. So does the application of smoothing, which is related, as the average over frequency as I use for normalization is just one point of the smoothed response using a (wide) rectangular window. As an aside, if we are taking averages of the log-magnitude over measurements the order of smoothing and averaging does not matter. For other (non-linear) combinations, it does.

There's no substitute for running lots of data past any approach, and I have yet to do that. I'll likely work on this in fits and starts. I've also been negligent in searching the literature, although I haven't run across anything about this this in the pop audio press other than so called optical averaging. Any pointers would be great.

--Frank
Logged
"Nature abhors a vacuum tube." -- John Pierce, Bell Labs

drew gandy

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 271
  • Chicago and burbs
Re: Some Thoughts on Frequency Response Averaging
« Reply #5 on: October 03, 2019, 09:05:39 am »

I've also been negligent in searching the literature,

--Frank

At some point this is the prudent thing to do.  Although there is nothing like rolling your sleeves up to really get into it, many very smart people have already been thinking about this for a long time.  It might be most fun to contact some of the old TEF geezers.  Someone like Doug Jones would be good to talk to since he has vast experience with both room acoustics and loudspeaker measurements.  As Mark mentioned, the distinctions between the two might mean very different approaches to the topic.  Are you a member of the SynAudCon forum? 
Logged
Remember, you can talk yourself into (or out of) anything.  That's how the human brain works...

John Roberts {JR}

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 16417
  • Hickory, Mississippi, USA
    • Resotune
Re: Some Thoughts on Frequency Response Averaging
« Reply #6 on: October 03, 2019, 10:18:16 am »

Somewhere in an old notebook I have a photo of a loudspeaker measurement mic (from the 1930s?) that is rotated in a circle to avoid waveform interference and/or standing waves. They also made measurements out in the woods (that used to be quiet).

JR
Logged
Don't tune your drums half-ass. Listen to what a properly "cleared" drum sounds like.   http://circularscience.com/

Frank Koenig

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 886
Re: Some Thoughts on Frequency Response Averaging
« Reply #7 on: October 04, 2019, 12:32:43 pm »

At some point this is the prudent thing to do.  Although there is nothing like rolling your sleeves up to really get into it, many very smart people have already been thinking about this for a long time.  It might be most fun to contact some of the old TEF geezers.  Someone like Doug Jones would be good to talk to since he has vast experience with both room acoustics and loudspeaker measurements.  As Mark mentioned, the distinctions between the two might mean very different approaches to the topic.  Are you a member of the SynAudCon forum?

All true. I think part of the trouble is that this is a comparatively small industry and most of the folks who really get into the details do it for a living and won't (or can't) spill the beans. That leaves hobbyists like me to reinvent the wheel. It's not like the software world where there is a huge open source movement, born out of academia, and many people share their work freely. I have a small (pathetic?) hope that by posting ideas here, however unoriginal or self-evident, we might cultivate a little open source mood. 
 
I should check out SynAudCon. I tried to sign up at one point but their systems were down and I never tried again.

JR: I, too, go to the woods to do measurements. There is a grove of huge eucalyptus trees on the Stanford campus that serves as overflow parking for the football games. I find a spot far enough from any trees (not during a game) to be able to window out their reflections. On the other hand, I've found wooded areas to have about the nicest acoustics for amplified live music --  gentle, diffuse reverberation without slap-backs, etc. Nothing beats a concert in the woods for SQ.

--Frank
Logged
"Nature abhors a vacuum tube." -- John Pierce, Bell Labs

Mark Wilkinson

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 924
Re: Some Thoughts on Frequency Response Averaging
« Reply #8 on: October 04, 2019, 05:01:25 pm »

On the other hand, I've found wooded areas to have about the nicest acoustics for amplified live music --  gentle, diffuse reverberation without slap-backs, etc. Nothing beats a concert in the woods for SQ.


I so agree. Have always thought the ultimate acoustic venue for amplified music would be in the middle of a dense pine/spruce grove.

The best indoor acoustical diffusion/absorption I've found are live Christmas trees.  Now if only the subs didn't knock all the damn ornaments of the tree   ;D
Logged

ProSoundWeb Community

Re: Some Thoughts on Frequency Response Averaging
« Reply #8 on: October 04, 2019, 05:01:25 pm »


Pages: [1]   Go Up
 



Page created in 0.106 seconds with 22 queries.