% Program pro vypocet cinnych a jalovych ztrat 

% Un [kV]
Un=110
% Pmax [MW]
Pmax=40
% cos Fi [-]
CosFi=0.95
% Sn [MVA]
Sn=40
% Td [hod]
Td=12
% T [hod]
T=Td*365
% Tp [hod]
Tp=8760
% Tz [hod]
% Tz=T*sqrt(T/Tp)
Tz=T*sqrt(T/Tp)
% dP0 [%]
dP0p=0.3
% dPk [%]
dPkp=1
% Uk [%]
Ukp=10
% I0 [%]
I0p=1

dP0=dP0p/100*Sn*1000
dPk=dPkp/100*Sn*1000
dP0r=dP0*Tp/1000
dPkr=dPk*Tz/1000*((Pmax/CosFi)/Sn)^2
dPr=dP0r+dPkr
Ap=T*Pmax
dPp=dPr/Ap*100

Odm3=sqrt(3);
Inorm=Sn/(Odm3*Un)
I0=I0p/100*Inorm*1000
Q0=Odm3*Un*I0
dQ0r=Q0*Tp/1000
Urp=dPkp
Uxp=sqrt(Ukp*Ukp-Urp*Urp)
Qk=Uxp/100*Sn*1000
dQkr=Qk*Tz*((Pmax/CosFi)/Sn)^2/1000
dQr=dQ0r+dQkr
