Transmitting Modem¶
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()
8device.transmitters.add(tx_modem)
9
10# Configure the modem's waveform
11waveform = RootRaisedCosineWaveform(
12 oversampling_factor=4,
13 symbol_rate=1e6,
14 num_preamble_symbols=16,
15 num_data_symbols=32,
16 modulation_order=64,
17)
This barebone configuration can be extended by adding additional components such as
BitsSources
, Bit Encoders
,
Symbol Precoders
and
Stream Precoders
:
1
2# Add a custom bits source to the modem
3tx_modem.bits_source = RandomBitsSource(seed=42)
4
5# Add forward error correction encodings to the transmitted bit stream
6tx_modem.encoder_manager.add_encoder(RepetitionEncoder(32, 3))
7tx_modem.encoder_manager.add_encoder(BlockInterleaver(192, 32))
8
9# Add a custom symbol precoding to the modem
10tx_modem.transmit_symbol_coding[0] = DFT()
11
12# Add a custom stream precoding to the modem
- class TransmittingModem(*args, selected_transmit_ports=None, **kwargs)[source]¶
Bases:
TransmittingModemBase
[CommunicationWaveform
],Transmitter
[CommunicationTransmission
],Serializable
Representation of a wireless modem exclusively transmitting.
- Parameters:
selected_transmit_ports (Sequence[int] | None) – Indices of antenna ports selected for transmission from the operated
Device's
antenna array. If not specified, all available ports will be considered.*args – Modem initialization parameters. Refer to
TransmittingModemBase
for further details.**kwargs – Modem initialization parameters. Refer to
TransmittingModemBase
for further details.
- class TransmittingModemBase(bits_source=None, *args, **kwargs)[source]¶
Bases:
Generic
[CWT
],BaseModem
[CWT
]Base class of signal processing algorithms transmitting information.
- Parameters:
bits_source (BitsSource, optional) – Source configuration of communication bits transmitted by this modem. Bits are randomly generated by default.
- property bits_source: BitsSource¶
Source configuration of communication transmitted by this modem.
Returns: A handle to the source configuration.
- property transmit_signal_coding: TransmitSignalCoding¶
Stream MIMO coding configuration during signal transmission.
- property transmit_symbol_coding: TransmitSymbolCoding¶
Complex communication symbol coding configuration during transmission.