# A Relay Optimization Method for NOMA-Based Power Line Communication Systems
## 3 Optimization Process and Performance Analysis
### Uplink from Relay Node to Other Users
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Component** &
\begin{tabular}{c} **Computing Complexity** \\ **(Big-O)** \\ \end{tabular} & **Single Execution Time** & **Memory Usage (MB)** \\ \hline LSTM Prediction & \(O\big{(}T\times N_{h}^{2}\big{)}\) & \(\approx\)5 min & 320 \\ \hline LSTM inference (single) & \(O(N_{h})\) & 0.8 ms & 5 \\ \hline SA (Single iteration) & \(O\big{(}N^{2}\big{)}\) & 0.42 ms (5 users) & 20 \\ \hline GA (Single iteration) & \(O(N\times P)\) & 1.25 ms (P = 50) & 45 \\ \hline PSO (Single iteration) & \(O(N\times S)\) & 0.98 ms(S = 30) & 35 \\ \hline \hline \end{tabular}  
* T is the LSTM time step, and P and S are the population sizes of GA and PSO. The measured data are implemented based on Python 3.7, and GPU acceleration is not enabled. Assume that the system needs to update the power allocation and relay selection every 500 ms (corresponding to the PLC channel coherence time [1]). At this time, the training stage of LSTM obviously does not meet the time requirements. As a deep learning model, the training stage of LSTM requires a lot of computing resources, while the reasoning stage is relatively fast and can meet the usage requirements. SA optimization requires about 800 iterations for convergence (Figure 11), which takes 336 ms in total, meeting the time requirement. The other two optimization algorithms take more time than required. However, it should be noted that in the face of large-scale users, such as more than 50 users mentioned above, the improved SA algorithm will not meet the time requirements. In this case, a clustering approach can be used to reduce the time spent optimizing the process, which will greatly increase the ability of the optimization to meet the time requirements. In a real-world deployment, if the channel changes faster than the optimization period (such as a factory PLC pulse noise burst), the non-convergent SA solution will lead to an increased probability of outages. So, while the SA-LSTM framework performs well in terms of energy efficiency and capacity, its computational complexity limits real-time deployment. Future work needs to be combined with distributed optimization to meet stringent latency requirements with acceptable performance losses.  
\end{table} 
Table 4: Each module computes overhead quantization. In the measured environment, the channel gain decreases and the impact noise appears more frequently. As reflected in the results, the hardware implementation introduced a 9-15% performance degradation compared to the simulation due to unmodeled electromagnetic interference from household appliances. However, the optimized system still achieved a 28% power reduction and a 14.5% throughput improvement compared to the non-optimized test bed configuration. Overall, the optimization was effective, with total power significantly reduced through the improved simulated annealing algorithm. The signal source power and user power allocation became more reasonable. The final SINR and CSI values met the constraints, ensuring system performance. User 2 was selected as the relay user, likely due to its better CSI, effectively enhancing system performance. This experiment demonstrated the effectiveness of the improved simulated annealing algorithm in optimizing power allocation and relay user selection, verifying the rationality and stability of the optimization results.