Real-data-driven real-time reconfigurable microwave reflective surface

Manipulating the electromagnetic (EM) scattering behavior from an arbitrary surface dynamically on arbitrary design goals is an ultimate ambition for many EM stealth and communication problems, yet it is nearly impossible to accomplish with conventional analysis and optimization techniques. Here we present a reconfigurable conformal metasurface prototype as well as a workflow that enables it to respond to multiple design targets on the reflection pattern with extremely low on-site computing power and time. The metasurface is driven by a sequential tandem neural network which is pre-trained using actual experimental data, avoiding any possible errors that may arise from calculation, simulation, or manufacturing tolerances. This platform empowers the surface to operate accurately in a complex environment including varying incident angle and operating frequency, or even with other scatterers present close to the surface. The proposed data-driven approach requires minimum amount of prior knowledge and human effort yet provides maximized versatility on the reflection control, stepping towards the end form of intelligent tunable EM surfaces.


Introduction
It has been decades since the idea was first proposed to control EM field behaviour with metamaterials -structures with subwavelength geometrical details [1][2][3].In particular, its 2-D version, i.e. metasurface, draws broad attention and is intensively investigated due to its advantage in engineering aspects -being able to be manufactured relatively easily on thin sheet materials [4].The reported application space of metasurfaces is vast, ranging from directing surface waves in the near-field [5], beam-forming in the far-field [6], to EM clocking [7], holography [8,9], etc.Beyond the planer regime, efforts have been made to implement flexible metasurfaces in hope of bringing these intriguing wave manipulation capabilities to surfaces with arbitrary shapes.However, the mechanism of wave interaction with curved surfaces is significantly more complex than its flat counterpart [10], and as a result, research has mainly focused on optimizing for specific tasks such as wave-front control [11], radar-cross-section (RCS) reduction [12] or polarization conversion [13].To realize a reconfigureable version is even more challenging, not only because of the difficulty in balancing mechanical properties and EM performance, but also because of the lack of accurate and efficient algorithms to support the inverse design.
Meanwhile, recent years have witnessed the emergence of exploiting neural networks (NNs) in complicated EM/photonic systems.On the one hand, as a good regressor of highly non-linear functions, NNs provide a cost-efficient solution to many analysis problems, from solving Poisson's equations [14], to handling EM scattering inversion [15].On the other hand, recent researches also demonstrate the strong design capability of NNs, including optimizing linear phased arrays [16], or designing photonic devices and nanoparticles [17][18][19][20][21].One special advantage of a pure NN-driven scheme, compared with conventional optimization methods, is that no iterative process is involved in the prediction phase, which is crucial for an on-site system in need of fast response.This feature has been exploited recently to facilitate an emerging concept -the intelligent metasurface, which refers to metasurfaces that tune themselves in an adaptive manner, with little human intervention [22], from beam-forming [23], to sensing purposes [24,25].In theory, similar strategy can be used for curved surfaces, and preliminary studies on NN-driven non-planer surface has been reported for cloaking or "illusion" applications [26][27][28], yet a more universal and versatile scheme is still needed for the surface to dynamically operate under different types of tasks.
This Article aims to demonstrate one possible universal NN-driven scheme to realize an intelligent conformal surface that can respond to arbitrary design goals.We start by demonstrating a practical realization of a tunable conformal surface operating at microwave frequencies, whose reflection pattern can be controlled with multi-channel bias voltages.A sequential neural network architecture is then proposed, which can take free-form design targets on the pattern and environmental factors as the input.Instead of using data obtained with full-wave simulations to train the network, as is a common practice in most NN assisted EM research, we propose using actual measurement data, which turns out to be fast, accurate and very adaptive to different environments.Considering the versatility of the proposed workflow, we believe this work paves the way for the next generation of tunable EM devices working under extremely complex and dynamic environments.

