I am working through an example of an inverted pendulum on a cart, exactly like this:
![]()
L is the length of the massless pendulum arm.
Two degrees of freedom, x and theta. If I write out the kinetic energy as three parts: translational KE from cart + translational KE from pendulum + rotational KE from pendulum, I end up missing a term (compared to writing out the KE in vector form with each mass).
In vector form:
[itex]T = \frac{1}{2}M\dot{r_{1}}\cdot\dot{r_{1}} + \frac{1}{2}m\dot{r_{2}}\cdot\dot{r_{2}}[/itex]
[itex]T = \frac{1}{2}M\dot{x}^{2} + \frac{1}{2}m(\dot{x}^{2}+{l^2}{\dot{\theta}^2}+2l\dot{x}\dot{\theta}cos {\theta})[/itex]
I know above is correct, but I don't know what the term [itex]ml\dot{x}\dot{\theta}cos{\theta}[/itex] represents.
If I write the KE using the other method, I get
[itex]T = \frac{1}{2}M\dot{x}^{2} + \frac{1}{2}m\dot{x}^{2}+\frac{1}{2}m{l^2}{\dot{\theta}^2}[/itex]
where each term represents translational KE from cart, translational KE from pendulum, and rotational KE from pendulum, respectively. I am missing the term from the KE that was obtained using vectors.
I think I'm missing the velocity component of the pendulum mass in the y direction?

L is the length of the massless pendulum arm.
Two degrees of freedom, x and theta. If I write out the kinetic energy as three parts: translational KE from cart + translational KE from pendulum + rotational KE from pendulum, I end up missing a term (compared to writing out the KE in vector form with each mass).
In vector form:
[itex]T = \frac{1}{2}M\dot{r_{1}}\cdot\dot{r_{1}} + \frac{1}{2}m\dot{r_{2}}\cdot\dot{r_{2}}[/itex]
[itex]T = \frac{1}{2}M\dot{x}^{2} + \frac{1}{2}m(\dot{x}^{2}+{l^2}{\dot{\theta}^2}+2l\dot{x}\dot{\theta}cos {\theta})[/itex]
I know above is correct, but I don't know what the term [itex]ml\dot{x}\dot{\theta}cos{\theta}[/itex] represents.
If I write the KE using the other method, I get
[itex]T = \frac{1}{2}M\dot{x}^{2} + \frac{1}{2}m\dot{x}^{2}+\frac{1}{2}m{l^2}{\dot{\theta}^2}[/itex]
where each term represents translational KE from cart, translational KE from pendulum, and rotational KE from pendulum, respectively. I am missing the term from the KE that was obtained using vectors.
I think I'm missing the velocity component of the pendulum mass in the y direction?