• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required as is 20 years of participation in forums (not all true). There are daily reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Analytical Analysis - Room Gain

René - Acculution.com

Active Member
Technical Expert
Joined
May 1, 2021
Messages
143
Likes
546
-Introduction-

The term 'room gain' is often seen used when the topic of subwoofers and the low frequency sound reproduction comes up. As I see many explanations that are lacking or incorrect, I thought I might try and clear up the topic once and for all.
Preview.png

In all rooms there are so-called modes. A mode consists of a function and a number; more specifically an eigenfunction and and a eigenvalue. The eigenfunction describes the shape of the mode, and the eigenvalue gives us the (angular) frequency for the mode. There are infinitely many modes in any room. They are finely distributed at higher frequencies and we rarely considered room acoustics from a modal perspective at high frequencies. However, at lower frequencies, they show up much more distinctly, and this is what we will investigate here. Rooms come in many shapes and sizes. Here, we will focus on the 'rectangular' room (cuboid, or rectangular prism, is probably more correct, but we all get the idea). While different modes can have the same eigenvalue, we will look at a design where that is not the case. So for each distinct frequency of interest, there is only one mode. Okay... One pivotal point to realize already now is that "the modes in a room exist independently of any source or excitation; they are inherently a result of the geometry of the room" (and its boundary conditions, and the fluid properties in the room). When a pressure response shows a so-called resonance, where it peaks at a certain frequency, it is likely due to a mode, but the mode is there whether you measure a peak or not. What is important is 1) how much, if at all, the modes are excited, which is determined by the placement of the source(s), and 2) where you measure the response from said source(s). Nothing you do when it comes to excitation will change the eigenfunction (shape) nor the the eigenvalue (frequency). We will see this illustrated later on. If a mode gets excited it will in principle lead to a pressure that continues to oscillate with the mode shape and frequency of the mode indefinitely. In practice however, we have losses in the room, and so it will die out fairly quickly, but we will not discuss the temporal aspect here.

-Details-

We choose the rectangular room as our prototypical room, which is probably fair considering how most rooms look. For such a room we can find the modes, assuming that the walls are hard (perfectly reflective), there is little loss in the room, and it is completely empty. You might object already that this is unrealistic, but it is better to understand the underlying theory with certain assumptions, than try to decipher what is going on in a complex room. The formulas for the modes is given in most textbooks on acoustics:

Eq1.png


Top we have the form of each mode, second we have the modal pressure for the summation of all modes, and finally the frequency for each mode. We can see that we have an infinite sum of modes, and three integer indices to distinguish between each mode. We see that cosine functions describe the modal pressure, but remember that this pressure is not what you would measure, it is more of an abstraction that shows a solution to the homogenous wave equation (i.e. no sources) and homogenous boundary conditions (no energy is injected at the walls). Any brief excitation of the room, will lead to some or all modes oscillating forever (if no losses), satisfying the wave equation without there being any steady-state source.

If we want to, we can now calculate all modes in the room. Alternatively, we can use a room mode calculator. A goggle search gave me this one, https://amcoustics.com/tools/amroc, which is very neat as you can see the mode shape and frequencies, as well as see which muscical tone it corresponds to. So lets have a look at a room; I chose one that is (lx,ly,lz)=(length,width,height)=(4.5 m, 3 m, 2m). When we use the index notation for the summation, we will find a mode for (nx,ny,nz)=(1,0,0) at 38 Hz, for (nx,ny,nz)=(0,1,0) at 57 Hz, and on and on. I show the eigenfunction/shape below for these two modes:

TwoModes.png


Now, what will we measure in this room if we have one or more sources and a microphone? Again, we have an analytical expression that gives us the answer. (A really good resource is "The Sound Field in a Reveberation Room" by the late Finn Jacobsen.)

Eq2.png


With this expression, we can calculate the complex sound pressure in any point for a monopole source placed in any point in the room. I have made a MATLAB script where I can have several sources with different placements, source strengths, and phases, and I can manipulate the source type so that it gives off volume acceleration, volume velocity, or volume displacement, or have a cross-over so that it switches between the three. You can also add a source which a certain phase and another source with the opposite phase and make a dipole that way, or higher order multipoles. So let's look at an example where a source is placed near a corner and the microphone placed right in the middle of the room.

FlatAccNoLossCenter.png

