Design of 2.5 Bit Programmable Metasurface Unit Cell for Electromagnetic Manipulation

: Programmable metasurfaces are two-dimensional electromagnetic structures characterized by a low profile, conformability, and the ability to flexibly manipulate the amplitude and phase of electromagnetic waves. For high-quality beam scanning with the metasurface, it is essential that the metasurface possesses high-precision phase response quantization characteristics. This paper constructs a reflection-type metasurface unit cell featuring four P-I-N diodes and six operating states. To address the unit cell’s complexity and optimization challenges, we developed an automatic optimization algorithm, derived from the genetic optimization algorithm, for the metasurface unit cell. This algorithm was used to optimize a six-phase reflective 2.5 bit programmable metasurface cell operating at 5 GHz. The unit cell’s prototype was fabricated and measured to verify the design. Additionally, a metasurface comprising 16 × 16 unit cells was designed and simulated. The results highlight the metasurface unit cell’s excellent phase response quantization characteristics, and investigate the impact of quantization accuracy on beam scanning


Introduction
Antennas, crucial components in wireless communication, facilitate the reception and transmission of radio waves.The rapid development of mobile communications has led to increased performance requirements for antennas.For instance, it is often desired for antennas to have high gain, good directionality, and beam scanning capabilities.In practical applications, reflector antennas offer efficient power utilization and high power capacity but suffer from large size and slow mechanical rotation for beam scanning, failing to meet the needs for high-speed scanning [1].Phased array antennas enable electronically controlled beam scanning but require numerous expensive active transmitters and receivers (T/R components), limiting their widespread use [2].
Since the introduction of programmable (or reconfigurable) metasurfaces [3][4][5][6], both academia and industry have extensively explored their potential in applications such as wireless communication and remote sensing.Reconfigurable metasurfaces are typically made up of a spatial feeder and a reflective surface.The reconfigurable metasurface antenna manipulates the unit's phase or amplitude response using electrically adjustable devices, such as diodes, which makes a metasurface antenna reconfigurable.Its reconfigurability grants it versatile manipulation capabilities.Independent control over the reflection or transmission of electromagnetic waves from the feeder to each metasurface unit enables flexible electromagnetic wave manipulation.This combination allows us to create a digitally programmable metasurface under the control of a field programmable gate array (FPGA), opening up a broad spectrum of application scenarios.
Compared to reflector antennas, electromagnetic metasurfaces offer the advantages of a low profile and easy deployment, thanks to their two-dimensional structure.They also enable beam scanning.Unlike phased array antennas, they require only a few active devices per unit cell to alter the amplitude-phase response for beam scanning, resulting in lower transmission loss in the feeding network.Moreover, programmable electromagnetic metasurfaces are generally produced using printed circuit board (PCB) technology, making them cost-effective compared to large-scale reflector or phased array antennas with complex devices.Electromagnetic metasurfaces can also enable applications like vortex wave generation [7,8], electromagnetic focusing [9,10], and holographic imaging [11,12], offering vast prospects in communication and beyond.Recently, reconfigurable metasurfaces have emerged as a highly active area of research.
The phase response quantization accuracy of the unit cell is an important metric in the design of metasurfaces.When forming the metasurface for beam scanning, the low quantization accuracy for smaller aperture arrays can cause an increase in the secondary flap, which in turn leads to gain loss and reduces the directivity of the antenna [13,14].To circumvent these problems, a metasurface with high phase response quantization accuracy is required.Currently, there are two schemes to achieve high quantization accuracy; the first one is to use a varactor diode to achieve the high-accuracy quantization of the phase response by varying the bias voltage loaded on it [15][16][17].However, the varactor diode introduces a large insertion loss and requires a large number of digital-to-analog converters (DACs) for control.Another approach is to achieve reconfigurability using discrete devices such as P-I-N diodes, which typically have low losses, stable phase states, and a simple bias network [18][19][20].The use of P-I-N diode tuning schemes to achieve high quantization accuracy on the metasurface requires the placement of multiple P-I-N diodes, which leads to the complexity of the structure, making the design process difficult [21].Until now, not many P-I-N diode loaded metasurface cell designs with more than 2 bit quantization accuracy have been proposed [22,23].
In this paper, a reflection-type programmable metasurface unit cell loaded with four P-I-N diodes with 2.5 bit operating states is proposed.It is quite difficult to optimize the phase response of metasurface cells with a large number of design variables.To solve this problem, here, we construct an automatic optimization algorithm based on the genetic optimization algorithm for unit cells and apply the algorithm to optimize the parameters of the proposed metasurface unit cell.Using the proposed method, we construct a reflective 2.5 bit programmable metasurface unit cell with an approximate 60 • isotropic reflective phase response at the operating frequency of 5 GHz.The prototype of the unit cell is fabricated and measured using the waveguide measurements, and the measured results show that the proposed unit cell has good phase response quantization characteristics.To verity the advantages of the proposed unit cell, a reflective metasurface antenna array consisting of 256 cells for beam scanning application is formed and simulated using fullwave simulation.The effect of the quantization accuracy of the metasurface phase response on the beam scanning is discussed, and the results show that the high quantization accuracy of the unit cell has a significant effect on the reduction of the sidelobe.In addition, the results show that the high quantization accuracy of the unit cell has a certain effect on the improvement of the directivity of the metasurface antenna.

High-Quantitative-Accuracy Metasurface Unit Cell Modeling Unit Design
The designed reflective metasurface unit cell is proposed to be tuned by a P-I-N diode modeled as SMP1345-079LF from SKYWORKS, Inc. (San Jose, CA, USA).We followed the methodology outlined in reference [24].As a result, we were able to accurately determine the equivalent circuit parameters of the P-I-N diode when it was integrated into the metasurface cell, under electromagnetic wave incidence.According to measurement, the equivalent circuit of the P-I-N diode at 5 GHz is equivalent to a 3 Ω resistor in series with a 0.3 nH inductor for off status, and can be equivalent to a 10 Ω resistor in series with a 0.165 pF capacitor for on status.The equivalent circuit model is shown in Figure 1.The three-dimensional view of the unit cell is shown in Figure 2a.The un signed to operate at a frequency of 5 GHz, using a F4B dielectric substrate with a t of 5 mm and a dielectric constant of 2.65.The size of the unit cell is set to be wavelength of the operating wavelength, i.e., 30 mm.The structure of the unit is s rically designed with respect to the x-axis so that it can modulate plane electrom waves with x-polarization.The unit cell consists of a bottom metal layer, substr top metal layer loaded with P-I-N diodes while the top metal layer consists of tw zoidal and one rectangular patch.Four P-I-N diodes are loaded and each diod nected to the metal patch at one end, and the other end is connected to a stub sh the ground through a metal via.The top layer metal patch also has a via designe it to provide the DC bias.The unit has a wide range of adjustable parameters an pected to realize 2.5-bit adjustable reflection phase.It is noted that the structur posed to realize 3 bit reflection phase; that is, diode 1 and diode 3 each can prov adjustment freedom while diode 2, combined with diode 4, provides another 1 dom.However, as the unit cell is x-polarized, the current on diode 2 and 4 is no resulting in a weakness in the adjustment freedom.The top view of the cell and i tural parameters are shown in Figure 2b, where nine parameters, L1, L2, L3, H1 Line1_L, Line2_L, and Line3_L, will be used as tunable parameters for cell optimizatio Among them, the on-off status of the P-I-N diode will change the current dist on the patch.Considering that the unit cell is only polarized for the x-direction, a in the figure, i.e., the induced current generated on the patch will be mostly dis along the x-direction, the diode placed in the y-direction will have a weaker cont the current.Therefore, it is chosen to place two P-I-N diodes of the same operat in the symmetric position about the x-axis to enhance the regulation of the cell b direction P-I-N diode.The length of the short path is also adjustable, which allow to reflect the electromagnetic wave in an adjustable path, further increasing the d freedom in the design of the metasurface unit cell.
Line 1_L Line 3_L P y The three-dimensional view of the unit cell is shown in Figure 2a.The unit is designed to operate at a frequency of 5 GHz, using a F4B dielectric substrate with a thickness of 5 mm and a dielectric constant of 2.65.The size of the unit cell is set to be half the wavelength of the operating wavelength, i.e., 30 mm.The structure of the unit is symmetrically designed with respect to the x-axis so that it can modulate plane electromagnetic waves with x-polarization.The unit cell consists of a bottom metal layer, substrate, and top metal layer loaded with P-I-N diodes while the top metal layer consists of two trapezoidal and one rectangular patch.Four P-I-N diodes are loaded and each diode is connected to the metal patch at one end, and the other end is connected to a stub shorted to the ground through a metal via.The top layer metal patch also has a via designed under it to provide the DC bias.The unit has a wide range of adjustable parameters and is expected to realize 2.5-bit adjustable reflection phase.It is noted that the structure is supposed to realize 3 bit reflection phase; that is, diode 1 and diode 3 each can provide 1 bit adjustment freedom while diode 2, combined with diode 4, provides another 1 bit freedom.However, as the unit cell is x-polarized, the current on diode 2 and 4 is not strong, resulting in a weakness in the adjustment freedom.The top view of the cell and its structural parameters are shown in Figure 2b, where nine parameters, L 1 , L 2 , L 3 , H 1 , H 2 , H 3 , Line 1_L , Line 2_L , and Line 3_L , will be used as tunable parameters for cell optimization.a 0.3 nH inductor for off status, and can be equivalent to a 10 Ω resistor in series with a 0.165 pF capacitor for on status.The equivalent circuit model is shown in Figure 1.The three-dimensional view of the unit cell is shown in Figure 2a.The unit is designed to operate at a frequency of 5 GHz, using a F4B dielectric substrate with a thickness of 5 mm and a dielectric constant of 2.65.The size of the unit cell is set to be half the wavelength of the operating wavelength, i.e., 30 mm.The structure of the unit is symmetrically designed with respect to the x-axis so that it can modulate plane electromagnetic waves with x-polarization.The unit cell consists of a bottom metal layer, substrate, and top metal layer loaded with P-I-N diodes while the top metal layer consists of two trapezoidal and one rectangular patch.Four P-I-N diodes are loaded and each diode is connected to the metal patch at one end, and the other end is connected to a stub shorted to the ground through a metal via.The top layer metal patch also has a via designed under it to provide the DC bias.The unit has a wide range of adjustable parameters and is expected to realize 2.5-bit adjustable reflection phase.It is noted that the structure is supposed to realize 3 bit reflection phase; that is, diode 1 and diode 3 each can provide 1 bit adjustment freedom while diode 2, combined with diode 4, provides another 1 bit freedom.However, as the unit cell is x-polarized, the current on diode 2 and 4 is not strong, resulting in a weakness in the adjustment freedom.The top view of the cell and its structural parameters are shown in Figure 2b, where nine parameters, L1, L2, L3, H1, H2, H3, Line1_L, Line2_L, and Line3_L, will be used as tunable parameters for cell optimization.
Among them, the on-off status of the P-I-N diode will change the current distribution on the patch.Considering that the unit cell is only polarized for the x-direction, as shown in the figure, i.e., the induced current generated on the patch will be mostly distributed along the x-direction, the diode placed in the y-direction will have a weaker control over the current.Therefore, it is chosen to place two P-I-N diodes of the same operating state in the symmetric position about the x-axis to enhance the regulation of the cell by the ydirection P-I-N diode.The length of the short path is also adjustable, which allows the cell to reflect the electromagnetic wave in an adjustable path, further increasing the degree of freedom in the design of the metasurface unit cell.
(a) The proposed metasurface cell has four diodes, in which the operating states of diode 2 and diode 4 are the same.Theoretically, the unit cell has a total of eight operating states.In this paper, we use the number "0" to indicate that the diode is on, and the number "1" indicate that the diode is off, with a 3 bit binary bit to indicate the operating state of the unit.The number of bits from high to low indicates the operating state of diode 1, diodes Among them, the on-off status of the P-I-N diode will change the current distribution on the patch.Considering that the unit cell is only polarized for the x-direction, as shown in the figure, i.e., the induced current generated on the patch will be mostly distributed along the x-direction, the diode placed in the y-direction will have a weaker control over the current.Therefore, it is chosen to place two P-I-N diodes of the same operating state in the symmetric position about the x-axis to enhance the regulation of the cell by the y-direction P-I-N diode.The length of the short path is also adjustable, which allows the cell to reflect the electromagnetic wave in an adjustable path, further increasing the degree of freedom in the design of the metasurface unit cell.
The proposed metasurface cell has four diodes, in which the operating states of diode 2 and diode 4 are the same.Theoretically, the unit cell has a total of eight operating states.In this paper, we use the number "0" to indicate that the diode is on, and the number "1" indicate that the diode is off, with a 3 bit binary bit to indicate the operating state of the unit.The number of bits from high to low indicates the operating state of diode 1, diodes 2 and 4, and diode 3, respectively Based on this, the digital representation of the eight operating states of the diode is shown in Table 1.

