How to do power allocation in NOMA? (with fairness to far/weak user)
Next post: NOMA with more than two users
Power allocation is very important in non orthogonal multiple access (NOMA). In the previous post "Does power allocation affect NOMA?", we saw how the bit error rate (BER) of NOMA has a strong relationship with the values of power allocation coefficients.
We used fixed power allocation till now. That is, we fixed the values of
$\alpha_1$ and $\alpha_2$ irrespective of the channel conditions. But there
are better ways to optimize $\alpha_1$ and $\alpha_2$ dynamically based on the
values of channel state information (CSI).
There are a few different dynamic power allocation schemes each trying to
accomplish a specific goal. The goal could be maximizing the sum rate,
maximizing the energy efficiency, etc., The power allocation scheme we are
going to see in this post is a simple one whose goal is to provide user
fairness. Let's call this fair power allocation scheme (fair PA, in
short).
Our fair PA gives priority to the weak/far user. That is, the power allocation
coefficients are calculated such that the far user's target rate is met. Only
after meeting the target rate of far user, all the remaining available power
is allocated to the near user. Let's go ahead and derive the power allocation
coefficients to meet this specification.
NOMA Capacity Equations
As we saw in
this post, the capacity equations for NOMA
far user and near user can be written as follows:$$R_f =
log_2(1+\dfrac{|h_f|^2P\alpha_f}{|h_f|^2P\alpha_n+\sigma^2})$$ $$R_n =
log_2(1+\dfrac{|h_n|^2P\alpha_n}{\sigma^2})$$ $R_n$ is obtained after removing the interference from far user transmission by successive interference cancellation (SIC).
- $\alpha_n$ - power allocation coefficient for near user
- $\alpha_f$ - power allocation coefficient for far user
- $h_n$ - Rayleigh fading coefficient for near user
- $h_f$ - Rayleigh fading coefficient for far user
- $P$ - Total transmit power
- $\sigma^2$ - Noise power
- $\alpha_n + \alpha_f = 1$
- $\alpha_f \gt \alpha_n$
Derivation of power allocation coefficients $\alpha_n$ and $\alpha_f$
Let $R^*$ denote the target rate of far user. Our goal is to choose $\alpha_n$
and $\alpha_f$ such that $R_f \geq R^*$.
Let's set $R_f = R^*$.
$$log_2(1+\dfrac{|h_f|^2P\alpha_f}{|h_f|^2P\alpha_n+\sigma^2}) = R^*$$ First,
let's remove the $log_2$ by taking $2^x$ on both sides.
$$1+\dfrac{|h_f|^2P\alpha_f}{|h_f|^2P\alpha_n+\sigma^2} = 2^{R^*}$$
$$\dfrac{|h_f|^2P\alpha_f}{|h_f|^2P\alpha_n+\sigma^2} = 2^{R^*} - 1$$ Let's
denote $\xi = 2^{R^*} - 1$.
$\xi$ is the target SINR for the far user who has target rate $R^*$.
$$\dfrac{|h_f|^2P\alpha_f}{|h_f|^2P\alpha_n+\sigma^2} = \xi$$
$$|h_f|^2P\alpha_f = \xi|h_f|^2P\alpha_n + \xi\sigma^2$$ Since $\alpha_n +
\alpha_f = 1$, $\alpha_n = 1 - \alpha_f$. $$|h_f|^2P\alpha_f = \xi|h_f|^2P(1 -
\alpha_f) + \xi\sigma^2$$ $$|h_f|^2P\alpha_f = \xi|h_f|^2P -
\xi|h_f|^2P\alpha_f + \xi\sigma^2$$ Collecting all the $\alpha_f$ terms to the
LHS, $$|h_f|^2P\alpha_f + \xi|h_f|^2P\alpha_f = \xi|h_f|^2P + \xi\sigma^2$$
$$\alpha_f|h_f|^2P(1 + \xi) = \xi(|h_f|^2P + \sigma^2)$$ $$\alpha_f =
\dfrac{\xi(|h_f|^2P + \sigma^2)}{|h_f|^2P(1 + \xi)}$$ We don't want $\alpha_f$
to exceed 1. So let's set a limit as, $$\alpha_f = min(1, \dfrac{\xi(|h_f|^2P
+ \sigma^2)}{|h_f|^2P(1 + \xi)}$$ Once $\alpha_f$ is computed using the above
equation, we can easily calculate $\alpha_n$ as, $$\alpha_n = 1 - \alpha_f$$
That's it! We have derived the power allocation coefficients for our dynamic
power allocation scheme, fair PA. Next, let's see how our fair PA performs.
MATLAB Simulation Results
Let's see some interesting plots, comparing the performances of fixed PA and
fair PA. First, let's compare the outage performance of fixed and fair PA
schemes.
When we plot the outage probabilities as a function of far user's target
rate ($R^*$), we get this plot. Here, we have fixed the total transmit power
as 30 dBm. Also, to get the outage probability, we have set the same target
rate for both near and far users. (You can download the MATLAB code here)
Fig. 1: Outage vs Target rate for fixed and fair PA
We can immediately see that fixed PA is performing very poorly and its
outage probability saturates to 1 all the time when $R^* \gt 1.5$ bps/Hz. In
other words, the receiver is ALWAYS in outage if we use fixed PA with $R^*
\gt 1.5$ bps/Hz. This is because, fixed PA neither exploits the
instantaneous CSI, nor takes the target rate requirements into account.
Thus, fixed PA, although simple to implement, is not so good after all.
But our fair PA has lower outage probability because $\alpha_n$ and
$\alpha_f$ and dynamically adjusted based on target rate requirement and CSI.
In our fair PA, we can see that the outage of far user increases gradually
as his target rate requirement increases. This is expected because, as the target rate
becomes higher and higher, the chances of far user achieving that target
rate becomes lower and lower. This would lead to increase in its outage
probability.
The outage of near user shows quite a sharp transition around $R^*$ values
of 4 to 7 bps/Hz. And beyond that, the near user is always in outage. This
is still better than fixed PA, but why does this happen? Can we do
something to reduce the near user's outage further?
We did come up with a better power allocation than fixed PA. But can we improve our fair PA further?
Problems with our fair PA scheme
The far user has a weak channel with the BS. When we did the limiting
operation, $$\alpha_f = min(1, \dfrac{\xi(|h_f|^2P + \sigma^2)}{|h_f|^2P(1
+ \xi)}$$ what we actually did was, whenever $\alpha_f$ was calculated to
be greater than 1, we limited $\alpha_f$ to be equal to 1.
For example, if we get $\dfrac{\xi(|h_f|^2P + \sigma^2)}{|h_f|^2P(1 + \xi)}
= 50$, we set $\alpha_f = min(1,50) = 1$.
But what does $\dfrac{\xi(|h_f|^2P + \sigma^2)}{|h_f|^2P(1 + \xi)} = 50$
mean? This means that only if we set $\alpha_f = 50$, we will be able to
meet the far user's targe rate $R^*$.
In that case, limiting $\alpha_f$ to 1 does not help. Because, any value of
$\alpha_f \lt 50$ will lead to the outage of far user.
In other words, when $\dfrac{\xi(|h_f|^2P + \sigma^2)}{|h_f|^2P(1 + \xi)}
\gt 1$, even if we allocate the entire power to the far user (i.e.,
$\alpha_f = 1$), he will still be in outage.
Another consequence is, by setting $\alpha_f=1$, we are
automatically setting $\alpha_n = 0$, which is bad because now the near user
is also in outage since we are not allocating any power to him at all.
Let's tweak our fair PA further
To address this problem, let's add a simple tweak our fair PA.
Whenever $\dfrac{\xi(|h_f|^2P + \sigma^2)}{|h_f|^2P(1 + \xi)}$ exceeds 1,
instead of limiting $\alpha_f$ to 1, let's set $\alpha_f = 0$. Which
automatically sets $\alpha_n = 1$.
Will setting $\alpha_f=0$ affect the far user's outage? NO. Because even
by setting $\alpha_f = 1$ (allocating him the entire power), we cannot
bring him out of outage. So why bother wasting all the power on him?
After adding this little tweak, our fair PA shows an interesting outage
trend. (Download the MATLAB code here)
Fig. 2: Outage vs Target rate for fixed and improved fair PA
Outage of far user follows the trend that we saw in Fig. 1. This indicates that our tweak of setting $\alpha_f = 0$, when required, did not affect the outage of far user at all. Now let's look at
the graph of near user's outage. The outage probability increases, peaks
and then starts to decrease. Why do we observe this trend?
When $R^*$ lies in the range of 0 to 6.5 bps/Hz, it looks like we
are favoring the far user by allocating more and more power to him, at the
cost of sacrificing the performance of near user. But beyond 6.5 bps/Hz,
any value of $\alpha_f$ may not fully satisfy $R^*$. When this happens, we
favor the near user, instead of wasting all our power on the far user.
This leads to a decrease in the outage of near user, for $R^* \gt 6.5$ bps/Hz, without affecting the outage of far user, which is a good
thing.
Next, let's compare the sum rate of our improved fair PA with fixed PA
that we have been using so far. By sum rate, we mean $R_n + R_f$. When
we plot the sum rate as a function of transmit power, we will get a
graph like this. (Download the MATLAB code here)
Fig. 3: Sum rate vs transmit power of fixed and fair PA
We can clearly see that our fair PA outperforms fixed PA in terms of achievable capacity.
Conclusion
We know that the wireless channel is extremely dynamic in nature. Fixed PA does not worry about the instantaneous channel conditions of users. Whatever be channel condition, $\alpha_n$ and $\alpha_f$ are fixed. But our fair PA is a dynamic scheme. That is, whenever the channel changes, the values of $\alpha_n$ and $\alpha_f$ are updated to meet the specification. That's why fair PA is able to achieve higher sum rate and lower outage than fixed PA.References:
- "The impact of power allocation on cooperative non-orthogonal multiple access with SWIPT", Z. Yang, Z. Ding, P. Fan and N. Al-Dhahir, IEEE transactions on wireless communications, vol.6, no.7, July 2017
- F. Kara, H. Kaya, BER Performances of Downlink and Uplink NOMA in the Presence of SIC Errors over Fading Channels. IET Communications. Vol. 12, no. 15, pp. 1834-1844.
Hey Joe, I cant seem to download your MATLAB codes. It is giving me 403 error
ReplyDeleteThanks for notifying Amit. I rectified the problem. It is downloadable now.
DeleteHello Joe,
Deleteaccording to Rf >=R* , we are going to get αf should be less than 50 , i think so to avoid outage probability for far user.
can you please check the condition once and clear my query ?
HELLO joe,Can you provide a MATLAB code for analyzing the energy efficiency of three Norma users? The x-axis represents the transmission power, and the y-axis represents bits/joule
DeleteI noticed that the code for the 'tweaked' fair PA still gives the previous plot not the tweaked one. Can you look at it?
ReplyDeleteHi Amit,
DeleteThe code has two sections named "basic fair PA" and "improved fair PA". You can comment the "basic fair PA" lines and un-comment the "improved fair PA" lines to get the improved plot.
Anyways, to avoid confusion, I will make these changes and re-upload the code. Thank you.
Thanks for all of the explanations that you gave us here. Do you have or know some link to any Matlab code relating to the calculus of SINR in the NOMA scenario?
ReplyDeleteHi Fabio,
DeleteThe SINR calculation of NOMA is explained in this post:
https://ecewireless.blogspot.com/2020/04/how-to-simulate-ber-capacity-and-outage.html
Here is a sample code for SINR calculation
https://drive.google.com/file/d/1dvx4T_4hMyJhbR_bsoN4hHEqaMFVqQtc/view?usp=sharing
Hope this helps
DO you have code related with swipt noma and improvement on spectral efficiency using NOMA
ReplyDeleteYes. Ping me electronicswithme@gmail.com. I'll send it
Deleteplz if you have a matlab code related with swipt noma and improvement on spectral efficiency using NOMA, plz send it to me , it will be so helpful in my work (m_bairakdar@yahoo.com)
Deletesir what if we allocate POWER dynamically and increase the no of user to 10
ReplyDeleteHi Mubasher, yes we can increase the number of users. There are many dynamic power allocation schemes for NOMA with more than two users, but the interference and SIC complexity would be the challenges there (as explained in this post https://ecewireless.blogspot.com/2020/06/single-carrier-noma-sc-noma-how-good-is_15.html)
DeleteHello Joe firtly thanks for the valiable infromations really i do appreciate it , another thing the link it doesn't have existing page could you check it please , case that we have more than two users
DeleteHi, glad to know you found the blog useful. I checked the links and they are working for me. So, I'm not sure where the problem is. So I am sharing the links for multi-user NOMA here.
Deletehttps://ecewireless.blogspot.com/2020/06/single-carrier-noma-sc-noma-how-good-is_15.html
https://ecewireless.blogspot.com/2020/06/ber-of-3-user-non-orthogonal-multiple.html
hope this helps..
kindly check the code i have email you and please tell me the possible errors thanks.
ReplyDeletePlease help me regarding the Matlab code of users clustering with orthogonal sub-carrier allocation to cluster in NOMA.
ReplyDeleteHi Umar, right now I dont have the code for user clustering, but we will see about that in a future post. If you already have the code and want clarification about it, please mail it to me at electronicswithme@gmail.com. I will take a look at it and let you know
DeleteHey Umar,can you please send me the code of users clustering with orthogonal sub-carrier allocation to cluster in NOMA?If yes,please mail me at kaushiktez97@gmail.com.
DeleteHi, do you have any code for MIMO-NOMA?
ReplyDeleteHi Thomas, I don't have code for MIMO-NOMA right now..
DeleteWe will see about that in a future post..
Can you send the paper you have referred for this power allocation strategy please...
ReplyDeleteHi, the strategy described in this post is a modified version of the one described in section IV(A) of this paper:
Delete"The impact of power allocation on cooperative non-orthogonal multiple access with SWIPT", Z. Yang, Z. Ding, P. Fan and N. Al-Dhahir, IEEE transactions on wireless communications, vol.6, no.7, July 2017
Hi Joe, Can you send papers related to the different power allocation algorithms for down link NOMA. Thanks in advance .. sreenu.sunkaraboina@gmail.com
ReplyDeletesure!
DeleteThis comment has been removed by the author.
DeleteHi Joe, As you already have papers related to the different PA, Can you also send it to me?
DeleteHi Sachin, sure, if you could share your mail id or just ping me at electronicswithme@gmail.com and I would send it to you.
DeleteHi Joe,if you have any code related to other power allocation algorithm please send me at mail id-- kaushiktez97@gmail.com
DeleteHi Joe. Do you have any paper related to Opportunistic Power allocation in cluster based NOMA?
ReplyDeleteHi, I have papers related to cluster based NOMA
ReplyDeletehi joe ,do you have code related to cluster based NOMA?
DeleteIf you have sample code please send to me..sreenu.sunkaraboina@gmail.com
can you please mail them to griya17081998@gmail.com ?
DeleteAlso if there's any code available it would be a great help.
Thank you.
Dear joe,
ReplyDeletePlease help me about all refences that related above or any paper to understand equations for PA ,please...,my mail ki.su01994@gmail.com
Hi Kinanaa, you can refer the following paper : "The impact of power allocation on cooperative non-orthogonal multiple access with SWIPT", Z. Yang, Z. Ding, P. Fan and N. Al-Dhahir, IEEE transactions on wireless communications, vol.6, no.7, July 2017
Deletewhat did u mean by (((All the remaining available power is allocated to the near user )))
ReplyDeletei think that is wrong
in NOMA we give near user what he need and all the remaining available power is allocated to the Far user , Is that right or no ?
plz reply to me bro
Thanks
Hi Abdelrahim, May I know why you think that is wrong?
DeleteLet's say you give the near user all the power that he needs. It is possible for the near user to enter into deep fade (due to instantaneous fluctuations in channel gain). In that case, would you allocate high percentage of power to the near user? If the near user's power dominates, how will the far user be able to perform direct decoding to retrieve his own signal?
There are many power allocation strategies in NOMA. The strategy decsribed here is called CR-D-NOMA in the literature. Please go through the papers given in the reference section.
hi Joe
ReplyDeletecan i ask why u write in the line 28
a1(a1>1) = 0;
Hi Joe
ReplyDeletecan u plz tell me why in fig3 code ( Sum rate vs transmit power of fixed and fair PA)
u write in line 28
a1(a1>1) = 0;
i dont understand this
Plz help me to understand bro
Thnaks
Hi Abdelrahim, that's where the improved fair PA is implemented. It's explained in the "Let's tweak our fair PA further" section of this post.
DeleteWhy aaf is array ? I thinks aaf is a single value ?
ReplyDeleteIf I simulation BER, I get error because that.
Thanks you! I hope you reply soon!
Hi Nguyen, aaf is calculated for every instance of channel realization. Hence, it is a vector in this code. To rectify your error please check if you've performed component-wise multiplication of aaf and aan with the data. Otherwise, it will show dimension mismatch error
DeleteHope this helps
Thanks you so much! I fixed that. I simulated SIC and BER base power allocation to find af and an. I want to know can i find aaf, aa...,...., aan for multiple users ? Thanks you!
DeleteHi Nguyen,
DeleteThis is one approach to calculate power allocation for multiple users
a1 = 0.8 (or 0.75);
a2 = (1 - a1)*a1;
a3 = (1 - (a1+a2))*a1;
a4 = (1 - (a1+a2+a3))
Here User 1 is the farthest user and User 4 is the nearest user
This can be extended to more than 4 users also.
Hope this helps
Hope this helps
Thanks Joe!
DeleteHi Joe, do you have a code with outage probability vs SNR for NOMA?
ReplyDeleteHi Education For All,
DeleteSNR vs Outage for cooperative NOMA is available in this post:
https://ecewireless.blogspot.com/2020/04/how-does-user-cooperation-help-noma.html
hope this helps
hello Mr.Joe
ReplyDeletehow can we do 3 and 4 users in Sum rate vs transmit power of fixed and fair PA
Hi Abdelrahim, you can accomodate multiple users by incorporating multi-carrier NOMA transmission, where two users are grouped together in a carrier.
DeleteFor example, refer this paper:
"Power allocation strategies for non-orthogonal multiple access" M. M. El-Sayed et al., International conference on selected topics in mobile & wireless networking, 2016
Hi Joe, do you have a code with SNR vs outage probability for NOMA for far and near user for the above case?
ReplyDeleteHi, you can add a line in the code: SNR = Pt - No
DeleteAnd then plot SNR vs outage.
Epsilon is also SNR
DeleteHi Joe, for the last graph what changes can we make to make it a SNR vs outage probability graph
ReplyDeleteHi Education For All, you can add a line in the code: SNR = Pt - No
DeleteAnd then plot SNR vs outage.
Hi, Joe. Do you have codes for user pairing?
ReplyDeleteHi Intelligent Discussion, I don't have the code right now. But I'm planning on making a post about user pairing soon!
DeleteHi.joe.can u suggest some more algorithms for power allocation which are adaptive and new?
ReplyDeleteHi, you can refer this paper for some power allocation techniques in NOMA:
Delete"The impact of power allocation on cooperative non-orthogonal multiple access with SWIPT", Z. Yang, Z. Ding, P. Fan and N. Al-Dhahir, IEEE transactions on wireless communications, vol.6, no.7, July 2017
Hi Joe!
ReplyDeleteWonderful work. I have a question though, why havent you included Bandwidth in rate calculation. As per my understanding R = Bandwidth *log2(1+SINR). Am I missing something> Kindly guide me. I will be grateful.
Hello, I am a graduate student I have a project based on NOMA - 5G, I have difficulty implementing the PF waterfilling algorithm for the inter-sub-band and intra-sub-band power allocation in NOMA.
ReplyDeleteThanks for your help
thanks for info!
ReplyDeleteWirelessecall
thanks for info!
ReplyDeleteWirelessecall
nice blog!
ReplyDeletehttps://ecewireless.blogspot.com/2020/05/how-to-do-power-allocation-in-noma-with.html
Hello JOE,
ReplyDeleteI'm tried to reach on Gmail, but it seems my massages didn't get you.
I'm trying to write a code for MIMO-NOMA and NOMA using fairness PA coefficients, I would appreciate your help, because I got some errors.
Hi Lina,
DeleteSorry for the late reply, I was out of town. I mailed you the corrected codes just now
Hi Joe, can you please help me as well?
Deleteyour posts help me a lot Joe!thanks a lot and long live!
ReplyDeletehi Socrates, i see you are greek as me so i got the courage to ask. I am trying to do my thesis in NOMA and i am quite struggling with it. Are you reading NOMA for the same reason? Maybe we can help each other.
DeleteHi joe, please help me with your email address so that I can keep in touch with you. I have a code I want you to help analyze. Thank you.
ReplyDeleteMy email is Chekwas@engineer.com
Hi Engr.Chekwas, you can find me at electronicswithme@gmail.com
DeleteHi, your work is clear and helpful. I was wondering, how can we obtain the expressions to extend power allocation for multiple users? If you have further codes/references in this matter, please forward them to me (mcfm.uns@gmail.com). Thank you in advance.
ReplyDeleteHi, can you help me with water filling algorithm for multi carrier NOMA? Right now, the alloted power is going out of range, and I am not getting why? I can send you the code if you can help.
ReplyDeletecan NOMA be applied when power is equal for each user?
ReplyDeleteplease, does NOMA be applied when power is equal or the distance is equal?
ReplyDeleteHi said,
DeleteUsually NOMA performs better when the channel conditions of the users are distinct.
Equal power = transmission with equal power is possible in uplink NOMA if the distances are different
Equal distance = Possible in downlink, but different power levels is MUST in this case
First, I would like to thank you for the blog postings on wireless communications and 5G.
ReplyDeleteI really appreciate your work. You have spent a good hard time from your busy schedule to
describe NOMA and SIC concepts along with matlab codes in several of your posts in a simple and understandable manner.
These posts are especially useful for readers/researchers like us who want to learn about the concepts.
I need your help in understanding how SIC differs from network coding.
a) What are the steps/operations followed in SIC and Network coding? How do both differ and are comparable?
b) If (any)matlab code on network coding and SIC, would you like to share with me.
I would highly appreciate it, if you could help me with some codes.
Hi Joy! Your codes and explanations are really helpful. Thank you so much!
ReplyDeleteHow to calculate the power allocation coefficients for three users? i.e. 1. When the coefficient of the far user is greater than 1, should I choose to discard the far user and allocate all the power to the medium user and the near user? 2. In the loop of outages, should I consider R2-3 and R1-2?
Looking forward to your reply!