comm.OSTBCCombiner
Combine inputs using orthogonal space-time block code
Description
The comm.OSTBCCombiner
System object™ combines the input signal (from all of the receive antennas) and the channel
estimate signal to extract the soft information of the symbols encoded by an orthogonal
space-time block code (OSTBC). The input channel estimate does not need to be constant and can
vary each time you run the object. The combining algorithm uses only the estimate for the
first symbol period per codeword block. A multiple-input multiple-output (MIMO) communications
system applies symbol demodulation or decoding after the OSTBC combining process.
To combine an input symbol sequence using OSTBC:
Create the
comm.OSTBCCombiner
object and set its properties.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
Syntax
Description
ostbccomb = comm.OSTBCCombiner
creates an OSTBC combiner System
object, ostbccomb
. This object combines the input signal (from all of
the receive antennas) with the channel estimate signal to extract the soft information of
the symbols encoded by an OSTBC.
ostbccomb = comm.OSTBCCombiner(N,M)
creates an OSTBC combiner
object with the NumTransmitAntennas
property set to N
and the NumReceiveAntennas
property set to M
.
ostbccomb = comm.OSTBCCombiner(___,
creates an OSTBC combiner object using any of the previous syntaxes and sets properties using one or more name-value arguments. For example,
Name
=Value
)SymbolRate=1/2
sets the symbol rate of the code to
1/2
.
Properties
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.
NumTransmitAntennas
— Number of transmit antennas
2 (default) | 3 | 4
Number of transmit antennas (N), specified as 2
,
3
, or 4
.
Data Types: double
SymbolRate
— Symbol rate of code
3/4
(default) | 1/2
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
NumReceiveAntennas
— Number of receive antennas
1
(default) | integer in range [1,8]
Number of receive antennas (M), specified as an integer in the range [1,8].
Data Types: double
Fixed-Point Properties
RoundingMethod
— Method for rounding of fixed-point numeric values
"Floor"
(default) | "Ceiling"
| "Convergent"
| "Nearest"
| "Simplest"
| "Zero"
Method for rounding of fixed-point numeric values, specified as
"Ceiling"
, "Convergent"
,
"Floor"
, "Nearest"
,
"Round"
, "Simplest"
, or
"Zero"
.
OverflowAction
— Action when fixed-point numeric values overflow
"Wrap"
(default) | "Saturate"
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.
ProductDataType
— Data type of product
"Full precision"
(default) | "Custom"
Data type of the product, specified as "Full precision"
or
"Custom"
.
CustomProductDataType
— Fixed-point data type of product
numerictype([],32,16)
(default) | scaled numerictype
object with signedness of Auto
Fixed-point data type of the product, specified as a scaled numerictype
(Fixed-Point Designer) object with a signedness of Auto.
Dependencies
To enable this property, set the ProductDataType
property to "Custom"
.
AccumulatorDataType
— Data type of accumulator
"Full precision"
(default) | "Same as product"
| "Custom"
Data type of the accumulator, specified as "Full precision"
,
"Same as product"
, or "Custom"
.
CustomAccumulatorDataType
— Fixed-point data type of accumulator
numerictype([],32,16)
(default) | scaled numerictype
object with signedness of Auto
Fixed-point data type of the accumulator, specified as a scaled numerictype
(Fixed-Point Designer) object with a signedness of Auto.
Dependencies
To enable this property, set the AccumulatorDataType
property to "Custom"
.
EnergyProductDataType
— Data type of energy product
"Full precision"
(default) | "Same as product"
| "Custom"
Data type of the energy product, specified as "Full precision"
,
"Same as product"
, or "Custom"
. This property
sets the data type of the complex product in the denominator to calculate the total
energy in the MIMO channel.
CustomEnergyProductDataType
— Fixed-point data type of energy product
numerictype([],32,16)
(default) | scaled numerictype
object with signedness of Auto
Fixed-point data type of the energy product, specified as a scaled numerictype
(Fixed-Point Designer) object with a signedness of Auto.
Dependencies
To enable this property, set the EnergyProductDataType
property to "Custom"
.
EnergyAccumulatorDataType
— Data type of energy accumulator
"Full precision"
(default) | "Same as energy product"
| "Same as accumulator"
| "Custom"
Data type of the energy accumulator, specified as "Full
precision"
, "Same as energy product"
, "Same as
accumulator"
, or "Custom"
. This property sets the data
type of the summation in the denominator to calculate the total energy in the MIMO
channel.
CustomEnergyAccumulatorDataType
— Fixed-point data type of energy accumulator
numerictype([],32,16)
(default) | scaled numerictype
object with signedness of Auto
Fixed-point data type of the energy accumulator, specified as a scaled numerictype
(Fixed-Point Designer) object with a signedness of Auto.
Dependencies
To enable this property, set the EnergyAccumulatorDataType
property to
"Custom"
.
DivisionDataType
— Data type of division
"Same as accumulator"
(default) | "Custom"
Data type of division, specified as "Same as accumulator"
or
"Custom"
. This property sets the data type at the output of the
division operation. The setting normalizes diversity combining by the total energy in
the MIMO channel.
CustomDivisionDataType
— Fixed-point data type of division
numerictype([],32,16)
(default) | scaled numerictype
object with signedness of Auto
Fixed-point data type of division, specified as a scaled numerictype
(Fixed-Point Designer) object with a signedness of Auto.
Dependencies
To enable this property, set the DivisionDataType
property to "Custom"
.
Usage
Syntax
Description
Input Arguments
X
— Received data
column vector | matrix | 3-D array
Received data, specified as a complex-valued column vector, matrix, or 3-D array of data type double, single, or signed fixed point with power-of-two slope and zero bias. For more information, see Input-to-Output Dimensions.
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
cest
— Channel estimate
matrix | 3-D array | 4-D array
Channel estimate, specified as a complex-valued matrix, 3-D array, or 4-D array of data type double, single, or signed fixed point with power-of-two slope and zero bias. The input channel estimate can remain constant or can vary during each codeword block transmission. The combining algorithm uses the estimate only for the first symbol period per codeword block.
If the received data is a T/
SymbolRate
-by-NumReceiveAntennas
matrix, the input channel estimate,cest
, must be a 3-D array of size T/SymbolRate
-by-NumTransmitAntennas
-by-NumReceiveAntennas
.If the received data is an F-by-T/
SymbolRate
-by-NumReceiveAntennas
3-D array,cest
must be a 4-D array of size F-by-T/SymbolRate
-by-NumTransmitAntennas
-by-NumReceiveAntennas
.
For more information, see Input-to-Output Dimensions.
Data Types: single
| double
| fi
Complex Number Support: Yes
Output Arguments
Y
— Output data
column vector | matrix
Output data, returned as a complex-valued column vector or matrix. When the input
X
has double or single precision, the output,
Y
, has the same data type as the input.
If
X
is a T/SymbolRate
-by-NumReceiveAntennas
matrix andcest
is a T/SymbolRate
-by-NumTransmitAntennas
-by-NumReceiveAntennas
3-D array, the extracted symbol data,Y
, is a column vector with T elements.If
X
is an F-by-T/SymbolRate
-by-NumReceiveAntennas
3-D array andcest
is an F-by-T/SymbolRate
-by-NumTransmitAntennas
-by-NumReceiveAntennas
4-D array,Y
is an F-by-T matrix.
For more information, see Input-to-Output Dimensions.
Data Types: single
| double
| 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)
Examples
Encode with OSTBC and Calculate Errors
Determine the bit error rate for a QPSK signal employing OSTBC encoding when transmitted through a 4-by-2 MIMO channel. This example assumes that the OSTBC encoder uses perfect channel estimation.
Define the system parameters.
numTx = 4; % Number of transmit antennas numRx = 2; % Number of receive antennas Rs = 1e6; % Sampling rate (Hz) tau = [0 2e-6]; % Path delays (sec) pdb = [0 -10]; % Average path gains (dB) maxDopp = 30; % Maximum Doppler shift (Hz) numBits = 12000; % Number of bits SNR = 6; % Signal-to-noise ratio (dB)
Set the random number generator to its default state to ensure repeatable results.
rng default
Create an OSTBC encoder and combiner pair, where the number of antennas is specified in the system parameters.
hOSTBCEnc = comm.OSTBCEncoder(... NumTransmitAntennas=numTx); hOSTBCComb = comm.OSTBCCombiner(... NumTransmitAntennas=numTx,... NumReceiveAntennas=numRx);
Create a flat 4-by-2 MIMO Channel System object, where the channel characteristics are set using name-value pairs. The path gains are made available to serve as a perfect channel estimate for the OSTBC combiner.
mimochan = comm.MIMOChannel(... SampleRate=Rs,... PathDelays=tau,... AveragePathGains=pdb,... MaximumDopplerShift=maxDopp,... SpatialCorrelationSpecification='None',... NumTransmitAntennas=numTx,... NumReceiveAntennas=numRx,... PathGainsOutputPort=true);
Generate a random sequence of bits.
data = randi([0 1],numBits,1);
Apply QPSK modulation.
modData = pskmod(data,4,InputType='bit');
Encode the modulated data using the OSTBC encoder object.
encData = hOSTBCEnc(modData);
Transmit the encoded data through the MIMO channel, and add white noise to it.
[chanOut,pathGains] = mimochan(encData); rxSignal = awgn(chanOut,SNR);
Sum the pathGains
array along the number of paths (second dimension) to form the channel estimate. Apply the squeeze
function to make its dimensions conform with those of rxSignal
.
chEst = squeeze(sum(pathGains,2));
Combine the received MIMO signal and its channel estimate using the OSTBC combiner object. Demodulate the combined signal.
combinedData = hOSTBCComb(rxSignal,chEst);
receivedData = pskdemod(combinedData,4,OutputType='bit');
Compute the number of bit errors and the bit error rate.
[numErrors,ber] = biterr(data,receivedData)
numErrors = 9
ber = 7.5000e-04
More About
Input-to-Output Dimensions
The OSTBC combiner supports time and spatial domains for OSTBC transmission and an optional dimension over which the combining calculation is independent. This illustration indicates the supported input dimensions and resulting output dimensions.
This table shows the supported input and output dimensions, which depend upon the values of F and M.
Values of F and M | Rx Input | cEst Input | Output |
---|---|---|---|
F = 1 and M = 1 | Column vector | 2-D | Column vector |
F = 1 and M > 1 | 2-D | 3-D | Column vector |
F > 1 and M = 1 | 2-D | 3-D | 2-D |
F > 1 and M > 1 | 3-D | 4-D | 2-D |
R — Symbol rate of the code, as specified by the
SymbolRate
property.For N = 2, R must be 1.
For N = 3 or 4, R can be 3/4 or 1/2.
N — Number of transmit antennas must be 2, 3, or 4, and is specified by the
NumTransmitAntennas
property.M — Number of receive antennas must be an integer in the range [1,8], and is specified by the
NumReceiveAntennas
property.T/R — Input symbol sequence length for the time domain. The time domain length T/R must be a multiple of the number of symbols in each codeword matrix.
For N = 2 or R = 1/2, T/R must be a multiple of 2.
For R = 3/4, T/R must be a multiple of 3.
T — Symbol sequence length in time domain for the output signal.
For N = 2, T is a multiple of 2.
For N = 3 or 4, T is a multiple of 4.
F — Additional dimension; typically the frequency domain. The combining calculation is independent of this dimension. F can be any positive integer.
Algorithms
OSTBC Combining Algorithm
The OSTBC combiner algorithm implements the five different OSTBC combining computation matrices shown in this table. The number of transmit antennas and the symbol rate determine the codeword matrix that the algorithm uses to combine the received signal.
Number of Transmit Antennas | Rate | Computational Algorithm per Codeword Block Length |
---|---|---|
2 | 1 |
|
3 | 1/2 |
|
3 | 3/4 |
|
4 | 1/2 |
|
4 | 3/4 |
|
represents the estimated kth symbol in the OSTBC codeword matrix.
hij represents the estimate for the channel from the ith transmit antenna and the jth receive antenna.
Values for i must be in the range [1,N], where N is the number of transmit antennas.
Values for j must be in the range [1,M], where M is the number of receive antennas.
rlj represents the lth symbol at the jth receive antenna per codeword block.
Values for l must be in the range [1,L], where L is the codeword block length.
represents the summation of channel power per link. Specifically,
Values for l must be in the range [1,L], where L is the codeword block length.
represents the summation of channel power per link. Specifically,
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
See System Objects in MATLAB Code Generation (MATLAB Coder).
Version History
Introduced in R2012a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)