SimMechanics    

Finding Forces from Motions

The SimMechanics Kinematics and Inverse Dynamics modes (see Choosing an Analysis Mode) enable you to find all the forces on a closed-loop system or an open system, respectively, given a model that completely specifies the system's motions. Because the model specifies the positions, velocities, and accelerations of the model's components, these modes, unlike Forward Dynamics mode, do not need to compute these quantities. Consequently, Kinematics and Inverse Dynamics modes take less time to compute the forces on a system. The time saving depends on the size and complexity of the system being simulated.

To use these modes, you must first build a model of the system that specifies completely the positions, velocities, and accelerations of the system's joints and bodies. Such a model is called a kinematic model. You create a kinematic model by creating and interconnecting blocks representing the bodies and joints of the system and then connecting actuators to the joints to specify the motions of the bodies.

A model does not have to actuate every joint to specify completely the motions of a system. In fact, the model need actuate only as many joints as there are independent degrees of freedom in the system. (See Counting Degrees of Freedom in the Modeling Mechanical Systems chapter.) For example, a model of a four-bar mechanism need actuate only one of the mechanism's joints, because a four-bar mechanism has only one degree of freedom. To avoid overconstraining the model's solution, the number of actuated joints should not exceed the number of degrees of freedom. Attempting to simulate an overconstrained model causes Simulink to halt the simulation and display an error message.

The following sections illustrate use of Kinematics and Inverse Dynamics modes to find the forces on the joints of a closed- and an open-loop system, respectively.

Closed-Loop Example: Four-Bar System

Consider the four-bar system used to illustrate model building in the tutorial titled A Four Bar Mechanism in the Learning Basic Procedures chapter.

Suppose that you want to keep this system from collapsing under its own weight. Because this system has only one degree of freedom, applying a counterclockwise torque to the joint labeled Revolute1 would accomplish this objective. But how much torque is sufficient?

To answer this question, you must first build a kinematic model of the stationary four-bar system. The kinematic model must specify the structure of the four-bar system and its motion over time. The four-bar model from the four-bar tutorial specifies the structure of the system. You can therefore use the tutorial model as a starting point for creating the kinematic model. You can find this version of the tutorial in the demo model mech_four_bar_forw.

To turn the tutorial model into a kinematic model, you must specify how the system moves over time. In particular, you want the model to specify that the system remains stationary. Because a four-bar system has only one degree of freedom, you need specify only that one of the joints remains stationary. You can use a Joint Actuator to accomplish this task.

The following diagram shows a kinematic model derived from the tutorial model in this manner. This system is modeled in the demo mech_four_bar_kin.

The model uses a Joint Actuator block driven by a Constant block to specify the motion on the Revolute1 joint. The Constant block outputs a three-element vector that specifies the angular position, velocity, and acceleration, respectively, of the joint as 0. The model uses a Joint Sensor block connected to a Scope block to display the resulting torque on the joint and a To Workspace block to save the torque signal to the MATLAB workspace. Running this model in Kinematics mode (see Choosing an Analysis Mode) reveals that the torque on the Revolute1 joint is 27.9032 n-m.

To verify that the computed torque is, indeed, the torque required to keep the system stationary, create a forward-dynamics model that applies the computed torque to the Revolute1 joint. This model is contained in the demo mech_four_bar_stat.

Now run the model in Forward Dynamics mode, with the Revolute1 Angle Scope open.

The Scope display reveals that the model does, indeed, remain stationary, although only for about 1.5 seconds. This is to be expected, as the computed force is not exact and the system is unstable.


  Mechanical Environment Settings Dialog Box Open-Topology Example: Double Pendulum