Radio-Frequency Block

Inheritance diagram of hermespy.simulation.rf.block.RFBlock, hermespy.simulation.rf.block.RFBlockRealization, hermespy.simulation.RFBlockPort, hermespy.simulation.rf.block.RFBlockPortType, hermespy.simulation.rf.block.DSPInputBlock, hermespy.simulation.rf.block.DSPOutputBlock
class RFBlock(noise_model=None, noise_level=None, seed=None)[source]

Bases: ABC, Generic[RFBRT], RandomNode, Serializable

Base class of a single block within physical models of radio-frequency chains.

Parameters:
  • noise_model (NoiseModel | None) – Assumed noise model of the block. If not specified, i.e. None, additive white Gaussian noise will be assumed.

  • noise_level (NoiseLevel | None) – Assumed noise level of the block. If not specified, i.e. None, no noise is assumed.

  • seed (int | None) – Seed with which to initialize the block’s random state.

propagate(realization, input, filter=True)[source]

Propagate the input signals through the radio-frequency block.

Parameters:
  • realization (TypeVar(RFBRT, bound= RFBlockRealization)) – Current state of the radio-frequency block.

  • inputs – List of input signals to propagate through the block.

  • filter (bool) – Whether to apply an anti-aliasing filter after propagation. Only relevant if the propagated signal is oversampled, i.e. oversampling_factor > 1. Enabled by default.

Raises:

ValueError – If the number of input signals does not match the num_input_ports.

Return type:

RFSignal

Returns: Propagated signal block containing num_output_ports individual signal streams.

abstract realize(bandwidth, oversampling_factor, carrier_frequency)[source]

Return the current state of the radio-frequency block.

Parameters:
  • bandwidth (float) – Bandwith of the proecessed signals in Hz.

  • oversampling_factor (int) – Oversampling factor of the modeling.

  • carrier_frequency (float) – Target carrier frequency of the modeled radio front-end in Hz.

Return type:

TypeVar(RFBRT, bound= RFBlockRealization)

Returns:

Current state of the radio-frequency block.

property noise_level: NoiseLevel[source]

This block’s assumed noise level.

property noise_model: NoiseModel[source]

This block’s assumed noise model.

abstract property num_input_ports: int[source]

Number of physical ports feeding into this radio-frequency block.

If the returned number is negative, the block can accept an arbitrary number of input ports.

abstract property num_output_ports: int[source]

Number of physical ports emerging from this radio-frequency block.

class DSPInputBlock(noise_model=None, noise_level=None, seed=None)[source]

Bases: RFBlock

Base class for radio-frequency blocks representing ports connecting transmitting DSP layers to the radio-frequency chain.

RF blocks inheriting from this class will automatically be represented as ports in the RF chain.

Parameters:
  • noise_model (NoiseModel | None) – Assumed noise model of the block. If not specified, i.e. None, additive white Gaussian noise will be assumed.

  • noise_level (NoiseLevel | None) – Assumed noise level of the block. If not specified, i.e. None, no noise is assumed.

  • seed (int | None) – Seed with which to initialize the block’s random state.

class DSPOutputBlock(noise_model=None, noise_level=None, seed=None)[source]

Bases: RFBlock

Base class for radio-frequency blocks representing ports connecting receiving DSP layers to the radio-frequency chain.

RF blocks inheriting from this class will automatically be represented as ports in the RF chain.

Parameters:
  • noise_model (NoiseModel | None) – Assumed noise model of the block. If not specified, i.e. None, additive white Gaussian noise will be assumed.

  • noise_level (NoiseLevel | None) – Assumed noise level of the block. If not specified, i.e. None, no noise is assumed.

  • seed (int | None) – Seed with which to initialize the block’s random state.

class RFBlockRealization(bandwidth, oversampling_factor, noise_realization)[source]

Bases: object

Base class for the realiztation of a radio-frequency block.

Parameters:
  • sampling_rate – Sampling rate of the block in Hz.

  • oversampling_factor (int) – Oversampling factor of the modeling in Hz.

  • noise_realization (NoiseRealization) – Noise realization of the block.

property bandwidth: float[source]

Bandwidth of the simulated signals in Hz.

property noise_realization: NoiseRealization[source]

Noise realization of the block.

property oversampling_factor: int[source]

Oversampling factor of the modeling in Hz.

property sampling_rate: float[source]

Sampling rate of the block in Hz.

Equivalent to the bandwidth multiplied by the oversampling factor.

class RFBlockPort(block, port_indices, port_type)[source]

Bases: Generic[RFBT]

Representation of a single port of a radio-frequency block.

Parameters:
  • block (TypeVar(RFBT, bound= RFBlock)) – Block instance this port belongs to.

  • port_indices (SupportsInt | Iterable[int]) – Integer indices of the represented port or sequence of ports.

  • port_type (RFBlockPortType) – Type of the port, either input or output.

property block: RFBT[source]

Reference to the block instance this port belongs to.

property num_ports: int[source]

Number of ports represented by this port instance.

property port_indices: list[int][source]

Indices of the represented port or sequence of ports.

property port_type: RFBlockPortType[source]

Type of the port, either input or output.

class RFBlockPortType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: SerializableEnum

Enumeration of the types of ports in a radio-frequency block.

IN = 0[source]

Input port of a radio-frequency block.

OUT = 1[source]

Output port of a radio-frequency block.

class RFBT[source]

Type variable for radio-frequency blocks.

alias of TypeVar(‘RFBT’, bound=RFBlock)

class RFBRT[source]

alias of TypeVar(‘RFBRT’, bound=RFBlockRealization)