The easiest way is probably to duplicate of makeJac.m
<https://github.com/MATPOWER/matpower/blob/master/lib/makeJac.m> and give it a
new name, e.g. makeJac_w_flows.m. In your new file, add a call to dSbr_dV()
right after the call to dSbus_dV() on line 67. Then assemble the pieces as you
describe below. Btw, since the voltage angles and magnitudes are considered as
independent variables, dVm/dVa will be all zeros and dVm/dVm will be an
identity matrix.
Hope this helps,
Ray
> On Oct 8, 2018, at 9:18 AM, Shiva Moshtagh <[email protected]> wrote:
>
> Dear all,
> I am new in the list and also new user of MATPOWER.
>
> I am trying to optain a Jacobian matrix like this :
> J=[dPi_dVa dPi/dVm ;
> dQi_dVa dQi_dVm ;
> dPf_dVa dPf_dVm ;
> dQf_dVa dQf_dVm ;
> dVm/dVa dVm/dVm]
> where Pi and Qi are the real and reactive power injection, Pf and Qf are the
> real and reactive power flow, Va and Vm are the voltage angles and magnitudes
> of the buses.
>
> Can anybody help me how can I get this ?
>
> Thank You,
> Shiva,