Spatial-Temporal-DBSCAN-Based User Clustering and Power Allocation for Sum Rate Maximization in Millimeter-Wave NOMA Systems

: The combination of millimeter-wave (mmWave) communications and non-orthogonal multiple access (NOMA) systems exploits the capability to serve multiple user devices simultaneously in one resource block. User clustering, power allocation (PA), and hybrid beamforming problems in mmWave-NOMA systems can utilize the network setting’s potential to enhance the system performance. Based on similar characteristics of the spatial distributions of users in real life, we propose a novel spatial-temporal density-based spatial clustering of applications with noise (ST-DBSCAN)-based unsupervised user clustering in order to enhance the system sum-rate. ST-DBSCAN is a state-of-the-art density-based clustering algorithm for solving spatial and non-spatial problems. Moreover, instead of symmetric PA, we propose an inter-cluster PA algorithm. Next, we apply boundary-compressed particle swarm optimization in order to reduce inter-cluster interference and enhance system performance. The simulation results reveal that our proposed solution improves the sum-rate of mmWave-NOMA-based systems when compared with that of mmWave-OMA-based systems. In addition, we compare our proposed algorithm with other benchmark user clustering algorithms in order to investigate the performance of our ST-DBSCAN-based user clustering algorithm. The results also illustrate that our proposed approach outperforms the state-of-the-art user clustering algorithms in mmWave-NOMA systems.


Introduction
In the last decade, with the substantial traffic development and mobile communication growth, the number of mobile devices in use has increased rapidly, which necessitates a corresponding increment in the required bandwidth [1]. The fifth-generation (5G) mobile network has been launched to facilitate faster transmission, higher efficiency, greater network capacity, lower latency, and higher user density. With the requirements of larger traffic, the high bandwidth of millimeter-wave (mmWave) communications is highly useful for 5G wireless networks. mmWave operates at frequencies from 30 to 300 GHz. This frequency range makes mmWave communications highly directional and guarantees the propagation of the spectrum that attains a higher data rate and less interference.
To enhance connectivity, the development of new multiple access techniques is essential for handling the significant increase in the number of mobile users. The traditional multiple-access technology used in the fourth-generation network is orthogonal multiple access (OMA), which cannot serve a large number of users at the same time in 5G. To enhance the spectrum efficiency in 5G, non-orthogonal multiple access (NOMA) [2] has been introduced as a new multiple-access technology. NOMA is designed in order to serve multiple users at each orthogonal resource simultaneously.
The key concept of NOMA is successive interference cancellation (SIC) to decode transmitted messages and suppress interference at the receiver side [3]. Moreover, NOMA can also improve the throughput and secrecy performance in wireless communications [4,5].
Based on the aforementioned individual advantages of mmWave and NOMA, the characteristics of mmWave-NOMA systems can be described, as follows: • mmWave can strongly correlate the channels of different users through its highly directional transmissions; thus, the necessary combination between NOMA and mmWave can be achieved; and, • with the higher connectivity and the high capacity provided by NOMA, the benefits of mmWave-NOMA systems can be multiplied based on the aforementioned characteristics.
Moreover, the mmWave-NOMA system allows for one beamforming vector to serve multiple users simultaneously; this causes the construction of the mmWave-NOMA system to be more complex. Hence, the optimal system sum-rate under constraints is restricted by the complication of the mmWave-NOMA system, which differs from the conventional OMA system, and by each user's requirements. Because multiple users can share one beam with different power levels, the users suffer from intra-beam interference from other users in the same beam, as well as inter-beam interference from users in other beams. In order to reduce inter-beam interference, users in the same beam should have a strong channel gain correlation, and users in different beams should have a low channel gain correlation [6]. Thus, efficient user clustering and power allocation (PA) strategies emerge as two key requirements for mmWave-NOMA systems. The optimal solution for combining non-convex user clustering and PA is non-deterministic polynomial-time hard (NP-hard) [7]. Achieving a globally optimal solution to an NP-hard problem is a nontrivial problem, which motivates us to use novel techniques, especially machine learning.
Unsupervised learning, especially clustering, is a well-known machine learning method. Clustering algorithms aim to group similar data or data with strong correlations into distinct groups. However, recent research has focused on algorithms that do not exploit the advantages of learning. For example, to overcome the high complexity of computation, suboptimal algorithms were proposed in order to solve the difficult and complex user clustering problems [8]. Hence, machine learning should be applied to enhance mmWave-NOMA systems by utilizing flexible learning characteristics.
Inspired by the characteristics of machine learning and novel techniques of clustering, we develop an unsupervised learning-based user clustering method for mmWave-NOMA systems. In particular, we consider a downlink power-domain mmWave-NOMA system with a base station (BS), where the users are distributed while using a Poisson cluster process (PCP) in a two-dimensional location. Furthermore, we also find solutions for PA and hybrid beamforming (HBF) to enhance the performance of the mmWave-NOMA system. In the nutshell, our contributions of this study are summarized, as follows: • The optimization problem was investigated to maximize the sum-rate of a downlink mmWave-NOMA-based system by jointly optimizing user clustering, PA, and HBF strategies. It is challenging to solve this problem, because it involves combinatorial complexity. Thus, we separated the underlying problem into sub-problems of the user clustering, PA, and HBF problems. • To solve the user clustering problem, we propose a novel spatial-temporal density-based spatial clustering of applications with noise (ST-DBSCAN)-based algorithm for user clustering in downlink mmWave-NOMA systems. Our proposed ST-DBSCAN algorithm exploits the similarity between the position of users and the correlation between the channel gains of users to group users into clusters. Recent research has only focused on the correlations between user channel gains and has not considered the spatial distribution of users. In this study, we consider both user positions and channel gains to maximize the system sum-rate. When the users are in close proximity to each other, the BS can form a narrower beam in order to achieve a higher beam gain than that achievable with a wider beam [9]. By exploiting this characteristic, our ST-DBSCAN-based user clustering algorithm can enhance the performance of mmWave-NOMA systems. • We obtain a sub-optimal inter-cluster PA under fixed and arbitrary HBF. To deal with the non-convexity of the PA problem, we separate this problem into two sub-problems, intra-cluster PA, and inter-cluster PA. Based on the intra-cluster PA that was solved in [10], we propose an inter-cluster PA algorithm. Moreover, we apply the boundary-compressed particle swarm optimization (BC-PSO) algorithm to eliminate inter-cluster interference, to boost the performance of the system. • Simulation results show that the proposed ST-DBSCAN-based user clustering algorithm outperforms other user clustering algorithms. The simulation results also show that our PA and HBF solutions can improve the performance of mmWave-NOMA systems.
The remainder of this paper is organized as follows: Section 1 surveys and summarizes the related literature to provide a theoretical background on 5G, NOMA, mmWave, clustering algorithms. This section also highlights the contributions of our study. Next, in Section 2, the studies that are related to this study are presented. The network model, spatial distribution of the user, channel model, and signal model are illustrated in Section 3. In addition, the problem of user clustering is formulated in Section 4. Next, the ST-DBSCAN-based user clustering algorithm for the mmWave-NOMA system is proposed, and an overview of ST-DBSCAN as well as the pseudocode of the ST-DBSCAN-based algorithm is presented in Section 5. Next, Section 6 describes our proposed inter-cluster PA and HBF solutions for enhancing the performance of the system. Subsequently, the simulation settings and results are presented in Section 7. Finally, the conclusions from this study are provided in Section 8.

