task3 should be complete now
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
apep = 8000;
|
||||
carrier_frequencies = [1e9 2.4e9 5e9 5.8e9 6e9 12e9 24e9 60e9];
|
||||
|
||||
results = zeros(numel(carrier_frequencies), numel(snrs));
|
||||
|
||||
for f_idx = 1 : numel(carrier_frequencies)
|
||||
[cfgEHT, simParameters, channel, chInfo, maxChDelay, satelliteDopplerShift, chanBW] = ...
|
||||
create_baseline_configuration(ntn_tdl_delay_profiles(3), bandwidth, false, "None", ...
|
||||
carrier_frequencies(f_idx), 0, ...
|
||||
0, leo_altitude, random_stream, ...
|
||||
seed, tx_antenna_count, ...
|
||||
rx_antenna_count, apep);
|
||||
|
||||
cfgEHT.User{1}.MCS = mcs_t1;
|
||||
|
||||
parfor snr_idx = 1 : length(snrs)
|
||||
local_channel = clone(channel);
|
||||
if use_pilot_tracking
|
||||
[errorCount, packetCount, cfrMagnitudes] = simulateTransmission(cfgEHT, local_channel, maxChDelay, snrs(snr_idx), packets_per_snr, maxNumErrors, simParameters, chanBW, snr_idx, elevationAngles, true);
|
||||
else
|
||||
[errorCount, packetCount, cfrMagnitudes] = simulateTransmission(cfgEHT, local_channel, maxChDelay, snrs(snr_idx), packets_per_snr, maxNumErrors, simParameters, chanBW, snr_idx, elevationAngles);
|
||||
end
|
||||
results(f_idx, snr_idx) = errorCount / packetCount;
|
||||
end
|
||||
end
|
||||
|
||||
markers = 'ox*sd^v><ph+ox*sd^v><ph+';
|
||||
|
||||
figure;
|
||||
for f_idx = 1 : numel(carrier_frequencies)
|
||||
semilogy(snrs, results(f_idx, :), ['-' markers(f_idx)]);
|
||||
hold on;
|
||||
end
|
||||
|
||||
grid on;
|
||||
xlabel('SNR (dB)');
|
||||
ylabel('PER');
|
||||
|
||||
dataStr = arrayfun(@(x)sprintf('f_c %.1f GHz', x / 1e9), carrier_frequencies, 'UniformOutput', false);
|
||||
legend(dataStr, 'Location', 'NorthEastOutside');
|
||||
if use_pilot_tracking
|
||||
title(['PER over SNR for Carrier Frequency sweep, ' num2str(cfgEHT.ChannelBandwidth) ', NTN-TDL-C, pilot tracked']);
|
||||
else
|
||||
title(['PER over SNR for Carrier Frequency sweep, ' num2str(cfgEHT.ChannelBandwidth) ', NTN-TDL-C']);
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user