diff --git a/lab_4/lab_4.m b/lab_4/lab_4.m index 78bb165..4b0b1e9 100644 --- a/lab_4/lab_4.m +++ b/lab_4/lab_4.m @@ -1,3 +1,13 @@ +% this code is in no manner clean + +% use these fields to select the task that should be calculated +do_task1 = false; +do_task2 = false; +do_task3_1 = false; +do_task3_2 = false; +do_task3_2_simple_calc = true; +do_task4 = false; + carrier_frequency = 2.4e9; wifi_be_subcarrier_spacing = 78.125e3; leo_altitude = 600e3; @@ -26,30 +36,58 @@ seed = 666; ntn_tdl_delay_profiles = ["A" "B" "C" "D"]; -use_t1_as_t4 = false; -% task1; +if do_task1 + use_t1_as_t4 = false; + task1; +end -use_pilot_tracking = false; -task2; -results_apep4000_npt = results(apep_values == 4000, :); +if do_task2 || do_task3_1 + use_pilot_tracking = false; + task2; + results_apep4000_npt = results(apep_values == 4000, :); + + use_pilot_tracking = true; + task2; + results_apep4000_pt = results(apep_values == 4000, :); +end -use_pilot_tracking = true; -task2; +if do_task3_1 + % plot for 3.1 + figure; + semilogy(snrs, results_apep4000_npt, ['-' 'o']); + hold on; + semilogy(snrs, results_apep4000_pt, ['-' 'x']); + hold on; -results_apep4000_pt = results(apep_values == 4000, :); + grid on; + xlabel('SNR (dB)'); + ylabel('PER'); -figure; -semilogy(snrs, results_apep4000_npt, ['-' 'o']); -hold on; -semilogy(snrs, results_apep4000_pt, ['-' 'x']); -hold on; + dataStr = ["no pilot tracking" "pilot tracking"]; + legend(dataStr, 'Location', 'NorthEastOutside'); + title('PER over SNR for APEP 4000, usage of pilot tracking comparision, CBW20, NTN-TDL-C'); +end -grid on; -xlabel('SNR (dB)'); -ylabel('PER'); - -dataStr = ["no pilot tracking" "pilot tracking"]; -legend(dataStr, 'Location', 'NorthEastOutside'); -title('PER over SNR for APEP 4000, usage of pilot tracking comparision, CBW20, NTN-TDL-C'); +if do_task3_2 + use_pilot_tracking = false; + task3; + + use_pilot_tracking = true; + task3; +end +if do_task3_2_simple_calc + carrier_frequencies = [1e9 2.4e9 5e9 5.8e9 6e9 12e9 24e9 60e9]; + meanDopplerShifts = zeros(1, numel(carrier_frequencies)); + parfor f_idx = 1 : numel(carrier_frequencies); + dopplerShifts = arrayfun(@(el) dopplerShiftCircularOrbit(el, leo_altitude, 0, carrier_frequencies(f_idx)), elevationAngles); + meanDopplerShifts(f_idx) = mean(dopplerShifts); + end + % direct markdown insertable + disp("| Frequency | Mean Doppler Shift | Normalized Carrier Frequency Offset epsilon") + disp("|:---:|:---:|:---|") + for f_idx = 1 : numel(carrier_frequencies) + fprintf("| %.1f GHz | ~%.2fkHz | ~%.2f |\n", carrier_frequencies(f_idx) / 1e9, meanDopplerShifts(f_idx) / 1e3, meanDopplerShifts(f_idx) / wifi_be_subcarrier_spacing); + end +end \ No newline at end of file diff --git a/lab_4/link_level_measurements.md b/lab_4/link_level_measurements.md index dbcfd24..76aa241 100644 --- a/lab_4/link_level_measurements.md +++ b/lab_4/link_level_measurements.md @@ -1,4 +1,14 @@ -> This PDF will be a bit more 'well defined' +

+Lab 4 - Wireless Networking Technologies +

+

+Analyzing Link Level Measurements +

+

+by Timo Niemann +

+ +> This report will be a bit more 'well defined' ## Reproducibility | Reproducibility factor | Task 1 value | Task 2 value | Task 3 value | Task 4.1 value | Task 4.2 value | @@ -27,7 +37,8 @@ | TX/RX antennas | 1-by-1 SISO | - | - | - | - | | Pilot tracking | disabled | - | enabled | - | - | | Parallelization | parfor over SNR points | - | - | - | - | -> + +
## Task1 @@ -44,6 +55,8 @@ At link level, PER is the fraction of transmitted PHY-layer packets that are not For the baseline configuration with $f_c = 2.4GHz$, LEO altitude $600km$, orbital shifted elevation angle (Elevation sequence: 10° to 90° to 10° over the packet sequence, mean: $50°$), and static receiver. The mean slant range is $906.32km$, the computed mean satellite Doppler shift is approximately $32.73kHz$. With the IEEE $802.11be$ subcarrier spacing of $78.125kHz$, this corresponds to a normalized CFO of $\epsilon \approx 0.419$. Therefore, the Doppler shift is below one subcarrier spacing but still represents $41.9%$ of the OFDM subcarrier spacing. +
+ #### 1.4 ##### CFR Magnitude single representative Packet: @@ -52,11 +65,15 @@ For the baseline configuration with $f_c = 2.4GHz$, LEO altitude $600km$, orbita The CFR magnitude of the representative packet is relatively flat over the active subcarriers. Only moderate variations are visible, without deep frequency-selective fades. Therefore, for the baseline 20 MHz NTN-TDL-C configuration, the channel appears mostly frequency-flat to mildly frequency-selective. +
+ ##### Complete CFR Magnitude over all representative Packets by first MCS: ![Complete CFR Magnitude over all representative Packets by first MCS](complete_packet_cfr_magnitudes_by_first_mcs.svg) The complete CFR collection is included as a consistency check. The collected packet CFRs show similar magnitude variations over the active subcarriers, indicating that the selected representative packet is typical for this baseline run. No strong deep fades are visible across most packets, so the 20 MHz NTN-TDL-C baseline appears mostly frequency-flat to mildly frequency-selective. +
+ ## Task 2 #### 2.1 @@ -75,13 +92,13 @@ Smaller APEP values perform better than larger APEP values. In particular, APEP Increasing APEP increases the number of payload bits and therefore the number of EHT-Data OFDM symbols. This increases the packet duration. Since pilot tracking is disabled, residual CFO and common phase error are not continuously corrected during the data field. The longer the packet lasts, the more residual phase error can accumulate, which increases the probability that the packet is decoded incorrectly. + #### 2.2 | Target PER | Reasonable SNR | Practical maximum APEP | |:---:|:---:|:---:| | $10^{-1}$ | $23\,dB$ | $600\,B$ | - The target PER for this task is $10^{-1}$. I use $23\,dB$ as a practical SNR limit, because it is close to the beginning of the low-PER region while still avoiding the very high-SNR tail of the simulation. From the focused APEP comparison, APEP $= 600\,B$ reaches PER $\leq 10^{-1}$ at approximately $23\,dB$. Larger payloads require a higher SNR to reach the same target PER. Therefore, under the chosen practical SNR limit, APEP $= 600\,B$ is selected as the practical maximum payload size. ![PER over SNR with focus on 600 and 800 APEP and 250 and 1000 APEP contrast plot](per_snr_apep_t22.svg) @@ -92,14 +109,71 @@ As a practical motivation, this SNR limit can be interpreted as a conservative d For applications where higher data rates are more important than robustness, a larger payload such as APEP $= 4000\,B$ may still be attractive because it reduces relative packet overhead. In the simulated range, this requires operating closer to the high-SNR end of the sweep, approximately around $40\,dB$ for the target PER. +
+ ## Task 3 #### 3.1 -###### Full Task 2 APEP Plot with pilot tracking enabled: +##### Full Task 2 APEP Plot with pilot tracking enabled: ![PER over SNR with Pilot Tracking enabled](per_snr_apep_pilot_tracked.svg) -###### Comparision plot with APEP = 4000 B: +
+ +##### Comparision plot with APEP = 4000 B: ![PER over SNR no pilot tracking vs pilot tracking](per_snr_apep_npt_vs_pt.svg) Comparing the plots shows a significant improvement when pilot tracking is enabled. Pilot tracking uses the EHT-Data pilots to compensate residual common phase error during the data field. This is especially beneficial for larger packets, because residual CFO has more time to accumulate phase error over the packet duration. For APEP = 4000 B, the target PER of $10^{-1}$ is reached at approximately $5.25\,dB$ with pilot tracking, compared to approximately $40\,dB$ without pilot tracking. This shows that pilot tracking strongly improves CFO tolerance for long packets. + +
+ +#### 3.2 + +##### PER over SNR Frequency sweep without pilot tracking: +![PER over SNR Frequency sweep without pilot tracking](per_snr_freq.svg) + +
+ +##### PER over SNR Frequency sweep with pilot tracking: +![PER over SNR Frequency sweep with pilot tracking](per_snr_freq_pt.svg) + +| Frequency | Mean Doppler Shift | Normalized Carrier Frequency Offset epsilon +|:---:|:---:|:---:| +| 1.0 GHz | ~13.64kHz | ~0.17 | +| 2.4 GHz | ~32.73kHz | ~0.42 | +| 5.0 GHz | ~68.19kHz | ~0.87 | +| 5.8 GHz | ~79.11kHz | ~1.01 | +| 6.0 GHz | ~81.83kHz | ~1.05 | +| 12.0 GHz | ~163.67kHz | ~2.09 | +| 24.0 GHz | ~327.33kHz | ~4.19 | +| 60.0 GHz | ~818.33kHz | ~10.47 | + +The carrier-frequency sweep shows the linear dependency between carrier frequency and satellite-induced Doppler shift. At 1 GHz the mean Doppler shift is only about 13.64 kHz, corresponding to a normalized CFO of epsilon = 0.17. At the baseline frequency of 2.4 GHz, the normalized CFO increases to about 0.42. Around 5.8 GHz, epsilon reaches approximately 1, meaning that the Doppler shift is already on the order of one 802.11be subcarrier spacing. The higher-frequency stress cases become much more severe: at 12 GHz epsilon is about 2.09, at 24 GHz about 4.19, and at 60 GHz about 10.47. + +This explains why the PER performance degrades for higher carrier frequencies. A larger normalized CFO causes stronger common phase rotation and inter-carrier interference. Pilot tracking improves the result because it uses the EHT-Data pilots to compensate residual common phase error during the data field. However, for very large CFO values, especially the stress case at 60 GHz, pilot tracking cannot compensate the impairment because the offset is already several subcarrier spacings. + +$\textbf{Pilot tracking}$ shifts the PER curves to lower SNR and makes longer packets and higher carrier frequencies more robust. Its benefit is strongest when the receiver can still perform packet detection and preamble-based CFO correction, but residual phase error remains during the EHT-Data field. If the CFO becomes too large, pilot tracking alone is not sufficient. + +#### 3.3 + +Based on the simulated carrier frequency sweep, 6 GHz can be considered a practical upper carrier frequency for the tested Wi-Fi 7 NTN setup when pilot tracking is enabled. At 6 GHz, the normalized CFO is approximately $\epsilon = 1.05$, which means that the Doppler shift is already close to one OFDM subcarrier spacing. Nevertheless, the PER curve with pilot tracking still remains usable compared to the higher frequency stress cases. + +The frequencies above 6 GHz show a much stronger impairment. At 12 GHz, 24 GHz, and 60 GHz, the normalized CFO becomes several subcarrier spacings, so pilot tracking alone can be no longer sufficient to fully compensate the doppler induced frequency offset. + +Within the simulated setup, 6 GHz is selected as a practical limit because it is still inside the Wi-Fi 7 frequency range and remains manageable with pilot tracking. However, this conclusion is based on the fixed 20 MHz simulation bandwidth and the resulting lab data and without real world application. The possible real world advantage of the 6 GHz band, such as more available spectrum and wider channels, is not directly evaluated here. + +#### 3.4 + +At very low SNR, pilot tracking can have little visible impact because the receiver is limited by noise. The pilot subcarriers are also corrupted by noise, so the residual common phase error estimate becomes unreliable. Packet detection, synchronization, and data demodulation errors dominate the PER. In this region, correcting residual CFO does not help much because the packet is already limited by the low SNR. + +#### 3.5 + +At very high SNR, pilot tracking can also have little visible impact because the receiver may already recover most packets after packet detection and coarse/fine CFO correction. The PER is then close to zero, so there is little room for pilot tracking to visibly improve the curve. Meaning the link is no longer limited by noise and the remaining residual phase error is small enough for the receiver. For extreme carrier frequency stress cases, the CFO can be so large that pilot tracking alone is insufficient. This is a separate limitation caused by doppler rather than low noise. + +
+ +## Task 4 + +
+ +## Task 5 \ No newline at end of file diff --git a/lab_4/link_level_measurements.pdf b/lab_4/link_level_measurements.pdf new file mode 100644 index 0000000..3071bb5 Binary files /dev/null and b/lab_4/link_level_measurements.pdf differ diff --git a/lab_4/per_snr_freq.svg b/lab_4/per_snr_freq.svg new file mode 100644 index 0000000..3b32383 --- /dev/null +++ b/lab_4/per_snr_freq.svg @@ -0,0 +1,1190 @@ + + +Qt SVG Document +MATLAB, The MathWorks, Inc. Version 26.1.0.3251617 R2026a Update 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 + + + +5 + + + +10 + + + +15 + + + +20 + + + +25 + + + +30 + + + +35 + + + +40 + + + +SNR (dB) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.3 + + + +0.4 + + + +0.5 + + + +0.6 + + + +0.7 + + + +0.8 + + + +0.9 + + + +1 + + + +PER + + + +PER over SNR for Carrier Frequency sweep, CBW20, NTN-TDL-C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +f + + + +c + + + + 1.0 GHz + + + +f + + + +c + + + + 2.4 GHz + + + +f + + + +c + + + + 5.0 GHz + + + +f + + + +c + + + + 5.8 GHz + + + +f + + + +c + + + + 6.0 GHz + + + +f + + + +c + + + + 12.0 GHz + + + +f + + + +c + + + + 24.0 GHz + + + +f + + + +c + + + + 60.0 GHz + + + + + + + diff --git a/lab_4/per_snr_freq_pt.svg b/lab_4/per_snr_freq_pt.svg new file mode 100644 index 0000000..4085b54 --- /dev/null +++ b/lab_4/per_snr_freq_pt.svg @@ -0,0 +1,812 @@ + + +Qt SVG Document +MATLAB, The MathWorks, Inc. Version 26.1.0.3251617 R2026a Update 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 + + + +5 + + + +10 + + + +15 + + + +20 + + + +25 + + + +30 + + + +35 + + + +40 + + + +SNR (dB) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +10 + + + +-3 + + + +10 + + + +-2 + + + +10 + + + +-1 + + + +10 + + + +0 + + + +PER + + + +PER over SNR for Carrier Frequency sweep, CBW20, NTN-TDL-C, pilot tracked + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +f + + + +c + + + + 1.0 GHz + + + +f + + + +c + + + + 2.4 GHz + + + +f + + + +c + + + + 5.0 GHz + + + +f + + + +c + + + + 5.8 GHz + + + +f + + + +c + + + + 6.0 GHz + + + +f + + + +c + + + + 12.0 GHz + + + +f + + + +c + + + + 24.0 GHz + + + +f + + + +c + + + + 60.0 GHz + + + + + + + diff --git a/lab_4/task3.m b/lab_4/task3.m new file mode 100644 index 0000000..5c2edf4 --- /dev/null +++ b/lab_4/task3.m @@ -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>