Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modelica vs Simscape

This question has two main aspects actually. Right at the beginning, I have to admit that I am totally new to physical modeling and would be glad to be corrected as well, not only be answered. For those who find it too long to read, I can give a brief summary:

1) Simulink vs Modelica

2) Simscape vs Modelica

1) The first one is the comparison of modeling approaches. Conventionally, there are different names for the two main approaches I want to compare:

# Signal flow approach / block-based modeling / causal modeling ...: The typical models in Simulink. There are boxes with inputs and outputs and transfer functions in between.

vs

# Network Approach / component-based modeling / acausal(noncausal) modeling... : There are physical ports instead of signal I/O and the flow entities(current, heat etc) can flow in both directions.

In this comparison, I have read some opinions in the web and searched for some papers. It comes down to the comparison of Modelica based development environments and Simulink (for example), as far as I get. Disadvantages and advantages of these two are more clear to me than the other point I want to ask.

2) After reading much on the first comparison, it was more preferable for me to go with component-based modeling. However, Modelica isn't the only option here. There is also Simscape, using which you can combine physical ports (as in Modelica) with block-based modeling of Simulink.

I would like to know the advantages and disadvantages of this Simscape vs Modelica comparison. To avoid misunderstanding, I need to underline that Modelica is a language. Therefore, it would be more meaningful to compare any Modelica environment with Simscape, let's say, OpenModelica vs Simscape

like image 222
Falsterbo Avatar asked Sep 11 '17 11:09

Falsterbo


1 Answers

My personal experience as co-author of Physiolobrary and currently Physiolibrary.models.

  1. In our group we concluded that combination of acausal and signal oriented approaches are appropriate in Modelica. Acausal approach is appropriate for combining components modeling basic physical laws of a modeled system - such components are more reusable. Signal approach is appropriate to add proprietary components to the modeled system where causality is known or hypothesized (controling heart rate etc.) We discussed details at https://doi.org/10.1016/j.compbiomed.2014.08.025 or recently at https://doi.org/10.1016/j.bbe.2017.08.001

  2. One disadvantage in Simscape is libraries, or lack of it. To model e.g. cardiovascular system, you may need to use analogy of electrical circuit. While this simplification is usually accepted in research or industry you may loose preciseness and increase probability of errors. This was problem in Modelica too until third party library Physiolibrary is available.

  3. However, it's much easier to reproduce (reimplement) Simscape model in Modelica as we did e.g. within paper http://mj.mefanet.cz/mj-04140914 than any block oriented model - doesn't matter if in Modelica or Simulink.

like image 93
Tomas Kulhanek Avatar answered Sep 17 '22 15:09

Tomas Kulhanek