Skip to main content
. 2021 May 4;21(9):3186. doi: 10.3390/s21093186
Algorithm 1 Energy-efficient beamforming and power allocation.

1: Initialize p→(0), λ→, and μ→, randomly

2: Determine wi=gi,i∥gi,i∥, ∀i∈N

3: repeat

4:     Set q→=r→/P→CE

5:     j←1

6:     repeat

7:         p→old←p→(j−1)

8:         for i=1 to N

9:             Compute pi(j) according to (16)

10:             Update λi and μi according to (17) and (18)

11:         end for

12:         p→(j)={p1(j),p2(j),⋯,pN(j)}

13:         j←j+1

14:     until ∥p→(j)−p→old∥<ϵ

15:     Update r→ and P→CE with p→

16: until∥r→−q→P→CE∥<ϵ