# A Study of Correction to the Point Cloud Distortion Based on MEMS LiDAR System
## 2 Methods
### Analysis of the Causes of Distortion and Correction Methods  
The MEMS mirror performs two-dimensional scanning of the target in the x and y directions, the receiving optical system is responsible for detecting the echo signal of each point in the scan field of view (FOV), and the time measurement system calculates the TOF. The distance between the target and the receiver can be obtained by the formula \(r=c\times t/2\), which is the z coordinate of the target in the three-dimensional space (where  
Figure 1: Schematic diagram of a micro-electro-mechanical system (MEMS) light detection and ranging (LiDAR) system. Figure 2: Scanning trace simulation of MEMS mirror. \(r\) is the range to the target, c is the velocity of light in the free space and \(t\) is the time it takes for the pulse of energy to travel from its emitter to the observed object and then back to the receiver). However, the distance \(r\) corresponding to the TOF detected during the experiment is not the true z coordinate of the target surface point, but the radial distance \(r\) from the point to the receiving objective lens. As shown in Figure 3, the radial distance between the target and the receiving objective lens is \(r_{i}\). When scanning a plane, the radial distance \(r_{i}\) between different positions of the plane and the objective lens is different. If \(r_{i}\) is directly regarded as the z coordinate of the object in the three-dimensional rectangular coordinate system. It will form a distorted point cloud surface as shown in Figure 3, but it is a plane. Additionally, the degree of distortion is related to the angle of the scanning FOV. The bigger the FOV, the more obvious the distortion. During the experiment, we converted the scanning coordinates (\(x\), \(y\)) of the MEMS mirror into normalized coordinates with a value range of \(-1\) to \(1\). Therefore, there is a scale factor between the real coordinates (\(X\), \(Y\)) and the normalized coordinates (\(x\), \(y\)), which is related to the distance information of the target and the maximum deflection angle of the galvanometer. Assuming that the normalized coordinates of the point \(i\) obtained by the MEMS scanner are (\(x_{0i}\), \(y_{0i}\)), the coordinates after fusing the distance information are (\(x_{0i}\), \(y_{0i}\), \(r_{i}\)), and the corresponding real coordinates under the LiDAR system are (\(X_{i}\), \(Y_{i}\), \(Z_{i}\)). The deflection angles of the MEMS galvanometer scanning along the \(x\)-axis and \(y\)-axis are \(\theta_{x}\) and \(\theta_{y}\), respectively. The maximum deflection angle is set as \(\theta_{xmax}\), \(\theta_{ymax}\). As shown in Figure 4.  
The real coordinate (\(X_{i}\), \(Y_{i}\), \(Z_{i}\)) in the LiDAR system of the point \(i\) in the normalized coordinate with the target distance information \(r_{i}\) and the MEMS deflection angle \(\theta_{x}\), \(\theta_{y}\) has the following relationship:  
\[ \begin{array}{l}X_{i}=r_{i}\cdot\sin(\theta_{x})\cdot\cos(\theta_{y})\\ Y_{i}=r_{i}\cdot\cos(\theta_{x})\cdot\sin(\theta_{y})\\ Z_{i}=r_{i}\cdot\cos(\theta_{x})\cdot\cos(\theta_{y})\end{array}  \tag{1}\]  
Figure 3: Analysis of the causes of point cloud distortion. Assuming that the \(n\) is a proportional coefficient between the normalized coordinate and the real coordinate under the LiDAR system. \(1\cdot n=z\cdot\tan(\theta_{\rm xmax})\) with \(x_{0i}\) equal to 1. Therefore, the following equation is satisfied for any points (\(x_{0i}\), \(y_{0i}\)) in the normalized coordinate:  
\[\left\{ \begin{array}{l}x_{0i}\cdot n=z\cdot\tan(\theta_{x})\\ y_{0i}\cdot n=z\cdot\tan(\theta_{y})\end{array} \right. \tag{2}\]  
From Equation (2), we solve the coordinates \(x_{0i}\) and \(y_{0i}\) with the deflection angle \(\theta\) as:  
\[ \begin{array}{l}x_{0i}=\tan(\theta_{x})/\tan(\theta_{\rm xmax})\\ y_{0i}=\tan(\theta_{y})/\tan(\theta_{\rm ymax})\end{array}  \tag{3}\]  
It can be seen that \(x_{0i}\) and \(y_{0i}\) respectively represent the ratio of the scanning angle in the horizontal and vertical direction to the maximum scanning angle.