1 Introduction

In recent years, new advanced structures have created devices using hybrid structures consisting of metamaterial and two-dimensional (2D) platforms for various applications such as metasurfaces, underwater materials, sensors, biosensors, modulators, and optical logic gates that will provide the emergence of new systems in various fields of sciences [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]. PhCs are optical components that are usually formed periodically in semiconductor materials, and in a 2D PhC, the order of refractive index changes periodically along two directions [18,19,20,21,22]. Photonic bands are created as a result of the constructive interference of electromagnetic waves, and photonic band gaps (PBGs) occur as a result of the destructive interference [18,19,20,21,22]. PBG is the energy or frequency range in which the light propagation is prohibited inside the PhC and the light signal with frequency inside PBG is fully reflected by PhC [23]. Theoretical modeling and fabrication of all optical components based on PhCs have recently been considered due to the unique properties of PhCs [24]. PhC-based optical components have several advantages over conventional waveguides, including low-power consumption and structural compactness [25].

All-optical logic gates can be used in optical networks, all-optical processors, and optical signal processing systems, and play a vital role in the performance of these systems [26,27,28]. Numerous structures have been proposed to introduce photonic crystal all-optical logic gates [29,30,31,32]. Novel structures for photonic crystal all-optical logic gates have been optimized increasingly [33,34,35,36]. Also, various structures have been reported for logic gates to achieve high contrast ratios in photonic crystal all-optical logic gates [29, 37,38,39].

Mohebzadeh and Olyaee reported a new structure for the photonic crystal NOT and XOR logic gates with high contrast ratio [29]. In their study, the contrast ratios of 20.53 dB and 19.95 dB were obtained for the NOT and XOR logic gates, respectively, at the wavelength of 1550 nm. Additionally, the XOR and XNOR logic gates were reported based on Fano resonance in a plasmonic ring resonator with a contrast ratio of about 23 dB [39]. Recently, a photonic crystal all-optical logic gate with a short response time of femtoseconds has been reported [33, 40]. A photonic crystal-based structure for the AND logic gate with a response time of 320 fs was [41] presented in [41]. The XNOR logic gate with a contrast ratio of 12.27 dB and a response time of 0.1588 fs has also been reported [30]. Olyaee et al. achieved a very high contrast ratio of 43 dB and a response time of 317 fs for the photonic crystal XOR and NOT logic gates [42]. XOR/OR logic gates with a response time of 120 fs have recently been reported by Muthu et al. [43]. Recently, an ultra-compressed structure has been reported for XOR/NOT/OR logic gates with a response time of about 100 femtoseconds [44].

The design of photonic crystal logic gates based on the Kerr effect has various advantages over other techniques used for making photonic crystal logic gates such as multimode interference, self-assembled beam, and defect-based interference, which can lead to a more compact structure and the relatively low cost of fabrication. Of course, this structure has such disadvantages as high operating power and dependence of the response time on the type of material selected due to the difference in the nonlinear refractive index of the materials. The refractive index of material includes the linear and nonlinear terms \(n_{0}\) and \(n_{2}\), respectively. The refractive index can be calculated by [45]

$$n = n_{0} + n_{2} I,$$
(1)

where I denotes the intensity. In the nonlinear term, the value of \(n_{2}\) is different for different materials, and the refractive index of the material in the nonlinear mode depends on the intensity of the applied power, so that the refractive index of the material changes with the change in the power intensity [46].

Numerous studies have been done to design and simulate all-optical photonic crystal logic gates based on the nonlinear Kerr effect [47,48,49,50,51,52]. Salmanpour et al. [53] proposed the all-optical photonic crystal AND–OR and AND–XOR logic gates based on air cavities in the GaAs substrate by applying a nonlinear Kerr effect with contrast ratios of 20.29 dB and 16.7 dB [53]. In this structure, the nonlinear refractive index (n2) was considered to be 1.5 × 10−16 m2/W. Rahmani et al. designed an OR/NOR logic gate based on a two-dimensional photonic crystal structure with rods made of chalcogenide glass, in which the nonlinear refractive index was equal to 9 × 10−17 m2/W, and the response time and the contrast ratio were equal to 4 ps and 19.8 dB, respectively [54].

