Contents

38.901 §7.1 Coordinate System Explained: Three Intrinsic Rotations, the Polarization-Basis Angle ψ, and Sionna Source Mapping

Sionna Source Code
#Sionna#38.901#Coordinate System#Rotation Matrix#Antenna Pattern#Polarization

This post works through 3GPP TR 38.901 g10 draft, Clause 7.1 “Coordinate system” and answers three questions:

  1. Why two coordinate systems exist — why radiation patterns and angle parameters must be defined in the antenna’s own local coordinate system (LCS);
  2. How the three rotations (bearing α → downtilt β → slant γ) are built — where Eq. 7.1-2/4/5 come from and why this specific order;
  3. What the polarization-basis rotation ψ physically means — the problem Eq. 7.1-9~15 solve, and why the field-component transform is the transpose of the basis transform.

All equations keep the g10 numbering (7.1-1 ~ 7.1-26) and are mapped line-by-line to Sionna 1.x channel_coefficients.py and antenna.py. A runnable verification script at the end proves that the TR closed forms and the Sionna matrix implementation agree to floating-point noise.

Before reading: the companion posts 《38.901 §7.5 Twelve-Step Channel Generation》 (system-level) and 《38.901 §7.7 Link-Level Channel Models (CDL/TDL)》 (link-level) both sit on the geometric foundation described here — the pattern matrix of Step 11 and the CDL spatial filter are pure §7.1 machinery.

1. Overview: where §7.1 plugs into the chain

 Channel tables (§7.5/§7.7)     §7.1 coordinate system        Antenna model (§7.3)
┌──────────────────┐   ┌──────────────────────────┐   ┌──────────────────┐
│ zod/aod/zoa/aoa  │   │ GCS ←──R(α,β,γ)──→ LCS   │   │ F'(θ',φ')        │
│ (ray angles in   │──►│ Eq 7.1-2/4/5 rotations   │──►│ pattern in LCS   │
│  global view)    │   │ Eq 7.1-7/8 angle mapping │   │ basis (θ̂',φ̂')    │
└──────────────────┘   │ Eq 7.1-11/15 field + ψ   │   │ elements in y'-z'│
                       └──────────────────────────┘   └──────────────────┘
        Sionna: _gcs_to_lcs / _compute_psi / _l2g_response
                → assembled by _step_11_field_matrix

In one sentence: §7.1 translates a ray direction (θ, φ) seen globally into (θ′, φ′) in the antenna’s own frame, then rotates the antenna’s polarization response back into the global basis (θ̂, φ̂). The first step is done by the rotation matrix R, the second by the angle ψ.

2. Why two coordinate systems

Patterns inherently belong to the LCS

Radiation patterns are measured in an anechoic chamber: the antenna rotates on a turntable while the probe stays put. The result is naturally a function of the ray direction relative to the antenna — i.e. F′(θ′,φ′)F'(\theta',\varphi') in the Local Coordinate System (LCS). Channel models (§7.4~§7.7), however, specify departure/arrival angles (zod/aod/zoa/aoa) in the Global Coordinate System (GCS).

So Eq. 7.1-1 states a physical fact, not a definition:

F(θ,φ)  =  F′(θ′,φ′)(7.1-1)F(\theta,\varphi) \;=\; F'(\theta',\varphi') \tag{7.1-1}

The same ray has angular coordinates (θ,φ)(\theta,\varphi) in the GCS and (θ′,φ′)(\theta',\varphi') in the LCS; the field’s shape does not depend on who is watching — only the angle labels change. Everything in §7.1 exists to compute that relabeling (θ,φ)→(θ′,φ′)(\theta,\varphi)\to(\theta',\varphi') and the transform of the polarization basis vectors.

How the axes are placed

Per §7.1.1/§7.1.2:

FrameOriginAxes
GCSscene reference pointzz up, x/yx/y horizontal
LCSpanel phase centerx′x' along the boresight; elements lie in the y′–z′y'\text{–}z' plane

Two conventions that people get wrong constantly:

  • Boresight in LCS spherical coordinates is (θ′=90∘, φ′=0∘)(\theta'=90^\circ,\ \varphi'=0^\circ), i.e. the +x′+x' direction — not +z′+z'. The §7.3 pattern formulas (vertical cut at ϕ=0\phi=0, horizontal cut maximum at θ=90∘\theta=90^\circ) assume exactly this.
  • Vertical polarization V is along z′z', horizontal H along y′y'; the panel normal is x′x'.

Sionna matches: AntennaPanel places elements on the x′=0x'=0 plane (rows along −z′-z', columns along +y′+y', in wavelength units):

ant_pos[i + j * num_rows] = [0,
                             j * horizontal_spacing,
                             -i * vertical_spacing]

L233-237 re-centers the panel at the origin; for dual polarization L240-241 duplicates the grid for the second polarization.

3. Spherical convention and unit vectors (Eq. 7.1-6, 7.1-13/14)

