Optimization Algorithms for Joint Power and Sub-Channel Allocation for NOMA-Based Maritime Communications

This paper investigates resource optimization schemes in a marine communication scenario based on non-orthogonal multiple access (NOMA). According to the offshore environment of the South China Sea, we first establish a Longley–Rice-based channel model. Then, the weighted achievable rate (WAR) is considered as the optimization objective to weigh the information rate and user fairness effectively. Our work introduces an improved joint power and user allocation scheme (RBPUA) based on a single resource block. Taking RBPUA as a basic module, we propose three joint multi-subchannel power and marine user allocation algorithms. The gradient descent algorithm (GRAD) is used as the reference standard for WAR optimization. The multi-choice knapsack algorithm combined with dynamic programming (MCKP-DP) obtains a WAR optimization result almost equal to that of GRAD. These two NOMA-based solutions are able to improve WAR performance by 7.47% compared with OMA. Due to the high computational complexity of the MCKP-DP, we further propose a DP-based fully polynomial-time approximation algorithm (DP-FPTA). The simulation results show that DP-FPTA can reduce the complexity by 84.3% while achieving an approximate optimized performance of 99.55%. This advantage of realizing the trade-off between performance optimization and complexity meets the requirements of practical low-latency systems.


Introduction
The rapid development of the blue economy has created the challenge of constructing intelligent ports and terminals. At the same time, this has led to a significant increase in demand for maritime digital services from offshore users. Compared with traditional satellite communications, shore-based base stations (BS) can provide low-cost, high-speed mobile communications services. Recently, several references have applied fifth-generation (5G) and even sixth-generation (6G) emerging technologies, such as massive multiple-input multiple-output (MIMO) [1], internet of vehicles [2], and mobile edge computing [3] to maritime communications. Considering the limited geographic availability of coastal BS, this paper investigates resource allocation schemes based on non-orthogonal multiple access (NOMA) in 5G. Our contribution is to provide high data rate services for more maritime users (ships and islands) in offshore areas with limited-spectrum resources.
According to previous research, the maritime communication environment is characterized by instability, sparseness, and the evaporation ducting effect [1]. These features make the marine channel model different from the terrestrial channel model. In particular, due to the scarcity of obstructions at sea, the shadow effect hardly affects signal transmission loss. Furthermore, we can neglect the evaporation ducting phenomenon, since offshore communication takes place within the line of sight (LoS) [4]. The fading of the offshore channel can be divided into large-scale fading and small-scale fading [5]. First, it is essential to establish an appropriate large-scale fading model. The radio communications The rest of this paper is organized as follows. In Section 2, we first introduce the improved maritime channel model and system parameters, followed by the construction of a NOMA-based downlink offshore communication system. Section 3 formulates the resource optimization problem with WAR as the objective function. In Section 4, we propose an improved joint optimization scheme on a resource block RBPUA with high computational efficiency. Taking RBPUA as the basic module, Section 6 develops three joint multi-subchannel power and marine user allocation algorithms. Section 7 presents the simulation results. The WAR optimization performance and the calculating complexity of our proposed schemes are highlighted for comparison. Lastly, we discuss and conclude our work in Section 8.

System Model and Parameters Analysis
This section discusses the maritime channel model and network setting for the downlink NOMA offshore communication system. At the end of this chapter, we consider the objective function of the resource optimization problem.
With reference to the offshore communication environment of the South China Sea, this paper constructs a Longley-Rice-based channel model that obeys a Rice distribution. The reference value for the Longley-Rice transmission loss is expressed as follows: where the formula for fundamental transmission loss L bf in free space is: 32.45 + 20 log 10 f + 20 log 10 d dB, (2) where the distance d is in km and the radio frequency f is in MHz. It is worth noting that the Longley-Rice model is suitable for signal propagation with carrier frequencies between 20 MHz and 20 GHz. The reference attenuation A cr relative to free space depends on the communication distance: A cr =    max(0, A e + k 1 d + k 2 log 10 d), (dLoS min ) Entropy 2021, 23, 1454 4 of 25 We conclude from Equation (3) that the Longley-Rice transmission loss model is divided into three cases according to the size of the communication range: the LoS model (dLoS min ), the diffraction model (d LoS ≤ d ≤ d x ), and the scattering model (d x ≤ d) [8]. In Equation (3), d x indicates the boundary point where the diffraction loss and the scattering loss are equal. A e , A d , and A s (unit: dB) represent the propagation loss of LoS, diffraction, and scattering in free space, respectively. Moreover, k 1 and k 2 represent the propagation loss coefficients. m d and m s are the diffraction and scattering loss coefficients, respectively. Due to the limited coverage of a 5G BS, our communication range between coastal BS and ships is within the horizon. Therefore, our offshore channel needs to only consider the LoS model. It is worth noting that the applicable transmission range of the Longley-Rice model specifies a lower bound d min (generally set to 1 km). Enlightened by the guidebook [29], our channel model can be regarded as the fundamental transmission loss in free space (Equation (2)) within 1 km.
The calculative process of the reference attenuation A cr is very complicated. In that case, we have to consider the following essential parameters: climate factor (1-7), terrain irregularity parameter ∆h (Table 1), the effective height of the transmitter/receiver antennas H T /H R , the system deployment parameters (very careful, careful, random), the conductivity and permittivity of the seawater (Table 2), and the surface refractivity ( Table 3). The mature Longley-Rice model provides seven climate backgrounds: (1) equatorial; (2) continental subtropical; (3) maritime tropical; (4) desert; (5) continental temperate; (6) maritime temperate (over land); and (7) maritime temperate (over sea). These seven kinds of climates cover the communication background of the global offshore ports, meaning that our model is the most widely used. The irregular terrain parameter ∆h indicates the degree of sea wave undulation. Table 1 presents the parameter values given by the Longley-Rice model for different types of irregular terrain. In addition, the system deployment parameter reflects the qualitative description of the site selection scenario for each terminal, which will impact the signal strength around the terminal and the effective height of the antenna. According to the simulated geographic environment of the South China Sea, we will specifically discuss the assignment of the above parameters in Section 7. For the detailed calculation process of their participation in A cr , please refer to [8] and [29]. As shown in Figure 1, a downlink NOMA marine system is composed of a shore-based base station in the offshore area of the South China Sea. We use T {1, 2, . . . , T} to describe the index set of maritime users. This maritime system divides the entire bandwidth B into S subchannels, where each bandwidth is B S . This paper refers to a subchannel as a resource block. We adopt S {1, 2, . . . , S} to represent the set of these resource blocks; for each resource block, s ∈ S satisfies ∑ s∈S B S = B. In our maritime system, the resource blocks are of the orthogonal frequency division to ensure that they will not interfere with each other. For most purposes, use the constants for an average ground. As shown in Figure 1, a downlink NOMA marine system is composed of a shorebased base station in the offshore area of the South China Sea. We use ≜ {1,2, . . . , } to describe the index set of maritime users. This maritime system divides the entire bandwidth B into S subchannels, where each bandwidth is BS. This paper refers to a subchannel as a resource block. We adopt ≜ {1,2, . . . , } to represent the set of these resource blocks; for each resource block, ∈ satisfies ∑ ∈ = . In our maritime system, the resource blocks are of the orthogonal frequency division to ensure that they will not interfere with each other.

