# scatteringchanmtx

Scattering channel matrix

## Syntax

## Description

returns
the channel matrix, `chmat`

= scatteringchanmtx(`txarraypos`

,`rxarraypos`

,`numscat`

)`chmat`

, for a MIMO channel
consisting of a transmitting array, a receiver array, and multiple
scatterers. The transmitting array is located at `txarraypos`

and
the receiving array at `rxarraypos`

. `numscat`

is
the number of point scatterers.

The function generates `numscat`

random
transmission directions and `numscat`

random receiving
directions. The channel matrix describes multipath propagation through
the `numscat`

paths. By assumption, all paths arrive
at the receiving array simultaneously implying that the channel is
frequency flat. Flat frequency means that the spectrum of the signal
is not changed. Path gains are derived from a zero-mean, unit-variance,
complex-valued normal distribution.

also specifies the angular range, `chmat`

= scatteringchanmtx(`txarraypos`

,`rxarraypos`

,`numscat`

,`angrange`

)`angrange`

, for transmitting
and receiving angles.

also specifies transmitting angles, `chmat`

= scatteringchanmtx(`txarraypos`

,`rxarraypos`

,`txang`

,`rxang`

,`G`

)`txang`

, receiving angles,
`rxang`

, and path gains, `G`

.

## Examples

### Compute Channel Matrix for Random Signal Paths

Compute the channel matrix for a 13-element transmitting array and a 15-element receiving array. Assume that there are 17 randomly located scatterers. The arrays are uniform linear arrays with 0.45-wavelength spacing. The receiving array is 300 wavelengths away from the transmitting array. Use the channel matrix to compute a propagated signal from the transmitting array to the receiving array.

Specify the arrays. Element spacing is in units of wavelength.

numtx = 13; sp = 0.45; txpos = (0:numtx-1)*sp; numrx = 15; rxpos = 300 + (0:numrx-1)*sp;

Specify the number of scatterers and create the channel matrix.

numscat = 17; chmat = scatteringchanmtx(txpos,rxpos,numscat);

Create a signal consisting of zeros and ones. Then, propagate the signal from the transmitter to receiver.

x = randi(2,[100 numtx])-1; y = x*chmat;

### Compute Channel Matrix for Constrained Random Signal Paths

Compute the channel matrix for a 4-by-4 transmitting URA array and a 5-by-5 receiving URA array. Assume that 17 scatterers are randomly located within a specified angular range. The element spacing for both arrays is one-half wavelength. The receive array is 500 wavelengths away from the transmitting array along the *x*-axis. Use the channel matrix to compute a propagated signal from the transmitting array to the receiving array. Constrain the angular span for the transmitting and receiving directions.

Specify the 4-by-4 transmitting array. Element spacing is in units of wavelength.

Nt = 4; sp = 0.5; ygridtx = (0:Nt-1)*sp - (Nt-1)/2*sp; zgridtx = (0:Nt-1)*sp - (Nt-1)/2*sp; [ytx,ztx] = meshgrid(ygridtx,zgridtx); txpos = [zeros(1,Nt*Nt);ytx(:).';ztx(:).'];

Specify the 5-by-5 receiving array. Element spacing is in units of wavelength.

Nr = 5; sp = 0.5; ygridrx = (0:Nr-1)*sp - (Nr-1)/2*sp; zgridrx = (0:Nr-1)*sp - (Nr-1)/2*sp; [yrx,zrx] = meshgrid(ygridrx,zgridrx); rxpos = [500*ones(1,Nr*Nr);yrx(:).';zrx(:).'];

Set the angular limits for transmitting and receiving.

The azimuth angle limits for the transmitter are −45° to +45°.

The azimuth angle limits for the receiver are −75° to +50°.

The elevation angle limits for the transmitter are −12° to +12°.

The elevation angle limits for the receiver are −30° to +30°.

angrange = [-45 45 -75 50; -12 12 -30 30];

Specify the number of scatterers and create the channel matrix.

numscat = 6; chmat = scatteringchanmtx(txpos,rxpos,numscat,angrange);

Create a 100-sample signal consisting of zeros and ones. Then, propagate the signal from the transmitting array to the receiving array.

x = randi(2,[100 Nt*Nt])-1; y = x*chmat;

### Compute Channel Matrix for Specified Signal Paths

