Space-Time Block Codes¶
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, (2,)),
9)
10
11# Create a link between the two devices
12link = SimplexLink(tx_device, rx_device)
13
14# Configure a single carrier waveform
15waveform = RootRaisedCosineWaveform(
16 oversampling_factor=4,
17 symbol_rate=1e6,
18 num_preamble_symbols=16,
19 num_data_symbols=32,
20 modulation_order=64,
21 roll_off=.9,
22 channel_estimation=SingleCarrierIdealChannelEstimation(simulation.scenario.channel(tx_device, rx_device), tx_device, rx_device),
23)
24link.waveform = waveform
25
26# Configure the precoding
27link.precoding[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(tx_device, rx_device)
13
14# Configure a single carrier waveform
15waveform = RootRaisedCosineWaveform(
16 oversampling_factor=4,
17 symbol_rate=1e6,
18 num_preamble_symbols=16,
19 num_data_symbols=32,
20 modulation_order=64,
21 roll_off=.9,
22 channel_estimation=SingleCarrierIdealChannelEstimation(simulation.scenario.channel(tx_device, rx_device), tx_device, rx_device),
23)
24link.waveform = waveform
25
26# Configure the precoding
27link.precoding[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:
SymbolPrecoder
,Serializable
Alamouti precoder distributing symbols in space and time.
Support for 2 transmit antennas only. Refer to Alamouti[1] for further information.
- decode(symbols)[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.
- Return type:
Returns: Decoded data with size \(N \times K\)
- encode(symbols)[source]¶
Encode data into multiple antennas with space-time/frequency block codes.
- Parameters:
symbols (StatedSymbols) – Input signal featuring \(K\) blocks.
- Return type:
Returns: Encoded data with size \(2 \times K\) symbols
- Raises:
ValueError – If more than a single symbol stream is provided.
RuntimeError – If the number of transmit antennas is not two.
ValueError – If the number of data symbols is not even.
- class Ganesan[source]¶
Bases:
SymbolPrecoder
,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)[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.
- Return type:
- Returns:
Decoded data with size \(3 \times N\) Returned channel states are initialized with ones (np.ones is used).
- encode(symbols)[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.
- Return type:
- 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.
- 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: