## 3 Results and Discussion
The electric field profile at the resonant wavelength of 1529.5 nm is presented in Figure 3b, where a strong resonance can be obse  
Figure 3: (**a**) Reflection spectrum for the designed fiber-tip RWG, with mode reflectance (energy coupled into the backward propagating fiber mode, solid blue curve), total reflectance (total energy diffracted back by the grating, dashed magenta curve), reflectance by 2D-RCWA (dashed green curve). For comparison, mode reflectance for a uniform grating without FP cavity is also shown (red); (**b**) Profile of \(\mathrm{E_{y}}\) electric field component for the peak wavelength of 1529.5 nm. apparent that the field is restricted to the FP cavity region, which is advantageous for suppressing any cross-sensitivity when using multiplexed sensor elements on a single fiber. For the practical implementation of such fiber RWGs, it is important to discuss the influence of sensor parameters and possible fabrication errors on the spectral response. Here, the fabrication tolerances are studied within the 2D model, though simplified for higher simulation speed. Nevertheless, these simulations offer useful information for sensor fabrication. First, the total length of the grating was varied, i.e., the two mirrors were set at different grating bars (counted from the center), with the results shown in Figure 4a. It is apparent that a small decrease in mode reflectance is detected for deviations from the optimal positioning of the mirrors. The peak intensity is reduced by ~11.4% if the mirrors are located at the twelfth grating bar compared to the maximum peak intensity that is achieved for the ninth bar. For even longer gratings, progressively more reflected energy leaks into the cladding mode, while, for shorter ones, some of the core mode energy is rejected and excluded from the FP cavity. It is worth noticing that the position of the side peak experiences a blue shift with an increased FP cavity length, while a slight red shift occurred for the main RWG peak, indicating that the overall reflection spectrum behavior can be attributed to some sort of synergistic effect of RWG and FP resonance. For small x-axis mirror positioning errors away from the center of the ninth grating bar, the spectral response of the sensor is shown in Figure 4b. It is apparent that the peak intensities progressively decrease with increased deviations of the mirrors' positions from the optimal ones. For example, a deviation of +100 nm results in a peak reduction to ~59.0% caused by the accumulation of phase errors in FP reflections. Another common error, which may occur in a fabrication process, is the x-axis displacement of the whole RWG structure relative to the center of the fiber core. As shown by the blue curve in Figure 5a, only a small variation in peak intensity occurs with negligible change in peak position for such errors. For example, a reduction in peak intensity of 2.7% is found for an off-center error of 0.8 \(\upmu\)m. The reason for this weak dependence is solely the small reduction in coupling efficiency between the reflected beam and the fiber mode. In addition, the influence of the depth h of the trenches used for mirror fabrication (see Figure 1a) was investigated and is shown by a red curve in Figure 5a. The peak intensity remains above 70% as h is reduced to 600 nm and is still above 60%, even if h is reduced to 400 nm, i.e., in the case that the bottom of the trench is already close to the waveguide/fiber interface. Figure 4: Mode reflectance for the designed RWG (**a**) with Au mirrors located at the center of different grating bars, and (**b**) for different deviations of the mirror planes from the center of the ninth grating bar. As mentioned above in Section 2, the trenches for the Au layer deposition can be fabricated by FIB milling or by etching. For both techniques, a practical problem may arise that the sidewalls are not strictly vertical, but at an angle \(\alpha\) relative to the fiber axis. The influence of this sidewall inclination was investigated and is presented in Figure 5b.