Package pypower :: Module dAbr_dV
[hide private]
[frames] | no frames]

Module dAbr_dV

source code

Partial derivatives of squared flow magnitudes w.r.t voltage.

Functions [hide private]
 
dAbr_dV(dSf_dVa, dSf_dVm, dSt_dVa, dSt_dVm, Sf, St)
Partial derivatives of squared flow magnitudes w.r.t voltage.
source code
Variables [hide private]
  __package__ = 'pypower'
Function Details [hide private]

dAbr_dV(dSf_dVa, dSf_dVm, dSt_dVa, dSt_dVm, Sf, St)

source code 

Partial derivatives of squared flow magnitudes w.r.t voltage.

Returns four matrices containing partial derivatives of the square of the branch flow magnitudes at "from" & "to" ends of each branch w.r.t voltage magnitude and voltage angle respectively (for all buses), given the flows and flow sensitivities. Flows could be complex current or complex or real power. Notation below is based on complex power. The following explains the expressions used to form the matrices:

Let Af refer to the square of the apparent power at the "from" end of each branch:

   Af = abs(Sf)**2
      = Sf .* conj(Sf)
      = Pf**2 + Qf**2

then ...

Partial w.r.t real power:

   dAf/dPf = 2 * diag(Pf)

Partial w.r.t reactive power:

   dAf/dQf = 2 * diag(Qf)

Partial w.r.t Vm & Va:

   dAf/dVm = dAf/dPf * dPf/dVm + dAf/dQf * dQf/dVm
   dAf/dVa = dAf/dPf * dPf/dVa + dAf/dQf * dQf/dVa

Derivations for "to" bus are similar.

For more details on the derivations behind the derivative code used in PYPOWER information, see:

[TN2] R. D. Zimmerman, "AC Power Flows, Generalized OPF Costs and their Derivatives using Complex Matrix Notation", MATPOWER Technical Note 2, February 2010. http://www.pserc.cornell.edu/matpower/TN2-OPF-Derivatives.pdf

Returns:
The partial derivatives of the squared flow magnitudes w.r.t voltage magnitude and voltage angle given the flows and flow sensitivities. Flows could be complex current or complex or real power.

See Also: dIbr_dV, dSbr_dV

Authors:
Ray Zimmerman (PSERC Cornell), Richard Lincoln