Next Article in Journal
Portfolio Optimization with Multi-Trend Objective and Accelerated Quasi-Newton Method
Previous Article in Journal
High Resilient Asymmetry and Anomaly Detection Based on Data Causality
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Design of a Photonic Crystal Exclusive-OR Gate Using Recurrent Neural Networks

1
Department of Electrical Engineering, Kermanshah Branch, Islamic Azad University, Kermanshah 6718997551, Iran
2
Department of Communication and Computer Engineering, Cihan University-Erbil, Erbil 44001, Iraq
3
Department of Software Engineering, Faculty of Engineering, Koya University, Koya KOY45, Iraq
4
Department of Electrical and Computer Engineering, College of Engineering and Information Technology, Ajman University, Ajman 346, United Arab Emirates
5
Department of Electrical Engineering, College of Engineering, Prince Sattam bin Abdulaziz University, Al-Kharj 11492, Saudi Arabia
*
Author to whom correspondence should be addressed.
Symmetry 2024, 16(7), 820; https://doi.org/10.3390/sym16070820
Submission received: 18 May 2024 / Revised: 23 June 2024 / Accepted: 27 June 2024 / Published: 30 June 2024
(This article belongs to the Section Computer)

Abstract

:
In this paper, a novel approach to design a photonic crystal exclusive-OR (XOR) gate with high performance using recurrent neural network (RNN) is proposed, integrating the principles of symmetry and asymmetry inherent in photonic structures. The proposed model realizes the nonlinearities and dispersion properties in photonic systems, optimizing the waveguide paths and interference patterns to improve the performance of the logic gate. Simulation results demonstrate that the presented RNN design not only achieves high fidelity in the logical operation but also significantly enhances the functionality of the all-optical gate. This integration of machine learning with photonic crystal technology opens a new era for developing compact, energy-efficient photonic circuits for high-speed optical computing. Finally, the performance of the designed all-optical gate is compared with other related methods, which shows that the proposed gate outperforms other works. The results show that the obtained output power of the proposed all-optical XOR gate is 0, 0.813, 0.82, and 1 × 10−7 in the logical states.

1. Introduction

According to Moore’s law, every few years the number of transistors inside processors doubles in the same volume, but today we have reached a point where this is no longer possible due to many reasons, such as the interaction of electrons and the complexity of manufacturing [1]. However, day by day the need for higher processing speed and more and faster data transfer is increasing, taking into account that today data transfer is mostly conducted by photons rather than electrons because they have higher efficiency and wider bandwidth, and also because processing by electronic systems reduces the speed so much and this problem can be solved by optical processing [2]. According to this, the need for optical processing is unavoidable, which justifies the necessity of using optical gates, but unlike electrons, the movement of light cannot be controlled in very small structures; due to the diffraction limit, light cannot be controlled in dimensions. It is less than the focused wavelength, so the optical parts have a larger size than the corresponding electronic parts, and photonic crystals can be used to solve this problem [3]. Although older photonic systems, especially those relying on bulk optics, were larger than electronic systems, with the development of integrated photonic circuits and photonic crystals, the size gap between photonic and electronic systems has significantly narrowed. The small wavelength at photonic operational frequency can lead to very small devices in optics applications versus microwave applications. Simply, photonic crystals can be considered repeating structures in one, two, or three dimensions, made of materials such as insulators and semiconductors. The structures with air voids in the dielectric substrate pass a certain range of wavelengths according to the refractive index of the materials used and the type of placement, and act like a filter [4]. Photonic crystals have become increasingly popular for creating all-optical processors and communication systems. The symmetrical and asymmetrical arrangements in photonic crystals are fundamental to their ability to control light propagation and enable high-performance optical computing. The presented work in [5] explores numerous design approaches that have led to diverse structures capable of performing logical operations. Techniques such as self-collimated beams [6], multi-mode interference [7], interference-based defect methods [8], and logic gates employing nonlinear Kerr effect [9] and ring resonators [10,11] are common methods to design all-optical gates.
Artificial Neural Networks (ANNs) are computational models inspired by the human brain’s neural networks. ANNs are used for a variety of tasks in which pattern recognition, prediction, and optimization are crucial. Neural network and machine learning methods can find the patterns and nonlinearity behind the structures in various problems. In the field of photonics, specifically in the design of photonic crystal structures, ANNs can play a pivotal role by optimizing the complex geometrical and material parameters required to achieve specific optical properties. The application of ANNs in the design of photonic crystal gates is particularly significant. Photonic crystals are used to control the flow of light in optical devices, acting similarly to how electronic gates control electron flow in semiconductor devices. Designing these structures requires precise control over their photonic bandgaps, which determine the wavelengths of light that they can block or transmit. Traditionally, designing these structures involves extensive simulations and iterative adjustments, which can be computationally expensive and time-consuming. However, by using ANNs, the process can be significantly accelerated.
In [12], a two-dimensional photonic crystal-based XOR gate is designed. The presented approach in [12] aimed to optimize the output such that it maximized optical power for the specific logical states. To achieve this, simulations were conducted on four defect rods, varying the rod radii, to analyze their effects on the output. Furthermore, the K-Nearest Neighbors algorithm, a method derived from machine learning, was employed to fine-tune the configurations, ensuring optimal output for both logical states. However, the optical power can be still improved [12]. The performance of a three-input all-optical XOR gate modeled with ANNs is examined in [13], which elaborates on how trained ANNs serve as an effective and accurate rapid modeling technique for optical digital gates. ANNs are used to design photonic crystal fiber polarization filters in [14], which has used a feed forward network. In [15], a generative adversarial network (GAN) is utilized to train an ANN model for a surface plasmon resonance sensor based on photonic crystal fiber. A physics-guided neural network is introduced in [16] using coupled-mode theory for optical waveguides.
As mentioned, artificial intelligence methods have been recently used in the design of optical devices. However, none of the mentioned works has used artificial intelligence as a design method, which is proposed in this work. By using the proposed recurrent neural network (RNN) model, the circuit parameters can be predicted to enhance the all-optical gate performance. In this work, a recurrent neural network (RNN) model is used to enhance the performance of a photonic crystal XOR gate, utilizing the symmetry and asymmetry in the crystal design to optimize waveguide paths and interference patterns. The XOR gate is one of the fundamental building blocks in digital logic design and can be used in arithmetic circuits or used as a benchmark in the study of new computational technologies. The proposed approach allows for precise control over photonic bandgaps, improving the functionality and efficiency of the all-optical gate.

