Creating if loop connecting output of subsystem to input of main system

3 ビュー (過去 30 日間)
Yaashiene Pukazhendi
Yaashiene Pukazhendi 2023 年 5 月 25 日
回答済み: Animesh 2023 年 8 月 25 日
I am modifying a model of a 6s2p battery pack. The current model has a drive cycle input where the file consists of time and current input.
I would like to modify the drive cycle such that it starts charging with 0.1C constant current until one of the cells in the subsystem of the pack reaches 4.2V, then a constant voltage drive cycle is inputted for 7200s. Next, the pack is discharged at 0.1C constant current until it reaches 2.5V.
After conducting this, I would like to cycle the pack. This is done by introducing the same profile as above but at 0.5C. After 50 cycles, I would like it to rerun the initial 0.1C test.
I am new to Simulink and Simscape and appreciate any help in terms of code and advice.
I have attached pictures of the model.

回答 (1 件)

Animesh
Animesh 2023 年 8 月 25 日
Hello Yaashiene,
I understand that you wish to modify the “drive_cycle” input in your battery pack model according to your requirements.
You can modify the “drive_cycle” input according to your desired values and conditions using a MATLAB function block in Simulink and then connecting it to the “variable load” block using Simulink-PS Converter. A MATLAB function block, in your case, would enable you to modify the current supplied by “drive_cycle” input depending on the voltage of cells in the subsystem.
For more information on using a function block and Simulink-PS converter, please consider going through the following resources:
  1. Implement MATLAB Functions in Simulink with MATLAB Function Blocks: https://in.mathworks.com/help/simulink/ug/what-is-a-matlab-function-block.html
  2. Connecting Simscape Diagrams to Simulink Sources and Scopes: https://in.mathworks.com/help/simscape/ug/connecting-simscape-diagrams-to-simulink-sources-and-scopes.html
I hope this helps!

カテゴリ

Help Center および File ExchangeCreating Custom Components and Libraries についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by