1 Introduction

Photonic crystal (PC) is an optical structure of alternative materials with high and low refractive indices (Yablonovitch 2001; Yablonovitch and Gmitter 1989; Zaky and Aly 2021a; John 1987; Ayyub et al. 2013; Kushwaha et al. 2018). The periodicity of the refractive index causes forbidden frequency or wavelength region for photons that make it not allowed to propagate through the structure (John and Florescu 2001; Zaky et al. 2020; Tammam et al. 2021; Auguié et al. 2014; Boopathi et al. 2018; Panda and Devi 2020). Such forbidden frequency region is known as photonic bandgap (PBG) (Bikbaev et al. 2017; Zaky et al. 2021a; Aghajamali 2016; Zaky and Aly 2021b; Armstrong and O’Dwyer 2015; Afsari and Sarraf 2020; Abd El-Ghany et al. 2020). PC is used to modulate the flow of photons (Zaky and Aly 2020; Buswell et al. 2008; Zaky et al. 2021b; Gao et al. 2018; Aghajamali et al. 2015). According to the periodicity of the material, PC can be studied as one-dimensional (1D-PC) (Aly et al. 2020, 2021a; Beheiry et al. 2010; Aly and Zaky 2019; Zhou et al. 2021; Zhang et al. 2012; Zaky et al. 2021c, d; Meradi et al. 2022), two-dimensional (2D-PC) (Akahane et al. 2003; Zegadi et al. 2019), and three -dimensional PC (3D-PC) (Tandaechanurat et al. 2011; Zakhidov et al. 1998). Introducing a defect layer into the PC breaks the regular periodic arrangement and gives rise to appearing a defect localized mode in the PBG region (Zaky et al. 2021e). The defect localized mode can be utilized in different applications by characterizing the size of the defect layer as well as the dielectric constant of the defect layer. PCs have been studied as many potential clinical, physical and chemical applications such as switches, optical filters, multiplexers, sensors, etc. (Zaky et al. 2021f; Pandey et al. 2017; Zaky and Aly 2021c).

Optical sensor is one of the most interesting applications of PC, which have advantages over conventional devices as an ultra-fast response, ultra-compact size, and high sensitivity. Many kinds of sensors are investigated by scientists such as temperature detectors (Zaky and Aly 2021b), pressure sensors (Rajasekar and Robinson 2019), biosensors (Aly et al. 2021b), chemical sensors (Kim et al. 2009), and gas sensors (Zaky et al. 2020; Hidalgo et al. 2010). Because some gases are toxic and hazardous for health and the environment like CO, SO2, CO2, and N2O, optical gas sensors are safe to be used. Gas sensors have different applications in industries, home safety, environment monitor, the medical and agricultural field, etc.

Magnetized cold plasma (MCP) can be used as PC material by researchers (Liu and Wu 2021; Shiri et al. 2019; Sakai et al. 2007; Naderi Dehnavi et al. 2017; Nobahar et al. 2018; Kamboj et al. 2021; Askari et al. 2015; Awasthi et al. 2017, 2018; Lyubchanskii et al. 2003; Inoue et al. 2006). Chang et al. (2016) investigated magnetic field tunable filter application of 1D-PC using magnetized plasma and air multilayered structure in microwave frequency (Chang et al. 2016). Kumar et al. (2019) studied transmission properties of 1D-PC with magnetized plasma layers and used them as a tunable multichannel filter (Kumar et al. 2018). Wang et al. (2020) presented a multichannel filter device using a magnetized plasma layer in terahertz frequency (Wang et al. 2020).

In the present study, we propose a 1D-PC multilayered structure with MCP for gas sensing application. The defect layer as well as one of the regular layers are taken as a gas sample to detect the gas with the respective wavelength of the resonant mode.

2 Materials and simulation method

The proposed structure is a multilayered design of (AB)N/CDC/(AB)N/SiO2. N is the number of the unit cells (N = 4), as illustrated in Fig. 1. Layer A and C are considered as MCP and quartz, while layer B and defect layer D are considered as gas samples. The incident medium is considered as air whereas the substrate is SiO2. The thickness of layer A, layer B, layer C, and layer D are considered as d1, d2, dq, and dsample, respectively.

Fig. 1
figure 1

Schematic illustration of proposed 1D-PC multilayered gas sensor