Reconfigurable Flexible Metasurface
The conformal metasurface design is based on a classical tunable reflective metasurface topology in [29].The surface is tiled with sub-wavelength metallic patches, with varactor diodes placed between the neighboring unit cells.By changing the reverse bias voltage across a varactor diode, the reflection spectrum of a unit can be shifted.This results in tuning the local reflection phase in a frequency range close to the resonance, and collectively all units form a reflection pattern in the far-field region.
While this continuous-phase tuning approach generally provides greater degrees of freedom than discrete-state tuning methods like binary phase states with pin-diodes (also known as phase coding) [30], it is more sensitive to dissipation loss which leads to significant decrease in reflection amplitude near the resonant frequency.To address this issue, thicker substrate is preferred to maximize the radiation efficiency of the metallic patches, and low-loss materials designed for radio frequency (RF) use are preferred to reduce dielectric loss.Thick RF materials are not typically flexible, so we propose a double-layered rigid-flex stacking structure to provide the overall flexibility of the surface: unit cells are implemented using relatively thick microwave materials, which are separately attached to a single ultra-thin flexible layer that also contains circuits for bias feeding.In this demonstration, we built 24 separate columns, with 10 patches in each column, making a 38.51 cm × 13.64 cm × 1.97 mm surface.Units on each column share the same reversed bias voltage, forming a 24 dimensional vector V, realizing pattern control in the azimuth plane, with intensity noted as D(θ).Hyperabrupt varactor diodes with high quality factor (Q) are also employed to further reduce the loss on the lumped components.
Fig. 1 (c) and (d) depict the measured static reflection amplitude/phase response of a flat board.Note that this data will not be used throughout the entire inverse design workflow but rather is used merely as an initial examination and verification of the surface reflection performance.The results show that the board covers a large reflection phase range within the 4.5 GHz -4.7 GHz frequency band, which is necessary to achieve maximum pattern tunability.
Determining the relationship between the reflection pattern and a given bias combination D(θ) = f (V) can be challenging, due to the non-linear relationship between bias voltages, local reflection phases and directivity to certain directions.Additionally, the multireflection effect in the concave regions invalidates any theoretical models that consider the surface as simply a reflective antenna array [27].Other factors that complicate the problem are, but not limited to, varying orientation of each column, coupling effects between unit cells, tolerance of individual lumped components, or in some cases, the presentation of scattering objects near the device.In this scenario, a pure datadriven model is especially advantageous, since it can automatically take into account of all these factors by using the real measured data.However, the extremely large search space of the input variables renders the conventional interpolation or regression methods impractical and make the neural network method the best candidate.

