1. How to set SVD limit?
Once the blocks have been defined, the SVD limit setting must be tuned to remove poorly sensed modes.
A high value of svdlim
will reject more modes, and achieve better control loop stability over the modes that are controlled. The drawback of a high svdlim
value is that some input WF errors may not be corrected.
It is good practice to check how many modes are kept after SVD, and compare it to the expected number of modes that need to be corrected.
# Compute mode block 03 control modes with svdlim=0.02
cacao-fpsctrl setval compstrCM svdlim 0.02
cacao-aorun-039-compstrCM -mb 03 -mr 11:50
# Check number of modes
fitsheader conf/CMmodesWFS/CMmodesWFS.03.fits | grep NAXIS3
# 40 control modes
With this svdlim=0.02
settings, no mode is rejected (input dimension = output dimension = 40). The figure above shows the DM-space and WFS-space cross products, written as file conf/CMmodesDM/CMmodesDM.03.fits
and conf/CMmodesWFS/CMmodesWFS.03.fits
. The SVD is performed in WFS-space, so the WFS-space cross product is a pure diagonal. Since the cacao convention is that modes are normalized to unity RMS amplitude in DM space, the DM-space cross-product matrix has constant value on the diagonal, equal to the number of active actuators in conf/dmmask.fits
(value = 1382 in this example).
At higher mode numbers (top right part of the matrices), we can see two issues indicative of poor/unstable AO loop performance:
DM modes cross-talk Off-diagonal terms in the DM-space cross-product become large, with absolute values reaching 0.7x the diagonal value. Large off-diagonal values mean that correcting a mode will excite other modes, rendering the loop unstable at high gain.
Weak WFS modes Diagonal values in the WFS-space cross-product become small, down to 4% of the peak value (first element of the diagonal). A small diagonal value here corresponds to a mode that is weakly sensed, so it can be easily excited by WFS noise, WFS nonlinearities of WFS crosstalk.
Let’s try a larger svdlim
value to remove the problematic modes.
# Trying svdlim=0.2
cacao-fpsctrl setval compstrCM svdlim 0.2
cacao-aorun-039-compstrCM -mb 03 -mr 11:50
# Check number of modes
fitsheader conf/CMmodesWFS/CMmodesWFS.03.fits | grep NAXIS3
# 25 control modes
We now have a smaller number of control modes (25 instead of 40), but with cleaner cross-product matrices: largest off-diagonal DM-space value is 45% of peak, and smallest WFS-space value is 14% of peak.
2. Optimizing blocks
Once we have defined the control mode blocks (typically a range of spatial frequencies) and optimized svdlim
for each block, we must combine the blocks.
2.1. Simple merge
The simplest approach is to join all control modes, pasting together all blocks. For example:
cacao-aorun-039-compstrCM -mbm 00:01:02:03:04
This is almost always a bad approach, as modes are generally not orthogonal in WFS space between blocks, so we will encounter cross-talk between modes belonging to different blocks.
2.2. Marginalizing in WFS space
To address the modes cross-talk issue, we can enforce that each mode block is marginalized against previous blocks in WFS space. In this example, we also enforce that the first two modes are pure tip and tilt.
# Compute CM for tip-tilt (first 2 modes of modesZF, so use range = 1:2)
# Write output to mode block 00
cacao-aorun-039-compstrCM -mb 00 -mr 1:1
cacao-aorun-039-compstrCM -mb 01 -mr 2:2
# block 01: LO modes, marginalized against TT
cacao-aorun-039-compstrCM -mb 02 -mr 3:10 -marg 00:01
# block 02: MO modes, marginalized against TT and LO
cacao-aorun-039-compstrCM -mb 03 -mr 11:50 -marg 00:01:02
# block 03: HO modes, marginalized against TT, LO, M)
cacao-aorun-039-compstrCM -mb 04 -mr 51:1249 -marg 00:01:02:03
# Merge
cacao-aorun-039-compstrCM -mbm 00:01:02:03:04
2.3. DM-space Marginalizing
Modes may need to be orthogonalized in DM space as well. For example, we may want to ensure that the first two modes are tip-tilt and all other modes be orthrogonal to tip-tilt in DM space.
# Compute CM for tip-tilt (first 2 modes of modesZF, so use range = 1:2)
# Write output to mode block 00
cacao-aorun-039-compstrCM -mb 00 -mr 1:1
cacao-aorun-039-compstrCM -mb 01 -mr 2:2
# block 01: LO modes, marginalized against TT
cacao-aorun-039-compstrCM -mb 02 -mr 3:10 -marg 00:01 -margDM 00:01
# block 02: MO modes, marginalized against TT and LO
cacao-aorun-039-compstrCM -mb 03 -mr 11:50 -marg 00:01:02 -margDM 00:01
# block 03: HO modes, marginalized against TT, LO, M)
cacao-aorun-039-compstrCM -mb 04 -mr 51:1249 -marg 00:01:02:03 -margDM 00:01
# Merge
cacao-aorun-039-compstrCM -mbm 00:01:02:03:04
Block-marginalization can be done in WFS space, DM space, or both. If selecting both WFS and DM space marginalization, the DM-space marginalization will be performed first with the cacao-aorun-039-compstrCM
script.
2.4. Example and Discussion
The figure above shows the result of SVD-based WFS-space mode selection with svdlim=0.2
for each block, and different block marginalization options. Marginalizations are performed on the input modes prior to SVD computation.
From left to right:
- DM-space cross product
- WFS-space cross product
- selfRM, obtained after closint the loop with gain=0
From top to bottom:
- No marginalization
- WFS-space marginalization of each block against the preceeding ones
- DM-space marginalization of each block against the preceeding ones
- WFS-space marginalization followed by DM-space marginalization
- DM-space marginalization followed by WFs-space marginalization
The loop was closed in each of the five cases, with a 1% leak (mult=0.99
) on all modes, and all modes at the same gain value.
- Without marginalization, 585 modes are controlled. The loop becomes unstable on tip-tilt at gain=0.28. This is consistent with the strong off-diagonal DM-space values on tip-tilt, where tip-tilt DM modes are excited by modes in block02.
- With WFS-space marginalization, 487 modes are controlled. The loop becomes unstable at g=0.60 on petal modes.
- With DM-space marginalization, 498 modes are controlled. The loop becomes unstable at g=0.28 on tip-tilt.
- With WFS+DM space marginalization, 260 modes are controlled. The loop becomes unstable at g=0.33 on tip-tilt.
- With DM+WFS space marginalization, 487 modes are controlled. The loop becomes unstable at g=0.60 on tip-tilt.
3. Conclusions
svdlim
value) and maximize the number of modes controlled (improved by lower svdlim
value).