Skip to main content

Ellipsoidal Model

The ellipsoidal model is more practical and theoretically more accurate than the cylindrical model when the data resolution is better, but usually costs more time to compute. The core concept of the ellipsoidal model is the Fresnel zone. With the ellipsoidal model, the radius is non-uniform and become largest at the center, which is called Fresnel radius. The Fresnel radius here is computed based on the frequency, rather than inputed by user.

TLDR of a Fresnel zone from the Wiki:

Although intuitively, clear line-of-sight between transmitter and receiver may seem to be all that is required for a strong antenna system, but because of the complex nature of radio waves, obstructions within the first Fresnel zone can cause significant weakness, even if those obstructions are not blocking the apparent line-of-sight signal path. For this reason, it is valuable to do a calculation of the size of the 1st, or primary, Fresnel zone for a given antenna system. Doing this will enable the antenna installer to decide if an obstacle, such as a tree, is going to make a significant impact on signal strength.

Example Fresnel Zone between two sites:

Problem Modeling

We will use a 2D ellipse on the xyxy plane and a 3D ellipsoid. The 2D ellipse is used to filter out all obstructions that are not within the 2D projection of the Fresnel Zone. The 3D ellipsoid is used to check if the obstruction’s height interferes with the Fresnel Zone.

Code is in los/frensel_zone.py and los/ellipsoidal_los_validators.py

Useful tools for visualization

Ellipse and Ellipsoidal

  1. We create a 2D ellipse on the xyxy plane with the two sites as the end points.
  2. (Red is x-axis, Green is y-axis, Blue is z-axis). In reality, the Fresnel radius is much smaller, but it’s enlarged here for visualization
  3. We also create a 3D ellipsoid with the two sites as the endpoints

Mathematical Formulation

Given two sites Site 1:(x1,y1,z1)(x_1​,y_1​,z_1​), Site 2:(x2,y2,z2)(x_2​,y_2​,z_2​)

To calculate the maximum radius of the first Fresnel zone, we use this equation from the wiki

F1[m]=8.656D[km]f[GHz]where  D=(x2x1)2+(y2y1)2+(z2z1)2F_1[m] = 8.656\sqrt{\frac{D[km]}{f[GHz]}} \\ where \; D = \sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}
  • D=(x2​−x1​)2+(y2​−y1​)2+(z2​−z1​)2​. UTM is in meters

Equation for 2D ellipse on the xyxy plane:

((xh)cos(A)+(yk)sin(A))2a2+((xh)sin(A)(yk)cos(A))2b21=0\frac{((x-h)\cos(A)+(y-k)\sin(A))^2}{a^2} + \frac{((x-h)\sin(A)-(y-k)\cos(A))^2}{b^2} - 1 = 0

where

  • h,kh,k are the offsets from origin (0,0)(0,0) to the midpoint of the ellipse
  • Angle AA is the is the angle between the xx-axis and the line which goes through both sites
  • aa is the 2D euclidean distance from a site to the midpoint
  • bb is the Fresnel Radius

To check if a point (x,y)(x,y) is inside the ellipse, we just need to evaluate the ellipse equation. if the result 0\leq 0, it is inside the ellipse otherwise it is outside.

Equation for 3D ellipsoid: The standard equation of an ellipsoid that is not rotated and at the origin is

x2a2+y2b2+z2c2=1\frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} = 1

where

  • aa is the 3D euclidean distance from a site to the midpoint
  • bb and cc are both equal to the Fresnel Radius

