Electricity, Complex Systems, Numerical Analysis, Algorithms, Network.
N=matrix(c(1,0,1,1,1,-1,1,0,0,-1,0,-1,-1,-1,0),ncol=3) Y=complex(imaginary=1)*diag(c(2,1,1,-.5,.5)) I_0=c(0,0,0) U_0=sample(0,size=nrow(N),replace=T) U_0[2:4]=c(2,3,5) U_sol=U(N,Y,I_0,U_0) The resulting voltages on node 1 and 2 are {-1.59,-1.71} (pu). From Nodal Analysis to Power Flow Analysis In