Last active
April 21, 2018 23:23
-
-
Save tribbloid/f82097002f08fc4a6d54091c108fb948 to your computer and use it in GitHub Desktop.
2 questions for rigid body dynamics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Question 1\n", | |
"\n", | |
"Do you have the deduction of the transformation matrix $T$? specifically, the following one in terms of Euler Angles:\n", | |
"\n", | |
"$$\n", | |
"T = \\begin{pmatrix} 1 & \\sin{\\phi}\\tan{\\theta} & \\cos{\\phi}\\tan{\\theta} \\\\ 0 & \\cos{\\phi} & -\\sin{\\phi} \\\\ 0 & \\sin{\\phi}\\sec{\\theta} & \\cos{\\phi}\\sec{\\theta} \\end{pmatrix}\n", | |
"$$\n", | |
"\n", | |
"It looks strange because:\n", | |
"\n", | |
"1. it doesn't depend on $\\psi$, and has no relationship with rotation matrix\n", | |
"\n", | |
"2. according to definition (assuming $R$ is the rotation matrix from body frame to world frame):\n", | |
"\n", | |
"- $\\vec \\omega_{body} = (p, q, r)^T$\n", | |
"\n", | |
"- $\\vec \\omega_{world} = (\\phi, \\theta, \\psi)^T$\n", | |
"\n", | |
"- $\\forall$ simple vector $\\vec a$: $\\vec a_{world} = R \\vec a_{body}$ (not sure if it always applies to pseudovector as well)\n", | |
"\n", | |
"- while angular velocity $\\vec \\omega_{frame}$ is indirectly defined as an operator $\\vec \\omega_{frame} \\times$ which can convert a point $\\vec x_{frame}$ to its linear speed $\\vec v_{x-frame}$, e.g.:\n", | |
"\n", | |
"$$\n", | |
"\\vec v_{x-body} = \\vec \\omega_{body} \\times \\vec x_{body} \\\\\n", | |
"\\vec v_{x-world} = \\vec \\omega_{world} \\times \\vec x_{world}\n", | |
"$$\n", | |
"\n", | |
"- both $\\vec x_{world}$ and $\\vec v_{x-world}$ are simple, linear vectors, so:\n", | |
"\n", | |
"$$\n", | |
"R \\vec v_{x-body} = \\vec \\omega_{world} \\times R \\vec x_{body}\n", | |
"$$\n", | |
"\n", | |
"=>\n", | |
"\n", | |
"$$\n", | |
"\\vec v_{x-body} = R^T \\vec \\omega_{world} \\times R \\vec x_{body}\n", | |
"$$\n", | |
"\n", | |
"=>\n", | |
"\n", | |
"$$\n", | |
"\\vec \\omega_{body} \\times = R^T \\vec \\omega_{world} \\times R\n", | |
"$$\n", | |
"\n", | |
"=>\n", | |
"\n", | |
"$$\n", | |
"\\vec \\omega_{body} = R^T \\vec \\omega_{world}\n", | |
"$$\n", | |
"\n", | |
"which is evidently different from $T$, so where did $T$ come from?\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Question 2\n", | |
"\n", | |
"I'm trying to reproduce an alternative formulation of dynamics $\\vec F \\Rightarrow \\dot {\\vec v}$ in body frame, which is:\n", | |
"\n", | |
"$$\n", | |
"m \\dot {\\vec v}_{body} + m \\vec \\omega_{body} \\times \\vec v_{body} = \\vec F_{body}\n", | |
"$$\n", | |
"\n", | |
"(It's complex and useless, I just verify it for OCD).\n", | |
"\n", | |
"So I start from the well known:\n", | |
"\n", | |
"$$\n", | |
"\\vec F_{world} = m \\dot {\\vec v}_{world}\n", | |
"$$\n", | |
"\n", | |
"=>\n", | |
"\n", | |
"$$\n", | |
"R \\vec F_{body} = m \\frac{d R \\vec v_{body}} {d t}\n", | |
"$$\n", | |
"\n", | |
"(chain rule) =>\n", | |
"\n", | |
"$$\n", | |
"R \\vec F_{body} = m R \\frac{d \\vec v_{body}} {d t} + m \\frac{d R}{d t} \\vec v_{body}\n", | |
"$$\n", | |
"\n", | |
"(by using $\\vec \\omega_{world} \\times R = \\frac{d R}{d t}$, as each column of R is a point in the world frame) =>\n", | |
"\n", | |
"$$\n", | |
"\\vec F_{body} = m \\frac{d \\vec v_{body}} {d t} + m R^T \\frac{d R}{d t} \\vec v_{body} \\\\\n", | |
"= m \\dot {\\vec v}_{body} + m R^T \\vec \\omega_{world} \\times R \\vec v_{body} \\\\\n", | |
"= m \\dot {\\vec v}_{body} + m \\vec \\omega_{body} \\times \\vec v_{body}\n", | |
"$$\n", | |
"\n", | |
"Is this correct? If it is then the last line of **Question 1** should also be correct.\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python [conda root]", | |
"language": "python", | |
"name": "conda-root-py" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.3" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment