## 3 Mechanically Tunable PhC Cavity Sensors
### Sensing Mechanisms of Mechanically Tunable PhC Cavities Sensors  
In PhC cavities, resonance states of optical cavities can be controlled either by varying RI in the given medium, or by moving physical boundaries between media of different indices. In the sensing systems, the induced change of resonance state is typically detected using resonance shifts or varying Q-factors. Here, we first introduce sensing principles of the optical cavity based on perturbation theory [87]. In the waveguide-cavity coupling configurations, the input-output formalisms for optical cavities are outlined in Figure 2a. Figure 2(a-1) presents an evanescently side coupled waveguide-cavity, such as a bus waveguide (WG) coupled into a PhC cavity [88]. In this case, optical fields transmittedfrom resonator are detected and represented in the spectrum (see Figure 2b). Figure 2(a-2) describes a directly double-coupled resonator, where the transmission spectrum has a reversely characteristic peak resonance [89]. Figure 2(a-3) shows a single-side coupled resonator and reflection optical fields are measured in the spectrum [90]. At the optical resonance, light circulates inside the optical resonator and thereby a dip occurs in the transmission spectrum as shown in Figure 2b; Blue, red and dashed red dips in the spectrum denote cavities without any perturbation, with RI perturbation and absorptive perturbation, respectively. Detection of resonant wavelength shift \(\delta\lambda\) or linewidth variation \(\Delta\lambda^{{}^{\prime}}-\Delta\lambda\) provides an effective approach to detect the sensing factors arising from RI variation or moving boundary. In the mechanically tunable photonics, PhC cavities have exceptional advantages for sensing application due to their ultra-high Q/V. Q-factor is expressed as Q = \(\lambda_{cav}/\Delta\lambda\), which is a ratio of resonant wavelength to its linewidth. High Q-factor indicates that a narrower linewidth (\(\Delta\lambda\)) occurs at the resonance and determines the minimum detectable resonance shift (\(\delta\lambda\)). Mode volume \(V\) describes the capability of the light confinement. A small mode volume \(V\) represents that the mode field is highly confined inside the cavity, so that it can significantly enhance light-matter interaction. Currently, most sensing applications based on mechanically tunable PhC cavities mainly have three working mechanisms, including dielectric boundary moving, near-field probe perturbation as well as coupled mode-splitting. Deformation or movement of dielectric boundaries, related to the displacement of mode field profile, affects dielectric tensor between different materials. Resonance frequency variation due to the effects of moving dielectric boundary can be given as [91],  
\[\frac{d\omega}{d\xi}=\frac{-\omega_{cav}\int dVd\varepsilon/d\xi\big{|}E(r) \big{|}^{2}}{2\int dV\varepsilon\big{|}E(r)\big{|}^{2}} \tag{1}\]  
here, \(\xi\) indicates change of the physical boundaries, and the dielectric index \(\varepsilon\) is a function of position \(\varepsilon=\varepsilon(r)\). A larger energy density \(\varepsilon\)\(\big{|}E(r)\big{|}^{2}\) at the moving interface could maximize the interaction between optical and mechanical resonators. Therefore, moving dielectric boundary of resonator plays a significant role in the deformed cavities for sensing application. Meanwhile, the presence of external dielectric matters also exerts an effect on resonance of PhC cavities.