## 3 Inter-Satellite Laser Communication Model Based on Simulink
### PRN Codes Selection
The 1024-chip length of the M-sequence offers significant advantages for data transmission. It allows the complete PRN cycle to be evenly divided into multiple data periods, thereby enabling higher data-transmission rates while maintaining the desired autocorrelation and cross-correlation properties necessary for reliable communication and ranging. Although the structure of the M-sequence is predetermined, it exhibits statistical properties akin to random signals. For a random signal, its autocorrelation function is defined as:  
\[R_{a}(\tau)=\lim_{T\rightarrow\infty}\int_{-\frac{T}{2}}^{\frac{T}{2}}f(t)f(t -\tau)dt=\left\{ \begin{array}{cl}0&\tau\
eq 0\\ \text{Constant}&\tau=0\end{array} \right. \tag{1}\]  
where \(\tau\) is the time delay. T is the period of the random signal. \(f(t)\) is the time function of the random signal. According to Equation (1), when \(\tau\
eq 0\), meaning \(f(t)\) and \(f(t-\tau)\) do not overlap, \(R_{a}(\tau)\) equals zero. Conversely, When \(\tau=0\), meaning \(f(t)\) and \(f(t-\tau)\) completely overlap, \(R_{a}(\tau)\) becomes a constant value. The concept of cross-correlation, which quantifies the similarity between two different signals, is also relevant here. The cross-correlation function for two random signals can be expressed as:  
\[R_{ab}(\tau)=\lim_{T\rightarrow\infty}\int_{-\frac{T}{2}}^{\frac{T}{2}}f_{1}(t )f_{2}(t-\tau)dt \tag{2}\]  
The M-sequence shares these properties, which enables the alignment of waveform and phase by performing autocorrelation between the received signal and a locally generated replica of the same PRN code. By employing different primitive polynomials, multiple distinct M-sequences can be generated. The normalized autocorrelation function values of the six selected M-sequences are shown in Figure 7. Since the length of the 10-stage M-sequence is 1024, the autocorrelation function values will be analyzed for chip shifts ranging from \(-512\) to \(511\). Figure 6: Schematic diagram of the M–sequence generator. As shown in Figure 7, the autocorrelation values of the generated M-sequences exhibit a sharp peak only when perfectly aligned, i.e., when the chip offset is zero. At other delay times, the autocorrelation values are nearly zero, demonstrating the sequences' excellent time-alignment properties. The normalized cross-correlation function values of the generated M-sequences are shown in Figure 8. Pairwise cross-correlation of the six M-sequences yields a total of 15 cross-correlation function values. Since the length of the 10-stage M-sequence is 1024, the cross-correlation function values will be analyzed for chip shifts ranging from \(-512\) to \(511\). As depicted in Figure 8, the cross-correlation values between any two of the six M-sequences are approximately zero for all chips offsets, confirming that the sequences are mutually uncorrelated. Figure 8: Normalized cross–correlation function values of M–sequences with different code offsets. Figure 7: Normalized autocorrelation function values of M–sequences with different code offsets. In summary, the six selected orthogonal PRN codes demonstrate excellent autocorrelation and cross-correlation properties, fulfilling the stringent requirements for the gravitational wave-detection mission.