Space-Time Block Codes

Inheritance diagram of hermespy.modem.precoding.space_time_block_coding.Alamouti, hermespy.modem.precoding.space_time_block_coding.Ganesan

Space-Time Block codes distribute communication symbols over multiple antennas and time slots. They can be configured by adding an instance to the SymbolPrecoding of a Modem exposed by the precoding attribute.

The following example shows how to configure a modem with a Alamouti precoder within a \(2\times 2\) MIMO communication link:

 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)
 6
 7rx_device = simulation.new_device(
 8    antennas=SimulatedUniformArray(SimulatedIdealAntenna(AntennaMode.RX), 0.1, (1,)),
 9)
10
11# Create a link between the two devices
12link = SimplexLink()
13link.connect(tx_device, rx_device)
14
15# Configure a single carrier waveform
16waveform = RootRaisedCosineWaveform(
17    oversampling_factor=4,
18    symbol_rate=1e6,
19    num_preamble_symbols=16,
20    num_data_symbols=32,
21    modulation_order=64,
22    roll_off=.9,
23    channel_estimation=SingleCarrierIdealChannelEstimation(simulation.scenario.channel(tx_device, rx_device), tx_device, rx_device),
24)
25link.waveform = waveform
26
27# Configure the precoding
28link.transmit_symbol_coding[0] = Alamouti()
29link.receive_symbol_coding[0] = Alamouti()

Note that Alamouti precoding requires channel state information at the receiver, therefore waveform’s channel_estimation attribute must be configured.

The following example shows how to configure a modem with a Ganesan precoder within a \(4\times 4\) MIMO communication link:

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

Note that Ganesan precoding requires channel state information at the receiver, therefore waveform’s channel_estimation attribute must be configured.

class Alamouti[source]

Bases: TransmitSymbolEncoder, ReceiveSymbolDecoder, Serializable

Alamouti precoder distributing symbols in space and time.

Support for 2 transmit antennas only. Refer to Alamouti[1] for further information.

decode_symbols(symbols, num_output_streams)[source]

Decode data for STBC with 2 antenna streams

Received signal with equal noise power is assumed, the decoded signal has same noise level as input.

Parameters:
  • symbols (StatedSymbols) – Input signal with \(N \times K\) symbol blocks.

  • num_output_streams (int) –

    Number of required streams resulting from the decoding process.

    Will be ignored by this decoder.

Return type:

StatedSymbols

Returns: Decoded data with size \(N \times K\)

encode_symbols(symbols, num_output_streams)[source]

Encode data into multiple antennas with space-time/frequency block codes.

Parameters:
  • symbols (StatedSymbols) – Input signal featuring \(K\) blocks.

  • num_output_streams (int) – Number of required streams resulting from the encoding process. Should always be 2 for Alamouti encoding.

Return type:

StatedSymbols

Returns: Encoded data with size \(2 \times K\) symbols

Raises:
  • ValueError – If more than a single symbol stream is provided.

  • ValueError – If the number of transmit antennas is not two.

  • ValueError – If the number of data symbols is not even.

num_receive_output_streams(num_input_streams)[source]

Get required number of output streams during decoding.

Parameters:

num_input_streams (int) – Number of input streams.

Return type:

int

Returns: The number of output streams. Negative numbers indicate infeasible configurations.

property num_receive_input_symbols: int

Required number of input streams during decoding.

property num_receive_output_symbols: int

Resulting number of output streams after decoding.

property num_transmit_input_symbols: int

Required number of input streams during encoding.

property num_transmit_output_symbols: int

Resulting number of output streams after encoding.

class Ganesan[source]

Bases: TransmitSymbolEncoder, ReceiveSymbolDecoder, Serializable

Girish Ganesan and Petre Stoica general precoder distributing symbols in space and time.

Supports 4 transmit antennas. Features a \(\frac{3}{4}\) symbol rate. Refer to Ganesan and Stoica[2] for further information.

decode_symbols(symbols, num_output_streams)[source]

Decode data for STBC with 4 antenna streams Note that Ganesan schema’s symbol rate is \(\frac{3}{4}\) so the decoding process decreases the number of blocks by \(\frac{3}{4}\).

Parameters:
  • symbols (StatedSymbols) – Input signal with \(4 \times N\) symbol blocks.

  • num_output_streams (int) – Number of required streams resulting from the decoding process. Will be ignored by this decoder.

Return type:

StatedSymbols

Returns:

Decoded data with size \(3 \times N\) Returned channel states are initialized with ones (np.ones is used).

encode_symbols(symbols, num_output_streams)[source]

Encode data into multiple antennas with space-time/frequency block codes. Note that Ganesan schema’s symbol rate is \(\frac{3}{4}\) so the encoding process increases the number of blocks by \(\frac{4}{3}\).

Parameters:
  • symbols (StatedSymbols) – Input signal featuring \(K\) blocks.

  • num_output_streams (int) – Number of required streams resulting from the encoding process. Should always be 4 for Ganesan encoding.

Return type:

StatedSymbols

Returns:

Encoded data with size \(\frac{4}{3} \times K\) symbol blocks. Thus num_blocks is changed to num_blocks / 3 * 4. Returned channel states are initialized with ones (np.ones is used).

Raises:
  • ValueError – If more than a single symbol stream is provided.

  • RuntimeError – If the number of transmit antennas is not four.

  • ValueError – If the number of data symbols blocks is not divisable by three.

num_receive_output_streams(num_input_streams)[source]

Get required number of output streams during decoding.

Parameters:

num_input_streams (int) – Number of input streams.

Return type:

int

Returns: The number of output streams. Negative numbers indicate infeasible configurations.

property num_receive_input_symbols: int

Required number of input streams during decoding.

property num_receive_output_symbols: int

Resulting number of output streams after decoding.

property num_transmit_input_symbols: int

Required number of input streams during encoding.

property num_transmit_output_symbols: int

Resulting number of output streams after encoding.