## 3 Simulation Framework  
In this section, the simulation framework is provided considering a three-floor building with various sensor nodes per floor (Figure 2). Evaluation is performed with the help of MC simulations, where at each snapshot the nodes per floor can have a different orientation following a uniform distribution. At each snapshot, for every node in the network, the channel coefficient from the central BS is generated for all multipath components, according to the Gaussian distribution as described in Section 2. As explained, this is a rather realistic assumption, due to the number of reflections that take place inside a building. Once these coefficients are generated, corresponding parameters such as total losses are calculated per node. Afterwards, the matrix formulation according to Equations (14) and (15) takes place and overall transmission powers are calculated. Figure 2: Wireless nodes in a three-floor building. As it will be explained in the following section, two transmission modes have been considered: diversity combining mode, where, as previously explained, the same information signal is sent and received from all transceiver antennas, and the spatial multiplexing transmission mode [21]. In the latter case, different information signals are sent from different transmit antennas. In this case, \(\mathbf{w}_{n}\) is an \(M_{t}\times M_{t}\) matrix. In both transmission cases, \(\mathbf{w}_{n}\) matrices are calculated according to overall signal strength maximization. This iterative procedure is presented in Tables 1 and 2, where tr(\(\mathbf{X}\)) is the trace of Matrix \(\mathbf{X}\). In Table 1, \(\mathbf{X}(\lambda_{m}(\mathbf{A}))\) is the eigenvector corresponding to the maximum eigenvalue of Matrix \(\mathbf{A}\). In Table 2, \(\mathbf{U}\) and \(\mathbf{V}\) are the left and right singular matrices after singular value decomposition (SVD) of Matrix \(\mathbf{A}\), while \(\mathbf{\Sigma}\) is a diagonal matrix containing the eigenvalues of \(\mathbf{A}\) in descending order. Moreover, \(\mathbf{I}_{\text{K}}\) is a K \(\times\) K identity matrix, and diagonal matrix \(\mathbf{D}\) indicates power distribution per transmission mode (tr(\(\mathbf{D}\)) = 1). Finally, \(dim=\text{min}(M_{t},M_{r})\) indicates the dimension of the MIMO orientation. Both algorithms initially assume a uniform power distribution in all antennas, and at each step the desired signal strength is calculated. This procedure comes to an end once the convergence of both algorithms (defined by parameter \(\varepsilon\)) takes place. Finally, all simulation parameters are summarized in Table 3. \begin{table}
\begin{tabular}{l c c} \hline \hline
**Step 1**: Set \(i\leftarrow\)1, \(\mathbf{w}_{n,i}\leftarrow\left(1/\sqrt{M_{t}}\right)\), \(P_{i}\leftarrow\mathbf{w}_{n,i}^{\text{H}}\mathbf{w}_{n,i}\), \(\varepsilon=10^{-3}\) \\ \hline
**Step 2**: \(\mathbf{r}_{n,j,i}=\left(\mathbf{H}_{n,j}\mathbf{w}_{n,i}\right)^{\text{H}},1 \leq l\leq L\) and \(\mathbf{A}\leftarrow\sum\limits_{l=1}^{L}\sum\limits_{l=1}^{L}\left(\mathbf{r} _{n,j}\mathbf{H}_{n,l}\right)^{\text{H}}\mathbf{r}_{n,l^{\prime}}\mathbf{H}_ {n,l^{\prime}}\) \\ \hline
**Step 3**: \(\mathbf{w}_{n,i+1}\leftarrow\mathbf{X}(\lambda_{m}(\mathbf{A}))\) and \(P_{i+1}\leftarrow\mathbf{w}_{n,i+1}^{\text{H}}\mathbf{A}\mathbf{w}_{n,i+1}\) \\ \hline
**Step 4**: If \(\frac{\left|\mathbf{tr}(P_{i,1})-\mathbf{tr}(P_{i})\right|}{\mathbf{tr}(P_{i})}\geq\varepsilon\) go to Step 2 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Maximization of the signal-to-noise ratio (SNR) in diversity combining mode.