Changes from mwork PC.

PDP 2025

MPI analysis

new focus on database and SQL
This commit is contained in:
Silas Oettinghaus
2025-03-21 08:11:40 +01:00
parent 402e491506
commit 74066d0669
36 changed files with 2234 additions and 620 deletions

View File

@@ -101,6 +101,17 @@ classdef FFE < handle
end
x = [zeros(floor(obj.order/2),1); x; zeros(obj.order,1)];
if training
mask = ones(obj.order,1);
else
mask = zeros(obj.order,1);
mask(900:end) = 1;
mask(ceil(length(obj.e)/2)) = 1;
end
mask = ones(obj.order,1);
for epoch = 1 : epochs
symbol = 0;
@@ -110,7 +121,7 @@ classdef FFE < handle
U = x(obj.order+sample-1:-1:sample);
y(symbol,1) = obj.e.' * U; % Calculating output of LMS __ * |
y(symbol,1) = (obj.e.*mask).' * U; % Calculating output of LMS __ * |
if training
d_hat(symbol,1) = d(symbol);
@@ -129,7 +140,6 @@ classdef FFE < handle
normalizationfactor = (U.' * U);
obj.e = obj.e - err(symbol) * U / normalizationfactor; % Weight update rule of NLMS
end
obj.error(epoch,symbol) = err(symbol) * err(symbol)'; % Instantaneous square error

View File

@@ -43,12 +43,12 @@ classdef Postfilter < handle
if ~isnan(options.useBurg) && options.useBurg
disp('using burg alg')
% disp('using burg alg')
obj.coefficients = arburg(noiseclass_in.signal,obj.ncoeff);
elseif ~isempty(options.coefficients)
disp('using given taps')
% disp('using given taps')
obj.coefficients = options.coefficients;
obj.useBurg = 0;

View File

@@ -70,7 +70,7 @@ classdef MLSE < handle
%%%% Separate the equalized signal into the respective levels based on the actually transmitted level
constellation = unique(data_ref);
decisionLevels = (constellation(1:end-1) + constellation(2:end)) / 2;
tx_bits = PAMmapper(numel(constellation),0).demap(data_ref);
tx_bits = PAMmapper(numel(constellation),0,"eth_style",1).demap(data_ref);
% impulse respnse i.e. [0.5, 1.0000]
@@ -188,10 +188,50 @@ classdef MLSE < handle
end
% Compute soft output PAM4 stream from the metric_sym
soft_output = zeros(length(data_in),1); % Expected symbol value per stage
symbol_prob = zeros(length(data_in), length(states)); % Store full probability distribution (optional)
llp = llp';
for n = 1:length(data_in)
metrics = llp(n, :); % A posteriori metric for each PAM4 candidate
% For numerical stability, subtract the maximum metric before exponentiating
maxMetric = min(metrics);
expMetrics = exp(metrics - maxMetric);
probs = expMetrics / sum(expMetrics); % Normalize to get probabilities
symbol_prob(n, :) = probs; % (Optional) store distribution for analysis
% Compute the soft output as the expected value of the PAM4 symbols
soft_output(n) = sum(probs .* constellation');
end
% Number of symbols and bits per symbol
num_symbols = constellation;
num_bits = 2; % 2 bits per symbol
bit_mapping = PAMmapper(4,0,"eth_style",1).showBitMapping; % Each row corresponds to the symbol above
% Initialize LLR storage
llr = zeros(num_bits, length(data_in));
% Compute bit-wise LLRs
for bit_idx = 1:num_bits
% Find indices where bit is 0 and where it is 1
idx_bit_0 = find(bit_mapping(:,bit_idx) == 0);
idx_bit_1 = find(bit_mapping(:,bit_idx) == 1);
% Sum over log-probabilities (Max-Log approximation: using min instead of sum)
llr(:,bit_idx) = min(llp(:,idx_bit_1), [], 1) - min(llp(:,idx_bit_0), [], 1);
end
% Convert LLR values to a hard-decision bit stream
bit_stream = llr < 0;
[~,~,ber_llr,~] = calc_ber(bit_stream',tx_bits,"skip_front",100,"skip_end",150,"returnErrorLocation",1);
fprintf('LLR BER : %.2e \n',ber_llr);
% directly decide based on lowest LLP index
[~,llp_based_state_seq]=min(llp);
LLP_EST(1:length(data_in)) = constellation(llp_based_state_seq);
rx_bits = PAMmapper(numel(constellation),0).demap(LLP_EST');
rx_bits = PAMmapper(numel(constellation),0,"eth_style",1).demap(LLP_EST');
[~,~,ber_llp,~] = calc_ber(rx_bits,tx_bits,"skip_front",100,"skip_end",150,"returnErrorLocation",1);
fprintf('LLP BER : %.2e \n',ber_llp);
% [~,~,ber_llp,~] = calc_ber(circshift(rx_bits,1),tx_bits,"skip_front",100,"skip_end",150,"returnErrorLocation",1);
@@ -200,7 +240,7 @@ classdef MLSE < handle
% fprintf('LLP BER -1: %.2e \n',ber_llp);
%%%% DECIDE based on Viterbi traceback
rx_bits = PAMmapper(numel(constellation),0).demap(VITERBI_ESTIMATION_SYMBOLS');
rx_bits = PAMmapper(numel(constellation),0,"eth_style",1).demap(VITERBI_ESTIMATION_SYMBOLS');
[~,~,ber_viterbi,~] = calc_ber(rx_bits,tx_bits,"skip_front",100,"skip_end",150,"returnErrorLocation",1);
fprintf('Viterbi BER: %.2e \n',ber_viterbi);
% [~,~,ber_viterbi,~] = calc_ber(circshift(rx_bits,1),tx_bits,"skip_front",100,"skip_end",150,"returnErrorLocation",1);
@@ -209,14 +249,14 @@ classdef MLSE < handle
% directly decide based on the FW path metrics
[~,fw_direct_state_seq]=min(pm_survivor_fw);
FW_EST(1:length(data_in)) = constellation(fw_direct_state_seq);
rx_bits = PAMmapper(numel(constellation),0).demap(FW_EST');
rx_bits = PAMmapper(numel(constellation),0,"eth_style",1).demap(FW_EST');
[~,~,ber_fw,~] = calc_ber(rx_bits,tx_bits,"skip_front",100,"skip_end",150,"returnErrorLocation",1);
fprintf('FW BER: %.2e \n',ber_fw);
% directly decide based on the BW path metrics
[~,bw_direct_state_seq]=min(pm_survivor_bw);
BW_EST(1:length(data_in)) = constellation(bw_direct_state_seq(2:end));
rx_bits = PAMmapper(numel(constellation),0).demap(BW_EST');
rx_bits = PAMmapper(numel(constellation),0,"eth_style",1).demap(BW_EST');
[~,~,ber_bw,~] = calc_ber(rx_bits,tx_bits,"skip_front",100,"skip_end",150,"returnErrorLocation",1);
fprintf('BW BER: %.2e \n',ber_bw);
% [~,~,ber_viterbi,~] = calc_ber(circshift(rx_bits,1),tx_bits,"skip_front",100,"skip_end",150,"returnErrorLocation",1);
@@ -224,6 +264,8 @@ classdef MLSE < handle
% [~,~,ber_viterbi,~] = calc_ber(circshift(rx_bits,-1),tx_bits,"skip_front",100,"skip_end",150,"returnErrorLocation",1);
% fprintf('BW BER: %.2e \n',ber_viterbi);
PAMmapper(4,0,"eth_style",1).showBitMapping
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tx_symbolpos = zeros(numel(constellation),length(data_ref));

View File

@@ -70,7 +70,7 @@ classdef TransmissionPerformance
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
CODE_RATE_O_FEC = [1/(1+0.153)]; %Stefano im Meeting
BERTHRESHOLDS_O_FEC = 2e-2;
@@ -162,6 +162,11 @@ classdef TransmissionPerformance
netrates.KP4_hamming.NetRate = NaN(1, numMeasurements);
netrates.KP4_hamming.CodeRate = NaN(1, numMeasurements);
netrates.KP4_hamming.Threshold = NaN(1, numMeasurements);
netrates.O_FEC.GrossRate = NaN(1, numMeasurements);
netrates.O_FEC.NetRate = NaN(1, numMeasurements);
netrates.O_FEC.CodeRate = NaN(1, numMeasurements);
netrates.O_FEC.Threshold = NaN(1, numMeasurements);
end
% Process each measurement individually.
@@ -215,6 +220,22 @@ classdef TransmissionPerformance
netrates.KP4_hamming.Threshold(i) = obj.BERTHRESHOLDS_KP4_AND_INNER(idxBER);
end
idxBER = [];
for j = length(obj.BERTHRESHOLDS_O_FEC):-1:1
if ber(i) <= obj.BERTHRESHOLDS_O_FEC(j)
idxBER = j;
break;
end
end
if ~isempty(idxBER)
codeRate = obj.CODE_RATE_O_FEC(idxBER);
netrates.O_FEC.NetRate(i) = grossRate(i) * codeRate;
netrates.O_FEC.GrossRate(i) = grossRate(i) ;
netrates.O_FEC.CodeRate(i) = codeRate;
netrates.O_FEC.Threshold(i) = obj.BERTHRESHOLDS_O_FEC(idxBER);
end
end