SimMechanics    

Choosing Simulation Options

Simulink provides an extensive set of simulation options that apply to any type of model. SimMechanics provides additional options that apply specifically to simulating mechanical system models. The following sections discuss these additional mechanical system-specific options and standard options for which mechanical models entail special consideration.

Choosing an Analysis Mode

You can use SimMechanics to compute the motion that results from applying forces to a mechanical system or the forces required to produce a specified motion in a mechanical system. To compute either type of result, you must build an appropriate model and choose an appropriate mode of analysis. The Parameters pane (see Parameters Pane) of the Mechanical Environment Settings dialog box provides the following modes of analysis, each appropriate for a particular type of model.

Forward Dynamics Mode

Computes the positions and velocities of a system's bodies at each time step, given the initial positions and velocities of its bodies and any forces applied to the system. Use this mode to simulate a model that represents the initial positions and velocities of the system's bodies and the forces on those bodies.

You ran the examples from previous chapters in the Forward Dynamics mode

as well as the many examples of Modeling Mechanical Systems.

Inverse Dynamics Mode

Computes the forces required to produce a specified velocity for each body of an open-loop system. Use this mode to simulate an open-loop system whose model specifies the velocity of every degree of freedom of every body at every time step. See Open-Topology Example: Double Pendulum for an example of using this mode to find the forces on an open-loop system.

Kinematics Mode

Computes the forces required to produce a specified velocity for each body of a closed-loop system. Use this mode to simulate a closed-loop system whose model specifies the velocity of every independent degree of freedom at every time step. See Closed-Loop Example: Four-Bar System for an example of using this mode to find the forces on a closed-loop system.

Trimming Mode

This is a variant of Forward Dynamics mode that allows you to run the Simulink trim command on your model. The trim command in turn allows you to find steady-state solutions for your model (see "Equilibrium Point Determination" in the "Analyzing Simulation Results" section of the Simulink documentation or enter help trim at the MATLAB command line).

Trimming mode inserts a subsystem and an output port at the top level of your model. These blocks output signals corresponding to the constraints on the system represented by your model. Configure the trim command to find equilibrium points where the constraint signals are 0. This ensures that the equilibrium points found by the trim command satisfy the constraints on the modeled system. See Constrained Example: Four-Bar System for an example of using this mode to find the equilibrium points of a constrained system.


  Running Mechanical Models Choosing an ODE Solver