1 Introduction

In recent years, photonic crystal based all optical devices have gained considerable attention since their characteristics were interesting. Among these characteristics we list small size, photonic band gap, low group velocity, dimensions and flexibility, negligible loss in micrometer range and applicability in Photonic integrated circuits (PICs). All-optical logic gates are considered necessarily crucial in the design of all optical integrated circuits useful in optical computing systems, optical signal processing and optical interconnection networks (Manolatou et al. 1999; Sugimoto et al. 2009; Liu et al. 2011; Rostami 2006).

Up to the present, many efforts have been made to design and simulate logic gates based on photonic crystals. Most of them such as NOT, OR, XOR, AND, NAND and NOR have been studied (Younis et al. 2014; Sharifi et al. 2016; Liu et al. 2013; Jiang et al. (2014); Salmanpour et al. 2014; Mehra and Bhadel 2014; D’souza and Mathew 2016; Swarnakar et al. 2017; Pirzadi et al. 2016; Gupta and Medhekar 2016; Fan et al. 2016; Xavier et al. 2016) and some of the combinational circuits such as decoder, half adder, full adder and demultiplexer have been realized (Rostami et al. 2011; Karkhanehchi et al. 2016; Lin et al. 2014; Jiang et al. 2015). NAND and NOR optical gates are more difficult compared to OR and AND optical gates as when all inputs are zero, the output of these gates should be equal to 1, which requires a control light source.

Earlier, restricted studies have been handled for the design of optical NOR gate based on 2D photonic crystals (Bao et al. 2014; Alipour-Banaei et al. 2014a, b, c, d). These researches have the disadvantage of complexity and large size which makes it difficult to be fabricated. Moreover, the electrical field outputs in some ‘one’ logic cases were insufficient, and in ‘zero’ logic cases the electric field was considerable. Hence, the structures are yet to achieve good performance.

Another technique to design optical logic gates is to use semiconductor optical amplifiers (SOAs) (Zhang et al. 2004; Wang et al. 2007). However, their performance is limited by the complexity of integration and the spontaneous emission noise.

Using beam interference effect, Fu et al. (2013) theoretically discussed the design of optical logic gates in 2D Si PhC and they proposed OR, XOR, NOT, XNOR and NAND gates. Also, a T-shaped interference based structure, made with a square lattice PhC of Si rods immersed in air background, was proposed by Shaik and Rangaswamy (2016) which utilized to realize NAND, NOR and XNOR gates.

Another interference based gates structure using triangular lattice PhC of Si rods in air background was proposed by Parandin and Karkhanehchi (2016) and used to design NOR and AND gates.

Recently, in 2018, Hussein et al. (2018) introduced new designs of all optical logic gates as AND, OR, NOT, NOR, XOR and used the combination of OR and XOR gates to realize a NAND gate. Each of these gates exhibited a reasonable contrast ratio between logic ‘1’ and logic ‘0’ varying between 5.036 dB for the NAND gate to 12.155 dB for the XOR gate.

Saidani et al. (2015) proposed a multifunctional logic gate using multimode interference concept in a 2D photonic crystal structure. Shaik and Rangaswamy (2017), in their turn, proposed a MMI based structure, with square lattice PhC of Si rods surrounded by air, for OR, XOR, XNOR and NAND gates. The proposed structure is designed to solve the back signal problem generated when the input signal reflects back from one port to the other input port.

By switching optical signal to distinct input waveguides, diverse functions such as OR, NOR, XOR and NOT gates have been achieved. Isfahani et al. (2009) proposed a T-shaped optical switch using nonlinear photonic crystal micro-ring resonators. Then, two of the proposed switches have been cascaded to design optical NOR gate. The transmission efficiency in OFF state was 2% and 81% in ON state.

Furthermore, logic gates’ operation can be realized using nonlinear Kerr materials. The main property of these materials is that their refractive index is dependent on the input signal intensity. Hence, by increasing or decreasing the signal’s intensity values, the properties of the structure, such as the ranges of operating wavelengths, are changed. In this context, Pashamehr et al. (2016) proposed an OR, AND and NOT gates based on nonlinear Kerr materials in photonic crystal ring resonator structure.

Moreover, Alipour-Banaei et al. (2017) suggested an AND and NOT gates using square lattice PhC of chalcogenide glass rods embedded in air. The device is designed using a nonlinear ring resonator connected to waveguides for the inputs and the output. The resonator has a drop resonance wavelength 1550 nm that is shifted for the threshold power value higher than 1 KW = µm2.

In our work, we propose a new structure of nonlinear PhCRR serving to design all-optical OR, AND and NAND logic gates. The new proposed shape of the ring resonator offers a high Q-factor and high transmission efficiency and the proposed logic gates are characterized by a reduced power consumption and high contrast ratio.

The current paper is structured as follows; in Sect. 2, we present the simulation method and the PhCRR design, Sect. 3 shows the Kerr effect and performance analysis. The application of the proposed PhCRR in designing an ultrafast all optical OR, AND and NAND logic gates is shown on Sect. 4; finally conclusions are drown in Sect. 5.

2 PhCRR design and structure conception

The employed 2D-PhC structure consists of a 35*29 square lattice of In0.53Ga0.47As rods with a total size of 334.665 μm2. The refractive index of dielectric rods is n = 3.59 and its radius is R = 0.181*a, where “a” is the lattice constant. Plane Wave Expansion (PWE) simulation shows that the proposed structure exhibits two photonic band gaps (PBG) for TE mode situated between the normalized frequencies 0.28 < a/λ < 0.43 and 0.72 < a/λ < 0.74. As the operating wavelength of our proposed structure is around λ = 1.55 µm, the first band gap with lattice constant equals to a = 0.586 µm is considered. Therefore, the wavelength range will be 1.279 µm < λ<1.964 µm (Fig. 1).

Fig. 1
figure 1

Photonic band structure

The transmitted light and dropping efficiency are analyzed using the finite difference time domain (FDTD) method (Greene and Taflove 2006). A perfectly matched layer (PML) surrounds FDTD area so that the incident waves are absorbed, constant wave impedance is guaranteed and unwanted reflections are avoided (Lavrinenko et al. 2004). The FDTD method is based on solving Maxwell’s equations by discretizing fields in space and time domain. To obtain accurate results, the space grid has to be tiny enough to resolve the smallest characteristics of the simulation field. The space grids Δx and Δz must be chosen as (Greene and Taflove 2006):

$$\Delta {\text{x}} < {\text{a}}/10\; {\text{and}}\;\Delta {\text{z}} < {\text{a}}/10$$
(1)

where Δx and Δz are mesh size in the x and z directions, respectively. In addition, we have considered Δx = Δz = a/20 in order to guarantee the convergence in simulations. Moreover, space and time grid are chosen as to satisfy the following condition (Wu et al. 2012):

$${\text{c}}\Delta {\text{t}} < \frac{1}{{\sqrt {\left( {1/\Delta {\text{x}}} \right)^{2} + (1/\Delta {\text{y}})^{2} } }}$$
(2)

Here ‘c’ represents the light speed in free space.

The PhCRR is created between two parallel defect waveguides. It consists of two opposed equilateral triangles forming a sand glass shape. The radius of rods forming the two triangles is R = 0.152*a, the vertex rod has a radius of 0.154*Period. Four scattering dielectric-rods, with a radius of 0.187*a, are placed one in each corner of the formed ring and each is centered in its four nearest neighbor rods. These scattering rods are introduced in order to improve the spectral selectivity and the drop efficiency (Quiang et al. 2007; Kumar and Sirinivas 2004) by suppressing the counter propagating modes which can cause forged drops in the transmission spectrum. The sketch of the proposed design is shown in Fig. 2.

Fig. 2
figure 2

Sketch of proposed structure

3 Kerr effect and performance analysis

The resonant wavelength of PhCRR is dependent on the refractive index, the radius and the dimension of the resonant ring core section (Mehdizadeh et al. 2013). For a large band input optical signal, the resonant wavelength (λ = 1.5471 µm) of our proposed PhCRR is dropped and oriented to port D with a drop efficiency of 100%. Moreover, the calculated Q factor is 1719 which is defined as the ratio λ0/∆λ, where λ0 is the resonant wavelength and ∆λ is the spectrum width around λ0 at Full Width at Half Maximum (FWHM) (Fig. 3).

Fig. 3
figure 3

Output spectrum of the proposed PhCRR

Comparing the novel design of the PhCRR with previous works, the proposed design is characterized by higher spectral selectivity and higher quality factor. Table 1 shows the performances’ comparison of the proposed structure with recently published results.

Table 1 Comparison table

To study of resonant mode sensitivity upon the nonlinear effect, we replaced some rods of the structure by nonlinear dielectric rods made of GaAs characterized by a Kerr coefficient n2 = 1.5*10−16.

Nonlinear effects were first discovered and used in multiple fields as; electronics, acoustics, radio frequency and dielectric or magnetic media. In optics, nonlinearity is activated when the intensity of the applied field increases, changing consequently the medium optical properties.

The applied field can refer to any external variable, as electric field, acoustic wave, magnetic field…etc. Among optical nonlinearities, we can list electro-optic effect, magneto-optic effect and the Zeeman Effect.

