# Pendulum system: how is derived the output as Energy?

Good day to everyone,

I want to understand in which way the "Energy equation" is been implemented to this pendulum system.

$x_1(t)$: The angular position of the mass

$x_2(t)$: The angular velocity

$k$: friction constant

$M$: point mass

The input $u(t)$ is a torque

The output $y(t)$ is Energy

So, we got:

$\dot{x_1}(t) = x_2(t)$

$\dot{x_2}(t)= -(g/l) sin(x_1(t)) - (k/Ml^2)x_2(t) + (1/Ml^2)u(t)$

The last one, obviously, is derived by the fundamental law $M=Ix_2(t)$

The output:

$y(t)=(1/2) Ml^2 x_2^2(t)-Mglcos(x_1(t))$

Considered the inertia $I=Ml^2$, and the friction in proportion to the velocity $x_2(t)$

The problem is the way that it uses to derive $y(t)$. In which way is implemented the Energy formula to obtain the result?

Thank to all, in every case :D

-

I found the solution. It was much more easier than I believed on first sight. After a good rest on my couch, I saw easily the big deal:

The total energy of the system is get by the kinetic energy of the rotating mass $(1/2)Ix_2^2(t)$, that is positive, and the gravitational potential energy $Mgh$, with $h$ obviously pair to $l∗cos(x_1(t))$, that is negative.

I ask sorry for the stupid question. It was so easy that I was blind to search an improbable solution :D

Thanks and I hope that can be equally useful for someone.

-