more from home
This commit is contained in:
@@ -73,7 +73,6 @@ function [results] = dsp_ief_file(varargin)
|
||||
yOrg = h5readatt(filepath, ief_.Groups(4).Groups(1).Name, 'YOrg');
|
||||
yInc = h5readatt(filepath, ief_.Groups(4).Groups(1).Name, 'YInc');
|
||||
|
||||
|
||||
dataRx = double(h5read(filepath, '/Waveforms/Channel 2/Channel 2Data')); % rohdaten des CH4
|
||||
bitsTx = h5read(filepath, '/Settings/dataTx'); %Binär
|
||||
bitsTx = reshape(bitsTx,log2(config.M),[])';
|
||||
@@ -86,26 +85,39 @@ function [results] = dsp_ief_file(varargin)
|
||||
%%% Build Rx Signal (Rx, normalize,remove mean)
|
||||
dataRx = dataRx*yInc+yOrg;
|
||||
Rx_Sig = Informationsignal(dataRx,"fs",config.fs_rx);
|
||||
|
||||
Rx_Sig.signal = Rx_Sig.signal - mean(Rx_Sig.signal);
|
||||
|
||||
Rx_Sig = Rx_Sig.normalize("mode","rms");
|
||||
|
||||
|
||||
% Rx_Sig.spectrum("fignum",3,"displayname",'Rx Signal','normalizeTo0dB',0);
|
||||
|
||||
Rx_Sig = Filter('filtdegree',6,"f_cutoff",Tx_symbols.fs.*0.9,"fs",Rx_Sig.fs,"filterType",filtertypes.gaussian,"active",true).process(Rx_Sig);
|
||||
Rx_Sig = Filter('filtdegree',0,"f_cutoff",Tx_symbols.fs.*0.9,"fs",Rx_Sig.fs,"filterType",filtertypes.gaussian,"active",true).process(Rx_Sig);
|
||||
|
||||
% Rx_Sig.spectrum("fignum",3,"displayname",'Rx Signal filt','normalizeTo0dB',0);
|
||||
|
||||
Rx_Sig = Rx_Sig.delay(tcorrect,"mode","samples");
|
||||
|
||||
%%%%%% Sample to 2x fsym %%%%%%
|
||||
Rx_Sig_resamp = Rx_Sig.resample("fs_out",2*config.fsym);
|
||||
Rx_Sig_resamp = Rx_Sig.resample("fs_out",8*config.fsym);
|
||||
|
||||
%%%%%% Sync Rx signal with reference (S is a cell array with all occurences) %%%%%%
|
||||
[Rx_Sig_sync,S,isFlipped] = Rx_Sig_resamp.tsynch("reference",Tx_symbols,"fs_ref",config.fsym,"debug_plots",0);
|
||||
|
||||
% Rx_Sig_sync.eye(fsym,M,"fignum",4,"displayname",'eye diagram');
|
||||
|
||||
|
||||
|
||||
% timing syncroization ??
|
||||
|
||||
% SYMSYNC = comm.SymbolSynchronizer("Modulation","PAM/PSK/QAM","SamplesPerSymbol",2);
|
||||
%
|
||||
% synd = SYMSYNC(Rx_Sig_sync.signal);
|
||||
% Rx_Sig_sync.signal = synd;
|
||||
%
|
||||
% [Rx_Sig_sync,S,isFlipped] = Rx_Sig_sync.tsynch("reference",Tx_symbols,"fs_ref",config.fsym,"debug_plots",1);
|
||||
%
|
||||
|
||||
|
||||
% filter Bw
|
||||
output = struct();
|
||||
vnle_package = {};
|
||||
@@ -114,18 +126,60 @@ function [results] = dsp_ief_file(varargin)
|
||||
|
||||
for s = 1:length(S)
|
||||
Rx_Sig_sync = S{s};
|
||||
|
||||
Rx_Sig_sync.spectrum("fignum",3,"displayname",'No Matched Filter','normalizeTo0dB',0);
|
||||
|
||||
% figure();hold on;plot(Tx_symbols.resample("fs_out",2*config.fsym).normalize("mode","oneone").signal);plot(Rx_Sig_sync.normalize("mode","oneone").signal);
|
||||
%
|
||||
Tx_symbols.spectrum("fignum",3,"displayname",'No Matched Filter','normalizeTo0dB',1);
|
||||
Rx_Sig_sync.spectrum("fignum",3,"displayname",'No Matched Filter','normalizeTo0dB',1);
|
||||
|
||||
Nsym = 64;
|
||||
sampsPerSym = 8;
|
||||
rcrFilt = comm.RaisedCosineReceiveFilter(...
|
||||
'Shape', 'Square root', ...
|
||||
'RolloffFactor', 1, ...
|
||||
'FilterSpanInSymbols', Nsym, ...
|
||||
'InputSamplesPerSymbol', sampsPerSym, ...
|
||||
'DecimationFactor', 1);
|
||||
|
||||
yr = rcrFilt([Rx_Sig_sync.signal;zeros(Nsym*sampsPerSym/2, 1)]);
|
||||
fltDelay = Nsym / (2*config.fsym);
|
||||
yr = yr(fltDelay*Rx_Sig_sync.fs+1:end);
|
||||
Rx_matched = Rx_Sig_sync;
|
||||
Rx_matched.signal = yr;
|
||||
|
||||
|
||||
Rx_matched = Rx_matched.resample("fs_out",2*config.fsym);
|
||||
|
||||
symbolSync = comm.SymbolSynchronizer("Modulation","PAM/PSK/QAM","SamplesPerSymbol",2);
|
||||
Rx_syncd = Rx_matched;
|
||||
Rx_syncd.signal = real(symbolSync(Rx_syncd.signal));
|
||||
Rx_syncd.fs = config.fsym;
|
||||
|
||||
% figure();hold on;
|
||||
% stem(Tx_symbols.normalize("mode","oneone").signal);
|
||||
% stem(Rx_syncd.normalize("mode","oneone").signal);
|
||||
%
|
||||
% figure();hold on;
|
||||
% plot(Rx_Sig_sync.normalize("mode","oneone").signal);
|
||||
% plot(Rx_matched.normalize("mode","oneone").signal);
|
||||
|
||||
|
||||
Rx_syncd = Rx_syncd.resample("fs_out",2*config.fsym);
|
||||
|
||||
Rx_matched.spectrum("fignum",3,"displayname",'No Matched Filter','normalizeTo0dB',1);
|
||||
|
||||
mu_ffe = [mu_ffe1 mu_ffe3 mu_ffe3];
|
||||
vnle_order=[vnle_order1,vnle_order2,vnle_order3];
|
||||
eq_ = EQ("Ne",vnle_order,"Nb",[0,0,0],"training_length",4096*2,"training_loops",5,"dd_loops",5,"K",2,"DCmu",mu_dc,"DDmu",[mu_ffe mu_dfe],"DFEmu",0.005,"FFEmu",0,"plotfinal",0,"ideal_dfe",1);
|
||||
eq_ = EQ("Ne",vnle_order,"Nb",[0,0,0],"training_length",4096*2,"training_loops",5,"dd_loops",5,"K",2,"DCmu",mu_dc,"DDmu",[mu_ffe mu_dfe],"DFEmu",0.005,"FFEmu",0,"plotfinal",1,"ideal_dfe",1);
|
||||
|
||||
|
||||
%%%%% VNLE only (or DFE) %%%%
|
||||
if 0
|
||||
if 1
|
||||
|
||||
|
||||
[result] = vnle(eq_,config.M,Rx_Sig_sync,Tx_symbols,Tx_bits,"precode_mode",db_mode.no_db,"showAnalysis",1,'eth_style',1);
|
||||
[result] = vnle(eq_,config.M,Rx_matched,Tx_symbols,Tx_bits,"precode_mode",db_mode.no_db,"showAnalysis",1,'eth_style',1);
|
||||
vnle_package{s} = result;
|
||||
|
||||
end
|
||||
|
||||
%%%%% VNLE + PF + MLSE %%%%
|
||||
@@ -141,7 +195,7 @@ function [results] = dsp_ief_file(varargin)
|
||||
end
|
||||
|
||||
%%%%% Duobinary Targeting %%%%
|
||||
if 1
|
||||
if 0
|
||||
|
||||
mlse_db = MLSE_viterbi("DIR",[1,1],"duobinary_output",0,"M",config.M,"trellis_states",PAMmapper(config.M,0).levels);
|
||||
doub_mode = db_mode.db_emulate;
|
||||
|
||||
Reference in New Issue
Block a user