clear; clc; xst=20; xtr=28; xs=250; xt=15; v1=25e3; r1=500e6/.8; v2=220e3; rb=600e6; vb=25e3; xf=rb/r1; xst=xst*xf/100; xtr=xtr*xf/100; xs=xs*xf/100; xt=xt/100; xeqs=inv(inv(xst)+inv(xt)); xeqt=inv(inv(xtr)+inv(xt)); xeg=inv(inv(xs)+inv(xt)); e=1; xeqs=round(xeqs*1000)/1e3; is=e/xeqs; is=round(is); it=e/xeqt; ig=e/xeg; i1=is*xt/(xt+xst); i2=is*xst/(xst+xt); ib=rb/(1.726*22.2*1e3); Is=is*ib; i1=round(i1*10)/10; Is=round(Is/1e3)*1e3; i2=fix(i2*100)/0100; I1=i1*ib; I2=i2*ib; I1=fix(I1/1e2)*1e2; I2=fix(I2/1e2)*1e2; mprintf("total subtransient current T-off=%fkA\nsubtransient current on generator side=%fkA\n subtransient current on transformer side=%fkA",Is/1e3,I1/1e3,I2/1e3);