1 Introduction

One-dimensional photonic crystal (1D-PC) is alternating layers that can prohibit the propagation of electromagnetic waves through it (Yablonovitch 2001; Zaky et al. 2021a, 2022a, b; Yablonovitch and Gmitter 1989; Aly et al. 2020, 2021a, b; Abd El-Ghany et al. 2020; Aly and Zaky 2019; Ye et al. 2019; Meradi et al. 2022; Tammam et al. 2021). Tamm resonance or as some call it, Tamm plasmon polariton, (TPP) is the trapping of electromagnetic waves at the interface between 1D-PhC and a metallic layer. TPP position can be adjusted by controlling the optical parameters of the structure such as permittivity or the thickness of layers. By filling one layer of the structure with an analyte of gas or liquid, the TPP dip will be affected any change in the concentration of this analyte. With knowing the position of the TPP dip, the refractive index or concentration of the analyte can be predicted (Zaky and Aly 2020). TPP has been used in biosensors, switches, and filters (Auguié et al. 2014; Zaky and Aly 2021a; Zaky et al. 2021b, 2022c, d).

Binary photonic crystal with quasi-periodic sequence (QP-PhC) is a middle link between periodic and random configurations. QP-PhC can be designed in different sequences such as Thue–Morse, Fibonacci sequence (FS), Rudin Shapiro, Cantor, and period-doubling (Steurer and Sutter-Widmer 2007). QP-PhC is distinct from periodic PhC in that QP-PhC has amazing optical properties like the appearance of multiple photonic band gaps (PBG) (Pandey 2017). The word count rule is used to define FS, Sn = Sn − 1 Sn − 2 for n ≥ 2 with S0 = B and S1 = A (Shukla and Das 2018). So, the first few strings of the FS are S0: B, S1: A, S2: AB, S3: ABA, S4: ABAAB, and S5: ABAABABA. QP-PhC was fabricated from SiO2 and TiO2 using electron evaporation by Gellerman et al. (1994). They found a good similarity between the theoretical simulations and experimental results.

Two-dimensional materials like porous silicon (PSi) and gyroidal materials are very interesting optical materials that have been the subject of extensive research (Zaky et al. 2021c; Zaky and Aly 2021b; Prayakarao et al. 2015). Porous silicon is a very interesting prospect for photonic devices because of the wide index of refraction variation due to the ratio of pores control, as well as the comparatively simple manufacturing methods and low cost (Tammam et al. 2021; Wang et al. 2007; Zaky et al. 2020). Electrochemical etching can be used to build PSi multilayers (Wang et al. 2007). Besides PSi, the Mechanical, optical, electrical, and thermal properties of graphene are all outstanding. Because of the atomic thickness of graphene and the weakness of bending rigidity, monolayers of graphene have restrictions in different applications (Jung et al. 2017). To overcome these restrictions, the gyroidal shape of graphene has recently been developed. Gyroidal graphene (GG) structure is a three-dimensional geometry on a triply periodic minimum shape (Jung et al. 2017). GG is considered a porous material having pores of small or large size (Cebo et al. 2017; Nakanishi et al. 2020; Ma et al. 2019). Chemical vapor deposition (Cebo et al. 2017), inorganic templates from the butterfly nanostructure or self-assembly (Turner et al. 2013), selective laser melting (Ma et al. 2019), self-assembly of a triblock copolymer (Nakanishi et al. 2020), light-based 3D printing process (Hensleigh et al. 2018), solvent-free method (Feng et al. 2019), or controlled phase separation (Liu et al. 2015) have all been used in experiments to realize gyroidal structures.

Zaky et al. (2021d) proposed a refractive index sensor based on the excitation of Tamm resonance at the interface between sample/Ta2O5 multilayers and a gyroidal layer of metals. This design recorded a sensitivity of 6.7 THz/RIU, a figure of merit (FoM) of 6 × 103/RIU, and a quality factor (Q-factor) of 3 × 103. Then, they studied the impact of using the GG layer to excite Tamm resonance at the end of PSi multilayers (Zaky et al. 2021e). This design recorded an improvement in sensitivity of 18.6 THz/RIU, FoM 1.3 × 105/RIU, and Q-factor of 2.6 × 104. After that, they studied the effect of using a multilayer of GG and PSi terminated by GG to excite Tamm resonance (Zaky and Aly 2021b). Comparing a similar structure of PSi multilayer and graphene, this structure achieved FoM and sensitivity higher than 748% and 39.75%, respectively. Other THz studies and applications can be found in references (Huang et al. 2022; Lu et al. 2022; Sheng et al. 2022; Lv et al. 2022; Li et al. 2022; Luo et al. 2021).

