---
title: MIMO and spatial multiplexing
heading: Multiple antennas at both ends, the channel matrix and its singular values as parallel spatial channels, MIMO capacity and the degrees of freedom min(nt, nr), receive and transmit beamforming gains, line-of-sight rank, and Alamouti's space–time code for transmit diversity
eyebrow: S8 · Lesson 46 · MIMO and spatial multiplexing
xp: 50
---

::: hook
Shannon capacity grows only logarithmically with power: doubling the power of a strong link adds one bit per second per hertz. Yet Wi-Fi and cellular data rates have grown far faster than their transmit powers. Most of that came from antennas. With several antennas at each end, a rich-scattering channel carries several independent streams in the same band at the same time, and capacity grows linearly with the number of antennas. How can two signals sharing a frequency be separated?
:::

::: play
- Capacity against SNR for one transmit and one receive antenna, for one transmitter and n receivers (receive beamforming), and for n × n MIMO in a channel whose n spatial paths are equally strong.
- Receive beamforming shifts the SISO curve left by 10 log n dB: an array gain, but the same slope.
- n × n MIMO multiplies the slope by n: at high SNR every extra 3 dB adds n bits per second per hertz instead of one. Raise n to see the degrees of freedom grow.
:::

```sim plot
view: graph
x: S = -10..30 dB
y: C = 0..45
slider: n = 1..8 = 4
plot: log(1 + 10^(S/10))/log(2) | samples: 300 | label: 1 × 1
plot: log(1 + n*10^(S/10))/log(2) | samples: 300 | color: ch3 | label: 1 × n, receive beamforming
plot: n*log(1 + 10^(S/10))/log(2) | samples: 300 | color: ch4 | label: n × n MIMO, equal paths
readout: MIMO advantage at 20 dB, bit/s/Hz = (n - 1)*log(101)/log(2) | digits: 3
```

::: predict
## A link moves from one antenna at each end to four at each end, in a rich-scattering room, at the same total transmit power and high SNR. Roughly how does its capacity change?

- [ ] It rises by about 2 bit/s/Hz, from the extra power collected
- [x] It roughly quadruples
- [ ] It rises by 6 dB worth, a factor of log 4
- [ ] It doesn't change; the power is the same

::: reveal
With rich scattering, the 4 × 4 channel matrix has four strong singular values, so it acts as four parallel channels. Splitting the power four ways costs only $\log_2 4$ = 2 bits per stream at high SNR, while the number of streams quadruples. The capacity's slope against SNR in decibels is four times steeper: the degrees of freedom are min(4, 4) = 4.
:::
:::

::: nameit
## The MIMO channel

With $n_t$ transmit and $n_r$ receive antennas on a flat-fading channel, the received vector is $y = Hx + w$, with H an $n_r \times n_t$ matrix of complex gains. Its singular value decomposition $H = U\Lambda V^*$ turns the channel into parallel scalar channels: precoding with V and receiving with $U^*$ gives $\tilde y_i = \lambda_i\tilde x_i + \tilde w_i$, one per nonzero singular value.

## Capacity

With total power P spread equally over the transmit antennas (no channel knowledge at the transmitter), the capacity is

$$C = \log_2\det\left(I + \frac{\text{SNR}}{n_t}HH^*\right) = \sum_i\log_2\left(1 + \frac{\text{SNR}}{n_t}\lambda_i^2\right)$$

If the transmitter knows H, it water-fills over the $\lambda_i^2$ (lesson 45). At high SNR, $C \approx \min(n_t, n_r)\log_2\text{SNR}$ + a constant: the **degrees of freedom** are the number of nonzero singular values, at most $\min(n_t, n_r)$. That needs a channel of full rank: rich scattering, or antennas spaced widely enough that the paths look different from each.

## Beamforming

- **Receive beamforming** with one transmitter and $n_r$ receive antennas (maximal-ratio combining) collects $n_r$ times the power: capacity $\log_2(1 + n_r\text{SNR})$ in a channel with equal gains, an array gain of $10\log n_r$ dB but one degree of freedom.
- **Transmit beamforming** does the same from the transmit side when the transmitter knows the channel.
- In **line of sight**, with antennas close together compared with the distance, H has rank one: the paths differ only in phase across the array, so there's beamforming gain but only one stream.

## Transmit diversity: Alamouti

Without channel knowledge at the transmitter, two transmit antennas can still give diversity. Alamouti's code sends $(x_1, x_2)$ in one symbol time and $(-x_2^*, x_1^*)$ in the next. The receiver combines its two samples linearly and gets each symbol with gain $|h_1|^2 + |h_2|^2$: diversity order two at full rate, at the cost of splitting the power between the antennas (no array gain). It's in Wi-Fi, LTE and many others.
:::