Related Work
In this section, prior studies on user grouping are reviewed. We consider user pairing and user clustering in NOMA and mmWave. In NOMA, the BS serves multiple users in the same resource blocks by exploiting the characteristics of user inequalities in the power domain. In a cluster, the SIC approach is applied at the receiver side in order to exploit the channel differences between users. Thus, determining the number of users in each user group and user allocation are important tasks to improve the performance of NOMA systems. On the other hand, in mmWave-NOMA, one beam can support a group of users whose channel gains are strongly correlated. The grouping of a reasonable number of users with correlated channels needs to be optimized. User grouping involves two main tasks, user pairing (only two users in a group) and user clustering (two or more users in a group), which are reviewed in this section.

User Pairing
In NOMA, user pairing is a typical scenario and it plays an important role, where two users are served in a single resource block, such as a frequency or time slot. Moreover, compared with those in multiple-user NOMA, the delay and decoding complexity at users are shorter and lower. In two-user NOMA, the achievable rate is highly dependent on user pairing [11]. In user pairing, closed-form solutions of resource allocation in NOMA and OMA have been derived, and NOMA systems have been observed to outperform OMA systems [12]. When considering the gap between the channel gains of paired users, the results of [13] indicate that NOMA systems could improve the sum-rate and achievable rates. In [14], the authors compared the performance of OMA and NOMA in an intelligent reflecting surface-assisted downlink communication system in a user pairing scenario.
The user pairing problem has also been investigated for NOMA in three-dimensional visible light communication, and strategies for user pairing and PA have been proposed [15].
In [16], the authors studied the impact of pairing users in NOMA downlink transmissions. They also investigated the performance of NOMA systems with fixed PA and cognitive-radio-inspired NOMA scenarios, through fixed and opportunistic user pairing. On the other hand, through the examination of the average channel state information (CSI) feedback and perfect CSI feedback, the influence of PA on the fairness of NOMA systems was considered in [17]. In [18], a cooperative NOMA system was proposed, where users with strong channel gains were paired with users with weak channel gains. A two-user NOMA system testbed was introduced in [19]; the authors performed experiments by comparing 2.7 MHz transmission bandwidth for OMA users with 5.4 MHz bandwidth for NOMA users.
In [20], the authors considered the impact of pairing distant users and close users on the performance for the cell-edge, mid, and center users, and proposed two user pairing algorithms to accommodate all users. In addition, a user difference selecting access algorithm for a new user access scenario and a channel state sorting pairing algorithm for user pairing were proposed in [21] to improve the capacity of NOMA systems. Furthermore, the authors of [22] introduced a user pairing method in order to enhance the performance for a cell-edge user in the NOMA system. Regarding downlink NOMA systems, a greedy-search algorithm for user pairing was proposed in [23]. In [8,24], the energy efficiency and sum-rate for multicarrier NOMA systems were considered. In particular, the authors investigated four distinct user pairing algorithms in heterogeneous wireless networks in [25]. The findings of these studies indicate that the performance of NOMA systems can be significantly improved through user pairing.
When combining NOMA with multi-input multi-output (MIMO), the performance of the system can be enhanced considerably. In a MIMO-NOMA system, NOMA is used only between users in the same group. Thus, an exhaustive search is needed to obtain the optimal user pairing, which involves high computational complexity if a large number of users are present. To solve this computational problem, random pairing was introduced in [26]. Furthermore, in [27], a greedy user pairing algorithm was introduced, which depends on the channel gain dissimilarity and channel gain correlation to achieve near-optimal performance.

