Hacker News new | past | comments | ask | show | jobs | submit login

We actually ended up using this when writing a controller for a quadcopter[1]. Essentially, we have one PID controller operate on the absolute angle (error = desired angle - actual angle). The output of this controller is fed into the second controller as the desired rate of rotation (RoR) (error = desired RoR - actual RoR). The output of the second controller is finally fed to the motors.

Apart from being easier to tune, I just found a good article[2] for why this approach works better for problems such as this. For quadcopters, of course, this allows one to easily switch between rate/acro mode and angle mode.

[1] https://github.com/ThePinkScareCrow/TheScareCrow/blob/master... [2] https://www.controleng.com/single-article/fundamentals-of-ca...




This is also the approach PX4/Ardupilot folks use. It's actually even more elaborate in their case: position loop -> velocity loop -> acceleration/angle loop -> angular rate loop -> motor outputs.


I think it's worth noting that cascaded PIDs are no more expressive than having a state-space controller. But probably it is easier to tune, as you say.

Each integrator is one dimension of state.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: