News for hackers. Stuff that matters.
Re:PID Without a PhD (2016) [pdf] by darshanrai on Tuesday January 30, 2018 @06:08AM (#16264350)
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...

Re:PID Without a PhD (2016) [pdf] by fest on Tuesday January 30, 2018 @09:23AM (#16265468)
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.
Re:PID Without a PhD (2016) [pdf] by gugagore on Tuesday January 30, 2018 @11:43AM (#16266716)
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.