Antenna Descriptions¶
- class Antenna(mode=AntennaMode.DUPLEX, pose=None)[source]¶
Bases:
ABC
,Generic
[APT
],Transformable
Base class for the model of a single antenna element within an antenna array.
- Parameters:
mode (AntennaMode, optional) – Antenna’s mode of operation. By default, a full duplex antenna is assumed.
pose (Transformation, optional) – The antenna’s position and orientation with respect to its array.
- global_characteristics(global_direction)[source]¶
Query the antenna’s polarization characteristics towards a certain direction of interest.
- abstract local_characteristics(azimuth, elevation)[source]¶
Generate a single sample of the antenna’s characteristics.
The polarization is characterized by the angle-dependant field vector
\[\begin{split}\mathbf{F}(\phi, \theta) = \begin{pmatrix} F_{\mathrm{H}}(\phi, \theta) \\ F_{\mathrm{V}}(\phi, \theta) \\ \end{pmatrix}\end{split}\]denoting the horizontal and vertical field components. The directional antenna gain can be computed from the polarization vector magnitude
\[\begin{split}A(\phi, \theta) &= \lVert \mathbf{F}(\phi, \theta) \rVert \\ &= \sqrt{ F_{\mathrm{H}}(\phi, \theta)^2 + F_{\mathrm{V}}(\phi, \theta)^2 }\end{split}\]- Parameters:
- Return type:
- Returns:
Two dimensional numpy array denoting the horizontal and vertical ploarization components of the antenna response vector.
- plot_gain(angle_resolution=180)[source]¶
Visualize the antenna gain depending on the angles of interest.
- Parameters:
angle_resolution (int, optional) – Resolution of the polarization visualization.
- Return type:
- Returns:
The created matplotlib figure.
- Raises:
ValueError – If angle_resolution is smaller than one.
- plot_polarization(angle_resolution=180)[source]¶
Visualize the antenna polarization depending on the angles of interest.
- Parameters:
angle_resolution (int, optional) – Resolution of the polarization visualization.
- Return type:
- Returns:
The created matplotlib figure.
- Raises:
ValueError – If angle_resolution is smaller than one.
- property mode: AntennaMode¶
Antenna’s mode of operation.
- class IdealAntenna(mode=AntennaMode.DUPLEX, pose=None)[source]¶
Bases:
Generic
[APT
],Antenna
[APT
],Serializable
Theoretic model of an ideal antenna.
The assumed characteristic is
\[\begin{split}\mathbf{F}(\phi, \theta) = \begin{pmatrix} \sqrt{2} \\ \sqrt{2} \\ \end{pmatrix}\end{split}\]resulting in unit gain in every direction.
- Parameters:
mode (AntennaMode, optional) – Antenna’s mode of operation. By default, a full duplex antenna is assumed.
pose (Transformation, optional) – The antenna’s position and orientation with respect to its array.
- copy()[source]¶
Create a deep copy of the antenna.
- Return type:
- Returns:
A deep copy of the antenna.
- local_characteristics(azimuth, elevation)[source]¶
Generate a single sample of the antenna’s characteristics.
The polarization is characterized by the angle-dependant field vector
\[\begin{split}\mathbf{F}(\phi, \theta) = \begin{pmatrix} F_{\mathrm{H}}(\phi, \theta) \\ F_{\mathrm{V}}(\phi, \theta) \\ \end{pmatrix}\end{split}\]denoting the horizontal and vertical field components. The directional antenna gain can be computed from the polarization vector magnitude
\[\begin{split}A(\phi, \theta) &= \lVert \mathbf{F}(\phi, \theta) \rVert \\ &= \sqrt{ F_{\mathrm{H}}(\phi, \theta)^2 + F_{\mathrm{V}}(\phi, \theta)^2 }\end{split}\]- Parameters:
- Return type:
- Returns:
Two dimensional numpy array denoting the horizontal and vertical ploarization components of the antenna response vector.
- yaml_tag: Optional[str] = 'IdealAntenna'¶
YAML serialization tag
- class LinearAntenna(mode=AntennaMode.DUPLEX, slant=0.0, pose=None)[source]¶
Bases:
Generic
[APT
],Antenna
[APT
],Serializable
Model of a linearly polarized ideal antenna.
The assumed characteristic is
\[\begin{split}\mathbf{F}(\theta, \phi, \zeta) = \begin{pmatrix} \cos (\zeta) \\ \sin (\zeta) \\ \end{pmatrix}\end{split}\]with \(zeta = 0\) resulting in vertical polarization and \(zeta = \pi / 2\) resulting in horizontal polarization.
Initialize a new linear antenna.
- Parameters:
mode (AntennaMode, optional) – Antenna’s mode of operation. By default, a full duplex antenna is assumed.
mode – Antenna’s mode of operation. By default, a full duplex antenna is assumed.
slant (float) – Slant of the antenna in radians.
pose (Transformation, optional) – Pose of the antenna.
- copy()[source]¶
Create a deep copy of the antenna.
- Return type:
- Returns:
A deep copy of the antenna.
- local_characteristics(azimuth, zenith)[source]¶
Generate a single sample of the antenna’s characteristics.
The polarization is characterized by the angle-dependant field vector
\[\begin{split}\mathbf{F}(\phi, \theta) = \begin{pmatrix} F_{\mathrm{H}}(\phi, \theta) \\ F_{\mathrm{V}}(\phi, \theta) \\ \end{pmatrix}\end{split}\]denoting the horizontal and vertical field components. The directional antenna gain can be computed from the polarization vector magnitude
\[\begin{split}A(\phi, \theta) &= \lVert \mathbf{F}(\phi, \theta) \rVert \\ &= \sqrt{ F_{\mathrm{H}}(\phi, \theta)^2 + F_{\mathrm{V}}(\phi, \theta)^2 }\end{split}\]- Parameters:
- Return type:
- Returns:
Two dimensional numpy array denoting the horizontal and vertical ploarization components of the antenna response vector.
- class PatchAntenna(mode=AntennaMode.DUPLEX, pose=None)[source]¶
Bases:
Generic
[APT
],Antenna
[APT
],Serializable
Realistic model of a vertically polarized patch antenna.
Refer to Jaeckel et al.[1] for further information.
- Parameters:
mode (AntennaMode, optional) – Antenna’s mode of operation. By default, a full duplex antenna is assumed.
pose (Transformation, optional) – The antenna’s position and orientation with respect to its array.
- copy()[source]¶
Create a deep copy of the antenna.
- Return type:
- Returns:
A deep copy of the antenna.
- local_characteristics(azimuth, elevation)[source]¶
Generate a single sample of the antenna’s characteristics.
The polarization is characterized by the angle-dependant field vector
\[\begin{split}\mathbf{F}(\phi, \theta) = \begin{pmatrix} F_{\mathrm{H}}(\phi, \theta) \\ F_{\mathrm{V}}(\phi, \theta) \\ \end{pmatrix}\end{split}\]denoting the horizontal and vertical field components. The directional antenna gain can be computed from the polarization vector magnitude
\[\begin{split}A(\phi, \theta) &= \lVert \mathbf{F}(\phi, \theta) \rVert \\ &= \sqrt{ F_{\mathrm{H}}(\phi, \theta)^2 + F_{\mathrm{V}}(\phi, \theta)^2 }\end{split}\]- Parameters:
- Return type:
- Returns:
Two dimensional numpy array denoting the horizontal and vertical ploarization components of the antenna response vector.
- yaml_tag: Optional[str] = 'PatchAntenna'¶
YAML serialization tag
- class Dipole(mode=AntennaMode.DUPLEX, pose=None)[source]¶
Bases:
Generic
[APT
],Antenna
[APT
],Serializable
Model of vertically polarized half-wavelength dipole antenna.
The assumed characteristic is
\[\begin{split}F_\mathrm{V}(\phi, \theta) &= \frac{ \cos( \frac{\pi}{2} \cos(\theta)) }{ \sin(\theta) } \\ F_\mathrm{H}(\phi, \theta) &= 0\end{split}\]- Parameters:
mode (AntennaMode, optional) – Antenna’s mode of operation. By default, a full duplex antenna is assumed.
pose (Transformation, optional) – The antenna’s position and orientation with respect to its array.
- copy()[source]¶
Create a deep copy of the antenna.
- Return type:
- Returns:
A deep copy of the antenna.
- local_characteristics(azimuth, elevation)[source]¶
Generate a single sample of the antenna’s characteristics.
The polarization is characterized by the angle-dependant field vector
\[\begin{split}\mathbf{F}(\phi, \theta) = \begin{pmatrix} F_{\mathrm{H}}(\phi, \theta) \\ F_{\mathrm{V}}(\phi, \theta) \\ \end{pmatrix}\end{split}\]denoting the horizontal and vertical field components. The directional antenna gain can be computed from the polarization vector magnitude
\[\begin{split}A(\phi, \theta) &= \lVert \mathbf{F}(\phi, \theta) \rVert \\ &= \sqrt{ F_{\mathrm{H}}(\phi, \theta)^2 + F_{\mathrm{V}}(\phi, \theta)^2 }\end{split}\]- Parameters:
- Return type:
- Returns:
Two dimensional numpy array denoting the horizontal and vertical ploarization components of the antenna response vector.
- yaml_tag: Optional[str] = 'DipoleAntenna'¶
YAML serialization tag
- class AntennaArrayBase(pose=None)[source]¶
Bases:
ABC
,Generic
[APT
],Transformable
Base class for all antenna array models.
- Parameters:
pose (Transformation, optional) – Transformation of the transformable with respect to its reference frame. By default, no transformation is considered, i.e.
Transformation.No()
- cartesian_array_response(carrier_frequency, position, frame='local', mode=AntennaMode.DUPLEX)[source]¶
Sensor array characteristics towards an impinging point source within its far-field.
- Parameters:
carrier_frequency (float) – Center frequency \(f_\mathrm{c}\) of the assumed transmitted signal in Hz.
position (numpy.ndarray) – Cartesian location \(\mathbf{t}\) of the impinging target.
frame (Literal['local', 'global']) – Coordinate system reference frame. global by default. local assumes position to be in the antenna array’s native coordiante system. global assumes position to be in the antenna array’s root coordinate system.
mode (AntennaMode, optional) – Antenna mode of interest. DUPLEX by default, meaning that all antenna elements are considered.
- Return type:
- Returns:
The sensor array response matrix \(\mathbf{A} \in \mathbb{C}^{M \times 2}\). A one-dimensional, complex-valued numpy matrix modeling the far-field charactersitics of each antenna element.
- Raises:
ValueError – If position is not a cartesian vector.
- cartesian_phase_response(carrier_frequency, position, frame='local', mode=AntennaMode.DUPLEX)[source]¶
Phase response of the sensor array towards an impinging point source within its far-field.
Assuming a point source at position \(\mathbf{t} \in \mathbb{R}^{3}\) within the sensor array’s far field, so that \(\lVert \mathbf{t} \rVert_2 \gg 0\), the \(m\)-th array element at position \(\mathbf{q}_m \in \mathbb{R}^{3}\) responds with a factor
\[a_{m} = e^{ \mathrm{j} \frac{2 \pi f_\mathrm{c}}{\mathrm{c}} \lVert \mathbf{t} - \mathbf{q}_{m} \rVert_2 }\]to an electromagnetic waveform emitted with center frequency \(f_\mathrm{c}\). The full array response vector is the,refore
\[\mathbf{a} = \left[ a_1, a_2, \dots, a_{M} \right]^{\intercal} \in \mathbb{C}^{M} \mathrm{.}\]- Parameters:
carrier_frequency (float) – Center frequency \(f_\mathrm{c}\) of the assumed transmitted signal in Hz.
position (numpy.ndarray) – Cartesian location \(\mathbf{t}\) of the impinging target.
frame (Literal['local', 'global']) – Coordinate system reference frame. local by default. local assumes position to be in the antenna array’s native coordiante system. global assumes position to be in the antenna array’s root coordinate system.
mode (AntennaMode, optional) – Antenna mode of interest. DUPLEX by default, meaning that all antenna elements are considered.
- Return type:
- Returns:
The sensor array response vector \(\mathbf{a}\). A one-dimensional, complex-valued numpy array modeling the phase responses of each antenna element.
- Raises:
ValueError – If position is not a cartesian vector.
- horizontal_phase_response(carrier_frequency, azimuth, elevation, mode=AntennaMode.DUPLEX)[source]¶
Response of the sensor array towards an impinging point source within its far-field.
Assuming a far-field point source impinges onto the sensor array from horizontal angles of arrival azimuth \(\phi \in [0, 2\pi)\) and elevation \(\theta \in [-\pi, \pi]\), the wave vector
\[\begin{split}\mathbf{k}(\phi, \theta) = \frac{2 \pi f_\mathrm{c}}{\mathrm{c}} \begin{pmatrix} \cos( \phi ) \cos( \theta ) \\ \sin( \phi) \cos( \theta ) \\ \sin( \theta ) \end{pmatrix}\end{split}\]defines the phase of a planar wave in horizontal coordinates. The \(m\)-th array element at position \(\mathbf{q}_m \in \mathbb{R}^{3}\) responds with a factor
\[a_{m}(\phi, \theta) = e^{\mathrm{j} \mathbf{k}^\intercal(\phi, \theta)\mathbf{q}_{m} }\]to an electromagnetic waveform emitted with center frequency \(f_\mathrm{c}\). The full array response vector is therefore
\[\mathbf{a}(\phi, \theta) = \left[ a_1(\phi, \theta) , a_2(\phi, \theta) , \dots, a_{M}(\phi, \theta) \right]^{\intercal} \in \mathbb{C}^{M} \mathrm{.}\]- Parameters:
carrier_frequency (float) – Center frequency \(f_\mathrm{c}\) of the assumed transmitted signal in Hz.
azimuth (float) – Azimuth angle \(\phi\) in radians.
elevation (float) – Elevation angle \(\theta\) in radians.
mode (AntennaMode, optional) – Antenna mode of interest. DUPLEX by default, meaning that all antenna elements are considered.
- Return type:
- Returns:
The sensor array response vector \(\mathbf{a}\). A one-dimensional, complex-valued numpy array modeling the phase responses of each antenna element.
- plot_topology(mode=AntennaMode.DUPLEX)[source]¶
Plot a scatter representation of the array topology.
- Parameters:
mode (AntennaMode, optional) – Antenna mode of interest. DUPLEX by default, meaning that all antenna elements are considered.
- Returns:
The created figure.
- Return type:
plt.Figure
- spherical_phase_response(carrier_frequency, azimuth, zenith, mode=AntennaMode.DUPLEX)[source]¶
Response of the sensor array towards an impinging point source within its far-field.
Assuming a far-field point source impinges onto the sensor array from spherical angles of arrival azimuth \(\phi \in [0, 2\pi)\) and zenith \(\theta \in [0, \pi]\), the wave vector
\[\begin{split}\mathbf{k}(\phi, \theta) = \frac{2 \pi f_\mathrm{c}}{\mathrm{c}} \begin{pmatrix} \cos( \phi ) \sin( \theta ) \\ \sin( \phi) \sin( \theta ) \\ \cos( \theta ) \end{pmatrix}\end{split}\]defines the phase of a planar wave in horizontal coordinates. The \(m\)-th array element at position \(\mathbf{q}_m \in \mathbb{R}^{3}\) responds with a factor
\[a_{m}(\phi, \theta) = e^{\mathrm{j} \mathbf{k}^\intercal(\phi, \theta)\mathbf{q}_{m} }\]to an electromagnetic waveform emitted with center frequency \(f_\mathrm{c}\). The full array response vector is therefore
\[\mathbf{a}(\phi, \theta) = \left[ a_1(\phi, \theta) , a_2(\phi, \theta) , \dots, a_{M}(\phi, \theta) \right]^{\intercal} \in \mathbb{C}^{M} \mathrm{.}\]- Parameters:
carrier_frequency (float) – Center frequency \(f_\mathrm{c}\) of the assumed transmitted signal in Hz.
azimuth (float) – Azimuth angle \(\phi\) in radians.
zenith (float) – Zenith angle \(\theta\) in radians.
mode (AntennaMode, optional) – Antenna mode of interest. DUPLEX by default, meaning that all antenna elements are considered.
- Return type:
- Returns:
The sensor array response vector \(\mathbf{a}\). A one-dimensional, complex-valued numpy array modeling the phase responses of each antenna element.
- abstract property receive_antennas: Sequence[Antenna]¶
All receiving antenna elements within this array.
- property receive_topology: ndarray¶
Topology of receiving antenna elements.
Access the array topology as a \(M_{\mathrm{Rx}} \times 3\) matrix indicating the cartesian locations of each receiving antenna element within the local coordinate system.
- Returns:
\(M_{\mathrm{Rx}} \times 3\) topology matrix, where \(M_{\mathrm{Rx}}\) is the number of antenna elements.
- property topology: ndarray¶
Sensor array topology.
Access the array topology as a \(M \times 3\) matrix indicating the cartesian locations of each antenna element within the local coordinate system.
- Returns:
\(M \times 3\) topology matrix, where \(M\) is the number of antenna elements.
- abstract property transmit_antennas: Sequence[Antenna]¶
All transmitting antenna elements within this array.
- property transmit_topology: ndarray¶
Topology of transmitting antenna elements.
Access the array topology as a \(M_{\mathrm{Tx}} \times 3\) matrix indicating the cartesian locations of each transmitting antenna element within the local coordinate system.
- Returns:
\(M_{\mathrm{Tx}} \times 3\) topology matrix, where \(M_{\mathrm{Tx}}\) is the number of antenna elements.
- class AntennaArrayState(ports, global_pose)[source]¶
Bases:
Sequence
,AntennaArrayBase
Immutable state of an antenna array.
Returned by the
state
of an antenna array.- Parameters:
ports (Sequence[AntennaPort]) – Physical ports of the represented antenna array.
global_pose (Transformation) – Global pose of the represented antenna array.
- property ports: Sequence[AntennaPort]¶
All physical ports of the represented antenna array.
- class AntennaArray(pose=None)[source]¶
Bases:
AntennaArrayBase
[APT
],Generic
[APT
,AT
]Base class of a model of a set of antennas.
- Parameters:
pose (Transformation, optional) – The antenna array’s position and orientation with respect to its device. If not specified, the same orientation and position as the device is assumed.
- count_antennas(ports)[source]¶
Count the number of antenna elements within a subset of ports.
Returns: Number of antenna elements within the specified ports.
- Raises:
IndexError – If an invalid port index is encountered.
- count_receive_antennas(ports)[source]¶
Count the number of receiving antenna elements within a subset of ports.
Returns: Number of receiving antenna elements within the specified ports.
- Raises:
IndexError – If an invalid port index is encountered.
- count_transmit_antennas(ports)[source]¶
Count the number of transmitting antenna elements within a subset of ports.
Returns: Number of transmitting antenna elements within the specified ports.
- Raises:
IndexError – If an invalid port index is encountered.
- state(base_pose)[source]¶
Return the current state of the antenna array.
- Parameters:
base_pose (Transformation) – Assumed pose of the antenna array’s base coordinate frame.
- Return type:
Returns: The current immutable state of the antenna array.
- class UniformArray(element, spacing, dimensions, pose=None)[source]¶
Bases:
Generic
[APT
,AT
],AntennaArray
[APT
,AT
],Serializable
Model of a Uniform Antenna Array.
- Parameters:
element (Type[AT] | AT | APT) – The element uniformly repeated across the array. If an antenna is passed instead of a port, a new port is automatically created.
spacing (float) – Spacing between the elements in m.
dimensions (Sequence[int]) – The number of elements in x-, y-, and z-dimension.
pose (Tranformation, optional) – The anntena array’s transformation with respect to its device.
- property dimensions: Tuple[int, ...]¶
Number of antennas in x-, y-, and z-dimension.
Returns: Number of antennas in each direction.
- property spacing: float¶
Spacing between the antenna elements.
- Returns:
Spacing in m.
- Return type:
- Raises:
ValueError – If spacing is less or equal to zero.
- class CustomAntennaArray(ports=None, pose=None)[source]¶
Bases:
Generic
[APT
,AT
],AntennaArray
[APT
,AT
],Serializable
Model of a set of arbitrary antennas.
- Parameters:
ports (Sequence[APT | AT], optional) – Sequence of antenna ports available within this array. If antennas are passed instead of ports, the ports are automatically created. If not specified, an empty array is assumed.
pose (Transformation, optional) – The anntena array’s transformation with respect to its device.
- Raises:
ValueError – If the argument lists contain an unequal amount of objects.
- add_antenna(antenna)[source]¶
Add a new antenna element to this array.
Convenience wrapper around
add_port()
, meaning a new port is automatically created and the antenna is added to it.- Parameters:
antenna (AT) – The antenna element to be added.
- Raises:
ValueError – If the antenna is already attached to another array or port.
- Return type:
TypeVar
(APT
, bound= AntennaPort)
Returns: The newly created port.
- remove_port(port)[source]¶
Remove a port from this array.
- Parameters:
port (APT) – The antenna port to be removed.
- Raises:
ValueError – If the port is not connected to this array.
- Return type:
- class AntennaPort(antennas=None, pose=None, array=None)[source]¶
Bases:
Generic
[AT
,AAT
],Transformable
,Serializable
A single antenna port linking a set of antennas to an antenna array.
- Parameters:
antennas (Sequence[AT], optional) – Sequence of antennas to be connected to this port. If not specified, no antennas are connected by default.
pose (Transformation, optional) – The antenna port’s position and orientation with respect to its array.
array (AAT, optional) – Antenna array this port belongs to.
- add_antenna(antenna)[source]¶
Add a new antenna to this port.
- Parameters:
antenna (AT) – The antenna to be added.
- Raises:
ValueError – If the antenna is already connected to a different port.
- Return type:
- antennas_updated()[source]¶
Callback that is called whenever the list of connected antennas is updated.
Should also be called after a connected antenna’s mode has changed.
- Return type:
- copy()[source]¶
Create a deep copy of the antenna port.
The copy will not be connected to any array.
Returns: The copy.
- Return type:
- class AntennaMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
SerializableEnum
Mode of operation of the antenna.
- DUPLEX = 2¶
Transmit-receive antenna
- RX = 1¶
Receive-only antenna
- TX = 0¶
Transmit-only antenna
- class AAT¶
Type of antenna array.
alias of TypeVar(‘AAT’, bound=
AntennaArray
)
- class APT¶
Type of antenna port.
alias of TypeVar(‘APT’, bound=
AntennaPort
)