The demo MarsOptimalTransfer uses JPL ephemeris and fmincon to find a fully 3D trajectory for continuous thrust. This requires the MathWorks Optimization Toolbox. The total acceleration over the trajectory is minimized while the orbit meets the constraints of the final circular orbit. This is a fixed endtime optimization. A related function FindDepartureDate can search for the best time of year to leave the departure planet. This direct optimization is quite fast, requiring only seconds.
Once the optimization has found the best acceleration profile, you can use it to size a spacecraft given engine parameters with SpacecraftFromAccel. This function will take the exhaust velocity, specific power, and efficiency of the engine and compute the power, engine mass, and fuel mass given a payload mass.
This demo provides an example for a 6 month transfer to Mars with a fixed departure date of June 19, 2022.
The trajectory looks as expected; the acceleration is plotted using quiver, which shows both the direction and the relative magnitude. The most acceleration occurs at the beginning and end of the trajectory with less in the middle. This makes sense as the optimal solution for a power-limited rocket can be shown analytically to be a linear profile.
Here is a plot of the actual acceleration, both the x, y, z components and the magnitude. The acceleration is mostly planar (x/y) with a small z component to correct the inclination. The ephemeris is in the ecliptic plane.
The SpacecraftFromAccel function computes the fuel mass and total mass for the vehicle given engine parameters and a payload mass.
It prints the results to the command line as well as plots the mass and thrust over time. In this example, for a payload mass of 10,000 kg, the total mass was just over 40,000 kg, for a payload fraction of just under 25%.
Total mission DV: 23.2 km/s Max thrust power: 3.496 MW Total mass: 40712.9 kg Payload mass: 10000 kg Engine mass: 11654 kg Fuel mass: 15121 kg Structural mass: 1210 kg Payload Fraction: 0.245622
Module: Orbit/Optimization
Children: TrajectoryBetweenTwoPlanets, SpacecraftFromAccel, PlanetPosJPL
Demo: MarsOptimalTransfer
Edition: SCT Profressional Edition
Version: 2023.1
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article