# Pilot Sequence Allocation Schemes in Massive MIMO Systems Using Heuristic Approaches
## 2 System Model  
We consider a Massive MIMO system with \(L>1\) cells using the same spectrum band and \(K_{\ell}\) mobile terminals connected with its single base station which has \(M>>K_{\ell}\) antennas. To acquire channel state information (CSI) at each coherence interval, each user in the system must send a pilot sequence through the uplink channel. The pilot sequence uplink signal received by the base station \(\ell\) is a \(M\times T_{p}\) matrix where \(T_{p}\) is the pilot sequence size, and it may be described as:  
\[\mathbf{R}_{\ell}^{u} = \overbrace{\sum_{k=1}^{K_{\ell}}\sqrt{p_{k,\ell}}\,\mathbf{g}_{k,\ell,\ell}\,\mathbf{s}_{k,\ell}^{H}}^{\text{Desired signal from cell users}} \tag{1}\] \[+\underbrace{\sum_{j=1}^{L}\sum_{k^{\prime}=1}^{K_{j}}\sqrt{p_{k^ {\prime},j}}\mathbf{g}_{k^{\prime},j,\ell}\,\mathbf{s}_{k^{\prime},j}^{H}}_{ \text{Pilot Contamination / Interference}}+\mathbf{\eta}_{\ell}\]  
where \(k\), \(\ell\), \(k^{\prime}\) and \(j\) are the user, cell of interest, interfering users and adjacent cell indexes, respectively. Moreover, \(\mathbf{R}_{\ell}^{u}\in\mathbb{C}^{M\times T_{p}}\), \(p_{k,\ell}\) is the transmission power of each user, \(\mathbf{s}_{k,\ell}\in\mathbb{C}^{T_{p}\times 1}\) is the pilot sequence, whereas \((\cdot)^{H}\) is the Hermitian operator and is equivalent to the transposed complex conjugate, \(\mathbf{\eta}_{\ell}\in\mathbb{C}^{M\times T_{p}}\) is the noise matrix whose elements are complex Gaussian random variables with zero mean and variance equal to \(N_{0}\,B\) where \(N_{0}\) is the noise power spectral density (The noise PSD (\(N_{0}\)) is equal to the Boltzmann Constant times the temperature, i.e., it is equivalent to approximately \(4.11\times 10^{-21}\) watts per hertz at 25 degrees Celsius) and \(B\) the system bandwidth. Finally, \(\mathbf{g}_{k,j,\ell}\in\mathbb{C}^{M\times 1}\) is the channel gain between the \(k\)-th user from cell \(j\) and the base station of cell \(\ell\), which represents the large-scale fading (\(\beta_{k,j,\ell}\)) and the small-scale fading (\(\mathbf{h}_{k,j,\ell}\)), i.e.,:  
\[\mathbf{g}_{k,j,\ell}=\sqrt{\beta_{k,j,\ell}}\,\mathbf{h}_{k,j,\ell} \tag{2}\]  
where \(\mathbf{h}_{k,j,\ell}\in\mathbb{C}^{M\times 1}\) are independent and identically distributed complex Gaussian random variables with zero mean and unit variance. Meanwhile, \(\beta_{k,j,\ell}\) is the path loss and shadowing effects. We assume a simplified path loss model, i.e.,:  
\[\beta_{k,j,\ell}=\left(\frac{\lambda}{4\,\pi\,d_{0}}\right)^{2}\left(\frac{d_ {0}}{d_{k,j,\ell}}\right)^{\gamma}\mathcal{S}_{k,j,\ell} \tag{3}\]  
where \(\lambda\) is the wavelength, \(d_{0}\) is the reference distance (Typically, \(d_{0}\in[1,10]\) meters for indoor environments and \(d_{0}\in(10,100)\) meters for outdoors), \(d_{k,j,\ell}\) is the distance (in meters) from the \(k\)-th user of cell \(j\) to the base station in cell \(\ell\). Finally, \(\gamma\in[2,8]\) is the path loss exponent which is directly related to the scenario where the wireless communications take place, and \(\mathcal{S}_{k,j,\ell}\) is the shadowing log-normal distributed random variable with zero mean and variance \(10^{\frac{\sigma^{2}}{10}}\) where \(\sigma^{2}_{s}\in[4,13]\) for outdoor channels. We suppose the use of an orthogonal variable spreading factor (OVSF) code to generate the pilot sequences which are designated to each user through the pilot sequence allocation hipermatrix \(\boldsymbol{\Phi}\in\{0,1\}^{K_{\ell}\times T_{p}\times L}\) whose elements are defined as:  
\[\boldsymbol{\phi}_{k,\ell,\ell}=\left\{ \begin{array}{ll}0&\text{ pilot sequence is not allocated}\\ 1&\text{ pilot sequence is allocated}\end{array}