Final Project
MAE3100: Computation Methods for Engineering Design
Objective: Apply the numerical methods learned in this class to an orbit determination problem.
Project requirements: Individual project; due on Tuesday, December 10 before 4:00pm.
Project Description:
1. A satellite moves in an orbit about the earth. Its distance from the earth was measured at different times and saved in the data file pdata.mat, which can be downloaded from Canvas.
Figure-1: Satellite in an orbit
(1) Fit a regression polynomial to data using the least-squares method.
i) Try different orders of polynomials and find the best one that gives you the smallest total
n
squared residual, i.e.e2 where n is the number of data and e is the fitting error at the i-th
ii i1
data. Show a table comparing this error for different orders of the regression polynomials.
ii) For the best polynomial you select, derive all the necessary equations including the objective function Sr, the necessary conditions for optimality, and equations to determine the
polynomial coefficients.
Note: The general linear least squares method in Section 15.3 is NOT allowed.
iii) Verify your results using the Matlab built-in function polyfit.
iv) Plot your polynomials (the best one you select and another one for comparison) and data
points in one figure using different line styles or colors.
v) Use an optimization method you learned from the class to find the largest distance and the
smallest distance of the satellite from the earth based on the best regression polynomial you obtained from i), ii).
2.
The satellite equation of motion can be described by:
r= r a r3 p
where r = [x,y,z]T is the position of the satellite, r = r . 3.98716708105 km3 / s2 is the gravitational parameter.
3JR2x 5z2 2 e 1 2r5 r2
3JR2y 5z2
a 2
p 2r5r2
e 1 is the perturbation due to the non-spherical earth. R 6378.137 km is the
e
radius of the earth. J2=0.0010826267.
Use different numerical integration methods to find the trajectory of the satellite assuming the initial
conditions of
r(0) [5000, 10000, 2100]T km; r(0) [5.9925, 1.9254, 3.2456]T km/s
The integration time interval is set to [t0 tf ] = [0 32000] -seconds.
(1) Write a general Runge-Kutta integration function with this specified form:
[tout, yout] = RK(ode_function, tspan, y0, h, rk) where the output and input parameters are defined as
ode_function: user defined M-function in which the derivatives f are computed
tspan: the vector [t0 tf] giving the time interval for the solution; t0 is the initial time and tf is the
3JR2z 5z2
2e3
2r5 r2
final time
y0: column vector of initial values of the vector y
tout: column vector of times at which y was evaluated
yout: a matrix, each row of which contains r = [x,y,z] and r = [x,y,z] evaluated
corresponding time in tout h: time step
at the
rk: rk can only take the values of 1, 2, or 4. rk=1 indicates the 1st-order RK method; rk=2 indicates the 2nd-order RK method; rk=4 indicates the 4th-order RK method.
(2) Use the above function to compute the trajectory of the satellite using the 1st order, 2nd-order and the 4th order RKs with the step size of htf t0 , htf t0 , and htf t0 seconds,
respectively.
(3) Plot the three-dimensional trajectories ([x(t),y(t),z(t)] ) of the satellite obtained from the three RK methods in one figure using different line styles and colors with the given three step sizes.
A function DrawEarth.m (downloaded from Canvas) is provided to draw an Earth shown in Figure-1.
50 100 200
Note: Three figures should be generated corresponding to the three step sizes, respectively. In each figure, we should see three trajectories about the earth generated from the three RK methods corresponding to one given step size.
(4) Plot the distances of the satellite from the earth vs. time obtained from (3) with the three RK methods in one figure using different line styles or colors. Similar to (3), three figures should be generated corresponding to the three step sizes, respectively.
(5) Use the Matlab function ode45 to compute the trajectory of the satellite and assume it is the exact one. In one figure, use three subplots to show the absolute errors of the distance obtained from (4) compared to the exact one.
Note: you should present three figures corresponding to the three step sizes, respectively. Each figure has three subplots corresponding to the three RK methods, respectively.
3. Project Report Technical Memo
All the results must be analyzed and discussed.
The report should be in a format of the technical memo.
The report should include all the figures and equations using one column, single spacing, font of Times New Roman 11, and page margin of 1 inch. There is no page limit.
The Matlab code should be clearly commented and all the programs should be placed in the Appendix.
Reviews
There are no reviews yet.