# OSTBC Encoder

Encode input message using orthogonal space-time block code (OSTBC)

MIMO

## Description

The OSTBC Encoder block encodes an input symbol sequence using orthogonal space-time block code (OSTBC). The block maps the input symbols block-wise and concatenates the output codeword matrices in the time domain. For more information, see the OSTBC Encoding Algorithms section of this help page.

### Dimension

The block supports time and spatial domains for OSTBC transmission. It also supports an optional dimension, over which the encoding calculation is independent. This dimension can be thought of as the frequency domain. The following illustration indicates the supported dimensions for the inputs and output of the OSTBC Encoder block.

The following table describes the variables.

VariableDescription
FThe additional dimension; typically the frequency domain. The encoding does not depend on this dimension.
TInput symbol sequence length for the time domain.
RSymbol rate of the code.
NNumber of transmit antennas.

Note

On the output, T/R is the symbol sequence length in time domain.

F can be any positive integer. N can be 2, 3 or 4, indicated by Number of transmit antennas. For N = 2, R must be 1. For N = 3 or 4, R can be 3/4 or 1/2, indicated by Rate. The time domain length T must be a multiple of the number of symbols in each codeword matrix. Specifically, for N = 2 or R = 1/2, T must be a multiple of 2 and when R = 3/4, T must be a multiple of 3.

To understand the block’s dimension propagation, refer to the following table.

DimensionInputOutput
F = 1Column vector2-D
F > 12-D3-D

### Data Type

For information about the data types each block port supports, see the Supported Data Type table on this page. The output signal inherits the data type from the input signal. For fixed-point signals, the complex conjugation may cause overflows which the fixed-point parameter Saturate on integer overflow must handle.

### Frames

The output signal inherits frame type from the input signal. A column vector input requires either frame-based or sample-based input; otherwise, the input must be sample-based.

### OSTBC Encoding Algorithms

The OSTBC Encoder block supports five different OSTBC encoding algorithms. Depending on the selection for Rate and Number of transmit antennas, the block implements one of the algorithms in the following table:

Transmit AntennaRateOSTBC Codeword Matrix
21

`$\left(\begin{array}{cc}{s}_{1}& {s}_{2}\\ -{s}_{2}^{*}& {s}_{1}^{*}\end{array}\right)$`

31/2

`$\left(\begin{array}{ccc}{s}_{1}& {s}_{2}& 0\\ -{s}_{2}^{*}& {s}_{1}^{*}& 0\\ 0& 0& {s}_{1}\\ 0& 0& -{s}_{2}^{*}\end{array}\right)$`

33/4

`$\left(\begin{array}{ccc}{s}_{1}& {s}_{2}& {s}_{3}\\ -{s}_{2}^{*}& {s}_{1}^{*}& 0\\ {s}_{3}^{*}& 0& -{s}_{1}^{*}\\ 0& {s}_{3}^{*}& -{s}_{2}^{*}\end{array}\right)$`

41/2

`$\left(\begin{array}{cccc}{s}_{1}& {s}_{2}& 0& 0\\ -{s}_{2}^{*}& {s}_{1}^{*}& 0& 0\\ 0& 0& {s}_{1}& {s}_{2}\\ 0& 0& -{s}_{2}^{*}& {s}_{1}^{*}\end{array}\right)$`

43/4

`$\left(\begin{array}{cccc}{s}_{1}& {s}_{2}& {s}_{3}& 0\\ -{s}_{2}^{*}& {s}_{1}^{*}& 0& {s}_{3}\\ {s}_{3}^{*}& 0& -{s}_{1}^{*}& {s}_{2}\\ 0& {s}_{3}^{*}& -{s}_{2}^{*}& -{s}_{1}\end{array}\right)$`

In each matrix, its (l, i) entry indicates the symbol transmitted from the ith antenna in the lth time slot of the block. The value of i can range from 1 to N (the number of transmit antennas). The value of l can range from 1 to the codeword block length.

## Parameters

Number of transmit antennas

Sets the number of antennas at the transmitter side. The block supports 2, 3, or 4 transmit antennas. The value defaults to 2.

Rate

Sets the symbol rate of the code. You can specify either 3/4 or 1/2. This field only appears when using more than 2 transmit antennas. This field defaults to $\frac{3}{4}$ for more than 2 transmit antennas. For 2 transmit antennas, there is no rate option and the rate defaults to 1.

Saturate on integer overflow

Sets the overflow mode for fixed-point calculations. Use this parameter to specify the method to be used if the magnitude of a fixed-point calculation result does not fit into the range of the data type and scaling that stores the result. For more information refer to Precision and Range.

## Supported Data Type

PortSupported Data Types
In
• Double-precision floating point

• Single-precision floating point

• Signed Fixed-point

Out
• Double-precision floating point

• Single-precision floating point

• Signed Fixed-point

## Examples

For an example of this block in use, see OSTBC Over 3x2 Rayleigh Fading Channel . The model shows the use of a rate ¾ OSTBC for 3 transmit and 2 receive antennas with BPSK modulation using independent fading links and AWGN

You can also see the block in the Concatenated OSTBC with TCM example by typing `commtcmostbc` at the MATLAB® command line.