calculating the position of a light source

Hi,

I am working with a laser light source with 20nm alignment requirements using a XYZ piezo microscope stage. I made some basic code to track the max brightness by adjusting the XYZ piezo stage, but sometimes it will get stuck in a plateau, so I need to store the brightness values in a 3D array and use that to periodically calculate the theoretical max brightness location and then move the XYZ piezos towards that new position. The points aren't equally distributed in 3D space, otherwise I would do a 3D center of mass calculation to find the light source. What would be a good way to find the light source from these 3D brightness points? I can easily find the max brightness in the array of

3D points that have been traversed, but it would be nice to be able to interpolate the max brightness location.

cheers, Jamie

Reply to
Jamie
Loading thread data ...

e
f

Sounds like you need to compute the gradient, then move perpendicular to that...

Reply to
Fred Bloggs

the

D

se

of

Parallel...

Reply to
Fred Bloggs

A physical implementation of the steepest descent algorithm.

Reply to
Spehro Pefhany

s
e
3D
f

text -

Yes- main thing is to compute a directional derivative- he could also speed things up by doing resection ( I think that's the word) on several widely spaced (in azimuth) samples of the gradient...

Reply to
Fred Bloggs

e
f

They make quad photodiodes (PD) (think of a single PD cut into quarters) that can be used to keep a beam centered, as long as the spot size is not too small. A simple feedback loop tries to keep the signals from each quadrant eqaul.

George H.

Reply to
George Herold

Steepest descent is a really lousy optimization algorithm.

On every line minimization step you take, when you get to the minimum along that line, you have to make a right angle turn. That's because at that point the local gradient is perpendicular to the direction you were going. (If that weren't so, you wouldn't be at the line minimum--you could move along the line a bit and get a lower value.)

The result is that you descend in a whole bunch of little staircase squiggles, which in many geometries takes _forever_.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510
845-480-2058

hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

Hi,

Thats a good idea, I think I could do that in the piezo adjustment algorithm to simulate the quad photodiode by stepping the piezos in a box shape for the XY axis adjustment.

cheers, Jamie

Reply to
Jamie

You don't specify whether your problem is to track the beam as things suffer thermal drift or find it in the first place.

If the former then something like a Golden ratio search along each of the axes allows you to reuse many of the existing measurement points. It isn't the most efficient method but it is pretty robust and very easy to implement.

If the latter then you want a full global optimiser. I have seen Simplex methods abused for this fairly successfully in ion optics though I prefer simulated annealing for a global optimisation with a final polish at the end by Newton-Raphson or better Conjugate-Gradients. I think the latter would be overkill in your application.

In 3-space it isn't too arduous to do a brute force search - although you could have trouble if the light spot is extremely elongated along some direction that is not parallel to an axis. If it is more or less a spherical blob then almost any decent optimisation method should work.

As Phil has stated elsewhere in the thread it is very easy for naieve optimisers to get stuck if the function is suitably awkward in shape - long thin ellipses on an almost flat plateau being the most common source of trouble.

Regards, Martin Brown

Reply to
Martin Brown

s

the

3D

ise

y of

Hmm, I don't see how that is going to work. Unless your detector area is a lot smaller than the laser spot size.

George H.

Reply to
George Herold

ts

k the

l
3D

wise

ay of

o
t

The Fletcher-Powell algorithm fixes that by building up a matrix of the second partial deriatives of whatever it is that you are maximising versus the parameters that you are optimising.

I wrote their procedure - in Fortran 4 - into the program that extracted a rate constant from my experimental gas kinetics results when I was doing my Ph.D.

Apparently the Flelcher-Powell procedure has been refined since then to the Broyden=96Fletcher=96Goldfarb=96Shanno procedure

formatting link

-- Bill Sloman, Nijmegen

Reply to
Bill Sloman

Hi,

I decided to make an algorithm that tries to optimize each axis independently, so for the X axis there is a +-X "walk distance" specified with the "home position" constantly updated to the maximum light intensity position. So the algorithm will always explore +- walk distance away from the highest light intensity. I run this on X and then switch to Y and Z axis sequentially with the same algorithm.

cheers, Jamie

Reply to
Jamie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.