Diagonalize MIMO channel

```
[wp,wc]
= diagbfweights(chanmat)
```

```
[wp,wc,P]
= diagbfweights(chanmat)
```

```
[wp,wc,P,G]
= diagbfweights(chanmat)
```

```
[wp,wc,P,G,C]
= diagbfweights(chanmat)
```

`[___] = diagbfweights(chanmat,Pt)`

`[___] = diagbfweights(chanmat,Pt Pn)`

`[___] = diagbfweights(chanmat,Pt Pn,powdistoption)`

`[___] = diagbfweights(`

also
specifies the noise distribution, `chanmat`

,`Pt`

`Pn`

,`powdistoption`

)`powdistoption`

,
across all transmitting antennas.

Compute the channel matrix for a 4-by-4 transmitting URA array and a 5-by-5 receiving URA array. Assume that three scatterers are randomly located located within a specified angular range. 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. Constrain the angular span for the transmitting and receiving arrays. Diagonalize the channel matrix to compute the precoding and combining weights.

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 three scatterers and create the channel matrix.

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

Diagonalize the channel matrix.

[wp,wc] = diagbfweights(chmat); z = wp*chmat*wc;

Show the first four diagonal elements.

z(1:4,1:4)

`ans = `*4×4 complex*
23.3713 + 0.0000i 0.0000 + 0.0000i -0.0000 - 0.0000i 0.0000 - 0.0000i
0.0000 + 0.0000i 10.7803 + 0.0000i 0.0000 + 0.0000i -0.0000 - 0.0000i
0.0000 - 0.0000i 0.0000 + 0.0000i 1.0566 + 0.0000i 0.0000 - 0.0000i
-0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 - 0.0000i 0.0000 - 0.0000i

Compute the channel matrix for a 4-by-4 transmitting URA array and a 5-by-5 receiving URA array. Assume that three scatterers are randomly located within a specified angular range. The element spacings for both arrays is one-half wavelength. The receive array is 500 wavelengths away along the *x*-axis. Diagonalize the channel matrix to compute the precoding and combining weights and the distributed power.

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 three scatterers and create the channel matrix.

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

Diagonalize the channel matrix and return the distributed power.

