Single Carrier Decoding¶
Single carrier decoding combines individually demodulated symbols from multiple antenna streams into a single stream of symbols, given that they have been transmitted by a single-antenna device.
It can be configured by adding an instance to the
SymbolPrecoding
of a Modem
exposed by the precoding
attribute:
1# Create a new simulation featuring a 1x2 SIMO link between two devices
2simulation = Simulation()
3tx_device = simulation.new_device()
4rx_device = simulation.new_device(
5 antennas=SimulatedUniformArray(SimulatedIdealAntenna(AntennaMode.RX), 0.1, (2,)),
6)
7
8# Create a link between the two devices
9link = SimplexLink(tx_device, rx_device)
10
11# Configure a single carrier waveform
12waveform = RootRaisedCosineWaveform(
13 oversampling_factor=4,
14 symbol_rate=1e6,
15 num_preamble_symbols=16,
16 num_data_symbols=32,
17 modulation_order=64,
18 roll_off=.9,
19 channel_estimation=SingleCarrierIdealChannelEstimation(simulation.scenario.channel(tx_device, rx_device), tx_device, rx_device),
20)
21link.waveform = waveform
22
23# Configure the precoding
24link.precoding[0] = SingleCarrier()
Note that decoding requires channel state information at the receiver,
therefore waveform’s channel_estimation
attribute must be configured.
- class SingleCarrier[source]¶
Bases:
SymbolPrecoder
,Serializable
Single Carrier data symbol precoding step.
Takes a on-dimensional input stream and distributes the symbols to multiple output streams.
Single Carrier object initialization.
- decode(symbols)[source]¶
Decode a data stream before reception.
This operation may modify the number of streams as well as the number of data symbols per stream.
- Parameters:
symbols (Symbols) – Symbols to be decoded.
- Return type:
Returns: Decoded symbols.
- Raises:
NotImplementedError – If a decoding operation is not supported.
- encode(symbols)[source]¶
Encode a data stream before transmission.
This operation may modify the number of streams as well as the number of data symbols per stream.
- Parameters:
symbols (StatedSymbols) – Symbols to be encoded.
- Return type:
Returns: Encoded symbols.
- Raises:
NotImplementedError – If an encoding operation is not supported.