clc
clear
Sn=630e+3;U1n=10e+3;U2n=3.15e+3; I1n=36.4;I2n=11.5;f=50;Tc=10; mph = 3;
p20 = 20e+3; U20 = 3.15e+3; I20 = 6.93; p1kn = 7.89e+3; U1k = 450; I1k = I1n; k = (U1n/sqrt(3))/U20;
Zmp = U20/(I20/sqrt(3));
rmp = p20/3/(I20/sqrt(3))^2;
Xmp = sqrt(Zmp^2-rmp^2);
Zm = k^2 * Zmp
rm = k^2 * rmp
Xm = k^2 * Xmp
Zk = (U1k/sqrt(3))/I1k;
rk = p1kn/3/I1k^2;
Xk = sqrt(Zk^2 - rk^2)
rk75 = (234.5 + 75)/(234.5 + Tc) * rk
Zk75 = sqrt(rk75^2 + Xk^2)
pkn = mph * I1n^2 *rk75;
uk = I1n * Zk75/(U1n/sqrt(3));
uka = I1n * rk75/(U1n/sqrt(3));
ukr = I1n * Xk/(U1n/sqrt(3));
cosfai1 = 0.8; cosfai2 = 1; cosfai3=0.8;
for m = 1:3
if m == 1
cosfai = cosfai1;
sinfai = sqrt(1-cosfai^2);
elseif m == 2
cosfai = cosfai2;
sinfai = 1-sqrt(cosfai);
else
cosfai = cosfai3;
sinfai = -sqrt(1-cosfai^2);
end
for i = 1:20000
I2(i) = 1.5 * i/2000 * I2n;
beta(i) = I2(i)/I2n;
detaU = beta(i) * (I1n * rk75 * cosfai + I1n * Xk * sinfai)/U1n/sqrt(3);
U2(i) = U2n * (1-detaU);
eta(i) = 1-(p20 + beta(i)^2 * pkn)/(beta(i) * Sn *cosfai + p20 + beta(i)^2 * pkn); end
subplot(2,1,1);plot(I2,U2,'-');
xlabel('I2[A]');ylabel('Voltage U2[V]');
title ('Output Charateristic');
hold on;
subplot(2,1,2);plot(I2,eta,'-');
xlabel('I2[A]');ylabel('Efficiency eta[ % ]');
title('Efficiency Charateristic');
hold on;
end
disp('End');