Automatic Recognition of Beam Attachment for Massive MIMO System in Densely Distributed Renewable Energy Resources

: Several large-scale and distributed systems such as renewable energy systems (RESs) require ubiquitous and reliable communication. RESs are designed to provide efﬁcient power management and improve both energy production and consumption. Decision making in RESs heavily depends on real-time communication. Fifth and sixth-generation (5G, 6G) wireless networks promise to deliver signiﬁcant communication advantages to RESs including ultra-low latency, high throughput and improved coverage. However, the communication behavior in RESs is categorized as unpredictable due to aspects such as system ﬂexibility and equipment heterogeneity. This may affect the stability of the entire RES, which results in further issues such as signal reliability and degraded coverage. Therefore, precise identiﬁcation of user equipment’s (UE) location greatly improves the sustainability of 5G and 6G wireless services. In this work, we propose a novel low-complexity technique to automatically recognize UE locations in an area of interest. The approach aims at providing precise identiﬁcation of UE with minimum memory and feature requirements. We use the lazy learning approach to build a prediction model to construct beam-attachment maps. We then train the model to provide distributed intelligent models to automatically recognize beam-attachment indexes. We compare the proposed approach with instance-based techniques to measure its ability at predicting beam-attachment maps. The results show that the proposed model has the ability to provide an accurate prediction with respect to the beam-attachment index (around 100%) with minimal complexity.


Introduction
Several emerging technologies and applications such as the Internet of Things (IoT), renewable energy systems (RESs) and distributed edge computing have been realized due to the evolution of 5G networks. Those emerging technologies heavily depend on fast, secure and reliable communication. For instance, consider the concept of IoT, which aims at connecting multiple physical objects to enhance the quality of operations [1]. Similarly, relying on connectivity, distributed edge computing brings computation closer to data sources to improve systems' efficiency and reliability. Currently, there is a great shift towards building distributed systems that are based on 5G and 6G networks to promote ubiquitous communication [2]. In fact, this is due to the improvements that are provided by 5G networks, which include ultra-low latency, increased availability and significant network capacity.
Multiple organizations have been working towards developing reliable and efficient wireless technologies in the last decade. As a result, 5G wireless communication has been developed and deployed in several applications. Furthermore, the work towards developing 6G networks has already begun. Due to the advances in 5G technology, several aspects of the network design have been standardized. One of these is 5G New Radio (NR) which is the global unified standard of the 5G wireless air interface. Fifth generation The second is reducing the required features that are needed to estimate the beam index. This improves algorithm control, precision and traceability.
The proposed approach requires minimal features to precisely identify a UE location. It only requires the longitude and the latitude for a UE. This simplifies the computation process. It also reduces the required memory and CPU computation. We compare it to an instance-based classifier to prove the effectiveness of the proposed approach Additionally, through the probability of correct recognition, we evaluate the effect of the size of the learning set in our approach. Given that, we can summarize the contribution of this work as follows: • Proposing an approach to recognize beam attachment for massive MIMO in multiple heterogenous cell environments. • Utilizing lazy learning approach to improve the precise recognition of beam-attachment index in 5G and 6G networks. • Reducing the complexity of the recognition process by reducing the number of required environmental features. This improves the efficiency of the algorithm and reduces the required amount of memory.
The remainder of this paper is structured as follows. Section 2 provides an overview of the main network concepts and challenges that are faced by 5G and 6G networks. Section 3 describes the notion of edge intelligence and the use of 5G networks in RESs. Section 4 presents the related work. Section 5 describes the network system model that is used in this work. In Section 6, we present the main approach for recognizing the beam-attachment index for UE. Section 7 describes the simulation and the results based on the proposed approach. Finally, a discussion of the conclusion and future work is provided in Section 8.

Overview and Challenges
This section provides an overview of the main concepts that are discussed in this work. It describes beamforming and M-MIMO, which are fundamental concepts in wireless networks. Additionally, it highlights some of the challenges that face the development of 5G and 6G networks.

Beamforming and M-MIMO
Beamforming and M-MIMO are key technologies in the design of 5G and 6G wireless networks. They enhance network quality requirements such as reliability, signal strength and availability. Beamforming is a signal-processing technique used in antenna communication to deliver directional signals for sending or receiving data [15]. It is also known as a radio frequency management approach to control the strength of the signal in wireless communication. In beamforming, signals are focused at particular angles to achieve greater coverage for selected spatial areas or domains. This is attained by combining multiple hardware elements inside an antenna array. Beamforming provides multiple benefits in wireless communication. For instance, using spatial selectivity to focus the signal on specific direction results in a stronger signal quality, which in turn delivers data faster and reduces error occurrence. In fact, beamforming is one of the major techniques that enhances the precision of 5G networks and allows them to deliver highly reliable and effective communication capabilities.
Massive multiple-input multiple-output (M-MIMO) is another important radio technology that contributes to the quality of wireless 5G communication [16]. In M-MIMO, multiple antennas are deployed at both sides-the sender and the receiver-to enhance the throughput capacity of a radio link. M-MIMO is built upon three wireless communication technologies, which are spatial multiplexing, beamforming and spatial diversity. In radio communication, data signals might be transmitted independently in separate encoded signals or streams. Consequently, they are received with different direction of travel and different time delays. Therefore, the M-MIMO approach utilizes the deployed antennas to receive the different streams and then mathematically combine them with other streams to enhance the quality of the transmitted signal. In fact, it can be said that M-MIMO provides two main benefits, which are improved wireless coverage and increased network capacity.

Challenges in 5G and 6G Development
Although beamforming and M-MIMO are considered as key enabling technologies in 5G and 6G networks, they still encounter significant challenges due to environmental aspects. For instance, consider beamforming, which is an approach to leverage communication signals through targeting the beam at a device or group of devices that are in the line of sight of a BS. This means that antennas in both devices and BSs must be designed to cope with the complexity of aiming a beam at a specific cellular environment, including significant physical and virtual obstructions. Another challenge is verifying the strength of the beamforming signal at the physical RF antenna [17]. This is essential to validating the correctness of the beamforming weighting algorithm. Verifying the beamforming signal also contributes to validating the strength of the MIMO signal. In fact, all these challenges show the great demand for utilizing the new attachment recognition algorithm to lower the complexity of beamforming signal design.
On the other hand, M-MIMO technology still faces a set of challenges. For example, those challenges start from the deployment of M-MIMO technology. This is because M-MIMO requires large-scale architectures (i.e., large equipment, larger-sized towers). This in turn imposes further regulation since the setting of M-MIMO requires special physical arrangements. Another major issue is pilot contamination, which is the case that arises when the set of nonorthogonal pilot sequences from nearby cells overlap with each other [18]. Furthermore, estimating the accurate channels in the M-MIMO is a challenge even with the time division duplexing. This is due to the large number of antennas and to the complexity of the estimation process.

Edge Intelligence and 5G Networks in RESs
This section describes the importance of edge intelligence (hereafter interchangeably referred to as edge computing) in addressing several issues in 5G networks. It also describes the potentials and challenges of adopting 5G networks in distributed RESs.

Edge Computing
Edge computing is a computational paradigm that promises to address several challenges that are currently being faced by cloud-based systems. Systems that are based on the cloud computing paradigm have continuously encountered challenges such as latency and scalability [19]. This is due to the nature of the paradigm. To illustrate, the cloud computing concept is based on delivering multiple services (e.g., computation, storage) using communication networks. This means that data are moved from the source to the cloud for processing, analysis and storage. Consequently, latency arises, causing a significant issue since moving the data from sources is subject to routing, queuing and interference. Scalability is also another issue since the probability of bottleneck occurrence increases as the number of data sources increases. Given the aforementioned challenges, edge intelligence aims at addressing those issues by bringing computation and decision making closer to the edge of the network.
Edge intelligence greatly contribute to addressing multiple issues in IoT applications and distributed systems. This is because data analysis and decision making are performed within the application domain, which enhances systems' quality, including reliability, latency and efficiency. Fifth generation networks significantly contribute to the evolution of edge intelligence. This is due to the unique characteristics of 5G networks, which were not considered in previous network generations. For instance, 5G networks are designed to deal with the massive amount of data generated from a significantly large number of devices. Additionally, 5G networks are constructed with great consideration of the heterogeneity of the environments, applications and devices [20].
Fifth generation networks inherently support the utilization of the quality of service (QoS), which is imposed by the nature of highly interactive systems. Fifth generation networks also provide extensive support to wireless-based devices (e.g., sensors, monitors), which are widely adopted in multiple distributed systems. On the other hand, edge computing contributes to the evolution of 5G networks. This is because network equipment can use intelligence techniques and algorithms to autonomously improve systems' quality. For example, BS can use intelligence algorithms to manage network and deliver optimized coverage. In fact, 5G networks promise to deliver improved connectivity, and in turn edge computing promises to deliver intelligence. Consequently, combining these two approaches allows systems to operate and execute low-level decisions in an autonomous manner.

