# Energy Method for modeling conservative dynamic systems

The Energy Method provides an alternative way to determine the mathematical model (equations of motion) of a dynamic system. It’s also an alternative method to calculate the natural frequency of the system.

Many of the modern engineering systems are/have:

• multidisciplinary: they contain mechanical, thermal, electrical, etc subsystems
• complex and nonlinear
• difficult to capture in simple but representative mathematical models

The Energy Method is a general modeling technique, any multidisciplinary dynamic system can be captured by the Energy Method (kinetic energy, potential energy, work).

Before diving into the energy method we should recall the definition of potential and kinetic energy.

### Potential and Kinetic Energy

For a given body with a weight G [N], at a height h [m], we can calculate the gravitational potential energy U [J] as:

$U = Gh = mgh$

where:

m [kg] – body mass
g [m/s2] – gravitational acceleration

An elastic spring with stiffness k [N/m] and elongation x [m] has an elastic potential energy U [J] equal with:

$U = \frac{1}{2}k x^2$

The kinetic energy is related to speed. A body with mass m [kg] and translational speed v [m/s] has the kinetic energy Tt [J]:

$T_t = \frac{1}{2}mv^2$

A body with the moment of inertia J [kgm2] and rotational speed ω [rad/s] has the kinetic energy Tr [J]:

$T_r = \frac{1}{2}J \omega^2$

A body which has a combined translational-rotational movement has a total kinetic energy T [J] equal to:

$T = T_t + T_r$

The total energy E [J] of a system is the sum between the potential and kinetic energy.

$E = T + U$

### Energy Method

The Energy Method states that for a simple, conservative (no damping) system, the total energy E of the system is conserved. This translates into:

$E = \text{constant}$

This means that the derivative of the total energy is zero:

