pxmlw6n2f/Gazebo_Distributed_MPI/test/integration/physics_msgs_inertia.ipynb

94 lines
3.1 KiB
Plaintext

{
"metadata": {
"name": "",
"signature": "sha256:45c1808319af897f3e3ee937dc11dd1e1159d1e1d05622ce59a634505ea427b3"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# InertiaMsgsTest::SetPendulumInertia\n",
"\n",
"This documents the effect of moment of inertia on the expected natural frequency in the pendulum test.\n",
"\n",
"## Pendulum dimensions\n",
"\n",
"![Pendulum dimensions](pendulum.svg)\n",
"\n",
"A pendulum is illustrated with distance $L$ between the pin joint and center of mass.\n",
"The pendulum is modeled as a box of mass $m$ with overall length $2L$ and width $L/5$.\n",
"\n",
"## Moment of inertia\n",
"\n",
"Computing the moment of inertia requires specifying a location on the body and an axis direction.\n",
"In the following equation, the moment of inertia $I$ is computed\n",
"at the center of mass along an axis parallel to the axis of rotation:\n",
"\n",
"$I = \\frac{m}{12} ((2L)^2 + (\\frac{L}{5})^2)$\n",
"\n",
"$I = mL^2 (\\frac{1}{3} + \\frac{1}{300})$\n",
"\n",
"$I = \\frac{101}{300} mL^2$\n",
"\n",
"## Natural frequency\n",
"\n",
"With gravity $g$ and pendulum angle $\\theta$, the equations of motion are given as:\n",
"\n",
"$(I + mL^2) \\ddot{\\theta} + mgL * sin(\\theta) = 0$\n",
"\n",
"Factoring out $mL^2$ and dividing by $mgL$,\n",
"\n",
"$\\frac{mL^2}{mgL} (\\frac{I}{mL^2} + 1) \\ddot{\\theta} + sin(\\theta) = 0$\n",
"\n",
"$\\frac{L}{g} (\\frac{I}{mL^2} + 1) \\ddot{\\theta} + sin(\\theta) = 0$\n",
"\n",
"With the value of $I$ computed above,\n",
"\n",
"$ \\frac{401}{300} \\frac{L}{g} \\ddot{\\theta} + sin(\\theta) = 0$\n",
"\n",
"Then when $\\theta$ is small, $sin(\\theta) \\approx \\theta$\n",
"and the pendulum will have an approximately sinusoidal trajectory.\n",
"The frequency $\\omega$ of the sinusoidal trajectory satisfies the following:\n",
"\n",
"$ \\frac{401}{300} \\frac{L}{g} \\omega^2 = 1$\n",
"\n",
"$ \\omega^2 = \\frac{300}{401} \\frac{g}{L} $\n",
"\n",
"The frequency $f$ in Hz is then:\n",
"\n",
"$ f = \\frac{1}{2\\pi} \\sqrt{\\frac{300}{401} \\frac{g}{L}}$\n",
"\n",
"## Modified natural frequency with larger inertia\n",
"\n",
"Suppose the inertia $I$ is artificially increased by a factor of $2$:\n",
"\n",
"$I = \\frac{101}{150} mL^2$\n",
"\n",
"Then the natural frequency changes as follows:\n",
"\n",
"$\\frac{L}{g} (\\frac{I}{mL^2} + 1) \\ddot{\\theta} + sin(\\theta) = 0$\n",
"\n",
"$ \\frac{251}{150} \\frac{L}{g} \\ddot{\\theta} + sin(\\theta) = 0$\n",
"\n",
"$ f = \\frac{1}{2\\pi} \\sqrt{\\frac{150}{251} \\frac{g}{L}}$\n",
"\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}