Design of Intelligence Reflector Metasurface Using Deep Learning Neural Network for 6G Adaptive Beamforming

Work on identifying the various techniques for 6G wireless networks has already begun as the present specification for 5G networks nears conclusion. Reconfigurable Intelligent Surfaces (RISs) are one of these potentially useful technologies for 6G service providers. They provide unparalleled levels of freedom in terms of wireless channel engineering, allowing the system to change the channel’s properties whenever and however it chooses. Nonetheless, such qualities need a thorough understanding of the reaction of the related meta-surface under all conceivable operational situations. Analytical models and complete wave simulations may both be used to gain a better knowledge of the radiation pattern features, although both have inaccuracies under specific situations and are exceedingly computationally intensive. As a result, in this study, we offer a unique neural network-based technique for description of the meta-surfaces response that is both rapid and accurate. We look at a variety of scenarios and show how the proposed methodology can be used in them. In particular, we show that our technique is capable of learning and predicting the parameters driving the reflected wave radiation pattern with the accuracy of a complete wave simulation (98.8%–99.8%) while using just a fraction of the time and computer complexity of an analytical simulation. The above finding and approach will be particularly useful in the design, defect tolerance, and servicing of the hundreds of RISs which will be installed in the 6G distributed system.


I. INTRODUCTION
In comparison to 5G and other heritage networks, sixthgeneration (6G) wireless networks will be considerably more varied and dense. As a result, the 6G architecture will need to evolve to meet the ever-changing capacity and Quality of Service (QoS) demands [1]. Multiple enablers, such as light fidelity (Li-Fi), visible light communication (VLC), Ter-aHertz (THz) communications, Reconfigurable Intelligent Surfaces (RISs), and others, have been proposed to meet these ever-increasing demands. RISs have gotten a lot of attention among these approaches. The reason for this is that they turn the physical environment from an opponent to an ally in the communication process by rapidly modifying the related The associate editor coordinating the review of this manuscript and approving it for publication was Davide Ramaccia .
Meta-Surfaces (MSs). In practice, they make propagation characteristics more predictable and reliable [2], [3]. Such capabilities will be crucial in addressing the 6G network needs [4].
By altering the frequency, phase, amplitude, or polarization of the incident EM wave, RIS may intelligently and adaptively rearrange the wireless environment [2]. When there are obstructions in the way of the direct communication path between the transmitter and receiver or when the channel quality between the transmitter and receiver is too low, RIS can be employed in wireless communications as an alternate path provider or as a quality enhancer [5], also in mm-Wave massive multiple-input multiple-output (MIMO) [6], device-to-device communication, simultaneous wireless information and power transfer, enhanced physical layer security, unmanned aerial vehicle communication for smart cities, and intelligent internet of things (IoT) applications for wireless sensor networks [7]. Several studies demonstrate the advantages of the RIS-aided network [8], [9].
MSs are electromagnetically thin-film and flat artificial structures that have lately permitted the production of innovative electromagnetic (EM) and optical elements with designed and even unconventional functions [10]. These include perfectly alright manipulation of encroaching radio signals in terms of power, direction, phase, and polarization in a frequency-selective manner [11], [12], as well as absorption of certain elements of encroaching radio signals (produced by the numerous transmitting smart objects points within the surroundings). An MSs is made up of a series of subwavelength structures called as unit cells on a rather detailed level. In addition, we explore the situation of tunable MSs in this research. Unit cells in this scenario will be adjustable capacitances, C and resistors, R, from a modelling standpoint. This gives the MSs their tunability properties by allowing the unit cells to take numerous states. Notably, designing an MS with set goal EM functionality is already a difficult undertaking. As a result, designing and operating a tunable MS will be significantly more difficult. Multiple research projects, including as [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], and [14], have examined the probable designs and properties of such programmable MSs, and have made substantial progress in this area.
Furthermore, while tunability is undoubtedly an attractive aspect of programmable MSs, obtaining the properties of a reflected wave provided the parameters of the incoming wave and the situations of each contributing unit cell, as illustrated in Fig. 1, is a significant difficulty. Furthermore, a quick but accurate assessment of the radiation pattern can help with a variety of 6G communication networks, including the design, reliable operation, and management of MSs and, as a result, RISs. Determining the properties of the reflected wave in an MS setup, on the other hand, is currently difficult. The reason for this is that, they may be derived using either analytical approaches with various limiting assumptions or computationally demanding simulations using full wave EM solvers.
Simply, Fig. 1 shows how the phase profile resulting from the optimization technique enters the input layer of the neural networks, and the number of the nodes in the input layer in our study is 400 nodes. From the input layer, the data is transmitted to the next layer, which is the group of hidden layers, which weights are distributed to the nodes that build these layers, in order to achieve the correct prediction closest to the ideal prediction, and thus we have achieved great goals such as a priori knowledge of radiation pattern characteristics for fast tuning of MSF in a highly dynamic wireless environment and Detection of faults in MSF during maintenance via the verification of radiation pattern parameters with the accurate estimates generated by the proposed ML based framework.
Finally, the last layer comes, which is the output layer, in which the final product appears, and the value of the phase angles that make the reflected electromagnetic waves direct towards the desired angle. Then the phase angles return to the input layer again as a feed-back to the neural network model to reduce the error rate and increase the accuracy of the model.
To clarify, understanding the EM properties of each unit cell makes calculating the associated EM field easier. The unit cell, and hence the MSs, is reflecting in most circumstances (the transmission coefficient is zero). To obtain the far-field pattern, we simply require reflective properties (radiation phase and amplitude) of the unit cell. In some well-defined applications, such as beam-steering and concentrating of planar impinging waves, analytical models exist for defining and forecasting the reflected EM field. These models, however, contain simplifications that might lead to restricted application in practical setups and, as a result, lower overall precision of findings when compared to the exact solution derived from Maxwell's equations [15]. Furthermore, repeated computational full-wave simulations, which are now frequently used and yield accurate device response forecasts [16], are memory and time intensive. Moreover, the design process is heavily reliant on empirical thinking or trial-and-error [17], which is wasteful and ineffectual, especially when dealing with highly nonlinear problems.
Machine learning (ML) technologies, notably Neural Networks (NNs), are well-known for their capacity to VOLUME 10, 2022 understand complicated correlations between input and output data, allowing them to solve differential equations without the requirement for numerical full-wave computations [15], [18]. Because the MSs EM reaction (e.g., reflection) is basically the solution to Maxwell's nonlinear equations, it may be able to develop an ML structure that directly forecasts the EM reaction without using full-wave simulations. As a result of this study, a data-driven NN-based strategy for obtaining an accurate assessment of the radiation pattern or many metrics of interest that allow the entire description of the radiation pattern is presented. The following are some of the paper's most important contributions: • We build a unique Neural Network-based radiation pattern forecast that is almost as accurate as complete wave simulations but with the computing cost of analytical approaches, according to our study.
• To the greatest of our expertise, this is the first technique in which specific important characteristics of the reflected beam far-field radiation pattern for a provided MSs, such as principal side lobe level (SLL), half-power beam-width (HPBW), maximum energy radiation direction, and directivity (D), have been expected and effectively used for the complete description of the reflected beam radiation pattern. As a result, our technique may be used effectively in 6G networks (Fig. 1).
• For the locally tunable MS case, we provide a unique analysis depending on the accuracy of forecast of the aforementioned parameters. We propose a realistic framework and benchmark for the choice of a multilayer perceptron MLP-based forecast for the reflected beam radiation pattern using progressive design technique. The remainder of this paper is organized as follows: In Section II we describe the gradually framework design including the two scenarios that we have analyzed. In Section III we go through the methods we used to design the two scenarios we looked. The unit cell design and characteristics of each scenario are explained in Section IV. Deep Neural Networks (DNNs) are described in Section V. In Section VI, we present the evaluation. Finally, we conclude the paper in Section VII.

II. THE GRADUALLY FRAMEWORK
We now provide the architecture for our far-field radiation pattern prediction, in which we explore two main situations, and show that using data-driven learning methodologies, it is feasible to forecast the properties of the reflected wave from a provided MSs. The MSs is simply a description of an array of unit cells with certain unit cell configurations, depending on the situation.
MSs Design scenario is further enhanced to include two scenarios. These scenarios are dependent on the MSs underlying unit cell configurations, and they are listed below: • A PIN diode unit cell configuration is used in the first case across the MSs.
• The second option has an array of unit cells spanning the MSs, with the same adjustable resistance R and capacitance C values for all unit cells. As a result, the R-C MSs configuration scenario, also known as the locally adjustable MSs, refers to a situation in which the unit cells might have varied R and C values. In sections V and VI, we go over these situations and the accompanying approaches for predicting radiation patterns in further depth.
In the first case, we investigate if data-driven models can accurately forecast the whole reflected wave far-field radiation pattern for a 1-bit controllable MSs. The role that 1-bit tunable MSs arrangements will play in applications like as object tracking, radiation absorption, sensing, and so on is one of the motivations for investigating them. As a result, the MSs in this situation is made up of a 20 × 20 array of unit cells. We scan the azimuth and elevation angles from 1 to 179 degrees with a 1-degree granularity for the runs simulations in the PIN diode scenario. We chose this range of angles since we don't need to assess negative elevation angles because the transmittance is zero. The multiple-layer perceptron (MLP) neural network was the model that we investigated for our data-driven framework. As a result, the spacing between the input and the center of the hidden neuron determines its output. Because it models spatial parameters, such a framework is a priori highly attractive for our approach.
In the second case, which extends our gradual framework to a fully tunable MSs, the MSs under consideration is made up of an array of unit cells that can be in various states. In this scenario, we change the values of the capacitance C and constant resistance R, which describe the structural properties of the unit cell. Our model's assessment may, however, be expanded to any incident wave direction if necessary (incident angle). We change the values of the capacitor to four basic values, which are as follows 0.564 pF, 0.608 pF, 0.632 pF and 0.765 pF. Furthermore, and perhaps most crucially, the MLP framework is used in this situation for our data-driven strategy. Due to time and computational constraints, the data we utilize for training and testing the model in this scenario, where we examine a locally adjustable MSs, are obtained via an analytical approach. The reason for this is that, given our computing power restrictions, collecting enough data through an EM simulator to create a decent model would take a very long time.
In addition, we test if our data-driven models can forecast four key metrics that define the entire reflected wave farfield radiation pattern rather than just the pattern itself. The principal to SLL, D, HPBW, and angle of maximum radiation are the metrics of interest. It's worth noting that analyzing only the abovementioned factors helps eliminate models with a high dimensionality output.
The inputs for our NN based framework in this situation are 2-D arrays, with each value reflecting the four potential modes of the unit cell at the appropriate point in the MSs. A 20 × 20 grid of unit cells is also included in the MSs.
The framework therefore attempts to forecast the measurements of the reflected beam far-field radiation pattern for an MSs with a group of provided unit cell state arrangement for normal incidence angles. It's worth noting that the MSs under investigation has a total of 4400 potential configurations.

