Thursday, May 28, 2009

At long last the SLM is installed and appears to be working. Here's the reconstructed phase with a test image:



See the face smiling at its own existence? Happily, this also indicates my phase reconstructor is working

Next comes controlling it from Matlab.

Wednesday, May 27, 2009

1. Cut a Hole in a Box

Finally received all the cables to install the SLM. In one final kick to the balls the connector for this new cable was too wide for the back of my PC case, so I had to pry this pointless plastic cover off the back. Why Dell shields their cases with useless crap like that I don't know.

I did some basic realignment and it looks like everything is attached correctly. Tomorrow I'll do some testing to see if the SLM's producing the phase changes its supposed to. After that, I need to figure out a way to get it working from Matlab.

In other news I've been working on the SPGD simulation with dynamic colored noise and multiple channels. To my surprise it actually works pretty well if the noise is kept to around 1% of the Nyquist frequency, but my adviser tells me this is pretty good. The idea is that by using the Strehl as the cost criteria potentially allows for the use of a photodiode instead of a full wavefront sensor. Thus, performance would probably only limited by the bandwidth of the DM controller, rather than the WFS framerate. Ideally, this would mean that sampling rates in the KHz range would be possible (and cheap).

Here are some typical results using 3 channels. More channels seem to work, but tuning the parameters is a bitch. In particular, the spikes in the cost function can be reduced by increasing the size of the perturbations, which (I think) get swamped by the disturbance sequence with higher noise variances.



Control begins at iteration 5000. This plot doesn't show the change in the cost function due to the dithering at each step to estimate the gradient. Its hard to tell from the plot, but the controlled cost function has an average value that is around 40% of the uncontrolled average. Note that these results don't look as good as those a couple days ago. In those results I forgot that I had a sinusoidal disturbance in addition to the colored noise sequence.

Tuesday, May 26, 2009

5.26.09

My gradient descent simulation is showing some progress in rejecting dynamic disturbances. Here's a plot showing the cost function (log of the Strehl ratio using the Marichal approx), noise term, and control sequence using a noise bandwidth that's 1% of the Nyquist frequency. Control starts at 5000 iterations.




My view at the moment is that the command sequence essentially acts as a first order system, exponentially changing in response to a step disturbance. The transient response of this system is governed by the size of the optimization step. So as long as the period of the dynamic disturbances are sufficiently larger than the rise time, the algorithm shouldn't have a problem rejecting it.

This analogy isn't exactly correct since the gradient must be estimated at each step, and the step size is only constant if the normalize gradient and constant gain are used, which isn't always the case. Still, the problem basically boils down to finding a control gain large enough to provide convergence, but small enough to be stable. Even more, since the objective function is basically quadratic, there's probably some way to quantify the optimal step size, but I'm too lazy at the moment to spend much time on that street.

The current simulation is very simple, using a single channel with no poke matrices or actuator nonlinearities. The next step still be to gradually introduce these features until I have a realistic model. If this works at all, it might be worth looking into other first-order algorithms that have even faster convergence properties. i.e. pseudo-Newton and Nesterov's.

Thursday, May 21, 2009

5.20.09

I gave up waiting for a reply about the SLM cables, so I went ahead and ordered what I think are the right ones. Hopefully they'll be here next week.

Until then I've gone back to testing out gradient descent methods on a more complicated model, and using the "Marishal approximation" of the strehl ratio. Because this equation is a log-concave function of the wavefront (spatial) variance, I should be able to apply any number of nonlinear, first-order optimization techniques as long as I can get an accurate estimate of the gradient. In contrast to my previous experiments with this, I've added a colored noise term that corrupts the wavefront with some bandwidth. The question is how can I obtain an accurate gradient estimate in the presence of such garbage? And how are those estimates corroded by increasing the bandwidth (and hence correlation) of the noisy input?

Another person in my lab is trying to work the same problem with an extended Kalman filter, which know nothing about. This perspective views the Strehl ratio approximation as a nonlinear observer of the system's state. There are some notes online from some Stanford course (EE236) that has a good explanation of the EKF, so I might have to read that over at some point.

Tuesday, May 19, 2009

5.18.09

The last couple days have been a frustrating string of delays in gathering the components I need to install the SLM. At the moment, I'm trying to get longer cables to connect the DAC board to my PC, since the supplied cables are retardedly short. The exact type of cable isn't specified in the thin manual that I have for it, and it doesn't help that there are a million nearly identical types of scsi connectors. So after scouring the net for images of obscure 20 year old cables, I finally emailed the manufacturer. Hopefully they'll get back to me tomorrow and will be willing to spill the info. Ahh the joys of experimental research.

