Author: phy-东西
Reviewer: 时光

Problem Statement

  The water-filling theorem solves a fundamental problem in information theory: how should power be allocated across AWGN channels to maximize their total capacity? Suppose there are KK parallel AWGN channels with mutually independent noise processes and noise powers σ12,σ22,⋅⋅⋅,σK2σ^2_1,σ^2_2,··· ,σ^2_K. Given a total power budget PP, we seek the allocation that maximizes the combined capacity of the KK channels.

  As an optimization problem, this becomes:

max⁡p1,…,pK∑k=1Klog⁡2(1+pkσk2)s.t.∑k=1Kpk≤Ppk≥0,   k=1,2,…,K(1.1)\begin{aligned} &\max_{p_1, \dots , p_K}\sum^{K}_{k=1} \log_2 \left(1 + \frac{p_k}{\sigma ^2_k}\right)\\ \mathrm{s.t.}&\sum^K_{k = 1}p_k \le P\\ &p_k \ge 0, \ \ \ k = 1, 2, \dots , K\end{aligned} \tag{1.1}

An Intuitive Proof

  We begin with a relatively intuitive derivation.

  At first, it may seem best to assign all available power to the channel with the least noise. But a channel’s capacity is Ck=log⁡2(1+pk/σk2)C_k = \log_2 (1 + p_k / σ^2_k), so the marginal gain in capacity decreases as its allocated power increases. Each additional increment of power should therefore go to the channel that currently provides the largest marginal gain.

  Assume an initial allocation p1(0),p2(0),…,pK(0)p^{(0)}_1 ,p^{(0)}_2 , \dots ,p^{(0)}_K satisfying:

∑k=1Kpk(0)<P,   pk(0)≥0,   k=1,2,…,K\sum^K_{k = 1}p^{(0)}_k < P, \ \ \ p^{(0)}_{k} \ge 0, \ \ \ k = 1, 2, \dots , K

  Clearly, p1(0)=p2(0)=⋯=pK(0)=0p^{(0)}_1 = p^{(0)}_2 = \dots = p^{(0)}_K = 0 is a valid starting point. Let a positive quantity (P−∑k=1Kpk(0))≥δ>0(P - \sum^K_{k=1}p^{(0)}_k) \ge \delta > 0 be the next increment of power to allocate. Assigning δ\delta to channel kk increases its capacity by:

ΔC=log⁡2(1+pk(0)+δσk2)−log⁡2(1+pk(0)σk2)=log⁡2(1+δpk(0)+σk2)(2.1)\Delta C = \log_2 \left( 1 + \frac{p^{(0)}_k + \delta}{\sigma^2_k}\right) - \log_2 \left(1 + \frac{p^{(0)}_k}{\sigma^2_k}\right) = \log_2 \left(1 + \frac{\delta}{p^{(0)}_k + \sigma^2_k}\right)\tag{2.1}

  The increment should plainly go to the channel with the smallest pk(0)+σk2p^{(0)}_k + \sigma^2_k. If δ\delta is made arbitrarily small at each step, then once all the power has been allocated, every active channel will have the same value of σk2+pk\sigma^2_k +p_k. Channels whose noise power σk2σ^2_k exceeds this level receive no power. Thus:

pk=max⁡{0,p∗−σk2}(2.2)p_k = \max \{0, p^* - \sigma^2_k\}\tag{2.2}

  Here p⋆p^⋆ is chosen so that ∑k=1Kpk=P\sum^K_{k = 1}p_k = P.

  Consider any allocation for which pi+σi2>pj+σj2p_i + \sigma^2_i > p_j + \sigma^2_j, and set δ=min⁡{pi,(pi+σi2−pj−σj2)/2}\delta = \min\{p_i, (p_i + \sigma^2_i - p_j - \sigma^2_j)/2\}. Beginning with pi(0)=pi−δ,pj(0)=pjp^{(0)}_i = p_i - \delta, p^{(0)}_j = p_j, the argument above shows that assigning δ\delta to channel jj produces more capacity than assigning it to channel ii. After this reallocation, either pi+σi2=pj+σj2p_i + \sigma^2_i = p_j + \sigma^2_j or pi=0p_i = 0; in the latter case, σi2≥pj+σj2\sigma_i^2 \ge p_j + \sigma^2_j.

A Rigorous Proof

  Rewrite (1.1)(1.1) as:

