## 2 Principles of the Compact Displacement Sensor  
Figure 1 shows the photo and geometric drawing of the proposed CDS for lateral displacement measurements. Figure 1a is the photo of the fabricated CDS showing the main dimensional sizes. As marked in the photo, the width and height of the cylindrical lens (LJ1155L1, Thorlab, Newton, NJ, USA) are 16 and 18 mm, respectively. The radius and focal length are 10.2 and 19.7 mm, respectively. In another cylindrical lens (Model LJ1909L1, Thorlab, Newton, NJ, USA), the width and height are 13 and 15 mm, respectively. The radius and focal length are 7.1 and 13.7 mm, respectively. The thickness and length of the square shape KTP plate are 1 and 10 mm, respectively. The same dimensional KTP plates were used for the two different cylindrical lenses. Figure 1b illustrates the ray traces and angle variations of the probe light in the CDS. A cylindrical lens (n2) was attached to the KTP (n4) using UV glue (n3). The probe light in the air (n1) was perpendicular to the flattened side of the cylindrical lens. The CDS was placed on a moveable micro-displacement piezoelectric transducer (PZT) stage (Model MAX312D/M, Thorlab, Newton, NJ, USA), and the probe light was fixed. The incident angle is changed with the displacement of PZT. **O** is the center of the cylindrical lens with a radius of **OA** = **R**. The probe light transmits onto the semispherical surface at position **V**. The extension line **VL** is parallel to **OA**, which is perpendicular to the flattened side **OB** of the CDS. The refractive angle through the KTP can be controlled depending on the probe beam positions. There are two initial positions, and the corresponding distances **OL** = 1/2**H** and 3/4**H** were used in the experiments. Therein, a half width of the cylindrical lens is expressed as **OB** = **H**. According to [PERSON]'s law, the initial incident angle at the air-lens interface is defined by:  
\[\theta_{1i}=sin^{-1}(\textbf{OL}/\textbf{R}) \tag{1}\]  
The relationships between the angle variations and the various refractive index layers in the different interfaces are represented as follows:  
\[\theta_{1r}=sin^{-1}(\frac{n_{1}}{n_{2}}\cdot\sin\theta_{1i}) \tag{2}\]  
\[\theta_{2i}=\theta_{1i}-\theta_{1r};\ \theta_{2r}=\theta_{3i} \tag{3}\]  
\[n_{2}\cdot\sin\theta_{2i}=n_{3}\cdot sin\theta_{2r} \tag{4}\]  
\[n_{3}\cdot sin\theta_{3i}=n_{4s}\cdot sin\theta_{3r,s}=n_{4p}\cdot sin\theta_{ 3r,p} \tag{5}\]  
Figure 1: Design of compact displacement sensor: (**a**) photo and (**b**) geometric drawing. \[n_{2}\cdot sin\theta_{2i}=n_{4s}\cdot sin\theta_{3r_{s}}=n_{4p}\cdot sin\theta_{3r_{p}}, \tag{6}\]  
where \(n_{4s}\) and \(n_{4p}\) are the effective refractive indices of s-and p-waves in the KTP, respectively, and \(\theta_{3r_{s}}\) and \(\theta_{3r_{s}p}\) are the corresponding refractive angles of s-and p-waves respectively. According to Equations (4)-(6), the effect from the glue layer can be ignored in considering the measurement sensitivity of the angle and displacement. In this CDS, the phase delay \(\phi\) between two orthogonal polarizations is dependent on the thickness of the KTP plate, incident angle, and relative refractive index, as discussed in a previous study [12]. The \(\phi\) is defined by  
\[\phi=\frac{2\pi}{\lambda}\cdot d\cdot\left[\sqrt{n_{z}^{2}-n_{2}^{2}\cdot sin^ {2}\theta_{2i}}-\sqrt{n_{y}^{2}-n_{2}^{2}\cdot\left(\frac{n_{y}^{2}}{n_{x}^{2} }\right)\cdot sin^{2}\theta_{2i}}\right]. \tag{7}\]  
The angle sensitivity (AS) of the CDS is represented by  
\[\text{AS}=\frac{d\phi}{d\theta_{2i}}=\frac{2\pi}{\lambda}\cdot d\cdot n_{2}^{ 2}\cdot sin\theta_{2i}\cdot cos\theta_{2i}\cdot\left[\frac{n_{y}^{2}}{n_{x}^{2 }\sqrt{n_{y}^{2}-n_{2}^{2}\cdot\left(\frac{n_{y}^{2}}{n_{x}^{2}}\right)\cdot sin ^{2}\theta_{2i}}}-\frac{1}{\sqrt{n_{z}^{2}-n_{2}^{2}\cdot sin^{2}\theta_{2i}}} \right], \tag{8}\]  
where \(\lambda\) and \(d\) are the measurement wavelength and thickness of the KTP plate, respectively.