::: example
## A 2 × 2 channel is $H = \begin{pmatrix} 1 & 0.5 \\ 0.3 & 0.8 \end{pmatrix}$ at 20 dB SNR. What's its capacity with equal power, compared with a single-antenna link with gain 1?

::: solution
1. **Multiply H by its transpose.**
   $$HH^T = \begin{pmatrix} 1.25 & 0.7 \\ 0.7 & 0.73 \end{pmatrix}$$
2. **Its eigenvalues.** These are the squared singular values:
   $$\begin{aligned} \lambda_1^2 &= 1.737 \\ \lambda_2^2 &= 0.243 \end{aligned}$$
3. **Capacity.** With SNR/$n_t$ = 50 per antenna:
   $$\begin{aligned} C &= \log_2(1 + 50 \times 1.737) \\ &\quad + \log_2(1 + 50 \times 0.243) \\ &= 6.46 + 3.72 \\ &= 10.18\ \text{bit/s/Hz} \end{aligned}$$
4. **Single antenna.**
   $$\log_2 101 = 6.66\ \text{bit/s/Hz}$$
   The weaker spatial channel still adds 3.7 bits, more than half again.

**Answer:** 10.18 bit/s/Hz, against 6.66 for the single-antenna link.
:::
:::

::: example
## A base station with 4 receive antennas serves a one-antenna phone. Over the phone's SISO capacity at 0 dB, what does receive beamforming add? And what would a 4 × 4 link with four equal paths give?

::: solution
1. **SISO.**
   $$\log_2(1 + 1) = 1\ \text{bit/s/Hz}$$
2. **Receive beamforming.** With four receive antennas and equal gains:
   $$\log_2(1 + 4) = 2.32\ \text{bit/s/Hz}$$
   The array gain of 6 dB more than doubles the rate at this low SNR.
3. **A 4 × 4 link.** With four equal paths:
   $$4\log_2(1 + 1) = 4\ \text{bit/s/Hz}$$
4. **What counts when.** At low SNR, power gain is what counts; at high SNR, degrees of freedom are.

**Answer:** beamforming raises the rate from 1 to 2.32 bit/s/Hz, and the 4 × 4 link gives 4 bit/s/Hz.
:::
:::

::: example
## A 4 × 4 channel has four equal singular values with $\lambda_i^2 = 4$ (an orthogonal channel). What capacity does it reach at 20 dB SNR, compared with one antenna at each end?

::: solution
1. **Each stream's SNR.**
   $$\begin{aligned} \frac{\text{SNR}}{n_t}\lambda^2 &= \frac{100}{4} \times 4 \\ &= 100 \end{aligned}$$
2. **Capacity.**
   $$\begin{aligned} C &= 4\log_2(101) \\ &= 26.6\ \text{bit/s/Hz} \end{aligned}$$
3. **One antenna pair.**
   $$\log_2 101 = 6.66\ \text{bit/s/Hz}$$
4. **Where it comes from.** Four degrees of freedom give four times the capacity. Rich scattering makes this possible; line of sight would collapse H to rank one.

**Answer:** 26.6 bit/s/Hz, four times the 6.66 of one antenna pair.
:::
:::

::: check
given: a = 1.5 | 2 | 3; b = 0.2 | 0.5 | 1; S = 10 | 20
answer: log(1 + 10^(S/10)/2*a)/log(2) + log(1 + 10^(S/10)/2*b)/log(2)
tolerance: 0.5%

## A 2 × 2 channel's matrix $HH^*$ has eigenvalues {a} and {b}. With equal power on both transmit antennas and total SNR {S} dB, what's its capacity?

::: right
Right. $\sum\log_2(1 + (\text{SNR}/2)\lambda_i^2)$ = {answer} bit/s/Hz.
:::

::: misses
- [log(1 + 10^(S/10)*a)/log(2) + log(1 + 10^(S/10)*b)/log(2)] Split the power between the two transmit antennas: SNR/2 each.
- [log(1 + 10^(S/10)/2*(a + b))/log(2)] The eigenvalues are separate channels; their capacities add.
- [any] Not yet. Each eigenvalue is a parallel channel at SNR/$n_t$.
:::
:::

::: check
given: t = 2 | 4 | 8; r = 1 | 2 | 4 | 8
answer: (t + r - abs(t - r))/2
tolerance: 0

## A channel has {t} transmit and {r} receive antennas with rich scattering. How many degrees of freedom does it offer?

::: right
Right. min($n_t$, $n_r$) = {answer} parallel streams.
:::

::: misses
- [t*r] The number of streams is limited by the smaller array.
- [t + r] The number of streams is limited by the smaller array.
- [any] Not yet. The rank of H is at most the smaller dimension.
:::
:::

::: check
given: n = 2 | 4 | 8; S = 0 | 10 | 20
answer: log(1 + n*10^(S/10))/log(2)
tolerance: 0.5%

