How to use a custom simscape battery model block in battery builder app?

13 ビュー (過去 30 日間)
Soham Dange
Soham Dange 2024 年 8 月 28 日
コメント済み: Soham Dange 2024 年 9 月 10 日
I am building a custom simscape battery model block which I want to use to simulate a battery pack. How can I use it in the battery builder app?
What common inputs, outputs and nodes do I need to have for my lock in-order to use it in the battery builder app?
Also, instead of simscape, an I use simulink blocks in battery builder app?

回答 (2 件)

Subhajyoti
Subhajyoti 2024 年 9 月 3 日
You can use the “buildBattery” function to build custom library blocks from battery objects. It generates one or more custom Simscape library files and a MAT file from the battery object. You can then import the battery objects into the “Battery Builder” App from your workspace or from a MAT file. The steps are as follows:
  1. Under the Battery Builder tab, in the Import section of the toolstrip, click Import.
  2. Then click Import from Workspace or Import from MAT-file.
The Battery Builder app typically expects certain inputs, outputs, and nodes to facilitate the simulation of battery packs.
Some of the common I/O are as follows:
  • Voltage (V): Your block should output the terminal voltage of the battery. This is essential for monitoring and controlling the battery pack.
  • Current (I): The block should accept current as an input, simulating the load or charging current.
  • State of Charge (SoC): Providing the state of charge as an output is crucial for battery management systems to track the battery's capacity.
  • Temperature (T): Depending on your model's complexity, temperature can be an input (if you are simulating thermal effects externally) or an output (if your model internally calculates temperature changes).
Electrical Nodes:
  • Positive Terminal: Serves as the positive connection point for the battery.
  • Negative Terminal: Serves as the negative or ground connection point.
The following are some helpful resources you can refer to for modelling Batteries in Simulink:
I hope this helps.
  1 件のコメント
Soham Dange
Soham Dange 2024 年 9 月 10 日
Thank you for detailed explanation. I will try it out.

サインインしてコメントする。


Xiangchun
Xiangchun 2024 年 9 月 6 日
Hi Soham,
When using Battery Builder, you can use your own custom cell block built in Simscape, as long as your custom cell block meets all of these requirements:
  • The custom block must provide exactly two electrical conserving ports named n and p.
  • All variables must be scalar-valued.
  • The custom block cannot contain a variable or intermediate variable called power_dissipated.
For details, please refer to CellModelBlockPath under Properties for CellModelBlock: Set of conditional parameters for Cell object - MATLAB (mathworks.com).
If you use Battery Builder API, here is how to do it:
If you use Battery Builder App, you can change the CellModelBlockPath under "Cell Model Options" accordingly.
The Battery Builder in Simscape Battery only supports cell blocks built in Simscape, and it does not support cell blocks built in Simulink.
Here is the documentation on how to create custom components in Simscape:
Best wishes,
Xiangchun

カテゴリ

Help Center および File ExchangeChoose and Parameterize Blocks についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by