Fiber position measurement method in LAMOST based on external planar target

Abstract. In the Large Sky Area Multi-Object Fiber Spectroscopic Telescope (LAMOST) project, the fiber should precisely align with the celestial target to obtain the spectrum of the star, and the position accuracy of the fiber in the focal plane directly affects the spectral quality. LAMOST uses photogrammetry to acquire the actual position of the fiber. However, the fiber view camera system without precise internal control points in the focal plane negatively affects measurement precision. To solve this problem, we propose a fiber position measurement method based on the external planar target (EPT) that replaces the internal control points with the external control points; multiview reconstruction and bundle adjustment with additional position constraints are used to calculate the position of the fibers. The validity of the measurement method is verified by the simulation and experiment. The preliminary results show that the method has good stability and the measurement accuracy of the fibers can reach 20  μm. Because the external control points are distributed on the EPT plane, the assembly error of the EPT and focal plane does not affect the measurement accuracy. Therefore, the proposed method can achieve precision measurement under nonprecision installation conditions.


Introduction
Massive observational surveys have always been of great significance in astronomical research. In particular, spectroscopic surveys are powerful tools for solving many of the most pressing problems in astrophysics and cosmology. 1,2 The Large Sky Area Multi-Object Fiber Spectroscopic Telescope (LAMOST) is one of the world's largest fiber spectroscopic telescopes. 3 The fiber positioning system was first realized in LAMOST and has been widely applied by the succeeding multiobject spectral surveys, 4 such as MOONS, 5,6 PFS, 7,8 DESI, 9,10 and SDSS-V. 11 The accurate alignment of the fiber position with the celestial target greatly affects the effective spectral energy, so the measurement accuracy of the fiber position is very important. 12 Visual measurement systems have been widely used in fiber position measurement for their features of high precision, noncontact, and rapidness. 13 In LAMOST, 4000 fibers with a 320 μm internal diameter each are distributed on a 1.75-m-diameter focal plane. The positioning accuracy of all fibers must be <40 μm, 14 which brings great challenges to the fiber view camera system and has been a significant problem for multiobject fiber spectroscopic telescopes.
Given this problem, Liu et al. 15 first proposed a polynomial calibration method for LAMOST. The fiber end face was taken as the feature point, and the theoretical coordinates of the hole of the fiber positioner with assembly error were taken as the three-dimensional (3D) position of the feature point, which does not make the calibration parameters accurate enough. The DESI fiber *Address all correspondence to Yonggang Gu, yggu@ustc.edu.cn view camera system improved the polynomial calibration method, 16 and a large number of illuminated fiducials were installed on the focal plane to calculate the calibration parameter for the focal plane to the pixel plane, with world coordinates that were obtained by precise contact instrument measurement in advance. Akiyama et al. 17 built a fiber position measurement system for Subaru. The focal plane imager only captured about 12 fibers at a time, and the camera moved and encoded in the X-Y direction. However, this kind of detection device has a low detection rate and large cumulative error.
In summary, the polynomial calibration method does not obtain the intrinsic and extrinsic camera parameters; 18 in particular, the illuminated fiducials must be in the focal plane to control the error propagation in the measurement process. We refer to these fiducials as the control points. However, the precise position of the internal control points cannot be measured after the telescope is in operation. 19 To solve this problem, a fiber position measurement method based on the external planar target (EPT) is proposed in this paper. Using the external control points on the EPT instead of the internal control points, the EPT is flexibly assembled on the focal surface or disassembled, and the precise coordinates of the external control points distributed on the EPT are measured off-line, thus effectively avoiding the assembly error in the process of measuring the internal control points. In this method, the size of the EPT can be changed according to the measurement requirements, and there is no strict requirement for installation accuracy. Therefore, it not only solves the problem of difficulty in obtaining internal control points but also improves the operability and measurement accuracy of fiber positions.
The organization of this paper is as follows: in Sec. 2, the camera model is described; in Sec. 3, the focal plane and the model to construct the EPT are illustrated; in Sec. 4, the principle of the bundle adjustment method with the additional position constraint is explained; in Sec. 5, experimental results are presented; and finally, in Sec. 6, conclusions are summarized.