Sequential Tandem Neural Network
Consider the fact that a simple feed-foward network (FFN) can theoretically approximate any given function provided large enough scale, it is tempting to believe it can be used to find the underlying pattern-voltage mapping V = f −1 (D).The pitfall lays in that the design parameters and design goals usually have a multiple-to-one relationship.In our case, similar or even identical reflection patterns may correspond to very different bias voltage combinations.When the network is trained with gradient descent methods, conflict gradients may arise from data with very similar input (i.e.pattern) but very different labels (i.e.bias voltages), preventing the parameters from converging.For a problem where the input contains less information than the output, as in this case, a generative type of neural network is necessary.Recent large generative models such as diffusion [31] and transformer [32] have shown extremely powerful capability in generating image and language content, even stepping towards artificial general intelligence (AGI) [33], yet for engineering problems on specific tasks, smallscale efficient models are still preferred, among which the tandem architecture has proven a very effective framework [17,18,[34][35][36].
In tandem architectures, a predictor is first trained to solve the analysis problem, in our case, the bias-pattern mapping; then another network, the desinger, is trained to handle the synthesis procedure -determining the bias combination given a specific pattern.The designed bias can be fed into the predictor to produce an expected pattern D, and the performance can be evaluated by comparing the discrepancy between D with the design goal D, which serves as the loss function for training designer network.Importantly, the second step does not involve D − V mapping from any dataset, thus there is expected to be no gradient conflict.Essentially, instead of fitting the reverse function f −1 (•), the network aims at seeking any function that simply optimizes the design performance.Notice in conventional tandem networks reported by previous works, a design target with the exact form as the predictor's output is required, which largely limits its practicality.In many cases, free-form design goals are required, for example, one may want to specify several target directivity values in certain directions without having to constructing the entire pattern.To enable this free-form input, we introduce the recurrent neural network (RNN) layer in the designer.RNN is typically utilized to process temporal signals such as video and speech [37]: the recurrent layer updates itself from a current state as a sequential signal is fed in, resulting in a "memory effect" on all past inputs in the sequence.Here we can use a sequence of design goals as the input, which could be, for example, a sequence with a length of l t , repeating n t angle-directivity pairs (θ i , D i ).Despite that there is no explicit temporal relationship between these design goals, we still expect the layers to "memorize" all those targets within the sequence.In this way, the network can respond to design goals with arbitrary dimensions as long as n t is below reasonable threshold to avoid vanishing gradient.
For the predictor, convolutional layers are employed, which is based on the physical knowledge of a linear phased array [38]: the same phase difference between neighboring units should have similar effect in the far-field no matter where they are located within the array, and therefore the parameters can be shared among all adjacent units.The convolutional layers significantly reduce the number of parameters so that the predictor requires less data and suffers less from overfitting.
To allow the surface to operate with changing incident frequency and under different incident angles, this varying environmental information can be also cascaded to the input design goal vectors in the designer, and to the input bias-voltage vectors in the predictor (Supplementary Note 5).

Experiments and Results
Here we demonstrate four scenarios in which the conformal metasurface may operate, with an increasing complexity as follows: A) the simplest case of a flat surface operating under a normally incident plane wave at a single frequency; B) a curved surface, under normal incidence, at a single frequency; C) a curved surface working in a varying environment: with incident wave angles ranging from −30 • to 30 • , and a frequency band from 4.5GHz to 4.7GHz, and D) a curved surface under varying incident angle and frequency, with a plastic scattering object present in front of the surface, disturbing the reflective pattern.
The pattern data is gathered using a setup in an anechoic chamber shown in Fig. 3.A vertically polarized beam is excited with a horn antenna Tx, and its specular reflection from the surface under test (SUT) is received by another horn antenna Rx.The intensity and phase are recorded by a vector network analyzer (VNA).Both SUT and Tx antenna are attached to a servo motor to realize azimuth pattern scanning.Another servo motor is used to rotate the SUT to simulate incident angle changes.Revered bias-voltages of 24 channels are generated and applied to the board with data acquisition (DAQ) cards, and the patterns are collected in 5-degree-resolution from 0 • to 180 • , forming a 37-dimensional vector D. Several measures are taken to reduce the direct talk between Tx and Rx as well as the ambient noise: 1) absorbers are used to block the line of sight (LOS) between Tx and Rx, 2) patterns are calibrated by a blank case with SUT unmounted and 3) a 5 ns time-gating is applied to filter out signals other than direct reflection from the SUT.
For cases with constant environment (case A and case B), 20,000 samples are collected with random combinations of bias voltages ranging from 0 V to 18 V on each channel, and for case C and D, 4,000 random bias samples are collected for each incident angle, with 13 incident angles; 5 random frequencies within the band of interest are sampled for each incident/bias setup, making a total 260,000 samples (Supplementary Note 4).As the response time of the varactor diodes is relatively fast, on the order of nanoseconds, the data collecting speed is mostly limited by the response time of the control/measurement instrument being used, generally on the order of milliseconds.To obtain a stable result for our setup, 20 ms wait time is used in between samples and the total data collection time is on the order of several hours, details listed in Table 1, which is much faster than any full-wave simulation methods can achieve.
The data is split 80/20 as the training/test set to train and evaluate the predictor.Extended Data Fig. 2 shows the performance of the trained predictor network.The prediction matches extremely well with measured data in test set for all four cases, with an error almost close to noise level.
Training the designer network is a non-supervised learning process, since the label for any design targets is itself: the loss function is defined by the masked means square error (MSE) on target directions L(T, D) = 1 nt nt i=1 (D i − Di ) 2 .In this demonstration, we randomly generate sequences with up to five targets.In practice we find each goal needs to be repeated for three to four times in order for the network to fully memorize it, thus for the result to converge, the sequence length l t is chosen to be 20.Considering the energy distributing effect for multiple targets, the directivity ranges for different target numbers n t is [0, D max / √ n t ], where D max = 8.85 is the maximum directivity that can be ideally achieved with the surface aperture.For case A and B, 100,000 samples are generated, and for case C and D, 260,000 samples (Supplementary Note 5).The data is again split 80/20 for training/test set, and the performance is shown in Fig. 4 and Extended Data Fig. 3-6.The network performs very well for fewer numbers of targets and still decently well for 3 or more targets, obtaining an average RMSE below 1 for most cases.
It is worth noticing that this performance is evaluated on random targets that is not necessarily physically feasible, such as the existence of a peak and a null in close proximity, or strong beams at the end-fire direction.By using large training set, the physical limit of the surface capability is approached.
Compared with the training process, the prediction of the network consumes minimal computing resources.Therefore, this trained network can be deployed on modest micro-controllers with very limited computing power.In Table 1 we demonstrate this on a cheap commercially available SoC controller.The speed depends on various factors such as the machine learning platform, batch sizes of input, etc, but generally the responding time for both designing (with designer) and evaluation (with predictor) are on the order of milliseconds per sequence, which can be considered as real-time.