User Clustering
In the previous section, we summarized recent research on user pairing. However, in the user clustering task, the number of users in each group can be two or more, and the number of users can be different in each cluster. Thus, limiting two users in each cluster restricts the performance and sum-rate of NOMA systems. User pairing only focuses on the two-user scenario and, hence, the number of users is determined by the number of clusters. In this section, we survey the relevant studies on the clustering task, which involves grouping multiple users into multiple clusters.
In MIMO-NOMA transmissions, it is advantageous for users to be grouped into a number of clusters that are supported by a single beam [28]. Z. Ding et al. [29] proposed a mmWave-NOMA transmission scenario to take advantage of the fact that the channels of mmWave users in the same cluster are exceedingly correlated. However, the authors did not focus on the optimization problems of user clustering and PA. The promising combination of NOMA and mmWave MIMO systems was investigated in [28] when considering pre-grouped users. In [30], the authors assumed that the channel gains of users from disparate clusters are absolutely orthogonal and performed capacity analysis of mmWave massive MIMO in NOMA systems. Furthermore, a joint design of user grouping and PA were proposed in order to improve the performance of mmWave-NOMA systems; this design is based on predefined beamforming vectors [7].
Regarding resource allocation optimization problems, composite multiple-access systems that combine NOMA and OMA for multiple user access have been designed to improve energy efficiency, such as NOMA combined with OFDMA [31]. In this scenario, NOMA is utilized for each group after the users are allocated into multiple groups. The association is commonly determined via user clustering, and the clustered users in each beam decide the system performance. Furthermore, joint spatial division multiplexing (JSDM) was considered in some user clustering scenarios in [32,33]. However, the users in one cluster are covered by different beams in the JSDM; this concept is the same as that used in OMA. In [34], the authors aimed to optimize the system throughput for downlink hybrid NOMA systems under quality of service (QoS) constraints, which were based on a genetic algorithm.
Unsupervised machine-learning-based algorithms were used for user clustering in mmWave-NOMA in [10,35,36]. In these three studies, the user locations were distributed in accordance with the PCP, whereby users are physically clustered as in restaurants, coffee shops, and hotels. In [35], the authors proposed an expectation maximization method for user clustering, which groups users into multiple clusters, in addition to designing the beamforming vector and then applying NOMA in each cluster to serve multiple users. In addition, an online method was introduced in order to effectively update clusters in four different dynamic user scenarios. Meanwhile, Cui et al. proposed an unsupervised learning algorithm for user clustering that is based on the K-means method, in order to exploit the correlation between the mmWave channel gains of users [10]. A low-cost K-means algorithm for online user clustering was introduced to group new incoming users in the system. Furthermore, the authors derived an optimal PA to maximize the NOMA sum-rate. In [36], an approach for user clustering in the mmWave-NOMA system was presented for sum-rate maximization. In this approach, hierarchical clustering is applied to satisfy the initial requirement without knowing the number of clusters, which is appropriate for user distribution in an area.

Network Model
In this section, a downlink mmWave-NOMA transmission scenario is considered, which comprises one BS equipped with N transmit antennas that share N RF radio frequency (RF) chains. The BS is equipped with a fully connected HBF structure, which communicates with U single-antenna users, where U > N RF . All of the users are divided into K clusters with perfect CSI. U = {1, · · · , U}, N = {1, · · · , N}, and K = {1, · · · , K} denote the sets of users, transmit antennas, and clusters in this system, respectively. In the baseband, the digital beamforming (DBF) matrix D N RF ×N S pre-codes N S data streams. In addition, the analog beamforming (ABF) matrix A N×N RF delivers the digital signal to the N phase shifters from each RF chain. Thus, in order to obtain a more significant multiplexing gain, we assume that the number of RF chains is equal to the number of data streams and the number of clusters, which is, N RF = N S = K.
Users are grouped into numerous clusters, with different numbers of users in each cluster; hence, different beams serve different clusters. By applying NOMA, SIC is used at the receivers in each cluster to decode the message signals and combat the intra-interference. The positions of the users are modeled as a superposition of PCP in a small cell. Figure 1 illustrates the downlink mmWave-NOMA-based system. The spatial distribution of users in the system is introduced in the next Section 3.2 to describe this model.