The ray unit vector in the GCS (Eq. 7.1-6):

(xyz)=(sin⁡θcos⁡φsin⁡θsin⁡φcos⁡θ)(7.1-6)\begin{pmatrix} x\\ y\\ z \end{pmatrix} =\begin{pmatrix} \sin\theta\cos\varphi\\ \sin\theta\sin\varphi\\ \cos\theta \end{pmatrix} \tag{7.1-6}

with θ\theta the zenith angle (from +z+z) and φ\varphi the azimuth (from +x+x). The tangential basis (Eq. 7.1-13/14):

θ^=(cos⁡θcos⁡φ, cos⁡θsin⁡φ, −sin⁡θ)(7.1-13)\hat{\boldsymbol\theta}=(\cos\theta\cos\varphi,\ \cos\theta\sin\varphi,\ -\sin\theta) \tag{7.1-13} φ^=(−sin⁡φ, cos⁡φ, 0)(7.1-14)\hat{\boldsymbol\varphi}=(-\sin\varphi,\ \cos\varphi,\ 0) \tag{7.1-14}

Spherical angles and the tangential basis (θ̂, φ̂)

Original TR figure (Figure 7.1.1) — spherical angles (θ,φ)(\theta,\varphi) and spherical unit vectors in a Cartesian coordinate system: r^\hat r is the given direction, θ^\hat\theta and φ^\hat\varphi the spherical basis vectors:

TR 38.901 Figure 7.1.1: Spherical angles and unit vectors in a Cartesian coordinate system

(ρ^,θ^,φ^)(\hat\rho,\hat\theta,\hat\varphi) is a right-handed orthonormal triad; θ^\hat\theta points toward increasing θ\theta (“downward”), φ^\hat\varphi toward increasing φ\varphi (counter-clockwise around zz).

Sionna mapping: _unit_sphere_vector (L333-340) is Eq. 7.1-6 verbatim. It is reused in three places: ① Doppler phase _step_11_doppler L652 (r^⋅v⃗\hat r\cdot\vec v); ② element phase _step_11_array_offsets L688-689 (r^⋅dˉ\hat r\cdot\bar d); ③ as the first step of every angle mapping below. Sionna never builds θ^/φ^\hat\theta/\hat\varphi explicitly — the ψ angle compresses the whole basis change into a 2×2 rotation (see below).

4. The core: three intrinsic rotations R = Rz(α)·Ry(β)·Rx(γ) (Eq. 7.1-2/4/5)

Naming and order (correcting a widespread misprint)

g10 §7.1.3 defines panel orientation with three Euler angles. Per the TR’s own Greek-letter naming:

AngleTR nameRotates aboutMeaning
α\alphabearingGCS zz axishorizontal pointing: swing the boresight to the target azimuth
β\betadowntiltintermediate y′y' axistilt the boresight below the horizon
γ\gammaslantfinal x′′x'' axis (= boresight)roll the whole panel about the line of sight

The rotations are intrinsic: z→y′→x′′z \to y' \to x'' — each step rotates about the already-rotated axis. (Many online notes swap α and β relative to the TR text; this post follows the g10 document itself. Sionna’s orientations[..., 0/1/2] order agrees with the TR, see the line mapping below.)

Three intrinsic rotations: Rz(α) → Ry′(β) → Rx″(γ)

Original TR figure (Figure 7.1.3-1) — orienting the LCS (blue) with respect to the GCS (gray) by a sequence of 3 rotations:

TR 38.901 Figure 7.1.3-1: Orienting the LCS with respect to the GCS by a sequence of 3 rotations

Why this exact order? Think in reverse:

  • bearing first picks the vertical plane the boresight will live in;
  • downtilt second rotates within that plane — about a y′y' axis that is always horizontal and perpendicular to the boresight, so “tilt down” keeps its physical meaning at any azimuth;
  • slant last rolls about the boresight itself, moving only the polarization axes, never the pointing direction.

If downtilt came first, it would be “tilt about the fixed global yy”, and the tilt direction would be wrong for every azimuth but one. That is precisely what intrinsic ordering fixes.

The composite matrix (Eq. 7.1-2 / 7.1-4)

Elementary right-handed rotations:

Rz(α)=(cos⁡α−sin⁡α0sin⁡αcos⁡α0001),Ry(β)=(cos⁡β0sin⁡β010−sin⁡β0cos⁡β),Rx(γ)=(1000cos⁡γ−sin⁡γ0sin⁡γcos⁡γ)R_z(\alpha)=\begin{pmatrix}\cos\alpha&-\sin\alpha&0\\ \sin\alpha&\cos\alpha&0\\ 0&0&1\end{pmatrix},\quad R_y(\beta)=\begin{pmatrix}\cos\beta&0&\sin\beta\\ 0&1&0\\ -\sin\beta&0&\cos\beta\end{pmatrix},\quad R_x(\gamma)=\begin{pmatrix}1&0&0\\ 0&\cos\gamma&-\sin\gamma\\ 0&\sin\gamma&\cos\gamma\end{pmatrix}

