Physical Device#

class PhysicalDevice(max_receive_delay=0.0, noise_power=None, leakage_calibration=None, delay_calibration=None, *args, **kwargs)[source]#

Bases: Device, ABC

Base representing any device controlling real hardware.

Parameters:
  • max_receive_delay (float, optional) – Maximum expected delay during siganl reception in seconds. Zero by default.

  • noise_power (np.ndarray, optional) – Assumed power of the hardware noise at the device’s receive chains.

  • leakage_calibration (LeakageCalibrationBase, optional) – The leakage calibration routine to apply to received signals. If not provided, defaults to the NoLeakageCalibration stub routine.

  • delay_calibration (DelayCalibrationBase, optional) – The delay calibration routine to apply to received signals. If not provided, defaults to the NoDelayCalibration stub routine.

  • *argsDevice base class initialization parameters.

  • **kwargsDevice base class initialization parameters.

estimate_noise_power(num_samples=1000, cache=True)[source]#

Estimate the power of the noise floor within the hardware.

Receives num_samples without any transmissions and estimates the power over them. Note that any interference in this case will be interpreted as noise.

Parameters:
  • num_samples (int, optional) – Number of received samples. 1000 by default.

  • cache (bool, optional) – If enabled, the PhysicalDevice.noise_power() property will be updated.

Returns:

Estimated noise power at each respective receive channel, i.e. the variance of the unbiased received samples.

Return type:

np.ndarray

load_calibration(path)[source]#

Load the calibration file from the hard drive.

Parameters:

path (str) – Path from which to load the calibration file.

Return type:

None

process_input(impinging_signals=None, cache=True)[source]#

Process input signals impinging onto this device.

Parameters:
  • impinging_signals (Union[DeviceInput, Signal, Sequence[Signal]]) – The samples to be processed by the device.

  • cache (bool, optional) – Cache the operator inputs at the registered receive operators for further processing. Enabled by default.

Return type:

ProcessedDeviceInput

Returns: The processed device input information.

Raises:

ValueError – If the number of signal streams does not match the device configuration expectations.

receive(impinging_signals=None, cache=True)[source]#

Receive over this device.

Internally calls Device.process_input() and Device.receive_operators().

Parameters:
  • impinging_signals (Union[DeviceInput, Signal, Sequence[Signal]]) – The samples to be processed by the device.

  • cache (bool, optional) – Cache the received information. Enabled by default.

Return type:

DeviceReception

Returns: The received device information.

save_calibration(path)[source]#

Save the calibration file to the hard drive.

Parameters:

path (str) – Path under which the file should be stored.

Return type:

None

transmit(clear_cache=True)[source]#

Transmit over this device.

Parameters:

clear_cache (bool, optional) – Clear the cache of operator signals to be transmitted. Enabled by default.

Return type:

DeviceTransmission

Returns: Information transmitted by this device.

abstract trigger()[source]#

Trigger the device.

Return type:

None

trigger_direct(signal, calibrate=True)[source]#

Trigger a direct transmission and reception.

Bypasses the operator abstraction layer and directly transmits the given signal.

Parameters:
  • signal (Signal) – The signal to be transmitted.

  • calibrate (bool, optional) – If enabled, the signal will be calibrated using the device’s leakage calibration. Enabled by default.

Return type:

Signal

Returns: The received signal.

Raises:

ValueError – If the signal’s carrier frequency or sampling rate does not match the device’s.

property adaptive_sampling: bool#

Allow adaptive sampling during transmission.

Returns: Enabled flag.

property delay_calibration: DelayCalibrationBase#

Delay calibration routine to apply to received signals.

Returns:

Handle to the delay calibration routine.

property leakage_calibration: LeakageCalibrationBase#

Leakage calibration routine to apply to received signals.

Returns:

Handle to the calibration routine.

property lowpass_bandwidth: float#

Digital lowpass filter bandwidth

Returns:

Filter bandwidth in Hz. Zero if the device should determine the bandwidth automatically.

Raises:

ValueError – For negative bandwidths.

property lowpass_filter: bool#

Apply a digital lowpass filter to the received base-band samples.

Returns: Enabled flag.

property max_receive_delay: float#

Maximum expected delay during signal reception.

The expected delay will be appended as additional samples to the expected frame length during reception.

Returns:

The expected receive delay in seconds.

Raises:

ValueError – If the delay is smaller than zero.

abstract property max_sampling_rate: float#

Maximal device sampling rate.

Returns: The samplin rate in Hz.

property noise_power: ndarray | None#

Assumed hardware noise power at the device’s receive chains.

Returns:

Numpy array indicating the noise power at each receive chain. None if unknown or not specified.

Raises:

ValueError – If any power is negative.

property velocity: ndarray#

Cartesian device velocity vector.

Returns:

Velocity vector.

Return type:

np.ndarray

Raises: