generate matlab code for battery state of charge

19 views (last 30 days)
i have bulit an electric vehicle model in simulink. Now i want to run a simulation model for long time, but the problem that battery SoC reach to zero. i want to generate code to make the battery recover its capacity when the SoC reaches 20% to be 100% again.

Answers (1)

Sabin
Sabin on 30 Sep 2023
You need to include a charge/discharge mechanism to protect the battery pack being drained out to 0 SOC. A good place to start is Simscape Battery, a product introduced in R2022b. There are several relevant examples. Check for example:

Categories

Find more on Energy Storage in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!