Acoustic Horn Design – The Easy Way (Ath4)

Here is a proof of concept, nothing else just to check if it is working
MMM_toolbox 1.1 with @Tom Kamphuys OSSE function

for reference:
MacBook Pro 2015 i7 4 cores @2.5Ghz
5vars 10angles

16modes generations: 50 population: 30
11.5min

24modes generations: 50 population: 30
19min

32modes generations: 50 population: 30
30min

Literally the first output with simply trying to fit a DI of 6 1500-10000Hz
not a design just to try...

20220122_MMM_1output.png


I don't have a Windows PC at home to try with Ath but I can already share how to call Ath from within Matlab:

Code:
% Call Ath from Matlab and process a cfg file, omit "ath"
% Ath does not need to be in the same folder but the cfg file should
% have the correct relative path from ath.exe
% the output of Ath will be displayed in the Matlab command window

system ( [ '"C:\Ath_4.7.0\ath.exe" "demos\demo1.cfg"' ] );
 
% and retrieve the profile(?) from the output
Profile_Data = importdata('C:\Ath_4.7.0\Output\demos\demo1\demo1_profiles_.csv');
Profile           =  Profile_Data(1:20,;

figure()
plot(Profile,1),Profile,3))
hold on
plot(-Profile,1),Profile,3))

BTW I tried the
Output.Coords = 1
Ath claims it has done the export but I can't find the output anywhere
Is it completely disable?
 
Last edited:
To export the profile:
Code:
GridExport:matlab = {
  ProfileRange = 0,0
  ExportSlices = 0
}
This will write a file '<project_name>_profiles_matlab.csv' in the output directory. See the User Guide for more information.
^
Undocumented?
Thanks! I'll give it a try, I probably need to use ATh 8 anyways

When I first put the code there were ;) everywhere so there it is is uncorrupted

Code:
Profile_Data = importdata('C:\Ath_4.7.0\Output\demos\demo1\demo1_profiles_.csv');
Profile      = Profile_Data(1:20,:);

figure()
plot(Profile(:,1),Profile(:,3))
hold on
plot(-Profile(:,1),Profile(:,3))
 
If x(t) and y(t) are both OS, y(x) is not guaranteed to be OS I think. If x(t) and y(t) are the same, y(x) is a straight line. So I think one of the criteria is that e.g. x(t) starts as a line (2nd and higher derivatives zero). This makes y(x) behaviour only depend on y(t) (apart from some scaling/stretching). Maybe force the first derivative of x(t) to be 1 to truly depend on y(t) alone?

By the way, is the OS special to sound or is it one of the few shapes that can be used to calculate pressure/velocity analytically? I read Geddes' chapter on waveguides a few times, but don't see the big picture yet.
 
Yes. But does your question indicate I continue to fail to understand what you want and are asking?

I hope not, so I'll just continue. I have some time now and would like to contribute and learn at the same time.
We have some more relations between design parameters and the x(t) and y(t) variables:

x(0) = 0
y(0) = radius at throat
y'(0) is determined by throat angle (given that x(t) can be approximated as x(t) = t for small t (see my previous post))
y(1) = radius horn
if you want the last part of the horn to be 'flat', the derivative of y(t) at t = 1 should be 0 and that of x(t) should be negative (or at least that is one way to achieve that).

You can determine the max length of the horn by finding the maximum of x(t) (use x'(t) =0). CurlBackDistance distance could also be a design parameter I guess.

Another approach might be to use y(t) = throatRadius + (mouthRadius - throatRadius)*t, so a simple linear function. The x(t) has to be an inverse-OS near the throat and curl back/down at before t = 1. At least y(t) is very simple, don't know about x(t).

And what about nurbs (https://en.wikipedia.org/wiki/Non-uniform_rational_B-spline)?

If any of this makes sense, I could start doing the math. I would like some affirmative answer before doing that though :)
 
Last edited:
Member
Joined 2004
Paid Member
You are of course correct about all the properties - if x(t) approaches a linear function (x(t) ~ t), and it really does near the throat (see #9,168), then the contour is simply given by y(t) ~ y(x), which can be an OS (and it is near the throat, see #9,166). The rest of the overall contour it is just a smooth continuation, "blended" into a smooth roundover, and if anything is to be advantageous it should show in the optimizations, if someone actually takes the effort some day. We are basically preparing the mathematical foundation for that now - a general analytic description of a free-standing waveguide based on OS-SE.

We have some more relations between design parameters and the x(t) and y(t) variables ...
Yes but we already have the functions x(t) and y(t) fulfilling those conditions. There's no more work there, unless you want to come up with something better.

We have all we need now, the rest is just a (tedious) routine. First, I should clean up the notations...
 
Last edited:
There's no more work there, unless you want to come up with something better.
I don't know what qualifies as better.

I've been playing with desmos and I like it. y(x) cannot be a function. x( y) can. And if you swap x and y, y(x) can be a function. Here is an example:

idea.png

It has less parameters to care about or play with, which can be a good thing or a bad thing. Depends on your point of view I guess.

Are we free to pick any functions and we'll just have to simulate them in order to see if the horn perform well? Or are there rules of thumb that will cause a horn to perform well?
 
Last edited:
Member
Joined 2004
Paid Member
That's a very nice and simple approach. You never know how it will perform unless you try, that's all I can say...

What I did was trying to emulate the existing profile of the CE360 (with some additional degrees of freedom), which I know performs really well. This is different, but who knows, maybe it could be optimized much in the same way in the end.

I guess that to try this out at the moment, I'd have to implement this in Ath to test it via ABEC. Or is there anything else that someone can use?
 
Last edited: