LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Downhill simplex optimization Nelder Mead

I'd like to use the downhill simplex methods in LV in order to minimize the distance between a set of two dimensional data. I've looked over the documentation for both implementations of downhill simplex (Unconstrained Optimization VI and Downhill Simplex nD VI) and the former requires a static VI reference to the function while the latter requires an explicit formula. The explicit formula that I am trying to minimize is shown in the attached image file. Basically, I have a set of non-uniformly distributed xy data and I am trying to locate the single x,y point that is located a a minimum distance from all other xy points. In the attached function, xi and yi comprise my entire dataset (n points) and x and y is the location of the point that minimizes F(x,y).

 

The problem that I have is two-fold. The documentation for both of the above mentioned VIs is sparse and I am not sure how to implement either one. For the unconstrained VI, I guess that you need to create an array of xy pairs and calculate F(x,y) based on some guess of x and y for all xi, yi space. For the Downhill Simplex nD.vi, I need to input an explicit formula and I am not sure how to input the formula (as shown in the attached image) such that Labview can understand it. I've implemented the solution in Matlab using the optimization package, but I need a solution in Labview since my code will run on machines that do not have access to Matlab.

 

Any help is appreciated.

 

Thanks

Bob

0 Kudos
Message 1 of 2
(2,523 Views)

Bob,

 

Straightforward implementation of your F(x,y) {actually F(x,X[ ],y,Y[ ])} in a VI is pretty easy.  I have not checked to see if the format is suitable for the Unconstrained Optimization VI.  This does not do any error checking to see if X and Y are the same length.  I do not have any data where the results are known so I did not do any testing to verify the accuracy of the implementation.

 

Lynn 

0 Kudos
Message 2 of 2
(2,504 Views)