Maritime User1
Maritime Suppose that represents the transmitting power from the coastal BS to a maritime user ∈ on resource block s. If > 0, this means that the maritime user t obtains Suppose that P s t represents the transmitting power from the coastal BS to a maritime user t ∈ T on resource block s. If P s t > 0, this means that the maritime user t obtains power from resource block s. Therefore, we determine that user t is valid on this resource block. In contrast, P s t = 0 indicates an offshore user that does not occupy resource block s; we define this as an invalid user. On resource block s, let G s t denote the channel gain from BS to maritime user t and σ s t represent the noise power. To facilitate subsequent simplification, we define a normalized channel noise parameter: σ s t σ s t G s t . In this manner, we reduce the number of variables affecting the optimization objective function. Let P (P s t ) s∈S,t∈T indicate the matrix of the transmitting powers provided by BS for each maritime user. Moreover, P s (P s t ) t∈T denotes the vector of powers allocated to each maritime user on resource block s.
Successive interference cancellation (SIC) technology is applied in NOMA systems to effectively eliminate signal interference among users. With the increase in the number of multiplexed users, the SIC decoding process becomes very complicated [7]. Therefore, the upper limit of users carried on each resource block is defined as A. We use A s {t ∈ T, P s t > 0} to denote the set of valid users on resource block s. Then, the above Referring to the SIC decoding principle described in [30,31], we denote the SIC decoding order of T maritime users as β s : {1, 2,..., T}. The index of the mth decoded maritime user is β s (m) on resource block s, and the inverse function β s −1 (t) indicates the decoding sequence of user t. The optimal decoding sequence is determined as Equation (4) according to σ s t from highest to lowest: The Shannon Equation (5) enables us to solve the achievable rate of maritime user t on resource block s:

Problem Formulation
We use α = {α 1 , α 2 ,..., α t } to represent the sequence set of T positive weights. Furthermore, we introduce a weighting factor for each maritime user t. Then, we analyze the property of the objective function according to the weight value. By introducing the weight value, we can solve the performance optimization and user fairness based on multiple resource blocks [13]. The issue W aims at maximizing the WAR of the NOMA maritime system: w1 : ∑ t∈T P s t ≤ P s max ; (8) w2 : ∑ t∈T ∑ s∈S P s t ≤ P max ; w3 : |A s | ≤ A; w4 : P s t ≥ 0.
It is noteworthy that Condition w1 restricts the upper power limit of each resource block. In Condition w2, P max represents the upper bound of the total power provided by coastal BS. Condition w3 reflects the finite multiplexed maritime users carried by each resource block: |A s | ≤ A. Additionally, Constraint w4 ensures that the offshore user obtains a non-negative allocated power.
where C refers to a constant term formula separated from W: ).
In the following discussion, we leave the constant C aside and investigate the influence of function ϕ s n on the optimization results. The modification problem W* displays a detachable target function in dimensions n ∈ {1, 2, . . . , T} and s ∈ {1, 2, . . . , S}, respectively. In addition, function ϕ s n ( p s n ) depends on the variable of p s n only to simplify the optimization workload.
A detailed description of the equivalent transformation process from Equation (7) to Equation (12) is presented in Appendix A.

Single-Subchannel Resource Optimization
This section investigates the resource allocation problem on resource block s ∈ S with the upper limit of power budget p s . As a fundamental module for multi-resource-block joint resource allocation solutions, our improved method contributes to designing more efficient optimization algorithms. The following equation can describe the single-resource-block optimization issue: On a single resource block, the constant term of the objective function is

Properties Analysis of the Functions ϕ s m
For m > n, we define a set of continuous variables p s n = p s n+1 = · · · = p s m as p ∈ [0, p s ]. An auxiliary function is proposed to assist us in analyzing ϕ s m : Assuming that neither user n nor user (m − 1) occupies resource block s, these invalid users cannot allocate power from resource block s: p s n = p s n+1 = · · · = p s m . Therefore, function ϕ s n,m can supersede the value of ∑ m l=n ϕ s l . Suppose that the upper limit for the number of valid users satisfies Condition w3*. In that case, each resource block can be allocated to at most A maritime users for multiplexing. Therefore, evaluating the calculative complexity of the target function in W s RB requires the execution of O(A) operations. Through the above simplification, the original optimization objective is transferred to the maximization of function ϕ s n,m with constraint conditions. We solve the extreme points and inflection points of the function by analyzing the first and second derivatives of ϕ s n,m . Suppose that s ∈ S, m ∈ {1, 2, . . . , T}, and m > n: • If n = 1 or the weight value satisfies α β s (m) ≥ α β s (n−1) , ϕ s n,m is monotonically increasing with convex in the interval [0, ∞); • If both the inequation of α β s (m) < α β s (n−1) and n > 1 are satisfied, ϕ s n,m shows a single peak. In this case, C 1 refers to the extreme point. Function ϕ s n,m increases in interval − σ β s (n−1) , C 1 but decreases in interval [C 1 , +∞). Let C 2 denote the inflection point.
ϕ s n,m is convex on − σ β s (n−1) , C 2 and concave on [C 2 , +∞), where C 1 ≤ C 2 : The pseudo-code provided in Algorithm 1 expresses the process of calculating argmaxϕ s n,m ( p), aiming to find the corresponding solution p ∈ [0, p s ] when function ϕ s n,m obtains the optimal value. The complexity of Algorithm 1 is O(1), since the calculation involves only a simple fixed number of fundamental operations. The works in this subsection facilitate the subsequent optimization for power and user allocation.