Eq. 7.1-2 composes them:

R  =  Rz(α)⋅Ry(β)⋅Rx(γ)(7.1-2)R \;=\; R_z(\alpha)\cdot R_y(\beta)\cdot R_x(\gamma) \tag{7.1-2}

and multiplying out gives Eq. 7.1-4:

R=(cos⁡αcos⁡βcos⁡αsin⁡βsin⁡γ−sin⁡αcos⁡γcos⁡αsin⁡βcos⁡γ+sin⁡αsin⁡γsin⁡αcos⁡βsin⁡αsin⁡βsin⁡γ+cos⁡αcos⁡γsin⁡αsin⁡βcos⁡γ−cos⁡αsin⁡γ−sin⁡βcos⁡βsin⁡γcos⁡βcos⁡γ)(7.1-4)R=\begin{pmatrix} \cos\alpha\cos\beta & \cos\alpha\sin\beta\sin\gamma-\sin\alpha\cos\gamma & \cos\alpha\sin\beta\cos\gamma+\sin\alpha\sin\gamma\\ \sin\alpha\cos\beta & \sin\alpha\sin\beta\sin\gamma+\cos\alpha\cos\gamma & \sin\alpha\sin\beta\cos\gamma-\cos\alpha\sin\gamma\\ -\sin\beta & \cos\beta\sin\gamma & \cos\beta\cos\gamma \end{pmatrix} \tag{7.1-4}

The inverse is the transpose (rotation matrices are orthogonal, Eq. 7.1-5):

R−1=RT(7.1-5)R^{-1}=R^{\mathsf T} \tag{7.1-5}

Sionna mapping: _forward_rotation_matrix hard-codes Eq. 7.1-4 element by element. L351, a, b, c = orientations[..., 0], orientations[..., 1], orientations[..., 2], means a=αa=\alpha (bearing), b=βb=\beta (downtilt), c=γc=\gamma (slant) — identical to the TR naming. Row by row: row_1 (L353-360) = first row of 7.1-4; row_2 (L362-369) = second; row_3 (L371-378) [-sin b, cos b·sin c, cos b·cos c] = third. The inverse _reverse_rotation_matrix is one line: rot_mat.mT (L407) = Eq. 7.1-5.

Trap #1: the TR prose contradicts its own equations

The §7.1.3 narrative (g10 paragraphs 511 and 528) disagrees with itself:

  • ¶511 says the forward matrix RR maps points from the GCS into the LCS;
  • ¶528 says forward RR maps LCS unit vectors into the GCS.

The equations settle it: Eq. 7.1-7/8 (GCS→LCS angle mapping) actually apply RTR^{\mathsf T} (Eq. 7.1-5), while Eq. 7.1-9 rotates LCS basis vectors back into the GCS with RR. The math is consistent; the prose is not.

Sionna follows the math, not the prose:

  • _rot_pos (L394-395, R⋅pR\cdot p): rotates LCS points into the GCS (used for element positions);
  • _gcs_to_lcs (L428-429, RT⋅ρ^R^{\mathsf T}\cdot\hat\rho): GCS→LCS uses the transpose.

Mnemonic: forward R = “LCS → GCS”. Auto-correct the prose while reading.

5. Angle mapping: GCS (θ, φ) → LCS (θ′, φ′) (Eq. 7.1-7/8)

Original TR figure (Figure 7.1.3-2) — the same ray is (θ,φ)(\theta,\varphi) in the GCS (gray) and (θ′,φ′)(\theta',\varphi') in the LCS (blue); dashed yellow lines are projection guides:

TR 38.901 Figure 7.1.3-2: Definition of spherical coordinates and unit vectors in both the GCS and LCS

Derivation

Rotate ρ^\hat\rho from Eq. 7.1-6 by RTR^{\mathsf T} to get ρ^′=(x′,y′,z′)\hat\rho'=(x',y',z') in the LCS, then invert the spherical definition:

θ′=arccos⁡(z′),φ′=arg⁡(x′+j y′)\theta' = \arccos(z'),\qquad \varphi' = \arg(x' + \mathrm j\,y')

Dotting the columns of RR with ρ^\hat\rho and using cos⁡αcos⁡φ+sin⁡αsin⁡φ=cos⁡(φ−α)\cos\alpha\cos\varphi+\sin\alpha\sin\varphi=\cos(\varphi-\alpha) yields the TR closed forms. Eq. 7.1-7 (zenith):

θ′=arccos⁡(cos⁡βcos⁡γcos⁡θ+sin⁡θ[sin⁡βcos⁡γcos⁡(φ−α)−sin⁡γsin⁡(φ−α)])(7.1-7)\theta'=\arccos\Big(\cos\beta\cos\gamma\cos\theta +\sin\theta\big[\sin\beta\cos\gamma\cos(\varphi-\alpha)-\sin\gamma\sin(\varphi-\alpha)\big]\Big) \tag{7.1-7}