User Spatial Distribution Model
Unlike most prior studies, which considered situations where user devices are uniformly distributed around the BS position, we focus on an appropriate real-world scenario, where users are located closer to each other to form real clusters, for example, offices, coffee shops, and waiting rooms [37]. In this scenario, the BS is situated at the center, with a radius R BS . The positions of the users are modeled while using a PCP at the center of each user cluster. We assume that the BS can serve K clusters, and the positions of the cluster centers are called the parent points. The parent point processes are uncorrelated and uniformly distributed around the BS. The union of all locations of users is independently and identically distributed around the parent points [38] in the k-th cluster, where k ∈ K. To maintain generality, we assume that f (Z (k) u ) is the probability density function of the user position Z (k) u ∈ R 2 with regard to the parent points. The Matérn cluster process is selected to model this scenario; in this process, a uniform distribution of user positions in a circle with radius R k around the parent points is assumed. This model is formulated, as follows:

Channel Model
In contrast to typical lower-frequency networks, the mmWave-based channel has limited scatter [39]. The large free-space path loss produces line-of-sight (LoS) and non-LoS (NLoS) paths. Hence, the geometric channel model is considered, which can suitably express spatial correlation features and the low rank of mmWave communications [40,41]. The channel vector of the mmWave system from the BS to user u can be modeled, as where L is the total number of multipaths, and l = 0 represents the LoS path. In addition, d u is the distance between BS and user u. Furthermore, γ LOS and γ NLOS are the path loss exponents of the LoS and NLoS paths, respectively. In addition, α u,l ∼ CN 0, σ 2 u denotes the complex gain of user u in the l-th path, which has a Gaussian distribution with zero mean and variance σ 2 u . Moreover, a(θ u,l ) represents a steering vector of size N × 1, which can be defined, as follows: where is the normalized direction of the l-th path, with angles of departure φ u,l . In this study, we assume that each path is an independent single propagation path [40]. In this term, θ u,l ∈ [0, 2π], ∀l ∈ {1, · · · , L}, ∀u ∈ U , and λ is the wavelength. D denotes the BS antenna spacing, with the assumption that D λ = 1 2 without a loss of generality [29]. In Equation (2), the first term represents the LoS path, and the second term represents the NLoS paths. In [42], the authors showed that the gain of the LoS path can be 20 dB greater than that of NLoS paths, which proves that the influence of NLoS is trivial if the LoS remains in the mmWave system [43]. According to these results, the adopted single-path mmWave channel model can be expressed as The subscript 0 is discarded to simplify the notation.

Signal Model
Assuming that the CSI of all users can be observed by the BS, the users receive different messages from the BS in accordance with the NOMA protocol during one time slot. The set of cluster indexes is C = {C 1 , · · · , C K }, and C k represents the set of users in the k-th cluster, β k,i s k,i denote the superposition messages for the cluster k, where {s k,i , i ∈ C k , k ∈ K} are the data symbols that are transmitted to user i in cluster k and they are supposed to be commonly independent. In this term, The PA for cluster k with p = p 1 , · · · , p K T needs to satisfy the total transmission power of system P t , as ∑ k∈K p k ≤ P t .
Hence, the received signal at user u can be formulated as Inter-beam interference where v u is the additive white Gaussian noise of user u with v u ∼ CN 0, σ 2 , where σ 2 is the noise power. h u denotes the N × 1 vector of the mmWave channel gain between BS and user u, while H is the Hermitian transpose of the channel vector. Moreover, W is the HBF matrix, which is defined as where each element in the ABF matrix A has to be a constant modulus (CM), which is expressed as Without a loss of generality, we normalize each column of W in order to satisfy From Equation (5), it is observed that the first, second, and third terms are the desired signal of user u, intra-beam interference, and inter-beam interference, respectively. In a cluster, each user suffers intra-cluster interference from different users. When applying NOMA, users with a strong channel gain can perform SIC in order to eliminate interference from users with a weak channel gain. Hence, the order of the channel gains of the users in a cluster needs to be determined. This problem is clarified in the next section.

Problem Formulation
In this section, the user clustering problem in mmWave-NOMA is discussed and investigated to maximize the achievable sum-rate of the system. In NOMA transmission, the BS sends messages to cluster k, where users decode their messages by applying the SIC mechanism [21]. Without a loss of generality, let Ω k represent the order of the decoding procedure defined by the SIC in cluster k; moreover, 1 ≤ k ≤ N, and Ω k (j) denotes the j-th decoded user in cluster k in the SIC procedure. The received signal-to-interference-plus-noise ratio (SINR) for user Ω k (j) in the k-th cluster is formulated as where I intra , I inter , and σ 2 are the intra-cluster interference generated by users in the same cluster, the inter-cluster interference power that is generated by other clusters, and the noise power, respectively. Without a loss of generality, we assume that the decoding order in the k-th cluster is expressed as where Subsequently, we can rewrite SI NR Ω k (j) as Hence, the achievable sum-rate of the entire mmWave-NOMA system can be expressed as Consequently, the sum-rate maximization problem in the mmWave-NOMA system can be formulated, as follows: max Constraint C1 specifies that each user only exists in one cluster. Constraints C2 and C4 are the total power constraint and the power-splitting coefficient constraint, respectively. The power-splitting coefficient should be greater than zero, which is indicated in constraint C3. Constraint C5 needs to be satisfied for all clusters in the system in order to successfully decode the messages in the mmWave-NOMA system. Furthermore, constraint C6 is the QoS constraint for all users. Constraints C7 and C8 are the CM constraint and the normalization for each column in the HBF matrix, respectively.

Overview and Preliminaries of ST-DBSCAN
ST-DBSCAN is an algorithm that is based on DBSCAN, which is a density-based clustering algorithm. DBSCAN [44] is a clustering algorithm proposed by Easter et al. This algorithm aims to detect the clusters and noise in a space. Furthermore, DBSCAN is based on the threshold for the number of minimum points in the same cluster (minPts) within the Eps ( ) radius. To understand the DBSCAN algorithm, some definitions and concepts are provided below [44,45].

Definition 1 (Neighborhood).
It is the distance between two points a and b and is determined by the Manhattan distance or Euclidean distance and denoted by dist(a, b). Definition 2 (Eps-neighborhood of a point). N Eps (a) = {b ∈ D|dist(a, b) ≤ Eps} is the Eps-neighborhood of a point a, where D is the database of points.

Definition 3 (Core object and border object
). An Eps-neighborhood of a core object contains significantly more points than an Eps-neighborhood of a border object does.
Definition 4 (Directly density-reachable). If a ∈ N Eps (b) and b is a core object, a point (object) a is directly density-reachable from a point b.

Definition 5 (Density-reachable).
A point a is density-reachable from a point b with regard to Eps and minPts if there is a set of points a 1 , ..., a n , a 1 = b and a n = a such that a i+1 is directly density-reachable from a i , for 1 ≤ i ≤ n, a i ∈ D.
Definition 6 (Density-connected). A point a is density-connected to point b with regard to minPts and Eps if a point s ∈ D satisfies that both a and b are density-reachable from s with respect to minPts and Eps.

Definition 7 (Cluster).
A cluster C with regard to minPts and Eps is not an empty subset of database D satisfying the "maximality" and "connectivity" conditions:

1.
∀a, b: (Maximality) If a ∈ C and b is density-reachable from a with regard to minPts and Eps, then b ∈ C. 2.
∀a, b ∈ C: (Connectivity) A point a is density-connected to point b with regard to minPts and Eps.
Definition 8 (Noise). Let C 1 , ..., C n be the clusters of D with regard to minPts i and Eps i , i = 1, ..., n.
The noise is then determined as a set of objects in the database D that does not exist in any cluster C i , i.e., noise = {a ∈ D|∀i : a / ∈ C i }.
ST-DBSCAN is an improvement over the DBSCAN algorithm from mainly three perspectives. First, with spatial, non-spatial, and temporal features, ST-DBSCAN can cluster not only spatial data, but also non-spatial data. Next, unlike DBSCAN, ST-DBSCAN can detect noise data using a density factor to designate each cluster. Finally, to address the difference between the values of two border objects in the opposite of a cluster, this algorithm compares the mean value of a cluster with the values of border objects.
ST-DBSCAN requires four parameters, Eps1 ( 1 ), Eps2 ( 2 ), minPts, and ∆ instead of only two parameters as in DBSCAN. 1 is the radius parameter between two points for spatial features with a latitude and longitude. Likewise, 2 is the radius parameter that is used for non-spatial features. In order to calculate the distance between two values, 1 and 2 , a distance metric, such as Cosine, Euclidean, and Minkowski, can be used. Meanwhile, minPts is the minimal number of neighbors that satisfies the 1 and 2 radius of a point. Finally, because of the minor differences in the non-spatial features of the neighboring positions, ∆ can prevent the combination of adjacent clusters.