Single-Resource-Block Power Allocation
First, we optimize the power allocation on a single resource block. When the maritime user allocation A s * on the resource block s is fixed, the optimizing problem is organized as follows: The maritime user t / ∈ A s * cannot obtain the allocated power without reusing the resource block s. Therefore, we exclude these invalid offshore users while calculating problem W s RBPA . The valid offshore users can be expressed as m s ∈ {1 s , 2 s , · · · |A s * | s }, where m represents the SIC decoding order. For example, A s * = {2, 5, 7, 9} indicates that there are four valid offshore users occupying resource block s: 1 s = 2, 2 s = 5, 3 s = 7, and 4 s = 9. To facilitate the statistical analysis, we add an index 0 s = 0. According to the definition, for m ≥ 1, we can conclude that This equation also explains p (m−1) s +1 = · · · = p m s . Therefore, we only need to consider effective users when calculating W s RBPA . We can further simplify the optimization objective to W s RBPA * : For 1 ≤ n ≤ m ≤ T, we can obtain ϕ s n,m ϕ s (n−1) s +1,m s (A s * ). Then, we derive argmaxϕ s n,m argmaxϕ s (n−1) s +1,m s (A s * ). Equation (29) can be transformed into the following formula: Algorithm 2 describes the power allocation algorithm on a single resource block (RBPA). In the subsequent multi-resource-block resource optimization, it is necessary to calculate the optimal power allocation on each resource block with various power budget values P s . As the RBPA program is repeatedly executed, the computational complexity will gradually increase. In lines 3-16 of Algorithm 2, we introduce Function 1 to calculate are stored in a lookup table. As shown in line 19, the final return values are limited by the power budget, since the optimized results have to meet the requirements of the constraint P s ≤ P max . Algorithm 2. Single-resource-block power allocation scheme (RBPA) #Calculate the optimum value of ϕ s m,m in (30)  6: #Modify p * if this allocation dissatisfies condition w4 * 8: n ← m − 1 9: While p s n s < p * and n ≥ 1 do 10:  The maximum calculative complexity for power allocation is O(A 2 ), and the subsequent evaluation work costs O(A). Suppose that there are Q different power budgets given in the multi-resource-block optimization. In that case, RBPA is used as the basic module for calculating the corresponding optimal power allocation with the complexity of O(A 2 + QA).

Single-Resource-Block Maritime User Allocation
Based on the previous subsection, we further optimize the maritime user allocation on a single resource block (RBUA) with the DP algorithm. Therefore, the effective user set A s * is a variable satisfying the upper limit in condition w3 * : |A s * | ≤ a, a ∈ {0, 1, . . . , A}. The main idea of the RBUA scheme is to recursively calculate the elements of three arrays: ψ, X, and Y. Let a ∈ {0, 1, . . . , A}, n ∈ {1, 2, . . . , T}, and m ∈ {n, n + 1, . . . , T}. ψ[a, n, m] is defined as the optimal value for the following formula: W RB [a, n, m].
The array Y is responsible for recording the previous elements contributing to the current optimal value ψ[a, n, m]. In Equation (32), it is observed that the target function depends only on p s n , p s n+1 , . . . , p s T . If a = A, n = m = 1 is true, array ψ[A, 1, 1] is the best value for the problem W s RB . When W RB [a, n, m] achieves the maximum value, we define p s n * , p s n+1 * , . . . , p s T * as the optimal solution corresponding to ψ[a, n, m]. Let array X[a, n, m] record the corresponding solution of the optimal objective function. Then, we combine Condition w6* to derive X[a, n, m] = p s n * = p s n+1 * = · · · = p s m−1 * = p s m * . Based on the relation in Equation (38), the implementation of the marine user allocation is a recursive process used to calculate the elements of ψ.
In Equation (38), p * = argmaxϕ(n, m, P s ) and ϕ 1 records the corresponding optimal value ψ[a, n, m] for a valid user m. On the contrary, ϕ 2 represents the optimum value for an invalid user on resource block s.
During the iterative procedure shown in Algorithm 3, the array Y tracks and records the previous elements contributing to the current function ψ[a, n, m]. This can be traced back from index (A, 1, 1) to an empty set. This method assists us in retrieving the optimal solution for the entire program process more conveniently in lines 29-36. From lines 6-12, we initialize the index as ∅ to represent the end of recursion. In summary, the recursive relationship among these three arrays (ψ, X, Y) is divided into four cases: Case 4 (line [24][25][26]: Y[a, n, m] = ∅. , A, p s ) 2: #Initialize arrays ψ, X, Y for a = 0, m = T 3: For m = T to 1 and n = m to 1 do 4: Y[0, n, m] ← ∅ 7: End for 8: For a = 1 to A and n = T to 1 do 9: Y[0, n, m] = ∅ 13: End for 14: #Calculate ψ, X, Y for a ∈ [1, A] and n ≤ m ≤ T − 1 15: For m = T − 1 to 1 and a = 1 to A and n = m to 1 do 16: To avoid the repeated execution of the DP procedure in the multi-resource-blocks system, Algorithm 4 implements a pre-calculated improvement strategy. This subsection essentially optimizes user allocation based on power allocation in the previous subsection. Hence, we define the improved algorithm as a joint power and user allocation scheme on a resource block (RBPUA) to distinguish it from RBUA. In lines 1-4, the algorithm executes RBPA to obtain three arrays (ψ, X, Y). From lines 5-8, we solve the valid user set A s * in ψ[A, 1, m] and the corresponding optimal solution p 1 , p 2 , . . . ., p T , then store these values in the global variable set. In line 10, the objective function W s RBPA (A s * , p s ) is maximized by searching for the best maritime user selection among T possibilities in the set. At the end of the algorithm, the returned result is restricted by the power budget p s (P s ≤ P max ) in RBPA.
The improved RBPUA scheme is prepared for the efficient calculation of the multiresource-block optimization problem. Consequently, on a single resource block with a power budget, the calculative complexity achieved by both RBPUA and RBUA is equal to O(AT 2 ). When calculating the optimal W s RB corresponding to Q different power budgets in a multi-resource-block problem, the RBPUA with a computational complexity of O(AT 2 + QAT) is more efficient than RBUA with O(QAT 2 ). We can make an intuitive comparison from the numerical simulation given in Section 7.

