cakelab
Home Projects Research Misc. Contact

Space Vehicle Ascent Profile

Calculation of an Optimal Ascent Profile for Launches of Rockets in KSP

08-Sep-2019

Rocket science .. how difficult can it be?

From time to time I enjoy building and launching rockets in Kerbal Space Program (KSP). In my opinion a quite comprehensive simulator to learn a bit about orbital mechanics and space travel. The standard way to launch a rocket in KSP is by hand steering, throttling and staging, which is always a gamble:

  • Do I have enough thrust?
  • When should I start my gravity turn?
  • How fast should I accelerate?
  • Will my rocket flip due to aerodynamics?

Most of the time, you waste to much fuel, overshoot your target orbit or blow up the rocket. This is of course part of the game, but in the real world rocket launches are well planned and then fully automated executed by on-board computers. There are a couple of modifications (mods) for KSP which support fully automated launch and ascent to orbit but those require a lot of tinkering with the configuration and then basically run down a sub-optimal predefined path, which often ends in a big explosion too - not really helpful.

Goal of this project is to develop a method to calculate and control the launch of a space vehicle from a given launch site on a planet to a given orbit. It is supposed to consider the following parameters:

  • Space Vehicle
    • Aerodynamics (at least its contact surface)
    • Weight (dynamic)
    • Stages and their engine characteristics (ignition type, thrust, fuel flow)
    • Required remaining fuel or end stage
  • Launch Site
    • Planet mass and radius
    • Atmospheric height and density distribution
    • Launch site location
  • Target Orbit
    • Height (circular orbits only, for now)

Progress Report

  • Read about physics basics: Kepler orbits, newton's law of universal gravitation, Homann transfer orbits, atmospheric pressure and aerodynamics, KSP pages on engines, thrust to weight ration etc..
  • Developed equations to determine required acceleration and speed at a given height required to reach orbit velocity and target orbit height at the same time. Used that as input to a simple steering control method, staying at full throttle for the whole ascent. This was implemented as a set of scripts for the Kerbal Operating System (kOS). It was semi-successful, required too many rocket specific adjustments.
  • Tried again to find a closed form of an equation and finally decided, that there is no such equation (at least not with the math tools we have today).
  • Developed equations to use as core in a numerical approach, using a hill-climbing method to find the optimum ascent profile and tested it in GNUplot. This approach now also considers staging and atmospheric pressure. The optimal ascent profile will be used in flight to control steering inputs, staging and throttle in a control loop, constantly checking speed and height. It might be necessary to recalculate the flight path in case something unexpected happens (e.g. lost an engine).

Since KOS does not provide access to necessary data (e.g. actual rocket extend and specific engine characteristics), I have to write a modification instead, I guess ... currently I don't feel like throwing away all my kOS scripts ...


Holger Machens, 02-Jan-2021