The red curve is the speaker's free field response, and blue is the in room response, and the dotted lines indicate all frequencies where the room has a mode. We see that the first peak in the in room response is at 76 Hz. Hmmm... where is the mode at 38 Hz? 57 Hz? There is also a (nx,ny,nz)=(2,0,0) mode at 76 Hz, but no peak. Well, mode does not equal resonance. By positioning ourselves in the middle of the room, the modes that are symmetric will a null in the middle will not show up as resonances, even if they are excited. Conversely, we can find position for the source that will not be 'supported' by a mode. This does not mean that there will be no sound at the corresponding frequency, as I have hear some say. We can clearly see that in the result too. But what is with the slope going up as we go down in frequency? Let's us break it down in steps.

First, let's us choose another position of the microphone/head, here I took (xmic,ymic,zmic)=(3.5,2,1.5).

FlatAccNoLossPosition.png


We see many more modes being excited now, as we are not placed in a null for the lower modes. Second, let us put some damping into the equations (slight damping will not affect the discussion we have had so far):

FlatAccLossPosition.png


Thirdly, the source is set to have a flat volume acceleration as a function of frequency. This is equivalent to how most speakers behave; point a laser at a driver in its pass band area (i.e. where it is supposed to play music), measure the velocity, convert to acceleration, and you should see a flat amplitude response for acceleration. (This is a good test btw. to give to acoustic engineers. They will often think that it must be flat amplitude for the displacement that gives a flat pressure amplitude). So the source is 'perfect' in that it has infinite bandwidth from DC and upwards. We need to consider the roll-off of a speaker. A closed sub will roll-off in a second order manner, so that the pressure response resembles that of a second-order high-pass function. And a ported speaker will roll-off with a fourth-order response. So if we assume that we have a closed sub in a corner, and assume that it behaves as a second-order high pass filter with a cut-off frequency of 35 Hz (I think the Linkwitz Thor has this without the external filter applied; I had that setup once and it was so nice), we finally get this result:

ModfifiedAccLossPosition.png


Wow... We have a flat in room response for a sub with finite bandwidth. Why is that? Well, we have actually forgotten one thing; the indices (nx,ny,nz) do not start at (1,0,0), (0,1,0), or (0,0,1); they start at (0,0,0)! We have a mode at 0 Hz that pressurizes the room the same in all positions, so no gradients, and it satisfies the wave equation as discussed already. Room gain is simply the effect of having an eigenmode at DC! With the increase in resulting pressure as the excitation frequency gets closer and closer to the modal frequency being second-order (see the denominator in the equation higher up), and the output from a closed sub goes down by an order of two, we can get a resulting pressure which is flat towards DC. So while we do not have sound at 0 Hz, since there are no oscillations, the effect of any mode extends away from it. Also, for a ported subwoofer we will not be able to have this flat response, because of its higher order roll-off, but the in room response will still be modified by the mode. If you actually do the calculations, be it analytically or numerically, the 'zeroth' mode will pop right out:

ThreeModes.png


