## 3 Link Level Parameters and Channel Coefficient Generation
### Small Scale Parameters
#### 3.3.3 Arrival and Departure Angles for Both Azimuth and Elevation  
In this step, we generate the per ray angles of arrival and departure in both azimuth and elevation. AOAs and AODs Generation  
The Power Angular Spectrum (PAS) reflects the power distribution in different direction and determines the spatial correlation properties of the channel. The composite PAS in azimuth of all clusters is modelled as a wrapped Gaussian distribution. We show how to generate \(AOAs\); the procedure to generate \(AODs\) is very similar. \(AOAs\) are generated by applying the inverse Gaussian distribution with cluster average power \(P_{n}\) and Root Mean Square (RMS) Azimuth Spread of Arrival (ASA):  
\[\tilde{\phi}_{n,AOA}=\frac{2\,ASA\,\sqrt{-\ln(P_{n}/\max(P_{n}))}}{1.4\,C_{ \phi}} \tag{43}\]  
with \(C_{\phi}\) defined as:  
\[C_{\phi}= \begin{cases}C_{\phi}^{NLOS}(1.1035-0.028K-0.002K^{2}+0.0001K^{3})& \text{for $LOS$}\\ C_{\phi}^{NLOS}&\text{for $NLOS$}\end{cases}  \tag{44}\]  
where \(C_{\phi}^{NLOS}\) can be found in Table 7.5-2 of [21]. In the case of \(LOS\) contribution, \(C_{\phi}\) also depends on the Ricean factor \(K\). Cluster angles \(\phi_{n,AOA}\) can be generated as \[\phi_{n,AOA}= \begin{cases}X_{n}\tilde{\phi}_{n,AOA}+Y_{n}+\phi_{ LOS,AOA}&\text{for }NLOS\\ X_{n}\tilde{\phi}_{n,AOA}+Y_{n}-X_{1}\tilde{\phi}_{1,AOA}-Y_{1}+\phi_{ LOS,AOA}&\text{for }LOS\end{cases}  \tag{45}\]  
where \(X_{n}\) is a discrete random variable uniformly distributed in the set \(\{-1,1\}\) and \(Y_{n}\sim\mathcal{N}(0,(ASA/7)^{2})\) is used to introduce random variation. In the case of LOS link, the first cluster has angle equal to the \(LOS\) one \(\phi_{1,AOA}=\phi_{ LOS,AOA}\). Finally, for ray angles we need to add offset angles to the azimuth cluster angle as follows:  
\[\phi_{n,mA,AOA}=\phi_{n,AOA}+C_{ASA}\alpha_{m} \tag{46}\]  
where \(C_{ASA}\) is the cluster-wise RMS azimuth spread of arrival and \(\alpha_{m}\) is the per-ray offset, which can be found in Table 7.5-3 of [21]. _AODs_ generation follows the same procedure from (43) to (46) by substituting ASA with Azimuth Spread of Departure (ASD) and \(C_{ASA}\) with the cluster-wise RMS azimuth spread of departure \(C_{ASD}\). ZOAs and ZODs Generation  
The composite PAS in zenith of all clusters is modelled as a Laplacian distribution. _ZOAs_ are generated by applying the inverse Laplacian distribution with cluster average power \(P_{n}\) and RMS Zenith Spread of Arrival (ZSA):  
\[\tilde{\theta}_{n,ZOA}=-\frac{ZSA\,\ln(P_{n}/\max(P_{n}))}{C_{\theta}} \tag{47}\]  
with \(C_{\theta}\) defined as:  
\[C_{\theta}= \begin{cases}C_{\theta}^{NLOS}(1.3086+0.0339K-0.0077^{2}+0.0002K^{ 3})&\text{for }LOS\\ C_{\theta}^{NLOS}&\text{for }NLOS\end{cases}  \tag{48}\]  
where \(C_{\theta}^{NLOS}\) can be found in Table 7.5-4 of [21]. In the case of \(LOS\) contribution \(C_{\theta}\) also depends on the Ricean factor \(K\). Cluster angles \(\theta_{n,ZOA}\) can be generated as  
\[\theta_{n,ZOA}= \begin{cases}X_{n}\tilde{\theta}_{n,ZOA}+Y_{n}+\tilde{\theta}_ {ZOA}&\text{for }NLOS\\ X_{n}\tilde{\theta}_{n,ZOA}+Y_{n}-X_{1}\tilde{\theta}_{1,ZOA}-Y_{1}+\theta_{ LOS,ZOA}&\text{for }LOS\end{cases}  \tag{49}\]  
where \(\tilde{\theta}_{ZOA}=90^{\circ}\) if the BS-UT link is O2I (the UT is indoor) and \(\tilde{\theta}_{ZOA}=\tilde{\theta}_{ LOS,ZOA}\); otherwise, \(X_{n}\) is a discrete random variable uniformly distributed in the set \(\{-1,1\}\) and \(Y_{n}\sim\mathcal{N}(0,(ZSA/7)^{2})\) is used to introduce random variation. In the case of \(LOS\) link, the first cluster has angle equal to the \(LOS\) one \(\theta_{1,ZOA}=\theta_{ LOS,ZOA}\). Finally, for ray angles we need to add offset angles to the zenith cluster angle as follows:  
\[\theta_{n,m,ZOA}=\theta_{n,ZOA}+C_{ZSA}\alpha_{m} \tag{50}\]  
where \(C_{ZSA}\) is the cluster-wise RMS zenith spread of arrival and \(\alpha_{m}\) is the per-ray offset. _ZODs_ generation follows a similar procedure as for \(ZOA\).