Acoustic Horn Design – The Easy Way (Ath4)


Just for the sake of it I ran my optimizer on the example provided in the document.
Calculation time: about 15min.

Code:
R-OSSE = {
  R  = 185.0778 ; [mm]
  a  = 39.65450 ; [deg]
  r0 = 18.00000 ; [mm]
  a0 = 0.000000 ; [deg]
  k  = 0.97464 ; []
  r  = 0.31653 ; []
  m  = 0.81689 ; []
  b  = 0.37050 ; []
  q  = 3.77180 ; []
         }

The comparison normalized to 00deg which is what I tend to use because, ideally, one would neither want to compromise the performance on nor off axis
20220408-ROSSE-DocExample-Optimized-Norm00deg.png


The same but normalized to 10deg which is what you seem to prefer

20220408-ROSSE-DocExample-Optimized-Norm10deg.png


From what I can see the optimized version
  • is smoother on axis (DI ON and 1dB contour comparison),
  • does not have as pronounced a pinch in the lower range of it pass band
  • looks a bit more ragged when normalized to 10deg (I guess your optimization and mine are diverging there on what should be used)
I understand that this is in the vacuum as there no precise goal, having one would be actually much easier, but...
Since I am still looking for a "standard" fitness function, which one do you think is the better compromised?

Also if I am not mistaken the through in the DI on seems to coincide with the depth on the WG, it that a correct observation?
 
Last edited:
  • Like
Reactions: 1 user
There's a very good reason NOT to normalize to 0 deg. When doing so, you risk distortion of the presented data by differences that are not significant. I would say this is also the case in the example above - there's almost no real (meaningful) difference between the two. The 10deg-normalized plot shows this a lot better, IMO. Honestly, I don't think anyone could distinguish the two just by ears.
 
  • Like
Reactions: 1 user
There's a very good reason NOT to normalize to 0 deg. When doing so, you risk distortion of the presented data by differences that are not significant. I would say this is also the case in the example above - there's almost no real (meaningful) difference between the two. The 10deg-normalized plot shows this a lot better, IMO. Honestly, I don't think anyone could distinguish the two just by ears.
or even better; define a listening window ( i.e. 0 to 15 deg), by energetic averaging and normalize to that
 
There's a very good reason NOT to normalize to 0 deg. When doing so, you risk distortion of the presented data by differences that are not significant. I would say this is also the case in the example above - there's almost no real (meaningful) difference between the two. The 10deg-normalized plot shows this a lot better, IMO. Honestly, I don't think anyone could distinguish the two just by ears.
I understand what you are saying about audibility, and I am not in complete disagreement.

Whether significant or not is not really what I was after.

My computer only has the “ears” that I program into it i.e. the fitness function of the GA procedure.
It is easy to go from something horrible to something acceptable but it is much more difficult/subtle to start with something already good and improve it further. This is where optimization ought to shine. The great thing about it is that the PC is doing the hard the job (240 iterations is this case). But the fitness definition is obviously critical there…

The question was more: does the optimization provide objective improvements? Or plainly does the fitness function I used is on the right track?

I would tend to think so, but I wanted your opinion.

I also fully understand the 00deg vs 10deg normalization but I am trying to push the compromise as far as possible with the tools at hand. Dr Geddes got tons of (undeserved) stick for the ON vs Off axis performance of his speakers, you’ve improved the whole thing, or at least made it way easier to design, with the smooth termination of the WG.

I want to see how far that can be pushed before I (me and myself) compromise on the ON performance which is different from disregarding the ON altogether (I am not saying this is what you advocate…). Again, here I am been unreasonable on purpose.
 
