Files
imdd_silas/Functions/EQ_recipes/mpi_recipe_dev.m
Silas Oettinghaus 3cafb06c4f FFE / MPI algorithm
2026-07-09 08:46:35 +02:00

93 lines
2.9 KiB
Matlab

function output = mpi_recipe_dev(Scpe_sig_raw, Symbols, Tx_bits, options)
%mpi_recipe_dev Minimal example recipe for the DSP job framework.
% This recipe intentionally performs only light preprocessing and records
% summary values. It demonstrates the recipe interface without running a
% full equalizer chain.
arguments
Scpe_sig_raw
Symbols
Tx_bits
options.fsym
options.M
options.duob_mode
options.dataTable table
options.userParameters struct = struct()
options.debug_plots (1,1) logical = false
end
Scpe_sig = preprocessSignal(Scpe_sig_raw, Symbols, options.fsym, ...
"mode", "auto", ...
"debug_plots", options.debug_plots);
mu_dc = 0;%1e-5;
eq_settings = { ...
"epochs_tr", 5, ...
"epochs_dd", 5, ...
"len_tr", 4096*2, ...
"mu_dd",0.02, ...
"mu_tr",0.2, ...
"order", 25, ...
"sps", 2, ...
"decide", 0, ...
"optmize_mus", 1, ...
"dd_mode", 1, ...
"adaption_technique", "nlms", ...
"mu_dc", mu_dc};
eq_ffe = FFE(eq_settings{:});
showLevelScatter(Scpe_sig_raw, Symbols, ...
"fsym", options.fsym, ...
"fignum", 400, ...
"normalize", true);
% Scpe_sig_raw.spectrum("normalizeTo0dB",1,"fft_length",4096*4,"fignum",401);
%options.dataTable.sir;
%% NORMAL FFE
if 1
ffe_results = ffe(eq_ffe, options.M, Scpe_sig, Symbols, Tx_bits, ...
"precode_mode", options.duob_mode, ...
'showAnalysis', options.debug_plots, ...
"postFFE", [], ...
"eth_style_symbol_mapping", 0);
ffe_results.metrics.print("description",sprintf('Normal FFE; SIR %d dB',options.dataTable.sir));
output.ffe_package = ffe_results;
end
%% MPI Reduction
if 1
% dc_buffer_len = 0;
% ffe_buffer_len = 0;
% smoothing_buffer_length = options.userParameters.smoothing_length;
% smoothing_buffer_update = 1;
% eq_ffe_dcr = FFE_DCremoval_adaptive_mu(eq_settings{:}, ...
% "dc_buffer_len",dc_buffer_len, ...
% "ffe_buffer_len",ffe_buffer_len,...
% "smoothing_buffer_length",smoothing_buffer_length,...
% "smoothing_buffer_update",smoothing_buffer_update);
eq_ = FFE_DCremoval("epochs_tr",5,"epochs_dd",3,"len_tr",4096*2,"mu_dd",...
0.0002,"mu_tr",0,"order",25,"sps",2,"decide",0,...
"mu_dc",0.005,"dc_buffer_len",1);
ffe_results_dcr = ffe(eq_, options.M, Scpe_sig, Symbols, Tx_bits, ...
"precode_mode", options.duob_mode, ...
'showAnalysis', options.debug_plots, ...
"postFFE", [], ...
"eth_style_symbol_mapping", 0);
ffe_results_dcr.metrics.print("description",'FFE DCR');
output.ffe_dcr_package = ffe_results_dcr;
end
end