## 5 Operation of the Switch
### Switch Algorithm  
Selection between the two available transmission nodes in the switch is performed based on the parameters of the received signal \(Y_{SR}(t)\), and the proposed algorithm for the selection between ABCS and SWIPT is given in Algorithm 1. ```
Initialize: \(\mathit{best\_scheme}\leftarrow\emptyset\) \(\mathit{max\_data\_rate}\leftarrow\) 0 \(\mathit{hysteresis\_factor}\gets\mathit{HF}\) \(\mathit{min\_data\_rate\_threshold}\leftarrow\mathit{mindatarate}\) \(\mathit{min\_energy\_threshold}\leftarrow\mathit{minenergy}\) Check if SWIPT meets minimum requirements if\(\mathit{data\_rate\_RD\_SWIPT}\geq\mathit{min\_data\_rate\_threshold}\)and\(\mathit{energy\_harvested}\geq\mathit{min\_energy\_threshold}\)then best_scheme \(\leftarrow\) SWIPT \(\mathit{max\_data\_rate}\leftarrow\mathit{data\_rate\_RD\_SWIPT}\) endif Check if ABCS meets minimum requirements if\(\mathit{data\_rate\_RD\_ABCS}\geq\mathit{min\_data\_rate\_threshold}\)then if\(\mathit{data\_rate\_RD\_ABCS}>\mathit{max\_data\_rate\_}\times(1+\mathit{hysteresis\_factor})\)then best_scheme \(\leftarrow\) ABCS \(\mathit{max\_data\_rate\_rate\_RD\_ABCS}\) endif endif If neither scheme meets minimum requirements, choose the better one if\(\mathit{best\_scheme}=\emptyset\)then if\(\mathit{data\_rate\_RD\_SWIPT}>\mathit{data\_rate\_RD\_ABCS}\)then best_scheme \(\leftarrow\) SWIPT else best_scheme \(\leftarrow\) ABCS endif endif Tie-breaking mechanism if\(|\mathit{data\_rate\_RD\_SWIPT}-\mathit{data\_rate\_RD\_ABCS}|<1\times 10^{-6}\)then if\(\mathit{energy\_harvested}\geq\mathit{min\_energy\_threshold}\)then best_scheme \(\leftarrow\) SWIPT \(\triangleright\) Prefer SWIPT if energy harvesting is sufficient else best_scheme \(\leftarrow\) ABCS endif endif Additional check for energy requirement in SWIPT if\(\mathit{best\_scheme}=\) SWIPT then energy_required_for_transmission \(\leftarrow\)\(\frac{1}{\mathit{avg\_k\_RD}}\times\mathit{path\_loss\_RD}\) if\(\mathit{energy\_harvested}<\mathit{energy\_required\_for\_transmission}\)then best_scheme \(\leftarrow\) ABCS endif endif
```  
**Algorithm 1** Decision-making algorithm for hybrid switch with ABCS and SWIPT  
The algorithm first evaluates if SWIPT meets the minimum requirements for both data rate and energy harvesting. If these conditions are met, SWIPT is initially selected. It then assesses ABCS, choosing it if it meets the minimum data rate threshold and offers a significant improvement over SWIPT, accounting for a hysteresis factor to prevent frequent switching (The hysteresis factor allows a practical difference to be maintained when selecting between ABCS and SWIPT. Here, ABCS needs to outperform SWIPT by a factor (HF) determined by the user if both meet the minimum conditions.) In cases where neitherscheme meets the minimum requirements, the algorithm defaults to the one with a higher data rate. A tie-breaking mechanism is implemented for scenarios where SWIPT and ABCS data rates are nearly identical, preferring SWIPT if sufficient energy can be harvested. As a final check, if SWIPT is selected, the algorithm verifies that the harvested energy is adequate for transmission, switching to ABCS if this condition is not met. This approach ensures that the selected scheme is not only optimal in terms of data rate but also feasible from an energy perspective, providing a robust and efficient solution for the hybrid switch operation. The logic flow of the algorithm is shown in the flowchart given in Figure 3 below. The algorithm evaluates the data rate that can be achieved through SWIPT and ABCS. In cases of similar data rates that do not meet the minimum threshold, it opts to consider the better data rate achievable between SWIPT and ABCS. As can be seen from the flowchart, the algorithm pays higher attention when selecting SWIPT due to the higher energy requirement for transmission through SWIPT. For specific zero-energy implementations, the use of a less energy-consuming method is preferred; therefore, the energy consumed by the selected scheme is considered thoroughly through the switch.