2. Suggested Structure for XOR Gate

A structure consisting of silicon rods in air is considered for the design of the optical XOR gate. The lattice constant in this structure is chosen equal to a = 600 nm. The radius of the rods is also considered to be r = 0.2a. The TM photonic bandgap structure of the proposed XOR optical gate with photonic crystals is shown in Figure 1. According to calculations, the bandgap structure is in the normalized range of 0.28 < a/λ < 0.42, which is a wide bandgap. The equivalent wavelength of this range is 1.42 < λ < 2.14 micrometers. The working wavelength of the presented gate is 1.55 micrometers, which is the telecommunication wavelength.
The initial structure of the all-optical XOR gate is shown in Figure 2. In this structure, Si rods with a refractive index of 3.46 were used in the air; this layout was created by completely removing a row of rods in the vertical direction and removing a number of rods in the horizontal direction, which created waveguides for inputs 1 and 2. As can be seen from Figure 2, a defect bar is created, whose dimensions can be obtained using the results and determined by the machine learning method, providing the most optimal value. Also, the phi parameter is assumed to be optimized using the proposed neural network model.

3. Design of the Crystal Photonic XOR Gate Using RNN

In this section, we employ a recurrent neural network (RNN) model to design and enhance the performance of the proposed crystal photonic XOR gate. At first, an initial structure of the XOR gate is designed, which is described in the previous section. Then, the important design parameters of the structure are considered as the neural network inputs. Therefore, the parameters of radius ‘r’ and phase ‘phi’ are considered as the input parameters of the ANN, where ‘r’ parameter is the radius of the defect rod and ‘phi’ is the phase of the input laser. Also, the output powers of the all-optical XOR gate in digital situations are considered as the network outputs. So, the output powers in logical situations of F1 (A = 0, B = 1), F2 (A = 1, B = 0), and F3 (A = 1, B = 1) are assumed as the output parameters of the model.
The structure of the proposed RNN model is depicted in Figure 3. Three hidden layers are considered with numbers of 20, 20, 15, and 3 neurons in hidden layers and the output layer. The activation functions used in the network layers are ‘tansig’ (hyperbolic tangent sigmoid transfer function), ‘logsig’ (logarithmic sigmoid transfer function), and ‘purelin’ (linear transfer function). This configuration of activation functions allows for a mix of nonlinear and linear transformations across the network, enabling it to capture complex relationships between the inputs and outputs. This neural network is presented to learn from and adapt to the intricate dynamics of the photonic system, by using the recurrent connections inherent in the applied RNN.
Figure 4 shows a plot of the Mean Squared Error (MSE) versus the number of training epochs for the presented RNN model. The plot indicates a trend of decreasing error, where the MSE starts at a higher value and gradually reduces as the number of epochs increases, eventually reaching a value of 0.00486 after 2000 epochs. The MSE measures the average of the squares of the errors, which is the average squared difference between the estimated values and the actual value. A decreasing MSE over epochs signifies that the network is effectively learning from the training data, refining its weights and biases to better predict the output powers of the XOR gate under various digital conditions. The applied MSE for the presented model is written in Equation (1).
MSE = 1 n k = 1 n ( P k P ^ k ) 2
where in Equation (1), the P and P ^ parameters show the real and predicted values of laser output power and the n parameter represents the number of used data points.
The performances of the presented RNN model are depicted in Figure 5. As seen, the predicted values of the F1, F2, and F3 outputs are predicted accurately. From the 92 obtained samples, 77 samples are used for training the model and 12 samples are used for testing the model. Also, three samples are selected for verification of the presented model, which is also shown in Figure 5. The obtained results shown in Figure 5a indicate the accuracy of the RNN model in learning from the training data. The real output powers (actual values) and the predicted output powers (values estimated by the RNN model) are plotted against the number of samples. The close alignment between the real and predicted values demonstrates the model’s effectiveness in capturing the relationship between input parameters and output powers during training. The results shown in Figure 5b, which is plotted for the test data, reveal how well the RNN model generalizes to unseen data. The consistency between the real and predicted values in the test data indicates the robustness and reliability of the model. Also, the regression plots in Figure 5c,d, which are plotted for the train and test data, include regression lines that show the correlation between the predicted and actual output powers. The closer the points are to the regression line, the higher the accuracy of the model. Overall, the results shown in Figure 5 indicate the obtained high accuracy of the proposed RNN model in predicting the output powers of the XOR gate, in both the training and test phases.
The results show high accuracy for the proposed RNN model. After training and testing of the presented model, the values of 0.004 and 0.01 are obtained for the train MSE and test MSE, which show high accuracy of the model in predicting the output power of the proposed XOR gate in different logical situations.