Rabhi and Najjar proposed the photonic crystal OR/AND/NAND logic gates based on the Kerr effect that contained In0.53Ga0.47AS/GaAs rods in the air [55]. In this structure, the Kerr coefficient of GaAs rods with a nonlinear refractive index (n2) of 1.5 × 10−16 m2/W was considered. A ring resonator with an hourglass-shaped core was used and the nonlinear Kerr effect was applied only to the rods around the ring resonator core, including scattering, coupling, and adjust rods. In the given structure, the contrast ratio for OR, AND, and NAND logic gates was obtained to be 12.5 dB, 9.29 dB, and 7.53 dB, respectively, and the response time of the AND structure was about 5 µs. Most recently, there is a structure based on the Kerr effect with a time delay less than one picosecond and a contrast ratio about 2.67 dB for the AND gate in the Si-based mode and in the InSb-based mode with the contrast ratio about 3 dB [56]. The proposed structure is a super compressed logic gate with a total area of about 78 μm2 and the Kerr effect used for dielectric rods is 1.5 × 10−17 m2/W [56]. Another distinctive feature of this structure is the multifunctionality of this logic gate, which simultaneously provides a logic multiplexer and an AND logic gate using a 2D photonic crystal structure [56].

Kumar and Medhekar designed and simulated all-optical photonic crystal NOR and NAND gates using silicon rods in the air [57]. In this structure, the operating power for the logic gates was considered directly and the values of the intensity of power injected into the logic gates were determined using numerical analysis. The proposed logic gates were designed using four cavities connected by four waveguides and the resonance occurred by these four cavities in the structure. It should be noted that the nonlinear refractive index (n2) of the structure was equal to 1.5 × 10−17 m2/W, and the contrast ratios for the NOR and NAND logic gates were respectively obtained as 11.91 dB and 13.97 dB. However, no information has been provided regarding the time response. Lately, a structure for 2D photonic crystals full adder based on the Kerr effect has been reported; the time delay of this structure is 2.5 ps and the total area of the structure is about 663 μm2 [58].

In this paper, a ring resonator is first created and its performance in a linear mode is examined. Then, after applying the nonlinear Kerr coefficient to the PhCRR structure, the minimum switching power intensity for the structure is obtained using the 2D-FDTD method. Finally, taking into account the values obtained in the previous steps for the minimum switching power intensity and the operating wavelength, the proposed AND logic gate structure is simulated and analyzed.

2 PhCRR structure

In our proposed structure, the width and length of the structure are equal to ± 7.6 μm in the direction of the X-axis and ± 6.4 μm in the direction of the Z-axis, and the total area of the structure is 194.56 μm2. The wavelength applied to the structure is 1.5481 µm, which is completely operational and suitable. In the present paper, a compact, very fast, and well-functioning structure for the AND logic gate based on the Kerr effect is presented.

To design the PhCRR, a two-dimensional photonic crystal structure consisting of 25 columns, 21 rows, and dielectric rods in the air is used. The dielectric rods are made of GaAs which has less switching power for nonlinear application than silicon. At the wavelength of the structure, the GaAs refractive index is lower than the Si refractive index by 1.542 μm, which makes the light waves propagate in the GaAs at a higher speed. To benefit from the third telecom window, the lattice constant of the structure is considered to be 580 nm and the radius of the dielectric rods is equal to 116 nm. The plane wave expansion method is used to obtain TE/TM modes in the PhCRR structure. The TE/TM modes and the band gaps for this structure are shown in Fig. 1.

Fig. 1
figure 1

TE/TM band structure