Camera Projection Model
The perspective projection model of the camera is shown in Fig. 1. The mapping relation between point p½ x w y w z w in the world coordinate frame and its corresponding pixel point ½ u v in the pixels coordinate frame is mathematically described as E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 1 ; 1 1 6 ; 3 6 9 s " u v 1 x w y w z w 1 (1) Fig. 1 Schematic of the camera model.
where s is a nonzero scale factor, A denotes the intrinsic parameter, F x and F y are the scale factors along the image axes u and v, respectively, and C x and C y are the coordinates of the principal point, and parameter β is the skew of the two image axes. The extrinsic parameter ½ R t represents the rotation matrix and the translation vector from the world coordinate frame to the camera coordinate frame. The radial distortion and tangential distortion of the camera lens are taken into consideration in this paper. The equation for distortion correction is given as 18 E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 2 ; 1 1 6 ; 6 6 2 where ðx; yÞ denotes the distortion-free normalized image coordinates; ðx corrected ; y corrected Þ denotes the coordinates after correction; r 2 ¼ x 2 þ y 2 ; k 1 ,k 2 , and k 5 are the radial distortion coefficients; and k 3 and k 4 are the tangential distortion coefficients.
3 Focal Plane and External Planar Target

Focal Plane
The LAMOST focal plane is actually a spherical crown with a diameter of 1.75 m and a curvature radius of ∼19.88 m; a total of 4000 fiber positioners distributed on the focal plane are shown in Fig. 2. Each fiber positioner has a double gyration mechanism, as shown in Fig. 3. The position range of the fiber is 33 mm, allowing the telescope to observe and record the spectra of 4000 celestial targets simultaneously. The fiber positioner requires several steps to locate the target position in the corresponding detection area because of the mechanical drive error. Position feedback and open-loop compensation are used to compensate for the positioning error. The accuracy of compensation value is determined by the accuracy of the fiber position measurement. The Z axis of the focal plane's world coordinate frame is the normal direction at point O, and the X-Y plane coincides with the tangent plane at the O point. Let δ Z represent the error of the fiber in the Z direction, δ XY represent the error in the X-Y plane, and δ S represent the error on the spherical surface of the focal plane. According to the geometric relationship shown in Fig. 4, the following equation is obtained. Given that angle ϕ ≈ 0, the positioning error of fiber δ S is mainly reflected in δ XY , and Z direction error δ Z is negligible: 20 E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 3 ; 1 1 6 ; 3 4 5 δ Due to the limit of the hardware system, it is difficult for a camera to cover the whole field of view. At present, the focal plane is usually divided into many smaller subfocal planes (SFP), each equipped with its own measuring camera. 21 According to the shape of the focal surface, the relation between the flatness error and the SFP's radius is shown in Fig. 5. The geometrical shape of a SFP with a smaller area can be approximated as a plane, that is to say, multiple fibers are distributed in the SFP discretely.

Construction Model of EPT
The process of constructing the EPT is revealed in Fig. 6. The EPT is installed on the SFP in parallel, and the Z axis of the EPT is defined to coincide with the Z axis of the SFP. Let p i and q i represent the i'th feature point on the EPT and its corresponding image point, respectively, and d j and b j represent the j'th feature point on the SFP and its corresponding image point, respectively. p i ðx wTi ; y wTi ; z wTi ; 1Þ represents the homogeneous coordinates of the i'th feature points in the EPT's world coordinate frame (TWCF), and d j ðx wFj ; y wFj ; z wFj ; 1Þ represents the homogeneous coordinates of the j'th feature points in the SFP's world coordinate frame (FWCF). q i ðu i ; v i ; 1Þ and b j ðu j ; v j ; 1Þ are homogeneous coordinates of image points in the pixel coordinate frame corresponding to p i and d j , respectively.d j ðx wTj ;ỹ wTj ;z wTj ; 1Þ denotes the homogeneous coordinates of the j'th feature points on the SFP in the TWCF.
According to Eq. (1), we obtain E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 4 ; 1 1 6 ; 3 3 0 E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 5 ; 1 1 6 ; 2 8 7 As mentioned in Sec. 1, the focal plane lacks high-precision internal control points, which means that the parameters ½ R F t F are inaccurate. So, it is difficult to get the exact fiber world coordinates from the pixel coordinates from Eq. (5). Because the position of each feature point on the EPT plane was accurate and known, the parameters ½ R T t T of the camera coordinate frame to TWCF can be calculated by the space resection method. FWCF and TWCF are parallel to each other in the X-Y direction, and their Z axis coincides. So,d j coordinates are calculated from the following equation: x wFj y wFj z wFj Here, Δzrepresents the theoretical distance between WFCF and TWCF in the Z direction. According to Eqs. (6) and (4), precise coordinates of the feature point of the SFP are obtained. However, the EPT hardly parallels with SPF completely. That is to say, the feature points on the EPT plane act as constraints only in the X-Y direction, so the effect of Δz's error on measurement accuracy must be evaluated. Let d cj ðx cj ; y cj ; z cj Þ represent the j'th points in the camera coordinate system, with coordinates that are calculated as x cj y cj z cj Here, Δz c represents Δz in the camera coordinates system, and as the collinear equation of the projection, the relation between b j ðu j ; v j ; 1Þ and d cj ðx cj ; y cj ; z cj Þ is as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 8 ; 1 1 6 ; 6 6 2 Here, z cj denotes that the distance between the camera and the SFP is more than 500 cm. We noticed that Δz c ¼ Δz 0 þ δz 1 þ δz 2 . Δz 0 is the theoretical design value. δz 1 represents the mechanical assembly error of the EPT and focal plane in the Z axis, which is usually <0.1 mm. δz 2 denotes the flatness error of the SFP, which is at most about 2 mm. Therefore, the pixel error due to Δz c in Eq. (8) is almost 0, which means it only has a tiny effect on the measurement accuracy in the X-Y direction of the SFP.

