Duplex Modem¶
Duplex modems represent the signal processing chain of a communication device simulatenously transmitting and receiving information, implementing the digital signal processing before digital-to-analog conversion and after analog-to-digital conversion, respectively. They are a combination of a Transmitting Modem and a Receiving Modem.
After a DuplexModem
is added as a
type of Transmitter
to a Device
,
a call to Device.transmit
will be delegated
to TransmittingModem._transmit()
.
Similarly, after a DuplexModem
is added as a
type of Receiver
to a Device
,
a call to Device.receive
will be delegated
to ReceivingModem._receive()
1# Initialize a new simulation considering a single device
2simulation = Simulation()
3device = simulation.new_device(carrier_frequency=1e10)
4
5# Configure the link modeling the devices' transmit DSP
6modem = DuplexModem(device=device)
7
8# Configure the links's waveform
9waveform = RootRaisedCosineWaveform(
10 oversampling_factor=4,
11 symbol_rate=1e6,
12 num_preamble_symbols=16,
13 num_data_symbols=32,
14 modulation_order=64,
15)
16modem.waveform = waveform
For a detailed description of the transmit and receive routines, refer to the Transmitting Modem and a Receiving Modem of the base classes.
The barebone configuration can be extend by additional components such as
Custom Bit Sources
,
Synchronization
,
Stream Precoding
,
Channel Estimation
,
Symbol Precoding
,
Channel Equalization
and
Bit Encoders
:
1# Configure the links's waveform
2waveform = RootRaisedCosineWaveform(
3 oversampling_factor=4,
4 symbol_rate=1e6,
5 num_preamble_symbols=16,
6 num_data_symbols=32,
7 modulation_order=64,
8)
9modem.waveform = waveform
10
11# Configure a custom bits source for the modem
12modem.bits_source = RandomBitsSource(seed=42)
13
14# Configure the waveform's synchronization routine
15modem.waveform.synchronization = SingleCarrierCorrelationSynchronization()
16
17# Add a custom stream precoding to the modem
18modem.transmit_stream_coding[0] = ConventionalBeamformer()
19modem.receive_stream_coding[0] = ConventionalBeamformer()
20
21# Add a custom symbol precoding to the modem
22modem.precoding[0] = DFT()
23
24# Configure the waveform's channel estimation routine
25modem.waveform.channel_estimation = SingleCarrierLeastSquaresChannelEstimation()
26
27# Configure the waveform's channel equalization routine
28modem.waveform.channel_equalization = SingleCarrierZeroForcingChannelEqualization()
29
30# Add forward error correction encodings to the transmitted bit stream
31modem.encoder_manager.add_encoder(RepetitionEncoder(32, 3))
32modem.encoder_manager.add_encoder(BlockInterleaver(192, 32))
- class DuplexModem(*args, bits_source=None, selected_transmit_ports=None, selected_receive_ports=None, **kwargs)[source]¶
Bases:
TransmittingModem
,ReceivingModem
Representation of a wireless modem simultaneously transmitting and receiving.
- Parameters:
bits_source (BitsSource, optional) – Source configuration of communication bits transmitted by this modem. Bits are randomly generated by default.
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.selected_receive_ports (Sequence[int] | None) – Indices of antenna ports selected for reception from the operated
Device's
antenna array. If not specified, all available ports will be considered.*args – Modem initialization parameters. Refer to
TransmittingModem
andReceivingModem
for further details.**kwargs – Modem initialization parameters. Refer to
TransmittingModem
andReceivingModem
for further details.
- property device: Device | None¶
Device this object is assigned to.
None
if this object is currently considered floating / unassigned.
- property receiving_device: Device | None¶
Receiving device operated by the modem.
None
if the device is unspecified.
- property transmitting_device: Device | None¶
Tranmsitting device operated by the modem.
None
if the device is unspecified.
- yaml_tag: Optional[str] = 'Modem'¶
YAML serialization tag