min⁡p1,…,pK−∑k=1Kln⁡(1+pkσk2)s.t.∑k=1Kpk−P≤0−pk≤0,   k=1,2,…,K(3.1)\begin{aligned}&\min_{p_1, \dots, p_K} - \sum^K_{k = 1}\ln\left( 1 + \frac{p_k}{\sigma^2_k}\right)\\ \mathrm{s.t.}&\sum^K_{k = 1}p_k - P \le 0\\ &-p_k \le 0, \ \ \ k = 1, 2, \dots, K \end{aligned}\tag{3.1}

  Because −ln⁡(⋅)−\ln(·) is convex, the objective function is convex. The feasible region (p1,p2,…,pK)∈P(p_1, p_2, \dots, p_K)\in \mathcal{P} is also readily shown to be convex. This is therefore a convex optimization problem, whose Lagrangian is:

L(p1,p2,…,pK;λ0,λ1,…,λK)=−∑k=1Kln⁡(1+pkσk2)+λ0(∑k=1Kpk−P)−∑k=1Kλkpk(3.2)\begin{aligned} &\mathcal{L}(p_1, p_2, \dots, p_K; \lambda_0, \lambda_1, \dots, \lambda_K) \\ &= -\sum^K_{k = 1} \ln \left(1 + \frac{p_k}{\sigma^2_k}\right) + \lambda_0 \left( \sum^K_{k = 1} p_k - P \right) - \sum^K_{k = 1}\lambda_k p_k \end{aligned} \tag{3.2}

  Its KKT conditions are:

∂L∂pk=−1σk2+pk+λ0−λk=0,   k=1,2,…,K(3.3a)\frac{\partial \mathcal{L}}{\partial p_k} = - \frac{1}{\sigma^2_k + p_k} + \lambda_0 - \lambda_k = 0, \ \ \ k = 1, 2, \dots, K \tag{3.3a}

λk≥0,   k=0,1,2,…,K(3.3b)\lambda_k \ge 0, \ \ \ k = 0, 1, 2, \dots, K\tag{3.3b}

∑k=1Kpk≤P(3.3c)\sum^K_{k = 1}p_k \le P\tag{3.3c}

λ0(∑k=1Kpk−P)=0(3.3d)\lambda_0 \left( \sum^K_{k = 1}p_k - P\right) = 0\tag{3.3d}

pk≥0,   k=1,2,…,K(3.3e)p_k \ge 0, \ \ \ k = 1, 2, \dots, K\tag{3.3e}

λkpk=0,   k=1,2,…,K(3.3f)\lambda_k p_k = 0, \ \ \ k = 1, 2, \dots, K\tag{3.3f}

  Equation (3.3a)(3.3\mathrm{a}) can be rewritten as:

λk=λ0−1σk2+pkpk=1λ0−λk−σk2(3.4)\begin{aligned}\lambda_k = \lambda_0 - \frac{1}{\sigma^2_k + p_k} \\ p_k = \frac{1}{\lambda_0 - \lambda_k} - \sigma^2_k \end{aligned}\tag{3.4}

  If ∑k=1Kpk<P\sum^K_{k=1} p_k < P, then λ0=0,λk=−1/(σk2+pk)<0\lambda_0 = 0, \lambda_k = -1/(\sigma^2_k + p_k)<0, contradicting (3.3b)(3.3\mathrm{b}). Therefore ∑k=1Kpk=P\sum^K_{k = 1} p_k = P. Because each pkp_k is nonnegative, they cannot all be zero.

  Without loss of generality, suppose σ12≤σ22≤⋯≤σK2\sigma^2_1 \le \sigma^2_2 \le \dots \le \sigma^2_K. Because the pkp_k cannot all vanish, at least one pkp_k is positive, and its corresponding λkλ_k is zero. For channels with pk>0,λk=0p_k > 0, λ_k = 0:

pk=1λ0−λk−σk2=1λ0−σk2(3.5)p_k = \frac{1}{\lambda_0 - \lambda_k} - \sigma^2_k = \frac{1}{\lambda_0} - \sigma^2_k \tag{3.5}

  If λk>0λ_k > 0, then pk=0p_k = 0, and:

λk=λ0−1σk2+pk=λ0−1σk2(3.6)\lambda_k = \lambda_0 - \frac{1}{\sigma^2_k + p_k} = \lambda_0 - \frac{1}{\sigma^2_k} \tag{3.6}

  Because σk2σ^2_k increases monotonically:

