Hi Di Wu,
I'm sorry for the delay in responding ... I had to find some time to
give it a bit of thought.
On Jul 21, 2008, at 8:30 AM, [email protected] wrote:
I have two problem about the makeBdc function in Matpower.
1) Generally, in DC power flow, the tap settings of transformers are
ignored. Why are the tap settings considered in building Bbus in
Matpower?
I'm not sure what is generally done. The model used in MATPOWER is
derived directly from the AC model with the following approximating
assumptions:
- branch is lossless
- charging capacitance is negligible
- voltage magnitudes are ~ 1 p.u.
- angle differences across branches are small enough that the sin of
the angle difference can be approximated by the angle itself.
I might be able to pull the derivation from a paper I'm preparing if
you need to see the details.
2) If the tap settings can't be neglected, can I modify the Bbus as
follows?
%% for each branch, compute the elements of the branch B matrix and
the phase
%% shift "quiescent" injections, where
%%
%% | Pf | | Bff Bft | | Vaf | | Pfinj |
%% | | = | | * | | + | |
%% | Pt | | Btf Btt | | Vat | | Ptinj |
%%
stat = branch(:, BR_STATUS); %% ones at in-service branches
b = stat ./ branch(:, BR_X); %% series susceptance
tap = ones(nl, 1); %% default tap ratio = 1
i = find(branch(:, TAP)); %% indices of non-zero tap ratios
tap(i) = branch(i, TAP); %% assign non-zero tap ratios
/************** modified codes **********************/
Btt = b;
Bff = b ./ (tap .*tap);
Bft = - b ./ tap;
Btf = - b ./ tap;
%% build Bbus
f = branch(:, F_BUS); %% list of "from" buses
t = branch(:, T_BUS); %% list of "to" buses
Cf = sparse(f, 1:nl, ones(nl, 1), nb, nl); %% connection matrix for
line & from buses
Ct = sparse(t, 1:nl, ones(nl, 1), nb, nl); %% connection matrix for
line & to buses
Bbus = Cf * spdiags(Bff, 0, nl, nl) * Cf' + ... %% Bff term of
branch admittance
Cf * spdiags(Bft, 0, nl, nl) * Ct' + ... %% Bft term of branch
admittance
Ct * spdiags(Btf, 0, nl, nl) * Cf' + ... %% Btf term of branch
admittance
Ct * spdiags(Btt, 0, nl, nl) * Ct'; %% Btt term of branch admittance
I don't think this is correct. For a non-phase shift transformer, it
results in Pt = -tap * Pf. The tap ratio relates the voltages and
currents on the primary and secondary sides of an ideal transformer,
but the power flow should be equal.
--
Ray Zimmerman
Senior Research Associate
428-B Phillips Hall, Cornell University, Ithaca, NY 14853
phone: (607) 255-9645