Internal forces are forces the machine applies to itself as a result of its own motion. Unlike actuation forces, you do not apply these forces from outside the machine with Simulink® signals. The body motions instead generate the forces and torques directly.
The Force Elements library provides ready-made blocks to represent certain kinds of internal forces and torques acting between bodies. You can also create your own customized sensor-actuator feedback loops to model springs, dampers, and more complex internal forces.
A generalized linear force between two bodies is a linear function of the two bodies' relative displacement vector r and relative velocity v, with constant coefficients. The Body Spring & Damper block models a force acting between two bodies along the axis r connecting them:
F = -k(r - r0) - bv||
The block is connected on either side to Bodies at a Body coordinate system (CS). The displacement r is a vector from one Body CS on one Body to the other Body CS on the other Body. Newton's third law requires that the forces that the bodies exert on one another be equal and opposite.
The common physical system this force model represents is a spring-damper combination, where the damper is a dashpot acting only along the spring axis. The damping is solely a function of the component v|| of the velocity vector projected along the displacement r. (Thus the damping in this block cannot represent the damping due to a viscous medium, because there is no damping force perpendicular to the spring axis. See Inserting a Linear Force or Torque Through a Joint.)
You enter the constant parameters r0, k, and b in the Body Spring & Damper dialog. r0 is the spring's natural length, the length it has when no forces are acting on it. The spring constant k and damping constant b should be nonnegative.
To complete a linear force model between bodies, you need to model the translational degrees of freedom (DoFs) between them, as the Force Element block itself does not represent these DoFs. You can use any Joint block containing at least one prismatic primitive to represent translational motion. The two Bodies, the Joint, and the Body Spring & Damper must form a closed loop.
The following block diagram represents two Bodies with a damped spring between them. The Custom Joint represents the bodies' relative translational DoFs with three prismatic primitives. In this case, CS2 and CS3 on Body1 are the same, and CS2 and CS3 on Body2 are the same. Thus, the Joint is connected to the same Body CSs that define the ends of the spring-damper axis.
Another way of inserting a linear force element between two bodies is to connect it to a joint that already connects the bodies. You have to apply the force element, like an actuator, to each primitive in the joint individually. This approach has several advantages over the Body Spring & Damper:
You can create a different force law, with a different spring length, spring constant, and damping constant, for each of the joint's primitives.
The spring and damper forces acting on each primitive act independently in their respective directions, instead of depending on just the interbody distance with a single spring length, spring constant, and damping constant.
This allows you to create spring and damping forces that act independently in two or three dimensions, unlike the Body Spring & Damper force, which acts only along a single axis. Damping forces acting on multiple primitives act as a two- and three-dimensional viscous medium, not as a dashpot.
The joint representing the DoFs between the bodies is already present.
You use the Joint Spring & Damper block to implement such spring-damper forces/torques together with a Joint. With it, you can apply a linear spring and damper force to each prismatic primitive and a linear torsion and damper torque to each revolute primitive in a Joint block. (You cannot apply these torques to a spherical primitive.)
Pick a Joint already connected between two Bodies. You connect the Joint Spring & Damper block to a Joint block at a sensor/actuator port on the Joint. (The section Actuating a Joint explains how to create such a port.) The Joint Spring & Damper dialog then lists each primitive in the Joint.
For each prismatic primitive you want to actuate with a spring-damper force, you specify a natural spring length (offset), spring constant, and damping constant. For each revolute primitive you want to actuate with a torsion-damper torque, you specify a natural torsion angle (offset, or angle in which the primitive points absent any torques), torsion constant, and damping constant. You make these specifications in the Joint Spring & Damper dialog.
Here are two bodies connected by a Custom Joint in turn connected to a Joint Spring & Damper block.
Unlike the example in the preceding section, Inserting a Linear Force Between Bodies, the Custom Joint can have up to three prismatics and three revolutes, each with a separate linear force or torque acting through it. Each force or torque acts equally and oppositely on each body, following Newton's third law.
You can create your own force elements acting through Joints or on Bodies by using Sensor-Actuator feedback loops. With this technique, you can not only model linear forces, but any force that depends on body or joint positions and velocities.
This simple example illustrates the method with a linear spring force law. Hooke's law states that the force exerted by an extended spring is proportional to its displacement from its unextended position: F = -kx.
The following Simscape™ Multibody™ model represents a spring that obeys Hooke's law.
The model uses the Gain block labeled Spring Constant to multiply
the displacement of the prismatic joint labeled Spring along the World's y-axis
by the spring constant
-0.8. The output of the
Gain block is the force exerted by the spring. The model feeds the
force back into the prismatic joint via the Actuator labeled Force.
The model encapsulates the spring block diagram in a subsystem to
clarify the model and to allow a spring to be inserted elsewhere.