- Fixed 'ML_MLSE'

- Added weighted DFE to 'EQ' (work in progress).
- Added the folders 'Evaluation Scripts' and 'Data' in 'projects\FSO_transmission', which contain different evaluations and measured data regarding the FSO transmission data.
This commit is contained in:
magf
2026-01-20 13:36:21 +01:00
parent 3b44315eea
commit 616945bf27
8 changed files with 635 additions and 52 deletions

View File

@@ -46,8 +46,20 @@ end
ml_mlse_results.config = Equalizerstruct();
eq_small = strip_eq(eq_, 10);
fn = fieldnames(eq_small);
for k = 1:numel(fn)
if issparse(eq_small.(fn{k}))
eq_small.(fn{k}) = full(eq_small.(fn{k}));
end
end
json_str = jsonencode(eq_small);
fn = fieldnames(eq_);
for k = 1:numel(fn)
if issparse(eq_.(fn{k}))
eq_.(fn{k}) = full(eq_.(fn{k}));
end
end
ml_mlse_results.config.eq = jsonencode(eq_);
ml_mlse_results.config.equalizer_structure = int32(equalizer_structure.ml_mlse);
ml_mlse_results.config.comment = 'function: ML-based MLSE';
@@ -81,6 +93,7 @@ end
function [bits, errors, ber, error_pos, errors_precoded, ber_precoded] = calculateBER(eq_signal_hd, tx_symbols, tx_bits, precode_mode, M, eth_style)
% Calculate BER based on precoding mode
mapper = PAMmapper(M, 0, "eth_style", eth_style);
skip_front = 150;
switch precode_mode
case db_mode.no_db
@@ -95,11 +108,11 @@ switch precode_mode
tx_bits_precoded = mapper.demap(tx_symbols_precoded);
rx_bits = mapper.demap(eq_signal_hd_precoded);
[~, errors_precoded, ber_precoded, ~] = calc_ber(rx_bits.signal, tx_bits_precoded.signal, "skip_front", 30000, "skip_end", 150, "returnErrorLocation", 1);
[~, errors_precoded, ber_precoded, ~] = calc_ber(rx_bits.signal, tx_bits_precoded.signal, "skip_front", skip_front, "skip_end", 150, "returnErrorLocation", 1);
% B) Just determine BER
rx_bits = mapper.demap(eq_signal_hd);
[bits, errors, ber, error_pos] = calc_ber(rx_bits.signal, tx_bits.signal, "skip_front", 30000, "skip_end", 150, "returnErrorLocation", 1);
[bits, errors, ber, error_pos] = calc_ber(rx_bits.signal, tx_bits.signal, "skip_front", skip_front, "skip_end", 150, "returnErrorLocation", 1);
case db_mode.db_precoded
% Data is precoded on TX side
@@ -107,12 +120,12 @@ switch precode_mode
eq_signal_hd_decoded = Duobinary().encode(eq_signal_hd, "M", M);
eq_signal_hd_decoded = Duobinary().decode(eq_signal_hd_decoded, "M", M);
rx_bits_decoded = mapper.demap(eq_signal_hd_decoded);
[~, errors_precoded, ber_precoded, ~] = calc_ber(rx_bits_decoded.signal, tx_bits.signal, "skip_front", 30000, "skip_end", 150, "returnErrorLocation", 1);
[~, errors_precoded, ber_precoded, ~] = calc_ber(rx_bits_decoded.signal, tx_bits.signal, "skip_front", skip_front, "skip_end", 150, "returnErrorLocation", 1);
% B) Omit the Coding by comparing with demapped TX symbol sequence
tx_bits_demapped = mapper.demap(tx_symbols);
rx_bits = mapper.demap(eq_signal_hd);
[bits, errors, ber, error_pos] = calc_ber(rx_bits.signal, tx_bits_demapped.signal, "skip_front", 30000, "skip_end", 150, "returnErrorLocation", 1);
[bits, errors, ber, error_pos] = calc_ber(rx_bits.signal, tx_bits_demapped.signal, "skip_front", skip_front, "skip_end", 150, "returnErrorLocation", 1);
end
end