This project is a small part of a larger project. Said larger project is designing a flight computer for a dual stage rocket. In this flight computer, there is a barometric pressure sensor that is used to track altitude. The current computer setup was tested previously to get altitude data from a real flight. The current setup also implemented a Kalman filter for data smoothing. After an analysis of the data the test created, it was determined that different Q and R values should be used in the filtering. Q and R values are two constants in the Kalman filter calculation. If the ratio between Q and R is high, then sensor measurements are favored, and if the ratio is low, model measurements are favored. This leads to the problem of data lag. The Kalman filter produces smooth data, but this data lags behind the raw data by about a second. On the other hand, if this lag is diminished, the Kalman filter produces data that is not smooth enough for the use case.
In a dual stage rocket, the flight computer needs to have smooth values for altitude, velocity, and acceleration. The parachute is deployed when velocity reaches zero, and the second motor is ignited after the first burns out, when acceleration reaches zero. As the entire flight of the rocket is about ten seconds, the one second delay between raw and Kalman data produced by the current Kalman filter constitutes a flaw that must be resolved.
Hence, this project hopes to solve the problem of reducing the delay between raw and Kalman altitude data, as well as keeping the Kalman data smooth enough that its second time derivative is smooth enough to be usable. The project attempts to solve this problem by initially fitting a quadratic curve to the raw altitude data. The program then optimizes the values of Q and R so as to produce Kalman altitude data that produces the same quadratic curve fit. The closer the quadratic curve fit of the Kalman data is to the fit of the raw data, the better the Kalman data represents the raw data.
Built With
- c++
- eigen
Log in or sign up for Devpost to join the conversation.