Use antenna patterns

Give a Radar an isotropic, half-wave dipole, separable or tabulated element pattern, and understand the angles and gain units the pattern uses.

Every Radar has an element pattern in its pattern field, and Radar weights each round trip by it. The default is isotropic, which changes nothing. This page shows how to set a different pattern.

Choose a pattern#

from witwin.radar import Pattern
 
isotropic = Pattern.isotropic()          # unit gain everywhere (default)
dipole = Pattern.dipole()                # half-wave dipole cut in both planes, -90 to 90 degrees
 
measured = Pattern.separable(
    x_angles=[-90, -60, -30, 0, 30, 60, 90], x_gain=[0.0, 0.25, 0.75, 1.0, 0.75, 0.25, 0.0],
    y_angles=[-90, -45, 0, 45, 90],          y_gain=[0.0, 0.5, 1.0, 0.5, 0.0],
)
 
grid = Pattern.table(
    x_angles=[-60, 0, 60],
    y_angles=[-60, 0, 60],
    gain=[[0.2, 0.5, 0.2],    # row for y = -60
          [0.5, 1.0, 0.5],    # row for y = 0
          [0.2, 0.5, 0.2]],   # row for y = 60
)
 
radar = radar.replace(pattern=measured)
  • separable multiplies two one-dimensional cuts: the gain at (x, y) is x_gain(x) · y_gain(y).
  • table interpolates a full grid bilinearly. gain has one row per y_angles value, and each row has one value per x_angles value.

Angles#

Both angles are in degrees and are measured in the radar's local frame, where the boresight is -z. For a direction v in that frame:

x = atan2(v_x, -v_z)
y = atan2(v_y, -v_z)

So x is the angle off boresight toward the radar's right, and y the angle toward its up axis. Each axis needs at least two samples, strictly increasing.

Gain#

Gains are linear power gains (not dB, not field amplitude), normalized so the peak is at most 1, and they must be non-negative. Interpolation between samples is piecewise linear.

Outside the tabulated angle range the gain is exactly zero, so an antenna tabulated over -90 to 90 degrees does not radiate behind itself. Pattern.isotropic() spans -180 to 180 degrees on both axes, so it never reaches the zero region.

Gradients#

The pattern table is a constant and cannot be differentiated. The direction into the table is differentiable, so gradients with respect to target and antenna positions include the pattern's slope. At a table sample and at the support edges the gain has a kink, and the derivative there is the one-sided value.

In a configuration file#

The flat FMCW format accepts the same two forms under the antenna_pattern key. See Load a radar configuration file.