added task4.2 changed titles of progress windows

This commit is contained in:
ti_mo
2026-06-12 13:30:30 +02:00
parent 021617fe50
commit 9065374ea7
6 changed files with 756 additions and 14 deletions
+23 -8
View File
@@ -1,12 +1,13 @@
% this code is in no manner clean
% this code is in no manner clean, much code copy because I was lazy
% use these fields to select the task that should be calculated
do_task1 = false;
do_task2 = true;
do_task3_1 = true;
do_task3_2 = true;
do_task3_2_simple_calc = true;
do_task4 = true;
do_task1 = true;
do_task2 = false;
do_task3_1 = false;
do_task3_2 = false;
do_task3_2_simple_calc = false;
do_task4_1 = true;
do_task4_2 = true;
carrier_frequency = 2.4e9;
wifi_be_subcarrier_spacing = 78.125e3;
@@ -42,6 +43,14 @@ if do_task1
end
if do_task2 || do_task3_1
if do_task2 && do_task3_1
task2ProgressLabel = "Task 2 / Task 3.1";
elseif do_task3_1
task2ProgressLabel = "Task 3.1";
else
task2ProgressLabel = "Task 2";
end
use_pilot_tracking = false;
task2;
results_apep4000_npt = results(apep_values == 4000, :);
@@ -49,6 +58,8 @@ if do_task2 || do_task3_1
use_pilot_tracking = true;
task2;
results_apep4000_pt = results(apep_values == 4000, :);
clear task2ProgressLabel;
end
if do_task3_1
@@ -92,7 +103,11 @@ if do_task3_2_simple_calc
end
end
if do_task4
if do_task4_1
use_t1_as_t4 = true;
task1;
end
if do_task4_2
task4;
end
+5 -2
View File
@@ -1,7 +1,9 @@
if use_t1_as_t4
mcs_values_t1 = mcs_values;
progressTitle = "Task 4.1";
else
mcs_values_t1 = [2];
progressTitle = "Task 1";
end
[cfgEHT, simParameters, channel, chInfo, maxChDelay, satelliteDopplerShift, chanBW] = ...
@@ -25,12 +27,13 @@ packetCounts = zeros(numel(mcs_values_t1), numel(snrs));
errorRates = zeros(numel(mcs_values_t1), numel(snrs));
cfrMagnitudesBySnr = cell(numel(mcs_values_t1), numel(snrs));
f = waitbar(0, "Starting");
progressStartText = "Starting MCS sweep";
f = waitbar(0, progressStartText, "Name", progressTitle);
progressTotal = numel(mcs_values_t1) * numel(snrs);
progressQueue = parallel.pool.DataQueue;
parfor_waitbar(f, progressTotal, "Starting MCS sweep", true);
parfor_waitbar(f, progressTotal, progressStartText, true);
progressListener = afterEach(progressQueue, @(info) parfor_waitbar(f, progressTotal, info, false));
for imcs = 1 : numel(mcs_values_t1)
+10 -2
View File
@@ -3,11 +3,19 @@ apep_values = [250 1000 4000 8000 12000];
results = zeros(numel(apep_values), numel(snrs));
f = waitbar(0, "Starting APEP sweep");
if exist('task2ProgressLabel', 'var')
taskLabel = task2ProgressLabel;
else
taskLabel = "Task 2";
end
progressTitle = taskLabel;
progressStartText = "Starting APEP sweep";
f = waitbar(0, progressStartText, "Name", progressTitle);
progressTotal = numel(apep_values) * numel(snrs);
progressQueue = parallel.pool.DataQueue;
parfor_waitbar(f, progressTotal, "Starting APEP sweep", true);
parfor_waitbar(f, progressTotal, progressStartText, true);
progressListener = afterEach(progressQueue, @(info) parfor_waitbar(f, progressTotal, info, false));
for apep_idx = 1 : numel(apep_values)
+4 -2
View File
@@ -3,11 +3,13 @@ carrier_frequencies = [1e9 2.4e9 5e9 5.8e9 6e9 12e9 24e9 60e9];
results = zeros(numel(carrier_frequencies), numel(snrs));
f = waitbar(0, "Starting carrier frequency sweep");
progressTitle = "Task 3.2";
progressStartText = "Starting carrier frequency sweep";
f = waitbar(0, progressStartText, "Name", progressTitle);
progressTotal = numel(carrier_frequencies) * numel(snrs);
progressQueue = parallel.pool.DataQueue;
parfor_waitbar(f, progressTotal, "Starting carrier frequency sweep", true);
parfor_waitbar(f, progressTotal, progressStartText, true);
progressListener = afterEach(progressQueue, @(info) parfor_waitbar(f, progressTotal, info, false));
for f_idx = 1 : numel(carrier_frequencies)
+49
View File
@@ -0,0 +1,49 @@
bandwidth_values = [20 40 80 160 320];
mcs_task4 = 3;
results = zeros(numel(bandwidth_values), numel(snrs));
chanBWs = strings(1, numel(bandwidth_values));
progressTitle = "Task 4.2";
progressStartText = "Starting bandwidth sweep";
f = waitbar(0, progressStartText, "Name", progressTitle);
progressTotal = numel(bandwidth_values) * numel(snrs);
progressQueue = parallel.pool.DataQueue;
parfor_waitbar(f, progressTotal, progressStartText, true);
progressListener = afterEach(progressQueue, @(info) parfor_waitbar(f, progressTotal, info, false));
for bandwidth_idx = 1 : numel(bandwidth_values)
currentBandwidth = bandwidth_values(bandwidth_idx);
[cfgEHT, simParameters, channel, chInfo, maxChDelay, satelliteDopplerShift, chanBW] = create_baseline_configuration(ntn_tdl_delay_profiles(3), currentBandwidth, false, "None", carrier_frequency, 0, 0, leo_altitude, random_stream, seed, tx_antenna_count, rx_antenna_count, apep);
cfgEHT.User{1}.MCS = mcs_task4;
chanBWs(bandwidth_idx) = string(chanBW);
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(bandwidth_idx, snr_idx) = errorCount / packetCount;
send(progressQueue, sprintf("%s | SNR %.1f dB", chanBW, snrs(snr_idx)));
end
end
delete(progressListener);
if ishandle(f)
close(f);
end
markers = 'ox*sd^v><ph+ox*sd^v><ph+';
figure;
for bandwidth_idx = 1 : numel(bandwidth_values)
semilogy(snrs, results(bandwidth_idx, :), ['-' markers(bandwidth_idx)]);
hold on;
end
grid on;
xlabel('SNR (dB)');
ylabel('PER');
legend(chanBWs, 'Location', 'NorthEastOutside');
title(['PER over SNR for bandwidth sweep, NTN-TDL-C, MCS ' num2str(mcs_task4)]);