changes in pulsef
This commit is contained in:
@@ -4,10 +4,10 @@ function [results] = dsp_ief_file(varargin)
|
||||
mu_ffe1 = 0.0001;
|
||||
mu_ffe2 = 0.0008;
|
||||
mu_ffe3 = 0.001;
|
||||
mu_dc = 0.005;
|
||||
mu_dc = 0.00;
|
||||
|
||||
mu_dfe = 0.0004;
|
||||
vnle_order1 = 50;
|
||||
vnle_order1 = 100;
|
||||
vnle_order2 = 3;
|
||||
vnle_order3 = 3;
|
||||
|
||||
@@ -83,27 +83,40 @@ function [results] = dsp_ief_file(varargin)
|
||||
Tx_symbols.fs = config.fsym;
|
||||
|
||||
%%% Build Rx Signal (Rx, normalize,remove mean)
|
||||
dataRx = dataRx*yInc+yOrg;
|
||||
Rx_Sig = Informationsignal(dataRx,"fs",config.fs_rx);
|
||||
loadAfterTR = 0;
|
||||
if loadAfterTR
|
||||
|
||||
rx_sig = load("testSilas.mat","signal_TR3");
|
||||
rx_sig=rx_sig.signal_TR3;
|
||||
Rx_Sig_resamp = Informationsignal(rx_sig,"fs",config.fsym*2);
|
||||
|
||||
Rx_Sig.signal = Rx_Sig.signal - mean(Rx_Sig.signal);
|
||||
else
|
||||
|
||||
Rx_Sig = Rx_Sig.normalize("mode","rms");
|
||||
dataRx = dataRx*yInc+yOrg;
|
||||
Rx_Sig = Informationsignal(dataRx,"fs",config.fs_rx);
|
||||
|
||||
Rx_Sig.signal = Rx_Sig.signal - mean(Rx_Sig.signal);
|
||||
|
||||
% Rx_Sig.spectrum("fignum",3,"displayname",'Rx Signal','normalizeTo0dB',0);
|
||||
|
||||
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.normalize("mode","rms");
|
||||
|
||||
Rx_Sig.spectrum("fignum",2,"displayname",'Rx Signal','normalizeTo0dB',1);
|
||||
|
||||
Rx_Sig = Filter('filtdegree',4,"f_cutoff",Tx_symbols.fs.*0.9,"fs",Rx_Sig.fs,"filterType",filtertypes.gaussian,"active",true).process(Rx_Sig);
|
||||
|
||||
Rx_Sig = Rx_Sig.delay(tcorrect,"mode","samples");
|
||||
|
||||
%%%%%% Sample to 2x fsym %%%%%%
|
||||
Rx_Sig_resamp = Rx_Sig.resample("fs_out",8*config.fsym);
|
||||
Rx_Sig.spectrum("fignum",2,"displayname",'Rx Signal filt','normalizeTo0dB',1);
|
||||
|
||||
mf = Pulseformer("alpha",config.ROF,"fsym",config.fsym,"fdac",Rx_Sig.fs,"matched",1,"pulse","rrc","pulselength",32);
|
||||
Rx_matched = mf.process(Rx_Sig);
|
||||
|
||||
Rx_matched.spectrum("fignum",2,"displayname",'Rx Signal m','normalizeTo0dB',1);
|
||||
|
||||
%%%%%% Sample to 2x fsym %%%%%%
|
||||
Rx_Sig_resamp = Rx_Sig.resample("fs_out",2*config.fsym);
|
||||
|
||||
end
|
||||
|
||||
%%%%%% 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,S,isFlipped] = Rx_Sig_resamp.tsynch("reference",Tx_symbols,"fs_ref",config.fsym,"debug_plots",1);
|
||||
|
||||
% Rx_Sig_sync.eye(fsym,M,"fignum",4,"displayname",'eye diagram');
|
||||
|
||||
@@ -116,7 +129,6 @@ function [results] = dsp_ief_file(varargin)
|
||||
%
|
||||
% [Rx_Sig_sync,S,isFlipped] = Rx_Sig_sync.tsynch("reference",Tx_symbols,"fs_ref",config.fsym,"debug_plots",1);
|
||||
%
|
||||
|
||||
|
||||
% filter Bw
|
||||
output = struct();
|
||||
@@ -124,49 +136,52 @@ function [results] = dsp_ief_file(varargin)
|
||||
vnle_pf_package = {};
|
||||
dbtgt_package = {};
|
||||
|
||||
for s = 1:length(S)
|
||||
for s = 1%:length(S)
|
||||
Rx_Sig_sync = S{s};
|
||||
Rx_Sig_sync = Rx_Sig_sync.normalize("mode","rms");
|
||||
|
||||
% 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);
|
||||
if 1
|
||||
Tx_symbols.spectrum("fignum",3,"displayname",'Tx Symbols','normalizeTo0dB',1);
|
||||
Rx_Sig_sync.spectrum("fignum",3,"displayname",'No Matched Filter','normalizeTo0dB',1);
|
||||
|
||||
Nsym = 64;
|
||||
sampsPerSym = 2;
|
||||
rcrFilt = comm.RaisedCosineReceiveFilter(...
|
||||
'Shape', 'Square root', ...
|
||||
'RolloffFactor', config.ROF, ...
|
||||
'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;
|
||||
|
||||
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);
|
||||
% length(Rx_matched);
|
||||
% symbolSync = comm.SymbolSynchronizer("Modulation","PAM/PSK/QAM","SamplesPerSymbol",2,"TimingErrorDetector","Mueller-Muller (decision-directed)");
|
||||
% Rx_syncd = Rx_matched;
|
||||
% [Rx_syncd.signal,tError] = symbolSync(Rx_syncd.signal);
|
||||
% Rx_syncd.fs = config.fsym;
|
||||
% length(Rx_syncd);
|
||||
|
||||
% 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_matched = Rx_matched.resample("fs_out",2*config.fsym);
|
||||
Rx_syncd = Rx_syncd.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;
|
||||
Rx_matched.spectrum("fignum",3,"displayname",'After Matched Filter','normalizeTo0dB',1);
|
||||
|
||||
% 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.spectrum("fignum",3,"displayname",'Zero Crossing TR','normalizeTo0dB',1);
|
||||
|
||||
|
||||
Rx_syncd = Rx_syncd.resample("fs_out",2*config.fsym);
|
||||
|
||||
Rx_matched.spectrum("fignum",3,"displayname",'No Matched Filter','normalizeTo0dB',1);
|
||||
end
|
||||
|
||||
mu_ffe = [mu_ffe1 mu_ffe3 mu_ffe3];
|
||||
vnle_order=[vnle_order1,vnle_order2,vnle_order3];
|
||||
@@ -177,7 +192,7 @@ function [results] = dsp_ief_file(varargin)
|
||||
if 1
|
||||
|
||||
|
||||
[result] = vnle(eq_,config.M,Rx_matched,Tx_symbols,Tx_bits,"precode_mode",db_mode.no_db,"showAnalysis",1,'eth_style',1);
|
||||
[result] = vnle(eq_,config.M,Rx_syncd,Tx_symbols,Tx_bits,"precode_mode",db_mode.no_db,"showAnalysis",1,'eth_style',1);
|
||||
vnle_package{s} = result;
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user