Changes from mwork PC.

PDP 2025

MPI analysis

new focus on database and SQL
This commit is contained in:
Silas Oettinghaus
2025-03-21 08:11:40 +01:00
parent 402e491506
commit 74066d0669
36 changed files with 2234 additions and 620 deletions

View File

@@ -1,21 +1,32 @@
% Setup PRBS parameters
O = 12;
M = 2;
O = 6;
M = 6;
N = 2^(O-1); % Length of PRBS
randkey = 1; % Random key for random stream
use_eth_mapping =1;
if M ~= 6
dimension = log2(M);
else
dimension = 5;
end
[~, seed] = prbs(O, 1); % Initialize first seed of PRBS
bitpattern = [];
s = RandStream('twister', 'Seed', randkey);
for i = 1:log2(M)
for i = 1:dimension
bitpattern(:, i) = randi(s, [0 1], N, 1);
end
if M == 6
bitpattern = reshape(bitpattern',[],1);
bitpattern = bitpattern(1:end-mod(length(bitpattern),5));
end
Tx_bits = Informationsignal(bitpattern);
Digi_Mod = PAMmapper(M, 0,"eth_style",1);
Digi_Mod = PAMmapper(M, 0,"eth_style",use_eth_mapping);
% Map bits to symbols
Symbols = Digi_Mod.map(Tx_bits);
@@ -23,7 +34,6 @@ Symbols = Digi_Mod.map(Tx_bits);
% Demap symbols back to bits
Rx_bits = Digi_Mod.demap(Symbols);
[~, error_num, ber, ~] = calc_ber(Tx_bits.signal, Rx_bits.signal, ...
"skip_front", 0, "skip_end", 0, "returnErrorLocation", 1);
[~, error_num, ber, ~] = calc_ber(Tx_bits.signal(1:length(Rx_bits.signal)), Rx_bits.signal,"skip_front", 0, "skip_end", 0, "returnErrorLocation", 1);
fprintf('BER VNLE: %.1E \n',ber);
fprintf('BER: %.1E \n',ber);