Thank you amini, but I dont really learn much about PSO. Do you mean partical
swarm optimization? I think I need more time to learn about it.
------------------ ???????? ------------------
??????:
"MATPOWER discussion forum"
<[email protected]>;
????????: 2020??9??9??(??????) ????10:20
??????: "MATPOWER discussion forum"<[email protected]>;
????: Re: optimal power flow with unit commitment using mixed integer
programming
if you use an optimization algorithm like pso or ... define a
variable for location and another variable for size of capacitor
this way is seeing that as generator
X is particles sets
this is one part of the code i copied because there are many mfiles
capacitor%
% x is variable (location and size of Capacitor)
% x(1) is siting
% x(2) is size
% f objective function
%--- place capacitor
MVAR_max=1;
Site_Cap=round(2 + 31*x(1)); % location of capacitor (bus 2 to bus 33)
Size_Cap=MVAR_max*x(2); % size of capacitor
data=case33bw; % call load flow input data (case 33_bus)
data.gen(2,8)=1; % turn on capacitor at bus
data.gen(2,3)=Size_Cap; % place capacitor
data.gen(2,1)=Site_Cap;
data.gencost(2,:)=[ 2 0 0 0 0 0 0 ];
***********************************************************************************************
but if you want to see it as reactive power at buses
use something like this for capacitor steps
Q=6*(round( 6*rand))
mpc.bus(k,6) = Q
k is number of bus
On Wed, Sep 9, 2020 at 5:48 PM yangyang <[email protected]> wrote:
That is also a good idea and closer to reality because shunt capacitors and
reactors will actually change the Ybus instead of performing as constant
reactive power. But I dont know how to include the 6th column of bus as a
variable and modify the objective function. Would you please share your code
with me? Thank you for your kind consideration. Here is my code.
------------------ Original Mail ------------------
??????:
"MATPOWER discussion forum"
<[email protected]>;
????????: 2020??9??9??(??????) ????9:31
??????: "MATPOWER discussion forum"<[email protected]>;
????: Re: optimal power flow with unit commitment using mixed integer
programming
and how about bus matrix column 6 ?
" 6 BS Bs, shunt
susceptance (MVAr injected at V = 1.0 p.u.)"
but in this case you have to define an objective function and solve an
optimization problem.
i used that for ieee 33 bus and the result was good.
On Wed, Sep 9, 2020 at 5:20 PM yangyang <[email protected]> wrote:
Dear Alireza SalimAmini
Thank you for your care and blessing. I think I have implemented this using
runuopf(), a built-in function of matpower to do mixed unit commitment and OPF.
In such cases where geneators are used to model shunt capacitors and reactors,
just add a few generators whose real power generation Pg is zero and reactive
power generation Qg set at a constant value. The Qmax and Qmin in generator
data has to be identical with the set Qg. Notably, the Pmax and Pmin cannot be
set to zero because runuopf() will merely deal with generators whose Pmin is
greater than zero (see source codes of uopf() ). To get "shunt" generators
involved as candidates of unit commitment programming only calls for Pmin and
Pmax set at a very small number numerically, say, 1e-6 and 1e-5. This minor
active power injection will hardly affect the power flow but can get "shunt"
generators involved.