Simulation
DraftSpace systems cannot be tested in their operating environment before they encounter it, so simulation is not a supplement to testing but a substantial part of the verification itself.
Orbit propagation
The most basic simulation is predicting where a spacecraft will be. From Orbital perturbations, the two philosophies divide by accuracy and cost.
| Method | Model | Accuracy | Cost |
|---|---|---|---|
| Keplerian | Two-body only | Useful for hours | Trivial |
| SGP4 | Mean elements with and drag | Kilometres, degrading daily | Microseconds |
| Special perturbations | Full numerical integration | Metres or better | Seconds to minutes |
A high-fidelity force model includes the geopotential to degree and order 70 or more, atmospheric drag with a density model, lunar and solar third bodies from a planetary ephemeris, solar radiation pressure with eclipse modelling, solid and ocean tides, and relativistic corrections.
The integrator matters. Orbital dynamics are smooth, so high-order methods such as Runge-Kutta 8(9) or Gauss-Jackson achieve good accuracy at large step sizes. Symplectic integrators preserve energy over very long integrations, which is what long-term stability studies need.
Density is the accuracy limit in low Earth orbit, not the integrator. Thermospheric density varies by more than an order of magnitude over a solar cycle and is not predictable far ahead, so a propagation is only as good as the space weather forecast underneath it.
Six degree-of-freedom simulation
A full vehicle simulation couples translation and rotation with every subsystem that affects either.
| Component | Contributes |
|---|---|
| Orbital dynamics | Position and velocity under the force model |
| Attitude dynamics | Rotation under torques, including flexible modes |
| Environment | Gravity, atmosphere, magnetic field, solar flux, eclipse |
| Sensors | Modelled outputs including noise, bias, misalignment and failure modes |
| Actuators | Wheel, thruster and magnetorquer response including saturation and lag |
| Flight software | Ideally the actual flight code, not a reimplementation |
| Structural flexibility | Modes excited by slews, which limit achievable pointing |
Running the actual flight software rather than a model of it is the single most valuable property. A simulation testing a reimplementation of the control law verifies the algorithm; one running the compiled flight code also verifies the implementation, the timing and the interfaces, which is where defects actually live.
Testing in the loop
Each stage catches a distinct class of defect and none subsumes the one before.
Processor in the loop is the stage most often compressed under schedule pressure, and it is where timing bugs surface. Flight code that meets its deadlines on a workstation may not on a processor three orders of magnitude slower. See Avionics.
Hardware in the loop requires stimulating real sensors with simulated inputs, which is its own engineering problem. A star tracker needs a star field projector or an optical stimulator; an inertial measurement unit needs a motion table; a GNSS receiver needs a signal simulator. These facilities are expensive, and their absence is a common gap in small-satellite programmes.
Monte Carlo dispersion analysis
A single nominal trajectory says nothing about robustness. Dispersion analysis runs thousands of cases with randomised uncertainties.
| Dispersed quantity | Typical distribution |
|---|---|
| Injection state | From the launch vehicle’s stated accuracy |
| Vehicle mass and inertia | Manufacturing tolerance |
| Thrust magnitude and direction | Engine and alignment tolerance |
| Sensor noise, bias and alignment | Component specification |
| Atmospheric density | Model uncertainty and space weather |
| Actuator response | Timing and magnitude variation |
The outputs are the numbers that go into the design.
Statistical delta-v is sized from the distribution, usually at the 99th percentile, and is the term distinguished from margin in Delta-v budgets. Landing ellipses are the dispersion of touchdown position. Probability of mission success falls out of the fraction of cases meeting all requirements.
The main pitfall is that the result is only as good as the input distributions. Assuming Gaussian errors where the real distribution has heavy tails underestimates the failure probability precisely in the cases that matter, and correlations between parameters are frequently omitted because they are hard to characterise.
Entry, descent and landing
The hardest simulation problem, because the physics is difficult and there is no opportunity to retry.
Aerodynamic coefficients in hypersonic rarefied flow are uncertain, atmospheric density profiles vary substantially day to day, parachute inflation is a stochastic fluid-structure interaction, and terrain interaction at touchdown depends on soil properties that were estimated from orbit.
The consequence is that EDL simulation is dispersion-heavy by necessity, and programmes run very large Monte Carlo campaigns because the tails are what kills the vehicle. See Mars.
Toolchains
| Tool | Origin | Use |
|---|---|---|
| GMAT | NASA, open source | Mission analysis, optimisation, scripting |
| Copernicus | NASA JSC | Trajectory design and optimisation |
| STK | Ansys, commercial | Broad analysis, visualisation, coverage |
| Orekit | Open source, Java | Flight dynamics library, well validated |
| Basilisk | University of Colorado, open source | Astrodynamics and spacecraft simulation |
| 42 | NASA Goddard, open source | Attitude and orbit dynamics |
| Nyx | Open source, Rust | Modern flight dynamics and orbit determination |
| SPICE | NAIF at JPL | Ephemerides, frames and time; the de facto standard |
SPICE deserves separate mention because it is infrastructure rather than a tool. It provides planetary ephemerides, reference frame transformations, spacecraft trajectories, instrument geometry and time conversions in a standardised form, and essentially every planetary mission uses it. Its existence is why frame and time handling, described in Reference frames and time systems, is a solved problem rather than a recurring source of error.
Validation
A simulation is a model and can be confidently wrong. The disciplines that guard against it are unglamorous.
| Practice | Purpose |
|---|---|
| Test against analytical cases | A two-body propagation must conserve energy and reproduce closed-form results |
| Cross-validate between tools | Independent implementations should agree; disagreement locates a bug |
| Correlate against flight data | The strongest validation, and the only one that catches modelling omissions |
| Version and archive | A result must be reproducible from an archived configuration years later |
| Document assumptions | Every simplification, stated, so a later user knows the validity range |
Cross-validation is the most practical. Two independently written propagators with the same force model should agree to numerical precision, and the process of finding out why they do not is how errors are located.
References
- Montenbruck, O. and Gill, E. Satellite Orbits: Models, Methods and Applications, Springer, 2000.
- Vallado, D. A. Fundamentals of Astrodynamics and Applications, 5th ed., Microcosm Press, 2022.
- Acton, C. H. “Ancillary data services of NASA’s Navigation and Ancillary Information Facility”, Planetary and Space Science, 44:65, 1996. SPICE.
- Way, D. W. et al. “Mars Science Laboratory: Entry, Descent and Landing System Performance”, IEEE Aerospace Conference, 2007.
- Alcorn, J., Schaub, H. and Piggott, S. “Simulating Attitude Actuation Options Using the Basilisk Astrodynamics Software Architecture”, IAC-16.