% Vypocet vazebnich reaktanci a admitanci pro ruzne pripady
echo on
% 1 - Predporuchovy bezvadny stav
% tentokrat verse s Xdc
% Xd=1.2*(0.98/20)*110^2*i
X11P1=Xdc+Xt1+Xv/2+Xt2+Xs
Y11P1=1/X11P1
X12P1=Xdc+Xt1+Xv/2+Xt2+Xs
Y12P1=1/X12P1
pause

% 2 - Jednofazovy zemni zkrat
Xi2=Xdc+Xt1+X11
Xj2=X21+Xt2+Xs
Xk2=X31+Zekv
X11P2=Xi2+Xj2*Xk2/(Xj2+Xk2)
Y11P2=1/X11P2
X12P2=(Xi2*Xj2+Xi2*Xk2+Xj2*Xk2)/Xk2
Y12P2=1/X12P2
pause

% 3 - Trojpolovy zkrat
Xi3=Xi2
Xj3=Xj2
Xk3=X31
X11P3=Xi3+Xj3*Xk3/(Xj3+Xk3)
Y11P3=1/X11P3
X12P3=(Xi3*Xj3+Xi3*Xk3+Xj3*Xk3)/Xk3
Y12P3=1/X12P3
pause

% 4 - Odpojeni poruchy
X11P4=Xdc+Xt1+Xv+Xt2+Xs
Y11P4=1/X11P4
X12P4=Xdc+Xt1+Xv+Xt2+Xs
Y12P4=1/X12P4
pause

Us=110000/sqrt(3)
E=85000
% 1 - Predporuchovy bezvadny stav
P1max=E*Us/abs(X12P1)

% 2 - Jednofazovy zemni zkrat
P2max=E*Us/abs(X12P2)
pause

% 3 - Trojpolovy zkrat
P3max=E*Us/abs(X12P3)

% 4 - Odpojeni poruchy
P4max=E*Us/abs(X12P4)
pause

% Pocatecni podminka zatezneho uhlu
% Pro vykon 7 MW na fazi
delta1=asin(7E6/P1max)
delta1st=delta1*180/pi
pause

% Pro vykon 6 MW na fazi
delta2=asin(6E6/P1max)
delta2st=delta2*180/pi
pause

% Pro vykon 5 MW na fazi
delta3=asin(5E6/P1max)
delta3st=delta3*180/pi
pause

