## 2 System and Principle
### Optimization of Measurement Configuration
In order to study the relationship between the divergence angle of the measured beam and the quality of the imaging spot, the imaging position of the beam edge on the image sensor is analyzed as follows:  
\[d_{2}=sd_{1}-2f_{c}\gamma \tag{13}\]  
Therefore, the accuracy of spot position detection can be improved by reducing the diameter of the imaging spot and optimizing the distribution of the imaging spot energy while other parameters are invariable. The energy distribution of imaging spots before and after system optimization is shown in Figure 6. According to Figure 6, the specific benefit of the optimization of the measurement system is to improve the energy distribution of the spot image. There were many peaks in the imaging spot before system optimization. In addition, the number of peaks and the intensity of the imaging spot changed greatly with different measuring positions. On the contrary, the imaging spot size after system optimization was sharp, showing a single peak, and the energy distribution was symmetrical, concentrated and similar to the Gaussian distribution. It is beneficial to realize the precise extraction of the imaging spot location. The size of the spot image obtained at different positions on the rotating paraboloid was approximately equal in the experiments. Figure 5: Measurement system using different types of beam: (**a**) Measurement system using a collimated beam; (**b**) measurement system using a focused beam. After a series of digital image processing operations, including extraction of the region of interest (ROI) and filtering, the gray centroid algorithm was applied to the light spot on the image and can be expressed as:  
\[x_{0}^{\prime}=\frac{\sum\limits_{m=1}^{M}\sum\limits_{n=1}^{N}F(x^{\prime},y^{ \prime})x^{\prime}}{\sum\limits_{m=1}^{M}\sum\limits_{n=1}^{N}F(x^{\prime},y^{ \prime})},y_{0}^{\prime}=\frac{\sum\limits_{m=1}^{M}\sum\limits_{n=1}^{N}F(x^{ \prime},y^{\prime})y^{\prime}}{\sum\limits_{m=1}^{M}\sum\limits_{n=1}^{N}F(x^{ \prime},y^{\prime})} \tag{14}\]  
where \((x^{\prime},y^{\prime})\) is the pixel coordinate, \((M,N)\) is the image size, \(F(x^{\prime},y^{\prime})\) is the gray value of the pixel and \(\left(x_{0}^{\prime},y_{0}^{\prime}\right)\) is the centroid coordinate to be used. Experiments were performed to verify the accuracy of the optimized system, whose parameters are shown in Table 1.  
The measurement beam images the camera under the action of converging lens 1. Therefore, in order to improve the quality of the imaging spot, the focal length of the converging lens needs to be consistent with the installation distance between the convergent lens and the camera. The size of the measured spot on the reflector can be reduced by convergence lens 2, and the focal length of converging lens 2 needs to be approximately equal to the optical distance of the measuring beam from converging lens 2 to the reflector. Then, by minor adjustment of the position between the sensor and the reflector, a better quality of the imaging spot can be achieved. In these experiments, the optical freeform surface is composed of a plane and a rotating paraboloid, where the normal of the plane is parallel to the optical axis of the rotating paraboloid. Therefore, the position of the image spot reflected by the center point of the rotating paraboloid is the same as the position of the imaging point reflected by the plane. Therefore, it can be considered that the plane is the reference plane and the rotating paraboloid is the interested plane. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Focal Length of Lens 1**\(f_{n}\)/**mm** & **Focal Length of Lens 2**\(f_{3}\)/**mm** & **Focal Length of the Rotating Parabola**\(f_{c}\)/**mm** \\ \hline \(100\) & 30 & 28 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: System design parameters. Figure 6: Comparison of imaging spots before and after optimization.