5G Networks in Distributed RESs
RESs greatly depend on the connectivity of the supply side with the demand side to efficiently manage power generation and consumption. 5G wireless communication is considered as a suitable technology to connect different devices and equipment in RESs [21]. This is mainly due to the nature of the utilized devices in RESs (e.g., smart meters, sensors, UE) since they inherently support wireless communication [22]. Fifth generation communication technology provides multiple benefits for distributed RESs. For example, 5G networks have the ability to deliver high throughput even with the large number of connected devices and equipment. Additionally, 5G technology provides ultralow latency, which is a key aspect in connecting smart devices with decision systems in distributed RESs. Furthermore, due to the nature of distributed RESs and since they are implemented in rugged terrain, which makes them subject to interference, 5G networks provide high reliability and data redundancy to ensure the delivery of data.
Distributed RESs depend heavily on connecting different devices, domains and equipment [23]. Different applications within RESs require the communication system to cope with high demand of transfer. Multiple domains within RESs contain several types of equipment. They are covered by different types of network cells such as macrocell, microcell, remote radio head (RRH) or femto base station (FBS). These cells form intra-networks within RES communication systems. The collection of those heterogeneous networks is known as HetNet [24]. Figure 1 shows an example of HetNet, where multiple systems, devices and equipment items communicate using different 5G network cells. The figure shows that data can flow top-down (e.g., from a control center to filed equipment and devices), or bottom-up (e.g., from aggregation and data acquisition systems to control systems). The figure also shows that produced energy can flow in a bidirectional manner from generation to consumer and vice versa.

Residential and Industrial
Consumer Domain Given the above discussion, it is seen that 5G wireless technology greatly improves connectivity in distributed RESs. It is also seen that the management of the different types of network cells becomes significantly complex. One of the major issues that need to be addressed in order to realize the full potentials of 5G wireless technology is interference management. This is due to the uncoordinated and unpredictable nature of HetNet in RESs. To illustrate, there is a massive growth in adopting UE in distributed RESs [21]. This means that UE items are periodically introduced and removed from distributed RESs, which makes interference management not only a complex task, but also contentious. Therefore, optimized beam-attachment approaches are required to ease network management. Additionally, different UE items generate significant and unpredicted data traffic. In turn, the communication system needs to deal with this unpredictability and provide the reacquired load management and coverage.