III. METHODOLOGY
The majority of other academic work, on the other hand, is rooted in traditional design methodologies such as model designs, parameter sweeps, trial-and-error methods, and optimization algorithms. Performing numerical full-wave numerical simulations with the use of an optimization technique is a time consuming and resource intensive operation. Furthermore, if the design parameters are modified, simulations must be rerun, preventing consumers from focusing on their actual demands. As a result, we have considered using ML to fill in the gaps in our search for a quick, efficient, and automated design strategy.
ML, especially its subset, deep learning, is a method for automatically understanding the relationship between input and objective data based on examples from previous experiences.
The methodology used in this study is divided into three stages: The first stage is the design stage, and this stage contains three main steps, and they are as follows:- • Design of initial one unit cell, this design was implemented by CST Package software.
• Optimize one unit cell using MGSA-PSO algorithm to obtain perfect results, this algorithm was written using MATLAB program.
• Design complete MS plate, the plate contains 20 × 20 unit cells; they have different shapes. So each unit cell has the ability to change electromagnetic waves direction and its ability to change for two states in 1-bit coding or four states in 2-bits coding, each state has a different phase angle through a variable varactor capacitance. The second stage can be called the training stage, and this stage contains four main steps, and they are as follows:- • The powerful algorithm and high-precision optimization technique MGSA-PSO was applied to the whole MS plate in order to direct and focus the reflected electromagnetic waves from the MS plate in the desired direction angle, and this process was done 413 times.
• The 413 optimization run is the basic building block of the training database; accordingly, this data was loaded into Python environment for processing.
• From the Python environment, we transfer the data to the Tensorflow and Keras environments. The Tensorflow environment builds and trains deep neural networks, while the Keras environment performs all low-level calculations and facilitates the learning process.
• The data is returned and organized to the Python environment for final preservation after applying the information leads entropy data technique. Finally, the third stage can be called the test stage, and this stage contains three main steps, and they are as follows:- • After the complete training of a large number of incidence angles, it was necessary to test the DNN system by asking DNN model to reflected beams in specific reflected angles for different incidence angles that the system has not trained.
• The tested results and the computed results were compared, and then the tolerance and accuracy of the expected results were calculated.
• The expected final results are shown in CST Package as a final solution. All these steps are shown in flowchart in Fig. 2. ML has been used in a variety of wave interaction concepts, antenna optimization and design [19], [20], [21], including electromagnetic compatibility (EMC) [22], optical and photonic structures [23], [24], all dielectric MS [25], and Plasmonic nanostructure [26], because of its supporting factor to providing less computation power, less design time, more accuracy, and more flexibility. The control of the reflection beam angles technique of a MS has been provided in this study using a DNN. Unlike earlier work, we develop and optimize one-unit cell and a whole MS plate during the design stage to achieve the best control of the reflection beam angles. VOLUME 10, 2022 As a result, when a series of samples are used to training the deep learning model, our suggested model can regulate the reflected beam-former automatically using specified reflection information. The result of numerical simulations compared to the reflected direction destination shows that our suggested method is effective in controlling reflected beams of any angle. Our strategy is effective for those technicians who are not experts in the field of electromagnetics because it determines the reflected wave angle directly without using poorly optimization technique, consumes fewer computational resources, has high accuracy, and ultra-wide angle directions. This allows them to focus on their specific requirements, speeding up practice problems. As a result, we show in this work and for this case that: -Our ML technique properly anticipates the reflected beam pattern's measurements. -We can generalize the same concept and methods to the scenario when we obtain samples from an EM solver if we have the processing capacity. The Huygens principle, according to which the far-field equals the total of the emissions of all unit cells, is used to determine the radiation pattern in the abovementioned analytical model. This model, in particular, implies that mutual coupling between neighboring unit cells may be ignored. We additionally suppose that a normal incoming plane wave illuminates the MSs equally and that the reflecting amplitude is constant throughout all stages. With these postulated, we may describe the reflecting field using eq. (1), where the main objective is controlling the phase shift of the unit cells ij is the reflection amplitude constant (i, j), M and N are the number of unit cells in a row or a column, k 0 = 2π/λ 0 is the wave number and ζ ij (θ , ϕ) is the relative phase shift of the unit cells with respect to the radiation pattern coordinates (ϕ, θ), which denotes the relative phase shift of the unit cells with respect to the radiation pattern coordinates, given by: By comparing the findings with full-wave simulations, this technique has been shown to be accurate in assessing the farfield of an MSs for beam-steering [16]. While the estimates produced have a modest influence on the value and location of the side lobes, these are unimportant to the goal of this study.
Digital Coding metamaterials are made up of elements that contain a series of ''0''s and ''1''s, while a programmable metamaterial is controlled by a programmable device. In this work, we will present two scenarios, on the first scenario (1-bit scenario) the lumped element in this case is PIN diode, the PIN diode can be in only two states, either 0 state, or 1 state. When the phase angle is 0, this indicates that the PIN diode is operating as an open switch, which in turn indicates that the PIN diode is in the 0 state. While in the case of the phase angle is 180, this indicates that the PIN diode is operating as a closed switch, which in turn indicates that the PIN diode is in the 1 state. On the other hand, the second scenario (2-bit coding scenario) the lumped element in this case is variable capacitor, the variable capacitor can be in only four states (''00'', ''01'', ''10'', and ''11''), the number of states is related to the number of bits N b also used decipher the states by Ns = 2 N b , in ability to adjust to the logic circuits of the control devices. In the 2π range, the phase states are divided by π/2 N−1 b based on N b . For example, 2-bits coding has four phase states (''00'', ''01'', ''10'', and ''11''), which are 0, π/2, π, 3π/2, respectively. It's worth noting that a steady phase offset for all states would have no effect on performance; what matters is the phase difference between states. The concept is illustrated in Table 1. Performance Metrics: The far field pattern obtained in the previous step is post-processed to obtain a set of performance metrics relevant to beam steering. We detail them next.

A. DIRECTIVITY
A basic antenna parameter that measures the concentration of energy in a particular direction in terms of isotropic scattering.
where U (θ, φ) ∝ |E(θ, φ)| 2 denotes the scattered radiation intensity in a particular direction, and the numerator denotes the overall scattered power. The elevation angle of a completely reflective MS is limited to [0, π/2], and the maximum directivity is restricted to 4πA/λ 2 , where A is the MS aperture area. The directivity is measured from several angles, including the intended reflection angle and the real reflection angle.

B. TARGET DEVIATION (TD)
It is calculated in degrees and estimates the variation in reflected angle between the goal (θ r , φ r ) and real (θ a , φ a ) owing to phase profile discrepancies. It is computed as follows:

C. SIDE-LOBE LEVEL (SLL)
Due to the phase structure of the MS and, in particular, its limited aperture, a series of smaller reflected beams may appear in addition to the primary beam. The SLL is defined as the directivity of the side-lobe closest to the main lobe divided by the directivity of the main beam (in dB). To reduce energy dispersion in undesirable directions, a low SLL is preferred.

D. HALF POWER BEAM WIDTH (HPBW)
The steering resolution is defined by the waist of the primary reflected beam. The square root of the solid angle at the −3 dB of a lobe maximum is used to determine the HPBW, which is measured in degrees.

IV. UNIT CELL PERFORMANCE MODEL
In this design, the two most important features that effectively control the efficiency of the unit cell surfaces are incorporated, namely the shape of the unit cell and the change of the phase angle of the element. As for the first item, which is changing the shape of the unit cell, the shape of the unit cell is introduced in Fig. 3. It consists of 12 twisted and concentric arms similar to the arms of a fan, around them an arc in the form of a semi-circle, and that arc extends from its lower end a ribbon connected to the lumped element and finally ends with the via. The unit cell has ten shapes, the first of which has 12 fan ribs, the second has 11 ribs, and the third has 10 ribs, and thus the number of fan ribs decreases until it reaches the tenth antenna shape, which contains only 3 fan ribs, and the unit cells are arranged regularly from the most to the least ribs, then it is counted arrange the unit cells in reverse, from the fewest ribs to the most. So that the whole row consisted of twenty unit cells, ten of them were arranged from highest in number of ribs to least, and the other ten were arranged from least in number of ribs to most as shown in Fig 4. Thus, the physical change has been made in the element's form. The dimensions for the unit cell component values (see Table 2) were determined through simulation and optimization with the CST Microwave Studio software. The proposed MS is constructed on a ROGERS RO4350B substrate with a loss tangent (tan δ) of 0.0031 and a permittivity (ε r ) of 3.6 and is planned to operate at 5.3 GHz. As for the second item, which is the change in the phase angle of the unit cell, it depends on the type of the lumped element. If the lumped element in the cell is a pin diode, the change in phase angle will be only two states, either 180 • or −180 • as shown in Fig. 3. Either if the lumped element is a variable resistor and a variable capacitor, the extent of the phase angle change will be a large range of cases according to the values of both the variable resistance and the capacitor, but we limited the capacitor values to only four values, which are 0.564 pF, 0.608 pF, 0.632 pF and 0.765 pF. More clarification in the item on changing the value of the angle will be explained in the next section.
We chose to perform this study at 5.3 GHz. Because 5.3 GHz is included of the free and widely used industrial, academic, and medical (ISM) range, we chose it as the intended working frequency. Furthermore, the operating frequency of 5.3 GHz was chosen to reduce the problems setup that may arise in the mm-Wave spectrum. The expensive price of the mm-Wave transceiver and the intricacy of the MS design are two of these obstacles.

