Contents

38.901 §7.5 Twelve-Step Channel Generation: Complete Guide to Framework, Computation, and Sionna Source Code

Sionna Source Code
#Sionna#38.901#channel-modeling#UMa#source-code

This post follows 3GPP TR 38.901 g10 draft §7.5 “Fast fading model”, unpacks the twelve-step channel generation procedure for the UMa (urban macro) scenario — first the framework structure and the call order of one invocation, then every formula, parameter table, and distribution — and maps each step to the Sionna 1.x implementation (sionna/phy/channel/tr38901/).

This post is based on Sionna 1.x (the PyTorch implementation) in the local repository; the 38.901 code lives in src/sionna/phy/channel/tr38901/. Line numbers refer to that tree. The older Sionna 0.x (TensorFlow) packed everything into a single 3gpp.py, so the file layout differs, but the step-by-step mapping still carries over.

Version note: the g10 draft is structured differently from earlier releases. §7.4 now contains only pathloss (7.4.1), LOS probability (7.4.2), O2I penetration (7.4.3) and shadow-fading autocorrelation (7.4.4); the twelve-step procedure lives entirely in §7.5; and §7.6.3 is spatial consistency, no longer the “spatial channel model”. The channel-matrix synthesis (Eqs. 7.5-22–7.5-30) is now part of Step 11. Sionna’s code comments mix old and new numbering — keep this in mind. This post covers both sides: the framework and call order, and “what exactly is computed at each step”.

1. Framework: four generators plus a scenario

TR 38.901 §7.5 decomposes “one channel realization” into twelve steps. Sionna splits the work across four classes, orchestrated by a system-level base class:

UMa / UMi / RMa                    (uma.py / umi.py / rma.py — thin parameter wiring)
 └── SystemLevelChannel            (system_level_channel.py — the orchestrator)
      ├── UMaScenario              (uma_scenario.py — geometry + model parameter tables)
      ├── LSPGenerator             (lsp.py — Steps 1–4: large-scale parameters & pathloss)
      ├── RaysGenerator            (rays.py — Steps 5–9: cluster/ray-level parameters)
      └── ChannelCoefficientsGenerator
                                   (channel_coefficients.py — Steps 10–11: random phases & channel matrices)
           └── PanelArray          (antenna.py — 38.901 array elements and patterns)

__init__.py (L7-21) exports LSP, LSPGenerator, Rays, RaysGenerator, ChannelCoefficientsGenerator, SystemLevelChannel, UMa, UMaScenario, PanelArray, and friends.

File responsibilities:

FileLinesResponsibility
lsp.py585Steps 1–4: log-normal LSP sampling, cross-LSP correlation, spatial consistency, pathloss (§7.4.1) and O2I (§7.4.3)
rays.py814Steps 5–9: cluster delays, cluster powers, cluster/ray angles, random coupling, XPR
channel_coefficients.py1062Steps 10–11: random phases, polarization/array/Doppler matrices, LOS combination (i.e. the array-based method of the old §7.6.3)
system_level_channel.py537Drives the whole flow + Step 12 (pathloss & shadow-fading weighting)
uma_scenario.py347UMa geometry, LOS probability (§7.4.2.1), parameter tables such as UMa_LoS.json
antenna.py755PanelArray: element positions, polarizations, 38.901 radiation patterns

2. Call order of one generation

The minimal user-facing usage (from the uma.py L63-88 docstring):

from sionna.phy.channel.tr38901 import PanelArray, UMa

bs_array = PanelArray(num_rows_per_panel=4, num_cols_per_panel=4,
                      polarization='dual', polarization_type='cross',
                      antenna_pattern='38.901', carrier_frequency=3.5e9)
ut_array = PanelArray(num_rows_per_panel=1, num_cols_per_panel=1,
                      polarization='single', polarization_type='V',
                      antenna_pattern='omni', carrier_frequency=3.5e9)

channel_model = UMa(carrier_frequency=3.5e9, o2i_model='low',
                    ut_array=ut_array, bs_array=bs_array,
                    direction='uplink')
channel_model.set_topology(ut_loc, bs_loc, ut_orientations,
                           bs_orientations, ut_velocities, in_state)
h, delays = channel_model(num_time_samples=100, sampling_frequency=1e6)

What UMa.__call__ actually runs, in order (system_level_channel.py L234-353):

SystemLevelChannel.__call__()
 ├─ LSPGenerator.__call__()                 # Steps 1–4, lsp.py L112-175
 │    └─ scenario already provides: LOS probability, basic pathloss, correlation matrix square roots
 ├─ RaysGenerator.__call__(lsp)             # Steps 5–9, rays.py L118-171
 │    ├─ _cluster_delays()                  #   L264
 │    ├─ _cluster_powers()                  #   L325
 │    ├─ _azimuth_angles_of_arrival/...     #   L393–L721 (four angle types)
 │    ├─ _cross_polarization_power_ratios() #   L780
 │    └─ _random_coupling()                 #   L750
 ├─ Build Topology (velocities/orientations/LOS state/3D distance)   # L281-292
 ├─ For uplink, permute TX/RX angles & powers                         # L302-330
 ├─ ChannelCoefficientsGenerator.__call__() # Steps 10–11, channel_coefficients.py L282-317
 │    ├─ _step_10()  → phi                  #   L544
 │    └─ _step_11()  → h, delays            #   L1011
 ├─ _step_12(h, sf)                         # Step 12, system_level_channel.py L508-537
 └─ permute into (a, tau) outputs           # L343-344

The three generators are created in SystemLevelChannel.__init__ (L74-104, created at L84/L85/L97); UMa itself only forwards constructor arguments to UMaScenario (uma.py L104-117).

3. Steps 1–12 at a glance

The twelve steps group into four phases, and Sionna’s modules map onto them one-to-one:

Inputs        Step 1   environment, network layout, antenna arrays
Large-scale   Step 2   LOS/NLOS + indoor/outdoor state
(§7.4)        Step 3   pathloss PL
              Step 4   LSPs: DS/ASD/ASA/SF/K/ZSA/ZSD (+ correlations)
Small-scale   Step 5   cluster delays
(§7.5)        Step 6   cluster powers
              Step 7   cluster angles + ray angle offsets
              Step 8   random coupling within clusters
              Step 9   XPR
Coefficients  Step 10  random initial phases
              Step 11  per-cluster/per-element channel coefficients
                       (incl. subclusters & LOS specular component)
              Step 12  apply pathloss & shadow fading

The table below is the master mapping of the twelve steps to the Sionna source (step numbers follow the g10 twelve-step scheme; Sionna’s class-level docstrings split Steps 1–4 slightly differently, while function-level comments such as rays.py L267 “step 5 of section 7.5, TR 38.901” agree with g10 — trust the function comments). The detailed walkthrough of each step follows in the sections after this table:

Step§7.5 contentSpec detailsSionna implementation
1Set environment, network layout, antenna parameters (inputs)§7.5 Step 1uma.py L91-117 constructor, set_topology() (system_level_channel.py L120-189), PanelArray (antenna.py L293-632)
2Per-link LOS/NLOS + indoor/outdoor state§7.4.2.1, Table 7.4.2-1 (UMa)uma_scenario.py L87-122 los_probability; system_level_scenario.py L1066-1088 _sample_los(); user in_state selects O2I
3Compute pathloss§7.4.1, Table 7.4.1-1; O2I per §7.4.3uma_scenario.py L250-347 precomputes basic_pathloss; lsp.py L92-110 sample_pathloss(); O2I _o2i_low_loss()/_o2i_high_loss()
4Draw LSPs (DS/ASD/ASA/SF/K/ZSA/ZSD, plus CSPD in some scenarios) and apply correlationsTable 7.5-6 (μ/σ and the cross-correlation matrix); spatial consistency per §7.6.3.1lsp.py L112-175: log-normal sampling, two matrix products at L129-137 (cross_lsp_correlation_matrix_sqrt and spatial_lsp_correlation_matrix_sqrt), 104°/52° clamps (L149-172)
5Cluster delaysEqs. 7.5-1–7.5-4rays.py L264 _cluster_delays() (includes per-ray delay offsets)
6Cluster powers (extra cluster loss)Eqs. 7.5-5–7.5-8rays.py L325 _cluster_powers() (per-cluster shadowing term & LOS specular handling)
7Cluster angles and ray angle offsetsEqs. 7.5-9–7.5-20, Tables 7.5-2/3/4rays.py L393-721: _azimuth_angles_*/_zenith_angles_*; ray offset constants hardcoded at L101-116 _ray_offsets
8Random coupling of angles within a cluster§7.5 Step 8 (shuffle AoA/AoD/ZoA/ZoD pairing)rays.py L750-778 _random_coupling() → _shuffle_angles()
9XPR (cross-polarization power ratio)Eq. 7.5-21, Table 7.5-6rays.py L780-813 _cross_polarization_power_ratios(), reading scenario muXPR/sigmaXPR
10Random phase per ray and polarization combination§7.5 Step 10, θ ~ U(−π, π)channel_coefficients.py L544-577 _step_10()
11Generate per-path channel matrices (spatial channel model)Eqs. 7.5-22–7.5-30, Table 7.5-5 (the old §7.6.3 array-based method, now folded into this step)channel_coefficients.py L1011-1062 _step_11() — see the “Does Sionna support the §7.6.3 spatial channel model?” section below
12Apply pathloss & shadow fading to path coefficients§7.5 Step 12system_level_channel.py L508-537 _step_12()

Implementation notes worth calling out:

  • Where Steps 1–4 are split: the LSPGenerator docstring (lsp.py L63-65) says it “implements steps 1 to 4 … as well as path-loss generation (Section 7.4.1) with O2I low- and high-loss models (Section 7.4.3)”. The LOS/NLOS decision itself is not in the generator — the scenario (SystemLevelScenario) computes it from BS/UT coordinates and blockage.
  • RaysGenerator actually covers Steps 5–9: the class docstring says “steps 6 to 9” (rays.py L65), but the function-level comments start at step 5 (cluster delays). Trust the function comments.
  • Subclustering: system-level models (UMa/UMi/RMa) apply the spec’s sub-cluster delay-spread treatment (Table 7.5-5, Eqs. 7.5-26–7.5-28); the 20-ray → 3-subcluster grouping is hardcoded at channel_coefficients.py L182-193 (_sub_cl_1_ind buffers). CDL does not use subclustering.
  • Uplink vs downlink: rays are always generated for the downlink; for uplink the angle/power tensors are permuted to swap TX/RX (system_level_channel.py L302-330) instead of re-implementing.

4. Step 1: Set environment, network layout, and antenna parameters

The standard requires: scenario choice (UMa), global coordinate system with zenith/azimuth definitions, numbers and 3D locations of BSs/UTs, LOS direction angles (ϕLOS,AOD/θLOS,ZOD/ϕLOS,AOA/θLOS,ZOA), antenna field patterns and array geometries, array orientations (Ωα bearing / Ωβ downtilt / Ωγ slant), UT speed and direction, center frequency and bandwidth.

Sionna: all of this is model input — no randomness:

  • scenario / frequency / bandwidth / O2I model / link direction: UMa(carrier_frequency, o2i_model, ut_array, bs_array, direction, ...) (uma.py L91-117);
  • locations, orientations, velocities, LOS & indoor states: set_topology(ut_loc, bs_loc, ut_orientations, bs_orientations, ut_velocities, in_state, los) (system_level_channel.py L120-189);
  • arrays and 38.901 patterns: PanelArray (antenna.py L293-632).

Two implementation conventions worth knowing: velocity only feeds the Doppler term — positions never move; and the LOS state is fixed at set_topology time for the whole simulation call (see §18.2/§18.4 below).

5. Step 2: Assign propagation condition (LOS/NLOS) and indoor state

UMa LOS probability (Table 7.4.2-1, distance in meters):

