{'fraction_non_alphanumeric': 0.0267188009123493, 'fraction_numerical': 0.013142174432497013, 'mean_word_length': 4.949919224555735, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Intelligent resonance tracking of a microwave plasmonic resonator for compact wireless sensors

Plasmonic sensing has been in the spotlight for decades, the concept and applications of which have been generalized to spoof surface plasmons (SSPs) in the microwave band. Here, we report a compact and wireless sensor within a printed circuit board size of 18 mm * 12 mm, tracking the resonance frequency shift of a microwave plasmonic resonator via a software-defined scheme. The microwave plasmonic resonator yields a deep-subwavelength size, enhanced sensitivity, and a good electromagnetic compatibility performance. The software-defined resonance tracking scheme minimalizes the hardware circuit and the consumed spectrum resources, and makes the detection intelligently adaptive to the target resonance, with a signal-to-noise ratio of 69 dB and a data rate of 2272 measuring points per second. The sensor has been validated via acetone vapor concentration sensing, while its applications can be widely extended by replacing the transducer materials. This approach provides compact, sensitive, accurate and intelligent solutions for resonant sensors in the Internet of things (IoT).

Surface plasmons (SPs) have been proved to be an invaluable technology for optical sensing 1 , which has been applied to diverse fields including antigen-antibody interactions 2 , cancer biomarker detection 3 , food safety 4 , gas concentration monitoring 5 , etc. The subwavelength confinement of light in plasmonic structures enhances lightmatter interactions and makes them ultra-sensitive to the surrounding dielectric environment [6][7][8] . Being in the spotlight for decades, plasmonic sensing become a wellestablished technology and has been developed for commercial instruments, while there are still ongoing and enticing new breakthroughs [8][9][10] .
The concept of SPs has been generalized to spoof surface plasmons (SSPs) in microwave and terahertz frequencies, based on artificial metallic structures which behave as effective Drude metals while metals are almost perfectly conductive at these lower frequencies [11][12][13][14] . Both propagating and locally resonating modes of SSPs have been demonstrated using designed metallic patterns on printed circuit boards (PCBs) [15][16][17] . Besides resembling the superiorities of optical SPs, SSP sensing exhibits more unique significances in microwave frequencies 18 . From the principal point of view, due to much lower metal loss, SSP resonances present higher quality factors (Q-factors) and multipolar higher-order modes, combining the plasmonic evanescent enhancement and microcavity standing-wave enhancement of sensitivity 18,19 . From the engineering point of view, the compatibility of SSPs to PCBs makes them integratable with subsequent analog and digital circuits and suitable for portable and compact sensors in the Internet of things (IoT) 18,20,21 . Compared with conventional microwave resonators, deepsubwavelength modal confinement of SSP resonators leads to compact sizes, high sensitivity, high immunity to electromagnetic interferences (EMI), and low radiated emission 18 . As a newly arisen field, microwave plasmonic sensing booms rapidly with attempts emerging in liquid concentration sensing 22 , monitoring of the engineering structures 23 , etc.
For an electromagnetic (EM) resonant sensor, the detection system converting the resonance shifts into voltage signals is crucial, which determines the overall detection limit and the total size of the sensing system. A direct way is scanning the frequency back and forth over the resonance band to find the dip position. It is the most adopted method in both microwave and optical resonant sensing, using either bench top instruments such as vector network analyzers (VNA) for microwaves and spectrometers for optics, or using tuning and detecting circuits in recently developed compact sensors 24 . However, the scanning process is time-consuming, and it consumes too much spectrum resources. For simplification, intensity measurement at a single frequency is often carried out in both instruments 25 and wearable sensors 26 , but it sacrifices the accuracy and is susceptible to signal fluctuations. Conventionally, detection schemes involving feedback locking loops can lead to high signal-to-noise ratios (SNR), and work in narrow bandwidths just around the resonances. In the microwave band, phaselocked loops (PLL) are adopted to track the resonance 27,28 . However, the circuit scale is large, and the settings have been fixed in designing which are not versatile for variant sensing scenarios. Pound-Drever-Hall (PDH) locking technique, which was originally proposed for laser frequency stabilization via a feedback control loop 29,30 , has been employed in optical microcavity sensing, using the error signal which is proportional to the resonance shift as the sensing response [31][32][33] . PDH technique has very extensive and versatile applications for its outstanding accuracy and time resolution, including interferometric gravitational-wave detector 34 , high-fidelity quantum control, 35 etc.
However, manipulation of such a precise locking loop and determination of the control parameters is often tricky, although many investigations have been devoted to automatic locking and relocking methods 36,37 .
In this article, we report a compact and wireless sensor, which is composed of a microwave plasmonic resonator (MPR) and its detection and data processing system.

Results
Overview of the system architecture. The schematic diagram of the compact and wireless microwave plasmonic sensor and its sensing network is shown in Fig. 1a. The sensing signal originates from the resonance frequency of the MPR, which will shift with the effective permittivity of the transducer materials attached to the resonator surface. The detection circuit, which converts the resonance shifts of the MPR to voltage signals, is minimalized and mainly composed of a voltage-controlled oscillator (VCO), a detector diode, and an MCU as shown in Fig. 1b. A Bluetooth module is used to send the measured data to and get instructions from a smartphone. All hardware devices including periphery circuits have been covered in a multilayer PCB with a size of 18 mm 12 mm, except a button cell, as shown in Fig. 1c and d (for details see Methods).
The function of the plasmonic sensor is versatile and depends on the transducer materials attached to the MPR surface (see Methods), which is validated by acetone vapor concentration sensing based on polydimethylsiloxane (PDMS) films in this article. The PDMS film will swell after absorbing the acetone vapor, and its effective permittivity will increase 38,39 . Therefore, the resonance frequency will decrease with increasing acetone vapor concentration. We remark that, this paper emphasizes physical and electric investigations instead of chemical transducers. PDMS films are chosen for their simple accessibility and easy manipulation for the non-specialist in chemistry. The overall vapor concentration sensing performance can be improved by replacing PDMS with advanced transducer materials which can produce more obvious permittivity changes when absorbing the target gas [40][41][42] .
The resonance tracking loop is mainly realized via the algorithm in the MCU.
Instructed by the smartphone, the sensor can work under both the frequency scanning mode and the resonance tracking mode. The control parameters for the resonance tracking mode can be automatically calculated according to the transmittance resonance spectrum got from frequency scanning. The output frequency of the VCO is controlled via the digital-to-analog converter (DAC) voltage from the MCU, and the transmitted power of the MPR is detected by the detector diode and sent to the analog-to-digital converter (ADC) of the MCU. Thus, the horizontal and vertical coordinates of the on-PCB measured transmittance spectrum of the MPR will be the DAC and ADC voltages in the following discussions.
The working frequency of the demonstrated sensor is around 4.9 GHz. Although the proposed sensor exhibits a good EMC performance, the working frequency can be conveniently redesigned to other microwave frequencies according to the specific EM environment to avoid any possible EMI. The working frequency is around the resonance and can be tuned by the size and the pattern of the MPR. The VCO and detector should be chosen covering the working frequency. The transducer materials usually work for a broad spectrum ranging from microwaves to optics.
Design and analysis of the MPR. Therefore, the sensitivity is greatly enhanced compared with common geometries which print the resonators on the microstrip layer (top metal layer) and lay the transducer materials on top of the resonator. Moreover, the resonance intensity δT, which is defined as the difference between the top and the bottom of the transmittance resonance curve (Fig. 2d), is greatly enhanced by this sandwiching structure. The resonance intensity is one of the key issues of on-PCB measurement, which means full use of the specific ADC resolution and affects the overall noise level (see Supplementary Note 3). Although capacitive coupling is commonly used to enhance the resonance intensity of deep-subwavelength resonators, it greatly decreases the sensitivity as the EM fields are partly attracted into the high-permittivity but inert capacitance 19,43 . The proposed sandwiching structure enhances the sensitivity and resonance intensity simultaneously.
For an intuitional sense of its superiorities, the proposed MPR is quantitatively The diameter of the contrastive MRR is 3.1-fold that of the MPR, and, the maximum electric field enhancement of the MPR is 2.7-fold that of the contrastive MRR. As demonstrated in Fig. 2e and f, the resonance shift sensitivity and the resonance intensity of the proposed MPR are obviously enhanced than the contrastive MRR. Local sensitivity SL is defined to evaluate the sensing response within unit sensor size as: in which fr is the resonance frequency, ε is the relative permittivity of the PDMS film, and S is the area of the resonator. SL is calculated via EM simulation as presented in Supplementary Note 2. The local sensitivity of the proposed MPR is 108-fold of the contrastive MRR resonating at the same band, and is 9.7-fold of the case that the same MPR pattern printed on the PCB top layer.
Comparing the two transmittance spectrum curves in Calibrating the DAC/ADC voltages to VCO frequency and transmittance power, the on-PCB measured Q-factor is 18.5. Although the on-PCB measured Q-factor degrades greatly compared with the simulated value of 103.2, it is still a relatively high value compared with other conventional deep-subwavelength resonators 19 .
It is difficult to couple free-space waves into deep-subwavelength resonators, therefore, high immunity to EMI can be expected. The EMI immunity test is carried out under a continuous wave (CW) radiation of 25 dBm from a horn antenna located at a distance of 100 mm (for details see Methods and Supplement Fig. 12). Varying the interfering radiation frequency, it is found that the frequency at resonance (which is measured to be 4.94 GHz and slightly deviates from the simulated value of 4.92 GHz) causes the strongest interferences. As shown in Fig. 2g, the interfering radiation causes slight interferences to the transmittance curves. The offsets of the ADC voltage just at resonance, which are measured by fixing the VCO output frequency (i.e., the DAC voltage) and collecting the detector response (i.e., the ADC voltage), are shown in Fig.   2h. Larger offsets are generated by the z-polarized interference as it is the main polarization of the resonance mode and couples more with the MPR. The standard deviation is 0.0067 V in Fig. 2h for the z-polarized interference, which corresponds to an SNR of 46 dB referring to an averaged VADC of 1.33 V. During measurement, not only the resonator but also the whole sensor circuit will couple with the interfering radiation. As the whole sensor PCB is also in the subwavelength scale (the PCB size is Intelligent resonance tracking detection. The resonance shift of the MPR is detected by a developed PDH scheme, operating discretely in the self-programmed MCU algorithm with intelligently determined control parameters. The block diagram is shown in Fig. 3a, and the conceptual basis is shown in Fig. 3b. A square-wave modulation signal is used, which is implemented via hopping around the resonance up and down and is equivalent to only two sampling points per period for a sinusoidal modulation signal. Therefore, the square-wave signal leads higher data rate than other modulation functions based on the same clock configuration The parameters for PDH locking are calculated automatically according to the transmittance spectrum, which has been recorded from frequency scanning (green curve in Fig. 3b). Starting V0 in Fig. 3a (which is equivalent to f0 in Fig. 3b) is determined from the resonance dip. The amplitude of the modulation signal (Am) should be generally proportional to the resonance bandwidth, or the response transmittance differential generated in one modulation process may be overwhelmed by noises. As shown in Fig. 3b, T' is calculated from the T spectrum, and Am is determined to be 1/ in the MCU algorithm). In the discrete implementation, the integral term evolves into a superposition of every feedback step, while Kp and Kd are set to be zero. For each step (the shift from the green curve to blue curve in Fig. 3b), the feedback is defined to be equal to the frequency shift, so that the VCO frequency can be shifted to the instantaneous new resonance position in one single step, in a linear approximation of T'. As interpreted from the modulation triangle in Fig. 3b, the feedback signal in one step is proportional to T' and equals: in which the automatically calculated Ki value (Ki=K) is determined to be reciprocal of the slope of T' as: T'' is calculated using a linear least square regression of T' within [-3Am, 3Am] interval.
Reducing Ki from K, the response will gradually approach the target signal in several aggregations (which can be interpreted from Equation (2)). For our sensor where the data rate is high enough compared with the target signal varying rate, smaller  Function demonstration by acetone vapor concentration sensing.
As a demonstration example, the compact and wireless sensor is validated by acetone vapor concentration sensing using PDMS films as the transducer materials. The operation flow of the sensor is presented in Figure 4a and Supplementary Video 1. The curves are dynamically displayed in both the frequency scanning and the resonance tracking modes. PDH locking starts with automatically calculated Am and Ki=K. The PID parameters can be manually modulated in the PID setting page, with automatically calculated values displayed for reference. The displayed resonance tracking data has been processed by a median filter with a window size of 300. Using the "smooth" function, the displayed data will be filtered by a median filter with a window size of 3000. The "Relock" function on the resonance tracking page is designed to restart the resonance tracking process with automatically calculated control parameters. This is designed for a common issue in PDH locking that losing locking sometimes happens when the target signal varies abruptly or the PID parameters are not suitable. is also demonstrated in Supplementary Video 2. We remark again that, this measurement is only a concept demonstration. Replacing commercially available PDMS films with transducer materials which produces more significant permittivity changes, will directly lead to more advantageous sensitivity and detection limits, and will fully fulfill the sensitivity advantages of the MPR.. adapter, for the convenience of data collecting and processing. The measuring data rate of 2272 measuring data points per second is measured when the baud rate of the MCU is set to be 921600 bps, which matches to the highest baud rate of the Bluetooth module.
Data transferring to and plotting in the WeChat Mini program. Due to limited pixels on the smartphone, the sensor's data rate of resonance tracking mode is surplus.
Therefore, the baud rates of both the MCU and the Bluetooth module are set to be is lowered to around 1200 measuring points per second. A character string "0000" is sent and a delay of 100 ms is manually added when every 300 data points are sent, for data structure alignment in the WeChat Mini program.
EMI immunity Test. The EMI immunity test is carried out in a microwave anechoic chamber. A horn antenna (XB-HA187-15, Beijing Xibao Electronic Technology Co., Ltd) is used as the source, which is fed by 25 dBm power from a signal generator (Keysight N9040B). The main polarization of the radiation is along the short side of the horn. The sensor is attached to a piece of foam via adhesive tapes. The horn antenna is fixed during measurement, and the foam is placed in different orientations to change the polarization relative to the MPR. The distance between the sensor and the horn antenna is fixed at 100 mm during the test, and the sensor is always located aligning with the center of the horn. It can be evaluated from the EM simulation that, the electric field at the sensor position is 123.7 V/m when 25 dBm power is fed to the horn antenna.
The photograph of the EMI immunity setup is shown in Supplementary Fig. 12.
Dynamic gas mixing. A homemade gas mixing system is used for acetone vapor concentration control. Compressed air and acetone vapor of 10000 ppm come from gas bottles and go through two rotor flow meters (flow range: 0.0-1.0 L/min) respectively and converge at a Tee-junction. The mixed gas goes through a silica chamber with an inlet and an outlet tubing. The inside volume of the silica chamber is 80 mm*80 mm* 30mm. The sensor locates in the chamber during the test. There is a movable ceramic base for the silica chamber, allowing the entrance and exitance of the sensor. The silica chamber and the ceramic base are sealed via air-tight seal strips. The total flow rate is fixed at 1.0 L/min, and the acetone concentration is tuned by the ratio of the two rotor flow meters. The setup schematic and the photograph are shown in Supplementary Fig.   22.