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.
조회 수: 2 (최근 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
댓글 수: 0
채택된 답변
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')
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Solar Power에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!