When compute net injection at generator buses in the m file doSE.m line 
107-110, the local PD and QD are include.


%% compute net injection at generator buses 
    gbus = gen(:, GEN_BUS);
    Sgbus = V(gbus) .* conj(Ybus(gbus, :) * V);
    Sgen = Sgbus * baseMVA + (bus(gbus, PD) + j*bus(gbus, QD));   %% inj S + 
local Sd


While when compute partial derivatives of the complex bus power injections in 
dSbus_dV.m line 9, local PD and QD are unincluded. 


 %   S = diag(V) * conj(Ibus) = diag(conj(Ibus)) * V


Can the sub-matrix of z_est real(Sgen(idx_zPG)) and the sub-matrix of H   
dPG_dVa(idx_zPG, nonref)   dPG_dVm(idx_zPG, nonref) match?


Best regards!
Jimmy

Reply via email to