## One transmit antenna, {n} receive antennas with equal unit gains, SNR {S} dB per antenna. What's the capacity with receive beamforming?

::: right
Right. $\log_2(1 + n\,\text{SNR})$ = {answer} bit/s/Hz.
:::

::: misses
- [n*log(1 + 10^(S/10))/log(2)] One transmit antenna gives one stream; receive beamforming adds power, not streams.
- [log(1 + 10^(S/10))/log(2)] Combining the antennas collects n times the signal power.
- [any] Not yet. Maximal-ratio combining adds the antennas' SNRs.
:::
:::

::: check
given: n = 2 | 4; S = 20 | 30 | 40
answer: n*(S/10)/log(2)
tolerance: 2%

## At high SNR ({S} dB), approximately what capacity does an {n} × {n} channel with equal paths reach, ignoring the constant?

::: right
Right. $n\log_2\text{SNR}$ ≈ {answer} bit/s/Hz.
:::

::: misses
- [(S/10)/log(2)] That's one stream; there are n.
- [any] Not yet. Each degree of freedom adds $\log_2\text{SNR}$.
:::
:::

::: check
given: a = 0.3 | 0.6 | 1; b = 0.2 | 0.5 | 0.9
answer: a^2 + b^2
tolerance: 0.5%

## An Alamouti scheme's two transmit paths have gain magnitudes {a} and {b}. What effective power gain does each symbol see (before splitting the transmit power)?

::: right
Right. $|h_1|^2 + |h_2|^2$ = {answer}: both paths would have to fade together to lose the symbol.
:::

::: misses
- [(a + b)^2] The combiner adds powers, not amplitudes, since the transmitter can't align the phases.
- [a + b] Square the magnitudes.
- [any] Not yet. Alamouti combining gives $|h_1|^2 + |h_2|^2$.
:::
:::

::: check
kind: parts
given: n = 2 | 4 | 8; S = 10 | 20; l = 1 | 4

## An {n} × {n} channel has all its squared singular values equal to {l}, with equal power on each transmit antenna at {S} dB SNR.

::: part
answer: n*log(1 + 10^(S/10)*l/n)/log(2)
unit: bits
tolerance: 0.5%

### What is its capacity per hertz?

::: misses
- [any] $\sum\log_2(1 + \frac{\text{SNR}}{n_t}\lambda^2)$.
:::
:::

::: part
answer: n*log(1 + 10^(S/10)*l/n)/log(2)/(log(1 + 10^(S/10))/log(2))
tolerance: 0.5%

### How many times a single-antenna link's capacity at the same SNR is that?

::: misses
- [any] Divide by $\log_2(1 + \text{SNR})$.
:::
:::
:::

::: check
kind: derivation
vars: a = 0.01..10, b = 0.01..10, S = 1..10000, n = 1..16

## A 2 × 2 channel's $HH^*$ has eigenvalues a and b; SNR is S (linear); separately, one transmitter reaches n receive antennas with unit gains.

::: step
answer: log(1 + S*a/2)/log(2) + log(1 + S*b/2)/log(2)

### What is the 2 × 2 capacity with equal power?
:::

::: step
answer: log(1 + n*S)/log(2)

### What does receive beamforming give the single transmitter?
:::

::: right
Right. Beamforming adds power, a logarithmic gain; spatial multiplexing adds streams, a linear one.
:::
:::

::: explain
## Why does MIMO capacity grow linearly with the number of antennas when more power only adds logarithmically?

::: model
Capacity grows as the logarithm of SNR because power has diminishing returns within a single channel: each doubling buys one more bit per symbol. MIMO doesn't add power; it adds channels. When the paths between the arrays differ enough, the channel matrix has several strong singular values, each a separate spatial channel that a receiver can isolate by combining its antennas with the right weights, just as it would separate equations in a system of linear equations. Splitting a fixed power across n such channels costs only a logarithmic amount on each, while the number of channels multiplies the total. So at high SNR the capacity is about n times that of one antenna pair. The catch is the rank: without rich scattering, as in line of sight with closely spaced antennas, the matrix is nearly rank one and only beamforming gain remains.
:::
:::

::: practice

::: check
given: a = 0.1..5; b = 0.05..3; S = 0..30
answer: log(1 + 10^(S/10)/2*a)/log(2) + log(1 + 10^(S/10)/2*b)/log(2)
tolerance: 0.5%

## 2 × 2 capacity: eigenvalues {a}, {b}, SNR {S} dB?

::: misses
- [any] $\sum\log_2(1 + (\text{SNR}/2)\lambda_i^2)$.
:::
:::

::: check
given: n = 2..16 int; S = -10..30
answer: log(1 + n*10^(S/10))/log(2)
tolerance: 0.5%

## Receive beamforming: n = {n}, SNR {S} dB?

::: misses
- [any] $\log_2(1 + n\,\text{SNR})$.
:::
:::
:::
