- Use “MATLAB function” block to evaluate the sign of the LFC signal and decide whether to charge or discharge the EV battery.
- Apply conditions like “energy < E_max”(maximum battery capacity) and “energy > E_min” (minimum battery capacity) to control the charging and discharging switches.
Can any one help? how to develop the code or logic for electric vehicle charging and discharging limits as mentioned in picture and what should be the values of threshold.
2 次查看(过去 30 天)
显示 更早的评论
Can any one help? how to develop the code or logic for electric vehicle charging and discharging limits as mentioned in picture and what should be the values of threshold.
0 个评论
采纳的回答
MULI
2024-9-13
Hi Imran,
I understand that you are asking about the logic that controls the charging and discharging limits of electric vehicles (EVs) based on the Load Frequency Control (LFC) signal and battery energy levels.
You can follow the below steps to achieve this:
function delta_pe = ev_logic(lfc_signal, energy, E_max, E_min)
% Logic for controlling charging and discharging
if lfc_signal < 0 && energy < E_max
% Charging
delta_pe = charge_power;
elseif lfc_signal > 0 && energy > E_min
% Discharging
delta_pe = -discharge_power;
else
% No charging or discharging
delta_pe = 0;
end
end
E_max: 90% of the EV battery capacity. This prevents overcharging by stopping the charging process when the battery reaches 90% capacity.
E_min: 80% of the EV battery capacity. This prevents over-discharging by stopping discharging when the battery depletes to 80%.
These values can be adjusted based on specific EV battery characteristics or system requirements.
You can refer to this link for battery electric vehicle model in simscape
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!