Optimization Algorithm
The simulation modeling of programmable metasurface unit cell is the focus and difficulty in constructing reconfigurable metasurfaces, and its simulation mainly adopts the method based on equivalent circuits.The metasurface cells are often loaded with electrically tunable devices such as varactor diodes or P-I-N diodes for tuning to achieve specific radiation characteristics.We can simulate the unit cell by loading the equivalent circuits of these devices in the form of lumped components in electromagnetic simulation software.Unlike traditional electromagnetic structures such as antennas and waveguides, an electromagnetic metasurface unit cell has multiple operating states, and it is hard to obtain the simulation data for all operating states of the unit by solving the model of the unit in a single pass with a single electromagnetic simulation software.Electromagnetic full-wave simulation software algorithms generally take up large computer resources.The computing speed will be quite slow, if all the operating states of the unit are calculated, and then the simulation time of the unit will increase exponentially.
To solve this problem, a "multi-port network-based simulation method" was proposed [24].This method of modeling and simulation of the metasurface is based on the combination of full-wave simulation and circuit simulation software, in which the electromagnetic simulation software is used to analyze the model of the unit and then loaded into the circuit simulation software.The data of each state of the unit cell can be obtained by a single-round electromagnetic modeling process.Aiming at the problem of the high phase response quantization accuracy of metasurface cells with many structural variables and difficult model optimization, an automatic optimization algorithm for electromagnetic metasurface cells based on the genetic optimization algorithm is constructed.In this section, an automatic optimization design algorithm for programmable metasurface unit cells is constructed, so that it can automatically optimize the structural parameters of the modeled cells to achieve the expected phase response quantization accuracy.