Related Work
This section presents some of the literature works. It covers two research domains. The first one is the beam management for 5G communication using Artificial Intelligence (AI) techniques. The second one is the implementation of 5G wireless communication in applications such as smart grids and distributed RESs.
The application of AI techniques including machine learning (ML) techniques in wireless systems has received considerable interest in recent years. They are first used for the 5G deployment and it is expected that they will be implemented at the UE level. AI techniques can be used to help the coordination between the BS and UE to speed up decisions based on models built using training sets. Those will improve the system's performance in terms of throughput and reliability.
In [25], the authors proposed a deep-learning-based beam management and interference coordination, where the direction width and transmit power for each beam are simultaneously optimized. In [26], the authors showed that learning-based beam training can offer low latency and higher throughput compared to the conventional methods based on exhaustive beam search, where the environments can be learned with consideration of blockage. Here, parameters including blockage or channel correlation of a UE can be exchanged between BSs and/or reported by the UE. In [27], the authors designed online learning algorithms for beam pair selection and refinement using a multi-armed bandit framework. It allows the update of the database by including new observations during the beam-tracking process. In [28], a machine learning technique is developed to correctly recognize the future channel state information (CSI) based on the previous CSI.
Due to advances in 5G technology, mobile cellular networks have been widely proposed to be adopted in smart grids and RESs. The work in [21] shows the advantages and the potentials of adopting 5G technology in smart grids. The authors show how 5G networks improve machine-type communications. They also present the concept of adopting edge computing to improve 5G communication in smart grids and their applications. The authors focus on showing how decision making is improved when using 5G-enabled applications. They present the use of 5G networks in applications such as state estimation systems and power distributed optimization. They also provide a study on integrating smart grids and their applications with improved wireless technologies.
The work by Carrillo et al. [17] also shows the benefits of adopting 5G technology in smart grid communication. In particular, the work focuses on the impact of 5G networks on the management of communication in different domains in a smart grid. It shows radio access network slicing can address the communication interoperability issues that are faced by smart grids. The authors provide a radio access slicing framework based on artificial intelligence to support communication in field devices and equipment. The slicing framework is used to create different communication environments to address the heterogeneity of different services and data in smart grids. As a result, the research outcomes show the advantages of adopting 5G networks in smart grids.
Given the above reviews, our work in this paper provides a low-complexity approach to improving beam management and multiuser scheduling through modeling of the mapping between UE geolocation and its serving beam in one of the main applications in smart grids, i.e., RESs. More specifically, it aims to predict the beam-attachment index in 5G wireless networks that is adopted in RESs. Our work focuses on RESs as a domain of research since they are distributed in nature and also since the communication behavior in RESs is unpredictable due to factors such as interference and wireless signal fading.

System Model
This section describes the communication system model. The model in this work follows an approach similar to the system model defined in [29]. However, the application of wireless communication in this work is intended for a different environment. It simulates 5G communication in a dense and flexible distributed RES environment. It is worth mentioning that this system model can be seen as a common model since 5G networks follow similar communication behavior. In this section, we also illustrate the assumptions in this work. Both the system model and assumptions are designed to represent a real-world 5G wireless network that is deployed in a distributed RES environment.

Considered Model and Assumptions
The system model is designed to simulate the real-world development of the 5G Macrocell Base Station (MBS). The assumption is that this MBS is deployed in a densely distributed RES environment. The model represents a hexagonal network which consists of two adjacent macrocells m c , c = 1, 2. The represented BS c in the model employs an M-MIMO system with fixed GoBs. It is denoted by B BS c , in the downlink (DL) as in [29]. For each BS in the system, a specific number of antenna Vertical Dipole Array is defined. The number is assumed as BS c , a N x × N z (sub). Additionally, a defined distance is provided for a square metallic conductor, and it is λ 2 . In this definition, λ represents the wavelength and N x = N z = 16. Therefore, the narrowest beams are produced by the antenna array. Based on this definition, the radiation patterns are coupled with the radiating elements. This means changes are applied to the radiation patterns only based on the type of radiating elements. To simplify the model, an infinite perfect electrical conductor (PEC) is used in the approximation process for the utilized reflector. Hence, N x (N z ) elements are defined for each row (column) and they are equidistant with a spacing of d x (d z ). It is worth mentioning that this work can be generalized to include more than two cells to cover larger and more heterogenous cell environments.
One of the main concepts in modeling beam-attachment maps is determining the angle of a beam direction. In this model, the direction is specified by the angle (θ b , φ b ) in circular coordinations that are defined by θ and φ. The accumulated reception for an antenna in a BS c for a given user u c is channeled to (θ u c , φ u c ). This reception gain is attached to the beam b u c and it is defined by θ b uc , φ b uc . The total antennal gain in the above-described user is given as: where g 0 represents the maximum gain in the following direction θ b uc , φ b uc . On the other hand, f (.) represents a function that describes a normalized gain. Additionally, a separable f is assumed with excitation in the x and z directions. The resulting form of f is given as: where AF x θ u c , θ b uc , φ u c , φ b uc and AF z θ u c , θ b uc are the array factors in the x and z directions and are given by: and where Another important aspect in modeling antenna is realizing the PEC impact. The shapes of radiating elements that are created by PEC can be used to describe its impact. AF y (θ u c , φ u c ) considers the shapes of the radiating elements, where it is defined as: Given the above term definition, the pattern of the normalized gain of the dipoles g d (θ u c ) is approximated as: The power conservation equation that defines the term g 0 is given as follows: Based on the above definitions, a beam is defined as sub-array rectangular size and its direction is defined by θ b uc , φ b uc .