Bundle Adjustment
In computer vision, bundle adjustment is a key part of the feature-based 3D reconstruction algorithm, which comes down to minimizing the reprojection error between observation and prediction image points to optimize the camera parameters and 3D coordinates of the feature points. So multiview reconstruction and bundle adjustment are adopted to improve the measurement accuracy. 22 In the i'th image, d ij denotes the homogeneous coordinate of the j'th feature point on the SFP in the FWCF, andd ij denotes the homogeneous coordinate of the same feature point in the TWCF. The image coordinate given by the camera, b ij , is different from the image coordinate obtained from the perspective projection model,b ij , which is given as E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 9 ; 1 1 6 ; 3 6 7b ij ¼ s · A · ½ R Ti t Ti ·d ij ¼ s · A · ½ R Ti t Ti · ðd ij þ ΔTÞ: Here, ΔT ¼ ½ 0 0 Δz 0 . The LAMOST pays more attention to the positioning accuracy of the X-Y direction on the focal plane, so we add external control points as X-Y position constraints on the EPT plane. p ij denotes the coordinate of the j'th feature point on the EPT plane in the TWCF. The image coordinate given by the camera, q ij , is different from the image coordinate obtained from the perspective projection model,q ij , which is given as E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 0 ; 1 1 6 ; 2 7 0q The objective function of the nonlinear optimization is established as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 1 ; 1 1 6 ; 2 2 5 fðaÞ ¼ min where a ¼ ðA; K; R Ti ; t Ti ; d ij Þ, n denotes the numbers of images, m is the number of the internal control points on the EPT, and t is the number of the measuring points on the SFP. The nonlinear optimization problem of a is solved using the Levenberg-Marquardt algorithm.

Initial Value Estimation
The bundle adjustment is a nonlinear optimization iterative process, and a better initial value can avoid the solution falling into local optimization. The initial value of the intrinsic camera parameters is obtained using Zhang's algorithm 23 and a precision calibration template. The relatively accurate extrinsic camera parameters can be determined by space resection using the internal control points in the field of view. The rotation angles of the center rotation axis and the eccentric rotation axis of the fiber positioner are calculated in advance. Considering the mechanical transmission error, the distance between the fiber's actual and theoretical positions is usually <200 μm. Therefore, the theoretical position of the fiber can be considered to be the initial position of the fiber tip on the focal plane. The fiber's initial X-Y coordinate in the FWCF can be taken as the design value, and the initial coordinate of Z requires consideration of the vertical distance between the EPT and SFP after assembly.

Measurement Process
The overall process for the fiber position measurement method based on the EPT proposed in this paper is shown in Fig. 7. First, the camera is calibrated to get the initial value of the intrinsic camera parameters; second, the EPT is assembled on the SFP and the camera captures m pieces of images from different positions and directions; third, the initial values of the extrinsic camera parameters are calculated through the pyramid method 24 and then optimized through the space resection method; and finally, all parameters including the initial value of the intrinsic parameters (A), extrinsic camera parameters ½ R T t T , lens distortion parameters (K), and fibers positionðd ij Þ are calculated using the bundle adjustment.

Experiments
To verify the proposed measurement method, the basic conditions of the simulation experiments and a real data experiment are as follows. The experiment used one Basler avA1000-120 km CCD camera with a focal length of 16 mm, image size of 1040 pixels×1040 pixels, and field of view of about 200 mm × 200 mm.

Simulation Experiments
To test the reliability and accuracy of the proposed measurement method, simulation experiments are carried out with the following settings. The intrinsic parameter matrix is .00068, and k 5 ¼ 0. These parameters are used as initial values for optimization. As shown in Fig. 8, four identical small calibration templates (A; B; C; D) are assembled on top of the large board. The feature points of the small calibration templates are set to be measuring points, and the feature points on the large board are measured by a universal toolmaker's microscope as the external control points. The measurement error of the universal toolmaker's microscope is 1 μm. Gaussian noise with mean and standard deviation of 200 μm was added to the initial position of the measuring points, as shown in Fig. 9. The bundle adjustment was used to optimize the coordinates of the measuring points.
The real distance between feature points of the small calibration template is 5.000 mm. So, the distance of the measuring points in the X-Y plane is selected as the measured value to verify the accuracy of the result. To avoid repetition, only the distance between a point and its neighbors on the left and below are calculated, amounting to 336 data points. Then, an error statistical histogram of all of the measured data points is established, as shown in Fig. 10. The mean error was 0.001 mm, and the standard deviation was 0.0063 mm, with most of the position errors conforming to the accuracy requirement (40 μm) and 96% of measuring points having a position error of <0.01 mm. Obviously, the Z-direction's assembly error has little effect on the measurement accuracy in the X-Y direction. Another similarly sized calibration template is used for comparative experiments with internal control points, and the real distance between feature points is 6.250 mm. Four feature points at the four corners are used as internal control points. The same initial parameters are used for bundle adjustment. Figure 11 indicates that measurement accuracy improves very little using the internal control points. However, the internal control points are difficult to obtain in practice; thus the measurement method based on the EPT is flexible and has high precision. At least three control points are required to calculate the initial value of the extrinsic camera parameters by the pyramid method, and we range the number of control points from 3 to 9. We conclude from the results shown in Fig. 12 that the mean value has a slightly decreasing trend with the increase of the number of control points. However, increasing the number of control points will affect the spectroscopic observation efficiency. In the real data experiments with fibers, to distribute the control points evenly on the focal plane, five control points were placed on the EPT plane: four at corners and one at the center.

Real Data Experiments
The small size focal plane processed by CNC was applied to the real data experiments, and the size was also 120 × 120 mm. All measuring fibers were installed on the focal plane, and the position of each fiber on the focal plane was measured by a universal toolmaker's microscope, which was used as the real position. The initial position errors of all measuring fibers are a    Gaussian distribution with the mean and standard deviation of 200 μm. Five fibers were installed on the EPT as external control points, and their position coordinates were measured by a universal toolmaker's microscope. The experimental platform is illustrated in Fig. 13. Because the diameter of the fiber is micron in scale, extracting the image feature of fiber under natural light will add significant error to the measurement result. Taking advantage of the ability of fibers to transmit light, the fiber position measurement with the help of backward lighting is feasible in the dark environment, in which the fibers transfer the backward lighting to the measured fiber tips to form a light spot and the camera takes the light spot images from different directions. The experiment results are shown in Fig. 14. Most of the fiber position errors are <20 μm. Because of the damage of the fiber end surface, the quality of the spot is affected, and the position error of a few fibers is nearly 40 μm.

Conclusions
In this paper, a fiber position measurement method with high precision and flexibility is proposed based on the EPT. A major advantage of the method is that it is easy to operate. During the measurement process, the size of the EPT can be changed according to the demand of measurement, the position or number of control points is not limited, and the accuracy of control points is guaranteed by offline measurement. The preliminary experimental results show that measurement accuracy attained by the proposed method is equivalent to that obtained via the internal control points, and the measurement accuracy of the fibers can reach 20 μm. The assembly error of the EPT and the focal plane does not affect the measurement accuracy. Therefore, this method can achieve precise measurements under nonprecision installation conditions, the difficulties of obtaining accurate control points in LAMOST's focal plane can be perfectly tackled by the proposed method with good operability.