Maximal Ratio Combining#

Inheritance diagram of hermespy.modem.precoding.ratio_combining.MaximumRatioCombining

Maximal Ratio Combining combines individually demodulated symbols from multiple antenna streams into a single stream of symbols in an SNR-optimal fashion, 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(tx_device, rx_device),
20)
21link.waveform = waveform
22
23# Configure the precoding
24link.precoding[0] = MaximumRatioCombining()

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

class MaximumRatioCombining[source]#

Bases: SymbolPrecoder, Serializable

Maximum ratio combining symbol decoding step.

Refer to Kahn[1] for further information.

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