DB and 400G and minor changes

This commit is contained in:
Silas Oettinghaus
2024-10-07 08:22:28 +02:00
parent 179a7f9682
commit da3be973e2
20 changed files with 578 additions and 142 deletions

View File

@@ -47,10 +47,14 @@ classdef Duobinary
% Pre coding
bk = zeros(numel(data),1);
for k = 1:numel(data)-1
bk(k+1) =mod(data(k)-bk(k),M);
end
% for k = 1:numel(data)-1
% bk(k+1) =mod(data(k)-bk(k),M);
% end
for k = 2:numel(data)
bk(k) =mod(data(k)-bk(k-1),M);
end
%make bipolar
bk = bk .* 2;
bk = bk + b;
@@ -107,9 +111,16 @@ classdef Duobinary
assert(isequal((0:M-1)',unique(data)),'Check Duobinary Precoding'); %seems the signal is not unipolar
% duobinary coding (1+D)
% coeff = [1,1];
%
% data = conv(data,coeff,"same");
coeff = [1,1];
data = conv(data,coeff,"same");
data = filter(coeff, 1, data);
%data = data ./ rms(data);
% data = ifft(fft(real(data)).*fft(fliplr(coeff'),length(data))) + 1i*ifft(fft(imag(data)).*fft(fliplr(coeff'),length(data)));
%make bipolar
data = (data-round(mean(data),1));