Auto stash before merge of "main" and "origin/main"
This commit is contained in:
@@ -13,6 +13,7 @@ classdef EML
|
|||||||
pha_imbal
|
pha_imbal
|
||||||
bias
|
bias
|
||||||
u_pi
|
u_pi
|
||||||
|
randomkey
|
||||||
|
|
||||||
%on instance creation
|
%on instance creation
|
||||||
field
|
field
|
||||||
@@ -40,17 +41,13 @@ classdef EML
|
|||||||
options.pha_imbal = 0;
|
options.pha_imbal = 0;
|
||||||
options.bias;
|
options.bias;
|
||||||
options.u_pi;
|
options.u_pi;
|
||||||
|
options.randomkey = 2023;
|
||||||
end
|
end
|
||||||
|
|
||||||
obj.mode = options.mode;
|
fn = fieldnames(options);
|
||||||
obj.fsimu = options.fsimu;
|
for l = 1:numel(fn)
|
||||||
obj.lambda = options.lambda;
|
obj.(fn{l}) = options.(fn{l});
|
||||||
obj.power = options.power;
|
end
|
||||||
obj.linewidth = options.linewidth;
|
|
||||||
obj.ampl_imbal = options.ampl_imbal;
|
|
||||||
obj.pha_imbal = options.pha_imbal;
|
|
||||||
obj.bias = options.bias;
|
|
||||||
obj.u_pi = options.u_pi;
|
|
||||||
|
|
||||||
obj.field=sqrt(10^(obj.power/10-3)); %dbm to sqrt(mw)
|
obj.field=sqrt(10^(obj.power/10-3)); %dbm to sqrt(mw)
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,14 @@ bitpattern = zeros(N,log2(M));
|
|||||||
% Symbol Rate
|
% Symbol Rate
|
||||||
fsym = 64e9;
|
fsym = 64e9;
|
||||||
% DAC Rate
|
% DAC Rate
|
||||||
fdac = 160e9;
|
fdac = 120e9;
|
||||||
|
|
||||||
% Simulation oversampling rate "k";
|
% Simulation oversampling rate "k";
|
||||||
kover = 16;
|
kover = 16;
|
||||||
|
|
||||||
% ADC Rate
|
% ADC Rate
|
||||||
fadc = 256e9;
|
fadc = 256e9;
|
||||||
|
|
||||||
% Simulation frequency in "analog domain"
|
% Simulation frequency in "analog domain"
|
||||||
fsimu = kover * fdac ;
|
fsimu = kover * fdac ;
|
||||||
|
|
||||||
@@ -35,17 +38,6 @@ amp = Amplifier("amp_mode","ideal_no_noise","amplification_db",0,"gain_mode","ou
|
|||||||
|
|
||||||
fib = Fiber("fsimu",fdac*kover,"fiber_length",0,"alpha",0.2,"D",17,"lambda0",1550);
|
fib = Fiber("fsimu",fdac*kover,"fiber_length",0,"alpha",0.2,"D",17,"lambda0",1550);
|
||||||
|
|
||||||
% %noise loading
|
|
||||||
% zeroDB_attenuator = Amplifier("amp_mode","ideal_no_noise","gain_mode","output_power","amplification_db",0);
|
|
||||||
%
|
|
||||||
% edfa_ = Amplifier("amp_mode","edfa_increase_nase","nase_mode","generate_ase","amplification_db",0,"noifig",33,"gain_mode","output_power");
|
|
||||||
%
|
|
||||||
% rop_amplifier = Amplifier("amp_mode","ideal_no_noise","amplification_db",-5,"gain_mode","output_power","nase_mode","pass_ase");
|
|
||||||
|
|
||||||
% X = zeroDB_attenuator.process(X);
|
|
||||||
% X = edfa_.process(X);
|
|
||||||
% X = rop_amplifier.process(X);
|
|
||||||
|
|
||||||
phdiode = Photodiode("fsimu",fdac*kover,"dark_current",2e-08,"responsivity",1,"temperature",20);
|
phdiode = Photodiode("fsimu",fdac*kover,"dark_current",2e-08,"responsivity",1,"temperature",20);
|
||||||
|
|
||||||
fil_diode = Filter('filtdegree',1,"f_cutoff",120e9,"fsamp",fdac,"filterType",filtertypes.bessel_inp);
|
fil_diode = Filter('filtdegree',1,"f_cutoff",120e9,"fsamp",fdac,"filterType",filtertypes.bessel_inp);
|
||||||
@@ -56,12 +48,11 @@ scp = Scope("fsimu",fdac*kover,"fadc",fadc,...
|
|||||||
"adcresolution",6,"quantbuffer",0.1);
|
"adcresolution",6,"quantbuffer",0.1);
|
||||||
|
|
||||||
eq = EQ("K",2,"plottrain",0,"plotfinal",1,...
|
eq = EQ("K",2,"plottrain",0,"plotfinal",1,...
|
||||||
"training_length",4096*2,"training_loops",5,...
|
"training_length",4096,"training_loops",5,...
|
||||||
"Ne",[50,9,9],"Nb",[0,0,0],...
|
"Ne",[50,0,0],"Nb",[0,0,0],...
|
||||||
"DCmu",0.005,"DDmu",[0.0004 0.0004 0.0004 0.0004 ],"DFEmu",0.005,"FFEmu",0.000,...
|
"DCmu",0.005,"DDmu",[0.0004 0.0004 0.0004 0.0004 ],"DFEmu",0.005,"FFEmu",0.000,...
|
||||||
"dd_loops",2,"epsilon",[10 100 1000 ],"M",4,...
|
"dd_loops",2,"epsilon",[10 100 1000 ],"M",4,...
|
||||||
"thres",[0.005 0.004 0.0005 ],"l1act",0,"delay",0,"rho",0.0005,"ideal_dfe",0);
|
"thres",[0.005 0.004 0.0005 ],"l1act",0,"delay",2,"rho",0.0005,"ideal_dfe",0,"DB_aim",0);
|
||||||
|
|
||||||
|
|
||||||
%% PROCESS
|
%% PROCESS
|
||||||
% INFORMATION SIGNAL
|
% INFORMATION SIGNAL
|
||||||
@@ -134,7 +125,7 @@ col = cbrewer2('Set1',4);
|
|||||||
figure(12)
|
figure(12)
|
||||||
sgtitle('Laser Linewidth = 10 MHz; SIR = 24 dB ; $N_{1,2}$ = 100')
|
sgtitle('Laser Linewidth = 10 MHz; SIR = 24 dB ; $N_{1,2}$ = 100')
|
||||||
subplot(1,4,1:2)
|
subplot(1,4,1:2)
|
||||||
scatter(xax,eq_out.signal,4,'.','MarkerEdgeColor',col(1,:),'DisplayName','No MPI Mitigation');
|
scatter(1:X.length,X.signal,4,'.','MarkerEdgeColor',col(2,:),'DisplayName','A1');
|
||||||
xlim([1, xax(end)]);
|
xlim([1, xax(end)]);
|
||||||
%ylim([-2 2]);
|
%ylim([-2 2]);
|
||||||
xlabel('Sampling Index')
|
xlabel('Sampling Index')
|
||||||
@@ -142,31 +133,12 @@ ylabel('Amplitude')
|
|||||||
legend
|
legend
|
||||||
|
|
||||||
subplot(1,4,3:4)
|
subplot(1,4,3:4)
|
||||||
scatter(1:X.length,X.signal,4,'.','MarkerEdgeColor',col(2,:),'DisplayName','A1');
|
scatter(xax,eq_out.signal,4,'.','MarkerEdgeColor',col(1,:),'DisplayName','No MPI Mitigation');
|
||||||
xlim([1, xax(end)]);
|
xlim([1, xax(end)]);
|
||||||
%ylim([-2 2]);
|
%ylim([-2 2]);
|
||||||
xlabel('Sampling Index')
|
xlabel('Sampling Index')
|
||||||
ylabel('Amplitude')
|
ylabel('Amplitude')
|
||||||
legend
|
legend
|
||||||
%
|
|
||||||
% subplot(1,4,3)
|
|
||||||
% scatter(xax,a2_out,4,'.','MarkerEdgeColor',col(3,:),'DisplayName','A2');
|
|
||||||
% xlim([1, xax(end)]);
|
|
||||||
% ylim([-2 2]);
|
|
||||||
% xlabel('Sampling Index')
|
|
||||||
% ylabel('Amplitude')
|
|
||||||
% legend
|
|
||||||
%
|
|
||||||
% subplot(1,4,4)
|
|
||||||
% scatter(xax,a1_a2_out,4,'.','MarkerEdgeColor',col(4,:),'DisplayName','A1+A2');
|
|
||||||
% xlim([1, xax(end)]);
|
|
||||||
% ylim([-2 2]);
|
|
||||||
% xlabel('Sampling Index')
|
|
||||||
% ylabel('Amplitude')
|
|
||||||
% legend
|
|
||||||
|
|
||||||
% set(gcf,'Units','centimeters')
|
|
||||||
% set(gcf,'Position',[2 2 25 10])
|
|
||||||
|
|
||||||
a = fftshift(xcorr(X.signal(1,:),circshift(bitpattern(:,1)',0)));
|
a = fftshift(xcorr(X.signal(1,:),circshift(bitpattern(:,1)',0)));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user