# A Relay Optimization Method for NOMA-Based Power Line Communication Systems
## 3 Optimization Process and Performance Analysis
### Uplink from Relay Node to Other Users
The sample size in both the training and testing sets should also be sufficiently large and diverse to ensure reliable results. Figure 10 shows the trend of the loss function during the training process. The curves indicate that, as the number of training iterations increases, both training and validation errors gradually decrease and stabilize, reaching approximately 0.0019. The rapid convergence of the training loss suggests high training efficiency and a good match between the data characteristics and model structure. The stable low loss value indicates strong generalization ability of the model, enabling accurate CSI prediction. Overall, by generating data and constructing the LSTM model, we successfully predicted the CSI in the NOMA communication system with satisfactory results. Despite some errors, the model performed well overall and has potential for further optimization. After completing the LSTM model prediction, the improved simulated annealing algorithm was used to optimize the model. To validate the adaptive temperature control mechanism, we compared its performance against fixed cooling rates. Set the cooling rate to 0.95, 0.99, and 0.999. Under identical experimental conditions, the results are summarized in \[\text{BER}_{i}=0.5\cdot\text{erfc}\Big{(}\sqrt{\text{SINR}_{i}}\Big{)} \tag{36}\]6  
\[\text{BER}_{i}=0.5\cdot\text{erfc}\Big{(}\sqrt{\text{SINR}_{i}}\Big{)} \tag{36}\]7 Loss value. As shown in Figure 11, the convergence curve of the improved simulated annealing algorithm is stable after about 800 iterations, and the global search ability is strong, but more iterations are needed. It shows that the improved simulated annealing algorithm is suitable for complex multi-modal problems  
As shown in Figure 12, the fitness curve of genetic algorithm decreases rapidly in the early stage and then falls into local optimal (high total power) in the later stage. The global exploration ability is limited, which may result in low efficiency due to premature convergence. The objective function value of PSO decreases rapidly within the first 50 iterations but fluctuates significantly in the later stages. Figure 13 shows that it is sensitive to parameters and needs to be fine-tuned to avoid vibration. Through the comparison of the three algorithms, the improved SA has the best performance in energy efficiency and power control and is the first choice for resource-constrained scenarios, especially for low-power and high-energy scenarios (such as IoT terminals and battery-powered devices). GA achieves maximum capacity at the cost of high energy consumption, which is suitable for performance-first scenarios. PSO has potential in dynamic environment but needs parameter optimization. SA's ability to accept worse solutions probabilistically prevents premature convergence to suboptimal solutions, a critical feature in non-convex PLC optimization problems. The proposed adaptive cooling mechanism dynamically adjusted exploration-exploitation balance, making SA highly suitable for time-varying PLC channels. Considering the above reasons, the improved SA achieves the satisfaction of scene tasks, which will be further reflected in the subsequent experiments. After using the predicted CSI data for improved simulated annealing optimization, the results are shown in Figures 14-16. \[\text{BER}_{i}=0.5\cdot\text{erfc}\Big{(}\sqrt{\text{SINR}_{i}}\Big{)} \tag{36}\]8 SNR Values for Each User. The SNR values decrease significantly as the user distance increases. The nearest user (User 0) has a very high SNR (>100), while the SNR of distant users gradually decreases. The SNR depends on both the channel gain and power allocation. Since channel gain rapidly decays with distance, the SNR of distant users is severely constrained. This outcome suggests that power allocation optimization should place particular emphasis on distant users to balance system performance. \[\text{BER}_{i}=0.5\cdot\text{erfc}\Big{(}\sqrt{\text{SINR}_{i}}\Big{)} \tag{36}\]9 Power Allocation Optimization.