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 回表示 (過去 30 日間)
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

採用された回答

Alan Stevens
Alan Stevens 2023 年 3 月 3 日
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 件のコメント
Aryan Sharma
Aryan Sharma 2023 年 3 月 12 日
Thx alan, you helped me identify my mistake.
P.S: I had applied wrong equation for kref thats why the plot was coming wrong

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolar Power についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by