In this paper, we aim to enhance the performance of the sensor by proposing a novel GG/PSi FS-PhC sensor terminated by the GG layer is proposed. The impact of various optical parameters is investigated. Table 1 demonstrates that the suggested design outperformed all other structures. The use of completely porous materials is largely responsible for the high sample volume fraction relative to the volume fraction of the structure that increases the performance. Besides, we replaced the metallic layer with a GG layer to excite the Tamm state to overcome the easier corrosion of the thin metallic layer.

Table 1 A comparison study

2 Basic equations and materials

In the Schematic diagram illustrated. FS (S4) of GG and PSi terminated by the GG layer is proposed. N represents many times the S4 FS will be repeated (N = 4). A sample layer separates between the FS and GG layers to enhance the performance of the design (Zaky et al. 2021e; Zaky and Aly 2021c), as clear in Fig. 1. The sample enters the sensor package from the sample flow inlet to fill the pores of PSi and the cavities inside the GG layers.

Fig. 1
figure 1

Schematic diagram of the FS of GG/porous Si

The GG's optical constant can be determined as a function of the thickness of the gyroidal layer (dgyr), effective plasmon frequency (\({\lambda }_{g}\)), helix radius (\({\mathrm{r}}_{g}),\) the unit cell size of gyroid (a), volume fraction (f), and wire turn length (\({\mathrm{l}}_{g})\) follows (Zaky et al. 2021e; Farah et al. 2014; Bikbaev et al. 2017):

$${\upvarepsilon }_{gyr}\left(\upomega \right)=\frac{{\mathrm{l}}_{g}\sqrt{2}}{a}\left[1-{\left(\frac{{4\mathrm{r}}_{g}}{{\lambda }_{g}}\right)}^{2}{\left(\frac{\pi \sqrt{-{\upvarepsilon }_{G}\left(\upomega \right)}}{2\sqrt{2}{\mathrm{n}}_{\mathrm{s}}^{ }}-1\right)}^{2}\right],$$
(1)
$${\mathrm{l}}_{g}=\sqrt{{\left(2\pi R\right)}^{2}+{a}^{2}}=a\sqrt{\frac{{\pi }^{2}{\left(\sqrt{2}-1\right)}^{2}}{4}+1},$$
(2)
$$\mathrm{R}=\frac{{\left(\sqrt{2}-1\right)}^{2}}{4}+1,$$
(3)
$${\mathrm{r}}_{g}=\mathrm{a}\sqrt{f}\frac{\sqrt[4]{2}}{\sqrt{\pi \left[\sqrt{2+{\pi }^{2}}+\sqrt{2+\left(3+2\sqrt{2}\right){\pi }^{2}}\right]}},$$
(4)
$${\lambda }_{g}=1.15\,\mathrm{a}\sqrt{1-0.65lnf}.$$
(5)

For more details about the gyroidal model, see references Bikbaev et al. (2017), Abueidda et al. (2019). Using the approximate local random phase, the conductivity (σ) of one or a few sheets of graphene in the THz range of electromagnetic waves can be estimated from the intra-conductivity as a function of the number of graphene layers (G), Fermi energy (\({\mathrm{E}}_{\mathrm{F}}),\) relaxation time (τ), and angular frequency (ω) (Zaky and Aly 2021b, 2021c; Bludov et al. 2013):

$$\upsigma =\mathrm{G}\frac{i {e}^{2}{\mathrm{ E}}_{\mathrm{F}}}{\uppi {\mathrm{\hslash }}^{2}\left(\omega +\frac{i}{\tau }\right)}.$$
(6)

The dispersion curve of porous silicon’s refractive index (\({\mathrm{n}}_{\mathrm{Psi}}\)) as a function of the refractive index of analyte filling the pores (\({\mathrm{n}}_{\mathrm{s}}^{ })\), the ratio of analyte (P), and silicon refractive index (\({\mathrm{n}}_{\mathrm{Si}}=3.42\)) is defined by Bruggeman’s effective medium equation (Salem et al. 2006):

$$\begin{aligned} {\text{n}}_{{{\text{Psi}}}} & = 0.5\sqrt {\uppsi + \sqrt {\uppsi ^{2} + 8 {\text{n}}_{{{\text{si}}}}^{2} {\text{n}}_{{{\text{s}} }}^{2} } } , \\ \uppsi & = 3{\text{P}} \left( {{\text{n}}_{{{\text{s}} }}^{2} - {\text{n}}_{{{\text{si}}}}^{2} } \right) + \left( {2 {\text{n}}_{{{\text{si}}}}^{2} - {\text{n}}_{{{\text{s}} }}^{2} } \right). \\ \end{aligned}$$
(7)

The reflectance (R) of the TM polarized light will be simulated using the transfer matrix method (TMM) to study the response of the proposed design to the incident light (Yeh 1988; Zaky et al. 2021f; Born and Wolf 2013). The optical response of the proposed structure (R) can be calculated as:

$$R\left( \% \right) = 100 \times \left\lfloor r \right\rfloor^{2} ,$$
(8)

where

$$r=\frac{\left({A}_{11}+{A}_{12}{p}_{s}\right){p}_{0}-\left({A}_{21}+{A}_{22}{p}_{s}\right)}{\left({A}_{11}+{A}_{12}{p}_{s}\right){p}_{0}+\left({A}_{21}+{A}_{22}{p}_{s}\right)},$$
(9)
$$\left|\begin{array}{cc}{A}_{11}& {A}_{12}\\ {A}_{21}& {A}_{22}\end{array}\right|={\left({a}_{A}{a}_{B}{a}_{A}{a}_{A}{a}_{B}\right)}^{N}/{a}_{s}/{a}_{gyr},$$
(10)
$${p}_{k}=\frac{cos\left({\theta }_{k}\right)}{{n}_{k}},$$
(11)

where \({\theta }_{k}\), \({n}_{k}\), \({a}_{k},\) \({p}_{0}\), and \({p}_{s}\) are the incident angle, the refractive index of each layer, the transfer matrix element of each layer, related to the medium where the wave will be incident from, and the value of p for the substrate. TM polarization is when the incident electromagnetic waves' electric field vector is parallel to the incidence plane. TMM makes it simple to compute transmittance, reflectance, or absorbance spectra in both incoherent and coherent conditions (Katsidis and Siapkas 2002). TMM was used for simulating switches (Ahmed et al. 2017), solar cells (Aly and Sayed 2017), smart windows (Zaky and Aly 2022), and sensors (Zaky et al. 2022e, 2022f).

2.1 Results and discussions

As clear in the schematic diagram, it is proposed that the electromagnetic waves travel through the air and hits the first GG layer at an incident angle \({\theta }_{0}\). A GG layer is placed on the end of the FS to excite Tamm resonance. The thickness of layers are dA = 100 nm, dB = 200 nm, ds = 4000 nm and dgyr = 200 nm. For layer A, a = 10 nm and f = 2%. But for the terminal layer of GG, a = 20 nm, and f = 20%. Ef and τ are taken with 1 eV and 1 ps, respectively. The porosity of the PSi layer is 50%. The angle of incidence is chosen to be θ = 0° as an initial condition, then it will be changed in the following studies to be optimized.

Figure 2a clears the reflectance spectra without and with the GG layer. Without a cap gyroidal layer, a wide PBG extended from 0.2 to 40 THz. The appearance of PBG is the result of the periodicity of two layers (GG and PSi) with high refractive index contrast. The resonant Tamm dip occurs only in the case of using the cap gyroidal layer at 31.6198 THz at ns = 1.000. The underlying physics of the proposed design is that the resonant dip is very sensitive to any change in the effective refractive index of the structure. By changing the concentration of the gas sample than will be detected, the effective refractive index will change, and the position of the resonant dip with change. So, from the position of the resonant dip, we can predict the concentration of the sample.

Fig. 2
figure 2

The reflectance spectra of the terahertz biosensor a with and without GG at nsample = 1, b at different nsample

As clear in Fig. 2b, for using samples with refractive indices of 1.002, 1.004, 1.006, 1.008, and 1.010 the resonant Tamm dips are located at 31.5504, 31.4814, 31.4125, 31.3440, and 31.2757, respectively.

Sensitivity (S), the figure of merit (FoM), the limit of detection (LoD) and quality factor (Q) will be calculated as a function of the increase in the refractive index of the sample (ΔnS), the shift in resonant frequency (ΔfR) and bandwidth (\(FWHM\)) for the structure to be evaluated compared to other studies (Ayyanar et al. 2018; Panda and Devi 2020):

$$S=\frac{\Delta {f}_{R}}{\Delta {n}_{s}},$$
(12)
$$FoM=\frac{S}{FWHM},$$
(13)
$$\begin{array}{l}\mathrm{Q}=\frac{{f}_{\mathrm{R}}}{\mathrm{FWHM}}\end{array}.$$
(14)

According to the calculations, the sensitivity, FoM and Q of the proposed Fibonacci sensor is 34.41 THz/RIU, 35,269 RIU−1, and 32,057.

Strong changes in the sensitivity, FWHM, FoM and Q-factor are observed when the incident angle was changed from 0° to 89° (Fig. 3). As the incident angle was changed from 0° to 80°, the sensitivity increased to record the highest value of 87.06 THz/RIU, then it slightly decreased (Fig. 3a). From Fig. 3b, the increase of the angle from 0° to 80° shows a clear increase in the FWHM that negatively affects the resolution of the structure. For angles higher than 80°, FWHM strongly decreases that positively affecting the resolution of the structure. Besides, the FoM and Q-factor strongly decrease from 0° to 80°, then slightly increase (Fig. 3b). To ensure that this sensor records high sensitivity with low FWHM, the angle of 89° will be used in the following calculations. To explain this increase in sensitivity with the incident angle, let a ray of light penetrates a sample layer with a thickness of 3 nm as clear in Fig. 3c. The optical path through the layer increases slightly at low angles and strongly increases at high angles. Due to the increase of the optical path through the sample layer, the sensitivity increases.

Fig. 3
figure 3

The impact of changing the incident angle on the proposed Fibonacci sensor a sensitivity and FWHM, b FoM and Q-factor, and c the relation between the incident angle and the optical path inside a sample layer with thickness d

To enhance the performance of the sensor, the impact of changing the sample layer thickness will be studied in Fig. 4. As the sample layer thickness changes from 4000 to 20,000 nm, the sensitivity strongly increases due to the increase of light path through the sample and the increase of the interaction and light confinement. Then, as a result of saturation, it doesn’t change for more increase in thickness (Fig. 4a). Besides, as we increase the sample layer thickness from 4000 to 7000 nm, FWHM strongly increases from 0.001 to 0.081 THz. For changing the thickness from 7000 to 15,000 nm, FWHM slightly decreases to 0.068 THz. For more increases in the thickness, FWHM does not change.

Fig. 4
figure 4

The impact of changing the sample layer thickness on the proposed Fibonacci sensor a sensitivity and FWHM and b FoM and Q-factor

It is clear in Fig. 4b that with increasing the sample thickness from 4000 to 7000 nm, FoM strongly decreases from 77,416 to 2119 RIU−1. For changing the thickness from 7000 to 15,000 nm, FoM slightly increases to 18,790 RIU−1. For more increases in the thickness, FoM does not change. Also, the Q-factor decreases first and then does not change. The thickness of 25,000 nm will be selected as the sample layer thickness in the following studies.

Figure 5 studies the impact of the thickness of layer A on the sensor performance. As clear in Fig. 5a, the sensitivity and FWHM slightly decrease as dA increases. On the other hand, the FoM and Q-factor strongly increase as dA increases from 10 to 100 nm, then slightly increases. The thickness of 30 nm will be the optimum because it records moderate performance as clear in Fig. 5b. Besides, the thickness of 30 nm achieves the lowest reflectance (highest confinement of electromagnetic waves).

Fig. 5
figure 5

The impact of changing the thickness of layer A (dA) on the proposed Fibonacci sensor a sensitivity and FWHM and b FoM and Q-factor

Figure 6 clear the reflectance spectra generated under an incident angle of 89° of TM polarized electromagnetic waves. At the optimum conditions, by adjusting the sample refractive index from 1.000 to 1.002, 1.004, 1.006, 1.008 and 1.010, the resonant dip was moved to lower frequencies from 37.1088 THz, 31.2475 THz, 27.8125 THz, 25.86 THz, 23.9428 THz and 22.7082 THz.

Fig. 6
figure 6

The impact of changing the refractive index of the sample on the proposed Fibonacci sensor at optimum conditions

In Table 1, the suggested Fibonacci sensor is compared with recently suggested sensors. The recommended Fibonacci sensor has distinguished sensitivity and FoM. The high-performance results imply that the suggested Fibonacci sensor is suitable for gas detection and bio-sensing applications.

3 Conclusion

We proposed a novel GG/PSi FS-PhC sensor terminated by the GG layer for the detection of the refractive index. By changing the effective refractive index of the FS-PhC, the position of Tamm dips changes. The recommended Fibonacci sensor has distinguished sensitivity and FoM. Comparing the suggested FS-PhC structure to other similar sensors of periodic PhC, it was observed that the suggested structure has a superior FoM and sensitivity, even though it has a simple design that will not require polarizing matching components such as gratings or prisms. Because the thin metal film is readily eroded by corrosion, graphene is recommended to activate TPP.