new chirped modulator with alpha setting
dp_sync is softened
This commit is contained in:
@@ -765,7 +765,7 @@ classdef Signal
|
||||
|
||||
pkpos = sort(pkpos);
|
||||
|
||||
if mean(w) > 10 || mean(p) > 10
|
||||
if mean(w) > 10 || mean(p) > 15
|
||||
return
|
||||
else
|
||||
sequenceFound = 1;
|
||||
|
||||
@@ -15,6 +15,7 @@ classdef EML
|
||||
u_pi
|
||||
randomkey
|
||||
randomstream
|
||||
alpha
|
||||
|
||||
%on instance creation
|
||||
field
|
||||
@@ -38,6 +39,7 @@ classdef EML
|
||||
options.lambda;
|
||||
options.power;
|
||||
options.linewidth = 0;
|
||||
options.alpha = 0;
|
||||
options.ampl_imbal = 0;
|
||||
options.pha_imbal = 0;
|
||||
options.bias;
|
||||
@@ -101,9 +103,21 @@ classdef EML
|
||||
end
|
||||
|
||||
%modulate the laserfield with the electrical signal
|
||||
opt_out = obj.externalmodulation(laserfield,elec_in);
|
||||
laserfield = obj.externalmodulation(laserfield,elec_in);
|
||||
|
||||
% add chirp
|
||||
opt_out = obj.chirp(laserfield);
|
||||
|
||||
end
|
||||
|
||||
function chirped_field = chirp(obj,laserfield)
|
||||
|
||||
% Chirp
|
||||
p = abs(laserfield.^2);
|
||||
derv_p = [0; diff(p)];
|
||||
delta_phi = derv_p./(4*pi*p).*obj.alpha;
|
||||
delta_phi = cumsum(delta_phi);
|
||||
chirped_field = laserfield.*exp(1i*2*pi*delta_phi);
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ classdef Metricstruct
|
||||
date_of_processing (1,1) datetime = datetime('now')
|
||||
|
||||
numBits (1,1) double {mustBeInteger, mustBeNonnegative} = 0
|
||||
BER (1,1) double {mustBeNumeric, mustBeNonnegative, mustBeLessThanOrEqual(BER,1)} = 0
|
||||
BER (1,1) double {mustBeNumeric, mustBeNonnegative} = 0
|
||||
numBitErr (1,1) double {mustBeInteger, mustBeNonnegative} = 0
|
||||
BER_precoded (1,1) double {mustBeNumeric, mustBeNonnegative, mustBeLessThanOrEqual(BER_precoded,1)} = 0
|
||||
BER_precoded (1,1) double {mustBeNumeric, mustBeNonnegative} = 0
|
||||
numBitErr_precoded (1,1) double {mustBeInteger, mustBeNonnegative} = 0
|
||||
|
||||
SNR (1,1) double {mustBeNumeric} = NaN
|
||||
|
||||
Reference in New Issue
Block a user