Third-order nonlinear optical effects are considered the physical basis of multiple applications in future high-capacity communication networks (Cotter et al. 1999). Hence, in recent years, third-order nonlinearities have been studied in a large variety of artificial materials such as homogeneous bulk glasses and polymers (Hall et al. 1989; Bloembergen 1996), nano and mesoscopically structured materials as semiconductor, quantum-well structures (Hamilton et al. 1996), glasses doped with semiconductor (Banfi et al. 1998) and metal nanocrystals (Haglund et al. 1997).

High power provokes third order nonlinear effect in dielectric materials which is called Kerr effect (Prakash et al. 2002). Therefore, the refractive index of dielectric materials is proportional to the incident light intensity and the optical behavior of the PhCRR structure can be controlled via input intensity (Ahmadi-Tame et al. 2011).

In our work, we start by analyzing the performance of the proposed PhCRR as function of Kerr effect. Therefore, four cases of nonlinear rods emplacement, in which Kerr effect is activated, are considered:

  • Case 1: coupling rods

  • Case 2: core and coupling rods

  • Case 3: coupling, adjacent and scattering rods

  • Case 4: core, coupling, adjacent, and scattering rods

The output/input diagram of the structure, in each case, at port D is presented below in Fig. 4.

Fig. 4
figure 4

Output/input diagram for nonlinear ring resonator in different cases

Thus, the normalized transmission and resonance wavelength for different cases are resumed in the following Table 2.

Table 2 Transmission spectra of the proposed nonlinear PhCRR

Comparing the obtained results from this study to the linear case, we can notice that, for an injected power of 733 W/µm2 for the third case of nonlinear rods configuration, the resonant wavelength is shifted toward higher value and the drop efficiency is 99.6% at λ = 1,5495. Therefore, third case configuration seems to be the most convenient configuration and it will be an interesting idea to explore it in the realization of all-optical logic gates.

By launching high power light, we can control the optical behavior of the nonlinear PhCRR structure. The optical behavior of the proposed structure at λ = 1.5471 µm is shown in Fig. 5. For low intensity input power of 33,333 W/µm2, the PhCRR works at linear region. So the input light will drop to the drop waveguide and travel toward port D (Fig. 5a) due to resonant effect of the ring resonator. However, for high intensity input power of 733 W/µm2, the refractive index of the structure will increase due to Kerr coefficient of GaAs rods, therefore, the input light will not drop and will travel toward port B (Fig. 5b). Figure 5 shows the switching behavior of proposed PhCRR in both cases of incident power.

Fig. 5
figure 5

Optical behavior of the proposed PhCRR for a low injected power. b High injected power

4 Logic gates based on the proposed PhCRR

4.1 OR gate

For OR gate we utilized ports C and D for inputs and port B for output. The final sketch of the proposed OR gate is shown in Fig. 6. The three input ports are labeled as INPUT 1, INPUT 2 and BIAS and the output port is labeled as OUTPUT. The working states of the proposed OR gate are summarized in Table 3.

Fig. 6
figure 6

OR gate structure based on the proposed PhCRR

Table 3 Working states of the proposed logic OR gate

According to Fig. 7 and Table 3, once at least one of the inputs is ON, the effective refractive index of the PhCRR changes and prevents the bias beam from coupling into the ring. Otherwise, the structure is OFF.

Fig. 7
figure 7

Optical field distribution of the proposed OR gate for: INPUT1 = INPUT2 = 0. INPUT1 = 1, INPUT2 = 0. INPUT1 = 0, INPUT2 = 1. INPUT1 = INPUT2 = 1

The time evolving output curves for different combinations of OR gate is given in Fig. 8. We can observe that, in the worst case, the time required to move from 0 to 85% of the average output power is t = 0.05 ps.

Fig. 8
figure 8

Response time of OR gate

4.2 AND gate

To realize AND gate, the input and the output ports of the proposed PhCRR structure are slightly displaced (Fig. 9).

Fig. 9
figure 9

Proposed AND Gate structure based on PhCRR

Optical continuous wave with λ = 1, 5471 µm and power density equals to 333 W/µm2 are applied to simulate and test the functionality of AND gate. Different states of inputs are summarized in Table 4.

Table 4 Working states of the logic AND gate for different states of input ports

According to Fig. 10 and Table 4, the proposed structure works as AND gate, because the output is ON only when both inputs are ON.

Fig. 10
figure 10

Optical field distribution for different states for proposed AND gate for: INPUT1 = INPUT2 = 0. INPUT1 = 1, INPUT2 = 0. INPUT1 = 0, INPUT2 = 1. INPUT1 = INPUT2 = 1

When both input ports are OFF (INPUT1 = INPUT2 = 0), there is no optical wave inside the structure so the output port will be OFF (OUTPUT = 0), (Fig. 10a).

