Beamformer¶
Beamforming is split into the prototype classes TransmitBeamformer
and ReceiveBeamformer
for beamforming operations during signal transmission and reception, respectively.
They are both derived from the base BeamformerBase
.
This is due to the fact that some beamforming algorithms may be exclusive to transmission or reception use-cases.
Should a beamformer be applicable during both transmission and reception both prototypes can be inherited.
An example for such an implementation is the Conventional
beamformer.
- class BeamFocus[source]¶
Bases:
ABC
,Serializable
Single focus point of a beamformer.
- abstract copy()[source]¶
Create a copy of this focus point.
- Return type:
TypeVar
(FT
, bound= BeamFocus)- Returns:
A copy of this focus point.
- class CoordinateFocus(coordinates, reference='local')[source]¶
Bases:
BeamFocus
Focus the beamformer towards a certain Cartesian coordinate.
- Parameters:
coordinates (numpy.ndarray) – Cartesian coordinates in m.
reference (str, optional) – Reference frame of the coordinates.
- copy()[source]¶
Create a copy of this focus point.
- Return type:
- Returns:
A copy of this focus point.
- class OT¶
Type of operator.
alias of TypeVar(‘OT’, bound=
Operator
)
- class ReceiveBeamformer[source]¶
Bases:
ReceiveStreamDecoder
Base class for beam steering precodings during signal receptions.
The beamformer is characterised by its required number of input streams \(N\), the resulting number of output streams \(M\) and the supported number of focus points \(F\). Considering a beamformer is provided with a matrix of \(T\) baseband samples \(\mathbf{X} \in \mathbb{C}^{N \times T}\), the beamforming process
\[\mathbf{Y} = \mathcal{B}\lbrace \mathbf{X} \rbrace \quad \text{with} \quad \mathbf{Y} \in \mathbb{C}^{M \times T}\]can generally be described as a function compressing the number of streams while focusing the power towards the angles of interest \(F\).
- abstract _decode(samples, carrier_frequency, angles, array)[source]¶
Decode signal streams for receive beamforming.
This method is called as a subroutine during
decode_streams()
andprobe()
.- Parameters:
samples (numpy.ndarray) – Signal samples, first dimension being the number of signal streams \(N\), second the number of samples \(T\).
carrier_frequency (float) – The assumed carrier central frequency of the samples \(f_\mathrm{c}\).
angles (numpy.ndarray) – Spherical coordinate system angles of arrival in radians. A three-dimensional numpy array with the first dimension representing the number of angles, the second dimension of magnitude number of focus points \(F\), and the third dimension containing the azimuth and zenith angle in radians, respectively.
array (AntennaArrayState) – The assumed antenna array.
- Return type:
- Returns:
Stream samples of the focused signal towards all focus points. A three-dimensional numpy array with the first dimension representing the number of focus points, the second dimension the number of returned streams and the third dimension the amount of samples.
- decode_streams(streams, num_output_streams, device, focus=None)[source]¶
Decode a MIMO signal for receive beamforming.
Wrapper around
_decode()
to decode a signal for receive beamforming. Compliant with theReceiveStreamDecoder
interface.- Parameters:
streams (Signal) – The signal to be decoded.
num_output_streams (int) – The number of desired output streams. Must match
num_receive_output_streams
.device (ReceiveState) – State of the device this beamformer is operating on.
focus (BeamFocus | Sequence[BeamFocus], optional) – Focus points of the steered signal power. Must either be a single focus point or a sequence of focus points, depending on
num_receive_focus_points
. If not provided, the beamformer’s defaultreceive_focus
is assumed.
- Raises:
If the number of provided focus points does not match the beamformer requirements.
- Return type:
Returns: The decoded signal.
- probe(signal, device, focus_points=None)[source]¶
Focus a signal model towards certain directions of interest.
- Parameters:
signal (Signal) – The signal to be steered.
device (ReceiveState) – State of the device this beamformer is operating on.
focus_points (numpy.ndarray, optional) – Focus point of the steered signal power. Two-dimensional numpy array with the first dimension representing the number of points and the second dimension representing the point values.
- Return type:
- Returns:
Stream samples of the focused signal towards all focus points. A three-dimensional numpy array with the first dimension representing the number of focus points, the second dimension the number of returned streams and the third dimension the amount of samples.
- abstract property num_receive_focus_points: int¶
Number of required receive focus points.
If this is \(1\), the beamformer is considered to be a single focus point beamformer and
receive_focus
will return a single focus point. Otherwise, the beamformer is considered a multi focus point beamformer andreceive_focus
will return aSequence
of focus points.Returns: Number of focus points.
- property probe_focus_points: ndarray¶
Default beamformer focus points during probing.
- Returns:
The focus points as a three-dimensional numpy array, with the first dimension representing the probe index, the second dimension the point and the third dimension of magnitude two the point azimuth and zenith, respectively.
- Raises:
ValueError – On invalid arguments.
- property receive_focus: BeamFocus | Sequence[BeamFocus]¶
Focus points of the beamformer during reception.
Depending on
num_receive_focus_points
this is either a single focus point or aSequence
of points.- Raises:
ValueError – If the provided number of focus points does not match the number of required focus points.
- class SphericalFocus(angles: ndarray)[source]¶
- class SphericalFocus(azimuth: float, zenith: float)
Bases:
BeamFocus
Focus point in spherical coordinates.
- copy()[source]¶
Create a copy of this focus point.
- Return type:
- Returns:
A copy of this focus point.
- class TransmitBeamformer[source]¶
Bases:
TransmitStreamEncoder
Base class for beam steering precodings during signal transmissions.
- encode_streams(streams, num_output_streams, device, focus=None)[source]¶
Encode a MIMO signal for transmit beamforming.
Wrapper around
_encode()
to encode a signal for transmit beamforming. Compliant with theTransmitStreamEncoder
interface.- Parameters:
streams (Signal) – The signal to be encoded.
num_output_streams (int) – The number of desired output streams. Must match
num_transmit_output_streams
.device (TransmitState) – State of the device this beamformer is operating on.
focus (BeamFocus | Sequence[BeamFocus], optional) – Focus points of the steered signal power. Must either be a single focus point or a sequence of focus points, depending on
num_transmit_focus_points
. If not provided, the beamformer’s defaulttransmit_focus
is assumed.
- Raises:
ValueError – If the number of provided signal streams does not match the beamformer requirements.
ValueError – If the number of provided focus points does not match the beamformer requirements.
- Return type:
Returns: The encoded signal.
- abstract property num_transmit_focus_points: int¶
Number of required transmit focus points.
If this is \(1\), the beamformer is considered to be a single focus point beamformer and
transmit_focus
will return a single focus point. Otherwise, the beamformer is considered a multi focus point beamformer andtransmit_focus
will return aSequence
of focus points.
- property transmit_focus: BeamFocus | Sequence[BeamFocus]¶
Focus points of the beamformer during transmission.
Depending on
num_transmit_focus_points
this is either a single focus point or aSequence
of points.- Raises:
ValueError – If the provided number of focus points does not match the number of required focus points.