ST-DBSCAN Based User Clustering
In NOMA-based systems, because users are physically clustered, the construction of clusters involves collecting information regarding all users and utilizing the unexplored knowledge about clustering algorithms to find the hidden distribution rules of users. Assuming that the CSI of all users can be perceived by the BS, we investigate the construction of the user clustering scenario. Accordingly, an ST-DBSCAN-based algorithm is proposed for user clustering in mmWave-NOMA systems.
In mmWave-NOMA systems, in order to reduce the inter-beam interference, it is desired that the users in the same beam remain close to each other or have strongly correlated channel gains, and that users in different beams remain distant from each other or have weakly correlated channel gains. Most studies focus on grouping users with strongly correlated channel gains [10,36]. In this study, we exploit the spatial distribution of users around the BS and group users who remain close together.
Because a user's position in a cell can be localized by the BS [46,47], we assume that the BS can observe the positions of users in the system. With a group of users adjacent to each other, the BS can form a narrower beam, which can provide a higher beam gain than a wider beam can [9]; this boosts the performance of the mmWave-NOMA system.
ST-DBSCAN is one of the state-of-the-art density-based spatial clustering algorithms that can be used to detect clusters in a spatial-temporal problem, which is appropriate for solving the similarity of user spatial distribution and user channel correlation problem in mmWave-NOMA systems. Hence, we apply the ST-DBSCAN-based user clustering algorithm for the mmWave-NOMA system; the algorithm is expressed as Algorithm 1. The Retrieve_Neighbors() function returns all points that satisfy definition 5 (density-reachable), from the selection of users with regard to 1 , 2 , and minPts. Furthermore, Cluster_Avg() and u.value are the average of the cluster and value of user u, respectively. Meanwhile, core users (core objects in definition 3) can find density-reachable neighbors while using a stack. In this algorithm, Pop(), Push(), and isEmpty() are the operations of the stack to remove the top object in the stack, add an object to the top of the stack, and check whether the stack is empty, respectively. if U i is not assigned in a cluster then 4: A =Retrieve_Neighbors(U i , 1 , 2 ) 5: if |A| < minPts then 6: Mark U i as noise user 7: else 8: Cluster_Number = Cluster_Number + 1 9: for j = 1 to |A| do 10: Assigned all users in A with current Cluster_Number 11: end for 12: Push(all users in A) 13: while not isEmpty() do 14: Current_User = Pop() 15: B = Retrieve_Neighbors(Current_User, 1 , 2 ) 16: if |B| ≥ minPts then 17: for all users u in B do 18: if (u is not noise user or not assigned in a cluster) and |Cluster_Avg() -u.value| ≤ ∆ . then 19: Mark u with current Cluster_Number 20: Push(u) 21: end if 22: end for 23: end if 24: end while 25: end if 26: end if 27: end for Output: Set of clusters K and set of users in cluster C k , wherek ∈ K.

Algorithm 1 ST-DBSCAN-based user clustering algorithm
An advantage of the ST-DBSCAN algorithm is that it can automatically detect the number of clusters to be formed, by grouping points that are close to each other and have strongly correlated non-spatial features. In contrast, with some other user clustering algorithms, such as cluster-head and K-means, the number of clusters must be set before initializing the algorithm. Identifying the number of clusters is difficult. Thus, if the number of clusters is not optimal, then the performance of the system will be poor. Because we do not need to designate the number of clusters in ST-DBSCAN in advance, we can find the optimal number of clusters and, thus, enhance the performance of the system.

Power Allocation with Fixed Beamforming
In this section, the PA optimization problem is solved by being divided into two sub-problems, intra-cluster PA and inter-cluster PA. Using the clustering process that is outlined in Section 5 and assuming that the HBF is fixed and arbitrary, the initial problem can be transformed to Although A and D are fixed and arbitrary, problem (15) is still non-convex and difficult to solve. To tackle this problem, the sub-optimal intra-cluster PA can first be obtained based on the given fixed and arbitrary inter-cluster PA. Next, we can obtain the sub-optimal inter-cluster PA by substituting the intra-cluster PA into problem (15).

Intra-Cluster Power Allocation
In this subsection, assuming that HBF can be suitably designed, the inter-cluster interference is negligible. Thus, with a fixed PA vector p and HBF matrix W, the intra-cluster PA optimization problem can be separated into K decoupled sub-problems, as follows: This is a problem similar to that solved in [10]. Hence, we can obtain a sub-optimal power-splitting coefficient β k for each cluster, as shown in (17)- (20), while using the results outlined in [10] Proposition 3.

The problem (16) is feasible if
The power-splitting coefficient β Ω k (j) can be expressed as where β Ω k (j) is the minimum power-splitting coefficient to satisfy the targeted SI NR for user Ω k (j), andβ Ω k (j) is the power-splitting coefficient in excess of SI NR for user Ω k (j). In particular, for user With j < |C k |,β Ω k (j) andβ Ω k (j) for user Ω k (j) are formulated as

