Simscape Physical Signal: Why does is exist?
24 views (last 30 days)
What is the added value of simscape physical signals compared to normal simulink signals? As far as I can see, from a functional perspective there is no difference between the two types of signals: I can add units to both types, they both have a direction of flow, and they both have similar function blocks like adding, substracting... Only for physical signals the available types of blocks is very limited. Why didn't the matlab guys just use normal simulink lines instead of the physical signals?
Nicolas Schmit on 24 Jan 2018
Simulink signals are causal signals with a sampling rates. Simscape physical signals are variables with time derivatives. These are two different objects, although they serve the same purpose. Because of the way Simscape simulates physical systems it is not possible to directly mix Simulink signals with the Simscape variables.
More Answers (1)
Steve Miller on 25 Jan 2018
The important difference between a Simscape physical signal and a Simulink input/output signal is this:
- the mathematical relationships defined by Simscape physical signals are all evaluated simultaneously
- the mathematical operations defined by Simulink blocks are evaluated sequentially (one after the other)
Creating a mathematical expression using Simulink blocks can create an algebraic loop, where the value of block inputs depends on the value of the outputs of the same block. In many cases, expressions with algebraic loops cannot be evaluated directly in Simulink. The same expression implemented with Simscape Physical Signal blocks can be simulated without modification, and no algebraic loop error will result.
Equations that result in algebraic loops are very common in physical systems, which is a main reason that Simscape technology was created by MathWorks.
You do not have to use the physical signal blocks if you do not want to. You could implement the equations directly in Simscape language . However, some people are more comfortable with graphical languages than textual languages, so we give users both options for modeling equations with algebraic constraints - graphical and Simscape language.
You can use the Simulink blocks with Simscape physical networks if you wish, but be very careful not to introduce an algebraic loop. The documentation explains why algebraic loops are undesirable and how to identify algebraic loops in your model. You will save yourself a lot of time and frustration by simply implementing the equations in Simscape directly if at all possible.