Connection Procedures
Before the data-connection phase, each BS c needs to search the suitable serving beam for each UE. This searching procedure is made in the initial access phase. In fact, BS c sends multiple beamformed Channel State Information Reference Signals (CSI-RSs). These CSI-RSs are used to acquire the spatial angle between BS c and UE as shown in Figure 2. Assuming that the number of CSI-RSs is N B , then W is defined as W = w 1 , . . . , w k , . . . , w N B , where w k is the precoding weight of the k-th beam. Given that UE selects and feeds back to BS the best beam index among the N B beams. The best beam is chosen to maximize the received power. It is also utilized to enhance the corresponding Channel Quality Indicator (CQI).
In case of dual-polarized antennas, it is additionally required to feed back co-phase information to adapt the channel orthogonalization between layers. Upon the receipt of the beam index by the BS c , the weight assigned to the selected beam is employed for data transmission. Based on the described connection procedure, u is utilized to denote the useful signal received power by a given UE. The location of u is denoted by l u . The beam that is attached to u (b u ∈ B m ) in a location is defined as linear scale, and written as: where P m is the transmit power of m. Additionally, ς is considered as a constant. The value of this constant is defined by the environment and it is based on the carrier wavelength. D m (l u ) represents a connection distance. In particular, this distance represents the length between u and m. In this distance, κ specifies the path-loss exponent. G b u m (l u ) represents the gained beam at the antenna b u which serves u that is defined in a location l u . F(l u ) defines the fast fading term. Its value is essential and it is used for modeling residual multipaths which are due to reflections from surrounding buildings. The last parameter in the equation is S(l u ) and it represents the log-normal shadowing. This parameter provides effect measurements since it considers environmental obstacles between m and u.  Figure 3 presents the Reference Signal Received Power (RSRP) in an area that is covered by two interfered-with cells with a resolution of 1 m × 1 m. This resolution choice can be justified by the fact that the localization accuracy is around one meter for 5G outdoor applications [30]. It can also be justified since we consider applying 5G wireless communication in a distributed RES environment where beams' radiated power is densely interfered with. This radio environment map is constructed based on real-world 5G interfered cells. Equation (10) is used to generate the illustrated radio map based on the above defined resolution parameters. In the figure, the X axis and the Y axis show the distribution of the radiated power of all considered beams. The boresight (i.e., the axis of maximum radiated power) of the antenna is shown in the right of the figure. To maintain a good connection with the best beam, UE must periodically measure the RSRP. Consequently, a considerable time should be dedicated to the beam-attachment phase. Typically, this is a complex task and its efficiency depends heavily on the utilized algorithm. Given that, the purpose of this work is to propose a low-complexity algorithm based on machine learning techniques. The aim is to automatically recognize the best beam index for a given UE through its location. In the following, we present our proposed beam-attachment index-recognition approach.

Beam-Attachment Index Recognition
This section describes the proposed beam-attachment-recognition mechanism. It also illustrates the comparative study that is carried out in this work. It defines the types of algorithms and classifications. In the approach use cases from distributed RESs are used.