Inter-Cluster Power Allocation
After obtaining the sub-optimal intra-cluster PA, problem (15) can be simplified by substituting (18)- (20) into problem (15), as follows: which is the inter-cluster PA optimization problem. In [10], the inter-cluster power was symmetrically allocated among clusters. In this subsection, we propose an inter-cluster PA strategy in order to maximize the sum-rate of mmWave-NOMA systems. Owing to inter-cluster interference, problem (21) is still challenging to solve. Thus, to solve this problem, we present the following proposition: Proposition 1. With the intra-cluster PA in Section 6.1.1, the constraint C2 in (21) is always satisfied with Proof. See Appendix A.
Under Proposition 1, constraint C2 in problem (21) can be eliminated, and the achievable sum-rate in this problem can be transformed to Because SI NR Ω k (j) are constants, problem (21) can be simplified as From (11) and (17)- (19), we can obtain the relationship between SI NR Ω k (|C k |) and p k as where a k and b k are defined as where beam Ω k (j) = |h H Ω k (j) w k | 2 , 1 ≤ j ≤ C k , Subsequently, the objective function of problem (24) can be transformed into Evidently, the function in (28) increases for p k . Therefore, problem (24) has its optimal solution under constraints ∑ K k=1 p k = P t . Consequently, while assuming that the inter-cluster interference is invariable, we apply the Lagrange multiplier method to solve problem (24). We set the Karush-Kuhn-Tucker conditions, as follows: The optimal solution of problem (24) can be obtained by solving equation sets (29), as follows: With the optimal solution in (30) and the variant inter-cluster interference, we propose an algorithm to allocate power to clusters, which is expressed as Algorithm 2. Initially, we set the cluster powers p k to be equal. Subsequently, we update the inter-cluster PA through every iteration by maximizing the objective function in problem (24). The algorithm is terminated at iteration T max , yielding the optimal solution p k = p (T max ) k . Algorithm 2 Inter-cluster power allocation algorithm Input: U, K, {C k }, P t , {h k }, {SINR k }, W, and T max . 3: for k = 1 : K do 4: Obtain the intra-cluster PA of cluster k in (17), (18), (19), and (20) 5: Obtain p k in (30) 6: end for 8: end for 9: p k = p (T max ) k Output: Inter-cluster PA: {p k }.

HBF with BC-PSO
HBF is a state-of-the-art technique that can reduce cost and improve system performance in 5G communications [48]. Hence, we apply the HBF solution proposed in [9], which can suppress inter-cluster interference and increase the achievable sum-rate. Because of the non-convex CM constraint of ABF, it is difficult to achieve optimal HBF. Thus, while using the aforementioned method, we can obtain sub-optimal HBF. Initially, to reduce the inter-cluster interference, an approximate zero-forcing (AZF) method is used to design the DBF, where the ABF matrix is fixed and arbitrary. Next, the BC-PSO algorithm is utilized to deal with the ABF problem [49]. A summary of this solution is shown below.

DBF Using AZF
The DBF is designed while using the AZF technique to reduce the inter-cluster interference with fixed and arbitrary ABF. In each cluster, the rate gains are achieved for the user with the strongest channel gain. Hence, the channel response vector of the user with the strongest channel gain in each cluster is selected as the equivalent channel vector. Consequently, the equivalent channel matrix H N×K is expressed as Next, the AZF method is used to generate the DBF matrix, as where † is pseudo-inverse. In addition, the DBF matrix should be normalized to each column to satisfy constraint C8 in problem (14).

BC-PSO Based ABF
Due to the complexity of the closed-form term of R sum over A, the ABF optimization problem cannot be solved while using conventional approaches. Furthermore, it is difficult to design the ABF owing to the high dimensions of A, which is, N × K. In this study, we apply the BC-PSO proposed in [9] to deal with this problem.
E particles are randomly initialized at position A with velocity V in the N × K-dimensional search space S. In each time step, the position and velocity of each particle are updated, as follows: for n = 1, 2, . . . , N; k = 1, 2, . . . , K. p best denotes the personal best location for each particle, and g best is the global best location for all particles. The fitness function is adopted in order to determine the best position for the particles. The inertia weight ω decreases regularly in each iteration, thus increasing the convergence speed. In addition, parameters c 1 and c 2 denote cognitive and social factors, respectively. r() is a random number function that is uniformly distributed in [0, 1]. . In each iteration, if the particles do not move into the boundaries, they are forced to the boundaries. Consequently, the particles can fly around a restricted search space and then converge.

