
Home  Forums  Rules  Articles  diyAudio Store  Blogs  Gallery  Wiki  Register  Donations  FAQ  Calendar  Search  Today's Posts  Mark Forums Read  Search 
Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators 

Please consider donating to help us continue to serve you.
Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving 

Thread Tools  Search this Thread 
22nd January 2018, 11:01 PM  #1 
Old guy with soldering iron
diyAudio Member

Xsim3D development... I could use some math help
I've been working on a major revision of Xsim, to also include the effects of driver positioning and room boundary effects. The idea is that you can move the location of a virtual microphone (actually by holding the "mic" still and spinning the room in the GUI!) to get a simulation of the offaxis response of the speaker due to differing driver locations and offaxis driver responses. Because we can't just pretend that only the onaxis response matters.
(NOTE, I'm not trying to handle baffle edge diffraction, at least not for a while  that's a bigger battle for another day.) A lot of this is working (at least somewhat), but I've kind of run into a snag, and I don't know if it is something that can be recovered from. Someone is going to ask, so yeah, you can download it to play with it from http://libinst.com/Xsim/BetaTest/XSim3DSetup.exe . But please, limit or even resist making requests or telling me what you want this to do  I REALLY don't want to be the programmer for something "designed by committee", I have enough trouble keeping up with my own plans for this! And it's also too early to be overwhelming me with buglists! At present, XSim3D only handles drivers that can be modeled as circular pistions, using the wellknown farfield pressure formula (easy to find via Google) to get their offaxis frequency responses. So far, so good, I get reasonable looking results for things like line arrays and D'Appolito configurations. I had intended to also include the possibility of using a series of FRD response files consisting of an array for horizontal and and array for vertical, to model things like horns or drivers that aren't symmetrical and don't resemble circular pistons. The idea was that I'd be able to interpolate between those curves for angles between, and be able to combine horizontal and vertical to get a decent estimated response at points that are offaxis both in the horizontal and the vertical. That's where the problem at present comes in. I can (relatively) reasonably interpolate data from multiple for positions that are offaxis in only the horizontal or only the vertical. But I can't come up with a way to combine H and V for diagonal angles. I'm not even sure now that doing that makes any sense. If your eyes haven't cloudedover already up to now, they might for the following if you don't like playing with math, trig, and calculus, so  fair warning. For those who are good at this, my apologies for any terminology I might get wrong. I'm decent at math, but no wizard, and am rusty on the stuff I might've understood decades ago. __ It took a bit, but I realized about a month ago that multiple rotations of things, in straightforward 3D vector rotation matrix terms, depends on the order you do them in. If you rotate horizontally (on an axis that starts out as a vertical line through the rotated thing) then rotate vertically as well, you don't get the same result as you would if you rotated first vertically and then horizontally. For specifying angular positions at fixed distance from a "target" location, I needed a way that was defined by the final orientation of the thing rather than two processes it took to get there  a function of two angles done in one swoop. I went with defining the "H" angle as the angle a rotated vector would make with the z axis if projected onto the xz plane (the z axis is paralle with the floor, from mic to "target"). Similar definition used for a "V" angle, with the yz plane. That way, if you pull the mic up H degrees and V degrees to the side, you get the same result no matter which order you do them in. I can take the Piston pressure formula and modify it so that the sin(Theta) term is redefined in terms of the two H and V angles, to handle it accordingly. Just back calculate to find the single angle that specification makes with the z axis normal to the driver disk. What I can't get my head around is a way to combine offaxis responses. I can take the angle Theta and break it into the two H and V angles, and I can calculate offaxis responses for only H and V, substituting those for "Theta". If I measured an (ideal piston, in the farfield) driver offaxis at the H and at the V angles, those are the responses I'd get. But I see no way to combine those that nets me the response for "Theta" unless H and/or V are zero. Is this not a feasible thing to do? A while ago I thought maybe my way of defining H and V for 3D is the problem, but now I'm thinking that the idea of transmogrifying frequency responses taken at two orthogonal angles to get one that resembles being offaxis in both angles (defined somehow) maybe isn't doable? Comments, ideas, correct my hurting brain? Maybe I should skip the "from offaxis FRD files" option, or lock the simulation so only one angle offaxis can be done at a time?
__________________
[W9MJE] Horn spreadsheet SynergyCalc/; SmallSyns SmallSyns; Crossover design Xsim; Depot diffusor supereasy diffusors Last edited by bwaslo; 22nd January 2018 at 11:12 PM. 
22nd January 2018, 11:46 PM  #2 
diyAudio Member
Join Date: Jan 2003
Location: Toronto Area

Downloaded and playing with it. This is fantastic!
Thank You! 
23rd January 2018, 09:15 AM  #3 
diyAudio Member
Join Date: Oct 2008

Perhaps the trick lies in the (H vs V) transition angle not being 45 degrees for shapes that are not symmetrical. Have you considered deriving this by drawing from the centre of the shape to one of the 'virtual' corners? As for an assymetrical diamond shape, a line passing through both the middle of the shape and the middle of one of the sides. Also I'm considering it as a (eg) dome portion of a plane (representing the normal 90  +90) rotated continually between vertical and horizontal and weighted between the two.
Last edited by AllenB; 23rd January 2018 at 09:37 AM. 
23rd January 2018, 09:34 AM  #4 
diyAudio Member
Join Date: Oct 2008

Sorry if I'm trying hard to follow. You're taking any position in space in front of a circular piston and want the angle from the Z axis, or are you trying to use this to combine an H/V pair (which I would expect to be the same)?

