# omphybweights

Compute hybrid beamforming weights using orthogonal matching pursuit

## Syntax

## Description

`[`

returns the hybrid precoding weights `wpbb`

,`wprf`

] = omphybweights(`chanmat`

,`ns`

,`ntrf`

,`at`

)`wpbb`

and `wprf`

for the channel matrix `chanmat`

. The weights are computed using an
orthogonal matching pursuit algorithm. `ns`

is the number of independent
data streams propagated through the channel. `ntrf`

specifies the number
of RF chains in the transmit array. `at`

is a collection of possible
analog weights for `wprf`

. Together, the precoding weights approximate
the optimal full digital precoding weights of `chanmat`

.

## Examples

### Calculate Effective Channel Matrix

Assume an 8-by-4 MIMO system with four RF chains in a transmit array and two RF chains in a receive array. Show that the hybrid weights can support transmitting two data streams simultaneously.

Specify the positions of the transmitters and receivers in uniform line arrays.

txpos = (0:7)*0.5; rxpos = (0:3)*0.5;

Construct the channel matrix.

chanmat = scatteringchanmtx(txpos,rxpos,10);

Specify the number of transmit and receive RF chains.

ntrf = 4; nrrf = 2;

Specify two data streams.

ns = 2;

Set up the steering vector dictionaries for the transmitting and receiving arrays.

txdict = steervec(txpos,-90:90); rxdict = steervec(rxpos,-90:90);

Compute the precoding and combining weights.

[Fbb,Frf,Wbb,Wrf] = omphybweights(chanmat,ns,ntrf,txdict,nrrf,rxdict);

Calculate the effective channel matrix from the weights. A diagonal effective channel matrix indicates the capability of simultaneous transmission of multiple data streams.

chan_eff = Fbb*Frf*chanmat*Wrf*Wbb

`chan_eff = `*2×2 complex*
1.0000 - 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 1.0000 - 0.0000i

## Input Arguments

`chanmat`

— Channel response matrix

complex-valued
*N*_{t}-by-*N*_{r}
matrix | complex-valued
*L*-by-*N*_{t}-by-*N*_{r}
array

Channel response matrix, specified as an
*N*_{t}-by-*N*_{r}
matrix or a complex-valued
*L*-by-*N*_{t}-by-*N*_{r}
array where

*N*_{t}is the number of elements in the transmitting array.*N*_{r}is the number of elements in the receiving array.*L*is the number of subcarriers.

**Data Types: **`double`

| `single`

**Complex Number Support: **Yes

`ns`

— Number of independent data streams

positive integer

Number of independent data streams propagated through the channel, specified as a positive integer.

**Data Types: **`double`

| `single`

`ntrf`

— Number of RF chains in transmit array

positive integer

Number of RF chains in the transmit array, specified as a positive integer.

**Data Types: **`double`

| `single`

`at`

— Collection of possible analog transmit array weights

complex-valued *N*_{t}-by-*P*
matrix | complex-valued
*L*-by-*N*_{t}-by-*P*
array

Collection of possible analog weights for transmit array for
`wprf`

, specified as a complex-valued matrix or array.

When

`chanmat`

is an*N*_{t}-by-*N*_{r}matrix,`at`

is a complex-valued*N*_{t}-by-*P*matrix. Each column represents a vector of analog weights.When

`chanmat`

is an*L*-by-*N*_{t}-by-*N*_{r}array,`at`

is a complex-valued*L*-by-*N*_{t}-by-*P*array.`at`

has*L*pages and in each page is a matrix of*N*_{t}rows. Each column represents a vector of analog weights.*N*_{t}is the number of elements in the transmitting array.*N*_{r}is the number of elements in the receiving array.*L*is the number of subcarriers.*P*is the number of vectors of analog weights in the collection.

**Data Types: **`double`

| `single`

**Complex Number Support: **Yes

`nrrf`

— Number of RF chains in receive array

positive integer

Number of RF chains in the receive array, specified as a positive integer.

**Data Types: **`double`

| `single`

`ar`

— Collection of possible receive analog array weights

complex-valued *N*_{r}-by-*Q*
matrix | complex-valued
*N*_{r}-by-*Q*-by-*L*
array

Collection of possible analog weights for receive array `wcrf`

,
specified as a complex-valued matrix or array.

When

`chanmat`

is an*N*_{t}-by-*N*_{r}matrix,`ar`

is a complex-valued*N*_{r}-by-*Q*matrix. Each column represents a vector of analog weights.When

`chanmat`

is an*L*-by-*N*_{t}-by-*N*_{r}array,`ar`