Definitions and Approach
As described in Section 3, distributed RESs consist of a wide range of communicating equipment and devices. The communicating entities in an RES environment are periodically added and removed. Therefore, the wireless communication system must provide a flexible approach to recognize each UE within the communication range. Additionally, the approach should not introduce complexity into the system. It should also provide precise beam-attachment recognition. Given that, the following describes a low-complexity algorithm to recognize a beam-attachment index for a UE (denoted u) and located at l u . The algorithm utilizes edge intelligence techniques to improve the efficiency of beam attachment for a given UE. It is based on location key features given as (x u , y u ).
In this work, we consider a non-standalone 5G NR which are commonly implemented and proposed in smart grids and RESs [31]. The Long-Term Evolution (LTE) Positioning Protocol (LPP) is used in this non-standalone 5G NR to facilitate communication between the core network and UE. The exchanged data represent UE side information that is distributed to different all gNodeB (gNBs) (i.e., a 5G BS NR). The geolocation information that is exchanged in the network for u, l u , represents the two-dimensional vector including the absolute latitude and longitude information. It can be defined as: where x u and y u are the latitude and longitude coordinates, respectively. Note that we need to convert from longitude and latitude (x u , y u ) to native map projection (X u , Y u ). Figure 4 shows the flowchart of the proposed beam-attachment-recognition approach. It describes the attachment technique of a given location for a UE. As shown from the figure, the first phase is collecting the UE coordinates using LPP. This is essential since it provides side information from UE. Once the UE coordinates are specified, they are converted into native map projection coordinates. This provides a comprehensive view of the network and enhances the corresponding UE location in the considered environment. Given that, a training phase is then established. This later phase involves building a classifier from a learning database (DB). Thereafter, the test phase is performed to recognize the beamattachment index based on the built classifier. It is seen from the figure that the definition phase requires only two features for each UE, which are the coordinates (x u , y u ). Similarly, the conversion phase results in the same number of features (i.e., coordinates to native map projection). This shows that the proposed algorithm in this work simplifies not only the computation process but also memory and processing requirements. In fact, several positioning algorithms such as the ones proposed in [32][33][34] require multiple environmental features, which produces quality positioning results. However, this induces complexity in terms of computation, memory requirements and training requirements.

Classifiers Comparison
Different specific classifiers can be used to implement the above-described beamattachment recognition approach. Therefore, multiple classification algorithms (i.e., K-Nearest Neighbors (KNN), Decision Tree, Support Vector Machines and KStar) have been considered. Based on the attributes of each classifier and given the initial performed tests, KStar and KNN are chosen in this work. Several extensive tests are performed to observe different aspects such as the classifier's true positive and false positive rates. Given the results of the tests, we carry out a comparative analysis according to the defined metrics for both KStar and KNN. The objective of this comparative study is to specify the best classifier to be implemented in the recognition approach in this work.
KStar and KNN have unique attributes in terms of classifications, sorting and directed search. For example, KStar has the ability to operate on the fly. This means that the sorting graph does not need to be entirely in the main memory before the sorting process starts [35]. This enhances execution time as well as memory utilization. Additionally, KStar facilitates the optimized classification process since it can be guided by heuristic functions. Similarly, KNN provides several advantages over other classification methods. KNN is an instancebased learning method, which means it does not require a training period [36]. This allows for adding new data in a seamless manner without affecting the performance or accuracy of an algorithm. Given these advantages, it is concluded that KStar and KNN are suitable for the classification process in wireless environments.

KStar Classifier
The KStar algorithm is considered an instance-based classifier. Using the algorithm, the test set containing the projected coordinates of N UE will be divided into K clusters. Here, KStar employs the entropic distance measurement to compute the distance among instances. Then, this entropic distance will be used for retrieving the most similar instances from the dataset. Thereafter, the projected coordinates of the considered N UE will be attached to the most expected beam-attachment index, Beam m , where m = 1, . . . , K. The KStar probability is expressed as: Based on the above-defined probability, there are multiple paths for reaching a beam. The probability of given coordinates (X u , Y u ) that might reach to Beam m via a random path is given by P * . This definition has multiple benefits. For example, it allows handling the missing values. It also deals with real-value and symbolic attributes in the recognition process.

KNN Classifier
KNN classifier is an effective approach belonging to a lazy learning category. With this technique, a majority vote is performed to assign new UE coordinates to the Beam m with the highest similarity. In this approach, the distance is the key factor to identify the similarity between two projected coordinates. For instance, assume there are multiple pairs {(F 1 , Beam 1 ), . . . , (F L , Beam L )} where F i = (X i , Y i ) ∈ R 2 and Beam i ∈ {0, 1, . . . , K} for a new i. In this case, KNN uses the majority vote to identity the nearest beam. In this work, we use the Euclidean distance in KNN to identify the similarity between two vectors. It is given by:

Classifier Performance Evaluation
Based on the above definitions, we evaluate the classifiers using a set of metrics. We compare the performance of KNN and KStar and we show their performance using a dataset with real beam-attachment indexes. The metrics are given and identified in the context of this work as follows: Given the above description of the utilized metrics, Equation (14) identifies the precision metric, Equation (15) identifies the recall metric and Equation (16) identifies the F-measure metric.

Simulation and Evaluation
In this section, we describe the settings of the performed experiments. We illustrate the results of the comparative study to measure the performance of KNN against KStar. We also systematically show the effectiveness of our approach by testing it with different learning sets.

Setup and Parameters of Experiments
In this section, we show the simulation results and we test the viability of the proposed approach in this work. To perform the simulation, we consider the two neighboring BSs with the M-MIMO deployment that is described in Section 5. The setting of the performed experiment simulates BSs that are deployed in RESs. The neighboring BSs are intended to connect the power-generation domain with the consumption domain. To bring the simulation closer to the real RES environment, we consider the wireless network parameters. We also consider the characteristics of the communication channels within the wireless network. In fact, combining network parameters with channel characteristics yields precise results that describe real BS settings in real RES environments. This combination also provides significant insights about the expected behavior of the communication channels.
The simulation parameters for the network are listed in Table 1. Those parameters describe the type of communication traffic that is allowed based on the given setting in the table. On the other hand, Table 2 illustrates the channel characteristics. The table describes the behavior of the traffic in the performed experiments. The parameters in Tables 1 and 2 are designed to simulate real HetNets wireless communication environments as described in [37][38][39]. Several simulation tests are carried out to highlight the benefits of the recognition approach for identifying beam-attachment indexes. A large dataset containing 640,000 beam-attachment indexes is used. This dataset represents a uniform grid in real-world wireless environment settings. The grid is generated from 800 m × 800 m locations. The resolution of the provided uniform grid is 1 m × 1 m. Given the description in Section 6, a training phase is carried out once data are collected and converted. In this phase, the training set is first built for each beam index based on 10% extraction from the whole dataset. Based on that, we compare the performance of the classifiers that are described in Section 6.

Classifier Evaluation
Based on the defined approach in Section 6, multiple experiments are carried out. The objective of those tests is to evaluate the performance of KNN compared to KStar. In the experiment, a 10-fold cross-validation training and testing approach is used. In this cross-validation, we investigate generalizing the training outcomes to an independent subset. The training is carried out using the dataset described in the above section. The aim of the overall experiment is to test the ability of the proposed approach to correctly estimate the performance of the model. Given that, the above-described metrics (TPR, FPR, precision, recall, and F-measure) are used.
The metrics are used on a learning set with 10% of extraction. The average result of each presented metric is used to compare the performance of KNN against KStar. Table 3 presents the results of the performed tests for each classifier using the defined metrics. With regard to beam-attachment recognition, it is clearly seen from the average of the presented results that KNN outperforms KStar. To illustrate, with KNN, higher values are obtained with TPR, precision, recall, and F-measure than KStar. On the other hand, FPR of KNN is lower than KStar. Therefore, it is concluded that in this work we adopt KNN for beamattachment recognition. Subsequently, KNN is also used to generate beam-attachment maps in the later experiments.

