Skip to main content
. 2022 Feb 2;22(3):1129. doi: 10.3390/s22031129
Algorithm 1 Beam-forming Algorithm for A Given Cluster
  • Require: 

    Un

  • Ensure: 

    Φ

  • 1:

    Initialize T, η.

  • 2:

    Yn = Ø, Sn = Ø, Rn = Ø.

  • 3:

    Randomly initialize Φ.

  • 4:

    gpre← the gradient of f at Φ.

  • 5:

    Calculate the updating direction y= −gpre.

  • 6:

    Obtain the optimal step size μ based on the Armijo rule.

  • 7:

    yμy, ΦΦ+y.

  • 8:

    gcur← the gradient of f at Φ.

  • 9:

    sgcurgpre.

  • 10:

    ρyHs.

  • 11:

    while  gcurη  do

  • 12:

       gpregcur.

  • 13:

       Insert y to Yn.

  • 14:

       Insert s to Sn.

  • 15:

       Insert ρ to Rn.

  • 16:

       L← the number of the elements in Yn.

  • 17:

       if L>T then

  • 18:

         Pop the first element in Yn.

  • 19:

         Pop the first element in Sn.

  • 20:

         Pop the first element in Rn.

  • 21:

         LL1.

  • 22:

       end if

  • 23:

       (Back Propagating)

  • 24:

       for i = L:−1:1 do

  • 25:

         s the i-th element in Sn.

  • 26:

         y the i-th element in Yn.

  • 27:

         ρ the i-th element in Rn.

  • 28:

         χiρsHgcur.

  • 29:

         gcurgcurχiy.

  • 30:

       end for

  • 31:

       (Forward Propagating)

  • 32:

       resgcur.

  • 33:

       for i = 1:L do

  • 34:

         s the i-th element in Sn.

  • 35:

         y the i-th element in Yn.

  • 36:

         ρ the i-th element in Rn.

  • 37:

         βiρyHres.

  • 38:

         resres+(χiβi)s.

  • 39:

       end for

  • 40:

       y=res.

  • 41:

       steps (6)–(10)

  • 42:

    end while