A. FOR FIRST SCENARIO (PIN DIODE)
A PIN diode is added to every of the unit cells to adjust the phase of the incident wave. The PIN diode is numerically equal to a series connection of inductance and resistance in the ON state, and to a series connection of inductance and capacitance in the OFF state, as shown in Fig. 5. As a result, the PIN diode impedance during EM wave illumination may be described as: The reflection coefficient may be calculated using the following formula:  where Z R is the unit cell's radiation impedance. The unit cell's construction is designed to deliver the right amount of Z R to achieve a 180 • phase difference between OFF and ON states at the operating frequency. At 5.3 GHz, the suggested architecture allows for a 180 • phase change between ON and OFF states (see Fig. 5). This result is consistent with the manufactured unit cell's measurement results. At 5.3 GHz, the simulation result achieves a 180 • phase shift between OFF and ON states, however the measurement result somewhat lowers the frequency with the right phase shift value. This minor variance is due to a flaw in the measuring setup, which is tolerable.  We will mix unit cells of multiple reflection phase states to provide reconfigurable steering performance; for example, in the scenario of two coding, we will employ four distinct states equidistantly across the 0-2π range, i.e. with values 135, 45, −45, −135 degrees. They may be done by using specified values of the varactor capacitances C var and a biasing voltage that is adequate. The suggested unit cells' reflection amplitude and phase, as computed by full-wave EM simulations for normal incidence, are depicted in Fig. 6. In order to specify the required capacitances for the initial phase prescription, we need a ''look-up table'' relating the reflection phase with the capacitance of the load. It is specified by illuminating the uniform MS with a normally incident plane wave at the operation frequency of 5.3 GHz. To be realistic, we limit the achievable series capacitances in the range [0.5: 0.9] pF, the change in the value of the capacitor is carried out by one of these two methods, either by using external Field Programmable Gate Arrays (FPGAs) or by directly embedding the controllers within the MS structure. Even under this restriction, we have access to a large reflection phase span of 315 • , while the reflection amplitude remains almost unity, thus offering the capabilities to effectively reconfigure the unit cell radiation features. Varactor capacitances of 0.564 pF, 0.608 pF, 0.632 pF and 0.765 pF achieve the desired reflection phase states. At the same time, the matching amplitudes are large and rather uniform; absorption is a maximum at resonance, therefore specific capacitance values that move the MS resonance nearer to 5.3 GHz will invariably be associated with lesser reflection amplitudes.

V. DEEP NEURAL NETWORK (DNN)
In the recent two decades, artificial NNs have gained popularity for a variety of applications, particularly in optimization and artificial intelligence. Among the most important factors that affect the efficiency of NNs are the following:

A. DATASET PRODUCTION FOR TRAINING AND TESTING
For ML, random sample is typically employed to produce samples for training. Random gradient inputs for unit cells, on the other hand, will always result in a random dispersion pattern. These patterns are not only non-learnable, but they are also irrelevant for design goals. As a result, the training samples are not totally random combinations throughout the whole space, where the overall number of combinations, as previously stated, is Q (N×M) = 2 400 in 1-bit arrangement and Q (N×M) = 4 400 in 2-bits arrangement. A sample production space is also defined in our technique to manage the entropy of the data input [27]. We have a 413 optimization run to control the random combinations as shown in Fig 7. In the following, we will present four samples of these 413 optimization runs that lead the entropy on each of the 1-bit and 2-bits scenarios. In the beginning, the angle of incidence on the MS plate must be adjusted, so that a horn antenna is employed as a main radiator at the transmitting side, which is a distance of 2 meter from the MS plate, and has a gain equal to 15.3 dBi, as shown in the inset Fig. 8.
The first sample has been used in the 1-bit coding MS, where the angle of incidence (θ i , ϕ i ) = (45 • , −90 • ), and applying the powerful MGSA-PSO algorithm [28], [29] to the first 1-bit scenario in order to control the phase angle per unit cell. The result was the direction of the reflection beam at the reflection angle (θ r , ϕ r ) = (30 • , 90 • ) as shown in Fig. 8a, the state of each unit cell in the 1-bit coding shown in Fig. 9a.  In the case of the second sample, it is the same incidence angle as the first sample, but with a reflection angle of (θ r , ϕ r ) = (60 • , 90 • ) and is applied to the 1-bit MS as shown in Fig. 8b. The state of each unit cell is shown in Fig. 9b. The characteristics of the reflected beam was the directivity in the direction of maximum radiation D = 15 dB, SLL = −0.1 dB, HPBW = 8.5 • , and TD = 1.1 • .
The third sample is the same incidence and reflection angle as the first sample, but applied to the 2-bits coding, as shown in Fig. 8c. Fig. 9c illustrates the MS phase profile for pairing of target angles supposing normal incidence to show the output of the coding stage and the influence of the deflection angles (θ, ϕ) on the needed phase differences in the x and y axes. The characteristics of the reflected beam was the directivity in the direction of maximum radiation  Finally, the fourth and last sample is the same incidence and reflection angle as the second sample, but applied to the 2-bits coding, as shown in Fig. 8d. The state of each unit cell is shown in Fig. 9d. The characteristics of the reflected beam was the directivity in the direction of maximum radiation D = 15.2 dB, SLL = −9.5 dB, HPBW = 7.3 • , and TD = 0.65 • . From the above, we conclude that the accuracy of the 2-bits coding MS scenarios is greater than the accuracy of the 1-bit coding MS scenarios, because the 2-bits coding scenarios have twice the number of state in the 1-bit coding scenarios. In general, this is the phase profile for each sample of neural network, and represents the final solution and the phase angle per each unit cell in order to result in directing the reflected beam at the desired steering angle, which in turn returns as a feed-back to the neural network model to help VOLUME 10, 2022 improve the general prediction of the neural network model and it reduces error and increases model accuracy.
To put it another way, a configuration that produces interpretive outcomes and hence has no entropy is created at random initially. Then, using a random fluctuations from [0 100] %, entropy is added into the model. As a result, the incoming data contains both utterly random samples and purposeful configurations. This diverse variety of entropy is exactly what our NN needs to be trained.
The amount of samples obtained for testing and training the model of the first Scenario using the aforementioned procedure was 9 × 10 4 and second scenario was 2.5 × 10 5 . Amongst these samples, 85% of these data were utilized for training and validation, while the other 15% were saved in a completely different set for the model's testing phase. Furthermore, 80% of the samples from the training and validation set were utilized for training, whereas the residual 20% have been used for validation. The quantities of the pixels in the supplied images were standardized without changing their variance by executing a max-min escalation. It's not the case with our input parameters, as the variation of each pixel is included in the relevant data that the model utilizes to make predictions. It is crucial to note, however, that when comparing measurements with various units, normalizing the characteristics is critical, as variables recorded at different scales may not actively contribute and may result in bias. Because this was the case for the parameter estimates, the goal samples both for the training and test datasets were normalized by removing the mean of each measure and dividing it by the variances.

