Control Algorithm in Optical Feedback Control

The optical feedback control (OFC) estimates the offset (\(\vec{u}\)) of degree of freedom (DOF) at time \(k+1\) based on the wavefront error (\(\vec{y}_{k}\)) at time \(k\). The feedback amplitude is based on the gain (\(g\)). The first step is to evaluate the optical state (\(\vec{x}_{k}\)) at time \(k\) in the basis of DOF. The second step is to evaluate \(\vec{u}\). The final step is to decide the feedback amplitude based on \(g\).

The optical state is defined as:

\[\vec{y}_{k} = \textbf{A}\vec{x}_{k} + \vec{y}_{2} + \vec{y}_{\text{c}}(\ell).\]

\(\textbf{A}\) is a subset of the sensitivity matrix \(\textbf{M}\) that is a three-dimension matrix. For each element \(\textbf{M}_{ijk}\), \(i\) is in the basis of optical field (\(\mathbb{O}\)), \(j\) is in the basis of Zernike polynomial(\(\mathbb{Z}\)), and \(k\) is in the basis of DOF(\(\mathbb{D}\)). \(\textbf{A}\) equals \([\textbf{M}_1, \textbf{M}_2, \cdots, \textbf{M}_n]^{T}\), where \(n\in\mathbb{O}\) is the interested optical field point and each element \(\textbf{M}_{n, jk}\) in \(\textbf{M}_{n}\) is \(\textbf{M}_{njk}\) actually. \(\vec{y}_{2}\) is the wavefront error correction between the central raft and corner wavefront sensor. \(\vec{y}_{\text{c}}(\ell)\) is the intrinsic wavefront error from telescope optical design as a function of filter band (\(\ell\in\{\text{u}, \text{g}, \text{r}, \text{i}, \text{z}, \text{y}\}\)). \(\vec{y}_{\text{c}}\) equals \([\vec{y}_{\text{c},1}, \vec{y}_{\text{c},2}, \cdots,\vec{y}_{\text{c},n}]^{T}\) where \(n\in\mathbb{O}\).

The pseudo-inverse method is a straight-forward way to solve this over-determined system. The solution is:

\[\vec{x}_{k} = \text{pinv}(\textbf{A})(\vec{y}_{k}-\vec{y}_{2}-\vec{y}_{c}(l)),\]

where \(\vec{x}_{k}\) is the least norm solution of optical state.

To evaluate \(\vec{u}\), the cost function (\(J(\vec{u})\)) at time \(k+1\) is defined to be:

\[J(\vec{u}) = \int_{\sigma \in \mathbb{O}} \vec{x}_{k+1}^{T}\textbf{Q}\vec{x}_{k+1} \ d\sigma + \rho^{2}\vec{u}^{T}\textbf{H}\vec{u},\]

where \(\vec{x}_{k+1}=\vec{x}_{k} + \vec{u}\) is the predicted state optical state, \(\textbf{Q}\) is the image quality matrix, \(\textbf{H}\) is the control authority matrix, and \(\rho\) is the penalty. Based on the Gaussian quadrature rule, the cost function can be rewritten to be:

\[J(\vec{u}) = \sum_{i \in \mathbb{O}}w_{i} ( \vec{x}^{T}_{k+1}\textbf{Q}\vec{x}_{k+1})_{i} + \rho^{2}\vec{u}^{T}\textbf{H}\vec{u},\]

where \(w_{i}\) is the weighting ratio for the optical filed point \(i\).

Differentiate \(J(\vec{u})\) with respect to \(\vec{u}\) and set the value as 0(Cost Function Minimization), we have:

\[\begin{split}\begin{align*} \vec{u} &= -\frac{\sum_{i}w_{i}(\textbf{Q}\vec{x}_{k})_{i}} {\sum_{i}w_{i}\textbf{Q}_{i} + \rho^{2}\textbf{H}} \\ &= - \textbf{F}\sum_{i}w_{i}(\textbf{Q}\vec{x}_{k})_{i}, \end{align*}\end{split}\]

where the matrix \(\textbf{F}\) is:

\[\textbf{F} = \text{inv}\left(\sum_{i}w_{i}\textbf{Q}_{i} + \rho^{2}\textbf{H}\right).\]

For the control authority matrix \(\textbf{H}\), it is defined to be:

\[\textbf{H} \equiv \text{diag}(\vec{\rho}_{h}\vec{h}^{T})^{2},\]

where \(\vec{h}\) is the authority of subsystem and \(\vec{\rho}_{h}\) is the penalty of \(\vec{h}\). The change of 1 um (e.g. hexapod position) is assumed to be the same as 1 N*RMS (e.g. mirror bending mode).

For the image quality matrix \(\textbf{Q}\), we choose:

\[\vec{x}^{T}\textbf{Q}\vec{x} = \vec{p}^{T}\vec{p},\]

where \(\vec{p}\) is the image quality vector. It relates to the wavefront error \(\vec{y}\) as the following:

\[\vec{p} = \textbf{C}(\vec{y} - \vec{y}_{2} - \vec{y}_{c}(l)).\]

And we have:

\[\begin{split}\begin{align*} \vec{x}^{T}\textbf{Q}\vec{x} &= (\textbf{C}(\vec{y} - \vec{y}_{2} - \vec{y}_{c}(l)))^{T}\textbf{C}(\vec{y} - \vec{y}_{2} - \vec{y}_{c}(l)) \\ &= (\vec{y} - \vec{y}_{2} - \vec{y}_{c}(l))^{T}\textbf{C}^{T}\textbf{C}(\vec{y} - \vec{y}_{2} - \vec{y}_{c}(l)) \\ &= (\textbf{A}\vec{x})^{T}\textbf{C}^{T}\textbf{C}\textbf{A}\vec{x} \\ &= \vec{x}^{T}\textbf{A}^{T}\textbf{C}^{T}\textbf{C}\textbf{A}\vec{x}. \end{align*}\end{split}\]

This means \(\textbf{Q} = \textbf{A}^{T}\textbf{C}^{T}\textbf{C}\textbf{A}\). The matrix \(\textbf{C}^{T}\textbf{C}\) is chosen to be:

\[\textbf{C}^{T}\text{C} \equiv \left( \frac{2\pi}{\lambda(\ell)} \right)^{2} \text{diag}(\vec\alpha)^{2},\]

where \(\vec{\alpha}\) is the alpha value of normalized point source sensitivity (PSSN) in the basis \(\mathbb{Z}\). \(\lambda(\ell)\) is the effective wavelength under different filter band \(\ell\).

We can rewrite the matrix \(\textbf{F}\) as:

\[\begin{split}\begin{align*} \textbf{F} &= \text{inv}\left(\sum_{i}w_{i}\textbf{Q}_{i} + \rho^{2}\textbf{H}\right) \\ &= \text{inv}\left( \left( \frac{2\pi}{\lambda(\ell)} \right)^{2} \sum_{i}w_{i} (\textbf{A}^{T}\text{diag}(\vec\alpha)^{2}\textbf{A})_{i} + \rho^{2}\text{diag}(\vec{\rho}_{h}\vec{h}^{T})^{2}\right) \\ &= \text{inv}\left (\left( \frac{2\pi}{\lambda(\ell)} \right)^{2} \sum_{i}w_{i}\textbf{M}_{i}^{T}\text{diag}(\vec\alpha)_{i}^{2}\textbf{M}_{i} + \rho^{2}\text{diag}(\vec{\rho}_{h}\vec{h}^{T})^{2}\right). \end{align*}\end{split}\]

The offset \(\vec{u}\) is:

\[\begin{split}\begin{align*} \vec{u} &= - \textbf{F}\sum_{i}w_{i}(\textbf{Q}\vec{x}_{k})_{i} \\ &= - \left( \frac{2\pi}{\lambda(\ell)} \right)^{2} \textbf{F} \sum_{i}w_{i} \textbf{M}_{i}^{T}\text{diag}(\vec\alpha)_{i}^{2}\textbf{M}_{i} \vec{x}_{k, i}. \end{align*}\end{split}\]

Consider the correction of wavefront error between center and corcer, we rewrite the above equation as:

\[\begin{split}\begin{align*} \vec{u} &= - \left( \frac{2\pi}{\lambda(\ell)} \right)^{2} \textbf{F} \sum_{i}w_{i} \textbf{M}_{i}^{T}\text{diag}(\vec\alpha)_{i}^{2} (\textbf{M}_{i} \vec{x}_{k, i} +\vec{y}_{2, i}) \\ &= - \left( \frac{2\pi}{\lambda(\ell)} \right)^{2} \textbf{F} \sum_{i}w_{i} \textbf{M}_{i}^{T}\text{diag}(\vec\alpha)_{i}^{2} \vec{m}_{x, i}. \end{align*}\end{split}\]

Consider three different reference points “x0, “0”, and “x00”.

x0

means the offset will only trace the previous one;

0

means the offset will trace the real value and target for 0;

x00

means the offset will only trace the relative changes of offset without regarding the real value.

Assume the telescope’s state is \(\vec{s}_{0}\) in the time \(k=0\) and \(\vec{s}\) in time \(k\), and we can intentionally shift \(\vec{m}_{x}\) to be:

\[\begin{split}\begin{align*} \vec{m}_{x} &\rightarrow \vec{m}_{x}, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \text{for x0} \\ &\rightarrow \vec{m}_{x} + \rho^{2}\textbf{H}\vec{s}, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \text{for 0} \\ &\rightarrow \vec{m}_{x} + \rho^{2}\textbf{H}(\vec{s} - \vec{s}_{0}), \ \ \ \ \ \text{for x00}. \end{align*}\end{split}\]

For the feedback control, instead of sending the full correction, it is usually to sent a ratio of offset. So the final correction will be \(g\vec{u}\) instead of \(\vec{u}\).