diff options
Diffstat (limited to '3793/CH13/EX13.7/exp_13_7.sce')
-rw-r--r-- | 3793/CH13/EX13.7/exp_13_7.sce | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/3793/CH13/EX13.7/exp_13_7.sce b/3793/CH13/EX13.7/exp_13_7.sce new file mode 100644 index 000000000..d90293d80 --- /dev/null +++ b/3793/CH13/EX13.7/exp_13_7.sce @@ -0,0 +1,69 @@ +clear;
+clc;
+Ybus=zeros(4,4);
+Za=%i*.1;
+Z12=%i*.25;
+Z14=%i*.4;
+Z43=%i*.1;
+Z42=%i*.2;
+Z32=%i*.1;
+Z13=%i*.5;
+Zg=%i*4;
+
+V1=1;
+V2=complex(.9787,-.0513);
+V3=complex(1.019,.0445);
+V4=complex(1.0098,-.0176);
+Ybus(1,1)=1/Zg+1/Z12+1/Z13+1/Z14;
+Ybus(1,2)=-1/Z12;
+Ybus(2,1)=Ybus(1,2);
+Ybus(1,3)=-1/Z13;
+Ybus(3,1)=Ybus(1,3);
+Ybus(1,4)=-1/Z14;
+Ybus(4,1)=Ybus(1,4);
+Ybus(2,2)=1/Z12+1/Z32+1/Z42;
+Ybus(2,3)=-1/Z32;
+Ybus(3,2)=Ybus(2,3);
+Ybus(2,4)=-1/Z42;
+Ybus(4,2)=Ybus(2,4);
+Ybus(3,3)=1/Z13+1/Z43+1/Z32;
+Ybus(3,4)=-1/Z43;
+Ybus(4,3)=Ybus(3,4);
+Ybus(4,4)=1/Z14+1/Z43+1/Z42;
+Z=inv(Ybus);
+Zt34=Z(3,3)+Z(4,4)-2*Z(3,4);
+V=[V1;V2;V3;V4];
+I12=(V1-V2)/Z12;
+I13=(V1-V3)/Z13;
+I14=(V1-V4)/Z14;
+I23=(V2-V3)/Z32;
+I24=(V2-V4)/Z42;
+I34=(V3-V4)/Z43;
+Zaa=-Za;
+Zden=Zt34-Zaa;
+L1234=Zaa/Z12*((Z(1,3)-Z(1,4))-(Z(2,3)-Z(2,4)))/Zden;
+L1334=Zaa/Z13*((Z(1,3)-Z(1,4))-(Z(3,3)-Z(3,4)))/Zden;
+L1434=Zaa/Z14*((Z(1,3)-Z(1,4))-(Z(4,3)-Z(4,4)))/Zden;
+L2334=Zaa/Z32*((Z(2,3)-Z(2,4))-(Z(3,3)-Z(3,4)))/Zden;
+L2434=Zaa/Z42*((Z(2,3)-Z(2,4))-(Z(4,3)-Z(4,4)))/Zden;
+I112=I12+L1234*I34;
+I113=I13+L1334*I34;
+I114=I14+L1434*I34;
+I223=I23+L2334*I34;
+I224=I24+L2434*I34;
+Iinj=Ybus*V;
+S1=V(1)*conj(Iinj(1));
+S2=V(2)*conj(Iinj(2));
+S3=V(3)*conj(Iinj(3));
+S4=V(4)*conj(Iinj(4));
+K321=(Z(3,1)-Z(2,1))/Z32;
+K323=(Z(3,3)-Z(2,3))/Z32;
+delIinj1=.8340;
+delIinj3=-delIinj1;
+delI32=K321*delIinj1+K323*delIinj3;
+I32d=I23+delI32;
+In=[(Iinj(1,1)+delIinj1);Iinj(2,1);(Iinj(3,1)+delIinj3);Iinj(4,1)];
+Vnew=inv(Ybus)*In;
+I32n=(Vnew(3)-Vnew(2))/Z32;
+mprintf("Power at each bus are S1=%.4f+%.4f, S2=%.4f%.4f, S3=%.4f+%.4f and S4=%.4f+%.4f\n",real(S1),imag(S1),real(S2),imag(S2),real(S3),imag(S3),real(S4),imag(S4));
+mprintf("Change in current is I32=%.4f%.4f",real(I32n),imag(I32n));
|