The transfer matrix method is used for computing the transmittance of the proposed 1D-PC multilayered structure. The continuity condition of the electric and magnetic fields is used to obtain the field values. The matrix form of relations is utilized to obtain the field values on either side of each layer. The transfer matrix for jth layer is given as (Panda et al. 2021):

$$ M_{j} = \left[ {\begin{array}{*{20}c} {\cos \psi_{j} } & { - \frac{i}{{q_{j} }}\sin \psi_{j} } \\ { - iq_{j} \sin \psi_{j} } & {\cos \psi_{j} } \\ \end{array} } \right], $$
(1)

where \(\psi\)j = 2πnjdj cos(φj)/λ. nj, dj, and φj are refractive index, thickness, and propagation angle of jth layer. Qj = nj cos (φj) for TE mode. As cleared in Ref (Zaky et al. 2021e), higher performance was recorded using TE polarized mode than TM mode. So, we used TE mode. λ is the wavelength. The characteristic matrix of the whole structure is:

$$ {\text{M = }}\prod\nolimits_{j} M_{j} = \left[ {\begin{array}{*{20}c} {m_{11} } & {m_{12} } \\ {m_{21} } & {m_{22} } \\ \end{array} } \right] $$
(2)

The value of transmittance of 1D-PC multilayered structure is given as:

$$ T = 100 \times \left( {\frac{{q_{s} }}{{q_{i} }}} \right)^{2} \left| {\frac{{2q_{i} }}{{\left( {m_{11} + q_{s} m_{12} } \right)q_{i} + \left( {m_{21} + q_{s} m_{22} } \right)}}} \right|^{2} , $$
(3)

where qi and qs are coefficients for incident and substrate medium.

The permittivity of MCP layer can be calculated in GHz as (Awasthi et al. 2018; King et al. 2015; Nayak et al. 2017):

$$ \varepsilon_{plasma} \left( {\upomega } \right) = 1 - \left[ {\frac{{{\upomega }_{p}^{2} }}{{{\upomega }^{2} \left[ {1 - \frac{i\gamma }{{\upomega }} \mp \frac{{{\upomega }_{gy} }}{{\upomega }}} \right]}}} \right], $$
(4)

where γ is collision frequency and ωp is plasma frequency defined as \({\upomega }_{p} = \sqrt {\left( {\frac{{n_{e} e^{2} }}{{m_{e} \varepsilon_{0} }}} \right)}\). ne is the number density of electron, ε0 is the permittivity of vacuum (\(\varepsilon_{0} )\), me and e are the mass (me) and charge (e) of the electron, respectively. In the above equation cyclotron frequency ωgy has a dependence on magnetic field (B) as \({\upomega }_{gy} = \frac{e B}{{m_{e} }}\).

3 Results and discussions

Here, we consider the geometrical structure of the 1D-PC multilayered structure as clear in Fig. 1. The thicknesses of layers d1, d2, dq, dsample are considered as 15 mm, 15 mm, 0.5 mm, 100 mm respectively. The refractive index of quartz nq is taken as 2. The various parameters of MCP are considered as B, ne, γ, e, me and \(\varepsilon_{0}\) equal to 0.5 T, 8 × 10−17 m−3, 4π × 104 Hz, 1.6 × 10−19 C, 9.1 × 10−31 kg and 8.854 × 10−12 F/m, respectively (King et al. 2015). The transmission is calculated using Eq. 3, and the results are plotted without and with a defect layer as shown in Fig. 2A. In this case, nsample is taken as 1 (refractive index of pure air). In the case of the defect layer, a defect mode appeared in the PBG region, which has a strong dependence on the refractive index and the defect layer thickness. The transmittances at different refractive indices of the defect layer are plotted as shown in Fig. 2B. From Fig. 2B, it is seen that the resonant mode is shifted towards the lower frequency region with the increase of the dielectric constant of the sample layer.

Fig. 2
figure 2

The transmittance study, A without and with the sample layer (nsample = 1.00), B for different values of nsample at B = 0.5 T

The shift of defect mode transmittance peak with the dielectric constant of the sample layer can be used to detect the index of refraction of the sample taken as a defect. Such properties of 1D-PC can be used as a detector. The sensitivity of the optical sensor device is measured as the fractional change of frequency (\({\Delta }f_{R} )\) per change in the index of refraction of the sample (\({\Delta }n_{s} )\). The mathematical form of sensitivity is defined as (Abadla and Elsayed 2020):

