LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best continuous heuristic optimization?

This sounds like my first LV project were I was alligning single mode fibers. We had discussed using a more exotic method but a simple raster scan worked nicely so we skipped making it more complicated.

 

Would you expect the energy distribution to be gausian as you scan across the beam?

 

Do you have a good idea of the power distribution?

 

Fitting the data to a curve will let you find the max.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 11 of 18
(1,172 Views)

Indeed they are single mode fibers and the power distribution has a 2D gaussian profile, which we use to find the max points. The raster works fine for us, and takes less than a minute but we want to automate and take hundreds or thousands of measurements and those minutes add up.   

0 Kudos
Message 12 of 18
(1,160 Views)

Sounds like you are right, a simple hill climber might be best.  Perhaps Nelder Mead might work better if you simply limit the stepsize to whatever allows you to keep track of position.  As long as you have to limit the step-size many of these algorithms will behave in a very similar way.

 

Any hope of modeling the hysteresis? 

 

-Jim

Message 13 of 18
(1,154 Views)

Actually that's exactly what I'm working on now, a labview program that will scan an axis translation under a variety of parameter changes (stepping, pre-zeroing, etc). I'm not sure what I'll learn from it, but yeah at least get that max tolerable step size.

0 Kudos
Message 14 of 18
(1,149 Views)

I have a single mode laser beam coming out of a fiber, collimated, and reflected back to the fiber.  The measured intensity of the reflected laser light is my function f(x) with bounded x,y,z stage positions as the function inputs.  By approaching any positions from high to low consistently (two steps forward and one step back for each stage), I can minimize stage hysteresis.  

 

I am looking for a hill climb vi that will move x, y, z stages simultaneously with good initial guesses and locate the maximum intensity.  I looked at Downhill Simplex nD.vi.  I realized that I would have to write my own subvi to generate f(x) for any given x, y, z (negate measured intensity), search and replace all f(x) in the Downhill Simplex nD.vi and its subsequent vis.  Has anyone already done this?  Downhill Simplex nD.vi doesn't have inputs for boundaries of the inputs for f(x).

 

NI should have an example for users to provide their own f(x) from measurements instead of a functional expression.

 

I have Labivew Full 2012.

 

Thanks in advance for any inputs and suggestions.

 

Fang

0 Kudos
Message 15 of 18
(1,123 Views)

fzhong,

 

I agree that the Downhill Simplex nD.vi is one way to establish minima/maxima. If you are concerned about creating a function f(X(x,y,z)) from your data points established in your measurements, there are certain sub VIs that can help you do this. Here is some information on those that are recommended:

 

3D Polynomial-Fit and Interpolation

Nonlinear Curve Fit VI and Practical Nonlinear Fitting

 

I will continue to look into this. Let me know if you find anything else to help you through this process.

 

Best,

Jason M.
Applications Engineer
National Instruments
0 Kudos
Message 16 of 18
(1,101 Views)

Hi Jason,

 

Thanks for the reply.

 

NI tried to provide a Downhill Simplex nD.vi for as broad as possible bases of users by implementing string-parsed input for arbitrary functions.  On the other hand, NI has Labiview to control experimental inputs and DAQ experimental output.  In this case, there are no explicit mathematical expressions to write in that string input, but a time consuming scans of all the input parameters show that there is an optimal value.

 

but NI doesn't have an easy way to utilize this capability for optimizations.

 

I am starting from ground to understand Downhill Simplex nD.vi and try to rewrite it to just use f(X(x1, x2, x3, ...)) from experimental values to replace the parsed strings.  I am afraid that I am reinventing the wheels as I suspect that many Labview users might have this need and some of them already implemented it in their works.

 

Regards.

 

Fang

0 Kudos
Message 17 of 18
(1,093 Views)

Fang,

 

I have not heard of someone specifically attempting non-linear optimization on experimental outputs without specified input functions. You will have to create some sort of mathematical expression to input into the Downhill Simplex nD.vi, if you are going to utilize this specific vi. I recommend checking out some of the optimization examples and curve fit examples in the Example Finder for creating your VI. You may be able to create an adequate approximation of your data with a mathematical expression, depending on the level of accuracy you desire.

 

Best,

Jason M.
Applications Engineer
National Instruments
0 Kudos
Message 18 of 18
(1,079 Views)