Update
This commit is contained in:
@@ -384,7 +384,7 @@ classdef EQ
|
||||
end
|
||||
|
||||
for dd_loop = 1:obj.dd_loops
|
||||
cnt = obj.training_length+1;
|
||||
cnt = 1;
|
||||
m = 0;
|
||||
output_vec = zeros(1,floor(length(data_in)/obj.K)); % initilaization of the output vector
|
||||
dd_DFE = zeros(obj.Nb(1),1);
|
||||
@@ -452,7 +452,7 @@ classdef EQ
|
||||
% e_save(:,save_ind) = coeff;
|
||||
% save_ind = save_ind+1;
|
||||
|
||||
if mu_mat ~= 0
|
||||
if 1%mu_mat ~= 0
|
||||
e_dc = e_dc - obj.DCmu*error;
|
||||
error_log(cnt,dd_loop) = e_dc;
|
||||
cnt = cnt+1;
|
||||
|
||||
@@ -111,12 +111,16 @@ classdef EQ_silas < handle
|
||||
|
||||
% actual processing of the signal (steps 1. - 3.)
|
||||
% 1 normalize RMS
|
||||
%signalclass_in = signalclass_in.normalize("mode","rms");
|
||||
signalclass_in = signalclass_in.normalize("mode","rms");
|
||||
|
||||
% Process the EQ optimization
|
||||
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;
|
||||
|
||||
% append to logbook
|
||||
lbdesc = ['EQ von Silas ist gelaufen '];
|
||||
signalclass_in = signalclass_in.logbookentry(lbdesc);
|
||||
@@ -198,6 +202,7 @@ classdef EQ_silas < handle
|
||||
dc_cnt = 0;
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@@ -209,11 +214,9 @@ 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
|
||||
|
||||
m = 0;
|
||||
@@ -261,7 +264,6 @@ classdef EQ_silas < handle
|
||||
%combine FFE with DFE to one vector (cursor between the two sequences)
|
||||
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
|
||||
@@ -270,13 +272,6 @@ classdef EQ_silas < handle
|
||||
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);
|
||||
@@ -284,15 +279,8 @@ classdef EQ_silas < handle
|
||||
%Error between FFE & DFE filtered signal and Decision
|
||||
obj.error(k) = y(m) - d_hat(k);
|
||||
|
||||
% 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
|
||||
|
||||
%Update FFE and DFE coefficients
|
||||
coeff = coeff - mu_mat*obj.error(k) * conj(x_d);
|
||||
coeff = coeff - (mu_mat * (obj.error(k) * conj(x_d)));
|
||||
|
||||
%Update DC error
|
||||
dc_block(dc_cnt) = obj.error(k) ;
|
||||
@@ -312,7 +300,9 @@ classdef EQ_silas < handle
|
||||
|
||||
% 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;
|
||||
obj.e_dc = obj.e_dc - sum(dc_block) .* obj.mu_dc_dd;
|
||||
|
||||
% obj.e_dc = obj.e_dc - obj.mu_dc_dd * obj.error(k); %newapril
|
||||
end
|
||||
|
||||
dc_cnt = 0;
|
||||
@@ -343,24 +333,43 @@ classdef EQ_silas < handle
|
||||
function x_in_vnle_format = calcVNLENonlinVecs(~,x_in_block,I_2,I_3,N_,norm_)
|
||||
% These are the second and third order input signal products of the VNLE EQ
|
||||
% ∑ h1 x_in(k-n1) + ∑∑ h2 x_in(k-n1)*x_in(k-n2) + ∑∑∑ h3 x_in(k-n1)*x_in(k-n2)*x_in(k-n3)
|
||||
l1=length(x_in_block);
|
||||
l2=length(I_2);
|
||||
l3=length(I_3);
|
||||
final_length = l1+l2+l3;
|
||||
|
||||
x1 = x_in_block;
|
||||
x2 = [];
|
||||
x3 = [];
|
||||
x_in_vnle_format = zeros(final_length,1);
|
||||
|
||||
idx = l1;
|
||||
x_in_vnle_format(1:idx) = x_in_block;
|
||||
|
||||
if N_(2) > 0
|
||||
delta_2 = round((N_(1)-N_(2))/2);
|
||||
input_vec_se = x_in_block(delta_2:end)/norm_(2); %TODO normalization step
|
||||
x2 = input_vec_se(I_2(:,1)).*input_vec_se(I_2(:,2));
|
||||
delta_2 = round((N_(1)-N_(2)) / 2);
|
||||
input_vec_se = x_in_block(delta_2:end) / norm_(2); %TODO normalization step
|
||||
|
||||
% Extract columns from I_2
|
||||
col1 = input_vec_se(I_2(:,1));
|
||||
col2 = input_vec_se(I_2(:,2));
|
||||
|
||||
x2 = col1 .* col2;
|
||||
x_in_vnle_format(idx+1:idx+l2) = x2;
|
||||
end
|
||||
|
||||
if N_(3) > 0
|
||||
delta_3 = round((N_(1)-N_(3))/2);
|
||||
input_vec_th = x_in_block(delta_3:end)/norm_(3);
|
||||
x3 = input_vec_th(I_3(:,1)).*input_vec_th(I_3(:,2)).*input_vec_th(I_3(:,3));
|
||||
end
|
||||
input_vec_th = x_in_block(delta_3:end) / norm_(3);
|
||||
|
||||
x_in_vnle_format = [x1;x2;x3];
|
||||
% Extract columns from I_3
|
||||
col1 = input_vec_th(I_3(:,1));
|
||||
col2 = input_vec_th(I_3(:,2));
|
||||
col3 = input_vec_th(I_3(:,3));
|
||||
|
||||
% Perform matrix multiplication
|
||||
x3 = col1 .* col2 .* col3;
|
||||
|
||||
idx = idx+l2;
|
||||
x_in_vnle_format(idx+1:idx+l3) = x3;
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -293,24 +293,43 @@ classdef EQ_silas_sliding_window_dc_removal < handle
|
||||
function x_in_vnle_format = calcVNLENonlinVecs(~,x_in_block,I_2,I_3,N_,norm_)
|
||||
% These are the second and third order input signal products of the VNLE EQ
|
||||
% ∑ h1 x_in(k-n1) + ∑∑ h2 x_in(k-n1)*x_in(k-n2) + ∑∑∑ h3 x_in(k-n1)*x_in(k-n2)*x_in(k-n3)
|
||||
l1=length(x_in_block);
|
||||
l2=length(I_2);
|
||||
l3=length(I_3);
|
||||
final_length = l1+l2+l3;
|
||||
|
||||
x1 = x_in_block;
|
||||
x2 = [];
|
||||
x3 = [];
|
||||
x_in_vnle_format = zeros(final_length,1);
|
||||
|
||||
idx = l1;
|
||||
x_in_vnle_format(1:idx) = x_in_block;
|
||||
|
||||
if N_(2) > 0
|
||||
delta_2 = round((N_(1)-N_(2))/2);
|
||||
input_vec_se = x_in_block(delta_2:end)/norm_(2); %TODO normalization step
|
||||
x2 = input_vec_se(I_2(:,1)).*input_vec_se(I_2(:,2));
|
||||
delta_2 = round((N_(1)-N_(2)) / 2);
|
||||
input_vec_se = x_in_block(delta_2:end) / norm_(2); %TODO normalization step
|
||||
|
||||
% Extract columns from I_2
|
||||
col1 = input_vec_se(I_2(:,1));
|
||||
col2 = input_vec_se(I_2(:,2));
|
||||
|
||||
x2 = col1 .* col2;
|
||||
x_in_vnle_format(idx+1:idx+l2) = x2;
|
||||
end
|
||||
|
||||
if N_(3) > 0
|
||||
delta_3 = round((N_(1)-N_(3))/2);
|
||||
input_vec_th = x_in_block(delta_3:end)/norm_(3);
|
||||
x3 = input_vec_th(I_3(:,1)).*input_vec_th(I_3(:,2)).*input_vec_th(I_3(:,3));
|
||||
end
|
||||
input_vec_th = x_in_block(delta_3:end) / norm_(3);
|
||||
|
||||
x_in_vnle_format = [x1;x2;x3];
|
||||
% Extract columns from I_3
|
||||
col1 = input_vec_th(I_3(:,1));
|
||||
col2 = input_vec_th(I_3(:,2));
|
||||
col3 = input_vec_th(I_3(:,3));
|
||||
|
||||
% Perform matrix multiplication
|
||||
x3 = col1 .* col2 .* col3;
|
||||
|
||||
idx = idx+l2;
|
||||
x_in_vnle_format(idx+1:idx+l3) = x3;
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user