4. Results of the Final Structure

The simulation results obtained from the recurrent neural network (RNN) model demonstrate a high level of precision in predicting the output powers for various configurations of the crystal photonic XOR gate. The consistency in performance across different test cases, as evidenced by the outputs F1, F2, and F3, proves that the RNN model has effectively captured the nonlinear relationships inherent in the photonic crystal configurations. As mentioned, three data samples are used to verify the proposed RNN model, as shown later in Table A1. These verification samples show the efficiency of the proposed model, which can optimize the performance of the proposed XOR all-optical gate. The best structure of the presented gate is selected according to the last verification sample with radius of 1.15 and ‘phi’ of 145 degrees; the result of this structure is explained in this section.
The power distributions for all logical states of the proposed XOR gate are shown in Figure 6. As seen, in the case of A = 0, B = 0, both sources are off and the output power is zero as expected. In the case of different inputs, where A = 1, B = 0 and A = 0, B = 1, the high power at the output is obtained, which can be considered as the logical state of 1. Also, in the A = 1, B = 1 state, no power reaches the output, which is desired. Therefore, the desired logical conditions of the XOR gate are obtained in the proposed structure.
The output normalized powers for all logical states of the proposed XOR gate are shown in Figure 7. As seen, the output power is near 1 at the conditions with different inputs, while it is near 0 at the conditions with similar inputs, which shows the desired performance for the designed all-optical gate.
Polar diagrams of the output normalized power for three logical states of the proposed XOR gate are shown in Figure 8. The correct performance of the proposed all-optical gate can be observed in these polar diagrams. In the polar diagrams, the radial axes show the normalized values of the output power, while the angular axes show the normalized time parameter.
According to the obtained results, in the case of A = 0, B = 0, where both sources are off, the output power is zero. In the case of A = 0, B = 1, the second state, the first source is off and the second source is on. In this state, the normalized output power is equal to 0.813, which can be considered to be 1, i.e., logical. Also, when A = 1, B = 0, the first source is on and the second source is off. In this case, the normalized power of the output is equal to 0.82, which we consider to be a logical 1. Moreover, in the fourth state of A = B = 0, both sources are on, but the second source has a phase difference of 145 degrees, compared to the first source, which causes the output power to be 1 × 10−7, which can be considered to be a logical 0.
A comparison between the proposed XOR gate and other related works is presented in Table 1. As seen, four logical states are compared in this table, which shows the all-optical gate performances. According to the results, the proposed gate, by helping the recurrent neural network in the design process, outperforms other related work.

5. Conclusions

This study presents a new approach to the design of a crystal photonic XOR gate through the application of recurrent neural networks (RNNs), highlighting a significant advancement in the field of optical computing. By integrating RNNs into the design process, we have successfully demonstrated the optimization of waveguide paths and interference patterns in the photonic crystal structure, resulting in enhancing the performance and reliability of the XOR gate. Our findings indicate that the proposed RNN model effectively captures the complex interdependencies between design parameters and operational characteristics, leading to a robust and high-fidelity photonic logic gate. Furthermore, the model demonstrates significant improvements in the XOR gate’s functionality, particularly in terms of power efficiency, which is critical for photonic circuits applications.

Author Contributions

Conceptualization, P.K., S.R. (Saeed Roshani), S.I.Y., F.P. and S.R. (Sobhan Roshani); Formal analysis, S.I.Y. and M.A.C.; Methodology, S.I.Y. and M.A.; Software, F.H., M.A. and S.R. (Saeed Roshani); Validation, M.A.C., M.A.; Writing—original draft, S.R. (Saeed Roshani), S.I.Y., P.K., F.P., F.H. and S.R. (Sobhan Roshani); Writing—review & editing, M.A.C., P.K., F.P., F.H. and M.A. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

All the material conducted in the study is mentioned in article.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A. Results of the ANN Models