As shown in Fig. 1, the proposed structure includes two band gaps, while the first bandgap is used for the PhCRR structure. Frequencies in the bandgap of the structure are between 0.290 < a/λ < 0.421. The lattice constant is equal to 580 nm and the operating wavelength for PhCRR is obtained to be 1542 nm. Based on the 2D-FDTD method, the simulation of the PhCRR structure is performed. Moreover, we assume Δx = Δz = λ/16 to ensure convergence in the simulations, where Δx and Δz are mesh sizes in the x- and z-directions, respectively. Besides, we selected the time and space gird to meet the following conditions [59,60,61]:

$$\Delta t < \frac{1}{c}\sqrt {\left( {\frac{1}{\Delta x}} \right)^{2} + \left( {\frac{1}{\Delta z}} \right)^{2} .}$$
(2)

The proposed PhCRR structure is illustrated in Fig. 2. As shown in Fig. 2, the proposed structure consists of two waveguides and a ring resonator. The input signal is applied to the structure from the input port and the output signal is transmitted to three ports A, B, and C by two waveguides and a ring resonator. In this structure, the input source is propagated in the structure using Gaussian method and the pulse length of this source is considered from 1 to 2 μm, which the optimal state after this scan is considered 1.5481 μm. If the scattering rods get closer to the core structure by 5% of the lattice constant, they will improve the PhCRR structure’s performance and increase the transmission rate. Generally, the maximum amount of output light is in port A. In this ring resonator, there is a suitable resonant mode at a frequency of 1542 nm, as can be seen in Fig. 3. When the wavelength of the light is equal to this amount, the maximum output value appears in port C based on the resonance taken place in the structure. The results obtained from the simulation at 1542 nm for the PhCRR structure in linear mode are shown in Fig. 4.

Fig. 2
figure 2

The proposed photonic crystal ring resonator

Fig. 3
figure 3

PhCRR normalized transmission

Fig. 4
figure 4

a Mode distribution and b the response time of the proposed PhCRR

3 The computation of switching power intensity

In this section, the minimum switching power intensity of the proposed PhCRR structure in a nonlinear mode is calculated. The nonlinear Kerr effect based on the threshold switching could have the most significant nonlinear impact on the structure’s physics. Therefore, the Kerr coefficient has the maximum effect on the case of the switching power mode. After applying the nonlinear Kerr coefficient, the resonant frequency is shifted due to the change of the refractive index of the dielectric rods, its dependence on the intensity of the power applied to rods, and the difference of its value for each rod. In the nonlinear structure, the wavelength of the applied light is considered to be 1.5481 µm to obtain the switching power intensity. Following the application of the nonlinear Kerr coefficient to the structure and the shift of the resonant wavelength in nonlinear mode, numerical analysis is performed to obtain the switching power intensity of the PhCRR structure.

The input power intensity is applied in this structure for the values of 350 W/μm2 to 1250 W/μm2. The nonlinear Kerr coefficient for the entire structure was in the wavelength structure, and its switching threshold power intensity was 800 W/μm2. At this amount of power intensity, the output of port 1 and port 3 are very close to each other. The nonlinear refractive index is considered to be 1.5 × 10−16 m2/W for GaAs rods. The response time for the minimum switching power intensity of 800 W/μm2 applied to the structure is illustrated in Fig. 5.

Fig. 5
figure 5

Power intensity switching

4 Designing and simulating nonlinear PhC AND logic gate

4.1 Designing the structure

The proposed two-dimensional photonic crystal AND logic gate based on the Kerr effect is shown in Fig. 6. All blue dielectric rods indicate the applied nonlinear Kerr effect. In this structure, two waveguides are used to transfer the inputs of the logic gate and one waveguide for the output. A ring resonator is used in the center of the logic gate. A bandpass is applied by a nonlinear defect line in the output waveguide to increase the output power. The radius of the rods in the defect line is equal to 39 nm. Two nonlinear micro-resonators are used around the output waveguide. The radius of these micro-resonators is equal to 39 nm. In this structure, nonlinear scattering dielectric rods with a radius of 110 nm are also used. The radius of the other rods is equal to 116 nm and the reason for using this radius for dielectric rods is the use of the third telecom window. The wavelength applied to the structure is 1.5481 μm.

