# Inverse Solution Error Analysis and Correction of Beam Steering System Based on Risley Prisms
## 2 Error Model of Risley Prisms and Forward Solution Error Correction Method  
### Forward Solution and Inverse Solution of Risley Prisms  
The precise forward and inverse solution of Risley prisms is derived by nonparaxial ray tracing through the vector form of Snell's law shown in Equation (1) [18].  
\[\overset{\rightarrow}{A_{r}}=\frac{n_{i}}{n_{r}}\left[\overset{\rightarrow}{ A_{i}}-\left(\overset{\rightarrow}{A_{i}}\cdot\overset{\rightarrow}{N} \right)\cdot\overset{\rightarrow}{N}\right]-\sqrt{1-\frac{n_{i}^{2}}{n_{r}^{2 }}+\frac{n_{i}^{2}}{n_{r}^{2}}\left(\overset{\rightarrow}{A_{i}}\cdot \overset{\rightarrow}{N}\right)^{2}}\cdot\overset{\rightarrow}{N} \tag{1}\]  
where \(n_{i}\) and \(n_{r}\) are the refractive indices of the medium on both sides of the refractive surface, \(\overset{\rightarrow}{N}\) is the unit normal vector of the refraction interface, \(\overset{\rightarrow}{A_{i}}\) is the unit vector of the incident light, and \(\overset{\rightarrow}{A_{r}}\) is the vector of the exit light. The notations of the prism surface normal vector and the ray direction vector are shown in Figure 3. The refractive indices of prism 1 and prism 2 are denoted by \(n_{1}\) and \(n_{2}\), respectively. The direction of the incident light is defined as the reverse direction of the \(Z\)-axis, so its vector is \(\overset{\rightarrow}{A_{1}}=(0,0,-1)\).  
Calculations are performed using Equation (1) in each refractive surface of the Risley prism, and the direction vector of the outgoing beam can be obtained:  
\[\overset{\rightarrow}{A_{5}}=(K,L,M) \tag{2}\]  
where \(K\), \(L\), \(M\) are the final calculation results; they are functions of the prism rotation angles \(\theta_{1}\) and \(\theta_{2}\), and they are also the components of the outgoing light vector on the \(X\), \(Y\), and \(Z\) axis.  
The deflection angle and azimuth of the outgoing beam can be calculated through the direction vector:  
\[\Phi=\arccos(-M) \tag{3}\]  
\[\Theta=\left\{\begin{array}{ll}\arctan\left(\frac{L}{K}\right),&K\geq 0\text{and}L \geq 0\\ \arctan\left(\frac{L}{K}\right)+2\pi,&K\geq 0\text{and}L<0\\ \arctan\left(\frac{L}{K}\right)+\pi,&K<0\end{array}\right. \tag{4}\]  
The inverse solution of Risley prisms is solved by the two-step method. Since the angle between the two prisms determines the deflection angle of the outgoing beam. The first step is to calculate the included angle between two prisms \(\Delta\theta=|\theta_{1}-\theta_{2}|\), which corresponds to the deflection angle \(\Phi_{t}\) of the desired beam-pointing position. The current prism angle \(\Delta\theta^{\prime}\) is known, assuming that one prism remains stationary and the other one rotates \(|\Delta\theta-\Delta\theta^{\prime}|\), calculating the azimuth angle \(\Theta_{0}\) of the beam at this time. This step makes the deflection angle of the outgoing beam reach the target value.  
When two prisms rotate \(360^{\circ}\) simultaneously with the same speed and direction at a certain included angle, the deflection angle of the outgoing beam remains unchanged, and the azimuth angle changes continuously. Hence, the trajectory of the light on the OXY surface is a circle centered on the intersection of the Z-axis and the OXY surface. We use the abbreviation \"TLS\" to specifically refer to this trajectory. Therefore, the second step is to rotate the two prisms by \(\Delta\Theta=\Theta_{t}-\Theta_{0}\) simultaneously in the same direction. According to the two-step method process, the final rotation angles required of prisms can be obtained:  
\[\left\{\begin{array}{ll}\theta^{\prime}{}_{1}=\Theta_{t}-\Theta_{0}+|\Delta \theta-\Delta\theta^{\prime}|\\ \theta^{\prime}{}_{2}=\Theta_{t}-\Theta_{0}\end{array}\right. \tag{5}\]  
or  
\[\left\{\begin{array}{ll}\theta^{\prime}{}_{1}=\Theta_{t}-\Theta_{0}\\ \theta^{\prime}{}_{2}=\Theta_{t}-\Theta_{0}-|\Delta\theta-\Delta\theta^{ \prime}|\end{array}\right. \tag{6}\]  
Since there are two ways of rotation in the first step, two sets of solutions can be obtained.