Table A1 provides a comprehensive overview of the input and output parameters used in the training and testing of the recurrent neural network models developed for the design of the crystal photonic XOR gate. The table lists distinct configurations defined by the radius (‘r’) and phase (‘phi’) of the rods in the photonic crystal structure, alongside their corresponding output powers for the different logical states of the XOR gate (F1, F2, and F3). Additionally, the predicted outputs (F1_N, F2_N, F3_N) are included to facilitate the comparison and evaluation of performance across varying configurations. Each row in Table A1 represents a unique train or test case, detailing the specific conditions under which the XOR gate was simulated. The parameters were carefully selected to span a wide range of potential operational scenarios, thereby ensuring that the neural network model was robustly trained to handle diverse and dynamically changing optical properties. These data played a crucial role in optimizing the gate design, enabling the neural network to learn and adapt to the intricate dynamics of photon manipulation within the crystal structure, ultimately enhancing the gate performance and efficiency.
Table A1. The RNN data samples and the predicted outputs in train and test procedures.
Table A1. The RNN data samples and the predicted outputs in train and test procedures.
InputsOutputs
rphiF1F2F3F1_NF2_NF3_N
Train Samples
10.100.050.710.770.0487030.7250870.840357
20.1450.050.710.50.0442450.6962640.430668
30.1900.050.710.40.049440.6850250.355217
40.11350.050.710.530.0402080.6925030.460609
50.11800.050.710.810.0396570.7048790.732037
60.200.1611.60.175651.0349291.623758
70.2450.1610.950.1654471.0374050.901435
80.2900.1610.50.1649451.0477880.509344
90.21350.1610.360.1587251.0570310.512875
100.21800.1610.730.1642911.056190.776896
110.300.351.32.40.3479851.1591382.35868
120.3450.351.31.50.3402051.1769151.448436
130.3900.351.30.610.3418991.1842470.601161
140.31350.351.30.220.342181.1810050.439065
150.31800.351.30.60.3459981.1702370.660624
160.400.531.12.80.5284771.1453952.760477
170.4450.531.11.80.5357691.1617871.886814
180.4900.531.10.690.5445981.1590380.554956
190.41350.531.10.120.5450891.1497670.211226
200.41800.531.10.440.5364421.1442980.410893
210.500.651.0530.6461171.0738152.916234
220.5450.651.051.950.6583071.0812472.149869
230.5900.651.050.730.663731.0716930.541235
240.51350.651.050.080.6622091.0645740.073404
250.51800.651.050.360.6521061.0715710.241112
260.600.713.150.705261.0047992.971069
270.6450.712.20.7144131.0056612.257516
280.6900.710.760.7153750.9980030.590222
290.61350.710.050.714460.994650.071354
300.61800.710.320.7087831.0060170.191008
310.700.730.963.050.7365370.9561362.985825
320.7450.730.962.30.7420930.954992.262889
330.7900.730.960.750.7407060.9507520.644085
340.71350.730.960.050.7406770.9488290.122652
350.71800.730.960.30.7385880.9583620.196426
360.7500.740.9353.10.7470060.937512.984985
370.75450.740.9352.20.7510160.9364822.242006
380.75900.740.9350.750.748940.9335920.665985
390.751350.740.9350.0450.7491610.931890.151956
400.751800.740.9350.290.7482750.9398490.20528
410.800.750.9330.7553750.9214022.980135
420.8450.750.9320.7580190.9210262.211023
430.8900.750.930.750.7554340.9192570.684144
440.81350.750.930.050.7557570.9176620.179841
450.81800.750.930.280.7557350.9240740.214256
460.8500.750.913.10.7622070.9071522.971812
470.85450.750.9120.7636470.9078492.173121
480.85900.750.910.770.7606710.9070370.698948
490.851350.750.910.0450.7609620.9055290.205125
500.851800.750.910.290.7615220.9105730.221935
510.900.760.93.050.7678740.8943122.960354
520.9450.750.91.980.7682630.8963942.130935
530.9900.750.90.770.7649710.8964360.710967
540.91350.750.90.0430.765120.8950390.227393
550.91800.750.90.2860.7660260.8989590.227667
560.9500.770.930.7726360.882582.946013
570.95450.770.920.7721150.886262.086684
580.95900.770.90.7650.7685580.8870930.720841
590.951350.770.90.04470.7684760.8858530.246692
600.951800.770.90.2930.7695320.88890.231307
61100.780.8930.7766830.8717462.929027
621450.780.892.020.7753820.8771452.042231
631900.780.890.780.7715950.8787350.72922
6411350.780.890.4440.7712150.8776980.263333
6511800.780.890.260.772260.8801090.233027
661.0500.810.873.10.7801550.8616512.909667
671.05450.810.872.0160.7781940.8688141.999104
681.05900.810.870.780.7742010.8711450.736726
691.051350.810.870.0460.7734760.8703580.277765
701.051800.810.870.2530.7743810.872330.233185
711.100.820.8453.0450.7831640.8521662.888267
721.1450.820.8452.020.780650.8610821.958514
731.1900.820.8450.780.7764690.8641510.743932
741.11350.820.8450.0450.7753690.8636510.29049
751.11800.820.8450.2450.7760320.8653480.23223
761.1500.8130.8230.7857950.8431812.865224
771.15450.8130.8220.7828250.8537981.921365
Test Samples
11.15900.8130.820.7750.7784690.857610.751347
21.151350.8130.820.050.7769760.8574310.302017
31.151800.8130.820.240.7773220.8589780.230634
41.200.8750.7653.0080.7881190.8345982.840994
51.2450.8750.7652.0250.7847750.8468441.888279
61.2900.8750.7650.80.7802540.8514060.759408
71.21350.8750.7650.0540.7783630.8515760.312827
81.2500.8550.7882.9350.7901890.8263332.816065
91.25450.8550.78820.7865430.8401221.859629
101.25900.8550.7880.820.7818660.8454470.768478
111.251350.8550.7880.780.7795790.845990.323364
121.251800.8550.7880.2140.7791430.8475080.227289
Verification Samples
11.051450.810.8700.7736070.8705740.245186
21.11450.820.85400.775420.8638460.255531
31.151450.8130.8200.7769380.8576230.26475

