## 3 Digital Beam Control and Beamforming Algorithm Design  
In Section 1, it was mentioned that the FPGA implementation of DBF algorithms includes two steps: digital beam control and beam synthesis. The design of the beam control and beam synthesis algorithms will be introduced separately below. In this system, the satellite ephemeris is known. Based on the current time and satellite ephemeris, the satellite's position and velocity in the inertial coordinate system at the current moment are calculated using ephemeris processing software. The receiver terminal's location and current time are obtained through the BD/GPS satellite navigation system, while attitude information is acquired via the receiver terminal's attitude system. Since satellite ephemeris, terminal position, and attitude are expressed in different coordinate systems, they need to be converted into the same coordinate system for pointing calculations. The satellite ephemeris is expressed in the inertial coordinate system, navigation positioning uses the geographic coordinate system, and attitude measurement adopts the body coordinate system. To simplify management and identification, all coordinate systems are transformed into the geographic coordinate system. After obtaining the receiver terminal's current position and attitude, the pointing parameters of the satellite relative to the terminal can be calculated. The beamforming coefficients are then determined based on these pointing parameters to achieve beam control [29]. In the prior information mode, since real-time ephemeris data cannot be obtained, the beam guidance accuracy is insufficient. Before transitioning to beam tracking, a beam acquisition process is required to achieve relatively high beam alignment accuracy, which is referred to as coarse beam tracking. Coarse beam tracking uses a conical scanning method and amplitude comparison angle measurement to obtain a relatively accurate satellite alignment angle \((\Phi(k),\Theta(k))\). If the difference between two consecutive satellite alignment angles is less than a certain threshold (e.g., 2\({}^{\circ}\)) and the satellite baseband signal is successfully demodulated, the system switches to the fine tracking mode; otherwise, it proceeds to the next iteration. If the number of iterations exceeds a certain limit, coarse tracking is deemed to have failed, and the system reverts to the initial guidance phase. In the prior information mode, the receiver terminal uses the satellite ephemeris and attitude unit to provide information (including the carrier's geographic longitude, latitude, heading angle, roll angle, and pitch angle) for geographic positioning. In this solution, the receiver terminal's location and current time are obtained through the BD/GPS satellite navigation system, and attitude information is acquired through the receiver terminal's attitude system. After obtaining the required information, the azimuth and elevation geographic angles of the antenna pointing towards the satellite are calculated in real time. Through coordinate transformations (converting the satellite ephemeris, terminal position, and attitude expressed in different coordinate systems into the same geographic coordinate system), the geographic angles pointing towards the satellite are transformed into antenna angles. These transformed antenna angles are used as target angles in the broadband positioning loop for closed-loop control, ensuring the antenna aligns with the satellite. Beam direction control in both the elevation and azimuth planes is achieved using beam controllers. After beamforming, spreading spectrum determination is performed. If the determination is valid, feedback is provided to the beam pointing module, and the above process is repeated. If the determination is invalid, a pass determination is performed. If the pass determination is invalid, the operation ends; if it is valid, the process jumps to spatial search. The beam guidance and tracking process is illustrated in Figure 9[30].