How to store the existing value in a array format. Here I have given the charging and discharging limits but it does not check it properly. can anyone help me to sort out this
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
i_soc=30 %soc charging
% i_soc=90 %soc discharging
ev_a=5 %ev entering time
ev_d=9 % ev leaving time
pevchg=3 % EV maximum/minimum charging power
pevdchg=3
cev=24; % ev battery capacity
for i=1:5
if (i_soc>20 && i_soc<90)
f_SOC(i)=i_soc+(pevchg*(i))/cev*100; % soc charging equation
temp=f_SOC(i)
i_soc=temp
else if (i_soc>90)
f_SOC(i)=temp-(pevdchg*(i))/cev*100 %soc discharging equation
i_soc=f_SOC(i)
end
end
end
0 commentaires
Réponses (1)
VBBV
le 15 Déc 2022
f_SOC(i) = i_soc-(pevdchg*(i))/cev*100 %soc discharging equation
May be you mean i_soc instead of temp in discharging cycle
6 commentaires
VBBV
le 15 Déc 2022
From the equation shown it appears that are more variables to be considered. Can you tell what is Tij used as summation? Presumably temperature or timestamp. The code shown also appears incomplete with an extra for loop missing. Pls post full code.
Voir également
Catégories
En savoir plus sur Ordinary Differential Equations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!