Simulated Device#

class SimulatedDevice(scenario=None, antennas=None, rf_chain=None, isolation=None, coupling=None, trigger_model=None, sampling_rate=None, carrier_frequency=0.0, snr=inf, snr_type=SNRType.PN0, pose=None, velocity=None, *args, **kwargs)[source]#

Bases: Device, Moveable, Serializable

Representation of a device simulating hardware.

Simulated devices are required to attach to a scenario in order to simulate proper channel propagation.

Warning

When configuring simulated devices within simulation scenarios, channel models may ignore spatial properties such as position(), orientation() or velocity().

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

  • antennas (SimulatedAntennas, optional) – Antenna array model of the device. By default, a single ideal istropic antenna is assumed.

  • rf_chain (RfChain, optional) – Model of the device’s radio frequency amplification chain. If not specified, a chain with ideal hardware models will be assumed.

  • 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.

  • snr (float, optional) – Signal-to-noise ratio of the device. By default, the device is assumed to be noiseless.

  • snr_type (SNRType, optional) – Type of the signal-to-noise ratio. By default, the signal-to-noise ratio is specified in terms of the power of the noise to the expected power of the received signal.

  • 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.

channel_realization(transmitter)[source]#

Channel realization between this device and a transmitter.

Parameters:

transmitter (SimulatedDevice) – The transmitter.

Return type:

Optional[DirectiveChannelRealization]

Returns:

The channel realization. None if no channel realization is available.

generate_output(operator_transmissions=None, cache=True, trigger_realization=None)[source]#

Generate the simulated device’s output.

Parameters:
  • operator_transmissions (List[Transmissions], optional) – List of operator transmissions from which to generate the output. If the operator_transmissions are not provided, the transmitter’s caches will be queried.

  • cache (bool, optional) – Cache the generated output at this device. 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:

SimulatedDeviceOutput

Returns: The device’s output.

Raises:

RuntimeError – If no operator_transmissions were provided and an operator has no cached transmission.

process_from_realization(impinging_signals, realization, trigger_realization=None, leaking_signal=None, cache=True)[source]#

Simulate a signal reception for this device model.

Parameters:
  • impinging_signals (DeviceInput | Signal | Sequence[Signal] | ChannelPropagation | Sequence[ChannelPropagation] | SimulatedDeviceOutput) – 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.

  • realization (SimulatedDeviceRealization) – Random realization of the device reception process.

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

  • leaking_signal (Signal, optional) – Signal leaking from transmit to receive chains. If not specified, no leakage is considered during signal reception.

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

Return type:

ProcessedSimulatedDeviceInput

Returns: The received information.

Raises:

ValueError – If device_signals is constructed improperly.

process_input(impinging_signals, cache=True, trigger_realization=None, snr=inf, snr_type=None, leaking_signal=None)[source]#

Process input signals at this device.

Parameters:
  • impinging_signals (DeviceInput | Signal | Sequence[Signal] | ChannelPropagation | Sequence[ChannelPropagation] | SimulatedDeviceOutput) – 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. If not specified, the device’s default snr_type will be assumed.

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

Return type:

ProcessedSimulatedDeviceInput

Returns: The processed device input.

realize_reception(snr=inf, snr_type=SNRType.PN0, cache=True)[source]#

Generate a random realization for receiving over the simulated device.

Parameters:
  • 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.

  • cache (bool, optional) – Cache the generated realization at this device. Enabled by default.

Return type:

SimulatedDeviceReceiveRealization

Returns: The generated realization.

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

Receive information at this device.

Parameters:
  • impinging_signals (DeviceInput | Signal | Sequence[Signal] | ChannelPropagation | Sequence[ChannelPropagation] | SimulatedDeviceOutput) – 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.

Return type:

SimulatedDeviceReception

Returns: The processed device input.

transmit(cache=True, trigger_realization=None)[source]#

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.

property antennas: SimulatedAntennas#

Antenna array model of the simulated device.

property attached: bool#

Attachment state of this device.

Returns:

True if the device is currently attached, False otherwise.

Return type:

bool

property carrier_frequency: float#

Central frequency of the device’s emissions in the RF-band.

Returns:

Carrier frequency in Hz.

Return type:

frequency (float)

Raises:

ValueError – On negative carrier frequencies.

property coupling: Coupling#

Model of the device’s antenna array mutual coupling behaviour.

Returns: Handle to the coupling model.

property input: ProcessedSimulatedDeviceInput | None#

Most recent input of this device.

Updated during receive() and receive_from_realization().

Returns:

The input information. None if receive() or receive_from_realization() has not been called yet.

property isolation: Isolation#

Model of the device’s transmit-receive isolation.

Returns: Handle to the isolation model.

property noise: Noise#

Model of the hardware noise.

Returns:

Handle to the noise model.

Return type:

Noise

property operator_separation: bool#

Separate operators during signal modeling.

Returns:

Enabled flag.

property output: SimulatedDeviceOutput | None#

Most recent output of this device.

Updated during transmit().

Returns:

The output information. None if transmit() has not been called yet.

property realization: SimulatedDeviceReceiveRealization | None#

Most recent random realization of a receive process.

Updated during realize_reception().

Returns:

The realization. None if realize_reception() has not been called yet.

rf_chain: RfChain#

Model of the device’s radio-frequency chain.

property sampling_rate: float#

Sampling rate at which the device’s analog-to-digital converters operate.

Returns:

Sampling rate in Hz. If no operator has been specified and the sampling rate was not set, a sampling rate of \(1\) Hz will be assumed by default.

Raises:

ValueError – If the sampling rate is not greater than zero.

property scenario: Scenario | None#

Scenario this device is attached to.

Returns:

Handle to the scenario this device is attached to. None if the device is considered floating.

serialized_attribute = {'adc', 'rf_chain'}#
property snr: float#

Signal to noise ratio at the receiver side.

Returns:

Linear ratio of signal to noise power.

property snr_type: SNRType#

Type of signal to noise ratio assumed by the device model.

property trigger_model: TriggerModel#

The device’s trigger model.

property velocity: ndarray#

Cartesian device velocity vector.

Returns:

Velocity vector.

Return type:

np.ndarray

Raises: