**Newton’s second law of motion** states that in an inertial reference frame, the vector sum of the external forces *F _{ext}* on an object is equal with the product of to the mass

*m*and acceleration

*a*of the object.

If we bring the right-hand side of the equation to the left, we’ll get:

\[\sum F_{ext} – ma = 0 \]If we consider *m·a* to be a force (inertial force), we are getting **D’Alembert’s law**:

which basically means that the sum of all forces (external and internal) acting on a body is equal to zero when to body is in equilibrium.

The inertial force it’s also called D’Alembert’s force and it appears when an external force tries to accelerate a body with mass. The direction of the inertial force is always opposite to the defined positive direction of the body mass position.

We will apply D’Alembert’s principle to extract the equations which governs the dynamics of lumped parameter mechanical systems.

**Example 1**. Simple translational mass-spring-damper system

A body with mass *m* is connected through a spring (with stiffness *k*) and a damper (with damping coefficient *c*) to a fixed wall. An external force *F* is pulling the body to the right.

We want to extract the differential equation describing the dynamics of the system. Further, we’ll use the differential equation to create a block diagram in Xcos and analyze the system’s response for a step input.

where:

m [kg] – mass

k [N/m] – spring constant (stiffness)

c [Ns/m] – damping coefficient

F [N] – external force acting on the body

x [m] – displacement of the body

Our mechanical system consists in a translational inertial element, compliant element and resistive element.

Before writing the equations we need to draw the **free body diagram (FBD)** of the system. Drawing the FBD means representing all the forces acting on each mass of the system.

When applying an external force *F* to the body there will be opposite forces which will try to keep the body in the same place. These forces are:

**elastic**force*F*– it is generated by the spring_{e}[N]**inertial**force*F*– it is generated by the mass_{i}[N]**damping**force*F*– it is generated by the viscous friction_{d}[N]

The equation of the opposite forces are the following:

\[ \begin{equation*} \begin{split}F_e &= kx\\

F_i &= ma = m \frac{dv}{dt} = m \frac{d^2x}{dt^2}\\

F_d &= cv = c \frac{dx}{dt}

\end{split} \end{equation*} \]

where *v [m/s]* is the translational speed of the body.

Applying D’Alembert’s principle, we get the equilibrium of forces acting on the mass:

\[F – F_e – F_d – F_i = 0\]Replacing the expressions of the elastic, inertial and damping forces, we get the **equation of motion** of the body mass:

**Example 2**. Simple rotational inertia-spring-damper system

We can apply the same principle to a rotational mechanical systems with inertia. Let’s take as example a flywheel with a moment of inertia *J*, connected to a shaft with stiffness *k*. The other end of the shaft is fixed to a wall (zero angular speed). The flywheel is in contact with a static element, through viscous friction, with the viscous friction coefficient *c*.

where:

J [kgm^{2}] – moment of inertia

k [N/m] – shaft stiffness

c [Ns/m] – damping coefficient

T [Nm] – external torque acting on the flywheel

α [rad] – angle of rotation of the flywheel

Our mechanical system consists in a rotational inertial element, compliant element and resistive element.

Newton’s second law of motion for a rotating inertia is:

\[\sum T_{ext} = J \epsilon \]where *ε [rad/s ^{2}]* is the angular acceleration.

D’Alembert’s law is now related to the sum of all the torques acting on the inertia:

\[\sum T = 0 \]To write the equations of motion for the rotational inertia first we need to draw the free body diagram.

When applying an external torque *T* to a flywheel there will be opposite torques which will try to keep the flywheel in the same place. These torques are:

**elastic**torque T_{e}[Nm] – it is generated by the shaft’s stiffness**inertial**torque T_{i}[Nm] – it is generated by the moment of inertia**damping**torque T_{d}[Nm] – it is generated by the viscous friction

The equation of the opposite torques are the following:

\[ \begin{equation*} \begin{split}T_e &= k \alpha\\

T_i &= J \epsilon = J \frac{d \omega}{dt}= J \frac{d^2 \alpha}{dt^2}\\

T_d &= c \omega = c \frac{d \alpha}{dt}

\end{split} \end{equation*} \]

where *ω [rad/s]* is the angular speed of the flywheel.

Applying D’Alembert’s principle, we get the equilibrium of torques acting on the flywheel:

\[T – T_e – T_d – T_i = 0\]Replacing the expressions of the elastic, inertial and damping torques, we get the equation of motion of the flywheel:

\[\bbox[#FFFF9D]{T – k \alpha – c \frac{d \alpha}{dt} – J \frac{d^2 \alpha}{dt^2} = 0} \tag{2}\]**Xcos block diagram model**

To simulate the dynamics of the model we are going to integrate the equation (1) in Xcos. The same Xcos model applies to the rotational flywheel, the only difference being the parameters (*J* instead of *m*), the input (*T* instead of *F*) and the dependent variable (*α* instead of *x*).

First we need to rearrange the equation, keeping only the second order derivative on the left side, without any parameter (mass *m*):

Before building the block diagram model, define the system’s parameters in the Scilab workspace or in the `Set Context`

menu within Xcos.

`m = 2; // [kg]`

`c = 1; // [Ns/m]`

`k = 2; // [N/m]`

`x0 = 0; // [m]`

`v0 = 0; // [m/s]`

Setup the simulation to run for 10 s. Run the model and check the graphical window.

You can tune the parameters of the system (stiffness, damping, initial values and input force) to understand the impact on the system’s dynamics.

For any questions, observations and queries regarding this article, use the comment form below.

Don’t forget to Like, Share and Subscribe!