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

1 次查看(过去 30 天)
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