Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
MUHAMED SIDIBEH
MUHAMED SIDIBEH le 21 Fév 2022
Commenté : Voss le 22 Fév 2022
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 commentaire
Voss
Voss le 22 Fév 2022
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?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by