How to connect battery exported as FMU to grid?

2 ビュー (過去 30 日間)
Costas Mylonas
Costas Mylonas 2021 年 6 月 11 日
コメント済み: Wenhan Huang 2021 年 7 月 30 日
I have an electricity network with 4 bus in which I connect different devices, like PVs, betteries, etc as FMUs. I would like to use the battery model from simscape, but I am not sure how is the proper way to connect it to the bus after I have exported it as FMU. I can understand that the outputs are the SOC, the voltage and the current, but I do not know what to connect in the input. Should I connect it directly to the bus?

採用された回答

Wenhan Huang
Wenhan Huang 2021 年 7 月 30 日
Hi Costas,
I understand that you are trying to connect bus ports for an exported FMU with simscape model.
As you may know, FMI2.0 and FMI1.0 standards only accept scalar as ports. To comply with FMI standards, Simulink needs to expand Bus signal and array signals, etc into scalar signals. For Buses, Simulink uses the following strategy:
bus1-subbus1-signal1 -> bus1.subbus1.signal1
-signal2 -> bus1.subbus1.signal2
-signal3 -> bus1.signal3
in 2020a+, FMU import block should automatically group scalar signals of a Simulink exported FMU back to Buses, which means you can to directly connect the buses to FMU Import block. For other use cases, the FMU users need to manually connect the scalar signals. You should be able to use a bus selector block to achieve so.
Wenhan
  1 件のコメント
Wenhan Huang
Wenhan Huang 2021 年 7 月 30 日
Just confirmed with Development, the feature grouping scalar signal to buses is introduced in 17b.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by