duobinary cleanup (currently it is a mess)

This commit is contained in:
Silas Oettinghaus
2026-02-23 09:17:26 +01:00
parent c0a0a415a8
commit 18ccaf8c12
9 changed files with 364 additions and 251 deletions

View File

@@ -1,7 +1,7 @@
M = 6;
apply_precode = 1;
M = 4;
apply_precode = 0;
bitpattern = [];
s = RandStream('twister','Seed',1);
@@ -29,12 +29,12 @@ else
end
show2Dconstellation(symbols_tx,symbols_tx,"displayname",'VNLE Out','fignum',2241);
if apply_precode
% Entschiedene Symbole codieren: d_DB(n) = d(n) + d(n-1) (im Fall von PAM4 7 level [0 1 2 3 4 5 6])
symbols_db = Duobinary().encode(symbols_tx);
% Entschiedene codierte Symbole decodieren: d_dec(n) = d_DB(n) mod4
symbols_rx = Duobinary().decode(symbols_db);
else
@@ -51,6 +51,8 @@ disp(['BER: ',sprintf('%.1E',ber),' - - PAM-',num2str(M)]);
figure(200)
clf
hold on
start = 100;
burstwidth = 10;
idxs = start-10:start+burstwidth+10;
scatter(idxs,d.signal(idxs),'DisplayName',['Orig Signal'],'Marker','o');
scatter(idxs,d_burst.signal(idxs),'DisplayName',['Error Signal'],'Marker','x');