Experiment No. 4 Objectives: All All
Experiment No. 4 Objectives: All All
Experiment No. 4 Objectives: All All
4
Objectives
Design of All Optical NOT, XOR/XNOR logic gates using the Micro-ring resonator
structures.
MATLAB CODE of OPTICAL NOT LOGIC GATE
clc;
clear all;
close all;
k1 = 0.25;
k2 = 0.25;
alpha = 0.0005.*10.^(-6);
Aeff = 0.25.*10.^(-12);
lembda = 1.55.*10.^(-9);
gamma = 0.0005;
R = 7.08.*10.^(-6);
n0 = abs(.00000020 + 0.000174i);
n2 =-abs(-6.9998e-016 -4.3554e-015i);
L = 2.*pi.*R;
D = sqrt(1-gamma);
x = D.*exp(-alpha.*L./4);
% Generation of continuous wave signal;
t = (-10:0.001:10).*10.^(-12);
z = (-10:0.001:10).*10.^(-12);
T0 = 1e-12;
%L = 2.*pi.*5.81e-6;
c = 3e-8;
T = t;
w = ((2.*pi)./T);
LD = 500.81e-6;
w0 = (2*pi./T0);
alpha = 0.08;
% ****************************** 0
*******************************************
x0 = sech(100.*T./T0).*exp((z));
X1 = sech(100.*T./T0).*exp((z));
X2 = zeros(1,20001);
neff1 = n0 + n2.*(((abs(X2)))./Aeff);
kn1 = ((2.*pi)./lembda).*neff1;
phi1 = (kn1.*L)./2;
et = (((D.*sqrt(1-k1)) - (D.*sqrt(1-
k2).*(x.^2).*(exp(j.*phi1).^2)))./(1-(sqrt(1-k1).*sqrt(1-
k2).*(x.^2).*(exp(j.*phi1).^2)))).*x0;
ed = ((-D.*sqrt(k1.*k2).*exp(j.*phi1))./(1-(sqrt(1-
k1).*sqrt(1-k2).*(x.^2).*(exp(j.*phi1).^2)))).*x0;
subplot(3,2,1);
plot(T./10.^(-12) + 1,abs(X2));
xlabel('Time (pico-second)');
ylabel('Input logic (X)');
axis([0 2 0 1]);
subplot(3,2,3);
plot(T./10.^(-12) + 1,abs(et));
xlabel('Time (pico-second)');
ylabel('Output at through port');
axis([0 2 0 1]);
subplot(3,2,5);
plot(T./10.^(-12) + 1,abs(ed));
xlabel('Time (pico-second)');
ylabel('Output at drop port');
axis([0 2 0 1]);
% *************************** 1
***********************
x0 = sech(100.*T./T0).*exp((z));
X1 = sech(100.*T./T0).*exp((z));
X2 = zeros(1,20001);
neff1 = n0 + n2.*(((abs(X1)))./Aeff);
kn1 = ((2.*pi)./lembda).*neff1;
phi1 = (kn1.*L)./2;
et = (((D.*sqrt(1-k1)) - (D.*sqrt(1-
k2).*(x.^2).*(exp(j.*phi1).^2)))./(1-(sqrt(1-k1).*sqrt(1-
k2).*(x.^2).*(exp(j.*phi1).^2)))).*x0;
ed = ((-D.*sqrt(k1.*k2).*exp(j.*phi1))./(1-(sqrt(1-
k1).*sqrt(1-k2).*(x.^2).*(exp(j.*phi1).^2)))).*x0;
subplot(3,2,2);
plot(T./10.^(-12) + 1,abs(X1));
xlabel('Time (pico-second)');
ylabel('Input logic (X)');
axis([0 2 0 1]);
subplot(3,2,4);
plot(T./10.^(-12) + 1,abs(et));
xlabel('Time (pico-second)');
ylabel('Output at through port');
axis([0 2 0 1]);
subplot(3,2,6);
plot(T./10.^(-12) + 1,abs(ed));
xlabel('Time (pico-second)');
ylabel('Output at drop port');
axis([0 2 0 1]);
Fig. 1: Switching activity of the Micro-ring resonator structures