The code I am using ''idx'' is giving me wrong Voltage value.

조회 수: 1 (최근 30일)
MUHAMED SIDIBEH
MUHAMED SIDIBEH 2022년 2월 21일
댓글: Voss 2022년 2월 22일
The voltage is suppose to drop as I increase the temperature, but the ''idx'' selects the highest Voltage value in the vector. Is there way to reduce the Vpmax as the temperature increases?
Io = 0.1*10^(-9);
IL = 9.5;
V = linspace(0,0.691,100);
q = 1.6*10^(-19);
k = 1.380649*10^(-23);
% Temperature at 45°C and Irradiance of 900 W/m^2
T = 273.15+45;
G =700;
Gr = 1000;
I = (IL*(G./Gr))-(Io.*(exp((q.*V)./(k.*T))-1));
n = 72;
Vp = V.*n;
P = (I.*Vp);
[Pmax,idx] = max(P);
Imax = I(idx);
Vpmax = Vp(idx);
Isc = max(I);
Voc = max(Vp);
figure(8)
plot(Vp,P,'r','linewidth',2);
xlabel('Voltage (V)','fontsize',15);
ylabel('Power (W)','fontsize',15);
title('PV Panel PV Curve at 45°C 900 W/m^2','fontsize',15)
grid minor
axis([0,55,0,400])
figure(9)
plot(Vp,I,'k','linewidth',2);
xlabel ('Voltage [V]','fontsize',15);
ylabel ('Current [A]','fontsize',15);
title('PV Panel IV Curve at 45 °C 900W/m^2','fontsize',15)
yline(Imax)
xline(Vpmax)
text(Vpmax,Imax,['MPP=',num2str(Pmax),'[W]'])
grid minor
axis([0,55,0,9])
Any help will be greatly appreciated
  댓글 수: 1
Voss
Voss 2022년 2월 22일
idx, as calculated, is the index where P (Power) is at its maximum, not Voltage.
[Pmax,idx] = max(P); % idx: index of maximum Power
Also, temperature is a scalar constant, so I'm not sure why you say Voltage is a function of Temperature in this code. Can you please clarify?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Renewables에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by