Dear Manish Thapa
No. This is not about modeling a battery. I am trying to solve a multi
objective optimization problem which have 3 objective functions. first
objective function is Cost of congestion management and the other objective
functions are security indexes.
All of these 3 objective functions are functions of a design vector
[X1,X2,...X77]. where [X1,...,X10] is up generation shifts of unit j i.e.,
DP{Gj,up}. [X11,..X20] is down generation shifts of unit j i.e.,
DP{Gj,down}.[X21,..X40] represent the DP{Dk,up}. Other elements of vector X
are assigned to DP{Dk,down} and load shedding analogous parameters of V
demand side bidding. (D represent Delta : Pold-Pnew
Cost1= B{Gj,up}*DP{Gj,up} * B{Gj,down}*DP{Gj,down}+B{Dk,up}*DP{Dk,up}
* B{Dk,down}*DP{Dk,down}+B{Dk,shed}*DP{Dk,shed}.
B sets are the cost of each actions. for example B{Gj,up} is cost of up
generation shift for unit j.
Other objective functions (security indexes) are also functions of these
sets ,[X1,X2,...X80] or [ DP{Gj,up}, DP{Gj,down}, DP{Dk,up},
DP{Dk,down},DP{Dk,up}, DP{Dk,shed}.
So, I have a set of mathematical equations to calculate objective
functions. The constraints are also explicitly, functions of this design
vector. But one of these constraint (Lines loading) is implicit function of
the design vector. So I have to calculate the load flow based on the
obtanied design vector ( calculated by a MMP method , epsilon constraint or
weighted sum, with fmincon solver of matlab) to check the lines loading
inequality constraint. So I have to update the design vector in each
iteration.
On Sat, Apr 4, 2015 at 4:04 AM, Manish Thapa <[email protected]>
wrote:
> Are you trying to model sort of a battery with this?
>
> On Sat, Apr 4, 2015 at 2:34 AM, Electric <[email protected]>
> wrote:
>
>> 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.
>>
>
>