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 TransmittingModemBase._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 TransmitSymbolCoding 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 transmit_signal_coding.
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,
TransmitSymbolEncoders,
ReceiveSymbolDecoders,
TransmitStreamEncoders or
ReceiveStreamDecoders:
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(selected_transmit_ports=None, carrier_frequency=None, bits_source=None, transmit_symbol_coding=None, transmit_signal_coding=None, encoding=None, waveform=None, frame_generator=None, seed=None)[source]¶
Bases:
TransmittingModemBase[CommunicationWaveform],Transmitter[CommunicationTransmission]Representation of a wireless modem exclusively transmitting.
- Parameters:
selected_transmit_ports (
Optional[Sequence[int]]) – Indices of antenna ports selected for transmission from the operatedDevice'santenna array. If not specified, all available ports will be considered.carrier_frequency (
float|None) – Carrier frequency of the transmitted communication signal.bits_source (
BitsSource|None) – Source configuration of communication bits transmitted by this modem. Bits are randomly generated by default.transmit_symbol_coding (
Union[TransmitSymbolCoding,Sequence[TransmitSymbolEncoder],None]) – Complex communication symbol coding configuration during transmission.transmit_signal_coding (
Union[TransmitSignalCoding,Sequence[TransmitStreamEncoder],None]) – Stream MIMO coding configuration during signal transmission.encoding (
Union[EncoderManager,Sequence[Encoder],None]) – Bit coding configuration.waveform (
CommunicationWaveform|None) – The waveform to be transmitted by this modem.frame_generator (
FrameGenerator|None) – Frame generator used to pack and unpack communication frames. If not specified, a stub generator will be assumed.seed (
int|None) – Seed used to initialize the pseudo-random number generator.
- classmethod Deserialize(process)[source]¶
Deserialize an object’s state.
Objects cannot be deserialized directly, instead a
Factorymust be instructed to carry out the deserialization process.- Parameters:
process (
DeserializationProcess) – The current stage of the deserialization process. This object is generated by theFactoryand provides an interface to deserialization methods supporting multiple backends.- Return type:
- Returns:
The deserialized object.
- serialize(process)[source]¶
Serialize this object’s state.
Objects cannot be serialized directly, instead a
Factorymust be instructed to carry out the serialization process.- Parameters:
process (
SerializationProcess) – The current stage of the serialization process. This object is generated by theFactoryand provides an interface to serialization methods supporting multiple backends.- Return type:
- class TransmittingModemBase(bits_source=None, transmit_symbol_coding=None, transmit_signal_coding=None, encoding=None, waveform=None, frame_generator=None, seed=None)[source]¶
Bases:
Generic[CWT],BaseModem[CWT]Base class of signal processing algorithms transmitting information.
- Parameters:
bits_source (
BitsSource|None) – Source configuration of communication bits transmitted by this modem. Bits are randomly generated by default.transmit_symbol_coding (
Union[TransmitSymbolCoding,Sequence[TransmitSymbolEncoder],None]) – Complex communication symbol coding configuration during transmission.transmit_signal_coding (
Union[TransmitSignalCoding,Sequence[TransmitStreamEncoder],None]) – Stream MIMO coding configuration during signal transmission.encoding (
Union[EncoderManager,Sequence[Encoder],None]) – Bit coding configuration.waveform (
Optional[TypeVar(CWT, bound= CommunicationWaveform)]) – The waveform to be transmitted by this modem.frame_generator (
FrameGenerator|None) – Frame generator used to pack and unpack communication frames. If not specified, a stub generator will be assumed.seed (
int|None) – Seed used to initialize the pseudo-random number generator.
- serialize(process)[source]¶
Serialize this object’s state.
Objects cannot be serialized directly, instead a
Factorymust be instructed to carry out the serialization process.- Parameters:
process (
SerializationProcess) – The current stage of the serialization process. This object is generated by theFactoryand provides an interface to serialization methods supporting multiple backends.- Return type:
- 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.