Friday, April 23, 2010

ARMAing

The general idea behind an ARMA model is to express the current output as a linear combination of past outputs (the autoregressive part), and current and past inputs (the moving average part). This essentially identifies a transfer function of some order for the system, and since the coefficients appear linearly, the "optimal" values can be found by constructing an appropriate least-squares problem.

I wasn't really interested in coming up with a complete model for the DM dynamics since its time constant is small compared to the sampling time I can get with the WFS. But is it small enough to be negligible when the experiment is running at full speed? The majority of AO papers consider a DM with insignificant dynamics, modeling it instead with a static poke matrix. This was muy bueno with me, except that when trying to identify a poke matrix I basically get garbage unless I insert a pause between applying a DM command and reading the wavefront.

Anyway after much reading, checking, rechecking and cursing I finally wrote a basic ARMA estimation script that organizes all the data into the right places and does the least-squares problem. Basically I gathered some number of DM commands and the resulting WFS measurement, and looked into the coefficients when a pause was included between sending the commands or not. To make things simpler I projected the slope vectors onto the space of actuators. In the ideal case, when the WFS measurements depend only on the current command, the first coefficient should be the identity matrix.

Amazingly, the data was clean enough so that this is actually what happens when I put in a pause before reading the WFS. What's interesting is that without a pause, when the WFS is read immediately after applying the commands, its the second coefficient that's identity, indicating that it takes essentially 1 sample time for the DM to achieve the desired shape. With no pause the sampling frequency was around 20 Hz.

Here's a comparison of the first 5 MA coefficients with a pause (top) and without (bottom. The AR coefficients turned out to be pretty negligible (as you'd expect). Also shown are the norms of the coefficients in each case.



This result seems to verify that the DM does indeed have some time constant, contradicting what everyone says about infinitely fast dynamics. In particular, the 0.05 time constant roughly matches what I found earlier when actuating the DM and capturing WFS frames at a high frame rate.



Incidentally the prediction error on new data is around 15% in either case, and not projecting the slopes into actuator coordinates results in the poke matrix instead of the identity.

The question now is whether or not its worth it to incorporate these dynamics into the controller, or just stick a pause in there and ignore it. Even with the dynamics the model is very simple, just a 1 sample delay with no other significant coefficients, so it shouldn't be hard to do. Of course, I say that now...

Sunday, April 11, 2010

4.13.10

On Friday I got back from my first academic "workshop" up in Monterey. To my surprise it was actually informative, both in terms of AO and in witnessing the unique social interactions that take place at these things. My advisor's assertion that some of the people there were "world class pricks" turned out to be a good assessment of character in some cases.

But that's for another day. For all the interesting stuff I heard there, there were only a few thoughts that materially affect my work at the moment. Even though its April, there's more snow in the forecast for the mountains, so this week is bound to be a short one. Here's what I've been focusing on:

Fourier transforms. One presenter at the workshop extolled the benefit of using Fourier modes to do predictive wavefront control. A common theme among the talks was this idea of frozen flow; basically modeling turbulence as a superposition of a finite number of static layers, each moving with an independent velocity. Under this model, decomposing the wavefront using the DFT is beneficial since shifting a Fourier mode with a certain velocity simply involves rotating the (complex valued) modal coefficient some number of degrees. For a given coefficient, each moving layer would impart a certain periodicity related to the layer's velocity. Thus one could identify the layers by looking at the PSD of each mode and looking for spikes corresponding to this periodic behavior....I think.

DM ARX model. I've been meaning to do this for a while, but its only now that I think I know how to compute MIMO ARX models using least-squares. Of course its close to the scalar version, but I wanted to work everything out to make sure. Because I'm anal about verifying every segment of code, its taken some time to get the actual m-file written up. I finished the MA part on Sunday, and just finished the full ARX code a few hours ago. I'll test it all tomorrow.

Return of the SLM. One of the other grad students at this workshop had a working experiment very similar to mine, but using SLM's as disturbance generators. My advisor was intrigued, especially since there seemed to be an easy way to use it in Matlab, and it now looks like we'll be ordering one of these puppies soon. What exactly I'll use it for I don't know, but maybe I can put it to work mitigating the static bias.