[wp,wc,P] = diagbfweights(chmat); disp(P.')

0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625

Compute the channel matrix for an 11-element transmitting ULA array and a 7-element receiving ULA array. Assume that there are five randomly located scatterers. The element spacings for both arrays is one-half wavelength. The receive array is 500 wavelengths away from the transmit array along the *x*-axis. Diagonalize the channel matrix to compute the precoding and combining weights, the distributed power, and the subchannel gains.

Specify the 11-element transmitting ULA array. Element spacing is in units of wavelength.

Nt = 11; sp = 0.5; txpos = (0:Nt-1)*sp - (Nt-1)/2*sp;

Specify the 7-element receiving ULA array. Element spacing is in units of wavelength.

Nr = 7; sp = 0.5; rxpos = (0:Nr-1)*sp - (Nr-1)/2*sp; numscat = 5; chmat = scatteringchanmtx(txpos,rxpos,numscat);

Diagonalize the channel matrix and return the subchannel gains.

[wp,wc,P,G] = diagbfweights(chmat); disp(G.')

221.8345 56.8443 47.6711 0.8143 0.0000 0.0000 0.0000

Compute the channel matrix for an 11-element transmitting ULA array and a 7-element receiving ULA array. Assume that there are five randomly located scatterers. 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. Create a channel matrix with two subcarriers. Diagonalize the channel matrix to compute the precoding and combining weights, the distributed power, the subchannel gains, and the channel capacity sum.

Specify the 11-element transmitting ULA array. Element spacing is in units of wavelength.

Nt = 11; sp = 0.5; txpos = (0:Nt-1)*sp - (Nt-1)/2*sp;

Specify the 7-element receiving ULA array. Element spacing is in units of wavelength.

Nr = 7; sp = 0.5; rxpos = (0:Nr-1)*sp - (Nr-1)/2*sp; numscat = 5;

Create two subcarriers.

chmat1 = scatteringchanmtx(txpos,rxpos,numscat); chmat2 = scatteringchanmtx(txpos,rxpos,numscat); chmat(1,:,:) = chmat1; chmat(2,:,:) = chmat2;

Diagonalize the channel matrix and return the subchannel gains.

[wp,wc,P,G,C] = diagbfweights(chmat); disp(C.')

9.5466 9.3605

Compute the channel matrix for an 11-element transmitting ULA array and a 7-element receiving ULA array. Specify the total transmitted power at 1000. Assume that there are five randomly located scatterers. 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. Create a channel matrix with two subcarriers. Diagonalize the channel matrix to compute the precoding and combining weights, the distributed power, the subchannel gains, and the channel capacity sum.

Specify the 11-element transmitting ULA array. Element spacing is in units of wavelength.

Nt = 11; sp = 0.5; txpos = (0:Nt-1)*sp - (Nt-1)/2*sp;

Specify the 7-element receiving ULA array. Element spacing is in units of wavelength.

Nr = 7; sp = 0.5; rxpos = (0:Nr-1)*sp - (Nr-1)/2*sp; numscat = 5;

Create two subcarriers.

chmat1 = scatteringchanmtx(txpos,rxpos,numscat); chmat2 = scatteringchanmtx(txpos,rxpos,numscat); chmat(1,:,:) = chmat1; chmat(2,:,:) = chmat2;

Diagonalize the channel matrix and return the distributed power for both subcarriers.

Pt = 1000.0; [wp,wc,P,G,C] = diagbfweights(chmat,Pt); disp(P.')

90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091 90.9091

Compute the channel matrix for an 11-element transmitting ULA array and a 7-element receiving ULA array. Specify the total transmitted power at 1000 and the transmitting antenna noise power at 100. Assume that there are five randomly located scatterers. The element spacings for both arrays is one-half wavelength. The receive array is 500 wavelengths away from the transmit array along the *x*-axis. Create a channel matrix with two subcarriers. Diagonalize the channel matrix to compute the precoding and combining weights, the distributed power, subchannel gains, and channel capacity sum.

Specify the 11-element transmitting ULA array. Element spacing is in units of wavelength.

Nt = 11; sp = 0.5; txpos = (0:Nt-1)*sp - (Nt-1)/2*sp;

Specify the 7-element receiving ULA array. Element spacing is in units of wavelength.

Nr = 7; sp = 0.5; rxpos = (0:Nr-1)*sp - (Nr-1)/2*sp; numscat = 5;

Create two subcarriers.

chmat1 = scatteringchanmtx(txpos,rxpos,numscat); chmat2 = scatteringchanmtx(txpos,rxpos,numscat); chmat(1,:,:) = chmat1; chmat(2,:,:) = chmat2;

Diagonalize the channel matrix and return the gain for both subcarriers.

Pt = 1000.0; Pn = 100.0; [wp,wc,P,G,C] = diagbfweights(chmat,Pt,Pn); disp(G.')

221.8345 119.7549 56.8443 115.9814 47.6711 24.9780 0.8143 5.1025 0.0000 0.0059 0.0000 0.0000 0.0000 0.0000

Compute the channel matrix for an 11-element transmitting ULA array and a 7-element receiving ULA array. Specify the total transmitted power at 1000 and the transmitting antenna noise power at 100. Specify the transmitted power distribution as `'Waterfill'`

. Assume that there are five randomly located scatterers. 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. Create a channel matrix with two subcarriers. Diagonalize the channel matrix to compute the precoding and combining weights, the distributed power, the subchannel gains, and the channel capacity sum.

Specify the 11-element transmitting ULA array. Element spacing is in units of wavelength.

Nt = 11; sp = 0.5; txpos = (0:Nt-1)*sp - (Nt-1)/2*sp;

Specify the 7-element receiving ULA array. Element spacing is in units of wavelength.

Nr = 7; sp = 0.5; rxpos = (0:Nr-1)*sp - (Nr-1)/2*sp; numscat = 5;

Create two subcarriers.

Diagonalize the channel matrix and return the gain for both subcarriers.

```
Pt = 1000.0;
Pn = 100.0;
[wp,wc,P,G,C] = diagbfweights(chmat,Pt,Pn,'Waterfill');
disp(G.')
```

221.8345 119.7549 56.8443 115.9814 47.6711 24.9780 0.8143 5.1025 0.0000 0.0059 0.0000 0.0000 0.0000 0.0000

`chanmat`

— Channel response matrixChannel response matrix, specified as an *N _{t}*-by-

*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.

When `chanmat`

is a MATLAB array
containing subcarriers, each subcarrier is decomposed independently
into subchannels.

**Data Types: **`double`

**Complex Number Support: **Yes

`Pt`

— Total transmit power`1`

(default) | positive scalar | Total transmit power, specified as a positive scalar or an *L*-element
vector of positive values. `Pt`

has the same units
as the total distributed power, `P`

.

**Data Types: **`double`

`Pn`

— Noise power`1`

(default) | positive scalarNoise power in each receiving antenna, specified as a positive
scalar. `Pn`

has the same units as the total transmit
power, `Pt`

.

**Data Types: **`double`

`powdistoption`

— Power distribution option`'Uniform'`

(default) | `'Waterfill'`

Power distribution option, specified as `'Uniform'`

or `'Waterfill'`

.
When `powdistoption`

is `'Uniform'`

,
the transmit power is evenly distributed across all *N _{t}* channels.
If

`powdistoption`

is `'Waterfill'`

,
the transmit power is distributed across the **Data Types: **`char`

`wp`

— Precoding weightsPrecoding weights, returned as an *N _{t}*-by-

**Data Types: **`double`

**Complex Number Support: **Yes

`wc`

— Combining weightsCombining weights, returned as an *N _{r}*-by-

**Data Types: **`double`

**Complex Number Support: **Yes

`P`

— Distributed power1-by-

Distributed power, returned as a vector or matrix.

When

`chanmat`

is an*N*-by-_{t}*N*real-valued matrix,_{r}`P`

is a 1-by-*N*real-valued row vector._{t}When

`chanmat`

is an*L*-by-*N*-by-_{t}*N*real-valued MATLAB array,_{r}`P`

is an*L*-by-*N*real-valued matrix._{t}

Power units are linear.

**Data Types: **`double`

`G`

— Subchannel gains1-by-

Subchannel gains, returned as a vector or matrix.

When

`chanmat`

is an*N*-by-_{t}*N*complex-valued matrix,_{r}`G`

is a 1-by-*N*complex-valued row vector._{g}When

`chanmat`

is an*L*-by-*N*-by-_{t}*N*complex-valued MATLAB array,_{r}`G`

is an*L*-by-*N*complex-valued matrix._{g}

*N _{g}* is the
smaller of

Gain units are linear.

**Data Types: **`double`

**Complex Number Support: **Yes

`C`

— Channel capacity sum for each subcarrierscalar |

Channel capacity sum for each subcarrier, returned as a scalar or vector.

When

`chanmat`

is an*N*-by-_{t}*N*complex-valued matrix,_{r}`C`

is a scalar.When

`chanmat`

is an*L*-by-*N*-by-_{t}*N*complex-valued MATLAB array,_{r}`C`

is an*L*-by-1 vector.

Capacity units are in bps/Hz.

**Data Types: **`double`

**Complex Number Support: **Yes

[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.

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

Usage notes and limitations:

Does not support variable-size inputs.

아래 MATLAB 명령에 해당하는 링크를 클릭하셨습니다.

이 명령을 MATLAB 명령 창에 입력해 실행하십시오. 웹 브라우저에서는 MATLAB 명령을 지원하지 않습니다.

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: .

Select web siteYou can also select a web site from the following list:

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

- América Latina (Español)
- Canada (English)
- United States (English)

- 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)