updates of framework
- focus on AWG output power and lowpass characteristics
This commit is contained in:
@@ -12,6 +12,7 @@ classdef EQ_silas < handle
|
||||
d_constellation %constellation points of the reference
|
||||
|
||||
y_out %equalizer output signal
|
||||
d_out %decision output
|
||||
|
||||
% FFE coefficients always named with "e"
|
||||
Ne
|
||||
@@ -107,7 +108,7 @@ classdef EQ_silas < handle
|
||||
|
||||
end
|
||||
|
||||
function [signalclass_out] = process(obj,signalclass_in, reference_signalclass_in)
|
||||
function [signalclass_out,symbols_out] = process(obj,signalclass_in, reference_signalclass_in)
|
||||
|
||||
% actual processing of the signal (steps 1. - 3.)
|
||||
% 1 normalize RMS
|
||||
@@ -117,6 +118,7 @@ classdef EQ_silas < handle
|
||||
obj.process_(signalclass_in.signal', reference_signalclass_in.signal');
|
||||
|
||||
signalclass_in.signal = obj.y_out';
|
||||
|
||||
|
||||
%change sampling frequency of outgoing signal
|
||||
signalclass_in.fs = reference_signalclass_in.fs;
|
||||
@@ -125,6 +127,9 @@ classdef EQ_silas < handle
|
||||
lbdesc = ['EQ von Silas ist gelaufen '];
|
||||
signalclass_in = signalclass_in.logbookentry(lbdesc);
|
||||
|
||||
symbols_out = signalclass_in;
|
||||
symbols_out.signal = obj.d_out;
|
||||
|
||||
% write to output
|
||||
signalclass_out = signalclass_in;
|
||||
|
||||
@@ -213,7 +218,7 @@ classdef EQ_silas < handle
|
||||
|
||||
%start the dd mode with coefficients from training
|
||||
coeff = [obj.e;obj.b];
|
||||
obj.e_dc = ones(obj.eq_updatelatency,1);%.*obj.e_dc;
|
||||
obj.e_dc = ones(obj.eq_updatelatency,1).*obj.e_dc;
|
||||
dc_block = ones(obj.eq_parallelization_blocklength,1);
|
||||
|
||||
for ddloop = 1:obj.ddloops
|
||||
@@ -236,8 +241,9 @@ classdef EQ_silas < handle
|
||||
d_feedback = zeros(obj.Cb(1),1);
|
||||
d_vnle = obj.calcVNLENonlinVecs(d_feedback,obj.Ib2,obj.Ib3,obj.Nb,obj.d_norm);
|
||||
d_hat = zeros(obj.x_length,1);
|
||||
|
||||
m_reg = 0;
|
||||
lvl_err = NaN(obj.x_length,numel(obj.d_constellation));
|
||||
lvl_err_mov = NaN(100,numel(obj.d_constellation));
|
||||
m_reg = 0;
|
||||
|
||||
if obj.eq_avg_blocklength > 0
|
||||
averaging_window = zeros(obj.eq_avg_blocklength,1);
|
||||
@@ -264,19 +270,30 @@ classdef EQ_silas < handle
|
||||
x_d = [x_vnle;-d_vnle];
|
||||
|
||||
%Apply filter
|
||||
%y(m) = (m_reg(end)*dc_cnt + obj.e_dc(end)) + x_d.'* coeff;
|
||||
if obj.mu_dc_dd > 0
|
||||
y(m) = obj.e_dc(end) + x_d.'* coeff;
|
||||
else
|
||||
y(m) = x_d.'* coeff;
|
||||
end
|
||||
|
||||
%Decision
|
||||
|
||||
%Decision 1
|
||||
[~,symbol_idx] = min(abs(y(m) - obj.d_constellation)); % decision for closest constellation point
|
||||
d_hat(k) = obj.d_constellation(symbol_idx);
|
||||
|
||||
%Error between FFE & DFE filtered signal and Decision
|
||||
obj.error(k) = y(m) - d_hat(k);
|
||||
%
|
||||
lvl_err(k,symbol_idx) = obj.error(k);
|
||||
|
||||
lvl_err_mov(:,symbol_idx) = circshift(lvl_err_mov(:,symbol_idx),1);
|
||||
lvl_err_mov(1,symbol_idx) = obj.error(k);
|
||||
|
||||
%Decision 2
|
||||
y(m) = y(m)-mean(lvl_err_mov(:,symbol_idx),'omitnan');
|
||||
[~,symbol_idx] = min(abs(y(m) - obj.d_constellation)); % decision for closest constellation point
|
||||
d_hat(k) = obj.d_constellation(symbol_idx);
|
||||
|
||||
%Error between FFE & DFE filtered signal and Decision
|
||||
obj.error(k) = y(m) - d_hat(k);
|
||||
|
||||
%Update FFE and DFE coefficients
|
||||
coeff = coeff - (mu_mat * (obj.error(k) * conj(x_d)));
|
||||
@@ -324,7 +341,34 @@ classdef EQ_silas < handle
|
||||
end
|
||||
end
|
||||
|
||||
%%
|
||||
%
|
||||
% b = movmean(lvl_err,[500 500],1,"omitnan");
|
||||
%
|
||||
% figure(11)
|
||||
% for i = 1:4
|
||||
% hold on
|
||||
% stem(lvl_err(:,i))
|
||||
% end
|
||||
|
||||
|
||||
|
||||
%%
|
||||
|
||||
obj.y_out = (circshift( y.' ,-(obj.delay))).';
|
||||
obj.d_out = d_hat(1:2:end);
|
||||
% err = obj.error(1:2:end);
|
||||
% res = NaN(8,length(err));
|
||||
% for lvl = 1:8
|
||||
% a = find(obj.d_out==obj.d_constellation(lvl));
|
||||
% res(lvl,a) = err(a);
|
||||
% end
|
||||
% mean(res,2,"omitnan");
|
||||
%
|
||||
% figure(12)
|
||||
% scatter(1:length(obj.y_out),obj.y_out,1,'.')
|
||||
% hold on
|
||||
% scatter(1:length(obj.d_out),obj.d_out,1,'.')
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user