程序代写代做代考 physics_msgs_inertia

physics_msgs_inertia

InertiaMsgsTest::SetPendulumInertia¶
This documents the effect of moment of inertia on the expected natural frequency in the pendulum test.

Pendulum dimensions¶

A pendulum is illustrated with distance $L$ between the pin joint and center of mass.
The pendulum is modeled as a box of mass $m$ with overall length $2L$ and width $L/5$.

Moment of inertia¶
Computing the moment of inertia requires specifying a location on the body and an axis direction.
In the following equation, the moment of inertia $I$ is computed
at the center of mass along an axis parallel to the axis of rotation:

$I = \frac{m}{12} ((2L)^2 + (\frac{L}{5})^2)$

$I = mL^2 (\frac{1}{3} + \frac{1}{300})$

$I = \frac{101}{300} mL^2$

Natural frequency¶
With gravity $g$ and pendulum angle $\theta$, the equations of motion are given as:

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

Factoring out $mL^2$ and dividing by $mgL$,

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

$\frac{L}{g} (\frac{I}{mL^2} + 1) \ddot{\theta} + sin(\theta) = 0$

With the value of $I$ computed above,

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

Then when $\theta$ is small, $sin(\theta) \approx \theta$
and the pendulum will have an approximately sinusoidal trajectory.
The frequency $\omega$ of the sinusoidal trajectory satisfies the following:

$ \frac{401}{300} \frac{L}{g} \omega^2 = 1$

$ \omega^2 = \frac{300}{401} \frac{g}{L} $

The frequency $f$ in Hz is then:

$ f = \frac{1}{2\pi} \sqrt{\frac{300}{401} \frac{g}{L}}$

Modified natural frequency with larger inertia¶
Suppose the inertia $I$ is artificially increased by a factor of $2$:

$I = \frac{101}{150} mL^2$

Then the natural frequency changes as follows:

$\frac{L}{g} (\frac{I}{mL^2} + 1) \ddot{\theta} + sin(\theta) = 0$

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

$ f = \frac{1}{2\pi} \sqrt{\frac{150}{251} \frac{g}{L}}$

In [ ]: