# Experimental Studies on Low-Latency RIS Beam Tracking: Edge-Integrated and Visually Steered
## 2 System Architecture  
### The Edge-Integrated RIS Control Mechanism  
Figure 1 shows the typical application scenario of the EIR-CM. In order to overcome the high latency, low robustness, and complex time synchronization mechanism in the traditional RIS feedback system, this study proposes the integration of the UE baseband processing and RIS control modules into the same edge server. That is, the RIS control unit and UE measurement unit are integrated into the UE local computing unit and the LAN structure is redesigned. As the RIS and UE run in the same system environment, additional time synchronization mechanisms are no longer required, enabling real-time RIS feedback adjustment. A WiFi access point is linked to the outside of the system to assign an IP address to the RIS control system, ensuring that the RIS and the UE communicate by being on the same LAN. At the same time, the UE maintains a connection to the USRP to ensure that the base-band signal processing is synchronized with the feedback mechanism and is connected to the RIS control system via the LAN. Due to the high reliability of TCP transmission, the data exchange still uses TCP, but the RIS control unit and the UE measurement unit share the same host, so the data transmission path is extremely short, eliminating the additional latency associated with remote network communication. This architecture ensures that all feedback calculations are performed within the same host, significantly reducing data transfer overheads and improving the stability of the feedback system. Figure 2 shows the time series analysis of the RIS feedback and Algorithm 1 is the corresponding beam tracking algorithm, further illustrating how the method reduces the feedback delay and improves system stability. When the UE device detects that the received signal power \(P_{r}\) falls below the threshold \(g_{t}\), it stops demodulation and establishes a TCP connection with the RIS control system. The UE acts as a TCP client with one IP address of 192.168.10.3, while the RIS operates as a TCP server with another IP address of 192.168.10.4. The UE sends a TCP message with data = 0 to notify the RIS to enter beam scanning mode. Upon receiving the message, the RIS immediately starts scanning according to a predefined codebook, where each beam direction is scanned for a duration of \(D_{t}=80\)\(\sim\)120 ms. Since the system allows the UE to control the RIS beam scanning method  
directly, it maintains simplicity and robustness. Compared to the traditional scanning duration of 150\(\sim\)200 ms, this approach reduces scanning time and improves feedback efficiency. ```
1:Input: Receiving power \(p_{r}\), sensitivity threshold \(g_{t}\), transition time \(\Delta t\) for each spot beam
2:while true do
3:if\(p_{r}<g_{t}\)then
4: UE stops demodulating
5: UE and RIS control system establish a TCP connection
6: UE (as client) sends TCP data = 0, signaling RIS to begin scanning and measure \(p_{r}\) on the UE side
7:forBID = 0 to \(B_{\max}\)do
8: RIS control system scans using the pre-defined codebook pattern (BID is the pattern index)
9: UE receives signal and calculates power \(u(i)\) on the UE side
10: Delay \(\Delta t\) ms
11:endfor
12: Compare and find the largest \(u(i)\), denote it as \(p_{r}\)
13:\(B_{\max}=\max\)Index\((p_{r})\)   // index of the largest \(p_{r}\) in the codebook
14: Feedback \(B_{\max}\) from UE to RIS
15: Beam \(\leftarrow\)\(B\)\(\left(B_{\max}\right)\)
16:endif
17:endwhile
```  
**Algorithm 1** The EIR-CM mode tracking algorithm  
For instance, the RIS sequentially scans 10 sets of codebooks, and the UE computes and records the received power \(u_{i}\) at each direction. The total scanning phase duration is \(10\times D_{t}\). Once the scanning phase is completed, the UE determines the beam index \(B_{\max}\) corresponding to the maximum received power and transmits it to the RIS via TCP. The RIS then immediately switches to the optimal beam mode.