Compute the channel matrix for a 4-by-4 transmitting URA array and a 5-by-5 receiving URA array. Assume there are 3 scatterers with known directions. The element spacings for both arrays is one-half wavelength. The receive array is 500 wavelengths away from the transmitting array along the *x*-axis. Use the channel matrix to compute a propagated signal from the transmitting array to the receiving array. Specify the transmitting and receiving directions. The number of directions determines the number of scatterers.

Specify the 4-by-4 transmitting array. Element spacing is in units of wavelength.

Nt = 4; sp = 0.5; ygridtx = (0:Nt-1)*sp - (Nt-1)/2*sp; zgridtx = (0:Nt-1)*sp - (Nt-1)/2*sp; [ytx,ztx] = meshgrid(ygridtx,zgridtx); txpos = [zeros(1,Nt*Nt);ytx(:).';ztx(:).'];

Specify the 5-by-5 receiving array. Element spacing is in units of wavelength.

Nr = 5; sp = 0.5; ygridrx = (0:Nr-1)*sp - (Nr-1)/2*sp; zgridrx = (0:Nr-1)*sp - (Nr-1)/2*sp; [yrx,zrx] = meshgrid(ygridrx,zgridrx); rxpos = [500*ones(1,Nr*Nr);yrx(:).';zrx(:).'];

Specify the transmitting and receiving angles and the gains. Then, create the channel matrix.

txang = [20 -10 40; 0 12 -12]; rxang = [70 -5.5 27.2; 4 1 -10]; gains = [1 1+1i 2-3*1i]; chmat = scatteringchanmtx(txpos,rxpos,txang,rxang,gains);

Create a 100-sample signal consisting of zeros and ones. Then, propagate the signal from the transmitting array to the receiving array.

x = randi(2,[100 Nt*Nt])-1; y = x*chmat;

## Input Arguments

`txarraypos`

— Positions of elements in transmitting array

real-valued 1-by-*N*_{t} row
vector | real-valued 2-by-*N*_{t}
matrix | real-valued 3-by-*N*_{t}
matrix

Transmitting array element positions, specified as a real-valued
1-by-*N _{t}* row vector,
2-by-

*N*

_{t}matrix, or 3-by-

*N*

_{t}matrix.

*N*

_{t}is the number of elements in the transmitting array.

`txarraypos`
| Dimensions of Transmitting Array |
---|---|

1-by-N_{t}
row vector | All transmitting array elements lie along the
y-axis. The vector specifies the
y-coordinates of the array
elements. |

2-by-N_{t}
matrix | All transmitting array elements lie in the
yz-plane. Each column of the
matrix specifies the y and
z coordinates of an array
element. |

3-by-N_{t}
matrix | The transmitting array elements have arbitrary 3-D
coordinates. Each column of the matrix specifies the
x, y, and
z coordinates of an array
element. |

Units are in wavelengths.

**Example: **`[-2.0,-1.0,0.0,1.0,2.0]`

**Data Types: **`double`

`rxarraypos`

— Positions of elements in receiving array

real-valued 1-by-*N*_{r} row
vector | real-valued 2-by-*N*_{r}
matrix | real-valued 3-by-*N*_{r}
matrix

Receiving array element positions, specified as a real-valued
1-by-*N*_{r} row vector,
2-by-vmatrix, or 3-by-*N*_{r} matrix.
*N*_{t} is the number of elements
in the transmitting array.

`rxarraypos`
| Dimensions of Receiving Array |
---|---|

1-by-N_{r}
row vector | All receiving array elements lie along the
y-axis. The vector specifies the
y-coordinates of the array
elements. |

2-by-N_{r}
matrix | All receiving array elements lie in the
yz-plane. Each column of the
matrix specifies the y and
z coordinates of an array
element. |

3-by-N_{r}
matrix | The receiving array elements have arbitrary 3-D
coordinates. Each column of the matrix specifies the
x, y, and
z coordinates of an array
element. |

Units are in wavelengths.

**Example: **`[-2.0,-1.0,0.0,1.0,2.0]`

**Data Types: **`double`

`numscat`

— Number of scatterers

positive integer

Number of scatters, specified as a positive integer

**Example: **`7`

**Data Types: **`double`

`angrange`

— Angular range of transmission and reception directions

