If I understand, you are attempting to find the sensitivity of bus voltage 
magnitudes to active power injections at load (PQ) buses, under standard power 
flow asusmptions, right?

In that case, I think you want …

J = makeJac(mpci);
invJ = inv(full(J));
dVdP = invJ(118:end, 54:117);

The rows of invJ are ordered as voltage angles of PV buses, voltage angles of 
PQ buses, voltage magnitudes of PQ buses. The columns are active power 
injections for PV buses, active power of PQ buses, reactive power of PQ buses.

So the code above should yield a 64x64 matrix corresponding to the buses in the 
64x1 pq vector as returned by ...

[ref, pv, pq] = bustypes(mpci.bus, mpci.gen);

Hope this helps,

   Ray



On Sep 9, 2023, at 2:49 AM, Kaled Zareer <[email protected]> wrote:

Thank toy for your response.
Here is the code.

define_constants;
mpcb = loadcase('case118');
mpct = mpcb;
mpct.bus(:, [PD QD]) = mpct.bus(:, [PD QD])*1.0;
mpci = ext2int(mpct);
Jacc = makeJac(mpci);
Jac=full(Jacc);
Jac_inv= inv(Jac);% inverse of J
sen_vpp=Jac_inv(1:117,118:181); % sensitivity of voltages to real power 
injection

On Wednesday, September 6, 2023 at 10:46:30 AM EDT, Ray Daniel Zimmerman 
<[email protected]> wrote:


Can you describe exactly what you are doing in a bit more detail (or maybe 
provide a few lines of code to illustrate)? I’m not sure where you are getting 
a matrix that is 117x64.

    Ray

On Sep 3, 2023, at 7:10 AM, Kaled Zareer <[email protected]> wrote:

Dear MATPOWER team,

I used inv(Jac) to obtain the voltage sensitivities of 118-bus. The size of 
"dv/dp"  matrix is 117x64. I extracted the sensitivities related to load buses 
(i.e. 64x64 matrix). As it is known, the diagonal elements must be greater than 
the off-diagonal elements. However, the results do not coincide with this fact.
Your comments are highly appreciated.

Khaled




Reply via email to