P. He, S. Zhang, L. Zhao, and X. Shen, "Multi-Channel Power Allocation for Maximizing Energy Efficiency in Wireless Networks"
The energy efficient jump water-filling algorithm (EE-JWF) uses the water-filling like architecture of the optimal solution, and locate the global optimal water level accurately with low complexity. This algorithm owns 2 distinct features, "exactness" and "low complexity".
Exactness means that the error between our proposed solutions and the theoretic optimal solution is the machine zero. Low complexity means that the proposed algorithms have low degree polynomial computational complexity with a concrete upper bound of the number of operations.
In summary, the proposed algorithms can provide exact solution instead of sub-optimal ones, and with a low degree polynomial computational complexity.
The target problem is denoted by P (the total power budget), s0 (circuit power), si and ai (allocated and channel power respectively), where {ai} is strictly monotonically decreasing, and K (total number of channels). The logarithm function is also assumed to be base 2.
The constraints are similar to that of the GWF algorithm, but the total allocated power does not have to be exactly the total power available; not all the power available needs to be used.
The proposed algorithm can be written in MATLAB to view the results. From the code below, it is evident that the steps taken are as described above.
*Note: To run this function, the input parameters (channel gains, channel weights, total power, circuit power) must be inputted to the JWF function and the function must be assigned to and array of output parameters (S,e) to receive an output.
function [S,e] = JWF(a,w,PT,s0) %Outputs & inputs
% a: Channel gains matrix w: Channel weights matrix
% PT: Total power s0: Circuit power
[~,kst,P2kst,si,~] = GWF(PT,a,w); %Get K*, P2(K*) & Si
M = kst; %M is equal to k* as mentioned in pseudocode
a(M+1) = 1./((P2kst./kst) + 1./(a(M))); %Create/Chnage value of gain/depth at step above step k*
S = zeros(kst,kst); %Preallocate memory for matrix S
%Kp1 = length(a) +1; %Make extra step which is needed to be used in for loop -
%a(Kp1) = 1/0; % -and assign its gain value as infinity so its depth is 0 (basically there is a step but it does not actually exist)
function [gs] = g(dels,a,w) %Function g(DELTA_s)
N = kst;
dN = (1./(a(kst).*w(kst))); %dN in equation
lgdk = 0;
for k = 1:kst %to get "sum of log term" in function
lgdk = lgdk + log((1./(a(k).*w(k))));
end
gs = ((dels+(dN * N))*(log2(dN + (dels./N)))) - ((dN + (dels./N))*lgdk) - (s0+sum(si(1:N))); %Final Equation
end
for n = 1:M
np1 = n+1; %Get future value of n - np1 = n+1 (n plus 1)
delsmin = 0; %DELTA_Smin
delsmax = n.*((1./a(np1)) - (1./a(n))); %DELTA_Smax
[gdelsmin] = g(delsmin,a,w); %get value of g(DELTA_Smin)
[gdelsmax] = g(delsmax,a,w); %get value of g(DELTA_Smax)
if gdelsmin > 0 %Branch 2.1
for j = 1:n
S(n,j) = (1./a(n)) - 1./a(j);
end
elseif gdelsmax < 0 %Branch 2.2
for j = 1:n
S(n,j) = (1./a(np1)) - 1./a(j);
end
elseif (gdelsmin * gdelsmax) <0 %Branch 2.3
for j = 1:n
S(n,j) = (P2kst./n) + (1./a(n) - 1./a(j)); %P2kst should be DELTA S from proposition 1 (?)
end
end
if n == kst %Step 3
e = (log(1+si(1)) + log(1+0.5*si(2)))/(s0+si(1)+si(2)); %get n* SHOULD BE log2 (?) RIGHT NOW ITS ln
end
end
S = S(kst,:); %Get last row of S matrix
end
For a visual representation of the algorithms output, the following script can be used;
%function for JWF is: [S,e] = JWF(a,w,PT,s0)
clear
a = [1/1 1/2 1/3];
w = true(1,3);
PT = 2;
s0 = 1;
[S,e] = JWF(a,w,PT,s0)
len = length(S) +1;
S(:,len) = 0; %Make last value of S be 0 so matrix dimensions match
f1 = figure(1);
clf;
set(f1,'Color',[1 1 1]);
l = S+(1./(a.*w));
bar(l,1,'r');
hold on;
bar(1./(a.*w),1);
xlabel('Channels');
title('Jumping Water Filling Algorithm')
legend('S',...
'1/ai')
Using the aforementioned example in the algorithm section, the JWF_Call file can be used to generate the optimal solution along with a figure of the output.