Sunday, December 26, 2010

12.26.

A few days ago I got some new modes that are zero mean. Since the first most is a column of 1's, this means that the other modes are orthogonal to mode 1 in the normal Euclidean sense, and also on the DM surface (theoretically). There's one less degree of freedom, so there are a total of 30 of these.

Its not clear yet if this is going to make a difference since they look pretty similar to the modes I was using before, but you never know. The most significant difference so far seems to be the norm of the phase shapes they reproduce. Maybe there's something that could be done with this parameter to scale them relative to the power in each mode of the disturbance.

Saturation is still a problem I'll have to live with, even though I tried scaling down the amplitude of the disturbance WF. In the mean time I'd like to compare the performance of the two sets of modes, obviously using a set of disturbances that don't cause saturation.

Tuesday, December 21, 2010

12.21.10

Been plagued this week getting the LTI controller to work without saturation. I'm not sure why I'm suddenly having this problem when it was running smoothly before. Right now I'm frequently getting saturation in the DM voltage after a few hundred samples with the LTI loop closed.



The annoying thing is that it occurs very suddenly, and as a result the modal sequences shoot up, almost like step response. Actually, I'm not sure which one is driving the other, but since no one's touching the experiment, I assume its the control saturation.

Some things to investigate:

1. A bad plant model. It could be that the poke matrix just isn't accurate enough for some modes, and as a result the modal commands from the LTI controller are too coupled or otherwise garbage.

2. Bad sensor data. I doubt this is the case since I've gotten the WFS image very clean, with small realignments and re-referencing every day to keep things tidy.

3. Shitty predictor. Relative prediction error's are sometimes north of 50%

4. Bad internal model. None of the nonlinear effects (rounding or saturation) are included in the controller's internal model. So when saturation does happen the predictor doesn't get an accurate estimate of the current disturbance. Obv. this would only make things worse when saturation was already happening.

5. Bad PI Gain/pole. Possible, but since the integrator is included in the ID I'm not sure the LTI controller would jsut send out higher values if I reduced the PI gain.

6. Unexplainable. The most likely.

I'm gong to see if I can reproduce the problem in simulation if playing around with the integrator gain doesn't solve things. Otherwise, I might also look at writing the code to actually calculate the optimal LTI filter instead of pulling it from the Kalman filter. Basically this involves an LQR problem, with the advantage that you can directly penalize the "size" of the predictor to try to prevent large control values.

Also, it's pretty funny looking at the keywords that send people to this blog, I guess people looking for implementations of different AO algorithms. So if you're out there: no I don't have a simulink SPGD implementation, sorry. Maybe one day.

Friday, December 17, 2010

12.16.10

More playing around with the target camera today. For some reason I haven't been able to reproduce the nice spot from the previous post, instead getting a large blob ~ 100px dia. Prob a result of the mysterious bias problem I've been having.

Luckily most of the performances measures so far show pretty good correlation to the norm of the WF error. Here's an example of the norm of the recon phase compared to the negative log of "sr2," which is the sharpness measure equal to the max intensity divided by the total image sum. Input was a spatially uniform sinusoidal disturbance command around the bias with an amplitude of 20V.

[Chr06a] suggests that the image sharpness is proportional to the Strehl, so its natural log should be approx. inversely proportional to the spatial RMS of the wavefront error (by the Marechall approximation). Seems to be about right if you squint.

The imaging sensor of the target camera isn't placed with the same accuracy as the other components, so its possible that minimized wavefront doesn't minimize the measured Strehl. I don't expect this to be a problem though since ultimately I'm going to be looking at the noise power, and I think unless the placement is way off with LTI controller should show an obvious improvement.

Here's a video of a random disturbance with the corresponding target image and reconstructed WF.



Well, obviously, we have a spot which isn't stationary, making power in the bucket measures somewhat useless. My advisor seems to favor these since they're nice to use in simulation when everything is perfectly on axis, so there's going to have to be some convincing before I can really use a different method.

Tomorrow I'd like to get the some sharpness measurements going w/ and w/o the LTI controller, assuming I can ever get it working without it shitting the bed.

Wednesday, December 15, 2010

12.15.10

The first 3 of yesterday's stuff went fine. Amazingly I was able to get a license for the driver quickly, so accessing both cameras simultaneously through the same interface is no problem. Current target position seems fine for now, here's an example image with both DMs at the bias voltage.



I'll start looking at performance measures today. Incidentally, here's an illustration of the strange bias WF problem I've been having.



This is a composite of the reference SHWFS image from last night and from this morning. Clearly there's been a change in the focus, which is a mystery since no one's been the lab afaik. This is fixed by adjusting L2 (after the spatial filter), and doing some basic realignment, but its bitch to do correctly.

Tuesday, December 14, 2010

12.14.10

FIR code still isn't working right. Diagonal terms always seem to be wrong in both the LS and normal-equation versions. I think I'm going to table this for now since I really only need it to compare the performance of the adaptive controller.

I really want to focus on getting the target cam working this week so I can start generating some complete data for possible paper submissions. In the process of getting the driver license right now, but its taking a while due to some admin delays. Luckily I can still access the image (although sometimes with a watermark). Stuff that needs to be done:

- Code to generate camera object in Matlab. Can the target and WFS be active simultaneously?

- Determine some nominal positioning where the spot size is reasonably small.

- Find decent camera settings for said position.

- Reconfig HDR code to use if necessary.

- Look at possible performance metrics. See how they respond to basic WF disturbances (step input to DM61, sinusoidal disturbances in a single mode, etc).

- Look at results using different non-PI controllers.

Ideally I'll have all this done by Friday.

Monday, December 06, 2010

12.6.10

Finally managed to get all 3 control situations running on the same disturbance data. For some reason, the bias WF changes significantly from time to time, forcing me to do a realignment each time. The usual symptom of this is a crappy poke matrix, or highly saturated commands when identifying the CL dist. model.

Anyway, something's screwed up with the adaptive loop (AO) as shown below. In the past (and I think in theory), it has outperformed the LTI loop since it can better compensate for plant modeling error. One possibility is that the adaptive filter order is insufficient (right now, the adaptive filter is FIR with order 4). I think I'm going to update the code I have to compute the optimal FIR filter so I can look at how the theoretical FIR impulse looks.




For tomorrow:
- Update FIR code
- Figure out what the deal is with the target camera so I can get some Strehl ratio measurements.

Thursday, December 02, 2010

12.2.10: Plotfest 2010

I put in another beam splitter to send the beam to the target camera, so I wanted to run the LTI loop again to make sure everything was still ok. Luckily things still seem to be working, and I ended up spending most of the day thinking about what plots might be useful in analyzing what's spit out.

The controller only projects the wavefront onto the modes that are controlled, but since the modes aren't totally uncoupled irl, looking at these sequences don't tell the whole story. Instead, I projected the wavefront sequence onto ALL the modes and only looked at the the ones that are controlled. The difference is that there is some cross talk from the higher order modes that you don't see if you neglect them from the projection. For the plots here, the experiment used 25 control modes. The LTI predictor was estimated using 10000 frames with a prediction error around 0.38.

Anyway, one of the more useful plots is obviously the PSD's for each modal sequence. Clearly the classical controller is killing the low frequency/static disturbances but does shit for anything else as expected. The LTI controller does a decent job flattening the spectrum, with surprisingly little high frequency amplification like I was seeing before. My experience has been that this amplification shows up when the predictor model is crap, so I guess it was good enough this time. Plant modeling error should also contribute to that, so if the AO loop does even better I'll have an idea that the closed-loop plant isn't matching the theoretical version in the controller.



Next up is the modal sequence itself for a few of the modes. You can clearly see how the completely open-loop disturbances have zero mean (i.e. in Mode 1), a static error that's knocked out by the integrator. The LTI controller makes quick work of the remaining high-amplitude spikes. One thing I really have to do is estimate a noise floor that shows in the stead-state (with no disturbances) due to the WFS.



The temporal RMS for each mode is also instructive. This is key since sometimes the RMS improvement may not be so impressive even if the PSD's are white. Luckily the LTI improves the RMS for every mode, so I guess they're all fairly well formed on the DM. Note the the integrator sometimes does worse in certain modes, I guess those are being sacrificed for the sake of modes that contribute more to the noise power. i.e., modes with the largest RMS improvement should be the ones that have the highest open-loop value (ex. 6 and 9 compared to 8). Notice that after mode 25 there's almost no improvement as expected. But, there is some difference, indicating the influence of the controlled modes creeping in.



Finally, the time series of the spatial RMS. The top plot shows the spatial RMS from the modal sequence, i.e. the part of the wavefront in the range space of the DM. This is fine, but ultimately the Strehl ratio of the beam depends on the entire wavefront RMS, shown in the bottom plot. This was generated by reconstructing the phase directly from the slope vector instead of just projecting it onto the range of the poke matrix. Before, when few modes were used, I think there wasn't much improvement between the controllers in this plot, and subsequently that's why there was little improvement in the Strehl as measured by the target. Based on this guy, if the Marechall approximation is true I should see some significant improvement in the measured Strehl when I finally get the target camera set up again (hopefully tomorrow.



That's all for now. gjdm.