{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Velocity and Acceleration of a point of a rigid body\n", "\n", "> Renato Naville Watanabe, Marcos Duarte \n", "> [Laboratory of Biomechanics and Motor Control](http://pesquisa.ufabc.edu.br/bmclab) \n", "> Federal University of ABC, Brazil" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

Contents

\n", "
" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "This notebook shows the expressions of the velocity and acceleration of a point on rigid body, given the angular velocity of the body." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "## Python setup" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "%matplotlib widget\n", "from matplotlib.animation import FuncAnimation\n", "from matplotlib.patches import FancyArrowPatch" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Frame of reference attached to a body\n", "\n", "The concept of reference frame in Biomechanics and motor control is very important and central to the understanding of human motion. For example, do we see, plan and control the movement of our hand with respect to reference frames within our body or in the environment we move? Or a combination of both? \n", "The figure below, although derived for a robotic system, illustrates well the concept that we might have to deal with multiple coordinate systems. \n", "\n", "
Figure. Multiple coordinate systems for use in robots (figure from Corke (2017)).
\n", "\n", "For three-dimensional motion analysis in Biomechanics, we may use several different references frames for convenience and refer to them as global, laboratory, local, anatomical, or technical reference frames or coordinate systems (we will study this later). \n", "There has been proposed different standardizations on how to define frame of references for the main segments and joints of the human body. For instance, the International Society of Biomechanics has a [page listing standardization proposals](https://isbweb.org/activities/standards) by its standardization committee and subcommittees:" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Position of a point on a rigid body\n", "\n", "The description of the position of a point P of a rotating rigid body is given by:\n", "\n", "\n", "\\begin{equation}\n", "{\\bf\\vec{r}_{P/O}} = x_{P/O}^*{\\bf\\hat{i}'} + y_{P/O}^*{\\bf\\hat{j}'}\n", "\\end{equation}\n", "\n", "\n", "where $x_{P/O}^*$ and $y_{P/O}^*$ are the coordinates of the point P position at a reference state with the versors described as:\n", "\n", "\n", "\\begin{equation}\n", "{\\bf\\hat{i}'} = \\cos(\\theta){\\bf\\hat{i}}+\\sin(\\theta){\\bf\\hat{j}}\n", "\\end{equation}\n", "\n", "\n", "\n", "\\begin{equation}\n", "{\\bf\\hat{j}'} = -\\sin(\\theta){\\bf\\hat{i}}+\\cos(\\theta){\\bf\\hat{j}}\n", "\\end{equation}\n", "\n", "\n", "\n", "\n", "\n", "Note that the vector ${\\bf\\vec{r}_{P/O}}$ has always the same description for any point P of the rigid body when described as a linear combination of ${\\bf\\hat{i}'}$ and ${\\bf\\hat{j}'}$.\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Translation of a rigid body\n", "\n", " Let's consider now the case in which, besides a rotation, a translation of the body happens. This situation is represented in the figure below. In this case, the position of the point P is given by:\n", "\n", "\n", "\\begin{equation}\n", "{\\bf\\vec{r}_{P/O}} = {\\bf\\vec{r}_{A/O}}+{\\bf\\vec{r}_{P/A}}= {\\bf\\vec{r}_{A/O}}+x_{P/A}^*{\\bf\\hat{i}'} + y_{P/A}^*{\\bf\\hat{j}'}\n", "\\end{equation}\n", "\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Angular velocity of a body\n", "\n", "The magnitude of the angular velocity of a rigid body rotating on a plane is defined as:\n", "\n", "\n", "\\begin{equation}\n", " \\omega = \\frac{d\\theta}{dt}\n", "\\end{equation}\n", "\n", "\n", "Usually, it is defined an angular velocity vector perpendicular to the plane where the rotation occurs (in this case the x-y plane) and with magnitude $\\omega$:\n", "\n", "\n", "\\begin{equation}\n", " \\vec{\\bf{\\omega}} = \\omega\\hat{\\bf{k}}\n", "\\end{equation}\n", "\n", "\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Velocity of a point with no translation" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "First we will consider the situation with no translation. The velocity of the point P is given by:\n", "\n", "\n", "\\begin{equation}\n", "{\\bf\\vec{v}_{P/O}} = \\frac{d{\\bf\\vec{r}_{P/O}}}{dt} = \\frac{d(x_{P/O}^*{\\bf\\hat{i}'} + y_{P/O}^*{\\bf\\hat{j}'})}{dt}\n", "\\end{equation}\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "To continue this deduction, we have to find the expression of the derivatives of \n", "${\\bf\\hat{i}'}$ and ${\\bf\\hat{j}'}$. This is very similar to the derivative expressions of ${\\bf\\hat{e_R}}$ and ${\\bf\\hat{e_\\theta}}$ of [polar basis](http://nbviewer.jupyter.org/github/BMClab/bmc/blob/master/notebooks/PolarBasis.ipynb).\n", "\n", "\n", "\\begin{equation}\n", "\\frac{d{\\bf\\hat{i}'}}{dt} = -\\dot{\\theta}\\sin(\\theta){\\bf\\hat{i}}+\\dot{\\theta}\\cos(\\theta){\\bf\\hat{j}} = \\dot{\\theta}{\\bf\\hat{j}'}\n", "\\end{equation}\n", "\n", "\n", "\n", "\\begin{equation}\n", "\\frac{d{\\bf\\hat{j}'}}{dt} = -\\dot{\\theta}\\cos(\\theta){\\bf\\hat{i}}-\\dot{\\theta}\\sin(\\theta){\\bf\\hat{j}} = -\\dot{\\theta}{\\bf\\hat{i}'}\n", "\\end{equation}\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "Another way to represent the expressions above is by using the vector form to express the angular velocity $\\dot{\\theta}$. It is usual to represent the angular velocity as a vector in the direction ${\\bf\\hat{k}}$: ${\\bf\\vec{\\omega}} = \\dot{\\theta}{\\bf\\hat{k}} = \\omega{\\bf\\hat{k}}$. Using this definition of the angular velocity, we can write the above expressions as:\n", "\n", "\n", "\\begin{equation}\n", "\\frac{d{\\bf\\hat{i}'}}{dt} = \\dot{\\theta}{\\bf\\hat{j}'} = \\dot{\\theta} {\\bf\\hat{k}}\\times {\\bf\\hat{i}'} = {\\bf\\vec{\\omega}} \\times {\\bf\\hat{i}'}\n", "\\end{equation}\n", "\n", "\n", "\n", "\\begin{equation}\n", "\\frac{d{\\bf\\hat{j}'}}{dt} = -\\dot{\\theta}{\\bf\\hat{i}'} = \\dot{\\theta} {\\bf\\hat{k}}\\times {\\bf\\hat{j}'} ={\\bf\\vec{\\omega}} \\times {\\bf\\hat{j}'}\n", "\\end{equation}\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "So, the velocity of the point P in the situation of no translation is:\n", "\n", "\n", "\\begin{equation}\n", "{\\bf\\vec{v}_{P/O}} = \\frac{d(x_{P/O}^*{\\bf\\hat{i}'} + y_{P/O}^*{\\bf\\hat{j}'})}{dt} = x_{P/O}^*\\frac{d{\\bf\\hat{i}'}}{dt} + y_{P/O}^*\\frac{d{\\bf\\hat{j}'}}{dt}=x_{P/O}^*{\\bf\\vec{\\omega}} \\times {\\bf\\hat{i}'} + y_{P/O}^*{\\bf\\vec{\\omega}} \\times {\\bf\\hat{j}'} = {\\bf\\vec{\\omega}} \\times \\left(x_{P/O}^*{\\bf\\hat{i}'}\\right) + {\\bf\\vec{\\omega}} \\times \\left(y_{P/O}^*{\\bf\\hat{j}'}\\right) ={\\bf\\vec{\\omega}} \\times \\left(x_{P/O}^*{\\bf\\hat{i}'}+y_{P/O}^*{\\bf\\hat{j}'}\\right)\n", "\\end{equation}\n", "\n", "\n", "\n", "\\begin{equation}\n", "{\\bf\\vec{v}_{P/O}} = {\\bf\\vec{\\omega}} \\times {\\bf{\\vec{r}_{P/O}}}\n", "\\end{equation}\n", "\n", "\n", "This expression shows that the velocity vector of any point of a rigid body is orthogonal to the vector linking the point O and the point P.\n", "\n", "It is worth to note that despite the above expression was deduced for a planar movement, the expression above is general, including three dimensional movements." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Relative velocity of a point on a rigid body to another point\n", "\n", "To compute the velocity of a point on a rigid body that is translating, we need to find the expression of the velocity of a point (P) in relation to another point on the body (A). So:\n", "\n", "\n", "\\begin{equation}\n", "{\\bf\\vec{v}_{P/A}} = {\\bf\\vec{v}_{P/O}}-{\\bf\\vec{v}_{A/O}} = {\\bf\\vec{\\omega}} \\times {\\bf{\\vec{r}_{P/O}}} - {\\bf\\vec{\\omega}} \\times {\\bf{\\vec{r}_{A/O}}} = {\\bf\\vec{\\omega}} \\times ({\\bf{\\vec{r}_{P/O}}}-{\\bf{\\vec{r}_{A/O}}}) = {\\bf\\vec{\\omega}} \\times {\\bf{\\vec{r}_{P/A}}}\n", "\\end{equation}\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Velocity of a point on rigid body translating\n", "\n", "The velocity of a point on a rigid body that is translating is given by:\n", "\n", "\n", "\\begin{equation}\n", "{\\bf\\vec{v}_{P/O}} = \\frac{d{\\bf\\vec{r}_{P/O}}}{dt} = \\frac{d({\\bf\\vec{r}_{A/O}}+x_{P/A}^*{\\bf\\hat{i}'} + y_{P/A}^*{\\bf\\hat{j}'})}{dt} = \\frac{d{\\bf\\vec{r}_{A/O}}}{dt}+\\frac{d(x_{P/A}^*{\\bf\\hat{i}'} + y_{P/A}^*{\\bf\\hat{j}'})}{dt} = {\\bf\\vec{v}_{A/O}} + {\\bf\\vec{\\omega}} \\times {\\bf{\\vec{r}_{P/A}}}\n", "\\end{equation}\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "Below is an example of a body rotating with the angular velocity of $\\omega = \\pi/10$ rad/s and translating at the velocity of \n", "${\\bf\\vec{v}} = 0.7 {\\bf\\hat{i}} + 0.5 {\\bf\\hat{j}}$ m/s. The red arrow indicates the velocity of the geometric center of the body and the blue arrow indicates the velocity of the lower point of the body" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "92b26b24d38f45ae8f0ae60218a5adeb", "version_major": 2, "version_minor": 0 }, "image/png": "iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAYAAADL1t+KAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAIEElEQVR4nO3VsW3DQBAAwbPB+Pvvjx1cA1LgDuSA0GKmgs32Z2ZeAwB8tWtm5r7vOec83QIAfGB3/4Z+zjF0APhiv08HAAD/Z+gAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYO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DoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQcM3M7O7THQDAh3Z33k/VEJa+s6etAAAAAElFTkSuQmCC", "text/html": [ "\n", "
\n", "
\n", " Figure\n", "
\n", " \n", "
\n", " " ], "text/plain": [ "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "t = np.linspace(0,13,40)\n", "omega = np.pi/10 #[rad/s] \n", "voa = np.array([[0.7],[0.5]]) # velocity of center of mass\n", "fig = plt.figure()\n", "plt.grid()\n", "ax = fig.add_axes([0, 0, 1, 1]) \n", "ax.axis(\"on\")\n", "plt.rcParams['figure.figsize']=5,5\n", "def run(i):\n", " ax.clear()\n", " theta = omega * t[i]\n", " phi = np.linspace(0,2*np.pi,100)\n", " B = np.squeeze(np.array([[2*np.cos(phi)],[6*np.sin(phi)]]))\n", " Baum = np.vstack((B,np.ones((1,np.shape(B)[1]))))\n", " roa = voa * t[i]\n", " R = np.array([[np.cos(theta), -np.sin(theta)],[np.sin(theta), np.cos(theta)]])\n", " T = np.vstack((np.hstack((R,roa)), np.array([0,0,1])))\n", " BRot = R@B\n", " BRotTr = T@Baum \n", " \n", " \n", " \n", " plt.plot(BRotTr[0,:],BRotTr[1,:], roa[0], roa[1],'.')\n", " plt.fill(BRotTr[0,:],BRotTr[1,:], 'g')\n", " \n", " vVoa = FancyArrowPatch(roa.squeeze(), roa.squeeze()+5*voa.squeeze(), mutation_scale=20, \n", " lw=2, arrowstyle=\"->\", color=\"r\", alpha=1)\n", " ax.add_artist(vVoa) \n", " \n", " element = 75\n", " \n", " # cross product between omega and r\n", " Vp = voa + np.cross(np.array([0,0,omega]), BRot[:,[element]].T)[:,0:2].T \n", " \n", " vVP = FancyArrowPatch(BRotTr[0:2,element], BRotTr[0:2,element] + 5*Vp.squeeze(),\n", " mutation_scale=20, \n", " lw=2, arrowstyle=\"->\", color=\"b\", alpha=1)\n", " ax.add_artist(vVP)\n", " \n", " plt.xlim((-10, 20))\n", " plt.ylim((-10, 20))\n", " \n", "ani = FuncAnimation(fig, run, frames = 50, repeat=False, interval =500)\n", "plt.show()\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Acceleration of a point on a rigid body\n", "\n", "The acceleration of a point on a rigid body is obtained by deriving the previous expression:\n", "\n", "\n", "\\begin{align}\n", "{\\bf\\vec{a}_{P/O}} =& {\\bf\\vec{a}_{A/O}} + \\dot{\\bf\\vec{\\omega}} \\times {\\bf{\\vec{r}_{P/A}}} + {\\bf\\vec{\\omega}} \\times {\\bf{\\vec{v}_{P/A}}} =\\\\\n", " =&{\\bf\\vec{a}_{A/O}} + \\dot{\\bf\\vec{\\omega}} \\times {\\bf{\\vec{r}_{P/A}}} + {\\bf\\vec{\\omega}} \\times ({\\bf\\vec{\\omega}} \\times {\\bf{\\vec{r}_{P/A}}}) =\\\\\n", " =&{\\bf\\vec{a}_{A/O}} + \\ddot{\\theta}\\bf\\hat{k} \\times {\\bf{\\vec{r}_{P/A}}} - \\dot{\\theta}^2{\\bf{\\vec{r}_{P/A}}}\n", "\\end{align}\n", "\n", "\n", "The acceleration has three terms:\n", "\n", "- ${\\bf\\vec{a}_{A/O}}$ -- the acceleration of the point O.\n", "- $\\ddot{\\theta}\\bf\\hat{k} \\times {\\bf{\\vec{r}_{P/A}}}$ -- the acceleration of the point P due to the angular acceleration of the body.\n", "- $- \\dot{\\theta}^2{\\bf{\\vec{r}_{P/A}}}$ -- the acceleration of the point P due to the angular velocity of the body. It is known as centripetal acceleration.\n", "\n", "\n", "\n", "Below is an example of a rigid body with an angular acceleration of $\\alpha = \\pi/150$ rad/s$^2$ and initial angular velocity of $\\omega_0 = \\pi/100$ rad/s. Consider also that the center of the body accelerates with ${\\bf\\vec{a}} = 0.01{\\bf\\hat{i}} + 0.05{\\bf\\hat{j}}$, starting from rest.\n" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "scrolled": true, "slideshow": { "slide_type": "slide" } }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "7589b186abac4c4896a04dc491ee4ee7", "version_major": 2, "version_minor": 0 }, "image/png": "iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAYAAADL1t+KAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcn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OgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQYOgAEGDoABBg6AAQcM3M7O7THQDAh3Z33k/VEJa+s6etAAAAAElFTkSuQmCC", "text/html": [ "\n", "
\n", "
\n", " Figure\n", "
\n", " \n", "
\n", " " ], "text/plain": [ "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "t = np.linspace(0, 20, 40)\n", "\n", "alpha = np.pi/150 #[rad/s^2] angular acceleration \n", "\n", "omega0 = np.pi/100 #[rad/s] angular velocity\n", "\n", "aoa = np.array([[0.01],[0.05]]) # linear acceleration\n", "\n", "fig = plt.figure()\n", "plt.grid()\n", "ax = fig.add_axes([0, 0, 1, 1]) \n", "ax.axis(\"on\")\n", "plt.rcParams['figure.figsize']=5,5\n", "theta = 0\n", "omega = 0\n", "def run(i):\n", " ax.clear()\n", " phi = np.linspace(0,2*np.pi,100)\n", " B = np.squeeze(np.array([[2*np.cos(phi)],[6*np.sin(phi)]]))\n", " Baum = np.vstack((B,np.ones((1,np.shape(B)[1]))))\n", " \n", " omega = alpha*t[i]+omega0 #[rad/s] angular velocity\n", " \n", " theta = alpha/2*t[i]**2 + omega0*t[i] # [rad] angle\n", " \n", " voa = aoa*t[i] # linear velocity\n", " \n", " roa = aoa/2*t[i]**2 # position of the center of the body\n", " \n", " R = np.array([[np.cos(theta), -np.sin(theta)],[np.sin(theta), np.cos(theta)]])\n", " T = np.vstack((np.hstack((R,roa)), np.array([0,0,1])))\n", " BRot = R@B\n", " BRotTr = T@Baum \n", " \n", " plt.plot(BRotTr[0,:],BRotTr[1,:], roa[0], roa[1],'.')\n", " plt.fill(BRotTr[0,:],BRotTr[1,:],'g')\n", " \n", " element = 75\n", " \n", " ap = (aoa + np.cross(np.array([0,0,alpha]), BRot[:,[element]].T)[:,0:2].T \n", " - omega**2*BRot[:,[element]])\n", " \n", " vVP = FancyArrowPatch(BRotTr[0:2,element], BRotTr[0:2,element] + 5*ap.squeeze(),\n", " mutation_scale=20, \n", " lw=2, arrowstyle=\"->\", color=\"b\", alpha=1)\n", " ax.add_artist(vVP)\n", " \n", " plt.xlim((-10, 20))\n", " plt.ylim((-10, 20))\n", " \n", " \n", "\n", "ani = FuncAnimation(fig, run, frames=50, repeat=False, interval=500)\n", "plt.show()\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Further reading\n", "\n", "- Read pages 958-971 of the 18th chapter of the [Ruina and Rudra's book] (http://ruina.tam.cornell.edu/Book/index.html) about circular motion of particle. " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Video lectures on the Internet\n", "\n", "- [Kinematics Of Rigid Bodies - General Plane Motion - Solved Problems](https://www.youtube.com/watch?v=4LsLy9iJKFA)\n", "- [Kinematics of Rigid Bodies -Translation And Rotation About Fixed Axis - Rectilinear and Rotational](https://www.youtube.com/watch?v=VnzsQmP6eMQ) " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Problems\n", "\n", "- 1. Solve the problems 16.2.5, 16.2.10, 16.2.11 and 16.2.20 from [Ruina and Rudra's book](http://ruina.tam.cornell.edu/Book/index.html).\n", "- 2. Solve the problems 17.1.2, 17.1.8, 17.1.9, 17.1.10, 17.1.11 and 17.1.12 from [Ruina and Rudra's book](http://ruina.tam.cornell.edu/Book/index.html).\n", "- 3. Solve the problems 2.1, 2.2, 2.7, 2.8, 2.17" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Reference\n", "\n", "- Ruina A, Rudra P (2019) [Introduction to Statics and Dynamics](http://ruina.tam.cornell.edu/Book/index.html). Oxford University Press.\n", "- Corke P (2017) [Robotics, Vision and Control: Fundamental Algorithms in MATLAB](http://www.petercorke.com/RVC/). 2nd ed. Springer-Verlag Berlin." ] } ], "metadata": { "celltoolbar": "Slideshow", "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "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.9.13" }, "latex_envs": { "LaTeX_envs_menu_present": true, "autoclose": false, "autocomplete": true, "bibliofile": "biblio.bib", "cite_by": "apalike", "current_citInitial": 1, "eqLabelWithNumbers": true, "eqNumInitial": 1, "hotkeys": { "equation": "Ctrl-E", "itemize": "Ctrl-I" }, "labels_anchors": false, "latex_user_defs": false, "report_style_numbering": false, "user_envs_cfg": false }, "nbTranslate": { "displayLangs": [ "*" ], "hotkey": "alt-t", "langInMainMenu": true, "sourceLang": "en", "targetLang": "pt", "useGoogleTranslate": true }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false }, "varInspector": { "cols": { "lenName": 16, "lenType": 16, "lenVar": 40 }, "kernels_config": { "python": { "delete_cmd_postfix": "", "delete_cmd_prefix": "del ", "library": "var_list.py", "varRefreshCmd": "print(var_dic_list())" }, "r": { "delete_cmd_postfix": ") ", "delete_cmd_prefix": "rm(", "library": "var_list.r", "varRefreshCmd": "cat(var_dic_list()) " } }, "types_to_exclude": [ "module", "function", "builtin_function_or_method", "instance", "_Feature" ], "window_display": false } }, "nbformat": 4, "nbformat_minor": 4 }