I have been trying to code a solar pv module for 1 diode model, the following is my code, can someone tell me the mistake ive made and the correction to it pls.

1 vue (au cours des 30 derniers jours)
clc;
clear all;
Pmpp = 50; %Max Power
Vmpp = 17.98; %Vol at Pmax
Impp = 2.77; %Current at Pmax
Isc= 3; %Short-circuit current
Voc= 22; %Open Circuit Voltage
a= 0.0004; %Temp coeff. of Isc
b= -0.0033; %Temp coeff. of Voc
T = 28;
Tref= 25;
S= 800;
Sref= 1000;
Rs= 0.085;
V= 20;
kref= (((Vmpp+Rs*Impp)/Voc)-1)*(1-(Impp/Isc))^0.5;
Vo = Voc*(1+ a*log(S/Sref)+ b*(T-Tref));
I= zeros(330,1);
i=1;
I(1,1)=0;
for V= 32.9:-0.1:0
Is = Isc*(1+a(T-Tref))*(S/Sref);
I(i,1)= Isc(1-kref.^((V-Voc+Rs*I)/Voc));
i=i+1;
end

Réponse acceptée

Alan Stevens
Alan Stevens le 3 Mar 2023
Like this? Note: I've made kref positive to avoid the I's being complex. This might be completely incorrect!!
Pmpp = 50; %Max Power
Vmpp = 17.98; %Vol at Pmax
Impp = 2.77; %Current at Pmax
Isc= 3; %Short-circuit current
Voc= 22; %Open Circuit Voltage
a= 0.0004; %Temp coeff. of Isc
b= -0.0033; %Temp coeff. of Voc
T = 28;
Tref= 25;
S= 800;
Sref= 1000;
Rs= 0.085;
V= 20;
kref= -(((Vmpp+Rs*Impp)/Voc)-1)*(1-(Impp/Isc))^0.5; %%%% Made kref positive
Vo = Voc*(1+ a*log(S/Sref)+ b*(T-Tref));
I= zeros(330,1);
for i = 1:330
V(i)= (i-1)*0.1;
Is = Isc*(1+a*(T-Tref))*(S/Sref); %%%% a*(T-Tref)
I(i)= Isc*(1-kref.^((V(i)-Voc+Rs*I(i))/Voc)); %%%% Isc*(1-etc. and I(i)
end
plot(V,I),grid
xlabel('V'),ylabel('I')
  1 commentaire
Aryan Sharma
Aryan Sharma le 12 Mar 2023
Thx alan, you helped me identify my mistake.
P.S: I had applied wrong equation for kref thats why the plot was coming wrong

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Solar Power dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by