We need to find a rotated ellipsoid that is not at the origin.

  • We use 3D rotational matrices. We perform intrinsic rotations first on zz-axis with angle AA, then yy-axis with angle BB then xx-axis with angle CC
    • intrinsic means the rotation is always based on the rotating coordinate system
  • The three rotational matrices are
    Rz(θ)=[1000cosθsinθ0sinθcosθ] Ry(θ)=[cosθ0sinθ010sinθ0cosθ] Rz(θ)=[cosθsinθ0sinθcosθ0001]R_z(\theta)=\begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos\theta & -\sin\theta \\ 0 & \sin\theta & \cos\theta \end{bmatrix} \\ \ \\ R_y(\theta)=\begin{bmatrix} \cos\theta & 0 & \sin\theta \\ 0 & 1 & 0 \\ -\sin\theta & 0 & \cos\theta \end{bmatrix} \\ \ \\ R_z({\theta}) = \begin{bmatrix} \cos\theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \\ \end{bmatrix}
  • Using a right handed coordinate system. We want a positive angle AA to rotate from postive xx-axis to positive yy-axis, a positive angle BB to rotate from postive xx-axis to positive zz-axis, and a positive angle CC to rotate from postive yy-axis to positive zz-axis
    • We get [xyz]=Rx(C)Ry(B)Rz(A)[xhykzl]\begin{bmatrix}x' \\ y' \\ z' \end{bmatrix} = R_x(-C)R_y(B)R_z(-A) \begin{bmatrix}x-h \\ y-k \\ z-l \end{bmatrix}, then we plug xx', yy' and zz' into the standard ellipsoid equation x2a2+y2b2+z2c2=1\frac{x'^2}{a^2}​+\frac{y'^2}{b^2}​+\frac{z'^2}{c^2} ​=1
  • Since bb and cc are both equal to the Fresnel Radius, Angle CC (around the xx-axis) will not have an impact since it is a sphere on the yzyz plane. We can simplify the equation with C=0C = 0
  • Final 3D ellipsoid equation is
((xh)×cos(B)×cos(A)+(yk)×sin(A)×cos(B)+(zl)×sin(B))2a2+((hx)×sin(A)+(yk)×cos(A))2b2+((hx)×sin(B)×cos(A)+(ky)×sin(B)×sin(A)+(zl)×cos(B))2c21=0\begin{aligned} {}&\frac{((x-h)\times\cos(B)\times\cos(A)+(y-k)\times\sin(A)\times\cos(B)+(z-l)\times\sin(B))^2 }{a^2} \\ {}&+ \frac{((h-x)\times\sin(A)+(y-k)\times\cos(A))^2}{b^2} \\ {}& + \frac{((h-x)\times\sin(B)\times\cos(A)+(k-y)\times\sin(B)\times\sin(A)+(z-l)\times\cos(B))^2 }{c^2} - 1 = 0 \end{aligned}
  • Where angle AA is the first rotation around the zz-axis, calculated using arctany1y2x1x2​​\arctan\frac{y_1-y_2}{x_1-x_2}​​

  • Angle BB is the second rotation around the yy-axis applied after the first rotation, calculated by

    B=arctanz1z2x1x2x1=x1cos(A)y1sin(A)x2=x2cos(A)y2sin(A)}    B=arctanz1z2(x1x2)×cos(A)+(y1y2)×sin(A)\begin{rcases} B = \arctan\frac{z_1-z_2}{x'_1-x'_2} \\ x'_1 = x_1\cos(-A)-y_1\sin(-A) \\ x'_2 = x_2\cos(-A)-y_2\sin(-A) \end{rcases} \\ \implies B = \arctan\frac{z_1-z_2}{(x_1-x_2)\times\cos(A)+(y_1-y_2)\times\sin(A)}
  • To find the two heights on the ellipsoid for a point(xx,yy), we rearrange the ellipsoid equation for variable zz into standard quadratic form ax2+bx+c=0ax^2 + bx + c = 0, then get

    (zl)2(sin2(B)a2+cos2(B)c2)+(zl)(p×sin(B)a2+q×cos(B)c2)+(p2a2+q2c2+((hx)×sin(A)+(yk)×cos(A))2b2)=0(z-l)^2(\frac{\sin^2(B)}{a^2}+\frac{\cos^2(B)}{c^2}) + (z-l)(\frac{p\times\sin(B)}{a^2}+\frac{q\times\cos(B)}{c^2}) \\ + (\frac{p^2}{a^2}+\frac{q^2}{c^2}+\frac{((h-x)\times\sin(A)+(y-k)\times\cos(A))^2}{b^2}) = 0
  • where,  p=((xh)×cos(B)×cos(A)+(yk)×sin(A)×cos(B))\ p = ((x-h)\times\cos(B)\times\cos(A)+(y-k)\times\sin(A)\times\cos(B))

  • q=((hx)×sin(B)×cos(A)+(ky)×sin(B)×sin(A))q = ((h−x)\times\sin(B)\times\cos(A)+(k−y)\times\sin(B)\times\sin(A))

  • We get the two heights by using this numericaly stable method to solve for roots and adding offset ll. If there’s no roots, then it’s obviously that the LOS is clear. To compute the confidence level, we only care about the higher intersection. If it’s higher than max_top_view_plane , which is described in the section of Cylindrical Model, we compute the confidence level with the 3D ellipsoid equation; otherwise, the 2D ellipse is used because the closest obstruction is on the max_top_view_plane.

Steps to Decide LOS

  1. We create a rectangular bounding box around the ellipse. Points I,J,K,LI, J, K, L define the bounding rectangle surrounding the ellipse region

  2. We scan through a rectangular area on the DSM that cover the ellipse and obtain all the potential_obstructions

  3. For each potential obstruction, we first check if it is inside the xyxy ellipse.

    For example Here point FF and GG will get filtered out because they are not within the 2D projection, but points CC,DD,EE may still be an obstruction

  4. For all the obstructions inside the ellipse, we then use the 3D ellipsoid to check if the obstruction’s height interferes with the Fresnel Zone. With DSM data, we only have (x,y,z)(x,y,z) coordinate with zz being the highest point on the object therefore. Then an obstruction interferes with the Fresnel Zone if the height is within or greater than the ellipsoid

    For example, here point EE and CC is an obstruction because it is within/above the Fresnel Zone but point DD is not an obstruction since it is below the Fresnel Zone.