Analyzing Variable Dependencies for a Normal Simulation

You can display the dependencies of a selected variable by plotting them. You can use the plots understand the simulation as well as debugging it.

Note that you can also plot variable dependencies after a failed initialization. For more information, see About Analyzing Variable Dependencies and Equation Incidence.


Before you begin: To have a model to work with, do the following:

In this scenario, you investigate why the acceleration of the mass J3 in the model jumps at the time t=0.8.

  1. In the Signal Monitor, do the following to see the plot of the acceleration of J3 around the time t=0.8:
    1. Expand the node J3, right-click the signal J3.a, and select Add to Plot > New Plot
    2. Pause over the curve to see the tooltip, you see that the time for the jump is actually t=0.791.
  2. To see on what signals J3.a is dependent on, in the Signal Monitor, right-click the signal J3.a and select Browse Dependencies .
    A Browse Dependencies browser for J3.a appears. In the browser the signals that J3.a depends on are listed, including type and unit. Also the equation of the browsed variable is displayed.

    In the browser you can:

    • Search signals by start entering the signal name in the Variable filter field.
      Note: You cannot use wildcards when searching.
    • Expand or collapse nodes.
    • Double-click a signal to see the signal name, type, and the underlying dependency equation.
      Note: To get back, click Back.
    • Plot a signal by right-clicking it and selecting Plot.

  3. To investigate jumps in mass acceleration, the modes of the clutches are of particularly interest. You plot these modes by right-clicking them in the Browse Dependencies and selecting Plot.
    You get the plots, for clutch1.mode, clutch2.mode, and clutch3.mode.

    Zooming in on them by dragging in the plots, you see that clutch1.mode changes at the time t=791.

  4. Repeat Step 2 but for the signal clutch1.mode.
  5. In the Browse Dependencies browser for clutch1.mode, investigate the signals by right-clicking them, selecting Plot and zoom around the time t=0.791.
    You realize that the underlying reason for the jump in acceleration of the mass J3.a is that the relative angular velocity of clutch1 (clutch1.w_rel) reaches 0 at t=0.791 and the clutch switches to stuck mode.