Refractive index gas sensor based on the Tamm state in a one-dimensional photonic crystal: Theoretical optimisation

Gas sensors are important in many fields such as environmental monitoring, agricultural production, public safety, and medical diagnostics. Herein, Tamm plasmon resonance in a photonic bandgap is used to develop an optical gas sensor with high performance. The structure of the proposed sensor comprises a gas cavity sandwiched between a one-dimensional porous silicon photonic crystal and an Ag layer deposited on a prism. The optimised structure of the proposed sensor achieves ultra-high sensitivity (S = 1.9×105 nm/RIU) and a low detection limit (DL = 1.4×10−7 RIU) compared to the existing gas sensor. The brilliant sensing performance and simple design of the proposed structure make our device highly suitable for use as a sensor in a variety of biomedical and industrial applications.

can be shifted by changing the effective refractive index of the 1DPC structure or surrounding medium. This is the principle used in the proposed structure for detecting small changes in the refractive index of the gas.
The present work aims to introduce a high-performance gas sensor based on an effective combination of the TP features and novel properties of PSi photonic crystals.

Sensor Design
The proposed sensor consists of a one-dimensional porous silicon photonic crystal (PSi-1DPC) covered with an Ag layer. In addition, there is a cavity layer between the two materials for the gas to be detected. The Ag layer is deposited on a prism of glass (n 0 = 1.5) [29][30][31] . Figure 1 shows a schematic representation of the proposed structure, which is considered as prism/Ag/gas/ (PSi 1 /PSi 2 ) N /Si, where gas, PSi 1 , and PSi 2 refer to the gas cavity and the first and second PSi layers, respectively. N indicates the period number. The silicon layer acts as a substrate for the sensor.
The gas sample is injected into the inlet, which is in contact with the upper surface of the structure. This allows the gas to fill the cavity layer and pores of PSi, as shown in Fig. 1.
The refractive index of Ag was obtained from the Drude model [32][33][34] : where the plasma frequency and damping factor are represented by ω p = 2.18 PHz and γ = 4.353 THz, respectively 35 . Ag was selected because it has a relatively low imaginary part of the dielectric constant (low absorption loss) compared to gold, platinum, and copper 36 . The refractive index of silicon (n Si ) is given by 37 : where λ is the wavelength (μm). The porosities of the PSi 1 and PSi 2 layers are 32% and 74%, respectively, based on the results of a previous experimental work 38 . Multilayer PSi-1DPC can be prepared by electrochemical etching of a silicon wafer using hydrogen fluoride as the electrolyte 28,38-41 .

theoretical Model
The transfer matrix method (TMM) is used to study the interaction between the incident electromagnetic (EM) waves (S-polarized) and the proposed structure. The details of TMM can be found in many articles [42][43][44][45][46] . The following matrices describe the proposed structure: Where p 0 = n 0 cos ϕ 0 (for prism) and p s = n s cos ϕ s (for Si substrate). Also, ϕ 0 indicates the incident angle of the electromagnetic waves from the prism to the structure. Finally, the reflectance of the proposed structure is given by:

Results and Discussions
In this section, we calculate the refractive index of the PSi (n Psi ). Next, we study how the performance of our sensor is affected by changes in the gas refractive index, number of periods, metallic layer thickness, refractive index of the prism, layer thickness of the gas, and angle of incidence of the electromagnetic waves.  where n Psi , n si , and n gas are the refractive indices of the PSi layer, silicon, and gas inside the pores, respectively. The refractive index of the PSi layer decreases from 3.50 to 1.00026 as the ratio of the porosity of silicon filled with a gas of refractive index 1.00026 changes from 0% to 100% (Fig. 2).