Discussion
Being able to specify target directivities at multiple directions makes the surface suitable for numerous applications.One simple example is to reduce the back-scatter of a surface for manipulating RCS in a dynamic environment -by specifying a null at the direction of the incoming wave, the surface can be constantly optimized to reduce the mono-static RCS to a single station, as shown in Fig. 5 (a).A more intriguing task is to instruct the surface to cancel out the scattering from an object in front of the surface, keeping it from being detected in certain directions, as in Fig. 5 (b).It can also be utilized for intelligent communication applications, performing tasks ranging from creating a single pencil beam, as in Fig. 5 (c), to arranging multiple peaks and nulls, completely redistributing the incoming energy as in Fig. 5 (d).The design presented in this paper works over relatively narrow bandwidth but this is not limited by the model itself: design parameters like substrate thickness can be increase to increase the bandwidth.The efficiency can be improved as the semiconductor technology for varactors develops.Modifications can also be made to the network input to achieve even higher versatility, for example by expending the target pairs with operators to form tokens like (θ i , D i , ≤) representing design goal D(θ i ) ≤ D i .Other types of tasks, such as polarization conversion or holographic pattern, can also be achieved with proper types of metasurface design, by including polarization or near-field data in the input and output of the network.

Conclusion
In this paper, we present a prototype of a flexible programmable reflective surface working at microwave frequencies, and a machine learning model that allows it to respond to real-time free-form targets.We demonstrate how powerful a small-scale neural network is in solving inverse design problems in a highly non-linear photonic/EM system.We also demonstrate how an experimental-data-driven model enables the platform to be inherently immune to errors and uncertainties within the design, allowing an accurate analysis/synthesis of the system with minimum effort in theoretical analysis and modeling.The proposed sequential tandem architecture can potentially be accommodated to any real-time inverse design problem in different science/engineering fields by simply adjusting the detailed network layer structure and dimensions.

Rigid-flex PCB manufacturing
The rigid layer is made with 62 mil Rogers RT/Duroid 5880 material and the flexible layer is made with 2 mil polyimide substrate, bonded together with 6 mil preprag.The unit periodicity is 13 mm along the column and 13.76 mm across the column with 0.76 mm separation in between columns (Supplementary Note 1).The top copper layer is protected with ENIG finish and the soldermask is only around varactor footprints for soldering purposes.Ground plane copper layer and d.c.bias feeding network copper layer are protected with flexible coverlay.
GaAs Hyperabrupt varactor diode Macom MA46H070-1056 are used across the units.Each channel is protected by a 10kΩ series resistor RNCF0603TKY10K0 by Stackpole Electronics Inc.

Measurement Setup
The static reflection spectrum of a flat metasurface is measured with a single horn RCDLPHA2G18B by RF-Lambda.S 11 is recorded with an Agilent E5071C VNA for 3 cases: 1) bare horn, 2) metatasurface in front of the horn, and 3) an aluminium plate of the same size in front the horn.The effective reflection amplitude and phase are then calculated (Supplementary Note 2).
The example curve in case B,C and D is a spline with 4 anchor points.The plastic scatter in case D is a 3-D printed 3 cm x 3 cm x 20 cm PLA cylinder (Supplementary Note 3).
The pattern collection test bench is controlled by a single controller PXIe-8135 by National Instruments(NI) running python 3.7.For the bias voltage supply, three 8channel 16-bit DAQ cards NI PXI-6733 and a d.c.source Keithley 2410 are used.The azimuth scanning is realized with an ETS Lindgren 2005 motor and the incident control is facilitated by a ZOSKAY DS3235SG servo motor, driven by an Adafruit FT232H breakout and a Adafruit 12-bit PMW driver (Supplementary Note 3).Directivity and RCS are calculated with respect to the measured reflection from an aluminum plate of the same size as the board.Blank case calibration and time-gating are used in post-processing to reduce noise and undesired reflection from the experiment setup (Supplementary Note 4).

