## 3 Experimental Results and Discussion  
### Ibuprofen Concentration Determination Based on THz Sensing  
The real-time THz transmission amplitudes of the metasurface-based sensor with ibuprofen solutions were measured using a self-made THz-TDS setup at room temperature. As shown in Figure 1d, a femtosecond laser with a wavelength of 800 nm is incident on a GaAs photoconductive antenna which emits a linearly polarized THz pulse. The pulse is then focused on the sensor filled with ibuprofen solutions. By varying the time delay between the THz waves and the probe beam, both amplitude and phase information can be measured. Finally, the THz spectrum can be obtained by applying a fast Fourier transform to the time domain spectrum and normalized to the reference. The working frequency range of our system was 0.05-3 THz. Figure 4: The monitored electric field and magnetic field inside the unit cell in the case of the \(y\)-polarization incident wave. (**a,b**) ED and EQ mode plotted in the \(x\)–\(y\) plane. (**c,d**) MD and MQ mode plotted in the \(x\)–\(z\) plane. (**e–h**) The corresponding electric (magnetic) field vectors at the resonant frequency. Figure 5: The monitored electric field and magnetic field inside the unit cell in the case of the \(x\)-polarization incident wave. (**a,b**) ED and EQ modes plotted in the \(x\)–\(y\) plane. (**c,d**) MD and MQ modes plotted in the \(y\)–\(z\) plane. (**e–h**) The corresponding electric (magnetic) field vectors of the resonance. THz sensing of (S)-(+)-ibuprofen (98% purity) was performed through measurements of the transmission change as a function of ibuprofen concentrations ranging from 0.2 to 0.5 g/mL. Avoiding absorption of THz waves is a key point when measuring samples in a liquid environment. For example, [PERSON]'s group proposed a special sensor design which overcame an issue of damped resonance caused by material losses in resonance-based sensors [32]. Our work also takes this into account. The influence of absorption on the experiment was greatly reduced. In our experiment, the solvent used to dissolve ibuprofen was a self-made mixed solvent (absolute alcohol:DMSO = 4:1 in volume), to avoid the absorption of THz waves by water. We confirmed that the absorption of THz waves by the mixed solvent was much smaller than that of water. Before the experiment, we prepared four different ibuprofen concentrations of 0.2, 0.3, 0.4, and 0.5 g/mL. Using this hybrid solution allowed us to perform sensing of ibuprofen on trace amounts of samples. However, the ibuprofen solution still absorbed THz waves, especially when the sample volume increased; thus, there were still many difficulties in accurately measuring the optical parameters of the sample in the THz frequency range, such as measuring the thickness of the sample in trace amount by using a THz-TDS system, so we did not obtain the specific optical parameters of the sample (refractive index and absorption). We then measured the normally incident \(y\)-polarized and \(x\)-polarized THz transmission spectra of the metasurface with solutions of different concentrations of ibuprofen. Figure 6 shows the experimental results for the two polarization directions. It can be observed that there are some differences between the simulation curve and the experimental curve, because the material filled into the structure was loss-free in the simulation, but the biological sample in the experiment absorbed THz waves. Thus, the transmittance amplitude of the simulation is inconsistent with that of the experiment. The main purpose of our simulation was to compare the sensing performance of the two kinds of resonant modes as well as a general change trend. It can be seen that the simulation results were consistent with the experimental results in terms of frequency shift tendency. From Figure 6, it is evident that with the increase of ibuprofen concentration, the resonance dips moved to a higher frequency (blue shift).