Update April
This commit is contained in:
@@ -51,9 +51,9 @@ classdef EQ_silas < handle
|
||||
trainloops
|
||||
ddloops
|
||||
|
||||
eq_blocklength % block lengt of EQ (until now, only the dc subtraction is affected by this)
|
||||
eq_parallelization_blocklength % block lengt of EQ (until now, only the dc subtraction is affected by this)
|
||||
eq_updatelatency % time in symbols until the calculated updates reach the signal again (until now, only the dc subtraction is affected by this)
|
||||
|
||||
eq_avg_blocklength
|
||||
|
||||
|
||||
end
|
||||
@@ -79,8 +79,9 @@ classdef EQ_silas < handle
|
||||
options.mu_ffe_dd = [0.0004 0.0005 0.0006];
|
||||
options.mu_dfe_dd = 0.0005;
|
||||
|
||||
options.eq_blocklength = 1;
|
||||
options.eq_parallelization_blocklength = 1;
|
||||
options.eq_updatelatency = 1;
|
||||
options.eq_avg_blocklength = 0;
|
||||
end
|
||||
|
||||
fn = fieldnames(options);
|
||||
@@ -151,8 +152,8 @@ classdef EQ_silas < handle
|
||||
%% Adaptive Equalization Modes
|
||||
|
||||
function trainingMode(obj)
|
||||
|
||||
dc_block = ones(obj.eq_blocklength,1);
|
||||
|
||||
dc_block = ones(obj.eq_parallelization_blocklength,1);
|
||||
|
||||
for tloop = 1:obj.trainloops
|
||||
m = 1+obj.delay;
|
||||
@@ -176,7 +177,7 @@ classdef EQ_silas < handle
|
||||
|
||||
% Calculate the Error
|
||||
obj.error = obj.e_dc + obj.e_ffe - obj.e_dfe - obj.d(obj.Nb(1)-1+m-obj.delay);
|
||||
|
||||
|
||||
|
||||
if obj.mu_ffe_train ~= 0
|
||||
%update FFE coefficients with LMS
|
||||
@@ -191,8 +192,8 @@ classdef EQ_silas < handle
|
||||
|
||||
%update DC error
|
||||
dc_block(dc_cnt) = obj.error .* obj.mu_dc_train;
|
||||
|
||||
if dc_cnt == obj.eq_blocklength
|
||||
|
||||
if dc_cnt == obj.eq_parallelization_blocklength
|
||||
obj.e_dc = obj.e_dc - mean(dc_block(dc_cnt));
|
||||
dc_cnt = 0;
|
||||
end
|
||||
@@ -208,8 +209,10 @@ 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;
|
||||
dc_block = ones(obj.eq_parallelization_blocklength,1);
|
||||
|
||||
|
||||
dc_block = ones(obj.eq_blocklength,1);
|
||||
|
||||
for ddloop = 1:obj.ddloops
|
||||
|
||||
@@ -227,50 +230,96 @@ classdef EQ_silas < handle
|
||||
|
||||
mu_dfe = ones(1,sum(obj.Cb))*obj.mu_dfe_dd;
|
||||
|
||||
|
||||
y = zeros(1,floor(obj.x_length/obj.sps));
|
||||
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;
|
||||
|
||||
if obj.eq_avg_blocklength > 0
|
||||
averaging_window = zeros(obj.eq_avg_blocklength,1);
|
||||
end
|
||||
|
||||
for k = 1:obj.sps:obj.x_length
|
||||
dc_cnt = dc_cnt+1;
|
||||
m=m+1;
|
||||
|
||||
%get Sigal input vectors with correct length for VNLE
|
||||
x = obj.x_in(obj.Ne(1)+k-1:-1:k).';
|
||||
%
|
||||
if obj.eq_avg_blocklength > 0 %% Das läuft gut mit 400er Fenster!!
|
||||
averaging_window = circshift(averaging_window,obj.sps);
|
||||
averaging_window(1:obj.sps,1) = x(1:obj.sps);
|
||||
avg_(k) = mean(averaging_window);
|
||||
x = x-avg_(k);
|
||||
end
|
||||
|
||||
%bring this signal to "special" VNLE format
|
||||
x_vnle = obj.calcVNLENonlinVecs(x,obj.Ie2,obj.Ie3,obj.Ne,obj.x_norm);
|
||||
|
||||
%combine FFE with DFE to one vector (cursor between the two sequences)
|
||||
x_d = [x_vnle;-d_vnle];
|
||||
|
||||
|
||||
%Apply filter
|
||||
y(m) = obj.e_dc + x_d.'* coeff;
|
||||
%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
|
||||
|
||||
% if obj.eq_avg_blocklength > 0 %% Das läuft nicht gut!!
|
||||
% averaging_window = circshift(averaging_window,obj.sps);
|
||||
% averaging_window(1:obj.sps,1) = y(m);
|
||||
% avg_(m) = mean(averaging_window);
|
||||
% y(m) = y(m)-avg_(m);
|
||||
% end
|
||||
|
||||
%Decision
|
||||
[~,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 = y(m) - d_hat(k);
|
||||
obj.error(k) = y(m) - d_hat(k);
|
||||
|
||||
%Update coefficients (both FFE and DFE)
|
||||
% obj.e = obj.e - obj.error * mu_ffe * conj(x_vnle);
|
||||
% obj.b = obj.b + obj.error * mu_dfe * conj(d_vnle);
|
||||
% coeff = [obj.e;obj.b];
|
||||
% if obj.eq_avg_blocklength > 0 %% Das läuft nicht gut!!
|
||||
% averaging_window = circshift(averaging_window,obj.sps);
|
||||
% averaging_window(1:obj.sps,1) = y(m);
|
||||
% avg_(m) = mean(averaging_window);
|
||||
% y(m) = y(m)-avg_(m);
|
||||
% end
|
||||
|
||||
coeff = coeff - mu_mat*obj.error*conj(x_d);
|
||||
|
||||
|
||||
%update DC error
|
||||
dc_block(dc_cnt) = obj.error .* obj.mu_dc_dd;
|
||||
%Update FFE and DFE coefficients
|
||||
coeff = coeff - mu_mat*obj.error(k) * conj(x_d);
|
||||
|
||||
%Update DC error
|
||||
dc_block(dc_cnt) = obj.error(k) ;
|
||||
|
||||
if dc_cnt == obj.eq_parallelization_blocklength
|
||||
if obj.eq_updatelatency > 1
|
||||
|
||||
obj.e_dc = circshift(obj.e_dc,1);
|
||||
|
||||
% m_reg(end+1) = ((1:obj.eq_parallelization_blocklength)' \ (cumsum(dc_block)));
|
||||
%
|
||||
% obj.e_dc(1) = obj.e_dc(2) - sign(m_reg(end)) .* (sum(dc_block).* m_reg(end) .* obj.mu_dc_dd);
|
||||
obj.e_dc(1) = obj.e_dc(2) - sum(dc_block) .* obj.mu_dc_dd;
|
||||
|
||||
else
|
||||
%m_reg(end+1) = ((1:obj.eq_parallelization_blocklength)' \ (cumsum(dc_block)));
|
||||
|
||||
% obj.e_dc = obj.e_dc - sign(m_reg(end)) .* (sum(dc_block).* m_reg(end) .* obj.mu_dc_dd);
|
||||
|
||||
obj.e_dc = obj.e_dc - sum(dc_block) .* obj.mu_dc_dd;
|
||||
end
|
||||
|
||||
if dc_cnt == obj.eq_blocklength
|
||||
obj.e_dc = obj.e_dc - mean(dc_block(dc_cnt));
|
||||
dc_cnt = 0;
|
||||
|
||||
end
|
||||
|
||||
|
||||
% Append new decision to decision feedback
|
||||
if obj.Nb(1) > 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user