1 Introduction

Optical communication is one of the advanced technologies which create a tremendous impact nowadays. The researcher gives more attention to design optical devices, especially using photonic crystals (PC). PCs are engineered a periodic dielectric or metallo-dielectric nanostructures which is having different dielectric constant materials. It has three types based on its direction of dielectric constant variation in axis, such as, one, two and three dimensional PCs (Joannopoulos et al. 2008). Among all, 2DPC is most widely used as it supports better confinement of light, easy to control the propagation and easy calculation of band gap and etc. (Yi and Youn 2016). Mainly the optical devices are designed by 2DPC, such as, encoders, decoders (Mehdizadeh et al. 2016), adders (Neisy et al. 2018), multiplexers and demultiplexer (Rajarajan Balaji et al. 2017), isolators (Wang et al. 2019), filters (Robinson and Nakkeeran 2013), power splitter (Arunkumar et al. 2019), directional coupler, circulator, logic gates (Rama Prabha and Robinson 2020; Taflove 2005), sensors (Kuang et al. 2007; Bahabady et al. 2017), analog to digital converters (Youssefi et al. 2012), comparator and so on.

In recent days, the PC based optical logical devices are essential components and highly suitable for all the logical functions due to the attractive features. Typically, optical encoder is the better device for optical computing that repeatedly devised with better performance parameters. The encoders generated output N-bit binary codes with 2 N inputs and optical encoders primarily designed by different methods for changing the operational state [i.e. “OFF” and “ON”], such as, varying the design parameters or structural parameters, modifying the materials and refractive index of PC, varying the lunching angle of input electromagnetic signal, different defect mechanisms, self-collimated effects (Zhang et al. 2007), interference based defects (D'souza and Mathew 2016), multimode interference effect (Tang et al. 2014), Mach Zehnder interferometer (Martínez et al. 2005) and nonlinear Kerr effects (Salmanpour et al.2015). The functional parameters, namely, bit rate, response time/delay time, switching speed, footprint, operating wavelength, and contrast ratio are estimated.

In the literature, the interference/multi-interference based encoder is operated with self-imaging principle where input profile is reproduced with multiple copies at regular intervals along the propagation direction. It requires a precise phase control for each logic, which is really hard to achieve though it offers low loss and wide optical bandwidth (Salmanpour et al. 2015). In self-collimation method, a phase shifter is required, as the output depends upon the phase of the input signals which in turn leads large foot print (Shaik and Rangaswamy 2018; Zhang et al. 2007). The waveguide and ring resonator based encoders are reported with T shape, L shape and Y shape waveguide and square, quasi-square, hexagonal, elliptical and circular shape ring resonators (Seif-Dargahi 2018a; Latha et al. 2021; Mostafa et al. 2019; Rafah 2016; Rajasekar et al. 2020; Neghizade and Khoshsima 2018).

From the literature analysis, the encoders are reported with the above mentioned techniques using linear and nonlinear materials. The high input power required for non-linear materials. Though it has high contrast ratio it has some drawback such as the temperature of the device will increase and it is difficult to integrate the silicon optical devices. The linear materials offer less input power, high switching speed and also it provides better performance parameters. Hence, the proposed 4*2 encoder designed using linear materials which offers better contrast ratio, bit rate and delay time. The output spectrum and band gap are examined by plane wave expansion (PWE) and finite difference time domain (FDTD), respectively. The rest of the paper is organized as follows: Sect. 2 describes the structural design of proposed 4 × 2 encoder without nano coupling rods are presented, Sect. 3 describes the structural design of proposed 4 × 2 encoder with nano coupling rods and Sect. 4 concluded the proposed work.

2 Structural design of proposed 4 x 2 encoder without nano coupling rods

The basic functionality of the encoder is to produce N-codes output concerning the 2 N input ports which is shown in Fig. 1. The truth table of 4 × 2 encoder is shown in Table 1, it has four binary code inputs (A0, A1, A2, A3) and two binary code outputs (B0, B1).

Fig. 1
figure 1

Block diagram of the encoder

Table 1 Logic function of 4 × 2 encoder

The proposed encoder is designed using 2DPC based triangular/hexagonal lattice. The proposed encoder structure consists of 21 × 29 circular cylindrical silicon (Si) rods immersed in air. The structural parameters, namely, refractive index of the material 3.46, rods radius of 100 nm and the lattice constant of a = 540nm are used.

Figure 2 shows the band diagram of the periodic 2DPC structure. It has TM PBG and TE PBG. From that regions, an immense TE polarization is the suitable polarization for the light propagation, as far as the normalized frequency range from 0.325 a\λ to 0.44 a\λ, whose the corresponding wavelength of the region limited from 1227 nm to 1661 nm. All the simulation is done in the range of the wavelength and the range highly appropriate for the third telecommunication window. The wavelength for this simulation is 1550nm.

Fig. 2
figure 2

The 4 × 2 encoder band diagram

2.1 Structural design of proposed 4 × 2 encoder without nano coupling rods

The 4 × 2 encoder is devised by from silicon rods that are arranged in a triangular lattice structure. It is composed of four input parts of two output port without nano coupling rods. is shown in the inset in Fig. 3.

Fig. 3
figure 3

The 4 × 2 encoder schematic layout without nano coupling rods

2.2 Simulation results and discussion of proposed 4 × 2 encoder without nano coupling rods

Case I When the input A0 is ON (A0 = 1), the input signal is not coupled inside the waveguide and the initial power reflected back to the input port hence there is no power reached at the output port B0 and B1. At B0, the output power Po is ‘0’, and at B1, it is ‘0.6 × 10–4’. As a result, the normalized transmission power is 0%. The distribution of the electromagnetic fields is shown in the inset in Fig. 4a.

Fig. 4
figure 4

Output response of proposed 4 × 2 encoder design without nano coupling rods a A0 = 1, A1 = 0, A2 = 0, A3 = 0 and B0 = 0, B1 = 0, b A0 = 0, A1 = 1, A2 = 0, A3 = 0 and B0 = 1, B1 = 0, c A0 = 0, A1 = 0, A2 = 1, A3 = 0 and B0 = 0, B1 = 1 and d A0 = 0, A1 = 0, A2 = 0, A3 = 1 and B0 = 1, B1 = 1

Case II When A1 is ON, then the remaining input ports are OFF condition. The normalized power level at output port B0 is approximately 0.014 and in the other output port B1, the power level is 0, As a result, the normalized transmission power is 0%. Figure 4b shows the field distribution as an inset.

Case III When A2 is ON, the remaining ports are ‘Logic 0’, the signal launched into the waveguide due to the absence of coupling rods inside the defect structure the exact power not resonated and the efficiency is very minimal. At B0, the power level is 0.0002, whereas at B1, the power level is 0. In Fig. 4c, the inset shows the distribution when the input value is 0010, Therefore, the normalized transmission power is zero.

Case IV Finally, when A3 is ON, the input signal not coupled inside the structure. As shown in Fig. 4d, B0 has normalized power level of 0.0075, and B1 has normalized power level of 0, resulting in the normalized transmission power being almost 0%.

From the above simulation, it is noticed that the output power for different logic is very low, which is not suitable for any applications. Since there is no coupling rods positioned between the waveguides, the input power is scattered which in turn the output power is reduced significantly.

3 Structural design of proposed 4 × 2 encoder with nano coupling rods

The design parameter for 4 × 2 encoder is listed in Table 2. The encoder is designed using four inputs A0, A1, A2, A3 as linear waveguide and two Y shaped output waveguides (B0, B1). The A0 waveguide is formed by removing the crystal rods in the plane direction inside the structure and connected to binary code input A0. When the binary code input A0 is high, both output need to zero, for the purpose the waveguide is created with a minimum short dimension and it is not connected to the output port. Similarly, the waveguide A1, A2, A3 created by the parallel of A0 and those waveguides performed as input ports A1, A2, A3. The Y-shaped waveguides have made in between the A1, A2 and A3 input waveguide. The nano coupling rods N1, N2, N3, and N4 are positioned between the input waveguides (A1, A2, A3) and the output waveguide (B0, B1). The coupling rods are formed by reducing the radius of the silicon rods in 50nm, in order to split the input power equally in all different states. It is primarily used to increase the coupling between the input and output signal transmission, which is used to reduce the reflection losses and improve an encoder's output power (Fig. 5).

Fig. 5
figure 5

The 4 × 2 encoder schematic layout

Table 2 Design parameters of 4 × 2 encoder

3.1 Simulation results and discussion of proposed 4 × 2 encoder with nano coupling rods

The input signal with the power of 1mW is applied into the input port and the output power is measured using the equation (Taflove 2005; Kuang et al. 2007),

$$T\left( f \right) = \frac{{1/2\int {real(p\left( f \right)^{monitor} )dS} }}{Source\,Power}$$
(1)

where, T(f) represents the normalized transmission, p(f) represents the pointing vector and dS represents the surface normal.

When the input power applied as 1mW and 0.7mW (70%) of power is obtained at the output port. The high transmission efficiencies is achieved by selection of input power as 1mW, however, contrast ratio and data rate is achieved.. In addition, the designed structure consumes very small power consumption and required very low power to operate, which made it suitable for low-power circuits.

The Perfect Matched Layer (PML) is incorporated to minimize to reflection which is an artificial boundary layer to support the simulation in open boundary condition. It strongly absorbs all the incident waves in all directions, without any reflection inside the PC lattice (Taflove 2005; Kuang et al. 2007).

$$\Delta t\le \frac{1}{c\sqrt{\frac{1}{{\Delta }_{X}}+\frac{1}{{\Delta }_{Z}}}}$$
(2)

where \(\Delta t\) denotes the step time, C denotes the speed of light in free space, respectively.

The Gaussian optical signal is applied to the four input ports, namely A0, A1, A2, and A3. The 1mW of input power is applied at 1550 nm for simulation. The proposed encoder structure is simulated using the 2D FDTD method and the performance parameters are examined. In the proposed structure, the nano coupling rods (N1, N2, N3, N4) are working as a digital switch between input and output waveguides which in turn enhancing the coupling between the input and output ports. In this simulation, the input power is considered Pi, the output power is Po, and normalized power is treated as Pn = Po/Pi. In this case, the normalized power level at the output port is resulted the logical level, such as, ‘ON’ or ‘OFF’ state. If Po is underneath 0.25mW, it is treated as logic '0' and the Po is directly above the level of 0.25 mW that is assumed as logic '1'.

State 1 For a given logic input of 1000, A0 = 1 i.e. is ‘ON’ and A1, A2, A3 are ‘OFF’, the Gaussian input signal is not entered inside the waveguide. In this case, the input signal is entered into A0 input port and signal is blocked due to the arrangement waveguide A0. Hence, there is no power is directed to the output port B0 and B1 (00) as shown in Fig. 6a. The output power Po is 0.0062 at B0 and 0.0001 at B1, hence, the normalized transmission power is 0%. The electromagnetic field distribution is displayed as inset in Fig. 6a.

Fig. 6
figure 6

Output response of proposed 4 × 2 encoder design with nano coupling rods a A0 = 1, A1 = 0, A2 = 0, A3 = 0 and B0 = 0, B1 = 0, b A0 = 0, A1 = 1, A2 = 0, A3 = 0 and B0 = 1, B1 = 0, c A0 = 0, A1 = 0, A2 = 1, A3 = 0 and B0 = 0, B1 = 1 and d A0 = 0, A1 = 0, A2 = 0, A3 = 1 and B0 = 1, B1 = 1

State 2 For the logic input of 0100, A1 input is ‘ON’, and A0, A2, A3 inputs are ‘OFF’ state. Then input signal is passed into the A1 input port and the signal is coupled through the N1 Nano coupling rods. Hence the output port B0 is ‘ON’ and B1 is ‘OFF’ state as shown in Fig. 6b. The normalized power level at output port B0 is around 99.8% and 0.0052% power level obtained in another output port B1 and the field distribution is displayed as inset in Fig. 6b.

State 3 The logic input 0010 is given, the input port A2 = 1 is ‘ON’ state and the other inputs are retained in ‘OFF’ condition. The input power applied to port A2 and then the input signal is coupled through the N4 coupling rods in the B1 output port and the encoder generates the output 01 as depicted in Fig. 6c. The power level at B0 is 0.0052% and 99.8% of power level is obtained in output port B1. The inset in Fig. 6c shows the field distribution when the input is 0010.

State 4 For logic input 0001, A3 is ‘ON’ and A0, A1, A2 inputs are in ‘OFF’ condition. Then input signal is applied to port A3 and then the light propagates in both Y shaped waveguides and the input signal is coupled through the N2 and N3 coupling rods which generate high output power in both output ports B0 and B1 as depicted in Fig. 6d inset. In this case, the encoder generates the output 11 as shown in Fig. 6d. As displayed in Fig. 6d, the normalized power level at B0 is 0.5311Pi and B1 is 0.5311 Pi and the normalized transmission power is 53.11%.

The contrast ratio is one of the most important parameters and it is calculated, the logarithmic ratio between logic levels "1" and "0".

$$\mathrm{CR}=10\mathrm{log}*\left[\frac{{\mathrm{P}}_{\mathrm{ON}}}{{\mathrm{P}}_{\mathrm{OFF}}}\right]$$
(3)

PON is the minimum optical power for logic "1", and POFFis the maximum optical power for logic "0".

For different logic combination, the simulation of signal propagation is providing analytical graph with power versus time. And this process is used to find the functional parameters, such as, normalized output power, contrast ratio, response time and bit rate. The P1 and P0 indicate the normalized power of logic ‘1’ and logic ‘0’, respectively.

The response time and data rate of a logic gate is another parameter that affects its operating speed. The response time and data rate are primarily calculated from the time-evolving curve as in Fig. 6a–d. The response time is expressed as the time taken for the output signal to reach a quarter of the power range in the time response of the normalized curve. If the response time is shorter, data can be transmitted more quickly. A response time can be determined by comparing the time of two input and output signals after the logic gate outputs

$${t}_{d}=\frac{{t}_{r}+{t}_{f}}{2}$$
(4)

where tr and tf are the rise time and the fall time, respectively. Generally, the rise time is always greater than the fall time. Response time can be calculated based on propagation delay time (tp) as follows:

$${t}_{r}={t}_{p}+{t}_{d}$$
(5)

Data rate is a very important parameter in all optical logic devices. This can be calculated as the response time inversely proportional to the transmission delay.

$${\mathrm{B}}_{\mathrm{t}}=\frac{1}{\mathrm{Response\, time}}$$
(6)

When the input is either 1000 or 0001, the output for ‘ON’ & ‘OFF’ state is remaining same, hence, the contrast ratio is estimated for the input 0100 and 0010. For different logic level outputs are achieved from the input level of 0100 and 0010 and the output power level of 0.9980 and 0.0052 are examined and the contrast ratio is 22.83 dB, respectively. The logic output 01 and 10, the response time and data rate are 0.228 ps and 4.38Tbps, respectively. Another logic output 11, the response time and data rate are 0.235 ps and 4.25Tbps, respectively. From Table 3, the minimum contrast ratio, maximum delay time and the minimum data rate of the proposed optical encoder is 22.83 dB, 0.235 ps and 4.25Tbps, respectively, which are listed in Table 3.

Table 3 Logic input, output power, response time bit rate and contrast ratio of proposed 4 × 2 encoder

The primary parameters of the encoder, such as, type of lattice, type of defects, contrast ratio, response time, bit rate and foot print of the proposed encoders is compared with the reported encoders which are listed in Table 4. The encoders are devised using cubic or hexagonal lattice. The ring resonator and point and line defect mechanism are predominantly incorporated. The contrast ratio, bit rate and size of the proposed encoder is 22.83 dB, 4.34Tbps and 178.1 µm2 which is better than the reported one. In Ref. 30, the response time is 0.2 ps, however, the contrast ratio is lower and the size is larger. Typically, in the reported encoders, if the contrast ratio is increased, the response time is decreased. On the other hand, if the response time is improved, it confines the contrast ratio. In addition, if the contrast ratio, bit rate and response time are superior, the size of the encoder is larger. However, the proposed encoder provides significant improvement in all the parameters with the compact size than the reported encoders. Hence, the proposed encoders are used for high speed computing photonic integrated circuits.

Table 4 Functional parameters comparison of proposed encoders with reported encoders

4 Conclusion

In this attempt, the 2DPC based 4 × 2 encoder is devised by arrangement of silicon rods with background air substrate in a hexagonal lattice. In order to reduce the power loss and to avoid the obstacles during the signal propagation the line and point defects are introduced in this proposed design. It operates at a wavelength of 1550 nm. The normalized output efficiency obtained as 100%. The performance of the device is simulated using FDTD method. The proposed encoder performance parameters are examined such as: contrast ratio of 22.83 dB, response time of 0.235 ps, bit rate of 4.34 Tbps and the size of 178.1µm2. Hence, the proposed design is suitable for photonic integrated circuits and optical networks.