Reflectance spectra for prism/PSi-1DPC and prism/Ag/gas/PSi-1DPC.
In all calculations of the reflectance spectra of the electromagnetic waves, the PSi 1 and PSi 2 layers have thicknesses of d 1 = 200 nm and d 2 = 600 nm with porosities of 32% and 74%, respectively. Figure 3 shows the reflectance of the prism/(PSi /PSi ) /Si as a function of the wavelength (black curve). The gas inside the pore has a refractive index of n gas = 1.00026. The number of periods is eight (N = 8) and light is normally incident on the structure (ϕ 0 = 0°). As illustrated by this figure, there is a wide PBG (high reflection) owing to the high refractive index contrast between the two layers, PSi 1 and PSi 2 . This PBG results from the constructive interference of the reflected waves at the interface between different layers. Outside the PBG, ripples appear in the reflectance spectrum with high reflectance.
For the prism/ Ag/gas/(PSi /PSi ) /Si 1 2 8 structure, the layer of the gas cavity and Ag have thicknesses of d gas = 4000 nm and d m = 30 nm, respectively. In this case, the PBG expands, and the ripples outside the bandgap almost disappear (red curve in Fig. 3). In addition, a Tamm resonant dip appears with λ = 2675 nm T inside the PBG as a result of the electromagnetic waves confined between the Ag layer and distributed Bragg reflector 26,49,50 .
Effect of small changes in the gas refractive index. Figure 4 shows the dip position of the TP resonance for the prism/Ag/gas/(PSi /PSi ) /Si 1 2 8 structure at different gas refractive indices. All parameters were maintained as in the previous case (d 1 = 200 nm, d 2 = 600 nm, d gas = 4000 nm, d m = 30 nm, N = 8, and ϕ 0 = 0°). The refractive index of the gas sample (n gas ) changes from 1.00026 to 1.00046 (Δn gas = 2 × 10 −4 ).
Increasing the refractive index of the gas inside the pores causes an increase in the effective refractive index of the PSi layers. Consequently, the effective refractive index of the prism/ Ag/gas/PSi-1DPC structure increases. This leads to a TP resonance shift to longer wavelengths (red-shift) 34,51 , in accordance with Bragg's law.  www.nature.com/scientificreports www.nature.com/scientificreports/ The sensitivity (S) is the most important parameter used to characterise the performance of a sensor. It is calculated through the following equation: where λ T is the position of the Tamm resonance dip. By increasing the gas refractive index from 1.00026 to 1.00046, the TP resonance dip is shifted from λ T = 2675.16 to 2675.68 nm, as seen in Fig. 4. The sensitivity in these conditions is approximately 2600 nm/RIU. To achieve the highest performance, different parameters of the proposed sensor, such as the number of periods, metallic layer thickness, prism refractive index, gas layer thickness, and incident angle were optimised.
Effect of number of periods. By increasing the number of periods, the sensitivity does not change (S = 2600 nm/RIU). In addition to the sensitivity, the study of the full width at half maximum (FWHM) of the resonance dip is another significant parameter for the performance of the sensor. A high-performance sensor should have a narrow resonant dip to achieve high resolution 52 . Figure 5 shows the behaviour of the FWHM as a function of the number of unit cells (N), at Ag layer thickness d m = 30 nm, gas layer thickness d gas = 4000 nm, n gas = 1.00026, n prism = 1.5, and normal incidence of electromagnetic waves.
The FWHM value decreases (from 2.17 to 1.39 nm) with an increase in the number of periods from N = 5 to 8. Above N = 8, the FWHM value seems to be constant 25 . Therefore, N = 8 is considered as the optimum number of layers for the next calculation. Figure 6 shows the variation in the reflectance of the Tamm resonant dip (R T ) as a function of the Ag layer thickness at n gas = 1.00026, ϕ 0 = 0°, d gas = 4000 nm, n prism = 1.5, and N = 8.

Effect of Ag layer thickness.
When the Ag layer has a thickness of 25 nm, the reflectance of the resonant dip decreases to zero, and the optical energy is consumed by absorption 25 . Hence, strong confined electromagnetic waves occur between the Ag and gas/(PSi /PSi ) /Si 1 2 8 structure 26,49,50 , which is crucial for sensing applications. Therefore, d m =25 nm is considered as the optimum thickness for the Ag layer, because it achieves zero reflectance. When the thickness of the Ag layer differs from the optimal value, the reflectance of the resonant dip increases resulting in the low coupling of the TP, as seen in Fig. 6. This behaviour is similar to the results observed in a previous study 53 .

