Update April

This commit is contained in:
Silas Oettinghaus
2024-04-19 10:31:36 +02:00
parent 025498d120
commit ed17953407
30 changed files with 3261 additions and 1580 deletions

View File

@@ -14,6 +14,7 @@ classdef EML
bias
u_pi
randomkey
randomstream
%on instance creation
field
@@ -49,6 +50,8 @@ classdef EML
obj.(fn{l}) = options.(fn{l});
end
obj.randomstream = RandStream('mlfg6331_64','Seed',obj.randomkey);
obj.field=sqrt(10^(obj.power/10-3)); %dbm to sqrt(mw)
obj.noisefactor=sqrt(2*pi*obj.linewidth/obj.fsimu);
@@ -105,8 +108,9 @@ classdef EML
end
function noi = createPhaseNoise(obj)
%create random vector
noi = randn(obj.signal_len/2,1);
noi = randn(obj.randomstream,obj.signal_len,1);
%scale with noisefactor
noi = noi * obj.noisefactor;
@@ -114,9 +118,6 @@ classdef EML
%cumsum to accumulate noise over time vector
noi = cumsum(noi);
noi = [noi ; flip(noi)];
end
function modulated_laserfield = externalmodulation(obj,laserfield,electrical_in)