Testbed for handmade flight controllers using simulated IMU data
Testbed for handmade flight controllers using simulated IMU data
Some final requirements met.
Log in to leave a comment
Flavortown Devlog – Day 3 (25/12/25)
Status: Initial prototype complete, meeting primary requirements
Progress:
Finalized the core 3D rigid body simulation with quaternion-based attitude representation.
Implemented IMU simulation with noise and bias.
Integrated a Kalman filter for angular velocity estimation.
Developed hybrid PID + attitude controller loop.
Achieved stable attitude tracking under initial test scenarios.
Added torque and angular velocity constraints; noted that these limit the system artificially but maintain simulation stability.
Observations:
The system responds predictably to reference angular velocities and desired orientations.
The PID controller is functioning properly; torque outputs remain capped by design.
Attitude tracking shows smooth convergence toward the target quaternion, despite initial bias and noise.
Some “clipping” of torque and omega_ref observed due to imposed limits; can be relaxed in future iterations.
Next Steps (future considerations, post-prototype):
Evaluate removal of torque/omega_ref limits to study natural system response.
Consider adding hydrodynamic/aerodynamic effects for drone/USV applications.
Explore Hardware-in-the-Loop (HIL) testing with real sensors or motors.
Document simulation framework for potential DIY drone and USV community usage.
Notes:
The platform is currently suitable for learning, prototyping, and controller testing, but not yet for full-scale real-world deployment.
Prototype satisfies initial design goals; development phase concluded for now.
End of Day 3 Update
Log in to leave a comment
Date: December 24
Status: Stable simulation, development pause
Objective
Validate the inertial control loop behavior in a fully simulated environment before introducing sensor imperfections and model uncertainty.
The focus was on:
Angular velocity convergence
Torque behavior at equilibrium
Structural correctness of the control loop
Observations
During the final simulation steps (140–190), the system consistently reported:
Angular velocity equal to the setpoint
Zero applied torque
No oscillation or drift
This indicates:
Proper convergence of the controller
Stable equilibrium
No residual control effort once the target state is reached
From a control-theory standpoint, this is the expected outcome in an idealized model.
Merry Christmas guys!
Log in to leave a comment
Day 1 — Closing the Loop with Kalman + PID
Today I successfully closed the control loop of my Inertial Control Sandbox. I implemented a 1D Kalman filter to estimate angular velocity and gyro bias, and used this estimate as the input for a PID controller.
The system converged stably to a target angular velocity despite sensor noise. While the estimated bias did not converge to the true bias value, the controller still performed well, revealing an important observability limitation when no rest condition or secondary sensor is available.
This confirmed that rate control can tolerate imperfect bias estimation, but angle estimation will not — motivating the next phase of the project.
Next: integrate angular velocity into angle (θ) and observe drift (A5).
Log in to leave a comment
Working on the first workflow of this sandbox. This will be useful for anyone who wishes to make projects with any flight controller.
Log in to leave a comment