In the mean time I'm continuing to review some controls material, particularly adaptive filtering and digital control. I was happy to find out that my adviser is pretty interested in trying these Laguerre lattice filters, but I have a ways to go in my review before I get to that level.

Tuesday, May 12, 2009

FIR, LMS, RLS, WTF?

Now that my hardware setup is approaching something near its final form, I think its time to start thinking about what I'd like to accomplish here come check out time. Thus, I present...

A 7 point plan for dissertation ass kicking:

1. Finish configuring the SLM to generate disturbances. If that fails, use a DM or other active optical element. These disturbances should originate, using various simulation parameters, from the HEL simulation.

2. Try basic classical AO controllers with said disturbances. Characterize bandwidth properties and relationship to number of modes used.

3. Try "blind" optimization algorithms using target camera information only. Ideally, the cost function used would be somehow related to the Strehl ratio, and could be measured using a photodiode if desired (e.g. intensity). Some interesting first-order algorithms to try include: simple gradient descent, quasi-newton, gradient mapping, and (not first-order) interior point methods.

4. With dynamic disturbances, try to identify a FIR controller using LMS offline. In real time, use a basic RLS fixed-order controllers.

5. Lattice based, order-recursive FIR controllers

6. RLS Laguerre, order-recursive IIR controllers

7. Try RLS adaptation using some other set of orthogonal transfer functions. Maybe something could be done here using Q-parametrization.

That last one might be off in la-la land, but if there's time it could be interesting. S. Boyd's book on Linear Controller Design might have some interesting material related to that.

Monday, May 11, 2009

5.11.09

Truncating the sensor image turned out not to be the nightmare I thought it would be, so removing shadowed spots from the slope calculation seems to work pretty well. The classical controller seems to do a pretty good job flattening the phase, here's a before and after comparison of the reconstructed phase:



The norm of the wavefront slope error isn't really reduced much, <10 percent usually, but I think this is because the reference wavefront is already pretty flat. Right now I'm playing around with deliberately adding a strong focus bias by moving a lens to see if the controller can still compensate.

Friday, May 08, 2009

5.8.09

More classical control stuff today. It seems like there's a problem with the WFS measurements. Although the controller successfully reduces the measured slope norm, reconstructing the actual wavefront reveals a deeper story:



The top plot is the reconstructed phase with zero command (dac=180), while the bottom is with the steady-state control value. Clearly the end result has more phase variation in the center, even though the slope norm is minimized. I think the problem is at the corners. Physically, the WFS has a long barrel opening before the image plane, and this is causing some corner sub-apertures to be shadowed. Currently, my code just sets the slopes at these these locations to zero, and I think that's causing the reconstructed phase surface to dive at the corners like that.

The result is this artificial bowl shape, and this causes a large projection into the focus DM mode even though most of the reference wavefront is pretty flat. It looks like the controller is attempting to compensate for this by depressing the center. Touching, but ultimately wrong. Note that this wasn't a problem in generating the poke matrix, since in that case I was subtracting out the reference wavefront from each measurement. Here I'm attempting to reduce the total wavefront.

To solve this I'll have to change my code to exclude those slope measurements from the corners, rather than just set them to zero. This isn't as easy as it sounds, since the indexing there and in the phase reconstructor is gnarly. If it doesn't drive me insane I'll hopefully have that done Monday.

Thursday, May 07, 2009

5.7.09

After a few setbacks, I finally have the experiment hardware set up with the SLM in place, although its not attached to my PC yet. Basically, I had to add another beam splitter and 2 new lenses to accommodate another actuator, and for some reason this really magnified intensity distortion in the laser spot. The result was that the classical AO controller wasn't able to handle more than 2 or 3 modes before the sensor started returning bad data. To fix this I changed laser (which meant changing the focusing optics), and after days and days of tinkering, I finally have it working pretty well.

Another note is that almost all of the beam reflected off of the DM must hit the sensor. Anything else and things go to hell for some reason.

Right now the SLM is just there passively as I run through all my control code to test for goodness, but over the next few days I'd like to get it attached to my computer and taking commands from matlab. This requires a PCI card that I have to find, so it could take some time. There's some question about whether this SLM works, but I'm open to using another DM if I have to, although that would take months to order.

Saturday, May 02, 2009

5.2.09

A thing a beauty:



compared to the crap I usually get.