## 3 Inter-Satellite Laser Communication Model Based on Simulink  
### PRN Codes Selection  
PRN codes are periodic sequences that can be deterministically reproduced and are widely used in communication and ranging systems. In conventional GPS satellite spread-spectrum communication systems, commonly used PRN code types include m-sequences and Gold sequences. These codes possess distinct characteristics, such as favorable autocorrelation and cross-correlation properties, making them suitable for diverse applications. However, in space-based gravitational wave-detection missions, the selection of PRN codes must address specific requirements and challenges. In such missions, each satellite is equipped with two frequency-stabilized lasers, and laser beams are exchanged between the three satellites, forming a total of six laser links within the constellation. On each laser link, the DS/SS modulation scheme is employed. The data code and PRN code are XORed to generate a communication ranging code. This code is subsequently phase-modulated onto the laser link using low-depth BPSK modulation, facilitating simultaneous ranging and data communication. Given these operational requirements, six orthogonal PRN codes are necessary to ensure independent communication on each laser link without interference. Selecting such codes not only facilitates robust tracking of individual PRN code amidst interference from adjacent laser links but also prevents cross-interference between different PRN codes. The autocorrelation properties of the selected PRN codes are crucial for precise ranging and reliable communication, while their cross-correlation properties play a significant role in minimizing interference. Therefore, the careful design and selection of six orthogonal PRN codes are critical for achieving the stringent communication and ranging requirements of space-based gravitational wave-detection missions. As for the selection of the PRN code type, we will consider the autocorrelation and cross-correlation properties of the PRN code, the flexibility of data code rate selection and the practical hardware implementation. In this regard, we have investigated m-sequences, Gold sequences and M-sequences. From the investigation of PRN codes, it is known that m-sequences and Gold sequences are generated based on linear feedback shift registers, while M-sequences are generated based on nonlinear feedback shift registers. When using an n-stage shift register to generate PRN codes, the resulting m-sequences, Gold sequences and M-sequences exhibit similar performance in terms of autocorrelation and cross-correlation. However, the lengths of the resulting PRN codes differ. The lengths of m-sequences and Gold sequences are \(2^{n}-1\), while the length of M-sequences is \(2^{n}\). For a length of \(2^{n}-1\), there are fewer factors corresponding to the code length, which limits the available spreading factors in the spreading process and significantly restricts the flexibility of data code rate selection. In contrast, for a length of \(2^{n}\), there are more factors, providing more available spreading factors in the spreading process and greatly enhancing the flexibility of data code rate selection. Additionally, because hardware implementation is based on digital circuits, and digital circuits are designed based on binary numbers, a code length of \(2^{n}\) is also advantageous for practical hardware implementation. Considering these factors, for the selection of the PRN code in the space-based gravitational wave-detection task, this paper will choose an M-sequence with a length of \(2^{n}\). The number of stages will be 10, and its structure is shown in Figure 6.  
In the schematic, a\({}_{1}\) to a\({}_{9}\) represent shift registers, while c\({}_{1}\) to c\({}_{9}\) denote the feedback coefficients, indicating whether a given register participates in the feedback mechanism. Using this configuration, a 1024-chip even-length M-sequence is generated as the selected PRN code for the gravitational wave-detection mission.