MAOS
Multithreaded Adaptive Optics Simulator
Loading...
Searching...
No Matches
DM Hysteresis

The DM hysteresis model is based on "Modeling the hysteresis of a scanning probe microscope", J. Vac. Sci. Technol. B 18 (2), Mar/Apr 2000.

Formula (2) of the paper is used with \(x\) replaced by the actual DM position \(y\) and \(V\) replaced by the command \(x\):

\[ \frac{dy}{dx}=\alpha\, \mathrm{sign}(dx) (\beta x-y)+(\beta-u) \]

For a closed hysteresis loop within the stroke limit \(S\), the linear ordinary differential equation can be solved analytically:

\begin{eqnarray*} y_{t/r}(x)=\beta x \mp \frac{u}{\alpha}\left(1-\frac{2\exp(\mp\alpha x)}{\exp(-\alpha S)+\exp(\alpha S)}\right) \end{eqnarray*}

where \(t\) and \(r\) represent the trace (increasing \(x\), upper sign) and retrace (decreasing \(x\), lower sign) directions. It is desirable to have \(y\) within the same range as \(x\) to simulate a calibrated command: \(y_{t/r}(S)=S\). Let the hysteresis ratio be \(h\), defined as the maximum difference between the trace and retrace curves, which occurs at \(x=0\), divided by \(2S\). We have

\begin{eqnarray*} \frac{y_r(0)}{S}&=&\frac{u}{\alpha S}\left(1-\frac{2}{\exp(-\alpha S)+\exp(\alpha S)}\right)=h \\ \frac{y_{t/r}(S)}{S}&=&\beta-\frac{u}{\alpha S}\left(1-\frac{2\exp(-\alpha S)}{\exp(-\alpha S)+\exp(\alpha S)}\right) = 1 \end{eqnarray*}

The equations can be solved uniquely for \(u\) and \(\beta\) when \(\alpha S\) is fixed. The hysteresis curve is a weak function of \(\alpha S\), and \(\alpha S=2\) produces a good looking curve. A smaller \(\alpha S\) has slower convergence of the hysteresis curve.

The hysteresis model is simulated using simple integration. For each step with a new command \(x\), the position \(y\) is updated as

\begin{eqnarray*} dx &=& x-x_{last} \\ dy &=& \alpha |dx| (\beta x_{last}-y_{last})+dx(\beta-u) \\ y_{last}&\mathrel{+}=&dy \\ x_{last}&=&x \\ y&=&y_{last} \end{eqnarray*}

Implementation

The model is implemented in lib/hyst.c:

  • hyst_new() creates the model for one DM. It takes the hysteresis ratio \(h\), the dimensionless \(\alpha S\) (a negative value uses the default of 2), the stroke \(S\) (infinity is replaced by 10 µm), and the number of actuators, and computes \(u\), \(\beta\), and \(\alpha\) from the equations above.
  • hyst_dmat() and hyst_dcell() apply the integration above to each actuator and keep \(x_{last}\) and \(y_{last}\) as the state. hyst_reset() clears the state.

In maos, the model is enabled for a DM when dm.hyst is nonzero, using the parameters

  • dm.hyst: the hysteresis ratio \(h\), between 0 and 1 (default 0, i.e., disabled),
  • dm.hyst_alpha: \(\alpha S\) (default 2),
  • dm.hyst_stroke: the stroke \(S\) in meters at which the hysteresis is measured (default 10e-6),

with defaults in config/maos/sim.conf. The models are created in maos/sim_utils.c, and filter_dm() (maos/filter.c) applies them to convert the DM commands simu->dmcmd to the actual DM shape simu->dmreal.