Multi-Subchannel Resource Optimization
Based on the single-resource-block optimization, the multi-resource-block joint maritime user and power allocation problem can be defined by the following formula: For power budget P s , the best resource allocation result can be obtained quickly for each resource by invoking the RBPUA scheme. Therefore, the power budget directly impacts the optimization solution of power and marine user allocation. W MRB is ultimately the process of optimizing these two variables ( p s and A s * ) with P s together. Suppose we can replace several definitions in W MRB with W s (p s ) and conditions in problem W s RB . In that case, W MRB will be transformed into the equivalent problem W* put forward at the beginning of this paper.

Heuristic Optimization Algorithm Based on Gradient Descent (GRAD)
The improved gradient descent algorithm combined with the RBPUA can effectively solve the joint power and sea user allocation problems. Hence, this paper regards the heuristic algorithm as the performance standard of the multi-resource-block joint optimization scheme. Compared with the traditional optimization algorithm, this scheme offers the advantage of reducing the complexity and achieving the optimal WAR. Its principle lies in the optimization of two stages. Specifically, the first stage follows the projected gradient descent of the power vector P s = P 1 , P 2 , . . . , P S in the search space formed by constraints (problem W MRB : C2 and C3).
The second stage calculates W s (p s ) as well as its first derivative value W s (p s ). Then, these two values return to the first stage and participate in the judgment of the iteration conditions. After this, we select an appropriate step size to decide which point to start the next iteration. The step length λ is determined by the optimization of W s along the ray {P s + λ |λ ≥ 0}. We adopt the precise straight-line search method in this paper. Let P S 1 , P S 2 , . . . , P S T represent the output power allocation value of the RBPUA algorithm. The left derivative of W s (p s ) concerning p s can be described as follows [32]: where l represents the index value when p s l reaches the upper limit of the power budget on this resource block s.
Algorithm 5 describes the pseudo-code of the GRAD algorithm. In the third line, we initialize the fault tolerance ξ to represent the iteration termination condition. From lines 5 to 6, the gradient of ∑ s∈S W s evaluated at the power budget vector P s denotes the search direction. At line 7, we can adjust the λ by means of a precise straight-line search simulation. Finally, the projection of P s + λ in the search constraint space is calculated effectively at line 8. Conserve the preceding vector P s * ← P s 5: Determine a search direction 6: ← W 1 p 1 , W 2 p 2 , . . . ., W S p S 7: Select a step length λ 8: Update P s ← projection of P s + λ in search space: feasible set P s : C2 : ∑ ∑ s s max s∈S P s ≤ P max 9: End while 10: Return P s 11: End Function GRAD When we adopt RBUA as the basic module in the multi-resource-block joint optimization, the GRAD algorithm achieves the complexity of O(log(1/ξ)SAT 2 ). However, the application of our improved method RBPUA to the GRAD scheme reduces the complexity to O SAT 2 + log(1/ξ SAT).

Multiple-Choice Knapsack Algorithm Based on Dynamic Programming (MCKP-DP)
We have simplified and transformed the objective function before to deal with the problems of joint marine users and power allocation more simply. This process depends on the change in variable p s with a continuous search space. However, the research on NP-hard optimization and the relevant approximate algorithm requires that the accuracy of the parameters and variables be bounded. In that case, the discretization of variables can be adopted to simplify the complexity [33]. This method of discrete simplification is suitable for practical systems limited by a minimum transmit power at the coastal BS. In conclusion, we can discretize the seek constraint space similarly to the method in reference [9]. We set the minimum discrete transmit power value as p. The power budget p s on each resource block is a multiple of the minimum power p: P s = j × p, j ∈ 0, 1, 2, .., P s p . Let J = P s p represent the total number of items with an allocated power. Then, we discretize the constraint conditions of the optimization function into a feasible set F, which is expressed as follows: F = P s : ∑ s∈S P s ≤ P max , 0 ≤ P s ≤ P s max , s ∈ S, P s = j · p, j ∈ {0, 1, 2, .., J} Through the discretization of the power budget on each resource block, problem W MRB can be transformed into the classic multiple-choice knapsack problem W MCKP [28]: F2 : F3 : In the W MCKP problem, we define S non-intersecting classes to represent S noninterfering resource blocks. Each class includes J items packed into a backpack with a capacity of P max . The profit of each project pro s l refers to the WAR value of item l on resource block s. Moreover, the weight wei s l represents the power allocated to item l. The knapsack problem stipulates that only one item from each category is selected into the backpack to maximize the total profits. At the same time, the weights are constrained by the P s max of each category and the maximum capacity P max of the backpack. Therefore, when the item j on resource block s is allocated to the knapsack, binary variable z s l = 1. Finally, W MCKP is able to approach the continuous solution of GRAD with an arbitrary accuracy by adjusting p.
The error between the optimal result W MCKP * of the discrete scheme and the optimal result W MRB * of the continuous algorithm is as follows: where P * s refers to the optimal power budget on resource block s in problem W MRB . The discretization error depends on the upper limit of a linear function in δ with the coefficient decided by the system parameters. Appendix B gives the detailed derivation process of Equation (63).
W MCKP in polynomial time can be dealt with by DP, which is summarized as weighted DP and profit DP [28]. Since the MCKP is able to dynamically solve the maximum profit by discretizing weights, we adopt the principle of weight-based DP. Let Z be a twodimensional array. Z[s, j] is defined as the optimal value of W MCKP limited to the first s categories with a capacity of j × p. The recursive relationship for Z on resource block s is as follows: As shown in Algorithm 6, through the application of the weight-based DP idea to the multiple-choice knapsack algorithm, we propose the use of the MCKP-DP scheme to handle W MCKP . First of all, we convert the continuous joint optimization problem W RB to the discrete search space problem W MCKP . Locating lines 6 and 7, the RBPUA algorithm calculates the profit pro s i for each project. In line 8, we perform weight-based DP. Forl ∈ [0, j] do 6: pro s l ← l · p 7: End for 10: End for 11: End for 12: Backtracking to obtain the power vector corresponding to Z s [s, j] 13: Return the optimal allocation by means of weights-based dynamic programming [28] 14: End Function MCKP-DP

