Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 375 lines (375 sloc) 47.3 KB
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Computational Mechanics Project #02 - Create specifications for a projectile robot\n",
"\n",
"On the first day of class, we threw $2\"\\times~2\"$ dampened paper (spitballs) at a target on the whiteboard. Now, we are going to analyze the accuracy of the class with some cool Python tools and design a robot that has the same accuracy and precision as the class, but we will have the robot move farther away from the target and use a simpler projectile i.e. a tennis ball so we don't need to worry about knuckle-ball physics. \n",
"\n",
"The goal of this project is to determine the precision of necessary components for a robot that can reproduce the class throwing distibution. We have generated pseudo random numbers using `numpy.random`, but the class target practice is an example of truly random distributions. If we repeated the exercise, there is a vanishingly small probability that we would hit the same points on the target, and there are no deterministic models that could take into account all of the factors that affected each hit on the board. \n",
"\n",
"<img src=\"../images/robot_design.png\" style=\"height: 250px;\"/>\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now, we ask ourselves some questions:\n",
"\n",
"1. How do we quantify the class accuracy and precision?\n",
"\n",
"2. If we design a robot, what design components can we control?\n",
"\n",
"3. How can we relate the controlled components to the class accuracy, and specify the component precision?\n",
"\n",
"The first question, we have some experience from our work in [02_Seeing_Stats](../notebooks/02_Seeing_Stats.ipynb). We can define the mean, standard deviation, measure the first, second, and third quartiles, etc. \n",
"\n",
"The second question is a physical question. We cannot control the placement of the robot or the target those are chosen for us. We cannot control temperature, mechanical vibrations, etc. We *can* control the desired initial velocity. The initial velocity will have some speed and direction, and both will be subject to random noise. Once the speed and direction are set, the location on the target is determined by kinematic equations for an object in freefall, as such\n",
"\n",
"$x_{impact} = \\frac{v_x}{v_y}d + x(0)~~~~~~~~~~~~~~~~~~~~(1.a)$\n",
"\n",
"$z_{impact} = d\\left(\\frac{v_z(0)}{v_y}-\\frac{g}{2v_y^2}d\\right)+ z(0)~~~~~(1.b)$.\n",
"\n",
"Where the location of impact is at a $y$-distance of $d$ at a point on the target with coordinates $(x_{impact},~z_{impact})$, and the initial velocity is $\\bar{v}=v_x\\hat{i}+v_y\\hat{j}+v_z(0)\\hat{k}$, the object is released at an initial location $\\bar{r}(0)=x(0)\\hat{i}+0\\hat{j}+z(0)\\hat{k}$, and the only acceleration is due to gravity, $\\bar{a}=-g\\hat{k}$. Equation (1) becomes much easier to evaluate if we assume that $v_x=0$, resulting in an evalution of the accuracy of the height of the impact, $z_{impact}$, as such\n",
"\n",
"$x_{impact} = x(0)~~~~~~~~~~~~~~~~~~~~(2.a)$\n",
"\n",
"$z_{impact} = \\frac{d}{\\cos{\\theta}}\\left(\\sin{\\theta}-\\frac{g}{2v_0^2\\cos{\\theta}}d\\right)+ z(0)~~~~~(2.b)$.\n",
"\n",
"Where $\\theta$ is the angle of the initial velocity and $v_0$ is the initial speed. Equation (2) restricts the analysis to height accuracy. You can incorporate the 2D impact analysis if you finish the 1D analysis. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The third question, is how we can relate equation (2) to the measured points of impact? For this, we can use Monte Carlo methods *(There are other methods, but Monte Carlo is one of the most straight-forward)*. Our Monte Carlo approach is as such, if we have a desired initial speed, $v_0$, and desired angle, $\\theta$, we can propagate the uncertainty of our actual speeds and angles into the $z_{impact}$ locations. Then, we can choose distributions in speed and angles that match the distributions in $z_{impact}$ locations. Here are the steps:\n",
"\n",
"1. Generate random $\\theta_i$ and $v_{0~i}$ variables\n",
"\n",
"2. Plug into eqn 2 for random $z_{impact~i}$ locations\n",
"\n",
"3. Compare to our measured $z_{impact}$ location statistics\n",
"\n",
"4. Repeat 1-3 until the predicted uncertainty matches the desired uncertainty, we can use a number of comparison metrics:\n",
" \n",
" - standard deviation\n",
" \n",
" - first, second, and third quartiles\n",
" \n",
" - visually, with box plots and histograms"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Project Deliverables\n",
"\n",
"1. Statistical analysis of class accuracy and precision (x- and z-locations) data is in the csv file [../data/target_data.csv](../data/target_data.csv) _Note: if you want to see how I turned the images into data check out the jupyter notebook [process_target_practice](./process_target_practice.ipynb)\n",
"\n",
"2. A Monte Carlo model to generate impact heights based upon uncertainty in $\\theta_0$ and $v_0$. \n",
"\n",
"3. The precision required to recreate the class accuracy and precision with a robot. \n",
"**You must show some validation of your work**\n",
"\n",
"4. [BONUS] Repeat 2-3 taking into account the variation in $x_{impact}$ due to misalignment. \n",
"\n",
"Given constants and constraints:\n",
"\n",
"- $d=$3 m, distance to target\n",
"\n",
"- $g=$9.81 m/s$^2$, acceleration due to gravity\n",
"\n",
"- $z(0)=$0.3 m, the initial height is 0.3 m above the bull's eye\n",
"\n",
"- 4 m/s$<v_0<$12 m/s, the initial velocity is always higher than 9 mph and less than 27 mph"
]
},
{
"cell_type": "code",
"execution_count": 282,
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pandas as pd\n",
"\n",
"#Import rcParams to set font styles\n",
"from matplotlib import rcParams\n",
"\n",
"#Set font style and size \n",
"rcParams['font.family'] = 'sans'\n",
"rcParams['font.size'] = 16\n",
"rcParams['lines.linewidth'] = 3"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Section 1"
]
},
{
"cell_type": "code",
"execution_count": 283,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The first quartile for x is -0.16854422326722185\n",
"The second quartile for x is 0.028452517775170515\n",
"The third quartile for x is 0.1670894539891312\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAD9CAYAAAB0i+q4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAbfklEQVR4nO3df5QV5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NdDPJcAZef+Kff10vT700mN0fj3el2+jIZF5kuzkB8gmsqG5fe3JkZJOLvRxENko8ZcR8fu8+AXgQ/nJBx31jiY7nFnUUL/yw4DLgfPy7XWscxjwcdL9DKyPHCrWV39DNkE/JSLayM46egqYL6mRN7DfAg9IuiA/5fMBssnpmfDe8fqvAePz+ZKJki4B7iCbp/g+gKTrJN0qaZKkT0r6LNlZXU9GxMY62wV4luzOop+X9AlJtWJolMwke+NbJOlcSX8O/Bw4mOwePincDGyh8+vR7VyHpBMkLZb0V/lptBPIAvVdshEL/OEW3l+SdEq+r/VGEo34LfBjSRdLOgO4C/gTsp9ThwVkI4sfSpog6cK8XnmurZl+fRU4BrhX0qclTQYeBN4gOxPNdgUDfaaAH7vvg+wwSztwfan8WLI3x3/qof0GstNu/5LsBmvtwBPAaXXqTgFW5nV+RzaHc0Rh+RnA/WSHkNqBF4HbgD8u1JlD6Ywk4Itkk9zvUjjTidLZX3nZfyQLks35/i0CTirVmQO8VKf/D1M466mb1+RjwC/IDh+9TPZG+nW6P/trCNlo8VlgK9nhuCXAhFKba/J17sjbDy+s6/o6fRlH/bO/lgJnAavy13oNcEGd9ufkdd7Of3afqvc69NCva0t1J5KN6N4mC5O7gGPrvNZLu/h9m1Mu9yPtw5e+twGTfzhuaURMGei+mFkaPvxlZmbJOFTMzCwZH/4yM7NkPFIxM7NkHCpmZpaMQ8XMzJJxqJiZWTIOFTMzS+b/AyNAqG+EZjOYAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"data = pd.read_csv(\"../data/target_data.csv\")\n",
"x_position = data[' x position (m)']\n",
"x_mean = np.mean(x_position)\n",
"x_std = np.std(x_position)\n",
"Q1_x = np.percentile(x_position, q=25)\n",
"Q2_x = np.percentile(x_position, q=50)\n",
"Q3_x = np.percentile(x_position, q=75)\n",
"plt.boxplot(x_position, labels=['x position distribution']);\n",
"print('The first quartile for x is {}'.format(Q1_x))\n",
"print('The second quartile for x is {}'.format(Q2_x))\n",
"print('The third quartile for x is {}'.format(Q3_x))"
]
},
{
"cell_type": "code",
"execution_count": 284,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The first quartile for z is -0.21785495681409592\n",
"The second quartile for z is -0.070851135369002\n",
"The third quartile for z is 0.13222390283592378\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAD9CAYAAAB0i+q4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAYiElEQVR4nO3df5SkVX3n8fdHEPwVkyFKMAYYEEKAVTmmjajEIEsWNrKgh1WIYGSj4tH158ZzDOKPCWjE6IKbqGfBZCUynqhwVEQJ6Aq4UcHYg2IYlQDO+BNldIbfMIh+94/naSlqqruru29NI/N+nVOnp+5z73PvU9VVn3nufao6VYUkSS08aLkHIEl64DBUJEnNGCqSpGYMFUlSM4aKJKmZ7Zd7AMvpUY96VK1cuXK5hyFJv1LWrFnzk6p69Kht23SorFy5kunp6eUehiT9Sknyndm2Of0lSWrGUJEkNWOoSJKaMVQkSc0YKpKkZgwVSVIzhookqRlDRZLUzDb94Udpa0myVfrx7yNpuRkq0law0Df7JAaEfiU5/SVJasZQkSQ1Y6hIkpoxVCRJzUw0VJLsmuS8JDcnuSXJx5LsNmbbmuV2wFC9ByU5Kcn6JHcluSrJ0ZM5IknSXCZ29VeShwGXAJuBFwIFvBW4NMkTqur2MXZzNnDmUNm/D90/FXgdcDKwBjgWODfJEVV14eKPQJK0UJO8pPglwJ7APlV1HUCSrwPXAi8FTh9jHz+oqitm25hkZ7pAOa2q3tUXX5pkL+A0wFCRpK1oktNfRwJXzAQKQFWtA74IHNWoj8OAHYDVQ+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FEce6fr7Ho693KPDV/hi+DbwUOJu5r/7ah26ab13/GG6gC9+nDLTZrn/MbgR+0b3077OvF8/x3K4cOo7VwIvpptg29+M9ZET7l9K94d8JfInuMuT7PA5jjOuEoX0eD1zV9/tT4BzgMSMe69Wz/L6tGi731vbmV99r2fQfdHtbVb1xucciqQ3XVCRJzRgqkqRmnP6SJDXjmYokqRlDRZLUjKEiSWrGUJEkNWOoSJKa+f96rDBUwNAnSQAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"y_position = data[' y position (m)']\n",
"y_mean = np.mean(y_position)\n",
"y_std = np.std(y_position)\n",
"Q1_y = np.percentile(y_position, q=25)\n",
"Q2_y = np.percentile(y_position, q=50)\n",
"Q3_y = np.percentile(y_position, q=75)\n",
"plt.boxplot(y_position, labels=['z position distribution']);\n",
"print('The first quartile for z is {}'.format(Q1_y))\n",
"print('The second quartile for z is {}'.format(Q2_y))\n",
"print('The third quartile for z is {}'.format(Q3_y))"
]
},
{
"cell_type": "code",
"execution_count": 285,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The first quartile for tot is 0.19909935113674182\n",
"The second quartile for tot is 0.2967735594999671\n",
"The third quartile for tot is 0.40816954320848103\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD9CAYAAABQvqc9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAUyUlEQVR4nO3df7RlZX3f8ffHAWMkpZkp2KgVxqkUB4ixrsmSyCQOLF3SJAtitfFHNdA1BY31Z01a7SiiMFqjC2x+rMrgNFgwo41LM9QfLSqDdoikGYwahwkBy4Ck/hhhBEE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5NsAc7v9+r+nG7t+M3Alqr6MkCSrcCX6P6YZy/wT4HT6c64mev5Arw+ySeBH1XVjvFOVfWj/vTHS5JcQbeu/Hi6s0luAv54ynMc6i3AVTxwe7yVnyxlTZTk5XTHPj4BfI1uqeiNwP8FvtJ3W8hrM5vv051h9S66dfa30v1MXDzS54PAf0lyMd1B9l+g+xkaN6iuqrozyUXAG5Pc2z/X1cCFdGd0Hax/SHdoWuojyV72z4Vuz3ALXWgWsHvkvuOBP6M7XfM+uj2v04eOnzDXyr7PK4CLgD3A9+jevE8c63s43Zv7Vrpli1v726NnZ7y+r+kOulC6ke7sk9E+u3ng2TvL6JZ/vgX8mP5MFcbO3hnp/xK6Xyz7+nkuBx471mc3cMWE5/ugM5Bm2S4v6mvfB+yk+yvia5j77J1fArbSBf4+unXvPwWOn/bajDzWsybUcv7MNhl7HhuB/0B3wP0+umMoTx3r9wjgvP61+h7wP4F/PL4dBtS1bqRv6JbtbqQ7LfXr/et35IQaL5zl5+3s8efpZf4Xv1pZ89YvCdwCnFPdUoykhwnX9CWpIYa+JDXE5R1Jaoh7+pLUEENfkhpi6EtSQwx9SWqIoS9JDfl/ytqKO5KjEn4AAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"dist = np.sqrt(data[' x position (m)']**2 + data[' y position (m)']**2)\n",
"dist_mean = np.mean(dist)\n",
"dist_std = np.std(dist)\n",
"Q1_tot = np.percentile(dist, q=25)\n",
"Q2_tot = np.percentile(dist, q=50)\n",
"Q3_tot = np.percentile(dist, q=75)\n",
"plt.boxplot(dist, labels=['tot position distribution']);\n",
"print('The first quartile for tot is {}'.format(Q1_tot))\n",
"print('The second quartile for tot is {}'.format(Q2_tot))\n",
"print('The third quartile for tot is {}'.format(Q3_tot))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Section 2"
]
},
{
"cell_type": "code",
"execution_count": 303,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The first quartile for z_height is -0.1789018487947081\n",
"The second quartile for z_height is -0.005914843444322249\n",
"The third quartile for z_height is 0.2602416017739394\n"
]
},
{
"data": {
"text/plain": [
"array([-0.15202024, -0.26453083, -0.00591484, -0.15769379, -0.40009519,\n",
" 0.16552245, 0.64461535, 0.18039022, 0.4106879 , 0.2602416 ,\n",
" -0.10482995, -0.19368973, 0.16953191, 0.16857507, -0.25959889,\n",
" -0.19530618, 0.11614742, -0.24414948, -0.03817304, 0.14973499,\n",
" -0.0493952 , 0.4239159 , -0.05896327, -0.10622657, 0.33590505,\n",
" 0.15311425, -0.17890185, -0.19615454, -0.11545261, -0.42585763,\n",
" -0.30865695, 0.32180157, 0.27525837, -0.023196 , 0.26131531,\n",
" -0.36320222, 0.47176472, -0.36319588, 0.01933821, 0.20214081,\n",
" 0.27905946, -0.24434303, -0.16188914, 0.02955067, 0.54633433,\n",
" 0.38801365, 0.44864213, 0.10254686, -0.00918668, -0.59019435,\n",
" -0.03052037, 0.01370724, 0.33712062])"
]
},
"execution_count": 303,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAD9CAYAAAB0i+q4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAYwElEQVR4nO3de7SkVX3m8e/D1csaku4g3mLTIA4RRmUyxyVRogyLDIwyoIMiKkYTRxwd42V0LUPw0gJGjC5wEp01oBmJtAOKS8QLikbQxEs7HlAMjRJgaNQEBO1GbtIg/uaP9z2hurrOOXXO2dUHmu9nrVrVtd+9373fqtP1nHfvt+qkqpAkqYUdlnsAkqTth6EiSWrGUJEkNWOoSJKaMVQkSc3stNwDWE677757rV69ermHIUkPKJdeeunPquo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mvgcbn1V8a15XAyiSvBqaBu6rqH4DTgZcDX07yDuBW4DXAvwaeM0b7ufwr4NNJzqC7EujddIusHwWoqvVJzgHW9L+VfpNu7v5twDlV9X2AJBcAl9N9WG4T8G+Bw+mu2JrreAHelOQLwL1VNT1cqaru7S/PPSPJWrp5/cfSXY10NfCReY5xXO8AvsSWz8c7uW+qb6Qk/5Vu7elC4Md0U2knAP8MXNFXW8xrM5tf0l2h9166dY530v1MnD5Q51zgfyc5ne4iiqfQ/QwNG2tcVbUxyWnACUnu6I/1icApdFcE3l8/qLp9Wu4rBbw9MG50v9meQ/emXMCGgW37Ap+mu5z4LrrfHA8ft/2Ivlb3dV4DnAbcDNxJ9+aw11DdnenePK6nm9a5vn88eHXPm/ox/ZzuTe8ququXButsYMurv3akmx67Cfg1/ZVODF39NVD/OLrg2tz3czbw6KE6G4C1I453qyvYZnleXtSPfTOwnu5bAL7K3Fd//R5wAV2gbKZbdzgP2He+12ZgX4eOGMuamedk6DjeBfwZ3QUVd9GtYR0wVG8H4O39a3UncBHw+OHnYYxxHTxQN3TTmlfRXTZ9Q//67TZijKfM8vP28uHj9Lbwm199r/udfsrkOuCV1U1VSXqAcE1FktSMoSJJasbpL0lSM56pSJKaMVQkSc0YKpKkZgwVSVIzhookqZn/D+6Xgzgo2ZtDAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"def montecarlo_heights(D,V_low,V_high,N):\n",
" '''Creates random points on the target based off of variable inputs.\n",
" ---------\n",
" D: Distance away from the target\n",
" V_low: lower bound of the initial velocity\n",
" V_high: upper bound of the initial velocity\n",
" N: number of projectiles thrown\n",
" -------\n",
" '''\n",
" import random\n",
" pi = 3.14159\n",
" g = 9.81\n",
" z0 = .3\n",
" V = np.zeros(N)\n",
" for i in range (0,N):\n",
" V[i] = V_low + np.clip(np.random.normal(.5,.1),0,1)*(V_high-V_low)\n",
" theta = np.zeros(N)\n",
" for i in range (0,N):\n",
" theta[i] = np.random.rand(1)*pi/11\n",
" cos = np.cos(theta)\n",
" sin = np.sin(theta)\n",
" z = D/cos*(sin-g/(2*V**2*cos)*D)+z0\n",
" return z\n",
"z_height = montecarlo_heights(3,4,12,53)\n",
"Q1_z_height = np.percentile(z_height, q=25)\n",
"Q2_z_height = np.percentile(z_height, q=50)\n",
"Q3_z_height = np.percentile(z_height, q=75)\n",
"plt.boxplot(z_height, labels=['tot position distribution']);\n",
"print('The first quartile for z_height is {}'.format(Q1_z_height))\n",
"print('The second quartile for z_height is {}'.format(Q2_z_height))\n",
"print('The third quartile for z_height is {}'.format(Q3_z_height))\n",
"z_height"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Section 3"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"I ajusted the angle variation until the positive regon of the box plot whisker reached around .6 meters. This occured when the angle was between 0 and pi/11. I then set the mean of the velocity to be 8 m/s and adjusted the standard deviation until the whisker plot was around -.6. This occured when the standard deviation was set to .1."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}