PLOS={1,d2D<18(18d2D+e−d2D/63(1−18d2D))(1+5c4(d2D100)3e−d2D/150),d2D≥18P_{\mathrm{LOS}}=\begin{cases}1, & d_{2D}<18\\[4pt] \left(\dfrac{18}{d_{2D}}+e^{-d_{2D}/63}\left(1-\dfrac{18}{d_{2D}}\right)\right) \left(1+\dfrac{5c}{4}\left(\dfrac{d_{2D}}{100}\right)^3 e^{-d_{2D}/150}\right), & d_{2D}\ge 18\end{cases}

with c=(hUT−1310)1.5c=\left(\frac{h_{UT}-13}{10}\right)^{1.5} (0 when hUT<13h_{UT}<13 m). Conditions across BS-UT links are independent; all links of one UT share its indoor/outdoor state.

Sionna: uma_scenario.py L87-122 los_probability implements the formula verbatim; the draw happens in system_level_scenario.py L1066-1088 _sample_los(): Bernoulli(PLOSP_{\mathrm{LOS}}) unless the user pins los, and indoor UTs are forced NLOS (los & ~in_state).

6. Step 3: Compute pathloss

UMa (Table 7.4.1-1; fc in GHz, distances in meters):

  • LOS, d2D≤dBPd_{2D}\le d_{BP}: PL=28.0+22.0log⁡10(d3D)+20log⁡10(fc)\mathrm{PL}=28.0+22.0\log_{10}(d_{3D})+20\log_{10}(f_c)

  • LOS, d2D>dBPd_{2D}> d_{BP}: PL=28.0+40.0log⁡10(d3D)+20log⁡10(fc)−9log⁡10 ⁣(dBP2+(hBS−hUT)2)\mathrm{PL}=28.0+40.0\log_{10}(d_{3D})+20\log_{10}(f_c)-9\log_{10}\!\left(d_{BP}^2+(h_{BS}-h_{UT})^2\right)

  • NLOS: PL=max⁡ ⁣(PLLOS,  13.54+39.08log⁡10(d3D)+20log⁡10(fc)−0.6(hUT−1.5))\mathrm{PL}=\max\!\left(\mathrm{PL}_{\mathrm{LOS}},\;13.54+39.08\log_{10}(d_{3D})+20\log_{10}(f_c)-0.6(h_{UT}-1.5)\right)

  • breakpoint dBP=4hBS′hUT′fc/c0d_{BP}=4h'_{BS}h'_{UT}f_c/c_0 with effective heights h′=h−hEh'=h-h_E. The environment height hEh_E is drawn per link (Note 1): 1 m with probability 11+C(d2D,hUT)\dfrac{1}{1+C(d_{2D},h_{UT})}, otherwise from the discrete uniform set {12,15,…,hUT−1.5}\{12,15,\dots,h_{UT}-1.5\} m, where

C(d2D,hUT)=g(d2D)⋅(hUT−1310)1.5,g(d2D)=54(d2D100)3e−d2D/150C(d_{2D},h_{UT})=g(d_{2D})\cdot\left(\frac{h_{UT}-13}{10}\right)^{1.5},\qquad g(d_{2D})=\frac{5}{4}\left(\frac{d_{2D}}{100}\right)^3 e^{-d_{2D}/150}

and C=0C=0 (hence hE=1h_E=1 m) when d2D<18d_{2D}<18 m or hUT<13h_{UT}<13 m.

Sionna vs. standard for hE: the split probability 11+C\frac{1}{1+C}, the C/gC/g formulas, the zeroing branches for d2D<18d_{2D}<18 m and hUT<13h_{UT}<13 m, and dBP=4(hBS−hE)(hUT−hE)fc/c0d_{BP}=4(h_{BS}-h_E)(h_{UT}-h_E)f_c/c_0 all match the standard term by term (uma_scenario.py L265-318; h_e = r + (1.0 - r) * s is exactly the two-branch selection). However, the “otherwise” branch requires a discrete uniform draw from {12,15,…,hUT−1.5}\{12,15,\dots,h_{UT}-1.5\} (3 m step), while Sionna approximates it with a continuous uniform U(12, hUT−1.5)U(12,\,h_{UT}-1.5) (comment at L295-307: discrete uniform sampling does not support non-scalar bounds). The means are close, but the continuous version has slightly larger variance and can take values outside the set (e.g. 13.7 m), causing small deviations in the breakpoint distance and in the second LOS pathloss segment. Also, when hUT<13.5h_{UT}<13.5 m the standard set is empty (undefined in the spec); Sionna clamps hEh_E to 12 m (L309-313).

O2I building penetration loss (§7.4.3.1, indoor UTs only)

The total pathloss of an O2I link is (Eq. 7.4-2):

PLO2I=PLout+PLexternal+PLinside+XPσP\mathrm{PL}_{\mathrm{O2I}}=\mathrm{PL}_{\mathrm{out}}+ \mathrm{PL}_{\mathrm{external}}+\mathrm{PL}_{\mathrm{inside}}+ X_{\mathrm{P}}\sigma_{\mathrm{P}}

where PLout\mathrm{PL}_{\mathrm{out}} is the outdoor LOS pathloss evaluated with the outdoor 3D distance d3Dout\mathrm{d3D_{out}}, and the last three terms come from the low-loss / high-loss models of Table 7.4.3-2:

TermLow-lossHigh-loss
External wall PLexternal\mathrm{PL}_{\mathrm{external}}5−10lg⁡ ⁣(0.3⋅10−Lglass/10+0.7⋅10−Lconcrete/10)5-10\lg\!\left(0.3\cdot10^{-L_{\mathrm{glass}}/10}+0.7\cdot10^{-L_{\mathrm{concrete}}/10}\right)same form with 0.7⋅10−LIRR/10+0.3⋅10−Lconcrete/100.7\cdot10^{-L_{\mathrm{IRR}}/10}+0.3\cdot10^{-L_{\mathrm{concrete}}/10}
Indoor propagation PLinside\mathrm{PL}_{\mathrm{inside}}0.5⋅d2Din0.5\cdot\mathrm{d2D_{in}}0.5⋅d2Din0.5\cdot\mathrm{d2D_{in}}
Random term σP\sigma_{\mathrm{P}}4.4 dB6.5 dB

Material losses LL are from Table 7.4.3-1 (fc in GHz): standard multi-pane glass Lglass=2+0.2fcL_{\mathrm{glass}}=2+0.2f_c, IRR-coated glass LIRR=23+0.3fcL_{\mathrm{IRR}}=23+0.3f_c, concrete Lconcrete=5+4fcL_{\mathrm{concrete}}=5+4f_c. The indoor penetration depth is d2Din=min⁡(U1,U2)\mathrm{d2D_{in}}=\min(U_1,U_2) with U1,2∼U(0,25 m)U_{1,2}\sim U(0,25\,\mathrm{m}) for UMa/UMi (0–10 m for RMa), generated per UT. Applicability: both models for UMa/UMi (the choice is a simulation parameter), low-loss only for RMa, high-loss only for InF; below 6 GHz single-frequency simulations may instead use the backward compatibility model of Table 7.4.3-3 (fixed PLexternal=20\mathrm{PL}_{\mathrm{external}}=20 dB). The penetration loss is added to shadow fading in the log domain (UT-specific: the same O2I loss applies from a UT to every BS); outdoor UTs get 0 dB.

Sionna: uma_scenario.py L250-347 — C(d2D,hUT)C(d_{2D},h_{UT}) and hEh_E sampling (L265-315, the discrete uniform is approximated by a continuous one), pl_1/pl_2/pl_los (L322-330) and pl_nlos = max(pl_los, pl_3) (L334-340) match the formulas term by term; O2I lives in lsp.py _o2i_low_loss() L467-524 / _o2i_high_loss() L526-584 (material losses, 0.3/0.7 weights, 0.5·d2D_in, σP all per Table 7.4.3-1/2, with an indoor_mask zeroing outdoor UTs). PL is only multiplied onto the coefficients at Step 12 (lsp.py L92-110 sample_pathloss() returns basic pathloss + O2I, without shadow fading).

7. Step 4: Generate large-scale parameters (LSPs)

Per link, draw the seven log-normal LSPs DS, ASD, ASA, SF, K, ZSA, ZSD from the UMa columns of Table 7.5-6 (fc in GHz):

LSPUMa LOS μ / σUMa NLOS μ / σO2I μ / σ
lg(DS/1s)−6.955−0.0963·lg fc / 0.66−6.28−0.204·lg fc / 0.39−6.62 / 0.32
lg(ASD/1°)1.06+0.1114·lg fc / 0.281.5−0.1144·lg fc / 0.281.25 / 0.42
lg(ASA/1°)1.81 / 0.202.08−0.27·lg fc / 0.111.76 / 0.16
lg(ZSA/1°)0.95 / 0.16−0.3236·lg fc+1.512 / 0.161.01 / 0.43
SF [dB]σ=4σ=6σ=7
K [dB]μ=9 / σ=3.5N/AN/A
lg(ZSD/1°)max(−0.5, −2.1·d2D/1000 − 0.01·hUT−1.5+ 0.75)

Key points:

  1. Cross-LSP correlation: the mutual-correlation matrix in the lower half of Table 7.5-6 (e.g. UMa NLOS DS vs SF = −0.4, ASD vs SF = −0.6) is applied via its Cholesky square root to sM=[sSF,sK,sDS,sASD,sASA,sZSD,sZSA]T\mathbf{s_M}=[s_{SF},s_K,s_{DS},s_{ASD},s_{ASA},s_{ZSD},s_{ZSA}]^T (order mandated by the g10 text).
  2. Caps: ASA/ASD = min(·, 104°), ZSA/ZSD = min(·, 52°).
  3. Co-sited sectors to the same UT share identical LSPs; UTs on different floors are uncorrelated.
  4. §7.4.4 shadow-fading autocorrelation: slow fading is correlated over horizontal displacement Δx\Delta x via the exponential autocorrelation function (Eq. 7.4-5, ITU-R P.1816)
R(Δx)=exp⁡ ⁣(−Δxdcor)R(\Delta x)=\exp\!\left(-\frac{\Delta x}{d_{\mathrm{cor}}}\right)

with per-LSP correlation distances dcord_{\mathrm{cor}} in the last block of Table 7.5-6 (UMa LOS: DS 30 m, ASD 18 m, ASA 15 m, SF 37 m, K 12 m, ZSA/ZSD 15 m; NLOS mostly 40–50 m). It also underpins spatial consistency (§7.6.3): after a UT moves, its LSPs evolve with correlation set by each dcord_{\mathrm{cor}} instead of being resampled independently.

Sionna: lsp.py L112-175 __call__ — log-normal draws (L119-127), Cholesky correlation (L129-137), caps (L149-172). The μ/σ values and correlation coefficients are not hardcoded but shipped as data files models/UMa_LoS.json, UMa_NLoS.json, UMa_O2I.json (paths at uma_scenario.py L130-142); ZSD is the exception — being distance- and height-dependent it is computed live at uma_scenario.py L176-184. The Eq. 7.4-5 distances enter the JSONs as corrDist* fields and are consumed by lsp.py L333-446 _compute_lsp_spatial_correlation_sqrt() in spatial consistency mode.

The two correlation matrices: cross-LSP vs. spatial-LSP

LSPGenerator.__call__ (lsp.py L112-141) applies two matrix multiplications in the log domain, each driven by a precomputed attribute:

① _cross_lsp_correlation_matrix_sqrt (cross-LSP correlation)

  • Shape [batch, num_bs, num_ut, 7, 7] — one 7×7 matrix per link.
  • Content: the Cholesky square root of the inter-LSP correlation matrix from the lower half of Table 7.5-6 (10 non-zero coefficients such as DS↔SF, DS↔ASD, ASA↔SF, ASD↔K), taken per state LOS/NLOS/O2I (lsp.py L225-331 _compute_cross_lsp_correlation_matrix()).
  • Acts on the LSP dimension: turns each link’s 7 independent standard normals s∼N(0,I)\mathbf{s}\sim\mathcal{N}(\mathbf{0},\mathbf{I}) into a correlated vector: s′=L s\mathbf{s}'=\mathbf{L}\,\mathbf{s}, LLT=Ccross\mathbf{L}\mathbf{L}^T=\mathbf{C}_{\mathrm{cross}}.
  • Spec reference: §7.5 Step 4 verbatim (“taking into account cross correlation according to Table 7.5-6 … with the square root matrix being generated using the Cholesky decomposition”). Sionna orders the vector [DS,ASD,ASA,SF,K,ZSA,ZSD], different from the g10-specified sM=[sSF,sK,sDS,sASD,sASA,sZSD,sZSA]T\mathbf{s_M}=[s_{SF},s_K,s_{DS},s_{ASD},s_{ASA},s_{ZSD},s_{ZSA}]^T, but the matrix is filled in the same order as the vector — statistically equivalent.

② _spatial_lsp_correlation_matrix_sqrt (spatial correlation)

  • Shape [batch, num_bs, 7, num_ut, num_ut] — one UT×UT matrix per BS and per LSP.
  • Content (lsp.py L333-446 _compute_lsp_spatial_correlation_sqrt()): for each LSP XX, UTs ii and jj are correlated as
C(Xi,Xj)=exp⁡ ⁣(−dijDX)C(X_i,X_j)=\exp\!\left(-\frac{d_{ij}}{D_X}\right)

where dijd_{ij} is the 2D (X-Y plane) distance between the UTs and DXD_X is the decorrelation distance corrDist of LSP XX (UMa LOS: DS 30 m, ASD 18 m, ASA 15 m, SF 37 m, K 12 m, ZSA/ZSD 15 m). Each LSP’s distance matrix is scaled by −1/DX-1/D_X, exponentiated, then Cholesky square-rooted.

  • Acts on the UT dimension (lsp.py L134-137 permutes the UT axis into the matmul side). Samples of the same LSP from one BS to nearby UTs become partially correlated — the closer the UTs, the more similar their LSPs. This is the static implementation of spatial consistency.
  • Spec reference: §7.6.3.1 (LSP spatial consistency, i.e. SSC — spatial consistency for LSPs); the decorrelation-distance values come from Table 7.5-6 (and for SF also from the autocorrelation definition in §7.4.4 Eq. 7.4-5). Note it is not part of the original §7.5 Step 4 flow: Step 4 only requires cross-LSP correlation, while the spec places inter-link LSP spatial correlation in §7.6.3.1. Sionna merges both into a single sampling pass, so LSPs of multiple links within one batch naturally satisfy SSC.
  • Two simplifications admitted in the docstring (L340-342): links to different BSs are not spatially correlated (one matrix per BS), and UT pairs in different states (LOS/NLOS/O2I) get zero correlation — the spec does not require decorrelation across state changes, so this is a conservative implementation choice.

Line-by-line walkthrough of _compute_lsp_spatial_correlation_sqrt() (lsp.py L333-446)

Notation: batch = batch size, num_bs/num_ut = number of BSs/UTs, 7 = number of LSPs.

LinesCodePurposeOutput shape
L361-363indoor = scenario.indoor.unsqueeze(1).expand(-1, num_bs, -1)Broadcast each UT’s indoor flag along the BS axis[batch, num_bs, num_ut]
L365-366los_pair_bool = los_ut.unsqueeze(3) & los_ut.unsqueeze(2)Build the “are both UTs LOS?” pairing matrix: outer AND of row-side and column-side LOS flags[batch, num_bs, num_ut, num_ut]
L368-369nlos_pair_bool = nlos_ut.unsqueeze(3) & nlos_ut.unsqueeze(2)Pairing matrix for “both NLOS” (outdoor and not LOS)same
L371o2i_pair_bool = indoor.unsqueeze(3) & indoor.unsqueeze(2)Pairing matrix for “both indoor”same
L377-385for parameter_name in ("corrDistDS", ..., "corrDistZSD")Loop over the 7 LSPs, in the same order as the LSP vector [DS,ASD,ASA,SF,K,ZSA,ZSD]—
L390-397filtering_matrix = torch.eye(num_ut, ...).expand(batch, num_bs, -1, -1).clone()Filter initialized to the identity: diagonal 1 means “a UT is always correlated with itself”; expand returns a view, so clone is required for safe writes[batch, num_bs, num_ut, num_ut]
L399-403distance_scaling_matrix = broadcast_params(_params_los[name], _params_nlos[name], _params_o2i[name])Each UT picks the decorrelation distance DXD_X of this LSP from the JSON tables (e.g. corrDistDS in UMa_LoS.json) according to its own state[batch, num_bs, num_ut]
L404-406.unsqueeze(3).expand(-1, -1, -1, num_ut)Broadcast along the “column UT” axis: row ii carries UT ii‘s own DXD_X, i.e. a pair uses the row-side UT’s value[batch, num_bs, num_ut, num_ut]
L407= -1.0 / distance_scaling_matrixTurn into −1/DX-1/D_X so the next step computes exp⁡(−d/DX)\exp(-d/D_X) by multiplicationsame
L410-426torch.where(los/nlos/o2i_pair_bool, 1.0, filtering_matrix)Three passes: UT pairs sharing a state (LOS/NLOS/O2I) are set to 1 to keep correlation; pairs in different states stay 0 (decorrelated); diagonal remains 1same
L431-432torch.stack(filtering_matrices, dim=2) and torch.stack(distance_scaling_matrices, dim=2)Stack the 7 loop results along the LSP axis (dim=2)[batch, num_bs, 7, num_ut, num_ut]
L434-436ut_dist_2d = matrix_ut_distance_2d.unsqueeze(1).unsqueeze(2)Pairwise 2D distance matrix between UTs, with empty BS and LSP axes inserted for broadcasting (distances are BS-independent)[batch, 1, 1, num_ut, num_ut]
L439-441spatial_lsp_correlation = torch.exp(ut_dist_2d * distance_scaling_matrices) * filtering_matricesThe core formula Cij=exp⁡(−dij/DX)⋅1[same state]C_{ij}=\exp(-d_{ij}/D_X)\cdot\mathbb{1}[\text{same state}], yielding one UT×UT correlation matrix per BS per LSP[batch, num_bs, 7, num_ut, num_ut]
L445chol, _ = torch.linalg.cholesky_ex(spatial_lsp_correlation, check_errors=False)Cholesky factorization for the lower-triangular square root LLT=C\mathbf{L}\mathbf{L}^T=\mathbf{C}; the _ex variant (no exception, returns info) keeps CUDA Graph compatibilitysame
L446self._update_buffer("_spatial_lsp_correlation_matrix_sqrt", chol)Write into the pre-registered buffer used by __call__ L136same

Supplementary details (tensor shapes & broadcasting):

  1. Shapes of scenario.los vs. scenario.indoor. los is [batch, num_bs, num_ut] (bool; defined at system_level_scenario.py L237-241) — LOS is a property of the BS-UT link, so it carries the BS axis (the same UT may be LOS to one BS and NLOS to another). indoor is [batch, num_ut] — indoor state is a UT property independent of the BS, hence L361-363 first broadcasts it via unsqueeze(1).expand(-1, num_bs, -1) to match los’s shape before the pairing matrices are formed.

  2. filtering_matrices after the loop and what torch.stack does. Before L431, filtering_matrices is a Python list of 7 tensors, each [batch, num_bs, num_ut, num_ut] (one per LSP). torch.stack(..., dim=2) inserts a new axis after the first two dims, producing a single 5-D tensor [batch, num_bs, 7, num_ut, num_ut]. Note the difference between stack and cat: stack promotes each member by one dimension (new axis), while cat joins along an existing one. The new LSP axis aligns with the LSP vector order [DS,ASD,ASA,SF,K,ZSA,ZSD], enabling the one-shot batched computation over all LSPs below.

  3. The three operations at L439-441 and their broadcasting. ① ut_dist_2d [batch, 1, 1, num_ut, num_ut] broadcasts its two singleton axes over num_bs and 7 — distances are BS- and LSP-independent; ② the first elementwise product gives dij⋅(−1/DX)d_{ij}\cdot(-1/D_X) and exp() yields exp⁡(−dij/DX)\exp(-d_{ij}/D_X) — the exponential decorrelation model of §7.6.3.1 / Eq. 7.4-5 (the decay scale DXD_X differs per LSP and per state); ③ multiplying by the 0/1 filtering_matrices forces cross-state UT pairs to zero correlation, keeps the exponential value for same-state pairs, and the diagonal is always exp⁡(0)⋅1=1\exp(0)\cdot 1=1. The result C\mathbf{C} is one UT×UT correlation matrix per BS per LSP, batch Cholesky-factored LLT=C\mathbf{L}\mathbf{L}^T=\mathbf{C} at L445.

  4. Why 7 matrices instead of 1? Is the cost excessive? The 7 LSPs have different decorrelation distances DXD_X (UMa LOS: SF 37 m, DS 30 m, ASD 18 m, ASA/ZSA/ZSD 15 m, K 12 m), so exp⁡(−d/DX)\exp(-d/D_X) differs per LSP — the 7 correlation matrices and 7 Cholesky factorizations are essential work required by the spec and cannot be shared. The only truly redundant part is filtering_matrices: it is LSP-independent, so the loop produces 7 identical copies; one copy could in principle be broadcast at L441. Sionna stacks same-shape copies for simpler code and static CUDA Graph shapes. More importantly, consider the call frequency: the whole function runs once per set_topology (topology change), not on the LSP-sampling hot path — __call__ only does two batched matmuls. The 7-iteration loop merely collects parameters; exp, the elementwise product, and Cholesky all run as a single batch after stacking — for a GPU, one batched Cholesky beats seven small ones.

  5. Which axes torch.linalg.cholesky_ex operates on, and output shapes. All torch.linalg functions (cholesky/inv/det/matmul, etc.) follow one convention: the last two axes are the matrix, all preceding axes are batch axes; each matrix is factorized independently and the output has the same shape as the input. Here that means batch × num_bs × 7 independent num_ut × num_ut matrices in one batched call: both spatial_lsp_correlation and chol are [batch, num_bs, 7, num_ut, num_ut], and each slice of chol is lower-triangular L\mathbf{L} (LLT=C\mathbf{L}\mathbf{L}^T=\mathbf{C}, upper-triangle zero). The second return value info has shape [batch, num_bs, 7]: 0 = success for that matrix, positive = the order at which the matrix is not positive definite; with check_errors=False no exception is raised and the code ignores it. This convention also explains the permute at __call__ L134-137: the UT axis must be moved adjacent to the trailing matrix axes before it can matmul with chol.

How it is consumed: at __call__ L134-137 the noise tensor is first permuted to [batch, num_bs, 7, num_ut, 1] (UT axis adjacent to the matrix), then s @ chol.transpose(-1,-2) performs s′=L s\mathbf{s}'=\mathbf{L}\,\mathbf{s} as a batched matmul, and the result is squeezed back to [batch, num_bs, num_ut, 7].

Two implementation details worth noting: ① a pair’s correlation distance comes from the row-side UT’s state (broadcast over columns at L404) — unambiguous since correlated pairs share a state; ② zeroing cross-state pairs is Sionna’s conservative simplification (docstring L340-342); §7.6.3.1 does not require decorrelation across state changes.

After both correlation steps, each LSP is scaled by σ and shifted by μ in the log domain, converted with 10^x, and clamped to 104°/52° (lsp.py L149-172).

8. Step 5: Generate cluster delays

Exponential delay distribution (Table 7.5-6: exponential for all three UMa states):

τ~n=−rτ DS⋅ln⁡(Xn),Xn∼U(0,1)(7.5-1)\tilde\tau_n=-r_\tau\,\mathrm{DS}\cdot\ln(X_n),\qquad X_n\sim U(0,1) \tag{7.5-1}

UMa rτr_\tau: LOS 2.5, NLOS 2.3, O2I 2.2. Normalize and sort ascending:

τ^n=τ~n−min⁡n(τ~n)(7.5-2)\hat\tau_n=\tilde\tau_n-\min_n(\tilde\tau_n) \tag{7.5-2}

For LOS links an extra K-factor compensation scaling is applied (the specular peak widens the measured delay spread):

Zc=1+Zc′⋅10KdB/10,τn=Zcτ^n(7.5-3, 7.5-4)Z_c=1+Z_c'\cdot 10^{K_{\mathrm{dB}}/10},\qquad \tau_n=Z_c\hat\tau_n \tag{7.5-3,\,7.5-4}

Zc′Z_c' is scenario-specific (Table 7.5-6). Note the scaled delays are not used for cluster power generation — which is why the next step uses τ^n\hat\tau_n.

Sionna: rays.py L264 _cluster_delays() (docstring: “step 5 of section 7.5”); rτr_\tau and Zc′Z_c' come from the JSON parameter files.

9. Step 6: Generate cluster powers

Single-slope exponential power-delay profile:

P~n=exp⁡ ⁣(−τ^nrτ DS)⋅10Xn/10⋅10CP~/10(7.5-5)\tilde P_n=\exp\!\left(-\frac{\hat\tau_n}{r_\tau\,\mathrm{DS}}\right) \cdot 10^{X_n/10}\cdot 10^{C_{\tilde P}/10} \tag{7.5-5}

XnX_n is the per-cluster Gaussian shadowing term (UMa per-cluster shadowing σ = 3/3/4 dB, Table 7.5-6); CP~C_{\tilde P} is the extra cluster loss (N/A for UMa). Normalize:

Pn=P~n/∑n=1NP~n(7.5-6)P_n=\tilde P_n\Big/\sum_{n=1}^{N}\tilde P_n \tag{7.5-6}

For LOS, a specular ray of power KR/(1+KR)K_R/(1+K_R) is added to the first cluster (Eq. 7.5-7) and normalization switches to the δ-function form of 7.5-8; these powers are used only in 7.5-9/7.5-14 (angles), not in 7.5-22 (coefficients). Each ray receives Pn/MP_n/M with M=20. Finally, clusters more than −25 dB below the strongest cluster are removed.

UMa cluster count N: LOS/O2I 12, NLOS 20.

Sionna: rays.py L325 _cluster_powers() (includes LOS specular handling and the −25 dB pruning).

10. Step 7: Generate arrival and departure angles

Azimuth (AOA): the composite PAS is a wrapped Gaussian; angles come from the inverse Gaussian function

ϕn,AOA=ϕLOS,AOA+Xn f ⁣(cASA1−κ2Pn)(7.5-9..11)\phi_{n,\mathrm{AOA}}=\phi_{\mathrm{LOS,AOA}}+X_n\, f\!\left(c_{\mathrm{ASA}}\sqrt{1-\frac{\kappa}{2P_n}}\right) \tag{7.5-9..11}

where f(⋅)f(\cdot) includes the cluster-count scaling factor (Table 7.5-2: N=12→1.146, N=20→1.289); for LOS the first cluster is forced to ϕLOS,AOA\phi_{\mathrm{LOS,AOA}} (Eq. 7.5-12), and Xn∈{+1,−1}X_n\in\{+1,-1\} is equally likely. Rays add offsets:

ϕn,m,AOA=ϕn,AOA+αm cASA(7.5-13)\phi_{n,m,\mathrm{AOA}}=\phi_{n,\mathrm{AOA}}+\alpha_m\,c_{\mathrm{ASA}} \tag{7.5-13}

The 20 ray offsets of Table 7.5-3 (normalized to rms spread): ±0.0447, ±0.1413, ±0.2492, ±0.3715, ±0.5129, ±0.6797, ±0.8844, ±1.1481, ±1.5195, ±2.1551. AOD follows the same procedure.

Zenith (ZOA/ZOD): composite PAS is Laplacian via the inverse Laplacian function (Eqs. 7.5-14/7.5-15) with scaling factors from Table 7.5-4 (N=12→1.104, N=20→1.178); ZOD randomness and mirroring follow Eqs. 7.5-19/7.5-20 (involving the ZSD mean). UMa intra-cluster spreads (Table 7.5-6): cASA = 11/15/8°, cASD = 5/2/5°, cZSA/cZSD = 7/7/3° (LOS/NLOS/O2I).

Sionna: rays.py L393-721 (_azimuth_angles_*, _zenith_angles_*); Table 7.5-3 offsets hardcoded at L101-116 _ray_offsets; Table 7.5-2 / 7.5-4 scaling factors live in the JSON parameters (scaling_*).

11. Step 8: Random coupling of angles within a cluster

Within each cluster (or subcluster of the two strongest clusters), the AOD↔AOA, ZOD↔ZOA and AOD↔ZOD pairs are shuffled randomly, removing the deterministic one-to-one mapping between departure and arrival angles.

Sionna: rays.py L750-778 _random_coupling() → _shuffle_angles() (L722-748): the four angle arrays AOA/AOD/ZOA/ZOD are each shuffled independently along the intra-cluster ray axis (a random permutation from argsort of normal randoms), so ray indices are randomly re-paired across the four angle sets; one permutation per BS, shared by all UTs, which keeps same-site sector results identical.

12. Step 9: Generate XPR

Per ray, draw the cross-polarization power ratio (log-normal):

κn,m=10X/10,X∼N(μXPR,σXPR)(7.5-21)\kappa_{n,m}=10^{X/10},\quad X\sim\mathcal N(\mu_{\mathrm{XPR}},\sigma_{\mathrm{XPR}}) \tag{7.5-21}

UMa: μXPR/σXPR = 8/4 (LOS), 7/3 (NLOS), 9/5 (O2I) dB.

Sionna: rays.py L780-813 _cross_polarization_power_ratios(): draws X∼N(μXPR,σXPR)X\sim\mathcal{N}(\mu_{\mathrm{XPR}},\sigma_{\mathrm{XPR}}) per (cluster, ray) — μ/σ read from the scenario table per LOS/NLOS/O2I state and broadcast to the cluster/ray dims (L791-795) — then converts to linear-domain κ via 10^(X/10) (L810-812), stored in Rays.kappa. The standard notes that the outcomes of Steps 1–9 must be identical for all links from co-sited sectors to a UT (Sionna achieves this via LSP reuse and a shared RNG).

13. Step 10: Draw initial random phases

For every ray and each of the four polarization combinations (θθ/θϕ/ϕθ/ϕϕ), draw θn,m(⋅)∼U(−π,π)\theta_{n,m}^{(\cdot)}\sim U(-\pi,\pi).

Sionna: channel_coefficients.py L544-577 _step_10() produces a [batch, bs, ut, clusters, rays, 4] phase tensor in one shot.

14. Step 11: Generate channel coefficients per cluster and element pair

This is the core assembly step of the spatial channel model: Steps 1–10 only produce tabulated and random parameters (cluster powers, angles, delays, XPR, initial phases); Step 11 assembles them into the channel coefficient of every TX–RX element pair (u,s)(u,s).

Reading map: this section proceeds as “standard equation → term-by-term table (each cell now states what the corresponding Sionna function does) → subclusters / LOS / combination / assembly order”. If the symbols r^\hat r, dˉ\bar d, Frx/FtxF_{\mathrm{rx}}/F_{\mathrm{tx}}, κ\kappa feel unintuitive, the next chapter “Phase structure of Eq. (7.5-22): a symbol dictionary” unpacks them one by one (including how the spherical basis vectors relate to antenna orientation, where ±45° polarization enters the formulas and how the TX and RX ends differ, and a reproducible numerical example). The Steps 1–12 main line is unaffected by that chapter.

The standard equation (7.5-22)

The g10 text reads: “For the N−2 weakest clusters, say n=3,4,…,N, the channel coefficients are given by” — note that (7.5-22) yields a cluster-level coefficient by coherently summing the M=20M=20 rays inside the cluster:

Hu,s,nNLOS(t)=PnM∑m=1M[Frx,u,θFrx,u,φ][ejΦn,mθθκn,m−1/2ejΦn,mθφκn,m−1/2ejΦn,mφθejΦn,mφφ][Ftx,s,θFtx,s,φ]ej2πλ0r^rx,n,mTdˉrx,uej2πλ0r^tx,n,mTdˉtx,sej2πfD,n,mt(7.5-22)H^{\mathrm{NLOS}}_{u,s,n}(t)=\sqrt{\frac{P_n}{M}}\sum_{m=1}^{M} \begin{bmatrix}F_{\mathrm{rx},u,\theta}&F_{\mathrm{rx},u,\varphi}\end{bmatrix} \begin{bmatrix}e^{j\Phi_{n,m}^{\theta\theta}}&\kappa_{n,m}^{-1/2}e^{j\Phi_{n,m}^{\theta\varphi}}\\ \kappa_{n,m}^{-1/2}e^{j\Phi_{n,m}^{\varphi\theta}}&e^{j\Phi_{n,m}^{\varphi\varphi}}\end{bmatrix} \begin{bmatrix}F_{\mathrm{tx},s,\theta}\\F_{\mathrm{tx},s,\varphi}\end{bmatrix} e^{j\frac{2\pi}{\lambda_0}\hat r_{\mathrm{rx},n,m}^{\mathsf T}\bar d_{\mathrm{rx},u}} e^{j\frac{2\pi}{\lambda_0}\hat r_{\mathrm{tx},n,m}^{\mathsf T}\bar d_{\mathrm{tx},s}} e^{j2\pi f_{D,n,m}t} \tag{7.5-22}

The pattern arguments are omitted for brevity: the RX pair is evaluated at (θn,m,ZOA,ϕn,m,AOA)(\theta_{n,m,\mathrm{ZOA}},\phi_{n,m,\mathrm{AOA}}) and the TX pair at (θn,m,ZOD,ϕn,m,AOD)(\theta_{n,m,\mathrm{ZOD}},\phi_{n,m,\mathrm{AOD}}); r^\hat r are the unit sphere vectors of Eqs. 7.5-23/24; and fD,n,m=r^rx,n,mTvˉ/λ0f_{D,n,m}=\hat r_{\mathrm{rx},n,m}^{\mathsf T}\bar v/\lambda_0 is the Doppler shift of Eq. 7.5-25 (the standard contains only the moving-UT term; Sionna generalizes it to whichever end moves).

Eq. (7.5-22) term by term: physics and Sionna implementation

① ∑m=1M\sum_{m=1}^{M}: coherent ray summation. Rays inside a cluster share the cluster delay but differ in angles and initial phases; what superposes at the element is the field (complex amplitude), not the power, so the coherent sum preserves the fine-grained multipath fading structure.

To read the code, first fix the tensor shape: _step_11_nlos (channel_coefficients.py L842-877) computes the per-ray channel matrix h_full (Eq. 7.5-28), which has 8 axes: [batch, num_tx, num_rx, num_clusters, num_rays, num_rx_ant, num_tx_ant, num_time]. dim=4 is exactly the intra-cluster ray axis (M=20). The standard’s ∑m\sum_m is implemented as summing along dim=4, collapsing “20 rays per cluster” into “one coefficient per cluster”, done by _step_11_reduce_nlos (L879-958) in two cases:

  • CDL (no subclustering): one line h_nlos = h_full.sum(dim=4) (L946) sums all 20 rays of every cluster — the most literal implementation of Eq. (7.5-22).
  • System-level UMa/UMi/RMa (subclustering): the two strongest clusters are split into three subclusters per Table 7.5-5; each subcluster sums its own ray group via the hardcoded indices _sub_cl_1/2/3_ind (L182-190): h_strong[..., _sub_cl_x_ind, ...].sum(dim=4) (L934-936, groups of 10/6/4 rays), each carrying its own subcluster delay offset; the remaining N−2 weak clusters still sum all rays: h_weak.sum(dim=4) (L939).

② Pn/M\sqrt{P_n/M}: ray amplitude. The cluster power PnP_n (output of Step 6, shadow fading included) is split equally over the M=20M=20 rays, and the square root converts power into field amplitude. Sionna: _step_11_nlos L868-870 power_scaling = √(rays.powers / h_full.shape[4]) (h_full.shape[4] is the ray count M), broadcast over all factors.

③ Φn,mθθ\Phi^{\theta\theta}_{n,m} etc.: four random initial phases. Microscopic scattering path lengths are uncontrollable at the sub-wavelength scale, equivalent to drawing one independent phase Φ∼U(−π,π)\Phi\sim U(-\pi,\pi) per polarization combination; this is the source of channel randomness — a sum of many random-phase rays is approximately a complex Gaussian process, i.e. Rayleigh fading. Sionna: _step_10 L544-577 generates the [...,4] phase tensor in one shot; _step_11_phase_matrix L598-606 places ejΦe^{j\Phi} into the four entries of the 2×2 matrix.

④ κn,m−1/2\kappa_{n,m}^{-1/2}: cross-polarization attenuation. Scattering “leaks” polarization: cross-pol power = co-pol power ÷ κ (κ is the linear XPR). Diagonal entries (θθ, φφ) have unit amplitude, off-diagonal entries (θφ, φθ) are scaled by 1/κ1/\sqrt{\kappa}, so each cross-pol path has amplitude Pn,m/κ\sqrt{P_{n,m}/\kappa}. Sionna: _step_11_phase_matrix L594-597 multiplies e1/e2 by xpr_scaling = √(1/κ); κ is drawn in Step 9 (rays.py L780-813, log-normal, μ/σ from Table 7.5-6).

⑤ Frx,uT Φ Ftx,sF_{\mathrm{rx},u}^{\mathsf T}\,\Phi\,F_{\mathrm{tx},s}: the polarization projection sandwich. The TX pattern determines the θ/φ field components radiated along the ray, the RX pattern projects the incoming wave onto the element’s polarization basis, and the middle matrix describes polarization rotation during propagation. All FF values are given in the GCS and already include the bearing/downtilt/slant rotations (Eq. 7.1-11). Sionna: _step_11_field_matrix L726-840 runs the whole chain — _gcs_to_lcs (Eqs. 7.1-7/8) to local angles → AntennaElement.field (Eqs. 7.3-4/5) for A(cos⁡γ,sin⁡γ)\sqrt{A}(\cos\gamma,\sin\gamma) → _l2g_response (Eqs. 7.1-11/15) rotated back to the GCS via ψ → gather pol1/pol2 components by antenna polarization index → dot product with h_phase.

⑥ ej2πλ0r^Tdˉe^{j\frac{2\pi}{\lambda_0}\hat r^{\mathsf T}\bar d}: array geometric phase. The extra path of an element relative to the array center equals its position projected onto the propagation direction; one ray forms a planar phase gradient across the array — the sole origin of angle resolution and beamforming. Sionna: _step_11_array_offsets L662-724, with element positions from AntennaArray.positions (already rotated into the GCS by the panel orientation).

⑦ ej2πfD,n,mte^{j2\pi f_{D,n,m}t}: Doppler. fD,n,m=r^rx,n,mTvˉ/λ0f_{D,n,m}=\hat r_{\mathrm{rx},n,m}^{\mathsf T}\bar v/\lambda_0 is the velocity projected onto the ray direction, one cos⁡αD\cos\alpha_D per ray; with approximately uniform arrival angles the composite spectrum takes the Jakes shape. Sionna: _step_11_doppler_matrix L610-660, exponent = 2π/λ0·(r̂·v̄)·t, supporting motion at either end via moving_end.

⑧ Assembly order. ①–⑦ map one-to-one onto the code: _step_10 → _step_11_phase_matrix → _step_11_field_matrix → _step_11_array_offsets + _step_11_doppler_matrix → _step_11_nlos multiplies the factors and applies Pn/M\sqrt{P_n/M} → _step_11_reduce_nlos performs ∑m\sum_m → _step_11_los (Eq. 7.5-29, ΦLOS=diag(1,−1)\mathbf{\Phi}_{\mathrm{LOS}}=\mathrm{diag}(1,-1)) → _step_11 combines them via KRK_R (Eq. 7.5-30).

For the fuller symbol dictionary, the closed-form inter-element phase difference, and the per-ray numerical example, see the later section “Phase structure of Eq. (7.5-22): a symbol dictionary”.

Term-by-term reading

FactorPhysical meaningSionna implementation (what the function does)
∑m=1M\sum_{m=1}^{M}Coherent superposition of the 20 rays (phase relations kept, not power addition)channel_coefficients.py _step_11_reduce_nlos: sums the tensor h_full along dim=4 (the intra-cluster ray axis). CDL has no subclusters, so a single L946 h_full.sum(dim=4) does it; system-level models first split the 20 rays of the two strongest clusters into 3 subcluster groups per Table 7.5-5 and sum each group (L934-936), while the weak clusters are summed whole (L939)
Pn/M\sqrt{P_n/M}Equal-power ray amplitude (cluster power PnP_n ÷ 20)_step_11_nlos L868-870: computes power_scaling = √(P/M) and broadcasts it onto every ray coefficient, setting each ray’s amplitude
Φn,mθθ,Φn,mθφ,Φn,mφθ,Φn,mφφ\Phi_{n,m}^{\theta\theta},\Phi_{n,m}^{\theta\varphi},\Phi_{n,m}^{\varphi\theta},\Phi_{n,m}^{\varphi\varphi}The four random initial phases drawn in Step 10, indexed by polarization pair_step_10 L544-577: draws four independent uniform [0,2π)[0,2\pi) phases per (cluster, ray), outputs a phi[...,4] tensor consumed by the four cells θθ/θφ/φθ/φφ of the 2×2 polarization matrix
κn,m−1/2\kappa_{n,m}^{-1/2}XPR attenuation: diagonal co-pol entries have unit amplitude, off-diagonal cross-pol entries are scaled by 1/κ1/\sqrt{\kappa}_step_11_phase_matrix L579-608: assembles the four phases into h_phase=[[e^{jφ₀₀}, e^{jφ₀₁}],[e^{jφ₁₀}, e^{jφ₁₁}]] and multiplies the two off-diagonal cells by √(1/κ) (L594-597), applying the XPR weighting
Frx,u,θ/φF_{\mathrm{rx},u,\theta/\varphi}, Ftx,s,θ/φF_{\mathrm{tx},s,\theta/\varphi}Element field patterns in the GCS (Eq. 7.1-11, including bearing/downtilt/slant rotations)_step_11_field_matrix L726-840: the full antenna-response chain — GCS ray angles rotated to LCS by _gcs_to_lcs (L766/777) → each polarization calls field() (L781-801) to get (Acos⁡γ,Asin⁡γ)(\sqrt A\cos\gamma,\sqrt A\sin\gamma) → _l2g_response (L788-789) rotates back to the GCS spherical basis via ψ → matrix product with h_phase (L804-810) → gathered per element by polarization (L812-831) → rx/tx field vectors dotted (L835). See the “Computing F_rx / F_tx” section below
ej2πλ0r^Tdˉe^{j\frac{2\pi}{\lambda_0}\hat r^{\mathsf T}\bar d}Geometric phase from the element’s projection along the ray direction (the beamforming mechanism)_step_11_array_offsets L662-724: expresses each element position dˉ\bar d in the GCS via the rotation matrices, dots it with the ray unit vector r^\hat r, and scales by 2π/λ02\pi/\lambda_0 to get the per-element geometric phase
ej2πfD,n,mte^{j2\pi f_{D,n,m}t}Time-varying phase due to mobility_step_11_doppler_matrix L610-660: computes fD=vλ0(r^⋅v^)f_D=\frac{v}{\lambda_0}(\hat r\cdot\hat v) per ray and multiplies by the sampling-time vector to produce the time-varying phase sequence ej2πfDte^{j2\pi f_D t}

Note: all _step_* functions in the table live in src/sionna/phy/channel/tr38901/channel_coefficients.py; κ is drawn in rays.py L780-813.

Expanding the matrix product, each ray contributes four polarization paths:

ejΦθθFrx,u,θFtx,s,θ+κ−1/2ejΦθφFrx,u,θFtx,s,φ+κ−1/2ejΦφθFrx,u,φFtx,s,θ+ejΦφφFrx,u,φFtx,s,φe^{j\Phi^{\theta\theta}}F_{\mathrm{rx},u,\theta}F_{\mathrm{tx},s,\theta} +\kappa^{-1/2}e^{j\Phi^{\theta\varphi}}F_{\mathrm{rx},u,\theta}F_{\mathrm{tx},s,\varphi} +\kappa^{-1/2}e^{j\Phi^{\varphi\theta}}F_{\mathrm{rx},u,\varphi}F_{\mathrm{tx},s,\theta} +e^{j\Phi^{\varphi\varphi}}F_{\mathrm{rx},u,\varphi}F_{\mathrm{tx},s,\varphi}

The first and last terms are co-polarized (θ→θ, φ→φ); the middle two are cross-polarized (θ→φ, φ→θ) with amplitude Pn,m/κ\sqrt{P_{n,m}/\kappa} — the meaning of “κ is the cross-polarization power ratio in linear scale”. The g10 note adds: if polarization is not considered, the 2×2 matrix degenerates to a scalar and only vertically polarized field patterns are applied. The four phases are mutually independent, so the four polarization paths of one ray are uncorrelated in the complex plane.

Subcluster expansion for the two strongest clusters (n=1,2)

Their 20 rays map onto 3 subclusters (Table 7.5-5): 10/20 rays at offset 0, 6/20 at 1.28, 4/20 at 2.56 (in units of the cluster delay spread τn\tau_n; UMa cluster DS = max⁡(0.25, 6.5622−3.4084lg⁡fc)\max(0.25,\,6.5622-3.4084\lg f_c) ns), with delay offsets per Eq. 7.5-26 and subcluster aggregation per Eqs. 7.5-27/28.

LOS specular component (Eq. 7.5-29)

HLOS(t)=KR1+KR ej2πλ0(r^RX,LOS⋅dˉRX+r^TX,LOS⋅dˉTX)ej2πλ0(r^⋅vˉ)t FRXTΦLOSFTX δ(τ)\mathbf{H}_{\mathrm{LOS}}(t)=\sqrt{\frac{K_R}{1+K_R}}\, e^{j\frac{2\pi}{\lambda_0}\left(\hat r_{\mathrm{RX,LOS}}\cdot\bar d_{\mathrm{RX}}+\hat r_{\mathrm{TX,LOS}}\cdot\bar d_{\mathrm{TX}}\right)} e^{j\frac{2\pi}{\lambda_0}(\hat r\cdot\bar v)t}\, \mathbf{F}_{\mathrm{RX}}^{\mathrm T}\mathbf{\Phi}_{\mathrm{LOS}}\mathbf{F}_{\mathrm{TX}}\,\delta(\tau)

Same structure as (7.5-22), but the polarization matrix becomes the deterministic ΦLOS=diag(1,−1)\mathbf{\Phi}_{\mathrm{LOS}}=\mathrm{diag}(1,-1) (no random phases, no XPR).

Final combination (Eq. 7.5-30)

H(t,τ)=KRKR+1 HLOS+1KR+1 HNLOS\mathbf{H}(t,\tau)=\sqrt{\tfrac{K_R}{K_R+1}}\,\mathbf{H}_{\mathrm{LOS}} +\sqrt{\tfrac{1}{K_R+1}}\,\mathbf{H}_{\mathrm{NLOS}}

Sionna’s assembly order

The code mirrors the factor order of (7.5-22) exactly: _step_10 draws the four phases → _step_11_phase_matrix builds the 2×2 polarization matrix (h_phase: unit diagonal, off-diagonal scaled by 1/κ\sqrt{1/\kappa}) → _step_11_field_matrix L726-840 computes the field sandwich FrxT phase FtxF_{\mathrm{rx}}^{\mathsf T}\,\text{phase}\,F_{\mathrm{tx}} (with GCS↔LCS rotations _gcs_to_lcs/_l2g_response) → _step_11_array_offsets L662-724 and _step_11_doppler_matrix L610-660 supply the three exponentials → _step_11_nlos L842-877 multiplies the factors and applies Pn/M\sqrt{P_n/M} → _step_11_reduce_nlos L879-958 performs ∑m\sum_m and the Table 7.5-5 subcluster grouping (hardcoded at L182-193) → _step_11_los L960 computes the specular component → _step_11 L1011-1062 combines them via the K-factor of Eq. 7.5-30.

For the detailed derivation of every phase source in (7.5-22) (closed form of the inter-element phase difference, the Jakes spectrum, the sign of the delay phase), see the later section “Phase structure of Eq. (7.5-22): a symbol dictionary”; how the Frx/FtxF_{\mathrm{rx}}/F_{\mathrm{tx}} sandwich is built from vendor pattern data (“Computing F_rx / F_tx”) and the three places where ±45° polarization enters the formulas (“Where ±45° polarization enters the formulas”) follow in the same part.

15. Step 12: Apply pathloss and shadowing

H ∗= 10−PL/20⋅10SF/10\mathbf{H}\ \mathrel{*}=\ 10^{-\mathrm{PL}/20}\cdot\sqrt{10^{\mathrm{SF}/10}}

Sionna: system_level_channel.py L508-537 _step_12(). pl_db = sample_pathloss() is the basic PL + O2I (without SF); shadow fading is passed separately in linear domain as sf, and the gain gain = 10^(−pl_db/20)·√sf is multiplied onto h; enable_pathloss/enable_shadow_fading control the two features.

16. Phase structure of Eq. (7.5-22): a symbol dictionary

Step 11’s Eq. (7.5-22) packs four phase sources and three vector symbols. This section unpacks each — the full answer to “how exactly is the per-element phase difference of a CDL/system-level channel computed”.

The subsections are organized in four groups, best read in order:

  • A. Phase dictionary (total phase → r^\hat r → dˉ\bar d → closed form → Doppler → frequency-domain sign): each exponential factor reduced to one sentence of geometry;
  • B. Antenna response & polarization (FrxF_{rx} definition → computing F_rx/F_tx → κ → where ±45° enters → TX vs. RX difference → non-standard polarization angles): answers “where the two FF vectors actually come from, what ±45° antennas change, and how to configure other polarization angles”;
  • C. Worked numerical example: one ray computed by hand and checked against Sionna;
  • D. Cross-reference: for later lookup.

Total phase of one ray

Collecting all exponential terms of (7.5-22), ray (n,m)(n,m) contributes at element pair (u,s)(u,s):

Ψn,mu,s(t)=Φn,m⏟(1) random phase+2πλ0(r^rx,n,mTdˉrx,u+r^tx,n,mTdˉtx,s)⏟(2) geometric+2πλ0(r^rx,n,mTvˉrx+r^tx,n,mTvˉtx)t⏟(3) Doppler\Psi_{n,m}^{u,s}(t)=\underbrace{\Phi_{n,m}}_{\text{(1) random phase}}+\underbrace{\frac{2\pi}{\lambda_0}\left(\hat r_{rx,n,m}^{\mathsf T}\bar d_{rx,u}+\hat r_{tx,n,m}^{\mathsf T}\bar d_{tx,s}\right)}_{\text{(2) geometric}}+\underbrace{\frac{2\pi}{\lambda_0}\left(\hat r_{rx,n,m}^{\mathsf T}\bar v_{rx}+\hat r_{tx,n,m}^{\mathsf T}\bar v_{tx}\right)t}_{\text{(3) Doppler}}

(1) is Step 10; (2) and (3) are this section’s focus. In addition each cluster carries δ(t−τn)\delta(t-\tau_n) in time, which becomes the fourth source in frequency: the delay phase e−j2πfkτne^{-j2\pi f_k\tau_n}.

r^\hat r: spherical → unit direction vector (Eqs. 7.5-23/24)

r^rx,n,m=[sin⁡θn,m,ZOAcos⁡ϕn,m,AOAsin⁡θn,m,ZOAsin⁡ϕn,m,AOAcos⁡θn,m,ZOA]\hat{r}_{rx,n,m}=\begin{bmatrix}\sin\theta_{n,m,ZOA}\cos\phi_{n,m,AOA}\\ \sin\theta_{n,m,ZOA}\sin\phi_{n,m,AOA}\\ \cos\theta_{n,m,ZOA}\end{bmatrix}

A dimensionless unit vector translating the tabulated angles (AOA, ZOA) into a 3-D direction; the TX side builds r^tx\hat r_{tx} symmetrically from (ZOD, AOD). Its job: dot-product projection onto a path-length difference.

dˉrx,u\bar d_{rx,u}: element position vector (§7.3)

Dimensioned (metres): the position of receive element uu in the array’s local frame. A UPA follows Eq. (7.3-1):

dˉp,q=[(q−Nc−12)dxλ0,  (p−Nr−12)dyλ0,  0]T\bar{d}_{p,q}=\big[(q-\tfrac{N_c-1}{2})d_x\lambda_0,\;(p-\tfrac{N_r-1}{2})d_y\lambda_0,\;0\big]^{\mathsf T}

Example: 2×2 UPA at half-wavelength spacing → positions (±λ0/2,±λ0/2,0)(\pm\lambda_0/2,\pm\lambda_0/2,0). In Sionna this is exactly AntennaArray.positions, shape [num_ant, 3] — printable for verification.

Closed-form inter-element phase (the beamforming mechanism)

Substituting into r^Tdˉ\hat r^{\mathsf T}\bar d, the z-component is killed by dz=0d_z=0:

2πλ0r^Tdˉp,q=2π[(q−Nc−12)dxsin⁡θcos⁡ϕ+(p−Nr−12)dysin⁡θsin⁡ϕ]\frac{2\pi}{\lambda_0}\hat r^{\mathsf T}\bar d_{p,q} =2\pi\Big[\big(q-\tfrac{N_c-1}{2}\big)d_x\sin\theta\cos\phi+\big(p-\tfrac{N_r-1}{2}\big)d_y\sin\theta\sin\phi\Big]

Phase step between adjacent columns (dx=0.5d_x=0.5): Δψcol=πsin⁡θZOAcos⁡ϕAOA\Delta\psi_{\text{col}}=\pi\sin\theta_{ZOA}\cos\phi_{AOA}. One ray imprints a planar phase gradient determined solely by (θ,ϕ)(\theta,\phi) — angle resolution and beam steering all come from this term.

Doppler phase → Jakes spectrum

Motion makes dˉ(t)=dˉ0+vˉt\bar d(t)=\bar d_0+\bar v t; the time-varying part of (2) is (3), defining

fD=r^Tvˉλ0=fD,max⁡cos⁡αD,fD,max⁡=∥vˉ∥λ0f_D=\frac{\hat r^{\mathsf T}\bar v}{\lambda_0}=f_{D,\max}\cos\alpha_D,\qquad f_{D,\max}=\frac{\|\bar v\|}{\lambda_0}

One cos⁡αD\cos\alpha_D per ray over uniformly scattered directions yields the Jakes shape.

Frequency-domain composition and the delay-phase sign

Hu,s(fk)=∑nhu,s(n) e−j2πfkτn ej2πfD,ntH_{u,s}(f_k)=\sum_{n}h_{u,s}^{(n)}\,e^{-j2\pi f_k\tau_n}\,e^{j2\pi f_{D,n}t}

Note the negative delay phase (longer path → lag) versus the positive geometric phase (element meets the wave earlier) — together they give the full MIMO-OFDM channel phase structure.

Frx,u,θF_{rx,u,\theta}: the antenna response vector (§7.1, Eq. 7.1-11)

Three-layer definition chain for the θ component:

  1. Scalar pattern (§7.1.1/7.1.2): A(θ,φ)=A0⋅10G/20A(\theta,\varphi)=A_0\cdot10^{G/20};
  2. LCS polarization components (§7.1.2): Fθ′=Acos⁡γF'_\theta=A\cos\gamma and Fφ′=Asin⁡γF'_\varphi=A\sin\gamma with slant angle γ\gamma (BS dual-pol: ±45°);
  3. Rotation back to the GCS (§7.1.3, Eq. 7.1-11):

[FθFφ]GCS=[cos⁡ψsin⁡ψ−sin⁡ψcos⁡ψ][Fθ′Fφ′]LCS\begin{bmatrix}F_{\theta}\\F_{\varphi}\end{bmatrix}_{GCS}=\begin{bmatrix}\cos\psi&\sin\psi\\ -\sin\psi&\cos\psi\end{bmatrix}\begin{bmatrix}F'_{\theta}\\F'_{\varphi}\end{bmatrix}_{LCS}

where the local angles (θ′,φ′)(\theta',\varphi') come from the bearing/downtilt/slant rotations (Eqs. 7.1-27.1-5, 7.1-7/7.1-8) and ψ\psi from Eqs. 7.1-127.1-15. Sionna’s Antenna(pattern="38.901", polarization="dual") implements the whole chain; pattern="omni" degenerates to Fθ=1,Fφ=0F_\theta=1,F_\varphi=0.

Note on the ψ sign: the standard Eq. 7.1-11 writes the rotation matrix as [cos⁡ψsin⁡ψ−sin⁡ψcos⁡ψ]\begin{bmatrix}\cos\psi&\sin\psi\\-\sin\psi&\cos\psi\end{bmatrix}; Sionna’s _l2g_response() implements the transposed form [cos⁡ψ−sin⁡ψsin⁡ψcos⁡ψ]\begin{bmatrix}\cos\psi&-\sin\psi\\\sin\psi&\cos\psi\end{bmatrix} (L488-490), and its _compute_psi() defines ψ as the rotation angle of the spherical basis from GCS to LCS — the opposite sign to the standard definition (LCS→GCS). Matrix and definition are self-consistent and the numerical results agree.

Computing F_rx / F_tx: from vendor gain tables to field components

The previous section defined Frx,θF_{rx,\theta}. This section answers the most common engineering question: vendor antenna datasheets give gain values of a single antenna in different directions (scalar dBi) — how do they become the field-component matrices required by (7.5-21/22)?

First, the frequent question: do the spherical basis vectors θ^/φ^\hat\theta/\hat\varphi depend on the antenna orientation? The answer is “the basis itself does not; the component values do” — three layers:

  1. The basis is fixed by the ray direction alone. (θ^,φ^)(\hat\theta,\hat\varphi) are the two unit spherical basis vectors at (θ,φ)(\theta,\varphi) in the global coordinate system (GCS): θ^\hat\theta points toward increasing zenith, φ^\hat\varphi toward increasing azimuth. They describe “where the wave travels” and are independent of how the antennas are mounted — for one ray, the TX end and the RX end share the same GCS spherical basis.
  2. The antenna’s polarization basis lives in its own LCS. The antenna’s vertical/horizontal/±45° polarization directions are defined in the local coordinate system (LCS) (set by the bearing/downtilt/slant rotations, Eqs. 7.1-2~7.1-5). The polarization unit vector projects onto the LCS spherical basis as (Fθ′,Fφ′)=(Acos⁡γ,Asin⁡γ)(F'_\theta,F'_\varphi)=(\sqrt A\cos\gamma,\sqrt A\sin\gamma) — the “vertical/horizontal plane of the antenna” corresponds to the LCS θ^′/φ^′\hat\theta'/\hat\varphi', not to the GCS θ^/φ^\hat\theta/\hat\varphi.
  3. ψ stitches the two bases together. Eq. 7.1-11 rotates the LCS spherical-basis components back into the GCS spherical basis, yielding (Fθ,Fφ)(F_\theta,F_\varphi) that can be dotted with the ray’s electric field.

So Frx/FtxF_{\mathrm{rx}}/F_{\mathrm{tx}} relate to both: the definition of the basis vectors varies only with the ray direction (GCS), while the values of the components vary with the antenna polarization (γ) and orientation (bearing/downtilt/slant, through the LCS angles and ψ). The RX and TX ends use their own LCS, their own pattern lookup, and their own ψ for the same ray — the two F vectors are numerically independent (see the “TX vs. RX” subsection at the end of this chapter).

The full formula first. Eq. (7.5-21) writes one ray’s Jones vector as:

[Eθ,n,mEϕ,n,m]=Pn,mκn,m  Frx,θ ⁣(θn,mZOA,φn,mAOA)[Eθ,n,mLOSEϕ,n,mLOS]Ftx,θ ⁣(θn,mZOD,φn,mAOD)\begin{bmatrix}E_{\theta,n,m}\\E_{\phi,n,m}\end{bmatrix} =\sqrt{\frac{P_{n,m}}{\kappa_{n,m}}}\; F_{rx,\theta}\!\left(\theta_{n,m}^{ZOA},\varphi_{n,m}^{AOA}\right) \begin{bmatrix}E_{\theta,n,m}^{LOS}\\E_{\phi,n,m}^{LOS}\end{bmatrix} F_{tx,\theta}\!\left(\theta_{n,m}^{ZOD},\varphi_{n,m}^{AOD}\right)

with the same-shaped antenna response matrix at both ends (rx evaluated at AOA/ZOA, tx at AOD/ZOD):

Fθ(θ,φ)=[cos⁡φ−sin⁡φ−sin⁡φcos⁡θcos⁡φcos⁡θ]⏟Cartesian-to-spherical projection[Gθ⋅gθGφ⋅gφ]ejΨxpF_{\theta}(\theta,\varphi)= \underbrace{\begin{bmatrix}\cos\varphi & -\sin\varphi\\ -\sin\varphi\cos\theta & \cos\varphi\cos\theta\end{bmatrix}}_{\text{Cartesian-to-spherical projection}} \begin{bmatrix}G_{\theta}\cdot g_{\theta}\\ G_{\varphi}\cdot g_{\varphi}\end{bmatrix} e^{j\Psi_{xp}}

The 2×22\times2 matrix projects the antenna’s two Cartesian polarization components (Gx,Gy)(G_x,G_y) in its local coordinate system (LCS) onto the spherical basis (θ^,φ^)(\hat\theta,\hat\varphi) of the ray direction — which is why the θ/φ\theta/\varphi mix of the same antenna changes with look direction.

Vendor data → model field components: a four-step chain.

  1. Power → field amplitude. Datasheets give gain GdB(θ,φ)G_{\mathrm{dB}}(\theta,\varphi) in dBi, a power quantity, while the formula needs field quantities: take the square root first, ∣F∣=10GdB/20|F|=10^{G_{\mathrm{dB}}/20}. Forgetting the sqrt is the most common mistake (amplitude off by a square).
  2. Single gain → polarization pair (Gθ,Gφ)(G_\theta,G_\varphi). One scalar pattern implicitly assumes “isotropic polarization”; expand by antenna type:
    • isotropic: Gθ=Gφ=1G_\theta=G_\varphi=1;
    • linear polarization with slant angle γ\gamma (vertical γ=0°\gamma=0°, horizontal γ=90°\gamma=90°, ±45° dual-pol γ=±45°\gamma=\pm45°): Gθ=A(θ,φ)cos⁡γG_\theta=\sqrt{A(\theta,\varphi)}\cos\gamma, Gφ=A(θ,φ)sin⁡γG_\varphi=\sqrt{A(\theta,\varphi)}\sin\gamma (i.e. §7.3 Eqs. 7.3-4/5);
    • measured datasheets usually ship two dBi tables, co-pol and cross-pol: use 10Gco/10\sqrt{10^{G_{\mathrm{co}}/10}} as the co-polarized component and 10Gxp/10\sqrt{10^{G_{\mathrm{xp}}/10}} as the cross-polarized component on the LCS axes, then combine through the ±45° feed network into gθ,gφg_\theta,g_\varphi.
  3. Angle-system alignment. The pattern’s (θ,φ)(\theta,\varphi) are LCS angles measured from the antenna boresine (z) axis, while (7.5-21) passes GCS (global) angles. With tilt/rotation, rotate the GCS angles into the LCS first (§7.1 Eqs. 7.1-7/8), then look up the pattern.
  4. Field rotation LCS→GCS. The looked-up LCS field components must be rotated back to GCS with the displacement angle ψ\psi (Eqs. 7.1-11/15) before dotting with the ray’s electric field (EθLOS,EϕLOS)(E_\theta^{LOS},E_\phi^{LOS}).

Sionna implements exactly this chain (tr38901/antenna.py, channel_coefficients.py):

Conversion stepSionna code
① power→field + ② slant projectionAntennaElement.field(): f_theta = √A·cos(γ), f_phi = √A·sin(γ)
Pattern A(θ,φ)A(\theta,\varphi)_radiation_pattern_38901(): Eq. 7.3-3, AdB=−min⁡{12(θ−π/2)2/θ3dB2,30}−min⁡{12φ2/φ3dB2,30}+8A_{\mathrm{dB}}=-\min\{12(\theta-\pi/2)^2/\theta_{3\mathrm{dB}}^2,30\}-\min\{12\varphi^2/\varphi_{3\mathrm{dB}}^2,30\}+8
Polarization type → slant anglesPanelArray.__init__: VH→γ=(0°,90°)\gamma=(0°,90°); cross→γ=(−45°,+45°)\gamma=(-45°,+45°)
③ GCS angles → LCS angles_gcs_to_lcs(): Eqs. 7.1-7/8
④ LCS field → GCS field_l2g_response() + _compute_psi(): Eqs. 7.1-11/15
Full assembly_step_11_field_matrix(): rotate angles → evaluate field() → rotate fields → dot with hphaseh_{\text{phase}} (carrying Ψxp\Psi_{xp} and κ−1\sqrt{\kappa^{-1}}) to get the per-element response

Hand check. Take cross dual polarization (pol1 has γ=−45°\gamma=-45°) with the 38.901 pattern at θ=90°,φ=0\theta=90°,\varphi=0: av=0a_v=0, ah=0a_h=0, AdB=8A_{\mathrm{dB}}=8, so A=100.8=6.31A=10^{0.8}=6.31 and A=2.51\sqrt{A}=2.51; hence fθ=2.51cos⁡(−45°)=1.78f_\theta=2.51\cos(-45°)=1.78 and fϕ=2.51sin⁡(−45°)=−1.78f_\phi=2.51\sin(-45°)=-1.78 — equal magnitude, opposite sign: the signature of a −45° slant; pol2 (+45°+45°) has both components with the same sign. Sionna reproduces it:

import math, torch
from sionna.phy.channel.tr38901 import Antenna

ant = Antenna(polarization="dual", polarization_type="cross",
              antenna_pattern="38.901", carrier_frequency=3.5e9)
theta = torch.tensor([math.pi / 2])   # 90°
phi = torch.tensor([0.0])
print(ant.ant_pol1.field(theta, phi))  # tensor([1.7762]) tensor([-1.7762])
print(ant.ant_pol2.field(theta, phi))  # tensor([1.7762]) tensor([1.7762])

Feeding a measured datasheet instead. AntennaElement only supports the analytic omni/38.901 patterns; to use tabulated vendor data, implement the four steps yourself — it boils down to “sqrt the dB table + bilinear interpolation + two rotations”:

# G_co, G_xp: vendor co-pol / cross-pol dBi tables on an LCS grid
import numpy as np
A_co = np.sqrt(10 ** (G_co / 20))     # power → field amplitude
A_xp = np.sqrt(10 ** (G_xp / 20))
# interpolate at the ray's LCS angles (theta', phi'); dB-domain interp is smoother:
g_theta = interp2d(theta_grid, phi_grid, A_co, theta_p, phi_p)  # co-pol component
g_phi   = interp2d(theta_grid, phi_grid, A_xp, theta_p, phi_p)  # cross-pol component
# combine via the ±45° feed, then rotate back to GCS with the 7.1-11 psi matrix

Three common pitfalls:

  • dBi is a power quantity — always sqrt before the formula (10G/2010^{G/20}, not 10G/1010^{G/10});
  • a “single gain value” assumes isotropic polarization, i.e. Gθ=Gφ=G/2G_\theta=G_\varphi=G/\sqrt2; off boresine this can differ from a real ±45° antenna by several dB;
  • datasheet angles are LCS angles: looking them up without aligning the array’s mechanical/electrical downtilt effectively “pastes the pattern facing the wrong way”.

κn,m\kappa_{n,m}: what XPR means physically

XPR = cross-polarization power ratio Pco/PcrossP_{\text{co}}/P_{\text{cross}}: scattering “leaks” power into the orthogonal polarization. Its only role in (7.5-22) is suppressing the off-diagonal entries of the 2×2 polarization matrix (κ−1\sqrt{\kappa^{-1}}). Larger XPR → better polarization isolation; smaller XPR raises the correlation between ±45° dual-polarized layers, degrading the channel rank and both multiplexing and diversity gains. CDL table values: A=10 dB, B=8 dB, C=7 dB (Eq. 7.7-0b permits ≈0.38 dB per-ray jitter — see Step 9 and the CDL/TDL article).

Where ±45° polarization enters the formulas

In the conversion chain above, polarization appeared once, through the slant angle γ\gamma. For a ±45° dual-polarized antenna it actually enters (7.5-21/22) in three places:

(1) Antenna response: the slant angle γ = ±45° sets the LCS field components. Substituting into Gθ=Acos⁡γG_\theta=\sqrt{A}\cos\gamma, Gφ=Asin⁡γG_\varphi=\sqrt{A}\sin\gamma: the two polarizations differ only by a sign — pol2 (+45°) has both components with the same sign, pol1 (−45°) opposite (the source of the measured 1.7762 / ±1.7762 in the previous section). After the projection matrix (or the equivalent ψ\psi rotation) into GCS spherical components, the closed form is very readable:

Gθ±=A2 (cos⁡φ∓sin⁡φ)=A cos⁡(φ±45°)G_{\theta}^{\pm}=\sqrt{\frac{A}{2}}\,(\cos\varphi\mp\sin\varphi) =\sqrt{A}\,\cos(\varphi\pm45°)

For the same ray, the two ±45° polarizations receive amplitudes differing only by an azimuth cosine — change the arrival azimuth φ\varphi and the power ratio between the two polarizations changes with it. That is the mechanism of polarization diversity, and why a datasheet must specify not just the pattern boresine but also the slant orientation around it.

(2) Polarization combinations and XPR: κ penalizes only the “cross” combinations. In (7.5-22) the coefficient carries polarization indices p,q∈{1,2}p,q\in\{1,2\} (rx and tx each taking one of the ±45° ports), and the 2×22\times2 polarization matrix together with its prefactor is:

Pn,mκn,m[1κn,mκn,m1]\sqrt{\frac{P_{n,m}}{\kappa_{n,m}}} \begin{bmatrix}1 & \sqrt{\kappa_{n,m}}\\ \sqrt{\kappa_{n,m}} & 1\end{bmatrix}

The matrix has only two kinds of entries — “1” and "κ\sqrt{\kappa}" — so after the prefactor the two path amplitudes are P/κ\sqrt{P/\kappa} and P\sqrt{P}: co-polarized combinations (same port polarization) carry power PP, cross-polarized ones carry P/κP/\kappa, with κ\kappa = XPR = co-pol power ÷ cross-pol power (8 dB for CDL-B). Sionna implements this in _step_11_phase_matrix(): h_phase = [[e0, e1], [e2, e3]] — two unit-magnitude entries for the co-pol paths, two scaled by √(1/κ) for the cross-pol paths (P\sqrt{P} is folded into power_scaling), each of the four carrying an independent uniform random phase.

(3) Random initial phases: one per polarization combination. §7.5 Step 10 draws four uniform phases per ray, Ψn,m(θ,θ)\Psi_{n,m}^{(\theta,\theta)}, Ψn,m(θ,φ)\Psi_{n,m}^{(\theta,\varphi)}, Ψn,m(φ,θ)\Psi_{n,m}^{(\varphi,\theta)}, Ψn,m(φ,φ)\Psi_{n,m}^{(\varphi,\varphi)} — one for each (p,q)(p,q) combination, i.e. the phases of e0–e3 above (Sionna _step_10() generates phi[...,4]). Written as “V/H”, these are the HH/HV/VH/VV random phases — the origin of ejΨxpe^{j\Psi_{xp}} in the definition of FθF_\theta.

About the middle matrix [100−1]\begin{bmatrix}1&0\\0&-1\end{bmatrix} in the screenshot formula: it is LOS-ray-only (NLOS uses the identity); the −1-1 flips the second component, the phase reversal of the field component orthogonal to the plane of incidence under specular geometry. The ±45° antenna polarization information is not in this matrix — it lives in (1)(2)(3) above.

How Sionna assembles it (who uses ±45° at which step):

StepCode
polarization_type="cross" → two slanted elements γ=(−45°,+45°)\gamma=(-45°,+45°)PanelArray.__init__
Per ray, per polarization → LCS field components (Acos⁡γ,Asin⁡γ)(\sqrt{A}\cos\gamma,\sqrt{A}\sin\gamma)AntennaElement.field()
LCS→GCS field rotation (ψ\psi)_l2g_response()
Polarization matrix + 4 random phases (cross entries scaled by 1/κ1/\sqrt{\kappa})_step_11_phase_matrix()
Each element gathers its own polarization’s response (gather indices)_step_11_field_matrix() L812-L831
rx/tx field-vector dot product → per-element-pair coefficient_step_11_field_matrix() L833-L838

Worked example: polarization diversity in one line. Take a ray arriving along the antenna boresine: the two LCS spherical components are then just two orthogonal linear polarizations in the tangent plane, and the antenna response vector is (cos⁡γ,sin⁡γ)(\cos\gamma,\sin\gamma). Let the incident wave be −45°-45° linearly polarized, Eˉ=(1,−1)/2\bar E=(1,-1)/\sqrt2; the received amplitude is the inner product:

pol1(−45°): (1,−1)2⋅(1,−1)2=1,pol2(+45°): (1,1)2⋅(1,−1)2=0\text{pol1}(-45°):\ \tfrac{(1,-1)}{\sqrt2}\cdot\tfrac{(1,-1)}{\sqrt2}=1,\qquad \text{pol2}(+45°):\ \tfrac{(1,1)}{\sqrt2}\cdot\tfrac{(1,-1)}{\sqrt2}=0

The −45° port receives everything, the +45° port zero — the received amplitude is always ∣cos⁡(γ−δ)∣|\cos(\gamma-\delta)| (Malus’ law of polarization mismatch). Verifying with the measured field() outputs from the previous section:

import math, torch
# field() outputs at (θ=90°, φ=0) from the previous section, normalized by √A=2.5119
pol1 = torch.tensor([ 1.7762, -1.7762]) / 2.5119   # γ = -45°
pol2 = torch.tensor([ 1.7762,  1.7762]) / 2.5119   # γ = +45°
E = torch.tensor([1.0, -1.0]) / math.sqrt(2)       # -45° linearly polarized wave
print(pol1 @ E, pol2 @ E)   # tensor(1.0000) tensor(0.0000)

The two ±45° antennas at the TX and RX ends: how they differ in the formula

In (7.5-22) Frx,uF_{\mathrm{rx},u} and Ftx,sF_{\mathrm{tx},s} form a symmetric “sandwich”, yet the inputs at the two ends are completely independent — the detail most easily missed when reading the formula:

InputRX end Frx,uF_{\mathrm{rx},u}TX end Ftx,sF_{\mathrm{tx},s}
slant γelement uu‘s slant (cross array: γu∈{−45°,+45°}\gamma_u\in\{-45°,+45°\})element ss‘s slant (γs∈{−45°,+45°}\gamma_s\in\{-45°,+45°\})
ray angles (GCS)AOA/ZOA (φn,mAOA,θn,mZOA)(\varphi^{AOA}_{n,m},\theta^{ZOA}_{n,m})AOD/ZOD (φn,mAOD,θn,mZOD)(\varphi^{AOD}_{n,m},\theta^{ZOD}_{n,m})
LCS anglesfrom the RX orientation (bearing/tilt/slant)from the TX orientation
ψψrx\psi_{rx}: RX orientation + AOA/ZOAψtx\psi_{tx}: TX orientation + AOD/ZOD

For the same ray ZOD≠ZOA and AOD≠AOA, and the two arrays are mounted differently, so FrxF_{\mathrm{rx}} and FtxF_{\mathrm{tx}} are numerically unrelated — the “two ±45° antennas” in the formula are not one set of components reused twice, but two independently computed antenna responses. Sionna implements the symmetry literally: in _step_11_field_matrix(), L766 runs _gcs_to_lcs on the TX ray angles (AOD/ZOD) and L777 runs it again on the RX angles (AOA/ZOA); L788-789 call _l2g_response once per end (with tx_orientations/rx_orientations and their own ψ); L812-831 dispatch pol1/pol2 responses to the TX and RX arrays via _gather_ind_tx/_gather_ind_rx; L835 dots the two field vectors into the per-element-pair coefficient.

With cross arrays at both ends, element pairs split into two classes (most intuitive near boresight). For an element pair (u,s)(u,s) with slant combination (γu,γs)(\gamma_u,\gamma_s):

  • Same slant (−45°/−45°-45°/-45° and +45°/+45°+45°/+45°): both response vectors (cos⁡γ,sin⁡γ)(\cos\gamma,\sin\gamma) are identical, the polarization paths add in phase — co-pol dominates, power ≈ PP;
  • Orthogonal slant (−45°/+45°-45°/+45° and +45°/−45°+45°/-45°): the two response vectors are orthogonal, the dominant terms cancel and only cross-pol remains, power ≈ P/κP/\kappa.

Every polarization path carries the product of the two ±45° projection weights 12×12=12\tfrac{1}{\sqrt2}\times\tfrac{1}{\sqrt2}=\tfrac12, with the sign combination setting the direction of addition. In one sentence: γ enters each end’s F through cos⁡γ/sin⁡γ\cos\gamma/\sin\gamma; the difference between the two ends’ γ decides each element pair’s co/cross identity; κ sets the cross-pol power discount; while the ray angles, LCS angles and ψ take entirely different values at the two ends.

Other polarization angles: slant_angle and non-standard polarization

±45° is only an engineering convention — the polarization degree of freedom in the formula is fully continuous, and Sionna controls it through two layers of parameters:

① Element level: AntennaElement(slant_angle=γ) is the true degree of freedom. AntennaElement.__init__ accepts the slant angle γ in radians, any continuous value, and γ enters the formula at exactly one place — field(): fθ=Acos⁡γf_\theta=\sqrt A\cos\gamma, fφ=Asin⁡γf_\varphi=\sqrt A\sin\gamma. γ=0 is vertical, π/2 horizontal, ±π/4 the usual ±45°, π/6 a 30° polarization — the formula is fully general.

② Panel level: polarization_type exposes only an enumeration. PanelArray.__init__ L422-435 hard-codes the enum to fixed γ:

polarizationpolarization_typepol1 γpol2 γ
single"V" / "H"0 / π/2—
dual"VH"0π/2
dual"cross"−π/4+π/4

Note that pol2 at L435 is always slant_angle + π/2 — Sionna assumes the two polarizations are orthogonal, and ±45° is merely the cross special case.

Two ways to get non-standard polarization (e.g., ±30°, 45°/135°):

  • Element / array assembly: AntennaElement is exported from tr38901/__init__.py; construct AntennaElement(pattern="38.901", slant_angle=α) and call field() directly for a single element; for an array, replace the panel’s _ant_pol1/_ant_pol2 attributes with the custom elements (not an official injection point — it bypasses the enum).
  • Panel slant orientation: the third angle of the (bearing, downtilt, slant) orientations passed to set_topology() (system_level_channel.py L120-189) rotates the whole LCS about the normal (Eq. 7.1-4, _forward_rotation_matrix). Near boresight this is equivalent to adding a common offset to every γ; off axis the pattern A(θ′,φ′)A(\theta',\varphi') rotates with the LCS, so it is not identical to changing γ alone — one rotates the whole antenna, the other only the feed direction.

Worked numerical example: one ray from start to finish

Take the real table values of CDL-B cluster 1 (Table 7.7.1-2: AOD =−173.3°=-173.3°, AOA =105.8°=105.8°, ZOD == ZOA =78.9°=78.9°) and assume:

ParameterValue
Carrier fcf_c3.5 GHz → λ0=0.0857\lambda_0=0.0857 m
TX/RX arrays2×2 UPA each, dx=dy=0.5d_x=d_y=0.5, element index (p,q)∈{0,1}2(p,q)\in\{0,1\}^2
UT velocity30 m/s along +x+x (fD,max⁡=350f_{D,\max}=350 Hz)
Delay spreadDS = 100 ns (nominal)
Random phaseSet Φ=28.6°\Phi=28.6° (example)

① Direction vectors: sin⁡78.9°=0.9814, cos⁡78.9°=0.1923\sin 78.9°=0.9814,\ \cos 78.9°=0.1923; cos⁡105.8°=−0.2722, sin⁡105.8°=0.9622\cos 105.8°=-0.2722,\ \sin 105.8°=0.9622.

r^rx=[0.9814⋅(−0.2722), 0.9814⋅0.9622, 0.1923]=[−0.2672, 0.9443, 0.1923]\hat r_{rx}=[0.9814\cdot(-0.2722),\ 0.9814\cdot 0.9622,\ 0.1923]=[-0.2672,\ 0.9443,\ 0.1923]

The TX side is analogous (swap in AOD for ϕ\phi): r^tx=[−0.9747, −0.1145, 0.1923]\hat r_{tx}=[-0.9747,\ -0.1145,\ 0.1923].

② RX element geometric phases (ψp,q=2π[(q−12)⋅0.5r^x+(p−12)⋅0.5r^y]\psi_{p,q}=2\pi[(q-\tfrac12)\cdot0.5\hat r_x+(p-\tfrac12)\cdot0.5\hat r_y]):

ψ00=−60.9°,ψ01=−109.0°,ψ10=+109.0°,ψ11=+60.9°\psi_{00}=-60.9°,\quad \psi_{01}=-109.0°,\quad \psi_{10}=+109.0°,\quad \psi_{11}=+60.9°

The adjacent-column difference is −48.1°=πsin⁡θcos⁡ϕ-48.1°=\pi\sin\theta\cos\phi and the adjacent-row difference is +170.0°+170.0° — exactly matching the closed form. For TX element (0,1)(0,1): ψ01tx=2π[−0.2437+0.0286]=−77.4°\psi^{tx}_{01}=2\pi[-0.2437+0.0286]=-77.4°.

③ Doppler: fD=350⋅r^rx,x=350×(−0.2672)=−93.5f_D=350\cdot\hat r_{rx,x}=350\times(-0.2672)=-93.5 Hz → the phase drifts at −93.5×360°=−33,660°/s-93.5\times360°=-33{,}660°/\text{s}.

④ Delay phase (cluster 2’s normalized delay 0.1072 → τ2=10.7\tau_2=10.7 ns): on a subcarrier 50 MHz off center, −360°×50M×10.7n=−193.0°-360°\times50\text{M}\times10.7\text{n}=-193.0°.

⑤ XPR: CDL-B table value 8 dB; with zn,m=+1.2z_{n,m}=+1.2, κdB=8+0.377×1.2=8.45\kappa_{\mathrm{dB}}=8+0.377\times1.2=8.45 dB, κ=7.00\kappa=7.00, and the cross-polarization amplitude factor 1/κ=0.378\sqrt{1/\kappa}=0.378.

⑥ Total phase (this ray at element pair ((0,1)rx,(0,1)tx)((0,1)_{rx},(0,1)_{tx}), time tt):

Ψ(t)=28.6°⏟Φ−109.0°⏟r^rxTdˉrx−77.4°⏟r^txTdˉtx−33,660°⋅t⏟Doppler=−157.8°−33,660°⋅t\Psi(t)=\underbrace{28.6°}_{\Phi}\underbrace{-109.0°}_{\hat r_{rx}^{\mathsf T}\bar d_{rx}}\underbrace{-77.4°}_{\hat r_{tx}^{\mathsf T}\bar d_{tx}}\underbrace{-33{,}660°\cdot t}_{\text{Doppler}}=-157.8°-33{,}660°\cdot t

Sionna verification (geometric part):

import numpy as np
from sionna.phy.channel.tr38901 import Antenna, AntennaArray

lam = 3e8 / 3.5e9
arr = AntennaArray(Antenna(pattern="omni", polarization="single"),
                   num_rows=2, num_cols=2)   # default 0.5λ spacing
d = arr.positions.numpy()                     # [4, 3], meters
r_hat = np.array([-0.2672, 0.9443, 0.1923])   # ① hand-computed direction
phase = 2 * np.pi / lam * (d @ r_hat)         # ② per-element phase [rad]
print(np.degrees(phase))
# ≈ [-60.9, -109.0, 109.0, 60.9] — matches the hand calculation

Sionna cross-reference

(7.5-22) ingredientSionna code
(1) Φn,m\Phi_{n,m}_step_10() uniform phases
polarization κ−1\sqrt{\kappa^{-1}}e1/e2 in _step_11_phase_matrix()
(2) geometric phase_step_11_array_offsets()
(3) Doppler_step_11_doppler_matrix()
Frx/FtxF_{rx}/F_{tx}_step_11_field_matrix() + Antenna
intra-cluster ∑m\sum_mh_full.sum(dim=4)
Pn/M\sqrt{P_n/M}power_scaling

17. Does Sionna support the §7.6.3 spatial channel model?

(Numbering note: in the g10 draft the array-based content of the old §7.6.3 “spatial channel model” has been folded into §7.5 Step 11, and the §7.6.3 number now denotes spatial consistency; this section keeps the customary usage of “§7.6.3” for the spatial channel model itself.)

Yes — Step 11 is the §7.6.3 implementation. More precisely, it is the array-based formulation, the main path of §7.6.3 where channel matrices are built from antenna-array steering vectors. The beamspace variant of §7.6.3 is not implemented (there is no beamspace code anywhere in the directory; matrices are always constructed per element).

In the array-based formulation each path’s matrix is an element-wise product of four factors, implemented by four _step_11_* helpers in channel_coefficients.py:

Hn,m=Pn,m  FRXT Φn,m FTX⏟h_field⊙eȷ2πλ0(r^RX⋅dˉRX) eȷ2πλ0(r^TX⋅dˉTX)⏟h_array⋅eh_dopplerȷ2πλ0(r^⋅vˉ)t\mathbf{H}_{n,m} = \sqrt{P_{n,m}}\; \underbrace{\mathbf{F}_{\mathrm{RX}}^{\mathrm{T}}\,\mathbf{\Phi}_{n,m}\,\mathbf{F}_{\mathrm{TX}}}_{\texttt{h\_field}} \odot \underbrace{e^{\jmath\frac{2\pi}{\lambda_0}(\hat{r}_{\mathrm{RX}}\cdot\bar{d}_{\mathrm{RX}})}\,e^{\jmath\frac{2\pi}{\lambda_0}(\hat{r}_{\mathrm{TX}}\cdot\bar{d}_{\mathrm{TX}})}}_{\texttt{h\_array}} \cdot e^{\jmath\frac{2\pi}{\lambda_0}(\hat{r}\cdot\bar{v})t}_{\texttt{h\_doppler}}

Source locations of each factor:

  1. Random-phase + XPR polarization matrix Φ\Phi (Eq. 7.5-22): _step_11_phase_matrix() L579-608. The four phases ejϕ0..3e^{j\phi_{0..3}} form a 2×2 polarization matrix; cross-polar terms are scaled by 1/XPR1/\sqrt{\mathrm{XPR}} (L594-605).
  2. Element responses FTX/RX\mathbf{F}_{\mathrm{TX/RX}}: _step_11_field_matrix() L726-840. GCS angles are rotated into each array’s local coordinate system via _gcs_to_lcs() (L766/L777), the per-element pattern responses come from PanelArray.ant_pol1/ant_pol2.field() (L781-801), then _l2g_response() rotates back; the result is multiplied with Φ\Phi (L804-810) and dual-polarized elements are assigned via precomputed gather indices (L812-831).
  3. Array steering phases (the a(r^,dˉ)a(\hat{r},\bar{d}) term of the array-based method): _step_11_array_offsets() L662-724. _unit_sphere_vector() L323-342 builds r^\hat{r} from (θ, φ) (Eq. 7.1-6); it is dotted with element positions dˉ\bar{d} (_step_11_get_tx/rx_antenna_positions L494-543, including array rotations) and exponentiated.
  4. Mobility (Doppler) phases: _step_11_doppler_matrix() L610-660.
  5. Full NLOS matrix (Eq. 7.5-28): _step_11_nlos() L842-877 multiplies the four factors and scales power by P/NRX\sqrt{P/N_{\mathrm{RX}}}.
  6. Ray → path reduction with subclustering (Eq. 7.5-27): _step_11_reduce_nlos() L879.
  7. LOS specular component + K-factor combination (Eq. 7.5-30): _step_11_los() L960 generates the zero-delay LOS term; _step_11() L1011-1062 scales by K/(K+1)\sqrt{K/(K+1)} and 1/(K+1)\sqrt{1/(K+1)}, folds the LOS term into the zero-delay NLOS cluster, and selects per link with torch.where(los_indicator, h_los, h_nlos).

The output h has shape [batch, num_tx, num_rx, num_paths, num_rx_ant, num_tx_ant, num_time] (L125-129) — complex coefficients per antenna pair, per path, per time sample, exactly what the array-based §7.6.3 is meant to produce. Downstream layers such as GenerateTimeChannel / GenerateOFDMChannel then convert it to time/frequency domain channel tensors.

Coverage of the neighboring subsections (clause numbers below are the old numbering; in the g10 draft CDL/TDL moved to §7.7 and the array-based formulas of the spatial channel model were folded into §7.5 Step 11):

38.901 clauseModelSionna
§7.6.1CDL (A/B/C/D/E)cdl.py (859 lines), also array-based, no subclustering
§7.6.2TDL (A/B/C/D)tdl.py (545 lines)
§7.6.3Spatial channel model (array-based)✅ channel_coefficients.py (this section)
§7.6.3Spatial channel model (beamspace)❌ not implemented

18. Spatial consistency, mobility, and state transitions (five FAQs)

18.1 Is spatial consistency implemented?

Two layers to distinguish:

  • LSP spatial consistency (SSC, §7.6.3.1): ✅ implemented. This is the function walked through line by line above — lsp.py L333-446 _compute_lsp_spatial_correlation_sqrt(), which builds the matrix square root of the correlation model C(X1,X2)=exp⁡(−d/DX)C(X_1,X_2)=\exp(-d/D_X) (L348; dd is the 2D distance between the two UTs, DXD_X the per-LSP correlation distance from Table 7.5-6), applied during LSP sampling (L134-137). Pairwise UT 2D distances are precomputed by the scenario (system_level_scenario.py L1058-1064). So nearby UTs under the same BS get statistically correlated DS/SF/K, etc.
  • Spatially consistent cluster angles (SSLA, old numbering §7.4.4.1): ❌ not implemented. There is no SSLA code in rays.py; cluster angles are drawn independently per link from Laplace distributions.
  • At the array-based (Step 11) level: within one realization, matrices are a deterministic function of the geometric angles, so element responses are inherently consistent; cross-position instantaneous consistency is only guaranteed at the LSP level (SSC), while small-scale parameters are resampled per call (see 18.3).

18.2 If I give the UE a velocity, does its position move?

No. The ut_velocities passed to set_topology only flows into Topology.velocities (system_level_channel.py L282), whose sole consumer is _step_11_doppler_matrix() (channel_coefficients.py L610-660), which adds the per-ray phase eȷ2πλ0(r^⋅vˉ)te^{\jmath\frac{2\pi}{\lambda_0}(\hat{r}\cdot\bar{v})t} over the time axis. Positions (ut_loc) are frozen at set_topology time; there is no “position += velocity × time” integration anywhere inside the model. Velocity changes the evolution rate of the channel (the Doppler spectrum), not the geometry.

For actual motion you must update UT coordinates and call set_topology again at each scheduling interval — which is exactly what the system-level simulator in sionna.sys does; it is the responsibility of the layer above the channel model.

18.3 How often is the channel regenerated? Is it continuous across calls?

  • When: each call channel_model(num_time_samples, sampling_frequency) produces one complete channel snapshot over the time grid tk=k/fst_k=k/f_s, k=0..N−1k=0..N-1 (channel_coefficients.py L295-305). There is no re-generation inside a single call.
  • Within one call: continuous in time. The Doppler phase evolves smoothly with tt (L656) while ray angles/powers/delays stay fixed — the standard’s “single realization evolving over time” behavior.
  • Across calls: statistically continuous, instantaneously discontinuous. With the default always_generate_lsp=False (uma.py L100) the LSPs are reused (large-scale continuity unless the topology changes), but RaysGenerator cluster/ray parameters and the _step_10 random phases are freshly sampled every call — so consecutive snapshots do not transition smoothly. With always_generate_lsp=True even the LSPs are resampled, weakening continuity further.
  • The 1.x code does not expose a sample_at-style API for querying the channel at arbitrary time instants; the time axis is laid out once per call.

18.4 Does LOS/NLOS change during a simulation?

Not within one topology. The LOS state is decided at set_topology time by _sample_los() (system_level_scenario.py L1066-1088):

  • if the user pins los, that value is used; otherwise a Bernoulli draw with the scenario’s los_probability (for UMa, the §7.4.2.1 Table 7.4.2-1 formula, uma_scenario.py L87-122);
  • indoor UTs are forced to NLOS: los & (~in_state) (L1088).

Every subsequent __call__ reuses that state (Topology.los, system_level_channel.py L288), and _step_11 selects per link with torch.where(los_indicator, h_los, h_nlos) (L1058-1059). Only a new set_topology call (position/orientation/indoor-state change) resamples LOS/NLOS — state transitions are event-driven, not a per-instant random walk.

18.5 Is §7.6.3.3 (LOS/NLOS soft indoor/outdoor) implemented?

❌ Not implemented. TR 38.901 V17 added §7.6.3.3, where LOS/NLOS state and O2I loss interpolate smoothly over a transition distance dtransitiond_{\mathrm{transition}} as a UT crosses a building boundary. Sionna has no soft/transition mechanism:

  • in_state is a boolean (system_level_channel.py L152: True means indoor) — indoor/outdoor is a hard switch;
  • O2I loss is added wholesale to the pathloss of indoor links (lsp.py L92-110 sample_pathloss(), low/high models per §7.4.3);
  • the indoor 2D penetration distance is sampled per §7.4.3.1 (system_level_scenario.py L1090+), but only feeds the O2I formula — it produces no state transition.

Scenarios that need soft O2I (NTN coverage edges, dense-urban crossings) must approximate it outside the model for now.

19. Consistency check against 38.901 §7.5

Comparing the Sionna implementation clause by clause with TR 38.901 g10 §7.5, conclusions fall into three classes: consistent, implementation deviation (departs from the spec text), and convention difference (different mathematical representation but statistically equivalent). A few formulas are embedded images in the g10 docx and cannot be verified character by character; they are flagged separately.

StepVerdictNotes
1 InputsConsistentScenario/positions/patterns/array orientation/velocity all provided by SystemLevelScenario + Topology
2 LOS/NLOS + I/OConsistentUMa LOS probability matches term by term; indoor state assigned via simulation parameter; LOS fixed at set_topology, does not evolve over time
3 PathlossMostly consistentFormulas match term by term; the hE “otherwise” branch uses a continuous uniform approximation of the spec’s discrete set {12,15,…} (see the Step 3 blockquote)
4 LSPsConsistentCholesky correlation and the 104°/52° clamps (lsp.py L149-172) both implemented; the LSP vector order differs from the spec’s sM but the correlation matrix uses the same order — statistically equivalent
5 Cluster delaysConsistent (1 unverified)7.5-1/2 match; LOS scaling is a polynomial division (rays.py L310-321); the 7.5-4 formula body is an image and cannot be verified, though the division direction is physically sensible (compensating the zero-delay LOS peak pulling down the RMS DS)
6 Cluster powersDeviation① The spec removes clusters more than 25 dB below the max power; Sionna does not (path count stays at N); ② decay exponent is (rτ−1)/rτ (L367-371), the 7.5-5 formula body is an image and unverifiable; ③ everything else matches: unscaled delays for power, sum normalization, LOS first-cluster K/(K+1) combination (7.5-7/8), post-combination powers for angles vs. pre-combination for coefficients
7 AnglesDeviation① Ray #16 offset in Table 7.5-3 is coded as −0.1481, spec value is −1.1481 (rays.py L110, likely a typo); ② random sign Xn has shape [batch, num_bs, 1, clusters] — all UT links of a BS share the signs, while the spec requires per-link independence; ③ rest matches: inverse Gaussian/Laplacian, Table 7.5-2/4 constants (1.146/1.104), LOS first-cluster direction enforcement, ZOD frequency offset, O2I 90°; LOS correction polynomial signs unverifiable
8 Random couplingDeviation① The spec couples within sub-clusters for the two strongest clusters; Sionna shuffles over all 20 rays of the cluster; ② shuffle permutations shared across UTs; ③ the three pairings (AOD↔AOA, ZOD↔ZOA, AOD↔ZOD) themselves are implemented correctly
9 XPRConsistentPer-ray log-normal, μ/σ per Table 7.5-6
10 PhasesConsistentFour polarization phase combos i.i.d. uniform; range (−π, π) equals the spec’s U(0, 2π) modulo 2π
11 CoefficientsConsistent (2 remarks)Sub-cluster splitting (two strongest, 10/6/4 rays, 0/1.28/2.56·c_DS), LOS specular matrix [[1,0],[0,−1]], K-factor combining 7.5-30 all match. Remarks: ① the spec defines Doppler only for UT velocity × arrival angles; Sionna’s moving-tx handling is a generalization, not a strict match; ② Doppler/propagation-delay use exp(+j·) where the spec often writes exp(−j·) — a global conjugation,
12 PL/SF weightingConsistentgain = 10^(−PL/20)·√SF, gated by enable_pathloss/enable_shadow_fading

Summary: the algorithm backbone (twelve-step flow, all parameter-table values, LOS/NLOS/O2I branch logic) matches §7.5 strictly; deviations concentrate in Step 6’s missing −25 dB cluster pruning, Step 7/8’s cross-link sharing of random quantities and the sub-cluster coupling scope, plus one numeric typo in Table 7.5-3. These do not affect the model’s overall statistics but matter when bit-exact alignment with spec outputs is required (e.g. cross-vendor simulation comparisons).

20. Quick reference

The step-by-step mapping (twelve steps → spec formulas → Sionna locations) is in the “Steps 1–12 at a glance” table near the top; here is a topic-oriented index:

Looking forLocation
UMa class & usage exampleuma.py L16-117
Full orchestrationsystem_level_channel.py L234-353
Antenna arrays & 38.901 patternsantenna.py L293-632
LSP spatial consistency (SSC)lsp.py L333-446
LOS/NLOS state samplingsystem_level_scenario.py L1066-1088
Doppler/velocity (no position update)channel_coefficients.py L610-660

21. References

  • 3GPP TR 38.901 g10 draft, “Study on channel model for frequencies from 0.5 to 100 GHz”, §7.4.1–7.4.4, §7.5, §7.6.3
  • Sionna documentation: sionna.phy.channel.tr38901 API reference
  • Sionna source: src/sionna/phy/channel/tr38901/
  • Related posts on this blog: Sionna channel models, Sionna PHY architecture overview

Comments

Loading comments…

    ← Back to home