## 5 HRIS-DMA Novel Algorithm  
In this section, we describe the decision-making algorithm introduced into the HRIS controller to enable the hybrid ability of HRIS elements to transmit and reflect an incident signal simultaneously. This algorithm models the incident signal moving toward the intended user without wasting 50% of signal power. The details of the developed algorithm are summarised in Algorithm 1. User location \(d_{ue}\) from the BS is the main factor determining the allocated power of transmission or reflection in this work. Accordingly, this decision will be affected by the user's location according to the HRIS, defined as \(D_{p(trans,ref)}\). The working methodology starts with the parameter initialisation of the parameters for the BS, HRIS, and UE. Set initial conditions for the DMA within the HRIS. Then, the system design continuously monitors and updates the exact location of each UE within the coverage area. Use real-time data to feed the HRIS configuration process. After that, the signal is transmitted from the BS to the HRIS by adjusting the HRIS elements based on the iterative algorithm to optimise signal reflection toward the UEs. As a real-time adjustment, the system will continuously update the HRIS configuration to adapt to changes in UE location and network conditions, and optimise the signal path to reduce power loss, minimise latency, and improve coverage. Additionally, the performance metrics, such as signal strength, coverage area, failed signal rate, and system efficiency, are measured and compared against predefined KPIs for 6G networks. As the algorithm is iterative, we implemented a feedback mechanism to continuously refine the HRIS adjustments based on real-time performance data, which ensures system adaptations to dynamic network conditions and user movements. As the targeted validation property for network communication in this work is to provide a higher coverage area, including the zero-coverage spot users, and referring to the network in Figure 2, it can be noticed that the communication link between U\({}_{1}\), U\({}_{3}\), U\({}_{4}\), and BS\({}_{1}\) is obstructed by obstacles. At first, CSI\({}_{intts}\) and CSI\({}_{stat}\) are shared between the BS and HRIS controller, in which the CSI\({}_{intts}\) contains the exact user location in regard to the continuous movement from the BS and HRIS. In the communication system network, the BS and HRIS are always fixed, resulting in the direct calculation of the user's exact location in reference to the HRIS at the HRIS controller (i.e., \(D_{p(trans,ref)}\)). On the other hand, CSI\({}_{stat}\), known as the long-term CSI, will always share information with the HRIS controller about the possibility of the existence of an LoS with the HRIS in order to update the decision process. Based on the information shared between the BS and the HRIS controller and the data on user location obtained from both, the signals received by the user can be written as in (9) and (10), in which they depend on the user being in the transmission or reflection area, respectively. The \(x_{n}\) represents the intended signal for the user \(n\), where, for simplicity of clarification, \(n=1:4\), referring to the network in Figure 2.  
\[x_{t}=2 PA_{t}\eta_{HRIS}e^{i\theta_{t}}x_{n} \tag{9}\]  
\[x_{r}=2 PA_{r}\eta_{HRIS}e^{i\theta_{r}}x_{n} \tag{10}\]The characteristics of the redirected signal for transmission and reflection are modelled in accordance with HRIS space wave impedance \(\eta_{HRIS}\) and the user location from the BS \(d_{ue}\) as in (11), where \(\theta_{i}\) and \(\theta_{r,t}\) are the incident and reflected or transmitted signal phase shifts, respectively, and \(\eta_{0}\) is the space wave impedance constant. \[\eta_{HRIS}=j\frac{\eta_{0}}{\cos\theta_{i}}\cot\biggl{(}\frac{(\sin\theta_{i}- \sin\theta_{r,t})}{2}\biggr{)}.d_{ue} \tag{11}\]  
As indicated in (9) and (10), the signal delivered to the user is associated with the power value \(P\); modelling this value is the most important part of the HRIS's functionality.