is a complex-valued*N*_{r}-by-*Q*-by-*L*array. Each page is an*N*_{r}-by-*Q*matrix. Each column represents a vector of analog weights.*N*is the number of elements in the transmitting array._{t}*N*is the number of elements in the receiving array._{r}*L*is the number of subcarriers.*Q*is the number of vectors of analog weights in the collection.

**Data Types: **`double`

| `single`

**Complex Number Support: **Yes

`npow`

— Noise power

0 (default) | nonnegative scalar

Noise power in each receive antenna element, specified as a nonnegative scalar. All subcarriers have the same noise power.

**Data Types: **`double`

| `single`

## Output Arguments

`wpbb`

— Hybrid baseband precoding weights

complex-valued
*N*_{s}-by-*N*_{trf}
matrix | complex-valued
*L*-by-*N*_{s}-by-*N*_{trf}
array

Hybrid baseband precoding weights, returned as a complex-valued matrix or array.

When

`chanmat`

is an*N*_{t}-by-*N*_{r}matrix,`wpbb`

is a complex-valued*N*_{s}-by-*N*_{trf}matrix.When

`chanmat`

is an*L*-by-*N*_{t}-by-*N*_{r}array,`wpbb`

is a complex-valued*L*-by-*N*_{s}-by-*N*_{trf}array.*N*is the number of independent data streams specified by the_{s}`ns`

argument.*N*is the number of RF chains in the transmit array specified by the_{trf}`ntrf`

argument.*L*is the number of subcarriers.

`wprf`

— Hybrid RF precoding weights

complex-valued
*N*_{trf}-by-*N*_{t}
matrix | complex-valued
*L*-by-*N*_{trf}-by-*N*_{t}
array

Hybrid RF precoding weights, returned as a complex-valued matrix or array.

When

`chanmat`

is an*N*_{t}-by-*N*_{r}matrix,`wprf`

is a complex-valued*N*_{trf}-by-*N*_{t}matrix.When

`chanmat`

is an*L*-by-*N*_{t}-by-*N*_{r}array,`wprf`

is a complex-valued*L*-by-*N*_{trf}-by-*N*_{t}array.*N*is the number of elements in the transmitting array._{t}*N*is the number of RF chains in the transmit array specified by the_{trf}`ntrf`

argument.*L*is the number of subcarriers.

`wcbb`

— Hybrid baseband combining weights

complex-valued
*N*_{rrf}-by-*N*_{s}
matrix | complex-valued
*L*-by-*N*_{rrf}-by-*N*_{s}
array

Hybrid baseband combining weights, returned as a complex-valued matrix or array.

When

`chanmat`

is an*N*_{t}-by-*N*_{r}matrix,`wcbb`

is a complex-valued*N*_{rrf}-by-*N*_{s}matrix.When

`chanmat`

is an*L*-by-*N*_{t}-by-*N*_{r}array,`wcbb`

is a complex-valued*L*-by-*N*_{rrf}-by-*N*_{s}array.*N*_{s}is the number of independent data streams specified by the`ns`

argument.*N*_{rrf}is the number of RF chains in the receive array specified by the`nrrf`

argument.*L*is the number of subcarriers.

`wcrf`

— Hybrid RF combining weights

complex-valued
*N*_{r}-by-*N*_{rrf} | complex-valued
*L*-by-*N*_{r}-by-*N*_{rrf}
array

Hybrid RF combining weights, returned as a complex-valued matrix or array.

When

`chanmat`

is an*N*_{t}-by-*N*_{r}matrix,`wcrf`

is a complex-valued*N*_{r}-by-*N*_{rrf}matrix.When

`chanmat`

is an*L*-by-*N*_{t}-by-*N*_{r}array,`wcrf`

is a complex-valued*L*-by-*N*_{r}-by-*N*_{rrf}array.*N*is the number of elements in the transmitting array._{t}*N*is the number of RF chains in the receive array specified by the_{rrf}`nrrf`

argument.*L*is the number of subcarriers.

## More About

### Precoding Weights

## Algorithms

### Precision

This function supports single and double precision floating point values for input arguments. If the input arguments are single precision, the outputs are single precision. If the input arguments are double precision, the outputs are double precision.

## References

[1] Ayach, Omar El et al. "Spatially
Sparse Precoding in Millimeter Wave MIMO Systems" *IEEE Trans on Wireless
Communications*. Vol. 13, No. 3, March 2014.

## Extended Capabilities

### C/C++ Code Generation

Generate C and C++ code using MATLAB® Coder™.

## Version History

**Introduced in R2019b**

## See Also

`diagbfweights`

| `ompdecomp`

| `phased.ScatteringMIMOChannel`

| `scatteringchanmtx`

## Comando MATLAB

Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:

Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.

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)