1 Introduction

The development and progress of optical networks and optical communication systems have created a need for all-optical circuits and components. Currently, the goal of telecommunications networks is to achieve ultra bandwidth and transmission speed, which cannot be achieved using electronic-based systems. Therefore, researchers are striving to create all-optical networks, which require all-optical components. Photonic crystal (PC) structures are known as the efficient choice for designing all-optical components. Due to their photonic bandgap, they enable confinement and control of light propagation in very small areas. Photonic crystals are arrays of dielectric materials whose refractive index varies periodically (Maleki et al. 2023a). The advantages of photonic crystals include flexibility in shape and dimensions, high transmission coefficient, low losses, and scalability. Given these advantages, various photonic crystal devices, including encoders (Naghizade et al. 2020, Makvandi et al. 2022), adders (Sivaranjani et al. 2020; Maleki et al. 2020a, 2021a, b), logic gates (Shreya et al. 2024; Geerthana et al. 2022), multiplexers/demultiplexers (Kavitha et al. 2023; Maleki et al. 2020a, Maleki et al. 2020b), and decoders (Mondal et al. 2019; Aidinis et al. 2021; Daghooghi et al. 2018a, b, c, 2019; Maleki et al. 2019, 2020a, b; Naghizade et al. 2022; Askarian et al. 2022, Maleki et al. 2023b) have been introduced.

One of the essential components with numerous applications in switching networks is the decoder. A decoder is a circuit with k input and 2k output terminals. Depending on the combination of input signals, only one of its output terminals (or ports) is active at any given moment. So far, various research studies have been conducted on PC structures to achieve the decoding. Mondal et al. (2019), have introduced a decoder using two-dimensional photonic crystals. The decoder operates through optical interference in PC waveguides. An optical bias is used to provide logic 1 when all inputs are in the OFF mode. Simulations show a contrast ratio of 11.3 dB and a response time of 0.77 ps. Additionally, the reported area is 234 µm2. Ajdinis et al. (2021) aimed to design, analyze, and simulate a decoder using self-collimated beams. The device is composed of silicon rods and air gaps. It has a simple structure with an area of about 228 µm2 and includes two inputs and three outputs. Additionally, the structure includes two splitters using rod defects. The structure achieved a contrast ratio of 2.02 dB.

Daghooghi et al. (2018a) introduced a PC platform for decoding with two inputs. The decoder is composed of six nonlinear rings that act as optical switches. The main structure has a lattice constant of 600 nm and an index of 3.1 for rods. The highest and lowest normalized levels for logic 1 and 0 are equal to 0.37 and 0.1, respectively. The highest amount of cross-talk and loss are obtained to be approximately − 38 dB and − 20 dB, respectively. The cross-talk is defined as 10×log(PL/PH) for the decoder where PL and PH are the optical powers for logics 0 and 1, respectively, for each output port. Also, the structure has an area of 528 µm2. Daghooghi et al. (2018b) introduced a PC-based decoder utilizing nonlinear ring resonators. The photonic crystal structure consisted of chalcogenide rods with a response time of 2 ps. The switching operation at a wavelength of 1550 nm was carried out by three ring resonators containing rods with an optical Kerr constant of 9 × 10− 17 m2/W. The margins of logic 1 and logic 0 were equal to 0.49 and 0.14, respectively. Moreover, the device had an area of 380.25 µm2. In another study (Daghooghi et al. 2018c), they proposed a PC-based decoder with nonlinear ring resonators. The decoder features a single enabled port for controlling the decoding operation. To reduce the intensity, nano-crystal rings with a high optical Kerr constant are used at the center of switches. For logic states 1 and 0, the worst cases for the normalized outputs are equal to 0.63 and 0.1, respectively. The highest value of insertion loss is observed to be -4.31 dB, occurring in two specific cases. The insertion loss is calculated by 10×log (Pi/Pt) where Pi is the incoming power and Pt is the transmitted power at the output port. Additionally, the maximum calculated cross-talk is -17.53 dB. The total area of the structure is 368 µm2. In another study (Daghooghi et al. 2019), they proposed a new PC structure for decoding with two inputs. The switching utilized the optical Kerr phenomenon and index change. The structure included a nonlinear resonant ring and three nonlinear resonant cavities, which are specifically designed to operate in the slow-light regime. This modification enhances coupling through waveguides. The proposed slow-light waveguides achieved a maximum group index of 94. By adopting this approach, the decoder achieved maximum normalized output powers of 0.82 for logic 1 and 0.04 for logic 0. The area of the structure is 228 µm2. The maximum insertion loss is obtained at -7.45 dB, and the maximum cross-talk is determined to be -16.38 dB.

Maleki et al. (2019), have proposed a structure for decoding operation including a 23 × 14 array of rods that are periodically placed with a gap of 530 nm. The designed structure achieved a response time of approximately 220 fs. Additionally, the gap between logic 0 and 1 margins is 0.83, and the structure occupies an area of 90 µm2. In another study, a PC structure with resonant cavities was presented to enhance the response of the decoder (Maleki et al. 2020b). The device includes some periodic rods where the period constant equals 500 nm. The structure’s rods have a radius of 125 nm, resulting in a bandgap from 1092 nm to 1724 nm in transverse magnetic mode. Three resonant cavities selectively guide the input signals based on the wave intensity. Simulation of the device reveals a response time of 200 fs. The structure occupies an area of 110 µm2, and the reported logic 0 and 1 margins are 0.04 and 0.88, respectively. In another study by Maleki et al. (2020a, b), a PC-based platform was provided for a decoder with two inputs. The device is composed of a square lattice of rods with a spatial period of 517 nm. The structure does not include any resonant ring, resulting in a reduced device area of 76 µm2. Additionally, the mentioned ratio and the response of the device are 13.52 dB and 210 fs, respectively.

Naghizade et al. (2022) introduced an adjustable decoder with two inputs. The device proposed in their study incorporates three photonic crystal ring resonators. These ring resonators are composed of silicon rods covered with silica and graphene. By manipulating the chemical potential of the graphene using an appropriate gate voltage, the desired PC resonant mode can be adjusted. Numerical analysis reveals that the maximum response time and fall time for the final structure are 0.8 ps and 0.3 ps, respectively, and the overall area of the device equals 850 µm2. Askarian et al. (2022) presented an optical decoder that was investigated utilizing the optical Kerr phenomenon in a hexagonal arrangement of rods. The final structure consisted of seven waveguides and three resonant rings. The lowest normalized optical power for logic 1 is equal to 0.77, while the highest normalized value for logic 0 is observed at 0.09. The resulting contrast ratio amounts to 9.32 dB, and it occupies an area of 561 µm2. Recently, Maleki et al. (2023b), have designed a rod-type PC platform for decoding operations. By implementing nonlinear rods in cavities with different radii, the resonant wavelengths are modified. Through the utilization of different input power levels, dropping operations are achieved via the cavities, corresponding to different working scenarios. As a result, a decoding device is provided in the small area of 86 µm2. Furthermore, the proposed device exhibits a fast time response of approximately 0.2 ps, making it suitable for high frequency circuits. Additionally, the value of 13.58 dB for contrast ratio highlights its excellent suitability for digital applications.

Examining previous structures shows that to achieve a high contrast ratio, a ring resonator can be used. Its suitable coupling efficiency at resonance wavelength results in an increase in logic 1 margin and its very low coupling at non resonance case reduces the logic 0 margin. If structures based on resonant cavity are used, the device area becomes smaller but the contrast ratio decreases, which is undesirable. In this study, a ring resonator-based structure is designed to achieve decoder 2-to-4, which properly transmits input signals to the output based on light intensity. The use of nonlinear rads with different radii in the rings causes each ring’s resonance to be proportional to a specific intensity, guiding light to a corresponding output for each input state. A contrast ratio as high as 13.71 dB and an area as small as 296 µm2 indicate that the designed structure can effectively distinguish between logic 1 and 0 in a small size. The device response time is 194 fs, which is faster than all previous 2-to-4 works. The attractive features of the designed decoder have made it optimistic to use it in optical circuits.

In the following, the fundamental photonic crystal structure is presented and the photonic band gap is calculated in Sect. 2. Then, the resonant ring-based platform for an all-optical decoder with two inputs is introduced. In Sect. 3, the results of solving Maxwell’s equations are presented and all working states are simulated. Moreover, the obtained results are compared with similar works to have a better evaluation of the presented work. Finally, the obtained results are briefly presented in the conclusion.

2 The PC-based decoder

In this section, a compact decoder with two inputs is proposed based on a photonic crystal platform. The structure consists of cylindrical chalcogenide rods arranged in a 28 × 45 grid in the x-axis and z-axis directions. A square lattice is used with a lattice constant of 485 nm. The rods are made of silicon, and their radius is 0.18 times the lattice constant. Figure 1 shows that this structure exhibits a wide bandgap in TM mode. The gap ranges from 0.298 to 0.416, corresponding to a wavelength range of 1165 nm to 1627 nm. The bandgaps are calculated using the plane-wave expansion method, which utilizes the lattice periodicity and describes the field components in Maxwell relations with the help of Fourier’s series. RSoft Photonics CAD is employed to calculate the field components. The equations can be written as follows (Maleki et al. 2023c).

$$\:\frac{1}{{\epsilon\:}_{r}}\nabla\:\times\:\nabla\:\times\:E={\left(\frac{\omega\:}{c}\right)}^{2}E$$
(1)
$$\:\nabla\:\times\:\frac{1}{{\epsilon\:}_{r}}\nabla\:\times\:H={\left(\frac{\omega\:}{c}\right)}^{2}H$$
(2)

where H and E represent the magnetic and electric fields, ω refers to the eigenvalue of the equations and denotes the frequency, c symbolizes the speed of light in a vacuum, and εr refers to the relative dielectric constant.

Fig. 1
figure 1

The calculated eigenvalues of Maxwell’s equations for a round of the reduced Brillouin zone (Γ-M-K-Γ)

As depicted in Fig. 2, the structure comprises two input ports A and B, one optical bias (named BIAS), along with four output ports O0 to O3. Additionally, there are nine waveguides (named W1 to W9) and four resonant rings R1, R2, R3, and R4. The rings are connected to waveguide W5 and include a 4 × 4 array of nonlinear rods. The nonlinear rods are composed of doped glass with a linear refractive index of 1.4 and a nonlinear refractive index of 3 × 10− 15 W/m2 (Saleh et al. 2019). The radius of nonlinear rods in R1 to R4 is 94 nm, 90 nm, 86 nm, and 82 nm, respectively. The refractive index changes when an optical intensity (I) illuminates the nonlinear rods, and this phenomenon is known as the optical Kerr effect. The index of rods is equal to n0 + n1×I which n0 represents the linear value and n1 refers to the nonlinear coefficient (or Kerr coefficient). When the optical signal reaches the nonlinear rods, their refractive indices and then the ring’s effective indices change. The resonant wavelength of the ring depends on the effective index, so the coupling of the incoming signal to W5 to waveguides W6, W7, W8, and W9 is affected. Accordingly, the dropping efficiency of the signal through the rings depends on the incoming intensity. If each working state incomes a specified intensity into W5, the dropping of signal toward the desired output is possible. To achieve the different intensities for working states, incoming intensity for A, B, and BIAS is assumed to be I0, 2I0, and I0, respectively, where I0 is equal to 5 mW/µm2.

Fig. 2
figure 2

The proposed platform for a PC-based 2-to-4 decoder including four resonators. A and B are the input signals, the BIAS signal is the ON mode, and O0 to O3 are the output signals

3 Results and discussion

The electric and magnetic fields have been calculated using the finite difference time domain method. To ensure accurate results, the size of the unit cells in both the x and z directions (Δx and Δz) should be significantly smaller than λ/10, and the time step (Δt) should satisfy the following equation (Sullivan 2000).

$$\:\varDelta\:t\ll\:\frac{c}{\sqrt{\frac{1}{{\varDelta\:x}^{2}}+\frac{1}{{\varDelta\:z}^{2}}}}$$
(3)

According to Yee’s cell, the electric and magnetic components are calculated Δx/2 and Δz/2 apart from each other in the x and z directions (Sullivan 2000). In this study, Δx = Δz = 1 nm and Δt = 0.5 as are assumed for simulation.

To evaluate the proposed structure, different states of the structure are presented in Fig. 3. For all working states, a BIAS signal with a wavelength of 1550 nm is applied to the device. The decoder works at four states [A, B]=[0,0], [0,1], [1,0], and [1,1] which are discussed in the following. In state [0,0], only the BIAS becomes ON while other inputs are in the OFF mode. Consequently, an intensity of I0 is passed through waveguides W1 and W5 and is dropped to W6 through R1. In this way, the optical signal reaches port O0 while other ports are in the OFF mode (as shown in Fig. 3a). When [A, B] is equal to [0,1], incoming signals from B and BIAS are propagated in W1, W2, and W4, and optical waves with the intensity of 3I0 are entered into W5. Ring R2 couples the waves to W7 and activates O1 (as illustrated in Fig. 3b). For [A, B]=[1,0], incoming waves pass through W1, W3, and W4, and an amount of 2I0 reaches W5. The waves are coupled to W8 due to ring R3 and output O2 becomes ON (see Fig. 3c). Finally, an intensity of 4I0 is entered in W5 if A and B are equal to 1. In this state, an intensity of I0 is guided with W1, and 3I0 is transmitted with W2, W3, and W4. Ring R4 drops the waves to W9 corresponding 4I0 into W5.

Fig. 3
figure 3

Distribution of electric field in xz-plane for working states (a) [0,0], (b) [0,1], (c) [1,0], (d) [1,1]

Table 1 gives more details of the mentioned states. It can be observed that each input is in logic 0 or logic1 so for inputs A and B, four possible states are possible. Due to applying I0 to A and BIAS, and applying 2I0 to B, incoming intensity in W5 changes for each state. According to the table, the intensity of I0, 3I0, 2I0, and 4I0 in W5 corresponds to [0,0], [0,1], [1,0], and [1,1]. For each state, one of the rings couples the waves to the defined port.

Table 1 All possible states of the proposed decoder

Figure 4 shows the coupling efficiency of the rings in terms of the incoming intensity in W5. The maximum coupling of R1 occurs at I0 which is related to state [0,0]. The maximum coupling efficiency of states [0,1], [1,0], and [1,1] is obtained for the intensity of 3I0, 2I0, and 4I0, respectively. The dependence of the dropping operation on optical intensity can be inferred by utilizing different radii of nonlinear rods in the rings. According to Bragg’s theory, the reflected waves from the periodic bilayers are in phase if the equation nada+nbdb = λ/2 is satisfied (Luther 2022). In this regard, n and d represent the refractive index and thickness of two periodic layers, and indices a and b refer to the layers. In this study, the rods and air gaps are considered as two periodic layers. By using nonlinear materials with different radii in the resonant rings, it becomes possible to drop different optical intensities through them. The power is applied to the input port where is the distance between to near rods. Since the waveguide is created by removing one row of rods the mentioned distance equals L = 2a-2r where a and r are the lattice constant and the radius of the rod, respectively. Accordingly, the power intensity is calculated as the input power divided by L2.

Fig. 4
figure 4

Coupling efficiency of the ring versus the optical intensity in W5. The value of I0 is equal to 5 mW/µm2

Although the decoding operation is correctly done concerning the obtained results in Fig. 3, the time analysis of the structure is necessary. To assess the designed device, a gaussian optical pulse with a duration of 3 ps is used to incoming signal for working states. Figure 5 depicts the response time of the decoder to the step excitation. The normalized power value is determined by the output power divided by the input power at one port. Therefore, the normalization value can exceed unit value for some states such as [1,1].

Fig. 5
figure 5

The structure’s response of the designed decoder corresponding the pulse excitation with a duration of 3 ps for states (a) [0,0], (b) [0,1], (c) [1,0], (d) [1,1]

