## 5 Simulation and Analysis
### The Impact of Spread-Spectrum Sequence Depth on Position-Detection Precision  
The SNR is a critical factor affecting the system error rate and the precision of QD position detection. Employing spread-spectrum technology effectively enhances the SNR after despreading, thereby influencing the precision of light-spot position detection. To compare the impact of spread-spectrum sequences of different depths on the precision of light-spot position detection under the same received optical power and to avoid the nonlinear effects of QD position detection, statistical analysis was conducted on the output positions of the QD when the incident light spot was positioned at the center of the detector (true position equals relative position, \(x_{0}=x_{r}=0\)), when the optical power received by the QD was \(-\)40 dBm, and when the incident light-spot radius was 0.7 mm. Figure 7: Different radii: QD system detects light-spot positions under beacon spread-spectrum modulation and direct detection: (**a**) Spot radius is 0.7 mm; (**b**) Spot radius is 0.1 mm. Figure 8 presents the experimental results of modulation when using PRNs with depths of 1023, 127, and 31, and direct detection. In the figure, 2000 detected spot positions are sampled, with the \(y\)-axis representing the calculated actual position x. Via comparison with Figure 8, it can be observed that as the modulation PRN depth increases, the spread-spectrum gain becomes larger, and the fluctuation of the calculated values of x decreases. When the spread-spectrum gains are 1023, 127, 31, and 1, the corresponding \(\sigma_{x}\) values are 1.73 \(\mu\)m, 5.86 \(\mu\)m, 12.3 \(\mu\)m, and 62.31 \(\mu\)m, respectively. Therefore, adopting spread-spectrum technology can effectively improve the precision of QD position detection; the greater the spread-spectrum gain, the better the precision of position-detection precision under the same receiving power. To further analyze the improvement in the precision of position detection under low-SNR conditions, in Figure 9, the centroid position of the spot is set at the origin of the detector and a spot radius of 0.7 mm is employed. The variation in the precision of position detection is illustrated as a function of the detector's received optical power within the range of \(-\)50 dBm to \(-\)30 dBm. The abscissa represents the received optical power of the QD, while the ordinate denotes the RMSE of the detection output positions. The results are presented in Figure 9:  
Figure 8: The detector system detects the position of the light spot for spread-spectrum gains of 1, 31, 127, and 1023. Figure 9: Variation in precision of QD position detection with different received optical powers. As shown in Figure 9, the beacon spread-spectrum modulation detection method is significantly superior to direct detection. Under the same spread-spectrum gain, the received optical power (that is, the signal-to-noise ratio) affects the accuracy of position detection; as the received optical power increases, the system output \(\sigma_{x}\) decreases, resulting in QD position detection with higher precision. If the system achieves a position-detection precision of 15 \(\upmu\)m and a \(G_{p}\) of 1023, 127, 31, and 1, the received optical powers of the QD are \(-\)48.2 dBm, \(-\)43.8 dBm, \(-\)40.7 dBm, and \(-\)33.8 dBm, respectively. Therefore, compared to direct detection, this represents 14.4 dB, 10 dB, and 6.9 dB reductions in the optical power requirements, respectively. Hence, while maintaining the precision of detection, it is possible to reduce the demand for the received optical power of the QD by modulating pseudo-random code sequences of different depths.