## 5 Simulation and Results  
The reflecting elements in the IRS have been assumed to be arranged as a rectangular array such that \(N\triangleq N_{x}\)\(N_{z}\), where \(N_{x}\) and \(N_{z}\) are the number of reflecting elements alongthe \(x\)-axis and the \(z\)-axis, respectively. In our simulations, \(N_{x}\) is set to 5 and \(N_{z}\) increases linearly with \(N\)[4]. The path loss is given by:  
\[L(d)=C_{0}\bigg{(}\frac{d}{D_{0}}\bigg{)}^{-\alpha}, \tag{27}\]  
where \(d\) is the distance of the individual link, \(C_{0}\) denotes the path loss factor at the reference distance, \(D_{0}=1\) m and \(\alpha\) represents the path loss exponent. A Rician fading channel model is considered for small-scale fading. Thus, the channel \(\mathbf{G}\) between AP and IRS is given by [4]:  
\[\mathbf{G}=\sqrt{\frac{\beta_{AI}}{1+\beta_{AI}}}\mathbf{G}^{LoS}+\sqrt{\frac{ 1}{1+\beta_{AI}}}\mathbf{G}^{NLoS} \tag{28}\]  
where \(\beta_{AI}\) is the Rician channel factor, and \(\mathbf{G}^{LoS}\) represents LoS component and \(\mathbf{G}^{NLoS}\) represents the NLoS or Rayleigh fading channel components, respectively. In this case, this model is reducing to LoS channel component and we assume \(\beta_{AI}\rightarrow\infty\) or \(\beta_{AI}=0\). The channel \(\mathbf{G}\) is multiplied by the square root of the path loss factor \(L(d)\). The path loss component is given by \(\alpha_{AI}\). Let us assume that \(\alpha_{Au}\) and \(\alpha_{Hu}\) are the path loss components of the AP-user and IRS-user links as \(\alpha_{Au}=3.4\) and \(\beta_{Au}=0\) for large distance channel and random LoS-scattering at the AP-user channel. It has also been assumed that all users have the same SINR target, i.e., \(\gamma_{k}=\gamma\), \(\forall k\). For single-user system SNR target is set to be \(\gamma=10\) dB and M = 4 where M is reflecting components. According to Figure 2, the user on horizontal position which is parallel to the line connecting the AP and IRS with vertical distance of \(d_{v}=2\) (m) between the two lines. \(d\)(m) is used as the horizontal line distance of AP and user. Hence, \(d_{1}=\sqrt{d^{2}+d_{v}^{2}}\) and \(d_{2}=\sqrt{(d_{0}-d)^{2}+d_{v}^{2}}\), where \(d_{1}\) is the distance between AP and user and \(d_{2}\) is IRS-user link distance. The Rician channel factors and the path loss exponents are set as \(\alpha_{AI}=2\), \(\alpha_{Hu}=2.8\), \(\beta_{Hu}=0\), and \(\beta_{AI}=\infty\), respectively [4]. Some other parameters are also defined for our system, i.e., \(C_{0}=-30\) dB, \(d_{0}=51\) m and \(\sigma_{k}^{2}=-80\) dBm. The stopping criteria for alternating optimisation algorithm, \(e\) is set at \(10^{-5}\). Figure 2: System model of an IRS-enabled wireless communication scenario. The simulation has been carried out with Matlab R2023b. the optimisation is done using well known optimisation problem solving tool CVX. Further details of the tool can be found in [32]. For the simulation, a Macbook air with an M3 chip and 24 GB RAM was used. In this section, the performance of several schemes have been compared, namely: (1) _SDR:_ The solution is obtained by applying Gaussian randomisation techniques and SDR [4]; (2) _Alternating optimisation:_ This method is described above in the Section 4.1; (3) _AP-user MRT:_ It is set as \(\bar{\mathbf{w}}=\frac{\mathbf{h}_{d}}{||\mathbf{h}_{d}||^{2}}\) for achieving MRT based on the AP-user direct channel [33]; (4) _AP-IRS MRT:_ It is solved by setting \(\bar{\mathbf{w}}=\frac{\mathbf{g}}{||\mathbf{g}||}\) for achieving MRT based on the AP-IRS rank-one channel with \(\mathbf{g}^{H}\) denoting any row in \(\mathbf{G}\)[33]; (5) _Random phase shift_: Here, \(\mathbf{\theta}\) is randomly set in the range \([0,2\pi]\) and then MRT is performed at the AP [4]; (6) Without IRS: It is solved as \(\mathbf{w}=\sqrt{\gamma\sigma^{2}}\frac{\mathbf{h}_{d}}{||\mathbf{h}_{d}||^{2}}\)[4]. In the above, the _SDR_ technique plays a vital role in solving the non-convex optimisation problem that arises when jointly designing the IRS phase shifts and AP beamforming.