PLECS 3.5 Online Help

Mechanical Modeling

One-dimensional mechanics describe the mechanical interaction between bodies that have exactly one degree of freedom. A translational body (or Mass) can move along a single axis, and a rotational body (or Inertia) can rotate around a single axis. With this limitation one-dimensional mechanical systems can be modeled similarly to electrical systems using simple analogies that are listed in the following table.

ElectricalTranslationalRotational
VoltageVelocityAngular velocity
CurrentForceTorque
CapacitorBody (mass)Body (moment of inertia)
InductorSpringSpring
ResistorDamperDamper
TransformerGearLever
SwitchClutchClutch

Flanges and Connections

The two mechanical subdomains use separate connectors: a translational flange pict and a rotational flange pict. You can draw connections between flanges of the same type. By creating branch connections you can connect more than two flanges. Flanges that are connected to each other have the same displacement (i.e. position or angle), and the connection will exert whatever force is necessary in order to maintain this relationship.

Body components (i.e. the translational Mass and the rotational Inertia) have two rigidly connected flanges so that the two systems shown below are equivalent:

pict
Equivalent connections of three translational bodies

Force/Torque Flows and Sign Conventions

As the above table of electrical and mechanical analogies suggests, forces or torques acting on components are modeled as flows from one flange to another. The direction of a positive flow is indicated either with a dot next to a flange or with an arrow in the component icon.

Force and torque flows must be balanced, i.e. the sum of all flows towards a component must generally be zero, but there are two exceptions to this rule:

In this context it is important to note that the positive direction does not necessarily correlate with the graphical orientation of the components. For instance, the schematic shown below models the equation

F1 + F2 = m ⋅a

i.e. both forces accelerate the body in the positive direction, even though in the schematic the two forces might appear to oppose each other.

pict
Mass and two forces

Positions and Angles

In contrast to other modeling environments, PLECS does not generally use flange displacements as state variables in the component equations in order to avoid having to solve Index-2 problems. Instead, absolute or relative displacements are only calculated when required e.g. in a hard-stop component or if you explicitly measure them using a sensor. The displacements are then calculated by integrating the corresponding absolute or relative speed.

Initial Conditions

As with all integrators, displacement meters must be provided with proper initial values. PLECS allows you to specify these initial values directly in the components that require them or indirectly via neighboring components. For this purpose, most components have an initial displacement parameter that defaults to an empty string, which means "don't care" or "don't know".

At simulation start, PLECS will automatically calculate required but unknown initial values from the values that you have provided. An error will be flagged if you do not supply enough data to determine required initial values. On the other hand, an error will also be flagged, if you provide too many and inconsistent data.

The example shown below models a body with mass m   that is subject to a gravitational force m ⋅g   and suspended from a spring. The spring is initially unstretched (dx0 = 0  ) but its equilibrium displacement x0   is not specified.

pict
Spring and mass

If the model is run as is, PLECS will flag an error because it does not have enough data to calculate this equilibrium length and the initial value of the position sensor. To fix this, you can specify any one of the following three parameters:

  1. the initial value x0   of the position sensor
  2. the initial position x0   of the body
  3. the equilibrium displacement x0   of the spring

Note that you may specify more than one of the above values, but if you do so, the settings must be consistent.

Angle Wrapping

When calculating angles by integrating angular speed, care must be taken to avoid numerical problems during longer simulations. For this reason, PLECS automatically wraps the integral in the interval between - π   and + π   when you measure an absolute angle with a position sensor that has one flange internally connected to the rotational reference frame. Note that relative angles - measured with a position sensor that has two accessible flanges - are not wrapped because you can e.g. wind a torsion spring by more than one turn.

Ideal Clutches

Analogous to its ideal electrical switches, PLECS features ideal mechanical clutches that engage and disengage instantaneously. While engaged they make an ideal rigid connection between their flanges and while disengaged they transmit zero force (or torque).

Inelastic Collisions

PLECS permits you to connect an ideal clutch between two bodies and engage the clutch while they move (or rotate) at different speeds. PLECS models such an event as a perfectly inelastic collision and calculates the common speed after the collision based on the conservation law of angular momentum so that e.g. 

  +   J1ω--1 +-J2ω-2-
ω  =    J1 + J2

where J1   and J2   are the moments of inertia of the two bodies, ω-1   and ω-2   are the two angular speeds prior to the collision and ω+   is the common angular speed after the collision.

It is important to note that kinetic energy is lost during an inelastic collision even though the clutch is ideal and lossless. Assuming for simplicity that J1 = J2 = J   so that ω+ =  12(ω -1 + ω2-)  , the kinetic energy of the system before and after the collision is for example

                    (         )
         E -  =  1J  ω-1 2 + ω-2 2
                 2
         E+   =  1(2J) ω+2
                 2
              =  1J (ω-1 + ω-2 )2
                 4
⇒   E- - E+   =  1J (ω-1 - ω-2 )2
                 4

This is demonstrated using the simple example shown below consisting of two bodies with the same inertia          2
J = 1kgr⋅mad2-   . One initially rotates with ω1-= 1 rasd-   while the other is stationary ω2-= 0  . There is no friction or external torque acting on the bodies. When the clutch engages at t = 1s  , the two bodies immediately rotate with the same speed ω+ = .5rasd   and the total kinetic energy of the system reduces instantaneously from .5J   to .25J  .

pict
pict
Inelastic collision with ideal clutch

It is interesting to compare this response with that of a more detailed model, in which the clutch is modeled with a finite damping coefficient when engaged. Additionally the two shafts connecting the bodies with the clutch are assumed to have a certain elasticity and damping coefficient. The corresponding schematic and plots are shown below; for comparison the response from the idealized model is superimposed with dashed lines.

The damping coefficients and spring constants have been exaggerated so that there is visible swinging. Note however, that after the transients have settled, the two bodies rotate at the same common speed as in the idealized model. Likewise, the final mechanical energy stored in the system is the same as in the idealized model.

pict
pict
Inelastic collision with non-ideal clutch and elastic shafts