1 Introduction

Photonic crystals (PhC) have received much attention in the recent decade because of their wide applications in the field of fundamental research and technology of optical systems and devices [1], such as dispersion properties of a photonic quasi-crystal fiber with double cladding air holes [2], design of an ultrashort single-polarization wavelength splitter based on gold-filled square-lattice photonic crystal fiber [3], bio-sensing [4], display systems [5], etc. The photonic bandgap (PBG) resulted from periodic refractive index in one, two, or three dimensions has been used for controlling the optical beam propagation in PhC waveguides [6]. With the improvements in the fabrication technology of nanostructures, these crystals have showed revolution in the field of telecommunications [7] and optical technologies [8] and it is expected to be dominant technology in near future for processing and transferring of data and communication by providing the necessary components of all-optical systems [9]. In recent years, several optical devices and components have been presented based on photonic crystals to be used in optical communications and processing systems. Different structures of optical filters [10], de-multiplexers [11], switches [12], power splitters [13], and logic gates [14] have been designed and presented.

In order to overcome the speed limitations of opto-electronic systems, all-optical switching and processing is proposed to eliminate the electronic part of system and enhance the bandwidth [15]. As a main section of a processing system, an all-optical decoder is a key component which can be used in decryption of received data in code-division-multiple-access (CDMA). Several structures for optical decoder have been proposed in recent years. An all-fiber technique with oppositely chirped and suitably coded fiber gratings was presented to be used in CDMA communications [16]. The difficulty of integration is the main challenge for this type of decoding. In another work, cascaded micro-ring resonators are used by electro-optic controlling of light coupling into the rings [17]. Since the coded inputs of such structure are electrical signals, it suffers from speed limitations of electronic components. SOA-based Mach–Zehnder interferometer was also used as data comparator and all-optical decoder with compact size [18]. However, it is expected that by using photonic crystal based structures, more integration can be achieved. Serajmohammadi et al. [19] were firstly presented a 1*2 all optical decoder switch based on photonic crystals. Their structure used a ring resonator for switching the input to the outputs. They were also extended their structure to a 2*4 structure [20]. In a similar study, Moniem proposed 1*2 and 2*4 structures by using photonic crystals and studied the steady state and time-dependent operation [21]. Most of the studies have relatively complicated structures and suffer from the lack of investigation about power distribution in outputs.

In this work, we propose a novel structure for a 2*4 all-optical decoder based on photonic crystal and 1*2 decoders and study its operation performance. The paper is organized as follows. In Sect. 2 firstly a ring resonator is designed and applied to realize a 1*2 decoder. Then, by using this structure, a 2*4 decoder is designed and simulated. The paper is concluded in Sect. 3.

Fig. 1
figure 1

The band structure of the fundamental structure

Fig. 2
figure 2

PhCRR designed the whole diagram output

2 Design procedure and results

The basics of our proposed structure is on the combination of 1*2 decoders to achieve a 2*4 decoder. Hence, for the first step, we design a 1*2 decoder and study its performance.

Fig. 3
figure 3

PhCRR switching behavior for different input intensities of a \(0.3\,\hbox {kW}/\upmu \hbox {m}^{2}\) and b \(1\,\hbox {kW}/\upmu \hbox {m}^{2}\)

Fig. 4
figure 4

a Schematic of proposed 1*2 decoder, and optical field distribution for b \(I=0\) and c \(I=1\)

Fig. 5
figure 5

Schematic structure of the proposed all-optical decoder 2–4

Fig. 6
figure 6

Suggested decoder output to input different states. a \({\hbox {A}}={\hbox {B}}=0\), b \({\hbox {A}}=0, {\hbox {B}}=1\), c \({\hbox {A}}=1, {\hbox {B}}=0\), d \({\hbox {A}}={\hbox {B}}=1\)

2.1 Design of PhC-based ring resonator

The fundamental structure of proposed PhC is a \(31 \times 31\) square array of dielectric rods with refractive index of 3.1 in exposure to air is considered with the radius and the lattice constant of the \(r=0.2a\) and \(a=0.644\), respectively. Such a design ensures the operation wavelength around \(1.55\,\upmu \hbox {m}\). To analyze and simulate the proposed structures and surveying their optical behavior, we used plane wave expansion (PWE) method for calculation of band structure and finite difference time domain (FDTD) method to obtain the transmission and propagation of optical field within the structure. Figure 1 shows calculated band structure of the fundamental structure. According to the figure, two distinct PBGs are seen; a TE mode band in normalized frequency range of \(0.32<\hbox {a}/\lambda <0.44\) corresponding to wavelength range \(1464\hbox {nm}<\lambda <2012\hbox {nm}\) and TM mode band in frequency range \(0.95<\hbox {a}/\lambda <0.96\) which corresponds to \(671\hbox {nm}<\lambda <678\hbox {nm}\) wavelengths. Since the bandgap of TE mode, covers optical telecommunication wavelength ranges, our simulations are performed in this mode and for the 1550 nm center wavelength. In order to design the proposed structure, first a photonic crystal ring resonator (PhCRR) is created in the fundamental structure by removing the rods. Figure 2 shows the output spectra of the designed PhCRR for the ports indicated in the inset of figure. It can be seen that for an incoming light with 1550 nm wavelength (resonance wavelength) the optical field is dropped into the ring and by coupling to the drop waveguide, flows to the port C. However, the resonance wavelength is strongly dependent on the ring structure and parameters and changes as a function of input power intensity because of nonlinear Kerr effect. In the other words, the higher intensity of light results in changes in the effective refractive index of ring and hence the resonance wavelength is shifted and consequently no drop occurs for high power lights with 1550 nm wavelength. Details are shown in Fig. 3 where the distribution of optical fields with different intensities are calculated. From the figure by increasing the light intensity from 0.3 to \(1\,\hbox {kW}/\upmu \hbox {m}^{2}\), the incoming light beam does not couple into ring and moves straight to port B.

