Inertial Navigation BRIEF ABSTRACT An inerial guidance system breaks down, only giving acceleration information. Where are we? Where are we heading? GENERAL INFORMATION FileName: INERTIAL Full title: Inertial Navigation Last Revision Date: 5 June 1996. Developer: Jerry Fine, Department of Mechanical Engineering, Rose-Hulman Institute of Technology, Terre Haute IN 47803 USA. Phone: 812-877-8353. Email: fine@nextwork.rose-hulman.edu FAX: 812-877-3198 Contact: Brian J. Winkel, Department of Mathematical Sciences, United States Military Academy, West Point NY 10996 USA. Phone: 914-938-3200. Email: ab3646@usma2.usma.edu. FAX: 914-938-2409. Aaron D. Klebanoff, Department of Mathematics, Rose-Hulman Institute of Technology, Terre Haute IN 47803 USA. Phone: 812-877-8151. Email: Aaron.Klebanoff@Rose-Hulman.Edu. FAX: 812-877-3198. Support: The production of this material is supported by the National Science Foundation under Division of Undergraduate Education grant DUE-9352849: Development Site for Complex, Technology-Based Problems in Calculus with Applications in Science and Engineering and the Arvin Foundation of Columbus IN. STATEMENT OF PROBLEM Description of How Inertial Navigation Works Inertial navigation measures accelerations. Using the acceleration data, it becomes possible to compute velocity and then position by integration. Inertial navigation systems have computers which perform these calculations. Here is a very simplified sketch of an accelerometer, the acceleration measuring device. The accelerometers are mounted on a gyro-stabilized platform, which remains level at all times and also maintains a constant orientation to true north. Here is a sketch of the inertial platform. Your Problem You are at sea on a small inertial-navigation equipped sailing vessel. The inertial's computer (containing the four integrators shown above) breaks down, but the platform itself continues to function and produce acceleration data, which can be read out. You are equipped with a small personal computer. You will try to take the acceleration data and use it to obtain ship's velocity and position. Acceleration Data -- Raw data from accelerometers. The cell below contains a set of acceleration data. accelx = { {0, 0}, {0.1, -2.01}, {0.2, -3.94}, {0.3, -5.73}, {0.4, -7.31}, {0.5, -8.60}, {0.6, -9.56}, {0.7, -10.15}, {0.8, -10.34}, {0.9, -10.11}, {1., -9.45}, {1.1, -8.38}, {1.2, -6.92}, {1.3, -5.11}, {1.4, -2.99}, {1.5, -0.64}, {1.6, 1.88}, {1.7, 4.50}, {1.8, 7.13}, {1.9, 9.69}, {2., 12.09}, {2.1, 14.25}, {2.2, 16.08}, {2.3, 17.52}, {2.4, 18.51}, {2.5, 18.99}, {2.6, 18.93}, {2.7, 18.30}, {2.8, 17.11}, {2.9, 15.35}, {3.0, 13.06}, {3.1, 10.28}, {3.2, 7.07}, {3.3, 3.50}, {3.4, -0.34}, {3.5, -4.36}, {3.6, -8.46}, {3.7, -12.53}, {3.8, -16.45}, {3.9, -20.11}, {4.0, -23.40}, {4.1, -26.23}, {4.2, -28.49}, {4.3, -30.11}, {4.4, -31.02}, {4.5, -31.17}, {4.6, -30.53}, {4.7, -29.09}, {4.8, -26.85}, {4.9, -23.85}, {5., -20.14} }; accely = { {0, -0.21}, {0.1, -0.19}, {0.2, -0.18}, {0.3, -0.16}, {0.4, -0.15}, {0.5, -0.13}, {0.6, -0.12}, {0.7, -0.11}, {0.8, -0.09}, {0.9, -0.08}, {1., -0.07}, {1.1, -0.05}, {1.2, -0.0}, {1.3, -0.03}, {1.4, -0.02}, {1.5, -0.01}, {1.6, -0.00}, {1.7, 0.008}, {1.8, 0.01}, {1.9, 0.027}, {2., 0.036}, {2.1, 0.045}, {2.2, 0.056}, {2.3, 0.06}, {2.4, 0.06}, {2.5, 0.07}, {2.6, 0.08}, {2.7, 0.08}, {2.8, 0.09}, {2.9, 0.09}, {3.0, 0.10}, {3.1, 0.10}, {3.2, 0.10}, {3.3, 0.11}, {3.4, 0.11}, {3.5, 0.11}, {3.6, 0.11}, {3.7, 0.11}, {3.8, 0.12}, {3.9, 0.12}, {4.0, 0.12}, {4.1, 0.12}, {4.2, 0.12}, {4.3, 0.11}, {4.4, 0.11}, {4.5, 0.11}, {4.6, 0.11}, {4.7, 0.11}, {4.8, 0.11}, {4.9, 0.10}, {5., 0.10} }; Quantities to be Calculated Find the x and y coordinates of position of the ship which was located at coordinates (0,1) at time 0. Assume that the ship's initial x-velocity is 3 and its initial y velocity is -0.2. KEYWORDS Inertial navigation, accelerometer, Numerical integration, position, velocity, acceleration TEACHER NOTES ISSUES RELATED TO THE PROBLEM Prerequisites The student must know kinematics, in particular how to get from acceleration to velocity to position by integrating. The student must be cognizant of numerical integration techniques such as the rectangle rule, the trapezoidal rule, or Simpson's rule. The student must know enough about programming either a computer algebra system, or perhaps a sophisticated hand-held calculator, or perhaps a spreadsheet, to carry out the numerical integration with actual data values. The programming is modest beginner material, e.g,. looping, lists, and appending values to a list. It would be good if the student were familiar enough with the computing system to produce plots comparing the numerical solution to a true solution given below. Time allotment - time management This could be about a one-hour mini-project for groups. The most difficult part of the project would be programming the numerical integration schemes. It could take up quite a bit of time, particularly if Simpson's rule or even the trapezoidal rule were to be used. To get best advantage, students should try and compare at least two schemes. If interpolation of the acceleration data is used, then it it is possible to solve the problem with finer meshes and observe convergence of the schemes. If this is done, then the problem could wind up taking several hours. Expectations The student's knowledge of kinematics will be reinforced. The problem has enough of a practical flavor to interest some non-mathematical students in the use of numerical integration. The difficult part will be the actual programming of the methods. Future payoffs The student should acquire more confidence in handling numerical data in various ways. The student will be more capable of implementing numerical algorithms. Extensions The guidance problem is an obvious extension. It is the inverse of this problem. Suppose that a planned trajectory is described. What accelerations must be programmed into the system to produce the motion? Another extension would be an in-depth comparison of several of the methods used to solve the problem. References and Sources Numerical Methods for Engineers by Steven Chapra and Raymond Canale. McGraw Hill, New York, 1988. ISBN 0-07-079984-9 POSSIBLE SOLUTION(S) A number of solutions will now be given. We begin by showing the true solution used to produce the acceleration data. Data Generation -- True Solution xx[t_] = 3 t Cos[ 1.5 t]; yy[t_] = Cos[.5 t] Exp[-.2 t]; (* accelx = Table[ {t,xx''[t]}, {t,0,5,.1}]; accely = Table[ {t,yy''[t]}, {t,0,5,.1}]; *) Plots of True Solution Parametric Plot of accelerations pta=ParametricPlot[ {xx''[t],yy''[t]},{t,0,5}] -Graphics- Parametric Plot of Velocities ptv=ParametricPlot[ {xx'[t],yy'[t]},{t,0,5}] -Graphics- Parametric Plot of Position -- Ship's Track pt = ParametricPlot[ {xx[t],yy[t]},{t,0,5}] -Graphics- Plot of x velocity vs. Time ptvx = Plot[ xx'[t], {t,0,5}] -Graphics- Plot of y velocity vs time ptvy = Plot[ yy'[t], {t,0,5}] -Graphics- Plot of x position vs. time ptx = Plot[ xx[t], {t,0,5}] -Graphics- Plot of y position vs time pty = Plot[ yy[t], {t,0,5}] -Graphics- Preparation for Numerical Solutions Initial conditions P0 = {0,1}; V0 = {3,-.2}; Using interpolation capability of CAS for acceleration. The following step facilitates numerical integration if you wish to use time steps other than 0.1. It also makes the programming a little easier. ax = Interpolation[accelx] InterpolatingFunction[{0, 5.}, <>] ay = Interpolation[accely] InterpolatingFunction[{0, 5.}, <>] Possible Strategies 1. Euler's Rectangle Method 2. The trapezoidal rule 3. Simpson's Rule 1. Euler's Rectangle Method -- with Interpolation Time Step dt = .1; Initial Velocity V1 = {V0}; Get velocity in loop -- numerical integration -- the rectangle is based on the value of the function at the end of the step. We loop over times, starting with dt and ending with 5. Do[ AppendTo[ V1, Last[V1] + dt { ax[t], ay[t]} ], {t,dt,5,dt}] Interpolate Velocity to make things easier vx1 = Interpolation[ Table[{(i-1) dt, V1[[i,1]]}, {i,1,Length[V1]}] ]; vy1 = Interpolation[ Table[{(i-1) dt, V1[[i,2]]}, {i,1,Length[V1]}] ]; Initialize position P1 = {P0} {{0, 1}} Get position in loop -- numerical integration Do[ AppendTo[ P1, Last[P1] + dt { vx1[t], vy1[t]} ], {t,dt,5,dt}] Comparisons of the solution we have computed with the true solution. Show[ ListPlot[P1], pt] -Graphics- Compare true y velocity with interpolated y velocity Plot[ {yy'[t], vy1[t]},{t,0,5}] -Graphics- px1= ListPlot[ Table[{ (i-1)*dt, P1[[i,1]]}, {i,1,Length[P1]}] ] -Graphics- Show[px1,ptx] -Graphics- 1. Euler's Rectangle Method -- without Interpolation dt = .1; P1a = {P0}; V1a = {V0}; Do[ AppendTo[ V1a, Last[V1a] + dt * { accelx[[i,2]], accely[[i,2]] } ], {i,1,Length[accelx]-1} ] Do[ AppendTo[ P1a, Last[P1a] + dt * V1a[[i]] ], {i,1,Length[V1a]-1} ] Comparison with true solution p1a=ListPlot[P1a] -Graphics- Show[ p1a,pt] -Graphics- p1ay = ListPlot[ Table[{(i-1)*dt,P1a[[i,2]]}, {i,1,Length[P1a]}]] -Graphics- Show[p1ay,pty] -Graphics- 2. Trapezoidal Rule Time Step dt = .1; Initial Velocity V2 = {V0}; Get velocity in loop -- numerical integration Do[ AppendTo[ V2, Last[V2] + dt { ( ax[t-dt] + ax[t])/2., ( ay[t-dt] + ay[t])/2.} ], {t,dt,5,dt}] Interpolate Velocity to make things easier vx2 = Interpolation[ Table[{(i-1) dt, V2[[i,1]]}, {i,1,Length[V2]}] ]; vy2 = Interpolation[ Table[{(i-1) dt, V2[[i,2]]}, {i,1,Length[V2]}] ]; Initialize position P2 = {P0} {{0, 1}} Get position in loop -- numerical integration Do[ AppendTo[ P2, Last[P2] + dt { ( vx2[t-dt] + vx2[t])/2., ( vy2[t-dt] + vy2[t])/2.} ], {t,dt,5,dt}] Comparison with True Solution p2=ListPlot[P2] -Graphics- Show[pt,p2] -Graphics- Comparison of x position vs. time p2x = ListPlot[ Table[{(i-1)*dt, P2[[i,1]]}, {i,1,Length[P2]}]] -Graphics- Show[p2x,ptx] -Graphics- 3. Simpson's Rule dt = .1; V3 = {V0}; Do[ AppendTo[ V3, Last[V3] + dt { ( ax[t-dt] + 4. ax[t-dt/2]+ ax[t])/6., ( ay[t-dt] + 4. ay[t-dt/2]+ ay[t])/6.} ], {t,dt,5,dt}] vx3 = Interpolation[ Table[{(i-1) dt, V3[[i,1]]}, {i,1,Length[V3]}] ]; vy3 = Interpolation[ Table[{(i-1) dt, V3[[i,2]]}, {i,1,Length[V3]}] ]; P3 = {P0}; Do[ AppendTo[ P3, Last[P3] + dt { ( vx3[t-dt] + 4. vx3[t-dt/2]+ vx3[t])/6., ( vy3[t-dt] + 4. vy3[t-dt/2]+ vy3[t])/6.} ], {t,dt,5,dt}] Comparisons with true solution p3 = ListPlot[P3] -Graphics- Show[pt,p3] -Graphics- p3x = ListPlot[ Table[{(i-1)*dt, P3[[i,1]]}, {i,1,Length[P3]}]] -Graphics- Show[p3x,ptx] -Graphics- ISSUES IN SOLUTION The programming of the solutions requires what one might call "advanced beginner" skills. The main question in the solution is whether the computer programming detracts from learning the mathematics, or whether it enhances. The opinion of the problem's author is that the latter case is true.