# A Relay Optimization Method for NOMA-Based Power Line Communication Systems
## 3 Optimization Process and Performance Analysis
### Uplink from Relay Node to Other Users
\tag{33}\]  
where \(\mathrm{adjustmentFactor}_{\mathrm{improvement}}\) is the adjustment factor when the solution improves, and \(\mathrm{adjustmentFactor}_{\mathrm{deterioration}}\) is the adjustment factor when the solution deteriorates. The probability of accepting a new solution is given by the following formula:  
\[P_{\mathrm{accept}}=\left\{ \begin{array}{ll}1&\mathrm{if}\ f_{\mathrm{new} }<f_{\mathrm{current}}\\ \exp\Bigl{(}\frac{f_{\mathrm{current}}-f_{\mathrm{new}}}{T_{k}}\Bigr{)}& \mathrm{if}\ f_{\mathrm{new}}\geq f_{\mathrm{current}}\end{array} \right. \tag{34}\]  
where \(f_{\mathrm{current}}\) is the objective function value of the current solution, \(f_{\mathrm{new}}\) is the objective function value of the new solution, and \(T_{k}\) is the current temperature. If a new solution \(f_{\mathrm{new}}\) improves the objective function (e.g., reduces total power consumption), the cooling rate is increased to \(\alpha_{\mathrm{improvement}}=\alpha\times 1.05\). This accelerates convergence by favoring exploitation of the current promising region. If a new solution deteriorates (\(f_{\mathrm{new}}\geq f_{\mathrm{current}}\)), the cooling rate is decreased to \(\alpha_{\mathrm{deterioration}}=\alpha\times 0.95\). This encourages exploration by maintaining a higher temperature for longer, preventing premature convergence. The probability of accepting worse solutions is governed by \(P_{\mathrm{accept}}=\exp\Bigl{(}\frac{f_{\mathrm{current}}-f_{\mathrm{new}}}{ T_{k}}\Bigr{)}\). A threshold \(P_{\mathrm{accept}}\geq 0.1\) is enforced to ensure meaningful exploration. If \(P_{\mathrm{accept}}\) falls below this threshold, the temperature is temporarily reset to \(T_{k+1}=1.2T_{k}\) to revive exploration. The diversity of solutions is tracked using the coefficient of variation (CV) of the objective function values over the last 100 iterations. If \(CV<0.01\) (indicating stagnation), the cooling rate is reduced to prolong exploration (\(\alpha_{\mathrm{k}}=\alpha\times 0.9\)). The adaptive rules are derived from the trade-off between exploration and exploitation, where \(\alpha=0.999\) is the baseline cooling rate. This ensures that the algorithm spends more time in regions with improving solutions while periodically exploring non-promising areas to avoid local optima. The proposed adaptive cooling rate mechanism allows SA to dynamically adjust its exploration-exploitation trade-off based on real-time feedback (e.g., predicted CSI changes), making it highly suitable for time-varying PLC channels. To validate the effectiveness of our parameter selection, we compared the performance of the simulated annealing algorithm with other optimization techniques, such as GA and PSO. The results showed that the simulated annealing algorithm, with the chosen parameters, achieved a better balance between exploration and exploitation, leading to more robust and reliable solutions. Specifically, the adaptive cooling rate mechanism allowed the algorithm to outperform GA and PSO in terms of convergence speed and solution quality, particularly in complex and dynamic channel conditions. Compared to population-based methods (e.g., GA, PSO), SA requires fewer computational resources per iteration, which is advantageous for real-time optimization in resource-constrained PLC systems. This will also be reflected in the final experimental results and conclusions. 5. Iterative Optimization and Relay Selection: Set the minimum capacity requirement, minimum rate requirement, and maximum bit error rate requirement for communication. Use the heuristic optimization algorithm for iterative optimization to select the power allocation that meets the requirements. Choose the most suitable relay node based on the optimization results.