Main Content

comm.OSTBCEncoder

Encode input using orthogonal space-time block code

Description

The comm.OSTBCEncoder System object™ encodes an input symbol sequence using orthogonal space-time block code (OSTBC). This system object maps the input symbols block-wise and concatenates the output codeword matrices in the time domain. For more information, see

To encode an input symbol sequence using OSTBC:

  1. Create the comm.OSTBCEncoder object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

ostbcenc = comm.OSTBCEncoder creates an OSTBC encoder System object, ostbcenc. This object maps the input symbols block-wise and concatenates the output codeword matrices in the time domain.

example

ostbcenc = comm.OSTBCEncoder(N) creates an OSTBC encoder object with the NumTransmitAntennas property set to N.

ostbcenc = comm.OSTBCEncoder(___,Name=Value) creates an OSTBC encoder object using any of the previous syntaxes and sets properties using one or more name-value arguments. For example, SymbolRate=1/2 sets the symbol rate of the code to 1/2.

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Number of transmit antennas, specified as 2, 3, or 4.

Data Types: double

Symbol rate of the code, specified as 3/4 or 1/2.

Dependencies

To enable this property, set the NumTransmitAntennas property to a value greater than 2. When you set NumTransmitAntennas to 2, the symbol rate is 1.

Data Types: double

Fixed-Point Properties

Action when fixed-point numeric values overflow, specified as "Wrap" or "Saturate". This property specifies the action to be taken in the case of an overflow. Overflow occurs when the magnitude of a fixed-point calculation result does not fit into the range of the data type and scaling that stores the result.

Usage

Description

Y = ostbcenc(X) applies OSTBC encoding to the input data X, and returns the OSTBC-encoded data Y.

example

Input Arguments

expand all

Input data, specified as a complex-valued column vector or matrix of data type double, single, or signed fixed-point with power-of-two slope and zero bias. The input matrix can be of size F-by-T, where F is the additional dimension (typically the frequency domain) over which the encoding calculation is independent. Specify F as a positive integer. If you do not specify the additional dimension, specify the input as a T-by-1 column vector. The time domain length, T, of X must be a multiple of the number of symbols in each codeword matrix. Specifically, when you set the NumTransmitAntennas property to 2 or the SymbolRate property to 1/2, T must be a multiple of two, and when the SymbolRate property is 3/4, T must be a multiple of 3.

This object accepts variable-size inputs. After the object is locked, you can change the size of each input channel, but you cannot change the number of channels. For more information, see Variable-Size Signal Support with System Objects.

Data Types: single | double | fi
Complex Number Support: Yes

Output Arguments

expand all

Output data, returned as a matrix or 3-D array. For a time or spatial domain input of size T-by-1, the encoded output data, Y, is a (T/SymbolRate)-by-NumTransmitAntennas matrix. When the input matrix size is F-by-T, the output is an F-by-(T/SymbolRate)-by-NumTransmitAntennas array.

Data Types: double | single | fi

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
cloneCreate duplicate System object
isLockedDetermine if System object is in use
resetReset internal states of System object

Examples

collapse all

Generate random binary data, modulate using the BPSK modulation scheme, and encode the modulated data using OSTBC.

Generate an 8-by-1 vector of random binary data.

data = randi([0 1],8,1);

Create a BPSK modulator System object and modulate the data.

bpskMod = comm.BPSKModulator;
modData = bpskMod(data);

Create an OSTBC encoder object and encode the modulated signal. As the default number of transmit antennas is 2, you can see that encData is an 8-by-2 matrix.

ostbcEnc = comm.OSTBCEncoder;
encData = ostbcEnc(modData)
encData = 8×2 complex

  -1.0000 + 0.0000i  -1.0000 + 0.0000i
   1.0000 + 0.0000i  -1.0000 - 0.0000i
   1.0000 + 0.0000i  -1.0000 + 0.0000i
   1.0000 + 0.0000i   1.0000 + 0.0000i
  -1.0000 + 0.0000i   1.0000 + 0.0000i
  -1.0000 + 0.0000i  -1.0000 - 0.0000i
   1.0000 + 0.0000i  -1.0000 + 0.0000i
   1.0000 + 0.0000i   1.0000 + 0.0000i

More About

expand all

Algorithms

expand all

Extended Capabilities

Version History

Introduced in R2012a