A simulator was built in MATLAB that can be found on GitHub. The simulator tracks 13 state variables, and uses quaternions to track attitude. Fully coded in MATLAB the simulator uses full non-linear equations of motion and RK4 integration to advance each simulation step. The simulator also includes aerodynamic modeling, allowing for the assessment of active and passive stability. This simulator is also loaded with the U.S. Standard atmosphere to more accurately model how changing atmospheric conditions can affect a vehicle.
As can be seen by the body-axis graph of an aerodynamically stabilized rocket, the sim properly handles apogee behavior as expected. The simulated launch was angled, and it can be observed that the simulated rocket pitches over due to aerodynamic forces at apogee, and falls back to the ground nose first. Being aero-stablized, oscillations increase as the rocket slows at apogee, as expected. The observance of clean parabolic arcs show that the gravity vector is being correctly rotated between reference frames, thus the attitude calculations are consistent.

While the simulator does only exist in script format, not easily accessible to a layperson, it readily accepts thrust curves or control logic managing throttle. Aerodynamic calculations are included in the simulation but they can be replaced by higher quality tables from CFD or DATCOM, for example.

This simulator is able to run with a micro-controller "in-the-loop", and can send it noisy data as if from onboard sensors. This allows for the testing of the actual flight software, ensuring greater reliability and performance.

You may also like

Back to Top