Escolar Documentos
Profissional Documentos
Cultura Documentos
6;
Imp = 8.66;
Pmp = Vmp*Imp;
Isc = 9.23;
Voc = 37.7;
Ns = 60;
Ki = 0.065;
Kv = -80e-3;
Kvporc= 100*Kv/Voc;
Tc = 45;
Gc = 1000;
A = 1.3;
k = 1.38065e-23;
q = 1.602e-19;
Gstc = 1000;
Tstc = 25;
Eg = 1.12;
k=1.3805e-23;
q=1.6e-19;
T=273.13+25;
Vt = k*T/q;
Io = Isc/((exp(Voc/(a*Ns*Vt)))-1) %¨ref
Rs_0=0.10;
Rs_increment= 0.001;
Rp_0=10;
Rp_increment=1;
Iphn=Isc;
Iph_increment=0.001;
MinErr=inf;
for aa=1:1000
for bb=1:1000
for cc=1:100
Rs=Rs_0+Rs_increment*aa;
Rp=Rp_0+Rp_increment*bb;
Iph=Iphn+Iph_increment*cc;
RsErr=(Vmp/Imp)-
((a*Ns*Vt*Rp)/((Io*Rp*exp((Vmp+(Imp*Rs))/(a*Ns*Vt)))+(a*Ns*Vt)))-Rs;
RpErr=(Vmp+(Imp*Rs))/(Iph-Imp-
Io*(exp((Vmp+(Imp*Rs))/(a*Ns*Vt))-1))-Rp;
IphErr=(((Rp+Rs)/Rp)*Isc)-Iph;
TotalErr=RsErr^2+RpErr^2+IphErr^2;
if TotalErr<MinErr
MinErr=TotalErr;
Rsnew=Rs;
Rpnew=Rp;
Iphnew=Iph;
end
end
end
end
Rp=Rpnew
Rs=Rsnew
Iph=Iphnew
end