Figure 10b shows the state when port INPUT1 is ON and port INPUT 2 is OFF. The optical waves entering the bus waveguide through port INPUT 1 will drop to the DROP waveguide through the resonant ring and the gate is considered to be OFF (OUTPUT = 0). Conversely, as shown in Fig. 10c, when port INPUT1 is OFF and port INPUT2 is ON (INPUT1 = 0, INPUT2 = 1), optical waves entering through port INPUT2 will travel toward resonant ring. As there is no space from port OUTPUT 2 toward output port so the optical waves cannot reach the output port. For this case the gate is still OFF (OUTPUT = 0).

Finally, as shown in Fig. 10d, when both inputs INPUT1 and INPUT2 are ON, the total optical power intensity near the resonant ring reaches the switching threshold power of 733 W/µm2 and the resonant wavelength is shifted. Therefore, the optical waves from port INPUT1 will not drop into DROP waveguide and will travel toward the output port. The gate will be at ON state (OUTPUT = 1).

The response time of the proposed AND gate can be calculated from time evolving curve of the output power (Rani et al. 2013; Wu et al. 2012). The time evolving curve of the output curves form different inputs combinations is given in Fig. 11. Therefore, the time required to move from 0 to 85% of the average normalized transmission is t = 0.0834 ps.

Fig. 11
figure 11

Output response time of AND gate

4.3 NAND gate

By adjusting waveguides position of proposed AND gate structure, we designed the NAND gate (Fig. 12). Two input waveguides, labeled as INPUT1 and INPUT2 are formed by removing 12 rods from each side of the ring in order to connect the input logic ports to the PhCRR.

Fig. 12
figure 12

Proposed NAND gate structure based on PhCRR

The resonant wavelength of the PhCRR is λ = 1.5471 µm at input power lower than the switching threshold (733 W/µm2). The output state of the proposed NAND gate will be controlled via INPUT1 and INPUT2 ports with an optical signal applied in the Bias port. The output logic NAND gate is ON when either one or both of inputs are OFF. Contrary, when both inputs are ON, the logic gate turns OFF. Table 5 resumes the different states of the proposed NAND gate.

Table 5 Working states of the logic NAND gate for different states of input ports

The power density of all inputs is 244.333 W/µm2. When both of the logic ports are OFF, the optical power near the resonant ring is 244.333 W/µm2 which is less than the switching threshold power (733 W/µm2). Therefore, the bias wave will drop and travel toward OUTPUT port and turns the NAND gate ON (Fig. 13a).

Fig. 13
figure 13

Optical field distribution of NAND gate for INPUT1 = INPUT2 = 0. INPUT1 = 1, INPUT2 = 0. INPUT1 = 0,INPUT2 = 1. INPUT1 = INPUT2 = 1

In the second case in which INPUT1 is ON and INPUT2 is OFF or vice versa, optical power near the resonant ring is about 488,666 W/µm2. As this power remains less than the switching threshold power (733 W/µm2), optical waves will drop into the ring resonator and reach the OUTPUT port. Therefore, the gate will be ON (Fig. 13b, c).

Finally when both logic input ports are ON, the overall optical power of 733 W/µm2 will shift the resonant wavelength of the ring. As a result, the optical waves in bus waveguide will not drop into ring resonator to reach the OUTPUT port and the gate will turn OFF (Fig. 13d).

For the NAND gate, the response time is calculated from Fig. 14 and it is equal to 5 ps. This time is shorter than the response time of recently published results.

Fig. 14
figure 14

Output response time of NAND gate

The performance of a logic gate is determined by different characteristics such as the simplicity of the structure and the response time. The contrast ratio of ON to OFF logic level is another characteristic of logic gates which determines the output level difference between the two states logic 0 and logic 1. It is defined as:

$$CR = 10 log_{10} \frac{{P_{1} }}{{P_{0} }}$$
(3)

where P1 and P0 are logic 1 output power and logic 0 output power, respectively.

According to Eq. 3, the developed PhCRR based logic OR, AND and NAND gates offer a contrast ratio of 12.5 dB, 9.29 dB and 7.53 dB respectively.

As a comparison, in the following Table 6 we resume the performances of our proposed logic gates and those previously published.

Table 6 Comparison table

5 Conclusion

Low energy consumption, ultrafast response, ultra compactness and simplicity of integration are considered the most crucial keys for efficient functionalities used in the optical communication systems. Since photonic crystal structures are promising means to accomplish these goals, we developed and analyzed a new photonic crystal ring resonator structure in which GaAs was implemented for its customizable nonlinear properties and its optical behavior was controlled via power intensity. The proposed ring is designed to operate as all optical logic OR, AND and NAND gates with the minimum switching threshold power comparing to previous reported works (Serajmohammadi and Absalan 2016; Alipour-Banaei et al. 2014a, b, c, d; Mehdizadeh and Soroosh 2016). The logic gates presented a very good performance; high transmission coefficient, high contrast ratio and very short response time.