I am running a Multi Objective Mathematical Programming (MMP) method to
remove congestion (overloading of lines) in a power system.
The objective function, and all constraints apart from one of them i.e,
loading of lines, are scripted in Matlab, But I am using Matpower to
consider loading of lines as an inequality constraint (Loading Lji<1). I am
pretty sure that there is some problem in my code for considering the
inequality constraint of lines loading.
I am using the script bellow to to consider the inequality constraint of
lines loading.
function [C Ceq] = constraints(X,Dat,mpc)
mpc = loadcase('case39_congestion');
Ceq=[ ];
%----- First we have some constraints that are not calculated by Matpower.
% Then I have to consider lines loading.
define_constants;
mpopt = mpoption('OUT_ALL', 0);
load_set=[1,3:4,7:9,12,15:16,18,20:21,23:29];
mpc.gen(1:10,PG)=mpc.gen(1:10,PG)+X(1:Dat.SG)'-X(Dat.SG+1:2*Dat.SG)';
mpc.bus(load_set,PD)=mpc.bus(load_set,PD)+...
X(2*Dat.SG+1: 2*Dat.SG+Dat.SD)'-X( 2*Dat.SG+Dat.SD+1 :
2*Dat.SG+2*Dat.SD)';
RES=runpf(mpc,mpopt);
flow_from = sqrt(RES.branch(:, PF).^2 + RES.branch(:, QF).^2);
flow_to = sqrt(RES.branch(:, PT).^2 + RES.branch(:, QT).^2);
flow = (flow_from + flow_to)/2;
loading = flow ./ RES.branch(:, RATE_A);
max_loading=max(loading);
C = max_loading-1; % Inequality constraint
end
Where X is deign vector of the congestion management problem. X is changes
by fmincon solver.
max_loading after few iteration of fmincon appears to be in order of 100
(134,150) which doesn't make sense (The loading of base case is 0.75).
I am thinking the problem is about updating generator active power and
demands Active power.