DB and 400G and minor changes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
useprbs = 1;
|
||||
M = 8;
|
||||
randkey = 1;
|
||||
useprbs = 0;
|
||||
M = 4;
|
||||
randkey = 2;
|
||||
fsym = 112e9;
|
||||
|
||||
%%%%% PRBS Generation in correct shape for Modulation Format %%%%%%
|
||||
@@ -31,29 +31,50 @@ Digi_Mod = PAMmapper(M,0);
|
||||
Symbols_tx = Digi_Mod.map(Tx_bits);
|
||||
Symbols_tx.fs = fsym;
|
||||
|
||||
Symbols = Duobinary().precode(Symbols_tx);
|
||||
if 0
|
||||
|
||||
Symbols = Duobinary().encode(Symbols);
|
||||
Symbols = Duobinary().precode(Symbols_tx);
|
||||
|
||||
Symbols = MLSE("DIR",[1,1],"duobinary_output",1,"trellis_states",Digi_Mod.levels,"M",M).process(Symbols);
|
||||
Symbols = Duobinary().encode(Symbols);
|
||||
|
||||
Symbols = Duobinary().decode(Symbols);
|
||||
Symbols = MLSE("DIR",[1 1],"duobinary_output",1,"trellis_states",Digi_Mod.levels,"M",M).process(Symbols);
|
||||
|
||||
Rx_bits = PAMmapper(M,0).demap(Symbols);
|
||||
Symbols = Duobinary().decode(Symbols);
|
||||
|
||||
[~,error_num,ber,error_pos] = calc_ber(Tx_bits.signal,Rx_bits.signal,"skip_front",0,"skip_end",0,"returnErrorLocation",1);
|
||||
else
|
||||
cnt = 1;
|
||||
|
||||
disp(['BER: ',sprintf('%.1E',ber),' - - PAM-',num2str(M)]);
|
||||
%
|
||||
figure;hold on
|
||||
Symbols = Symbols_tx;
|
||||
|
||||
coeff = [1,0.5,0.2,0.1];
|
||||
|
||||
Symbols.signal = filter(coeff, 1, Symbols.signal);
|
||||
|
||||
Symbols.spectrum("fignum",129,"displayname",['coeff:',num2str(coeff)]);
|
||||
|
||||
Symbols = MLSE("DIR",coeff,"duobinary_output",0,"trellis_states",Digi_Mod.levels,"M",M).process(Symbols);
|
||||
|
||||
Rx_bits = PAMmapper(M,0).demap(Symbols);
|
||||
|
||||
[~,error_num,ber,error_pos] = calc_ber(Tx_bits.signal,Rx_bits.signal,"skip_front",0,"skip_end",0,"returnErrorLocation",1);
|
||||
|
||||
disp(['BER: ',sprintf('%.1E',ber),' - - PAM-',num2str(M)]);
|
||||
|
||||
end
|
||||
|
||||
|
||||
%
|
||||
figure(494)
|
||||
clf
|
||||
subplot(2,1,1)
|
||||
title('Bits Compare')
|
||||
hold on
|
||||
stairs(Rx_bits.signal(1:100,1),'LineWidth',2,'DisplayName','Rx Bits')
|
||||
stairs(Tx_bits.signal(1:100,1),'LineStyle',':','LineWidth',2,'DisplayName','Tx Bits');
|
||||
legend
|
||||
subplot(2,1,2)
|
||||
hold on
|
||||
title('Symbols Compare')
|
||||
stairs(Symbols.signal(1:100,1),'LineStyle',':','LineWidth',2,'DisplayName','Rx Symbols');
|
||||
stairs(Symbols_tx.signal(1:100,1),'LineWidth',2,'DisplayName','Tx Symbols')
|
||||
stairs(Symbols.signal(1:100,1),'LineStyle','-','LineWidth',2,'DisplayName','Rx Symbols');
|
||||
stairs(Symbols_tx.signal(1:100,1),'LineWidth',2,'DisplayName','Tx Symbols','LineStyle',':')
|
||||
legend
|
||||
Reference in New Issue
Block a user