Eq. 7.1-8 (azimuth):

φ′=arg⁡(cos⁡βsin⁡θcos⁡(φ−α)−sin⁡βcos⁡θ⏟x′+j[cos⁡βsin⁡γcos⁡θ+sin⁡θsin⁡βsin⁡γcos⁡(φ−α)+sin⁡θcos⁡γsin⁡(φ−α)]⏟y′)(7.1-8)\varphi'=\arg\Big(\underbrace{\cos\beta\sin\theta\cos(\varphi-\alpha)-\sin\beta\cos\theta}_{x'} +\mathrm j\underbrace{\big[\cos\beta\sin\gamma\cos\theta+\sin\theta\sin\beta\sin\gamma\cos(\varphi-\alpha)+\sin\theta\cos\gamma\sin(\varphi-\alpha)\big]}_{y'}\Big) \tag{7.1-8}

(The original divides by sin⁡θ\sin\theta inside arg⁡\arg, which does not change the angle and is omitted here.)

Sionna implements the matrix route, not the closed form

_gcs_to_lcs never expands the trigonometry; it multiplies matrices and extracts components:

rho_hat = self._unit_sphere_vector(theta, phi)      # L427: Eq. 7.1-6
rot_inv = self._reverse_rotation_matrix(orientations) # L428: Eq. 7.1-5
rot_rho = torch.matmul(rot_inv, rho_hat)            # L429: ρ̂' = Rᵀρ̂
z = torch.matmul(v1, rot_rho)                       # L435: z' component (v1=[0,0,1])
theta_prime = torch.acos(z)                         # L437: θ'=arccos(z')
phi_prime = torch.angle(torch.matmul(v2, rot_rho))  # L438: φ'=arg(x'+j·y')

The two pre-allocated constants (L198-200, L206-208) are component-extraction tricks: _v1_const = [0, 0, 1] dots out z′z'; _v2_const = [1, j, 0] produces x′+jy′x' + \mathrm j y' for torch.angle. (They are registered as buffers for CUDA graph compatibility.)

Numerically, closed form vs Sionna matrix route differ by ~10−1410^{-14} (floating-point noise) — see case2 of the verification script below.

6. The polarization-basis angle ψ (Eq. 7.1-9 ~ 7.1-15)

Why the angle mapping alone is not enough

F(θ,φ)=F′(θ′,φ′)F(\theta,\varphi)=F'(\theta',\varphi') only fixes the scalar magnitude. The field is a transverse vector:

E⃗=Eθθ^+Eφφ^=Eθ′θ′^+Eφ′φ′^\vec E = E_\theta\hat{\boldsymbol\theta} + E_\varphi\hat{\boldsymbol\varphi} = E'_\theta\hat{\boldsymbol\theta'} + E'_\varphi\hat{\boldsymbol\varphi'}

The pair (θ′^,φ′^)(\hat{\boldsymbol\theta'},\hat{\boldsymbol\varphi'}) — the LCS spherical basis rotated back into the GCS — spans the same plane perpendicular to the ray as (θ^,φ^)(\hat{\boldsymbol\theta},\hat{\boldsymbol\varphi}), but is rotated within that plane by an angle ψ.

Looking along ρ̂: the GCS basis (θ̂,φ̂) vs the LCS basis (θ̂′,φ̂′) differ by ψ

Original TR figure (Figure 7.1.3-3) — rotation of the spherical basis vectors by an angle ψ\psi due to the orientation of the LCS with respect to the GCS:

TR 38.901 Figure 7.1.3-3: Rotation of the spherical basis vectors by an angle ψ

Skip ψ and you get polarization mismatch: with a 10° downtilt the two bases happen to align on boresight (ψ=0), but off-boresight rays see a nonzero ψ that leaks energy between the horizontal and vertical polarization responses.

Basis transform (Eq. 7.1-9/10) and field transform (Eq. 7.1-11)

Two orthonormal bases in one plane are related by a single rotation ψ:

(θ^′φ^′)=(θ^′⋅θ^θ^′⋅φ^φ^′⋅θ^φ^′⋅φ^)(θ^φ^)(7.1-9)\begin{pmatrix}\hat{\boldsymbol\theta}'\\ \hat{\boldsymbol\varphi}'\end{pmatrix} =\begin{pmatrix}\hat{\boldsymbol\theta}'\cdot\hat{\boldsymbol\theta} & \hat{\boldsymbol\theta}'\cdot\hat{\boldsymbol\varphi}\\ \hat{\boldsymbol\varphi}'\cdot\hat{\boldsymbol\theta} & \hat{\boldsymbol\varphi}'\cdot\hat{\boldsymbol\varphi}\end{pmatrix} \begin{pmatrix}\hat{\boldsymbol\theta}\\ \hat{\boldsymbol\varphi}\end{pmatrix} \tag{7.1-9}

