Minor changes from Star PC.

Better plot in channel freq response

imdd_mpi simulation is a good 400G model

DSP offline analysis script
This commit is contained in:
sioe
2024-10-20 17:28:13 +02:00
parent 637dd7bc86
commit 70fd0a44be
6 changed files with 390 additions and 191 deletions

View File

@@ -240,6 +240,13 @@ classdef ChannelFreqResp < handle
plot(obj.faxis/1e9, unwrap(angle(1./Havg)),"LineWidth",2,"Color",[0.3467 0.5360 0.6907]) ;
xlim([0.2 .5*max(obj.faxis)*1e-9]); grid on;
%%% plot for publication
figure(98989);hold all;box on;title('Magnitude Freq. Response');
xlim([0.2 .5*max(obj.faxis)*1e-9]);
ylim([-20, 2]);
plot(obj.faxis/1e9, 20*log10(abs(Havg)),'LineWidth',2);
grid on;
end

View File

@@ -293,7 +293,7 @@ classdef PAMmapper
end
function [out] = separate_pamlevels(obj,data_in)
%data_in is Signal class
%A) normally return the preproduct of the decision
a = squeeze(repmat(real(data_in.signal),[1 1 length(obj.thresholds)])); %Eingangssignal in 3 spalten
b = squeeze(repmat(reshape(obj.thresholds(:).',[1 1 length(obj.thresholds)]),[1 length(data_in.signal) 1])); %Threshold in 3 Spalten
@@ -308,6 +308,18 @@ classdef PAMmapper
end
function [Signal_out] = quantize(obj,Signal_in)
constellation = obj.get_levels();
constellation = constellation ./ rms(constellation);
Signal_out = Signal_in;
dist = abs(Signal_in.signal - constellation);
[~,symbol_idx] = min(dist,[],2); % decision for closest constellation point
Signal_out.signal = constellation(symbol_idx);
Signal_out.signal = reshape(Signal_out.signal,size(Signal_in.signal));
end
end
end