This is the battery model based on the SOC ann battery capacity.
The formula is based on SOC=SOC-1/CAPbat*int(I)dt.
Reference: M. Zhang and X. Fan, "Review on the state of charge estimation methods for electric vehicle battery," World Electric Vehicle Journal, vol. 11, p. 23, 2020.
Razman Ayop (2023). Function of Battery Model for Energy Management System (https://www.mathworks.com/matlabcentral/fileexchange/89892-function-of-battery-model-for-energy-management-system), MATLAB Central File Exchange. 검색됨 .