Does all of the mathematics make sense from a physical standpoint? Luckily yes: Imagine a bike pump. Put your finger on the output valve. Squeeze. This is the situation you have in your room at low frequencies, it simply acts as an acoustic compliance. The impedance of the compliance is 1/(i*2*pi*Ca), where f is the frequency. And acoustic impedance is pressure divided by volume velocity(!). We can rearrange and get that pressure is equal to volume displacement(!) divided by a constant (the acoustic compliance), and so pressure is directly proportional to displacement, and displacement is exactly what our closed sub can deliver below its resonance frequency. [If you prefer, you can just think of Hooke's law in structural mechanics for a spring; the force is the stiffness times the displacement, and since pressure and force are linked simply via an area, we can again see that a constant displacement across a (low) frequency range, will give a constant force/pressure]. And what about the ported sub? When the driver moves inwards at low frequencies below the driver resonance, air will just be pushed out of the port, and so there is no net volume displacement; there is an acoustic short-circuit, just as you have for a dipole. So again it makes physical sense that we cannot take the same advantage of room gain as for the closed enclosure case.

-Closing remarks-
We have been considering ideal conditions with low loss rectangular rooms and probably more importantly no leakage. In practice there will be leakage and so we can not go flat to DC. But still the analysis explains what is going on, and in cars the effect is also very important to consider (I have a story there for another time).

-Conclusion-
Room gain is not some esoteric effect that the acoustic text books do not cover; it is actually a simple subset of known modal analysis combined with loudspeaker characteristics. For a sealed room we will have flat low frequency pressure response for a transducer with flat volume displacement, and a sealed sub gives us exactly that below its operating range.

- About me -
René (no need for Dr title, please), BSEE, MSc (Physics), PhD (Microacoustics), FEM and BEM simulations specialist in/for loudspeaker, hearing aid, and consultancy companies. Own company Acculution, blog at acculution.com/blog
 

Attachments

  • ModfifiedAccLossPosition.png
    ModfifiedAccLossPosition.png
    26.7 KB · Views: 175
Last edited:

bigjacko

Addicted to Fun and Learning
Joined
Sep 18, 2019
Messages
668
Likes
316
Nice write up, thank you very much for doing suck great talk again. I want to ask some questions as I don't understand some parts.

How wide or what q is the mode? From first mode on (38Hz) it looks like the mode can be seen as peak, but the zero mode 0Hz the mode can't be seen as peak. Is it because at higher frequency we don't need as much displacement for the pressure to be the same as low frequency?

Does volume displacement mean the volume expending and contracting rather than a block of volume going in one direction?
 
OP
R

René - Acculution.com

Active Member
Technical Expert
Joined
May 1, 2021
Messages
143
Likes
546
Nice write up, thank you very much for doing suck great talk again. I want to ask some questions as I don't understand some parts.

How wide or what q is the mode? From first mode on (38Hz) it looks like the mode can be seen as peak, but the zero mode 0Hz the mode can't be seen as peak. Is it because at higher frequency we don't need as much displacement for the pressure to be the same as low frequency?

Does volume displacement mean the volume expending and contracting rather than a block of volume going in one direction?
Thanks for your kind words, and great questions.

The Q of the mode will depend on the loss, so when there are no losses, Q goes to infinity, and when there are losses, Q is some finite value. For all modes, except the 0th, you can see 'both sides' of the mode, but for the lowest mode we only see the right side at the positive frequency. In addition the mode density increase with increasing frequency, and we also plot logarithmically where the higher frequencies are squeezed together, so we can never get down to 0 Hz. So our view is warped in that for lowest mode it is easier to somewhat make out the slope (especially when we put a constant volume displacement on, so the we flatten out the in room response), but since we sum a lot of modes close to each other at the higher modes we never see the slopes. You could just plot one mode on its own, but you would never measure that.

Volume displacement is area times displacement, so a balloon expanding and contracting will be able to deliver net volume displacement, but a balloon moving back and forth will not; the former will resemble a monopole (away from itself) and the latter a dipole (away from it). Typically a source is expressed in Q (different Q than above), volume velocity, and if that is simply a number, you will have flat volume velocity across all frequencies. But you can have a frequency dependent Q(f) that can effectively give you flat displacement, acceleration, or whatever you mathematically want to express.
 

bigjacko

Addicted to Fun and Learning
Joined
Sep 18, 2019
Messages
668
Likes
316
Volume displacement is area times displacement, so a balloon expanding and contracting will be able to deliver net volume displacement, but a balloon moving back and forth will not; the former will resemble a monopole (away from itself) and the latter a dipole (away from it).
Thank you for answering.:) Why a volume expending and contracting resemble monopole and a volume moving back and forth resemble dipole? Those two movement looks very different, but isn't dipole just two monopoles in opposite phase and direction?
 

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
6,248
Likes
11,783
Location
Monument, CO
Very cool stuff, but not sure how much I appreciate seeing those Greek functions I buried deep since my grad acoustics courses... :)

Is your Matlab script available publicly?
 

Don Hills

Addicted to Fun and Learning
Joined
Mar 1, 2016
Messages
690
Likes
426
Location
Wellington, New Zealand
Thank you, René. I hadn't considered analysing "room gain" from a modal viewpoint. My own rule of thumb for cars has been to calculate the free-air speaker response curve and the "pressurisation" SPL curve (in theory, this is a straight line) and adjust the speaker volume and T-S values until the combined response is as flat as possible. I'm sure it's no coincidence that the resulting design looks like a typical car audio sub driver in a small box. The driver designers have clearly figured this out already. It explains the screwy T-S parameters of such drivers. ;)
 
OP
R

René - Acculution.com

Active Member
Technical Expert
Joined
May 1, 2021
Messages
143
Likes
546
Thank you for answering.:) Why a volume expending and contracting resemble monopole and a volume moving back and forth resemble dipole? Those two movement looks very different, but isn't dipole just two monopoles in opposite phase and direction?
Anything that moves back and forth will have some positive volume displacement in one direction and negative in the other direction. So zero net displacement. Two monopoles in opposite phase operate the same way but the near field is different.
 

audiofooled

Active Member
Joined
Apr 1, 2021
Messages
145
Likes
135
Great write sir! For me it makes some things clear, but some still not. Namely, my room has strong peaks at 23,5 Hz or so, then 47 and 94, exactly as predicted by the same calculator in your original post.
My DIY tower speakers are rear ported, and normally they start to rolloff with said steeper 4th order slope at about 35 Hz. But in room it's quite different. When I do a sinewave sweep, at listening position there still is a lot of energy at 20 Hz and even lower, starting at 7 Hz! And when the sweep gets to 23 Hz, it excites strong harmonics of 47 and 94. Also, there is a null at about 85 Hz, and some minor and denser irregularities up to Shroeder frequency.
Now, when I added a DIY subwoofer, this is when it got very interesting. Sub is sealed, 12 inch, with an Fsc of 36Hz, F3 of 30, and F10 of 20 hz. Nothing special, but yet very smooth in response and I let it go all the way up to 200 hz (full LFE channel bandwidth). Sub is located exactly in the middle between the towers.
Interestingly enough, now that everything's dialed in, what happens is that the bass response is very much ironed out and very very flat from 30 Hz all the way up to 200 Hz. And downwards it has a smooth 2nd order rolloff, only with the exception of said 23-47-94 mode, but it is only perceived when doing an actual sine sweep, and rarely gets excited when playing any real music or movie content. The 47 and 94 respectively are smoothed out. As well, a previous dip at 85 is no more. The only downside is that now I have a very narrow dip at 30 hz, possibly because of phase cancellation issue.
What is even more interesting to me, the impulse response is now such that, on some bass heavy recordings or quick cannon blasts, there's a very flat and instantaneous tidal wave ranging in frequencies from about 35 all the way up to 110 Hz. Subjectively, I get "hit in the gut" very strongly only once per amplitude of the entire waveform.
So, in your opinion, what's going on? Is it that a sealed sub is now "pawing the way" with some kind of forward DC pressure at the beginning of each impulse? What is it that makes it essentially, an "iron"? What's the physics behind it? Thank you in advance.

EDIT: Here's a short description of my room and system.
 
Last edited:

Scgorg

Member
Joined
Jun 20, 2020
Messages
67
Likes
187
Location
Norway
Another interesting point for those reading this: this is the same effect that allows us to get ruler flat bass extension from headphones.
Especially for planar magnetic and electrostatic headphones it's common to have a sealed front volume (this is a theoretical ideal, but we can get pretty close). This means that just as shown here the pressure is directly proportional to the displacement. Since the driver will have constant excursion below it's resonance frequency (if we ignore creep factor) we get a flat line at bass frequencies.

Thanks for another great writeup René, I am already looking forward to the next post!
 
OP
R

René - Acculution.com

Active Member
Technical Expert
Joined
May 1, 2021
Messages
143
Likes
546
Great write sir! For me it makes some things clear, but some still not. Namely, my room has strong peaks at 23,5 Hz or so, then 47 and 94, exactly as predicted by the same calculator in your original post.
My DIY tower speakers are rear ported, and normally they start to rolloff with said steeper 4th order slope at about 35 Hz. But in room it's quite different. When I do a sinewave sweep, at listening position there still is a lot of energy at 20 Hz and even lower, starting at 7 Hz! And when the sweep gets to 23 Hz, it excites strong harmonics of 47 and 94. Also, there is a null at about 85 Hz, and some minor and denser irregularities up to Shroeder frequency.
Now, when I added a DIY subwoofer, this is when it got very interesting. Sub is sealed, 12 inch, with an Fsc of 36Hz, F3 of 30, and F10 of 20 hz. Nothing special, but yet very smooth in response and I let it go all the way up to 200 hz (full LFE channel bandwidth). Sub is located exactly in the middle between the towers.
Interestingly enough, now that everything's dialed in, what happens is that the bass response is very much ironed out and very very flat from 30 Hz all the way up to 200 Hz. And downwards it has a smooth 2nd order rolloff, only with the exception of said 23-47-94 mode, but it is only perceived when doing an actual sine sweep, and rarely gets excited when playing any real music or movie content. The 47 and 94 respectively are smoothed out. As well, a previous dip at 85 is no more. The only downside is that now I have a very narrow dip at 30 hz, possibly because of phase cancellation issue.
What is even more interesting to me, the impulse response is now such that, on some bass heavy recordings or quick cannon blasts, there's a very flat and instantaneous tidal wave ranging in frequencies from about 35 all the way up to 110 Hz. Subjectively, I get "hit in the gut" very strongly only once per amplitude of the entire waveform.
So, in your opinion, what's going on? Is it that a sealed sub is now "pawing the way" with some kind of forward DC pressure at the beginning of each impulse? What is it that makes it essentially, an "iron"? What's the physics behind it? Thank you in advance.

