% Prechodne deje relizovane na transformatoru a vedeni

% Merne parametry vedeni 
Rp1=0.3
Xp1=0.4
Lp1=Xp1/omega
Cp1=10E-9
Bp1=Cp1*omega
Gp1=0

% Vedeni
delka=50

Rp=Rp1*delka
Xp=Xp1*delka
Lp=Lp1*delka
Cp=Cp1*delka
Bp=Bp1*delka
Gp=Gp1*delka

Rpv=delka*Rp
Xpv=delka*Xp
Lpv=Xpv/omega
Bpv=delka*Bp
Cpv=Bpv/omega
Gpv=delka*Gp

Iv0=Un2/sqrt(3)*omega*Cp

pre=Un1/Un2;
kvpre=pre^2;
Iv0c=Un1/sqrt(3)*omega*Cp/kvpre
Iv0c=Un1/sqrt(3)*Bp/kvpre
Iv0c=Iv0/pre

% Jmenovita zatez
CosFi=0.85
Pn=Snt*CosFi
Qn=Snt*sin(acos(CosFi))
Rz=Un2^2/Pn
Xz=Un2^2/Qn
Lz=Xz/omega

% Jmenovita zatez 2
CosFi=0.85
Pz=Snt*CosFi
Qz=Snt*sin(acos(CosFi))
Qz=sqrt(Snt^2-Pz^2)
Zz=Un2^2/(Pz - i*Qz)
Rz=real(Zz)
Lz=imag(Zz)/omega
