### Lagrange and Water Filling Algorithm(1/4)

```Lagrange and Water Filling algorithm
Speaker : Kuan-Chou Lee
Date : 2012/8/20
Graduate Institute of Communication Engineering, NTU
Lagrange and Water Filling Algorithm(1/4)
 Recall that the capacity of an ideal, band-limited, AWGN channel is

Pav 
C  W log 2  1 

W
N
0 

 C is capacity in bits/s, W is the channel bandwidth, Pav is the average
transmitted power, N0 is noise variance. In a multicarrier system, with
Δf sufficiently small, the subchannel has capacity

 fP  f i  H  f i 
C i   f log 2  1 

 f  nn  f i 

2




 H(f ) is the frequency response of a nonideal, band-limited channel
with a bandwidth W. noise variance is Φnn(f ). P(f) is the transmitted
power in Δf.
pp. 2
Graduate Institute of Communication Engineering, NTU
Lagrange and Water Filling Algorithm(2/4)
 Hence, the total capacity of the channel is
N
C 
C
i 1
N
i
 f

i 1

P  fi  H  fi 

log 2 1 

 nn  f i 

2

.


 In the limit as  f  0 , we obtain the capacity of the overall channel in
bits/s. The object of the problem is maximizing the capacity can be
formulate as:

P f  H  f

m ax  C  , w here C   log 2 1 
W

 nn  f 


2

df


S
h SD
D
subject to
 P  f df  Ptotal ,
 W

 P  f   0.
[1], Page. 716-717
pp. 3
Graduate Institute of Communication Engineering, NTU
Lagrange and Water Filling Algorithm(3/4)
 Under the constraint on P  f  , the choice of P  f  that maximizes C
may be determined by maximizing the Lagrangian function

W


P f  H  f


 log 2 1 

 nn  f 



2



  vP  f    f P  f   df  vPtotal ,



 where λf and  are the Lagrange multiplier, which is chosen to satisfy
the constraint. By using the calculus if variations to perform the
maximization, we find that the optimum distribution of transmitted
signal power is the solution to the equation
f 
 f 

ln 2   f     f   P  f  H  f 

2
H
nn
nn
 ˆ f  vˆ 
2
nn
1
 nn  f

H
f
2
 P f


  v   f  0,


, w here ˆ f  ln 2  f and vˆ  ln 2 v
pp. 4
Graduate Institute of Communication Engineering, NTU
Lagrange and Water Filling Algorithm(4/4)
 From the KKT conditions, ˆ P  f   0 .
f
ˆ f  0  vˆ 
P f

1
vˆ

1
 nn  f
 nn  f
H
f

2

H
f
 K 
2
 P f
 nn  f
H
f

2

,
, ( f  W ).
K
 nn
H
f
f
2
[2], Page. 716-717
pp. 5
Graduate Institute of Communication Engineering, NTU
On the Optimal Power Allocation for
I. –Hammerstrom and A. –Wittneben, “On the optimal
power allocation for nonregenerative OFDM relay links,” in
Proc. IEEE ICC, pp.4463 – 4468, Jun. 2006.
WIRELESS Communication LAB
Graduate Institute of Communication Engineering, NTU
System Model (1/7)
 Problem : Allocating the subcarrier power of the relayed signal to
maximize the channel capacity.
 Solution : Lagrange and Water Filling Algorithm
h SR
S
0
1
...
R
h RD
D
N-1
Fig.1. Dual-hop relay communication system comprising source (S),
relay (R) and destination (D) terminals.
pp. 7
Graduate Institute of Communication Engineering, NTU
System Model (2/7)
 Transmitted signal :
1
x [i ] =
N
N -1
å
i= 0
æ j 2 p ni ö
÷
X [i ]exp çç
,
÷
÷
çè N ø
n = 0,1, L , N - 1,
 Average transmission power for all subcarriers :
2
E éê X [i ] ùúº 1
ë
û
 Received signal at the relay node :
R [i ]= H S R [i ]X [i ]+ W R [i ],
i = 0,1, L , N - 1,
 Nonregenerative relay (variable-gain relaying scheme) :
(a [i ]) = PR [i ] E éêR [i ]
ë
2
2
ù= P [i ]
R
úû
(
2
H S R [i ] + s
2
R
a [i ]R [i ]
).
pp. 8
Graduate Institute of Communication Engineering, NTU
System Model (3/7)
 Received signal at the destination node :
D [i ]= H R D [i ]a [i ]R [i ]+ W D [i ],
= H R D [i ]a [i ]( H S R [i ]X [i ]+ W R [i ]) + W D [i ],
i = 0,1, L , N - 1,
= H R D [i ]H S R [i ]a [i ]X [i ]+ H R D [i ]a [i ]W R [i ]+ W D [i ].
 Signal to noise power ratio (SNR)
2
2
PR [i ] H R D [i ] H S R [i ]
2
s Rs
ri =
2
PR [i ] H R D [i ] s
2
R
s s
2
D
2
R
+
2
D
(H
=
2
SR
[i ] + s
2
s Rs
2
R
)s
2
D
PR [i ]bi a i
a i + PR [i ]bi + 1
.
2
D
pp. 9
Graduate Institute of Communication Engineering, NTU
System Model (4/7)
 The total capacity of the channel is
C 
1
N
C

2
i 1
i

1
N
f
2
 log 1    
2
i
i 1
1
2
N
f

i 1


PR  i  bi a i
log 2  1 
.
a i  PR  i  bi  1 

  f  1, the object of the problem is maximizing the capacity can be
formulate as:
m ax  C  , w here C 
1
2
N

i 1


PR  i  bi a i
log 2  1 
,
a i  PR  i  bi  1 

subject to

  PR  i   Ptotal ,
 i 1
 P  i   0, for i = 1,
 R
N
, N.
pp. 10
Graduate Institute of Communication Engineering, NTU
System Model (5/7)
 Set up the Lagrangian function
L  PR , λ , v  
N

i 1


PR  i  bi a i
T
T
log 2  1 
  λ P R  v  1 P R  Ptotal  ,
a i  PR  i  bi  1 

N
w here λ P R 
T
  P  i  and 1
i
N
T
R
i 1
PR 
 P i .
R
i 1
 The derivative of the Lagrangian with respect to P  i 
R
 L  PR , λ , v 
 PR  i 

a i bi
1 


  i  v ,

ln 2  a i  PR  i  bi  1   PR  i  b i  1  


 Setting to zero, we get
ln 2  i  ln 2 v 
a
a i bi
i
 PR  i  bi  1   PR  i  bi  1 
,
pp. 11
Graduate Institute of Communication Engineering, NTU
System Model (6/7)
 From the KKT conditions    ln 2   0, v   ln 2 v .
i
i


a i bi
v  
.
  a  P i  b  1  P i  b  1 
R
i
R
i
 i

 Another KKT condition is that  P  i   0.
i
R


a i bi
 v 
 PR  i   0.

 a i  PR  i  bi  1   PR  i  bi  1  

a i bi
 If PR  i   0 , v  
:  PR  i   0
 ai  1


a i bi
  v 
  0.

 a i  PR  i  bi  1   PR  i  bi  1  

pp. 12
Graduate Institute of Communication Engineering, NTU
System Model (7/7)
 If P  i   0 v  
R
a i bi
a
i
 1
:  P i   0
R
 After some algebraic manipulations
+
ö ù
4
b
1 éêa i æ
*
i
ç 1+
÷
PR [i ]=
- 1÷
- 1ú ,
ç
÷
ú
bi ê2 çè
aiv ¢ ÷
ø
ë
û
+
 where [x ] = m ax {0, x }.
pp. 13
Graduate Institute of Communication Engineering, NTU
Conclusion
 The objective function
(Maximize Capacity? Minimize total Power or bit error rate?)
 Constraint (Power, Resource)
 Lagrange function (Derivation)
 Solve the optimization problem
 (i.e., Obtain the power allocation among the subcarrier)
pp. 14
Graduate Institute of Communication Engineering, NTU
Reference
[1] J. G. Proakis, Digital Communications, 4rd ed. New York: McGrawHill, 2001.
[2] I. –Hammerstrom and A.-Wittneben, “On the optimal power allocation
for nonregenerative OFDM relay links,” IEEE ICC , pp.4463-4468, Jun.
2006.
pp. 15
```