Genetic Optimization Algorithm
Genetic algorithm (GA) is an optimization algorithm based on the principle of biological evolution, which achieves problem solving by simulating the processes of heredity, mutation, and selection in nature.GA was originally proposed by John Holland in the 1970s [25], has and is now widely used in optimization problems in various fields.The basic principle of GA is to generate new individuals through the selection, crossover, and mutation of individuals in the current population to form the next generation of the population, and gradually optimize the quality of the solution.The flow block diagram of GA is shown in Figure 3.
cells is constructed, so that it can automatically optimize the structural parameters of the modeled cells to achieve the expected phase response quantization accuracy.

Genetic Optimization Algorithm
Genetic algorithm (GA) is an optimization algorithm based on the principle of biological evolution, which achieves problem solving by simulating the processes of heredity, mutation, and selection in nature.GA was originally proposed by John Holland in the 1970s [25], has and is now widely used in optimization problems in various fields.The basic principle of GA is to generate new individuals through the selection, crossover, and mutation of individuals in the current population to form the next generation of the population, and gradually optimize the quality of the solution.The flow block diagram of GA is shown in Figure 3. Genetic optimization algorithms have the following advantages: firstly, GAs have strong global search ability, and their search process is based on global optimization, which can find the optimal solution in large-scale search space.Secondly, GAs do not need a special mathematical modeling of the problem, only rely on the fitness function value to optimize, without the need for derivative information, and can solve a variety of complex problems, such as nonlinear, nonconvex, and high-dimensional problems.In addition, GAs can be applied to multi-objective optimization problems.Common multi-objective GAs include Non-dominated Sorting Genetic Algorithm (NSGA), NSGA-II, Strength Pareto Evolutionary Algorithm (SPEA), and so on [26,27].Genetic algorithm is widely used in practical engineering because of its wide range of applications and easy implementation, and the optimization algorithm constructed in this paper is proposed to use genetic optimization algorithm as the optimization algorithm.Genetic optimization algorithms have the following advantages: firstly, GAs have strong global search ability, and their search process is based on global optimization, which can find the optimal solution in large-scale search space.Secondly, GAs do not need a special mathematical modeling of the problem, only rely on the fitness function value to optimize, without the need for derivative information, and can solve a variety of complex problems, such as nonlinear, nonconvex, and high-dimensional problems.In addition, GAs can be applied to multi-objective optimization problems.Common multi-objective GAs include Non-dominated Sorting Genetic Algorithm (NSGA), NSGA-II, Strength Pareto Evolutionary Algorithm (SPEA), and so on [26,27].Genetic algorithm is widely used in practical engineering because of its wide range of applications and easy implementation, and the optimization algorithm constructed in this paper is proposed to use genetic optimization algorithm as the optimization algorithm.

Algorithmic Framework
The simulation method of the metasurface cell used in the constructed algorithms is the multi-port network-based simulation method.The steps of the algorithm can be briefly summarized as follows.Firstly, the diode model is replaced with a lumped port using the full wave simulation software HFSS (version 2019) provided by ANSYS, and the Floquet port excitation and master-slave boundary conditions are set to simulate the cell.Secondly, Keysight ADS software (version 2019) reads the S-parameter file obtained from HFSS simulation, the equivalent RLC circuit models of diodes at high frequencies under different operating conditions are loaded at the corresponding ports, and then the constructed circuit models are simulated.By simulating the constructed circuit model, the reflection phases of the incident wave reflected by the metasurface unit under different operating states can be obtained simultaneously.
Figure 4 shows the main framework of the automatic optimization algorithm proposed in this paper.Under this framework, it is needed to solve the communication problems between MATLAB (version 2022a) and HFSS, and MATLAB and ADS software, i.e., to realize the call simulation and parameter return from MATLAB to HFSS and ADS software.
summarized as follows.Firstly, the diode model is replaced with a lumped port using the full wave simulation software HFSS (version 2019) provided by ANSYS, and the Floquet port excitation and master-slave boundary conditions are set to simulate the cell.Secondly, Keysight ADS software (version 2019) reads the S-parameter file obtained from HFSS simulation, the equivalent RLC circuit models of diodes at high frequencies under different operating conditions are loaded at the corresponding ports, and then the constructed circuit models are simulated.By simulating the constructed circuit model, the reflection phases of the incident wave reflected by the metasurface unit under different operating states can be obtained simultaneously.
Figure 4 shows the main framework of the automatic optimization algorithm proposed in this paper.Under this framework, it is needed to solve the communication problems between MATLAB (version 2022a) and HFSS, and MATLAB and ADS software, i.e., to realize the call simulation and parameter return from MATLAB to HFSS and ADS software.

Design of the Fitness Function
For the reflective metasurface unit, we need to achieve the goal that the phase difference between two adjacent operating states of the metasurface unit is equal to the expected quantization phase response accuracy, so that the quantization error can be minimized.Therefore, we can sort the reflection phase data returned from the ADS in MATLAB, calculate the phase difference between two reflections in sequence, and take the value of the largest reflection phase difference as the value of the fitness function.The mathematical expression of the fitness function is shown in the following equation:

Design of the Fitness Function
For the reflective metasurface unit, we need to achieve the goal that the phase difference between two adjacent operating states of the metasurface unit is equal to the expected quantization phase response accuracy, so that the quantization error can be minimized.Therefore, we can sort the reflection phase data returned from the ADS in MATLAB, calculate the phase difference between two reflections in sequence, and take the value of the largest reflection phase difference as the value of the fitness function.The mathematical expression of the fitness function is shown in the following equation: where f i (θ) is the phase response at the sorted operating frequency, the value of the phase response increases with the subscript 1~i, and q is the number of quantized phases.
It can be seen that the minimum value of this fitness function is the quantization interval of the designed expected phase response.Then, when the individual fitness value in this optimization scenario is closer to the expected quantization interval, the value of the neighboring reflection phase difference of the unit is also closer to the exact quantization interval.Therefore, it is believed that the constructed fitness function can well guide the population in the genetic algorithm to evolve towards the target direction.