Fully Polynomial Time Approximation Program Based on Dynamic Programming (DP-FPTA)
Aiming at an NP-hard optimization conundrum, the knapsack algorithm and related approximation schemes can effectively ensure that the approximation precision reaches any degree required. Let Π be an NP-hard optimization problem with objective function f Π ; we propose an approximation scheme for the optimization problem on the input (I, ε), where I represents the instance of Π and ε > 0 is taken as the error parameter. The optimal result of function f Π (I, ε) satisfies the requirements of Equation (65): This scheme is called the polynomial-time approximation (PTA) algorithm. For each fixed ε > 0, its running time is limited by a polynomial with the size of instance I. In the subsequent more rigorous approximation concept, FPTA limits the running time required by the polynomial with both instance size and 1/ε. From the technical perspective, FPTA is the most providential strategy to solve the NP-hard optimization problem.
To deal with the pseudo-polynomial complexity of J, we will formalize this concept and develop a complete polynomial approximation algorithm by combining it with dynamic programming. The core of the DP-FPTA algorithm is that for any ε > 0, the final optimization result is higher than the lower bound of performance guarantee: (1 − ε) · W MCKP * . In addition, the execution time is limited by both the size of the polynomial input and 1/ε. Supposing that P = NP, the DP-FPTA algorithm is the best compromise solution to the NP-hard optimization problem. The algorithm ensures the performance of WAR while reducing the computational difficulty [34].
As shown in Algorithm 7, the DP-FPTA algorithm is based on a combination of profit-based dynamic programming and an approximate optimal scheme. Scaling profit generally contributes to the simplification of the items calculated in the knapsack problem. We first give an estimate F* of the optimal value of the W MCKP problem; the estimated value satisfies the requirements of the condition F * ≥ W MCKP * ≥ F * 4 [34]. To further simplify the workload, we focus only on subset J s of the items for each category rather than calculating the profit value pro s j of the total items for S categories.
The discrete terms of the DP-FPTA scheme can be expressed as j ∈ 1, 2, . . . , 4S ε to transform the continuous profit space into discrete values for every interval (j − 1) · εF * 4S , j · εF * 4S . Subsequently, we introduce a multi-key binary search to obtain subset J s on each resource  [35]. Finally, as shown in lines 11-14 of Algorithm 7, we adopt profit-based DP to obtain the optimal solution for resource allocation. Let Q denote a DP array for the smallest weight of the subproblem composed of S categories (resource blocks), the problem of MCKP be limited to the first s categories, and Q(s,q) denote the minimum power budget required to achieve a WAR of q·εF*/4S. After initializing Q[0,0] = 0, Q[0,q] = +∞ and letting q = 0, 1, . . . , 4S ε , the recursive relationship can be expressed as where |J s | = min 4S ε , J . Furthermore, the gap between the DP-FPTA optimal solution and the MCKP-DP optimum W MCKP * is, at most, ε · W MCKP * . The calculative complexity of DP-FTPA is O(SAT 2 + min{(log 2 J) S 2 AT For j ∈ J s do 6: While pro s j+1 − pro s j > K do 7: Obtain pro s j , wei s j through multi-key binary search method 8: End while 9: End for 10: End for 11: For s ∈ S do 12: For q ∈ 0, 1, .

14:
End for 15: End for 16: Return DP-FPTA allocation by means of the profits-based dynamic programming [28] 17: End Function DP-FPTA Remark: In [34], it is pointed out that in a very technical sense, the FPTA scheme is the best one can expect for an NP-hard optimization problem, assuming that P = NP. The design of almost all the FPTA and PTA schemes is based on the idea of trading accuracy for running time. Inspired by the idea of an approximate algorithm, we can deal with the NP-hard problem in the following three ways. (1) If the input scale of the problem is small, the search strategy can be used to solve the problem in exponential time. If the input scale is large, (2) a random algorithm can accurately solve the problem with a high probability in polynomial time or (3) an approximate solution for the problem can be obtained in polynomial time. In [27], other approximate schemes are also mentioned. The central concept is to adopt the random sampling of sub-channels with probability ρ to avoid the traversal search. The simulation results show that, compared with the traditional optimization algorithm, the greedy-based approximate scheme saves 66% of the running time while maintaining the approximate optimal data rate. The question of whether the FPTA is the most desirable approximation algorithm will be explored in our future work.

Numerical Results and Discussion
In this paper, the model scenario simulated is located within the region of the South China Sea. Therefore, the tropical ocean climate is taken for the setting of the climate parameter. The coastal 5G BS serves an offshore area with a radius of 5 km, and there are T maritime users (ships or offshore reef islands) randomly distributed across the sea. The total channel bandwidth B of the offshore communication system is 5 MHz. Moreover, the system channel is allocated to 10 resource blocks with a bandwidth of B s = B/S = 0.5 MHz. When there is no typhoon, the sea surface is relatively calm, with the irregular terrain parameter taken as 0 [29]. Table 1 shows the reference values of the terrain irregularity parameter ∆h. The coastal BS is located in a high-lying area with a broad view. Therefore, its deployment parameter is very careful. In contrast, the deployment parameters of maritime users are relatively random. The effective heights of the BS transmitting antenna and the maritime user receiving antenna are 15 m and 5 m, respectively. In the multiple-choice knapsack program, we set the minimum discrete power to 0.01 W. Table 4 shows more detailed simulation parameters. First, we test the path loss of the Longley-Rice model with the increase in communication distance under an offshore background. Our objective is to investigate the influence of these two parameters on the maritime channel model, including BS transmitting antennas with different heights H T and different degrees of irregularity ∆h. After that, we test the performance optimization and complexity of the proposed algorithm RBPUA based on NOMA and traditional OMA, respectively. Furthermore, we evaluate the three multiresource-block joint optimization schemes not only in terms of the WAR performance optimization results but also in terms of the calculative complexity.
When the height of the BS antenna varies from 5 to 25 m, Figure 2 shows that the Longley-Rice transmission loss results in the increase in the transmission distance. Specifically, within 5 km, the transmission loss of the 5 m transmitting antenna is significantly greater than that of the antenna transmitting over 10 m. At a distance of 5 km, the loss values of the 10 m to 25 m antennas are almost equal to 114.7 dB. With the expansion of the communication range, the transmission loss corresponding to the 10 m BS antenna will increase instantaneously. When the distance reaches 8 km, the 15 m antenna will expose the defect of limited coverage compared with the antenna above 20 m. Considering the limited coverage of the shore-based 5G BS, the communication range in this paper is within a radius of 5 km over the sea. Therefore, if the height of the 5G BS transmitting antenna is more than 10 m, a good transmission loss result can be maintained in our subsequent work.  Figure 3 shows the path loss value achieved with the increase in distance based on different terrain irregular parameters. We set the effective height of the coastal BS transmitting antenna as 15 m. Within the communication distance of 5 km specified in this paper, the propagation loss values corresponding to irregular parameters Δh = 0 and Δh = 5 are almost equal. Referring to previous test results, we can regard the sea surface as calm and smooth under an offshore background without typhoon invasion. Therefore, in the subsequent simulation process, we suppose that the terrain irregularity parameter is zero. This value is still applicable even if there are slight waves on the sea surface.
The transmission loss reflected by the experimental results (Figures 2 and 3) is the absolute value. In the subsequent simulation, those propagation loss values are negative in the maritime communication system.  Figure 4 compares the WAR performance optimization between RBUA and the improved scheme RBPUA based on NOMA and OMA, respectively. The NOMA system supports an upper limit of 10 marine users multiplexed on a resource block. At the same time, the power budget provided by the coastal BS increases from 5 W to 50 W. When the power budget reaches 10 W, the WAR performance of the NOMA system with a single resource block is increased by 4.08% compared with OMA. As the power budget increases  Figure 3 shows the path loss value achieved with the increase in distance based on different terrain irregular parameters. We set the effective height of the coastal BS transmitting antenna as 15 m. Within the communication distance of 5 km specified in this paper, the propagation loss values corresponding to irregular parameters ∆h = 0 and ∆h = 5 are almost equal. Referring to previous test results, we can regard the sea surface as calm and smooth under an offshore background without typhoon invasion. Therefore, in the subsequent simulation process, we suppose that the terrain irregularity parameter is zero. This value is still applicable even if there are slight waves on the sea surface.  Figure 3 shows the path loss value achieved with the increase in distance based on different terrain irregular parameters. We set the effective height of the coastal BS transmitting antenna as 15 m. Within the communication distance of 5 km specified in this paper, the propagation loss values corresponding to irregular parameters Δh = 0 and Δh = 5 are almost equal. Referring to previous test results, we can regard the sea surface as calm and smooth under an offshore background without typhoon invasion. Therefore, in the subsequent simulation process, we suppose that the terrain irregularity parameter is zero. This value is still applicable even if there are slight waves on the sea surface.
The transmission loss reflected by the experimental results (Figures 2 and 3) is the absolute value. In the subsequent simulation, those propagation loss values are negative in the maritime communication system.  Figure 4 compares the WAR performance optimization between RBUA and the improved scheme RBPUA based on NOMA and OMA, respectively. The NOMA system supports an upper limit of 10 marine users multiplexed on a resource block. At the same time, the power budget provided by the coastal BS increases from 5 W to 50 W. When the power budget reaches 10 W, the WAR performance of the NOMA system with a single resource block is increased by 4.08% compared with OMA. As the power budget increases The transmission loss reflected by the experimental results (Figures 2 and 3) is the absolute value. In the subsequent simulation, those propagation loss values are negative in the maritime communication system. Figure 4 compares the WAR performance optimization between RBUA and the improved scheme RBPUA based on NOMA and OMA, respectively. The NOMA system supports an upper limit of 10 marine users multiplexed on a resource block. At the same time, the power budget provided by the coastal BS increases from 5 W to 50 W. When the power budget reaches 10 W, the WAR performance of the NOMA system with a single resource block is increased by 4.08% compared with OMA. As the power budget increases to 50 W, the WAR of NOMA becomes better than that of OMA by 4.59%. In addition, we prove that the low-complexity RBPUA scheme is the same in terms of performance optimization as the RBUA scheme. to 50 W, the WAR of NOMA becomes better than that of OMA by 4.59%. In addition, we prove that the low-complexity RBPUA scheme is the same in terms of performance optimization as the RBUA scheme. For the NOMA or OMA system with 10 power budgets, Figure 5 compares the computational complexity for the RBUA algorithm and the improved optimization algorithm RBPUA. According to the numerical result, for 10 maritime users, the NOMA-based RBPUA scheme is less complex than the NOMA-based RBUA algorithm by 80%. Consequently, applying our improved algorithm RBPUA in the multi-resource-block schemes can effectively reduce the computational difficulty while maintaining the performance optimization results. In Figure 6, we compare the WAR optimization performance of three multi-resourceblock joint power and maritime user allocation schemes (GRAD heuristic algorithm, MCKP-DP scheme, and DP-FPTA approximation problem). The offshore communication system serves 80 offshore users, including 10 resource blocks. Furthermore, the total power budget provided by BS increases from 5 W to 50 W. It can be seen from the simulation result that the GRAD with an accuracy of 0.0001 can be defined as the reference For the NOMA or OMA system with 10 power budgets, Figure 5 compares the computational complexity for the RBUA algorithm and the improved optimization algorithm RBPUA. According to the numerical result, for 10 maritime users, the NOMA-based RBPUA scheme is less complex than the NOMA-based RBUA algorithm by 80%. Consequently, applying our improved algorithm RBPUA in the multi-resource-block schemes can effectively reduce the computational difficulty while maintaining the performance optimization results.
Entropy 2021, 23, 1454 20 of 26 to 50 W, the WAR of NOMA becomes better than that of OMA by 4.59%. In addition, we prove that the low-complexity RBPUA scheme is the same in terms of performance optimization as the RBUA scheme. For the NOMA or OMA system with 10 power budgets, Figure 5 compares the computational complexity for the RBUA algorithm and the improved optimization algorithm RBPUA. According to the numerical result, for 10 maritime users, the NOMA-based RBPUA scheme is less complex than the NOMA-based RBUA algorithm by 80%. Consequently, applying our improved algorithm RBPUA in the multi-resource-block schemes can effectively reduce the computational difficulty while maintaining the performance optimization results. In Figure 6, we compare the WAR optimization performance of three multi-resourceblock joint power and maritime user allocation schemes (GRAD heuristic algorithm, MCKP-DP scheme, and DP-FPTA approximation problem). The offshore communication system serves 80 offshore users, including 10 resource blocks. Furthermore, the total power budget provided by BS increases from 5 W to 50 W. It can be seen from the simulation result that the GRAD with an accuracy of 0.0001 can be defined as the reference In Figure 6, we compare the WAR optimization performance of three multi-resourceblock joint power and maritime user allocation schemes (GRAD heuristic algorithm, MCKP-DP scheme, and DP-FPTA approximation problem). The offshore communication system serves 80 offshore users, including 10 resource blocks. Furthermore, the total power budget provided by BS increases from 5 W to 50 W. It can be seen from the simulation result that the GRAD with an accuracy of 0.0001 can be defined as the reference standard for optimal WAR. At the same time, the MCKP-DP scheme (the number of discrete items J = 1000) is comparable to the optimization performance of the GRAD program. When the coastal BS provides a power budget of 50 W, the WAR of the above two schemes in the NOMA system is increased by 4.53% compared with the OMA performance. For a NOMA maritime system with a 50 W power budget, the performance of our proposed DP-FPTA with a 0.01 approximate accuracy is 1.11% higher than that of the DP-FPTA with a 0.1 accuracy. In particular, the DP-FPTA scheme with an error of 0.01 almost achieves the optimized performance of GRAD and MCKP-DP. standard for optimal WAR. At the same time, the MCKP-DP scheme (the number of discrete items J = 1000) is comparable to the optimization performance of the GRAD program. When the coastal BS provides a power budget of 50 W, the WAR of the above two schemes in the NOMA system is increased by 4.53% compared with the OMA performance. For a NOMA maritime system with a 50 W power budget, the performance of our proposed DP-FPTA with a 0.01 approximate accuracy is 1.11% higher than that of the DP-FPTA with a 0.1 accuracy. In particular, the DP-FPTA scheme with an error of 0.01 almost achieves the optimized performance of GRAD and MCKP-DP. Furthermore, Figure 7 exhibits the corresponding histogram for convenience; therefore, we can clearly distinguish the WAR simulation results for each optimization scheme.   Furthermore, Figure 7 exhibits the corresponding histogram for convenience; therefore, we can clearly distinguish the WAR simulation results for each optimization scheme. standard for optimal WAR. At the same time, the MCKP-DP scheme (the number of discrete items J = 1000) is comparable to the optimization performance of the GRAD program. When the coastal BS provides a power budget of 50 W, the WAR of the above two schemes in the NOMA system is increased by 4.53% compared with the OMA performance. For a NOMA maritime system with a 50 W power budget, the performance of our proposed DP-FPTA with a 0.01 approximate accuracy is 1.11% higher than that of the DP-FPTA with a 0.1 accuracy. In particular, the DP-FPTA scheme with an error of 0.01 almost achieves the optimized performance of GRAD and MCKP-DP. Furthermore, Figure 7 exhibits the corresponding histogram for convenience; therefore, we can clearly distinguish the WAR simulation results for each optimization scheme.    The simulation result shows that our communication system obtains the maximum WAR with 50 users. When maritime users continue to increase beyond this saturation state, the heavy load of channel reuse worsens user interference, resulting in a decline in system data rates. Moreover, in the saturation state, both GRAD and MCKP-DP solutions (number of discrete items: J = 1000) achieve an almost equivalent optimization performance of 9.421 × 10 7 bit/s. Their WAR optimization results are higher than those of OMA by 7.47%. In this saturated NOMA system, the DP-FPTA with an 0.01 approximate accuracy achieves a WAR performance of 9.420 × 10 7 bit/s comparable to that of GRAD and MCKP-DP. Meanwhile, it promotes the WAR by 1% over the approximate scheme with an accuracy of 0.1.
interference, resulting in a decline in system data rates. Moreover, in the saturation state, both GRAD and MCKP-DP solutions (number of discrete items: J = 1000) achieve an almost equivalent optimization performance of 9.421 × 10 7 bit/s. Their WAR optimization results are higher than those of OMA by 7.47%. In this saturated NOMA system, the DP-FPTA with an 0.01 approximate accuracy achieves a WAR performance of 9.420 × 10 7 bit/s comparable to that of GRAD and MCKP-DP. Meanwhile, it promotes the WAR by 1% over the approximate scheme with an accuracy of 0.1.  Figure 9 displays the optimization result of WAR for the DP-FPTA algorithm versus the increase of 4S/ε. Taking the optimization performance of the MCKP-DP scheme as a reference and J = 1000 as the total number of discrete items on each resource block, we normalize the x-axis by |Js| = 4S/ε. Evaluating the subset Js of projects on each resource block makes it more convenient to simulate the relationship between WAR and approximation accuracy ε. Our system, equipped with 10 resource blocks and a power budget of 10 W, serves 80 maritime users. In Figure 9, we also propose that the minimum performance index of the DP-FPTA is at least (1 − ) ⋅ * . The result indicates that the WAR is higher than the performance index in both OMA and NOMA marine systems. As the number of items increases, the DP-FPTA-optimized performance gradually approaches the MCKP-DP performance curve. Moreover, when 4S/ε = 500 (ε = 0.08), the WAR of our approximate scheme will reach 99.55% of the MCKP-DP scheme.  Figure 9 displays the optimization result of WAR for the DP-FPTA algorithm versus the increase of 4S/ε. Taking the optimization performance of the MCKP-DP scheme as a reference and J = 1000 as the total number of discrete items on each resource block, we normalize the x-axis by |J s | = 4S/ε. Evaluating the subset Js of projects on each resource block makes it more convenient to simulate the relationship between WAR and approximation accuracy ε. Our system, equipped with 10 resource blocks and a power budget of 10 W, serves 80 maritime users. In Figure 9, we also propose that the minimum performance index of the DP-FPTA is at least (1 − ε) · W MCKP * . The result indicates that the WAR is higher than the performance index in both OMA and NOMA marine systems. As the number of items increases, the DP-FPTA-optimized performance gradually approaches the MCKP-DP performance curve. Moreover, when 4S/ε = 500 (ε = 0.08), the WAR of our approximate scheme will reach 99.55% of the MCKP-DP scheme.  Figure 10 further compares the calculative complexity of DP-FPTA and MCKP-DP. The complexity of the DP-FPTA scheme increases with the increase in 4S/ε. When the number of normalized items reaches 2900 (ε ≤ 0.01), its complexity is equivalent to that of the MCKP-DP scheme (J = 1000), and MCKP-DP achieves the optimal WAR. In this case, Figure 9. Weighted achievable rate of DP-FPTA and MCKP-DP vs. number of items in each resource block 4S/ε. Figure 10 further compares the calculative complexity of DP-FPTA and MCKP-DP. The complexity of the DP-FPTA scheme increases with the increase in 4S/ε. When the number of normalized items reaches 2900 (ε ≤ 0.01), its complexity is equivalent to that of the MCKP-DP scheme (J = 1000), and MCKP-DP achieves the optimal WAR. In this case, we do not recommend our proposed DP-FPTA scheme. Combined with the simulation results shown in Figure 9, within the approximate error interval of 0.01 ≤ ε ≤ 0.08, NOMA-based DP-FPTA achieves an approximately optimal WAR performance with far less calculative complexity than MCKP-DP. When the error parameter satisfies ε = 0.08, the WAR of the approximate scheme achieves 99.55% of MCKP-DP, but the complexity is 84.3% lower than the MCKP-DP scheme. Furthermore, the performance of the NOMA-based DP-FPTA is better than that of OMA by 4.48%. Results have shown that while controlling the computational complexity, DP-FPTA can ensure the optimization of WAR by adjusting the approximate error function ε. Therefore, our proposed scheme successfully achieves the trade-off between optimization performance and calculative delay.  The complexity of the DP-FPTA scheme increases with the increase in 4S/ε. When the number of normalized items reaches 2900 (ε ≤ 0.01), its complexity is equivalent to that of the MCKP-DP scheme (J = 1000), and MCKP-DP achieves the optimal WAR. In this case, we do not recommend our proposed DP-FPTA scheme. Combined with the simulation results shown in Figure 9, within the approximate error interval of 0.01 ≤ ε ≤ 0.08, NOMAbased DP-FPTA achieves an approximately optimal WAR performance with far less calculative complexity than MCKP-DP. When the error parameter satisfies ε = 0.08, the WAR of the approximate scheme achieves 99.55% of MCKP-DP, but the complexity is 84.3% lower than the MCKP-DP scheme. Furthermore, the performance of the NOMA-based DP-FPTA is better than that of OMA by 4.48%. Results have shown that while controlling the computational complexity, DP-FPTA can ensure the optimization of WAR by adjusting the approximate error function ε. Therefore, our proposed scheme successfully achieves the trade-off between optimization performance and calculative delay.

Conclusions
This paper investigates the WAR optimization problem in the NOMA-based offshore downlink communication scenario of the South China Sea. We established a Longley-Ricebased maritime channel model, including various environmental factors and antenna deployment parameters. This model, which has adjustable environmental parameters, can be widely applied to various offshore communication applications around the world. Aiming at the single-resource-block resource allocation problem, we performed pre-computation to simplify the power and marine user allocation. Taking the improvement scheme RBPUA as the basic module, we developed three optimization solutions for multi-resource-block joint power and maritime user allocation. The simulation results indicate that we can regard the GRAD as a performance optimization index. MCKP-DP provides a new idea based on the knapsack problem for resource allocation. Its optimization performance achieved the best value, while the complexity had to be reduced. We proposed the use of the DP-FPTA to effectively weigh the relationship between computation complexity and performance optimization. This algorithm is suitable for a practical NOMA-based maritime communication system with a low time delay.
In subsequent work, the NOMA-based relay technology should be introduced into marine communications to expand the network coverage [36]. In addition, we will further expand the single-BS NOMA system to the maritime communication network jointly de-ployed by multiple offshore BSs. Moreover, motivated by the optimization schemes in this paper, we will delve into the problem of resource allocation in the MIMO-NOMA maritime system. The joint optimization project with beamforming and user clustering represents a significant challenge for our future work [37]. We aim to achieve improved signal strength and regional coverage while reducing signal interference in the next generation of this maritime communication system.