## 3 Digital Beam Control and Beamforming Algorithm Design
Beam control based on spatial search employs a scanning beam to sweep across the spatial domain, determining the spatial direction of useful signals through power estimation. The basic principle of the beam acquisition technique based on spatial search proposed in this scheme is as follows:  
Figure 9: Flowchart of prior information pattern. When the system enters the mode of receiving satellite signals, a scanning beamformer performs multiple scans across different positions in the entire spatial domain, forming multiple intersecting beam projections. Each position outputs an estimated signal power value. By comparing the power values from all outputs, the approximate direction of the incoming signal can be estimated. The schematic diagram of the principle is shown in Figure 10.  
In Figure 10, the number of beams is determined based on the monitored angular range and the angular interval between adjacent intersecting beam directions [31]. For the receiving terminal, the monitored angular range is set to \([-15^{\circ},15^{\circ}]\), which corresponds to the coverage of a single beam. If the number of beams is \(N\), the entire monitored angular range is evenly divided into \(N-1\) angular intervals according to the principle of uniform division, as shown in Figure 11.  
For this system, during the actual debugging process, setting a single beam coverage range of \(\pm 15^{\circ}\) is sufficient for beam resolution. If higher resolution is required, a narrower beam coverage can be set, but this is unnecessary for this project. If the signal comes from a direction outside this range, it will be identified as belonging to an adjacent beam, and the beamforming process will continue. The system will not become \"blind\", but the final beamforming effect may be impacted. This involves a balance between beam resolution and computational resources. If the beam resolution is set too large, it will affect the beamforming performance; if set too small, it will consume more computational resources. Therefore, setting a single beam coverage range of \(\pm 15^{\circ}\) here is the result of a well-considered trade-off during debugging. Figure 11: Schematic diagram of beam coverage area. Figure 10: Basic schematic of beam control based on spatial domain search. For the same input signal, among the output signals of the beams shown in Figure 11, there is always a pair of adjacent beams where one outputs the maximum signal and the other the second-largest signal. Comparing the power of these two signals allows for determining the direction-of-arrival (DOA) of the signal. This system adopts a beam acquisition and tracking scheme that primarily relies on prior information calculations supplemented by spatial domain searches. The beam control process begins by operating in a mode based on prior information. Once beamforming based on prior information starts, the system first calculates the beam directions for different satellites using prior data. It then retrieves the corresponding beamforming parameters for each satellite through a lookup table based on the calculated beam directions. The derivation process for the beamforming parameters will be detailed in the following section. Subsequently, the beamforming parameters are assigned to the beamforming channels of different satellites. Finally, spread-spectrum acquisition is performed on the beam data to validate the effectiveness of the beamforming. If the validation fails, the system determines whether the satellite has passed. If the satellite has already passed, the beam control process ends; otherwise, it switches to beam control based on spatial domain search [11]. When beam control based on spatial domain search begins, the system first initializes the process using predefined beam direction parameters to achieve beam acquisition for different satellites. It then searches within a certain angular range offset from the acquired beam directions for each satellite. The search results undergo spread-spectrum tracking verification and power comparison.