Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators

Xsim-3D development... I could use some math help
Xsim-3D development... I could use some math help
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
Reply
 
Thread Tools Search this Thread
Old 22nd January 2018, 11:01 PM   #1
bwaslo is offline bwaslo  United States
Old guy with soldering iron
diyAudio Member
 
bwaslo's Avatar
 
Join Date: May 2006
Location: Portland, Oregon!
Xsim-3D development... I could use some math help
Default Xsim-3D 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 off-axis response of the speaker due to differing driver locations and off-axis driver responses. Because we can't just pretend that only the on-axis 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!
Xsim-3D development... I could use some math help-3d-pic-png

At present, XSim3D only handles drivers that can be modeled as circular pistions, using the well-known far-field pressure formula (easy to find via Google) to get their off-axis 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 off-axis 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 off-axis 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 clouded-over 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 off-axis responses. I can take the angle Theta and break it into the two H and V angles, and I can calculate off-axis responses for only H and V, substituting those for "Theta". If I measured an (ideal piston, in the farfield) driver off-axis 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 off-axis in both angles (defined somehow) maybe isn't doable? Comments, ideas, correct my hurting brain?

Maybe I should skip the "from off-axis FRD files" option, or lock the simulation so only one angle off-axis can be done at a time?
Attached Images
File Type: png 3d pic.png (50.4 KB, 866 views)
__________________
[W9MJE] Horn spreadsheet SynergyCalc/; SmallSyns SmallSyns;
Crossover design Xsim; Depot diffusor super-easy diffusors

Last edited by bwaslo; 22nd January 2018 at 11:12 PM.
  Reply With Quote
Old 22nd January 2018, 11:46 PM   #2
Joel Wesseling is offline Joel Wesseling  Canada
diyAudio Member
 
Join Date: Jan 2003
Location: Toronto Area
Downloaded and playing with it. This is fantastic!

Thank You!
  Reply With Quote
Old 23rd January 2018, 09:15 AM   #3
AllenB is offline AllenB  Australia
diyAudio Member
 
Join Date: Oct 2008
Quote:
Originally Posted by bwaslo View Post
I can (relatively) reasonably interpolate data from multiple for positions that are off-axis 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.
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.
  Reply With Quote
Old 23rd January 2018, 09:34 AM   #4
AllenB is offline AllenB  Australia
diyAudio Member
 
Join Date: Oct 2008
Quote:
Originally Posted by bwaslo View Post
to combine off-axis responses. I can take the angle Theta and break it into the two H and V angles, and I can calculate off-axis responses for only H and V,
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)?
  Reply With Quote
Old 23rd January 2018, 02:31 PM   #5
nc535 is offline nc535
diyAudio Member
 
Join Date: Apr 2011
Totally awesome and very timely for LA!
  Reply With Quote
Old 23rd January 2018, 08:40 PM   #6
bwaslo is offline bwaslo  United States
Old guy with soldering iron
diyAudio Member
 
bwaslo's Avatar
 
Join Date: May 2006
Location: Portland, Oregon!
Xsim-3D development... I could use some math help
Quote:
Originally Posted by nc535 View Post
Totally awesome and very timely for LA!
Los Angeles?
__________________
[W9MJE] Horn spreadsheet SynergyCalc/; SmallSyns SmallSyns;
Crossover design Xsim; Depot diffusor super-easy diffusors
  Reply With Quote
Old 23rd January 2018, 09:02 PM   #7
gedlee is offline gedlee  United States
diyAudio Member
 
gedlee's Avatar
 
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
  Reply With Quote
Old 23rd January 2018, 09:54 PM   #8
bolserst is offline bolserst  United States
diyAudio Member
 
bolserst's Avatar
 
Join Date: Jun 2005
Location: Fort Worth, Texas
He is wanting to determine response at a combined horizontal and vertical off-axis 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.
  Reply With Quote
Old 23rd January 2018, 10:13 PM   #9
bwaslo is offline bwaslo  United States
Old guy with soldering iron
diyAudio Member
 
bwaslo's Avatar
 
Join Date: May 2006
Location: Portland, Oregon!
Xsim-3D development... I could use some math help
Quote:
Originally Posted by AllenB View Post
Perhaps the trick lies in the (H vs V) transition angle ...
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 on-axis complex response value (at same each frequency) to get a not-completely-inaccurate estimate of the off-axis 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:

Click the image to open in full size.

For rotating the "scene", and for later attempts at estimating off-angle responses from a driver that might not be Horizontal/Vertical symmetrical (terminology??), I break the value of the off-axis 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 off-axis 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 just-guesses 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 non-disk 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 off-axis (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 off-axis and boundary reflection simulations won't work with anything other than radiating round pistons...
Attached Images
File Type: png 3d angles sketch.png (39.3 KB, 665 views)
__________________
[W9MJE] Horn spreadsheet SynergyCalc/; SmallSyns SmallSyns;
Crossover design Xsim; Depot diffusor super-easy diffusors

Last edited by bwaslo; 23rd January 2018 at 10:21 PM.
  Reply With Quote
Old 23rd January 2018, 10:17 PM   #10
bwaslo is offline bwaslo  United States
Old guy with soldering iron
diyAudio Member
 
bwaslo's Avatar
 
Join Date: May 2006
Location: Portland, Oregon!
Xsim-3D development... I could use some math help
Quote:
Originally Posted by bolserst View Post
He is wanting to determine response at a combined horizontal and vertical off-axis 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.
Thanks, bolserst. that's what I meant.

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 super-easy diffusors
  Reply With Quote

Reply


Xsim-3D development... I could use some math helpHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
XSim help awkwardbydesign Multi-Way 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 Multi-Way 46 22nd February 2016 07:38 PM
XSim: 3rd and 4th order blocks? eriksquires Multi-Way 10 13th January 2016 06:38 AM


New To Site? Need Help?

All times are GMT. The time now is 01:36 PM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.00%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Copyright ©1999-2018 diyAudio
Wiki