References

  1. Waldrop, M.M. The chips are down for Moore’s law. Nat. News 2016, 530, 144. [Google Scholar] [CrossRef] [PubMed]
  2. Miller, D.A. Device requirements for optical interconnects to silicon chips. Proc. IEEE 2009, 97, 1166–1185. [Google Scholar] [CrossRef]
  3. Joannopoulos, J.D.; Meade, R.; Winn, J.N. Photonic Crystals: Molding the Flow of Light; Princeton University Press: Princeton, NJ, USA, 1995. [Google Scholar]
  4. Sakoda, K.; Sakoda, K. Optical Properties of Photonic Crystals; Springer: Berlin/Heidelberg, Germany, 2005; Volume 2. [Google Scholar]
  5. Jindal, P.; Abou Houran, M.; Goyal, D.; Choudhary, A. A review of different techniques used to design photonic crystal-based logic gates. Optik 2023, 282, 170794. [Google Scholar] [CrossRef]
  6. Jiang, Y.-C.; Liu, S.-B.; Zhang, H.-F.; Kong, X.-K. Realization of all optical half-adder based on self-collimated beams by two-dimensional photonic crystals. Opt. Commun. 2015, 348, 90–94. [Google Scholar] [CrossRef]
  7. Liu, W.; Yang, D.; Shen, G.; Tian, H.; Ji, Y. Design of ultra compact all-optical XOR, XNOR, NAND and OR gates using photonic crystal multi-mode interference waveguides. Opt. Laser Technol. 2013, 50, 55–64. [Google Scholar] [CrossRef]
  8. Shaik, E.H.; Rangaswamy, N. Interference-Based All-Optical Photonic Crystal Logic Gates. In Advances in Photonic Crystals and Devices; CRC Press: Boca Raton, FL, USA, 2019; pp. 283–311. [Google Scholar]
  9. Danaie, M.; Kaatuzian, H. Design and simulation of an all-optical photonic crystal AND gate using nonlinear Kerr effect. Opt. Quantum Electron. 2012, 44, 27–34. [Google Scholar] [CrossRef]
  10. Naghizade, S.; Sattari-Esfahlan, S. An optical five channel demultiplexer-based simple photonic crystal ring resonator for WDM applications. J. Opt. Commun. 2019, 41, 37–43. [Google Scholar] [CrossRef]
  11. Naghizade, S.; Sattari-Esfahlan, S. Loss-less elliptical channel drop filter for WDM applications. J. Opt. Commun. 2019, 40, 379–384. [Google Scholar] [CrossRef]
  12. Parandin, F.; Mohamadi, A. Design and Optimization of a Photonic Crystal-Based All-Optical XOR Gate Using Machine Learning. Majlesi J. Electr. Eng. 2024, 18, 1–8. [Google Scholar]
  13. Hamedi, S.; Jahromi, H.D. Performance analysis of all-optical logical gate using artificial neural network. Expert Syst. Appl. 2021, 178, 115029. [Google Scholar] [CrossRef]
  14. Yang, D.; Qin, H.; Li, Y.; Tang, C.; Xu, B.; Cheng, T. A hybrid method for photonic crystal fiber polarization filter based on artificial neural network and genetic algorithms. Opt. Fiber Technol. 2023, 80, 103426. [Google Scholar] [CrossRef]
  15. Zelaci, A.; Yasli, A.; Kalyoncu, C.; Ademgil, H. Generative adversarial neural networks model of photonic crystal fiber based surface plasmon resonance sensor. J. Light. Technol. 2020, 39, 1515–1522. [Google Scholar] [CrossRef]
  16. Liang, B.; Xu, D.; Yu, N.; Xu, Y.; Ma, X.; Liu, Q.; Asif, M.S.; Yan, R.; Liu, M. Physics-guided neural-network-based inverse design of a photonic–plasmonic nanodevice for superfocusing. ACS Appl. Mater. Interfaces 2022, 14, 27397–27404. [Google Scholar] [CrossRef] [PubMed]
  17. Swarnakar, S.; Rathi, S.; Kumar, S. Design of all optical XOR gate based on photonic crystal ring resonator. J. Opt. Commun. 2019, 41, 51–56. [Google Scholar] [CrossRef]
  18. Rao, D.G.S.; Swarnakar, S.; Palacharla, V.; Raju, K.S.R.; Kumar, S. Design of all-optical AND, OR, and XOR logic gates using photonic crystals for switching applications. Photonic Netw. Commun. 2021, 41, 109–118. [Google Scholar] [CrossRef]
  19. Parandin, F.; Reza Malmir, M. Reconfigurable all optical half adder and optical XOR and AND logic gates based on 2D photonic crystals. Opt. Quantum Electron. 2020, 52, 56. [Google Scholar] [CrossRef]
  20. Hussein, H.M.; Ali, T.A.; Rafat, N.H. New designs of a complete set of photonic crystals logic gates. Opt. Commun. 2018, 411, 175–181. [Google Scholar] [CrossRef]