$\bbox[#FFFF9D]{\frac{dE}{dt} = \frac{d}{dt} \left ( T + U \right ) = 0}$

The Energy Method is applied in these simple steps:

1. calculate the potential energy U of the system
2. calculate the kinetic energy T of the system
3. calculate the total energy E of the system
4. calculate the derivative dE/dt
5. determine the equation of motion (dE/dt = 0)

For step 4 it’s worth remembering the sum rule of differentiation for functions u and v:

$\frac {d}{dx} \left (u+v \right ) = \frac {du}{dx} + \frac {dv}{dx}$

Note: Since it works on the principle of the conservation of energy, the Energy Method can be applied only to systems without damping (energy dissipative components).

Let’s look at some simple examples to learn how to apply the Energy Method.

### Example 1. Simple translational body with spring

Image: Simple translational body

where:

k [N/m] – spring stiffness
x [m] – mass displacement
m [kg] – body mass

Step 1. Calculate the potential energy U of the system

$U = \frac{1}{2}k x^2$

Step 2. Calculate the kinetic energy T of the system

$T = \frac{1}{2}mv^2 = \frac{1}{2}m \dot{x}^2$

Step 3. Calculate the total energy E of the system

$E = T + U = \frac{1}{2}m \dot{x}^2 + \frac{1}{2}k x^2$

Step 4. Calculate the derivative of the energy

$\frac{dE}{dt}=\frac{d}{dt} \left ( \frac{1}{2}m \dot{x}^2 + \frac{1}{2}k x^2 \right )$

According to the sum rule for differentiation, we can calculate the derivative for each component:

$\begin{split} \frac{d}{dt} \left ( \frac{1}{2}m \dot{x}^2 \right ) &= \frac{1}{2} m \frac{d}{dt}(\dot{x}^2)= \frac{1}{2} m 2 \dot{x} \ddot{x} &= m \dot{x} \ddot{x}\\ \frac{d}{dt} \left ( \frac{1}{2}k x^2 \right ) &= \frac{1}{2} k \frac{d}{dt}(x^2)= \frac{1}{2} k 2x \dot{x} &= kx \dot{x} \end{split}$

Step 5. Determine the equation of motion

Adding the results of the differentiation, we get:

$\begin{split} m\dot{x} \ddot{x} + kx \dot{x} = 0\\ \dot{x}(m \ddot{x} + kx)=0 \end{split}$

Dividing with speed dx/dt and m we get the equation of equilibrium:

$\ddot{x} + \frac{k}{m}x=0$

To make sure that we have correctly determined the equation of motion, we are going to model and simulate it in Xcos.

Image: Simple translational mass – Xcos block diagram model

To simulate the model:

• set the Final integration time to 10 s
• set the Initial condition of the position integrator block to 0.25 m
• set the model parameters in the Set context menu: m = 0.3 kg, k = 2.5 N/m

Run the model and analyse the result:

Image: Simple translational mass plot

As expected the mass starts moving at initial time (t0 = 0 s) from the initial position (x0 = 0.25 m). Since there is no damping in the system, the body oscillates around the 0 m point indefinitely.

The radian frequency (pulsation), ωn [rad/s], can be found using the following equation:

$\begin{split} \omega_n^2 &= \frac{k}{m}\\ \omega_n &= \sqrt{\frac{k}{m}} \end{split}$

As we can see, the radian frequency is the square root of the dependant variable x coefficient.

Replacing the system’s parameters into the equation gives the value of the radian frequency:

$\omega_n = \sqrt{\frac{2.5}{0.3}} = 2.8867513 \quad \text{rad/s}$

The natural frequency fn [Hz] of the system is:

$f_n = \frac{\omega_n}{2 \pi}$

which gives:

$f_n = \frac{2.8867513}{2 \pi} = 0.4594407 \quad \text{Hz}$

### Example 2. Simple pendulum

Image: Simple pendulum

where:

L [m] – length of the pendulum’s arm
m [kg] – pendulum suspended mass

Step 1. Calculate the potential energy U of the system

In this case the potential energy has gravitational form. The higher the angle of the pendulum, the higher the potential energy. The height of the pendulum mass h [m] is calculated function of the equilibrium position of the pendulum (θ = 0 rad) and it’s given by:

$h = L – L cos(\theta) = L (1 – cos(\theta))$

The potential energy is:

$U = Gh = mgL(1-cos(\theta))$

where G [N] is the weight of the pendulum and g [m/s2] is the gravitational acceleration.

Step 2. Calculate the kinetic energy T of the system

$T = \frac{1}{2}mv^2 = \frac{1}{2}m (\omega L)^2 = \frac{1}{2}mL^2 \dot{\theta}^2$

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

Step 3. Calculate the total energy E of the system

$E = T + U = mgL(1-cos(\theta)) + \frac{1}{2}mL^2 \dot{\theta}^2$

Step 4. Calculate the derivative of the energy

$\frac{dE}{dt}=\frac{d}{dt} \left ( mgL(1-cos(\theta)) + \frac{1}{2}mL^2 \dot{\theta}^2 \right )$

According to the sum rule for differentiation, we can calculate the derivative for each component:

$\begin{split} \frac{d}{dt} ( mgL(1-cos (\theta)) ) &= mgL \frac{d}{dt} ( 1-cos (\theta) ) &= mgL sin(\theta) \dot{\theta}\\ \frac{d}{dt} \left ( \frac{1}{2}mL^2 \dot{\theta}^2 \right ) &= \frac{1}{2}mL^2 \frac{d}{dt} \left ( \dot{\theta}^2\right ) = \frac{1}{2}mL^2 2 \dot{\theta} \ddot{\theta} &= mL^2\dot{\theta} \ddot{\theta} \end{split}$

Step 5. Determine the equation of motion

Adding the results of the differentiation, we get:

$\begin{split} mgL sin(\theta) \dot{\theta} + mL^2\dot{\theta} \ddot{\theta} = 0\\ \dot{\theta}(mgL sin(\theta) + mL^2 \ddot{\theta})=0 \end{split}$

Dividing with speed dθ/dt, we get the equation of equilibrium:

$mL^2 \ddot{\theta} + mgL sin(\theta)=0$

Dividing with mL2, we get a simplified form of the equation of equilibrium:

$\ddot{\theta} + \frac{g}{L} sin(\theta) = 0$

To make sure that we have correctly determined the equation of motion, we are going to model and simulate it in Xcos.

Image: Simple pendulum – Xcos block diagram model

To simulate the model:

• set the Final integration time to 10 s
• set the Initial condition of the position integrator block to π/4 rad
• set the model parameters in the Set context menu: g = 9.81 m/s2, L = 0.25 m

Run the model and analyse the result:

Image: Simple pendulum plot

As expected the pendulum starts moving at initial time (t0 = 0 s) from the initial position (θ0 = π/4 rad). Since there is no damping in the system, the pendulum oscillates around the 0 rad point indefinitely.

The radian frequency of the system is:

$\omega_n = \sqrt{\frac{g}{L}} = 6.2641839 \quad \text{rad/s}$

The natural frequency of the system is:

$f_n = \frac{\omega_n}{2 \pi} = 0.9969758 \quad \text{Hz}$

### Example 3. Simple translational-rotational body with spring

Image: Simple translational-rotational mass

where:

k [N/m] – spring stiffness
x [m] – linear displacement
m [kg] – body mass
J [kgm2] – moment of inertia
r [m] – radius of body

Step 1. Calculate the potential energy U of the system

$U = \frac{1}{2}k x^2 = \frac{1}{2}k (\theta r)^2$

where θ [rad] is the angle of rotation, ω = dθ/dt.

Step 2. Calculate the kinetic energy T of the system

For this particular example, the total kinetic energy has a translational component and a rotational component.

$\begin{split} T_t &= \frac{1}{2}mv^2 = \frac{1}{2}m (\omega r)^2 = \frac{1}{2}m (\dot{\theta} r)^2\\ T_r &= \frac{1}{2}J \omega^2 = \frac{1}{2}J \dot{\theta}^2\\ T &= T_t + T_r = \frac{1}{2}m (\dot{\theta} r)^2 + \frac{1}{2}J \dot{\theta}^2 \end{split}$

Step 3. Calculate the total energy E of the system

$E = T + U = \frac{1}{2}m (\dot{\theta} r)^2 + \frac{1}{2}J \dot{\theta}^2 + \frac{1}{2}k (\theta r)^2$

Step 4. Calculate the derivative of the energy

$\frac{dE}{dt}=\frac{d}{dt} \left ( \frac{1}{2}m (\dot{\theta} r)^2 + \frac{1}{2}J \dot{\theta}^2 + \frac{1}{2}k (\theta r)^2 \right )$

According to the sum rule for differentiation, we can calculate the derivative for each component:

$\begin{split} \frac{d}{dt} \left ( \frac{1}{2}m (\dot{\theta} r)^2 \right ) &= \frac{1}{2}m r^2 \frac{d}{dt} \left ( \dot{\theta}^2 \right ) = \frac{1}{2}m r^2 2 \dot{\theta} \ddot{\theta} &= m r^2 \dot{\theta} \ddot{\theta}\\ \frac{d}{dt} \left ( \frac{1}{2}J \dot{\theta}^2 \right ) &= \frac{1}{2}J \frac{d}{dt} \left ( \dot{\theta}^2 \right ) = \frac{1}{2}J 2 \dot{\theta} \ddot{\theta} &= J \dot{\theta} \ddot{\theta}\\ \frac{d}{dt} \left ( \frac{1}{2}k (\theta r)^2 \right ) &= \frac{1}{2}kr^2 \frac{d}{dt} \left ( \theta^2 \right ) = \frac{1}{2}kr^2 2 \theta \dot{\theta} &= kr^2 \theta \dot{\theta} \end{split}$

Step 5. Determine the equation of motion

Adding the results of the differentiation, we get:

$\begin{split} m r^2 \dot{\theta} \ddot{\theta} + J \dot{\theta} \ddot{\theta} + kr^2 \theta \dot{\theta} = 0\\ m r^2 \ddot{\theta} + J \ddot{\theta} + kr^2 \theta = 0\\ \ddot{\theta} \left ( m r^2 + J \right ) + kr^2 \theta = 0 \end{split}$

Dividing with mr2 + J, we get the equation of equilibrium:

$\ddot{\theta} + \left ( \frac{kr^2}{m r^2 + J} \right ) \theta = 0$

To make sure that we have correctly determined the equation of motion, we are going to model and simulate it in Xcos.

Image: Simple translational-rotational mass – Xcos block diagram model

To simulate the model:

• set the Final integration time to 100 s
• set the Initial condition of the position integrator block to π rad
• set the model parameters in the Set context menu: m = 0.3 kg, k = 2.5 N/m, J = 0.01 kgm2, r = 0.02 m.

Run the model and analyse the result:

Image: Simple translational-rotational mass plot

As expected the pendulum starts moving at initial time (t0 = 0 s) from the initial position (θ0 = π rad). Since there is no damping in the system, the pendulum oscillates around the 0 rad point indefinitely.

The radian frequency of the system is:

$\omega_n = \sqrt{\frac{kr^2}{m r^2 + J}} = 0.3143473 \quad \text{rad/s}$

The natural frequency of the system is:

$f_n = \frac{\omega_n}{2 \pi} = 0.0500299 \quad \text{Hz}$

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

Don’t forget to Like, Share and Subscribe!