As for the optimization target, perhaps I would try the DI for the listening window average, as was mentioned. I gave up my own experiments in defining this rigorously and ended up with just looking at random results and manually selecting the subjectively best ones for another round (and typically it won't get any better -again, subjectively- after that). The three-dimensional nature of the problem makes the effort to come up with a one-dimensional optimization metric complicated, if not impossible - that's just the way it is.

- When I look at the data, the three DI curves for 0, 10 and 20° together tell a lot. That and the -1, -3 and -6dB (re 10°) polar map contours. If all of this is nice and smooth, I know I've reached my goal. Perhaps it could be expressed as some number, I don't know.
 
Last edited:
As for the optimization target, perhaps I would try the DI for the listening window average, as was mentioned. I gave up my own experiments in defining this rigorously and ended up with just looking at random results and manually selecting the subjectively best ones for another round (and typically it won't get any better -again, subjectively- after that). The three-dimensional nature of the problem makes the effort to come up with a one-dimensional optimization metric complicated, if not impossible - that's just the way it is.

- When I look at the data, the three DI curves for 0, 10 and 20° together tell a lot. That and the -1, -3 and -6dB (re 10°) polar map contours. If all of this is nice and smooth, I know I've reached my goal. Perhaps it could be expressed as some number, I don't know.

I think what you are saying is similar, if not quite as transcendent and far reaching no offence, to this well-known citation:

"What then is time? If no one asks me, I know what it is. If I wish to explain it to him who asks, I do not know." StAugustine

This means that intuitive knowledge is sometimes very hard and require serious thinking to formalize but, impossible, probably not, with the caveat that the optimization tool is just that: a tool. It still needs someone to wield it to accomplish the task therefore subjectivity is not entirely be removed from the process (AI bias anyone?). It is probably wrong to think that the model/fitness will be a perfect representation of reality, it will be goal oriented anyway so each case will require rethinking, important to keep that in mind.

I believe that the fitness function can have as many components (dimensions) as required so I don’t see the number of dimensions as an issue unless you want to reach some sort of orthogonal basis (i.e. each component is orthogonal to the other ones, which not a hard requirement). The crux is to define the right attributes and allocate the right weight to each of them. The more constrains the easier is the definition task (domain size is smaller), provided there is a solution.

What you are describing is connex to the fitness I have implemented based on smoothness of some quantities, thanks for sharing. It seems to go in the same direction that I am aiming.

Edit
As for the optimization target, perhaps I would try the DI for the listening window average, as was mentioned.
The SPDI in my spinorama plot is just that...
 
Last edited:
So what exactly is your fitness function at this point?

In the end you have to compare two results and be able to say which one is closer to the target, so you need a one-dimensional metric - a "distance" from the reference. I can't see how you could run any optimization without that.

You just need to describe a complex 3D problem with one number. Maybe we do it subconsciously (based on our experience) when looking at the data and trying to figure this out, I just gave up trying to formalize this - the foremost reason being that I don't need that. I have no doubt that some AI solution could be as good at this as skilled humans. Or maybe you'll find a simple and working solution. I can imagine e.g. a simple optimization for a SPDI target working good enough in most cases.
 
Last edited:
So what exactly is your fitness function at this point?

In the end you have to compare two results and be able to say which one is closer to the target, so you need a one-dimensional metric - a "distance" from the reference. I can't see how you could run any optimization without that.

You just need to describe a complex 3D problem with one number. Maybe we do it subconsciously (based on our experience) when looking at the data and trying to figure this out, I just gave up trying to formalize this - the foremost reason being that I don't need that. I have no doubt that some AI solution could be as good at this as skilled humans. Or maybe you'll find a simple and working solution. I can imagine e.g. a simple optimization for a SPDI target working good enough in most cases.
Sorry I am a bit thick, I just do not get your concern about the dimensions.

Here is an example:
CarFitness = f( comfort, number of seats, speed, economical to run, price, size, looks, … )

Dimension 1 comfort affected of weight 1
Dimension 2 number of seats affected of weight 2
Dimension 3 speed affected of weight 3

Dimensions comfort and size are not independent (orthogonal) so aren’t dimensions size and economical run via at least the mpg.

Multidimensional function yields a single number (the metric) used to rank the candidates.
The metric is optimized to maximize its value with no bound i.e. ideally we want Inf as the fitness.

As I said turning the subjective comfort dimension into a number can be difficult but (sub)metrics like the NVH are a valid model.

In fact, Carfitness@Maiky is probably different to Carfitness@Mabat so would be WG@hifi is different from WG@Stadium, both the dimensions (attributes) and their weights will probably be different

What I am using now is driven by PIR smoothness and LW to On relationship
 
Do you have an example?

I'm getting the same error that a couple of people are also getting.

The error only appears if you set "Output.STL" to "1"

In your config file it's set to zero. (Basically you're not generating an STL file.)

Here's the error:

C:\Users\johnv\Downloads\ath-4.8.2>ath.exe demos\two-way-apr8.cfg
Ath 4.8.2
-------------------------------------------------
DIY version for personal non-commercial use
-------------------------------------------------
Marcel Batik Czechia, 2022
PayPal: mbatikp@atlas.cz
-------------------------------------------------

-destination directory: c:\Users\johnv\Downloads\Ath-4.8.2\output\two-way-apr8
-initializing
-calculating profiles
-writing ABEC project
-writing geo file bem_mesh.geo
-average mesh throat angle: 10.000 deg
-matched wavefront radius: 73.136 mm
-enclosure dimensions: 246 x 416 x 200 mm
-setting mesh elements for radial drive
-running 'c:\Users\johnv\Downloads\gmsh-4.8.4-Windows64-sdk\bin\gmsh bem_mesh.geo -'
Info : Running 'c:\Users\johnv\Downloads\gmsh-4.8.4-Windows64-sdk\bin\gmsh bem_mesh.geo -' [Gmsh 4.8.4, 1 node, max. 1 thread]
Info : Started on Fri Apr 08 04:48:16 2022
Info : Reading 'bem_mesh.geo'...
-running 'c:\Users\johnv\Downloads\gmsh-4.8.4-Windows64-sdk\bin\gmsh mesh.geo -'
Info : Running 'c:\Users\johnv\Downloads\gmsh-4.8.4-Windows64-sdk\bin\gmsh mesh.geo -' [Gmsh 4.8.4, 1 node, max. 1 thread]
Info : Started on Fri Apr 08 04:48:16 2022
Info : Reading 'mesh.geo'...
Error : Unknown control point 1 in GEO curve 1
Error : Unknown control point 65 in GEO curve 1
Error : 'mesh.geo', line 1539: Could not add line
Error : Unknown control point 1 in GEO curve 2
Error : Unknown control point 2 in GEO curve 2
Error : 'mesh.geo', line 1540: Could not add line
Error : Unknown control point 2 in GEO curve 3
Error : Unknown control point 66 in GEO curve 3
Error : 'mesh.geo', line 1541: Could not add line
Error : Unknown control point 2 in GEO curve 4
Error : Unknown control point 3 in GEO curve 4
Error : 'mesh.geo', line 1542: Could not add line
Error : Unknown control point 3 in GEO curve 5
Error : Unknown control point 67 in GEO curve 5
Error : 'mesh.geo', line 1543: Could not add line
Error : Unknown control point 3 in GEO curve 6
Error : Unknown control point 4 in GEO curve 6
Error : 'mesh.geo', line 1544: Could not add line
Error : Unknown control point 4 in GEO curve 7
Error : Unknown control point 68 in GEO curve 7
Error : 'mesh.geo', line 1545: Could not add line
Error : Unknown control point 4 in GEO curve 8