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,igi,iiN

3: repeat

4:     Set q=r/PCE

5:     j1

6:     repeat

7:         poldp(j1)

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:         jj+1

14:     until p(j)pold<ϵ

15:     Update r and PCE with p

16: untilrqPCE<ϵ