I’m not sure how you are checking whether the total power injections are equal
to zero. Did you included the phase shifters and shunt elements?
Try the following code with your case. The value of the norm printed at the end
should be essentially zero.
define_constants;
mpopt = mpoption('verbose', 0, 'out.all', 0);
mpc = loadcase('case2383wp'); % <------ change this to your case name
r = ext2int(rundcpf(mpc, mpopt));
Va = r.bus(:, VA) * pi/180;
[Bbus, Bf, Pbusinj, Pfinj] = makeBdc(r.baseMVA, r.bus, r.branch);
Pbus = real(makeSbus(r.baseMVA, r.bus, r.gen)) - Pbusinj - r.bus(:, GS) /
r.baseMVA;
norm(Pbus - Bbus * Va, Inf)
— Ray
> On Apr 3, 2018, at 11:54 AM, vikram reddy <[email protected]> wrote:
>
> I have a 20000 bus WECC system in PSSE raw format. I am trying to run the DC
> power flow, but the total of the power injections that I got from MATPOWER
> does not equal to zero. Are the voltage angles obtained in this case wrong?
>
> Thanks,
> Vikram
>
> On Tue, Apr 3, 2018 at 6:46 AM, Ray Zimmerman <[email protected]
> <mailto:[email protected]>> wrote:
> There is no need to check. The slack bus active power will be adjusted to
> make the injections sum to zero. And the DC power flow in MATPOWER is a
> lossless approximation. That is, it assumes the losses are zero.
>
> Ray
>
>
>> On Mar 28, 2018, at 2:28 PM, vikram reddy <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Hi,
>>
>> I am working on a 20000 bus system and running a DC load flow. Now, the
>> power injection vector computed as
>>
>> Pbus = real(makeSbus(baseMVA, bus, gen)) - Pbusinj - bus(:, GS) / baseMVA;
>>
>> In general, the total of the power injection vector should be zero implying
>> generation=load+losses. MATPOWER does not do the checking if the total of
>> injection vector is zero.
>>
>> 1. Why does MATPOWER not check if the total of injection vector goes to
>> zero? Is it not important?
>> 2. What happens if the injection vector is not zero and running the DC load
>> flow? I assume the voltage angles thus obtained will have an error.
>> 3. Assuming losses is the total sum of Pbus vector, how should the losses be
>> distributed?
>>
>> Thanks,
>> Vikram
>>
>>
>
>