Physical Device Dummy#

Implements a physical device dummy for testing and demonstration purposes.

class PhysicalDeviceDummy(*args, max_receive_delay=0.0, antennas=None, noise_power=None, receive_transmission=True, **kwargs)#

Bases: SimulatedDevice, PhysicalDevice, Serializable

Physical device dummy for testing and demonstration.

The physical device dummy always receives back its most recent transmission.

Parameters:
  • scenario (Scenario, optional) – Scenario this device is attached to. By default, the device is considered floating.

  • rf_chain (RfChain, optional) – Model of the device’s radio frequency amplification chain.

  • adc (AnalogDigitalConverter, optional) – Model of receiver’s ADC converter.

  • isolation (Isolation, optional) – Model of the device’s transmit-receive isolations. By default, perfect isolation is assumed.

  • coupling (Coupling, optional) – Model of the device’s antenna array mutual coupling. By default, ideal coupling behaviour is assumed.

  • trigger_model (TriggerModel, optional) – The assumed trigger model. By default, a StaticTrigger is assumed.

  • sampling_rate (float, optional) – Sampling rate at which this device operates. By default, the sampling rate of the first operator is assumed.

  • carrier_frequency (float, optional) – Center frequency of the mixed signal in rf-band in Hz. Zero by default.

  • pose (Transformation, optional) – Initial pose of the moveable with respect to its reference coordinate frame. By default, a unit transformation is assumed.

  • velocity (np.ndarray, optional) – Initial velocity of the moveable in local coordinates. By default, the moveable is assumed to be resting.

  • *args – Device base class initialization parameters.

  • **kwargs – Device base class initialization parameters.

yaml_tag: Optional[str] = 'PhysicalDeviceDummy'#

YAML serialization tag.

property receive_transmission: bool#

Whether the device receives back its own transmission.

transmit(cache=True, trigger_realization=None)#

Transmit over this device.

Parameters:
  • cache (bool, optional) – Cache the transmitted information. Enabled by default.

  • trigger_realization (TriggerRealization, optional) – Trigger realization modeling the time delay between a drop start and frame start. Perfect triggering is assumed by default.

Return type:

SimulatedDeviceTransmission

Returns: Information transmitted by this device.

process_input(impinging_signals=None, cache=True, trigger_realization=None, snr=inf, snr_type=SNRType.PN0, leaking_signal=None, channel_state=None)#

Process input signals at this device.

Parameters:
  • impinging_signals (DeviceInput | Signal | Sequence[Signal] | Sequence[Sequence[Signal]]) – List of signal models arriving at the device. May also be a two-dimensional numpy object array where the first dimension indicates the link and the second dimension contains the transmitted signal as the first element and the link channel as the second element.

  • cache (bool, optional) – Cache the resulting device reception and operator inputs. Enabled by default.

  • trigger_realization (TriggerRealization, optional) – Trigger realization modeling the time delay between a drop start and frame start. Perfect triggering is assumed by default.

  • snr (float, optional) – Signal to noise power ratio. Infinite by default, meaning no noise will be added to the received signals.

  • snr_type (SNRType, optional) – Type of signal to noise ratio.

  • leaking_signal (Signal, optional) – Signal leaking from transmit to receive chains.

  • channel_state (ChannelStateInformation, optional) – The channel state information available at the receiver.

Return type:

ProcessedSimulatedDeviceInput

Returns: The processed device input.

receive(impinging_signals=None, *args, **kwargs)#

Receive information at this device.

Parameters:
  • impinging_signals (DeviceInput | Signal | Sequence[Signal] | Sequence[Sequence[Signal]]) – List of signal models arriving at the device. May also be a two-dimensional numpy object array where the first dimension indicates the link and the second dimension contains the transmitted signal as the first element and the link channel as the second element.

  • cache (bool, optional) – Cache the resulting device reception and operator inputs. Enabled by default.

  • trigger_realization (TriggerRealization, optional) – Trigger realization modeling the time delay between a drop start and frame start. Perfect triggering is assumed by default.

  • channel_state (ChannelStateInformation, optional) – The channel state information available at the receiver.

Return type:

SimulatedDeviceReception

Returns: The processed device input.

trigger()#

Trigger the device.

Return type:

None

trigger_direct(signal, calibrate=True)#

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 max_sampling_rate: float#

Maximal device sampling rate.

Returns: The samplin rate in Hz.

class PhysicalScenarioDummy(seed=None, devices=None)#

Bases: PhysicalScenario[PhysicalDeviceDummy], Serializable

Physical scenario for testing and demonstration.

Parameters:
  • seed (int, optional) – Random seed used to initialize the pseudo-random number generator.

  • devices (List[Device], optional) – Devices to be added to the scenario during initialization.

yaml_tag: Optional[str] = 'PhysicalScenarioDummy'#

YAML serialization tag.

new_device(*args, **kwargs)#

Add a new device to the scenario.

Convenience function pointing to hermespy.core.scenario.Scenario.new_device().

Returns: Handle to the created device.

Raises:
  • ValueError – If the device already exists.

  • RuntimeError – If the scenario is not in default mode.

  • RuntimeError – If the scenario does not allow for the creation or addition of new devices.

Return type:

PhysicalDeviceDummy