23rd January 2018, 02:31 PM  #5 
diyAudio Member
Join Date: Apr 2011

Totally awesome and very timely for LA!

23rd January 2018, 08:40 PM  #6 
Old guy with soldering iron
diyAudio Member

__________________
[W9MJE] Horn spreadsheet SynergyCalc/; SmallSyns SmallSyns; Crossover design Xsim; Depot diffusor supereasy diffusors 
23rd January 2018, 09:02 PM  #7 
diyAudio Member
Join Date: Dec 2004
Location: Novi, Michigan

Hi Bill
I do not quite understand the problem. You have two disks, each with a directivity and you want to add them together? That's not too hard, but it seems that you want to do this in a certain coordinate system. That's a lot more difficult.
__________________
Earl Geddes Gedlee Website 
23rd January 2018, 09:54 PM  #8 
diyAudio Member
Join Date: Jun 2005
Location: Fort Worth, Texas

He is wanting to determine response at a combined horizontal and vertical offaxis angle for a radiator that has different vertical and horizontal directivity. I know there are solutions for rectangular and elliptical pistons, but I believe he is interested in the more general case so he could use measured data for vertical sweep at horizontal angle = 0, and horizontal sweep at vertical angle = 0 to determine response at any combination of horizontal and vertical angle.
Last edited by bolserst; 23rd January 2018 at 09:57 PM. 
23rd January 2018, 10:13 PM  #9 
Old guy with soldering iron
diyAudio Member

Allen, Earl,
Thanks for replying. Sorry, I didn't explain this very well, and this might not be much better, but I'll try. The situation is this: I have a math model for radiation from a disk at various angles relative to its normal (shown as the Z axis in this diagram). It's the usual pr() equation involving Bessel function and 1/R. So I can multiply that complex value (at each frequency) with a measured onaxis complex response value (at same each frequency) to get a notcompletelyinaccurate estimate of the offaxis response of the driver, assuming that it can be reasonably modeled as a circular piston. [Edit: the original response would have to be delay adjusted to make it's source be at (0,0,0) for that to have a chance.] Here is a diagram of said disk, with a microphone looking at it from a distance along a vector that is at an angle "Theta" relative to a normal vector at the disk center: For rotating the "scene", and for later attempts at estimating offangle responses from a driver that might not be Horizontal/Vertical symmetrical (terminology??), I break the value of the offaxis angle down into H and V components defined using the projection of the direction vector on the xz and yz planes (all axes defined as shown for a disk source). It's easy to get back and forth from the H and V angles to the value Theta for something symmetrical and known by a formula using the angle Theta. But for a source that doesn't act like a symmetrical disk, and for which I don't have a mathematical equation, I wanted to use a series of frequency responses on lists (a table, or an array of complex values) measured from the actual source from offaxis horizontal and vertical angles. Like the diagram above, but with the disk replaced by, say, a horn or a ribbon. I was hoping to come up with the equivalent (for each sim frequency) of a 2D map of complex values, each being the complex response at the point (H,V). After thinking about it more and playing around with some justguesses math functions, I'm pretty sure that isn't a reasonable expectation. I can multiply the complex values (of a frequency response at a frequency) together and the magnitude result isn't terrible when one of the angles isn't far from zero, but delay is a complete mess so it won't work very well for summation of responses. (This checked using the disk radiation equation comparing with combined values calculated from the "component" H and V angle responses using the same equation. I'm suspecting that the only reasonably valid approach would really be to model nondisk drivers using a bunch of point sources arranged in the right shape (that wouldn't work for a horn though, would it?) and I don't think that could work with measured response data unless the points model were somehow fit to the measured curves. That, or to measure at a LOT of offaxis (both H and V together) to make a map and "pick the complex resp closest point"?  Though I can't imagine anyone would go to the trouble of making that many measurements. But if anyone sees a way to do something like this, please speak up! Otherwise, all my clever offaxis and boundary reflection simulations won't work with anything other than radiating round pistons...
__________________
[W9MJE] Horn spreadsheet SynergyCalc/; SmallSyns SmallSyns; Crossover design Xsim; Depot diffusor supereasy diffusors Last edited by bwaslo; 23rd January 2018 at 10:21 PM. 
23rd January 2018, 10:17 PM  #10  
Old guy with soldering iron
diyAudio Member

Quote:
Though, now that you said it, it occurs to me that even the simpler case where H<>0 and V=0 (assuming i have a set of curves for different H) might not e doable either. For instance, how would I interpolate complex values between data at H=20 degrees and for H=40 degrees to estimate the values at H=30 degrees? For just magnitudes, it's easy, as done on those colored polar graphs, but something that works with delay??? I don't think so. I do think I'm way over my head on this, though...
__________________
[W9MJE] Horn spreadsheet SynergyCalc/; SmallSyns SmallSyns; Crossover design Xsim; Depot diffusor supereasy diffusors 

Thread Tools  Search this Thread 


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
XSim help  awkwardbydesign  MultiWay  23  8th March 2017 12:27 PM 
Looking for someone to teach me xsim  Bill poster  Software Tools  1  10th January 2017 10:51 PM 
XSim  Crossover Lab for Newbies  eriksquires  Software Tools  3  11th November 2016 03:53 PM 
Xsim crossover critique  montana1  MultiWay  46  22nd February 2016 07:38 PM 
XSim: 3rd and 4th order blocks?  eriksquires  MultiWay  10  13th January 2016 06:38 AM 
New To Site?  Need Help? 