## 4 Numerical Results
(3) Mode switching (MS): in this mode, all elements of the STAR-RIS are divided into two groups which \(\beta_{l}\in\{0,1\}\). (4) Time switching (TS): in this mode, the STAR-RIS utilizes temporal variation to alternate element states between T and R modes across distinct orthogonal time slots. (5) Conventional wiretap channel, i.e., without using STAR-RIS (W-RIS). (6) Conventional RIS (C-RIS): the two conventional RISs are deployed adjacent to each other at the same location as the STAR-RIS. The above  
Figure 2: Simulation setup for the considered network. benchmark scheme is a comparison of common STAR-RIS optimization algorithms in the field [29]. Figure 4 evaluates the WSSR attained by various methodologies in relation to the allocated transmit power budget, TS surpasses IP and CP in security at low power due to its inherent wiretap avoidance and clear decoding. However, as power rises, IP and CP's efficient time use prevails, which diminishes the reception capability of eavesdroppers, leading to greater secrecy at high power levels. IP scheme exhibits higher WSSR at all transmit power levels, which shows that the IP scheme is more efficient in exploiting the transmit power to enhance the secrecy rate, specifically because its phase shifts can be adjusted independently with higher design freedom to achieve higher secrecy rates. However, in exchange for complex hardware implementations that increase the difficulty and cost of implementing the system. The CP scheme outperforms C-RIS and MS in secrecy efficacy. The WSSR of CP is slightly lower than that of IP due to the effect of coupling phase shift. The CP scheme may not perform as well as the IP scheme, especially in scenarios where elaborate beamforming and high secrecy performance are required. Calculations show that the average error in confidentiality rates for the CP and IP schemes is under 3 percent. Figure 4: The WSSR versus \(P_{t}\) with \(M=30\). Figure 3: Convergence performance of the proposed algorithm. In Figure 5, we can find that the WSSR increases with M for all these schemes. C-RIS lag due to limited degrees-of-freedom (DoFs) from their fixed transmission/reflection choice, widening the performance gap with STAR-RIS as \(M\) grows. This comparison validates STAR-RIS's utility in wireless networks. TS naturally avoids mutual eavesdropping between users through time switching, which is particularly important in multi-user scenarios. The advantage becomes much more apparent as the amount of factors increases. MS outperforms the C-RIS. This is due to the fact that in a broadcast communication scenario, MS experiences no inter-user interference and can leverage the entire available communication time to enhance WSSR. The WSSR of MS and C-RIS, while also increasing with M, is not as significant as that of the CP and IP schemes. This is because their phase shift strategies are more rigid and lack the flexibility needed to fully optimize the signal transmission path. The performance of CP is slightly lower than that of IP as the number of elements increases. This is because the phase shifts of neighboring units in the CP scheme are constrained, resulting in fewer degrees of freedom in the system. Consequently, IP can manage and reduce interference more efficiently, especially in multi-user scenarios. Due to phase-shift constraints, CP may not eliminate interference, thereby affecting the WSSR. Figure 6 illustrates the convergence behavior of the PDD procedure to update \(\mathbf{\theta}_{l}\). The value of the penalty pair function \(\delta\) decreases with iterations for different numbers of STAR-RIS elements. The PDD algorithm demonstrates good convergence within twenty iterations, with a threshold set at \(10^{-5}\). Additionally, the convergence is not sensitive to variations in M.  
Figure 5: The WSSR versus \(M\) with \(P_{t}=0\) dBm. Figure 6: Convergence of the proposed PDD algorithm.