Transmitting Modem#

Inheritance diagram of hermespy.modem.modem.TransmittingModem

Transmitting modems represent the digital signal processing operations performed within a communication system up to the point of digital-to-analog conversion.

After a TransmittingModem is added as a type of Transmitter to a Device, a call to Device.transmit will be delegated to TransmittingModem._transmit():

sequenceDiagram Device ->>+ TransmittingModem: _transmit() loop Frame Generation TransmittingModem->>+BitsSource: generate_bits() BitsSource->>-TransmittingModem: bits TransmittingModem->>+EncoderManager: encode() EncoderManager->>-TransmittingModem: encoded_bits TransmittingModem->>+CommunicationWaveform: map() CommunicationWaveform->>-TransmittingModem: Symbols TransmittingModem->>+SymbolPrecoding: encode() SymbolPrecoding->>-TransmittingModem: Symbols TransmittingModem->>+CommunicationWaveform: place() CommunicationWaveform->>-TransmittingModem: Symbols TransmittingModem->>+CommunicationWaveform: modulate() CommunicationWaveform->>-TransmittingModem: Signal TransmittingModem->>+TransmitStreamCoding: encode() TransmitStreamCoding->>-TransmittingModem: Signal end TransmittingModem ->>- Device: CommunicationTransmission

Initially, the TransmittingModem configured BitsSource will be queried for a sequence of data bits required to moulate a single frame. The specic number of bits depends several factors, primarily the Waveform configured by the respective waveform, the precodings and the forward error correction. The sequence of data bits is subseuently encoded for forward error correction by the EncoderManager configured by the respective encoder_manager. The resulting sequence of encoded bits is then mapped to a sequence of communication symbols by the CommunicationWaveform's map method. In the following step, the sequence of communication symbols is precoded by the SymbolPrecoding configured by the respective precoding property. Finally, a set of baseband streams is generate by placing and modulating the precoded communication symbols. The baseband streams are then encoded by the TransmitStreamCoding. This sequence of steps can be repeated multiple times to generate a sequence of communication frames, if required.

Note that, as a bare minimum, only the waveform has to be configured for a fully functional TransmittingModem. The following snippet shows how to configure a TransmittingModem with a RootRaisedCosineWaveform wavform implementing a CommunicationWaveform:

 1
 2# Initialize a new simulation considering a single device
 3simulation = Simulation()
 4device = simulation.new_device(carrier_frequency=1e10)
 5
 6# Configure the modem modeling the device's transmit DSP
 7tx_modem = TransmittingModem(device=device)
 8
 9# Configure the modem's waveform
10waveform = RootRaisedCosineWaveform(
11    oversampling_factor=4,
12    symbol_rate=1e6,
13    num_preamble_symbols=16,
14    num_data_symbols=32,
15    modulation_order=64,
16)
17tx_modem.waveform = waveform

This barebone configuration can be extended by adding additional components such as BitsSources, Bit Encoders, Symbol Precoders and Stream Precoders:

 1# Add a custom bits source to the modem
 2tx_modem.bits_source = RandomBitsSource(seed=42)
 3
 4# Add forward error correction encodings to the transmitted bit stream
 5tx_modem.encoder_manager.add_encoder(RepetitionEncoder(32, 3))
 6tx_modem.encoder_manager.add_encoder(BlockInterleaver(192, 32))
 7
 8# Add a custom symbol precoding to the modem
 9tx_modem.precoding[0] = DFT()
10
11# Add a custom stream precoding to the modem
12tx_modem.transmit_stream_coding[0] = ConventionalBeamformer()
class TransmittingModem(bits_source=None, device=None, *args, **kwargs)[source]#

Bases: BaseModem, Transmitter[CommunicationTransmission], Serializable

Representation of a wireless modem exclusively transmitting.

Parameters:

bits_source (BitsSource, optional) – Source configuration of communication bits transmitted by this modem. Bits are randomly generated by default.

_transmit(duration=-1.0)[source]#

Returns an array with the complex base-band samples of a waveform generator.

The signal may be distorted by RF impairments.

Parameters:

duration (float, optional) – Length of signal in seconds.

Return type:

CommunicationTransmission

Returns:

Transmitted information.

property bits_source: BitsSource#

Source configuration of communication transmitted by this modem.

Returns: A handle to the source configuration.

property device: Device | None#

Device this object is assigned to.

None if this object is currently considered floating / unassigned.

property num_transmit_ports: int#

Number of transmit antenna ports.

property receiving_device: Device | None#

Receiving device operated by the modem.

None if the device is unspecified.

property transmit_stream_coding: TransmitStreamCoding#

Stream MIMO coding configuration during signal transmission.

Returns: Handle to the coding configuration.

property transmitting_device: Device | None#

Tranmsitting device operated by the modem.

None if the device is unspecified.