B. PREDICTION SYSTEM OPERATION
After our model has been trained for a certain incoming configuration, it first calculates if the supplied configuration will produce interpretable outcomes analytically. When it does, the trained model is used to forecast the variables of interest. If the configuration produces a random far-field radiation pattern, it is discarded since the model cannot deliver accurate results for this setting. Once the model has been trained, then we apply the aforementioned processes in our technique for forecasting the measures of relevance from a forthcoming MS configuration.

C. NN MODEL
With this principle in mind, let's look at the configuration of the NN model used in this to evaluate the two scenarios.

D. MULTI-LAYER PERCEPTRON NEURAL NETWORK
We use NNs to forecast the metrics of relevance of the reflected beam radiation pattern as part of this research. As a result, MLP is our proposed NN in this section. Before being entered into the NN, the input pictures of 20 × 20 pixels that indicate the unit cell configurations are flattening into vectors of 400 parameters for the MLP application.
The architecture of the MLP method is depicted in Fig. 10, multi-layer networks have an input layer whose neurons code the information supplied to the network, a configurable number of ''hidden'' internal layers, and an output layer. In the same layer, neurons do not communicate with one another. These networks' learning process is supervised. The input nodes make up the first layer. A feed-forward neural network with one hidden layer and a Multilayer Perceptron MLP node function at each hidden node is known as an MLP network. The dimension of the input vector is equal to the number of nodes. The interconnection weights are calculated using the minimal error between the neural model output and the training data. The goal of the training procedure is to finetune. The network interconnection weights and in order to reduce the error function; the back-propagation technique is used in this iterative procedure. The weights are updated for each iteration.
The capability of neural networks to generalization is one of its major benefits. Accordingly, a trained network will categorize new data as being in the same category as the learning data, despite if it has never encountered it before. Only a small portion of all imaginable neural network patterns are available to developers in the majority of real-world applications. The dataset should be divided into three parts for the optimal generalization: • The training set is used to train a neural network: The dataset's error is reduced throughout training.
• A neural network's performance on patterns that weren't taught during the learning phase is assessed using the validation set.
• A test set for assessing a neural network's general effectiveness. The number of hidden layers was set to three, and the number of nodes per layer was set at 150. Because sweeping through all conceivable permutations was not computationally feasible, a decision regarding the aforementioned parameter values was obtained after an extended user-driven research. The MLP's remaining parameters are provided in Table 3.  Table 3 shows that the MGSA-PSO was chosen as the training algorithm because it speeds convergence compared to first ordering algorithms such as the gradient descent while minimizing the high computing expense of second order approaches like Newton's method. We can omit selecting the learning rate ultra-parameter since the training time for our rudimentary model is not a constraint, and we find better answers in less iteration by utilizing this quasi-Newton technique. Regularization, on the other hand, is a method of limiting a model's complexity and therefore reducing the possibilities of overfitting by punishing the most complicated solutions in the objective functions. As a result, we use L 2 normalization in our approach. This is specifically enforced in the model via the λ hyper parameter.

VI. EVALUATION AND DISCUSSIONS
We now offer the assessment for each of the scenarios covered within this framework, highlighting the significant findings and insights, using the approach discussed in Sections III and IV.
As a result, our prediction that DNN models can properly forecast the reflected wave radiation pattern in a one-unit cell for any two scenarios 1-bit and 2-bits coding combination has been proven. For any incident and reflected beam that were not included in the training set, Fig. 11 provides a visual contrast between the projected radiation pattern by the trained MLP and the real diagram acquired from EM simulation. In this example, two reflection angles untrained have been selected, 15 • and 75 • .
This demonstrates that our predictor can learn and adapt tow cases with untrained/unseen 1-bit and 2-bits coding status in the training dataset. By comparing the angle of the reflection beam in the case of the true diagram resulting from the optimization algorithm and the angle of the reflection beam resulting from the MPL, it was noticed that the difference between the two angles is very small, whether in the 1-bit scenario or in the 2-bits, but the difference is less significantly more in the case of the 2-bits scenario. Fig. 12 illustrates the MS phase profile for pairing of target reflection angles untrained, 15 • and 75 • .
The task of predicting the radiation pattern characteristic for the scenarios is fundamentally a regression problem. As a result, the MSE is the cost/error function to reduce during the training stage.
Moreover, the explicability of the performance is not very good using this error function. Instead, for each metric of interest, we establish a tolerance (or a series of tolerances). The proportion of forecasts that fall inside this tolerance level is then calculated.
In this publication, this is also referred to as the accuracy measure. As a result, the quality of the MLP over the many metrics of interest that we intend to forecast using our FIGURE 11. Comparison between the predicted radiation pattern by the MLPNN and the true diagram by optimization algorithm. technique is described in the following subsections. Table 4 also includes the outcomes of the subsequent discussions.

A. DIRECTIVITY
In this subsection we represent performance evaluates for realistic MS as a function of steering orientation, VOLUME 10, 2022 Fig. 13a shows total scan pattern for directivity for all the domain angles of reflection resulting from a beam incident at angle of (θ i , ϕ i ) = (30 • , 0 • ) on the 1-bit coding MS, and the incidence angle (θ i , ϕ i ) = (60 • , 0 • ) as shown in Fig. 13b. The directivity was also calculated when the same previous beams incidents at angles (θ i , ϕ i ) = (30 • , 0 • ) and (θ i , ϕ i ) = (60 • , 0 • ) on the 2-bits coding MS, as shown in Fig. 13 c, d. We found that the MLP offered pretty close prediction for the directivity parameter, subject to only certain tolerance limitations. In particular, Table 4 shows that when the tolerance is adjusted to 0.25 dB, 95% of the test samples are successfully predicted.
Furthermore, we notice an increased accuracy of 99.99% when the tolerance is decreased further, to 0.5 dB. When the tolerance level is dropped to 0.1 dB, however, the MLP's accuracy plummets to 56.3%.

B. TARGET DEVIATION (TD)
We provide performance evaluations for genuine MS as a function of steering orientation in this subsection, Fig. 14a shows total scan pattern for TD for all the domain angles of reflection resulting from a beam incident at angle of (θ i , ϕ i ) = (30 • , 0 • ) on the 1-bit coding MS, and the incidence angle (θ i , ϕ i ) = (60 • , 0 • ) as shown in Fig. 14b. The directivity was also calculated when the same previous beams incidents at angles (θ i , ϕ i ) = (30 • , 0 • ) and (θ i , ϕ i ) = (60 • , 0 • ) on the 2-bits coding MS, as shown in Fig. 14 c, d. The results in Table 4 for the angle of highest radiation are generated by averaging the prediction accuracy of the elevation and azimuth angles in order to provide a single picture of this characteristic. To be more specific, tolerance values of 5, 2, and 1 are considered for this measurement. Table 4 shows the MLP has an efficiency of 99.8%, 72.7%, and 40.6%, respectively, for the appropriate tolerance levels. If can be observed, as the tolerance limit is reduced, the accuracy decreases, which is consistent with our previous results from other metrics of interest. Furthermore, when compared to the other metrics of interest, the accuracy for the lesser tolerance levels is much worse.

C. SIDE-LOBE LEVEL (SLL)
Performance evaluations for actual MS as a function of steering orientation are represented in this subsection, Fig. 15a shows total scan pattern for SLL for all the domain angles of reflection resulting from a beam incident at angle of (θ i , ϕ i ) = (30 • , 0 • ) on the 1-bit coding MS, and the incidence angle (θ i , ϕ i ) = (60 • , 0 • ) as shown in Fig. 15b. The directivity was also calculated when the same previous beams incidents at angles (θ i , ϕ i ) = (30 • , 0 • ) and (θ i , ϕ i ) = (60 • , 0 • ) on the 2-bits coding MS, as shown in Fig. 15 c, d.

D. HALF POWER BEAM WIDTH (HPBW)
We express performance evaluations for realistic MS as a function of steering orientation in this section, Fig. 16a shows total scan pattern for HPBW for all the domain angles of reflection resulting from a beam incident at angle of (θ i , ϕ i ) = (30 • , 0 • ) on the 1-bit coding MS, and the incidence angle (θ i , ϕ i ) = (60 • , 0 • ) as shown in Fig. 16b. The directivity was also calculated when the same previous beams incidents at angles (θ i , ϕ i ) = (30 • , 0 • ) and (θ i , ϕ i ) = (60 • , 0 • ) on the 2-bits coding MS, as shown in Fig. 16 c, d. Low values indicate highly precise tracking and localization, while high values indicate diffuse scattering or more angular coverage. The tolerance values of 1, 0.5, and 0.25 are used in this calculation. Table 4 shows the MLP has accuracy values of 99.5%, 97.3%, and 79.2%, correspondingly.
The tolerance values of 1, 0.5, and 0.25 are used in this calculation. Table 4 shows the MLP has accuracy values of 99.5%, 97.3%, and 79.2%, respectively. It's worth noting that the accuracy numbers have a similar pattern to the other metrics of interest. As a result of the above talks, we can conclude that the suggested approach is capable of precisely predicting the reflected beam far field-radiation pattern or the measurements that may adequately define it. We show Fig. 17 to further emphasize this point. Specifically, when the tolerance in dB rises, Fig. 17a demonstrates the evolution of the quality of the forecasts for directivity and SLL.
Finally, when the tolerance in degrees increases, Fig. 17b depicts the evolution of the quality of the forecasts for the incidence angle and HPBW. We can see that as the tolerance is increased, the accuracy 100% improves. However, we note that the beam width forecast gets to 100% accuracy at extremely low tolerance values, but the angle of radiation  measurement requires the predictors to have greater tolerance limits in order to attain better accuracy. VOLUME 10, 2022 To more clearly demonstrate the benefits of our DNN model, we compare the conventional method (such as Complete Wave Simulations using CST), analytical models (such as Adaptive Neuro-fuzzy Inference System (ANFIS) [30] and Support Vector Machine (SVM) [31]) and our DNN technique in terms of time-consuming, iterations of computation in CST, the difference between computed radiation and target radiation, radiation efficiency and accuracy rate. This comparison is performed for the second scenario 2-bits at incident angle (θ i , φ i ) = (30 • , −90 • ), and required, reflected angle (θ r , φ r ) = (60 • , 90 • ). Our DNN model technique generates results about 393.7 times faster than the traditional one, as can be seen, this is due to the much iteration the MGSA-PSO algorithm does, this attests to the DNN model's superior effectiveness and efficiency. We also calculate the discrepancy between estimated radiation and target radiation, which indicates the accuracy rate of the radiation outcomes. In particular, the accuracy rate for the top 30% of samples might go to 90%. In reality, as deep learning models can only generate probabilistic predictions, they may not be exact enough to achieve 100% accuracy, necessitating extra optimization procedures. Even said, deep learning may compute values that are closer to the ideal ones, which can speed up the radiation process and cut down on the amount of calculation. From the above, it can be concluded that the DNN model is better than both of the conventional method and analytical models, either from the aspect of computational iterations and quantities, time consumption, or result accuracy rate. Consequently, the outcomes validate the DNN model. For 2D MS radiation, the DNN model offers an effective method in a variety of application environments; the comparison is listed in Table 5.

VII. CONCLUSION AND FUTURE WORK
We provide a unique data-driven methodology for measuring the reflected beam far field radiation pattern from a MS in this study, which uses a NN-based approach. One of the most noteworthy benefits of such a technique is that, while its precision is comparable to that of complete wave simulator systems, the time complexity required to attain the same is substantially less. It may also be used as a way for enabling self-healing features and simplifying MSs management in the 6G wireless smart environment. As a result, we've set up an adaptive design framework as part of this process. We investigated two particular instances using this framework, in which we developed an estimation of the complete radiation pattern for a PIN diode MSs, R-C local tunable MSs. Furthermore, we have proved the efficiency of NN-based techniques through our research. In particular, it was discovered that, when compared to complete wave simulator equivalents, NNbased techniques could forecast the radiation pattern with a high degree of accuracy in a substantially shorter time period. Finally, we have provided a first study in this work through the scenarios, in which, rather than assessing the whole radiation pattern, we have expected the most significant criteria that regulate any radiation pattern, namely, Angle of maximum radiation, directivity, beam width, and principle-SLL. This procedure will not only assure the requisite accuracy in estimates, but it would also enable for a speedier convergence time.
We are confident that our research will serve as a base for future studies on the primary problems and areas for future study on the combination of RISs and several developing technologies leading to 6G, such as Non-Orthogonal Multiple Access (NOMA), Physical Layer Security (PLS), Simultaneous Wireless Information and Power Transfer (SWIPT), Unmanned Aerial Vehicle (UAV) enabled wireless networks, Visible Light Communications (VLC), autonomous driving networks and etc. In particular, the IRS may use machine learning techniques to recognize the wireless environment and subsequently alter its radiation characteristic dynamically to achieve varied tasks. It is believed that this study will offer valuable and practical guidelines for future work on exploring IRS-aided wireless networks in numerous aspects because they are new and mostly unexplored. In particular, we anticipate that the incorporation of IRSs into future wireless networks will substantially change their structure from the conventional one with only active components to a novel hybrid one including both active and passive components coexisting in an intelligent manner, opening fertile directions for future research. The ground-breaking DNN technique addresses the future difficulties in bridging theory and practice in RIS-enabled systems. Keep an eye out for this innovative technology as it has a bright future in wireless communications.