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 visualizzazione (ultimi 30 giorni)
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

Risposte (1)

VBBV
VBBV il 15 Dic 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 Commenti
VBBV
VBBV il 15 Dic 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.

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by