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

1 visualización (últimos 30 días)
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 comentario
Luis
Luis el 24 de En. de 2025
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).

Iniciar sesión para comentar.

Respuestas (1)

Javier Gazzarri
Javier Gazzarri el 24 de En. de 2025
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

Categorías

Más información sobre Simscape Battery en Help Center y File Exchange.

Productos


Versión

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by