Space-Time Block Coding

class SpaceTimeBlockCoding

Bases: hermespy.precoding.ratio_combining.MaximumRatioCombining, hermespy.core.factory.Serializable

A precoder distributing symbols in space and time.

Cool.

Space-Time Block Coding object initialization.

yaml_tag: str = 'STBC'

YAML serialization tag.

encode(symbol_stream)

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

Currently STBCs with 2 or 4 transmit antennas are supported, following 3GPP TS 36.211, Sec, 6.3.3.3)

Parameters

symbol_stream (np.array) – Input signal with K symbols.

Returns

Encoded data with size N_tx x K symbols

Return type

output (np.array)

decode(symbol_streams, stream_responses, stream_noises)

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
  • symbol_stream (np.ndarray) – An MxN matrix of data symbol streams feeding into the precoding step to be decoded. The first matrix dimension M represents the number of streams, the second dimension N the number of discrete data symbols.

  • channel_state (ChannelStateInformation) – The channel state estimates for each input symbol within input_stream.

  • stream_noises (np.ndarray) – The noise variances for each data symbol within symbol_stream. Identical dimensionality to input_stream.

Returns

A matrix of M’xN’ decoded data symbol streams.

The first matrix dimension M’ represents the number of streams after decoding, the second dimension N’ the number of discrete data symbols after decoding.

ChannelStateInformation:

Updated channel state information after decoding.

np.ndarray:

A matrix of M’xN’ data symbol noise estimations after this decoding step.

Return type

np.ndarray

Raises

NotImplementedError – If a decoding 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

classmethod to_yaml(representer, node)

Serialize a SpaceTimeBlockCoding precoder to YAML.

Parameters
  • representer (SafeRepresenter) – A handle to a representer used to generate valid YAML code. The representer gets passed down the serialization tree to each node.

  • node (SpaceTimeBlockCoding) – The SpaceTimeBlockCoding instance to be serialized.

Returns

The serialized YAML node.

Return type

Node

classmethod from_yaml(constructor, node)

Recall a new SpaceTimeBlockCoding precoder from YAML.

Parameters
  • constructor (SafeConstructor) – A handle to the constructor extracting the YAML information.

  • node (Node) – YAML node representing the SpaceTimeBlockCoding serialization.

Returns

Newly created SpaceTimeBlockCoding instance.

Return type

SpaceTimeBlockCoding