# Efficient Modulation Scheme for Intermediate Relay-Aided IoT Networks
## 3 Proposed Solution
### Proposed BER Minimization Solution
To compute \(\Phi_{\vartheta}(\rho)\), let us denote Gaussian random vectors \(\mathbf{z}_{1}=[h_{0},v_{1}]^{T},\mathbf{z}_{2}=[h_{1},h_{2},v_{2}]^{T}\), such that \(\mathbf{z}_{m}\sim\mathcal{CN}(\mu_{m},\Sigma_{m})\), \(m=1,2\), where \[\mu_{1} =[\mu_{h_{0}},0]^{T}, \tag{13}\] \[\min_{\mathbf{x}}\sum_{p=0}^{Q-1}\sum_{i=0}^{Q-1}\sum_{j=0}^{Q-1} x_{pij}\sum_{l=0}^{Q-1}\sum_{q=0}^{Q-1}\sum_{k=0}^{Q-1}c_{p,i,j,q,k,l}\times x_{qkl}, \tag{7}\]0 (14) \[\min_{\mathbf{x}}\sum_{p=0}^{Q-1}\sum_{i=0}^{Q-1}\sum_{j=0}^{Q-1} x_{pij}\sum_{l=0}^{Q-1}\sum_{q=0}^{Q-1}\sum_{k=0}^{Q-1}c_{p,i,j,q,k,l}\times x_{qkl}, \tag{7}\]1 (15) \[\min_{\mathbf{x}}\sum_{p=0}^{Q-1}\sum_{i=0}^{Q-1}\sum_{j=0}^{Q-1} x_{pij}\sum_{l=0}^{Q-1}\sum_{q=0}^{Q-1}\sum_{k=0}^{Q-1}c_{p,i,j,q,k,l}\times x_{qkl}, \tag{7}\]2  
Then (5) can be rewritten as \(\vartheta=\mathbf{z}_{1}^{H}\mathbf{A}_{1}\mathbf{z}_{1}+\mathbf{z}_{2}^{H} \mathbf{A}_{2}\mathbf{z}_{2}\), where  
\[\mathbf{A}_{1}=\left[ \begin{array}{cc}|e_{pq}|^{2}&e_{pq}^{*}\\ e_{pq}&0\end{array} \right],\ \mathbf{A}_{2}=\left[ \begin{array}{cc}|e_{kl}|^{2}&e_{ik}^{*}e_{ jl}&e_{ik}^{*}\\ e_{ik}e_{jl}^{*}&|e_{jl}|^{2}&e_{jl}^{*}\\ e_{ik}&e_{jl}&0\end{array} \right], \tag{17}\]  
in which the notation \(e_{ab}\) is given as  
\[e_{ab}=\lambda_{0}[a]-\lambda_{0}[b]. \tag{18}\]  
Thus, the MGF is given as  
\[\Phi_{\theta}(\rho)=\sum_{m=1,2}\frac{\exp(-\rho\mu_{m}^{H}\mathbf{A}_{m}( \mathbf{I}+\rho\Sigma_{m}\mathbf{A}_{m})^{-1}\mu_{m})}{\det(\mathbf{I}+\rho \Sigma_{m}\mathbf{A}_{m})}. \tag{19}\]  
Note that for any instance of quadratic assignment problem a total number of \(Q^{6}\) coefficients must be computed. Fortunately, the modulation diversity design is based on statistical CSI which does not require online computation of the \(Q^{6}\) coefficients in real-time. In fact, the optimized modulation diversity can be precomputed and stored a priori in our network nodes. In our simulation, we implemented the above procedure for 16-QAM and 32-QAM within C++ on a workstation with 48 cores and finished the computation in several days for the \(Q=32\) case and a few hours for the 16-QAM case. For a larger constellation such as 64-QAM, however, the time and spacial complexity may still be impractical. We will address in future works, new means to reduce this complexity by imposing rules to restrict the remapping schemes. Applying large and complex algorithms, such as branch-and-bound techniques, to solve a relatively modest constellation size of 16-QAM and 32-QAM, is not feasible. Additionally, doing so may lead to some symmetry issues, thus, rendering it impractical. Here, we aim to find a solution using the iterative search technique. This algorithm works as follows. It starts by random mapping of \(\lambda_{1}^{(0)},\lambda_{2}^{(0)}\). It then executes a local search process, and whenever the objective function is reduced, the changing of mapping of indices is performed. This process continues to lower the objective and the local mapping is updated for each reduction. When a local minimum approaches, the algorithm executes a perturbation step by changing the mapping of \(k_{p}\) indices. Note that \(k_{p}\) indices are adaptively changed from \(k_{p,min}\) to \(k_{p,max}\). After the perturbation, the local search is again restarted until a pre-specified stopping criterion is met.