Neural Network and Training Process
The neural network is implemented using TensorFlow 2.6.0 under Python 3.9.5, and is trained on the UCSD Data Science/Machine Learning Platform (DSMLP) using four Intel XeonGold 6130 CPU @2.1 GHz core and one NVIDIA GeForce GTX 1080 Ti GPU.
The designer consists of 3 recurrent layers and 3 flat fully connected layers.The predictor consists of 3 convolutional layers and 3 flat fully connected layers.The parameters are trained with ADAM [39] optimizer.L2 regularizaion is used for the predictor to reduce the overfitting [40].See Supplementary Note 5 for the detailed training process.The SoC computer for network prediction speed evaluation is Raspeberry Pi 4 with Quad-core Cortex-A72 @1.8GHz and 8GB RAM, running Python 3.7.3 and TensorFlow lite 2.3.0.The time is the average on a dataset with 6000 samples, processing with a batch size of 500.
For visual examples in Fig. 4 and Extended Data Fig. 3-6, we use random seeds 1,2,3,4 when sampling for case A,B,C and D, respectively.to ensure the generality and reproductivity.

Fig. 1
Fig. 1 Conformal metasurface and its static performance.(a) Illustration of the conformable rigidflex printed circuit design.The substrate of each columns is made with 1.57mm semi-rigid reinforced PTFE material designed for microwave applications.They are then bonded to a single flexible sheet made of 0.18 mm thick polyimide, with a feeding network on the bottom side to provide the varactors with d.c.bias voltages.(b) Photo of the prototype.(c) and (d) Measured reflection amplitude and phase response of the flat surface under various bias voltages.See Methods and Supplementary note 2 for measurement setup.

Fig. 2
Fig. 2 Real-data-driven real-time inverse design workflow.(a) The time-consuming and computationally-heavy part are done off-site in the first two steps -data gathering and network training.The pre-trained network can be then deployed to on-site controllers with very limited computing resources to realize fast-response inverse design.(b) Proposed sequential tandem network architecture.The predictor is first trained with measured pattern data.Then the parameters of the predictor are fixed and random design target sequences are used to train the designer.Detailed layer dimensions and connections are shown in Extended Data Fig. 1.

Fig. 3
Fig.3Experiment setup for pattern data gathering.The transmission between Tx and Rx through specular reflection on the SUT is recorded by the VNA.By rotating the azimuth scanning motor, Rx equivalently sweep across the azimuth plane to collect the pattern.Incident angle is controlled by a small servo motor the SUT directly mounted on.Three DAQ cards provide the bias voltages for all channels.

Fig. 4
Fig. 4 Performance of the conformal surfaces inverse design with increasing complexity: (a) and (b) Flat and curved surface, under normal incidence, at constant frequency (c) curved surface, under varying incident angle and frequency and (d) with scattering object presented.(e)-(h) The root mean squre error (RMSE) distribution on designs in the test set.(i)-(l) Visual examples of pattern design with 1 to 5 design targets, with typical error value in its category, excerpted from Extened Data Fig. 3-6 where more random-selected visual examples and error distribution in different categories are given.Red arrows in case C and case D indicate the incident direction.

Fig. 5
Fig. 5 Exemplary applications of the free-form design capability.(a) Creating minimal back-scatter for a 30 • incident.(b) Creating nulls in 50 • , 100 • and 150 • direction to stealth a scatterer in front of the surface.(c) Creating a pencil beam at 65 • direction under a normal incident.(d) Creating beams at 75 • and 150 • direction and nulls at 30 • and 100 • , under 15 • incident.The operating frequency is 4.6 GHz for these four examples.(e)-(h) Bias voltages on channel 0-23, designed by the designer.(i)-(j) The corresponding pattern.

Extended Data Fig. 1
Proposed sequential tandem network architecture.Dimensions of tensors in the predictor for case A,B and case C,D are in green and red, respectively.Extended Data Fig. 2 Performance for the predictor for four cases.(a) RMSE distribution from case A to case D, in the test set.(b) Visual examples with typical error level.Extended Data Fig. 3 Performance of the designer for case A. (a) RMSE distribution on sequence with different target number nt.(b) Random-selected visual examples, sampling from 6,000 test samples with random seed = 1.Extended Data Fig. 4 Performance of the designer for case B. (a) RMSE distribution on sequence with different target number nt.(b) Random-selected visual examples, sampling from 6,000 test samples with random seed = 2. Extended Data Fig. 5 Performance of the designer for case C. (a) RMSE distribution on sequence with different target number nt.(b) Random-selected visual examples, sampling from 6,000 test samples with random seed = 3. Extended Data Fig. 6 Performance of the designer for case D. (a) RMSE distribution on sequence with different target number nt.(b) Random-selected visual examples, sampling from 6,000 test samples with random seed = 4.

Table 1
Time consumption of tasks in the workflow.