TVC Rocket - CAPTR

CAPTR - Controlled Aerial Precision acquisiTion of Rocket. Thrust-Vector Control model rocket with custom avionics and sigma-point kalman filtering.

Links

Github: Embedded Firmware Github: Simulink model

The goal of this project is to propulsively launch and recover a small model rocket, much like what was done by BPS Space and many others. To do this, thrust vector control (TVC) must be used to keep the rocket at the desired attitude. I led a group of 4 to work on this project, and collaborators can be found on the GitHub repositories.

Attitude Determination

The attitude determination algorithm is an Unscented Kalman Filter using quaternions to keep track of the internal state. It fuses the gyroscope and magnetometer. The accelerometer is only used for the initial attitude calculation, as the acceleration from thrust corrupts the measurement. The advantage of a UKF lies in its

The filter is implemented according to the following paper: https://kodlab.seas.upenn.edu/uploads/Arun/UKFpaper.pdf

This filter achieves a 416 Hz predict rate and 20 Hz update rate. Higher update rates are possible, but not useful for this project.

Controller

The controller is a rate-attitude cascaded PID controller, with the inner loop controlling the thrust vector and the outer loop commanding desired rates based on the orientation. This system was designed and simulated, along with a 6DoF dynamic model of the rocket, within Simulink. Our initial hold-down testing revealed oscillatory behaviour due to an inaccurate model and thus incorrect gains. I performed system identification of the thrust-vectoring mount to derive a nonlinear transfer function for the mount. This model was characterized with a >80% accuracy to the validation data.

Firmware

The flight computer runs embedded firmware on FreeRTOS that I wrote in C++ on the Arduino framework due to its ease of use. I implemented a FSM to gracefully manage various tasks, take commands over radio link, and transition between appropriate flight states. The firmware interfaces with all the relevant sensors and peripherals over both custom-written and open-source drivers over I2C, SPI, and Serial.

Flight Computer

While we first tested a protoboard version of our flight computer to develop our GNC systems, I created a flight computer that integrates the following functionality:

  • Support for RF communication over LoRA with an offboard SPI radio device
  • Pyro charge firing for 3 independent pyro channels
  • 9-DoF IMU with gyro, accelerometer, and magnetometer
  • 6 servo outputs
  • Support for offboard GPS module over serial/I2C
  • Support for Runcam Split 4 to record 4K video of flights

The flight computer is powered and armed with two separate airframe switches to prevent arming on the pad before readiness.