← All projects
High school research project

Optimizing Rocket Stability Through Thrust Vector Control and Aerodynamic Design

Daniel Ghasemfar

One of the greatest challenges a rocket faces as it ascends is the problem of small-scale vibrations and more macro-scale deviations in flight path. At the same time, SpaceX is creating a reliable landing rocket, and the keystone technology that lets the Falcon 9 land is the thrust vector control at the bottom of the rocket. For this research project I explore the feasibility of TVC and deliberate aerodynamic design in optimizing rocket stability, both macro and micro.

The working dual axis thrust vectoring mount.
The working dual axis thrust vectoring mount.

Aerodynamic Factors

Currently, the primary way rockets remain stable in flight is by lowering the center of pressure (COP) below the center of mass (COM). As a rocket flies upwards, every inch of its surface is affected by a different drag vector, and the sum of all these vectors acts on one point, the COP. However, the rocket rotates around its COM. Therefore, if the COP is above the COM, you essentially have an inverted pendulum. This is why almost all rockets have fins. More area at the bottom results in a lower COP and a more stable rocket.

Electronics and Rocket Motors

The first thing I considered was the scale and power of the motor. Looking for a cheaper option, I chose the 40 Newton-second E motor, which is most common in a 29 mm format, so I had to design around that diameter. I needed two servos that were light, responsive, and cheap, so I chose the MG90. I went with the well-tested MPU6050 accelerometer for my input and a higher end altimeter from Apogee Rockets. All of the computation is done on an Arduino Uno, and data is written to an SD card for post-flight analysis.

Wiring diagram of the rocket electronics
The electronics.

Dual Axis Thrust Vectoring Mount

Finding Rafael Guida's 3D printable STL files on Thingiverse gave my project a huge head start, and the dimensions already fit the 29 mm E motor and the MG90 motors. Due to support structure and print instructions, it took me four tries to get the perfect shapes. After sanding down some surfaces, connecting some M3 screws, super-gluing the MG90 motors into the appropriate slots, and using steel gauge as a connection between the motors and the housing, I had a working 2D mount.

Range Calculation and Simulation

Before launching my actual rocket and potentially losing all my expensive components, I made a simulation of the ideal flight. I derived a second-order differential equation to model the flight of the rocket with aerodynamic drag. The key factors are that the mass of the rocket changes as it loses fuel and the drag has a square relationship to the velocity.

Simulated height with air resistance
Simulated height with air resistance.

Latency Tests

I wanted to make sure the mount was quick enough to successfully implement a PID controller. I set up my iPhone's slow motion camera directly above the TVC, along with a protractor and a light that would signal the moment an action is sent from the Arduino. There is about 25 milliseconds of lag between when the signal is sent and when the casing moves. The X-axis was about 10 milliseconds slower, likely because it is both heavier and the screws on it are a little tighter.

Latency curves for both axes
Latency for both axes, for a 5 degree input.

PID Controller Simulations

To predict the result of a PID controlled motor on the ascending part of the flight, I simulated a turbulent flight and then tested the effects of vectored thrust. I used a Perlin noise type algorithm to generate large-scale deviations (caused by wind, an off-center COM, or a non-perpendicular launch angle) and random numbers to add small, local deviations (caused by motor vibrations, harmonic oscillation, or turbulent flow). I did not tune my controller and simply used P=0.5, I=0.01, D=0.01.

Simulated angle of deviation before control
Simulated angle of deviation before control.
Simulated angle of deviation after control
Simulated angle of deviation after control.

Clearly, in simulation the TVC mount improves rocket stability. The standard deviation for the control was 7.261, while for the PID launch it was 3.342. Because of the latency, the PID did not eliminate small-scale instability.

Future Work

The most urgent goal is to launch the model rocket, with one static test to make sure the 3D printed TVC mount does not melt and then one real launch. After that, I would design 3D printed fins of different shapes and find a metric to rate them by, including variations on the flat design, spirals, grid fins, and mini-cones. On the software side, a Kalman filter seems like a good choice for a launch, because there is a measured state and a calculated state.

Rocket fin design ideas
Fin design ideas.