2024

A thrust-vector gimbal

A filter with no memory, holding a rocket upright. Mostly.

The thrust-vector gimbal has to correct angular error while the mechanism is already moving. Proportional feedback alone does not account for that motion; integral action can accumulate a request the actuator cannot deliver.

My part controller and code

My contribution

At LASSET I built a two-axis PID controller with a tracking and monitoring GUI. The proportional term reacts to error, the derivative term damps changes, and the integral term addresses persistent bias. The demonstration was submitted to the Research Excellence Awards Initiative for funding consideration.

Inspect the work

Two servos, one IMU, a PID loop holding a rocket motor upright, written for BRAC University's LASSET lab. The public code is two gists; reading them again in 2026 found a filter with no memory.

Hold a rocket upright against the windpush the wind, tune the gains

Loading the diagram. It needs JavaScript; the text around it says the same thing in words.

A filter with no memory

v1 fuses gyro and accelerometer with a complementary filter (0.96 / 0.04).

Each call creates a new uninitialized local angleX, rather than retaining the previous estimate. V2 separates X and Y loops but uses accelerometer-only angles. Its I and D gains use milliseconds, so their numerical values cannot be copied unchanged into a seconds-based loop. Servo commands are clamped; the error integrals are not.

Archived source: gist v1 (2024-09-12). Read the finding