orientation-preserving ⇒ all four dots come from one angle (Eq. 7.1-10):

(θ^′⋅θ^θ^′⋅φ^φ^′⋅θ^φ^′⋅φ^)=(cos⁡ψsin⁡ψ−sin⁡ψcos⁡ψ)(7.1-10)\begin{pmatrix}\hat{\boldsymbol\theta}'\cdot\hat{\boldsymbol\theta} & \hat{\boldsymbol\theta}'\cdot\hat{\boldsymbol\varphi}\\ \hat{\boldsymbol\varphi}'\cdot\hat{\boldsymbol\theta} & \hat{\boldsymbol\varphi}'\cdot\hat{\boldsymbol\varphi}\end{pmatrix} =\begin{pmatrix}\cos\psi & \sin\psi\\ -\sin\psi & \cos\psi\end{pmatrix} \tag{7.1-10}

Field components are coordinates of the same vector in different bases, so their transform is the transpose (Eq. 7.1-11):

(EθEφ)=(cos⁡ψ−sin⁡ψsin⁡ψcos⁡ψ)(Eθ′Eφ′)(7.1-11)\begin{pmatrix}E_\theta\\ E_\varphi\end{pmatrix} =\begin{pmatrix}\cos\psi & -\sin\psi\\ \sin\psi & \cos\psi\end{pmatrix} \begin{pmatrix}E'_\theta\\ E'_\varphi\end{pmatrix} \tag{7.1-11}

One line of algebra shows where the transpose comes from: Eθ=E⃗⋅θ^=Eθ′(θ^′⋅θ^)+Eφ′(φ^′⋅θ^)=Eθ′cos⁡ψ−Eφ′sin⁡ψE_\theta=\vec E\cdot\hat{\boldsymbol\theta} =E'_\theta(\hat{\boldsymbol\theta}'\cdot\hat{\boldsymbol\theta}) +E'_\varphi(\hat{\boldsymbol\varphi}'\cdot\hat{\boldsymbol\theta}) =E'_\theta\cos\psi-E'_\varphi\sin\psi.

Definition of ψ (Eq. 7.1-12):

ψ=arg⁡(θ^′⋅θ^+j θ^′⋅φ^)(7.1-12)\psi = \arg\big(\hat{\boldsymbol\theta}'\cdot\hat{\boldsymbol\theta} + \mathrm j\,\hat{\boldsymbol\theta}'\cdot\hat{\boldsymbol\varphi}\big) \tag{7.1-12}

i.e. cos⁡ψ=θ^′⋅θ^\cos\psi=\hat{\boldsymbol\theta}'\cdot\hat{\boldsymbol\theta} and sin⁡ψ=θ^′⋅φ^\sin\psi=\hat{\boldsymbol\theta}'\cdot\hat{\boldsymbol\varphi} (the dot-product expansions of Eq. 7.1-16/17).

Closed form (Eq. 7.1-15) vs _compute_psi, line by line

Substituting θ^′=R θ^LCS′\hat{\boldsymbol\theta}'=R\,\hat{\boldsymbol\theta}'_{\text{LCS}} (LCS basis evaluated at primed angles via 7.1-13/14) and simplifying gives Eq. 7.1-15:

ψ=arg⁡(sin⁡γcos⁡θsin⁡(φ−α)+cos⁡γ[cos⁡βsin⁡θ−sin⁡βcos⁡θcos⁡(φ−α)]⏟real+j[sin⁡γcos⁡(φ−α)+sin⁡βcos⁡γsin⁡(φ−α)]⏟imag)(7.1-15)\psi=\arg\Big(\underbrace{\sin\gamma\cos\theta\sin(\varphi-\alpha)+\cos\gamma\big[\cos\beta\sin\theta-\sin\beta\cos\theta\cos(\varphi-\alpha)\big]}_{\text{real}} +\mathrm j\underbrace{\big[\sin\gamma\cos(\varphi-\alpha)+\sin\beta\cos\gamma\sin(\varphi-\alpha)\big]}_{\text{imag}}\Big) \tag{7.1-15}

Sionna mapping: _compute_psi matches Eq. 7.1-15 character for character: L458-460 a, b, c = orientations[..., 0/1/2] (α/β/γ); L461-464 real = sin(c)·cosθ·sin(φ−a) + cos(c)·(cos(b)·sinθ − sin(b)·cosθ·cos(φ−a)); L465 imag = sin(c)·cos(φ−a) + sin(b)·cos(c)·sin(φ−a); L466 psi = torch.angle(torch.complex(real, imag)).

_l2g_response implements Eq. 7.1-11: L487-488 build [[cosψ, −sinψ], [sinψ, cosψ]], L490 multiplies the 2×12\times1 vector (Eθ′,Eφ′)T(E'_\theta, E'_\varphi)^{\mathsf T}. “l2g” = local-to-global.

7. Special cases: downtilt only (α = γ = 0) and the horizontal cut

Original TR figure (Figure 7.1.4) — angles and unit vectors when the LCS has been rotated an angle β\beta around the yy-axis of the GCS (left), and the resulting basis rotation ψ\psi in the plane perpendicular to the ray (right):

TR 38.901 Figure 7.1.4: Angles and unit vectors for a downtilt-only rotation

The most common engineering case is a BS with downtilt only. Eq. 7.1-7/8/15 degrade to the TR’s:

θ′=arccos⁡(cos⁡φsin⁡θsin⁡β+cos⁡θcos⁡β)(7.1-18)\theta'=\arccos(\cos\varphi\sin\theta\sin\beta+\cos\theta\cos\beta) \tag{7.1-18} φ′=arg⁡(cos⁡φsin⁡θcos⁡β−cos⁡θsin⁡β+jsin⁡φsin⁡θ)(7.1-19)\varphi'=\arg\big(\cos\varphi\sin\theta\cos\beta-\cos\theta\sin\beta+\mathrm j\sin\varphi\sin\theta\big) \tag{7.1-19} ψ=arg⁡(sin⁡θcos⁡β−cos⁡φcos⁡θsin⁡β+j sin⁡φsin⁡β)(7.1-23)\psi=\arg\big(\sin\theta\cos\beta-\cos\varphi\cos\theta\sin\beta+\mathrm j\,\sin\varphi\sin\beta\big) \tag{7.1-23}

Boresight sanity check: after tilting down by β the main lobe sits at (θ=90∘+β, φ=0)(\theta=90^\circ+\beta,\ \varphi=0) in the GCS. Eq. 7.1-18 gives θ′=arccos⁡(sin⁡θsin⁡β+cos⁡θcos⁡β)=arccos⁡cos⁡(θ−β)=90∘\theta'=\arccos(\sin\theta\sin\beta+\cos\theta\cos\beta)=\arccos\cos(\theta-\beta)=90^\circ ✓; 7.1-19 gives φ′=arg⁡(sin⁡θcos⁡β)=0\varphi'=\arg(\sin\theta\cos\beta)=0 ✓; 7.1-23 gives ψ=arg⁡(cos⁡2β+sin⁡2β)=0\psi=\arg(\cos^2\beta+\sin^2\beta)=0 ✓ — no basis rotation on boresight, as intuition demands.

On the horizontal cut θ=90∘\theta=90^\circ (Eq. 7.1-24/25/26):

θ′=arccos⁡(cos⁡φsin⁡β)(7.1-24)\theta'=\arccos(\cos\varphi\sin\beta) \tag{7.1-24} φ′=arg⁡(cos⁡φcos⁡β+jsin⁡φ)(7.1-25)\varphi'=\arg(\cos\varphi\cos\beta+\mathrm j\sin\varphi) \tag{7.1-25} ψ=arg⁡(cos⁡β+jsin⁡φsin⁡β)(7.1-26)\psi=\arg(\cos\beta+\mathrm j\sin\varphi\sin\beta) \tag{7.1-26}

Numerical values for β=10∘\beta=10^\circ (identical to Sionna, see case5 below):

φ\varphiθ′\theta'φ′\varphi'ψ\psi
0∘0^\circ80.00∘80.00^\circ0∘0^\circ0∘0^\circ
30∘30^\circ81.35∘81.35^\circ30.38∘30.38^\circ5.04∘5.04^\circ
90∘90^\circ90.00∘90.00^\circ90.00∘90.00^\circ10.00∘10.00^\circ

The last row is instructive: looking along +y+y (perpendicular to the tilt plane), the downtilt appears as a pure roll of the polarization basis by exactly β.

8. Trap #2: mechanical slant γ ≠ polarization slant ζ

The TR uses “slant” for two unrelated things, and Sionna keeps them in different files:

Mechanical slant γ\gamma (§7.1.3)Polarization slant ζ\zeta (§7.3)
Acts onthe whole panel, rolled about its boresightdecomposition of one element’s E-field on the (θ^′,φ^′)(\hat\theta',\hat\varphi') basis
Appears inEq. 7.1-4/7/8/15Eq. 7.3-4/5: fθ′=acos⁡ζ, fφ′=asin⁡ζf_{\theta'}=a\cos\zeta,\ f_{\varphi'}=a\sin\zeta
Sionnaorientations[..., 2] (L351)AntennaElement.field L84-85

±45° cross-polarization (the Massive-MIMO default) uses the polarization slant ζ, not γ: PanelArray L428-435 sets the two polarizations’ slants to −π/4-\pi/4 and +π/4+\pi/4 for polarization_type="cross", to 00 and π/2\pi/2 for "VH", and L421-427 covers single "V"/"H". BS panels normally keep mechanical γ=0\gamma=0.

9. The Sionna call chain: three building blocks → pattern matrix

_step_11_field_matrix is the Step-11 pattern-matrix entry point; it wires every formula in this post into one pipeline:

zod, aod (GCS, from the ray tables)
   │  L766: _gcs_to_lcs(tx_orientations, zod, aod)      ← Eq. 7.1-7/8
   ▼
zod′, aod′ (LCS)
   │  L781-786: tx_array.ant_pol1.field(zod′, aod′)     ← §7.3 pattern + pol. slant
   ▼
(E′θ, E′φ) (LCS basis)
   │  L788-789: _l2g_response(f′, tx_orientations, zod, aod)  ← Eq. 7.1-11/15
   ▼
(Eθ, Eφ) (GCS basis) ── L803-835 × random phases/XPR (h_phase), per-pol assembly ──► h_field

The RX side is symmetric: L777 _gcs_to_lcs, L784-785 field, L789/L801 _l2g_response; dual-polarization branches at L791-801.

Element positions (the other use of Eq. 7.1-4): _step_11_get_tx_antenna_positions L511 / _step_11_get_rx_antenna_positions L536 call _rot_pos (R⋅dˉLCSR\cdot\bar d_{\text{LCS}}) to bring LCS element coordinates into the GCS for the array phase in Eq. 7.5-22.

Default orientations and unit conversion

  • cdl.py L234-235/L240-241: BS default bs_orientation=[0,0,0] (boresight along GCS +x+x); UT default ut_orientation=[π,0,0] — bearing α=180°, i.e. the UT boresight faces −x-x, opposite the BS. L644-659 assign bs/ut into tx/rx_orientations per link direction.
  • utils.py: deg_2_rad (L509), rad_2_deg (L533), wrap_angle_0_360 (L557). TR tables are in degrees, Sionna APIs in radians — convert first when cross-checking documents.

10. Runnable numerical verification

The script below implements Eq. 7.1-4/7/8/15 in plain numpy and cross-checks Sionna’s private methods (verification only — don’t depend on private APIs in production). Runs in any environment with Sionna 1.x:

import numpy as np
import torch
from sionna.phy.channel.tr38901.channel_coefficients import ChannelCoefficientsGenerator
from sionna.phy.channel.tr38901 import PanelArray

d2r = np.pi / 180

def R_forward(alpha, beta, gamma):
    """Eq. 7.1-4"""
    ca, cb, cg = np.cos(alpha), np.cos(beta), np.cos(gamma)
    sa, sb, sg = np.sin(alpha), np.sin(beta), np.sin(gamma)
    return np.array([
        [ca*cb, ca*sb*sg - sa*cg, ca*sb*cg + sa*sg],
        [sa*cb, sa*sb*sg + ca*cg, sa*sb*cg - ca*sg],
        [-sb,   cb*sg,            cb*cg]])

def gcs_to_lcs(theta, phi, alpha, beta, gamma):
    """Eq. 7.1-7/8 closed form"""
    z = (np.cos(beta)*np.cos(gamma)*np.cos(theta)
         + np.sin(theta)*(np.sin(beta)*np.cos(gamma)*np.cos(phi-alpha)
                          - np.sin(gamma)*np.sin(phi-alpha)))
    tp = np.arccos(np.clip(z, -1, 1))
    re = np.cos(beta)*np.sin(theta)*np.cos(phi-alpha) - np.sin(beta)*np.cos(theta)
    im = (np.cos(beta)*np.sin(gamma)*np.cos(theta)
          + np.sin(theta)*np.sin(beta)*np.sin(gamma)*np.cos(phi-alpha)
          + np.sin(theta)*np.cos(gamma)*np.sin(phi-alpha))
    return tp, np.angle(re + 1j*im)

def psi(theta, phi, alpha, beta, gamma):
    """Eq. 7.1-15"""
    re = (np.sin(gamma)*np.cos(theta)*np.sin(phi-alpha)
          + np.cos(gamma)*(np.cos(beta)*np.sin(theta)
                           - np.sin(beta)*np.cos(theta)*np.cos(phi-alpha)))
    im = np.sin(gamma)*np.cos(phi-alpha) + np.sin(beta)*np.cos(gamma)*np.sin(phi-alpha)
    return np.angle(re + 1j*im)

# generator in double precision so we can compare down to 1e-14
arr = PanelArray(num_rows_per_panel=1, num_cols_per_panel=1,
                 polarization="dual", polarization_type="cross",
                 antenna_pattern="38.901", carrier_frequency=3.5e9)
gen = ChannelCoefficientsGenerator(carrier_frequency=3.5e9, tx_array=arr,
                                   rx_array=arr, subclustering=False,
                                   precision="double")
T = lambda x: torch.tensor(x, dtype=torch.double)

# case1: BS downtilt 10° — boresight sanity check
alpha, beta, gamma = 0.0, 10*d2r, 0.0
b = R_forward(alpha, beta, gamma) @ np.array([1.0, 0.0, 0.0])  # LCS +x' into GCS
th_b, ph_b = np.arccos(b[2]), np.angle(b[0] + 1j*b[1])         # → (100°, 0°)
tp, pp = gcs_to_lcs(th_b, ph_b, alpha, beta, gamma)            # → (90°, 0°) ✓
print(f"boresight GCS=({th_b/d2r:.1f},{ph_b/d2r:.1f}) -> LCS=({tp/d2r:.1f},{pp/d2r:.1f})")
print(f"psi(boresight) = {psi(th_b, ph_b, alpha, beta, gamma)/d2r:.4f}°")   # 0

# case2: all three angles nonzero — closed form vs Sionna matrix route
alpha, beta, gamma = 30*d2r, -15*d2r, 45*d2r
orient = T([[alpha, beta, gamma]])
th, ph = T([[60*d2r]]), T([[20*d2r]])
tp, pp = gcs_to_lcs(60*d2r, 20*d2r, alpha, beta, gamma)
t_s, p_s = gen._gcs_to_lcs(orient, th, ph)
psi_c, psi_s = psi(60*d2r, 20*d2r, alpha, beta, gamma), gen._compute_psi(orient, th, ph).item()
print(f"dTheta'={abs(tp-t_s.item()):.1e} dPhi'={abs(pp-p_s.item()):.1e} dPsi={abs(psi_c-psi_s):.1e}")
# → all ~1e-14 (FP noise); psi = 49.576°, (cosψ, sinψ) = (0.6484, 0.7613)

# case3: Eq. 7.1-11 — f'=(1,0) must map to (cosψ, sinψ)
f_s = gen._l2g_response(T([[[1.0, 0.0]]]), orient, th, ph).numpy().reshape(2)
print(f"l2g: {f_s} vs closed-form: [{np.cos(psi_c):.6f}, {np.sin(psi_c):.6f}]")

Typical output:

boresight GCS=(100.0,0.0) -> LCS=(90.0,0.0)
psi(boresight) = 0.0000°
dTheta'=0.0e+00 dPhi'=1.6e-15 dPsi=0.0e+00
l2g: [0.64844085 0.76126504] vs closed-form: [0.648441, 0.761265]

11. Equation ↔ Sionna master table

TR equationContentSionna implementationLocation
7.1-1F(θ,φ)=F′(θ′,φ′)F(\theta,\varphi)=F'(\theta',\varphi')_step_11_field_matrix pipelineL726-840
7.1-2/4R=Rz(α)Ry(β)Rx(γ)R=R_z(\alpha)R_y(\beta)R_x(\gamma) + expansion_forward_rotation_matrixL343-381
7.1-5R−1=RTR^{-1}=R^{\mathsf T}_reverse_rotation_matrixL397-408
7.1-6spherical unit vector_unit_sphere_vectorL322-341
7.1-7/8GCS→LCS angle mapping_gcs_to_lcs (equivalent matrix route)L410-442
7.1-9/10polarization basis transformimplicit in _l2g_response transposeL469-491
7.1-11field components LCS→GCS_l2g_responseL469-491
7.1-12~15ψ definition and closed form_compute_psiL444-467
7.1-16~23downtilt-only special casegeneral code (α=γ=0)same as above
7.1-24~26horizontal cut special casegeneral code (θ=90°)same as above
§7.1.2element positions LCS→GCS_rot_pos + _step_11_get_tx/rx_antenna_positionsL383-395 / L493-541
§7.3-4/5polarization slant decompositionAntennaElement.fieldantenna.py L75-86
§7.1.2panel geometry in y′–z′AntennaPanel.__init__antenna.py L225-243
±45°cross-pol slantsPanelArray.__init__antenna.py L421-435

12. Summary

  • §7.1’s entire mission: the pattern belongs to the LCS, ray angles come from the GCS, and R(α,β,γ) is the bridge — scalar amplitudes re-label angles via Eq. 7.1-7/8, vector polarizations re-base via Eq. 7.1-11/15.
  • The three rotations are intrinsic z→y′→x′′z\to y'\to x'': bearing picks the plane, downtilt lowers within it, slant rolls the polarization; TR naming is α=bearing, β=downtilt, γ=slant, and Sionna’s orientations follows the same order.
  • Two traps: ① the TR prose contradicts itself on the direction of forward R — trust the equations and Sionna (forward R = LCS→GCS); ② ±45° refers to the §7.3 polarization slant, not the §7.1.3 mechanical slant γ.
  • Sionna realizes 7.1-7/8 via matrix multiply + component extraction and 7.1-11 via a 2×2 rotation, agreeing with the TR closed forms to ~1e-14 — all of it inside 220 lines (channel_coefficients.py L322-541).

References

Comments

Loading comments…

    ← Back to home