Simulation Results
In this section, the performance of the proposed ST-DBSCAN-based algorithm for the user clustering problem and the performance of the inter-cluster PA algorithm are evaluated through Python and MATLAB simulations. We consider a downlink power-domain mmWave-NOMA system with users that are spatially clustered following the Matérn cluster process. The parent points are initialized around the BS following a uniform distribution with the range R BS = 5 m. User locations are uniformly distributed around the respective parent points with a radius of R k = 1 m. First, the LoS scenario is considered with the channel model described in Equation (4). The path loss exponent of LoS is γ LOS = 2, and all users i ∈ U satisfy the same QoS constraint, which is, SI NR i = SI NR = 0.02. Moreover, the parameter settings for Algorithms 1 and 2 are I = 100, c 1 = c 2 = 1.4, ω max = 0.9, ω max = 0.4, T max = 10, T PSO max = 100. In a small area with R BS = 5 m, such as coffee shops, restaurants, and offices, users gather around the parent points (tables, receptions). Hence, the parameters of the ST-DBSCAN algorithm, minPts and 1 , are set as 1 user and 2 m, respectively. The distance functions that are used in Algorithm 2 are the Euclidean and the cosine distance functions for 1 and 2 , respectively. The coordinates (latitude and longitude) of the users and their channel gains are the features that are exploited for 1 and 2 , respectively, in this scenario. Furthermore, 2 and ∆ satisfy where h min and h max are the users with the lowest and highest channel gains, respectively. First, the performance of our proposed ST-DBSCAN-based user clustering algorithm for a NOMA-based system is evaluated through a comparison with different clustering algorithms with varying total power signal-to-noise ratios (SNRs), as illustrated in Figure 3. To evaluate the performance of the proposed algorithm, we used the K-means algorithm and the Cluster-Head algorithm, which were proposed in [10,50], as benchmarks. Furthermore, we compared the performance of the mmWave-NOMA system with the proposed algorithm and the random clustering algorithm. The feature that is used in the K-means-based algorithm, cluster-head-based algorithm, and random clustering algorithm is the user's channel gain, which is different from using both user coordinate and user's channel gain, which is exploited in our proposed algorithm. It can be observed from Figure 3a that, under the LoS channel model, our proposed ST-DBSCAN-based clustering algorithm can yield a higher sum-rate than the benchmarks. Moreover, we consider the path loss exponent to be γ NLOS = 3 and the total paths L = 2 NLoS, including 1 LoS path and 2 NLoS paths. From Figure 3b, we can see that the ST-DBSCAN-based user clustering algorithm can also improve the sum-rate of the mmWave-NOMA system under the NLoS channel model.  where U, K, N, and T are the number of users, clusters, antennas, and iterations for the clustering algorithms, respectively. As we can see, the complexity of ST-DBSCAN is lower than that of K-means and cluster-head, but higher than that of random clustering. However, the performance of ST-DBSCAN is better than that of the other algorithms. Thus, ST-DBSCAN is suitable for the user clustering problem under investigation. Next, the user clustering performance for the mmWave-NOMA system, mmWave-OMA system, and mmWave-NOMA Ideal is assessed, as shown in Figure 4. Figure 4a shows that the sum-rate of mmWave-NOMA is greater than that of the conventional mmWave-OMA system. This result shows that NOMA can enhance the spectral efficiency of mmWave for multiple-user communications. Specifically, "mmWave-NOMA Ideal" is our proposed method without inter-group interference, i.e., I Ω k (j) inter = 0. Figure 4b shows that the sum-rate achieved while using our proposed approach is asymptotic to that achieved using the ideal scheme, which indicates that our approach can appropriately eliminate inter-cluster interference.
In order to evaluate the performance of our proposed inter-cluster PA algorithm, we compared it with a no-inter-cluster PA, where p k = P t K , k = {1, 2, · · · , K}. It can be observed from Figure 5 that the proposed algorithm can significantly improve the sum-rate of the mmWave-NOMA system, as compared with the no-inter-cluster PA.
In the future, we will investigate the effect of the ST-DBSCAN algorithm on the user clustering problem in NOMA systems. Specifically, system models with more cells and more users will be considered. Moreover, with the development of unmanned aerial vehicles (UAVs), we will focus on UAV clustering tasks in order to improve the performance of communication systems. Recent research has focused only on traditional methods to group UAVs [51]; thus, we will investigate the effectiveness of the novel ST-DBSCAN algorithm for UAV clustering problems in wireless network systems.

Conclusions
In this study, we considered a downlink mmWave-NOMA system with an HBF structure. To solve this problem, we divided it into sub-problems of user clustering, PA, and HBF. To utilize the user distribution, an ST-DBSCAN-based user clustering algorithm was proposed for grouping users into different clusters, in order to enable users in different clusters to be served simultaneously by the NOMA system. Specifically, users in close proximity and with strongly correlated channel gains are grouped into the same cluster. In addition, we investigated the PA and HBF to improve the performance of the mmWave-NOMA system. We applied the intra-cluster PA that was proposed in [10] and then developed an inter-cluster PA algorithm to maximize the sum-rate of the system. Next, the BC-PSO algorithm [9] was used to suppress the inter-cluster interference.
The simulation results show that the proposed ST-DBSCAN-based user clustering algorithm enhances the performance of mmWave-NOMA systems. A comparison of the proposed algorithm between an mmWave-NOMA system and mmWave-OMA system shows that the sum-rate of the former is higher than that of the latter. In addition, a comparison of the sum-rate between the ST-DBSCAN-based clustering algorithm and other benchmark user clustering algorithms indicates that the proposed algorithm outperforms other user clustering algorithms in a mmWave-NOMA system. The simulation results also show that our inter-cluster PA algorithm and HBF solution can eliminate inter-cluster interference and enhance the sum-rate of the system.

Conflicts of Interest:
The authors declare no conflict of interest.