Skip to main content
. 2020 Dec 27;21(1):116. doi: 10.3390/s21010116
Algorithm 1: Autonomous power decision.
  • Require:pmaxj=pU, pminj>0j=1,2,,J;

  • Ensure:p
    •  1:
      Each user picks up its spreading sequences.
    •  2:
      Each user selects a random power level pj[pminj,pmaxj].
    •  3:
      The BS detects user signals.
    •  4:
      The BS calculates the optimal power pj,opt.
    •  5:
      The BS compares each user power pj with the nearest power level from pj,opt.
    •  6:
      The BS sends an acknowledgment to each user:
      •  (a)
        If pj,opt=puACK=3
      •  (b)
        If pj>pj,optACK=2
      •  (c)
        If pj<pj,optACK=1
      •  (d)
        If pj=pj,optACK=0
    •  7:
      If the propagation environment is changed, the BS sends a one bit ACK: Stat=1.
    •  8:
      Each user updates its pminj or pmaxj:
      •  (a)
        If ACK=3pj=pu>0
      •  (b)
        If ACK=2pmaxj=pjpU
        • If Stat=1pminj=0
      •  (c)
        If ACK=1pminj=pj>0
        • If Stat=1pmaxj=pU
      •  (d)
        If ACK=0⇒ no update
    •  9:
      Return to Step 2