Last commit after 400G Lab Measurement

This commit is contained in:
Silas Labor Zizou
2024-11-04 08:57:53 +01:00
parent cf4e0f2b12
commit 492f889dce
9 changed files with 669 additions and 266 deletions

View File

@@ -125,6 +125,13 @@ classdef Duobinary
%make bipolar
data = (data-round(mean(data),1));
[unique_points, ~, idx] = unique(data);
counts = accumarray(idx, 1);
total_samples = numel(data);
probabilities = counts / total_samples;
mean_power = sum((unique_points .^ 2) .* probabilities);
scaling_factor = sqrt(mean_power);
if 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 M == 6