LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

find (X0,Y0,Z0) to minimise the maximum of f(x,y,z)=Sqrt( (x-X0)^2 +(y-Y0)^2 +(z-Z0)^2 ) with a set of data (x,y,z)

Hi, Experts :

 

I have a set of data (x,y,z),  and the distance of each set (x,y,z) to a centre  (X0,Y0,Z0) is caluclated by 

   f(x,y,z)=Sqrt( (x-X0)^2 +(y-Y0)^2 +(z-Z0)^2 )

 

I need to find a  set of (X0,Y0,Z0), which can minimise the maximum of f(x,y,z)  

 

in Excel, I can use Solver and take Mean(x,y,z) as  start values for  (X0,Y0,Z0),

using GRG nonlinear Method, I can find a minimum set of (X0,Y0,Z0).  see aattched zip file for data and Excel file.

 

is there any way I can use LabView to do the same?  

 could Nonlinear curve Fit  be used? and how to implement?

  

any suggestion is more than welcome.

 

thanks for your time 

 

 

Xiaofeng

 

0 Kudos
Message 1 of 8
(3,270 Views)

Check out the Mathematics>>Optimization palette. My choice would be the Downhill Simplex, but there are several other VIs on that palette which would also work.

0 Kudos
Message 2 of 8
(3,256 Views)

thanks for your quick reply. I did try Downhill Simplex, but could not  fingure out how to setup the VI.

see my trial one.   any suggestion?

 

0 Kudos
Message 3 of 8
(3,246 Views)

xgatc wrote:

I have a set of data (x,y,z),  and the distance of each set (x,y,z) to a centre  (X0,Y0,Z0) is caluclated by 

   f(x,y,z)=Sqrt( (x-X0)^2 +(y-Y0)^2 +(z-Z0)^2 )

 

I need to find a  set of (X0,Y0,Z0), which can minimise the maximum of f(x,y,z)  


What do you mean by "minimize the maximum"? (There will be several maxima in the solution).

Maybe you want do fit to a sphere instead?

0 Kudos
Message 4 of 8
(3,235 Views)

Hi,

 

Yes, it is actually to find minimum radius for sphere. I am using LV2012, and I could not find  this call

 

any idea where I can get this?

 

many thanks.

 

 

0 Kudos
Message 5 of 8
(3,229 Views)
It had been in LabVIEW forever. Do you only have LabVIEW base? Look in the math..fitting palette. However, this will not give you the minimum radius, but a best fit for the data.. ~50% will be inside.
0 Kudos
Message 6 of 8
(3,223 Views)
Search wikipedia for "bounding sphere". It lists a collection of algorithms that can be implemented easily.
0 Kudos
Message 7 of 8
(3,217 Views)

HI, 

 

you are right,   the "fitting on a sphere fit.vi " is not what I am after.

 

thanks for the suggestion. I will have a look .

 

 

0 Kudos
Message 8 of 8
(3,196 Views)