Spatial Multiplexing

Inheritance diagram of hermespy.modem.precoding.spatial_multiplexing.SpatialMultiplexing

Spatial multiplexing refers to processing orthogonal symbol streams in parallel. It is essentially a stub, instructing the modem to generate, and process, multiple frames to be transmitted in parallel. The number of frames is equal to the number of available antennas.

It configured by adding an instance to the SymbolPrecoding of a Modem exposed by the precoding attribute:

 1# Create a new simulation featuring a 2x2 MIMO link between two devices
 2simulation = Simulation()
 3tx_device = simulation.new_device(
 4    antennas=SimulatedUniformArray(SimulatedIdealAntenna(AntennaMode.TX), 0.1, (2,)),
 5)
 6rx_device = simulation.new_device(
 7    antennas=SimulatedUniformArray(SimulatedIdealAntenna(AntennaMode.RX), 0.1, (2,)),
 8)
 9
10# Create a link between the two devices
11link = SimplexLink(tx_device, rx_device)
12
13# Configure a single carrier waveform
14waveform = RootRaisedCosineWaveform(
15    oversampling_factor=4,
16    symbol_rate=1e6,
17    num_preamble_symbols=16,
18    num_data_symbols=32,
19    modulation_order=64,
20    roll_off=.9,
21)
22link.waveform = waveform
23
24# Configure the precoding
25link.precoding[0] = SpatialMultiplexing()
class SpatialMultiplexing[source]

Bases: SymbolPrecoder, Serializable

Spatial Multiplexing data symbol precoding step.

Takes a on-dimensional input stream and distributes the symbols to multiple output streams.

Spatial Multiplexing 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:

StatedSymbols

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:

StatedSymbols

Returns: Encoded symbols.

Raises:

NotImplementedError – If an encoding operation is not supported.

property num_input_streams: int

Required number of input symbol streams for encoding / number of resulting output streams after decoding.

Returns:

The number of symbol streams.

Return type:

int

property num_output_streams: int

Required number of input symbol streams for decoding / number of resulting output streams after encoding.

Returns:

The number of symbol streams.

Return type:

int

property rate: Fraction

Rate between input symbol slots and output symbol slots.

For example, a rate of one indicates that no symbols are getting added or removed during precoding.

Returns:

The precoding rate.

Return type:

Fraction