λK≥λK−1≥⋯≥λk>0,   pK=pK−1=⋯=pk=0(3.7)\lambda_K \ge \lambda_{K-1} \ge \dots \ge \lambda_k > 0, \ \ \ p_K = p_{K-1} = \dots = p_k = 0 \tag{3.7}

  This is exactly the result obtained above. For active channels (λk=0λ_k = 0), the allocated powers pkp_k satisfy pk+σk2=1/λ0p_k +σ^2_k = 1/\lambda_0, a constant. Inactive channels receive no power (λk>0\lambda_k > 0; equation (3.7)(3.7) shows that if a channel with noise power σk\sigma_k is inactive, every channel with still greater noise power is inactive as well). Power is allocated in this way until the entire budget has been used. The quantity 1/λ01 / \lambda_0 is the p⋆p^⋆ introduced above.

Water-Filling for Continuous Parallel Channels

  For colored noise σ2(f)σ^2 (f) in a transform domain such as the frequency domain, the water-filling problem can be written:

min⁡p(f)−∫flfhlog⁡2(1+p(f)σ2(f))dfs.t.∫flfhp(f)df≤Pp(f)≥0,   fl≤f≤fh(4.1)\begin{aligned} &\min_{p(f)} - \int^{f_h}_{f_l}\log_2 \left( 1 + \frac{p(f)}{\sigma^2 (f)}\right) \mathrm{d}f\\ \mathrm{s.t.}&\int^{f_h}_{f_l}p(f)\mathrm{d}f\le P\\ &p(f)\ge 0, \ \ \ f_l \le f \le f_h \end{aligned}\tag{4.1}

  Construct the Lagrangian functional:

L[p(f),λ0,λ1(f)]=−∫flfhln⁡(1+p(f)σ2(f))df+λ0(∫flfhp(f)df)−λ1(f)p(f)(4.2)\begin{aligned}&\mathcal{L}[p(f),\lambda_0 ,\lambda_1 (f)] \\ = &-\int^{f_h}_{f_l} \ln \left( 1 + \frac{p(f)}{\sigma^2 (f)}\right) \mathrm{d}f + \lambda_0 \left( \int^{f_h}_{f_l} p(f)\mathrm{d}f\right) - \lambda_1 (f)p(f) \end{aligned}\tag{4.2}

  Its KKT conditions are:

δL=∫flfh(λ0−1σ2(f)+p(f))δp(f)df−λ1(f)δp(f)=0,   ∀δp(f)(4.3a)\delta \mathcal{L} = \int^{f_h}_{f_l}\left(\lambda_0 - \frac{1}{\sigma^2 (f) + p(f)}\right) \delta p(f)\mathrm{d}f - \lambda_1 (f)\delta p(f) = 0, \ \ \ \forall \delta p(f) \tag{4.3a}

∫flfhp(f)df≤P(4.3b)\int^{f_h}_{f_l} p(f)\mathrm{d}f \le P \tag{4.3b}

λ0≥0,λ1(f)≥0,   fl≤f≤fh(4.3c)\lambda_0 \ge 0,\lambda_1 (f)\ge 0, \ \ \ f_l\le f \le f_h \tag{4.3c}

λ0(∫flfhp(f)df−P)=0(4.3d)\lambda_0 \left(\int^{f_h}_{f_l} p(f) \mathrm{d}f-P\right) = 0 \tag{4.3d}

p(f)≥0,   fl≤f≤fh(4.3e)p(f)\ge 0, \ \ \ f_l\le f \le f_h \tag{4.3e}

λ1(f)p(f)=0,   fl≤f≤fh(4.3f)\lambda_1 (f)p(f) = 0, \ \ \ f_l\le f \le f_h \tag{4.3f}

  Here δp(f)\delta p(f) is the variation of p(f)p(f).

  When λ1(f)>0\lambda_1 (f) > 0, corresponding to an inactive channel above, p(f)≡0p(f) ≡ 0, and hence δp(f)=0\delta p(f) = 0. Conversely, when p(f)>0p(f) > 0, λ1(f)≡0\lambda_1 (f) ≡ 0, corresponding to an active channel, and p(f)=1λ−σ2(f)p(f) = \frac{1}{\lambda} − σ^2 (f). Therefore:

p(f)=max⁡{0,p∗−σ2(f)}(4.4)p(f) = \max \{0,p^* - \sigma^2 (f)\}\tag{4.4}

  where p⋆p^⋆ satisfies:

∫flfhp(f)df=P(4.5)\int^{f_h}_{f_l} p(f)\mathrm{d}f = P\tag{4.5}

  Why is this called “water-filling”? Picture σ2(f)σ^2 (f) as the bottom of a bowl and the available power as water poured into it. Wherever power is allocated, the sum of the noise and signal power rises to the same flat “water level.” Any noise floor above that level represents a channel that receives no power.

Illustration of water-filling