Algorithmic Implementation
Currently, HFSS software supports running .pyscript files written in Python language or .vbsscript files generated by HFSS through recording operations.The design proposed in this paper intends to use MATLAB as the building platform for the algorithm, according to the open source project HFSS-MATLAB-API [28], successfully completing the MATLAB writing script and calling HFSS to run the script, realizing the control of HFSS by MATLAB.
The ADS software does not have an official executable script or program interface, and the automatic control of ADS can only be achieved through third-party program programming interfaces.Here, the automatic control of ADS software is realized by MATLAB using the open source project ADS-Matlab-Interface [29], The API is powerful enough to realize the parameter modification of the created circuit project file directly in MATLAB, call the simulator hpeesofsim of ADS software to simulate it, and read the simulation results in MATLAB.
After solving the problems of each part of the algorithm framework on the series, MATLAB provides the electromagnetic metasurface unit structure parameters, controls HFSS on the electromagnetic model simulation, and analyzes and exports the model S-parameter file, calling ADS's simulator on the constructed circuit model; thus, the algorithm framework is constructed.

Metasurface Unit Optimization Results
Parameter optimization is performed for the reflective metasurface unit cell proposed in Section 2. In the optimization, the size of the population is set to 50.The fitness function is valued as the maximum of the reflection phase differences between the eight neighboring cell states, and the minimum of this function is solved by means of continuous iteration.In addition, to ensure that the model is built correctly, the upper and lower limits of the values of each parameter and the linear inequality constraints are also set.The run results obtained from the optimization are shown in Figure 5, which illustrates the average fitness of all individuals in the population in each generation, and the value of the fitness function for the optimal individual in the population in the current generation.In the first few generations, both the mean value of the fitness function and the value of the fitness function of the optimal individual in each generation of the population declined rapidly.When the genetic algorithm was run to the 18th generation, it was observed that the optimal fitness decreased to 68.91 • .The average fitness function value in the population slightly recovered in each generation from the 20th generation onwards, and there were no more optimal individuals appearing in the following iterations.In this case, it can be roughly estimated that the genetic algorithm has found the optimal solution in the search space.The unit corresponding to the current optimal individual of the fitness function is simulated, and its corresponding reflection phase curve is shown in Figure 6.It can be observed that the phase curves of the unit in the eight operating states are not completely separated.The phase curves of states "000" and "010", and states "101" and "111" are identical, which means that when diode 1 and diode 3 are on or off at the same time, the on and off status of diodes 2 and 4 has no effect on the reflective characteristics of the unit.The possible reason is that when diode 1 and diode 3 are on or off together, since the direction of the incident wave polarization is along the direction of the current flow on diode 1 and diode 3, most of the microwave currents on the metal iron sheet will also flow along that direction.Because diodes 2 and 4 can control the current flow in their orthogonal direction, the change of the reflective characteristics of the unit caused by the on and off status of diodes 2 and 4 is very limited.For this reason, we extract "001", "010", "011", "100", "101", and "110" as the six operating states, and the metasurface unit cell is regarded as a six-phase equally spaced quantized reflective metasurface It can be observed that the phase curves of the unit in the eight operating states are not completely separated.The phase curves of states "000" and "010", and states "101" and "111" are identical, which means that when diode 1 and diode 3 are on or off at the same time, the on and off status of diodes 2 and 4 has no effect on the reflective characteristics of the unit.The possible reason is that when diode 1 and diode 3 are on or off together, since the direction of the incident wave polarization is along the direction of the current flow on diode 1 and diode 3, most of the microwave currents on the metal iron sheet will also flow along that direction.Because diodes 2 and 4 can control the current flow in their orthogonal direction, the change of the reflective characteristics of the unit caused by the on and off status of diodes 2 and 4 is very limited.For this reason, we extract "001", "010", "011", "100", "101", and "110" as the six operating states, and the metasurface unit cell is regarded as a six-phase equally spaced quantized reflective metasurface unit cell.The reflection phase values of each operating state at the operating frequency of 5 GHz are shown in Table 2.The maximum error of the optimized cell's reflection phase from the six-phase equidistant distribution is 18.79 • , and the average error is 7.88 • , which is 13.1% of the quantization of the standard six-phase reflection phase.The results indicate that the optimized metasurface unit cell is a reflective six-phase cell with good performance.The three-dimensional view of the cell structure is shown in Figure 7.The optimized numerical results are shown in Table 3.
distant distribution is 18.79°, and the average error is 7.88°, which is 13.1% of the quanti zation of the standard six-phase reflection phase.The results indicate that the optimized metasurface unit cell is a reflective six-phase cell with good performance.The three-di mensional view of the cell structure is shown in Figure 7.The optimized numerical result are shown in Table 3.

