Hi Everyone,
I've been tinkering with something you may call "digital twin" loudspeaker simulation.
In short, computational acoustics (BEM) is used for simulating the radiation pattern of a speaker, then a second piece of software (by the company Treble) is used for room acoustics simulation. In a final step, ambisonics is used for calculating headphone signals for listening to the virtual speaker.
I wrote a blog post on this: https://nextgenaudio.tech/projects/digital-twin-loudspeaker/
It's not really about a "perfect" simulation of an existing speaker, more about concept development for speaker designs, so naturally there are some simplifications involved such as a simplified driver model.
Any thought or comments on this type of simulation?
I've been tinkering with something you may call "digital twin" loudspeaker simulation.
In short, computational acoustics (BEM) is used for simulating the radiation pattern of a speaker, then a second piece of software (by the company Treble) is used for room acoustics simulation. In a final step, ambisonics is used for calculating headphone signals for listening to the virtual speaker.
I wrote a blog post on this: https://nextgenaudio.tech/projects/digital-twin-loudspeaker/
It's not really about a "perfect" simulation of an existing speaker, more about concept development for speaker designs, so naturally there are some simplifications involved such as a simplified driver model.
Any thought or comments on this type of simulation?
Auralization of prospective loudspeaker designs for one's room has been doable for a few decades in the sense that reasonable hardware, software and empirical data is around. The challenge is achieving a good enough result at each stages for the end result to be worthwhile.
BEM is a good choice for simulating a speaker's sound radiation pattern. Using point sources for the drivers is not. Why is this being done? A constant velocity on the cone with a linear reduction to zero across the surround is a conventional boundary condtion in an acoustic BEM code. Is there something strange about the mesh2hrtf BEM code you are using?
Room simulation is a challenge possibly less in terms of performing simulations and more in terms of collecting sufficiently accurate empirical information about the absorption, scattering and reflection of sound by the boundaries and objects in the room to use as input to the simulation software. The low frequencies can be accurately handled deterministically by FEM or equivalent and the high frequencies reasonably statistically by a form of ray acoustics with the frequencies between being more problematic if the software is to run on a desktop/workstation in a reasonable time. It's doable but is likely to require a fair bit of time, effort and checking to build up the know how to produce reliable results.
I got as far as "Treble’s proprietary wave-based simulation technology " in the 3rd paragraph on the home page and left. It's simply not possible to perform reliable simulations if you don't know what assumptions are/are not in the results. Why did you opt for this particular software for your room simulation?
Why have you chosne to use ambiosonics rather than a normal binaural simulation given you seem to have simulated the relevant TFs. Or have I misunderstood what ambiosonics is/does?
The above looks more negative than I intended because what you are seeking to do is really good and would move the hobby forward a significant amount if it worked well enough. It is likely to take a fair amount of effort (and likely collaboration) to get there though. Really good stuff and don't let an old curmudgeon put you off.
BEM is a good choice for simulating a speaker's sound radiation pattern. Using point sources for the drivers is not. Why is this being done? A constant velocity on the cone with a linear reduction to zero across the surround is a conventional boundary condtion in an acoustic BEM code. Is there something strange about the mesh2hrtf BEM code you are using?
Room simulation is a challenge possibly less in terms of performing simulations and more in terms of collecting sufficiently accurate empirical information about the absorption, scattering and reflection of sound by the boundaries and objects in the room to use as input to the simulation software. The low frequencies can be accurately handled deterministically by FEM or equivalent and the high frequencies reasonably statistically by a form of ray acoustics with the frequencies between being more problematic if the software is to run on a desktop/workstation in a reasonable time. It's doable but is likely to require a fair bit of time, effort and checking to build up the know how to produce reliable results.
I got as far as "Treble’s proprietary wave-based simulation technology " in the 3rd paragraph on the home page and left. It's simply not possible to perform reliable simulations if you don't know what assumptions are/are not in the results. Why did you opt for this particular software for your room simulation?
Why have you chosne to use ambiosonics rather than a normal binaural simulation given you seem to have simulated the relevant TFs. Or have I misunderstood what ambiosonics is/does?
The above looks more negative than I intended because what you are seeking to do is really good and would move the hobby forward a significant amount if it worked well enough. It is likely to take a fair amount of effort (and likely collaboration) to get there though. Really good stuff and don't let an old curmudgeon put you off.
Hi andy19191, thanks for the input and questions. I'll try to develop my thoughts on the subject a bit:
So while this application has been theoretically possible for quite some time, I'm not aware of anyone except perhaps specialized companies presenting a reasonable alternative that balances the above points.
In my speaker design example, I'd say that the point source driver model on the box surface was useful for the development of the speaker design concept. For example, it was possible to optimize the filter giving a cardioid response in the bass, to observe effects of the cross-over frequency and driver spacing on the speaker energy response, and to observe certain effects of rounding of the baffle edges on the polar pattern and on-axis response.
I agree though that the driver model is a weak point in my toolchain. I chose this BEM-package because I was already using it for another application (simulating HRTFs from a 3D head scan), and I believe it is computationally efficient compared to many alternatives, which is important since I simulate the full audible bandwidth. It is also free!
Numerical acoustics is not my speciality though, so there may exist more suitable alternatives that I'm not aware of. I'm not sure if Mesh2HRTF can support a more advanced source model, I haven't found documentation on that.
Going via Ambisonics adds a few extra steps where you first simulate Ambisonic impulse responses that correspond to virtual microphones with specific pickup patterns (4th order Ambisonics, as I used, corresponds to 25 virtual mic. channels). Then you apply a decoder matrix that gives a binaural impulse response from the Ambisonics representation, which you can use to filter audio with.
Using Ambisonics in this application gives a few benefits:
Firstly, the toolchain needs to be accurate enough for the problem one wants to optimize, and depending on the problem some simplifications may be acceptable. It also needs to be computationally efficient and not too complex to set up so that each iteration of the design takes a reasonable amount of time, otherwise there's not too much gain over working with physical prototypes. Finally, a low cost is a big plus to make it more accessible.Auralization of prospective loudspeaker designs for one's room has been doable for a few decades in the sense that reasonable hardware, software and empirical data is around. The challenge is achieving a good enough result at each stages for the end result to be worthwhile.
BEM is a good choice for simulating a speaker's sound radiation pattern. Using point sources for the drivers is not. Why is this being done? A constant velocity on the cone with a linear reduction to zero across the surround is a conventional boundary condtion in an acoustic BEM code. Is there something strange about the mesh2hrtf BEM code you are using?
So while this application has been theoretically possible for quite some time, I'm not aware of anyone except perhaps specialized companies presenting a reasonable alternative that balances the above points.
In my speaker design example, I'd say that the point source driver model on the box surface was useful for the development of the speaker design concept. For example, it was possible to optimize the filter giving a cardioid response in the bass, to observe effects of the cross-over frequency and driver spacing on the speaker energy response, and to observe certain effects of rounding of the baffle edges on the polar pattern and on-axis response.
I agree though that the driver model is a weak point in my toolchain. I chose this BEM-package because I was already using it for another application (simulating HRTFs from a 3D head scan), and I believe it is computationally efficient compared to many alternatives, which is important since I simulate the full audible bandwidth. It is also free!
Numerical acoustics is not my speciality though, so there may exist more suitable alternatives that I'm not aware of. I'm not sure if Mesh2HRTF can support a more advanced source model, I haven't found documentation on that.
The Treble software has the most complete functionality of the alternatives I looked at. I investigated some open source alternatives, but couldn't find an option with all the required features:Room simulation is a challenge possibly less in terms of performing simulations and more in terms of collecting sufficiently accurate empirical information about the absorption, scattering and reflection of sound by the boundaries and objects in the room to use as input to the simulation software. The low frequencies can be accurately handled deterministically by FEM or equivalent and the high frequencies reasonably statistically by a form of ray acoustics with the frequencies between being more problematic if the software is to run on a desktop/workstation in a reasonable time. It's doable but is likely to require a fair bit of time, effort and checking to build up the know how to produce reliable results.
I got as far as "Treble’s proprietary wave-based simulation technology " in the 3rd paragraph on the home page and left. It's simply not possible to perform reliable simulations if you don't know what assumptions are/are not in the results. Why did you opt for this particular software for your room simulation?
- Support for modeling the source directivity, so that the simulated radiation pattern of the speaker can be imported.
- Support for auralization. Either through HRTFs applied directly in the simulation or export of Ambisonics impulse responses.
- Fast computations, sufficient accuracy, and ease-of-use. For basic simulations of shoe-box rooms a simple image source model can be adequate. Using FEM for low frequencies and a geometrical acoustics model for higher frequencies gives a higher accuracy for more complex room geometries, but takes longer to compute. Treble solves that by computations in the cloud.
It's a relevant question. For a "normal DIYer" it would be easier and make more sense with a direct binaural simulation if the chosen room simulation package supports that. I happen to be about to conclude my PhD studies where a major theme has been room auralization, and I've been working quite much with Ambisonics.Why have you chosne to use ambiosonics rather than a normal binaural simulation given you seem to have simulated the relevant TFs. Or have I misunderstood what ambiosonics is/does?
Going via Ambisonics adds a few extra steps where you first simulate Ambisonic impulse responses that correspond to virtual microphones with specific pickup patterns (4th order Ambisonics, as I used, corresponds to 25 virtual mic. channels). Then you apply a decoder matrix that gives a binaural impulse response from the Ambisonics representation, which you can use to filter audio with.
Using Ambisonics in this application gives a few benefits:
- Separation of the room response and the listener HRTF. It is possible to apply separate decoders for individual persons using their individual HRTF, if it is available. Personal HRTFs give a more realistic auralization.
- Headphone EQ can also be added in a later step.
- Head-tracking can be added, making it possible to "look around" in the virtual room
No problem! Thanks for the encouragement.The above looks more negative than I intended because what you are seeking to do is really good and would move the hobby forward a significant amount if it worked well enough. It is likely to take a fair amount of effort (and likely collaboration) to get there though. Really good stuff and don't let an old curmudgeon put you off.
For example, it was possible to optimize the filter giving a cardioid response in the bass, to observe effects of the cross-over frequency and driver spacing on the speaker energy response, and to observe certain effects of rounding of the baffle edges on the polar pattern and on-axis response.
Hmmm... The physics of the roundover might be captured if the grid resolution is adequate but the significant physics of a finite sized source is missing as well as the influence of the driver's geometric details. This can of course be quantified by simply performing a BEM simulation that includes them since it is not something that is missing from BEM but from the specified boundary conditions. The effort of BEM is only likely to make sense if it captures details that simpler and faster models miss. Comparisons and quantifying the pros and cons against popular software like vituixcad would be pretty useful.
I'm not sure if Mesh2HRTF can support a more advanced source model, I haven't found documentation on that.
I'm not sure that is how open source software is meant to work. If it is good software (most open source software isn't) and something is missing that you would like it should be added. In this case if a modification is required (which would be odd) it should mainly involve understanding and modifying the input data rather than the solver. The modification does not involve a different type of source but changing the normal velocity of the driver elements from zero to that of the cone. Unless there is something spectacularly weird about the software implementing a modification should be fairly quick though the time required to understand the software may be longer. If it is good software the latter is likely worthwhile if further modifications are to follow to include other capabilites useful to speaker design (e.g. akabak).
What kind of assumptions of the simulation are you referring to?
All models are wrong by definition. What makes them reliable and useful for guiding engineering decisions is understanding how they are wrong and how this shows up in the predictions. This requires knowing the modelling assumptions. It's not optional if the tool is to be reliably used by an engineer.
Of course software can be used like a black box and the output accepted or rejected depending on factors unrelated to what is going on inside the black box. There are some consistency checks that can be performed but they are limited and many tend to rely on information from other sources like measurements which will be qualitative rather than quantitative when the predictions are of something other than what was measured. Relying more on faith rather than evidence can be reasonable if the simulations do not need to be reliable.
Commercial companies obviously want to keep useful stuff from their competitors but provide it to their customers. So it is a question of where to draw the line when it comes to simulation and what type of customer is being targetted. The large established providers of expensive simulation software are all open and clear about the modelling assumptions used in their software because they are targetting engineers in large established engineering companies. Some will have likely learnt the consequences of being less than open with experienced engineers about the modelling assumptions in their early days. Implementation details can of course be kept internal but not the modelling assumptions.
Companies keeping their modelling assumptions secret will likely be targetting casual users and non-engineers. If the software is substantially cheaper than the "serious" simulation software it may find a market. Despite the marketing claims of secret sauces it is likely to be mainly assembled openly available software and/or an extension of an employees thesis work.
Do you hope to grow and refine what you have started?
andy1991,
Those are good points. As an engineer one of course wants to know exactly the limitations and assumptions of the simulation software one use. In the case of Treble, I evaluated their software extensively for this reason. They do provide free demo evaluation, but perhaps they could or should provide more detail in their product info material on limitations/assumptions, directed to engineers.
Not in the near term, unless I can make it part of my professional work. It's interesting to think about though what needs the DIY community might have for further simulation software...
Those are good points. As an engineer one of course wants to know exactly the limitations and assumptions of the simulation software one use. In the case of Treble, I evaluated their software extensively for this reason. They do provide free demo evaluation, but perhaps they could or should provide more detail in their product info material on limitations/assumptions, directed to engineers.
Do you hope to grow and refine what you have started?
Not in the near term, unless I can make it part of my professional work. It's interesting to think about though what needs the DIY community might have for further simulation software...
They do provide free demo evaluation, but perhaps they could or should provide more detail in their product info material on limitations/assumptions, directed to engineers.
Only if the intention is to target the large engineering companies (i.e. to compete with software like COMSOL, Ansys, Siemens,...). Although this would enable charging £10k+ per seat per year it would also require providing a level of support that most software companies cannot contemplate. If not the advantages of keeping quiet and relying on relatively inexperienced customers projecting all sorts of positive attributes onto the software perhaps with a few nudges from the marketing may well be the most profitable way forward.
As you have no doubt picked up during your studies a large proportion of the room acoustics industry serving the home audio and prosumer audio sectors (is there any professional audio sector left?) know little about the (genuine) technical side of things and rely heavily on the subjective audiophile playbook to win sales. Nothing wrong with this if the customers are happy though some posts to forums like this suggest this is not always the case. Not being open about modelling assumptions doesn't make software poor it just makes it less appropriate for some users and more appropriate for others.
Not in the near term, unless I can make it part of my professional work.
That's a shame and I was assuming a hobby interest rather than as part of a job. The DIY speaker market is very small and shrinking as larger companies progressively pull out. The one or two newcomers that are around tend to enter with very expensive products that are likely to be beyond the means of most hobbyists.
It's interesting to think about though what needs the DIY community might have for further simulation software...
0D/1D modelling (e.g. vituixcad, hornresp, edge, etc...) that can address configuration seems to be in reasonable shape (at least on Windows). 2D/3D modelling that can address the sound radiation and cabinet vibration details seems to be starting but has a long way to go before it is comparable to what would typically be done by an engineer from medium/high tech industry (which is not most of the loudspeaker industry). Acoustic BEM is starting to be used with akabak and acousto and bempp have been mentioned. There have been one or two COMSOL simulations but this was using work software/hardware. COMSOL or equivalent is way too expensive for hobbyists. What is surprising to me is that long established large open source packages like salome, code_aster, calculix, elmer,.. have not been adopted. One factor I suspect is that nobody has shown the community what design details they can be used to address. Another is that a large proportion of speaker hobbyists are likely happy with what vituixcad and similar simulation software provides and don't believe the next step (a fairly large one in terms of time and effort) to tackle 3D details is worthwhile. Doubly so while there are so few relevant 3D simulations around performed by hobbyists showing what can be done.