Error when change battery parallel and/or series cells in battery module assembly

3 次查看(过去 30 天)
I'm using the example model charge discharge module assembly with coolant control (openExample('simscapebattery/chargeDischargeModuleAssemblyWithCoolantControlExample'). But I change the size of the battery module (for example: number of parallel cells from 4 to 6, and number of series assemblies still on 3) in the CoolantControlCreateLib.mlx.
Then I run ChargeDischargeModuleAssemblyWithCoolantControlExample.mlx but appears an error saying:
Error compiling Simscape network for model coolantControl.
Caused by:
['coolantControl/ModuleAssembly/Module1']: Length of Current (positive in) must be equal to Batteries in Parallel.
Line 55 is:
assert(length(batteryCurrent) == P);
In ParallelAssemblyType1.ssc, P is the parallel cells. Equal to 6.
I don't understand why length of batterycurrent is not 6.
I checked almost everything and I don't know what is the cause of the error. thanks!
  1 个评论
Luis
Luis 2025-1-24
I found the problem, it is mandatory to delete the Battery Module Block in SImulink, and add the new Battery Module Block from the library. If you don't delete the old Block, the configuration of the battery still the same (4 parallel instead 6).

请先登录,再进行评论。

回答(1 个)

Javier Gazzarri
Javier Gazzarri 2025-1-24
Hello Luis,
Glad to hear you found the problem.
Another point for you to consider is that you do not need to change the .ssc files since the values used there are placeholders for the value specified in the block you use in the Simulink model. Please bear that in mind since you may be making a modification that causes the ssc file to not compile.
Best regards,
Javier

类别

Help CenterFile Exchange 中查找有关 Simscape Battery 的更多信息

产品


版本

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by