Effect of prism refractive index.
To study the effect of the refractive index of the prism on the reflectance of the structure, we changed the refractive index of the prism from 1.4 to 2.5 54,55 . According to the principle of total internal reflection, the critical angle (ϕ c ) depends on the values of the refractive index of the prism and gas for the prism/ gas/PSi-1DPC structure. The critical angle can be calculated using the following equation:   Fig. 7A. When n prism increases from 1.4 to 2.5°, the critical angle decreases from 45.6 to 23.6°. Above the critical angle, a total reflection occurs without the appearance of any resonant dips for the prism/gas/ PSi-1DPC (Fig. 7A) and prism/Ag/gas/ PSi-1DPC (Fig. 7B) structures at = . n 1 4 prism . The optimum value of n prism is 1.4, which achieves a high critical angle, and hence a wide range of angles will be studied in the next section.
Effect of gas layer thickness. An increasing gas layer thickness leads to an increase in the volume fraction (φ) of the gas layer and geometric path of the electromagnetic wave inside the 1DPC. Therefore, the interaction between the electromagnetic and gas molecules is enhanced. Hence, the proposed structure will be more sensitive to the changes in the refractive index of the gas by increasing the thickness of the gas layer.
As the gas layer thickness increases from 4000 nm to 10000 nm, the sensitivity increases rapidly from 2600 nm/ RIU to 3100 nm/RIU. The sensitivity is not affected when the gas layer thickness is increased to more than 10000 nm, as seen in Fig. 8. This result agrees with previous theoretical and experimental studies 14,56 . A thickness of 10000 nm will be considered as the optimum thickness of the gas layer and used for the subsequent simulations.
Effect of incident angle. The increase in the incident angle of the S-polarised electromagnetic wave causes a blue-shift (short wavelength) to the Tamm resonance dip, according to the Bragg-Snell law:  www.nature.com/scientificreports www.nature.com/scientificreports/ where k is the order of diffraction, λ is the wavelength, D is the interplanar spacing, n eff is the effective refractive index, and ϕ 0 is the angle of incidence. When the angle of incidence of the electromagnetic waves increases, the wave travels a long geometric path through the gas layer 57 . Therefore, the interactions between the electromagnetic waves and gas molecules are improved. Hence, the sensitivity of the proposed structure is enhanced by increasing the incident angle. By increasing the incident angle from 0 to 45.30 o (below ϕ c ), the sensitivity value increased from 3100 to 188750 nm/ RIU, as shown in Fig. 9. The increase in sensitivity at angles higher than 40° in Fig. 9 is due to the jump in the geometric path of the wave with the increase of the incident angle.
Sensor analysis under optimum conditions. From the above results, the optimum conditions are N = 8, d m = 25 nm, d gas = 10000 nm, n prism = 1.4, and ϕ 0 = 45.3°. Figure 10 shows the reflectance spectra of the proposed sensor with different gas refractive indices under these optimum conditions. Increasing the gas refractive index leads to shifting the position of the TP mode towards longer wavelengths. Figure 11 presents a linear fitting of the refractive index of the gas and its dip positions. The slope of the linear fitting refers to the average sensitivity (1.9×10 5 nm/RIU) of our sensor according to the following equation: ( ) 190000 n 187000, R 0 999 T g as 2   www.nature.com/scientificreports www.nature.com/scientificreports/ The quality factor (QF), figure of merit (FoM), and detection limit (DL) are usually used to characterise the efficiency and performance of the sensor. An excellent sensor has high QF values that demonstrate the ability of the sensor to have a narrow bandwidth 52 . The QF can be calculated according to the following equation: The ratio between the S and the FWHM is referred to as FoM, which is obtained by The DL is inversely proportional to S and QF according to 58 : T Table 1 illustrates that the FoM of our sensor is 3.6×10 5 RIU and the QF is 4×10 3 . The high value of the FoM indicates that the proposed sensor has high sensitivity and narrow FWHM simultaneously. In addition, the DL of the sensor is approximately 1.4×10 −7 RIU, which indicates the smallest detectable refractive index change. Table 2 compares the values of S, FoM, and DL for the present study with a number of previous experimental and theoretical works 24,59-63 and highlights how the sensitivity of the proposed sensor is higher. Thus, the proposed device with much better performance than hitherto experimentally demonstrated can be constructed 59,60 .   Table 2. Comparison of sensitivity, figure of merit, and detection limit values of the present work with some experimental and theoretical previous works.