DB and 400G and minor changes
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
useprbs = 1;
|
||||
M = 8;
|
||||
M = 6;
|
||||
randkey = 1;
|
||||
fsym = 112e9;
|
||||
datarate = 448e9;
|
||||
fsym = round(datarate / log2(M)) ;
|
||||
|
||||
%%%%% PRBS Generation in correct shape for Modulation Format %%%%%%
|
||||
O = 18; %order of prbs
|
||||
N = 2^(O-1); %length of prbs
|
||||
O = 17; %order of prbs
|
||||
N = 2^(O); %length of prbs
|
||||
[~,seed] = prbs(O,1); %initialize first seed of prbs
|
||||
bitpattern=[];
|
||||
|
||||
@@ -34,12 +35,6 @@ Symbols = Duobinary().precode(Symbols_tx);
|
||||
|
||||
Symbols = Duobinary().encode(Symbols);
|
||||
|
||||
% Symbols.spectrum("displayname","db","fignum",12)
|
||||
|
||||
% Symbols = Duobinary().feedbackdetector(Symbols);
|
||||
|
||||
% Symbols.eye(fsym,M);
|
||||
|
||||
Symbols = Duobinary().decode(Symbols);
|
||||
|
||||
Rx_bits = PAMmapper(M,0).demap(Symbols);
|
||||
@@ -48,15 +43,35 @@ Rx_bits = PAMmapper(M,0).demap(Symbols);
|
||||
|
||||
disp(['BER: ',sprintf('%.1E',ber),' - - PAM-',num2str(M)]);
|
||||
%
|
||||
figure;hold on
|
||||
subplot(2,1,1)
|
||||
title('Bits Compare')
|
||||
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)
|
||||
|
||||
|
||||
figure(3);
|
||||
clf
|
||||
%sgtitle(['BER: ',num2str(ber),' // Error is at position: ',num2str(error_pos),''])
|
||||
subplot(2,2,1)
|
||||
hold on
|
||||
title('Symbols Compare')
|
||||
title('First Bits')
|
||||
stairs(Tx_bits.signal(1:100,1),'LineStyle','-','LineWidth',2,'DisplayName','Tx Bits');
|
||||
stairs(Rx_bits.signal(1:100,1),'LineWidth',2,'DisplayName','Rx Bits','LineStyle',':')
|
||||
legend
|
||||
|
||||
subplot(2,2,2)
|
||||
title('Last Bits')
|
||||
hold on
|
||||
stairs(Tx_bits.signal(end-50:end,1),'LineStyle','-','LineWidth',2,'DisplayName','Tx Bits');
|
||||
stairs(Rx_bits.signal(end-50:end,1),'LineWidth',2,'DisplayName','Rx Bits','LineStyle',':')
|
||||
legend
|
||||
|
||||
subplot(2,2,3)
|
||||
hold on
|
||||
title('First Symbols Compare')
|
||||
stairs(Symbols_tx.signal(1:100,1),'LineWidth',2,'DisplayName','Tx Symbols','LineStyle','-')
|
||||
stairs(Symbols.signal(1:100,1),'LineStyle',':','LineWidth',2,'DisplayName','Rx Symbols');
|
||||
stairs(Symbols_tx.signal(1:100,1),'LineWidth',2,'DisplayName','Tx Symbols')
|
||||
legend
|
||||
|
||||
subplot(2,2,4)
|
||||
hold on
|
||||
title('Last Symbols Compare')
|
||||
stairs(Symbols_tx.signal(end-50:end,1),'LineWidth',2,'DisplayName','Tx Symbols','LineStyle','-')
|
||||
stairs(Symbols.signal(end-50:end,1),'LineStyle',':','LineWidth',2,'DisplayName','Rx Symbols');
|
||||
legend
|
||||
Reference in New Issue
Block a user