LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Feedback loop algorithms

Hi,

 

 

  I have a question regarding the best method for implementing a feedback loop.  The application is simple.  I wish to find the optimum z-position for a motorized stage based on the maximum light reflected from the surface that is detected by a photodiode (PD). 

 

  The simple routine that i have implemented is to record the position at a central position, then move the stage up one step where the step size is fixed by the user, record the PD output, then move the stage one step below and record the PD again.  Based on the highest reading, move the stage incrementally in the direction of highest PD output until the PD signal drops and then have the stage step backwards one step. 

 

  This algorithm seems to work okay but i feel that it is very brute force.  Does anyone have any suggestions where to look for example code, which has a more elegant approach to finding the position of maximum signal more efficiently.

 

 

Thanks for your help in advance,  - joseph

 

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

Yes, that's kinda the first idea that came to my mind... especially since you don't really know the value of that maximum light, right?

 

As a more elegant (maybe too elegant) approach, I'd try to get the physical model of the system (I can't quite picture it but It sounds like a geometrical problem) and obtain the function of light as a function of position. It is probably a parabola? Or just two linear segments with a peak? Then you can find the expression for getting the maximum point (derivative = 0). Then read 3 random points and that could probably give you enough data as to approximate the peak.

 

I can think of some other methods using fuzzy logic (which is really a lot simpler than it sounds), but we'd have to know what shape does this function light=f(z) has. Two ramps? A parabola? Some other curve?

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