## 3 Link Level Simulation Model for Interference Evaluation in 5G UDN with LAB
### SIR Dependence on the Terrestrial Separation of Two gNB-UE Links in 5G UDN with LAB  
#### 3.1.1 Simulation Model for SIR Dependence on the Terrestrial Separation  
The model is designed to estimate the instantaneous signal-to-interference ratio for the scenario of operation of two gNB-UE radio links. Two gNB are stationary and two UE are mobile; gNB is equipped with AA and UE can transmit/receive in either directional (with AA), or omnidirectional (without AA) mode. Supported AA include uniform linear array (ULA), uniform rectangular or planar array (URA) and uniform circular array (UCA). Source code for simulation model is available at [76]. Simulation model consists of three main parts: setting initial parameters and creating scenario, calculating SIR and displaying results; it also has the ability to visualize instantaneous SIR for moving UE. Initial simulation model parameters include: operating carrier frequency \(f\), AA type (ULA/URA/UCA), flag to enable/disable AA at the UE. Each type of antenna array is described by the following parameters: the number of AE \(N\), the distance between AE is \(\lambda/2\) and is chosen to be equal to the half wavelength \(\lambda=c/f;c\) is speed of light. To create an AA at the gNB and UE, the createAnt (All functions, comprising open-source simulator, are available at [[https://github.com/grihafokin/LAB_link_level](https://github.com/grihafokin/LAB_link_level)]([https://github.com/grihafokin/LAB_link_level](https://github.com/grihafokin/LAB_link_level)) (accessed on 8 November 2022)) function is used, which forms an array of coordinates \([x,y,z]\) for each antenna array element. These coordinates define the position of the AE in the local coordinate system (CS) of the antenna array, relative to the center of symmetry of the AA. Stationary gNB and mobile UE can use same type of AA, however, gNB in 5G networks are usually equipped with larger AA, compared with UE. Simulation scenario assumes the presence of two simultaneously operating gNB\(\rightarrow\)UE DL radio links. Each UE works with one gNB during simulation, the selection of the gNB-UE pair is done during creating the calculation scenario. Simulation script determines the location of the gNB and the trajectory of the UE. The gNB parameters, in addition to the coordinates \([x,y,z]\), also include the orientation of its AA. The createNB function is used to initialize the structure of gNB parameters. The UE movement trajectory is specified by the getTrajectory function with following parameters: the starting and ending points of the UE trajectory, the movement speed and measurement time interval. If there is an AA on the UE, its orientation is also initialized. The createUE function is used to form the UE parameter structure. Each scenario generates a set of straight-line trajectories for the UE. Scenarios under consideration describe urban micro-cell with two gNB ISD = 100 m, and UE moves along street with length of 150 m and width of 10 m. The terrestrial separation of the UE linear trajectories, parallel to the x-axis, are depicted in Figure 1 and are determined by the value \(\Delta y\) along y-axis, varying from 0 m to 10 m (street width) with predefined step 0.1 m.  
The model presents two simulation scenarios for two gNB-UE radio links: (1) two UEs moves towards each other at two parallel lines, separated by the distance \(\Delta y\), two gNBs are  
Figure 1: Simulation scenario 1: (**a**) gNB with AA pattern and UE trajectories on the x-y plane; (**b**) Map of UE SIR values with gNB location on the x-y plane; (**c**) Map of SIR values along UE trajectories; (**d**) Map of SIR values exceeding a given threshold along UE trajectories.