Why do blocks in a Simscape model have different execution order numbers?

I am trying to understand execution order in a Simscape physical network. When I display the execution order, different blocks have different numbers, even though the physical components are interconnected.
Do these numbers mean that one physical component acts before another? Why is an execution order needed for a physical network.

 Accepted Answer

In Simscape, execution order describes computational ordering. It does not represent physical time or physical causality.
Consider an electrical circuit containing a voltage source, resistor, and capacitor. The components are interconnected, and their voltages and currents must satisfy the governing relationships of the circuit. In a Simscape physical network, these components contribute equations describing the system. They do not define a physical sequence in which the voltage source acts first, followed by the resistor and then the capacitor.
Although the physical network is described by coupled equations, a computer still needs to perform calculations to simulate it. At a particular simulation time, the simulation software performs the calculations needed to determine a solution that satisfies the model equations. Some calculations depend on values produced by other calculations. Execution ordering helps organize these computational dependencies.
An execution order such as 1, 2, and 3 therefore describes an ordering of computations. It does not imply that the corresponding physical components operate one after another.
A useful analogy is a photograph of a playground. The photograph captures a runner, a moving ball, and a swing at one instant. If a computer determines the runner’s position first, then the ball’s position, and finally the swing’s position, this does not mean those events occurred at different times. It describes the order in which the computer analyzed the photograph. Similarly, execution order numbers do not establish a sequence of physical events.

More Answers (0)

Categories

Products

Community Treasure Hunt

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

Start Hunting!