- DSP log - http://www.dsplog.com -

Understanding Shannon’s capacity equation

Posted By Krishna Sankar On June 15, 2008 @ 7:25 pm In Channel | 13 Comments

Let us try to understand the formula for Channel Capacity with an Average Power Limitation, described in Section 25 of the landmark paper A Mathematical Theory for Communication [1], by Mr. Claude Shannon [2].

Further, the following writeup is based on Section 12.5.1 from Fundamentals of Communication Systems by John G. Proakis, Masoud Salehi [3]

## Simple example with voltage levels

Let us consider that we have two voltage sources:
(a) Signal source which can generate voltages in the range $0$ to $V$ volts
(b) Noise source which can generate voltage levels $-\frac{V_n}{2}$ to $\frac{V_n}{2}$ volts.

Figure: Discrete voltage levels with noise

Let us now try to send information at discrete voltage levels $V_m$ from the source (thick black lines as shown in the above figure). It is intuitive to guess that the receiver will be able to decode the received symbol correctly if the received signal lies within $V_m \pm \frac{V_n}{2}$.

So, the number of different discrete voltages levels (information) which can be sent, while ensuring error free communication is the total voltage level divided by the noise voltage level i.e.
$M=\frac{V+V_n}{V_n}$.

## Extending to Gaussian channel

Let us transmit $k$ randomly chosen discrete voltage levels $V_m$ meeting the average power constraint,

$\frac{1}{k}\sum_{i=1}^{k}V_{m,i}^2 \le Ps$, where $P_s$ is the signal power.

The noise signal $V_n$ follows the Gaussian probability distribution function

$p(x) = \frac{1}{\sqrt{2\pi\sigma^2}}e^{\frac{-(x-\mu)^2}{2\sigma^2}$ with mean $\mu=0$ and variance $\sigma^2 = \frac{N_0}{2}$.

The noise power $P_n$ is,

$\frac{1}{k}\sum_{i=1}^{k}V_{n,i}^2 = Pn$.

The average total (signal plus noise) voltage over $k$symbols is $\fs1 \sqrt{\sum_{i=1}^k(V_{m,i}+V_{n,i})^2}$.

Similiarly, the average noise voltage over $k$symbols is $\fs1 \sqrt{\sum_{i=1}^kV_{n,i}^2}$.

Combining the above two equations, the number of different messages $M$ which can be ‘reliably transmitted‘ is,

$\begin{eqnarray}M&=&\sqrt{\frac{\sum_i(V_{m,i}+V_{n,i})^2}{\sum_iV_{n,i}^2}}\\&=&\sqrt{\frac{\sum_iV_{m,i}^2+\sum_iV_{n,i}^2+2\sum_iV_{m,i}V_{n,i}}{\sum_iV_{n,i}^2}}\\&=&\sqrt{\frac{\sum_iV_{m,i}^2+\sum_iV_{n,i}^2}{\sum_iV_{n,i}^2}}\\&=&\sqrt{\frac{Ps+P_n}{P_n}}\end{eqnarray}$.

Note:

1. The product of the signal and noise accumulated over many symbols average to zero, i.e

$\sum_iV_{m,i}V_{n,i}=0$.

2. Since the noise is Gaussian distributed, the noise can theoretically go from $-\infty$ to $+\infty$. So the above result cannot ensure zero probability of error in receiver, but only arbitrarily small probability of error.

## Converting to bits per transmission

With $M$ different messages, the number of bits which can be transmitted per transmission is,

$\begin{eqnarray}C&=&\log_2(M)\\&=&\frac{1}{2}\log_2\left(1+\frac{P_s}{P_n}\right)\end{eqnarray}$ bits/transmission.

## Bringing bandwidth into the equation

Let us assume that the available bandwidth is $B$.

Noise is of power spectral density $\frac{N_0}{2}$ spread over the bandwidth $B$. So the noise power in terms of power spectral density and bandwidth is,

$P_n = \int_{-B}^{+B}\frac{N_0}{2}df=N_0B$.

From our previous post on transmit pulse shaping filter [4] that minimum required bandwidth for transmitting symbols with symbol period $T$ is$+\frac{1}{2T}$Hz. Conversely, if the available bandwidth is $B$, the maximum symbol rate (transmissions per second) is $2B$.

Multiplying the equation for bits per transmission with transmission per second of $2B$ and replacing the noise term $P_n$, the capacity is

$\Huge\begin{eqnarray}C&=&B\log_2\left(1+\frac{P_s}{N_oB}\right)\end{eqnarray}$ bits/second.

Voila! This is Shannon’s equation for capacity of band limited additive white Gaussian noise channel with an average transmit power constraint.

## References

URL to article: http://www.dsplog.com/2008/06/15/shannon-gaussian-channel-capacity-equation/

URLs in this post:

[1] A Mathematical Theory for Communication: http://plan9.bell-labs.com/cm/ms/what/shannonday/shannon1948.pdf

[2] Mr. Claude Shannon: http://en.wikipedia.org/wiki/Claude_Shannon

[3] Fundamentals of Communication Systems by John G. Proakis, Masoud Salehi: http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2FFundamentals-Communication-Systems-John-Proakis%2Fdp%2F013147135X&tag=dl04-20&linkCode=ur2&camp=1789&creative=9325

[4] transmit pulse shaping filter: http://www.dsplog.com/2008/04/14/transmit-pulse-shape-nyquist-sinc-rectangular/