Hi Steffen,

If you are talking about a single interconnected system with the slack distributed between two buses then, I'm afraid this is not doing exactly what you want, since it is also fixing the voltage angle at each ref bus. If you are talking about a system with two unconnected islands, each with its own slack bus, then I believe it is correct for the case where there is a single generator at each slack bus. I have updated versions of runpf.m and pfsoln.m from the current dev version (attached) that also handle the case where there are islands with one reference/slack bus per island, but optionally multiple generators at each.

MATPOWER does not currently implement power flow with distributed slack for a single interconnected system.

Attachment: runpf.m
Description: Binary data

Attachment: pfsoln.m
Description: Binary data


-- 
Ray Zimmerman
Senior Research Associate
419A Warren Hall, Cornell University, Ithaca, NY 14853
phone: (607) 255-9645




On Sep 16, 2011, at 9:38 AM, Nicolai, Steffen wrote:

Dear Mr. Zimmerman,
 
I’m trying to calculate the AC PF for a system with two Slack Busses. When I’m running the PF, I get an error message in line  97 of pfsoln.mat
 
>> Subscripted assignment dimension mismatch.
>> Error in ==> pfsoln at 97
>> gen(on(refgen(1)), PG) = real(Sg(refgen(1))) * baseMVA + bus(ref, PD);  %% inj P + local Pd
 
Because of the two Slack Busses the dimension of bus(ref, PD) is 2 x 1, but the dimension of real(Sg(refgen(1))) and gen(on(refgen(1)), PG) is only 1 x 1.  
 
 
When I change the line 97 to
 
>> gen(on(refgen(:,1)), PG) = real(Sg(refgen(:,1))) * baseMVA + bus(ref, PD);  %% inj P + local Pd
 
it seems to work fine.
 
Would you be so kind to give me a short reply if it is a misconfiguration or not?
 
 
Best regards,
Steffen Nicolai
 

Reply via email to