Figure 1. Bandgap structure of the proposed prototype.
Figure 1. Bandgap structure of the proposed prototype.
Symmetry 16 00820 g001
Figure 2. Initial presented structure of the all-optical XOR gate. The dimensions of the indicated defect rod in the figure (indicated with a square) are used to optimize the output of the XOR gate by using RNN.
Figure 2. Initial presented structure of the all-optical XOR gate. The dimensions of the indicated defect rod in the figure (indicated with a square) are used to optimize the output of the XOR gate by using RNN.
Symmetry 16 00820 g002
Figure 3. Structures of the proposed RNN model with three hidden layers.
Figure 3. Structures of the proposed RNN model with three hidden layers.
Symmetry 16 00820 g003
Figure 4. Mean Squared Error (MSE) versus the number of training epochs for the presented RNN model.
Figure 4. Mean Squared Error (MSE) versus the number of training epochs for the presented RNN model.
Symmetry 16 00820 g004
Figure 5. Performances of the presented RNN model. The real and predicted results versus number of samples for (a) train and (b) test data. Results of the regression plots for (c) train and (d) test data.
Figure 5. Performances of the presented RNN model. The real and predicted results versus number of samples for (a) train and (b) test data. Results of the regression plots for (c) train and (d) test data.
Symmetry 16 00820 g005
Figure 6. Power distribution in the proposed XOR gate structure for the (a) A = 0, B = 0; (b) A = 0, B = 1; (c) A = 1, B = 0; and (d) A = 1, B = 1 states.
Figure 6. Power distribution in the proposed XOR gate structure for the (a) A = 0, B = 0; (b) A = 0, B = 1; (c) A = 1, B = 0; and (d) A = 1, B = 1 states.
Symmetry 16 00820 g006
Figure 7. Normalized output power for the (a) A = 0, B = 0; (b) A = 0, B = 1; (c) A = 1, B = 0; and (d) A = 1, B = 1 states.
Figure 7. Normalized output power for the (a) A = 0, B = 0; (b) A = 0, B = 1; (c) A = 1, B = 0; and (d) A = 1, B = 1 states.
Symmetry 16 00820 g007aSymmetry 16 00820 g007b
Figure 8. Polar diagram of the normalized output power for the (a) A = 0, B = 1; (b) A = 1, B = 0; and (c) A = 1, B = 1 states.
Figure 8. Polar diagram of the normalized output power for the (a) A = 0, B = 1; (b) A = 1, B = 0; and (c) A = 1, B = 1 states.
Symmetry 16 00820 g008
Table 1. A comparison between the proposed XOR gate and other related works.
Table 1. A comparison between the proposed XOR gate and other related works.
RefUsed TechniqueLogic State
A = B = 0
Logic State
A = 0, B = 1
Logic State
A = 1, B = 0
Logic State
A = B = 0
[17]Ring Resonator0.050.640.550.08
[18]Phase change0.130.5960.5220.157
[19]Reconfigurable
Structure
00.680.650.17
[20]Plane Wave Expansion (PWE)00.5350.6010.0182
This workRecurrent neural network00.8130.821 × 10−7
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Karami, P.; Yahya, S.I.; Chaudhary, M.A.; Assaad, M.; Roshani, S.; Hazzazi, F.; Parandin, F.; Roshani, S. Design of a Photonic Crystal Exclusive-OR Gate Using Recurrent Neural Networks. Symmetry 2024, 16, 820. https://doi.org/10.3390/sym16070820

AMA Style

Karami P, Yahya SI, Chaudhary MA, Assaad M, Roshani S, Hazzazi F, Parandin F, Roshani S. Design of a Photonic Crystal Exclusive-OR Gate Using Recurrent Neural Networks. Symmetry. 2024; 16(7):820. https://doi.org/10.3390/sym16070820

Chicago/Turabian Style

Karami, Pouya, Salah I. Yahya, Muhammad Akmal Chaudhary, Maher Assaad, Saeed Roshani, Fawwaz Hazzazi, Fariborz Parandin, and Sobhan Roshani. 2024. "Design of a Photonic Crystal Exclusive-OR Gate Using Recurrent Neural Networks" Symmetry 16, no. 7: 820. https://doi.org/10.3390/sym16070820

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop