You send a voltage down a wire. The receiver measures it, but the measurement is off by a random amount: thermal noise in the electronics adds a little to every reading. How many bits can one such transmission carry?
If you could use any voltage you liked, the answer would be: as many as you want. Space the allowed voltages a kilometre apart and no noise will ever confuse them. What stops this is that large voltages cost power. So the real question has two numbers in it, the power you may use and the power of the noise, and the answer is one of the best-known formulas in the subject:
Only the ratio matters. It is called the signal-to-noise ratio, or SNR.
This note follows Chapter 9 of Cover & Thomas, Elements of Information Theory (second edition), referred to below as “the book”. It covers what Problem Set 5 and the practice Midterm 2 use: the capacity formula and why the Gaussian input is best, reducing a chain of Gaussian stages to one channel, several looks at the same input, parallel channels with water-filling, and the band-limited channel as a result. It leaves out the proof of the converse, channels with feedback (book Section 9.6) and water-filling over a noise spectrum. The coding theorem is explained only as an idea.
How to read this note
Almost every problem here is solved by the same three lines: write , bound by the entropy of a Gaussian with the same variance, and read off a signal-to-noise ratio. Homework and exam problems sit in the section they belong to, with the solution in a collapsed box. Try each one before opening it.
What we use from earlier notes
Every term below is used later. Each has a one-line reminder here.
- Channel capacity : the largest rate at which a channel can carry bits reliably. See channel capacity.
- Differential entropy : entropy for a continuous variable. For continuous variables , and it is still a true number of bits. See differential entropy.
- Entropy of a Gaussian. If then . See the normal distribution.
- The Gaussian has the largest entropy. Among all variables with variance , the Gaussian has the largest . So always. See the Gaussian has the largest entropy.
- Entropy of a Gaussian vector. If has components and covariance matrix , then , where is the determinant. This is also the largest entropy of any vector with covariance . See the multivariate normal.
- Shifting and scaling. and . See translation and scaling.
- Variances of independent variables add. If and are independent, , and . A sum of independent Gaussians is Gaussian.
- Power. The power of a zero-mean signal is , which is its variance.
- Chain rule for mutual information. .
- Concave function and Jensen’s inequality. is concave: the average of the logs is at most the log of the average. See Jensen’s inequality.
1. The Gaussian Channel
1.1 The model
Time is divided into uses of the channel. At use the sender puts in a real number and the receiver gets
The noise values are independent of each other and of the input. The number is the noise variance, also called the noise power.
The Gaussian is the right model for noise that is the sum of very many small independent disturbances, by the central limit theorem. It is also the worst case: among all noises of a given power, Gaussian noise gives the smallest capacity.
1.2 The power constraint
Without a limit on the input, the capacity is infinite, as the opening example showed. So every codeword must satisfy an average power constraint
For a single use this becomes a limit on the input distribution: .
2. Capacity
2.1 The formula
Definition. The capacity of the Gaussian channel with power constraint is
This is the definition of capacity from the discrete case, with one change: the maximum is only over input distributions that respect the power limit.
The calculation takes three steps. First, given , the only uncertainty in is the noise:
Second, the noise entropy is fixed, , so we must make as large as possible. Since and are independent and has mean zero,
Third, a variable whose mean square is at most has entropy at most that of a Gaussian with variance . Therefore
Equality needs to be Gaussian with variance . That happens when , because a sum of independent Gaussians is Gaussian.
Theorem. The capacity of the Gaussian channel with power constraint and noise variance is
and it is achieved by the input .
2.2 What it means
Why the Gaussian input is best. The channel fixes the noise. All the sender can do is make the output as unpredictable as possible, and for a given power the most unpredictable output is a Gaussian one. A Gaussian input is what produces it.
Only the ratio matters. Doubling both the power and the noise changes nothing. Measuring voltages in millivolts instead of volts changes nothing either.
The growth is logarithmic.
| Signal-to-noise ratio | Capacity |
|---|---|
| bits | |
| bit | |
| bits | |
| bits |
At high SNR each extra bit costs about four times the power. At low SNR the formula is almost a straight line, bits, so there doubling the power doubles the capacity.
2.3 The coding theorem
As in the discrete case, the number is the sharp limit for real codes: every rate below can be achieved with error probability going to zero, by codes whose codewords satisfy the power constraint, and no rate above can.
A picture makes this believable. Send a codeword of length . The noise moves it by a distance of about , so the received vector lies in a small ball of that radius around the codeword. Whatever was sent, the received vector has power about per coordinate, so it lies in a big ball of radius . Decoding works when the small balls do not overlap, and the number of small balls that fit into the big one is about the ratio of the volumes:
So about codewords can be told apart, which is bits per use.
3. Chains of Gaussian Stages
Many problems give a channel that is not simply . The signal is scaled, noise enters at several points, or the output of one channel is fed into another. As long as every stage is linear and every noise is Gaussian, the whole chain is equivalent to a single Gaussian channel. Three rules do all the work.
- Scaling. Multiplying a signal by multiplies its power by . This holds for the wanted signal and for any noise it already carries.
- Noises add. Independent Gaussian noises add to one Gaussian noise, and the noise powers add.
- Read off the ratio. Write the final output as . The capacity is , where the SNR is the signal power at the output divided by the total noise power at the output.
Rule 3 is the three steps of Section 2.1 again. If with Gaussian of variance and independent of , then , the output has mean square at most , and so
The figure shows the chain of the next problem. The first noise passes through the amplifier together with the signal, so it is amplified too. That is why amplifying cannot repair a noisy first stage.
Practice Midterm 2, Problem 2: Amplify and forward relaying (13 points)
Consider the following cascade of two Gaussian channels, where the output of the first channel is scaled and sent on the second channel:
The noise terms and are independent zero-mean Gaussian with variances and , respectively. The inputs and are required to satisfy average power constraints and , respectively, and is a design parameter.
(a) Find the scaling factor that allows the power constraint to be met with equality at the input of the second channel, assuming that .
(b) Find the information capacity of this relay channel, i.e., find
(c) Find .
Note: you may be able to answer this even if you did not find the answer to part (b).
Solution to Practice Midterm 2, Problem 2
(a) and are independent, so , and . Setting this equal to ,
(b) Carry everything to the output:
The total noise is Gaussian with variance and is independent of . By Rule 3, for a given and input power ,
with equality for a Gaussian .
It remains to choose and . The ratio grows with , so use the largest that the second power constraint allows, . Substituting,
This grows with (divide the top and bottom by : the denominator shrinks). So use full power, , which gives the of part (a), and
In terms of the two separate signal-to-noise ratios and , the ratio of the chain is .
(c) Divide the top and bottom of the ratio by :
This can be seen without part (b). With unlimited power on the second link its noise becomes negligible, so the receiver effectively sees . What remains is the first channel alone.
Remark. The ratio is smaller than both and , so the chain is worse than either link, and worse than . The relay here only amplifies, and it amplifies the first noise along with the signal. A relay that decodes the message and sends it afresh would reach , as in the cascade problem of the channel capacity note (cascades).
4. Several Looks and Side Information
4.1 Two looks at the same input
Suppose the receiver gets two noisy copies of the same input, and . The output is now a pair, and the three steps of Section 2.1 work with vectors:
The entropy of a pair with covariance matrix is at most , with equality when the pair is Gaussian. So the capacity is
where is the covariance matrix of the two outputs when and is that of the two noises.
There is also a shortcut that uses Section 3. The receiver can average its two looks,
which is a single Gaussian channel whose noise is the average of the two noises. In the next problem the two methods give the same answer, so the average keeps everything the two looks contain.
HW5 Problem 5: The two-look Gaussian channel (book Problem 9.2)
Consider the ordinary Gaussian channel with two correlated looks at , i.e., , where
with a power constraint on , and , where
Find the capacity for
(a) .
(b) .
(c) .
Solution to Problem 5
For any strictly between and . With independent of the noise, each output has variance , and the covariance of the two outputs is . So
The determinants are differences of squares:
Therefore
The Gaussian input is best because the outputs have covariance whatever the distribution of with power , and the Gaussian pair has the largest entropy for that covariance. Full power is best because grows with .
Check by averaging. The noise of the averaged look, , has variance . A single channel with that noise has SNR . The same.
(a) . The two noises are equal, , so . The second look is a copy of the first and adds nothing:
(b) . The noises are independent, and averaging halves the noise power:
(c) . The noises are opposite, , so . The receiver recovers exactly, and a real number carries as many bits as we like:
In cases (a) and (c) the matrix has determinant zero, so the determinant formula cannot be used directly. The direct arguments above are needed, and they agree with the limits of the general formula.
4.2 Knowing something extra at the receiver
In the next problem the channel multiplies the input by a random factor before the noise is added. The question is whether it helps the receiver to know . The answer does not need Gaussians at all, only the chain rule.
HW5 Problem 6: Fading channel (book Problem 9.5)
Consider an additive noise fading channel
where is additive noise, is a random variable representing fading, and and are independent of each other and of . Argue that knowledge of the fading factor improves capacity by showing
Solution to Problem 6
Expand with the chain rule in the two possible orders:
In the first line , because the fading is independent of the input. In the second line , because mutual information is never negative. Setting the two lines equal,
What it means. A receiver that knows has the pair to work with. It can always ignore , so it cannot do worse. The inequality holds for every input distribution, so it also holds after maximizing: the capacity with known at the receiver is at least the capacity without.
The gain is . It is positive because, once is seen, and are no longer independent. A small could mean a small input or a deep fade, and knowing which one it was says something about .
The same two lines prove the general rule: side information at the receiver that is independent of the input can only help.
5. Parallel Gaussian Channels and Water-Filling
5.1 The problem
Now the sender has Gaussian channels side by side,
with independent noises of different powers . There is one power budget for all of them:
Think of frequency bands, some noisier than others, fed by one transmitter. How should the power be divided? Putting it all in the best channel is not right, and neither is sharing it equally.
5.2 The solution
Let be the power given to channel . The three steps of Section 2.1, applied to the vector of outputs, give
The second line uses that the entropy of a vector is at most the sum of the entropies of its components, and that the noises are independent. The third is the single-channel bound for each . Both become equalities when the inputs are independent Gaussians, . So the channels can be used separately, and what remains is to choose the powers:
Adding a little power to channel raises its term at the rate
This depends only on the total level in that channel, noise plus signal. The lower the level, the more an extra unit of power is worth. So power should always go to the channel whose level is lowest, which raises the low levels until all the channels in use stand at one common level .
Theorem (water-filling). The capacity of parallel Gaussian channels with total power is
where means if is positive and otherwise, and the level is chosen so that .
What it means. Draw the noise levels as the bottom of a vessel and pour in an amount of water. The water settles at a flat level . The depth of water over channel is its power. Quiet channels get the most power. A channel whose noise is above the water level gets none and is not used at all.
How to find . Guess which channels are used, solve over those channels, and check the guess: every used channel must have , and every unused one .
For example, take two channels with noise levels .
- Budget . Guess that both are used: gives , which is above both noise levels, so the guess is right. The powers are and bits.
- Budget . Guessing both gives , which is below , so the guess is wrong. Only the quieter channel is used: , powers , and bits.
The noisier channel comes into use when the water reaches its level, that is, when .
5.3 Equal noise: spread the power evenly
Using one Gaussian channel times is the same as having parallel channels with equal noise. Water over a flat bottom has the same depth everywhere, so the power should be spread evenly over time. The next problem shows how much is lost by doing the opposite.
HW5 Problem 8: Impulse power (book Problem 9.17)
Consider the additive white Gaussian channel , where , and the input signal has average power constraint .
(a) Suppose we use all our power at time 1, i.e., and for . Find
where the maximization is over all distributions subject to the constraint and for .
(b) Find
and compare to part (a).
Solution to Problem 8
(a) Since for , those inputs are zero, and the outputs at those times are pure noise: . They are independent of and of , so they carry no information, and
with equality for . This is one use of a Gaussian channel with power . Per transmission,
(b) Let , so . By the parallel-channel bound of Section 5.2 and then Jensen’s inequality for the concave function ,
All three are equalities when the are independent . So the maximum is the capacity , reached by spreading the power evenly.
Comparison. Since ,
with equality only for . Spending everything at once is worse, and as grows the impulse scheme’s rate per transmission goes to zero. With and , the impulse carries bits in total, while even spreading carries bits.
The reason is the logarithm. Capacity grows more and more slowly with power, so the first unit of power in each transmission is worth more than the -th unit in one transmission.
5.4 Power with different prices
In the next problem, power costs a different amount in each channel, and the budget is on the total cost. The derivation is the same, with one change in the answer.
HW5 Problem 7: Parallel Gaussian channel (book Problem 9.8)
Consider two parallel channels , , where and are independent Gaussian random variables. We wish to allocate power to the two parallel channels. Let and be fixed. Consider a total cost constraint , where is the power allocated to the -th channel and is the cost per unit power in that channel. Thus and can be chosen subject to the cost constraint .
(a) For what value of does the channel stop acting like a single channel and start acting like a pair of channels?
(b) Evaluate the capacity and find , that achieve capacity for , , , and .
Solution to Problem 7
The allocation. We maximize subject to . Adding a little power to channel gains and costs per unit, so the gain per unit of cost is
At the optimum this is the same for every channel in use. So equals a common level , and
It is clearer in units of cost. The money spent on channel is
This is ordinary water-filling in which the bottom of the vessel is at height and the water is money, with total amount .
(a) The first money goes to the channel with the smaller . The other channel comes into use when the water level reaches its bottom, and by then the money spent is the difference of the two heights. So the channel acts like a pair of channels when
and like a single channel for smaller . If , both channels are used for every budget.
(b) The heights are and . The threshold of part (a) is , and is above it, so both channels are used:
The money spent is and , so the powers are
Check: . The capacity is
Channel 2 has less noise, but its power costs twice as much, so it ends up with less power than channel 1.
5.5 Correlated noise
If the noises of the parallel channels are correlated, with covariance matrix , the channels can no longer be treated one at a time. The fix is to change coordinates.
Result. Write , where the columns of are the eigenvectors of and is the diagonal matrix of its eigenvalues . Along the eigenvector directions the noise components are independent, with variances . The capacity is found by water-filling over the eigenvalues:
What it means. Correlated noise is strong in some directions and weak in others. The sender should aim its power at the directions in which the noise is weak. For two channels with , the directions are the sum , with noise , and the difference , with noise . When is close to the two noises are nearly equal, they nearly cancel in the difference of the two outputs, and almost all the power should be sent as a difference between the two inputs.
6. The Band-Limited Channel
Real channels are used in continuous time and pass only a band of frequencies of width hertz. The noise is described by its power per hertz, written .
Result. The capacity of a channel with bandwidth , signal power and noise power spectral density is
Where it comes from. A signal of bandwidth is completely described by samples per second (the sampling theorem). Each sample is one use of a Gaussian channel. The power is shared among samples per second, and each sample meets noise of variance , so the signal-to-noise ratio per sample is . Each sample therefore carries bits, and there are of them per second.
What it means. More bandwidth means more samples per second, but the same power is spread more thinly over them, and a wider band lets in more noise. The capacity still grows with , but it levels off:
With unlimited bandwidth the capacity is proportional to the power. That is the low-SNR straight line of Section 2.2 again, because every sample now has a tiny signal-to-noise ratio.
Summary
The channel. with independent of , and .
The three steps.
- .
- The output has mean square at most (signal power) (noise power).
- A Gaussian has the largest entropy for that mean square, so , with equality for a Gaussian input.
Formulas.
| Situation | Capacity |
|---|---|
| One Gaussian channel | bits per use |
| Scaled input, , noise variance | |
| Amplify and forward, link ratios , | |
| Two looks, noise correlation | |
| Vector output | |
| Parallel channels | with |
| Parallel channels, cost per unit power | the same with |
| Correlated noise | water-filling over the eigenvalues of |
| Band-limited | bits per second |
Facts to remember.
- Only the signal-to-noise ratio matters, and the Gaussian input is best.
- In a chain, carry the signal and every noise to the output. An amplifier scales the noise that is already there along with the signal.
- Independent looks add up: two looks with independent noise double the SNR. A look with the same noise adds nothing.
- Side information at the receiver that is independent of the input can only help.
- Water-filling: quiet channels get more power, and channels above the water level get none.
- With equal noise, spread the power evenly. Spending it all at once wastes it.