Author: phy-东西
Reviewer: 时光

Problem Statement

  The water-filling theorem solves a fundamental problem in information theory: how to allocate power among AWGN channels so as to maximize total capacity. Suppose there are KK parallel AWGN channels with mutually independent noise powers σ12,σ22,,σK2σ^2_1,σ^2_2,··· ,σ^2_K. Given a total power constraint PP, find the allocation that maximizes the combined capacity of the KK channels.

  Written as an optimization problem:

maxp1,,pKk=1Klog2(1+pkσk2)s.t.k=1KpkPpk0,   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

  This section gives a derivation that is comparatively easy to understand.

  It may seem sufficient to assign all available power to the best channel—the one with the least noise. But channel capacity is Ck=log2(1+pk/σk2)C_k = \log_2 (1 + p_k / σ^2_k), whose rate of increase falls as power rises. This suggests that each new increment of power should go to whichever channel currently offers the greatest increase in capacity.

  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 initialization. Let a positive quantity (Pk=1Kpk(0))δ>0(P - \sum^K_{k=1}p^{(0)}_k) \ge \delta > 0 represent the next increment of power to allocate. If the amount δ\delta is assigned to channel kk, its capacity increases by:

ΔC=log2(1+pk(0)+δσk2)log2(1+pk(0)σk2)=log2(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 power should plainly go to the channel with the smallest pk(0)+σk2p^{(0)}_k + \sigma^2_k. If δ\delta is made arbitrarily small at every step, then once all the power has been allocated, the active channels will share a constant value of σk2+pk\sigma^2_k +p_k. The poorer channels, whose noise power σk2σ^2_k exceeds that constant, receive no power. Thus:

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

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

  For any allocation in which pi+σi2>pj+σj2p_i + \sigma^2_i > p_j + \sigma^2_j, set δ=min{pi,(pi+σi2pjσj2)/2}\delta = \min\{p_i, (p_i + \sigma^2_i - p_j - \sigma^2_j)/2\}. Starting from pi(0)=piδ,pj(0)=pjp^{(0)}_i = p_i - \delta, p^{(0)}_j = p_j, our earlier argument shows that assigning δ\delta to channel jj yields more capacity than assigning it to channel ii. After reallocation, either pi+σi2=pj+σj2p_i + \sigma^2_i = p_j + \sigma^2_j or pi=0p_i = 0; in the latter case, σi2pj+σj2\sigma_i^2 \ge p_j + \sigma^2_j.

A Rigorous Proof

  Rewrite (1.1)(1.1) as:

minp1,,pKk=1Kln(1+pkσk2)s.t.k=1KpkP0pk0,   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}

  ln()−\ln(·) is convex, so the objective function is convex. It is likewise straightforward to show that the feasible region (p1,p2,,pK)P(p_1, p_2, \dots, p_K)\in \mathcal{P} is convex. The problem is therefore a convex optimization problem, with Lagrangian:

L(p1,p2,,pK;λ0,λ1,,λK)=k=1Kln(1+pkσk2)+λ0(k=1KpkP)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:

Lpk=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}

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

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

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

pk0,   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=λ01σ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=λ01σk2+pk=λ01σ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λK1λk>0,   pK=pK1==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 precisely the result described above. For good channels (λk=0λ_k = 0), the allocated powers pkp_k satisfy pk+σk2=1/λ0p_k +σ^2_k = 1/\lambda_0, a constant. Poor channels receive no power (λk>0\lambda_k > 0; note that (3.7)(3.7) shows that if a channel with noise power σk\sigma_k is poor, then every channel with still greater noise power is poor as well). Allocation continues in this fashion until all power has been assigned. The quantity 1/λ01 / \lambda_0 is the pp^⋆ used 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:

minp(f)flfhlog2(1+p(f)σ2(f))dfs.t.flfhp(f)dfPp(f)0,   flffh(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(λ01σ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)dfP(4.3b)\int^{f_h}_{f_l} p(f)\mathrm{d}f \le P \tag{4.3b}

λ00,λ1(f)0,   flffh(4.3c)\lambda_0 \ge 0,\lambda_1 (f)\ge 0, \ \ \ f_l\le f \le f_h \tag{4.3c}

λ0(flfhp(f)dfP)=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,   flffh(4.3e)p(f)\ge 0, \ \ \ f_l\le f \le f_h \tag{4.3e}

λ1(f)p(f)=0,   flffh(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—analogous to a “poor 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, analogous to a “good 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 pp^⋆ 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”? Imagine σ2(f)σ^2 (f) as the bottom of a bowl and the power as water poured into it. Wherever power is assigned, the combined noise and signal power reaches the same flat “water level.” Noise that rises above the waterline marks a channel too poor to receive any power.

Illustration of water-filling