For the Elastic Load Power Allocation (ELPA) algorithm, we consider the case that the users are grouped into different groups. Each user has an individual peak power constraint due to different restrictions of the power loads used by the users and the groups. It has been assumed that the power loads for users are divided into two categories: elastic and inelastic power loads.
Let K be the projected time window length with the time unit of epoch, and J be the users which utilize the elastic load and inelastic load. According to the priority and the structure of power systems to distribute the power loads, we can categorize the users into I groups. The inelastic loads are denoted by matrix A and the elastic loads are denoted by matrix R. L is an optimization variable (reference level) of overall power consumption. PG stands for the load upper bound for group i at epoch k, PU stands for the elastic load upper bound at epoch k and PT is the sum of all loads.
Thus the following optimization problem for minimizing power load fluctuation:
As seen in the problem, there are multiple constraints that need to be applied.
Preparation BLAI: Similar to the GWF algorithm, there are K epochs. The inelastic load sequence represented by B is illustrated by the stairs inside a water tank (figure to the right). The total available elastic load is PT. To find the elastic load allocation, S, the optimization (problem to the right) must be solved.
Just like the GWF algorithm, P2(k) is illustrated by the water volume above the kth step as shown in the shadowed area. The maximum index k* is understood as the highest step under water. Lastly, Sk is illustrated by the shadowed area above the kth step.
BLAI: Compared to PBLAI, there is an upper power constraint, PU. In Fig.3a, PU is infinity and the load vector B is sorted as a monotonically increasing sequence. In Fig.3b, the load upper bound constrained by PU is the height of the shadow areas where Sk can not be greater than corresponding PU.
BLAII: Compared with BLAI, BLAII only generalizes the initial index set of E from {1,...,K} of BLAI to the more general increasing sequence which is taken from the set of natural numbers.
The ELPA algorithm is built from the BLA algorithm.
In Fig.4a the shadowed area is the elastic power budget PT, which is the sum of all allocated power, Sk. The surface is the reference level and the stairs represent the inelastic load at corresponding time slots.
The elastic load S and the reference level L can be determined by PBLAI, in Step 1 of the ELPA.
In Fig. 4b shows the allocation of the total elastic load S1. Step 2 and 3 of ELPA states that Sk is obtained from Step 1, which is then treated as the new elastic power budget for all groups at the kth epoch. As a result, BLAII is called to distribute elastic load power Sk to the groups 1 to I, and PG will be the group elastic power upper bound vector which will determine the elastic load group constraints in this step.
In Fig. 4c, it shows the allocation of the elastic load among all the users in any specific group using the total group load obtained from Fig. 4b through the second time calling of BLAII.
Through this strategy, the elastic power is optimally distributed from the first time slot to the Kth slot and the peak power constraints from the users, the groups and any time slot for elastic loads are satisfied.
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 (A,P,G,PG,PU and PT) must be inputted to the ELPA function and the function must be assigned to and array of output parameters (L and R) to receive an output.
function [L,R] = ELPA(A,P,G,PG,PU,PT) %Outputs & inputs
% A: Inelastic load matrix P: Individual elastic load upper bound
% G: User groups PG: Group load upper bound
% PU: Epoch load upper bound PT: Total power
Asum = sum(A(:)); %Sum of all ineleastic loads for every user at every epoch
K = size(A, 1); %Number of epochs
L = (Asum+PT)/K; %Compute reference level L
[I,J] = size(G); %Get size of user groups matrix
a=zeros(1,K); %
for i = 1:K % Create gain array
a(:,i) = 1./sum(A(i,:)); %
end %
[~,~,~,si,~] = GWF(PT,a,true(1,K)); %Do GWF to get Sk values
[~,col]=size(PU); %Get number of users
for i = 1:K %
[Sk(i,:),~] = GWFPP(si(1,i),1./(A(i,:)),PU,true(1,col)); % Do GWFPP to get matrix R (Elastic loads)
end %
for k = 2:K
for i = 1:K
for j = 1:col
if Sk(i,j)>P(1,j) % Cut down power where it exceeds the P upper bound value-
Sk(i,j)=P(1,j); % -and make it same as its upper bound value.
end
while Sk(k,j) > Sk(i,j)
Sk(k,j) = Sk(k,j) -1; % Ensure non-increasing condition is met
end
end
end
end
for i = 1:I
for k = 2:J
for j = 1:J
if Sk(i,G(i,j)) + Sk(i,G(i,k)) <= PG(1,j) %Ensure PG condition met
Sk(i,G(i,j)) = Sk(i,G(i,j)) +1;
end
if Sk(i,G(i,j)) + Sk(i,G(i,k)) >= PG(1,j) %Ensure PG condition met
Sk(i,G(i,k)) = Sk(i,G(i,k))-1;
end
% if sum(Sk(i,:)) <= PU(1,j) %Ensure PU condition met
% Sk(i,G(i,j)) = Sk(i,G(i,j)) +1;
% end
% if sum(Sk(:,:)) ~= PT %Ensure PT condition met
% Sk(i,G(i,j)) = Sk(i,G(i,j)) +1;
% end
end
end
end
R = Sk; % Copy Sk matrix to R instead
end
For a visual representation of the algorithms output, the following script can be used;
clearvars;
%function of ELPA is: [L,R] = ELPA(A,P,G,PG,PU,PT)
% Assign Inelastic load matrix,Individual elastic load upper bound,User groups,
% Group load upper bound,Epoch load upper bound and Total power:
A = [1 2 3 4;2 3 4 5];
P = [3 3 3 3];
G = [1 2;3 4];
PG = [5 5];
PU = [8 8 8 8];
PT = 16;
[L,R] = ELPA(A,P,G,PG,PU,PT)
S = A+R;
f1 = figure(1);
clf;
set(f1,'Color',[1 1 1]);
%set(gcf, 'Renderer', 'painters');
bar3(S,'r');
hold on;
bar3(A,'b');
xlabel('Users');
ylabel('Epochs');
zlabel('Loads');
title('Elastic Load Power Allocation (ELPA)')
legend('Elastic loads matrix R',...
'Inelastic loads matrix A')
Using Example 1 in the published paper, the inputs can be put into the MATLAB code to generate the reference level L and the Elastic load matrix R;