Thank you for your reply sir. I have a bit more confusion. The dSbus_dV() function should be the derivative of complex power to bus voltage angle and magnitude. I have tried the following steps to validate its accuracy: Firstly, I have chosen case9, and I turned every bus except the slack bus to PQ buses, with the same results as the original case with PV and PQ buses. I ran a powerflow on this case, and I have got the original complex power vector Sbus_original, original voltage magnitude vector Vm_original, and original voltage angle vector Va_original; I have also calculated the dSbus_dVa and dSbus_dVm matrix, and the V vector in dSbus_dV() is :
case9.bus(:,8).*exp(1i * pi/180 * case9.bus(:,9)); Secondly, I put a Qd change at bus 5, the change is 5% of the total Q load(around 0.6MVar) and calculate the complex power Sbus, bus voltage magnitude Vm and bus angle Va. Theoretically, there should be imag(Sbus - Sbus_original) ?? imag( dSbus_dVa*(Va - Va_original) + dSbus_dVm*( Vm - Vm_original) ). But the results seem to differ a lot. Would you please help me with it sir? thank you for your patience and time. The code is attached below. ------------------ ???????? ------------------ ??????: "Ray Daniel Zimmerman"<[email protected]>; ????????: 2020??4??17??(??????) ????10:53 ??????: "MATPOWER-L"<[email protected]>; ????: Re: Bus appearant power in Thechnote 2 What you are describing is the complex bus power injection, not apparent power (which is just the magnitude of the complex power). And yes, the power in MVA is simply the per unit value times the MVA base (baseMVA). Kirchhoff??s current law (KCL) implies that all power injected into a bus (or leaving a bus) must sum to zero. In MATPOWER, that includes generation (Pg), load (Pd), connected branches (Pf), and shunts, and likewise for reactive power. So I believe your understanding is correct. Ray On Apr 16, 2020, at 7:04 PM, yangyang <[email protected]> wrote: Dear Prof Ray Zimmerman, In Matpower Technote 2,AC Power Flows, Generalized OPF Costs and their Derivatives using Complex Matrix Notation, we can find that bus appearant power is Sbus = Vbus .* conj(Ibus),where Ibus = Ybus* Vbus, and Vbus = Vm.*exp(Va*180/pi). But in cases, it seems that the results will be Sbus in per unit and it is hard to find its relationship with bus power in runpf() results. In my understanding, the nominal appearant power might be Sbus_nom=baseKVA.* Sbus, where Sbus is the appearant power in per unit mentioned above. And in power flow results, it should be the Pf, Pt, Qf, Qt results in branch data plus/subtracts (Pg -Pd) and (Qg - Qd) in bus and generator data. Is my understanding correct? Hoping that you can help me with it, thank you for your time.
small_cases_QVdist.m
Description: Binary data
PV2PQslack.m
Description: Binary data