EDIT: Here's a short description of my room and system.
I would rather not try and decipher what goes on in specific rooms, I hope you understand. I try to explain the basics, and hopefully it clears up some confusion. Adding an extra sub can smoothen the response, but the other effects that you see I simply don't have the time or insight to say anything meaningful about.
 
OP
R

René - Acculution.com

Active Member
Technical Expert
Joined
May 1, 2021
Messages
143
Likes
546
Another interesting point for those reading this: this is the same effect that allows us to get ruler flat bass extension from headphones.
Especially for planar magnetic and electrostatic headphones it's common to have a sealed front volume (this is a theoretical ideal, but we can get pretty close). This means that just as shown here the pressure is directly proportional to the displacement. Since the driver will have constant excursion below it's resonance frequency (if we ignore creep factor) we get a flat line at bass frequencies.

Thanks for another great writeup René, I am already looking forward to the next post!
I is also why electret microphones need to have their resonance frequency below their operation range (and at the same time the have a flat reponse to flat external acceleration(!) when vibrated).
 
OP
R

René - Acculution.com

Active Member
Technical Expert
Joined
May 1, 2021
Messages
143
Likes
546
Very cool stuff, but not sure how much I appreciate seeing those Greek functions I buried deep since my grad acoustics courses... :)

Is your Matlab script available publicly?
Nope, I made it a couple of years back for another blog post, and I would expect a lot of support questions if I were to release it.
 
OP
R

René - Acculution.com

Active Member
Technical Expert
Joined
May 1, 2021
Messages
143
Likes
546
Thank you, René. I hadn't considered analysing "room gain" from a modal viewpoint. My own rule of thumb for cars has been to calculate the free-air speaker response curve and the "pressurisation" SPL curve (in theory, this is a straight line) and adjust the speaker volume and T-S values until the combined response is as flat as possible. I'm sure it's no coincidence that the resulting design looks like a typical car audio sub driver in a small box. The driver designers have clearly figured this out already. It explains the screwy T-S parameters of such drivers. ;)
Yes, the effect is very important in cars, and the modes above DC are also higher up in frequency than a typical room. Cars are a very tricky sound environment for many reasons.
 

audiofooled

Active Member
Joined
Apr 1, 2021
Messages
145
Likes
135
I would rather not try and decipher what goes on in specific rooms, I hope you understand. I try to explain the basics, and hopefully it clears up some confusion. Adding an extra sub can smoothen the response, but the other effects that you see I simply don't have the time or insight to say anything meaningful about.

I fully understand and thank you all the same. I tried a ported sub before and it did nothing but augment the problems that were already there. Now with a sealed one the difference is night and day. I didn't know that the "zeroth" or DC mode could exist in a room but it certainly explains a lot.
 

Don Hills

Addicted to Fun and Learning
Joined
Mar 1, 2016
Messages
690
Likes
426
Location
Wellington, New Zealand
Yes, the effect is very important in cars, and the modes above DC are also higher up in frequency than a typical room. Cars are a very tricky sound environment for many reasons.

Indeed. On the positive side, the modes are usually low Q / well damped due to the irregular internal dimensions and the seats acting as cavity absorbers.
 

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
6,248
Likes
11,783
Location
Monument, CO
Nope, I made it a couple of years back for another blog post, and I would expect a lot of support questions if I were to release it.

Thanks, I was afraid of that, but completely understand!
 

Don Hills

Addicted to Fun and Learning
Joined
Mar 1, 2016
Messages
690
Likes
426
Location
Wellington, New Zealand
For anyone interested in "room gain", I have attached a tiny spreadsheet that calculates the theoretical "pressurisation" SPL for a sealed room.

For anyone interested in modal effects, and the earlier question about the difference between a monopole and a dipole, I recommend playing with the Ripple Tank:
https://www.falstad.com/ripple/
 

Attachments

  • Room_SPL.zip
    3.9 KB · Views: 116
Top Bottom