The simulation results shown in Fig. 5 are further elaborated in Table 2. This table provides details such as the rise and fall times, and the normalized power at output ports. To calculate the normalized power at output ports, the amount of output power is divided by the incoming power at port A. So, the normalized output power for Fig. 5b and c, and 5d exceeds 1. For example, for Fig. 5c, Optical signals are applied to ports A and Bias and reach port O2 as shown in Fig. 3c. As a result, the normalized power at O2 (for Fig. 5c) is more than 1. In this research, the rise time refers to the period it takes for the output signal to reach 90% of its ultimate value, while the fall time represents the time taken to reduce the normalized power to 10% of its initial value. Table 2 demonstrates the normalized power level for O0, O1, O2, and O3 equal 0.94, 1.642, 1.51, and 2.28 corresponding to [0,0], [0,1], [1,0], and [1,1], respectively. The ability of the decoder to distinguish logic 0 and logic 1 is a crucial issue for digital applications. It can be summarized by the contrast ratio (CR) which is the ratio of margin 1 (M1) to margin 0 (M0) in dB scale (Parandin 2019). Margin 1 is defined as the minimum power at logic 1 so it is equal to 0.94 for [0,0]. Margin 0 is determined as the maximum amount of power at logic 0. From Table 2, margin 0 is assigned to [0,0] and its value equals 0.04. Accordingly, the contrast ratio is calculated by 10×log(0.94/0.04) so CR = 13.71 dB. The difference between the margins is as high as 0.9 which is an excellent value. The proposed structure works for an input power from 3.2 mW to 12.8 mW with high performance including about 13.71 dB. According to the findings, the margins for logics 0 and 1 are 4% and 94%, respectively. So, the value of margin 1 changes varies from 3 mW to 12.03 mW, and margin 0 changes from 128 µW to 512 µW corresponding to input power variation 3.2 mW to 12.8 mW.

Table 2 Results obtained from the simulation of the proposed device

Concerning Table 2, the structure’s rise time for [0,0], [0,1], [1,0], and [1,1] is 165 fs, 183 fs, 194 fs, and 190 fs, respectively. Also, the fall time of 104 fs, 131 fs, 128 fs, and 124 fs are obtained for O0, O1, O2, and O3, respectively. The maximum value of the rise and fall times is assumed to be the time response of the decoder. Therefore, the time response of the designed device is equal to 194 fs. The obtained results of this work along with other works are given in Table 3 to highlight the advantages of this work. The contrast ratio, area, and time response are known as important factors for decoding operation.

Table 3 The calculated results along with results of similar works

One attractive feature of the designed structure is its high difference between margins, which is superior to other previous photonic crystal platforms. A contrast ratio of 13.71 dB is suitable to distinguish logic 1 from logic 0 and this is essential in digital circuits. According to Table 3, the designed structure provides more contrast ratio than all previous works. Furthermore, the area of the proposed device is smaller than that of similar ring-based structures (Daghooghi et al. 2018a, b, c; Naghizade et al. 2022; Askarian et al.2022). Comparing this design with cavity-based structures shows that using a ring increases the area. The higher coupling coefficient of the ring compared to the cavity results in a higher percentage of input power reaching the output ports, improving the contrast ratio. The size of 296 µm2 along with a contrast ratio of 13.71 dB and a response time of 194 fs indicates a well-designed decoder performance. Table 3 shows the structure’s time response is faster compared to other structures. Overall, fast response, small size, and high contrast ratio are attractive features of the designed 2-to-4 decoder.

Many articles have been reported on the fabrication of photonic crystal-based structures (Rechtsman 2023; Bommer et al. 2024; Li et al. 2023). They have used different methods to fabricate different devices such as colloidal self-assembly, electron beam lithography, and direct writing via multiphoton microlithography. Deviation of the rods concerning the vertical axis, the ruggedness of the rods, and the non-periodicity of the lattice are the main challenges of the fabrication process. According to the reports, fabrication of silicon rods with a radius of 40 nm and a spatial period of 380 nm is possible. The smallest radius of rods in the presented structure is equal to 82 nm and the lattice constant equals 485 nm.

4 Conclusion

In this study, a new structure for an all-optical 2-to-4 decoder has been designed using nonlinear ring resonators. Input signals along with a bias signal are guided to the main waveguide, and four resonators are positioned in its vicinity. For different states, different light intensities reach the main waveguide, and each resonator can drop the signal to another waveguide based on the light intensity. Since the nonlinear rods made of doped glass with different radii are placed in the resonators, one of them can be in the resonant mode at any given time. The structure’s contrast ratio reaches 13.71 dB, which is higher than all previous works, suitable for digital circuits. The device area is approximately 296 µm2, smaller than previous 2-to-4 decoders. A time response of 194 fs is another desirable result of the designed decoder. Given its compact size, quick response, and high contrast ratio, one can infer that the performance of the designed structure surpasses that of previous efforts.