フィルターのクリア

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 回表示 (過去 30 日間)
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

回答 (1 件)

VBBV
VBBV 2022 年 12 月 15 日
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 件のコメント
VBBV
VBBV 2022 年 12 月 15 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by