From e5234ae755e62bde979a43f02f41d206fa3a01a6 Mon Sep 17 00:00:00 2001 From: Thiagolb00 <56831540+Thiagolb00@users.noreply.github.com> Date: Wed, 3 Feb 2021 20:08:43 -0300 Subject: [PATCH] Add files via upload --- Ring_Resonator/DelayInterfExp.m | 138 +++++++++++ Ring_Resonator/Import_Data_MZM.m | 107 +++++++++ Ring_Resonator/MZ_Input_Data.m | 72 ++++++ .../Mach_Zehnder_Modulator_simplificado.m | 96 ++++++++ Ring_Resonator/Make_MZ_Input_Files_Simp.m | 45 ++++ Ring_Resonator/MeasPower.m | 18 ++ Ring_Resonator/OpticalFFTN.m | 227 ++++++++++++++++++ Ring_Resonator/README.asv | 4 + Ring_Resonator/README.md | 6 + Ring_Resonator/Ring_Resonator_Singlebus.m | 62 +++++ Ring_Resonator/Set_MZ_Input_Data_Simp.m | 76 ++++++ Ring_Resonator/main.m | 62 +++++ Ring_Resonator/main_inputdata.asv | 100 ++++++++ Ring_Resonator/main_inputdata.m | 122 ++++++++++ Ring_Resonator/matlab_tools/Import_Data_MZM.m | 107 +++++++++ Ring_Resonator/matlab_tools/MZ_Input_Data.m | 72 ++++++ .../Mach_Zehnder_Modulator_simplificado.m | 96 ++++++++ .../matlab_tools/Make_MZ_Input_Files_Simp.m | 45 ++++ Ring_Resonator/matlab_tools/MeasPower.m | 18 ++ .../matlab_tools/Set_MZ_Input_Data_Simp.m | 76 ++++++ Ring_Resonator/matlab_tools/time2freq.m | 18 ++ Ring_Resonator/matlab_tools/time2freq_lamb.m | 51 ++++ Ring_Resonator/ofc-mzi-generation | 1 + Ring_Resonator/time2freq.m | 18 ++ Ring_Resonator/time2freq_lamb.m | 51 ++++ Ring_Resonator/untitled.jpg | Bin 0 -> 18320 bytes 26 files changed, 1688 insertions(+) create mode 100644 Ring_Resonator/DelayInterfExp.m create mode 100644 Ring_Resonator/Import_Data_MZM.m create mode 100644 Ring_Resonator/MZ_Input_Data.m create mode 100644 Ring_Resonator/Mach_Zehnder_Modulator_simplificado.m create mode 100644 Ring_Resonator/Make_MZ_Input_Files_Simp.m create mode 100644 Ring_Resonator/MeasPower.m create mode 100644 Ring_Resonator/OpticalFFTN.m create mode 100644 Ring_Resonator/README.asv create mode 100644 Ring_Resonator/README.md create mode 100644 Ring_Resonator/Ring_Resonator_Singlebus.m create mode 100644 Ring_Resonator/Set_MZ_Input_Data_Simp.m create mode 100644 Ring_Resonator/main.m create mode 100644 Ring_Resonator/main_inputdata.asv create mode 100644 Ring_Resonator/main_inputdata.m create mode 100644 Ring_Resonator/matlab_tools/Import_Data_MZM.m create mode 100644 Ring_Resonator/matlab_tools/MZ_Input_Data.m create mode 100644 Ring_Resonator/matlab_tools/Mach_Zehnder_Modulator_simplificado.m create mode 100644 Ring_Resonator/matlab_tools/Make_MZ_Input_Files_Simp.m create mode 100644 Ring_Resonator/matlab_tools/MeasPower.m create mode 100644 Ring_Resonator/matlab_tools/Set_MZ_Input_Data_Simp.m create mode 100644 Ring_Resonator/matlab_tools/time2freq.m create mode 100644 Ring_Resonator/matlab_tools/time2freq_lamb.m create mode 100644 Ring_Resonator/ofc-mzi-generation create mode 100644 Ring_Resonator/time2freq.m create mode 100644 Ring_Resonator/time2freq_lamb.m create mode 100644 Ring_Resonator/untitled.jpg diff --git a/Ring_Resonator/DelayInterfExp.m b/Ring_Resonator/DelayInterfExp.m new file mode 100644 index 0000000..a758c19 --- /dev/null +++ b/Ring_Resonator/DelayInterfExp.m @@ -0,0 +1,138 @@ +function [ Eout1,Eout2 ] = DelayInterfExp( f,TimDel,PhaDel,E1,E0,CoupConst,... + ExpCoef,MutCoef ) +%% Delay Interferometer +%c function[Eout1,Eout2] = DelayInterf( t,TimDel,PhaDel,E1,E0,CoupConst,... +%c ExpCoef,MutCoef ) +%c This function is responsible for implementing an Delay Interferometer +%c (DI). There many ways that this device can be implemented such as MZM, +%c passive components and couples with diffe light paths. This script will +%c inplement a DI ussing 3dB couples with 2-input and 2-outputs. The delay +%c given will be implement by light paths with different lengths and the +%c phase delay will be achieve with a phase controler. This will be the +%c principal and only device used to implement an All Optica FFT. Aiming to +%c separate subcarriers from an OFDM signal and convert from serial to +%c paralel. +%c +%c +%c Created by P.Marciano LG +%c 02/11/2017 +%c pablorafael.mcx@gmail.com +%c +%c Refences: +%c@article{hillerkuss2010simple, +%c title={Simple all-optical FFT scheme enabling Tbit/s real-time signal processing}, +%c author={Hillerkuss, D and Winter, M and Teschke, M and Marculescu, A and Li, J and Sigurdsson, G and Worms, K and Ezra, S Ben and Narkiss, N and Freude, W and others}, +%c journal={Optics express}, +%c volume={18}, +%c number={9}, +%c pages={9324--9340}, +%c year={2010}, +%c publisher={Optical Society of America} +%c} +%c +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c G L O B A L V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c DelayInterf +%c +%c Input: +%c t : Time vector of the whole simulation [s] +%c TimDel : Time delay to be implemented by the DI +%c PhaDel : Phase delay to be implemented by the DI +%c E1 : Principal input signal to be implemented +%c E0 : Secundary input signal (usualy it is zero) +%c CoupConst : Couples Constant of the DI +%c ExpCoef : Exponential component from Ramaswami equation +%c MutCoef : Coeficient to control polarity +%c +%c Output: +%c Eout1 : Output1 from the DI interfometric response +%c Eout2 : Output2 from the DI interfometric response +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%% +% At the very first part of this iscript, it is necessary to be sure that +% all variable that will be used are needed to be correctly initialized. +%% Delay Interferometers +% it was fundamental to use a teoretical model for the couple. Because just +% adding signals together or subtracting them those will not result as an +% optical coupler. The model used at this script was taken from Optical +% Networks by Ramaswami. + +%Verifing the variables used on the optical coupler were correctly +%initialized. +if nargin<5 +% DelayInterfInputData; + CoupConst = 3*pi/4; %Couples Constant of the DI + ExpCoef = exp(-1j*1);%Exponential component from Ramaswami equation + MutCoef = 1; %Coeficient to control polarity + E0 = 0; +elseif nargin<6 + CoupConst = 3*pi/4; %Couples Constant of the DI + ExpCoef = exp(-1j*1);%Exponential component from Ramaswami equation + MutCoef = 1; %Coeficient to control polarity +else + error(['Input Arguments are not enougth. Please check this function'... + ' Call!']); +end + +%% * Stage: 1 spliting the principal input signal +% Fristly it is needed to divide the signal in two given that by the length +% difference of the optical pahts and the phase delay btween them the +% signals will interfere with one another. + % split + % An 3dB coupler with 2 inputs and 2 outputs is used to slplit the input + % signal. + %The couples will output two signals that are a combination of E1 and E0. + %As E0 = 0 the out put will be just the E1 signal slpit in two. The name + %notation E11 means the E1 signal at the arm 1 (uper arm) hence the + %notation name E12 means the E1 signal at the arm 2 (Lower arm). +E11 = ExpCoef.*(cos(CoupConst).*E1 + MutCoef*1j*sin(CoupConst).*E0); +E12 = ExpCoef.*(cos(CoupConst).*E0 + MutCoef*1j*sin(CoupConst).*E1); + +%% * Stage: 2 Changing the signal at the lower arm + %Dellay and change phase + %Firstly it is taken in acont what means for the input signal a time + %delay by measuring the input time vector +% aux1 = E12(t<=TimDel); +% aux1 = E12(1:TimDel); +% f=time2freq(t); + %Secondly the signal will be delayed by rotation its possition. That + %means a circular rith-shift will be performed. The number of possition + %to be deslocated will be given by the number of point that represent the + %delay based on the input time vector given as input. The time delay + %time accuracy depends on the time vector accuracy. +% E12d = [E12(end-(length(aux1)-1):end) E12(1:end-(length(aux1)))]; +E12d = ifft(fft(E12).*exp(-1j*2*pi*TimDel.*f)); + + %In practice the phase delay will be perfomed by an phase controler. In + %the simulation it will be done by multiplying the input signal by a + %complex neperian exponential where the argument was received as an input + %parameters. + %The nema notation means that the E12 was Delayed thus E12d +E12d = E12d.*exp(-1j*PhaDel); + +%% * Stage: 3 Recombining both signals + %Combining singnals + %Similarly to te input step. An 3dB coupler with 2 inputs and 2 outputs is + %used to combine the input signals from the arm1 and arm2. The couples + %will output two signals that are a combination of E12 and E12d. + %Thus the Eout1 is the combination of E11 and E12d wich will be out put + %at the port 1 of the couples. Hence, Eout2 is the combination of E11 and + %E12d wich will be out put at the port 2. +Eout1 = ExpCoef.*(cos(CoupConst).*E11 + MutCoef*1j*sin(CoupConst).*E12d); +Eout2 = ExpCoef.*(cos(CoupConst).*E12d + MutCoef*1j*sin(CoupConst).*E11); + +end + diff --git a/Ring_Resonator/Import_Data_MZM.m b/Ring_Resonator/Import_Data_MZM.m new file mode 100644 index 0000000..4783803 --- /dev/null +++ b/Ring_Resonator/Import_Data_MZM.m @@ -0,0 +1,107 @@ +function [L,U0,U_pi1,U_pi2,eta1,eta2,nopt,nel,alfa_ins,phi_0,C,alfa0] = ... + Import_Data_MZM (FileIndex,Local) +%% Import data from text file. +%cfunction [L,U0,U_pi1,U_pi2,eta1,eta2,nopt,nel,alfa_ins,phi_0,C,alfa0]=... +%c Import_Data_MZM (FileIndex,Local) +%c Script for importing data from the following text file: +%c +%c [pwd '\input_files\AA_MZ_Input_Data_t' num2str(FileIndex) '.m']; +%c +%c To extend the code to different selected data or a different text file, +%c generate a function instead of a script. +%c +%c Auto-generated by MATLAB on 2017/10/04 11:05:03 +%c +%c +%c +%c Updated by P.Marciano LG +%c 18/10/2017 +%c pablorafael.mcx@gmail.com +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c G L O B A L V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c Import_Data_MZM +%c +%c Input: +%c FileIndex : Indentifier of the file to be load into the workspace [-] +%c Local : Current path for the location of the files [-] +%c +%c Output: +%c L : Comprimento do dispositivo [cm] +%c U0 : Tensao de polarizacao [V] +%c U_pi1 : Tensao de chaveamento para 1 eletrodo [V] +%c U_pi2 : Tensao de chaveamento para 2 eletrodos [V] +%c eta1 : Sensibilidade no caminho 1 [1/V.m] +%c eta2 : Sensibilidade no caminho 2 [1/V.m] +%c nopt : Indice de refracao optico [-] +%c nel : Indice de refracao eletrico [-] +%c alfa_ins : Perda por insercao [dB] +%c phi_0 : Constante de fase entre os dois caminhos [-] +%c C : Parametro de chirp [?] +%c alfa0 : Perda condutiva [dB/cm.GHz^0.5] +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%% +%% Initialize variables. +if nargin<2 %Check if there is a specific laction to look for the files + filename = [pwd '\input_files\AA_MZ_Input_Data_t' num2str(FileIndex)...%If not assume that there is a input_files folder + '.m']; +else + filename = [Local 'AA_MZ_Input_Data_t' num2str(FileIndex) '.m']; %If yes, open the files on the given path +end +delimiter = ' '; + +%% Format string for each line of text: +% column1: double (%f) +% For more information, see the TEXTSCAN documentation. +formatSpec = '%f%[^\n\r]'; + +%% Open the text file. +fileID = fopen(filename,'r'); + +%% Read columns of data according to format string. +% This call is based on the structure of the file used to generate this +% code. If an error occurs for a different file, try regenerating the code +% from the Import Tool. +dataArray = textscan(fileID, formatSpec, 'Delimiter', delimiter, ... + 'MultipleDelimsAsOne', true, 'ReturnOnError', false); + +%% Close the text file. +fclose(fileID); + +%% Post processing for unimportable data. +% No unimportable data rules were applied during the import, so no post +% processing code is included. To generate code which works for +% unimportable data, select unimportable cells in a file and regenerate the +% script. + +%% Allocate imported array to column variable names +VarName1 = dataArray{:, 1}; + +L = VarName1(1); +U0 = VarName1(2); +U_pi1 = VarName1(3); +U_pi2 = VarName1(4); +eta1 = VarName1(5); +eta2 = VarName1(6); +nopt = VarName1(7); +nel = VarName1(8); +alfa_ins = VarName1(9); +phi_0 = VarName1(10); +alfa0 = VarName1(11); + +C = (eta1+eta2)/(eta1-eta2); % Parametro de chirp +alfa0 = 10^(alfa0/20); % [1/cm.GHz^0.5] + + +%% Clear temporary variables +clearvars filename delimiter formatSpec fileID dataArray ans; \ No newline at end of file diff --git a/Ring_Resonator/MZ_Input_Data.m b/Ring_Resonator/MZ_Input_Data.m new file mode 100644 index 0000000..d57695e --- /dev/null +++ b/Ring_Resonator/MZ_Input_Data.m @@ -0,0 +1,72 @@ +%c +%c ..'Ž`'..'Ž`..'Ž`.. +%c +%c Arquivo de entrada usado pela funcao Mach_Zehnder_Modulator. Contem +%c informacoes sobre as caracteristicas fisicas do modulador Mach-Zehnder. +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c G L O B A L V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c L : Comprimento do dispositivo [cm] +%c U0 : Tensao de polarizacao [V] +%c eletrodes : Numero de eletrodos (1,2). Definido pelo +%c numero de variaveis de entrada na funcao +%c Mach_Zehnder_Modulator +%c U_pi1 : Tensao de chaveamento para 1 eletrodo [V] +%c U_pi2 : Tensao de chaveamento para 2 eletrodos [V] +%c eta1 : Sensibilidade no caminho 1 [1/V.m] +%c eta2 : Sensibilidade no caminho 2 [1/V.m] +%c nopt : Indice de refracao optico +%c nel : Indice de refracao eletrico +%c alfa_ins : Perda por insercao [dB] +%c phi_0 : Constante de fase entre os dois caminhos +%c alfa0 : Perda condutiva [dB/cm.GHz^0.5] +%c +%c by M.Segatto, S. Cani, B. Jesus e A. Togneri +%c 04/09/2002 +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +% + +L = 10; +U0 = 6; +U_pi1 = 6; +U_pi2 = 6; +eta1 = 89;% 89; +eta2 =-12.7;%-12.7; +% +nopt = 2.17; +nel = 2.60; +alfa_ins = 5.1; +phi_0 = 0.0; +alfa0 = 0.55; + +C = (eta1+eta2)/(eta1-eta2); % Parametro de chirp +alfa0 = 10^(alfa0/20); % [1/cm.GHz^0.5] + + +% +% L = 10; +% U0 = 0; +% U_pi1 = 0; +% U_pi2 = 0; +% eta1 = 89; +% eta2 = -12.7; +% % +% nopt = 1; +% nel = 2; +% alfa_ins = 5.1; +% phi_0 = 0.0; +% alfa0 = 0.55; +% % +% C = (eta1+eta2)/(eta1-eta2); % Parametro de chirp +% alfa0 = 10^(alfa0/20); % [1/cm.GHz^0.5] diff --git a/Ring_Resonator/Mach_Zehnder_Modulator_simplificado.m b/Ring_Resonator/Mach_Zehnder_Modulator_simplificado.m new file mode 100644 index 0000000..8e1e167 --- /dev/null +++ b/Ring_Resonator/Mach_Zehnder_Modulator_simplificado.m @@ -0,0 +1,96 @@ +function [Eout,H] = Mach_Zehnder_Modulator_simplificado(t,Ein,U,MZ_Input_File) +%c +%c function [Eout,H] = Mach_Zehnder_Modulator(t,Ein,U1t,U2t,MZ_Input_File); +%c +%c This script is responsible to reproduce the output field of a MZM +%c modulator of one or two arms depending on the inputs. +%c +%c +%c Updated by P.Marciano LG +%c 18/09/2017 +%c pablorafael.mcx@gmail.com +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c G L O B A L V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c Modulador Mach-Zehnder +%c +%c Entrada: +%c t : Vetor de tempo [s] +%c Ein : Campo Eletrico de Entrada [V/m] +%c (dominio do tempo) +%c U1t : Tensao de entrada no braco 1 do modulador [V] +%c (dominio do tempo) +%c U2t : Tensao de entrada no braco 2 do modulador [V] +%c (dominio do tempo) +%c MZ_Input_File :Arquivo de entrada contendo parametros do modulador +%c +%c Saida +%c Eout : Campo Eletrico optico modulado no tempo [V/m] +%c H : Funcao de tranferencia eletrica do modulador +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c Usa: time2freq_lamb +%% +if (nargin <= 3), + MZ_Input_File ='MZ_Input_Data'; + run([MZ_Input_File '.m']); +else + [L,U0,U_pi1,U_pi2,~,~,nopt,nel,~,~,C,alfa0] = Import_Data_MZM (... + MZ_Input_File);%Import the data from files +end +if isstruct(U), + electrodes = 2; % Two arms modulator + U1t = U.U1t; + U2t = U.U2t; + U_pi = U_pi2; +else + electrodes = 1; % One arm modulator + U1t = U; + U_pi = U_pi1; +end +% +tps = t/1E-12; +ccmns = 30; % Velocidade da luz [cm/ns] +freqTHz = time2freq_lamb(tps); +freqGHz = freqTHz*1e-3; % Frequencia em GHz +freqGHz = -fftshift(freqGHz); +freqGHz(1) = freqGHz(2); +n = length(U1t); % Tamanho de U1t +% + +%%%%%%% FUNCAO DE TRANSFEWRENCIA ELETRICA DO MODULADOR %%%%%%%%%%% +% +alfaf = 0.5*alfa0*(abs(freqGHz).^0.5); +gamaf = 2*pi*abs(freqGHz).*(nel - nopt)/ccmns; +atn = alfaf + 1j*gamaf; +H = (1./(atn*L)).*(1 - exp(-atn*L)); +% +if (electrodes == 1), + U1f = fft(U1t); + U1t = real(ifft(U1f.*H)); + exp1 = exp(1j*C*(pi/2).*(U1t/U_pi)); + if C~=0 + Eout = Ein.*cos((pi/2).*(U1t - U0)/U_pi).*exp1; + else + Eout = Ein.*cos((pi/2).*(U1t - U0)/U_pi); + end +else + U1f = fft(U1t); + U1t = ifft(U1f.*H); + U2f = fft(U2t); + U2t = ifft(U2f.*H); + %The final part of the following equation is the Chirp parameter and it + %should not be removed, because it will be the key parameter to create + %the optical carriers at the same level. + Eout = Ein.*cos((pi/2).*(U1t - U2t - U0)/U_pi).*exp(-1j*(pi/2).*((U1t + U2t)/U_pi)); +end diff --git a/Ring_Resonator/Make_MZ_Input_Files_Simp.m b/Ring_Resonator/Make_MZ_Input_Files_Simp.m new file mode 100644 index 0000000..06d1e27 --- /dev/null +++ b/Ring_Resonator/Make_MZ_Input_Files_Simp.m @@ -0,0 +1,45 @@ +%c +%c ..'Ž`'..'Ž`..'Ž`.. +%c File: Make_MZ_Input_Files_Simp +%c(Creating the input file necessary for the MZM) +%c +%c This main code is resposible to call and load the right parameters +%c to be saved in a file for latter be used by the MZM +%c +%c +%c by P.Marciano LG +%c 18/08/2017 +%c Last UpDate +%c 23/12/2017 +%c pablorafael.mcx@gmail.com +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c G L O B A L V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c Here it will be added the functions that this code will call +%c +%c +%c Set_MZ_Input_Data. - Function that will create and load the files with +%c the given in data. +%c +%c +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Start of the Program % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +S=1; %Variabel that give the name for the input file +for Inc2=1:Vbias_steps%Secundary loop for the possible combinations + U0 = Vbias(Inc2);%Variation of the Vbias + [MZ_Input_Sdata] = Set_MZ_Input_Data_Simp(S,L,U0,U_pi1,U_pi2,eta1,... %Functionresponsible to create the input files + eta2,nopt,nel,alfa_ins,phi_0,alfa0,Local); + S = S+1; +end +% clear L U0 U_pi1 U_pi2 eta1 eta2 nopt nel alfa_ins phi_0 alfa0 C alfa0 \ No newline at end of file diff --git a/Ring_Resonator/MeasPower.m b/Ring_Resonator/MeasPower.m new file mode 100644 index 0000000..5106135 --- /dev/null +++ b/Ring_Resonator/MeasPower.m @@ -0,0 +1,18 @@ +function [ThisPower,ThisPowerdBm] = MeasPower(Ein,t,InfLim,UpeLim) +%% + if nargin<2 + t = linspace(0,length(Ein),length(Ein)); + InfLim = t(1); + UpeLim = t(end); + elseif nargin<3 + InfLim = t(1); + UpeLim = t(end); + end + + ThisPower = sum(abs(Ein(find(t==InfLim):find(t==UpeLim))).^2)/(... + length(Ein(find(t==InfLim):find(t==UpeLim)))); + if nargout == 2 + ThisPowerdBm = 30 + 10*log10(ThisPower); + end + +end \ No newline at end of file diff --git a/Ring_Resonator/OpticalFFTN.m b/Ring_Resonator/OpticalFFTN.m new file mode 100644 index 0000000..fa25806 --- /dev/null +++ b/Ring_Resonator/OpticalFFTN.m @@ -0,0 +1,227 @@ +function [Eout,Count,MapVet]=OpticalFFTN(f,SymPer,StopPoint,E1,AngVec,... + ActStag,Count,E0,MapVet) +%% All Optical Fast Furier Transform for N carriers +%c function [Eout,Count,MapVet]=OpticalFFTN(t,SymPer,StopPoint,E1,... +%c AngVec,ActStag,Count,E0,MapVet) +%c This function is responsible for implementing an all-optical FFT. It +%c is possíble to create an FFT of any size. Albeit, one must understand +%c it’s limitations such as the granularity problem. This process takes on +%c account angel from 0 to 180 degrees and this interval is divided by 2 to +%c the power of N where N is the order of the FFT. For instance, if the +%c user need to filter 32 carriers it will have an FFT process of order 5 +%c hence the interval will be 5.6250, therefore in practice to implement +%c the MZI it needs to accurately create phase delays spaced of 5.6250. +%c Another problem is, the carriers are shuffled by this FFT, and for a +%c perfect FFT implementation, the exact phase delay must be added to the +%c right signal at the right time. This function also returns a vector map +%c that indicates where each carrier is, thus the user can use this vector +%c to correctly extract the right carrier. The following illustration +%c better demonstrates the output mapping vector for an FFT of order 5. +%c +%c Ein : Is the input fild +%c MZI : Is the Mach-Zehnder Interferometre +%c Nº : The number are each carrier from 1 to 32 within Ein +%c +%c /1 +%c (MZI) +%c / 1 \17 +%c (MZI) +%c / \ 9 /9 +%c / 1 (MZI) +%c (MZI) \25 +%c / \ 5 /5 +%c / \ (MZI) +%c / \ / 5 \21 +%c / (MZI) +%c / \ 13 /13 +%c / 1 (MZI) +%c (MZI) \29 +%c / \ 3 /3 +%c / \ (MZI) +%c / \ / 3 \19 +%c / \ (MZI) +%c / \ / \ 11 /11 +%c / \ / 3 (MZI) +%c / (MZI) \27 +%c / \ 7 /7 +%c / \ (MZI) +%c / \ / 7 \23 +%c / (MZI) +%c / \ 15 /15 +%c / (MZI) +%c / 1 \31 +%cEin---(MZI) +%c \ 2 /2 +%c \ (MZI) +%c \ / 2 \18 +%c \ (MZI) +%c \ / \ 10 /10 +%c \ / 2 (MZI) +%c \ (MZI) \26 +%c \ / \ /6 +%c \ / \ 6 (MZI) +%c \ / \ / 6 \22 +%c \ / (MZI) +%c \ / \ 14 /14 +%c \ / 2 (MZI) +%c (MZI) \30 +%c \ 4 /4 +%c \ (MZI) +%c \ / 4 \20 +%c \ (MZI) +%c \ / \ 12 /12 +%c \ / 4 (MZI) +%c (MZI) \28 +%c \ 8 /8 +%c \ (MZI) +%c \ / 8 \24 +%c (MZI) +%c \ 16 /16 +%c (MZI) +%c \32 +%c Each MZI vertically aligned correspond to one Stage of the OFFT. +%c +%c +%c +%c +%c +%c Created by P.Marciano LG +%c 11/01/2018 +%c Last UpDate +%c 12/01/2018 +%c pablorafael.mcx@gmail.com +%c +%c Refences: +%c@article{hillerkuss2010simple, +%c title={Simple all-optical FFT scheme enabling Tbit/s real-time signal processing}, +%c author={Hillerkuss, D and Winter, M and Teschke, M and Marculescu, A and Li, J and Sigurdsson, G and Worms, K and Ezra, S Ben and Narkiss, N and Freude, W and others}, +%c journal={Optics express}, +%c volume={18}, +%c number={9}, +%c pages={9324--9340}, +%c year={2010}, +%c publisher={Optical Society of America} +%c} +%c +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c G L O B A L V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%cEout,Count,MapVet]=OpticalFFTN(t,SymPer,StopPoint,E1,AngVec,... + % ActStag,Count,E0,MapVet) +%c OpticalFFT +%c +%c Input: +%c t : Time vector of the whole simulation [s] +%c SymPer : Symble Period [s] +%c StopPoint : Maximum number of stages need [u] +%c E1 : Actual input field for the FFT [-] +%c AngVec : Brings the phase shifft for the current stage [rad] +%c ActStag : Current interaction stage [u] +%c Count : variable to control the expansion of the phase delay [u] +%c E0 : Signal is equal to zero if not otherwise given [-] +%c MapVet : Map vector to locate the actual carriers at the output [u] +%c +%c Output: +%c Eout : Final and partial output signal [-] +%c Count : variable to control the expansion of the phase delay [u] +%c MapVet : Map vector to locate the actual carriers at the output [u] +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%% +% At the very first part of this iscript, it is necessary to be sure that +% all variable that will be used are needed to be correctly initialized. +% In addition, this function is called recursivaly. Thus, it is important +% to think in all possible steps . + + if nargin<4 || nargin==5 || nargin==6 + %If the input argument is underspecified an error will be displayed + error(['Input Arguments are not enougth. Please check this ' + 'function Call!']); + + elseif nargin == 4%The minimum input arguments required. + AngVec = 0; %The first angle is zero + ActStag = 1; %For the FFT at it's first order + Count = ones(1,StopPoint); %Control variable initialized + E0 = zeros(1,length(E1)); %Variable for the second input of the MZI + MapVet = 1; %At the stage 1 the first carrier is 1 + elseif nargin<8 + E0 = zeros(1,length(E1)); %Variable for the second input of the MZI + MapVet = 1; %At the stage 1 the first carrier is 1 + elseif nargin<9 + MapVet = 1; %At the stage 1 the first carrier is 1 + end + + %% Delay Interferometer +% There is where the magic of this sistme happens. Basically saying, +% by given the time signal a time delay and a phase delay. Those two +% parameters will not affect the data. But when the input signal is +% divided half of it passes through a light path and it is not changed. +% The second half will pass through another light path and through the +% application of a voltage it is possible to delay the signal by +% changing material characteristics. As a result, the second signal will +% have time and phase differences from the other signal. When those two +% components combine again at the end to DI there will be constructive +% and destructive results in both signals. At the end, the DI outputs +% two signals where one carrier the even components of the sub-carries +% and the other carriers the odd components of the input signal. Thus, +% it was implemented the first step of the Optical FFT. + + TimDel = SymPer/(2^ActStag); %Create the time delay + PhaDel = AngVec(Count(ActStag)); %Acquiring the time delay + [Eout1,Eout2] = DelayInterfExp(f,TimDel,PhaDel,E1,E0); %Sends the input signal to the DI + + Count(ActStag) = Count(ActStag) + 1; %Takin in account the current interaction + ActStag = ActStag + 1; %Marking the occurence of the current stage + + %% Checking for recursivity +% At this point it is needed to evaluate in which interaction the program +% is and if it gets to an end. As stop criteria, the variable ActStag, +% indicates in wich stage the script is hence when the value of Actstag is +% equal to the StopPoint, which means that the number of stages for the +% program It has got to an end. + if ActStag>StopPoint + MapVet = [MapVet MapVet+2^(ActStag-2)]; + Eout = [Eout1;Eout2]; + else%Otherwise move to the next stage + n = ActStag-1; %Auxiliar variable to calculate the step + MyStep = pi/(2^n); %Step for the phase delay + AngVec = [AngVec AngVec+MyStep]; %Calculating the phase delay for this current interaction + Vetaux = MapVet+2^(ActStag-2); %Calculating the carrier of thie current interaction + + [EoutAux1,Count,MyVetAux1] = OpticalFFTN(f,SymPer,StopPoint,... + Eout2,AngVec,ActStag,Count,E0,Vetaux);%Calculating the next interaction of the FFT + [EoutAux2,Count,MyVetAux2] = OpticalFFTN(f,SymPer,StopPoint,... + Eout1,AngVec,ActStag,Count,E0,MapVet);%Calculating the next interaction of the FFT + + MapVet = [MyVetAux2 MyVetAux1]; %Storing the received mapping vector. + Eout = [EoutAux2;EoutAux1]; %Storing the received Output from the FFT. + end +end + +% while Stage<=StopPoint +% +% % else +% n = Stage-1; +% m = length(AngVec); +% MyStep = pi/(2^n); +% MyVec = zeros(1,2^n); +% MyVec(1:m) = AngVec; +% for kk=1:m +% MyVec(m+kk) = AngVec(kk) + MyStep; +% MyVec.*(180/pi) +% a=2; +% end +% AngVec = MyVec; +% Stage = Stage + 1; +% % Eout = expfunc(Stage,AngVec,StopPoint); +% end \ No newline at end of file diff --git a/Ring_Resonator/README.asv b/Ring_Resonator/README.asv new file mode 100644 index 0000000..51556d0 --- /dev/null +++ b/Ring_Resonator/README.asv @@ -0,0 +1,4 @@ +# integrate-optics +This repository will be used for developing coding in different software for creating and testing optical devices that will be used integrated with electronic circuits. + +This is a first draft, later on this file will be modified to better explaing the projects here under development. diff --git a/Ring_Resonator/README.md b/Ring_Resonator/README.md new file mode 100644 index 0000000..435fa1f --- /dev/null +++ b/Ring_Resonator/README.md @@ -0,0 +1,6 @@ +# integrate-optics +This repository will be used for developing coding in different software for creating and testing optical devices that will be used integrated with electronic circuits. + +This is a first draft, later on this file will be modified to better explaing the projects here under development. + +It is important to add the "matlab_tools" folder to the path directory of your matlabt for the codes here to proper work. diff --git a/Ring_Resonator/Ring_Resonator_Singlebus.m b/Ring_Resonator/Ring_Resonator_Singlebus.m new file mode 100644 index 0000000..e269118 --- /dev/null +++ b/Ring_Resonator/Ring_Resonator_Singlebus.m @@ -0,0 +1,62 @@ +function [Eout,Edrop,Tout]=Ring_Resonator(lambda,Ein,V0) + +neff = 2.61; +Rlength = 10e-6*2*pi; +alpha = -log(10^(-7/10)); +a = exp(-alpha*Rlength/2); +k = 0.274; +r = sqrt(1-k^2); +gap = 10e-6; + +neff = 4.18 - (900000.*lambda); + +%mode=0, Ring Resonator +%mode=1, Ring Resonator Modulator +mode=1; +if (mode==0) + + Beta=(2*pi*neff)./(lambda); + teta=(Beta.*Rlength); + +elseif (mode==1) + + Beta=(2*pi*neff)./(lambda); + Vpi=7; + teta = (Beta.*Rlength)+((pi*V0*0.88)/Vpi); + +end + + +%type=0, Ring Resonator all-pass +%type=1, Ring Resonator add-drop +type=0; +if (type==0) + +% Eout = Ein.*((r-a*exp(j*teta)))./(1-conj(r)*a*exp(j*teta)); + +% Eout = Ein.*(exp(1j*(pi+teta)).*((a-r*exp(-1j*teta))./(1-r*a*exp(1j*teta)))); + + Eout = Ein.*((-sqrt(a)+r*exp(-1j*teta)) ./ (-sqrt(a)*conj(r)+exp(-1j*teta))); + +% Tout = Ein.*(((a^2)+(r^2)-(2*a*r*cos(teta)))./(1+((r*a)^2)-(2*a*r*cos(teta)))); + + Tout = 0; + + Edrop = 0; + +elseif (type==1) + + Eout=(r-conj(r)*sqrt(a)*exp(1j*teta)) ./ (1-sqrt(a)*(conj(r)^2).*exp(1j*teta)); + + Edrop=(conj(k)*conj(k)*sqrt(a*exp(1j*teta))) ./ (1-sqrt(a)*conj(r)^2*exp(1j*teta)); + + Tout=0; + +end + + + + + + + diff --git a/Ring_Resonator/Set_MZ_Input_Data_Simp.m b/Ring_Resonator/Set_MZ_Input_Data_Simp.m new file mode 100644 index 0000000..5bc4cb6 --- /dev/null +++ b/Ring_Resonator/Set_MZ_Input_Data_Simp.m @@ -0,0 +1,76 @@ +function [ FileName ] = Set_MZ_Input_Data( FileIdex,L,U0,U_pi1,U_pi2,... + eta1,eta2,nopt,nel,alfa_ins,phi_0,alfa0,Local) +%% %c Generate Input Files for MZM +%c +%c function [ FileName ] = Set_MZ_Input_Data( FileIdex,L,U0,U_pi1,U_pi2,... +%c eta1,eta2,nopt,nel,alfa_ins,phi_0,alfa0,Local) +%c +%c by P.Marciano LG +%c 5/10/2017 +%c pablorafael.mcx@gmail.com +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c Generator of Input File for the Modulador Mach-Zehnder +%c +%c Input: +%c FileIdex : Number of the file in the sequence given by variable S +%c L : Comprimento do dispositivo [cm] +%c U0 : Tensao de polarizacao [V] +%c eletrodes : Numero de eletrodos (1,2). Definido pelo numero de +%c variaveis de entrada na funcao Mach_Zehnder_Modulator +%c U_pi1 : Tensao de chaveamento para 1 eletrodo [V] +%c U_pi2 : Tensao de chaveamento para 2 eletrodos [V] +%c eta1 : Sensibilidade no caminho 1 [1/V.m] +%c eta2 : Sensibilidade no caminho 2 [1/V.m] +%c nopt : Indice de refracao optico +%c nel : Indice de refracao eletrico +%c alfa_ins : Perda por insercao [dB] +%c phi_0 : Constante de fase entre os dois caminhos +%c alfa0 : Perda condutiva [dB/cm.GHz^0.5] +%c Local : Variavél onde os arquivos serão salvos +%c +%c Output: +%c FileName : Nome do arquivo gerado +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%% +if nargin==12 %Verify if the storage folder was passed to this function + Local = [pwd '\'];%if not the files will be saved on the current folder +elseif nargin<12%Verify if there is all parameters needed +error('Not enough input arguments for Set_MZ_Input_Data'); +end + +%Location and name of the input file to be created +Name = [Local 'AA_MZ_Input_Data_t' num2str(FileIdex) '.m']; +fid = fopen( Name, 'wt' ); +ContTimeOut = toc; +while(fid<3) + if ((toc-ContTimeOut)/60)>5 + break; + end + fid = fopen( Name, 'wt' ); +end +%opening the file or creating it +%writing in the file the parameters passed to this function +fprintf( fid, '%6.2f\n',L); +fprintf( fid, '%6.3f\n',U0); +fprintf( fid, '%6.2f\n',U_pi1); +fprintf( fid, '%6.2f\n',U_pi2); +fprintf( fid, '%6.2f\n',eta1); +fprintf( fid, '%6.2f\n',eta2); +fprintf( fid, '%6.2f\n',nopt); +fprintf( fid, '%6.2f\n',nel); +fprintf( fid, '%6.2f\n',alfa_ins); +fprintf( fid, '%6.2f\n',phi_0); +fprintf( fid, '%6.2f\n',alfa0); + +fclose(fid);%closing the file + +FileName = ['MZ_Input_Data_t' num2str(FileIdex)];%Passing out the file +end \ No newline at end of file diff --git a/Ring_Resonator/main.m b/Ring_Resonator/main.m new file mode 100644 index 0000000..b8d811a --- /dev/null +++ b/Ring_Resonator/main.m @@ -0,0 +1,62 @@ +clear all; +clc; + +Local = [pwd '\input_files\']; +MZ_Input_File ='MZ_Input_Data'; +MZ_Input_Data; + +nNyx = 2^10; +fc = 12.5e9; +T = 1/fc; +nT = 10; +tf = T*nT +t = linspace(0,tf,nNyx*nT); +f = time2freq(t); + +lambda = linspace(1500*1e-9,1600*1e-9,nNyx*nT) + +% lambda = 1500*1e-9; + +Ein = ones(1,length(t)); + +% Sinal = randint(1,nT,2); +Sinal = [0 0 0 0 1 1 0 0 0 0]; +% Sinal(Sinal==0)= -1; +Sinalret = rectpulse(Sinal,nNyx); +Sinal_steps = length(Sinalret); + +for i=-2:0.5:0 + + V0 = i + (0*sin(2*pi*fc*t)); + [Eout,Edrop,Tout] = Ring_Resonator_Singlebus(lambda,Ein,V0); + plot(lambda,Eout); + hold on + axis([1500e-9 1600e-9 -1.5 1.5]); + xlabel('wavelength') + ylabel('Eout') + +end + + + +% [Eout,Edrop,Tout] = Ring_Resonator_Singlebus(lambda,Ein,V0); +% load C:/Users/Thiago/Desktop/testestets.mat; +% ax1 = axes; +% lum.x0 = lum.x0*10^-9; +% lum.y0 = (lum.y0-min(lum.y0))/(max(lum.y0)-min(lum.y0)); +% Eout = (Eout-min(Eout))/(max(Eout)-min(Eout)); +% plot(lum.x0,lum.y0) +% % plot(lambda,Eout,lum.x0,lum.y0); +% axis([1500e-9 1600e-9 -0.5 1.5]); +% % legend('MatLab','Lumerical'); +% xlabel('Wavelength') +% ylabel('Eout normalizado') + + + +% plot(f,Tout); +% axis([-8e7 8e7 -2 2]); + + + + diff --git a/Ring_Resonator/main_inputdata.asv b/Ring_Resonator/main_inputdata.asv new file mode 100644 index 0000000..1d4b3cc --- /dev/null +++ b/Ring_Resonator/main_inputdata.asv @@ -0,0 +1,100 @@ +%c +%c ..'Ž`'..'Ž`..'Ž`.. +%c File: main_inputdata +%c +%c This code is used to set up the input parameters that will be used +%c in the whole simualation. +%c +%c +%c +%c +%c +%c by P.Marciano LT +%c 04/11/2019 +%c pablorafael.mcx@gmail.com +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c G L O B A L V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c +%c +%c t :This is the time vector for your simulation, it +%c will run just as much periods of your signal you +%c need and/or want to simulate. [s] +%c f :This is the frequency vector for your simulation, it +%c will run just as much periods of your signal you need +%c and/or want to simulate. [Hz] +%c Po :The power of the signal [w] +%c Eo_CW :This is the Amplitude of the signal [V] +%c nsamp :numpre of up sampling [-] +%c M :Order of Gausian filter [-] +%c m :Modulation number [-] +%c k :Number of bits per simble [-] +%c p :Auxiliar variable to store the current directory [-] +%c Local :It stores where the files for the MZM will be stored [-] +%c L :Comprimento do dispositivo [cm] +%c U0 :Tensao de polarizacao [V] +%c eletrodes :Numero de eletrodos (1,2). Definido pelo +%c numero de variaveis de entrada na funcao +%c Mach_Zehnder_Modulator [-] +%c U_pi1 :Tensao de chaveamento para 1 eletrodo [V] +%c U_pi2 :Tensao de chaveamento para 2 eletrodos [V] +%c eta1 :Sensibilidade no caminho 1 [1/V.m] +%c eta2 :Sensibilidade no caminho 2 [1/V.m] +%c nopt :Indice de refracao optico [-] +%c nel :Indice de refracao eletrico [-] +%c alfa_ins :Perda por insercao [dB] +%c phi_0 :Constante de fase entre os dois caminhos [-] +%c alfa0 :Perda condutiva [dB/cm.GHz^0.5] +%c C :Parametro de chirp [-] +%c +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c Here it will be added the functions that this code will call +%c +%c +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Start of the Program % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +close all; clc; clear; +%% +% Variable of the program + +fc = 1e9; % Center frequency of the optical carrier +Nyq = 2^4; % Nyquest number +F = 1e6; % Center frequency of the electrical signal +T = 1/F; % Electrical signal Period +NuT = 2^4; % Number of periods of the electrical signal on this simulation +tf = NuT*T; % Final time of this simulation +Fa = Nyq*fc; % Sampling Ratio of the electrical signal +Ta = 1/Fa; % Sampring period of the electrical signal +NumPon = tf/Ta;% Total number of points for this simulation +t = linspace(0,tf,NumPon+1); % Time vector for this simulation +f = time2freq(t); % Frequency vector for this simulation +Cw = ones(1,length(t)); +Amp1 = 1; % Amplitudo of the electrical signal +Amp2 = 1; % Amplitudo of the electrical signal + +pha1 = 90*pi/180; +pha2 = 180*pi/180; + +ElecSing.U1t = Amp1.*sin(2*pi*F*t + pha1); +ElecSing.U2t = Amp2.*sin(2*pi*F*t + pha2); + +figure; +plot(t,seno); + +figure +plot((f),20*log10(abs(fftshift(fft(seno)./length(seno)))),(f),20*log10(abs(fftshift(fft(Cw)./length(Cw))))) + + +a=1; \ No newline at end of file diff --git a/Ring_Resonator/main_inputdata.m b/Ring_Resonator/main_inputdata.m new file mode 100644 index 0000000..765f0bb --- /dev/null +++ b/Ring_Resonator/main_inputdata.m @@ -0,0 +1,122 @@ +%c +%c ..'Ž`'..'Ž`..'Ž`.. +%c File: main_inputdata +%c +%c This code is used to set up the input parameters that will be used +%c in the whole simualation. +%c +%c +%c +%c +%c +%c by P.Marciano LT +%c 04/11/2019 +%c pablorafael.mcx@gmail.com +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c G L O B A L V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c +%c +%c t :This is the time vector for your simulation, it +%c will run just as much periods of your signal you +%c need and/or want to simulate. [s] +%c f :This is the frequency vector for your simulation, it +%c will run just as much periods of your signal you need +%c and/or want to simulate. [Hz] +%c Po :The power of the signal [w] +%c Eo_CW :This is the Amplitude of the signal [V] +%c nsamp :numpre of up sampling [-] +%c M :Order of Gausian filter [-] +%c m :Modulation number [-] +%c k :Number of bits per simble [-] +%c p :Auxiliar variable to store the current directory [-] +%c Local :It stores where the files for the MZM will be stored [-] +%c L :Comprimento do dispositivo [cm] +%c U0 :Tensao de polarizacao [V] +%c eletrodes :Numero de eletrodos (1,2). Definido pelo +%c numero de variaveis de entrada na funcao +%c Mach_Zehnder_Modulator [-] +%c U_pi1 :Tensao de chaveamento para 1 eletrodo [V] +%c U_pi2 :Tensao de chaveamento para 2 eletrodos [V] +%c eta1 :Sensibilidade no caminho 1 [1/V.m] +%c eta2 :Sensibilidade no caminho 2 [1/V.m] +%c nopt :Indice de refracao optico [-] +%c nel :Indice de refracao eletrico [-] +%c alfa_ins :Perda por insercao [dB] +%c phi_0 :Constante de fase entre os dois caminhos [-] +%c alfa0 :Perda condutiva [dB/cm.GHz^0.5] +%c C :Parametro de chirp [-] +%c +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c Here it will be added the functions that this code will call +%c +%c +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Start of the Program % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +close all; clc; clear; +%% Files parameters +p = pwd; %Geting the current path of the main program +Local = [p '\input_files\'];%variable that shows where the input files for + %the mzm will be saved + +%% MZM Parameters +MZ_Input_Data; %Loading the basic data to be saved +L = 10.00; +% U0 = 2.390; +U_pi1 = 3.80; +U_pi2 = 3.80; +eta1 = 89.00;%1;% +eta2 = -12.70;%-1;% +nopt = 2.17; +nel = 2.60; +alfa_ins = 5.10; +phi_0 = 0.00; +alfa0 = 1.07; +% C = (eta1+eta2)/(eta1-eta2); +% alfa0 = 10^(alfa0/20); + +%% Variable of the program +fc = 1e9; % Center frequency of the optical carrier +Nyq = 2^4; % Nyquest number +F = 1e6; % Center frequency of the electrical signal +T = 1/F; % Electrical signal Period +NuT = 2^4; % Number of periods of the electrical signal on this simulation +tf = NuT*T; % Final time of this simulation +Fa = Nyq*fc; % Sampling Ratio of the electrical signal +Ta = 1/Fa; % Sampring period of the electrical signal +NumPon = tf/Ta;% Total number of points for this simulation +t = linspace(0,tf,NumPon+1); % Time vector for this simulation +f = time2freq(t); % Frequency vector for this simulation +Cw = ones(1,length(t)); +Amp1 = 1; % Amplitudo of the electrical signal +Amp2 = 1; % Amplitudo of the electrical signal + +pha1 = 90*pi/180; % Phase of the electrical signal +pha2 = 180*pi/180; % Phase of the electrical signal + +ElecSing.U1t = Amp1.*sin(2*pi*F*t + pha1); % One modulating electrical signal +ElecSing.U2t = Amp2.*sin(2*pi*F*t + pha2); % Other modulating electrical signal + +Vbias = -8:0.1:8; % Polarizatin voltage +Vbias_steps = length(Vbias); % The total number of different polarizations + +figure; +plot(t,ElecSing.U1t,t,ElecSing.U2t); + +figure +plot((f),20*log10(abs(fftshift(fft(ElecSing.U1t)./length(ElecSing.U1t)))),(f),20*log10(abs(fftshift(fft(ElecSing.U2t)./length(ElecSing.U2t)))),(f),20*log10(abs(fftshift(fft(Cw)./length(Cw))))) + + +a=1; \ No newline at end of file diff --git a/Ring_Resonator/matlab_tools/Import_Data_MZM.m b/Ring_Resonator/matlab_tools/Import_Data_MZM.m new file mode 100644 index 0000000..73064e9 --- /dev/null +++ b/Ring_Resonator/matlab_tools/Import_Data_MZM.m @@ -0,0 +1,107 @@ +function [L,U0,U_pi1,U_pi2,eta1,eta2,nopt,nel,alfa_ins,phi_0,C,alfa0] = ... + Import_Data_MZM (FileIndex,Local) +%% Import data from text file. +%cfunction [L,U0,U_pi1,U_pi2,eta1,eta2,nopt,nel,alfa_ins,phi_0,C,alfa0]=... +%c Import_Data_MZM (FileIndex,Local) +%c Script for importing data from the following text file: +%c +%c [pwd '\input_files\AA_MZ_Input_Data_t' num2str(FileIndex) '.m']; +%c +%c To extend the code to different selected data or a different text file, +%c generate a function instead of a script. +%c +%c Auto-generated by MATLAB on 2017/10/04 11:05:03 +%c +%c +%c +%c Updated by P.Marciano LG +%c 18/10/2017 +%c pablorafael.mcx@gmail.com +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c G L O B A L V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c Import_Data_MZM +%c +%c Input: +%c FileIndex : Indentifier of the file to be load into the workspace [-] +%c Local : Current path for the location of the files [-] +%c +%c Output: +%c L : Comprimento do dispositivo [cm] +%c U0 : Tensao de polarizacao [V] +%c U_pi1 : Tensao de chaveamento para 1 eletrodo [V] +%c U_pi2 : Tensao de chaveamento para 2 eletrodos [V] +%c eta1 : Sensibilidade no caminho 1 [1/V.m] +%c eta2 : Sensibilidade no caminho 2 [1/V.m] +%c nopt : Indice de refracao optico [-] +%c nel : Indice de refracao eletrico [-] +%c alfa_ins : Perda por insercao [dB] +%c phi_0 : Constante de fase entre os dois caminhos [-] +%c C : Parametro de chirp [?] +%c alfa0 : Perda condutiva [dB/cm.GHz^0.5] +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%% +%% Initialize variables. +if nargin<2 %Check if there is a specific laction to look for the files + filename = [pwd '\input_files\AA_MZ_Input_Data_t' num2str(FileIndex)...%If not assume that there is a input_files folder + '.m']; +else + filename = [Local 'AA_MZ_Input_Data_t' num2str(FileIndex) '.m']; %If yes, open the files on the given path +end +delimiter = ' '; + +%% Format string for each line of text: +% column1: double (%f) +% For more information, see the TEXTSCAN documentation. +formatSpec = '%f%[^\n\r]'; + +%% Open the text file. +fileID = fopen(filename,'r'); + +%% Read columns of data according to format string. +% This call is based on the structure of the file used to generate this +% code. If an error occurs for a different file, try regenerating the code +% from the Import Tool. +dataArray = textscan(fileID, formatSpec, 'Delimiter', delimiter, ... + 'MultipleDelimsAsOne', true, 'ReturnOnError', false); + +%% Close the text file. +fclose(fileID); + +%% Post processing for unimportable data. +% No unimportable data rules were applied during the import, so no post +% processing code is included. To generate code which works for +% unimportable data, select unimportable cells in a file and regenerate the +% script. + +%% Allocate imported array to column variable names +VarName1 = dataArray{:, 1}; + +L = VarName1(1); +U0 = VarName1(2); +U_pi1 = VarName1(3); +U_pi2 = VarName1(4); +eta1 = VarName1(5); +eta2 = VarName1(6); +nopt = VarName1(7); +nel = VarName1(8); +alfa_ins = VarName1(9); +phi_0 = VarName1(10); +alfa0 = VarName1(11); + +C = (eta1+eta2)/(eta1-eta2); % Parametro de chirp +alfa0 = 10^(alfa0/20); % [1/cm.GHz^0.5] + + +%% Clear temporary variables +clearvars filename delimiter formatSpec fileID dataArray ans; \ No newline at end of file diff --git a/Ring_Resonator/matlab_tools/MZ_Input_Data.m b/Ring_Resonator/matlab_tools/MZ_Input_Data.m new file mode 100644 index 0000000..2f31df0 --- /dev/null +++ b/Ring_Resonator/matlab_tools/MZ_Input_Data.m @@ -0,0 +1,72 @@ +%c +%c ..'Ž`'..'Ž`..'Ž`.. +%c +%c Arquivo de entrada usado pela funcao Mach_Zehnder_Modulator. Contem +%c informacoes sobre as caracteristicas fisicas do modulador Mach-Zehnder. +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c G L O B A L V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c L : Comprimento do dispositivo [cm] +%c U0 : Tensao de polarizacao [V] +%c eletrodes : Numero de eletrodos (1,2). Definido pelo +%c numero de variaveis de entrada na funcao +%c Mach_Zehnder_Modulator +%c U_pi1 : Tensao de chaveamento para 1 eletrodo [V] +%c U_pi2 : Tensao de chaveamento para 2 eletrodos [V] +%c eta1 : Sensibilidade no caminho 1 [1/V.m] +%c eta2 : Sensibilidade no caminho 2 [1/V.m] +%c nopt : Indice de refracao optico +%c nel : Indice de refracao eletrico +%c alfa_ins : Perda por insercao [dB] +%c phi_0 : Constante de fase entre os dois caminhos +%c alfa0 : Perda condutiva [dB/cm.GHz^0.5] +%c +%c by M.Segatto, S. Cani, B. Jesus e A. Togneri +%c 04/09/2002 +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +% + +L = 10; +U0 = 1.900; +U_pi1 = 3.8; +U_pi2 = 3.8; +eta1 = 89;% 89; +eta2 =-12.7;%-12.7; +% +nopt = 2.17; +nel = 2.60; +alfa_ins = 5.1; +phi_0 = 0.0; +alfa0 = 0.55; + +C = (eta1+eta2)/(eta1-eta2); % Parametro de chirp +alfa0 = 10^(alfa0/20); % [1/cm.GHz^0.5] + + +% +% L = 10; +% U0 = 0; +% U_pi1 = 0; +% U_pi2 = 0; +% eta1 = 89; +% eta2 = -12.7; +% % +% nopt = 1; +% nel = 2; +% alfa_ins = 5.1; +% phi_0 = 0.0; +% alfa0 = 0.55; +% % +% C = (eta1+eta2)/(eta1-eta2); % Parametro de chirp +% alfa0 = 10^(alfa0/20); % [1/cm.GHz^0.5] diff --git a/Ring_Resonator/matlab_tools/Mach_Zehnder_Modulator_simplificado.m b/Ring_Resonator/matlab_tools/Mach_Zehnder_Modulator_simplificado.m new file mode 100644 index 0000000..3b33e48 --- /dev/null +++ b/Ring_Resonator/matlab_tools/Mach_Zehnder_Modulator_simplificado.m @@ -0,0 +1,96 @@ +function [Eout,H] = Mach_Zehnder_Modulator_simplificado(t,Ein,U,MZ_Input_File) +%c +%c function [Eout,H] = Mach_Zehnder_Modulator(t,Ein,U1t,U2t,MZ_Input_File); +%c +%c This script is responsible to reproduce the output field of a MZM +%c modulator of one or two arms depending on the inputs. +%c +%c +%c Updated by P.Marciano LG +%c 18/09/2017 +%c pablorafael.mcx@gmail.com +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c G L O B A L V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c Modulador Mach-Zehnder +%c +%c Entrada: +%c t : Vetor de tempo [s] +%c Ein : Campo Eletrico de Entrada [V/m] +%c (dominio do tempo) +%c U1t : Tensao de entrada no braco 1 do modulador [V] +%c (dominio do tempo) +%c U2t : Tensao de entrada no braco 2 do modulador [V] +%c (dominio do tempo) +%c MZ_Input_File :Arquivo de entrada contendo parametros do modulador +%c +%c Saida +%c Eout : Campo Eletrico optico modulado no tempo [V/m] +%c H : Funcao de tranferencia eletrica do modulador +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c Usa: time2freq_lamb +%% +if (nargin <= 3), + MZ_Input_File ='MZ_Input_Data'; + load([MZ_Input_File '.m']); +else + [L,U0,U_pi1,U_pi2,~,~,nopt,nel,~,~,C,alfa0] = Import_Data_MZM (... + MZ_Input_File);%Import the data from files +end +if isstruct(U), + electrodes = 2; % Two arms modulator + U1t = U.U1t; + U2t = U.U2t; + U_pi = U_pi2; +else + electrodes = 1; % One arm modulator + U1t = U; + U_pi = U_pi1; +end +% +tps = t/1E-12; +ccmns = 30; % Velocidade da luz [cm/ns] +freqTHz = time2freq_lamb(tps); +freqGHz = freqTHz*1e-3; % Frequencia em GHz +freqGHz = -fftshift(freqGHz); +freqGHz(1) = freqGHz(2); +n = length(U1t); % Tamanho de U1t +% + +%%%%%%% FUNCAO DE TRANSFEWRENCIA ELETRICA DO MODULADOR %%%%%%%%%%% +% +alfaf = 0.5*alfa0*(abs(freqGHz).^0.5); +gamaf = 2*pi*abs(freqGHz).*(nel - nopt)/ccmns; +atn = alfaf + 1j*gamaf; +H = (1./(atn*L)).*(1 - exp(-atn*L)); +% +if (electrodes == 1), + U1f = fft(U1t); + U1t = real(ifft(U1f.*H)); + exp1 = exp(1j*C*(pi/2).*(U1t/U_pi)); + if C~=0 + Eout = Ein.*cos((pi/2).*(U1t - U0)/U_pi).*exp1; + else + Eout = Ein.*cos((pi/2).*(U1t - U0)/U_pi); + end +else + U1f = fft(U1t); + U1t = ifft(U1f.*H); + U2f = fft(U2t); + U2t = ifft(U2f.*H); + %The final part of the following equation is the Chirp parameter and it + %should not be removed, because it will be the key parameter to create + %the optical carriers at the same level. + Eout = Ein.*cos((pi/2).*(U1t - U2t - U0)/U_pi).*exp(-1j*(pi/2).*((U1t + U2t)/U_pi)); +end diff --git a/Ring_Resonator/matlab_tools/Make_MZ_Input_Files_Simp.m b/Ring_Resonator/matlab_tools/Make_MZ_Input_Files_Simp.m new file mode 100644 index 0000000..f5b43b1 --- /dev/null +++ b/Ring_Resonator/matlab_tools/Make_MZ_Input_Files_Simp.m @@ -0,0 +1,45 @@ +%c +%c ..'Ž`'..'Ž`..'Ž`.. +%c File: Make_MZ_Input_Files_Simp +%c(Creating the input file necessary for the MZM) +%c +%c This main code is resposible to call and load the right parameters +%c to be saved in a file for latter be used by the MZM +%c +%c +%c by P.Marciano LG +%c 18/08/2017 +%c Last UpDate +%c 23/12/2017 +%c pablorafael.mcx@gmail.com +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c G L O B A L V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c Here it will be added the functions that this code will call +%c +%c +%c Set_MZ_Input_Data. - Function that will create and load the files with +%c the given in data. +%c +%c +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Start of the Program % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +S=1; %Variabel that give the name for the input file +for Inc2=1:Vbias_steps%Secundary loop for the possible combinations + U0 = Vbias(Inc2);%Variation of the Vbias + [MZ_Input_Sdata] = Set_MZ_Input_Data_Simp(S,L,U0,U_pi1,U_pi2,eta1,... %Functionresponsible to create the input files + eta2,nopt,nel,alfa_ins,phi_0,alfa0,Local); + S = S+1; +end +% clear L U0 U_pi1 U_pi2 eta1 eta2 nopt nel alfa_ins phi_0 alfa0 C alfa0 \ No newline at end of file diff --git a/Ring_Resonator/matlab_tools/MeasPower.m b/Ring_Resonator/matlab_tools/MeasPower.m new file mode 100644 index 0000000..bff9e1c --- /dev/null +++ b/Ring_Resonator/matlab_tools/MeasPower.m @@ -0,0 +1,18 @@ +function [ThisPower,ThisPowerdBm] = MeasPower(Ein,t,InfLim,UpeLim) +%% + if nargin<2 + t = linspace(0,length(Ein),length(Ein)); + InfLim = t(1); + UpeLim = t(end); + elseif nargin<3 + InfLim = t(1); + UpeLim = t(end); + end + + ThisPower = sum(abs(Ein(find(t==InfLim):find(t==UpeLim))).^2)/(... + length(Ein(find(t==InfLim):find(t==UpeLim)))); + if nargout == 2 + ThisPowerdBm = 30 + 10*log10(ThisPower); + end + +end \ No newline at end of file diff --git a/Ring_Resonator/matlab_tools/Set_MZ_Input_Data_Simp.m b/Ring_Resonator/matlab_tools/Set_MZ_Input_Data_Simp.m new file mode 100644 index 0000000..ac4c2ae --- /dev/null +++ b/Ring_Resonator/matlab_tools/Set_MZ_Input_Data_Simp.m @@ -0,0 +1,76 @@ +function [ FileName ] = Set_MZ_Input_Data( FileIdex,L,U0,U_pi1,U_pi2,... + eta1,eta2,nopt,nel,alfa_ins,phi_0,alfa0,Local) +%% %c Generate Input Files for MZM +%c +%c function [ FileName ] = Set_MZ_Input_Data( FileIdex,L,U0,U_pi1,U_pi2,... +%c eta1,eta2,nopt,nel,alfa_ins,phi_0,alfa0,Local) +%c +%c by P.Marciano LG +%c 5/10/2017 +%c pablorafael.mcx@gmail.com +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c Generator of Input File for the Modulador Mach-Zehnder +%c +%c Input: +%c FileIdex : Number of the file in the sequence given by variable S +%c L : Comprimento do dispositivo [cm] +%c U0 : Tensao de polarizacao [V] +%c eletrodes : Numero de eletrodos (1,2). Definido pelo numero de +%c variaveis de entrada na funcao Mach_Zehnder_Modulator +%c U_pi1 : Tensao de chaveamento para 1 eletrodo [V] +%c U_pi2 : Tensao de chaveamento para 2 eletrodos [V] +%c eta1 : Sensibilidade no caminho 1 [1/V.m] +%c eta2 : Sensibilidade no caminho 2 [1/V.m] +%c nopt : Indice de refracao optico +%c nel : Indice de refracao eletrico +%c alfa_ins : Perda por insercao [dB] +%c phi_0 : Constante de fase entre os dois caminhos +%c alfa0 : Perda condutiva [dB/cm.GHz^0.5] +%c Local : Variavél onde os arquivos serão salvos +%c +%c Output: +%c FileName : Nome do arquivo gerado +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%% +if nargin==12 %Verify if the storage folder was passed to this function + Local = [pwd '\'];%if not the files will be saved on the current folder +elseif nargin<12%Verify if there is all parameters needed + error('Not enough input arguments for Set_MZ_Input_Data'); +end + +%Location and name of the input file to be created +Name = [Local 'AA_MZ_Input_Data_t' num2str(FileIdex) '.m']; +fid = fopen( Name, 'wt' ); +ContTimeOut = toc; +while(fid<3) + if ((toc-ContTimeOut)/60)>5 + break; + end + fid = fopen( Name, 'wt' ); +end +%opening the file or creating it +%writing in the file the parameters passed to this function +fprintf( fid, '%6.2f\n',L); +fprintf( fid, '%6.3f\n',U0); +fprintf( fid, '%6.2f\n',U_pi1); +fprintf( fid, '%6.2f\n',U_pi2); +fprintf( fid, '%6.2f\n',eta1); +fprintf( fid, '%6.2f\n',eta2); +fprintf( fid, '%6.2f\n',nopt); +fprintf( fid, '%6.2f\n',nel); +fprintf( fid, '%6.2f\n',alfa_ins); +fprintf( fid, '%6.2f\n',phi_0); +fprintf( fid, '%6.2f\n',alfa0); + +fclose(fid);%closing the file + +FileName = ['MZ_Input_Data_t' num2str(FileIdex)];%Passing out the file +end \ No newline at end of file diff --git a/Ring_Resonator/matlab_tools/time2freq.m b/Ring_Resonator/matlab_tools/time2freq.m new file mode 100644 index 0000000..6912a70 --- /dev/null +++ b/Ring_Resonator/matlab_tools/time2freq.m @@ -0,0 +1,18 @@ +function freq = time2freq(T) +% +% function freq = time2freq(T); +% +% Gera o vetor de freqüência para um dado vetor tempo para ser usado junto com a FFT. +% +% ENTRADA: +% T : Vetor tempo +% +% SAÍDA: +% freq : Vetor freqüência + +dT = mean(diff(T)); +nT = length(T); +nT2 = nT/2; +df = inv(dT*nT); +% +freq = df*(-nT2:nT2 - 1); \ No newline at end of file diff --git a/Ring_Resonator/matlab_tools/time2freq_lamb.m b/Ring_Resonator/matlab_tools/time2freq_lamb.m new file mode 100644 index 0000000..3e9119c --- /dev/null +++ b/Ring_Resonator/matlab_tools/time2freq_lamb.m @@ -0,0 +1,51 @@ +function [freq,lamb] = time2freq_lamb(T,lc) +%c +%c function [freq,lamb] = time2freq_lamb(T,lc); +%c +%c Gera os vetores de frequencia e comprimento de onda para um dado vetor +%c tempo. +%c +%c by : M.Segatto +%c Date : 2004 +%c email: segatto@ele.ufes.br +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c G L O B A L V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c Entrada: +%c T : Vetor tempo [ps] +%c lc : Comprimento de onda central [nm] +%c +%c Saida: +%c freq : Vetor frequencia [THz] +%c lamb : Vetor comprimento de onda [nm] +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +lamb = 0; +cnmps = 2.998E5; % Velocidade da luz [nm/ps] + +dT = mean(diff(T)); +nT = length(T); +df = inv(dT*nT); % [THz] +switch nargin + case 1 + fc = 0; + for n = 1:nT, + freq(n) = fc - (n - 1 - nT/2)*df; % [THz] vetor de freq + end + case 2 + fc = cnmps/lc; % [THz] + for n = 1:nT, + freq(n) = fc - (n - 1 - nT/2)*df; % [THz] vetor de freq + end + lamb = (cnmps./freq); % Gera vetor de lambdas [nm] +% + otherwise error('Numero de parametros de entrada nao confere...'); +end diff --git a/Ring_Resonator/ofc-mzi-generation b/Ring_Resonator/ofc-mzi-generation new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Ring_Resonator/ofc-mzi-generation @@ -0,0 +1 @@ + diff --git a/Ring_Resonator/time2freq.m b/Ring_Resonator/time2freq.m new file mode 100644 index 0000000..fbfbdb5 --- /dev/null +++ b/Ring_Resonator/time2freq.m @@ -0,0 +1,18 @@ +function freq = time2freq(T) +% +% function freq = time2freq(T); +% +% Gera o vetor de freqüência para um dado vetor tempo para ser usado junto com a FFT. +% +% ENTRADA: +% T : Vetor tempo +% +% SAÍDA: +% freq : Vetor freqüência + +dT = mean(diff(T)); +nT = length(T); +nT2 = nT/2; +df = inv(dT*nT); +% +freq = df*(-nT2:nT2 - 1); \ No newline at end of file diff --git a/Ring_Resonator/time2freq_lamb.m b/Ring_Resonator/time2freq_lamb.m new file mode 100644 index 0000000..e0d5ea3 --- /dev/null +++ b/Ring_Resonator/time2freq_lamb.m @@ -0,0 +1,51 @@ +function [freq,lamb] = time2freq_lamb(T,lc) +%c +%c function [freq,lamb] = time2freq_lamb(T,lc); +%c +%c Gera os vetores de frequencia e comprimento de onda para um dado vetor +%c tempo. +%c +%c by : M.Segatto +%c Date : 2004 +%c email: segatto@ele.ufes.br +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c G L O B A L V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c L I S T O F V A R I A B L E S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +%c Entrada: +%c T : Vetor tempo [ps] +%c lc : Comprimento de onda central [nm] +%c +%c Saida: +%c freq : Vetor frequencia [THz] +%c lamb : Vetor comprimento de onda [nm] +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c S T R U C T S % +%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%c +lamb = 0; +cnmps = 2.998E5; % Velocidade da luz [nm/ps] + +dT = mean(diff(T)); +nT = length(T); +df = inv(dT*nT); % [THz] +switch nargin + case 1 + fc = 0; + for n = 1:nT, + freq(n) = fc - (n - 1 - nT/2)*df; % [THz] vetor de freq + end + case 2 + fc = cnmps/lc; % [THz] + for n = 1:nT, + freq(n) = fc - (n - 1 - nT/2)*df; % [THz] vetor de freq + end + lamb = (cnmps./freq); % Gera vetor de lambdas [nm] +% + otherwise error('Numero de parametros de entrada nao confere...'); +end diff --git a/Ring_Resonator/untitled.jpg b/Ring_Resonator/untitled.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e8977de28f4da7fae1712521e55124be0a06545b GIT binary patch literal 18320 zcmeIZcU)B4vNgJptRSLfkR~ZfBqJcuD3T>fP9j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