DOING PHYSICS WITH MATLAB A SIMULATION OF THE MOTION OF AN EARTH BOUND SATELLITE Download Directory: Matlab mscripts mec_satellite_gui.m The [2D] motion of a satellite around the Earth is computed from is initial position at or above the Earth s surface and its initial velocity. A finite difference scheme is used to calculate the position, velocity and acceleration of the satellite at each time step from the gravitational force acting on it. Since we are considering a [2D] problem, a vector quantity may be expressed as a complex function where the real part gives the X component and the Y component is given by the imaginary part. Thus, calculations can be done on a single complex variable rather than two variables which represents its components. A graphical interface is used to change the input parameters of the model. http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 1
SATELLITE MOTION Why do the planets and comets orbit around the Sun, the Moon around the Earth and satellites around the Earth? The motion of the planets was the principal problem Newton set out to solve and many historians consider the field to physics to start with his work. You drop a stone and it falls straight down because of gravity. When the stone is projected horizontally it falls in a curved path. The faster it is thrown, the wider the curved path becomes. If you throw it faster enough so that the curved path matches the curvature of the Earth, the stone will fall around the Earth rather than into it. It will become an Earth satellite. Rockets are very inefficient for putting objects into space because they must carry their own fuel. However, in future, it may be possible to launch an object from the Earth s surface with sufficient velocity to put it into orbit using an electromagnetic launcher with only a small energy requirement of less than 10 kwh.kg -1. Small cubes have already been accelerated at Los Alamos to speeds approaching the escape velocity from the Earth. http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 2
When spacecraft are sent to the distant planets, the slingshot effect is used where a big planet s immense gravity gives them a boost by increasing their kinetic energy in an elastic collision with a moving planet. For example, a spacecraft is given a gravity boost by Jupiter in its journey to Saturn. In this simulation will be investigate the motion of a projectile launched from or near the Earth s surface. After launch, the projectile can crash back into the earth, become an orbiting satellite or escape completely from the Earth. The simulation can be modified to study the motion of the planets or comets around the Sun. http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 3
Several simplifications are necessary in setting up the mathematical model used in the simulations: The only force acting on the satellite (projectile) once it has been launched is the gravitational force exerted by the Earth. The satellite acquires all its kinetic energy by its initial propulsion, there is no rocket or other energy sources to propel it after it launched. The satellite moves in a plane. The Earth is a stationary inertial frame of reference and the Earth is a perfect sphere. The gravitational force Ft () acting between a satellite of mass m and the Earth gives the equation of motion for the satellite G M m G M m E E (1) F( t) R( t) or F 3 2 R( t) R( t) from which its trajectory can be determined. The trajectory of the satellite is given by its position vector Rt () which points from the Earth (main focus) to the satellite. http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 4
The components of the position vector Rt () are xt () and yt (). G is the Universal Gravitation Constant and M E is the mass of the Earth. The gravitational force is an example of an inverse-square law and is often referred to as a central force. http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 5
The Finite Difference Method for Calculating the Trajectory The acceleration at () and the velocity vt () of the satellite are determined from the equation of motion G M m G M ma( t) R( t) a( t) R( t) R( t) R( t) E E (2a) 3 3 (2b) G M E x( t) G M E y( t) ax( t) a ( ) ( ) ( ) ( ) 3 y t R t x t y t 3 R( t) R( t) 2 2 2 The numerical procedure adopted, is based on a half-step method and the smaller the time interval t used the better the approximations. From the definitions of velocity and acceleration, at any time, t we have (3) x( t t / 2) x( t t / 2) y( t t / 2) y( t t / 2) vx( t) vy( t) t t (4) x( t t) 2 x( t) x( t t) y( t t) 2 y( t) y( t t) ax( t) a ( ) 2 y t 2 t t http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 6
Therefore, the location of the satellite at time t t can be calculated directly from the location at the two previous time steps, t and t t (5a) (5b) 2 G M E t x() t x( t t) 2 x( t) x( t t) 3 Rt () 2 G M E t y() t y( t t) 2 y( t) y( t t) 3 Rt () The kinetic energy Kt, () gravitational potential energy, U () t and total energy, Et () are given by G M E m K( t) mv( t) U ( ) ( ) ( ) ( ) 2 G t E t K t UG t Rt () 1 2 (6) and the angular momentum L for a satellite moving in the XY plane is (7) L( t) R( t) mv( t) L ( t) x( t) v ( t) - y( t) v ( t) L ( t) L ( t) 0 z y x x y G The angular momentum L z is a remarkably sensitive parameter to any failure in the numerical procedure for solving central force problems. http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 7
You can keep track of the angular displacement z of the satellite so that you know how many revolutions have been completed. From the definition of angular momentum, the change in angular position z() t in each time step t is Lt () t R () t (8) z () t 2 The addition of the changes in angular position gives the total angular displacement z (azimuthal position) of the satellite. http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 8
Analytical Analysis Circular orbits When a satellite is in a circular orbit about the Earth, it is in free fall but remains a constant distance above the Earth s surface. The satellite must fall a distance equal to the distance the Earth falls away below the satellite due to the curvature of the Earth in any given time interval. Consider a satellite moving at a distance R from the center of the Earth with an orbital velocity, v orb that has its initial components of velocity as v 0x = v orb and v 0y = 0 http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 9
Let s y be the distance the circular orbit curves away from the tangent drawn from the point O in a distance s x as shown in figure 1. O s x s y + X + Y 2R - s y Fig. 1. Geometry and curvature of a circular orbit of radius R. From the geometry shown in figure 1, the fall distance s y is s s s y 2 x s 2 x y R sy x 2 y 2 s R s R Using the equations of uniform acceleration for the X and Y motion, and g is taken as the acceleration due to gravity at the distance R from the center of the Earth, the orbital velocity, v orb for a circular orbit can be determined from the time t to fall the distance s y http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 10
2 x 1 2 s sy g t t 2 2R s x gr s v t v x orb orb s x gr (9a) vorb g R The orbital velocity can also be calculated by equating the gravitational force to the centripetal force 2 E orb E m g g 2 2 2 G M m mv GM R R R (9b) v orb GM R E where the mass of the Earth is M E = 5.98 10 24 kg. Therefore, the greater the radius R of the circular orbit, the smaller the orbital velocity v orb. http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 11
The period T for the circular orbit is 2 R vorbt (10) T 2 R v orb Escape velocity The minimum velocity at which a projectile can be launched to escape the Earth s gravitational field is called the escape velocity v esc. Assume that the work done by the Earth s gravitational field on the projectile as it moves to an infinite distance from the Earth equals the change in kinetic energy. The initial velocity of the projectile is v esc and the final velocity is zero Work done by gravitational field on projectile = Change in kinetic energy of projectile GME 1 0 R 2 dr 2 mv r 2 esc (11) v esc 2GME R 2 v orb http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 12
When the distance R is equal to the Earth s radius, R E = 6.4 10 6 m, the orbital velocity is v orb = 7.9 km.s -1 and the period is T = 84 minutes (5.0 10 3 s). In a time interval of t = 0.1 s the satellite falls a distance of s y = 50 mm and travels horizontally a distance s x = 790 m. The escape velocity for the projectile is v esc = 11 km.s -1. http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 13
Kepler s Laws The laws of planetary motion were discovered by the German astronomer Johannes Kepler (1571 1630) from his 20 years processing astronomical data. These laws not only apply to planets but also to satellites. Kepler s 1 st law The path of each planet around the Sun is an ellipse with the Sun at the focus. For a satellite about the Earth, its trajectory will be an ellipse with the Earth at one focus. center line y minor axis a a b a ae perigee (perihelion) F 2 ae F 1 main focus at (0,0) x major axis apogee (aphelion) R max R min Fig. 1. ellipse. The path of a planet or a satellite in an orbit is an http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 14
The equation of an ellipse with its centre at the Origin O(0,0) is (12) x a 2 2 y 1 2 2 b An ellipse is defined as the locus of points, the sum of whose distances from the foci, F 1 and F 2 is equal to 2a. The maximum and minimum distances from the main focus are R max and R min respectively. The distance a is the semimajor axis and the distance b is the semiminor axis. The eccentricity e of an orbit is a dimensionless measurement of the elongation of the orbit (0 e 1) (13) 2 2 max min max min R R a b R R a e 2 a 2 The point of closest approach a satellite makes with the Earth (- R = R min ) is known as the perigee (perihelion for a planet orbiting the Sun) and the point where the distance is greatest (R = R max ) is called the apogee (aphelion). For a circular orbit, R max = R min, a = b and e = 0. The most extreme orbit corresponds to R min = 0, R max = 2a and e =1. http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 15
Kepler s 2 nd law The radius vector from the Sun to the planet sweeps out equal area in equal time intervals. For our satellite, equal areas are swept out in equal time intervals by the radius vector from the Earth. This law is a consequence of the law of conservation of angular momentum, L constant small time interval t) can be expressed as (14). In figure 2, the area of each triangle (for a A v t r A v t r L mv r mv r A A 1 1 1 2 t1 1 2 2 t2 2 t1 1 t2 2 1 2 where v t is the tangential velocity. When a satellite moves in ellipse (e 0), R is continually changing, therefore, when the satellite moves close to the Earth it must speed up and as it gets further away from the Earth it must slow down (v t R = constant). http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 16
Fig. 2. Law of conservation of angular momentum: equal areas are swept out in equal time intervals. Kepler s 3 rd law The square of the period of revolution of the planet s (satellite) orbit is proportional to the cube of the orbit s semimajor axis. The 3 rd law is a consequence of the gravitational force. For a satellite around the Earth, Gravitational force = centripetal force 2 E mvt 2 2 G M m a vt T a a (15) T 2 2 4 3 GM E a http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 17
Types of orbits The type of obit can be determined from the sign of the total energy, E G M G 2 R 1 2 (16) E K U mv E m E 0 R v 0 Gives a hyperbolic orbit that never closes. E = 0 E < 0 The projectile starts at infinity with zero speed and then swings past the Earth (or Sun) in a parabolic orbit and slows down as it moves back to infinity, ending up with zero velocity. R can not become to large because the velocity would become negative. The projectile moves in an elliptical path around the Earth (or Sun). For a circular orbit, the total energy is negative and equal to onehalf the gravitational potential energy (17) v G M K mv U G M E G M U R R R E 1 2 E 1 E 1 orb 2 G 2 2 G http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 18
Sample Results There is an excellent agreement between the analytical values and the numerical values. This can easily be checked by evaluating the analytical values in the Command Window. Circular Orbit Input Parameters launch velocity, v_0 = 5591.0 m/s launch radius, R_0 = 2.00 --- launch latitude = 0.0 deg launch angle = 90.0 deg simulation time, tamx = 14340.0 s Output Parameters at end of simulation Displacement vector: magnitude R = 2.00 Displacement vector: direction theta_r = -0.00 deg R_x = 2.00 R_y = -0.00 Velocity vector: magnitude v = 5591.03 m/s Velocity vector: direction theta_v = 89.82 deg v_x = 17.82 m/s v_y = 5591.00 m/s Acceleration vector: magnitude a = 1.22 m/s^2 Acceleration vector: direction theta_a = 179.64 deg a_x = -1.22 m/s^2 a_y = 0.01 m/s^2 KE/m = 1.56e+07 J/kg UG/m = -3.13e+07 J/kg E/m = -1.56e+07 J/kg http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 19
http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 20
http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 21
Elliptical Orbit Input Parameters launch velocity, v_0 = 7000.0 m/s launch radius, R_0 = 2.00 --- launch latitude = 0.0 deg launch angle = 90.0 deg simulation time, tamx = 50000.0 s Output Parameters at end of simulation Displacement vector: magnitude R = 2.02 Displacement vector: direction theta_r = -13.68 deg R_x = 1.96 R_y = -0.48 Velocity vector: magnitude v = 6949.14 m/s Velocity vector: direction theta_v = 80.77 deg v_x = 1115.04 m/s v_y = 6859.09 m/s Acceleration vector: magnitude a = 1.19 m/s^2 Acceleration vector: direction theta_a = 164.78 deg a_x = -1.15 m/s^2 a_y = 0.31 m/s^2 KE/m = 2.41e+07 J/kg UG/m = -3.09e+07 J/kg E/m = -6.79e+06 J/kg http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 22
http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 23
http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 24
Escape http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 25
http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 26
Geosynchronous satellite http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 27
Possible Investigations and Questions Inspect and run the m-script mec_satellite_gui.m so that you are familiar with what the program and the code does. For a range of input parameters, view the output values and plots and identify how they relate to each other and to the motion of the satellite. Each time you run a simulation, check: (1) the total energy and angular momentum are conserved and (2) an elliptical orbit is closed when the satellite has completed more than one revolution. If these conditions are not satisfied, increase in the number of time steps. Run the program with the default values. 1 Describe the motion of the planet. 2 Check the predictions of the simulations are valid by considering the conservation of the total energy and the angular momentum. Is Kepler s 2 nd law satisfied? http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 28
3 Test that the orbit is an ellipse by measuring the distances d 1 and d 2 from each focus to a point on the ellipse. Is d 1 + d 2 = 2a? At the end of the simulation, what are the directions of the radius vector, acceleration and force? Is the gravitational force acting on the satellite directed towards the center of the Earth? Is Kepler s 1 st law satisfied? 4 From the plot of the orbit, measure the values of the semimajor axis a, semiminor axis b and the eccentricity e and compare with the output parameters. 5 How do the motion and energy plots relate to the motion of the satellite? How are the velocity and position at the apogee and perigee related? What is the significance of the total energy being negative? How do changes in the velocity and radius relate to each other? 6 Adjust the maximum simulation time to give one revolution. What is the period? How does this agree with the value calculated using equation (15). Is Kepler s 3 rd law satisfied? http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 29
7 Does this orbit give a zero-g environment? Adjust the input parameters to give a circular orbit with more than one complete revolution. Compare the numerical predictions with the analytical predictions. 8 State the criteria you used to test that the orbit was circular? (Check: a, b, e, R, v, v orb, E/U G, launch angle) and verify that each criteria is satisfied. Start with the parameters for a circular orbit with v cir = v orb. 9 What is the shape of the orbit for initial velocities slightly lower than v cir? What is the path of the projectile for initial velocities much less than v cir? What is the shape of the orbit for initial velocities slightly higher than v cir? What is the path of the projectile for initial velocities much greater than v cir? What are the escape velocity v esc and the corresponding value of the total energy E? How does this agree with the analytical prediction? For which cases is Kepler s 3 rd law satisfied? http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 30
Geostationary satellites 10 Adjust the input parameters to simulate a satellite so that in its orbit it remains in the same place relative to the Earth. This is called a geostationary orbit. Does your orbit agree with the predictions using Kepler s 3 rd law? Other investigations 11 Investigate launching a satellite at different latitudes and launch angles. Comment on the output parameters and the trajectory of the satellite. 12 Investigate launching your projectile vertically. How does the height reached by the satellite vary as a function of launch velocity? How do your results compare with the analytical predictions using the principle: the work done by the gravitational force on the projectile equals the change in its kinetic energy? What initial energy is required to launch a projectile vertically so that it reaches a height that is twice the Earth s radius. http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 31
13 Reduce the number of time steps until the simulation results are no longer valid (non-conservation of total energy and linear momentum, or orbit not a closed ellipse). What is this value of the time step? 14 Investigate the trajectory of a satellite if the gravitational force was not exactly an inverse square law but varied as 1/R n where n 2. Comment on the output parameters and the trajectory of the satellite. The orbit of the planet Mercury precesses by about 0.1 o per century. What is meant by the term precession and how does it relate to n 2, and so why does the orbit of Mercury precess. 15 Change an m-script to create a simulation for the motion of the planets or comets around the Sun. 16 Create a simulation of the sling-slot effect by giving either the Earth or the Sun a small constant velocity. 17 Simulate an orbit in which the total energy is zero, E = 0. Comment on the output parameters and trajectory of the orbit. If a satellite were in a parabolic orbit, would it return? http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 32
Ian Cooper ian.cooper@sydney.edu.au School of Physics, University of Sydney N.S.W. Australia http://www.physics.usyd.edu.au/teach_res/mp/mphome.htm 33