Simscape Physical Signal: Why does is exist?

11 visualizaciones (últimos 30 días)
Joren Sips
Joren Sips el 19 de En. de 2018
Comentada: Dan Herbison el 5 de Abr. de 2018
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?

Respuesta aceptada

Nicolas Schmit
Nicolas Schmit el 24 de En. de 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.

Más respuestas (1)

Steve Miller
Steve Miller el 25 de En. de 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.
--Steve
  1 comentario
Dan Herbison
Dan Herbison el 5 de Abr. de 2018
This seems like a UI matter, rather than a numerical issue.
Couldn't your block diagram parser interpret whether a signal is attached to a Simulink block (thus needing to have certain properties) and formulate the required math, as needed, under the hood?
Circuit simulators do this sort of thing automatically when an event driven signal (digital or analog state) is attached to an analog port, i.e. a domain transformer model is automatically inserted by the netlister.

Iniciar sesión para comentar.

Categorías

Más información sobre Physical Units en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by