Unit Measurement
To verify the design, the optimized metasurface unit cell is fabricated and measured using the waveguide measurement method.The waveguide was used to test this reflectiv six-phase metasurface unit, and the model constructed is shown in Figure 8.It consists o three layers of dielectric plates screwed tightly together, with the same dimensions as th waveguide flange used.The first layer of the dielectric plate consists of a gasket structure and the unit size of the same slot and the surrounding metallized vias through holes con struct a closed space, to ensure that the electromagnetic waves radiated by the waveguid are all illuminated on the patch of the unit.The second layer of the unit, that is, th metasurface unit, is moved to the side of the waveguide flange on the dielectric plate.Th perimeter of the unit is also lined with metallized vias to ensure the radiating propertie of the unit.In the third layer of the dielectric plate, fan-shaped branches are constructed and used to short-circuit microwave current to ensure that the electrical characteristics o the unit are not affected by the DC bias.

Unit Measurement
To verify the design, the optimized metasurface unit cell is fabricated and measured using the waveguide measurement method.The waveguide was used to test this reflective six-phase metasurface unit, and the model constructed is shown in Figure 8.It consists of three layers of dielectric plates screwed tightly together, with the same dimensions as the waveguide flange used.The first layer of the dielectric plate consists of a gasket structure, and the unit size of the same slot and the surrounding metallized vias through holes construct a closed space, to ensure that the electromagnetic waves radiated by the waveguide are all illuminated on the patch of the unit.The second layer of the unit, that is, the metasurface unit, is moved to the side of the waveguide flange on the dielectric plate.The perimeter of the unit is also lined with metallized vias to ensure the radiating properties of the unit.In the third layer of the dielectric plate, fan-shaped branches are constructed and used to short-circuit microwave current to ensure that the electrical characteristics of the unit are not affected by the DC bias.The WR187 waveguide is used to test the fabricated unit cell, using three independent power supplies for the diode plus DC bias, and can freely switch its operating state.By observing the S11 of the vector network analyzer, the reflective characteristics of the unit in different states can be viewed.Using the standard PCB technology, the prototype of the designed unit cell and the test structure are fabricated.The prototype of the test unit is shown in Figure 9a while the test environment is shown in Figure 9b.The WR187 waveguide is used to test the fabricated unit cell, using three independent power supplies for the diode plus DC bias, and can freely switch its operating state.By observing the S11 of the vector network analyzer, the reflective characteristics of the unit in different states can be viewed.Using the standard PCB technology, the prototype of the designed unit cell and the test structure are fabricated.The prototype of the test unit is shown in Figure 9a while the test environment is shown in Figure 9b.The WR187 waveguide is used to test the fabricated unit cell, using three independent power supplies for the diode plus DC bias, and can freely switch its operating state.By observing the S11 of the vector network analyzer, the reflective characteristics of the unit in different states can be viewed.Using the standard PCB technology, the prototype of the designed unit cell and the test structure are fabricated.The prototype of the test unit is shown in Figure 9a while the test environment is shown in Figure 9b.The phase response of the unit in different operating states obtained through experimental tests is shown in Figure 10.It can be observed that the unit has six-reflection-phase differentiation at the 4.55 GHz frequency point.

