Klippel Near Field Scanner on a Shoestring
 User Name Stay logged in? Password
 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
 16th July 2018, 11:01 PM #351 gedlee   diyAudio Member     Join Date: Dec 2004 Location: Novi, Michigan Sounds like a powerful package - after my time! __________________ Earl Geddes Gedlee Website
mwmkravchenko
Mark Kravchenko
diyAudio Member

Join Date: Jan 2002
Quote:
 Originally Posted by 3ll3d00d this is working on the impulse response rather than FRD what format does the smith & larson software export to? no obvious manual online so hard to tell what it can do
The Smith & Larson software exports to almost every style you have mentioned. So after looking today and doing a bunch of measurements I can say you have it covered.
__________________
Mark
www.kravchenko-audio.com

3ll3d00d
diyAudio Member

Join Date: Jan 2014
Quote:
 Originally Posted by gedlee The DataOut array is not in angle, it is in modes. The first mode versus frequency, the second, etc. Hence a contour plot makes little sense. Plot it as separate frequency responses for each mode.
does this look right? The data set is the example data from your website.

modal.png

3ll3d00d
diyAudio Member

Join Date: Jan 2014

Quote:
 Originally Posted by gedlee To get to a reconstructed polar plot you need to go one step further and use Code: ```Declare Function CalPolar Lib "MeasCalcs.dll" (ByRef DataIn As Complex, _ ByVal NumCoef As Integer, _ ByVal angl As Double, _ ByVal freq As Double, _ ByVal farnum As Double, _ ByVal Velnum As Double) As Complex```
at this point we have

1) a set of measurements at various angles (e.g. 0, 5, 10...180)
2) a set of log spaced frequencies
3) a chosen number of modal coefficients
4) an (angle, freq) dataset (of complex numbers) via linToLog(fft(x)) where angle are those in 1) and freq from 2)
5) a (mode, freq) dataset (of complex numbers) via calSpatial where mode is a range of 1 to teh value in 3) and freq is from 2)

now we have the CalPolar function which returns a complex number given

- dataIn : is this the data from 4) or 5)? The arguments and the reference to Pressure make me think it must be 4) but in that case I don't understand what numCoefs refers to.
- numCoefs: is the same as 3) above? i.e. the no of coeffs passed into calSpatial
- angl : the angles from 1) in radians again?
- freq : the log spaced frequencies from 2)
- farnum : hardcoded to 10.0
- velnum : the !DEC\$ section suggests this is SourceRadius which I guess is referring to the driver radius? i.e. the value passed to CalSpatial as "Radius"

the combination of references to coefs and angles is what confuses me as I don't understand how the two are related.

Anyway if it is the linToLog output then I call this function for every single value returned from linToLog. This output is complex so I calculate the magnitude and pass it to smooth and then I use that to feed the contour map?

If I'm right so far, I don't understand the relevance of the data from CalSpatial

I imagine this would make more sense if I understood the maths ....

Last edited by 3ll3d00d; Yesterday at 10:05 PM.

 Yesterday, 11:21 PM #355 3ll3d00d   diyAudio Member     Join Date: Jan 2014 attempting to call CalPower I notice that as soon as angl is non zero then the program pauses (permanently) and prints Code: `bad arguments in sphbes` to the console google finds some code to do with a spherical bessel function that has this output, e.g. Numerical Recipes in C: The Art of Scientific Computing - William H. Press - Google Books if this code is in the dll then it would be good to remove it (blowing up hard is better than hanging IMV) in the meantime I'll try to recreate in c#
 Today, 01:21 AM #356 gedlee   diyAudio Member     Join Date: Dec 2004 Location: Novi, Michigan You have it mostly wrong. 1) are measurements, inputs. 2) Are the frequencies where we want data LintoLog gives us the same set of measurements but now log spaced. 3)Is just a number - the number of modes used in the reconstruction, it can be anything, but 15 seems about right for us. Lower values, but finite, would be the easiest to debug. 4) you have correct, its the output of the 2) and the next line 5) Is correct as well. Calpolar returns the dcomplex pressure at any requested "angle" and "Freq", no reference to what was actually measured. Array 5) is a "model" if you will of the speaker for all angles (in the horizontal plane) and all frequencies. It is simply now in "modal" space. Modal space completely defines the radiation pattern. Want a very close analogy Think of electrons patterns around a nucleus. Knowing the shell numbers completely specifies the electron distribution. It's basically the exact same problem. I already defined the other variables. The routine is exactly the one in your reference, and it would be impossible to remove as it is key to the software. And yes, it is an antique, probably 40 years old now or more! I didn't write it and it would be very dangerous to modify it. This has never been a problem for me when the data is sent in correctly. Your plots look OK, except for the 600 dB scale, I can't live with more than 100. But you can see the modes "cut-in". That's exactly what they do. Does your plotting have interpolation for smoother plots? __________________ Earl Geddes Gedlee Website
 Today, 08:53 AM #357 3ll3d00d   diyAudio Member     Join Date: Jan 2014 OK thanks for the explanation. Let me play this back to make sure I understand (dataIn, angl, freq) is the output from linToLog i.e. I can call CalPolar something like this Code: ``` logData, logFreqs = linToLog(measurement.fftData, measurement.fs / measurement.fftPoints) for ld in logData: for lf in logFreqs: print(calPolar(ld, 15, math.radians(measurement.angle), lf, 0.10, 0.15))``` i.e. call linToLog for a single measurement and then call calPolar for each log spaced frequency and piece of data returned is it correct? If so, this does produce a pause as soon as I move onto the 5 degree measurement in C# terms, it pauses on the following data Code: ```using System; using System.Numerics; using System.Runtime.InteropServices; using System.IO; namespace CalPower { class Program { static void Main(string[] args) { Complex a1 = new Complex(0.00743564367029359, -0.0020608701139408466); int a2 = 14; double a3 = 0.08726646259971647; double a4 = 20.0; double a5 = 0.15; Complex output = MeasCalcs.CalPower(a1, a2, a3, a4, 0.10, a5); Console.WriteLine(output); System.Threading.Thread.Sleep(20000); } } class MeasCalcs { [DllImport("MeasCalcs.dll", CallingConvention = CallingConvention.Cdecl)] public static extern Complex CalPower(Complex dataIn, int numCoef, double angl, double freq, double farnum, double velnum); } }``` So I am going wrong somewhere but I don't know where so I'd appreciate your help is debugging this.
3ll3d00d
diyAudio Member

Join Date: Jan 2014
Quote:
 Originally Posted by gedlee Your plots look OK, except for the 600 dB scale, I can't live with more than 100. But you can see the modes "cut-in". That's exactly what they do. Does your plotting have interpolation for smoother plots?
atm I've left it to automatically determine the range from the boundaries in the data, I can reduce this to more sensible levels though for sure. There are lots of options on how to interpolate both lines and grids for the contour plots. If there is a particular preferred method then I can look for an equivalent otherwise I can just add one later on.

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Site     Site Announcements     Forum Problems Amplifiers     Solid State     Pass Labs     Tubes / Valves     Chip Amps     Class D     Power Supplies     Headphone Systems Source & Line     Analogue Source     Analog Line Level     Digital Source     Digital Line Level     PC Based Loudspeakers     Multi-Way     Full Range     Subwoofers     Planars & Exotics Live Sound     PA Systems     Instruments and Amps Design & Build     Parts     Equipment & Tools     Construction Tips     Software Tools General Interest     Car Audio     diyAudio.com Articles     Music     Everything Else Member Areas     Introductions     The Lounge     Clubs & Events     In Memoriam The Moving Image Commercial Sector     Swap Meet     Group Buys     The diyAudio Store     Vendor Forums         Vendor's Bazaar         Sonic Craft         Apex Jr         Audio Sector         Acoustic Fun         Chipamp         DIY HiFi Supply         Elekit         Elektor         Mains Cables R Us         Parts Connexion         Planet 10 hifi         Quanghao Audio Design         Siliconray Online Electronics Store         Tubelab     Manufacturers         AKSA         Audio Poutine         Musicaltech         Holton Precision Audio         CSS         Dx Classic Amplifiers         exaDevices         Feastrex         GedLee         Head 'n' HiFi - Walter         Heatsink USA         miniDSP         SITO Audio         Twin Audio         Twisted Pear         Wild Burro Audio

 Similar Threads Thread Thread Starter Forum Replies Last Post SUBduction Multi-Way 3 11th December 2016 04:37 PM aarvin2 Full Range 3 18th November 2012 03:04 PM JZatopa The Lounge 26 14th November 2011 02:40 AM Nehesi Analogue Source 37 20th July 2011 08:29 AM thadman Multi-Way 71 4th September 2009 03:10 AM

 New To Site? Need Help?

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