jacobian - .. B(ii,jj)*sin(delta(ii)-delta(jj)));...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% % Calculation of Jacobian % G=real(Ybus); % Conductance matrix B=imag(Ybus); % Susceptance matrix Vmag=abs(V); delta=angle(V); Qcalc=imag(S); Pcalc=real(S); for ii=1:n, for jj=1:n, if (ii~=jj) J1(ii,jj)=Vmag(ii)*Vmag(jj)*(G(ii,jj)*sin(delta(ii)-delta(jj)) -. .. B(ii,jj)*cos(delta(ii)-delta(jj))); J2(ii,jj)=Vmag(ii)*Vmag(jj)*(G(ii,jj)*cos(delta(ii)-delta(jj)) +.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: .. B(ii,jj)*sin(delta(ii)-delta(jj))); J3(ii,jj)=-J2(ii,jj); J4(ii,jj)=J1(ii,jj); else J1(ii,ii)=-Qcalc(ii)-Vmag(ii)^2*B(ii,ii); J2(ii,ii)= Pcalc(ii)+Vmag(ii)^2*G(ii,ii); J3(ii,ii)= Pcalc(ii)-Vmag(ii)^2*G(ii,ii); J4(ii,ii)= Qcalc(ii)-Vmag(ii)^2*B(ii,ii); end; end; end; J=[J1(2:n,2:n) J2(2:n,ng+1:n); J3(ng+1:n,2:n) J4(ng+1:n,ng+1:n)];...
View Full Document

Ask a homework question - tutors are online