Fig. 6
figure 6

Nonlinear all-optical PhC AND logic gate

In the proposed structure, when one of the inputs is On and the other is Off, it enters the ring resonator after passing through a waveguide and exits the other port of the structure after being resonated. In this case, there is less resonance in the center of the AND logic gate structure, and thus, less light is transmitted to the output port. Practically, nonlinear micro-resonators around the output waveguide resonates less power intensity. In the case where the two inputs are On, the light enters the structure from two up and down waveguides and the additional resonance occurs in the ring resonator. Since nonlinear micro-resonators are used, a much larger amount than the previous mode is absorbed and resonated by these two micro-resonators and transmitted to the output waveguide. In this case, the light wave is absorbed inside the ring resonators and nonlinear micro-resonators and directed to the output of the AND logic gate. According to the above-mentioned, the performance of the proposed logic gate is optimal.

4.2 Results

As shown in Fig. 7, when input A is zero and input B is one, the output of the proposed logic gate is zero. Since the proposed structure is symmetric, in the case where input A is one and input B is zero, the results are similar to the previous case. Figure 8 shows the results obtained for the proposed structure in the case where input A is one and input B is zero. The response time and final value of the output port are also presented in Fig. 8. The response time for this gate is equal to 1.8 ps and the stable value for this gate is about 0.0601.

Fig. 7
figure 7

a Case of ‘01’ state in which input port A is Off and port B is On. The output at Y becomes Off (48 W/μm2). b Response time of case ‘01’

Fig. 8
figure 8

a Case of ‘10’ state in which input port A is On and port B is Off. The output at Y becomes Off (48 W/μm2). b Response time of case ‘10’

When both inputs are the same, the output is as shown in Fig. 9. Additionally, the response time of the proposed AND logic gate is presented in Fig. 10. In this case, the response time is about 1.8 ps. The output value is equal to 0.741 in the case where the input is one and it is 0.0601 in the case where the input is zero.

Fig. 9
figure 9

a Case of ‘11’ state in which input port A is On and port B is On. The output at Y becomes On (593 W/μm2). b Response time of case ‘11’

Fig. 10
figure 10

Nonlinear PhC AND logic gate time response

To calculate the optimal performance, the contrast ratio (CR) is used as

$${\text{CR}}\left( {\text{dB}} \right) = 10{ \log }\frac{{Y_{\text{on}} }}{{Y_{\text{off}} }}.$$
(3)

The contrast ratio of the proposed gate is obtained as 11.04 dB.

The proposed structure is compared with other similar structures proposed in previous works. As can be seen in Table 1, the performance of the proposed logic gate is compared with five similar logic gates. Due to the use of GaAs rods, the Kerr coefficient (n2) is higher in this structure, leading to considerable advantages. As the value of n2 is high, the amount of switching power intensity and the frequency response is lower in this structure.

Table 1 The comparison of the results of the proposed structure with other structures

The structure of the proposed logic gate has much smaller dimensions than other similar structures. The performance of the structure is also optimal regarding the response time, and considering the performance of the proposed structure, the contrast ratio is very optimal for the nonlinear AND logic gate compared to other presented structures.

5 Conclusion

In this study, a high-performance structure has been proposed for AND logic gate based on the Kerr effect. It was designed in a total area of 194.56 μm2 with the minimum intensity per switching of 800 W/μm2, and the operating wavelength of 1.5481 μm. Compared to the propagation delays mentioned in other study, our proposed propagation delay was 1.8 ps which was very suitable and fast based on the Kerr effect. Based on the contrast ratio, the logic gate also performed acceptably and achieved 11.04 dB. Good contrast ratio, short response time as well as compact structure are the advantages of the proposed AND logic gate.