The dSbus_dV() function computes partial derivatives of the power balance 
equations with respect to voltage angles and magnitudes. That means, that we 
are looking how the bus power injections change with, for example, a small 
incremental change in a single voltage angle with all other voltage angles, 
magnitudes and generator injections held constant. When you perturb the demand 
and then run a power flow, you are looking at something very different, since 
many voltage magnitudes and angles change simultaneously. The tests in 
t/t_jacobian.m perform the numerical check that you want, introducing small 
individual perturbations to the voltages and checking the corresponding changes 
to the bus injections as computed via the power balance equations. Have a look 
at those tests and I think it should be clear what dSbus_dV() is computing.

Hope this helps,

   Ray


On Apr 17, 2020, at 9:42 PM, yangyang 
<[email protected]<mailto:[email protected]>> wrote:

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]<mailto:[email protected]>>;
发送时间: 2020年4月17日(星期五) 晚上10:53
收件人: 
"MATPOWER-L"<[email protected]<mailto:[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]<mailto:[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><PV2PQslack.m>


Reply via email to