Merge branch 'main' of cau-git.rz.uni-kiel.de:nt/mitarbeiter/silas/imdd_simulation
This commit is contained in:
@@ -26,7 +26,9 @@ classdef Duobinary
|
||||
M = numel(u);
|
||||
|
||||
%make unipolar
|
||||
if M == 4
|
||||
if M == 2
|
||||
data = data;
|
||||
elseif M == 4
|
||||
data = data .* sqrt(5);
|
||||
elseif M == 6
|
||||
data = data .* sqrt(10);
|
||||
@@ -59,7 +61,9 @@ classdef Duobinary
|
||||
bk = bk .* 2;
|
||||
bk = bk + b;
|
||||
|
||||
if M == 4
|
||||
if M == 2
|
||||
bk = bk;
|
||||
elseif M == 4
|
||||
bk = bk ./ sqrt(5);
|
||||
elseif M == 6
|
||||
bk = bk ./ sqrt(10);
|
||||
@@ -100,7 +104,9 @@ classdef Duobinary
|
||||
end
|
||||
|
||||
%make unipolar
|
||||
if options.M == 4
|
||||
if options.M == 2
|
||||
data = data;
|
||||
elseif options.M == 4
|
||||
data = data .* sqrt(5);
|
||||
elseif options.M == 6
|
||||
data = data .* sqrt(10);
|
||||
@@ -140,7 +146,9 @@ classdef Duobinary
|
||||
mean_power = sum((unique_points .^ 2) .* probabilities);
|
||||
scaling_factor = sqrt(mean_power);
|
||||
|
||||
if options.M == 4
|
||||
if options.M == 2
|
||||
data = data ./ sqrt(0.5);
|
||||
elseif options.M == 4
|
||||
data = data ./ sqrt(2.5); % 7-level constellation weighted with probability after DB code i.e. mean([-3 3 -2 -2 2 2 -1 -1 -1 1 1 1 0 0 0 0].^2) = 2.5 --> sqrt(2.5) == rms(constellation)
|
||||
elseif options.M == 6
|
||||
data = data ./ sqrt(5.8);
|
||||
@@ -186,7 +194,9 @@ classdef Duobinary
|
||||
end
|
||||
|
||||
%make unipolar
|
||||
if I == 7 || I == 6
|
||||
if I == 3
|
||||
data = data .* 0.5;
|
||||
elseif I == 7 || I == 6
|
||||
data = data .* sqrt(2.5);
|
||||
elseif I == 11
|
||||
data = data .* sqrt(5.8);
|
||||
@@ -206,7 +216,9 @@ classdef Duobinary
|
||||
data = data .* 2;
|
||||
data = data - round(mean(data));
|
||||
|
||||
if M == 4
|
||||
if M == 2
|
||||
data = data;
|
||||
elseif M == 4
|
||||
data = data ./ sqrt(5);
|
||||
elseif M == 6
|
||||
data = data ./ sqrt(10);
|
||||
|
||||
@@ -67,22 +67,29 @@ classdef Postfilter < handle
|
||||
|
||||
end
|
||||
|
||||
function showFilter(obj,noiseclass_in,options)
|
||||
function showFilter(obj,options)
|
||||
|
||||
arguments
|
||||
obj
|
||||
noiseclass_in
|
||||
options.noiseclass_in =[]
|
||||
options.fignum = 121
|
||||
options.color = []
|
||||
end
|
||||
|
||||
% noiseclass_in.spectrum('displayname','Noise PSD shifted to 0dBm','fignum',options.fignum,'normalizeTo0dB',1);
|
||||
|
||||
if ~isempty(options.noiseclass_in)
|
||||
len = length(options.noiseclass_in);
|
||||
fs = options.noiseclass_in.fs;
|
||||
else
|
||||
len = 1024;
|
||||
fs = 1;
|
||||
end
|
||||
|
||||
figure(options.fignum)
|
||||
[h,w] = freqz(1,obj.coefficients,length(noiseclass_in),"whole",noiseclass_in.fs);
|
||||
[h,w] = freqz(1,obj.coefficients,len,"whole",fs);
|
||||
h = h/max(abs(h));
|
||||
hold on
|
||||
w_ = (w - noiseclass_in.fs/2);
|
||||
w_ = (w - fs/2);
|
||||
|
||||
if isempty(options.color)
|
||||
plot(w_.*1e-9,20*log10(fftshift(abs(h))),'DisplayName',['Burg Coeffs: ', num2str(round(obj.coefficients,2)), ' '],'LineWidth',2);
|
||||
|
||||
@@ -59,8 +59,19 @@ classdef TransmissionPerformance
|
||||
1.03e-2, 9.29e-3, 8.33e-3, 7.54e-3, 7.04e-3, 4.70e-3];
|
||||
|
||||
%% LUT for KP4-FEC and Inner Code https://grouper.ieee.org/groups/802/3/dj/public/23_03/patra_3dj_01b_2303.pdf
|
||||
|
||||
CODE_RATE_KP4_AND_INNER = [0.885799];
|
||||
BERTHRESHOLDS_KP4_AND_INNER = 4.85e-3;
|
||||
|
||||
% https://www.ieee802.org/3/bs/public/14_11/parthasarathy_3bs_01a_1114.pdf
|
||||
CODE_RATE_KP4 = [1/(1+0.052)];%Reed-Solomon RS(544, 514) == KP4
|
||||
BERTHRESHOLDS_KP4 = 2.2e-4;
|
||||
|
||||
CODE_RATE_HDFEC = [1/(1+0.067)]; %Beyond 300 Gbps Short-Reach Links Using TFLN MZMs With 500 mVpp and Linear Equalization
|
||||
BERTHRESHOLDS_HDFEC = 3.8e-3;
|
||||
|
||||
CODE_RATE_O_FEC = [1/(1+0.15)]; %Stefano im Meeting
|
||||
BERTHRESHOLDS_O_FEC = 2e-2;
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user