2.2 1*2 Decoder

Since a decoder is an input-controlled switch, it can be realized by using a PhCRR whose optical field intensity is enhanced by the input of decoder. So by using this idea, we propose and design an all-optical 1*2 decoder which its schematic is illustrated in Fig. 4. The figure shows that a continuously pumped input is served as the bias of device. The bias helps to have an on-state when there is not any other input for the proposed passive device. The coded input enters to the “I” port and couples to PhCRR to enhance the optical field intensity in ring and prevent the coupling of ‘Bias’ to the ring. For the case that the input is in off-state, the optical field of bias couples into the ring resonator and travels toward port O1. By triggering the input to the high level, it couples into the ring too and hence the intensity of optical field within ring is considerably increased. Based on the Kerr nonlinear effect, this leads to change in the effective refractive index of ring and therefore the coupling wavelength of ring shifts and the bias beam moves toward port O2 without coupling to ring.

The calculated optical field distribution in both cases is shown in Fig. 4b, c. The figure reveals decoding operation of proposed structure. Based on the results obtained for the 1*2 decoder, we try extending the input bits by combination of these structures.

2.3 2*4 Decoder

Figure 5 illustrates the proposed 2*4 decoder’s schematic consisting of three 1*2 decoders which combined to generate an active-high output in O1–O4 ports for the input A and B inputs.

To show the function of proposed structure, we calculate the optical field distribution in the structure for 4 possible arranges of A, B inputs. According to the results shown in Fig. 6, when the ‘A’ is low, the bias drops to W1 through PhCRR1and acts as the bias for PhCRR2. Now if the B is low, the incoming optical beam couples through PhCRR2 into W2 and enables O1. Else (\(B=1\)) the O2 is set to high. It means that:

O1 = \(\hbox {A}^\prime \cdot \hbox {B}^\prime \)

O2 = \(\hbox {A}^\prime \cdot \hbox {B}\)

When the ‘A’ is switched to ‘1’, the bias is directed to PhCRR3 to serve as the bias for this 1*2 decoder. The outputs O3 and O4 are set to high depending to \(B=0\) (O3 = 1) or \(B=1\) (O4 = 1). The Boolean description of this operation is expressed as:

Table 1 The output intensity obtained from the structure of the proposed decoder

O3 = \(\hbox {A}\cdot \hbox {B}^\prime \)

O4 = A\(\cdot \) B

From the figure, the corresponding outputs for each state are considerably increased and the resolution of decoder is high enough. For better evaluating the performance of the proposed structure, we studied the output power intensities for each state and the results are listed in Table 1. According to the results, for (0,0) state of inputs, the O1 shows 72% of outputs and the on/off ratio is more than 12. By definition of cross-talk as 10log(\(\hbox {P}_{\mathrm{low}}/\hbox {P}_{\mathrm{high}})\) [22], for each output port, the maximum cross-talk of port O1 is achieved about −10.7 dB. If we define the insertion loss as 10log((\(\hbox {P}_{\mathrm{in}}-\hbox {P}_{\mathrm{out}})/\hbox {P}_{\mathrm{in}})\) [23], the insertion loss is about −5.5 is obtained for O1.

Table 2 The switching states of the decoder for different combinations of logic input ports

For (0,1) state, O2 is 87% and on/off ratio reaches 12 and the maximum cross-talk and insertion loss are calculated as −10.9 and −8.8 dB, respectively. For (1,0) and (1,1) states the outputs O3 and O4 exhibit 71 and 40% with on/off ratio of 6 and 2.22, respectively. The insertion loss and maximum cross-talk for these states is higher because the on/off ratio is considerably decreased. Since the previously reported works did not reported the percentage of output power and the on/off ratio, we cannot present a fair comparison to their works, but our design shows lower insertion loss compared to the results of Ref. [22] but the cross-talk is higher. Moreover, our results totally show considerable performance which can be achieved for a logic decoder. Table 2 shows the true table of the proposed decoder with values of insertion loss and maximum cross-talk. In our calculations, the nonlinear Kerr’s coefficient is considered to be \(9\times 10^{-17}\,\hbox {m}^{2}/\hbox {W}\) and the input power intensity is \(1\,\hbox {kW}/\upmu \hbox {m}^{2}\).

3 Conclusion

An all-optical 2*4 decoder was presented based on photonic crystal structures and its performance characteristics was studied by numerical simulations. We selected 2D photonic crystal structure to be used in optical integrated circuit because of having a complete band gap. To do so, we designed a ring resonator and by using some additional inputs to its basic structure, a 1*2 decoder is realized which can switch the outputs by nonlinear Kerr effect. Results confirmed the switching operation of device with high on/off ratio in its outputs. We calculated the insertion loss between −2.2 dB \(\sim \) −8.8 dB and cross-talk of outputs about −10.94 dB \(\sim \) −3.4 dB. According to the results and compared to previous works, the proposed decoder is expected to be a high-performance switch which can be used in all-optical networks. By using this structure, some other important features required for an all-optical system component can be achieved such as high switching speed and efficiency.