$$ S = \frac{{{\Delta }f_{R} }}{{{\Delta }n_{s} }} $$
(5)
$$ FoM = \frac{S}{FWHM} $$
(6)
$$ \begin{array}{*{20}c} {{\text{Q}} = \frac{{f_{{\text{R}}} }}{{{\text{FWHM}}}}} \\ \end{array} $$
(7)

The figure of merit (FOM) is one of the other factors to study the quality of the detector, which is the sensitivity divided by the full width at half maximum (FWHM). The quality factor is another important parameter of any sensor. It is the ratio of the central frequency (fR) to the FWHM. FOM provides information about the detection power of the optical sensor. The FWHM, sensitivity, FOM, and quality factor (Q) are calculated in the following figures.

From Fig. 3A, the sensitivity increases with the angle of incidence, whereas FHWM decreases and attain a minimum value at 50°, then again increases with the incident angle. Therefore, the FOM and Q-factor increase with the incident angle at lower values and attain maximum as shown in Fig. 3B. FOM is a measure of detection power of the sensor device and attains a maximum value at 60°. As the maximum sensitivity is at 64° and any further increase in the incident angle leads to the overlap between the resonant peaks, it will be used in the next study.

Fig. 3
figure 3

The impact of the angle of incidence on A sensitivity and FWHM, B FoM and Q-factor

The sensitivity, FWHM, FoM and Q-factor are plotted with the ne as clear in Fig. 4. From Fig. 4A, the sensitivity decreases with the increase of ne, while the FWHM increases with ne. Besides, both FOM and Q-factor decrease with the increase of ne as clear in Fig. 4B. Therefore, the low value of ne is good for the proposed sensor application as ne = 6 × 1017 m−3. By decreasing ne lower than this value, the transmittance peaks overlap.

Fig. 4
figure 4

Effect of the number ne on A sensitivity and FWHM, B FoM and Q-factor

Further, the sensitivity, FWHM, FOM and Q- factor is plotted with changing B as clear in Fig. 5. From Fig. 5A, the sensitivity increases with the increase of the B and attains saturation at 0.75 T, while the FWHM also varies with magnetic field and low value at same magnetic field 0.75 T. The FOM and Q-factor have large values at the lowest magnetic field but just after that the values gets decrease and attain almost saturation as shown in Fig. 5B. Therefore, B = 0.75 T has an optimum value, where the sensitivity and FOM have comparative large values.

Fig. 5
figure 5

Impact of applied magnetic field on A sensitivity and FWHM, B FoM and Q-factor

Next, the sensitivity, FWHM, FoM and Q-factor are plotted with the defect layer thickness as clear in Fig. 6. From Fig. 6A, the sensitivity increases with the thickness of the defect layer and attains saturation at a higher value, whereas the FWHM shows variation with two peaks. Figure 6B shows almost a similar kind of pattern for FoM and Q-factor. Therefore, the optimum result for FoM is achieved at 60 mm and 100 mm. The sensitivity, FoM and Q-factor have the highest values at the thickness of defect layer dsample = 100 mm. At 100 mm there is overlap between peaks. So, dsample = 60 mm will be optimum.

Fig. 6
figure 6

Impact of the thickness of defect layer on A sensitivity and FWHM, B FoM and Q-factor

The transmittance spectra for various samples are plotted with different optimum parameters as shown in Fig. 7. As clear in Fig. 7, the transmittance peak is shifted to the left (lower frequencies) with the increase of the sample index of refraction from 1.00 to 1.10 from 7.86 to 6.33 GHz. Besides the resonant peak shift, the PBG is red-shifted. As clear in Table 1, the proposed detector has high performance compared to other references.

Fig. 7
figure 7

The transmittance study at optimum conditions

Table 1 Comparison study of previous study (NC = not counted)

4 Conclusion

In this study, a novel magnetic field-dependent detector using MCP using PC was proposed. The sensor showed a high response to the thickness of the sample layer, the applied magnetic field, the number of electron densities, and the incident angle. The optimized sensor records sensitivity of, Q- factor and FoM of 15.14 GHz/RIU, 527.32, and 1066.20 RIU−1. We are convinced that the proposed sensor is a novel optical detector and can be used in different applications.