Description: newton-raphson maylab COD with YBUS calculatour:
Build up admittance matrix
function [YR,YI] = YBus(tlsend,tlrec,tlresis,tlreac,tlsuscep,tlcond,shbus,shresis,shreac,ntl,nbb,nsh)
YR=zeros(nbb,nbb)
YI=zeros(nbb,nbb)
Transmission lines contribution
for kk = 1: ntl
ii = tlsend(kk)
jj = tlrec(kk)
denom = tlresis(kk)^2+tlreac(kk)^2
YR(ii,ii) = YR(ii,ii) + tlresis(kk)/denom + 0.5*tlcond(kk)
YI(ii,ii) = YI(ii,ii) - tlreac(kk)/denom + 0.5*tlsuscep(kk)
YR(ii,jj) = YR(ii,jj) - tlresis(kk)/denom
YI(ii,jj) = YI(ii,jj) + tlreac(kk)/denom
YR(jj,ii) = YR(jj,ii) - tlresis(kk)/denom
YI(jj,ii) = YI(jj,ii) + tlreac(kk)/denom
YR(jj,jj) = YR(jj,jj) + tlresis(kk)/denom + 0.5*tlcond(kk)
YI(jj,jj) = YI(jj,jj) - tlreac(kk)/denom + 0.5*tlsuscep(kk)
end
Shunt elements contribution
for kk = 1: nsh
ii = shbus(kk)
denom = shresis(kk)^2+shreac(kk)^2
YR(ii,ii) = YR(ii,ii) + shresis(kk)/denom
YI(ii,ii) = YI(ii,ii) - shreac(kk)/denom
end
End of function YBus
To Search:
File list (Check if you may need any files):
NewtoRaphson\CalculatedPowers.m
............\GeneratorsLimits.m
............\main.m
............\NetPowers.m
............\NewtonRaphson.m
............\NewtonRaphsonJacobian.m
............\PowerMismatches.m
............\PQflows.m
............\StateVariablesUpdates.m
............\YBus.m