Skip to main content
. 2023 Oct 4;23(19):8245. doi: 10.3390/s23198245
Algorithm 1 Proposed MGF-NOMA and SGF-NOMA
  • 1:

    Input:R, O{MS,MM}, D{UL,DL}

  • 2:

    sObtain SRS from UEs

  • 3:

    UDetermine active set of UEs

  • 4:

    NUR                          // Determine maximum cluster size

  • 5:

    CR                             // Determine number of clusters

  • 6:

    if D=UL then

  • 7:

        ISortDescend(su,u)                        // UE ordering for UL

  • 8:

    else

  • 9:

        ISortAscend(su,u)                        // UE ordering for DL

  • 10:

    end if

  • 11:

    UnI{(n1)R+1:nR},n[1,N]                  // Form UE partitions

  • 12:

    CrU1{r},r                              // Initialize clusters

  • 13:

    for n=1:N-1 do                          // Iterative UE admission starts

  • 14:

        Ani=n+1NUn                      // Initialize admission awaiting UEs

  • 15:

        QnEvalCostMatrix(p,Cr,An)

  • 16:

        if O=MS then                         // Max–Sum Rate Assignment

  • 17:

            fr,χLinear Sum Assignment(Qn)

  • 18:

        else if O=MM then                        // Max–Min Rate Assignment

  • 19:

            fr,χLinear Bottleneck Assignment(Qn)

  • 20:

        end if

  • 21:

        CrCrAn{j},χ[r,j]=1,r,j                    // Update clusters

  • 22:

    end for

  • 23:

    lrL(Cr+1),r                          // Update cluster levels

  • 24:

    ωrW(Cr+1),r                         // Update cluster weights

  • 25:

    UEj(r,lr[j]),UEjCr,j,r                      // Send RARs out

  • 26:

    return fr, Cr, lr, ωr

  • 27:

    procedure EvalCostMatrix(p,Cr,An)

  • 28:

        for i=1:R do

  • 29:

            for j=1:An do

  • 30:

               TrCrAn{j}                       // Admit jth UE of An to Cr

  • 31:

               if D=UL then

  • 32:

                   lL(n+1)                        // power levels as per (7)

  • 33:

                   if O=MS then

  • 34:

                       Qn[i,j]kTrBlog2(1+γrk(l))

  • 35:

                   else if O=MM then

  • 36:

                       Qn[i,j]minkTrBlog2(1+γrk(l))

  • 37:

                   end if

  • 38:

               else if D=DL then

  • 39:

                   ωW(n+1)                       // power weights as per (9)

  • 40:

                   if O=MS then

  • 41:

                       Qn[i,j]kTrBlog2(1+γrk(ω))

  • 42:

                   else if O=MM then

  • 43:

                       Qn[i,j]minkTrBlog2(1+γrk(ω))

  • 44:

                   end if

  • 45:

               end if

  • 46:

            end for

  • 47:

        end for

  • 48:

    return Qn

  • 49:

    end procedure

  • 50:

    procedure Linear Sum Assignment(Qn)

  • 51:

        χmaxχi,jQn[i,j]χ[i,j]

  • 52:

               s.t.iχ[i,j]1,jχ[i,j]=1

  • 53:

    return χ

  • 54:

    end procedure

  • 55:

    procedureLinear Bottleneck Assignment(Qn)

  • 56:

        χmaxχmini,jQn[i,j]χ[i,j]

  • 57:

               s.t.iχ[i,j]1,jχ[i,j]=1

  • 58:

    return χ

  • 59:

    end procedure