Recognition of Beam-Attachment Map
In the following experiments, we use the proposed approach to generate a beamattachment map. The purpose of comparing beam-attachment maps is to determine the ability of the approach in recognizing precise maps. Additionally, the comparison provides insights into the required learning dataset's size and time. Figure 5 presents the real beam-attachment map over the geographic area of interest in this work. The presented map is generated based on the dataset described in Section 7.1. This map is compared to the model generated in Figure 3, which is generated with a resolution of 1 m × 1 m. Based on this comparison, it is decided that the map in Figure 5 is used as the target model (i.e., benchmark in the subsequent model generation). Thus, the following presents a systematic investigation process with different extraction sizes. In this process, we test the impact of increasing the size of the learning sets. We also observe the optimal learning set size by comparing the results to the target model.
Multiple experiments are executed with different extraction size. For each size, we test the ability of the learning approach in determining beam-attachment recognition maps. Based on that, we compare the results with the real beam attachment over the specified geographic area. Figure 6 shows the plotted learning set and the predicted beam-attachment map using a learning set with 1% of extraction from the original dataset. The figure shows that the initial map begins to appear with considerable map noise and uncertainty. Nevertheless, the overall map of beam attachment is clearly seen. Figure 7 shows the constructed beam-attachment map using different learning sets. Graph (a) shows the results with the sub-set that consists of 5% extraction of the whole dataset. Graph (b) shows the results with 10% extraction of the entire dataset. As seen from both graphs, the constructed maps contain errors in the cell-edge zone and beam borders as the learning set size is small. However, as the extraction size grows, the accuracy of the constructed map increases. This indicates that the proposed approach shows promising results even with little increase in the extracted sub-sets. The accuracy of the proposed beam-attachment approach is clearly seen in Figure 8. Graph (a) shows the constructed beam-attachment map with 15% of extraction from the whole dataset. On the other hand, graph (b) shows the target map (i.e., benchmark map) that is generated in Figure 5. It is seen from both graphs that the proposed approach generated a beam-attachment map that is identical to the target map with only 15% of extraction of the entire dataset. This means that it can be said that the approach reaches accurate recognition (around 100%) with low data extraction. This indicates that the proposed approach has the ability to generate promising reconstruction quality even with a small density of data measurements. It also shows that results are produced with low complexity since only 15% of extraction is enough to construct the target map. In fact, the approach shows optimized performance since reconstructing the target map requires less resources and time. Finally, Figure 9 summarizes the performance on the approach when increasing the size of the learning set.
It is seen from the above-generated maps that the proposed approach in this work provides highly accurate beam-attachment recognition. The approach also does not introduce any complexity to the system. It also requires less time and minimal dataset size to produce beam-attachment maps. In fact, it reaches about 100% accuracy in predicting beam recognition with only 15% of the learning set. Given these results, the approach can greatly improve 5G wireless communication in RESs. That is because it has the ability to efficiently discover new introduced UE in an RES environments. The approach can especially improve communication with mobile UE in RESs such as electrical vehicles and mobile smart meters. Overall, it can be said that this approach provides efficiency and accuracy and it lowers learning complexity, which improves 5G network coverage.

Discussion
Given the above results, we compare the approach with similar works. As mentioned above, to the best of our knowledge, no work has used the lazy learning approach to identify the beam attachment in a predictive manner. Multiple works have used training approaches to optimize the process of locating a user in 5G networks. For instance, [32] proposed an approach to locate users based on their uplink RSS. The authors used an analytical moment matching based on Gaussian process regression. The approach has shown promising results in locating users within an area of interest. However, in the training phase their approach requires one to utilize a significant number of features from the datasets. Additionally, unlike our proposed approach, the complexity of their method increases in the cubic order with the number of training datasets.
Similarly, [33] proposed a location-based method to identify users in a specific area. A data-generation method is first proposed. Then, they use a deep learning positioning method that is trained on the generated dataset. The approach requires significant feature extractions. This increases the complexity of the approach and restricts the approach in terms of considering extra data on-the-fly. This is mainly since the approach requires all features to be extracted and identified prior to the training phase. Although the above approaches provide promising predictive location services, they introduce significant complexity in terms of feature extraction and required datasets and training. In fact, our approach produced accurate beam-attachment maps (around 100%) with only 15% of extraction of the dataset and only two feature types.

Conclusions
In this work, we presented a low-complexity approach to optimizing 5G beamattachment recognition in a distributed RES environment. We also presented the benefits and the challenges that face the 5G wireless networks in RESs. In the approach, we first define the system model. The model is designed to simulate a real-world 5G network that is deployed in RESs. We then describe the assumptions and the connection procedures to represent wireless communication in a densely distributed RES environment. Given that, we defined the beam-attachment recognition for UE in RESs. The proposed approach depends on utilizing the coordinates of UE and converting them into a native map to provide a comprehensive view of the beam-attachment map. Based on that, we use the lazy learning approach to train the algorithm to recognize the beam-attachment index at each location in the area of interest. We test the approach using a dataset containing beam-attachment indexes. The results prove that the proposed approach has the ability to produce precise identification of a beam-attachment index with a minimal amount of recognition training. In future work, we plan to study the generalization of the approach to include different application domains. We also plan to investigate the viability of the approach with a 6G network.