## 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.2 Mathematical Model for SIR Dependence on the Terrestrial Separation  
The calculation of the SIR in DL transmission channel at the UE reception side is performed for each point of the UE's trajectory. SIR is calculated, as the ratio of the received power from the serving gNB (SOI) to the power, received from the neighbor gNB (SNOI), expressed in dB. Calculated SIR includes the values of the AA gains of the serving and neighboring gNB towards the UE, depending on the AOD, as well as the free space path loss (FSPL), depending on the distance to the UE. The transmit powers of each gNB are considered to be the same. To calculate gNB\(\rightarrow\)UE AOD, the coordinate systems of the UE and gNB antenna arrays need to be matched. The vector, specifying gNB\(\rightarrow\)UE direction in the global CS, is calculated as:  
\[\mathbf{k}=\mathbf{x}_{UE}-\mathbf{x}_{gNB}=[k_{x},k_{y},k_{z}]^{T}, \tag{1}\]  
where \(\mathbf{x}_{UE}\) is the \([x,y,z]\) UE coordinate vector for the current calculation point; \(\mathbf{x}_{gNB}\) is the \([x,y,z]\) gNB coordinate vector. Translation of the vector \(\mathbf{k}\) into the gNB antenna array local CS is performed as:  
\[\mathbf{r}(\varphi_{r},\theta_{r})=\mathbf{R}_{gNB}(\varphi_{r},\theta_{r})\mathbf{k}, \tag{2}\]  
\[\mathbf{R}_{gNB}(\varphi_{r},\theta_{r})=\mathbf{R}_{gNBz}(\varphi_{r})\mathbf{R}_{gNBy}( \theta_{r}), \tag{3}\]  
\[\mathbf{R}_{gNBz}(\varphi)= \begin{bmatrix}\cos(\varphi)&-\sin(\varphi)&0\\ \sin(\varphi)&\cos(\varphi)&0\\ 0&0&1\end{bmatrix} , \tag{4}\]  
\[\mathbf{R}_{gNBy}(\theta)= \begin{bmatrix}\cos(\theta)&0&\sin(\theta)\\ 0&1&0\\ -\sin(\theta)&0&\cos(\theta)\end{bmatrix} , \tag{5}\]  
where \(\mathbf{r}=[r_{x},r_{y},r_{z}]^{T}\) is the gNB\(\rightarrow\)UE direction vector in the gNB antenna array local CS; \(\mathbf{R}_{gNB}\) is a rotation matrix, that specifies the orientation of the gNB AA; \(\mathbf{R}_{gNBz}(\varphi)\) and \(\mathbf{R}_{gNBy}(\theta)\) are the components of the \(\mathbf{R}_{gNB}\) matrix, that define the rotation of the gNB antenna array in azimuth and elevation, respectively; \(\varphi_{r}\) is the gNB AA rotation angle in azimuth; \(\theta_{r}\) is the gNB AA rotation angle in elevation (AA tilt). The calculation of the azimuth and elevation, yielding the direction of the gNB\(\rightarrow\)UE, given the orientation of the gNB antenna array, is performed as:  
\[\varphi_{gNB}=\tan^{-1}(r_{y}/r_{x}); \tag{6}\]  
\[\theta_{gNB}=\tan^{-1}(r_{z}/d_{xy}); \tag{7}\]\[d_{xy}=\sqrt{r_{x}^{2}+r_{y}^{2}}. \tag{8}\]  
Angles \(\left[\varphi_{gNB},\theta_{gNB}\right]\), at which the serving gNB sees UE (SOI link), are denoted as \(\left[\varphi_{gNB_{s}},\theta_{gNB_{s}}\right]\), and angles at which the neighboring gNB sees UE (SNOI link) are denoted as \(\left[\varphi_{gNB_{i}},\theta_{gNB_{i}}\right]\). The angles \(\varphi_{gNB_{s}}/\varphi_{gNB_{i}}\) and \(\theta_{gNB_{s}}/\varphi_{gNB_{i}}\) are used to calculate AA gain of the serving (SOI) and neighbor (SNOI) gNB towards the UE. The vector of the amplitude-phase distribution of signals (in the format of the vector of complex numbers) for antenna array elements, depending on the AOA/ AOD of the signal, is calculated as:  
\[\mathbf{s}_{a}(\varphi,\theta)=e^{-\beta\pi f\mathbf{\tau}(\varphi,\theta)}; \tag{9}\]  
\[\mathbf{\tau}(\varphi,\theta)=\frac{\mathbf{X}_{a}\mathbf{k}_{a}(\varphi,\theta)}{c}; \tag{10}\]  
\[\mathbf{k}_{a}(\varphi,\theta)=- \begin{bmatrix}\cos(\theta)\sin(\varphi)\\ \cos(\theta)\sin(\varphi)\\ \sin(\theta)\end{bmatrix} ; \tag{11}\]  
\[\mathbf{X}_{a}= \begin{bmatrix}x_{a1}&y_{a1}&z_{a1}\\ \vdots&\vdots&\vdots\\ x_{aN}&y_{aN}&z_{aN}\end{bmatrix} ; \tag{12}\]  
where \(\varphi\) is the azimuth angle of arrival/departure; \(\theta\) is the elevation angle of arrival/departure; \(\mathbf{X}_{a}\) is the array of coordinates \([N\times 3]\) of the AE (\(N\) is the number of AEs); \(\mathbf{k}_{a}\) is the steering vector, calculated based on the AOA \([\varphi,\theta]\); \(\mathbf{\tau}\) is the signal arrival delay for each AE from the \([\varphi,\theta]\) direction.