The Metasurface Antenna Design and Simulation Results
The cells are formed into a 16 × 16 metasurface antenna with horn feed and beam scanning application, as shown in Figure 11.The results of the simulation are shown in

The Metasurface Antenna Design and Simulation Results
The cells are formed into a 16 × 16 metasurface antenna with horn feed and beam scanning application, as shown in Figure 11.The results of the simulation are shown in Figure 12.With reference to the figure, one can see that the constructed array has good beam scanning capability.In addition, a 2 bit unit cell, i.e., the four operating states of "100, 110, 011, 111", is extracted to form another metasurface antenna for comparison with that using the 2.5 bit unit cell.The results are also shown in Figure 12.It can be seen that, compared with the 2.5 bit array, the array constructed by the 2 bit unit will raise the sidelobe of the far-field directional map during beam scanning, and thus the directionality of the array will be somewhat reduced.Therefore, in the practical use of the metasurface, the corresponding high-precision quantization of the phase is necessary.

The Metasurface Antenna Design and Simulation Results
The cells are formed into a 16 × 16 metasurface antenna with horn feed and beam scanning application, as shown in Figure 11.The results of the simulation are shown in Figure 12.With reference to the figure, one can see that the constructed array has good beam scanning capability.In addition, a 2 bit unit cell, i.e., the four operating states of "100, 110, 011, 111", is extracted to form another metasurface antenna for comparison with that using the 2.5 bit unit cell.The results are also shown in Figure 12.It can be seen that, compared with the 2.5 bit array, the array constructed by the 2 bit unit will raise the sidelobe of the far-field directional map during beam scanning, and thus the directionality of the array will be somewhat reduced.Therefore, in the practical use of the metasurface, the corresponding high-precision quantization of the phase is necessary.Figure 12 demonstrates that the proposed metasurface array achieves a maximum gain of 24.1 dBi in normal radiation, a sidelobe level of less than −20 dB, and precise beam pointing with an aperture efficiency of 31.9%.Table 4 compares the proposed 2.5 bit metasurface with previous related work.The table shows that the proposed 2.5 bit metasurface unit offers more accurate quantization phase error, higher aperture efficiency, and lower sidelobe levels compared to other low-quantization-accuracy reconfigurable metasurface arrays.While it is true that non-reconfigurable metasurface arrays, which do not contain diodes, exhibit higher efficiency [30], their inherent lack of reconfigurability somewhat restricts their range of application scenarios.

Conclusions
This paper presents a reflective metasurface unit operating at 5 GHz with highprecision phase quantization, achieving six operating states through four P-I-N diodes.Each state's reflective phase difference is approximately 60 • .An optimization design algorithm for the electromagnetic metasurface unit structure is developed on the MATLAB platform.It automates the unit cell's design by integrating with electromagnetic simulation software HFSS and circuit simulation software ADS, which realizes the optimization of the proposed high-precision quantization unit, demonstrating its efficacy in electromagnetic metasurface design.To verify, the unit cell prototype was fabricated and its six-phase reflection response measured using the waveguide method.Furthermore, a reflective metasurface antenna array of 256 units was constructed for beam scanning using the proposed unit model and simulated with full-wave simulation.This demonstrates its robust beam scanning capability and confirms that high quantization accuracy contributes to sidelobe reduction and directional improvement.

Figure 6 .
Figure 6.Reflection phase profile of the cell obtained through optimization.

Figure 6 .
Figure 6.Reflection phase profile of the cell obtained through optimization.

Figure 7 .
Figure 7. Three-dimensional image of the cell obtained through optimization.

Figure 7 .
Figure 7. Three-dimensional image of the cell obtained through optimization.

Figure 9 .
Figure 9. (a) The photo of the prototype of the test unit cell.(b) The test environment.

Figure 9 .
Figure 9. (a) The photo of the prototype of the test unit cell.(b) The test environment.The phase response of the unit in different operating states obtained through experimental tests is shown in Figure10.It can be observed that the unit has six-reflection-phase differentiation at the 4.55 GHz frequency point.

Table 1 .
Numerical representation of unit operating status.

Table 2 .
Numerical representation of unit operating states.

Table 4 .
Comparison with related works.