# 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 relay node \(u_{r}\) transmits the decoded signal \(\hat{x}_{BS}(t)\) on the uplink sub-band \(f_{u}\) to the next receiving node \(u_{t}\). The received signal at the receiving node \(u_{t}\) is:  
\[y_{2}^{(u)}(t)=\sum_{i=1}^{K_{u}}h_{r,t}^{(u)}\sqrt{b_{i}p_{r}}\hat{x}_{BS}(t) A_{rt}^{(u)}(d_{rt},f)+n_{2}^{(u)}(t) \tag{16}\]  
where \(h_{r,t}^{(u)}\) is the channel gain from the relay node \(u_{r}\) to the receiving node \(u_{t}\) on the uplink sub-band \(f_{u}\), \(n_{2}^{(u)}(t)\) is the noise on sub-band \(f_{u}\) and \(b_{i}\) is the power allocation factor satisfying \(\sum_{i=1}^{K_{u}}b_{i}=1\). The received signal at the receiving node \(u_{t}\) is \(y_{2}^{(u)}(t)\), and the final decoded signal is \(\hat{x}_{BS}(t)\). At this point, the SINR in the downlink is:  
\[\text{SINR}_{1}=\frac{a_{j}P_{S}\big{|}h_{BS,r}^{(d)}|^{2}}{N_{1}} \tag{17}\]  
where \(P_{S}\) is the transmission power of the signal source, and \(N_{1}\) is the noise power received at the relay node \(u_{r}\). The channel capacity of the relay node \(u_{r}\) is given by:  
\[C_{1}^{(d)}=B_{d}\text{log}_{2}(1+\text{SINR}_{1})=B_{d}\text{log}_{2}\left(1+ \frac{a_{j}P_{S}\big{|}h_{BS,r}^{(d)}|^{2}}{N_{1}}\right) \tag{18}\]The SINR for the uplink is given by:  
\[\text{SINR}_{2}=\frac{b_{i}P_{r}\Big{|}h_{r,t}^{(u)}|^{2}}{N_{2}} \tag{19}\]  
where \(P_{r}\) is the transmission power of the relay node \(u_{r}\), and \(N_{2}\) is the noise power at the receiving node \(u_{t}\). The channel capacity of the uplink from the relay node to the receiving node is given by:  
\[C_{2}^{(u)}=B_{u}\text{log}_{2}(1+\text{SINR}_{2})=B_{u}\text{log}_{2}\left(1+ \frac{b_{i}P_{r}\Big{|}h_{r,t}^{(u)}|^{2}}{N_{2}}\right) \tag{20}\]  
In this step, we obtained the channel state and other information before and after enabling the relay, providing data and model support for subsequent optimization. With the preliminary data, we begin constructing the optimization objective function and constraints. The problem is simplified to minimize total power consumption while ensuring system communication quality. The total channel capacity, denoted as \(C_{total}\), is the sum of the uplink and downlink capacities, with a minimum requirement \(C_{min}\). Objective Function:  
The objective function is to minimize the system's total power consumption. It is expressed as:  
\[\text{min}\Big{(}\sum_{i=1}^{N}P_{i}+P_{s}+\sum_{j=1}^{M}P_{j}\Big{)} \tag{21}\]  
where \(P_{i}\) is the power consumption of the \(i\)-th relay, and \(N\) is the number of relays. \(P_{j}\) is the power of users not relaying, and M is their number. The objective function balances two goals: minimize relay/user power \(P_{i}\) to reduce energy costs, and ensure source power \(P_{s}\) meets baseline coverage. Constraints:  
Ensure that the uplink and downlink capacities meet the minimum requirements:  
\[C_{S,r}^{(d)}=B_{d}\text{log}_{2}\left(1+\frac{P_{s}\Big{|}h_{S,r}^{(d)}|^{2} }{N_{1}}\right)\geq C_{min} \tag{22}\]  
\[C_{r,t}^{(u)}=B_{u}\text{log}_{2}\left(1+\frac{P_{r}\Big{|}h_{r,t}^{(u)}|^{2} }{N_{2}}\right)\geq C_{min} \tag{23}\]  
The power allocated to each relay and non-relay user must be non-negative. This constraint ensures that all power values are feasible and practical for the communication system. The non-negative power constraints are:  
\[ \begin{split} P_{S}&\geq 0\\ P_{r}&\geq 0\end{split}  \tag{24}\]  
The system must ensure that the bit error rate (BER) is within a certain acceptable range to maintain communication quality. This constraint ensures that the communication link is reliable and meets the quality of service (QoS) requirements:  
\[BER\leq BER_{max} \tag{25}\]where \(BER\) is the bit error rate and \(max\) represent the maximum allowable bit error rate. The data rate for each user should meet the minimum requirement:  
\[R_{i}\geq R_{min},\forall i \tag{26}\]  
The relay's position must ensure it is one of the users and is capable of communicating with others to facilitate proper decoding and forwarding.