task2 implemented

This commit is contained in:
ti_mo
2026-06-08 14:35:03 +02:00
parent eff95ac6e2
commit 1383556946
6 changed files with 1689 additions and 89 deletions
+38
View File
@@ -0,0 +1,38 @@
% apep_values = [250 1000 4000 8000 12000];
apep_values = [250 600 800 1000];
results = zeros(numel(apep_values), numel(snrs));
for apep_idx = 1 : numel(apep_values)
[cfgEHT, simParameters, channel, chInfo, maxChDelay, satelliteDopplerShift, chanBW] = ...
create_baseline_configuration(ntn_tdl_delay_profiles(3), bandwidth, false, "None", ...
carrier_frequency, 0, ...
0, leo_altitude, random_stream, ...
seed, tx_antenna_count, ...
rx_antenna_count, apep_values(apep_idx));
cfgEHT.User{1}.MCS = mcs_t1;
parfor snr_idx = 1 : length(snrs)
local_channel = clone(channel);
[errorCount, packetCount, cfrMagnitudes] = simulateTransmission(cfgEHT, local_channel, maxChDelay, snrs(snr_idx), packets_per_snr, maxNumErrors, simParameters, chanBW, snr_idx, elevationAngles);
results(apep_idx, snr_idx) = errorCount / packetCount;
end
end
markers = 'ox*sd^v><ph+ox*sd^v><ph+';
figure;
for apep_idx = 1 : numel(apep_values)
semilogy(snrs, results(apep_idx, :), ['-' markers(apep_idx)]);
hold on;
end
grid on;
xlabel('SNR (dB)');
ylabel('PER');
dataStr = arrayfun(@(x)sprintf('APEP %d', x), apep_values, 'UniformOutput', false);
legend(dataStr, 'Location', 'NorthEastOutside');
title(['PER over SNR for APEP sweep, ' num2str(cfgEHT.ChannelBandwidth) ', NTN-TDL-C']);