real-valued 1-by-2 row vector | real-valued row 1-by-4 vector | real-valued 2-by-2 matrix | real-valued 2-by-4 matrix

Angular range of transmitting and receiving directions, specified as one of the values in this table.

Size of angrange | Angular range |
---|---|

real-valued 1-by-2 row vector | Specify the same azimuth angle direction span for the transmitting
and receiving arrays by using the minimum and maximum azimuth angles, ```
[az_min
az_max]
``` . The elevation direction span is –90°
to +90°. |

real-valued 1-by-4 row vector | Specify the azimuth angle direction range for the transmitting
and receiving arrays by using ```
[tx_az_min tx_az_max rx_az_min
rx_az_max]
``` . The first two values are the minimum and maximum
of the transmitting array directions. The last two values are the
minimum and maximum of the receiving array directions. The range of
the elevation angles is –90° to +90°. |

real-valued 2-by-2 matrix | Specify the same azimuth and elevation angle direction spans
for the transmitting and receiving arrays by using the minimum and
maximum azimuth and elevation angles, ```
[az_min az_max; el_min
el_max]
``` . |

real-valued 2-by-4 matrix | Specify separate azimuth and elevation angle direction spans
by using ```
[tx_az_min tx_az_max rx_az_min rx_az_max; tx_el_min
tx_el_max rx_el_min rx_el_max]
``` . The first and second columns
form the transmitting array direction span. The last two columns form
the receiving array direction span. |

Units are in degrees.

**Example: **`[-45 45 -30 30; -10 20 -5 30]`

**Data Types: **`double`

`txang`

— Transmission path angles

real-valued 1-by-*N*_{s} row
vector | real-valued 2-by-*N*_{s}
matrix

Transmission path angles, specified as a real-valued
1-by-*N*_{s} row vector or a
2-by-*N*_{s} matrix.
*N*_{s} is the number of scatterers
specified by `numscat`

.

When

`txang`

is a vector, each element specifies the azimuth angle of a path. The elevation angle of the path is zero degrees.When

`txang`

is a matrix, each column specifies the azimuth and elevation angles of a path in the form`[az;el]`

.

**Example: **`[4 -2; 0 35]`

**Data Types: **`double`

`rxang`

— Receiving path angles

real-valued 1-by-*N*_{s} row
vector | real-valued 2-by-*N*_{s}
matrix

Receiving path angles, specified as a real-valued
1-by-*N*_{s} row vector or a
2-by-*N*_{s} matrix.
*N*_{s} is the number of scatterers
specified by `numscat`

.

When

`rxang`

is a vector, each element specifies the azimuth angle of a path. The elevation angle of the path is zero degrees.When

`rxang`

is a matrix, each column specifies the azimuth and elevation angles of a path in the form`[az;el]`

.

**Example: **`[4 -2; 0 35]`

**Data Types: **`double`

`G`

— Path gains

1-by-*N*_{s} complex-valued
row vector

_{s}

Path gains, specified as a 1-by-*N _{s}* complex-valued
row vector.

*N*is the number of scatterers specified by

_{s}`numscat`

. The gains
apply to the corresponding paths. Units are dimensionless.**Example: **`exp(1i*pi/3)`

**Data Types: **`double`

**Complex Number Support: **Yes

## Output Arguments

`chmat`

— MIMO channel matrix

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

_{t}

_{r}

MIMO channel matrix, returned as an
*N*_{t}-by-*N*_{r}
complex-valued matrix. *N*_{t} is the
number of elements in the transmitting array.
*N*_{r} is the number of elements
in the receiving array.

**Data Types: **`double`

**Complex Number Support: **Yes

## References

[1] Heath, R. Jr. et al. “An Overview of Signal Processing Techniques for Millimeter Wave MIMO Systems”, arXiv.org:1512.03007 [cs.IT], 2015.

[2] Tse, D. and P. Viswanath, *Fundamentals of
Wireless Communications*, Cambridge: Cambridge University
Press, 2005.

[3] Paulraj, A. *Introduction to Space-Time Wireless
Communications*, Cambridge: Cambridge University Press,
2003.

## Extended Capabilities

### C/C++ Code Generation

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

Usage notes and limitations:

Does not support variable-size inputs.

## Version History

**Introduced in R2017a**

## MATLAB 명령

다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.

명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 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)