Physical Device¶
- class PhysicalDevice(max_receive_delay=0.0, noise_power=None, leakage_calibration=None, delay_calibration=None, antenna_calibration=None, *args, **kwargs)[source]¶
Bases:
Generic
[PDST
],Device
[PDST
]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 (numpy.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.antenna_calibration (AntennaCalibration, optional) – The antenna calibration routine to apply to transmitted and received signals. If not provided, defaults to the
NoAntennaCalibration
stub routine.*args –
Device
base class initialization parameters.**kwargs –
Device
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
- process_input(impinging_signals=None, state=None)[source]¶
Process input signals impinging onto this device.
- Parameters:
impinging_signals (Union[DeviceInput, Signal, Sequence[Signal]]) – The samples to be processed by the device.
state (DST, optional) – Device state to be used for the processing. If not provided, query the current device state.
- Return type:
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, state=None, notify=True)[source]¶
Receive over this physical device.
Internally calls
PhysicalDevice.process_input()
andDevice.receive_operators()
.- Parameters:
impinging_signals (DeviceInput | Signal | Sequence[Signal], optional) – The samples to be processed by the device. If not specified, the device will download the samples directly from the represented hardware.
state (PDST, optional) – Device state to be used for the processing. If not provided, query the current device state by calling
state()
.notify (bool, optional) – Notify all registered callbacks within the involved DSP algorithms. Enabled by default.
- Return type:
Returns: The received device information.
- transmit(state=None, notify=True)[source]¶
Transmit over this device.
- Parameters:
state (DST, optional) – Device state to be used for the transmission. If not provided, query the current device state by calling
state()
.notify (bool, optional) – Notify the transmitter’s callbacks about the generated transmission. Enabled by default.
- Return type:
Returns: Information transmitted by this device.
- trigger_direct(signal, calibrate=True)[source]¶
Trigger a direct transmission and reception.
Bypasses the operator abstraction layer and directly transmits the given signal.
- Parameters:
- Return type:
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 antenna_calibration: AntennaCalibration¶
Antenna calibration routine to apply to transmitted and received signals.
Returns: Handle to the antenna calibration routine.
- 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.