Closed akhtar3100 closed 1 year ago
These are good questions.
If you are working with a system that has been converted to internal numbering via ext2int()
and you have the complex bus voltage vector V
, you can use dSbus_dV()
to compute the parts of the Jacobian separately as ...
[Ybus, Yf, Yt] = makeYbus(mpc);
[dSbus_dVa, dSbus_dVm] = dSbus_dV(Ybus, V);
dQ_dVm = imag(dSbus_dVm);
You could use dSbr_dV()
to get the sensitives of line flows (losses equal sum of Sf and St) w.r.t the voltages, but that's not w.r.t. q.
Ok. Thanks for your answer, I still need more clarity.
@rdzmanWhat is the use of ext2int function? what if I don't use it. I see no difference between using it or not? Here we are calculating dQ/dVm, if I want to calculated dVm/dQ will I need to take inverse of the matrix? One more thing, where i can find details of the functions like dSbus_dv() and dSbr_dv()? do you have function for dVm_dQ? Regarding losses, if I want to calculate losses caused by reactive power flow and loss sensitivity to reactive power, how should I calculate it.
(Sorry for the delay in responding. I was out for several days.)
help
command for basic help. The details of the formulae used for the calculations can be found in “AC Power Flows, Generalized OPF Costs and their Derivatives using Complex Matrix Notation”.get_losses()
to compute the losses for a given operating point, along with sensitivities w.r.t bus voltages. However, to get sensitivities w.r.t reactive power injections, you will need to make some assumptions about how other variables are constrained when Q is perturbed. I have a function that computes AC shift factors at a given operating point, with certain assumptions about slacks and fixed voltages that I've attached here. As mentioned previously, the sensitivity of losses in a branch should simply be the sum of the sensitivities of flows at the two ends. You may find makePTDFac.m.txt useful as is, or at least find the code illuminating for your application (remember to strip the .txt
extension).
I have two questions: