Yes, those are equivalent ways to compute changes in power with respect to changes in injections.
However, any PTDF matrix is an expression of sensitivities of flow w.r.t injection under a specific slack assumption. MATPOWER makes it easy to specify which slack assumption that is. Ray > On Sep 3, 2018, at 8:12 AM, Elis Nycander <[email protected]> wrote: > > Hi, > > I was looking at the makePTDF function and was a bit confused with the option > for having distributed slack. Instead of feeding the distributed slack > weights to makePTDF(mpc,slack) you can just add the slack to the delta power > injections. For example the following options give exactly the same result > (4-buses): > > dP = [1 0 0 0 ], with slack = [0 1/2 1/2 0 ] > dP = [1 -1/2 -1/2 0 ], default slack > > Is always the case? In that case it seems you can just forget about using the > slack argument. > > Regards, > Elis Nycander > > Example code: > > % PTDF_test > > mpc = case24_ieee_rts; > nb = size(mpc.bus,1); > > %% using distributed slack > w = zeros(nb,1); > w([13 14 22]) = 1/3; % slack at bus 13,14,22 > H2 = makePTDF(mpc,w); % distributed slack > dP2 = diag( ones(nb,1) ); % unit injection at each bus > dL2 = H2*dP2; > > %% using default slack with modified injections > H1 = makePTDF(mpc); % default slack configuration > dP1 = dP2; > for i=1:size(dP1,2) > dP1(:,i) = dP1(:,i) - w; % add compensation from slack > end > dL1 = H1*dP1; > > diff = max(max(abs(dL1 - dL2))) % <- answers are the same > > >
