Remember the definition of bus types for the power flow problem. PV means that 
active power and voltage magnitude are specified and we are solving for voltage 
angle and reactive power. PQ means that active and reactive power are 
specified, and we are solving for voltage magnitude and angle.

So, if you want a generator to have a fixed reactive power, you must set the 
corresponding bus type to PQ, i.e. bus(i, BUS_TYPE) = PQ.

Hope this helps,

   Ray


On Sep 6, 2023, at 6:57 AM, Ігор Ткач <[email protected]> wrote:

Pandapower has a model "sgen" static generator for this purpose
https://pandapower.readthedocs.io/en/v2.0.0/elements/sgen.html?highlight=sgen

5 вересня 2023, 18:47:09, від "Ігор Ткач" 
<[email protected]<mailto:[email protected]>>:

How fix the generators capacities in runpf after add generator?
I have calculated a standard scheme.
mpc=loadcase('case57');
result_old=runpf(mpc)

Next, I left the power values of generators 2-7 unchanged.
That is, the process of finding the balance relies on generator 1.
I added one reactive power generator  gen1 in bus=23
   xgen(1,1)=10 %  a reactive power  gen1
   mpc1=mpc
   bus_idx=23
   gen1(1,:)=zeros(1,21)
   gen1(1,1)=bus_idx
   gen1(1,2)=0.0
   gen1(1,3)= xgen(1,1)
   mpc1.bus(bus_idx, BUS_TYPE) = PQ;
   gen1(1,4:5)=[20,-20]
   gen1(1,7:21)=mpc1.gen(4,7:21)
   gencost1(1,:)=mpc1.gencost(1,:);
   [mpc2, idx1] =addgen2mpc_ivt(mpc1, gen1, gencost1,'unknown')
   result1=runpf(mpc2)

Although in mpc2, the powers of generators 2-8 are the same as I set,
after calculating with the added reactive generator 8
rezult1=runpf(mpc1)
the reactive powers of all generators 2-7 have changed, and the power of the 
added generator 8 would not change =10.

I repeat, I want the system to be reactive balanced by generator 1, and the 
reactive powers of all other generators to be unchanged, such as in mpc2.

How can I make the reactive powers of generators 2-7 in rezult1 unchanged, i.e. 
the same as they are in mpc2?

Igor




Reply via email to