% Prechodne deje relizovane na transformatoru
% a vedeni

% Obecne parametry
Un=400
Um=Un/sqrt(3)*sqrt(2)
f=50
Omega=2*pi*f

% Parametry transformatoru
Sn=1000

% Nasledujici parametry zadany v procentech
Uk=9
I0=1
dPk=1
dP0=0.3
dPcu=dPk
dPfe=dP0

% Odvozene parametry nahradniho schematu
% Transformator
Rk=(dPk/100)*(Un^2/Sn)
Zk=(Uk/100)*(Un^2/Sn)
Xs=sqrt(Zk^2-Rk^2)
Ls=Xs/Omega
Rk1=Rk/2
Ls1=Ls/2
Xs1=Xs/2

Gfe=(dP0/100)*(Sn/Un^2)
Rfe=1/Gfe
Yg=(I0/100)*(Sn/Un^2)
Xh=1/sqrt(Yg^2-Gfe^2)
Lh=Xh/Omega

% Jmenovite hodnoty velicin
In=Sn/(Un*sqrt(3))
Zn=Un^2/Sn
